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-05 (14:00)
From: skaller <skaller@u...>
Subject: Re: [Caml-list] Ocamlyacc reentrancy
On Wed, 2004-05-05 at 21:52, Keith Wansbrough wrote:
> > On Sat, 2004-05-01 at 14:47, Jon Harrop wrote:
> > 
> > Thanks for that link.  Xavier says:
> > 
> > "The module Parsing is supposed to be reentrant. Yes, there's some 
> > global state inside, but we're careful to save and restore it across 
> > entries. If you have a program demonstrating non-reentrance, please 
> > send it to me privately and I'll try to fix that."
> What about multithreaded code?

The practical problem I have is that parsing C does
require *client* state to be passed around.

So the internal reentrancy of ocamlyacc parsers isn't
enough. The client has to wrap all the parses with
copyup/copy down code too... and they didn't.

If there been a state variable the authors might
have taken the trouble to use it.

Ocamllex lexers are now very easy to make reentrant!

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: