Copyright | Bryan O'Sullivan 2007-2015 |
---|---|

License | BSD3 |

Maintainer | bos@serpentine.com |

Stability | experimental |

Portability | unknown |

Safe Haskell | None |

Language | Haskell98 |

Simple, efficient parser combinators, loosely based on the Parsec library.

- compareResults :: (Eq i, Eq r) => IResult i r -> IResult i r -> Maybe Bool
- prompt :: Chunk t => State t -> Pos -> More -> (State t -> Pos -> More -> IResult t r) -> (State t -> Pos -> More -> IResult t r) -> IResult t r
- demandInput :: Chunk t => Parser t ()
- demandInput_ :: Chunk t => Parser t t
- wantInput :: forall t. Chunk t => Parser t Bool
- endOfInput :: forall t. Chunk t => Parser t ()
- atEnd :: Chunk t => Parser t Bool
- satisfyElem :: forall t. Chunk t => (ChunkElem t -> Bool) -> Parser t (ChunkElem t)

# Documentation

prompt :: Chunk t => State t -> Pos -> More -> (State t -> Pos -> More -> IResult t r) -> (State t -> Pos -> More -> IResult t r) -> IResult t r Source

Ask for input. If we receive any, pass the augmented input to a success continuation, otherwise to a failure continuation.

demandInput :: Chunk t => Parser t () Source

Immediately demand more input via a `Partial`

continuation
result.

demandInput_ :: Chunk t => Parser t t Source

Immediately demand more input via a `Partial`

continuation
result. Return the new input.

endOfInput :: forall t. Chunk t => Parser t () Source

Match only if all input has been consumed.