Parser generators vs. hand-written parsers

A very recent survey about generated vs. handwritten parsers for major languages might be of interest:

https://notes.eatonphil.com/parser-generators-vs-handwritten-parsers-survey-2021.html

Hacker News discussion:

https://news.ycombinator.com/item?id=28258945

Well, yes, the links you provide document the fact that so many high profile projects maintain hand-written parsers. However, I do not believe that this says that parser generators are a bad idea. In my view, what this is really about is that somehow the whole parser generator space is extremely stagnant.

I mean, for one thing, in the cases where a well known project uses a parser generator, more often than not, it’s something really ancient like yacc or bison. And that is something really very strange.

Well, I’m pretty convinced that most of the problem is that the whole application space is so dominated by academicians. And these people just don’t have the same relentless focus on usability that I have. Well, not just that anything that they develop tends to be borderline unusable, anything they write tends to be unreadable – though that is probably not really a separate problem, but just another facet of the same overarching issue!

(I’m not saying these things just to be nasty or anything. I think it’s just true! And I don’t see any point in mincing words about it…)

I think the prevalence of hand-written parsers is more an indication of existing parser generators being lacking in user-needed features, usability (the “developer experience”), or both.

Well, sure, but that doesn’t really seem like a separate observation from my earlier point that, for whatever reason, the application space is very stagnant. These dinosaur things like the original YACC and Bison are so old and really should be considered a kind of “proof of concept” more than anything else. I think the same applies to the legacy JavaCC, which is newer than those things, but is still very ancient and obsolete. It was mostly written around 1996/1997, after all.

The whole situation is really very strange.