caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] camlp4 and syntax modifications
Date: Wed, 3 Apr 2002 11:21:40 +0200	[thread overview]
Message-ID: <20020403112140.B1091@verdot.inria.fr> (raw)
In-Reply-To: <3CAAC202.40056D40@inrialpes.fr>; from Frederic.Tronel@inrialpes.fr on Wed, Apr 03, 2002 at 10:49:06AM +0200

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


  reply	other threads:[~2002-04-03  9:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-03  8:49 Frederic Tronel
2002-04-03  9:21 ` Daniel de Rauglaudre [this message]
2002-04-03 10:45   ` [Caml-list] binaire advi pour windows Christophe Raffalli
2002-04-05 14:41     ` Sven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020403112140.B1091@verdot.inria.fr \
    --to=daniel.de_rauglaudre@inria.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).