From: Francois Pottier <Francois.Pottier@inria.fr>
To: Julia Lawall <julia@diku.dk>
Cc: menhir-list@yquem.inria.fr, Caml Mailing List <caml-list@yquem.inria.fr>
Subject: Re: [Menhir-list] [ANN] New release of Menhir
Date: Tue, 9 Sep 2008 10:16:53 +0200 [thread overview]
Message-ID: <20080909081653.GA10820@yquem.inria.fr> (raw)
In-Reply-To: <Pine.LNX.4.64.0809090959260.9545@pc-004.diku.dk>
Dear Julia,
On Tue, Sep 09, 2008 at 10:09:55AM +0200, Julia Lawall wrote:
> I was very excited about this option, because it drops the size of the
> generated code for my parser from 61K LOC to 28K LOC. But unfortunately
> it gives me:
>
> Unbound module MenhirLib.TableInterpreter.Make
>
> when I try to compile.
Yup. I didn't write the details in the announcement; maybe I should have.
When a parser is produced using --table, it is not quite stand-alone: it
must be linked with a new library, called MenhirLib. (This is analogous
to ocaml's Parsing module, which is part of the standard library.)
If you are using ocamlfind, this is quite easy: just add "-package menhirLib"
to your ocamlc/ocamlopt flags (for compiling and for linking), and add
"-linkpkg" to your ocamlc/ocamlopt flags (for linking).
If you do not wish to rely on ocamlfind, then things become slightly more
complicated, since you must tell ocamlc/ocamlopt where MenhirLib is installed.
Fortunately, Menhir itself can help you: it has three new command-line
switches, of the form --suggest-*, which cause it to print suggested flags.
The details are in Menhir's reference manual. The sample Makefile
(demos/Makefile.shared) offers an illustration.
Hope this helps,
--
François Pottier
Francois.Pottier@inria.fr
http://cristal.inria.fr/~fpottier/
prev parent reply other threads:[~2008-09-09 8:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-09 7:52 Francois Pottier
[not found] ` <Pine.LNX.4.64.0809090959260.9545@pc-004.diku.dk>
2008-09-09 8:16 ` Francois Pottier [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=20080909081653.GA10820@yquem.inria.fr \
--to=francois.pottier@inria.fr \
--cc=caml-list@yquem.inria.fr \
--cc=julia@diku.dk \
--cc=menhir-list@yquem.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