Theorems for ParseIt.Char.Basic
char c succeeds with c when the next character is c, consuming input; otherwise it fails
with an unexpected error annotated with expected c.
string tk succeeds with tk when the input starts with tk, consuming input if tk is
non-empty; otherwise it fails with an unexpected error annotated with expected tk.
space succeeds with ' ' when the next character is a space (U+0020), consuming input;
otherwise it fails with an unexpected error annotated with expected space (U+0020).
tab succeeds with '\t' when the next character is a horizontal tab (U+0009), consuming input;
otherwise it fails with an unexpected error annotated with expected horizontal tab (U+0009).
ASCII.lf succeeds with '\n' when the next character is a line feed (U+000A), consuming
input; otherwise it fails with an unexpected error annotated with expected line feed (U+000A).
ASCII.cr succeeds with '\r' when the next character is a carriage return (U+000D),
consuming input; otherwise it fails with an unexpected error annotated with
expected carriage return (U+000D).
eol succeeds with '\n' on a line feed, optionally preceded by a carriage return, consuming
input. Otherwise it fails with the error e₁ of cr *> lf (a failed cr at it, or a failed
lf after a cr) merged with the error of lf at it, annotated with expected newline.
ASCII.whitespace succeeds with a whitespace character t (space or U+0009 to U+000D), consuming input; otherwise it fails with an
unexpected error annotated with expected whitespace character.
ASCII.uppercase succeeds with an uppercase letter t (A to Z), consuming input;
otherwise it fails with an unexpected error annotated with
expected uppercase letter character.
ASCII.lowercase succeeds with a lowercase letter t (a to z), consuming input; otherwise it fails with an
unexpected error annotated with expected lowercase letter character.
ASCII.alpha succeeds with an alphabetic character t (A to Z or a to z), consuming input; otherwise it fails with an
unexpected error annotated with expected alphabetic character.
ASCII.numeric succeeds with a decimal digit character t (0 to 9), consuming input; otherwise it fails with an
unexpected error annotated with expected decimal digit character.
ASCII.alphanum succeeds with a letter or digit character t (A to Z, a to z or 0 to 9), consuming input; otherwise it fails with an
unexpected error annotated with expected letter or digit character.
ASCII.control succeeds with a control character t (U+0000 to U+001F or U+007F), consuming input; otherwise it fails with an
unexpected error annotated with expected control character.
withErrorMessage msg (tokenMap f) reads one character t and succeeds with a when
f t = some a, consuming input; otherwise it fails with an unexpected error annotated with
msg.
ASCII.digit succeeds with the value of a decimal digit (0 to 9), consuming input; otherwise it
fails with an unexpected error annotated with expected decimal digit.
ASCII.binDigit succeeds with the value of a binary digit (0 or 1), consuming input; otherwise it
fails with an unexpected error annotated with expected binary digit.
ASCII.octDigit succeeds with the value of an octal digit (0 to 7), consuming input; otherwise it
fails with an unexpected error annotated with expected octal digit.
ASCII.hexDigit succeeds with the value of a hexadecimal digit (0 to 9, A to F or a to f), consuming input; otherwise it
fails with an unexpected error annotated with expected hexadecimal digit.