newtype Parser i o
seq combinator takes a parser, and a function which will receive
the result of that parser if it succeeds, and which should return another
parser, which will be run immediately after the initial parser. In this
way, you can join parsers together in a sequence, producing more complex
This is equivalent to the monadic
either combinator takes two parsers, runs the first on the input
stream, and if that fails, it will backtrack and attempt the second
parser on the same input. Basically, try parser 1, then try parser 2.
If the first parser fails with an error flagged as fatal (see
the second parser will not be attempted.
This is equivalent to the
alt operation of
many combinator takes a parser, and returns a new parser which will
run the parser repeatedly on the input stream until it fails, returning
a list of the result values of each parse operation as its result, or the
empty list if the parser never succeeded.
Read that as "match this parser zero or more times and give me a list of the results."