primitives
satisfy
A parser that satisfies a predicate. Useful as a building block for writing things like char(), digit()...
skipWhile
Skip 0 or more characters as long as the predicate holds.
skipWhile1
Skip 1 or more characters as long as the predicate holds.
takeWhile
Keep parsing 0 or more characters as long as the predicate holds.
takeWhile1
Keep parsing 1 or more characters as long as the predicate holds.
anySingle
Parse and return a single character of anything.
anything
Parse and return a single character of anything.
anySingleBut
Match any character but the given one.
oneOf
Succeeds if the current character is in the supplied list of characters. Returns the parsed character.
oneOfS
A compact form of 'oneOf'. oneOfS("abc") == oneOf(['a', 'b', 'c'])
noneOf
The dual of 'oneOf'. Succeeds if the current character is not in the supplied list of characters. Returns the parsed character.
noneOfS
A compact form of 'noneOf'. noneOfS("abc") == noneOf(['a', 'b', 'c'])
takeRest
Consume the rest of the input and return it as a string. This parser never fails, but may return the empty string.
nothing
Parse nothing, but still succeed.
This serves as the zero parser in append()
operations.
everything
Parse everything; that is, consume the rest of the input until the end.
success
Always succeed, no matter what the input was.
failure
Always fail, no matter what the input was.
eof
Parse the end of the input