From: Philippe Veber <philippe.veber@gmail.com>
To: Benoit Montagu <benoit.montagu@m4x.org>
Cc: Gabriel Scherer <gabriel.scherer@gmail.com>,
caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Using menhir for a camlp4 quotation: a compilation issue
Date: Thu, 20 Sep 2012 18:30:53 +0200 [thread overview]
Message-ID: <CAOOOohTCQibGfLJ4MfxxZqhoK9jhYLvmGykccQmxYs=ywf8N9w@mail.gmail.com> (raw)
In-Reply-To: <505B402A.9070407@m4x.org>
[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]
Good, I could make it work thanks to your combined suggestions! More
precisely:
1. rename r_lang_parser.mly to r_lang_parser_aux.mly
2. create r_lang_parser.mlypack which contents is a single line:
R_lang_parser_aux
3. add a line in the _tags file (the package(camlp4.lib) syntax did not
work for me, I used the tag pkg_camlp4.lib which is created in the oasis
ocamlbuild plugin).
So it does appear that the function to call menhir in ocamlbuild lacks an
argument. I'll make a report in mantis for that.
Thank you both!
ph.
2012/9/20 Benoit Montagu <benoit.montagu@m4x.org>
> The typical use case for mlypack is the following: you have several parser
> files (say, A.mly and B.mly) that menhir needs to combine (yes, menhir can
> do that), and you want menhir to create a parser C.ml/C.mli.
> To do so, you create C.mlypack, whose contents is:
> A
> B
>
> And then ocamlbuild should work.
>
> In your case, r_lang_parser.mlypack should contain
> Foo
>
> where Foo.mly is your menhir file.
>
> I don't know about how to pass extra arguments to menhir.
>
> -- Benoit
>
[-- Attachment #2: Type: text/html, Size: 1469 bytes --]
prev parent reply other threads:[~2012-09-20 16:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 13:45 Philippe Veber
2012-09-20 14:18 ` Gabriel Scherer
2012-09-20 15:54 ` Philippe Veber
2012-09-20 16:11 ` Benoit Montagu
2012-09-20 16:30 ` Philippe Veber [this message]
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='CAOOOohTCQibGfLJ4MfxxZqhoK9jhYLvmGykccQmxYs=ywf8N9w@mail.gmail.com' \
--to=philippe.veber@gmail.com \
--cc=benoit.montagu@m4x.org \
--cc=caml-list@inria.fr \
--cc=gabriel.scherer@gmail.com \
/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