| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Text.Grampa.ContextFree.Continued
Description
Continuation-passing parser for context-free grammars
- newtype Parser g s r = Parser {
- applyParser :: forall x. s -> (r -> s -> (FailureInfo -> x) -> x) -> (FailureInfo -> x) -> x
- data Result g s v
- = Parsed {
- parsedPrefix :: !v
- parsedSuffix :: !s
- | NoParse FailureInfo
- = Parsed {
- alt :: forall g s a. Parser g s a -> Parser g s a -> Parser g s a
Documentation
Parser type for context-free grammars that uses a continuation-passing algorithm, fast for grammars in LL(1) class but with potentially exponential performance for longer ambiguous prefixes.
Constructors
| Parser | |
Fields
| |
Instances
| MultiParsing Parser Source # | Continuation-passing context-free parser
|
| MonoidParsing (Parser g) Source # | |
| Monad (Parser g s) Source # | |
| Functor (Parser g s) Source # | |
| Applicative (Parser g s) Source # | |
| FactorialMonoid s => Alternative (Parser g s) Source # | |
| FactorialMonoid s => MonadPlus (Parser g s) Source # | |
| (Show s, TextualMonoid s) => TokenParsing (Parser g s) Source # | |
| (Show s, TextualMonoid s) => CharParsing (Parser g s) Source # | |
| FactorialMonoid s => LookAheadParsing (Parser g s) Source # | |
| FactorialMonoid s => Parsing (Parser g s) Source # | |
| Monoid x => Monoid (Parser g s x) Source # | |
| type ResultFunctor Parser Source # | |
| type GrammarConstraint Parser g Source # | |
Constructors
| Parsed | |
Fields
| |
| NoParse FailureInfo | |