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 (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