From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 4E4F77ED7A for ; Thu, 20 Sep 2012 18:31:15 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of philippe.veber@gmail.com) identity=pra; client-ip=209.85.220.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of philippe.veber@gmail.com designates 209.85.220.182 as permitted sender) identity=mailfrom; client-ip=209.85.220.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-vc0-f182.google.com) identity=helo; client-ip=209.85.220.182; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="postmaster@mail-vc0-f182.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjcBAHpDW1DRVdy2mGdsb2JhbABFvREIIwEBAQEBCAkNBxQngiABAQEDARICLAEbHQEDAQsGBQQBBjsiAREBBQEcBhMih04BAwkGm1MJA4wlgnWFDgoZJw1ZiHQBBQyRUgOVZI5CFimECQ X-IronPort-AV: E=Sophos;i="4.80,454,1344204000"; d="scan'208";a="156422000" Received: from mail-vc0-f182.google.com ([209.85.220.182]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 20 Sep 2012 18:31:14 +0200 Received: by vcbfw7 with SMTP id fw7so4831696vcb.27 for ; Thu, 20 Sep 2012 09:31:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=FGsEpEObQiv3wyaWm0HuLeZPQVKngDK3BaSEnewM+SY=; b=afDBmvJ7ZnZiIOHdgUR7EaeTOJjG3XV09dLyXXqRtIE8Kn0jWLhGi68h/OpMh0d64p 4DB+Nu7RIU9hlp+mxh4pWXHldtJhkbs5TjDW92gOp/0Q7+gU632gTZRoSVkJSpSFNhcC nliDEDcNn22FZTE15UbnbJd67uqC5IgcjeLlcTk9eGc1Gslxyv5JGfGL5AFr6YOBZPQv vWgeiZryXEdkDyMQoVWYc8n3t87Dnu7qoZS20aVr+wbsBkVLRUBSQW5ozHMDy+4NZWku uQyIoCp1tATLXBFzvgl11A2jIEBVsv3mkCAF/JyFW3MpVXl/05IKGEz0OLfABfhcZayi +mlQ== Received: by 10.58.144.232 with SMTP id sp8mr1349838veb.56.1348158673464; Thu, 20 Sep 2012 09:31:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.221.0.135 with HTTP; Thu, 20 Sep 2012 09:30:53 -0700 (PDT) In-Reply-To: <505B402A.9070407@m4x.org> References: <505B402A.9070407@m4x.org> From: Philippe Veber Date: Thu, 20 Sep 2012 18:30:53 +0200 Message-ID: To: Benoit Montagu Cc: Gabriel Scherer , caml users Content-Type: multipart/alternative; boundary=047d7b66fb05d52e8504ca24a66d X-Validation-by: philippe.veber@gmail.com Subject: Re: [Caml-list] Using menhir for a camlp4 quotation: a compilation issue --047d7b66fb05d52e8504ca24a66d Content-Type: text/plain; charset=ISO-8859-1 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 > 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 > --047d7b66fb05d52e8504ca24a66d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Good, I could make it work thanks to your combined suggestions! More precis= ely:

1. rename r_lang_parser.mly to r_lang_parser_aux.mly
2. crea= te 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 wor= k for me, I used the tag pkg_camlp4.lib which is created in the oasis ocaml= build 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 Beno= it 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

--047d7b66fb05d52e8504ca24a66d--