steleversion Documentation on ocaml.org
User-friendly syntax-error messages for any Menhir grammar
stele writes the syntax-error messages of a Menhir grammar at build time. From menhir --list-errors and the grammar's .cmly, it produces a message for every error state: what could come next, which opening delimiter is still open, and, where the grammar uses %on_error_reduce, which construct the parser assumed complete. Each message is checked against the parser's tables, and the messages can be pinned in golden files, so a grammar change shows up as a diff to review. An optional config file improves the wording, an overrides file holds hand-written messages, and stele tune suggests changes to the %on_error_reduce annotations. The stele.runtime library, which depends only on menhirLib, turns the location markers in a message into source spans when the parser fails.
| Author | Jérôme Vouillon |
|---|---|
| License | MIT |
| Published | |
| Homepage | https://github.com/vouillon/stele |
| Issue Tracker | https://github.com/vouillon/stele/issues |
| Maintainer | Jérôme Vouillon <jerome.vouillon@gmail.com> |
| Dependencies | |
| Source [http] | https://github.com/vouillon/stele/archive/refs/tags/0.1.0.tar.gz md5=4a2c12c3a90d763a7c2c7d1a6982493c sha512=f9004a4c4d999d8b71a3f7178ac72bd48574f2c9f4bfcaff4c6e5b2031d015bfc64b4cd02848e34054e841dac142befdd8cd5938c061dc9f7c9fc417c2176837 |
| Edit | https://github.com/ocaml/opam-repository/tree/master/packages/stele/stele.0.1.0/opam |


