English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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