dasch/parser/2.1.0

NOTE: the latest version is 3.0.0

Parser.Common

Common parsers that can be used in many contexts.

High Level Parsers

int : Parser Int

Matches an integer.

parse "42" int -- Ok 42
word : Parser String

Matches a "word", comprised of alphanumeric characters and _.

parse "hello world" word -- Ok "hello"

Single-Character Parsers

alpha : Parser Char

Matches an alphabetic character.

Matches an alphanumeric character.

digit : Parser Char

Matches a digit, e.g. 8.

upper : Parser Char

Matches an uppercase alphabetic characters, e.g. A.

lower : Parser Char

Matches a lowercase alphabetic characters, e.g. z.

Whitespace

space : Parser Char

Matches the space character, ``.

tab : Parser Char

Matches the tab character, \t.

blank : Parser Char

Matches either a space or a tab.

blanks : Parser String

Matches zero or more blank characters.

Matches a newline character.