From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 7122FBC69 for ; Fri, 23 Feb 2007 23:52:00 +0100 (CET) Received: from smtp.syd.people.net.au (smtp.syd.people.net.au [218.214.225.98]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id l1NMpvqh022774 for ; Fri, 23 Feb 2007 23:51:59 +0100 Received: (qmail 24074 invoked from network); 23 Feb 2007 22:51:57 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp.syd.people.net.au with SMTP; 23 Feb 2007 22:51:57 -0000 Received: from coltrane (coltrane [192.168.1.101]) by coltrane.mega-nerd.net (Postfix) with SMTP id 9143F7B6C for ; Sat, 24 Feb 2007 09:51:52 +1100 (EST) Date: Sat, 24 Feb 2007 09:51:52 +1100 From: Erik de Castro Lopo To: caml-list@inria.fr Subject: Re: [Caml-list] Case-insensitive lexing Message-Id: <20070224095152.a9669d3d.mle+ocaml@mega-nerd.com> In-Reply-To: References: <23E977DC-77FF-44A2-8675-5EAA8F61505F@gmail.com> <011EB42A-05E3-4686-BED7-2DB8B2663221@cs.uni-sb.de> <7504EE4A-36DE-46EF-B60C-A9F4ADEEED6F@gmail.com> <42EFE4CF-F2F8-4AD2-9909-D0CF027A17AD@cs.uni-sb.de> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 2.3.0beta5 (GTK+ 2.8.20; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at discorde with ID 45DF700D.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 lexing:01 hash:01 hashtable:01 cheers:01 foot:98 wrote:01 caml-list:01 limitations:04 erik:04 identifiers:04 erik:04 size:95 table:93 leg:90 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