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 JAA27096; Tue, 5 Feb 2002 09:13:25 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA26783 for caml-list@pauillac.inria.fr; Tue, 5 Feb 2002 09:13:24 +0100 (MET) 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 XAA19937 for ; Mon, 4 Feb 2002 23:15:23 +0100 (MET) Received: from hub.ucsb.edu (hub.ucsb.edu [128.111.24.40]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g14MFMX27773 for ; Mon, 4 Feb 2002 23:15:22 +0100 (MET) Received: from smeagol.ece.ucsb.edu ([128.111.56.20]) by hub.ucsb.edu with esmtp id 16XrOT-0000jU-00; Mon, 04 Feb 2002 14:15:21 -0800 Date: Mon, 4 Feb 2002 14:15:21 -0800 Subject: Re: [Caml-list] camlp4o problem (was: otags problem) Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v480) Cc: caml-list@inria.fr To: Hendrik Tews From: Shivkumar Chandrasekaran In-Reply-To: <15454.38553.300800.53941@gargle.gargle.HOWL> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.480) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Thanks for all that info! I was planning to use camlp4. Looks like now is a good time to learn. Some simple syntax extensions would make my code so much more readable (aka Matlab-like). Thanks, --shiv-- On Monday, February 4, 2002, at 06:11 AM, Hendrik Tews wrote: > The problem is that otags uses camlp4o to parse the ocaml sources. > Sometimes camlp4o is different from ocaml. You just hit one of > these cases: > > ithif51 ocaml 15> ledit ocaml > Objective Caml version 3.04 > > # let ( <:> ) x y = x + y;; > val ( <:> ) : int -> int -> int = > # #load "camlp4o.cma";; > Camlp4 Parsing version 3.04 > > # let ( <:> ) x y = x + y;; > Toplevel input: > # let ( <:> ) x y = x + y;; > ^ > Lexing error: character '<' expected > > This difference seems to be a feature: in camlp4 "<:" starts a > quotation. The only solutions that I see are the following: > > - use an infix operator that works in ocaml and in camlp4 > - rewrite otags ;-) > > For Daniel de Rauglaudre: Because normal ocaml users are now > sometimes requested to use camlp4o for parsing (for instance for > streams) I think it makes sense to provide a camlp4 parser that > is _exacly_ ocaml. Maybe by placing the quotation syntax in a > separate file, say pa_q.cmo? > > > Bye, > > Hendrik > ------------------- > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: > http://caml.inria.fr/FAQ/ > 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/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr