This module provides parsers for the grammar defined in
RFC2234, "Augmented BNF for Syntax Specifications:
ABNF", http://www.faqs.org/rfcs/rfc2234.html. The
char in the RFC is called
here to avoid conflicts with Parsec's
Addendum for Nonstandard Version: This module deviates from the RFC currently in * none currently.
These allowances are subject to change, and should not be
used when parsing incoming messages, only for parsing messages
that have been stored on disk. The goal of these nonstandard
Parsers is to provide a higher probability of parsing _common_
Headers (rather than only those explicitly defined in the RFC)
as well as allowing for potential oddities / changes that may
occur during storage of an email message. These parsers have
be rebranded so as not to conflict with the standard parsers
available from the excellent
hsemail package, upon which
this package depends. For patches to this package only (namely
'hsemail-ns', patches should be sent to email@example.com,
for patches to the Proper parsers, you can send them to the
- caseChar :: Char -> CharParser st Char
- caseString :: String -> CharParser st ()
- manyN :: Int -> GenParser a b c -> GenParser a b [c]
- manyNtoM :: Int -> Int -> GenParser a b c -> GenParser a b [c]
- parsec2read :: Parser a -> String -> [(a, String)]
- alpha :: CharParser st Char
- bit :: CharParser st Char
- character :: CharParser st Char
- cr :: CharParser st Char
- lf :: CharParser st Char
- crlf :: CharParser st String
- ctl :: CharParser st Char
- dquote :: CharParser st Char
- hexdig :: CharParser st Char
- htab :: CharParser st Char
- lwsp :: CharParser st String
- octet :: CharParser st Char
- sp :: CharParser st Char
- vchar :: CharParser st Char
- wsp :: CharParser st Char
- quotedPair :: CharParser st String
- quotedString :: CharParser st String
Match a parser at least
n times, but no more than
Match any 7-bit US-ASCII character except for NUL (ASCII value 0, that is).
Match any US-ASCII control character. That is any character with a decimal value in the range of [0..31,127].
Match any character that is valid in a hexadecimal number; ['0'..'9'] and ['A'..'F','a'..'f'] that is.
Match any printable ASCII character. (The "v" stands for "visible".) That is any character in the decimal range of [33..126].
Match a "quoted pair". Any characters (excluding CR and LF) may be quoted.