English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[Caml-list] start conditions in ocamllex
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-02-26 (02:51)
From: skaller <skaller@u...>
Subject: [Caml-list] Plea for arguments to Ocamlyacc generated parsers
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