From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr 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 A0090BB81 for ; Fri, 18 Nov 2005 17:26:09 +0100 (CET) Received: from ash25e.internode.on.net (ash25e.internode.on.net [203.16.214.182]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAIGQ7nA028446 for ; Fri, 18 Nov 2005 17:26:08 +0100 Received: from rosella (ppp7-104.lns1.syd7.internode.on.net [59.167.7.104]) by ash25e.internode.on.net (8.12.9/8.12.6) with ESMTP id jAIGPxbE097015; Sat, 19 Nov 2005 02:55:59 +1030 (CST) (envelope-from skaller@users.sourceforge.net) Subject: Re: [Caml-list] ocamlyacc -- can i tell it to be quiet? From: skaller To: padator@wanadoo.fr Cc: Sebastian Egner , caml-list@yquem.inria.fr In-Reply-To: <6556771.1132324854307.JavaMail.www@wwinf1520> References: <6556771.1132324854307.JavaMail.www@wwinf1520> Content-Type: text/plain Date: Sat, 19 Nov 2005 03:25:58 +1100 Message-Id: <1132331158.10869.70.camel@rosella> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 437E009F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlyacc:01 regexp:01 token:01 lexer:01 parser:01 lexers:01 grammar:01 const:01 extern:01 grammar:01 syntax:01 ocaml:01 haskell:01 wrote:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Fri, 2005-11-18 at 15:40 +0100, yoann padioleau wrote: > except that sometimes there is some space, comments, between the 2 "long", > so the regexp for "long long" would > be uselessly complicated. Yes, but I have a token filter sitting in between the lexer and parser anyhow .. I just forgot about it. It already chucks out comments and spaces. It's there for the reason you mention .. and also because it is cheaper (lexers get rather large if you give them too much work). > BTW, I dont know if your grammar talks about C, but in C you can even write > "long const extern long a;" The grammar in question is the Felix grammar, which is a kind of hybrid syntax between C++ and ML. It make no pretense of being an upgrade of C++ syntactically .. however I do try to keep enough familiar things in it that it won't be quite as scary as Ocaml or Haskell. Felix uses "vlong" for C's "long long" .. not hard to learn, but every new thing you have to learn is a barrier to acceptance. -- John Skaller Felix, successor to C++: http://felix.sf.net