network-anonymous-tor-0.11.0: Haskell API for Tor anonymous networking

Safe HaskellSafe
LanguageHaskell2010

Network.Anonymous.Tor.Protocol.Parser

Description

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.

Synopsis

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".

key :: Parser Token Source

Parses a key, which is anything until either a space has been reached, or an '=' is reached.

keyValue :: Parser Token Source

Parses key and value

value :: Parser ByteString Source

Parses either a quoted value or an unquoted value

token :: Parser Token Source

A Token is either a Key or a Key/Value combination.

tokens :: Parser [Token] Source

Parser that reads keys or key/values