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
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 initiating_error_handling : unit -> unit
val resuming_error_handling : unit -> unit
val handling_error : state -> unit
val discarding_last_token : terminal -> unit
end
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 default_reduction : PackedIntArray.t
val error : (int * string)
val action : (PackedIntArray.t * PackedIntArray.t)
val lhs : PackedIntArray.t
val goto : (PackedIntArray.t * PackedIntArray.t)
exception Error
val recovery : bool
val trace : (string array * string array) option
end
end
module Convert : sig
type ('token, 'semantic_value) revised = unit -> 'token -> 'semantic_value
module Simplified : sig
end
end