class (Functor p, Applicative p, Alternative p, Monad p) => ParserClass (p :: Type -> Type) k r tok | p -> k, p -> r, p -> tok whereMethods
parse :: p a -> [tok] -> [a]Runs the parser.
grammar :: Show k => p a -> DocTries to print the parser, or returns
PP.empty, depending on the implementation. This function might not terminate.sat' :: (tok -> Maybe a) -> p aParses a token satisfying the given predicate. The computed value is returned.
annotate :: (DocP -> DocP) -> p a -> p aUses the given function to modify the printed representation (if any) of the given parser.
memoise :: (Eq k, Hashable k, Show k) => k -> p r -> p rMemoises the given parser.
Every memoised parser must be annotated with a unique key. (Parametrised parsers must use distinct keys for distinct inputs.)
memoiseIfPrinting :: (Eq k, Hashable k, Show k) => k -> p r -> p rMemoises the given parser, but only if printing, not if parsing.
Every memoised parser must be annotated with a unique key. (Parametrised parsers must use distinct keys for distinct inputs.)
Instances2ParserClass
ParserClass (Parser k r tok) k r tokDefined in Agda-2.7.0.1 · Agda.Utils.Parser.MemoisedCPSParserClass (ParserWithGrammar k r tok) k r tokDefined in Agda-2.7.0.1 · Agda.Utils.Parser.MemoisedCPS