cassette-0.2.0: A combinator library for simultaneously defining parsers and pretty printers.
Safe HaskellNone
LanguageHaskell2010

Text.Cassette.Char

Description

Commonly used character-oriented combinators.

Synopsis

Documentation

oneOf :: [Char] -> PP Char Source #

Succeeds if the current character is in the supplied list of characters. See also satisfy.

vowel = oneOf "aeiou"

noneOf :: [Char] -> PP Char Source #

Dual of oneOf.

skip :: (Char -> Bool) -> Char -> PP0 Source #

The satisfy combinator, but unset.

skipSpace :: PP0 Source #

skipSpace marks a position where whitespace is allowed to occur. It accepts arbitrary space while parsing, and produces no space while printing.

optSpace :: PP0 Source #

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 :: PP0 Source #

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.

space :: PP0 Source #

A single space character (' ').

newline :: PP0 Source #

A single newline character ('\n').

tab :: PP0 Source #

A single tab character ('\t').

upper :: PP Char Source #

An upper-case Unicode character.

lower :: PP Char Source #

A lower-case Unicode character.

alphaNum :: PP Char Source #

An alphabetic or numeric Unicode character.

letter :: PP Char Source #

An alphabetic Unicode character.

digit :: PP Char Source #

An ASCII digit.

hexDigit :: PP Char Source #

An ASCII hexadecimal digit.

octDigit :: PP Char Source #

An ASCII octal digit.

anyChar :: PP Char Source #

Any character.

char :: Char -> PP0 Source #

A specific character.