From: "François Pottier" <francois.pottier@inria.fr>
To: menhir@inria.fr, OCaML Mailing List <caml-list@inria.fr>
Subject: [Caml-list] [ANN] New release of Menhir (20201201)
Date: Wed, 2 Dec 2020 08:53:17 +0100 [thread overview]
Message-ID: <01e62cb1-2ea5-7124-2122-fdd842f8ec3a@inria.fr> (raw)
Dear Menhir & OCaml users,
I would like to announce a new release of Menhir, the LR(1) parser generator
for OCaml. The most prominent new features are intended to improve the
comfort
of the machinery that allows producing custom syntax error messages: a
demo of
this machinery has been added, new library functions have been added so
as to
make it easier to use, and the commands that deal with `.messages` files
have
been improved. An excerpt of the changelog appears below.
opam update
opam upgrade menhir
Happy parsing,
--
François Pottier
francois.pottier@inria.fr
http://cambium.inria.fr/~fpottier/
## 2020/12/01
* The module `MenhirLib.ErrorReports` is extended with new functions:
`wrap_supplier`, `extract`, `sanitize`, `compress`, `shorten`, `expand`.
* The new module `MenhirLib.LexerUtil` offers a few functions that help
reading a file, setting up a lexing buffer, printing source code
positions,
etc.
* The new demo `calc-syntax-errors` demonstrates how to produce customized
syntax error messages.
* The new command `--merge-errors` merges two `.messages` files. It can be
useful when two or more users have independently produced partial
`.messages` files and wish to combine their work.
(Suggested by Gabriel Scherer and François Bobot.)
* The commands that read `.messages` files have been hardened so as to
tolerate situations where a sentence mentions a nonexistent symbol or
does
not lead to an error state. When such a sentence is encountered, an error
message is produced on the standard error channel; then, this sentence is
ignored and processing continues. (As an exception, the command
`--compile-errors` refuses to proceed in the presence of such sentences.)
## 2020/11/22
* The new command line switch `--dump-resolved` writes a description of the
automaton to the file `.automaton.resolved` after all conflicts have been
resolved and after extra reductions have been introduced. This file also
shows which states have a default reduction.
* The command line switch `--dump` writes a description of the automaton to
the file `.automaton` after benign conflicts have been silently resolved,
but *before* severe conflicts are resolved and before extra
reductions are
introduced. (This behavior is unchanged.) The manner in which
end-of-stream
conflicts are displayed in this file has been improved.
* In the files `.automaton` and `.automaton.resolved`, the reduction
table in
each state is now presented in a much more compact and readable way.
* In the files `.automaton` and `.automaton.resolved`, the known suffix
of the
stack in each state is now explicitly shown. (Although it can be deduced
from the LR(1) items, showing it helps.)
* Document the problem caused by placing a module alias declaration
in an `.mly` file. (See *Questions and Answers* in the manual.)
* Turn off a costly internal well-formedness assertion.
This allows a 30% speedup in the construction of large automata
and in the conflict explanation process. (Reported by Joe.)
reply other threads:[~2020-12-02 7:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=01e62cb1-2ea5-7124-2122-fdd842f8ec3a@inria.fr \
--to=francois.pottier@inria.fr \
--cc=caml-list@inria.fr \
--cc=menhir@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox