Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Case-insensitive lexing
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-23 (21:03)
From: Joel Reymont <joelr1@g...>
Subject: Re: [Caml-list] Case-insensitive lexing

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