Laurence Tratt: Which Parsing Approach?
We all know that parsing is an important part of designing and implementing programming languages, but it’s the equivalent of Brussels sprouts: good for the diet, but a taste that only a select few enjoy. Unfortunately, I’ve come to realise that our general distaste for parsing is problematic. While many of us think that we’ve absorbed the advances of the 1960s into our collective understanding, I fear that we have regressed, and that we are often making inappropriate decisions about parsing. If that sounds accusatory, I don’t mean it to be: I spent over 20 years assuming that parsing is easy and that I didn’t need to understand it properly in order to use it well. Alas, reality has been a cruel teacher, and in this post I want to share some of the lessons I’ve been forced to slowly learn and acknowledge. Let’s start with the basics. A grammar encodes the syntax rules for a given language. Parsing is the act of taking in an input (e.g. a source file) and determining if, and how, it cor
Laurence Tratt: Which Parsing Approach? Home > Blog ≡ Home > Blog email Bluesky Mastodon Twitter Bluesky Mastodon X Which Parsing Approach? RSS feed: whole site or just the blog Recent posts Test-case Reducers Are Underappreciated Debugging Tools Retrofitting JIT Compilers into C Interpreters PLISS 2026 Upcoming Talk in London Async and Finaliser Deadlocks What Context Can Bring to Terminal Mouse Clicks Why Firsts Matter LLM Inflation Comparing the Glove80 and Maltron keyboards The LLM-for-software Yo-yo Blog archive We all know that parsing is an important part of designing and implementing p
Explore this link on the map →saved by
related reading
- Beating the fastest lexer generator in Rustalic.dev
- Parsing Expressions · Crafting Interpreterscraftinginterpreters.com
- Reading 12: Regular Expressions & Grammarsweb.mit.edu
- Pratt Parsers: Expression Parsing Made Easy - journal.stuffwithstuff.comjournal.stuffwithstuff.com
- Chomsky hierarchy - Wikipediaen.wikipedia.org
- 2. Kaleidoscope: Implementing a Parser and AST — LLVM 23.0.0git documentationllvm.org
- Reading 19: Parsersweb.mit.edu
- L-system - Wikipediaen.wikipedia.org
- Language and Grammar (Bison 3.8.1)gnu.org
- Context-free grammar - Wikipediaen.wikipedia.org
- Shunting yard algorithm - Wikipediaen.wikipedia.org
- Representing Code · Crafting Interpreterscraftinginterpreters.com