package stele

  1. Overview
  2. Docs
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/stele.runtime/Parser_error_runtime/Make/argument-1-E/index.html

Parameter Make.E

The minimal slice of a Menhir INCREMENTAL_ENGINE the resolution needs: reaching a stack cell by depth and reading its source span. Instantiate it from the parser's MenhirInterpreter — get is MenhirInterpreter.get and positions destructures MenhirInterpreter.Element.

type 'a env
type element
val get : int -> 'a env -> element option

get i env is the i-th stack cell from the top (0-based), or None when the stack is shallower than i. This is MenhirInterpreter.get.

The source span (start, stop) a stack cell covers. Destructure the engine's Element (_, _, start, stop).