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 s -> x) -> x) -> (FailureInfo s -> x) -> x
- data Result (g :: (* -> *) -> *) s v
- = Parsed {
- parsedPrefix :: !v
- parsedSuffix :: !s
- | NoParse (FailureInfo s)
- = 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 | |
|