* [Caml-list] kwd and ops in genlex
@ 2004-01-31 17:25 Vincent Poirriez
0 siblings, 0 replies; only message in thread
From: Vincent Poirriez @ 2004-01-31 17:25 UTC (permalink / raw)
To: caml-list
This is just to share my recent exeperience with Genlex,
I spent some time to understand the following behaviour:
Objective Caml version 3.07+2
# #load"camlp4o.cma";;
Camlp4 Parsing version 3.07+2
# open Genlex;;
# let kwds = ["<";"/"];;
val kwds : string list = ["<"; "/"]
# let lex = make_lexer kwds;;
val lex : char Stream.t -> Genlex.token Stream.t = <fun>
# let fl = lex (Stream.of_string "</");;
val fl : Genlex.token Stream.t = <abstr>
# Stream.next fl;;
- : Genlex.token = Ident "</"
While I was waiting for Kwd "<" followed by Kwd "/"
It has to be precised that sequences of operators (in the ocaml meaning) can't be splitted.
This is not clear in the manual, at least for me.
So I have two wishes: a) have a more precised sentence in the manual b) Is it possible to change this behaviour
to allow splitting of operators sequences.
An aside remark, it is not really coherent to keep the description of Genlex in the ocaml manual and to have the description
of parsers in the camlp4 manual.
Friendly
Vincent
********************************************************************
Vincent POIRRIEZ
Laboratoire d'Automatique, de Mécanique et d'Informatique,
industrielles et Humaines (LAMIH - UMR CNRS 8530)
GR "Recherche Opérationnelle et Informatique" (ROI)
Université de Valenciennes et du Hainaut-Cambrésis - Le Mont Houy
F-59313 Valenciennes cedex 9 - FRANCE
tel:: (33)3.27.51.19.53 - Fax: (33)3.27.51.19.40
courriel: vincent DOT poirriez AT univ-valenciennes DOT fr
********************************************************************
--
********************************************************************
Vincent POIRRIEZ
Laboratoire d'Automatique, de Mécanique et d'Informatique,
industrielles et Humaines (LAMIH - UMR CNRS 8530)
GR "Recherche Opérationnelle et Informatique" (ROI)
Université de Valenciennes et du Hainaut-Cambrésis - Le Mont Houy
F-59313 Valenciennes cedex 9 - FRANCE
tel:: (33)3.27.51.19.53 - Fax: (33)3.27.51.19.40
courriel: vincent.poirriez@univ-valenciennes.fr
http://www.univ-valenciennes.fr/LAMIH/ROI/poirriez
********************************************************************
-------------------
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-01-31 17:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-31 17:25 [Caml-list] kwd and ops in genlex Vincent Poirriez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox