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=1.0 required=5.0 tests=AWL,SPF_NEUTRAL 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 AA89FBC69 for ; Fri, 23 Feb 2007 22:03:18 +0100 (CET) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.189]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1NL3IJc003023 for ; Fri, 23 Feb 2007 22:03:18 +0100 Received: by nf-out-0910.google.com with SMTP id m19so649803nfc for ; Fri, 23 Feb 2007 13:03:18 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=IiEjk1AOnGSAt6KzznNbVm6agavD5P+3eVIQBx0btSxoA9dH7/97uffFp9YPqDVlcQtLSvR/3zUj2Vy4TZl0ErABvXZi7sImOdo/AX6303X1vYcDvW7Prf0SeXsRESzCJE0qdCRFsNpfLTlNFoHWDIYfrfuM0C3EUYyWbo2DeIY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:in-reply-to:references:content-type:message-id:content-transfer-encoding:from:subject:date:to:x-mailer; b=QiTnOnl+77DlrwbHtYLc5UjIYGLpuujU+SpueZ+tEGnrQwGltV4rD5GGFswNZXQSr2gJXNCSOOX1qUsXMYUvy4WEM8IE8M11lOsePC5pt7ooC3dgTOgaajrvXSNM1RhePp22Dx2irGT8Df1krjg8XNTE/PCYx3dqEjgLbS2LVqk= Received: by 10.48.48.13 with SMTP id v13mr6845480nfv.1172264598111; Fri, 23 Feb 2007 13:03:18 -0800 (PST) Received: from ?192.168.1.33? ( [83.53.109.173]) by mx.google.com with ESMTP id k9sm10940112nfc.2007.02.23.13.03.16; Fri, 23 Feb 2007 13:03:17 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <42EFE4CF-F2F8-4AD2-9909-D0CF027A17AD@cs.uni-sb.de> 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> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: Re: [Caml-list] Case-insensitive lexing Date: Fri, 23 Feb 2007 21:03:22 +0000 To: caml-list@inria.fr X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 45DF5696.000 on discorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at discorde with ID 45DF5696.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; lexing:01 lindig:01 lexer:01 hash:01 hash:01 23,:98 2007,:98 wrote:01 caml-list:01 caml:02 ugly:03 let:03 table:93 table:93 indeed:07 Christian, 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 -- http://wagerlabs.com/