Browse thread
ocamlbuild, menhir and keeping tokens in a separate file
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2007-05-02 (12:00) |
From: | Joel Reymont <joelr1@g...> |
Subject: | Re: [Caml-list] Re: ocamlbuild, menhir and keeping tokens in a separate file |
On May 2, 2007, at 12:54 PM, Nicolas Pouillard wrote: > The main behavior of dep is just to build EasyToken.mly before running > the command, not to include it into the command line. You can use flag > to insert it into the command line. This is what I use now: let menhir_opts = S[A"--external-tokens"; A"EasyToken"; A"--base"; A"EasyParser"; A"EasyToken.mly" ];; flag ["ocaml"; "parser"; "menhir" ] (menhir_opts); flag ["ocaml"; "menhir_ocamldep" ] (menhir_opts); Two things happen, though, both undesirable: 1) Menhir cannot find EasyToken.mly unless I manually go into _build and symlink the file from ../ 2) ocamlbuild tries to compile EasyToken.mly. I want to avoid this as this file is not set up for compilation. How do I prevent ocamlbuild from trying to compile EasyToken.mly while still copying it into _build/ for Menhir to find it? Alternatively, how do I specify custom flags for the Menhir run on EasyToken.mly? I need to add --token-only, for example. And one last thing, how do I apply menhir_opts to certain mly files but not others? Thanks, Joel -- http://wagerlabs.com/