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 7AF12BC69 for ; Fri, 23 Feb 2007 16:31:58 +0100 (CET) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1NFVwMa026761 for ; Fri, 23 Feb 2007 16:31:58 +0100 Received: by ug-out-1314.google.com with SMTP id k3so387165ugf for ; Fri, 23 Feb 2007 07:31:57 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=Tc3FK5IXidUZ+fOKQdt5dH9mmn98a8BmRLgrFLWSTMMCOTYAhHSbMph6pv7EGB0hP+x4eNXLxANQMY2klUUvuMYIo7wJJZRRiblHYgzhhNjOVTQ2Yw2oQH4Ruo8oZoxt+6hZNYnKI+BRsTapwn4eZEjZkuDgqSV2ea1Q11FZQsI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=MbtUX3Yw/o+4Hsp/xmcBJnHFL6oQM2wduebmliTHMJ7ivUWAIn/uE1pld1JdOXzCPlLHb93bGpKgr6Qai49TVLR7xqUqVo8scvJO+1weXvXjosImT904aQ9GXEgM9toZHDo6j0NbXPCVczpLqKnu2ycgXAZFwr23XS3Zk8LbTm0= Received: by 10.67.103.7 with SMTP id f7mr2366876ugm.1172244717911; Fri, 23 Feb 2007 07:31:57 -0800 (PST) Received: from ?192.168.1.33? ( [83.53.109.173]) by mx.google.com with ESMTP id y1sm1636418uge.2007.02.23.07.31.56; Fri, 23 Feb 2007 07:31:57 -0800 (PST) Mime-Version: 1.0 (Apple Message framework v752.3) Content-Transfer-Encoding: 7bit Message-Id: <23E977DC-77FF-44A2-8675-5EAA8F61505F@gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed To: caml-list@inria.fr From: Joel Reymont Subject: Case-insensitive lexing Date: Fri, 23 Feb 2007 15:32:00 +0000 X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 45DF08EE.000 on discorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at discorde with ID 45DF08EE.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; lexing:01 lexer:01 ocamllex:01 lexeme:01 lexbuf:01 hashtbl:01 let:03 identifier:04 john:09 folks:11 thanks:17 there:18 try:19 skaller:24 able:24 Folks, Is there a way to make a case-insensitive lexer with ocamllex? The only answer I was able to find is the following from John Skaller: | identifier { let x = toupper (lexeme lexbuf) in try Hashtbl.find keywords x With Not_found -> x } Thanks, Joel -- http://wagerlabs.com/