* Case-insensitive lexer
@ 2004-12-26 22:21 Christophe TROESTLER
2004-12-26 22:39 ` [Caml-list] " skaller
0 siblings, 1 reply; 2+ messages in thread
From: Christophe TROESTLER @ 2004-12-26 22:21 UTC (permalink / raw)
To: O'Caml Mailing List
Hi,
Is there a way to build a case-insensitive lexer with ocamllex (flex
has the "-i" option for that)?
Happy new year 2005!
ChriS
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Case-insensitive lexer
2004-12-26 22:21 Case-insensitive lexer Christophe TROESTLER
@ 2004-12-26 22:39 ` skaller
0 siblings, 0 replies; 2+ messages in thread
From: skaller @ 2004-12-26 22:39 UTC (permalink / raw)
To: Christophe TROESTLER; +Cc: O'Caml Mailing List
On Mon, 2004-12-27 at 09:21, Christophe TROESTLER wrote:
> Hi,
>
> Is there a way to build a case-insensitive lexer with ocamllex (flex
> has the "-i" option for that)?
| identifier {
let x = toupper (lexeme lexbuf) in
try Hashtbl.find keywords x
With Not_found -> x
}
--
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-26 22:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-26 22:21 Case-insensitive lexer Christophe TROESTLER
2004-12-26 22:39 ` [Caml-list] " skaller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox