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.
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