Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] ocamllex/yacc question...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Micha <micha-1@f...>
Subject: [Caml-list] ocamllex/yacc question...
Hi,

I have a little scanning/parsing problem and the solution which I tried was to 
have empty productions in the grammar, which switch the lexer (setting a ref 
to the new lexer function), like that:

use_lexer_1 : { switch_lexer 1 }
use_lexer_2 : { switch_lexer 2 }
special_id:  use_lexer_1  token use_lexer_2 { ... }
...

This does not work, I think because of the look ahead. Is there another 
solution to this (to switch lexing rules) ? Or is this a completly wrong 
idea?

thanks
 Michael

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