Safe Haskell | None |
---|---|
Language | Haskell2010 |
Packrat parser
- 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
- = 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 Parser
. The parse
function returns an input
prefix parse paired with the remaining input suffix.
Parser | |
|
GrammarParsing Parser Source # | |
MultiParsing Parser Source # | Packrat parser
|
MonoidParsing (Parser g) Source # | |
Monad (Parser g s) Source # | |
Functor (Parser g s) Source # | |
Applicative (Parser g s) Source # | |
Alternative (Parser g s) Source # | |
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 GrammarFunctor Parser Source # | |
type ResultFunctor Parser Source # | |
type GrammarConstraint Parser g Source # | |