From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id C4240BB9C for ; Tue, 3 Jan 2006 19:11:12 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k03IBCVP026447 for ; Tue, 3 Jan 2006 19:11:12 +0100 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA13452 for ; Tue, 3 Jan 2006 19:11:11 +0100 (MET) Received: from quincy.inria.fr (quincy.inria.fr [128.93.8.52]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k03IBB28025546; Tue, 3 Jan 2006 19:11:11 +0100 Received: by quincy.inria.fr (Postfix, from userid 23861) id 5360911C430; Tue, 3 Jan 2006 19:11:11 +0100 (CET) Date: Tue, 3 Jan 2006 19:11:11 +0100 From: Michel Mauny To: "Beck01, Wolfgang" Cc: caml-list@inria.fr Subject: Re: [Caml-list] camlp4o and lazy: pr_o: not impl: expr; tag = 19 Message-ID: <20060103181111.GA12190@quincy.inria.fr> Reply-To: Michel.Mauny@inria.fr References: <97A461F3EE5284469E41ED3728202F41121F18@S4DE9JSAAMW.ost.t-com.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <97A461F3EE5284469E41ED3728202F41121F18@S4DE9JSAAMW.ost.t-com.de> User-Agent: Mutt/1.4.1i X-Miltered: at nez-perce with ID 43BABE40.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 43BABE3F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; mauny:01 mauny:01 caml-list:01 camlp:01 lazy:01 impl:01 expr:01 bug:01 cvs:01 expr:01 camlp:01 cmo:01 cmo:01 -pp:01 syntax: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 This is a bug, and I've fixed it in the CVS. Note that you have the same (buggy) behavior with <:expr< assert e >>. Both of them happen only when pretty-printing the result, as done by "camlp4o ./g3.cmo pr_o.cmo". If you use "camlp4o ./g3.cmo" as a preprocessor to ocamlçocamlopt (through the -pp option), then the syntax tree produced by camlp4o is correct. Thanks, -- Michel Beck01, Wolfgang wrote/écrivait (Tue, Jan 03, 2006 at 03:31:05PM +0100): > During the holidays I tried to get finally a clue about camlp4. > > When I have a small grammar like this: > > open Pcaml > EXTEND > expr: > [ [ > "bla" -> > let fe = <:expr< tst() >> > in > let lzy = <;expr< lazy $fe$ >> > in > <:expr< do_something $lzy$ >> > ] ] > ; > END > > and compile it to g3.cmo with > > ocamlc -pp "camlp4o pa_extend.cmo q_MLast.cmo" -I +camlp4 -c g3.ml > > and pass a file containing a bla through > > camlp4o ./g3.cmo pr_o.cmo bla.ml > > I get > let _ = do_something > > There seems to be an issue with <:expr< lazy ... When I replace > 'lazy' with 'lazi' everything works as expected: > > let _ = do_someting (lazi (tst ())) > > Any idea what's wrong here? > > > Wolfgang > -- > T-Systems International GmbH > Technologiezentrum > Next Generation IP Services and Systems > +49 6151 9372863 > Am Kavalleriesand 3 > 64295 Darmstadt > > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs