>I personally prefer hand-written recursive descent parsers
>using a parser combinator framework (like https://github.com
>/Geal/nom) over parser generators.
Why?
>using a parser combinator framework (like https://github.com
>/Geal/nom) over parser generators.
Why?
Handwritten parsers are most commonly used because most tools have problems making things like proper error reporting good enough to be worthwhile.
Parser combinators is really just a fancy way of composing a parser from higher order functions instead of writing out a function body. If well done it basically provides a DSL to build the parsers, and the way this works by composing small fragments is pretty much what we do with recursive descent anyway, so it's a good fit.