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.5 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 CB1B2BBC4 for ; Sun, 8 Mar 2009 01:40:13 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Am4CAK+isklKfU4ZlGdsb2JhbACUYz8BAQEBCQsICREDrUaBB48IAQMBA4QCBoMU X-IronPort-AV: E=Sophos;i="4.38,321,1233529200"; d="scan'208";a="22204827" Received: from ey-out-2122.google.com ([74.125.78.25]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Mar 2009 01:40:13 +0100 Received: by ey-out-2122.google.com with SMTP id 9so89498eyd.15 for ; Sat, 07 Mar 2009 16:40:13 -0800 (PST) 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=1vvADWKDG+oW+npzUGSh1UQfuQFMnsBQ0WtPiOYismg=; b=AiykSlWSCgYRxbQYWSh/h3USAfgUjFhMw8I8bB78HOSZmT165x9x3UDhHOiJlKKRUS wVJRNreknMwXDhCc6NA5JWSDUSphtB1NqtY/+j59i9yqtXOKpimk03oCBNvnzirAx3v4 OYtHEtbZE7JV/GRiltnjGpeBP2juDzf2QLRYY= 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=Pd9iipzpL/AH00uQzy88CXAW8HvE5hsPdnnnrbdiCneCKtdC78fVatwvAH5WUZkIjK KX9sikM30OwSHh198vwn/k5Xz30RrKyNVUWL/ccZ2ixHW61ROsUIexV4RXfGhSdglrj+ HX2wmwfQ9vYB620SKJwOnNtMJ9UVkIqYra/Sg= Received: by 10.210.90.20 with SMTP id n20mr1175920ebb.77.1236472813468; Sat, 07 Mar 2009 16:40:13 -0800 (PST) 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 28sm2811417eyg.45.2009.03.07.16.40.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 07 Mar 2009 16:40:13 -0800 (PST) References: <24D11586-4F15-4B6E-8FB7-58651317164D@gmail.com> <46331.52510.qm@web27007.mail.ukl.yahoo.com> Message-Id: <0B508092-FD71-4733-BC95-B6B87A6D3E6B@gmail.com> From: Joel Reymont To: Matthieu Wipliez In-Reply-To: <46331.52510.qm@web27007.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 : [Caml-list] Re: camlp4 stream parser syntax Date: Sun, 8 Mar 2009 00:40:10 +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 camlp:01 parser:01 failwith:01 lexer:01 lexer:01 ocaml:01 char:01 char:01 token:01 token:01 caml-list:01 Matthieu, Is the camlp4 grammar parser case-insensitive? Will both Delay and delay be accepted in the actionDelay rule? actionDelay: [ [ "delay"; expression -> Asthelper.failwith (convert_loc _loc) "RVC-CAL does not permit the use of delay." ] ]; Also, I noticed that your lexer has a really small token set, i.e. type token = | KEYWORD of string | SYMBOL of string | IDENT of string | INT of int * string | FLOAT of float * string | CHAR of char * string | STRING of string * string | EOI My custom lexer, on the other hand, has a HUGE token set, e.g. type token = | BUY_TO_COVER | SELL_SHORT | AT_ENTRY | RANGE | YELLOW | WHITE | WHILE | UNTIL ... This is partly because I have a very large set of keywords. Do I correctly understand that I do not need all the keywords since I can match them in the camlp4 grammar as strings like "BuyToCover", "SellShort", etc.? Thanks, Joel --- http://tinyco.de Mac, C++, OCaml