caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [ANN] New release of Menhir
@ 2008-09-09  7:52 Francois Pottier
       [not found] ` <Pine.LNX.4.64.0809090959260.9545@pc-004.diku.dk>
  0 siblings, 1 reply; 2+ messages in thread
From: Francois Pottier @ 2008-09-09  7:52 UTC (permalink / raw)
  To: menhir-list, Caml Mailing List


Hello all,

It is my pleasure to announce a new release of Menhir, with the following
main improvements over previous versions:

  --table       Menhir now supports producing table-based LR automata, in
                the tradition of yacc, bison, and ocamlyacc. This makes
		the generated parsers up to 5x smaller, and somewhat slower.

  --interpret   Menhir can now be used not just as a compiler, but also as
                an interpreter. It will read sentences off the standard
		input channel, parse them as per your grammar, and report
		an outcome. This should help debug grammars.

These new features were implemented by Guillaume Bau, Raja Boujbel, and
François Pottier. We would like to gratefully acknowledge the generous support
of Jane Street Capital LLC, who funded this endeavor through an ocaml summer
project.

As usual, the new release is available either through GODI, or as source code
at the following URL.

  http://cristal.inria.fr/~fpottier/menhir/

Enjoy! Comments and bug reports are welcome.

-- 
François Pottier
Francois.Pottier@inria.fr
http://cristal.inria.fr/~fpottier/


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Menhir-list] [ANN] New release of Menhir
       [not found] ` <Pine.LNX.4.64.0809090959260.9545@pc-004.diku.dk>
@ 2008-09-09  8:16   ` Francois Pottier
  0 siblings, 0 replies; 2+ messages in thread
From: Francois Pottier @ 2008-09-09  8:16 UTC (permalink / raw)
  To: Julia Lawall; +Cc: menhir-list, Caml Mailing List


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/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-09-09  8:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-09  7:52 [ANN] New release of Menhir Francois Pottier
     [not found] ` <Pine.LNX.4.64.0809090959260.9545@pc-004.diku.dk>
2008-09-09  8:16   ` [Menhir-list] " Francois Pottier

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).