sig
module Structure :
sig
module type S =
sig
module Loc : Sig.Loc
module Token :
sig
module Loc :
sig
type t = Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool -> t
val to_tuple :
t -> string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move : [ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
type t
val to_string : t -> string
val print : Format.formatter -> t -> unit
val match_keyword : string -> t -> bool
val extract_string : t -> string
module Filter :
sig
type token_filter = (t, Loc.t) Sig.stream_filter
type t
val mk : (string -> bool) -> t
val define_filter :
t -> (token_filter -> token_filter) -> unit
val filter : t -> token_filter
val keyword_added : t -> string -> bool -> unit
val keyword_removed : t -> string -> unit
end
module Error : Sig.Error
end
module Lexer :
sig
module Loc :
sig
type t = Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool -> t
val to_tuple :
t -> string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move : [ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
module Token :
sig
module Loc :
sig
type t = Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool ->
t
val to_tuple :
t ->
string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move : [ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
type t = Token.t
val to_string : t -> string
val print : Format.formatter -> t -> unit
val match_keyword : string -> t -> bool
val extract_string : t -> string
module Filter :
sig
type token_filter = (t, Loc.t) Sig.stream_filter
type t = Token.Filter.t
val mk : (string -> bool) -> t
val define_filter :
t -> (token_filter -> token_filter) -> unit
val filter : t -> token_filter
val keyword_added : t -> string -> bool -> unit
val keyword_removed : t -> string -> unit
end
module Error :
sig
type t = Token.Error.t
exception E of t
val to_string : t -> string
val print : Format.formatter -> t -> unit
end
end
module Error : Sig.Error
val mk :
unit -> Loc.t -> char Stream.t -> (Token.t * Loc.t) Stream.t
end
module Action : Sig.Grammar.Action
type gram = {
gfilter : Camlp4.Struct.Grammar.Structure.S.Token.Filter.t;
gkeywords : (string, int Pervasives.ref) Hashtbl.t;
glexer :
Camlp4.Struct.Loc.t ->
char Stream.t ->
(Camlp4.Struct.Grammar.Structure.S.Token.t *
Camlp4.Struct.Loc.t)
Stream.t;
warning_verbose : bool Pervasives.ref;
error_verbose : bool Pervasives.ref;
}
type token_info = {
prev_loc : Camlp4.Struct.Loc.t;
cur_loc : Camlp4.Struct.Loc.t;
}
type token_stream =
(Camlp4.Struct.Grammar.Structure.S.Token.t *
Camlp4.Struct.Grammar.Structure.S.token_info)
Stream.t
type efun =
Camlp4.Struct.Grammar.Structure.S.token_stream -> Action.t
type token_pattern =
(Camlp4.Struct.Grammar.Structure.S.Token.t -> bool) * string
type internal_entry = {
egram : Camlp4.Struct.Grammar.Structure.S.gram;
ename : string;
mutable estart : int -> Camlp4.Struct.Grammar.Structure.S.efun;
mutable econtinue :
int ->
Camlp4.Struct.Loc.t ->
Action.t -> Camlp4.Struct.Grammar.Structure.S.efun;
mutable edesc : Camlp4.Struct.Grammar.Structure.S.desc;
}
and desc =
Dlevels of Camlp4.Struct.Grammar.Structure.S.level list
| Dparser of
(Camlp4.Struct.Grammar.Structure.S.token_stream -> Action.t)
and level = {
assoc : Camlp4.Sig.Grammar.assoc;
lname : string option;
lsuffix : Camlp4.Struct.Grammar.Structure.S.tree;
lprefix : Camlp4.Struct.Grammar.Structure.S.tree;
}
and symbol =
Smeta of string *
Camlp4.Struct.Grammar.Structure.S.symbol list * Action.t
| Snterm of Camlp4.Struct.Grammar.Structure.S.internal_entry
| Snterml of Camlp4.Struct.Grammar.Structure.S.internal_entry *
string
| Slist0 of Camlp4.Struct.Grammar.Structure.S.symbol
| Slist0sep of Camlp4.Struct.Grammar.Structure.S.symbol *
Camlp4.Struct.Grammar.Structure.S.symbol
| Slist1 of Camlp4.Struct.Grammar.Structure.S.symbol
| Slist1sep of Camlp4.Struct.Grammar.Structure.S.symbol *
Camlp4.Struct.Grammar.Structure.S.symbol
| Sopt of Camlp4.Struct.Grammar.Structure.S.symbol
| Stry of Camlp4.Struct.Grammar.Structure.S.symbol
| Sself
| Snext
| Stoken of Camlp4.Struct.Grammar.Structure.S.token_pattern
| Skeyword of string
| Stree of Camlp4.Struct.Grammar.Structure.S.tree
and tree =
Node of Camlp4.Struct.Grammar.Structure.S.node
| LocAct of Action.t * Action.t list
| DeadEnd
and node = {
node : Camlp4.Struct.Grammar.Structure.S.symbol;
son : Camlp4.Struct.Grammar.Structure.S.tree;
brother : Camlp4.Struct.Grammar.Structure.S.tree;
}
type production_rule =
Camlp4.Struct.Grammar.Structure.S.symbol list * Action.t
type single_extend_statment =
string option * Camlp4.Sig.Grammar.assoc option *
Camlp4.Struct.Grammar.Structure.S.production_rule list
type extend_statment =
Camlp4.Sig.Grammar.position option *
Camlp4.Struct.Grammar.Structure.S.single_extend_statment list
type delete_statment =
Camlp4.Struct.Grammar.Structure.S.symbol list
type ('a, 'b, 'c) fold =
Camlp4.Struct.Grammar.Structure.S.internal_entry ->
Camlp4.Struct.Grammar.Structure.S.symbol list ->
('a Stream.t -> 'b) -> 'a Stream.t -> 'c
type ('a, 'b, 'c) foldsep =
Camlp4.Struct.Grammar.Structure.S.internal_entry ->
Camlp4.Struct.Grammar.Structure.S.symbol list ->
('a Stream.t -> 'b) ->
('a Stream.t -> unit) -> 'a Stream.t -> 'c
val get_filter :
Camlp4.Struct.Grammar.Structure.S.gram ->
Camlp4.Struct.Grammar.Structure.S.Token.Filter.t
val using :
Camlp4.Struct.Grammar.Structure.S.gram -> string -> unit
val removing :
Camlp4.Struct.Grammar.Structure.S.gram -> string -> unit
end
module Make :
functor (Lexer : Sig.Lexer) ->
sig
module Loc :
sig
type t = Lexer.Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool -> t
val to_tuple :
t -> string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move : [ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
module Token :
sig
module Loc :
sig
type t = Lexer.Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool -> t
val to_tuple :
t -> string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move : [ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
type t = Lexer.Token.t
val to_string : t -> string
val print : Format.formatter -> t -> unit
val match_keyword : string -> t -> bool
val extract_string : t -> string
module Filter :
sig
type token_filter = (t, Loc.t) Sig.stream_filter
type t = Lexer.Token.Filter.t
val mk : (string -> bool) -> t
val define_filter :
t -> (token_filter -> token_filter) -> unit
val filter : t -> token_filter
val keyword_added : t -> string -> bool -> unit
val keyword_removed : t -> string -> unit
end
module Error :
sig
type t = Lexer.Token.Error.t
exception E of t
val to_string : t -> string
val print : Format.formatter -> t -> unit
end
end
module Action : Sig.Grammar.Action
module Lexer :
sig
module Loc :
sig
type t = Lexer.Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool -> t
val to_tuple :
t -> string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move : [ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
module Token :
sig
module Loc :
sig
type t = Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool ->
t
val to_tuple :
t ->
string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move :
[ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
type t = Lexer.Token.t
val to_string : t -> string
val print : Format.formatter -> t -> unit
val match_keyword : string -> t -> bool
val extract_string : t -> string
module Filter :
sig
type token_filter = (t, Loc.t) Sig.stream_filter
type t = Lexer.Token.Filter.t
val mk : (string -> bool) -> t
val define_filter :
t -> (token_filter -> token_filter) -> unit
val filter : t -> token_filter
val keyword_added : t -> string -> bool -> unit
val keyword_removed : t -> string -> unit
end
module Error :
sig
type t = Lexer.Token.Error.t
exception E of t
val to_string : t -> string
val print : Format.formatter -> t -> unit
end
end
module Error :
sig
type t = Lexer.Error.t
exception E of t
val to_string : t -> string
val print : Format.formatter -> t -> unit
end
val mk :
unit ->
Loc.t -> char Stream.t -> (Token.t * Loc.t) Stream.t
end
type gram = {
gfilter : Camlp4.Struct.Grammar.Structure.Make.Token.Filter.t;
gkeywords : (string, int Pervasives.ref) Hashtbl.t;
glexer :
Camlp4.Struct.Grammar.Structure.Make.Loc.t ->
char Stream.t ->
(Camlp4.Struct.Grammar.Structure.Make.Token.t *
Camlp4.Struct.Grammar.Structure.Make.Loc.t)
Stream.t;
warning_verbose : bool Pervasives.ref;
error_verbose : bool Pervasives.ref;
}
type token_info = {
prev_loc : Camlp4.Struct.Grammar.Structure.Make.Loc.t;
cur_loc : Camlp4.Struct.Grammar.Structure.Make.Loc.t;
}
type token_stream =
(Camlp4.Struct.Grammar.Structure.Make.Token.t *
Camlp4.Struct.Grammar.Structure.Make.token_info)
Stream.t
type efun =
Camlp4.Struct.Grammar.Structure.Make.token_stream -> Action.t
type token_pattern =
(Camlp4.Struct.Grammar.Structure.Make.Token.t -> bool) *
string
type internal_entry = {
egram : Camlp4.Struct.Grammar.Structure.Make.gram;
ename : string;
mutable estart :
int -> Camlp4.Struct.Grammar.Structure.Make.efun;
mutable econtinue :
int ->
Camlp4.Struct.Grammar.Structure.Make.Loc.t ->
Action.t -> Camlp4.Struct.Grammar.Structure.Make.efun;
mutable edesc : Camlp4.Struct.Grammar.Structure.Make.desc;
}
and desc =
Dlevels of Camlp4.Struct.Grammar.Structure.Make.level list
| Dparser of
(Camlp4.Struct.Grammar.Structure.Make.token_stream ->
Action.t)
and level = {
assoc : Camlp4.Sig.Grammar.assoc;
lname : string option;
lsuffix : Camlp4.Struct.Grammar.Structure.Make.tree;
lprefix : Camlp4.Struct.Grammar.Structure.Make.tree;
}
and symbol =
Smeta of string *
Camlp4.Struct.Grammar.Structure.Make.symbol list *
Action.t
| Snterm of Camlp4.Struct.Grammar.Structure.Make.internal_entry
| Snterml of
Camlp4.Struct.Grammar.Structure.Make.internal_entry *
string
| Slist0 of Camlp4.Struct.Grammar.Structure.Make.symbol
| Slist0sep of Camlp4.Struct.Grammar.Structure.Make.symbol *
Camlp4.Struct.Grammar.Structure.Make.symbol
| Slist1 of Camlp4.Struct.Grammar.Structure.Make.symbol
| Slist1sep of Camlp4.Struct.Grammar.Structure.Make.symbol *
Camlp4.Struct.Grammar.Structure.Make.symbol
| Sopt of Camlp4.Struct.Grammar.Structure.Make.symbol
| Stry of Camlp4.Struct.Grammar.Structure.Make.symbol
| Sself
| Snext
| Stoken of Camlp4.Struct.Grammar.Structure.Make.token_pattern
| Skeyword of string
| Stree of Camlp4.Struct.Grammar.Structure.Make.tree
and tree =
Node of Camlp4.Struct.Grammar.Structure.Make.node
| LocAct of Action.t * Action.t list
| DeadEnd
and node = {
node : Camlp4.Struct.Grammar.Structure.Make.symbol;
son : Camlp4.Struct.Grammar.Structure.Make.tree;
brother : Camlp4.Struct.Grammar.Structure.Make.tree;
}
type production_rule =
Camlp4.Struct.Grammar.Structure.Make.symbol list * Action.t
type single_extend_statment =
string option * Camlp4.Sig.Grammar.assoc option *
Camlp4.Struct.Grammar.Structure.Make.production_rule list
type extend_statment =
Camlp4.Sig.Grammar.position option *
Camlp4.Struct.Grammar.Structure.Make.single_extend_statment
list
type delete_statment =
Camlp4.Struct.Grammar.Structure.Make.symbol list
type ('a, 'b, 'c) fold =
Camlp4.Struct.Grammar.Structure.Make.internal_entry ->
Camlp4.Struct.Grammar.Structure.Make.symbol list ->
('a Stream.t -> 'b) -> 'a Stream.t -> 'c
type ('a, 'b, 'c) foldsep =
Camlp4.Struct.Grammar.Structure.Make.internal_entry ->
Camlp4.Struct.Grammar.Structure.Make.symbol list ->
('a Stream.t -> 'b) ->
('a Stream.t -> unit) -> 'a Stream.t -> 'c
val get_filter :
Camlp4.Struct.Grammar.Structure.Make.gram ->
Camlp4.Struct.Grammar.Structure.Make.Token.Filter.t
val token_location :
Camlp4.Struct.Grammar.Structure.Make.token_info ->
Camlp4.Struct.Grammar.Structure.Make.Loc.t
type 'a not_filtered = 'a
val using :
Camlp4.Struct.Grammar.Structure.Make.gram -> string -> unit
val removing :
Camlp4.Struct.Grammar.Structure.Make.gram -> string -> unit
end
end
module Search :
sig
module Make :
functor (Structure : Structure.S) ->
sig
val tree_in_entry :
Structure.symbol ->
Structure.tree -> Structure.desc -> Structure.tree
end
end
module Tools :
sig
module Make :
functor (Structure : Structure.S) ->
sig
val empty_entry : string -> 'a -> 'b
val stream_map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val is_level_labelled : string -> Structure.level -> bool
val warning_verbose : bool Pervasives.ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol * Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol : Structure.symbol -> Structure.symbol -> bool
end
end
module Print :
sig
module Make :
functor (Structure : Structure.S) ->
sig
val flatten_tree : Structure.tree -> Structure.symbol list list
val print_symbol : Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter -> string -> Structure.symbol list -> unit
val print_symbol1 : Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels : Format.formatter -> Structure.level list -> unit
val entry : Format.formatter -> Structure.internal_entry -> unit
end
module MakeDump :
functor (Structure : Structure.S) ->
sig
val print_symbol : Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter -> string -> Structure.symbol list -> unit
val print_symbol1 : Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels : Format.formatter -> Structure.level list -> unit
val entry : Format.formatter -> Structure.internal_entry -> unit
end
end
module Failed :
sig
module Make :
functor (Structure : Structure.S) ->
sig
module Tools :
sig
val empty_entry : string -> 'a -> 'b
val stream_map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val is_level_labelled : string -> Structure.level -> bool
val warning_verbose : bool ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol * Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol : Structure.symbol -> Structure.symbol -> bool
end
module Search :
sig
val tree_in_entry :
Structure.symbol ->
Structure.tree -> Structure.desc -> Structure.tree
end
module Print :
sig
val flatten_tree :
Structure.tree -> Structure.symbol list list
val print_symbol :
Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter -> string -> Structure.symbol list -> unit
val print_symbol1 :
Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels : Format.formatter -> Structure.level list -> unit
val entry :
Format.formatter -> Structure.internal_entry -> unit
end
val name_of_symbol :
Structure.internal_entry -> Structure.symbol -> string
val name_of_symbol_failed :
Structure.internal_entry -> Structure.symbol -> string
val name_of_tree_failed :
Structure.internal_entry -> Structure.tree -> string
val magic : 'a -> 'b -> 'c
val tree_failed :
Structure.internal_entry ->
'a -> Structure.symbol -> Structure.tree -> string
val symb_failed :
Structure.internal_entry ->
'a -> Structure.symbol -> Structure.symbol -> string
val symb_failed_txt :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> string
end
end
module Parser :
sig
module Make :
functor (Structure : Structure.S) ->
sig
module Tools :
sig
val empty_entry : string -> 'a -> 'b
val stream_map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val is_level_labelled : string -> Structure.level -> bool
val warning_verbose : bool ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol * Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol : Structure.symbol -> Structure.symbol -> bool
end
module Failed :
sig
module Tools :
sig
val empty_entry : string -> 'a -> 'b
val stream_map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val is_level_labelled : string -> Structure.level -> bool
val warning_verbose : bool ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol *
Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol :
Structure.symbol -> Structure.symbol -> bool
end
module Search :
sig
val tree_in_entry :
Structure.symbol ->
Structure.tree -> Structure.desc -> Structure.tree
end
module Print :
sig
val flatten_tree :
Structure.tree -> Structure.symbol list list
val print_symbol :
Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter ->
string -> Structure.symbol list -> unit
val print_symbol1 :
Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels :
Format.formatter -> Structure.level list -> unit
val entry :
Format.formatter -> Structure.internal_entry -> unit
end
val name_of_symbol :
Structure.internal_entry -> Structure.symbol -> string
val name_of_symbol_failed :
Structure.internal_entry -> Structure.symbol -> string
val name_of_tree_failed :
Structure.internal_entry -> Structure.tree -> string
val magic : 'a -> 'b -> 'c
val tree_failed :
Structure.internal_entry ->
'a -> Structure.symbol -> Structure.tree -> string
val symb_failed :
Structure.internal_entry ->
'a -> Structure.symbol -> Structure.symbol -> string
val symb_failed_txt :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> string
end
module Print :
sig
val flatten_tree :
Structure.tree -> Structure.symbol list list
val print_symbol :
Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter -> string -> Structure.symbol list -> unit
val print_symbol1 :
Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels : Format.formatter -> Structure.level list -> unit
val entry :
Format.formatter -> Structure.internal_entry -> unit
end
module StreamOrig :
sig
type 'a t = 'a Stream.t
exception Failure
exception Error of string
val from : (int -> 'a option) -> 'a t
val of_list : 'a list -> 'a t
val of_string : string -> char t
val of_channel : in_channel -> char t
val iter : ('a -> unit) -> 'a t -> unit
val next : 'a t -> 'a
val empty : 'a t -> unit
val peek : 'a t -> 'a option
val junk : 'a t -> unit
val count : 'a t -> int
val npeek : int -> 'a t -> 'a list
val iapp : 'a t -> 'a t -> 'a t
val icons : 'a -> 'a t -> 'a t
val ising : 'a -> 'a t
val lapp : (unit -> 'a t) -> 'a t -> 'a t
val lcons : (unit -> 'a) -> 'a t -> 'a t
val lsing : (unit -> 'a) -> 'a t
val sempty : 'a t
val slazy : (unit -> 'a t) -> 'a t
val dump : ('a -> unit) -> 'a t -> unit
end
val njunk : 'a Stream.t -> int -> unit
val loc_bp :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val loc_ep :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val add_loc :
Structure.Loc.t ->
(('a * Structure.token_info) Stream.t -> 'b) ->
('a * Structure.token_info) Stream.t -> 'b * Structure.Loc.t
val stream_peek_nth : 'a Stream.t -> int -> 'a option
module Stream :
sig
type 'a t = 'a Camlp4.Struct.Grammar.Parser.Make.StreamOrig.t
exception Failure
exception Error of string
val peek :
'a Camlp4.Struct.Grammar.Parser.Make.StreamOrig.t ->
'a option
val junk :
'a Camlp4.Struct.Grammar.Parser.Make.StreamOrig.t -> unit
val dup : 'a Stream.t -> 'a Stream.t
end
val try_parser :
('a Camlp4.Struct.Grammar.Parser.Make.Stream.t -> 'b) ->
'a Camlp4.Struct.Grammar.Parser.Make.Stream.t -> 'b
val level_number : Structure.internal_entry -> string -> int
val strict_parsing : bool Pervasives.ref
val strict_parsing_warning : bool Pervasives.ref
val top_symb :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol
val top_tree :
Structure.internal_entry -> Structure.tree -> Structure.tree
val entry_of_symb :
Structure.internal_entry ->
Structure.symbol -> Structure.internal_entry
val continue :
Structure.internal_entry ->
Structure.Loc.t ->
Structure.Action.t ->
Structure.symbol ->
Structure.tree ->
((Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t) ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val skip_if_empty :
Structure.Loc.t ->
('a * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val do_recover :
(Structure.internal_entry ->
'a ->
'b ->
Structure.tree ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t) ->
Structure.internal_entry ->
'a ->
'b ->
Structure.Loc.t ->
Structure.Action.t ->
Structure.symbol ->
Structure.tree ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val recover :
(Structure.internal_entry ->
'a ->
'b ->
Structure.tree ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t) ->
Structure.internal_entry ->
'a ->
'b ->
Structure.Loc.t ->
Structure.Action.t ->
Structure.symbol ->
Structure.tree ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val parser_of_tree :
Structure.internal_entry ->
int ->
int ->
Structure.tree ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val parser_cont :
((Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t) ->
Structure.internal_entry ->
int ->
int ->
Structure.symbol ->
Structure.tree ->
Structure.Loc.t ->
Structure.Action.t ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val parser_of_token_list :
(Structure.Loc.t ->
Structure.Action.t ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t) ->
Structure.symbol list ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val parser_of_symbol :
Structure.internal_entry ->
int ->
Structure.symbol ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val parse_top_symb :
Structure.internal_entry ->
Structure.symbol ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val start_parser_of_levels :
Structure.internal_entry ->
int ->
Structure.level list ->
int ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val start_parser_of_entry :
Structure.internal_entry ->
int ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val continue_parser_of_levels :
Structure.internal_entry ->
int ->
Structure.level list ->
int ->
Structure.Loc.t ->
'a ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
val continue_parser_of_entry :
Structure.internal_entry ->
int ->
Structure.Loc.t ->
Structure.Action.t ->
(Structure.Token.t * Structure.token_info)
Camlp4.Struct.Grammar.Parser.Make.Stream.t ->
Structure.Action.t
end
end
module Insert :
sig
module Make :
functor (Structure : Structure.S) ->
sig
module Tools :
sig
val empty_entry : string -> 'a -> 'b
val stream_map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val is_level_labelled : string -> Structure.level -> bool
val warning_verbose : bool ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol * Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol : Structure.symbol -> Structure.symbol -> bool
end
module Parser :
sig
module Tools :
sig
val empty_entry : string -> 'a -> 'b
val stream_map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val is_level_labelled : string -> Structure.level -> bool
val warning_verbose : bool ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol *
Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol :
Structure.symbol -> Structure.symbol -> bool
end
module Failed :
sig
module Tools :
sig
val empty_entry : string -> 'a -> 'b
val stream_map :
('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t ->
Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t ->
Structure.Loc.t
val is_level_labelled :
string -> Structure.level -> bool
val warning_verbose : bool ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol *
Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol :
Structure.symbol -> Structure.symbol -> bool
end
module Search :
sig
val tree_in_entry :
Structure.symbol ->
Structure.tree -> Structure.desc -> Structure.tree
end
module Print :
sig
val flatten_tree :
Structure.tree -> Structure.symbol list list
val print_symbol :
Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter ->
string -> Structure.symbol list -> unit
val print_symbol1 :
Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels :
Format.formatter -> Structure.level list -> unit
val entry :
Format.formatter ->
Structure.internal_entry -> unit
end
val name_of_symbol :
Structure.internal_entry -> Structure.symbol -> string
val name_of_symbol_failed :
Structure.internal_entry -> Structure.symbol -> string
val name_of_tree_failed :
Structure.internal_entry -> Structure.tree -> string
val magic : 'a -> 'b -> 'c
val tree_failed :
Structure.internal_entry ->
'a -> Structure.symbol -> Structure.tree -> string
val symb_failed :
Structure.internal_entry ->
'a -> Structure.symbol -> Structure.symbol -> string
val symb_failed_txt :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> string
end
module Print :
sig
val flatten_tree :
Structure.tree -> Structure.symbol list list
val print_symbol :
Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter ->
string -> Structure.symbol list -> unit
val print_symbol1 :
Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels :
Format.formatter -> Structure.level list -> unit
val entry :
Format.formatter -> Structure.internal_entry -> unit
end
module StreamOrig :
sig
type 'a t = 'a Stream.t
exception Failure
exception Error of string
val from : (int -> 'a option) -> 'a t
val of_list : 'a list -> 'a t
val of_string : string -> char t
val of_channel : in_channel -> char t
val iter : ('a -> unit) -> 'a t -> unit
val next : 'a t -> 'a
val empty : 'a t -> unit
val peek : 'a t -> 'a option
val junk : 'a t -> unit
val count : 'a t -> int
val npeek : int -> 'a t -> 'a list
val iapp : 'a t -> 'a t -> 'a t
val icons : 'a -> 'a t -> 'a t
val ising : 'a -> 'a t
val lapp : (unit -> 'a t) -> 'a t -> 'a t
val lcons : (unit -> 'a) -> 'a t -> 'a t
val lsing : (unit -> 'a) -> 'a t
val sempty : 'a t
val slazy : (unit -> 'a t) -> 'a t
val dump : ('a -> unit) -> 'a t -> unit
end
val njunk : 'a Stream.t -> int -> unit
val loc_bp :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val loc_ep :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val add_loc :
Structure.Loc.t ->
(('a * Structure.token_info) Stream.t -> 'b) ->
('a * Structure.token_info) Stream.t ->
'b * Structure.Loc.t
val stream_peek_nth : 'a Stream.t -> int -> 'a option
module Stream :
sig
type 'a t = 'a StreamOrig.t
exception Failure
exception Error of string
val peek : 'a StreamOrig.t -> 'a option
val junk : 'a StreamOrig.t -> unit
val dup : 'a Stream.t -> 'a Stream.t
end
val try_parser : ('a Stream.t -> 'b) -> 'a Stream.t -> 'b
val level_number : Structure.internal_entry -> string -> int
val strict_parsing : bool ref
val strict_parsing_warning : bool ref
val top_symb :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol
val top_tree :
Structure.internal_entry ->
Structure.tree -> Structure.tree
val entry_of_symb :
Structure.internal_entry ->
Structure.symbol -> Structure.internal_entry
val continue :
Structure.internal_entry ->
Structure.Loc.t ->
Structure.Action.t ->
Structure.symbol ->
Structure.tree ->
((Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t) ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val skip_if_empty :
Structure.Loc.t ->
('a * Structure.token_info) Stream.t -> Structure.Action.t
val do_recover :
(Structure.internal_entry ->
'a ->
'b ->
Structure.tree ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t) ->
Structure.internal_entry ->
'a ->
'b ->
Structure.Loc.t ->
Structure.Action.t ->
Structure.symbol ->
Structure.tree ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val recover :
(Structure.internal_entry ->
'a ->
'b ->
Structure.tree ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t) ->
Structure.internal_entry ->
'a ->
'b ->
Structure.Loc.t ->
Structure.Action.t ->
Structure.symbol ->
Structure.tree ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val parser_of_tree :
Structure.internal_entry ->
int ->
int ->
Structure.tree ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val parser_cont :
((Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t) ->
Structure.internal_entry ->
int ->
int ->
Structure.symbol ->
Structure.tree ->
Structure.Loc.t ->
Structure.Action.t ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val parser_of_token_list :
(Structure.Loc.t ->
Structure.Action.t ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t) ->
Structure.symbol list ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val parser_of_symbol :
Structure.internal_entry ->
int ->
Structure.symbol ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val parse_top_symb :
Structure.internal_entry ->
Structure.symbol ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val start_parser_of_levels :
Structure.internal_entry ->
int ->
Structure.level list ->
int ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val start_parser_of_entry :
Structure.internal_entry ->
int ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val continue_parser_of_levels :
Structure.internal_entry ->
int ->
Structure.level list ->
int ->
Structure.Loc.t ->
'a ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val continue_parser_of_entry :
Structure.internal_entry ->
int ->
Structure.Loc.t ->
Structure.Action.t ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
end
val is_before : Structure.symbol -> Structure.symbol -> bool
val derive_eps : Structure.symbol -> bool
val tree_derive_eps : Structure.tree -> bool
val empty_lev :
string option ->
Camlp4.Sig.Grammar.assoc option -> Structure.level
val change_lev :
Structure.internal_entry ->
Structure.level ->
string ->
string option ->
Camlp4.Sig.Grammar.assoc option -> Structure.level
val change_to_self :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol
val get_level :
Structure.internal_entry ->
Camlp4.Sig.Grammar.position option ->
Structure.level list ->
Structure.level list *
(string option ->
Camlp4.Sig.Grammar.assoc option -> Structure.level) *
Structure.level list
val check_gram :
Structure.internal_entry -> Structure.symbol -> unit
val tree_check_gram :
Structure.internal_entry -> Structure.tree -> unit
val get_initial :
Structure.symbol list -> bool * Structure.symbol list
val insert_tokens :
Structure.gram -> Structure.symbol list -> unit
val insert_tree :
Structure.internal_entry ->
Structure.symbol list ->
Structure.Action.t -> Structure.tree -> Structure.tree
val insert_level :
Structure.internal_entry ->
bool ->
Structure.symbol list ->
Structure.Action.t -> Structure.level -> Structure.level
val levels_of_rules :
Structure.internal_entry ->
Camlp4.Sig.Grammar.position option ->
(string option * Camlp4.Sig.Grammar.assoc option *
(Structure.symbol list * Structure.Action.t) list)
list -> Structure.level list
val extend :
Structure.internal_entry ->
Camlp4.Sig.Grammar.position option *
(string option * Camlp4.Sig.Grammar.assoc option *
(Structure.symbol list * Structure.Action.t) list)
list -> unit
end
end
module Delete :
sig
module Make :
functor (Structure : Structure.S) ->
sig
module Tools :
sig
val empty_entry : string -> 'a -> 'b
val stream_map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val is_level_labelled : string -> Structure.level -> bool
val warning_verbose : bool ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol * Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol : Structure.symbol -> Structure.symbol -> bool
end
module Parser :
sig
module Tools :
sig
val empty_entry : string -> 'a -> 'b
val stream_map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val is_level_labelled : string -> Structure.level -> bool
val warning_verbose : bool ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol *
Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol :
Structure.symbol -> Structure.symbol -> bool
end
module Failed :
sig
module Tools :
sig
val empty_entry : string -> 'a -> 'b
val stream_map :
('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t ->
Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t ->
Structure.Loc.t
val is_level_labelled :
string -> Structure.level -> bool
val warning_verbose : bool ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol *
Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol :
Structure.symbol -> Structure.symbol -> bool
end
module Search :
sig
val tree_in_entry :
Structure.symbol ->
Structure.tree -> Structure.desc -> Structure.tree
end
module Print :
sig
val flatten_tree :
Structure.tree -> Structure.symbol list list
val print_symbol :
Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter ->
string -> Structure.symbol list -> unit
val print_symbol1 :
Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels :
Format.formatter -> Structure.level list -> unit
val entry :
Format.formatter ->
Structure.internal_entry -> unit
end
val name_of_symbol :
Structure.internal_entry -> Structure.symbol -> string
val name_of_symbol_failed :
Structure.internal_entry -> Structure.symbol -> string
val name_of_tree_failed :
Structure.internal_entry -> Structure.tree -> string
val magic : 'a -> 'b -> 'c
val tree_failed :
Structure.internal_entry ->
'a -> Structure.symbol -> Structure.tree -> string
val symb_failed :
Structure.internal_entry ->
'a -> Structure.symbol -> Structure.symbol -> string
val symb_failed_txt :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> string
end
module Print :
sig
val flatten_tree :
Structure.tree -> Structure.symbol list list
val print_symbol :
Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter ->
string -> Structure.symbol list -> unit
val print_symbol1 :
Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels :
Format.formatter -> Structure.level list -> unit
val entry :
Format.formatter -> Structure.internal_entry -> unit
end
module StreamOrig :
sig
type 'a t = 'a Stream.t
exception Failure
exception Error of string
val from : (int -> 'a option) -> 'a t
val of_list : 'a list -> 'a t
val of_string : string -> char t
val of_channel : in_channel -> char t
val iter : ('a -> unit) -> 'a t -> unit
val next : 'a t -> 'a
val empty : 'a t -> unit
val peek : 'a t -> 'a option
val junk : 'a t -> unit
val count : 'a t -> int
val npeek : int -> 'a t -> 'a list
val iapp : 'a t -> 'a t -> 'a t
val icons : 'a -> 'a t -> 'a t
val ising : 'a -> 'a t
val lapp : (unit -> 'a t) -> 'a t -> 'a t
val lcons : (unit -> 'a) -> 'a t -> 'a t
val lsing : (unit -> 'a) -> 'a t
val sempty : 'a t
val slazy : (unit -> 'a t) -> 'a t
val dump : ('a -> unit) -> 'a t -> unit
end
val njunk : 'a Stream.t -> int -> unit
val loc_bp :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val loc_ep :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val add_loc :
Structure.Loc.t ->
(('a * Structure.token_info) Stream.t -> 'b) ->
('a * Structure.token_info) Stream.t ->
'b * Structure.Loc.t
val stream_peek_nth : 'a Stream.t -> int -> 'a option
module Stream :
sig
type 'a t = 'a StreamOrig.t
exception Failure
exception Error of string
val peek : 'a StreamOrig.t -> 'a option
val junk : 'a StreamOrig.t -> unit
val dup : 'a Stream.t -> 'a Stream.t
end
val try_parser : ('a Stream.t -> 'b) -> 'a Stream.t -> 'b
val level_number : Structure.internal_entry -> string -> int
val strict_parsing : bool ref
val strict_parsing_warning : bool ref
val top_symb :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol
val top_tree :
Structure.internal_entry ->
Structure.tree -> Structure.tree
val entry_of_symb :
Structure.internal_entry ->
Structure.symbol -> Structure.internal_entry
val continue :
Structure.internal_entry ->
Structure.Loc.t ->
Structure.Action.t ->
Structure.symbol ->
Structure.tree ->
((Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t) ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val skip_if_empty :
Structure.Loc.t ->
('a * Structure.token_info) Stream.t -> Structure.Action.t
val do_recover :
(Structure.internal_entry ->
'a ->
'b ->
Structure.tree ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t) ->
Structure.internal_entry ->
'a ->
'b ->
Structure.Loc.t ->
Structure.Action.t ->
Structure.symbol ->
Structure.tree ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val recover :
(Structure.internal_entry ->
'a ->
'b ->
Structure.tree ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t) ->
Structure.internal_entry ->
'a ->
'b ->
Structure.Loc.t ->
Structure.Action.t ->
Structure.symbol ->
Structure.tree ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val parser_of_tree :
Structure.internal_entry ->
int ->
int ->
Structure.tree ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val parser_cont :
((Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t) ->
Structure.internal_entry ->
int ->
int ->
Structure.symbol ->
Structure.tree ->
Structure.Loc.t ->
Structure.Action.t ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val parser_of_token_list :
(Structure.Loc.t ->
Structure.Action.t ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t) ->
Structure.symbol list ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val parser_of_symbol :
Structure.internal_entry ->
int ->
Structure.symbol ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val parse_top_symb :
Structure.internal_entry ->
Structure.symbol ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val start_parser_of_levels :
Structure.internal_entry ->
int ->
Structure.level list ->
int ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val start_parser_of_entry :
Structure.internal_entry ->
int ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val continue_parser_of_levels :
Structure.internal_entry ->
int ->
Structure.level list ->
int ->
Structure.Loc.t ->
'a ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
val continue_parser_of_entry :
Structure.internal_entry ->
int ->
Structure.Loc.t ->
Structure.Action.t ->
(Structure.Token.t * Structure.token_info) Stream.t ->
Structure.Action.t
end
val delete_rule_in_tree :
Structure.internal_entry ->
Structure.symbol list ->
Structure.tree ->
(Structure.symbol list option * Structure.tree) option
val decr_keyw_use : Structure.gram -> Structure.symbol -> unit
val decr_keyw_use_in_tree :
Structure.gram -> Structure.tree -> unit
val delete_rule_in_suffix :
Structure.internal_entry ->
Structure.symbol list ->
Structure.level list -> Structure.level list
val delete_rule_in_prefix :
Structure.internal_entry ->
Structure.symbol list ->
Structure.level list -> Structure.level list
val delete_rule_in_level_list :
Structure.internal_entry ->
Structure.symbol list ->
Structure.level list -> Structure.level list
val delete_rule :
Structure.internal_entry -> Structure.symbol list -> unit
end
end
module Fold :
sig
module Make :
functor (Structure : Structure.S) ->
sig
val sfold0 :
('a -> 'b -> 'b) -> 'b -> ('c, 'a, 'b) Structure.fold
val sfold1 :
('a -> 'b -> 'b) -> 'b -> ('c, 'a, 'b) Structure.fold
val sfold0sep :
('a -> 'b -> 'b) -> 'b -> ('c, 'a, 'b) Structure.foldsep
end
end
module Entry :
sig
module Make :
functor (Structure : Structure.S) ->
sig
module Dump :
sig
val print_symbol :
Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter -> string -> Structure.symbol list -> unit
val print_symbol1 :
Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels : Format.formatter -> Structure.level list -> unit
val entry :
Format.formatter -> Structure.internal_entry -> unit
end
module Print :
sig
val flatten_tree :
Structure.tree -> Structure.symbol list list
val print_symbol :
Format.formatter -> Structure.symbol -> unit
val print_meta :
Format.formatter -> string -> Structure.symbol list -> unit
val print_symbol1 :
Format.formatter -> Structure.symbol -> unit
val print_rule :
Format.formatter -> Structure.symbol list -> unit
val print_level :
Format.formatter ->
(Format.formatter -> unit -> unit) ->
Structure.symbol list list -> unit
val levels : Format.formatter -> Structure.level list -> unit
val entry :
Format.formatter -> Structure.internal_entry -> unit
end
module Tools :
sig
val empty_entry : string -> 'a -> 'b
val stream_map : ('a -> 'b) -> 'a Stream.t -> 'b Stream.t
val keep_prev_loc :
('a * Structure.Loc.t) Stream.t ->
('a * Structure.token_info) Stream.t
val drop_prev_loc :
('a * Structure.token_info) Stream.t ->
('a * Structure.Loc.t) Stream.t
val get_cur_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val get_prev_loc :
('a * Structure.token_info) Stream.t -> Structure.Loc.t
val is_level_labelled : string -> Structure.level -> bool
val warning_verbose : bool ref
val get_token_list :
'a ->
Structure.symbol list ->
Structure.symbol ->
Structure.tree ->
(Structure.symbol list * Structure.symbol * Structure.tree)
option
val is_antiquot : string -> bool
val eq_Stoken_ids : string -> string -> bool
val logically_eq_symbols :
Structure.internal_entry ->
Structure.symbol -> Structure.symbol -> bool
val eq_symbol : Structure.symbol -> Structure.symbol -> bool
end
type 'a t = Structure.internal_entry
val name : Structure.internal_entry -> string
val print : Format.formatter -> Structure.internal_entry -> unit
val dump : Format.formatter -> Structure.internal_entry -> unit
val mk : Structure.gram -> string -> Structure.internal_entry
val action_parse :
Structure.internal_entry ->
Structure.token_stream -> Structure.Action.t
val lex :
Structure.internal_entry ->
Structure.Loc.t ->
char Stream.t -> (Structure.Token.t * Structure.Loc.t) Stream.t
val lex_string :
Structure.internal_entry ->
Structure.Loc.t ->
string -> (Structure.Token.t * Structure.Loc.t) Stream.t
val filter :
Structure.internal_entry ->
(Structure.Token.t * Structure.Token.Loc.t) Stream.t ->
(Structure.Token.t * Structure.token_info) Stream.t
val parse_tokens_after_filter :
Structure.internal_entry -> Structure.token_stream -> 'a
val parse_tokens_before_filter :
Structure.internal_entry ->
(Structure.Token.t * Structure.Token.Loc.t) Stream.t -> 'a
val parse :
Structure.internal_entry ->
Structure.Loc.t -> char Stream.t -> 'a
val parse_string :
Structure.internal_entry -> Structure.Loc.t -> string -> 'a
val of_parser :
Structure.gram ->
string ->
(Structure.token_stream -> 'a) ->
'a Camlp4.Struct.Grammar.Entry.Make.t
val setup_parser :
Structure.internal_entry ->
(Structure.token_stream -> 'a) -> unit
val clear : Structure.internal_entry -> unit
val obj : 'a -> 'a
end
end
module Static :
sig
val uncurry : ('a -> 'b -> 'c) -> 'a * 'b -> 'c
val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
module Make :
functor (Lexer : Sig.Lexer) ->
sig
module Loc :
sig
type t = Lexer.Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool -> t
val to_tuple :
t -> string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move : [ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
module Action : Sig.Grammar.Action
module Token :
sig
module Loc :
sig
type t = Lexer.Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool -> t
val to_tuple :
t -> string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move : [ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
type t = Lexer.Token.t
val to_string : t -> string
val print : Format.formatter -> t -> unit
val match_keyword : string -> t -> bool
val extract_string : t -> string
module Filter :
sig
type token_filter = (t, Loc.t) Sig.stream_filter
type t = Lexer.Token.Filter.t
val mk : (string -> bool) -> t
val define_filter :
t -> (token_filter -> token_filter) -> unit
val filter : t -> token_filter
val keyword_added : t -> string -> bool -> unit
val keyword_removed : t -> string -> unit
end
module Error :
sig
type t = Lexer.Token.Error.t
exception E of t
val to_string : t -> string
val print : Format.formatter -> t -> unit
end
end
type gram
type internal_entry
type tree
type token_pattern = (Token.t -> bool) * string
type token_info
type token_stream = (Token.t * token_info) Stream.t
val token_location : token_info -> Loc.t
type symbol =
Smeta of string * symbol list * Action.t
| Snterm of internal_entry
| Snterml of internal_entry * string
| Slist0 of symbol
| Slist0sep of symbol * symbol
| Slist1 of symbol
| Slist1sep of symbol * symbol
| Sopt of symbol
| Stry of symbol
| Sself
| Snext
| Stoken of token_pattern
| Skeyword of string
| Stree of tree
type production_rule = symbol list * Action.t
type single_extend_statment =
string option * Sig.Grammar.assoc option *
production_rule list
type extend_statment =
Sig.Grammar.position option * single_extend_statment list
type delete_statment = symbol list
type ('a, 'b, 'c) fold =
internal_entry ->
symbol list -> ('a Stream.t -> 'b) -> 'a Stream.t -> 'c
type ('a, 'b, 'c) foldsep =
internal_entry ->
symbol list ->
('a Stream.t -> 'b) ->
('a Stream.t -> unit) -> 'a Stream.t -> 'c
module Entry :
sig
type 'a t
val mk : string -> 'a t
val of_parser : string -> (token_stream -> 'a) -> 'a t
val setup_parser : 'a t -> (token_stream -> 'a) -> unit
val name : 'a t -> string
val print : Format.formatter -> 'a t -> unit
val dump : Format.formatter -> 'a t -> unit
val obj : 'a t -> internal_entry
val clear : 'a t -> unit
end
val get_filter : unit -> Token.Filter.t
type 'a not_filtered
val extend : 'a Entry.t -> extend_statment -> unit
val delete_rule : 'a Entry.t -> delete_statment -> unit
val srules :
'a Entry.t -> (symbol list * Action.t) list -> symbol
val sfold0 : ('a -> 'b -> 'b) -> 'b -> ('c, 'a, 'b) fold
val sfold1 : ('a -> 'b -> 'b) -> 'b -> ('c, 'a, 'b) fold
val sfold0sep : ('a -> 'b -> 'b) -> 'b -> ('c, 'a, 'b) foldsep
val lex :
Loc.t ->
char Stream.t -> (Token.t * Loc.t) Stream.t not_filtered
val lex_string :
Loc.t -> string -> (Token.t * Loc.t) Stream.t not_filtered
val filter :
(Token.t * Loc.t) Stream.t not_filtered -> token_stream
val parse : 'a Entry.t -> Loc.t -> char Stream.t -> 'a
val parse_string : 'a Entry.t -> Loc.t -> string -> 'a
val parse_tokens_before_filter :
'a Entry.t -> (Token.t * Loc.t) Stream.t not_filtered -> 'a
val parse_tokens_after_filter : 'a Entry.t -> token_stream -> 'a
end
end
module Dynamic :
sig
module Make :
functor (Lexer : Sig.Lexer) ->
sig
module Loc :
sig
type t = Lexer.Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool -> t
val to_tuple :
t -> string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move : [ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
module Action : Sig.Grammar.Action
module Token :
sig
module Loc :
sig
type t = Lexer.Loc.t
val mk : string -> t
val ghost : t
val of_lexing_position : Lexing.position -> t
val to_ocaml_location : t -> Camlp4_import.Location.t
val of_ocaml_location : Camlp4_import.Location.t -> t
val of_lexbuf : Lexing.lexbuf -> t
val of_tuple :
string * int * int * int * int * int * int * bool -> t
val to_tuple :
t -> string * int * int * int * int * int * int * bool
val merge : t -> t -> t
val join : t -> t
val move : [ `both | `start | `stop ] -> int -> t -> t
val shift : int -> t -> t
val move_line : int -> t -> t
val file_name : t -> string
val start_line : t -> int
val stop_line : t -> int
val start_bol : t -> int
val stop_bol : t -> int
val start_off : t -> int
val stop_off : t -> int
val start_pos : t -> Lexing.position
val stop_pos : t -> Lexing.position
val is_ghost : t -> bool
val ghostify : t -> t
val set_file_name : string -> t -> t
val strictly_before : t -> t -> bool
val make_absolute : t -> t
val print : Format.formatter -> t -> unit
val dump : Format.formatter -> t -> unit
val to_string : t -> string
exception Exc_located of t * exn
val raise : t -> exn -> 'a
val name : string ref
end
type t = Lexer.Token.t
val to_string : t -> string
val print : Format.formatter -> t -> unit
val match_keyword : string -> t -> bool
val extract_string : t -> string
module Filter :
sig
type token_filter = (t, Loc.t) Sig.stream_filter
type t = Lexer.Token.Filter.t
val mk : (string -> bool) -> t
val define_filter :
t -> (token_filter -> token_filter) -> unit
val filter : t -> token_filter
val keyword_added : t -> string -> bool -> unit
val keyword_removed : t -> string -> unit
end
module Error :
sig
type t = Lexer.Token.Error.t
exception E of t
val to_string : t -> string
val print : Format.formatter -> t -> unit
end
end
type gram
type internal_entry
type tree
type token_pattern = (Token.t -> bool) * string
type token_info
type token_stream = (Token.t * token_info) Stream.t
val token_location : token_info -> Loc.t
type symbol =
Smeta of string * symbol list * Action.t
| Snterm of internal_entry
| Snterml of internal_entry * string
| Slist0 of symbol
| Slist0sep of symbol * symbol
| Slist1 of symbol
| Slist1sep of symbol * symbol
| Sopt of symbol
| Stry of symbol
| Sself
| Snext
| Stoken of token_pattern
| Skeyword of string
| Stree of tree
type production_rule = symbol list * Action.t
type single_extend_statment =
string option * Sig.Grammar.assoc option *
production_rule list
type extend_statment =
Sig.Grammar.position option * single_extend_statment list
type delete_statment = symbol list
type ('a, 'b, 'c) fold =
internal_entry ->
symbol list -> ('a Stream.t -> 'b) -> 'a Stream.t -> 'c
type ('a, 'b, 'c) foldsep =
internal_entry ->
symbol list ->
('a Stream.t -> 'b) ->
('a Stream.t -> unit) -> 'a Stream.t -> 'c
val mk : unit -> gram
module Entry :
sig
type 'a t
val mk : gram -> string -> 'a t
val of_parser :
gram -> string -> (token_stream -> 'a) -> 'a t
val setup_parser : 'a t -> (token_stream -> 'a) -> unit
val name : 'a t -> string
val print : Format.formatter -> 'a t -> unit
val dump : Format.formatter -> 'a t -> unit
val obj : 'a t -> internal_entry
val clear : 'a t -> unit
end
val get_filter : gram -> Token.Filter.t
type 'a not_filtered
val extend : 'a Entry.t -> extend_statment -> unit
val delete_rule : 'a Entry.t -> delete_statment -> unit
val srules :
'a Entry.t -> (symbol list * Action.t) list -> symbol
val sfold0 : ('a -> 'b -> 'b) -> 'b -> ('c, 'a, 'b) fold
val sfold1 : ('a -> 'b -> 'b) -> 'b -> ('c, 'a, 'b) fold
val sfold0sep : ('a -> 'b -> 'b) -> 'b -> ('c, 'a, 'b) foldsep
val lex :
gram ->
Loc.t ->
char Stream.t -> (Token.t * Loc.t) Stream.t not_filtered
val lex_string :
gram ->
Loc.t -> string -> (Token.t * Loc.t) Stream.t not_filtered
val filter :
gram -> (Token.t * Loc.t) Stream.t not_filtered -> token_stream
val parse : 'a Entry.t -> Loc.t -> char Stream.t -> 'a
val parse_string : 'a Entry.t -> Loc.t -> string -> 'a
val parse_tokens_before_filter :
'a Entry.t -> (Token.t * Loc.t) Stream.t not_filtered -> 'a
val parse_tokens_after_filter : 'a Entry.t -> token_stream -> 'a
end
end
end