Safe Haskell | None |
---|---|
Language | Haskell2010 |
Packrat parser
Synopsis
- newtype Parser g s r = Parser {
- applyParser :: [(s, g (Result g s))] -> Result g s r
- data Result g s v
- = Parsed {
- parsedPrefix :: !v
- parsedSuffix :: ![(s, g (Result g s))]
- | NoParse (FailureInfo s)
- = Parsed {
Documentation
Parser type for Parsing Expression Grammars that uses an improved packrat algorithm, with O(1) performance bounds
but with worse constants and more memory consumption than the backtracking Parser
. The
parse
function returns an input prefix parse paired with the remaining input suffix.
Parser | |
|
Instances
Parsed | |
| |
NoParse (FailureInfo s) |