From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id DFFD4BB91 for ; Sun, 26 Dec 2004 23:39:30 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iBQMdUMZ029413 for ; Sun, 26 Dec 2004 23:39:30 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id XAA01474 for ; Sun, 26 Dec 2004 23:39:30 +0100 (MET) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iBQMdRP4030886 for ; Sun, 26 Dec 2004 23:39:29 +0100 Received: from [192.168.1.200] (ppp194-89.lns1.syd2.internode.on.net [203.122.194.89]) by smtp3.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id iBQMdOGa059812; Mon, 27 Dec 2004 09:09:25 +1030 (CST) Subject: Re: [Caml-list] Case-insensitive lexer From: skaller Reply-To: skaller@users.sourceforge.net To: Christophe TROESTLER Cc: "O'Caml Mailing List" In-Reply-To: <20041226.232107.65226053.Christophe.Troestler@umh.ac.be> References: <20041226.232107.65226053.Christophe.Troestler@umh.ac.be> Content-Type: text/plain Message-Id: <1104100762.18148.138.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 27 Dec 2004 09:39:23 +1100 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 41CF3DA2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 41CF3D9F.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 lexer:01 sourceforge:01 christophe:01 troestler:01 wrote:01 lexer:01 ocamllex:01 lexeme:01 lexbuf:01 hashtbl:01 glebe:01 061:98 nsw:01 snail:02 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.0 X-Spam-Level: On Mon, 2004-12-27 at 09:21, Christophe TROESTLER wrote: > Hi, > > Is there a way to build a case-insensitive lexer with ocamllex (flex > has the "-i" option for that)? | identifier { let x = toupper (lexeme lexbuf) in try Hashtbl.find keywords x With Not_found -> x } -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net