Dear users of Menhir,
I am happy to announce a new release of Menhir, with several minor changes and bug fixes, listed below.
opam update opam upgrade menhir
The new command line switch
--dump-menhirLib <directory>causes the source
menhirLib.mlito be created in the designated
directory. This command can be useful to users with special needs who wish
menhirLibbut do not want to rely on it being installed somewhere
in the file system. (Contributed by Nicolás Ojeda Bär.)
Changes in the public API of the library
(Contributed by Frédéric Bour.)
whose type is
t -> (terminal * production list) list,
is still present but is now deprecated.
whose type is
t -> (terminal * production) list,
should be used instead.
The library offers a view of the automaton after conflict resolution,
so, for each token, at most one production can be reduced.
Lr1.default_reduction : Lr1.t -> production option
appears. This function indicates which states have a default reduction.
The new experimental flag
--specialize-tokencauses the code back-end
to perform code specialization so as to guarantee that each token is
examined exactly once (thus never more than once) by the parser. This
causes an increase in code size and does not (yet) allow a performance
increase. This feature is independent of the choice between
-O 2. It may disappear in the future.
Inconsistent type definitions used to be produced when
--inspectionwere passed on the command line. The type
defined at the toplevel, whereas it should always be defined inside the
MenhirInterpreter. (Reported and fixed by Frédéric Bour.)
Malformed code and type definitions used to be produced when
--inspectionwere passed on the command line.
Fixed. (Reported by Maxime Dénès.)
Enable OCaml warning 39 (unused rec flag) in the OCaml code produced
by Menhir’s code back-end. Menhir now carefully emits
let recwhen a function is not recursive.