• en

Module MenhirLib

module InfiniteArray : sig
type 'a t
val make : 'a -> 'a t
make x creates an infinite array, where every slot contains x. *
val get : 'a t -> int -> 'a
get a i returns the element contained at offset i in the array a. Slots are numbered 0 and up. *
val set : 'a t -> int -> 'a -> unit
set a i x sets the element contained at offset i in the array a to x. Slots are numbered 0 and up. *
val extent : 'a t -> int
extent a is the length of an initial segment of the array a that is sufficiently large to contain all set operations ever performed. In other words, all elements beyond that segment have the default value.
val domain : 'a t -> 'a array
domain a is a fresh copy of an initial segment of the array a whose length is extent a.
end
module PackedIntArray : sig
type t = (int * string)
val pack : int array -> t
val get : t -> int -> int
val get1 : string -> 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 table
val get : 'a table -> int -> int -> 'a
val getget : 'displacement -> int -> int -> 'data -> int -> 'a -> ('displacement * 'data) -> int -> int -> 'a
end
module EngineTypes : sig
type ('state, 'semantic_value) stack = {
state : 'state;
semv : 'semantic_value;
startp : Lexing.position;
next : ('state, 'semantic_value) stack;
}
type ('state, 'semantic_value, 'token) env = {
lexer : Lexing.lexbuf -> 'token;
lexbuf : Lexing.lexbuf;
token : 'token;
shifted : int;
previouserror : int;
stack : ('state, 'semantic_value) stack;
current : 'state;
}
module type TABLE = sig
type state
type token
type terminal
type semantic_value
val token2terminal : token -> terminal
val token2value : token -> semantic_value
val error_terminal : terminal
val error_value : semantic_value
type 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 : state -> production -> state
exception Accept of semantic_value
exception Error
type semantic_action = (state, semantic_value, token) env -> unit
val semantic_action : production -> semantic_action
val recovery : bool
module Log : sig
val state : state -> unit
val shift : terminal -> state -> unit
val reduce_or_accept : production -> unit
val lookahead_token : Lexing.lexbuf -> terminal -> unit
val initiating_error_handling : unit -> unit
val resuming_error_handling : unit -> unit
val handling_error : state -> unit
val discarding_last_token : terminal -> unit
end
end
module type ENGINE = sig
type state
type token
type semantic_value
exception Error
val entry : state -> Lexing.lexbuf -> token -> Lexing.lexbuf -> semantic_value
end
end
module Engine : sig
TODO: functor:menhir.20130912/menhirLib/MenhirLib.Engine.Make
end
module TableFormat : sig
module type TABLES = sig
type token
val token2terminal : token -> int
val error_terminal : int
val token2value : token -> Obj.t
val default_reduction : PackedIntArray.t
val error : (int * string)
val action : (PackedIntArray.t * PackedIntArray.t)
val lhs : PackedIntArray.t
val goto : (PackedIntArray.t * PackedIntArray.t)
val semantic_action : (int, Obj.t, token) EngineTypes.env -> unit array
exception Error
val recovery : bool
val trace : (string array * string array) option
end
end
module TableInterpreter : sig
exception Accept of Obj.t
TODO: functor:menhir.20130912/menhirLib/MenhirLib.TableInterpreter.Make
end
module Convert : sig
type ('token, 'semantic_value) traditional = Lexing.lexbuf -> 'token -> Lexing.lexbuf -> 'semantic_value
type ('token, 'semantic_value) revised = unit -> 'token -> 'semantic_value
val traditional2revised : 'token -> 'raw_token -> 'token -> Lexing.position -> 'token -> Lexing.position -> ('raw_token, 'semantic_value) traditional -> ('token, 'semantic_value) revised
val revised2traditional : 'raw_token -> Lexing.position -> Lexing.position -> 'token -> ('token, 'semantic_value) revised -> ('raw_token, 'semantic_value) traditional
module Simplified : sig
val traditional2revised : ('token, 'semantic_value) traditional -> (('token * Lexing.position * Lexing.position), 'semantic_value) revised
val revised2traditional : (('token * Lexing.position * Lexing.position), 'semantic_value) revised -> ('token, 'semantic_value) traditional
end
end