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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 9A01BBBAF for ; Sun, 8 Mar 2009 16:24:09 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgADAP1/s0nRVduukWdsb2JhbACUaz8BAQEBCQkMBw+teIEHjiIBAwEDhAIGgxM X-IronPort-AV: E=Sophos;i="4.38,325,1233529200"; d="scan'208";a="25242627" Received: from mail-ew0-f174.google.com ([209.85.219.174]) by mail1-smtp-roc.national.inria.fr with ESMTP; 08 Mar 2009 16:24:09 +0100 Received: by ewy22 with SMTP id 22so785171ewy.27 for ; Sun, 08 Mar 2009 08:24:08 -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=tBk8mh/imyJEmMq30I+4ski516u8dbocp8U6xNRlbTM=; b=B3pKtsTvoblCPSV3v6pHUc6qnXCz6Xk/qU+FvmnLwea1S7SbciQfgBdIDuutub3Z+5 Rl3zLUFHf+7Mu9GovkjY8pXhuMK7xXPYSF5atLlcvs0ueTTLBdbRq/co5R8draiZLifP C5LBCVb81GXFVOFCzs1gQxvlD4wxsLrUKpDc8= 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=xcWWlSHuoOgoqgU2La0wYqfX5nzlQ8CPMXZ2vqK8DuGsYZgC+1a1xqXyZbkxJ2jBW/ igKYA1vsuqBRyAwpviTGe+mQ9vFqbzZLFRbxnFniJ82DfLBNKQJj59MZ/G3e/0KtB9wJ bI10lNr0rcRjObh848YCct4F31kkfGbNdAblE= Received: by 10.210.21.13 with SMTP id 13mr2839741ebu.16.1236525848768; Sun, 08 Mar 2009 08:24:08 -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 5sm3246869eyh.21.2009.03.08.08.24.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 08 Mar 2009 08:24:08 -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> <58D957FE-F549-4B2F-9794-6A6651A20A29@gmail.com> <843379.3763.qm@web27007.mail.ukl.yahoo.com> <801023.45786.qm@web27008.mail.ukl.yahoo.com> <2368FDC0-FD1F-49B8-BDE0-53C2D641070B@gmail.com> <149632.77706.qm@web27001.mail.ukl.yahoo.com> Message-Id: <2F6DE824-09BE-4CB2-8AEA-3CAC58203A43@gmail.com> From: Joel Reymont To: Matthieu Wipliez In-Reply-To: <149632.77706.qm@web27001.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 : [Caml-list] Re: camlp4 stream parser syntax Date: Sun, 8 Mar 2009 15:24:05 +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 lexer:01 functor:01 camlp:01 struct:01 lexer:01 parser:01 hash:01 ocaml:01 wrote:01 caml-list:01 grammar:02 On Mar 8, 2009, at 3:07 PM, Matthieu Wipliez wrote: > I believe there is a (partially acceptable) solution, if you are > willing to accept having all your keywords in lower-case in the > grammar (not in the lexer), ie you match against "buyorsell", > "sellshort" etc. Nope, I want camel case! :D I think a functor or something like that is called for here. There must be a way to include Structure into a module to redefine 'using', without having to duplicate Camlp4.Struct.Grammar.Static.Make! The problem is that Static includes Structure. I haven't figured out a solution yet. I already downcase the idents in the lexer, what I want is to use camel case in the camlp4 parser and have that be stored as lower case in the internal hash table. Thanks, Joel --- http://tinyco.de Mac, C++, OCaml