From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA06008; Sun, 15 Aug 2004 18:36:02 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA06152 for ; Sun, 15 Aug 2004 18:36:01 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i7FGa0mL006524 for ; Sun, 15 Aug 2004 18:36:00 +0200 Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.12.11/1.01.28121999) with ESMTP id i7FGa02S046633 ; Sun, 15 Aug 2004 18:36:00 +0200 (CEST) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.13.1/jb-1.1) id i7FGZxqc029552 ; Sun, 15 Aug 2004 18:35:59 +0200 (MEST) X-Authentication-Warning: clipper.ens.fr: frisch owned process doing -bs Date: Sun, 15 Aug 2004 18:35:59 +0200 (MEST) From: Alain Frisch X-X-Sender: frisch@clipper.ens.fr Reply-To: Alain Frisch To: Jeff Henrikson cc: Caml list Subject: Re: [Caml-list] accidentally mutating caml grammar with camlp4? In-Reply-To: <20040815161827.GB2742@respighi.local.> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://amavis.org/) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.3.3 (nef.ens.fr [129.199.96.32]); Sun, 15 Aug 2004 18:36:00 +0200 (CEST) X-Miltered: at nez-perce with ID 411F90F0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; alain:01 frisch:01 alain:01 frisch:01 caml-list:01 camlp:01 henrikson:01 side-effect:01 lident:01 ocaml:01 caml:01 caml:01 int:01 int:01 float:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sun, 15 Aug 2004, Jeff Henrikson wrote: > The problem is that once I run all these, I somehow break the basic caml > grammar. I have used the keywords "int" and "float" as they are used in > C, but somehow inadvertently I have made these valid caml expressions > unparsable: The occurences of "int" and "float" in the grammar have the side-effect of registering these strings as keywords for the grammar lexer, but the Caml grammar expect these to be regular identifiers, not keywords. Note that you also register other keywords that could be used by OCaml code (e.g. Type). One possible solution is to use LIDENT "int" instead of "int" in your grammars (I didn't try it on your example, though). Cheers, Alain ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners