package lrgrep

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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