A set of auxiliary parser utilities.
- atMost :: Alternative f => Int -> f α -> f [α]
- finishOff :: Parser α -> Parser α
- skipManyTill :: Alternative f => f α -> f β -> f ()
- skipWhile1 :: (Char -> Bool) -> Parser ()
- skipSpace1 :: Parser ()
- isAlphaNum :: Char -> Bool
Documentation
atMost :: Alternative f => Int -> f α -> f [α]Source
is like atMost
n v
but accumulates P.many
vv
at most
n
times.
skipManyTill :: Alternative f => f α -> f β -> f ()Source
Similar to manyTill
but discards the result.
skipWhile1 :: (Char -> Bool) -> Parser ()Source
Similar to skipWhile
but consumes at least one character.
skipSpace1 :: Parser ()Source
Similar to skipSpace
but consumes at least one whitespace.
isAlphaNum :: Char -> BoolSource
returns isAlphaNum
cTrue
iff
.
isDigit
c ||
isAlpha_ascii
c