Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Make.Aval number : state -> intAn injective mapping of states to integers.
A token is conceptually a pair of a terminal symbol and a semantic value. token2terminal is the first pair projection: it maps a token to the corresponding terminal symbol.
val lhs : production -> nonterminallhs prod returns the left-hand side of the production prod.
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 maybe_goto_nt : state -> nonterminal -> state optionmaybe_goto_nt s nt determines whether there exists a transition out of the state s, labeled with the nonterminal symbol nt, to some state s'. If so, it returns Some s'. Otherwise, it returns None.
val may_reduce_prod : state -> terminal -> production -> boolmay_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.