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: Re: Re : Re : [Caml-list] Re: camlp4 stream parser syntax
I would prefer to use the #2 approach but I'm using a custom lexer  
built by ocamllex.

Where would I plug in String.lowercase con = ... in Matthieu's lexer,  
for example?

	Thanks, Joel

On Mar 8, 2009, at 9:37 AM, Daniel de Rauglaudre wrote:

> 2/ Use the field "tok_match" of the interface with the lexer.  
> Redefining
>   it allows you to match some token pattern with the corresponding  
> token.
>     See doc (camlp5) in:
>       http://pauillac.inria.fr/~ddr/camlp5/doc/htmlc/ 
> grammars.html#b:The-lexer-record
>   In the example "default_match", change the test "if con = p_con"  
> into
>   "if String.lowercase con = p_con".

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