Simple, efficient parser combinators for strings, loosely based on the Parsec library.
The core parser type. This is parameterised over the type
string being processed.
This type is an instance of the following classes:
failthrows an exception (i.e. fails) with an error message.
Applicative, which follow the usual definitions.
mzerofails (with no error message) and
mplusexecutes the right-hand parser if the left-hand one fails. When the parser on the right executes, the input is reset to the same state as the parser on the left started with. (In other words, Attoparsec is a backtracking parser that supports arbitrary lookahead.)
Alternative, which follows
|Monad (Parser t)|
|Functor (Parser t)|
|(Monad (Parser t), Monoid t) => MonadPlus (Parser t)|
|~ * a ByteString => IsString (Parser a)|
|~ * a Text => IsString (Parser a)|
|Functor (Parser t) => Applicative (Parser t)|
|(Applicative (Parser t), Monoid t) => Alternative (Parser t)|
|Monoid t => Monoid (Parser t a)|
The result of a parse. This is parameterised over the type
of string that was processed.
|Fail t [String] String|
The parse failed. The
|Partial (t -> IResult t r)|
Supply this continuation with more input so that the parser can resume. To indicate that no more input is available, use an empty string.
|Done t r|
The parse succeeded. The