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 (11:52)
From: Keith Wansbrough <Keith.Wansbrough@c...>
Subject: Re: [Caml-list] Ocamlyacc reentrancy
> On Sat, 2004-05-01 at 14:47, Jon Harrop wrote:
> > Apparently the Parser module should be reentrant because it is careful to save 
> > and load its global data.
> > 
> >
> 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?

We wrote a couple of scripts that hack the output of ocamllex and
ocamlyacc, and a slightly modified and, that give
you purely functional lexers and parsers.  The modification is trivial
- just pass the state around in an argument, rather than a global

Let me know if you are interested.  I think we got some positive
noises from INRIA, but I'll leave it to them to comment re future
OCaml releases.  We didn't consider performance impact.

--KW 8-)

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