Open MSoegtropIMC opened 4 months ago
The issue is likely that in 3.0 the
--explain
option is default, but with --only-tokens no .conflict file is created by menhir.
Well spotted. In the meantime you can untoggle --explain
by passing (explain false)
to the Menhir stanza.
Thanks, this works!
It is btw. not entirely trivial to get the correct set of stanzas in the external tokens case. In case the token definitions are not repeated in the parser file, the correct set of stanzas is:
(menhir
(modules tokens)
(explain false)
(flags --only-tokens)
)
(menhir
(modules parser tokens)
(merge_into parser)
(flags --external-tokens Tokens)
)
It might make sense to mention this in the dune manual.
Expected Behavior
This stanza should work and generate tokens.ml/.mli
Actual Behavior
instead one gets this error:
This works fine with
(using menhir 2.0)
but not with(using menhir 3.0)
, so this is a regression.The issue is likely that in 3.0 the
--explain
option is default, but with --only-tokens no .conflict file is created by menhir.Reproduction
See above
Specifications
dune
(output ofdune --version
): 3.15.3ocaml
(output ofocamlc --version
): 4.14.2