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/module-type-Parser/index.html

Module type Lrgrep_runtime.ParserSource

A minimal module type mimicking Menhir incremental interface, suitable to run a matching program.

Sourcetype 'a env

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

Sourcetype element

The type of semantic values stored in stack frame

Sourceval current_state_number : 'a env -> int

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

Sourceval top : 'a env -> element option

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

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

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

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

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