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 (22:52)
From: Erik de Castro Lopo <mle+ocaml@m...>
Subject: Re: [Caml-list] Case-insensitive lexing
Joel Reymont wrote:

> Is there a significant advantage to keeping keywords in a hash table?

Very definitely. Ocamlex has some limitations on the size of the
tables it can generate and those limits are relatively easy to
hit :-).

Moving all the keywords into a hashtable, and using that to differentiate
between keywords and identifiers actually works very well.

  Erik de Castro Lopo
"C makes it easy to shoot yourself in the foot. C++ makes it 
harder, but when you do, you blow away your whole leg!"
-- Bjarne Stroustrup