Version française
Home     About     Download     Resources     Contact us    
Browse thread
Sharing a symbol table between a lexer and a Menhir parser
[ 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: Sharing a symbol table between a lexer and a Menhir parser
Would someone kindly show me an example of how to do this?

Assuming that my parser function looks like this

let parse str =
   Symtab.reset ();
   let lexbuf = Lexing.from_string str in
   Easy_parser.program Easy_lexer.token lexbuf

I would like to give Easy_lexer.token the same symbol table that was  
used to specialize the parser functor.

I would this hard to impossible for some reason.

	Thanks, Joel

--
http://wagerlabs.com/