package menhir-secondary

  1. Overview
  2. Docs

Parameters

Signature

type state = int
val number : state -> int
type token = T.token
type terminal = int
type nonterminal = int
type semantic_value = Stdlib.Obj.t
val token2terminal : token -> terminal
val token2value : token -> semantic_value
val error_terminal : terminal
val error_value : semantic_value
val foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
type production = int
val production_index : production -> int
val find_production : int -> production
val default_reduction : state -> ('env -> production -> 'answer) -> ('env -> 'answer) -> 'env -> 'answer
val action : state -> terminal -> semantic_value -> ('env -> bool -> terminal -> semantic_value -> state -> 'answer) -> ('env -> production -> 'answer) -> ('env -> 'answer) -> 'env -> 'answer
val maybe_shift_t : state -> terminal -> state option

maybe_shift_t s t determines whether there exists a transition out of the state s, labeled with the terminal symbol t, to some state s'. If so, it returns Some s'. Otherwise, it returns None.

val may_reduce_prod : state -> terminal -> production -> bool

may_reduce_prod s t prod determines whether in the state s, with lookahead symbol t, the automaton reduces production prod. This test accounts for the possible existence of a default reduction.

val goto_nt : state -> nonterminal -> state
val goto_prod : state -> production -> state
val maybe_goto_nt : state -> nonterminal -> state option
val lhs : production -> nonterminal
val is_start : production -> bool
exception Error
val semantic_action : production -> semantic_action
val may_reduce : state -> production -> bool
val log : bool
module Log : EngineTypes.LOG with type state := state and type terminal := terminal and type production := production
OCaml

Innovation. Community. Security.