r/Compilers • u/Dappster98 • Jul 26 '24
Which book on compilers should I read after Crafting Interpreters?
Hi all,
I was just wondering which book I should read after completing CI. I heard the Dragon book is heavy on theory and parsing, but that "Engineering a Compiler" is more focused on implementation. Haven't heard anything about "Creating a C Compiler" though. Or if you guys have any other recommendations, I'm open!
Thanks in advance for your replies!

27
Upvotes
13
u/qtf0x Jul 26 '24
The dragon book is the gold standard, but if it seems too heavy (the second edition you have is even longer than the original), I would recommend "Crafting a Compiler" by Fischer, Cytron, and LeBlanc. Imo it's easier to read, and you can always go to the dragon book for more details on a specific subject.
Realistically though, any of these are fine and your best bet is to just pick one and run with it :)
5
u/dacydergoth Jul 26 '24
I recommend "The art of Compiler Design". It's a bit older and doesn't cover a lot of modern stuff but it is a good grounding
3
u/Ok-Interaction-8891 Jul 27 '24
Check out Introduction to Compilers and Language Design by Douglas Thain.
It’s published freely and strikes a good balance between theory and implementation in its goal of getting the book user to actually build a compiler that will emit assembly/machine code.
You can get it as a single pdf download or as separate chapters. Each chapter usually has recommended reading along with quality exercises that challenge you to design and build things. There’s pseudocode, C code, assembly (he goes for broke choosing x86, lol), and plenty of other examples, in general. It’s short and I like it a lot. Other books, such as the dragon book, could serve as a nice reference text for when you want to go deeper on a specific topic.
2
u/nrnrnr Jul 27 '24
What do you want to build next? And what source language do you want to compile next?
2
u/cit0110 Jul 27 '24
I really like Programming Language Pragmatics by michael scott. We used that in my compilers course and the dragon book as a supplement. some of the good stuff is on the "cd" which you need to go online to access.
2
u/[deleted] Jul 27 '24
Essentials of compilation by Dr Siek. It’s free online , you can find it on GitHub. It walks you through building a compiler. There’s code in the book which engineering a compiler and the dragon book do not have. There’s a Python version and there’s a racket version. Look for it in the releases here https://github.com/IUCompilerCourse/Essentials-of-Compilation
0
u/[deleted] Jul 27 '24
[deleted] — view deleted comment