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=2.7 required=5.0 tests=AWL,DNS_FROM_RFC_POST, 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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 17BDBBBAF for ; Sun, 8 Mar 2009 12:52:27 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AroBAMdNs0lA6ba9k2dsb2JhbACUaz8BAQEBBwsKCREDrVyBB45CAQMBA4QCBoMT X-IronPort-AV: E=Sophos;i="4.38,324,1233529200"; d="scan'208";a="22216102" Received: from nf-out-0910.google.com ([64.233.182.189]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Mar 2009 12:52:26 +0100 Received: by nf-out-0910.google.com with SMTP id b11so148719nfh.13 for ; Sun, 08 Mar 2009 04:52:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:cc:x-mailer; bh=RJKC3WtKq3EuH6jg8boiKX98BtMp5ktqQoq2ugWqicE=; b=fxG28UtueKw+7R4x7tWCU9aULIQDdJ9OnbOCbOSaRsSPfGR53fAzpJV2qI977aTmHc 0+pIA7teSAzyHFAXdjycFrwYArYMHdsjOOQ8F1Mv6EIHF9te8aBTTkcG4zLnjIE9cve6 i1zpOTi0B2pwcDRtpmykHZl1NxOHVXJryUmUQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:cc:x-mailer; b=p7WTCIQXXhFD4Cne2qNYZn8kwftrn4uAV8W/7WH6NYzwGrWCx19C4LtE7W5DONd+Wn HHam0w3BLTZlBo/QseD9VL/U7W0sZN/F4fBM5L1LYCZxySvjkrT/eNhXq6t2Yrr9NVQs X95hFuytrR73AXGQ1NnvUSsFTHkHa6qaOUFek= Received: by 10.211.180.15 with SMTP id h15mr2691502ebp.28.1236513146747; Sun, 08 Mar 2009 04:52:26 -0700 (PDT) Received: from ?10.10.30.5? (94.Red-88-6-143.staticIP.rima-tde.net [88.6.143.94]) by mx.google.com with ESMTPS id 10sm3133487eyz.40.2009.03.08.04.52.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 08 Mar 2009 04:52:26 -0700 (PDT) References: <24D11586-4F15-4B6E-8FB7-58651317164D@gmail.com> <46331.52510.qm@web27007.mail.ukl.yahoo.com> <0B508092-FD71-4733-BC95-B6B87A6D3E6B@gmail.com> <154139.25342.qm@web27007.mail.ukl.yahoo.com> <46FCBABD-7E4A-4077-8227-3816FD6D635D@gmail.com> <279881.54090.qm@web27008.mail.ukl.yahoo.com> Message-Id: <58D957FE-F549-4B2F-9794-6A6651A20A29@gmail.com> From: Joel Reymont To: Matthieu Wipliez In-Reply-To: <279881.54090.qm@web27008.mail.ukl.yahoo.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: Re: Re : Re : Re : [Caml-list] Re: camlp4 stream parser syntax Date: Sun, 8 Mar 2009 11:52:23 +0000 Cc: O'Caml Mailing List X-Mailer: Apple Mail (2.930.3) X-Spam: no; 0.00; camlp:01 parser:01 syntax:01 matthieu:01 hash:01 lowercase:01 camlp:01 parser:01 kwd:01 hash:01 lowercase:01 ocaml:01 token:01 wrote:01 caml-list:01 On Mar 8, 2009, at 11:45 AM, Matthieu Wipliez wrote: > In this case, here is a possible solution, you have your hash table > associate a lowercase version of the token with what you'd like to > use in the grammar: > "buytocover" => "BuyToCover" > "sellshort" => "SellShort" > ... I'm doing this already but I don't think it will do the trick with a camlp4 parser since it goes through is_kwd to find a match when you use "delay". I think that the internal keyword hash table in the grammar needs to be populated with lowercase keywords (by invoking 'using'). I don't know how to get to the 'using' function yet, though. Thanks, Joel --- http://tinyco.de Mac, C++, OCaml