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.

➡️ Stable 0.5x Programming Languages
4,266
Comments
20
Years Active
5
Top Authors
#5762
Topic ID

Activity Over Time

2007
1
2008
31
2009
66
2010
142
2011
146
2012
70
2013
129
2014
243
2015
292
2016
295
2017
372
2018
234
2019
295
2020
381
2021
350
2022
325
2023
294
2024
283
2025
295
2026
24

Keywords

e.g PHP LR BNF YouTube L54 LALR i.e GCC Parser.cpp parser parsers generators generator parsing flex descent recursive language grammar

Sample Comments

verdverm • Jan 11, 2020 • View on HN

Maybe check out PEG parser generators, they are easier to reason about compared to older things, but are less capable, though often sufficient

platz • Mar 3, 2024 • View on HN

what considerations are the between choosing parser combinators and using a parser generator?

derriz • Oct 17, 2017 • View on HN

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

dbrgn • Jan 17, 2021 • View on HN

The author was probably referring to parser generators or combinator libraries like non or pest.

mossplix • Feb 1, 2013 • View on HN

there are parser generators .. you dont have to build one from scratch

jahewson • Jul 13, 2024 • View on HN

Parser generators create more problems than they solve.

weaksauce • Apr 17, 2017 • View on HN

are you handwriting your parsers or using some kind of parser generator typically?

azhenley • Nov 25, 2019 • View on HN

The C# and Go parsers do not use a parser generator, iirc.

JoeAltmaier • Nov 4, 2014 • View on HN

Bison and Flex work fine - do they count as 'parser generators'?

Darmani • Feb 24, 2019 • View on HN

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