package lrgrep

  1. Overview
  2. Docs
Detailed error messages for Menhir-generated parsers

Install

dune-project
 Dependency

Authors

Maintainers

Sources

lrgrep-0.9.tbz
sha256=e53de12e4c5cbe6bca00643593266b4f9fa2e3f6a138195eeff7a4329f5c1c75
sha512=7fd7c4d11506fea7cc11c9bbf5aea9142d905643553c0c90e1bb16b794106b0c14a266acf89ae91b6929008dc0ba6515f788642873e2e4ba6c3d49bd45d25127

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