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 DAA11824; Thu, 26 Feb 2004 03:51:20 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA13238 for ; Thu, 26 Feb 2004 03:51:19 +0100 (MET) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i1Q2pJIq029853 for ; Thu, 26 Feb 2004 03:51:21 +0100 Received: from [192.168.1.200] (ppp113-250.lns1.syd3.internode.on.net [150.101.113.250]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i1Q2pDwn074617 for ; Thu, 26 Feb 2004 13:21:14 +1030 (CST) Subject: [Caml-list] Plea for arguments to Ocamlyacc generated parsers From: skaller Reply-To: skaller@users.sourceforge.net To: caml-list In-Reply-To: <20040225192309.GA22138@tallman.kefka.frap.net> References: <20040225180744.GA23865@ccs.neu.edu> <20040225190056.GE27866@speakeasy.org> <20040225192309.GA22138@tallman.kefka.frap.net> Content-Type: text/plain Message-Id: <1077764061.15598.37.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 26 Feb 2004 13:54:22 +1100 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; plea:01 sourceforge:01 2004:99 knowles:99 passing:01 9660:01 glebe:01 ocaml:01 nsw:01 snail:02 match:02 parser:02 checkout:02 objects:02 parsers:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 2004-02-26 at 06:23, Kenneth Knowles wrote: > > > Has anyone thought of implementing start conditions for ocamllex? I find it is useful to have a Ocaml class specifying lexer state and passing objects thereof to the lexer. It has always been possible to do this, but now the lexer makes the notation easier (saves writing fun state -> ... for every match) I sorely need the same ability to pass a state argument to the parser!!! As far as I know it can't be done at all (without hacking the generated code). Please could we have that? I'd sure like to be able to parse C without using a global variable -- I have a strong belief in writing re-entrant code which I'd hope all functional programmers would share :D -- 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