As mentioned in gsg's answer, ocamlyacc
generates a mli
interface together with the ml
implementation of the parser, and only exports the type of tokens and the entry points. According to http://caml.inria.fr/mantis/view.php?id=1703, this is unlikely to change, so you basically have two solutions:
- modify the generated
mli
afterwards (I usually have a rule in myMakefile
that simplyrm
it, but you might want to just add the necessary signatures instead). - use
menhir
as suggested in the bug report mentioned above.