package lrgrep

  1. Overview
  2. Docs
Analyse the stack of a Menhir-generated LR parser using regular expressions

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lrgrep-0.3.tbz
sha256=84a1874d0c063da371e19c84243aac7c40bfcb9aaf204251e0eb0d1f077f2cde
sha512=5a16ff42a196fd741bc64a1bdd45b4dca0098633e73aa665829a44625ec15382891c3643fa210dbe3704336eab095d4024e093e37ae5313810f6754de6119d55

doc/lrgrep.runtime/Lrgrep_runtime/Interpreter/argument-1-P/index.html

Parameter Interpreter.P

type 'a env

Represents the state of the parser (mostly a parsing stack)

type element

The type of semantic values stored in stack frame

val current_state_number : 'a env -> int

Returns the current lr1 state (the state at the top of the stack)

val top : 'a env -> element option

Returns the semantic value at the top of the stack, if any.

val pop : 'a env -> 'a env option

Returns the stack with the top frame removed, or None for an empty stack

val positions : 'a env -> Lexing.position * Lexing.position

Returns the starting and ending positions of the element at the top of the stack