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