3 ms·
I highly recommend Modern Compiler Implenentation in ML by Andrew Appel (he is also an inventor of a number of important modern compilation techniques). I also
by stass 10y ago
I highly recommend Modern Compiler Implenentation in ML by Andrew Appel (he is also an inventor of a number of important modern compilation techniques).
I also rather enjoyed Crafting a Compiler. I found the explanations and excercises to be much more practical and enjoyable than the dragon book, but the code authors present is mostly garbage and full of global variables, state mutations and design pattern heavy. Ignore the code and do the excercises yourself.
I always found the Dragon book to be too parsing-heavy which gets boring quickly. The books I listed spend far less time on parsing and much more on code generation and optimization which I find more enjoyable. YMMV.
- wtetzner 10y agoAnother book that's really good it Types and Programming Languages. It goes over how to define the operational semantics of a programming language, and then gives examples of how to implement them. It pretty much just glosses over parsing etc., and focuses on the semantics of a language, which IMHO is much more interesting. Sure, if you're building a real language implementation, you will need a parser, but in a lot of ways it's the least interesting part.