|
|
|
Description |
Yet another parser combinator. This is mostly a subset of
Text.ParserCombinators.Parsec but there are some differences:
- This parser works on Data.ByteString.Base.LazyByteString
instead of String.
- Backtracking is the only possible behavior so there is no "try"
action.
- On success, the remaining string is returned as well as the
parser result.
- You can choose whether to treat reaching EOF (trying to eat one
more letter at the end of string) a fatal error or to treat it a
normal failure. If a fatal error occurs, the entire parsing
process immediately fails without trying any backtracks. The
default behavior is to treat EOF fatal.
In general, you don't have to use this module directly.
|
|
Synopsis |
|
|
|
Documentation |
|
|
Parser a is obviously a parser which parses and returns a.
| Instances | |
|
|
|
Constructors | Success !a | | IllegalInput | | ReachedEOF | |
| Instances | |
|
|
|
failP is just a synonym for fail
undefined.
|
|
|
parse p bstr parses bstr with p and returns (# result,
remaining #).
|
|
|
parseStr p str packs str and parses it.
|
|
|
|
|
|
|
allowEOF p makes p treat reaching EOF a normal failure.
|
|
|
|
|
|
|
|
|
This is the backtracking alternation. There is no non-backtracking
equivalent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Produced by Haddock version 2.4.2 |