Bob, On Nov 24, 2011, at 3:22 PM, bob zhang wrote:
> m_expr : > [[ "foo"; f -> print_endline "first" > | "foo" ; "bar"; "baz" -> print_endline "second"] > ]; Since camlp4 is a recursive-descent parser, I don't think you can have "foo"; ... | "foo"; "bar". I would suggest having a single "foo" in the rule above and have a separate rule that branches depending on whether "bar" is found. -------------------------------------------------------------------------- - for hire: mac osx device driver ninja, kernel extensions and usb drivers ---------------------+------------+--------------------------------------- http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont ---------------------+------------+--------------------------------------- -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs
