Version française
Home     About     Download     Resources     Contact us    
Browse thread
Passing arguments to a parser generated by ocamlyacc
[ 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: Passing arguments to a parser generated by ocamlyacc
Folks,

I need to pass a symbol table to the parser generated by ocamlyacc. I  
can do this fine with ocamllex and thought I could do the following  
for ocamlyacc:

%start program
%type <Symtab.symtab -> Easy.program> program

It doesn't work, unfortunately. Are there any workarounds?

My parser is supposed to be used as a C library. I have a hunch that  
when there are several calls to the parser the single mutable symbol  
table I'm using now will be overwritten, thus the need to pass one in.

	Thanks, Joel

--
http://wagerlabs.com/