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