Safe Haskell | None |
---|---|
Language | Haskell2010 |
Text.Cassette.Char
Description
Commonly used character-oriented combinators.
Synopsis
- oneOf :: [Char] -> PP Char
- noneOf :: [Char] -> PP Char
- skip :: (Char -> Bool) -> Char -> PP0
- skipSpace :: PP0
- optSpace :: PP0
- sepSpace :: PP0
- space :: PP0
- newline :: PP0
- tab :: PP0
- upper :: PP Char
- lower :: PP Char
- alphaNum :: PP Char
- letter :: PP Char
- digit :: PP Char
- hexDigit :: PP Char
- octDigit :: PP Char
- anyChar :: PP Char
- char :: Char -> PP0
Documentation
oneOf :: [Char] -> PP Char Source #
Succeeds if the current character is in the supplied list of characters.
See also satisfy
.
vowel = oneOf "aeiou"
skipSpace
marks a position where whitespace is allowed to occur. It
accepts arbitrary space while parsing, and produces no space while printing.
optSpace
marks a position where whitespace is desired to occur. It
accepts arbitrary space while parsing, and produces a single space character
while printing.
sepSpace
marks a position where whitespace is required to occur. It
requires one or more space characters while parsing, and produces a single
space character while printing.