hweblib-0.3: Haskell Web Library

Network.Parser.RfcCommon

Contents

Description

This module provides common parsers used in rfc specifications.

Synopsis

Common Parsers

hex :: Parser [Word8]Source

Parse at least one hex digit.

lws :: Parser Word8Source

Parse lws and return space

lwss :: Parser Word8Source

consecutive matches of lws rule, where they MUST be compressed to a single 0x20 byte

ctext :: Parser Word8Source

Parse a character but not a control or parenthesis

qdtext :: Parser Word8Source

Parse a character but not a control character or double quote

quotedPair :: Parser [Word8]Source

Parse quoted pair

quotedString :: Parser [Word8]Source

Parse quoted string

text :: Parser Word8Source

Parse a character but not a control character.

Utilities

appcon :: [a] -> [[a]] -> [a]Source

asList :: Parser a -> Parser [a]Source

return a word inside a list

Convert a ByteString Word to ByteString Char