Browse thread
Case-insensitive lexing
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Joel Reymont <joelr1@g...> |
| Subject: | Case-insensitive lexing |
Folks,
Is there a way to make a case-insensitive lexer with ocamllex?
The only answer I was able to find is the following from John Skaller:
| identifier {
let x = toupper (lexeme lexbuf) in
try Hashtbl.find keywords x
With Not_found -> x
}
Thanks, Joel
--
http://wagerlabs.com/