Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Joel Reymont <joelr1@g...>
Subject: Re: ocamlbuild, menhir and keeping tokens in a separate file
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?

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

	Thanks, Joel

--
http://wagerlabs.com/