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: | Re: [Caml-list] Case-insensitive lexing |
Christian,
On Feb 23, 2007, at 4:50 PM, Christian Lindig wrote:
> Ugly, indeed. The solution you have posted before is general better
> and the approved way for identifying keywords in a Caml lexer: have
> a rule for idents and look up the keywords in a hash table. Make
> these case insensitive is then easy.
Is this better than Martin's version of
let a = ['a' 'A']
...
| a b o v e { ABOVE }
?
Is there a significant advantage to keeping keywords in a hash table?
Thanks, Joel
--
http://wagerlabs.com/