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 LAA18248; Wed, 3 Apr 2002 11:21:42 +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 LAA12224 for ; Wed, 3 Apr 2002 11:21:41 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g339LeD21151 for ; Wed, 3 Apr 2002 11:21:40 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id LAA08396 for caml-list@inria.fr; Wed, 3 Apr 2002 11:21:40 +0200 Date: Wed, 3 Apr 2002 11:21:40 +0200 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] camlp4 and syntax modifications Message-ID: <20020403112140.B1091@verdot.inria.fr> References: <3CAAC202.40056D40@inrialpes.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3CAAC202.40056D40@inrialpes.fr>; from Frederic.Tronel@inrialpes.fr on Wed, Apr 03, 2002 at 10:49:06AM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, On Wed, Apr 03, 2002 at 10:49:06AM +0200, Frederic Tronel wrote: > I'm using camlp4 to embed a specification language (Lotos) > into caml. I've written quotations that allow to write and > use Lotos expressions directly in my caml code. But I'm facing > a problem with what appears to be slight syntax changes. Here's > an example: I think that you did not understand how to use the quotations: the "original" syntax (camlp4o), like you say, does not concern the contents of the quotations, but only the rest of your program (what is *not* in the quotations). What is inside the quotations is treated by your quotation expander which, depending on how you programmed it, can parse C, Java, Fortran, Basic, Calculus of Constructions, English, Slang, String, ignored garbage, Lambda Calculus, APL, HTML... anything. Therefore, we first need to see the code of your quotation expander. Second: you don't have to open your quotation expander file in your program. The statement "open Lotos" is unuseful. The quotation expander is for *parsing* time, not for *execution* time. If you need specific library functions, it is better to put them in another file, because the code in your file lotos.ml concerns syntactic statements which you probably don't need at execution time. When you use Camlp4, you need to understand the difference between - what is of the level of the "compiler" (camlp4) and - what is of the level of your program Feel free to ask more information if you need. -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- 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