sig
module Loc :
sig
type 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 Make :
functor (Loc : Sig.Loc) ->
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 = Sig.camlp4_token
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 Eval :
sig
val char : string -> char
val string : ?strict:unit -> string -> string
end
end
module Lexer :
sig
module TokenEval :
sig
val char : string -> char
val string : ?strict:unit -> string -> string
end
module Make :
functor (Token : Sig.Camlp4Token) ->
sig
module Loc :
sig
type t = Token.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 = Token.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 = Sig.camlp4_token
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
type t =
Illegal_character of char
| Illegal_escape of string
| Unterminated_comment
| Unterminated_string
| Unterminated_quotation
| Unterminated_antiquot
| Unterminated_string_in_comment
| Comment_start
| Comment_not_end
| Literal_overflow of string
exception E of Camlp4.Struct.Lexer.Make.Error.t
val print :
Format.formatter ->
Camlp4.Struct.Lexer.Make.Error.t -> unit
val to_string : Camlp4.Struct.Lexer.Make.Error.t -> string
end
type context = {
loc : Camlp4.Struct.Lexer.Make.Loc.t;
in_comment : bool;
quotations : bool;
antiquots : bool;
lexbuf : Lexing.lexbuf;
buffer : Buffer.t;
}
val default_context :
Lexing.lexbuf -> Camlp4.Struct.Lexer.Make.context
val store : Camlp4.Struct.Lexer.Make.context -> unit
val istore_char : Camlp4.Struct.Lexer.Make.context -> int -> unit
val buff_contents : Camlp4.Struct.Lexer.Make.context -> string
val loc :
Camlp4.Struct.Lexer.Make.context ->
Camlp4.Struct.Lexer.Make.Loc.t
val quotations : Camlp4.Struct.Lexer.Make.context -> bool
val antiquots : Camlp4.Struct.Lexer.Make.context -> bool
val is_in_comment : Camlp4.Struct.Lexer.Make.context -> bool
val in_comment :
Camlp4.Struct.Lexer.Make.context ->
Camlp4.Struct.Lexer.Make.context
val set_start_p : Camlp4.Struct.Lexer.Make.context -> unit
val move_start_p :
int -> Camlp4.Struct.Lexer.Make.context -> unit
val update_loc : context -> context
val with_curr_loc :
(Camlp4.Struct.Lexer.Make.context -> Lexing.lexbuf -> 'a) ->
Camlp4.Struct.Lexer.Make.context -> 'a
val parse_nested :
(Camlp4.Struct.Lexer.Make.context -> Lexing.lexbuf -> 'a) ->
Camlp4.Struct.Lexer.Make.context -> string
val shift :
int ->
Camlp4.Struct.Lexer.Make.context ->
Camlp4.Struct.Lexer.Make.context
val store_parse :
(Camlp4.Struct.Lexer.Make.context -> Lexing.lexbuf -> 'a) ->
Camlp4.Struct.Lexer.Make.context -> 'a
val parse :
(Camlp4.Struct.Lexer.Make.context -> Lexing.lexbuf -> 'a) ->
Camlp4.Struct.Lexer.Make.context -> 'a
val mk_quotation :
(Camlp4.Struct.Lexer.Make.context -> Lexing.lexbuf -> 'a) ->
Camlp4.Struct.Lexer.Make.context ->
string -> string -> int -> Camlp4.Sig.camlp4_token
val update_loc :
Camlp4.Struct.Lexer.Make.context ->
string option -> int -> bool -> int -> unit
val err :
Camlp4.Struct.Lexer.Make.Error.t ->
Camlp4.Struct.Lexer.Make.Loc.t -> 'a
val warn :
Camlp4.Struct.Lexer.Make.Error.t ->
Camlp4.Struct.Lexer.Make.Loc.t -> unit
val __ocaml_lex_tables : Lexing.lex_tables
val token :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> Camlp4.Sig.camlp4_token
val __ocaml_lex_token_rec :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> int -> Camlp4.Sig.camlp4_token
val comment :
Camlp4.Struct.Lexer.Make.context -> Lexing.lexbuf -> unit
val __ocaml_lex_comment_rec :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> int -> unit
val string :
Camlp4.Struct.Lexer.Make.context -> Lexing.lexbuf -> unit
val __ocaml_lex_string_rec :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> int -> unit
val symbolchar_star :
string ->
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> Camlp4.Sig.camlp4_token
val __ocaml_lex_symbolchar_star_rec :
string ->
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> int -> Camlp4.Sig.camlp4_token
val maybe_quotation_at :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> Camlp4.Sig.camlp4_token
val __ocaml_lex_maybe_quotation_at_rec :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> int -> Camlp4.Sig.camlp4_token
val maybe_quotation_colon :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> Camlp4.Sig.camlp4_token
val __ocaml_lex_maybe_quotation_colon_rec :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> int -> Camlp4.Sig.camlp4_token
val quotation :
Camlp4.Struct.Lexer.Make.context -> Lexing.lexbuf -> unit
val __ocaml_lex_quotation_rec :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> int -> unit
val dollar :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> Camlp4.Sig.camlp4_token
val __ocaml_lex_dollar_rec :
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> int -> Camlp4.Sig.camlp4_token
val antiquot :
string ->
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> Camlp4.Sig.camlp4_token
val __ocaml_lex_antiquot_rec :
string ->
Camlp4.Struct.Lexer.Make.context ->
Lexing.lexbuf -> int -> Camlp4.Sig.camlp4_token
val lexing_store : char Stream.t -> string -> int -> int
val from_context :
Camlp4.Struct.Lexer.Make.context ->
(Camlp4.Sig.camlp4_token * Camlp4.Struct.Lexer.Make.Loc.t)
Stream.t
val from_lexbuf :
?quotations:bool ->
Lexing.lexbuf ->
(Camlp4.Sig.camlp4_token * Camlp4.Struct.Lexer.Make.Loc.t)
Stream.t
val setup_loc :
Lexing.lexbuf -> Camlp4.Struct.Lexer.Make.Loc.t -> unit
val from_string :
?quotations:bool ->
Camlp4.Struct.Lexer.Make.Loc.t ->
string ->
(Camlp4.Sig.camlp4_token * Camlp4.Struct.Lexer.Make.Loc.t)
Stream.t
val from_stream :
?quotations:bool ->
Camlp4.Struct.Lexer.Make.Loc.t ->
char Stream.t ->
(Camlp4.Sig.camlp4_token * Camlp4.Struct.Lexer.Make.Loc.t)
Stream.t
val mk :
unit ->
Camlp4.Struct.Lexer.Make.Loc.t ->
char Stream.t ->
(Camlp4.Sig.camlp4_token * Camlp4.Struct.Lexer.Make.Loc.t)
Stream.t
end
end
module Camlp4Ast :
sig
module Make :
functor (Loc : Sig.Loc) ->
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 loc = Loc.t
and meta_bool = BTrue | BFalse | BAnt of string
and rec_flag = ReRecursive | ReNil | ReAnt of string
and direction_flag = DiTo | DiDownto | DiAnt of string
and mutable_flag = MuMutable | MuNil | MuAnt of string
and private_flag = PrPrivate | PrNil | PrAnt of string
and virtual_flag = ViVirtual | ViNil | ViAnt of string
and override_flag = OvOverride | OvNil | OvAnt of string
and row_var_flag = RvRowVar | RvNil | RvAnt of string
and 'a meta_option = ONone | OSome of 'a | OAnt of string
and 'a meta_list =
LNil
| LCons of 'a * 'a meta_list
| LAnt of string
and ident =
IdAcc of loc * ident * ident
| IdApp of loc * ident * ident
| IdLid of loc * string
| IdUid of loc * string
| IdAnt of loc * string
and ctyp =
TyNil of loc
| TyAli of loc * ctyp * ctyp
| TyAny of loc
| TyApp of loc * ctyp * ctyp
| TyArr of loc * ctyp * ctyp
| TyCls of loc * ident
| TyLab of loc * string * ctyp
| TyId of loc * ident
| TyMan of loc * ctyp * ctyp
| TyDcl of loc * string * ctyp list * ctyp * (ctyp * ctyp) list
| TyObj of loc * ctyp * row_var_flag
| TyOlb of loc * string * ctyp
| TyPol of loc * ctyp * ctyp
| TyQuo of loc * string
| TyQuP of loc * string
| TyQuM of loc * string
| TyVrn of loc * string
| TyRec of loc * ctyp
| TyCol of loc * ctyp * ctyp
| TySem of loc * ctyp * ctyp
| TyCom of loc * ctyp * ctyp
| TySum of loc * ctyp
| TyOf of loc * ctyp * ctyp
| TyAnd of loc * ctyp * ctyp
| TyOr of loc * ctyp * ctyp
| TyPrv of loc * ctyp
| TyMut of loc * ctyp
| TyTup of loc * ctyp
| TySta of loc * ctyp * ctyp
| TyVrnEq of loc * ctyp
| TyVrnSup of loc * ctyp
| TyVrnInf of loc * ctyp
| TyVrnInfSup of loc * ctyp * ctyp
| TyAmp of loc * ctyp * ctyp
| TyOfAmp of loc * ctyp * ctyp
| TyPkg of loc * module_type
| TyAnt of loc * string
and patt =
PaNil of loc
| PaId of loc * ident
| PaAli of loc * patt * patt
| PaAnt of loc * string
| PaAny of loc
| PaApp of loc * patt * patt
| PaArr of loc * patt
| PaCom of loc * patt * patt
| PaSem of loc * patt * patt
| PaChr of loc * string
| PaInt of loc * string
| PaInt32 of loc * string
| PaInt64 of loc * string
| PaNativeInt of loc * string
| PaFlo of loc * string
| PaLab of loc * string * patt
| PaOlb of loc * string * patt
| PaOlbi of loc * string * patt * expr
| PaOrp of loc * patt * patt
| PaRng of loc * patt * patt
| PaRec of loc * patt
| PaEq of loc * ident * patt
| PaStr of loc * string
| PaTup of loc * patt
| PaTyc of loc * patt * ctyp
| PaTyp of loc * ident
| PaVrn of loc * string
| PaLaz of loc * patt
and expr =
ExNil of loc
| ExId of loc * ident
| ExAcc of loc * expr * expr
| ExAnt of loc * string
| ExApp of loc * expr * expr
| ExAre of loc * expr * expr
| ExArr of loc * expr
| ExSem of loc * expr * expr
| ExAsf of loc
| ExAsr of loc * expr
| ExAss of loc * expr * expr
| ExChr of loc * string
| ExCoe of loc * expr * ctyp * ctyp
| ExFlo of loc * string
| ExFor of loc * string * expr * expr * direction_flag * expr
| ExFun of loc * match_case
| ExIfe of loc * expr * expr * expr
| ExInt of loc * string
| ExInt32 of loc * string
| ExInt64 of loc * string
| ExNativeInt of loc * string
| ExLab of loc * string * expr
| ExLaz of loc * expr
| ExLet of loc * rec_flag * binding * expr
| ExLmd of loc * string * module_expr * expr
| ExMat of loc * expr * match_case
| ExNew of loc * ident
| ExObj of loc * patt * class_str_item
| ExOlb of loc * string * expr
| ExOvr of loc * rec_binding
| ExRec of loc * rec_binding * expr
| ExSeq of loc * expr
| ExSnd of loc * expr * string
| ExSte of loc * expr * expr
| ExStr of loc * string
| ExTry of loc * expr * match_case
| ExTup of loc * expr
| ExCom of loc * expr * expr
| ExTyc of loc * expr * ctyp
| ExVrn of loc * string
| ExWhi of loc * expr * expr
| ExOpI of loc * ident * expr
| ExFUN of loc * string * expr
| ExPkg of loc * module_expr
and module_type =
MtNil of loc
| MtId of loc * ident
| MtFun of loc * string * module_type * module_type
| MtQuo of loc * string
| MtSig of loc * sig_item
| MtWit of loc * module_type * with_constr
| MtAnt of loc * string
and sig_item =
SgNil of loc
| SgCls of loc * class_type
| SgClt of loc * class_type
| SgSem of loc * sig_item * sig_item
| SgDir of loc * string * expr
| SgExc of loc * ctyp
| SgExt of loc * string * ctyp * string meta_list
| SgInc of loc * module_type
| SgMod of loc * string * module_type
| SgRecMod of loc * module_binding
| SgMty of loc * string * module_type
| SgOpn of loc * ident
| SgTyp of loc * ctyp
| SgVal of loc * string * ctyp
| SgAnt of loc * string
and with_constr =
WcNil of loc
| WcTyp of loc * ctyp * ctyp
| WcMod of loc * ident * ident
| WcTyS of loc * ctyp * ctyp
| WcMoS of loc * ident * ident
| WcAnd of loc * with_constr * with_constr
| WcAnt of loc * string
and binding =
BiNil of loc
| BiAnd of loc * binding * binding
| BiEq of loc * patt * expr
| BiAnt of loc * string
and rec_binding =
RbNil of loc
| RbSem of loc * rec_binding * rec_binding
| RbEq of loc * ident * expr
| RbAnt of loc * string
and module_binding =
MbNil of loc
| MbAnd of loc * module_binding * module_binding
| MbColEq of loc * string * module_type * module_expr
| MbCol of loc * string * module_type
| MbAnt of loc * string
and match_case =
McNil of loc
| McOr of loc * match_case * match_case
| McArr of loc * patt * expr * expr
| McAnt of loc * string
and module_expr =
MeNil of loc
| MeId of loc * ident
| MeApp of loc * module_expr * module_expr
| MeFun of loc * string * module_type * module_expr
| MeStr of loc * str_item
| MeTyc of loc * module_expr * module_type
| MePkg of loc * expr
| MeAnt of loc * string
and str_item =
StNil of loc
| StCls of loc * class_expr
| StClt of loc * class_type
| StSem of loc * str_item * str_item
| StDir of loc * string * expr
| StExc of loc * ctyp * ident meta_option
| StExp of loc * expr
| StExt of loc * string * ctyp * string meta_list
| StInc of loc * module_expr
| StMod of loc * string * module_expr
| StRecMod of loc * module_binding
| StMty of loc * string * module_type
| StOpn of loc * ident
| StTyp of loc * ctyp
| StVal of loc * rec_flag * binding
| StAnt of loc * string
and class_type =
CtNil of loc
| CtCon of loc * virtual_flag * ident * ctyp
| CtFun of loc * ctyp * class_type
| CtSig of loc * ctyp * class_sig_item
| CtAnd of loc * class_type * class_type
| CtCol of loc * class_type * class_type
| CtEq of loc * class_type * class_type
| CtAnt of loc * string
and class_sig_item =
CgNil of loc
| CgCtr of loc * ctyp * ctyp
| CgSem of loc * class_sig_item * class_sig_item
| CgInh of loc * class_type
| CgMth of loc * string * private_flag * ctyp
| CgVal of loc * string * mutable_flag * virtual_flag * ctyp
| CgVir of loc * string * private_flag * ctyp
| CgAnt of loc * string
and class_expr =
CeNil of loc
| CeApp of loc * class_expr * expr
| CeCon of loc * virtual_flag * ident * ctyp
| CeFun of loc * patt * class_expr
| CeLet of loc * rec_flag * binding * class_expr
| CeStr of loc * patt * class_str_item
| CeTyc of loc * class_expr * class_type
| CeAnd of loc * class_expr * class_expr
| CeEq of loc * class_expr * class_expr
| CeAnt of loc * string
and class_str_item =
CrNil of loc
| CrSem of loc * class_str_item * class_str_item
| CrCtr of loc * ctyp * ctyp
| CrInh of loc * override_flag * class_expr * string
| CrIni of loc * expr
| CrMth of loc * string * override_flag * private_flag *
expr * ctyp
| CrVal of loc * string * override_flag * mutable_flag * expr
| CrVir of loc * string * private_flag * ctyp
| CrVvr of loc * string * mutable_flag * ctyp
| CrAnt of loc * string
val loc_of_ctyp : ctyp -> loc
val loc_of_patt : patt -> loc
val loc_of_expr : expr -> loc
val loc_of_module_type : module_type -> loc
val loc_of_module_expr : module_expr -> loc
val loc_of_sig_item : sig_item -> loc
val loc_of_str_item : str_item -> loc
val loc_of_class_type : class_type -> loc
val loc_of_class_sig_item : class_sig_item -> loc
val loc_of_class_expr : class_expr -> loc
val loc_of_class_str_item : class_str_item -> loc
val loc_of_with_constr : with_constr -> loc
val loc_of_binding : binding -> loc
val loc_of_rec_binding : rec_binding -> loc
val loc_of_module_binding : module_binding -> loc
val loc_of_match_case : match_case -> loc
val loc_of_ident : ident -> loc
module Meta :
sig
module type META_LOC =
sig
val meta_loc_patt : loc -> loc -> patt
val meta_loc_expr : loc -> loc -> expr
end
module MetaLoc :
sig
val meta_loc_patt : loc -> loc -> patt
val meta_loc_expr : loc -> loc -> expr
end
module MetaGhostLoc :
sig
val meta_loc_patt : loc -> 'a -> patt
val meta_loc_expr : loc -> 'a -> expr
end
module MetaLocVar :
sig
val meta_loc_patt : loc -> 'a -> patt
val meta_loc_expr : loc -> 'a -> expr
end
module Make :
functor (MetaLoc : META_LOC) ->
sig
module Expr :
sig
val meta_string : loc -> string -> expr
val meta_int : loc -> string -> expr
val meta_float : loc -> string -> expr
val meta_char : loc -> string -> expr
val meta_bool : loc -> bool -> expr
val meta_list :
(loc -> 'a -> expr) -> loc -> 'a list -> expr
val meta_binding : loc -> binding -> expr
val meta_rec_binding : loc -> rec_binding -> expr
val meta_class_expr : loc -> class_expr -> expr
val meta_class_sig_item :
loc -> class_sig_item -> expr
val meta_class_str_item :
loc -> class_str_item -> expr
val meta_class_type : loc -> class_type -> expr
val meta_ctyp : loc -> ctyp -> expr
val meta_expr : loc -> expr -> expr
val meta_ident : loc -> ident -> expr
val meta_match_case : loc -> match_case -> expr
val meta_module_binding :
loc -> module_binding -> expr
val meta_module_expr : loc -> module_expr -> expr
val meta_module_type : loc -> module_type -> expr
val meta_patt : loc -> patt -> expr
val meta_sig_item : loc -> sig_item -> expr
val meta_str_item : loc -> str_item -> expr
val meta_with_constr : loc -> with_constr -> expr
val meta_rec_flag : loc -> rec_flag -> expr
val meta_mutable_flag : loc -> mutable_flag -> expr
val meta_virtual_flag : loc -> virtual_flag -> expr
val meta_private_flag : loc -> private_flag -> expr
val meta_row_var_flag : loc -> row_var_flag -> expr
val meta_override_flag :
loc -> override_flag -> expr
val meta_direction_flag :
loc -> direction_flag -> expr
end
module Patt :
sig
val meta_string : loc -> string -> patt
val meta_int : loc -> string -> patt
val meta_float : loc -> string -> patt
val meta_char : loc -> string -> patt
val meta_bool : loc -> bool -> patt
val meta_list :
(loc -> 'a -> patt) -> loc -> 'a list -> patt
val meta_binding : loc -> binding -> patt
val meta_rec_binding : loc -> rec_binding -> patt
val meta_class_expr : loc -> class_expr -> patt
val meta_class_sig_item :
loc -> class_sig_item -> patt
val meta_class_str_item :
loc -> class_str_item -> patt
val meta_class_type : loc -> class_type -> patt
val meta_ctyp : loc -> ctyp -> patt
val meta_expr : loc -> expr -> patt
val meta_ident : loc -> ident -> patt
val meta_match_case : loc -> match_case -> patt
val meta_module_binding :
loc -> module_binding -> patt
val meta_module_expr : loc -> module_expr -> patt
val meta_module_type : loc -> module_type -> patt
val meta_patt : loc -> patt -> patt
val meta_sig_item : loc -> sig_item -> patt
val meta_str_item : loc -> str_item -> patt
val meta_with_constr : loc -> with_constr -> patt
val meta_rec_flag : loc -> rec_flag -> patt
val meta_mutable_flag : loc -> mutable_flag -> patt
val meta_virtual_flag : loc -> virtual_flag -> patt
val meta_private_flag : loc -> private_flag -> patt
val meta_row_var_flag : loc -> row_var_flag -> patt
val meta_override_flag :
loc -> override_flag -> patt
val meta_direction_flag :
loc -> direction_flag -> patt
end
end
end
class map :
object ('a)
method binding : binding -> binding
method class_expr : class_expr -> class_expr
method class_sig_item : class_sig_item -> class_sig_item
method class_str_item : class_str_item -> class_str_item
method class_type : class_type -> class_type
method ctyp : ctyp -> ctyp
method direction_flag : direction_flag -> direction_flag
method expr : expr -> expr
method ident : ident -> ident
method list : ('a -> 'b -> 'c) -> 'b list -> 'c list
method loc : loc -> loc
method match_case : match_case -> match_case
method meta_bool : meta_bool -> meta_bool
method meta_list :
('a -> 'd -> 'e) -> 'd meta_list -> 'e meta_list
method meta_option :
('a -> 'f -> 'g) -> 'f meta_option -> 'g meta_option
method module_binding : module_binding -> module_binding
method module_expr : module_expr -> module_expr
method module_type : module_type -> module_type
method mutable_flag : mutable_flag -> mutable_flag
method override_flag : override_flag -> override_flag
method patt : patt -> patt
method private_flag : private_flag -> private_flag
method rec_binding : rec_binding -> rec_binding
method rec_flag : rec_flag -> rec_flag
method row_var_flag : row_var_flag -> row_var_flag
method sig_item : sig_item -> sig_item
method str_item : str_item -> str_item
method string : string -> string
method unknown : 'h -> 'h
method virtual_flag : virtual_flag -> virtual_flag
method with_constr : with_constr -> with_constr
end
class fold :
object ('a)
method binding : binding -> 'a
method class_expr : class_expr -> 'a
method class_sig_item : class_sig_item -> 'a
method class_str_item : class_str_item -> 'a
method class_type : class_type -> 'a
method ctyp : ctyp -> 'a
method direction_flag : direction_flag -> 'a
method expr : expr -> 'a
method ident : ident -> 'a
method list : ('a -> 'b -> 'a) -> 'b list -> 'a
method loc : loc -> 'a
method match_case : match_case -> 'a
method meta_bool : meta_bool -> 'a
method meta_list : ('a -> 'c -> 'a) -> 'c meta_list -> 'a
method meta_option : ('a -> 'd -> 'a) -> 'd meta_option -> 'a
method module_binding : module_binding -> 'a
method module_expr : module_expr -> 'a
method module_type : module_type -> 'a
method mutable_flag : mutable_flag -> 'a
method override_flag : override_flag -> 'a
method patt : patt -> 'a
method private_flag : private_flag -> 'a
method rec_binding : rec_binding -> 'a
method rec_flag : rec_flag -> 'a
method row_var_flag : row_var_flag -> 'a
method sig_item : sig_item -> 'a
method str_item : str_item -> 'a
method string : string -> 'a
method unknown : 'e -> 'a
method virtual_flag : virtual_flag -> 'a
method with_constr : with_constr -> 'a
end
val map_expr : (expr -> expr) -> map
val map_patt : (patt -> patt) -> map
val map_ctyp : (ctyp -> ctyp) -> map
val map_str_item : (str_item -> str_item) -> map
val map_sig_item : (sig_item -> sig_item) -> map
val map_loc : (loc -> loc) -> map
val ident_of_expr : expr -> ident
val ident_of_patt : patt -> ident
val ident_of_ctyp : ctyp -> ident
val biAnd_of_list : binding list -> binding
val rbSem_of_list : rec_binding list -> rec_binding
val paSem_of_list : patt list -> patt
val paCom_of_list : patt list -> patt
val tyOr_of_list : ctyp list -> ctyp
val tyAnd_of_list : ctyp list -> ctyp
val tyAmp_of_list : ctyp list -> ctyp
val tySem_of_list : ctyp list -> ctyp
val tyCom_of_list : ctyp list -> ctyp
val tySta_of_list : ctyp list -> ctyp
val stSem_of_list : str_item list -> str_item
val sgSem_of_list : sig_item list -> sig_item
val crSem_of_list : class_str_item list -> class_str_item
val cgSem_of_list : class_sig_item list -> class_sig_item
val ctAnd_of_list : class_type list -> class_type
val ceAnd_of_list : class_expr list -> class_expr
val wcAnd_of_list : with_constr list -> with_constr
val meApp_of_list : module_expr list -> module_expr
val mbAnd_of_list : module_binding list -> module_binding
val mcOr_of_list : match_case list -> match_case
val idAcc_of_list : ident list -> ident
val idApp_of_list : ident list -> ident
val exSem_of_list : expr list -> expr
val exCom_of_list : expr list -> expr
val list_of_ctyp : ctyp -> ctyp list -> ctyp list
val list_of_binding : binding -> binding list -> binding list
val list_of_rec_binding :
rec_binding -> rec_binding list -> rec_binding list
val list_of_with_constr :
with_constr -> with_constr list -> with_constr list
val list_of_patt : patt -> patt list -> patt list
val list_of_expr : expr -> expr list -> expr list
val list_of_str_item : str_item -> str_item list -> str_item list
val list_of_sig_item : sig_item -> sig_item list -> sig_item list
val list_of_class_sig_item :
class_sig_item -> class_sig_item list -> class_sig_item list
val list_of_class_str_item :
class_str_item -> class_str_item list -> class_str_item list
val list_of_class_type :
class_type -> class_type list -> class_type list
val list_of_class_expr :
class_expr -> class_expr list -> class_expr list
val list_of_module_expr :
module_expr -> module_expr list -> module_expr list
val list_of_module_binding :
module_binding -> module_binding list -> module_binding list
val list_of_match_case :
match_case -> match_case list -> match_case list
val list_of_ident : ident -> ident list -> ident list
val safe_string_escaped : string -> string
val is_irrefut_patt : patt -> bool
val is_constructor : ident -> bool
val is_patt_constructor : patt -> bool
val is_expr_constructor : expr -> bool
val ty_of_stl : Loc.t * string * ctyp list -> ctyp
val ty_of_sbt : Loc.t * string * bool * ctyp -> ctyp
val bi_of_pe : patt * expr -> binding
val pel_of_binding : binding -> (patt * expr) list
val binding_of_pel : (patt * expr) list -> binding
val sum_type_of_list : (Loc.t * string * ctyp list) list -> ctyp
val record_type_of_list :
(Loc.t * string * bool * ctyp) list -> ctyp
end
end
module DynAst :
sig
module Make :
functor (Ast : Sig.Ast) ->
sig
module Ast :
sig
type loc = Ast.loc
type meta_bool = Ast.meta_bool
type 'a meta_option = 'a Ast.meta_option
type 'a meta_list = 'a Ast.meta_list
type ctyp = Ast.ctyp
type patt = Ast.patt
type expr = Ast.expr
type module_type = Ast.module_type
type sig_item = Ast.sig_item
type with_constr = Ast.with_constr
type module_expr = Ast.module_expr
type str_item = Ast.str_item
type class_type = Ast.class_type
type class_sig_item = Ast.class_sig_item
type class_expr = Ast.class_expr
type class_str_item = Ast.class_str_item
type match_case = Ast.match_case
type ident = Ast.ident
type binding = Ast.binding
type rec_binding = Ast.rec_binding
type module_binding = Ast.module_binding
type rec_flag = Ast.rec_flag
type direction_flag = Ast.direction_flag
type mutable_flag = Ast.mutable_flag
type private_flag = Ast.private_flag
type virtual_flag = Ast.virtual_flag
type row_var_flag = Ast.row_var_flag
type override_flag = Ast.override_flag
val loc_of_ctyp : ctyp -> loc
val loc_of_patt : patt -> loc
val loc_of_expr : expr -> loc
val loc_of_module_type : module_type -> loc
val loc_of_module_expr : module_expr -> loc
val loc_of_sig_item : sig_item -> loc
val loc_of_str_item : str_item -> loc
val loc_of_class_type : class_type -> loc
val loc_of_class_sig_item : class_sig_item -> loc
val loc_of_class_expr : class_expr -> loc
val loc_of_class_str_item : class_str_item -> loc
val loc_of_with_constr : with_constr -> loc
val loc_of_binding : binding -> loc
val loc_of_rec_binding : rec_binding -> loc
val loc_of_module_binding : module_binding -> loc
val loc_of_match_case : match_case -> loc
val loc_of_ident : ident -> loc
class map :
object ('a)
method binding : binding -> binding
method class_expr : class_expr -> class_expr
method class_sig_item : class_sig_item -> class_sig_item
method class_str_item : class_str_item -> class_str_item
method class_type : class_type -> class_type
method ctyp : ctyp -> ctyp
method direction_flag : direction_flag -> direction_flag
method expr : expr -> expr
method ident : ident -> ident
method list : ('a -> 'b -> 'c) -> 'b list -> 'c list
method loc : loc -> loc
method match_case : match_case -> match_case
method meta_bool : meta_bool -> meta_bool
method meta_list :
('a -> 'd -> 'e) -> 'd meta_list -> 'e meta_list
method meta_option :
('a -> 'f -> 'g) -> 'f meta_option -> 'g meta_option
method module_binding : module_binding -> module_binding
method module_expr : module_expr -> module_expr
method module_type : module_type -> module_type
method mutable_flag : mutable_flag -> mutable_flag
method override_flag : override_flag -> override_flag
method patt : patt -> patt
method private_flag : private_flag -> private_flag
method rec_binding : rec_binding -> rec_binding
method rec_flag : rec_flag -> rec_flag
method row_var_flag : row_var_flag -> row_var_flag
method sig_item : sig_item -> sig_item
method str_item : str_item -> str_item
method string : string -> string
method unknown : 'h -> 'h
method virtual_flag : virtual_flag -> virtual_flag
method with_constr : with_constr -> with_constr
end
class fold :
object ('a)
method binding : binding -> 'a
method class_expr : class_expr -> 'a
method class_sig_item : class_sig_item -> 'a
method class_str_item : class_str_item -> 'a
method class_type : class_type -> 'a
method ctyp : ctyp -> 'a
method direction_flag : direction_flag -> 'a
method expr : expr -> 'a
method ident : ident -> 'a
method list : ('a -> 'b -> 'a) -> 'b list -> 'a
method loc : loc -> 'a
method match_case : match_case -> 'a
method meta_bool : meta_bool -> 'a
method meta_list : ('a -> 'c -> 'a) -> 'c meta_list -> 'a
method meta_option :
('a -> 'd -> 'a) -> 'd meta_option -> 'a
method module_binding : module_binding -> 'a
method module_expr : module_expr -> 'a
method module_type : module_type -> 'a
method mutable_flag : mutable_flag -> 'a
method override_flag : override_flag -> 'a
method patt : patt -> 'a
method private_flag : private_flag -> 'a
method rec_binding : rec_binding -> 'a
method rec_flag : rec_flag -> 'a
method row_var_flag : row_var_flag -> 'a
method sig_item : sig_item -> 'a
method str_item : str_item -> 'a
method string : string -> 'a
method unknown : 'e -> 'a
method virtual_flag : virtual_flag -> 'a
method with_constr : with_constr -> 'a
end
end
type 'a tag
val ctyp_tag : Ast.ctyp tag
val patt_tag : Ast.patt tag
val expr_tag : Ast.expr tag
val module_type_tag : Ast.module_type tag
val sig_item_tag : Ast.sig_item tag
val with_constr_tag : Ast.with_constr tag
val module_expr_tag : Ast.module_expr tag
val str_item_tag : Ast.str_item tag
val class_type_tag : Ast.class_type tag
val class_sig_item_tag : Ast.class_sig_item tag
val class_expr_tag : Ast.class_expr tag
val class_str_item_tag : Ast.class_str_item tag
val match_case_tag : Ast.match_case tag
val ident_tag : Ast.ident tag
val binding_tag : Ast.binding tag
val rec_binding_tag : Ast.rec_binding tag
val module_binding_tag : Ast.module_binding tag
val string_of_tag : 'a tag -> string
module Pack :
functor (X : sig type 'a t end) ->
sig
type pack
val pack : 'a tag -> 'a X.t -> pack
val unpack : 'a tag -> pack -> 'a X.t
val print_tag : Format.formatter -> pack -> unit
end
end
end
module Quotation :
sig
module Make :
functor (Ast : Sig.Camlp4Ast) ->
sig
module Ast :
sig
module Loc :
sig
type t = Ast.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 loc = Loc.t
and meta_bool =
Ast.meta_bool =
BTrue
| BFalse
| BAnt of string
and rec_flag =
Ast.rec_flag =
ReRecursive
| ReNil
| ReAnt of string
and direction_flag =
Ast.direction_flag =
DiTo
| DiDownto
| DiAnt of string
and mutable_flag =
Ast.mutable_flag =
MuMutable
| MuNil
| MuAnt of string
and private_flag =
Ast.private_flag =
PrPrivate
| PrNil
| PrAnt of string
and virtual_flag =
Ast.virtual_flag =
ViVirtual
| ViNil
| ViAnt of string
and override_flag =
Ast.override_flag =
OvOverride
| OvNil
| OvAnt of string
and row_var_flag =
Ast.row_var_flag =
RvRowVar
| RvNil
| RvAnt of string
and 'a meta_option =
'a Ast.meta_option =
ONone
| OSome of 'a
| OAnt of string
and 'a meta_list =
'a Ast.meta_list =
LNil
| LCons of 'a * 'a meta_list
| LAnt of string
and ident =
Ast.ident =
IdAcc of loc * ident * ident
| IdApp of loc * ident * ident
| IdLid of loc * string
| IdUid of loc * string
| IdAnt of loc * string
and ctyp =
Ast.ctyp =
TyNil of loc
| TyAli of loc * ctyp * ctyp
| TyAny of loc
| TyApp of loc * ctyp * ctyp
| TyArr of loc * ctyp * ctyp
| TyCls of loc * ident
| TyLab of loc * string * ctyp
| TyId of loc * ident
| TyMan of loc * ctyp * ctyp
| TyDcl of loc * string * ctyp list * ctyp *
(ctyp * ctyp) list
| TyObj of loc * ctyp * row_var_flag
| TyOlb of loc * string * ctyp
| TyPol of loc * ctyp * ctyp
| TyQuo of loc * string
| TyQuP of loc * string
| TyQuM of loc * string
| TyVrn of loc * string
| TyRec of loc * ctyp
| TyCol of loc * ctyp * ctyp
| TySem of loc * ctyp * ctyp
| TyCom of loc * ctyp * ctyp
| TySum of loc * ctyp
| TyOf of loc * ctyp * ctyp
| TyAnd of loc * ctyp * ctyp
| TyOr of loc * ctyp * ctyp
| TyPrv of loc * ctyp
| TyMut of loc * ctyp
| TyTup of loc * ctyp
| TySta of loc * ctyp * ctyp
| TyVrnEq of loc * ctyp
| TyVrnSup of loc * ctyp
| TyVrnInf of loc * ctyp
| TyVrnInfSup of loc * ctyp * ctyp
| TyAmp of loc * ctyp * ctyp
| TyOfAmp of loc * ctyp * ctyp
| TyPkg of loc * module_type
| TyAnt of loc * string
and patt =
Ast.patt =
PaNil of loc
| PaId of loc * ident
| PaAli of loc * patt * patt
| PaAnt of loc * string
| PaAny of loc
| PaApp of loc * patt * patt
| PaArr of loc * patt
| PaCom of loc * patt * patt
| PaSem of loc * patt * patt
| PaChr of loc * string
| PaInt of loc * string
| PaInt32 of loc * string
| PaInt64 of loc * string
| PaNativeInt of loc * string
| PaFlo of loc * string
| PaLab of loc * string * patt
| PaOlb of loc * string * patt
| PaOlbi of loc * string * patt * expr
| PaOrp of loc * patt * patt
| PaRng of loc * patt * patt
| PaRec of loc * patt
| PaEq of loc * ident * patt
| PaStr of loc * string
| PaTup of loc * patt
| PaTyc of loc * patt * ctyp
| PaTyp of loc * ident
| PaVrn of loc * string
| PaLaz of loc * patt
and expr =
Ast.expr =
ExNil of loc
| ExId of loc * ident
| ExAcc of loc * expr * expr
| ExAnt of loc * string
| ExApp of loc * expr * expr
| ExAre of loc * expr * expr
| ExArr of loc * expr
| ExSem of loc * expr * expr
| ExAsf of loc
| ExAsr of loc * expr
| ExAss of loc * expr * expr
| ExChr of loc * string
| ExCoe of loc * expr * ctyp * ctyp
| ExFlo of loc * string
| ExFor of loc * string * expr * expr * direction_flag *
expr
| ExFun of loc * match_case
| ExIfe of loc * expr * expr * expr
| ExInt of loc * string
| ExInt32 of loc * string
| ExInt64 of loc * string
| ExNativeInt of loc * string
| ExLab of loc * string * expr
| ExLaz of loc * expr
| ExLet of loc * rec_flag * binding * expr
| ExLmd of loc * string * module_expr * expr
| ExMat of loc * expr * match_case
| ExNew of loc * ident
| ExObj of loc * patt * class_str_item
| ExOlb of loc * string * expr
| ExOvr of loc * rec_binding
| ExRec of loc * rec_binding * expr
| ExSeq of loc * expr
| ExSnd of loc * expr * string
| ExSte of loc * expr * expr
| ExStr of loc * string
| ExTry of loc * expr * match_case
| ExTup of loc * expr
| ExCom of loc * expr * expr
| ExTyc of loc * expr * ctyp
| ExVrn of loc * string
| ExWhi of loc * expr * expr
| ExOpI of loc * ident * expr
| ExFUN of loc * string * expr
| ExPkg of loc * module_expr
and module_type =
Ast.module_type =
MtNil of loc
| MtId of loc * ident
| MtFun of loc * string * module_type * module_type
| MtQuo of loc * string
| MtSig of loc * sig_item
| MtWit of loc * module_type * with_constr
| MtAnt of loc * string
and sig_item =
Ast.sig_item =
SgNil of loc
| SgCls of loc * class_type
| SgClt of loc * class_type
| SgSem of loc * sig_item * sig_item
| SgDir of loc * string * expr
| SgExc of loc * ctyp
| SgExt of loc * string * ctyp * string meta_list
| SgInc of loc * module_type
| SgMod of loc * string * module_type
| SgRecMod of loc * module_binding
| SgMty of loc * string * module_type
| SgOpn of loc * ident
| SgTyp of loc * ctyp
| SgVal of loc * string * ctyp
| SgAnt of loc * string
and with_constr =
Ast.with_constr =
WcNil of loc
| WcTyp of loc * ctyp * ctyp
| WcMod of loc * ident * ident
| WcTyS of loc * ctyp * ctyp
| WcMoS of loc * ident * ident
| WcAnd of loc * with_constr * with_constr
| WcAnt of loc * string
and binding =
Ast.binding =
BiNil of loc
| BiAnd of loc * binding * binding
| BiEq of loc * patt * expr
| BiAnt of loc * string
and rec_binding =
Ast.rec_binding =
RbNil of loc
| RbSem of loc * rec_binding * rec_binding
| RbEq of loc * ident * expr
| RbAnt of loc * string
and module_binding =
Ast.module_binding =
MbNil of loc
| MbAnd of loc * module_binding * module_binding
| MbColEq of loc * string * module_type * module_expr
| MbCol of loc * string * module_type
| MbAnt of loc * string
and match_case =
Ast.match_case =
McNil of loc
| McOr of loc * match_case * match_case
| McArr of loc * patt * expr * expr
| McAnt of loc * string
and module_expr =
Ast.module_expr =
MeNil of loc
| MeId of loc * ident
| MeApp of loc * module_expr * module_expr
| MeFun of loc * string * module_type * module_expr
| MeStr of loc * str_item
| MeTyc of loc * module_expr * module_type
| MePkg of loc * expr
| MeAnt of loc * string
and str_item =
Ast.str_item =
StNil of loc
| StCls of loc * class_expr
| StClt of loc * class_type
| StSem of loc * str_item * str_item
| StDir of loc * string * expr
| StExc of loc * ctyp * ident meta_option
| StExp of loc * expr
| StExt of loc * string * ctyp * string meta_list
| StInc of loc * module_expr
| StMod of loc * string * module_expr
| StRecMod of loc * module_binding
| StMty of loc * string * module_type
| StOpn of loc * ident
| StTyp of loc * ctyp
| StVal of loc * rec_flag * binding
| StAnt of loc * string
and class_type =
Ast.class_type =
CtNil of loc
| CtCon of loc * virtual_flag * ident * ctyp
| CtFun of loc * ctyp * class_type
| CtSig of loc * ctyp * class_sig_item
| CtAnd of loc * class_type * class_type
| CtCol of loc * class_type * class_type
| CtEq of loc * class_type * class_type
| CtAnt of loc * string
and class_sig_item =
Ast.class_sig_item =
CgNil of loc
| CgCtr of loc * ctyp * ctyp
| CgSem of loc * class_sig_item * class_sig_item
| CgInh of loc * class_type
| CgMth of loc * string * private_flag * ctyp
| CgVal of loc * string * mutable_flag * virtual_flag *
ctyp
| CgVir of loc * string * private_flag * ctyp
| CgAnt of loc * string
and class_expr =
Ast.class_expr =
CeNil of loc
| CeApp of loc * class_expr * expr
| CeCon of loc * virtual_flag * ident * ctyp
| CeFun of loc * patt * class_expr
| CeLet of loc * rec_flag * binding * class_expr
| CeStr of loc * patt * class_str_item
| CeTyc of loc * class_expr * class_type
| CeAnd of loc * class_expr * class_expr
| CeEq of loc * class_expr * class_expr
| CeAnt of loc * string
and class_str_item =
Ast.class_str_item =
CrNil of loc
| CrSem of loc * class_str_item * class_str_item
| CrCtr of loc * ctyp * ctyp
| CrInh of loc * override_flag * class_expr * string
| CrIni of loc * expr
| CrMth of loc * string * override_flag * private_flag *
expr * ctyp
| CrVal of loc * string * override_flag * mutable_flag *
expr
| CrVir of loc * string * private_flag * ctyp
| CrVvr of loc * string * mutable_flag * ctyp
| CrAnt of loc * string
val loc_of_ctyp : ctyp -> loc
val loc_of_patt : patt -> loc
val loc_of_expr : expr -> loc
val loc_of_module_type : module_type -> loc
val loc_of_module_expr : module_expr -> loc
val loc_of_sig_item : sig_item -> loc
val loc_of_str_item : str_item -> loc
val loc_of_class_type : class_type -> loc
val loc_of_class_sig_item : class_sig_item -> loc
val loc_of_class_expr : class_expr -> loc
val loc_of_class_str_item : class_str_item -> loc
val loc_of_with_constr : with_constr -> loc
val loc_of_binding : binding -> loc
val loc_of_rec_binding : rec_binding -> loc
val loc_of_module_binding : module_binding -> loc
val loc_of_match_case : match_case -> loc
val loc_of_ident : ident -> loc
module Meta :
sig
module type META_LOC =
sig
val meta_loc_patt : loc -> loc -> patt
val meta_loc_expr : loc -> loc -> expr
end
module MetaLoc :
sig
val meta_loc_patt : loc -> loc -> patt
val meta_loc_expr : loc -> loc -> expr
end
module MetaGhostLoc :
sig
val meta_loc_patt : loc -> 'a -> patt
val meta_loc_expr : loc -> 'a -> expr
end
module MetaLocVar :
sig
val meta_loc_patt : loc -> 'a -> patt
val meta_loc_expr : loc -> 'a -> expr
end
module Make :
functor (MetaLoc : META_LOC) ->
sig
module Expr :
sig
val meta_string : loc -> string -> expr
val meta_int : loc -> string -> expr
val meta_float : loc -> string -> expr
val meta_char : loc -> string -> expr
val meta_bool : loc -> bool -> expr
val meta_list :
(loc -> 'a -> expr) -> loc -> 'a list -> expr
val meta_binding : loc -> binding -> expr
val meta_rec_binding :
loc -> rec_binding -> expr
val meta_class_expr : loc -> class_expr -> expr
val meta_class_sig_item :
loc -> class_sig_item -> expr
val meta_class_str_item :
loc -> class_str_item -> expr
val meta_class_type : loc -> class_type -> expr
val meta_ctyp : loc -> ctyp -> expr
val meta_expr : loc -> expr -> expr
val meta_ident : loc -> ident -> expr
val meta_match_case : loc -> match_case -> expr
val meta_module_binding :
loc -> module_binding -> expr
val meta_module_expr :
loc -> module_expr -> expr
val meta_module_type :
loc -> module_type -> expr
val meta_patt : loc -> patt -> expr
val meta_sig_item : loc -> sig_item -> expr
val meta_str_item : loc -> str_item -> expr
val meta_with_constr :
loc -> with_constr -> expr
val meta_rec_flag : loc -> rec_flag -> expr
val meta_mutable_flag :
loc -> mutable_flag -> expr
val meta_virtual_flag :
loc -> virtual_flag -> expr
val meta_private_flag :
loc -> private_flag -> expr
val meta_row_var_flag :
loc -> row_var_flag -> expr
val meta_override_flag :
loc -> override_flag -> expr
val meta_direction_flag :
loc -> direction_flag -> expr
end
module Patt :
sig
val meta_string : loc -> string -> patt
val meta_int : loc -> string -> patt
val meta_float : loc -> string -> patt
val meta_char : loc -> string -> patt
val meta_bool : loc -> bool -> patt
val meta_list :
(loc -> 'a -> patt) -> loc -> 'a list -> patt
val meta_binding : loc -> binding -> patt
val meta_rec_binding :
loc -> rec_binding -> patt
val meta_class_expr : loc -> class_expr -> patt
val meta_class_sig_item :
loc -> class_sig_item -> patt
val meta_class_str_item :
loc -> class_str_item -> patt
val meta_class_type : loc -> class_type -> patt
val meta_ctyp : loc -> ctyp -> patt
val meta_expr : loc -> expr -> patt
val meta_ident : loc -> ident -> patt
val meta_match_case : loc -> match_case -> patt
val meta_module_binding :
loc -> module_binding -> patt
val meta_module_expr :
loc -> module_expr -> patt
val meta_module_type :
loc -> module_type -> patt
val meta_patt : loc -> patt -> patt
val meta_sig_item : loc -> sig_item -> patt
val meta_str_item : loc -> str_item -> patt
val meta_with_constr :
loc -> with_constr -> patt
val meta_rec_flag : loc -> rec_flag -> patt
val meta_mutable_flag :
loc -> mutable_flag -> patt
val meta_virtual_flag :
loc -> virtual_flag -> patt
val meta_private_flag :
loc -> private_flag -> patt
val meta_row_var_flag :
loc -> row_var_flag -> patt
val meta_override_flag :
loc -> override_flag -> patt
val meta_direction_flag :
loc -> direction_flag -> patt
end
end
end
class map :
object ('a)
method binding : binding -> binding
method class_expr : class_expr -> class_expr
method class_sig_item : class_sig_item -> class_sig_item
method class_str_item : class_str_item -> class_str_item
method class_type : class_type -> class_type
method ctyp : ctyp -> ctyp
method direction_flag : direction_flag -> direction_flag
method expr : expr -> expr
method ident : ident -> ident
method list : ('a -> 'b -> 'c) -> 'b list -> 'c list
method loc : loc -> loc
method match_case : match_case -> match_case
method meta_bool : meta_bool -> meta_bool
method meta_list :
('a -> 'd -> 'e) -> 'd meta_list -> 'e meta_list
method meta_option :
('a -> 'f -> 'g) -> 'f meta_option -> 'g meta_option
method module_binding : module_binding -> module_binding
method module_expr : module_expr -> module_expr
method module_type : module_type -> module_type
method mutable_flag : mutable_flag -> mutable_flag
method override_flag : override_flag -> override_flag
method patt : patt -> patt
method private_flag : private_flag -> private_flag
method rec_binding : rec_binding -> rec_binding
method rec_flag : rec_flag -> rec_flag
method row_var_flag : row_var_flag -> row_var_flag
method sig_item : sig_item -> sig_item
method str_item : str_item -> str_item
method string : string -> string
method unknown : 'h -> 'h
method virtual_flag : virtual_flag -> virtual_flag
method with_constr : with_constr -> with_constr
end
class fold :
object ('a)
method binding : binding -> 'a
method class_expr : class_expr -> 'a
method class_sig_item : class_sig_item -> 'a
method class_str_item : class_str_item -> 'a
method class_type : class_type -> 'a
method ctyp : ctyp -> 'a
method direction_flag : direction_flag -> 'a
method expr : expr -> 'a
method ident : ident -> 'a
method list : ('a -> 'b -> 'a) -> 'b list -> 'a
method loc : loc -> 'a
method match_case : match_case -> 'a
method meta_bool : meta_bool -> 'a
method meta_list : ('a -> 'c -> 'a) -> 'c meta_list -> 'a
method meta_option :
('a -> 'd -> 'a) -> 'd meta_option -> 'a
method module_binding : module_binding -> 'a
method module_expr : module_expr -> 'a
method module_type : module_type -> 'a
method mutable_flag : mutable_flag -> 'a
method override_flag : override_flag -> 'a
method patt : patt -> 'a
method private_flag : private_flag -> 'a
method rec_binding : rec_binding -> 'a
method rec_flag : rec_flag -> 'a
method row_var_flag : row_var_flag -> 'a
method sig_item : sig_item -> 'a
method str_item : str_item -> 'a
method string : string -> 'a
method unknown : 'e -> 'a
method virtual_flag : virtual_flag -> 'a
method with_constr : with_constr -> 'a
end
val map_expr : (expr -> expr) -> map
val map_patt : (patt -> patt) -> map
val map_ctyp : (ctyp -> ctyp) -> map
val map_str_item : (str_item -> str_item) -> map
val map_sig_item : (sig_item -> sig_item) -> map
val map_loc : (loc -> loc) -> map
val ident_of_expr : expr -> ident
val ident_of_patt : patt -> ident
val ident_of_ctyp : ctyp -> ident
val biAnd_of_list : binding list -> binding
val rbSem_of_list : rec_binding list -> rec_binding
val paSem_of_list : patt list -> patt
val paCom_of_list : patt list -> patt
val tyOr_of_list : ctyp list -> ctyp
val tyAnd_of_list : ctyp list -> ctyp
val tyAmp_of_list : ctyp list -> ctyp
val tySem_of_list : ctyp list -> ctyp
val tyCom_of_list : ctyp list -> ctyp
val tySta_of_list : ctyp list -> ctyp
val stSem_of_list : str_item list -> str_item
val sgSem_of_list : sig_item list -> sig_item
val crSem_of_list : class_str_item list -> class_str_item
val cgSem_of_list : class_sig_item list -> class_sig_item
val ctAnd_of_list : class_type list -> class_type
val ceAnd_of_list : class_expr list -> class_expr
val wcAnd_of_list : with_constr list -> with_constr
val meApp_of_list : module_expr list -> module_expr
val mbAnd_of_list : module_binding list -> module_binding
val mcOr_of_list : match_case list -> match_case
val idAcc_of_list : ident list -> ident
val idApp_of_list : ident list -> ident
val exSem_of_list : expr list -> expr
val exCom_of_list : expr list -> expr
val list_of_ctyp : ctyp -> ctyp list -> ctyp list
val list_of_binding : binding -> binding list -> binding list
val list_of_rec_binding :
rec_binding -> rec_binding list -> rec_binding list
val list_of_with_constr :
with_constr -> with_constr list -> with_constr list
val list_of_patt : patt -> patt list -> patt list
val list_of_expr : expr -> expr list -> expr list
val list_of_str_item :
str_item -> str_item list -> str_item list
val list_of_sig_item :
sig_item -> sig_item list -> sig_item list
val list_of_class_sig_item :
class_sig_item ->
class_sig_item list -> class_sig_item list
val list_of_class_str_item :
class_str_item ->
class_str_item list -> class_str_item list
val list_of_class_type :
class_type -> class_type list -> class_type list
val list_of_class_expr :
class_expr -> class_expr list -> class_expr list
val list_of_module_expr :
module_expr -> module_expr list -> module_expr list
val list_of_module_binding :
module_binding ->
module_binding list -> module_binding list
val list_of_match_case :
match_case -> match_case list -> match_case list
val list_of_ident : ident -> ident list -> ident list
val safe_string_escaped : string -> string
val is_irrefut_patt : patt -> bool
val is_constructor : ident -> bool
val is_patt_constructor : patt -> bool
val is_expr_constructor : expr -> bool
val ty_of_stl : Loc.t * string * ctyp list -> ctyp
val ty_of_sbt : Loc.t * string * bool * ctyp -> ctyp
val bi_of_pe : patt * expr -> binding
val pel_of_binding : binding -> (patt * expr) list
val binding_of_pel : (patt * expr) list -> binding
val sum_type_of_list :
(Loc.t * string * ctyp list) list -> ctyp
val record_type_of_list :
(Loc.t * string * bool * ctyp) list -> ctyp
end
module DynAst :
sig
module Ast :
sig
type loc = Ast.loc
type meta_bool = Ast.meta_bool
type 'a meta_option = 'a Ast.meta_option
type 'a meta_list = 'a Ast.meta_list
type ctyp = Ast.ctyp
type patt = Ast.patt
type expr = Ast.expr
type module_type = Ast.module_type
type sig_item = Ast.sig_item
type with_constr = Ast.with_constr
type module_expr = Ast.module_expr
type str_item = Ast.str_item
type class_type = Ast.class_type
type class_sig_item = Ast.class_sig_item
type class_expr = Ast.class_expr
type class_str_item = Ast.class_str_item
type match_case = Ast.match_case
type ident = Ast.ident
type binding = Ast.binding
type rec_binding = Ast.rec_binding
type module_binding = Ast.module_binding
type rec_flag = Ast.rec_flag
type direction_flag = Ast.direction_flag
type mutable_flag = Ast.mutable_flag
type private_flag = Ast.private_flag
type virtual_flag = Ast.virtual_flag
type row_var_flag = Ast.row_var_flag
type override_flag = Ast.override_flag
val loc_of_ctyp : ctyp -> loc
val loc_of_patt : patt -> loc
val loc_of_expr : expr -> loc
val loc_of_module_type : module_type -> loc
val loc_of_module_expr : module_expr -> loc
val loc_of_sig_item : sig_item -> loc
val loc_of_str_item : str_item -> loc
val loc_of_class_type : class_type -> loc
val loc_of_class_sig_item : class_sig_item -> loc
val loc_of_class_expr : class_expr -> loc
val loc_of_class_str_item : class_str_item -> loc
val loc_of_with_constr : with_constr -> loc
val loc_of_binding : binding -> loc
val loc_of_rec_binding : rec_binding -> loc
val loc_of_module_binding : module_binding -> loc
val loc_of_match_case : match_case -> loc
val loc_of_ident : ident -> loc
class map :
object ('a)
method binding : binding -> binding
method class_expr : class_expr -> class_expr
method class_sig_item :
class_sig_item -> class_sig_item
method class_str_item :
class_str_item -> class_str_item
method class_type : class_type -> class_type
method ctyp : ctyp -> ctyp
method direction_flag :
direction_flag -> direction_flag
method expr : expr -> expr
method ident : ident -> ident
method list : ('a -> 'b -> 'c) -> 'b list -> 'c list
method loc : loc -> loc
method match_case : match_case -> match_case
method meta_bool : meta_bool -> meta_bool
method meta_list :
('a -> 'd -> 'e) -> 'd meta_list -> 'e meta_list
method meta_option :
('a -> 'f -> 'g) ->
'f meta_option -> 'g meta_option
method module_binding :
module_binding -> module_binding
method module_expr : module_expr -> module_expr
method module_type : module_type -> module_type
method mutable_flag : mutable_flag -> mutable_flag
method override_flag : override_flag -> override_flag
method patt : patt -> patt
method private_flag : private_flag -> private_flag
method rec_binding : rec_binding -> rec_binding
method rec_flag : rec_flag -> rec_flag
method row_var_flag : row_var_flag -> row_var_flag
method sig_item : sig_item -> sig_item
method str_item : str_item -> str_item
method string : string -> string
method unknown : 'h -> 'h
method virtual_flag : virtual_flag -> virtual_flag
method with_constr : with_constr -> with_constr
end
class fold :
object ('a)
method binding : binding -> 'a
method class_expr : class_expr -> 'a
method class_sig_item : class_sig_item -> 'a
method class_str_item : class_str_item -> 'a
method class_type : class_type -> 'a
method ctyp : ctyp -> 'a
method direction_flag : direction_flag -> 'a
method expr : expr -> 'a
method ident : ident -> 'a
method list : ('a -> 'b -> 'a) -> 'b list -> 'a
method loc : loc -> 'a
method match_case : match_case -> 'a
method meta_bool : meta_bool -> 'a
method meta_list :
('a -> 'c -> 'a) -> 'c meta_list -> 'a
method meta_option :
('a -> 'd -> 'a) -> 'd meta_option -> 'a
method module_binding : module_binding -> 'a
method module_expr : module_expr -> 'a
method module_type : module_type -> 'a
method mutable_flag : mutable_flag -> 'a
method override_flag : override_flag -> 'a
method patt : patt -> 'a
method private_flag : private_flag -> 'a
method rec_binding : rec_binding -> 'a
method rec_flag : rec_flag -> 'a
method row_var_flag : row_var_flag -> 'a
method sig_item : sig_item -> 'a
method str_item : str_item -> 'a
method string : string -> 'a
method unknown : 'e -> 'a
method virtual_flag : virtual_flag -> 'a
method with_constr : with_constr -> 'a
end
end
type 'a tag
val ctyp_tag : Ast.ctyp tag
val patt_tag : Ast.patt tag
val expr_tag : Ast.expr tag
val module_type_tag : Ast.module_type tag
val sig_item_tag : Ast.sig_item tag
val with_constr_tag : Ast.with_constr tag
val module_expr_tag : Ast.module_expr tag
val str_item_tag : Ast.str_item tag
val class_type_tag : Ast.class_type tag
val class_sig_item_tag : Ast.class_sig_item tag
val class_expr_tag : Ast.class_expr tag
val class_str_item_tag : Ast.class_str_item tag
val match_case_tag : Ast.match_case tag
val ident_tag : Ast.ident tag
val binding_tag : Ast.binding tag
val rec_binding_tag : Ast.rec_binding tag
val module_binding_tag : Ast.module_binding tag
val string_of_tag : 'a tag -> string
module Pack :
functor (X : sig type 'a t end) ->
sig
type pack
val pack : 'a tag -> 'a X.t -> pack
val unpack : 'a tag -> pack -> 'a X.t
val print_tag : Format.formatter -> pack -> unit
end
end
type 'a expand_fun = Ast.loc -> string option -> string -> 'a
val add : string -> 'a DynAst.tag -> 'a expand_fun -> unit
val find : string -> 'a DynAst.tag -> 'a expand_fun
val default : string ref
val parse_quotation_result :
(Ast.loc -> string -> 'a) ->
Ast.loc -> Sig.quotation -> string -> string -> 'a
val translate : (string -> string) ref
val expand : Ast.loc -> Sig.quotation -> 'a DynAst.tag -> 'a
val dump_file : string option ref
module Error : Sig.Error
end
end
module AstFilters :
sig
module Make :
functor (Ast : Sig.Camlp4Ast) ->
sig
module Ast :
sig
module Loc :
sig
type t = Ast.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 loc = Loc.t
and meta_bool =
Ast.meta_bool =
BTrue
| BFalse
| BAnt of string
and rec_flag =
Ast.rec_flag =
ReRecursive
| ReNil
| ReAnt of string
and direction_flag =
Ast.direction_flag =
DiTo
| DiDownto
| DiAnt of string
and mutable_flag =
Ast.mutable_flag =
MuMutable
| MuNil
| MuAnt of string
and private_flag =
Ast.private_flag =
PrPrivate
| PrNil
| PrAnt of string
and virtual_flag =
Ast.virtual_flag =
ViVirtual
| ViNil
| ViAnt of string
and override_flag =
Ast.override_flag =
OvOverride
| OvNil
| OvAnt of string
and row_var_flag =
Ast.row_var_flag =
RvRowVar
| RvNil
| RvAnt of string
and 'a meta_option =
'a Ast.meta_option =
ONone
| OSome of 'a
| OAnt of string
and 'a meta_list =
'a Ast.meta_list =
LNil
| LCons of 'a * 'a meta_list
| LAnt of string
and ident =
Ast.ident =
IdAcc of loc * ident * ident
| IdApp of loc * ident * ident
| IdLid of loc * string
| IdUid of loc * string
| IdAnt of loc * string
and ctyp =
Ast.ctyp =
TyNil of loc
| TyAli of loc * ctyp * ctyp
| TyAny of loc
| TyApp of loc * ctyp * ctyp
| TyArr of loc * ctyp * ctyp
| TyCls of loc * ident
| TyLab of loc * string * ctyp
| TyId of loc * ident
| TyMan of loc * ctyp * ctyp
| TyDcl of loc * string * ctyp list * ctyp *
(ctyp * ctyp) list
| TyObj of loc * ctyp * row_var_flag
| TyOlb of loc * string * ctyp
| TyPol of loc * ctyp * ctyp
| TyQuo of loc * string
| TyQuP of loc * string
| TyQuM of loc * string
| TyVrn of loc * string
| TyRec of loc * ctyp
| TyCol of loc * ctyp * ctyp
| TySem of loc * ctyp * ctyp
| TyCom of loc * ctyp * ctyp
| TySum of loc * ctyp
| TyOf of loc * ctyp * ctyp
| TyAnd of loc * ctyp * ctyp
| TyOr of loc * ctyp * ctyp
| TyPrv of loc * ctyp
| TyMut of loc * ctyp
| TyTup of loc * ctyp
| TySta of loc * ctyp * ctyp
| TyVrnEq of loc * ctyp
| TyVrnSup of loc * ctyp
| TyVrnInf of loc * ctyp
| TyVrnInfSup of loc * ctyp * ctyp
| TyAmp of loc * ctyp * ctyp
| TyOfAmp of loc * ctyp * ctyp
| TyPkg of loc * module_type
| TyAnt of loc * string
and patt =
Ast.patt =
PaNil of loc
| PaId of loc * ident
| PaAli of loc * patt * patt
| PaAnt of loc * string
| PaAny of loc
| PaApp of loc * patt * patt
| PaArr of loc * patt
| PaCom of loc * patt * patt
| PaSem of loc * patt * patt
| PaChr of loc * string
| PaInt of loc * string
| PaInt32 of loc * string
| PaInt64 of loc * string
| PaNativeInt of loc * string
| PaFlo of loc * string
| PaLab of loc * string * patt
| PaOlb of loc * string * patt
| PaOlbi of loc * string * patt * expr
| PaOrp of loc * patt * patt
| PaRng of loc * patt * patt
| PaRec of loc * patt
| PaEq of loc * ident * patt
| PaStr of loc * string
| PaTup of loc * patt
| PaTyc of loc * patt * ctyp
| PaTyp of loc * ident
| PaVrn of loc * string
| PaLaz of loc * patt
and expr =
Ast.expr =
ExNil of loc
| ExId of loc * ident
| ExAcc of loc * expr * expr
| ExAnt of loc * string
| ExApp of loc * expr * expr
| ExAre of loc * expr * expr
| ExArr of loc * expr
| ExSem of loc * expr * expr
| ExAsf of loc
| ExAsr of loc * expr
| ExAss of loc * expr * expr
| ExChr of loc * string
| ExCoe of loc * expr * ctyp * ctyp
| ExFlo of loc * string
| ExFor of loc * string * expr * expr * direction_flag *
expr
| ExFun of loc * match_case
| ExIfe of loc * expr * expr * expr
| ExInt of loc * string
| ExInt32 of loc * string
| ExInt64 of loc * string
| ExNativeInt of loc * string
| ExLab of loc * string * expr
| ExLaz of loc * expr
| ExLet of loc * rec_flag * binding * expr
| ExLmd of loc * string * module_expr * expr
| ExMat of loc * expr * match_case
| ExNew of loc * ident
| ExObj of loc * patt * class_str_item
| ExOlb of loc * string * expr
| ExOvr of loc * rec_binding
| ExRec of loc * rec_binding * expr
| ExSeq of loc * expr
| ExSnd of loc * expr * string
| ExSte of loc * expr * expr
| ExStr of loc * string
| ExTry of loc * expr * match_case
| ExTup of loc * expr
| ExCom of loc * expr * expr
| ExTyc of loc * expr * ctyp
| ExVrn of loc * string
| ExWhi of loc * expr * expr
| ExOpI of loc * ident * expr
| ExFUN of loc * string * expr
| ExPkg of loc * module_expr
and module_type =
Ast.module_type =
MtNil of loc
| MtId of loc * ident
| MtFun of loc * string * module_type * module_type
| MtQuo of loc * string
| MtSig of loc * sig_item
| MtWit of loc * module_type * with_constr
| MtAnt of loc * string
and sig_item =
Ast.sig_item =
SgNil of loc
| SgCls of loc * class_type
| SgClt of loc * class_type
| SgSem of loc * sig_item * sig_item
| SgDir of loc * string * expr
| SgExc of loc * ctyp
| SgExt of loc * string * ctyp * string meta_list
| SgInc of loc * module_type
| SgMod of loc * string * module_type
| SgRecMod of loc * module_binding
| SgMty of loc * string * module_type
| SgOpn of loc * ident
| SgTyp of loc * ctyp
| SgVal of loc * string * ctyp
| SgAnt of loc * string
and with_constr =
Ast.with_constr =
WcNil of loc
| WcTyp of loc * ctyp * ctyp
| WcMod of loc * ident * ident
| WcTyS of loc * ctyp * ctyp
| WcMoS of loc * ident * ident
| WcAnd of loc * with_constr * with_constr
| WcAnt of loc * string
and binding =
Ast.binding =
BiNil of loc
| BiAnd of loc * binding * binding
| BiEq of loc * patt * expr
| BiAnt of loc * string
and rec_binding =
Ast.rec_binding =
RbNil of loc
| RbSem of loc * rec_binding * rec_binding
| RbEq of loc * ident * expr
| RbAnt of loc * string
and module_binding =
Ast.module_binding =
MbNil of loc
| MbAnd of loc * module_binding * module_binding
| MbColEq of loc * string * module_type * module_expr
| MbCol of loc * string * module_type
| MbAnt of loc * string
and match_case =
Ast.match_case =
McNil of loc
| McOr of loc * match_case * match_case
| McArr of loc * patt * expr * expr
| McAnt of loc * string
and module_expr =
Ast.module_expr =
MeNil of loc
| MeId of loc * ident
| MeApp of loc * module_expr * module_expr
| MeFun of loc * string * module_type * module_expr
| MeStr of loc * str_item
| MeTyc of loc * module_expr * module_type
| MePkg of loc * expr
| MeAnt of loc * string
and str_item =
Ast.str_item =
StNil of loc
| StCls of loc * class_expr
| StClt of loc * class_type
| StSem of loc * str_item * str_item
| StDir of loc * string * expr
| StExc of loc * ctyp * ident meta_option
| StExp of loc * expr
| StExt of loc * string * ctyp * string meta_list
| StInc of loc * module_expr
| StMod of loc * string * module_expr
| StRecMod of loc * module_binding
| StMty of loc * string * module_type
| StOpn of loc * ident
| StTyp of loc * ctyp
| StVal of loc * rec_flag * binding
| StAnt of loc * string
and class_type =
Ast.class_type =
CtNil of loc
| CtCon of loc * virtual_flag * ident * ctyp
| CtFun of loc * ctyp * class_type
| CtSig of loc * ctyp * class_sig_item
| CtAnd of loc * class_type * class_type
| CtCol of loc * class_type * class_type
| CtEq of loc * class_type * class_type
| CtAnt of loc * string
and class_sig_item =
Ast.class_sig_item =
CgNil of loc
| CgCtr of loc * ctyp * ctyp
| CgSem of loc * class_sig_item * class_sig_item
| CgInh of loc * class_type
| CgMth of loc * string * private_flag * ctyp
| CgVal of loc * string * mutable_flag * virtual_flag *
ctyp
| CgVir of loc * string * private_flag * ctyp
| CgAnt of loc * string
and class_expr =
Ast.class_expr =
CeNil of loc
| CeApp of loc * class_expr * expr
| CeCon of loc * virtual_flag * ident * ctyp
| CeFun of loc * patt * class_expr
| CeLet of loc * rec_flag * binding * class_expr
| CeStr of loc * patt * class_str_item
| CeTyc of loc * class_expr * class_type
| CeAnd of loc * class_expr * class_expr
| CeEq of loc * class_expr * class_expr
| CeAnt of loc * string
and class_str_item =
Ast.class_str_item =
CrNil of loc
| CrSem of loc * class_str_item * class_str_item
| CrCtr of loc * ctyp * ctyp
| CrInh of loc * override_flag * class_expr * string
| CrIni of loc * expr
| CrMth of loc * string * override_flag * private_flag *
expr * ctyp
| CrVal of loc * string * override_flag * mutable_flag *
expr
| CrVir of loc * string * private_flag * ctyp
| CrVvr of loc * string * mutable_flag * ctyp
| CrAnt of loc * string
val loc_of_ctyp : ctyp -> loc
val loc_of_patt : patt -> loc
val loc_of_expr : expr -> loc
val loc_of_module_type : module_type -> loc
val loc_of_module_expr : module_expr -> loc
val loc_of_sig_item : sig_item -> loc
val loc_of_str_item : str_item -> loc
val loc_of_class_type : class_type -> loc
val loc_of_class_sig_item : class_sig_item -> loc
val loc_of_class_expr : class_expr -> loc
val loc_of_class_str_item : class_str_item -> loc
val loc_of_with_constr : with_constr -> loc
val loc_of_binding : binding -> loc
val loc_of_rec_binding : rec_binding -> loc
val loc_of_module_binding : module_binding -> loc
val loc_of_match_case : match_case -> loc
val loc_of_ident : ident -> loc
module Meta :
sig
module type META_LOC =
sig
val meta_loc_patt : loc -> loc -> patt
val meta_loc_expr : loc -> loc -> expr
end
module MetaLoc :
sig
val meta_loc_patt : loc -> loc -> patt
val meta_loc_expr : loc -> loc -> expr
end
module MetaGhostLoc :
sig
val meta_loc_patt : loc -> 'a -> patt
val meta_loc_expr : loc -> 'a -> expr
end
module MetaLocVar :
sig
val meta_loc_patt : loc -> 'a -> patt
val meta_loc_expr : loc -> 'a -> expr
end
module Make :
functor (MetaLoc : META_LOC) ->
sig
module Expr :
sig
val meta_string : loc -> string -> expr
val meta_int : loc -> string -> expr
val meta_float : loc -> string -> expr
val meta_char : loc -> string -> expr
val meta_bool : loc -> bool -> expr
val meta_list :
(loc -> 'a -> expr) -> loc -> 'a list -> expr
val meta_binding : loc -> binding -> expr
val meta_rec_binding :
loc -> rec_binding -> expr
val meta_class_expr : loc -> class_expr -> expr
val meta_class_sig_item :
loc -> class_sig_item -> expr
val meta_class_str_item :
loc -> class_str_item -> expr
val meta_class_type : loc -> class_type -> expr
val meta_ctyp : loc -> ctyp -> expr
val meta_expr : loc -> expr -> expr
val meta_ident : loc -> ident -> expr
val meta_match_case : loc -> match_case -> expr
val meta_module_binding :
loc -> module_binding -> expr
val meta_module_expr :
loc -> module_expr -> expr
val meta_module_type :
loc -> module_type -> expr
val meta_patt : loc -> patt -> expr
val meta_sig_item : loc -> sig_item -> expr
val meta_str_item : loc -> str_item -> expr
val meta_with_constr :
loc -> with_constr -> expr
val meta_rec_flag : loc -> rec_flag -> expr
val meta_mutable_flag :
loc -> mutable_flag -> expr
val meta_virtual_flag :
loc -> virtual_flag -> expr
val meta_private_flag :
loc -> private_flag -> expr
val meta_row_var_flag :
loc -> row_var_flag -> expr
val meta_override_flag :
loc -> override_flag -> expr
val meta_direction_flag :
loc -> direction_flag -> expr
end
module Patt :
sig
val meta_string : loc -> string -> patt
val meta_int : loc -> string -> patt
val meta_float : loc -> string -> patt
val meta_char : loc -> string -> patt
val meta_bool : loc -> bool -> patt
val meta_list :
(loc -> 'a -> patt) -> loc -> 'a list -> patt
val meta_binding : loc -> binding -> patt
val meta_rec_binding :
loc -> rec_binding -> patt
val meta_class_expr : loc -> class_expr -> patt
val meta_class_sig_item :
loc -> class_sig_item -> patt
val meta_class_str_item :
loc -> class_str_item -> patt
val meta_class_type : loc -> class_type -> patt
val meta_ctyp : loc -> ctyp -> patt
val meta_expr : loc -> expr -> patt
val meta_ident : loc -> ident -> patt
val meta_match_case : loc -> match_case -> patt
val meta_module_binding :
loc -> module_binding -> patt
val meta_module_expr :
loc -> module_expr -> patt
val meta_module_type :
loc -> module_type -> patt
val meta_patt : loc -> patt -> patt
val meta_sig_item : loc -> sig_item -> patt
val meta_str_item : loc -> str_item -> patt
val meta_with_constr :
loc -> with_constr -> patt
val meta_rec_flag : loc -> rec_flag -> patt
val meta_mutable_flag :
loc -> mutable_flag -> patt
val meta_virtual_flag :
loc -> virtual_flag -> patt
val meta_private_flag :
loc -> private_flag -> patt
val meta_row_var_flag :
loc -> row_var_flag -> patt
val meta_override_flag :
loc -> override_flag -> patt
val meta_direction_flag :
loc -> direction_flag -> patt
end
end
end
class map :
object ('a)
method binding : binding -> binding
method class_expr : class_expr -> class_expr
method class_sig_item : class_sig_item -> class_sig_item
method class_str_item : class_str_item -> class_str_item
method class_type : class_type -> class_type
method ctyp : ctyp -> ctyp
method direction_flag : direction_flag -> direction_flag
method expr : expr -> expr
method ident : ident -> ident
method list : ('a -> 'b -> 'c) -> 'b list -> 'c list
method loc : loc -> loc
method match_case : match_case -> match_case
method meta_bool : meta_bool -> meta_bool
method meta_list :
('a -> 'd -> 'e) -> 'd meta_list -> 'e meta_list
method meta_option :
('a -> 'f -> 'g) -> 'f meta_option -> 'g meta_option
method module_binding : module_binding -> module_binding
method module_expr : module_expr -> module_expr
method module_type : module_type -> module_type
method mutable_flag : mutable_flag -> mutable_flag
method override_flag : override_flag -> override_flag
method patt : patt -> patt
method private_flag : private_flag -> private_flag
method rec_binding : rec_binding -> rec_binding
method rec_flag : rec_flag -> rec_flag
method row_var_flag : row_var_flag -> row_var_flag
method sig_item : sig_item -> sig_item
method str_item : str_item -> str_item
method string : string -> string
method unknown : 'h -> 'h
method virtual_flag : virtual_flag -> virtual_flag
method with_constr : with_constr -> with_constr
end
class fold :
object ('a)
method binding : binding -> 'a
method class_expr : class_expr -> 'a
method class_sig_item : class_sig_item -> 'a
method class_str_item : class_str_item -> 'a
method class_type : class_type -> 'a
method ctyp : ctyp -> 'a
method direction_flag : direction_flag -> 'a
method expr : expr -> 'a
method ident : ident -> 'a
method list : ('a -> 'b -> 'a) -> 'b list -> 'a
method loc : loc -> 'a
method match_case : match_case -> 'a
method meta_bool : meta_bool -> 'a
method meta_list : ('a -> 'c -> 'a) -> 'c meta_list -> 'a
method meta_option :
('a -> 'd -> 'a) -> 'd meta_option -> 'a
method module_binding : module_binding -> 'a
method module_expr : module_expr -> 'a
method module_type : module_type -> 'a
method mutable_flag : mutable_flag -> 'a
method override_flag : override_flag -> 'a
method patt : patt -> 'a
method private_flag : private_flag -> 'a
method rec_binding : rec_binding -> 'a
method rec_flag : rec_flag -> 'a
method row_var_flag : row_var_flag -> 'a
method sig_item : sig_item -> 'a
method str_item : str_item -> 'a
method string : string -> 'a
method unknown : 'e -> 'a
method virtual_flag : virtual_flag -> 'a
method with_constr : with_constr -> 'a
end
val map_expr : (expr -> expr) -> map
val map_patt : (patt -> patt) -> map
val map_ctyp : (ctyp -> ctyp) -> map
val map_str_item : (str_item -> str_item) -> map
val map_sig_item : (sig_item -> sig_item) -> map
val map_loc : (loc -> loc) -> map
val ident_of_expr : expr -> ident
val ident_of_patt : patt -> ident
val ident_of_ctyp : ctyp -> ident
val biAnd_of_list : binding list -> binding
val rbSem_of_list : rec_binding list -> rec_binding
val paSem_of_list : patt list -> patt
val paCom_of_list : patt list -> patt
val tyOr_of_list : ctyp list -> ctyp
val tyAnd_of_list : ctyp list -> ctyp
val tyAmp_of_list : ctyp list -> ctyp
val tySem_of_list : ctyp list -> ctyp
val tyCom_of_list : ctyp list -> ctyp
val tySta_of_list : ctyp list -> ctyp
val stSem_of_list : str_item list -> str_item
val sgSem_of_list : sig_item list -> sig_item
val crSem_of_list : class_str_item list -> class_str_item
val cgSem_of_list : class_sig_item list -> class_sig_item
val ctAnd_of_list : class_type list -> class_type
val ceAnd_of_list : class_expr list -> class_expr
val wcAnd_of_list : with_constr list -> with_constr
val meApp_of_list : module_expr list -> module_expr
val mbAnd_of_list : module_binding list -> module_binding
val mcOr_of_list : match_case list -> match_case
val idAcc_of_list : ident list -> ident
val idApp_of_list : ident list -> ident
val exSem_of_list : expr list -> expr
val exCom_of_list : expr list -> expr
val list_of_ctyp : ctyp -> ctyp list -> ctyp list
val list_of_binding : binding -> binding list -> binding list
val list_of_rec_binding :
rec_binding -> rec_binding list -> rec_binding list
val list_of_with_constr :
with_constr -> with_constr list -> with_constr list
val list_of_patt : patt -> patt list -> patt list
val list_of_expr : expr -> expr list -> expr list
val list_of_str_item :
str_item -> str_item list -> str_item list
val list_of_sig_item :
sig_item -> sig_item list -> sig_item list
val list_of_class_sig_item :
class_sig_item ->
class_sig_item list -> class_sig_item list
val list_of_class_str_item :
class_str_item ->
class_str_item list -> class_str_item list
val list_of_class_type :
class_type -> class_type list -> class_type list
val list_of_class_expr :
class_expr -> class_expr list -> class_expr list
val list_of_module_expr :
module_expr -> module_expr list -> module_expr list
val list_of_module_binding :
module_binding ->
module_binding list -> module_binding list
val list_of_match_case :
match_case -> match_case list -> match_case list
val list_of_ident : ident -> ident list -> ident list
val safe_string_escaped : string -> string
val is_irrefut_patt : patt -> bool
val is_constructor : ident -> bool
val is_patt_constructor : patt -> bool
val is_expr_constructor : expr -> bool
val ty_of_stl : Loc.t * string * ctyp list -> ctyp
val ty_of_sbt : Loc.t * string * bool * ctyp -> ctyp
val bi_of_pe : patt * expr -> binding
val pel_of_binding : binding -> (patt * expr) list
val binding_of_pel : (patt * expr) list -> binding
val sum_type_of_list :
(Loc.t * string * ctyp list) list -> ctyp
val record_type_of_list :
(Loc.t * string * bool * ctyp) list -> ctyp
end
type 'a filter = 'a -> 'a
val register_sig_item_filter : Ast.sig_item filter -> unit
val register_str_item_filter : Ast.str_item filter -> unit
val register_topphrase_filter : Ast.str_item filter -> unit
val fold_interf_filters :
('a -> Ast.sig_item filter -> 'a) -> 'a -> 'a
val fold_implem_filters :
('a -> Ast.str_item filter -> 'a) -> 'a -> 'a
val fold_topphrase_filters :
('a -> Ast.str_item filter -> 'a) -> 'a -> 'a
end
end
module Camlp4Ast2OCamlAst :
sig
module Make :
functor (Camlp4Ast : Sig.Camlp4Ast) ->
sig
val sig_item :
Camlp4Ast.sig_item -> Camlp4_import.Parsetree.signature
val str_item :
Camlp4Ast.str_item -> Camlp4_import.Parsetree.structure
val phrase :
Camlp4Ast.str_item -> Camlp4_import.Parsetree.toplevel_phrase
end
end
module CleanAst :
sig
module Make :
functor (Ast : Sig.Camlp4Ast) ->
sig
class clean_ast :
object ('a)
method binding : Ast.binding -> Ast.binding
method class_expr : Ast.class_expr -> Ast.class_expr
method class_sig_item :
Ast.class_sig_item -> Ast.class_sig_item
method class_str_item :
Ast.class_str_item -> Ast.class_str_item
method class_type : Ast.class_type -> Ast.class_type
method ctyp : Ast.ctyp -> Ast.ctyp
method direction_flag :
Ast.direction_flag -> Ast.direction_flag
method expr : Ast.expr -> Ast.expr
method ident : Ast.ident -> Ast.ident
method list : ('a -> 'b -> 'c) -> 'b list -> 'c list
method loc : Ast.loc -> Ast.loc
method match_case : Ast.match_case -> Ast.match_case
method meta_bool : Ast.meta_bool -> Ast.meta_bool
method meta_list :
('a -> 'd -> 'e) -> 'd Ast.meta_list -> 'e Ast.meta_list
method meta_option :
('a -> 'f -> 'g) ->
'f Ast.meta_option -> 'g Ast.meta_option
method module_binding :
Ast.module_binding -> Ast.module_binding
method module_expr : Ast.module_expr -> Ast.module_expr
method module_type : Ast.module_type -> Ast.module_type
method mutable_flag : Ast.mutable_flag -> Ast.mutable_flag
method override_flag : Ast.override_flag -> Ast.override_flag
method patt : Ast.patt -> Ast.patt
method private_flag : Ast.private_flag -> Ast.private_flag
method rec_binding : Ast.rec_binding -> Ast.rec_binding
method rec_flag : Ast.rec_flag -> Ast.rec_flag
method row_var_flag : Ast.row_var_flag -> Ast.row_var_flag
method sig_item : Ast.sig_item -> Ast.sig_item
method str_item : Ast.str_item -> Ast.str_item
method string : string -> string
method unknown : 'h -> 'h
method virtual_flag : Ast.virtual_flag -> Ast.virtual_flag
method with_constr : Ast.with_constr -> Ast.with_constr
end
end
end
module CommentFilter :
sig
module Make :
functor (Token : Sig.Camlp4Token) ->
sig
type t
val mk : unit -> Camlp4.Struct.??.Make.t
val define : Token.Filter.t -> Camlp4.Struct.??.Make.t -> unit
val filter :
Camlp4.Struct.??.Make.t ->
(Token.t * Token.Loc.t) Stream.t ->
(Token.t * Token.Loc.t) Stream.t
val take_list :
Camlp4.Struct.??.Make.t -> (string * Token.Loc.t) list
val take_stream :
Camlp4.Struct.??.Make.t -> (string * Token.Loc.t) Stream.t
end
end
module DynLoader :
sig
type t
exception Error of string * string
val mk : ?ocaml_stdlib:bool -> ?camlp4_stdlib:bool -> unit -> t
val fold_load_path : t -> (string -> 'a -> 'a) -> 'a -> 'a
val load : t -> string -> unit
val include_dir : t -> string -> unit
val find_in_path : t -> string -> string
val is_native : bool
end
module EmptyError :
sig
type t
exception E of t
val to_string : t -> string
val print : Format.formatter -> t -> unit
end
module EmptyPrinter :
sig module Make : functor (Ast : Sig.Ast) -> Sig.Printer(Ast).S end
module FreeVars :
sig
module Make :
functor (Ast : Sig.Camlp4Ast) ->
sig
module S :
sig
type elt = string
type t
val empty : t
val is_empty : t -> bool
val mem : elt -> t -> bool
val add : elt -> t -> t
val singleton : elt -> t
val remove : elt -> t -> t
val union : t -> t -> t
val inter : t -> t -> t
val diff : t -> t -> t
val compare : t -> t -> int
val equal : t -> t -> bool
val subset : t -> t -> bool
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (elt -> bool) -> t -> bool
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val partition : (elt -> bool) -> t -> t * t
val cardinal : t -> int
val elements : t -> elt list
val min_elt : t -> elt
val max_elt : t -> elt
val choose : t -> elt
val split : elt -> t -> t * bool * t
end
val fold_binding_vars :
(string -> 'a -> 'a) -> Ast.binding -> 'a -> 'a
class ['a] c_fold_pattern_vars :
(string -> 'a -> 'a) ->
'a ->
object ('b)
val acc : 'a
method acc : 'a
method binding : Ast.binding -> 'b
method class_expr : Ast.class_expr -> 'b
method class_sig_item : Ast.class_sig_item -> 'b
method class_str_item : Ast.class_str_item -> 'b
method class_type : Ast.class_type -> 'b
method ctyp : Ast.ctyp -> 'b
method direction_flag : Ast.direction_flag -> 'b
method expr : Ast.expr -> 'b
method ident : Ast.ident -> 'b
method list : ('b -> 'c -> 'b) -> 'c list -> 'b
method loc : Ast.loc -> 'b
method match_case : Ast.match_case -> 'b
method meta_bool : Ast.meta_bool -> 'b
method meta_list : ('b -> 'd -> 'b) -> 'd Ast.meta_list -> 'b
method meta_option :
('b -> 'e -> 'b) -> 'e Ast.meta_option -> 'b
method module_binding : Ast.module_binding -> 'b
method module_expr : Ast.module_expr -> 'b
method module_type : Ast.module_type -> 'b
method mutable_flag : Ast.mutable_flag -> 'b
method override_flag : Ast.override_flag -> 'b
method patt : Ast.patt -> 'b
method private_flag : Ast.private_flag -> 'b
method rec_binding : Ast.rec_binding -> 'b
method rec_flag : Ast.rec_flag -> 'b
method row_var_flag : Ast.row_var_flag -> 'b
method sig_item : Ast.sig_item -> 'b
method str_item : Ast.str_item -> 'b
method string : string -> 'b
method unknown : 'f -> 'b
method virtual_flag : Ast.virtual_flag -> 'b
method with_constr : Ast.with_constr -> 'b
end
val fold_pattern_vars :
(string -> 'a -> 'a) -> Ast.patt -> 'a -> 'a
class ['a] fold_free_vars :
(string -> 'a -> 'a) ->
?env_init:Camlp4.Struct.??.Make.S.t ->
'a ->
object ('b)
val env : Camlp4.Struct.??.Make.S.t
val free : 'a
method add_atom : string -> 'b
method add_binding : Ast.binding -> 'b
method add_patt : Ast.patt -> 'b
method binding : Ast.binding -> 'b
method class_expr : Ast.class_expr -> 'b
method class_sig_item : Ast.class_sig_item -> 'b
method class_str_item : Ast.class_str_item -> 'b
method class_type : Ast.class_type -> 'b
method ctyp : Ast.ctyp -> 'b
method direction_flag : Ast.direction_flag -> 'b
method expr : Ast.expr -> 'b
method free : 'a
method ident : Ast.ident -> 'b
method list : ('b -> 'c -> 'b) -> 'c list -> 'b
method loc : Ast.loc -> 'b
method match_case : Ast.match_case -> 'b
method meta_bool : Ast.meta_bool -> 'b
method meta_list : ('b -> 'd -> 'b) -> 'd Ast.meta_list -> 'b
method meta_option :
('b -> 'e -> 'b) -> 'e Ast.meta_option -> 'b
method module_binding : Ast.module_binding -> 'b
method module_expr : Ast.module_expr -> 'b
method module_type : Ast.module_type -> 'b
method mutable_flag : Ast.mutable_flag -> 'b
method override_flag : Ast.override_flag -> 'b
method patt : Ast.patt -> 'b
method private_flag : Ast.private_flag -> 'b
method rec_binding : Ast.rec_binding -> 'b
method rec_flag : Ast.rec_flag -> 'b
method row_var_flag : Ast.row_var_flag -> 'b
method set_env : Camlp4.Struct.??.Make.S.t -> 'b
method sig_item : Ast.sig_item -> 'b
method str_item : Ast.str_item -> 'b
method string : string -> 'b
method unknown : 'f -> 'b
method virtual_flag : Ast.virtual_flag -> 'b
method with_constr : Ast.with_constr -> 'b
end
val free_vars :
Camlp4.Struct.??.Make.S.t ->
Ast.expr -> Camlp4.Struct.??.Make.S.t
end
end
module Grammar :
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
end