[ANN] New release of Menhir (20230415)

It is my pleasure to announce a new release of Menhir, with a number of minor improvements.

The change log appears below. The main point of notice is that (when using the code back-end) the default optimization level has been changed from -O 2 to -O 1. So, if you need to keep identical generated code and performance, you should now explicitly pass -O 2 to Menhir.

  opam update
  opam install menhir.20230415 

2023/04/15

  • When using the code back-end, the default optimization level is now -O 1
    instead of -O 2. Some users reported that -O 2 is too aggressive and
    can cause a blow-up in the size of the code.

  • Tweak the code for compatibility with OCaml 5.1. (Contributed by
    Florian Angeletti.)

  • The new function MenhirLib.LexerUtil.tabulate makes it easy to run
    the lexer and parser in two separate phases. This can be useful when
    one wishes to benchmark them separately.

  • To use the interpreter and print a concrete syntax tree, it used to be
    necessary to pass both --interpret and --interpret-show-cst. It is
    now sufficient to pass just --interpret-show-cst. (If both are passed,
    then only the last one is obeyed.) This fixes the assertion failure that
    would be observed when --interpret-show-cst alone was used.
    (Reported by Reed Mullanix.)

5 Likes