`sig
type token =
Genlex.token =
Kwd of string
| Ident of string
| Int of int
| Float of float
| String of string
| Char of char
val make_lexer : string list -> char Stream.t -> BatGenlex.token Stream.t
type lexer_error =
IllegalCharacter of char
| NotReallyAChar
| NotReallyAnEscape
| EndOfStream
exception LexerError of BatGenlex.lexer_error * int
type t
val of_list : string list -> BatGenlex.t
val to_stream_filter :
BatGenlex.t -> char Stream.t -> BatGenlex.token Stream.t
val to_enum_filter :
BatGenlex.t -> char BatEnum.t -> BatGenlex.token BatEnum.t
val to_lazy_list_filter :
BatGenlex.t -> char BatLazyList.t -> BatGenlex.token BatLazyList.t
val string_of_token : BatGenlex.token -> string
module Languages :
sig
module type Definition =
sig
val comment_delimiters : (string * string) option
val line_comment_start : string option
val nested_comments : bool
val ident_start :
(char, char, BatCharParser.position) BatParserCo.t
val ident_letter :
(char, char, BatCharParser.position) BatParserCo.t
val op_start : (char, char, BatCharParser.position) BatParserCo.t
val op_letter : (char, char, BatCharParser.position) BatParserCo.t
val reserved_names : string list
val case_sensitive : bool
end
module Library :
sig module OCaml : Definition module C : Definition end
module Make :
functor (M : Definition) ->
sig
val feed :
(char, BatCharParser.position) BatParserCo.Source.t ->
(BatGenlex.token, BatCharParser.position) BatParserCo.Source.t
val start : (char, unit, BatCharParser.position) BatParserCo.t
val ident : (char, string, BatCharParser.position) BatParserCo.t
val kwd : (char, string, BatCharParser.position) BatParserCo.t
val identifier :
string -> (char, unit, BatCharParser.position) BatParserCo.t
val keyword :
string -> (char, unit, BatCharParser.position) BatParserCo.t
val char_literal :
(char, char, BatCharParser.position) BatParserCo.t
val string_literal :
(char, string, BatCharParser.position) BatParserCo.t
val integer : (char, int, BatCharParser.position) BatParserCo.t
val float : (char, float, BatCharParser.position) BatParserCo.t
val number :
(char, [ `Float of float | `Integer of int ],
BatCharParser.position)
BatParserCo.t
val char :
char -> (char, char, BatCharParser.position) BatParserCo.t
val string :
string -> (char, string, BatCharParser.position) BatParserCo.t
val line_comment :
(char, unit, BatCharParser.position) BatParserCo.t
val multiline_comment :
(char, unit, BatCharParser.position) BatParserCo.t
val comment : (char, unit, BatCharParser.position) BatParserCo.t
val whitespaces :
(char, unit, BatCharParser.position) BatParserCo.t
end
end
end`