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] Ocamlyacc reentrancy
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-01 (03:09)
From: skaller <skaller@u...>
Subject: [Caml-list] Ocamlyacc reentrancy
As far as I can tell, Ocamlyacc parsers aren't
reentrant: it uses static storage to hold
the parser stack. There is even an argumentless 
clear function to empty 'the' stack after a parse
is finished.

It would be nice if we could get a re-entrant
parser so recursive parsing could be done.
This can be useful for processing '#include"
files in C for example, if you want to handle
that at the parse level instead of the token level.

However, it may be possible to 'hack' something
which allows this for sequential progamming
(i.e. not with threads) by providing two functions:


Does this make sense? Would it be useful to anyone else?
Can it be implemented without too much fuss
in lieu of a fully re-entrant parser?

John Skaller,
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language

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