English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
ocamlbuild, menhir and keeping tokens in a separate file
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-04-28 (15:12)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] Re: ocamlbuild, menhir and keeping tokens in a separate file
On 4/28/07, Joel Reymont <joelr1@gmail.com> wrote:
> This is what I came up with:
> flag ["ocaml"; "parser"; "mehir" ] (A"--explain");
> flag ["ocaml"; "menhir_ocamldep" ] (A"easy_tokens.mly");
> flag ["ocaml"; "menhir_ocamldep" ] (A"--base");
> flag ["ocaml"; "menhir_ocamldep" ] (A"easy_parser");
> Can the 3 different (A"..")s be combined?

flag ["ocaml"; "menhir_ocamldep" ] (S[A"easy_tokens.mly"; A"--base";

> This works but ocamlbuild doesn't know anything about easy_tokens and
> doesn't copy it to _build which results in a "file not found" error.
> Is there a way to say that this token file should always go on the
> command line with this mly file? Hardcoding like above only works if
> there's one parser in the project.
> I tried the following off of the top of my head but it doesn't work.
> dep ["ocaml"; "parser"; "menhir"; "tokens"] ["easy_tokens.mly"];
> in _tags
> "easy_parser.mly": tokens

Hum this is supposed to works.

Can you try these one

dep ["ocaml"; "parser"; "menhir"] ["easy_tokens.mly"];

dep ["ocaml"; "parser"; "menhir"; "file:easy_parser.mly"] ["easy_tokens.mly"];

Nicolas Pouillard