Browse thread
[Caml-list] accidentally mutating caml grammar with camlp4?
-
Jeff Henrikson
- Alain Frisch
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Alain Frisch <Alain.Frisch@e...> |
| Subject: | Re: [Caml-list] accidentally mutating caml grammar with camlp4? |
On Sun, 15 Aug 2004, Jeff Henrikson wrote: > The problem is that once I run all these, I somehow break the basic caml > grammar. I have used the keywords "int" and "float" as they are used in > C, but somehow inadvertently I have made these valid caml expressions > unparsable: The occurences of "int" and "float" in the grammar have the side-effect of registering these strings as keywords for the grammar lexer, but the Caml grammar expect these to be regular identifiers, not keywords. Note that you also register other keywords that could be used by OCaml code (e.g. Type). One possible solution is to use LIDENT "int" instead of "int" in your grammars (I didn't try it on your example, though). Cheers, Alain ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners