module CharParser: BatCharParsertype position = {
|
offset : |
(* |
Offset on the line (starting at 0)
| *) |
|
line : |
(* |
Line number (starting at 0)
| *) |
val advance : char -> position -> position
advance c p returns a new position advanced by one char. If c is '\r' or '\n',
the result is {offset = 0; line = p.line + 1}. Other wise, the result is
{offset = p.offset + 1; line = p.line}.
val source_of_string : string -> (char, position) BatParserCo.Source.tval source_of_enum : char BatEnum.t -> (char, position) BatParserCo.Source.tval parse : (char, 'a, position) BatParserCo.t ->
string ->
('a, position BatParserCo.report) BatPervasives.resultval char : char -> (char, char, position) BatParserCo.tval none_of : char list -> (char, char, position) BatParserCo.tParserCo.none_of, just with improved error message.val not_char : char -> (char, char, position) BatParserCo.tnone_of.val string : string -> (char, string, position) BatParserCo.tval case_char : char -> (char, char, position) BatParserCo.tchar, but case-insensitiveval case_string : string -> (char, string, position) BatParserCo.tcase_string, but case-insensitiveval newline : (char, char, position) BatParserCo.tval whitespace : (char, char, position) BatParserCo.tval uppercase : (char, char, position) BatParserCo.tval lowercase : (char, char, position) BatParserCo.tval letter : (char, char, position) BatParserCo.tval uppercase_latin1 : (char, char, position) BatParserCo.tval lowercase_latin1 : (char, char, position) BatParserCo.tval latin1 : (char, char, position) BatParserCo.tval digit : (char, char, position) BatParserCo.tval hex : (char, char, position) BatParserCo.t