Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Parser defintions
Defines parsers used by the Tor Control protocol
Warning: This function is used internally by Tor
and using these functions directly is unsupported. The
interface of these functions might change at any time without
prior notice.
- quotedString :: Parser ByteString
- unquotedString :: Parser ByteString
- reply :: Parser [Line]
- key :: Parser Token
- keyValue :: Parser Token
- value :: Parser ByteString
- token :: Parser Token
- tokens :: Parser [Token]
Documentation
quotedString :: Parser ByteString Source
Parses a single- or double-quoted string, and returns all bytes within the value; the unescaping is beyond the scope of this function (since different unescaping mechanisms might be desired).
unquotedString :: Parser ByteString Source
An unquoted string is "everything until a whitespace or newline is reached".
Parses a key, which is anything until either a space has been reached, or an '=' is reached.
value :: Parser ByteString Source
Parses either a quoted value or an unquoted value