`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 -> token Stream.t
type lexer_error =
BatGenlex.lexer_error =
IllegalCharacter of char
| NotReallyAChar
| NotReallyAnEscape
| EndOfStream
exception LexerError of lexer_error * int
type t = BatGenlex.t
val of_list : string list -> t
val to_stream_filter : t -> char Stream.t -> token Stream.t
val to_enum_filter : t -> char BatEnum.t -> token BatEnum.t
val to_lazy_list_filter : t -> char BatLazyList.t -> token BatLazyList.t
val string_of_token : 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 :
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 C :
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
end
module Make :
functor (M : Definition) ->
sig
val feed :
(char, BatCharParser.position) BatParserCo.Source.t ->
(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`