Version française
Home     About     Download     Resources     Contact us    
Browse thread
camlp4 stream parser syntax
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Joel Reymont <joelr1@g...>
Subject: [Caml-list] Re: camlp4 stream parser syntax

On Mar 8, 2009, at 1:33 PM, Matthieu Wipliez wrote:

> So to sum up: when you declare a rule with a token "MyToken", the  
> grammar is configured to recognize a "MyToken" keyword.

The issue here is that it must be lower case in the camlp4 rules, i.e.  
"mytoken".

What if I want to have "MyToken" (camel-case) in the rule and have it  
be low-cased when the grammar is extended? I think that requires  
extending one of the Camlp4 modules or it won't work.

Also, using is not directly accessible and neither is the keywords  
hash table or is_kwd. You _can_ get the filter with get_filter () but  
the resulting structure is not mutable so you can't wrap is_kwd to low- 
case the string passed to it.

---
http://tinyco.de
Mac, C++, OCaml