functor
(TT : TableFormat.TABLES) (IT : sig
type 'a terminal
type 'a nonterminal
type 'a symbol =
T : 'a terminal -> 'a symbol
| N : 'a nonterminal -> 'a symbol
type xsymbol = X : 'a symbol -> xsymbol
type 'a lr1state = int
val terminal : int -> xsymbol
val nonterminal : int -> xsymbol
val rhs :
PackedIntArray.t * PackedIntArray.t
val lr0_core : PackedIntArray.t
val lr0_items :
PackedIntArray.t * PackedIntArray.t
val lr0_incoming : PackedIntArray.t
val nullable : string
val first : int * string
end) (ET : sig
type state
val number : state -> int
type token
type terminal = int
type nonterminal = int
type semantic_value = 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
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 goto_nt :
state ->
nonterminal -> state
val goto_prod :
state -> production -> state
val maybe_goto_nt :
state ->
nonterminal -> state option
val is_start :
production -> bool
exception Error
type semantic_action =
(state, semantic_value,
token)
EngineTypes.env ->
(state, semantic_value)
EngineTypes.stack
val semantic_action :
production ->
semantic_action
val may_reduce :
state -> production -> bool
val log : bool
module Log :
sig
val state : state -> unit
val shift :
terminal ->
state -> unit
val reduce_or_accept :
production -> unit
val lookahead_token :
terminal ->
Lexing.position ->
Lexing.position -> unit
val initiating_error_handling :
unit -> unit
val resuming_error_handling :
unit -> unit
val handling_error :
state -> unit
end
end) (E : sig
type 'a env =
(ET.state,
ET.semantic_value,
ET.token)
CamlinternalMenhirLib.EngineTypes.env
end) ->
sig
type 'a symbol =
T : 'a IT.terminal -> 'a symbol
| N : 'a IT.nonterminal -> 'a symbol
type xsymbol = X : 'a symbol -> xsymbol
type item = int * int
val compare_terminals : 'a IT.terminal -> 'b IT.terminal -> int
val compare_nonterminals : 'a IT.nonterminal -> 'b IT.nonterminal -> int
val compare_symbols : xsymbol -> xsymbol -> int
val compare_productions : int -> int -> int
val compare_items : item -> item -> int
val incoming_symbol : 'a IT.lr1state -> 'a symbol
val items : 'a IT.lr1state -> item list
val lhs : int -> xsymbol
val rhs : int -> xsymbol list
val nullable : 'a IT.nonterminal -> bool
val first : 'a IT.nonterminal -> 'b IT.terminal -> bool
val xfirst : xsymbol -> 'a IT.terminal -> bool
val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val feed :
'a symbol ->
IncrementalEngine.position ->
'a -> IncrementalEngine.position -> 'b E.env -> 'b E.env
end