module Future.CharParser: Extlib.CharParserParsing character strings.
This module defines common functions for parsing character strings,
encoded in Latin-1. These functions are meant to be used in conjunction
with the Future.ParserCo module.
Note As ParserCo, this module is still very rough and needs testing.
Author(s): David Teller
type 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) Future.ParserCo.Source.tval source_of_enum : char Enum.t ->
(char, position) Future.ParserCo.Source.tval parse : (char, 'a, position) Future.ParserCo.t ->
string ->
('a, position Future.ParserCo.report) Extlib.Std.resultval char : char -> (char, char, position) Future.ParserCo.tval none_of : char list -> (char, char, position) Future.ParserCo.tParserCo.none_of, just with improved error message.val not_char : char -> (char, char, position) Future.ParserCo.tnone_of.val string : string -> (char, string, position) Future.ParserCo.tval case_char : char -> (char, char, position) Future.ParserCo.tchar, but case-insensitiveval case_string : string -> (char, string, position) Future.ParserCo.tcase_string, but case-insensitiveval newline : (char, char, position) Future.ParserCo.tval whitespace : (char, char, position) Future.ParserCo.tval uppercase : (char, char, position) Future.ParserCo.tval lowercase : (char, char, position) Future.ParserCo.tval letter : (char, char, position) Future.ParserCo.tval uppercase_latin1 : (char, char, position) Future.ParserCo.tval lowercase_latin1 : (char, char, position) Future.ParserCo.tval latin1 : (char, char, position) Future.ParserCo.tval digit : (char, char, position) Future.ParserCo.tval hex : (char, char, position) Future.ParserCo.t