Parser Generators Debate
This cluster centers on debates comparing parser generators (e.g., Yacc, Bison, PEG) to hand-written recursive descent parsers and parser combinators, discussing their usability, performance, and suitability for various projects.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Maybe check out PEG parser generators, they are easier to reason about compared to older things, but are less capable, though often sufficient
what considerations are the between choosing parser combinators and using a parser generator?
Sorry to be negative and this comment probably doesn't belong in a discussion about a specific parsing toolkit but I've become unconvinced that parser generators are useful. My experience is limited to Yacc/lex back in the old days (quickly jumped to Bison/flex), more recently Antlr and a couple of functional parser combinator libraries. In nearly all case it was to deal with "real world" (i.e. not toy) programming languages.The last time I needed a parser (in
The author was probably referring to parser generators or combinator libraries like non or pest.
there are parser generators .. you dont have to build one from scratch
Parser generators create more problems than they solve.
are you handwriting your parsers or using some kind of parser generator typically?
The C# and Go parsers do not use a parser generator, iirc.
Bison and Flex work fine - do they count as 'parser generators'?
I'm a Ph. D. student in programming languages. I've written at least 7 language frontends over the years, read many more, and have given a talk on parsing algorithms. My primary programming language is Haskell.I really don't like parser combinators.I've found that, with parser generators, bugs in the parser are very rare. When they exist, you can find them just by carefully inspecting your grammar.With parser combinators, a misplaced "try" can give you a pa