> Matthieu, > > Is the camlp4 grammar parser case-insensitive? > > Will both Delay and delay be accepted in the actionDelay rule? > > actionDelay: [ [ "delay"; expression -> > Asthelper.failwith (convert_loc _loc) > "RVC-CAL does not permit the use of delay." ] ];
No, only "delay" is accepted. > Also, I noticed that your lexer has a really small token set, i.e. > > type token = > | KEYWORD of string > | SYMBOL of string > | IDENT of string > | INT of int * string > | FLOAT of float * string > | CHAR of char * string > | STRING of string * string > | EOI > > My custom lexer, on the other hand, has a HUGE token set, e.g. > > type token = > | BUY_TO_COVER > | SELL_SHORT > | AT_ENTRY > | RANGE > | YELLOW > | WHITE > | WHILE > | UNTIL > ... > > This is partly because I have a very large set of keywords. > > Do I correctly understand that I do not need all the keywords since I can > match > them in the camlp4 grammar as strings like "BuyToCover", "SellShort", etc.? Yes that's right. Also a good source of information, being given the status of Camlp4 documentation, is Camlp4 source code, especially camlp4/Camlp4Parsers/Camlp4OCamlRevisedParser.ml and Camlp4OCamlParser.ml > I had no idea Camlp4 had been used to write such non-trivial parsers... Actually the aforementioned files show the power of Camlp4 parsing and grammar extension capabilities quite well IMHO. Cheers, Matthieu _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs