jon.recoil.org

Parameter Make.ET

type state
val number : ET.state -> int
type token
type terminal = int
type nonterminal = int
type semantic_value = Stdlib.Obj.t
val token2terminal : ET.token -> ET.terminal
val token2value : ET.token -> ET.semantic_value
val error_terminal : ET.terminal
val error_value : ET.semantic_value
val foreach_terminal : (ET.terminal -> 'a -> 'a) -> 'a -> 'a
type production
val production_index : ET.production -> int
val find_production : int -> ET.production
val default_reduction : ET.state -> ('env -> ET.production -> 'answer) -> ('env -> 'answer) -> 'env -> 'answer
val action : ET.state -> ET.terminal -> ET.semantic_value -> ('env -> bool -> ET.terminal -> ET.semantic_value -> ET.state -> 'answer) -> ('env -> ET.production -> 'answer) -> ('env -> 'answer) -> 'env -> 'answer
val maybe_shift_t : ET.state -> ET.terminal -> ET.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 : ET.state -> ET.terminal -> ET.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 : ET.state -> ET.nonterminal -> ET.state
val goto_prod : ET.state -> ET.production -> ET.state
val maybe_goto_nt : ET.state -> ET.nonterminal -> ET.state option
val is_start : ET.production -> bool
exception Error
val semantic_action : ET.production -> ET.semantic_action
val may_reduce : ET.state -> ET.production -> bool
val log : bool