Browse thread
[Caml-list] Ocamlyacc reentrancy
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners