package stele

  1. Overview
  2. Docs
On This Page
  1. 0.1.0
User-friendly syntax-error messages for any Menhir grammar

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.1.0.tar.gz
md5=4a2c12c3a90d763a7c2c7d1a6982493c
sha512=f9004a4c4d999d8b71a3f7178ac72bd48574f2c9f4bfcaff4c6e5b2031d015bfc64b4cd02848e34054e841dac142befdd8cd5938c061dc9f7c9fc417c2176837

doc/CHANGES.html

Changes

0.1.0

First release as a standalone project. stele was previously developed inside the Wax toolchain, which uses it for the error messages of both its grammars.

  • stele generate writes a message for every error state of a Menhir grammar, from menhir --list-errors and the grammar's .cmly: the list of what could come next, a hint pointing at the unclosed delimiter, and an "Assuming that ... is complete" message where the grammar uses %on_error_reduce. Each list is checked against the parser's tables.
  • A per-grammar config file improves the wording (readable names and token classes), and an overrides file holds hand-written messages. Stale entries in either fail the build.
  • stats, census, names, fallbacks, suggest-classes and transitions help review and improve the messages; stats and census are meant to be pinned as golden files.
  • stele tune suggests changes to the grammar's %on_error_reduce annotations, trying each one on a scratch copy of the grammar.
  • The stele.runtime library turns the location markers in a message into source spans at parse time. It depends only on menhirLib, so it also works under js_of_ocaml and wasm_of_ocaml.
  • A tutorial and a runnable example (example/).