jon.recoil.org

Parameter Make.T

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