Parsing Expression Grammar vs. Regexes: Building Org Parser in Lisp, Export HTML
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
Parsing Expression Grammar vs. Regexes: Building Org Parser in Lisp, Export HTML
Unofficial Hacker News client; not affiliated with Y Combinator.
overthenexttwod · · focus · HN ↗
LLMs have changed the equation. It used to take me 2-3 hours to write a parser for a moderately complex grammar. Now, if I hand an LLM a loosely written, BNF-ish grammar and ask for a recursive-descent parser, it finishes the job in five minutes. At this point, writing them by hand is hard to justify. The model does it substantially faster, and lately, often better than I do.
Which makes me wonder: what’s the appeal of PEGs or parser generators now? They used to make sense when hand-writing wasn't practical, but what compelling reasons are left to use them today?
torginus · · focus · HN ↗
No LLMs needed, and you can jump straight to coding, and you don't have to go through precedence shenanigans.