How to write a recursive descent parser
How to write a recursive descent parser launched on March 20, 2017 with 347 votes, #48 of 3,481 launches that month and more than 99% of that year's launches. The site was still online in September 2026, 9 years on.
In plain words
This is a chapter from a programming book that teaches readers how to build a recursive descent parser. It is designed for developers who currently use regex and string manipulation to process text but want to learn proper parsing techniques. The chapter covers building parsers with robust error handling, clear internal structure, and the ability to handle complex syntax rules.
written from the facts on this page · September 2026
From the sources
This chapter marks the first major milestone of the book. Many of us have cobbled together a mishmash of regular expressions and substring operations to extract some sense out of a pile of text. The code was probably riddled with bugs and a beast to maintain. Writing a real parser — one with decent error handling, a coherent internal structure, and the ability to robustly chew through a sophisticated syntax — is considered a rare, impressive skill. In this chapter, you will attain it. “Parse” comes to English from the Old French “pars” for “part of speech”. It means to take a text and map each word to the grammar of the language. We use it…from craftinginterpreters.com
Does a similar job
all alternatives →- IWI Wrote a Book on Java2024 · ▲586
https://www.manning.com/books/data-oriented-programming-in-j... This book is a distillation of everything I’ve learned about what effective development looks like in Java (so far!). It's about how to organize programs around data "as plain data" and the surprisingly benefits that emerge when we do. Programs that are built around the data they manage tend to be simpler, smaller, and significantly easier understand. Java has changed radically over the last several years. It has picked up all kinds of new language features which support data oriented programming (records,…
I'm 17 and wrote a guide on how to build your own programming language2024 · easel.hackclub.com · ▲149Hey! I’m JC. I’m 17 and part of Hack Club, a nonprofit where we help teenagers ship programming projects with their friends while growing technically. A while ago, I asked myself the question, “How exactly do programming languages work behind the scenes?” It seemed really daunting until I went to a half hour workshop at a high school hackathon about writing a tree-walk interpreter and realized that getting started was actually super fun. This guide is designed in the vein of that - to get people, especially teenagers, started on learning how to build a programming language in a literal…

How to write a tiny compiler2017 · blog.klipse.tech · ▲224Write your own compiler: introduction. Code genetation. AST. Abstract syntax tree. lisp. javascript.
- IWI wrote a book on Python regular expressions2019 · ▲193
My book titled "Python re(gex)?" is free to download through this weekend [1][2] The book covers both 're' and 'regex' modules, has plenty of examples and chapters also have cheatsheets and exercises. Code snippets, exercises, sample chapters, etc are available on GitHub repo [3] I used pandoc+xelatex [4] to generate the pdf. [1] https://gumroad.com/l/py_regex [2] https://leanpub.com/py_regex [3] https://github.com/learnbyexample/py_regular_expressions [4]…
Using Parsing Expression Grammars to rewrite source code2016 · github.com · ▲63An example of PEG usage. Contribute to sebcat/move-literals development by creating an account on GitHub.
More life & fun this month
the category →
A free city-building game in your browser. You are the mayor. You know what the city needs. Now get it past the zoning board, the neighbors, the appeals court and the next election.
Life & fun · 19h ago · permit.petercai.com
- IV
Life & fun · 13d ago · tanzaniaeducationproject.org

Turn a phone, tablet or TV into a sign. Type a message and it fills the screen: welcome signs, timers, Wi-Fi passwords and more. No app, no account, free.
Life & fun · 14d ago · bigwords.page

Play a free virtual guitar online with your keyboard or by touch. Slow songs down and see every chord, string and strum. Acoustic, classic, electric and bass.
Life & fun · 8d ago · guitoro.com

Carrier settings from iPhone, Pixel and Galaxy firmware, decoded and compared: APNs, VoLTE, 5G and Wi-Fi Calling per carrier, and what each build changed.
Life & fun · 12d ago · carrierexplode.com

Life & fun · 22d ago · space.bl2.net
Source: Show HN post ↗
Launched alongside, March 2017
the whole month →
Startup School▲1,010A free online program to teach you how to start a company
Life & fun · 2017 · startupschool.org

Hardbound 3.0▲739Illustrated summaries of bestselling nonfiction books
Life & fun · 2017 · apps.apple.com


