English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2009-03-08 (13:59)
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.  

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.

Mac, C++, OCaml