package menhirLib

  1. Overview
  2. Docs

Module TableInterpreter.MakeEngineTableSource

Parameters

Signature

Sourcetype state = int
Sourceval number : state -> int
Sourcetype token = T.token
Sourcetype terminal = int
Sourcetype nonterminal = int
Sourcetype semantic_value = Obj.t
Sourceval token2terminal : token -> terminal
Sourceval token2value : token -> semantic_value
Sourceval error_terminal : terminal
Sourceval error_value : semantic_value
Sourceval foreach_terminal : (terminal -> 'a -> 'a) -> 'a -> 'a
Sourcetype production = int
Sourceval production_index : production -> int
Sourceval find_production : int -> production
Sourceval default_reduction : state -> ('env -> production -> 'answer) -> ('env -> 'answer) -> 'env -> 'answer
Sourceval action : state -> terminal -> semantic_value -> ('env -> bool -> terminal -> semantic_value -> state -> 'answer) -> ('env -> production -> 'answer) -> ('env -> 'answer) -> 'env -> 'answer
Sourceval 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.

Sourceval 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.

Sourceval goto_nt : state -> nonterminal -> state
Sourceval goto_prod : state -> production -> state
Sourceval maybe_goto_nt : state -> nonterminal -> state option
Sourceval is_start : production -> bool
Sourceexception Error
Sourceval semantic_action : production -> semantic_action
Sourceval may_reduce : state -> production -> bool
Sourceval log : bool
Sourcemodule Log : EngineTypes.LOG with type state := state and type terminal := terminal and type production := production
OCaml

Innovation. Community. Security.