3 ms·
Parser combinators, like Haskell's Parsec, are another popular option like this. They're also much more lightweight than a parser generator. In Haskell, people
by tikhonj 14y ago
Parser combinators, like Haskell's Parsec, are another popular option like this. They're also much more lightweight than a parser generator.
In Haskell, people almost never use regular expressions, and Parsec is part of the reason. Anything trivial can be done just with library functions, and anything that would require a non-trivial regexp are both far easier and far more readable with Parsec.