Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Parsec (parser combinator)

Name: Anonymous 2008-01-23 19:31

I think this is quite cool. (Parsing an IRC 'NICK foo' message)

special = oneOf "-[]\\`^{}_" -- Taken from RFC1459, except '_',
                             -- which I added (generally accepted character (are there others?)).

nick = do { string "NICK"; space;
            first <- letter; rest <- many1 $ alphaNum <|> special; eof;
            return $ Nick (first:rest) }


Not quite sure what I think of it in comparison to regular expressions, yet.

Name: Anonymous 2008-01-23 20:18

Question: are characters that go out of a-zA-Z0-9 typically allowed in nicknames on today's IRC servers? Like ø,æ,ß,ł,ħ,æ etc.? I don't think they are, but I will have to research that.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List