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, UPPERCASE_25_50 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 EDCC8BC69 for ; Fri, 23 Feb 2007 17:02:17 +0100 (CET) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1NG2HVM002468 for ; Fri, 23 Feb 2007 17:02:17 +0100 Received: by ug-out-1314.google.com with SMTP id k3so394739ugf for ; Fri, 23 Feb 2007 08:02:17 -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=ccj6p/sw6TNkIZNDaLsSabnwzB8DQCIhUfEdPVJCwY0m11qPyGy8z0wpCKuBR6RgWsllogL7d82r2niJOOaVBXVcFBRZfBwb/Be9Fz+KPun74MKqUNbRvil2ktcIR8pBcd/mBS1qmsFcKPsawxHO0oRheH/ZVwq3zj9rOBQqBy8= 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=okw2z0Rx79C1IimRkq3GWkiaWkDJwNUsNO1kTAPidltNW9H6feqTWwsy6Jnebh0JSdl6LVBRJMxHRAqJi4RkGgAVm/yhz/Tc2VqIA/Pk5yZPx9LKBXqpfqto6WpYRUqkkCdwm3a+uQjeZgEU9gCOJfrsRBd+54HmH/sKIKLikjE= Received: by 10.67.31.17 with SMTP id i17mr2427656ugj.1172246537392; Fri, 23 Feb 2007 08:02:17 -0800 (PST) Received: from ?192.168.1.33? ( [83.53.109.173]) by mx.google.com with ESMTP id e23sm2129336ugd.2007.02.23.08.02.16; Fri, 23 Feb 2007 08:02:16 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <011EB42A-05E3-4686-BED7-2DB8B2663221@cs.uni-sb.de> References: <23E977DC-77FF-44A2-8675-5EAA8F61505F@gmail.com> <011EB42A-05E3-4686-BED7-2DB8B2663221@cs.uni-sb.de> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <7504EE4A-36DE-46EF-B60C-A9F4ADEEED6F@gmail.com> Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: Re: [Caml-list] Case-insensitive lexing Date: Fri, 23 Feb 2007 16:02:19 +0000 To: caml-list@inria.fr X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 45DF1009.000 on discorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at discorde with ID 45DF1009.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; lexing:01 lindig:01 uglier:01 23,:98 2007,:98 wrote:01 caml-list:01 lex:01 define:01 alert:95 identifier:04 upper:06 file:08 feb:09 wrong:09 On Feb 23, 2007, at 3:50 PM, Christian Lindig wrote: > I assume you define identifier to a sequence of upper and lower > characters. What is wrong with this solution and what would you > have liked to see instead? I was hoping not having to write this (from a Lex file): A [Aa] B [Bb] .. Y [Yy] Z [Zz] {A}{B}{O}{V}{E} { return(ABOVE); } {A}{G}{O} { return(AGO); } {A}{L}{E}{R}{T} { return(ALERT); } Or even uglier {N}{U}{M}{E}{R}{I}{C}{A}{R}{R}{A}{Y}{R}{E}{F} ('ARRAY-NUM- REF, yytext) {T}{R}{U}{E}{F}{A}{L}{S}{E}{A}{R}{R}{A}{Y} ('ARRAY-NUM, yytext) {T}{R}{U}{E}{F}{A}{L}{S}{E}{A}{R}{R}{A}{Y}{R}{E}{F} ('ARRAY-NUM- REF, yytext) Thanks, Joel -- http://wagerlabs.com/