sig
module General :
sig
val take : int -> 'a list -> 'a list
val drop : int -> 'a list -> 'a list
val uniq : ('a -> 'a -> int) -> 'a list -> 'a list
val weed : ('a -> 'a -> int) -> 'a list -> 'a list
type 'a stream = 'a CamlinternalMenhirLib.General.head Stdlib.Lazy.t
and 'a head =
Nil
| Cons of 'a * 'a CamlinternalMenhirLib.General.stream
val length : 'a CamlinternalMenhirLib.General.stream -> int
val foldr :
('a -> 'b -> 'b) ->
'a CamlinternalMenhirLib.General.stream -> 'b -> 'b
end
module Convert :
sig
type ('token, 'semantic_value) traditional =
(Stdlib.Lexing.lexbuf -> 'token) ->
Stdlib.Lexing.lexbuf -> 'semantic_value
type ('token, 'semantic_value) revised =
(unit -> 'token) -> 'semantic_value
val traditional2revised :
('token -> 'raw_token) ->
('token -> Stdlib.Lexing.position) ->
('token -> Stdlib.Lexing.position) ->
('raw_token, 'semantic_value)
CamlinternalMenhirLib.Convert.traditional ->
('token, 'semantic_value) CamlinternalMenhirLib.Convert.revised
val revised2traditional :
('raw_token ->
Stdlib.Lexing.position -> Stdlib.Lexing.position -> 'token) ->
('token, 'semantic_value) CamlinternalMenhirLib.Convert.revised ->
('raw_token, 'semantic_value)
CamlinternalMenhirLib.Convert.traditional
module Simplified :
sig
val traditional2revised :
('token, 'semantic_value)
CamlinternalMenhirLib.Convert.traditional ->
('token * Stdlib.Lexing.position * Stdlib.Lexing.position,
'semantic_value)
CamlinternalMenhirLib.Convert.revised
val revised2traditional :
('token * Stdlib.Lexing.position * Stdlib.Lexing.position,
'semantic_value)
CamlinternalMenhirLib.Convert.revised ->
('token, 'semantic_value)
CamlinternalMenhirLib.Convert.traditional
end
end
module 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
module EngineTypes :
sig
type ('state, 'semantic_value) stack = {
state : 'state;
semv : 'semantic_value;
startp : Stdlib.Lexing.position;
endp : Stdlib.Lexing.position;
next :
('state, 'semantic_value) CamlinternalMenhirLib.EngineTypes.stack;
}
type ('state, 'semantic_value, 'token) env = {
error : bool;
triple : 'token * Stdlib.Lexing.position * Stdlib.Lexing.position;
stack :
('state, 'semantic_value) CamlinternalMenhirLib.EngineTypes.stack;
current : 'state;
}
module type TABLE =
sig
type state
val number : CamlinternalMenhirLib.EngineTypes.TABLE.state -> int
type token
type terminal
type nonterminal
type semantic_value
val token2terminal :
CamlinternalMenhirLib.EngineTypes.TABLE.token ->
CamlinternalMenhirLib.EngineTypes.TABLE.terminal
val token2value :
CamlinternalMenhirLib.EngineTypes.TABLE.token ->
CamlinternalMenhirLib.EngineTypes.TABLE.semantic_value
val error_terminal :
CamlinternalMenhirLib.EngineTypes.TABLE.terminal
val error_value :
CamlinternalMenhirLib.EngineTypes.TABLE.semantic_value
val foreach_terminal :
(CamlinternalMenhirLib.EngineTypes.TABLE.terminal -> 'a -> 'a) ->
'a -> 'a
type production
val production_index :
CamlinternalMenhirLib.EngineTypes.TABLE.production -> int
val find_production :
int -> CamlinternalMenhirLib.EngineTypes.TABLE.production
val default_reduction :
CamlinternalMenhirLib.EngineTypes.TABLE.state ->
('env ->
CamlinternalMenhirLib.EngineTypes.TABLE.production -> 'answer) ->
('env -> 'answer) -> 'env -> 'answer
val action :
CamlinternalMenhirLib.EngineTypes.TABLE.state ->
CamlinternalMenhirLib.EngineTypes.TABLE.terminal ->
CamlinternalMenhirLib.EngineTypes.TABLE.semantic_value ->
('env ->
bool ->
CamlinternalMenhirLib.EngineTypes.TABLE.terminal ->
CamlinternalMenhirLib.EngineTypes.TABLE.semantic_value ->
CamlinternalMenhirLib.EngineTypes.TABLE.state -> 'answer) ->
('env ->
CamlinternalMenhirLib.EngineTypes.TABLE.production -> 'answer) ->
('env -> 'answer) -> 'env -> 'answer
val goto_nt :
CamlinternalMenhirLib.EngineTypes.TABLE.state ->
CamlinternalMenhirLib.EngineTypes.TABLE.nonterminal ->
CamlinternalMenhirLib.EngineTypes.TABLE.state
val goto_prod :
CamlinternalMenhirLib.EngineTypes.TABLE.state ->
CamlinternalMenhirLib.EngineTypes.TABLE.production ->
CamlinternalMenhirLib.EngineTypes.TABLE.state
val maybe_goto_nt :
CamlinternalMenhirLib.EngineTypes.TABLE.state ->
CamlinternalMenhirLib.EngineTypes.TABLE.nonterminal ->
CamlinternalMenhirLib.EngineTypes.TABLE.state option
val is_start :
CamlinternalMenhirLib.EngineTypes.TABLE.production -> bool
exception Error
type semantic_action =
(CamlinternalMenhirLib.EngineTypes.TABLE.state,
CamlinternalMenhirLib.EngineTypes.TABLE.semantic_value,
CamlinternalMenhirLib.EngineTypes.TABLE.token)
CamlinternalMenhirLib.EngineTypes.env ->
(CamlinternalMenhirLib.EngineTypes.TABLE.state,
CamlinternalMenhirLib.EngineTypes.TABLE.semantic_value)
CamlinternalMenhirLib.EngineTypes.stack
val semantic_action :
CamlinternalMenhirLib.EngineTypes.TABLE.production ->
CamlinternalMenhirLib.EngineTypes.TABLE.semantic_action
val may_reduce :
CamlinternalMenhirLib.EngineTypes.TABLE.state ->
CamlinternalMenhirLib.EngineTypes.TABLE.production -> bool
val log : bool
module Log :
sig
val state :
CamlinternalMenhirLib.EngineTypes.TABLE.state -> unit
val shift :
CamlinternalMenhirLib.EngineTypes.TABLE.terminal ->
CamlinternalMenhirLib.EngineTypes.TABLE.state -> unit
val reduce_or_accept :
CamlinternalMenhirLib.EngineTypes.TABLE.production -> unit
val lookahead_token :
CamlinternalMenhirLib.EngineTypes.TABLE.terminal ->
Stdlib.Lexing.position -> Stdlib.Lexing.position -> unit
val initiating_error_handling : unit -> unit
val resuming_error_handling : unit -> unit
val handling_error :
CamlinternalMenhirLib.EngineTypes.TABLE.state -> unit
end
end
module type MONOLITHIC_ENGINE =
sig
type state
type token
type semantic_value
exception Error
val entry :
CamlinternalMenhirLib.EngineTypes.MONOLITHIC_ENGINE.state ->
(Stdlib.Lexing.lexbuf ->
CamlinternalMenhirLib.EngineTypes.MONOLITHIC_ENGINE.token) ->
Stdlib.Lexing.lexbuf ->
CamlinternalMenhirLib.EngineTypes.MONOLITHIC_ENGINE.semantic_value
end
module type INCREMENTAL_ENGINE_START =
sig
type state
type semantic_value
type 'a checkpoint
val start :
CamlinternalMenhirLib.EngineTypes.INCREMENTAL_ENGINE_START.state ->
Stdlib.Lexing.position ->
CamlinternalMenhirLib.EngineTypes.INCREMENTAL_ENGINE_START.semantic_value
CamlinternalMenhirLib.EngineTypes.INCREMENTAL_ENGINE_START.checkpoint
end
module type ENGINE =
sig
type state
type token
type semantic_value
exception Error
val entry :
state ->
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> semantic_value
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 * IncrementalEngine.position * IncrementalEngine.position ->
'a checkpoint
val resume : 'a checkpoint -> 'a checkpoint
type supplier =
unit ->
token * IncrementalEngine.position * IncrementalEngine.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 -> IncrementalEngine.position -> bool
type 'a lr1state = state
val number : 'a lr1state -> int
val production_index : production -> int
val find_production : int -> production
type element =
Element : 'a lr1state * 'a * IncrementalEngine.position *
IncrementalEngine.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 -> IncrementalEngine.position * IncrementalEngine.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
val start : state -> Lexing.position -> semantic_value checkpoint
end
end
module Engine :
sig
module Make :
functor (T : EngineTypes.TABLE) ->
sig
type state = T.state
type token = T.token
type semantic_value = T.semantic_value
exception Error
val entry :
state ->
(Lexing.lexbuf -> token) -> Lexing.lexbuf -> semantic_value
type production = T.production
type 'a env =
(T.state, T.semantic_value, T.token) EngineTypes.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 * IncrementalEngine.position * IncrementalEngine.position ->
'a checkpoint
val resume : 'a checkpoint -> 'a checkpoint
type supplier =
unit ->
token * IncrementalEngine.position *
IncrementalEngine.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 -> IncrementalEngine.position -> bool
type 'a lr1state = state
val number : 'a lr1state -> int
val production_index : production -> int
val find_production : int -> production
type element =
Element : 'a lr1state * 'a * IncrementalEngine.position *
IncrementalEngine.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 ->
IncrementalEngine.position * IncrementalEngine.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
val start : state -> Lexing.position -> semantic_value checkpoint
end
end
module ErrorReports :
sig
type 'a buffer
val wrap :
(Stdlib.Lexing.lexbuf -> 'token) ->
(Stdlib.Lexing.position * Stdlib.Lexing.position)
CamlinternalMenhirLib.ErrorReports.buffer *
(Stdlib.Lexing.lexbuf -> 'token)
val show :
('a -> string) ->
'a CamlinternalMenhirLib.ErrorReports.buffer -> string
val last : 'a CamlinternalMenhirLib.ErrorReports.buffer -> 'a
end
module Printers :
sig
module Make :
functor
(I : IncrementalEngine.EVERYTHING) (User : sig
val print :
string -> unit
val print_symbol :
I.xsymbol -> unit
val print_element :
(I.element -> unit)
option
end) ->
sig
val print_symbols : I.xsymbol list -> unit
val print_element_as_symbol : I.element -> unit
val print_stack : 'a I.env -> unit
val print_item : I.item -> unit
val print_production : I.production -> unit
val print_current_state : 'a I.env -> unit
val print_env : 'a I.env -> unit
end
end
module InfiniteArray :
sig
type 'a t
val make : 'a -> 'a CamlinternalMenhirLib.InfiniteArray.t
val get : 'a CamlinternalMenhirLib.InfiniteArray.t -> int -> 'a
val set : 'a CamlinternalMenhirLib.InfiniteArray.t -> int -> 'a -> unit
val extent : 'a CamlinternalMenhirLib.InfiniteArray.t -> int
val domain : 'a CamlinternalMenhirLib.InfiniteArray.t -> 'a array
end
module PackedIntArray :
sig
type t = int * string
val pack : int array -> CamlinternalMenhirLib.PackedIntArray.t
val get : CamlinternalMenhirLib.PackedIntArray.t -> int -> int
val get1 : string -> int -> int
val unflatten1 : int * string -> int -> int -> int
end
module RowDisplacement :
sig
type 'a table = int array * 'a array
val compress :
('a -> 'a -> bool) ->
('a -> bool) ->
'a ->
int ->
int ->
'a array array -> 'a CamlinternalMenhirLib.RowDisplacement.table
val get :
'a CamlinternalMenhirLib.RowDisplacement.table -> int -> int -> 'a
val getget :
('displacement -> int -> int) ->
('data -> int -> 'a) -> 'displacement * 'data -> int -> int -> 'a
end
module LinearizedArray :
sig
type 'a t = 'a array * int array
val make : 'a array array -> 'a CamlinternalMenhirLib.LinearizedArray.t
val read :
'a CamlinternalMenhirLib.LinearizedArray.t -> int -> int -> 'a
val write :
'a CamlinternalMenhirLib.LinearizedArray.t ->
int -> int -> 'a -> unit
val length : 'a CamlinternalMenhirLib.LinearizedArray.t -> int
val row_length :
'a CamlinternalMenhirLib.LinearizedArray.t -> int -> int
val read_row :
'a CamlinternalMenhirLib.LinearizedArray.t -> int -> 'a list
val row_length_via : (int -> int) -> int -> int
val read_via : (int -> 'a) -> (int -> int) -> int -> int -> 'a
val read_row_via : (int -> 'a) -> (int -> int) -> int -> 'a list
end
module TableFormat :
sig
module type TABLES =
sig
type token
val token2terminal :
CamlinternalMenhirLib.TableFormat.TABLES.token -> int
val error_terminal : int
val token2value :
CamlinternalMenhirLib.TableFormat.TABLES.token -> Stdlib.Obj.t
val default_reduction : CamlinternalMenhirLib.PackedIntArray.t
val error : int * string
val action :
CamlinternalMenhirLib.PackedIntArray.t *
CamlinternalMenhirLib.PackedIntArray.t
val lhs : CamlinternalMenhirLib.PackedIntArray.t
val goto :
CamlinternalMenhirLib.PackedIntArray.t *
CamlinternalMenhirLib.PackedIntArray.t
val start : int
val semantic_action :
((int, Stdlib.Obj.t,
CamlinternalMenhirLib.TableFormat.TABLES.token)
CamlinternalMenhirLib.EngineTypes.env ->
(int, Stdlib.Obj.t) CamlinternalMenhirLib.EngineTypes.stack)
array
exception Error
val trace : (string array * string array) option
end
end
module InspectionTableFormat :
sig
module type TABLES =
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
val terminal : int -> xsymbol
val nonterminal : int -> xsymbol
val rhs :
CamlinternalMenhirLib.PackedIntArray.t *
CamlinternalMenhirLib.PackedIntArray.t
val lr0_core : CamlinternalMenhirLib.PackedIntArray.t
val lr0_items :
CamlinternalMenhirLib.PackedIntArray.t *
CamlinternalMenhirLib.PackedIntArray.t
val lr0_incoming : CamlinternalMenhirLib.PackedIntArray.t
val nullable : string
val first : int * string
end
end
module InspectionTableInterpreter :
sig
module Symbols :
functor (T : sig type 'a terminal type 'a nonterminal end) ->
sig
type 'a symbol =
T : 'a T.terminal -> 'a symbol
| N : 'a T.nonterminal -> 'a symbol
type xsymbol = X : 'a symbol -> xsymbol
end
module Make :
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
end
module TableInterpreter :
sig
module MakeEngineTable :
functor (T : TableFormat.TABLES) ->
sig
type state = int
val number : state -> int
type token = T.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 = int
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
end
module StaticVersion : sig val require_20181113 : unit end
end