| Copyright | (c) 2007-2019 Peter Simons |
|---|---|
| License | BSD3 |
| Maintainer | simons@cryp.to |
| Stability | provisional |
| Portability | portable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Text.Parsec.Rfc2234
Description
This module provides parsers for the grammar defined in
RFC2234, "Augmented BNF for Syntax Specifications:
ABNF", http://www.faqs.org/rfcs/rfc2234.html. The
terminal called char in the RFC is called character
here to avoid conflicts with Parsec's char function.
Synopsis
- caseChar :: forall s (m :: Type -> Type) u. Stream s m Char => Char -> ParsecT s u m Char
- caseString :: forall s (m :: Type -> Type) u. Stream s m Char => String -> ParsecT s u m ()
- manyN :: forall s u (m :: Type -> Type) a. Int -> ParsecT s u m a -> ParsecT s u m [a]
- manyNtoM :: forall s u (m :: Type -> Type) a. Int -> Int -> ParsecT s u m a -> ParsecT s u m [a]
- alpha :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- bit :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- character :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- cr :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- lf :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- crlf :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m String
- ctl :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- dquote :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- hexdig :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- htab :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- lwsp :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m String
- octet :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- sp :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- vchar :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- wsp :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char
- quoted_pair :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m String
- quoted_string :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m String
Documentation
caseChar :: forall s (m :: Type -> Type) u. Stream s m Char => Char -> ParsecT s u m Char Source #
Case-insensitive variant of Parsec's char function.
caseString :: forall s (m :: Type -> Type) u. Stream s m Char => String -> ParsecT s u m () Source #
Case-insensitive variant of Parsec's string function.
manyN :: forall s u (m :: Type -> Type) a. Int -> ParsecT s u m a -> ParsecT s u m [a] Source #
Match a parser at least n times.
manyNtoM :: forall s u (m :: Type -> Type) a. Int -> Int -> ParsecT s u m a -> ParsecT s u m [a] Source #
Match a parser at least n times, but no more than m times.
alpha :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match any character of the alphabet.
bit :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match either "1" or "0".
character :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match any 7-bit US-ASCII character except for NUL (ASCII value 0, that is).
cr :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match the carriage return character \r.
lf :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match returns the linefeed character \n.
crlf :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m String Source #
Match the Internet newline \r\n.
ctl :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match any US-ASCII control character. That is any character with a decimal value in the range of [0..31,127].
dquote :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match the double quote character """.
hexdig :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match any character that is valid in a hexadecimal number; ['0'..'9'] and ['A'..'F','a'..'f'] that is.
htab :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match the tab ("\t") character.
octet :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match any character.
sp :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match the space.
vchar :: forall s (m :: Type -> Type) u. Stream s m Char => ParsecT s u m Char Source #
Match any printable ASCII character. (The "v" stands for "visible".) That is any character in the decimal range of [33..126].