Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] accidentally mutating caml grammar with camlp4?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ 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.

One possible solution is to use
  LIDENT "int"
instead of
in your grammars (I didn't try it on your example, though).



To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: