[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Daniel de Rauglaudre <daniel.de_rauglaudre@i...> |
| Subject: | Re: [Caml-list] camlp4 and syntax modifications |
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