From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA23755; Wed, 5 May 2004 16:00:30 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA24201 for ; Wed, 5 May 2004 16:00:29 +0200 (MET DST) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i45E0QSH021329 for ; Wed, 5 May 2004 16:00:27 +0200 Received: from [192.168.1.200] (ppp116-155.lns1.syd2.internode.on.net [150.101.116.155]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i45E0IZq062605; Wed, 5 May 2004 23:30:20 +0930 (CST) Subject: Re: [Caml-list] Ocamlyacc reentrancy From: skaller Reply-To: skaller@users.sourceforge.net To: Keith Wansbrough Cc: Jon Harrop , caml-list In-Reply-To: References: Content-Type: text/plain Message-Id: <1083765617.20722.1099.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 06 May 2004 00:00:18 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4098F37A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 sourceforge:01 2004:99 2004:99 parses:01 9660:01 glebe:01 reentrant:01 reentrant:01 nsw:01 snail:02 checkout:02 module:03 parsers:03 2037:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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