Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] kwd and ops in genlex
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Vincent Poirriez <vincent.poirriez@u...>
Subject: [Caml-list] kwd and ops in genlex
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