Parsec parsers and a general parsing interface for IRC messages
- parseMessage :: String -> Maybe Message
- prefix :: CharParser st Prefix
- serverPrefix :: CharParser st Prefix
- nicknamePrefix :: CharParser st Prefix
- command :: CharParser st Command
- parameter :: CharParser st Parameter
- message :: CharParser st Message
- crlf :: CharParser st ()
- spaces :: CharParser st ()
- maybeP :: GenParser tok st a -> GenParser tok st (Maybe a)
- tokenize :: CharParser st a -> CharParser st a
- takeUntil :: String -> CharParser st String
Parsing and Formatting Functions
Parse a String into a Message.
Parsec Combinators for Parsing IRC messages
prefix :: CharParser st PrefixSource
Parse a Prefix
serverPrefix :: CharParser st PrefixSource
Parse a Server prefix
nicknamePrefix :: CharParser st PrefixSource
Parse a NickName prefix
command :: CharParser st CommandSource
Parse a command. Either a string of capital letters, or 3 digits.
parameter :: CharParser st ParameterSource
Parse a command parameter.
message :: CharParser st MessageSource
Parse a Message
crlf :: CharParser st ()Source
Parse a cr lf
spaces :: CharParser st ()Source
Consume only spaces tabs or the bell character
Other Parser Combinators
maybeP :: GenParser tok st a -> GenParser tok st (Maybe a)Source
Convert a parser into an optional one that returns a Maybe
tokenize :: CharParser st a -> CharParser st aSource
Convert a parser that consumes all space after it
takeUntil :: String -> CharParser st StringSource
Take all tokens until one character from a given string is found