From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=NO_RELAYS autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: by yquem.inria.fr (Postfix, from userid 18965) id 0048EBB84; Tue, 9 Sep 2008 10:16:53 +0200 (CEST) Date: Tue, 9 Sep 2008 10:16:53 +0200 From: Francois Pottier To: Julia Lawall Cc: menhir-list@yquem.inria.fr, Caml Mailing List Subject: Re: [Menhir-list] [ANN] New release of Menhir Message-ID: <20080909081653.GA10820@yquem.inria.fr> Reply-To: Francois.Pottier@inria.fr References: <20080909075235.GA7950@yquem.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.9i X-Spam: no; 0.00; 0200,:01 parser:01 yup:01 parser:01 ocaml's:01 ocamlfind:01 -package:01 ocamlc:01 ocamlopt:01 flags:01 -linkpkg:01 ocamlc:01 ocamlopt:01 flags:01 ocamlfind:01 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/