2 ms·
How do parser combinators like megaparsec fit into this? https://hackage.haskell.org/package/megaparsec https://hackage.haskell.org/package/megaparsec
by iso8859-1 6y ago
How do parser combinators like megaparsec fit into this?
https://hackage.haskell.org/package/megaparsec https://hackage.haskell.org/package/megaparsec
- eckzow 6y agoThe first footnote of the article says: > While that could mean just about anything, nearly everyone who writes a half-decent hand-written parser, whether they know it or not, is writing a recursive descent parser [1]. > [1] Parsing Expression Grammars (PEG)s and “parser combinators” in some functional languages are just recursive descent parsers in disguise. Which, while I haven't thought about it deeply, intuitively makes some sense: parser combinators encourage an approach mostly equivalent to little functions that do something like "parse a $thing, or parse a $different_thing" (etc.) which very much translates down like a recursive descent parser.