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 LAA17077; Thu, 29 Jul 2004 11:40:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 LAA23015 for ; Thu, 29 Jul 2004 11:40:03 +0200 (MET DST) Received: from quincy.inria.fr (quincy.inria.fr [128.93.8.52]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i6T9e3SH028288 for ; Thu, 29 Jul 2004 11:40:03 +0200 Received: by quincy.inria.fr (Postfix, from userid 23861) id 0132A11C5C8; Thu, 29 Jul 2004 11:40:02 +0200 (CEST) Date: Thu, 29 Jul 2004 11:40:02 +0200 From: Michel Mauny To: caml-list Subject: Re: [Caml-list] Slight parsing difference with/without -pp "camlp4o" Message-ID: <20040729094002.GA12664@quincy.inria.fr> Reply-To: Michel.Mauny@inria.fr References: <20040720092114.GA11136@redhat.com> <4107DC2A.9070008@jollys.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4107DC2A.9070008@jollys.org> User-Agent: Mutt/1.4.1i X-Miltered: at concorde with ID 4108C5F3.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 -pp:01 camlp:01 2004:99 camlp:01 permissive:01 ocamlc:01 -pp:01 ocamlc:01 ocaml:01 ocaml:01 int:01 syntax:02 ecrivait:02 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Peter Jolly wrote/écrivait (Wed, Jul 28, 2004 at 06:02:34PM +0100): > > Camlp4o is also more permissive with "with" in record constructions: Right, but that one is difficult to fix. What happens is that Camlp4 and OCaml use different parsing technologies, Camlp4 has to do a lot of (sometimes dirty) work to be able to parse all OCaml programs. The result is that slightly more programs are accepted by camlp4o than by ocaml, which is better than the other way around ;-) I'm afraid that nothing useful can be done here. -- Michel > $ cat test.ml > type t = { a: int } > let f() = { a = 0 } > let y = { f() with a = 1 } > > $ ocamlc -pp camlp4o test.ml > $ ocamlc test.ml > File "test.ml", line 3, characters 11-12: > Syntax error ------------------- 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