CamlinternalMenhirLib.IncrementalEngine

`sig
type position = Stdlib.Lexing.position
module type INCREMENTAL_ENGINE =
sig
type token
type production
type 'a env
type 'a checkpoint = private
InputNeeded of
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env
| Shifting of
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env *
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env *
bool
| AboutToReduce of
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env *
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.production
| HandlingError of
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env
| Accepted of 'a
| Rejected
val offer :
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.token *
CamlinternalMenhirLib.IncrementalEngine.position *
CamlinternalMenhirLib.IncrementalEngine.position ->
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint
val resume :
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint ->
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint
type supplier =
unit ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.token *
CamlinternalMenhirLib.IncrementalEngine.position *
CamlinternalMenhirLib.IncrementalEngine.position
val lexer_lexbuf_to_supplier :
(Stdlib.Lexing.lexbuf ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.token) ->
Stdlib.Lexing.lexbuf ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.supplier
val loop :
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.supplier ->
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint ->
'a
val loop_handle :
('a -> 'answer) ->
('a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint ->
'answer) ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.supplier ->
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint ->
'answer
val loop_handle_undo :
('a -> 'answer) ->
('a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint ->
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint ->
'answer) ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.supplier ->
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint ->
'answer
val shifts :
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint ->
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env
option
val acceptable :
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.token ->
CamlinternalMenhirLib.IncrementalEngine.position -> bool
type 'a lr1state
val number :
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.lr1state ->
int
val production_index :
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.production ->
int
val find_production :
int ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.production
type element =
Element :
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.lr1state *
'a * CamlinternalMenhirLib.IncrementalEngine.position *
CamlinternalMenhirLib.IncrementalEngine.position -> CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.element
type stack =
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.element
CamlinternalMenhirLib.General.stream
val stack :
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.stack
val top :
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.element
option
val pop_many :
int ->
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env
option
val get :
int ->
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.element
option
val current_state_number :
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
int
val equal :
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
bool
val positions :
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
CamlinternalMenhirLib.IncrementalEngine.position *
CamlinternalMenhirLib.IncrementalEngine.position
val env_has_default_reduction :
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
bool
val state_has_default_reduction :
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.lr1state ->
bool
val pop :
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env
option
val force_reduction :
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.production ->
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env
val input_needed :
'a CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.env ->
'a
CamlinternalMenhirLib.IncrementalEngine.INCREMENTAL_ENGINE.checkpoint
end
module type SYMBOLS =
sig
type 'a terminal
type 'a nonterminal
type 'a symbol =
T :
'a CamlinternalMenhirLib.IncrementalEngine.SYMBOLS.terminal ->
'a CamlinternalMenhirLib.IncrementalEngine.SYMBOLS.symbol
| N :
'a CamlinternalMenhirLib.IncrementalEngine.SYMBOLS.nonterminal ->
'a CamlinternalMenhirLib.IncrementalEngine.SYMBOLS.symbol
type xsymbol =
X :
'a CamlinternalMenhirLib.IncrementalEngine.SYMBOLS.symbol ->
CamlinternalMenhirLib.IncrementalEngine.SYMBOLS.xsymbol
end
module type INSPECTION =
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
type production
type item =
CamlinternalMenhirLib.IncrementalEngine.INSPECTION.production * int
val compare_terminals : 'a terminal -> 'b terminal -> int
val compare_nonterminals : 'a nonterminal -> 'b nonterminal -> int
val compare_symbols : xsymbol -> xsymbol -> int
val compare_productions :
CamlinternalMenhirLib.IncrementalEngine.INSPECTION.production ->
CamlinternalMenhirLib.IncrementalEngine.INSPECTION.production -> int
val compare_items :
CamlinternalMenhirLib.IncrementalEngine.INSPECTION.item ->
CamlinternalMenhirLib.IncrementalEngine.INSPECTION.item -> int
val incoming_symbol :
'a CamlinternalMenhirLib.IncrementalEngine.INSPECTION.lr1state ->
'a symbol
val items :
'a CamlinternalMenhirLib.IncrementalEngine.INSPECTION.lr1state ->
CamlinternalMenhirLib.IncrementalEngine.INSPECTION.item list
val lhs :
CamlinternalMenhirLib.IncrementalEngine.INSPECTION.production ->
xsymbol
val rhs :
CamlinternalMenhirLib.IncrementalEngine.INSPECTION.production ->
xsymbol list
val nullable : 'a nonterminal -> bool
val first : 'a nonterminal -> 'b terminal -> bool
val xfirst : xsymbol -> 'a terminal -> bool
val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
type 'a env
val feed :
'a symbol ->
CamlinternalMenhirLib.IncrementalEngine.position ->
'a ->
CamlinternalMenhirLib.IncrementalEngine.position ->
'b CamlinternalMenhirLib.IncrementalEngine.INSPECTION.env ->
'b CamlinternalMenhirLib.IncrementalEngine.INSPECTION.env
end
module type EVERYTHING =
sig
type token
type production
type 'a env
type 'a checkpoint = private
InputNeeded of 'a env
| Shifting of 'a env * 'a env * bool
| AboutToReduce of 'a env * production
| HandlingError of 'a env
| Accepted of 'a
| Rejected
val offer :
'a checkpoint -> token * position * position -> 'a checkpoint
val resume : 'a checkpoint -> 'a checkpoint
type supplier = unit -> token * position * position
val lexer_lexbuf_to_supplier :
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> supplier
val loop : supplier -> 'a checkpoint -> 'a
val loop_handle :
('a -> 'answer) ->
('a checkpoint -> 'answer) -> supplier -> 'a checkpoint -> 'answer
val loop_handle_undo :
('a -> 'answer) ->
('a checkpoint -> 'a checkpoint -> 'answer) ->
supplier -> 'a checkpoint -> 'answer
val shifts : 'a checkpoint -> 'a env option
val acceptable : 'a checkpoint -> token -> position -> bool
type 'a lr1state
val number : 'a lr1state -> int
val production_index : production -> int
val find_production : int -> production
type element =
Element : 'a lr1state * 'a * position * position -> element
type stack = element General.stream
val stack : 'a env -> stack
val top : 'a env -> element option
val pop_many : int -> 'a env -> 'a env option
val get : int -> 'a env -> element option
val current_state_number : 'a env -> int
val equal : 'a env -> 'a env -> bool
val positions : 'a env -> position * position
val env_has_default_reduction : 'a env -> bool
val state_has_default_reduction : 'a lr1state -> bool
val pop : 'a env -> 'a env option
val force_reduction : production -> 'a env -> 'a env
val input_needed : 'a env -> 'a checkpoint
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 item = production * int
val compare_terminals : 'a terminal -> 'b terminal -> int
val compare_nonterminals : 'a nonterminal -> 'b nonterminal -> int
val compare_symbols : xsymbol -> xsymbol -> int
val compare_productions : production -> production -> int
val compare_items : item -> item -> int
val incoming_symbol : 'a lr1state -> 'a symbol
val items : 'a lr1state -> item list
val lhs : production -> xsymbol
val rhs : production -> xsymbol list
val nullable : 'a nonterminal -> bool
val first : 'a nonterminal -> 'b terminal -> bool
val xfirst : xsymbol -> 'a terminal -> bool
val foreach_terminal : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val foreach_terminal_but_error : (xsymbol -> 'a -> 'a) -> 'a -> 'a
val feed : 'a symbol -> position -> 'a -> position -> 'b env -> 'b env
end
end`