incremental-parser-0.2.2: Generic parser library capable of providing partial results from partial input.

Safe HaskellNone



This module defines incremental parsers.

The exported Parser type can provide partial parsing results from partial input, as long as the output is a Monoid. Construct a parser using the primitives and combinators, supply it with input using functions feed and feedEof, and extract the parsed output using results.

Implementation is based on Brzozowski derivatives.



data Symmetric Source

An empty type to specialize Parser for the symmetric Alternative instance.


Monoid s => MonadPlus (Parser Symmetric s)

The MonadPlus instances are the same as the Alternative instances.

Monoid s => Alternative (Parser Symmetric s)

The symmetric version of the <|> choice combinator.

allOf :: Parser s r -> Parser a s rSource