
Compiler construction for digital computers
by David Gries
7mentions
1recommended by
7HN commenters
2015–2026first – last mentioned
14% recommend71% neutral14% critical
Affiliate links. As an Amazon Associate I earn from qualifying purchases.

I suggest starting with the old but classic Compiler Construction for Digital Computers by David Gries. Pair it with some modern books recommended here and you should be good. David Gries - https://www.cs.cornell.edu/gries/ and https://en.wikipedia.org/wiki/David_Gries Dutch computer scientist…
on “Advanced Compilers: The Self-Guided Online Course” ↗I bought a book a long time ago that appears to have been printed on a standard IBM 1401 line printer. Title Compiler construction for digital computers Author David Gries Edition illustrated Publisher Wiley, 1971 Original from the University of California
on “Why and How I Wrote My Academic Book in Plain Text” ↗…is usually scratched by implementing a subset of a Wirth language as opposed to creating my own. I don't keep anything I write because it's fun to do it all over again later. [0] I think my oldest is "Compiler Construction for Digital Computers" by David Gries. My favorite isn't really a compiler book, it's Wirth's "Algorithms + Data Structures = Programs" because he implements PL/0. I used to have some PDFs by Thomas Christopher that used matrices…
on “Ask HN: Have you created a programming language and why?” ↗…arr: array[-2..10] of integer; pointer(@arr) == pointer(@arr[0]) Or you can use descriptors (dope vectors), but that involves quite an overhead. The books on compilers from the 70s (e.g. Gries's "Compiler construction for digital computers") have rather extensive discussions on both approaches.
on “Translating a Fortran F-16 Simulator to Unity3D” ↗…with Pascal indexes, but I don't find them very natural for the kind of programs I write. I want functions/classes to do any sort of translation. > The books on compilers from the 70s (e.g. Gries's "Compiler construction for digital computers") Yellow cover, I think? My then GF bought it for Xmas at about 1984 or so. Not the best book on the topic, IMHO.
on “Translating a Fortran F-16 Simulator to Unity3D” ↗I like how one of the books from 1971 is titled Compiler Construction for Digital Computers. Very important to make clear this wasn't for analog computers!
on “DYOL: Design Your Own Language” ↗this may be interseting (YMMV) read page 50 of "Compiler Construction for Digital Computers" 1971 which lists other reason some which are still valid and good to know
on “Why Split Lexing and Parsing into Two Separate Phases?” ↗