I am pleased to announce a new release of Menhir, with an exciting
contribution by Frédéric Bour: a groundbreaking performance improvement in menhir --list-errors. This is made possible by an entirely new reachability
algorithm, which has been designed and implemented by Frédéric, and which is
described in our paper “Faster Reachability Analysis for LR(1) Parsers”. This
is the link to the paper:
The command menhir --list-errors has been sped up by a factor of up
to x100, and requires up to x1000 less memory, thanks to a new LR(1)
reachability algorithm, which has been designed and implemented by
Frédéric Bour.
Better document the restricted way in which the error token must be
used when using --strategy simplified. Menhir now checks that this
token is used only at the end of a production, and warns if this is
not the case. (Better yet, our suggestion is to not use the error
token at all!)
The $syntaxerror keyword is now forbidden when using --strategy simplified. This keyword will be entirely removed
in the next release. Incidentally, we have just found out that
it behaves differently under the code back-end and under the
table back-end.
Disable OCaml warning 39 (unused rec flag) in the OCaml code produced
by Menhir’s code back-end. This does not affect the table back-end.
(Reported by Armaël Guéneau.)
Fix a bug in --random-* which could cause Menhir to diverge if the
grammar uses the error token.
Warn if a terminal symbol is named Error. This creates a name clash
in the public interface of the generated parser.
Menhir now requires OCaml 4.03.0 (instead of 4.02.3)
and Dune 2.8.0 (instead of 2.0.0).
It’s not often you see sentences like “improves performances by 100x”, in particular in fields like automata theory, and I’m still immensely impressed by it.