sig
type pattern = string * string
exception Error of string
type 'a lexer = {
tok_func : 'a Plexing.lexer_func;
tok_using : Plexing.pattern -> unit;
tok_removing : Plexing.pattern -> unit;
mutable tok_match : Plexing.pattern -> 'a -> string;
tok_text : Plexing.pattern -> string;
mutable tok_comm : Ploc.t list option;
}
and 'a lexer_func =
char Stream.t -> 'a Stream.t * Plexing.location_function
and location_function = int -> Ploc.t
val lexer_text : Plexing.pattern -> string
val default_match : Plexing.pattern -> string * string -> string
val lexer_func_of_parser :
(char Stream.t * int Pervasives.ref * int Pervasives.ref -> 'a * Ploc.t) ->
'a Plexing.lexer_func
val lexer_func_of_ocamllex : (Lexing.lexbuf -> 'a) -> 'a Plexing.lexer_func
val make_stream_and_location :
(unit -> 'a * Ploc.t) -> 'a Stream.t * Plexing.location_function
val eval_char : string -> char
val eval_string : Ploc.t -> string -> string
val restore_lexing_info : (int * int) option Pervasives.ref
val line_nb : int Pervasives.ref Pervasives.ref
val bol_pos : int Pervasives.ref Pervasives.ref
module Lexbuf :
sig
type t
val empty : Plexing.Lexbuf.t
val add : char -> Plexing.Lexbuf.t -> Plexing.Lexbuf.t
val get : Plexing.Lexbuf.t -> string
end
end