Cover of Language Implementation Patterns

Language Implementation Patterns

Create Your Own Domain-Specific and General Programming Languages

by Terence Parr · first published 2009

31mentions
18recommended by
27HN commenters
2010–2025first – last mentioned

67% recommend26% neutral7% critical

Why HN recommends it

Practical, code-first introduction to building DSLs and general languages in small steps, with patterns, tradeoffs and solid parsing coverage; suits self-taught programmers who find theory-heavy compiler books daunting.

Summarised by Claude from recommending comments

Learn to build configuration file readers, data readers, model-driven code generators, source-to-source translators, source analyzers, and interpreters. You don’t need a background in computer science—ANTLR creator Terence Parr demystifies language implementation by breaking it down into the most common design patterns. Pattern by pattern, you’ll learn the key skills you need to implement your own computer languages.

Affiliate links. As an Amazon Associate I earn from qualifying purchases.

Mentions per year

50 2007: 0 mentions2008: 0 mentions2009: 0 mentions2010: 2 mentions2011: 1 mention2012: 1 mention2013: 0 mentions2014: 1 mention2015: 1 mention2016: 5 mentions2017: 5 mentions2018: 1 mention2019: 2 mentions2020: 2 mentions2021: 2 mentions2022: 3 mentions2023: 2 mentions2024: 1 mention2025: 1 mention2026: 0 mentions200720172026

What Hacker News says

  • cessor · May 31, 2014 · Recommends

    There is a nice book by Terence Parr on "The Pragmatic Bookshelf" called "Language Implementation Patterns". I found this to be a perfect introduction to compilers with a very practical point of view. Rather than talking about grammars for ages he dives right into some (java) code and shows you what problems…

    on “How to Write a Lisp Interpreter in Python (2010)” ↗
  • throwaway_pdp09 · Nov 25, 2020 · Recommends

    …reflects the fundamental problem in software development of the market's not knowing what's actually needed to solve real business problems. ++++ Edit, some reading material https://www.amazon.co.uk/Language-Implementation-Patterns-Do... https://www.amazon.co.uk/Definitive-ANTLR-Reference-Domain-S... https://www.amazon.co.uk/yacc-Nutshell-Handbook-Doug-Brown/d... They're all worth investing the time in.

    on “A Modern Compiler for the French Tax Code” ↗
  • dekz · Aug 28, 2010 · Recommends

    If you're interested in language design also may I suggest, http://www.amazon.com/Language-Implementation-Patterns-Domai... and http://www.amazon.com/Language-Implementation-Patterns-Domai... There are also some programmers around who are going through the process of designing and implementing their own languages,…

    on “Learning to write a compiler” ↗
  • octopus · Mar 13, 2012 · Recommends

    I read the book and your guess was right, it is one of those "Learn X in 21 days" books. I'll ask for a refund. A much better book seems to be Language Implementation Patterns by Terence Parr.

    on “Ask HN: Has anyone read "How to create your own freaking programming language"?” ↗
  • Terr_ · Feb 23, 2016 · Recommends

    > Terence Parr, author of ANTLR, often uses the metaphor of parsing as a maze As someone who had a technical but "not real CS" curriculum, I enjoyed Parr's "Language Implementation Patterns" book [0] because it illustrates how certain grammar-forms become recognizable code-patterns and control-flow. Granted, it's definitely got a bent towards Parr's ANTLR project and the Java language,…

    on “LL and LR in Context: Why Parsing Tools Are Hard (2013)” ↗
  • fusiongyro · Dec 16, 2016 · Recommends

    The book "Language Implementation Patterns"[1] covers ANTLR 3, and the author (who is one of the implementors of ANTLR) walks you through successively more interesting DSLs until you're basically building a programming language, but does it in…

    on “ANTLR 4.6 Released” ↗
  • chrisaycock · Dec 13, 2019 · Recommends

    …construction from a more theoretical standpoint. Other recent books I've found really helpful include: Crafting Interpreters by Bob Nystrom (@munificent on HN) https://www.craftinginterpreters.com Language Implementation Patterns by Terence Parr (creator of ANTLR) https://pragprog.com/book/tpdsl/language-implementation-patt...

    on “Basics of Compiler Design (2000) [pdf]” ↗
  • icandoit · Oct 29, 2020 · Recommends

    I like these resources. The most general are first, more specific toward the end. https://pragprog.com/titles/tpdsl/language-implementation-pa... Language Implementation Patterns Create Your Own Domain-Specific and General Programming Languages by Terence Parr (Antlr) https://craftinginterpreters.com/ by Bob Nystrom https://interpreterbook.com/ Writing An Interpreter In Go by…

    on “Compiling a Lisp to x86-64: Labelled procedure calls” ↗
  • UncleEntity · Apr 24, 2021 · Recommends

    …Description Language, Wang et al. Has been invaluable for creating the AST (and soon the IR nodes)-- though it has been a source of much yak shaving as I've rewritten my asdl generator at least 3 times. Language Implementation Patterns: Create Your Own Domain-Specific and General Programming Languages Book, Terence Parr Pretty java/antlr focused but wasn't too hard to take the concepts and apply them to a C++ based transpiler I've…

    on “Resources for Amateur Compiler Writers” ↗
  • skydhash · May 28, 2025 · Recommends

    Introduction to the Theory of Computation by Michael Sipser. There's also his course based on the book on YouTube[0]. Language Implementation Patterns by Terence Parr. It avoids the theory in other books, going for a more practical approach. Then it was just trying a lot of programming paradigms like functional programming with Common Lisp and Clojure,…

    on “What does “Undecidable” mean, anyway” ↗
  • groovy2shoes · Jul 29, 2016 · Recommends

    Language Implementation Patterns by Terrance Parr might be right up your alley. Implementing Programming Languages by Aarne Ranta is likewise a refreshing take on language implementation instruction. Bonus points for both books being…

    on “Resources for Amateur Compiler Writers” ↗
  • cessor · Jun 5, 2017 · Recommends

    …which has been mentioned in other comments, these books really helped me understand where I wanted to be as a programmer. Technology ========== With a stronger focus on technology I recommend: - "Language Implementation Patterns" - Terence Parr - "A Retargetable C Compiler: Design and Implementation" - Hanson, Fraser I found them more helpful than the Red Dragon Book. The latter is good, but as a beginner I felt a little lost…

    on “Ask HN: What language-agnostic programming books should I read?” ↗
  • pella · Aug 26, 2011 · Recommends

    The Definitive ANTLR Reference: Building Domain-Specific Languages http://pragprog.com/book/tpantlr/the-definitive-antlr-refere... -- + -- Language Implementation Patterns: Create Your Own Domain-Specific and General Programming Languages "Learn to build configuration file readers, data readers, model-driven code generators, source-to-source translators, source analyzers,…

    on “Want to Write a Compiler? Just Read These Two Papers.” ↗
  • Terr_ · Mar 8, 2017 · Recommends

    On that note, Parr also has a nice little book called "Language Implementation Patterns" [0] which introduces things on a level of "this kind of language motif maps to this kind of parsing code". [0] https://pragprog.com/book/tpdsl/language-implementation-patt...

    on “ANTLR Mega Tutorial” ↗
  • anqurvanillapy · Jun 29, 2016 · Recommends

    It would be nice to read some books like Language Implementation Patterns for deeper thoughts after following some easy tutorials. That book is good for designing both DSL and general-purpose languages and explains multiple patterns with pros and cons, tradeoffs, etc. And…

    on “How to implement a programming language in JavaScript” ↗

Keyboard shortcuts

/
Focus search
j / k
Next / previous book
Enter
Open focused book
Esc
Close / go back
g h
Go to Home
g t
Go to Top all-time
g m
Go to Most recommended
g r
Go to Rising
g f
Go to For You
?
Show this help