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

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 


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