package stele
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
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 generatewrites a message for every error state of a Menhir grammar, frommenhir --list-errorsand 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-classesandtransitionshelp review and improve the messages;statsandcensusare meant to be pinned as golden files.stele tunesuggests changes to the grammar's%on_error_reduceannotations, trying each one on a scratch copy of the grammar.- The
stele.runtimelibrary turns the location markers in a message into source spans at parse time. It depends only onmenhirLib, so it also works underjs_of_ocamlandwasm_of_ocaml. - A tutorial and a runnable example (
example/).
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page