Safe Haskell | None |
---|---|
Language | Haskell2010 |
Continuation-passing parser for context-free grammars
Synopsis
- 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
newtype Parser (g :: (* -> *) -> *) s r Source #
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.
Parser | |
|