
Principles of compiler design
by Alfred V. Aho, Jeffrey D. Ullman · first published 1977
19mentions
8recommended by
18HN commenters
2009–2025first – last mentioned
44% recommend44% neutral11% critical
Why HN recommends it
Classic compiler textbook that teaches fundamentals with depth and clarity. It gets readers started and covers the theory behind language implementation.
Common criticism: Some note the material is dated and the text can be hard going for newcomers.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








Grammar ends up becoming a problem on a few fronts. I highly recommend Principles of Compiler Design [1]. One safe rule of thumb is, as grammar and rules expand, the performance and simplicity of the compiler begin to deteriorate, particularly if features aren't added carefully. The second is in practice,…
on “Metascala – A JVM written in Scala” ↗…unoptimized. So I decompiled the compiler back to Pascal by hand, just to see how it worked. I obviously had waaaaay more free-time back then. I eventually read the green Dragon book (Aho & Ullman, Principles of Compiler Design), and ended up at Microsoft on the C/C++ team in 1991. Over the years, I've written several domain-specific languages (DSLs), small languages for some limited purpose. That early exposure to lexing,…
on “Why Take a Compiler Course?” ↗The Dragon Book: Principles of Compiler Design (Alfred V. Aho, and Jeffrey D. Ullman, 1986)
on “Ask HN: What fiction/non-fiction book should everyone read on the topic of CS?” ↗…say Quality is Free by Phillip Crosby Then there are some books that really could change your life, say Solid State Physics by Ashcroft and Mermin The Art of Computer Programming by Donald Knuth Principles of Compiler Design by Aho and Ullman Software Estimation: Demystifying the Black Art by Steve McConnell The Mushroom Cultivator: A Practical Guide to Growing Mushrooms at Home by Paul Stamets Starting Strength by Mark…
on “Ask HN: What podcast episodes changed the way you think about startups?” ↗First part of the question (actual influences): 1) Philip and Alex's Guide to Web Publishing (not strictly a book). http://philip.greenspun.com/panda/ 2) The "Dragon Book" https://en.wikipedia.org/wiki/Principles_of_Compiler_Design 3) Computer Architecture: A Quantitative Approach Second part (at hindsight): 1) https://en.wikipedia.org/wiki/Rich_Dad_Poor_Dad (cheesy, but useful) 2) http://toddkashdan.com/upside.php 3) https://www.schranner.com/de/news/2012/04/16/-verhandeln-im-...…
on “Ask HN: What three books impacted your career the most?” ↗…'optimal' algorithms together might be textbook, but often you can apply some domain knowledge to cut out a step or two to reduce actual runtime and maintenance overhead) I've found stuff like graph theory, principles of compiler design, and a working knowledge of assembly code to be useful too, but that's probably the far end of the bell curve for web server stuff :P Computer Science is a subset of mathematics and it's amazing which…
on “Ask HN: What are must-know concepts for back end development?” ↗Principles of Compiler Design is old but still a great book, one of the best CS books I've read and it got me going with compilers. I'm reading an old copy from the 70's.
on “Ask HN: Best Resources for Compiler Construction” ↗…several legendary computer science books Dragon Book (Compilers: Principles, Techniques, and Tools) the Cinderella Book (Introduction to Automata Theory, Languages, and Computation), Green Dragon Book (Principles of Compiler Design) If you want to learn deep stuff with clarity, those old books are still the way to go.
on “Matrix Multiplication Using Only Addition” ↗…To be fair, the first edition of the book is from 1986. The first edition of Compilers: Principles, Techniques, and Tools* is from 1986. The first edition of the dragon book wasn't Compilers, it was Principles of Compiler Design (1977). The 2nd edition of Compilers is the 3rd dragon book.
on “Turing Award goes to Aho and Ullman” ↗Note that there is more than one hand-drawn dragon book cover by Aho & Ullman. Principles of Compiler Design tends to precede "The Dragon Book" as commonly referred, although the material overlaps a lot. The newer editions are much less clear with regard to the trade-offs in parser design, e.g. I don't think…
on “Rich Programmer Food” ↗…me and seems unapproachable. I've been through Understanding Computation, but at a certain point I just no longer understood what the hell was going on I was just typing in the examples. I have the Principles of Compiler Design book and I've made a run at that a couple of times, but it seems to theoretical for me to do anything useful with it. I've been thinking about taking a go at creating something with ANTLR alone with…
on “Designing a Programming Language” ↗Maybe because, while HN is talking about The Dragon Book, the actual reference[0] refers to https://en.wikipedia.org/wiki/Principles_of_Compiler_Design which did not include Sethi (although there is a blurb about it in the paragraph). [0]https://awards.acm.org/about/2020-turing
on “Turing Award goes to Aho and Ullman” ↗…Programming Languages" [1] by Simon Peyton-Jones makes a much more interesting read. Edit: I guess, we are talking about different Dragon Books. Wikipedia lists [2] at least three. And says about the first: "Principles of Compiler Design is now rather dated [...]." [1] http://research.microsoft.com/en-us/um/people/simonpj/papers... [2] http://en.wikipedia.org/wiki/Dragon_Book
on “Basics of Compiler Design [pdf]” ↗green dragon book is https://en.wikipedia.org/wiki/Principles_of_Compiler_Design red dragon book is the first edition of https://en.wikipedia.org/wiki/Compilers:_Principles,_Techniq...
on “Designing a Programming Language” ↗…A Software Engineering Approach Compiler Construction: Principles and Practice Compilers: Principles and Practice Language Implementation Patterns Crafting a Compiler with C Compiler Design in C Principles of Compiler Design Modern Compiler Implementation in Java
on “The most mentioned books on Stack Overflow” ↗