From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: "Jeremy Yallop" <jeremy.yallop@ed.ac.uk>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] building executables with camlp4
Date: Wed, 13 Jun 2007 15:45:44 +0200 [thread overview]
Message-ID: <cd67f63a0706130645y48555471u1409d47526ec8408@mail.gmail.com> (raw)
In-Reply-To: <466FF0D8.5060006@ed.ac.uk>
On 6/13/07, Jeremy Yallop <jeremy.yallop@ed.ac.uk> wrote:
> Nicolas Pouillard wrote:
> >> But this doesn't:
> >>
> >> $ ocamlc -g -linkall -I /usr/local/ocaml/lib/ocaml/camlp4 \
> >> -o minimal \
> >> camlp4lib.cma \
> >> unix.cma \
> >> Camlp4Parsers/Camlp4OCamlRevisedParser.cmo \
> >> Camlp4Parsers/Camlp4OCamlParser.cmo \
> >> Camlp4Printers/Camlp4OCamlPrinter.cmo \
> >> Camlp4Bin.cmo \
> >> minimal.cmo
> >> $ ./minimal input.ml
> >> File "input.ml", line 1, characters 35-36:
> >> Parse error: ident_of_ctyp: this type is not an identifier
> >
> > Try to put Camlp4Bin before minimal, since it's the main so the init
> > section of this module is the starting point.
>
> Sorry, I don't follow. Camlp4Bin is before minimal above, right? If I
> reverse the order of Camlp4Bin.cmo and minimal.cmo I get Not_found
> errors again when I run the program.
>
Hum, sorry for my very confusing previous answer. I thought "Camlp4Bin
*after* minimal". But you've tried that.
After thinking a little more, I can explain what's happening there is
two modes to get into Camlp4 pipeline. The first one is through
registration and the second one is through dyn-linking of cmo files on
the command line.
Here your Minimal module is neither on the command line nor registered.
To register it make a functor around your grammar extension and call
Camlp4.Register.OCamlSyntaxExtension.
--
Nicolas Pouillard
next prev parent reply other threads:[~2007-06-13 13:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-13 10:47 Jeremy Yallop
2007-06-13 12:23 ` [Caml-list] " Nicolas Pouillard
2007-06-13 13:12 ` Jeremy Yallop
2007-06-13 13:27 ` Nicolas Pouillard
2007-06-13 13:27 ` Jeremy Yallop
2007-06-13 13:45 ` Nicolas Pouillard [this message]
2007-06-13 14:07 ` Jeremy Yallop
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=cd67f63a0706130645y48555471u1409d47526ec8408@mail.gmail.com \
--to=nicolas.pouillard@gmail.com \
--cc=caml-list@inria.fr \
--cc=jeremy.yallop@ed.ac.uk \
/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