Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.

Cheers,
Erik
-- 
+-----------------------------------------------------------+
  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