Basics of compiler designTorben ©. Mogensen
Basics of compiler design
by Torben ©. Mogensen · first published 2010
9mentions
4recommended by
9HN commenters
2008–2019first – last mentioned
44% recommend56% neutral
Affiliate links. As an Amazon Associate I earn from qualifying purchases.








…that's awesome! I picked up mine second hand at a textbook distributor for the equivalent of about $30. For anyone interested in other books on compiler construction, I would recommend these: - "The Basics of Compiler Design" by Torben Mogensen - "Modern Compiler Implementation in C" by Andrew Appel (ML and Java versions available too) - "Modern Compiler Design" by Grune, Bal et al. The Dragon Book is obviously infamous…
on “Ask HN: What's the best computer science book you've read recently?” ↗…the two following books as a parallel reading: 1. Engineering a Compiler, K. Cooper, L. Torczon. 2. Modern Compiler Implementation in ML, by A. Appel. If you want a smaller book, the I recommend the Basics of Compiler Design by T. Mogensen, it is a nice and short one. All of these resources are linked to in the list. Happy tinkering!
on “Ask HN: Resources for learning to write compilers?” ↗I've read it as a part of the introductory compiler course at DIKU (Computer Science dept. of University of Copenhagen). It's good for exactly what the title says: Basics of Compiler Design. It won't make you a compiler guru, but it will give you a good grasp of the fundamentals. If anyone is interested, I could share the weekly assignments and the exam project from the course. The advanced…
on “Basics of Compiler Design [pdf]” ↗As someone currently building a language, books like this have been critical. Basics of Compiler Design covers a lot of the common ground of compiler construction from a more theoretical standpoint. Other recent books I've found really helpful include: Crafting Interpreters by Bob Nystrom (@munificent…
on “Basics of Compiler Design (2000) [pdf]” ↗…learned about compilers we were introduced to T-diagrams, sometimes called tombstone or bratman diagrams and shown how to bootstrap a compiler for a high level language from scratch [1]. Torben Mogensen's Basics of Compiler Design [2] - Chapter 13 is devoted to bootstrapping a compiler, which introduces them. [1] scratch meaning a computer (with relevant hardware) with a CPU with it's machine code instructions and some way to…
on “An Intro to Compilers” ↗Basics of Compiler Design is quite theoretical, but it's available online for free: http://www.diku.dk/~torbenm/Basics/
on “Ask HN: starter books for learning about grammars, parsers and compilers?” ↗Haven't read it yet, so I can't comment on how good of a book it is, but "Basics of Compiler Design" is free to download. http://www.diku.dk/~torbenm/Basics/
on “Ask YC: Good compiler books?” ↗…permission to do what, and that data simply isn't available. You can guess, but if third parties became legally liable for being wrong, things would get ugly fast. For example, just the other day, the book "Basics of Compiler Design" was up on HN. The authors are giving a PDF of it away for personal use and at-cost reprinting. If one naively assumed that everyone giving away PDFs of published books was some sort of evil pirate,…
on “David Flanagan (JavaScript Definitive Guide author) on piracy” ↗i had to put together something resembling a compiler for a class, i used mainly two sources: for the theory part: http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/ (Basics of Compiler Design - Free book) actualy put something together: http://www.dabeaz.com/ply/ (PLY (Python Lex-Yacc)) maybe not the solution for real world use, but helped me jump past some nitpicking parts with the C /…
on “Want to Write a Compiler? Just Read These Two Papers.” ↗