module Future.UChar_parser: Extlib.UCharParser
Parsing unicode text
This module defines common functions for parsing Unicode
texts. These functions are meant to be used in conjunction with
the Future.Parser_co
module.
Note As ParserCo, this module is still very rough and needs testing.
Author(s): David Teller
typeposition =
Future.Char_parser.position
= {
|
offset : |
(* | Offset on the line (starting at 0) | *) |
|
line : |
(* | Line number (starting at 0) | *) |
val advance : UChar.t ->
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_rope : Rope.t ->
(UChar.t, position)
Future.Parser_co.Source.t
val source_of_enum : UChar.t Enum.t ->
(UChar.t, position)
Future.Parser_co.Source.t
val parse : (UChar.t, 'a, position) Future.Parser_co.t ->
Rope.t ->
('a, position Future.Parser_co.report) Extlib.Std.result
val char : UChar.t ->
(UChar.t, UChar.t,
position)
Future.Parser_co.t
val none_of : UChar.t list ->
(UChar.t, UChar.t,
position)
Future.Parser_co.t
ParserCo.none_of
, just with improved error message.val not_char : UChar.t ->
(UChar.t, UChar.t,
position)
Future.Parser_co.t
none_of
.val string : string ->
(UChar.t, string, position)
Future.Parser_co.t
val rope : Rope.t ->
(UChar.t, Rope.t, position)
Future.Parser_co.t
val ustring : UTF8.t ->
(UChar.t, UTF8.t, position)
Future.Parser_co.t
val case_char : UChar.t ->
(UChar.t, UTF8.t, position)
Future.Parser_co.t
char
, but case-insensitiveval case_string : string ->
(UChar.t, string, position)
Future.Parser_co.t
string
, but case-insensitiveval case_ustring : UTF8.t ->
(UChar.t, UTF8.t, position)
Future.Parser_co.t
ustring
, but case-insensitiveval case_rope : Rope.t ->
(UChar.t, Rope.t, position)
Future.Parser_co.t
rope
, but case-insensitiveval newline : (UChar.t, UChar.t,
position)
Future.Parser_co.t
val whitespace : (UChar.t, UChar.t,
position)
Future.Parser_co.t
val uppercase : (UChar.t, UChar.t,
position)
Future.Parser_co.t
val lowercase : (UChar.t, UChar.t,
position)
Future.Parser_co.t
val letter : (UChar.t, UChar.t,
position)
Future.Parser_co.t
val digit : (UChar.t, UChar.t,
position)
Future.Parser_co.t
val hex : (UChar.t, UChar.t,
position)
Future.Parser_co.t