Token Parsers

token p first applies parser p and then the whiteSpace
parser, returning the value of p. Every lexical
token (token) is defined using token, this way every parse
starts at a point without white space. Parsers that use token are
called token parsers in this document.

The only point where the whiteSpace parser should be
called explicitly is the start of the main parser in order to skip
any leading white space.

This token parser parses a single literal character. Returns the
literal character value. This parsers deals correctly with escape
sequences. The literal character is parsed according to the grammar
rules defined in the Haskell report (which matches most programming
languages quite closely).

This token parser parses a literal string. Returns the literal
string value. This parsers deals correctly with escape sequences and
gaps. The literal string is parsed according to the grammar rules
defined in the Haskell report (which matches most programming
languages quite closely).

This token parser parses a natural number (a positive whole
number). Returns the value of the number. The number can be
specified in decimal, hexadecimal or
octal. The number is parsed according to the grammar
rules in the Haskell report.

This token parser parses an integer (a whole number). This parser
is like natural except that it can be prefixed with
sign (i.e. '-' or '+'). Returns the value of the number. The
number can be specified in decimal, hexadecimal
or octal. The number is parsed according
to the grammar rules in the Haskell report.

This token parser parses either natural or a float.
Returns the value of the number. This parsers deals with
any overlap in the grammar rules for naturals and floats. The number
is parsed according to the grammar rules defined in the Haskell report.