
10 Oct
2008
10 Oct
'08
5:46 p.m.
On Fri, 2008-10-10 at 22:40 +0100, Andrew Coppin wrote:
Iain Barnett wrote:
On 10 Oct 2008, at 9:50 pm, Don Stewart wrote:
Haskell makes constructing true parsers just as easy,
You're not speaking for me there! :) I really like regex. It's a domain specific functional language, so why rewrite the wheel?
Because it's a wheel that looks like the wrong end of a dog? :-}
identifier = lexeme $ match "[[:lower:]_][[:alphanum:]_]*" (pretending match :: String -> Parser String is a regex engine). vs. identified = lexeme $ do c <- satisfy isLower <|> satisfy (=='_') s <- many $ satisfy isAlphaNum <|> satisfy (=='_') return (c:s) I'm not sure I follow you here... jcc