HACKER Q&A
📣 zadkey

Which are the best resources to learn Compiler Design


I have tried a few books and such and many are overly academic and not practical at all.


  👤 azhenley Accepted Answer ✓
Crafting Interpreters https://www.craftinginterpreters.com/contents.html

Writing an Interpreter in Go https://amzn.to/2PA5LEh

Let's Build a Compiler https://compilers.iecc.com/crenshaw/

Awesome list of compiler resources https://github.com/aalhour/awesome-compilers


👤 CyberFonic
I cut my teeth on the "Dragon Book", but as you say once you get past the syntax analysis material it becomes increasingly opaque. Most books are written to be used as part of some CS curriculum. Only a tiny number of SEs go on to work on compilers.

Personally I found the Nanopass approach much easier to understand because it breaks down the compilation process into lots of simple transformation steps: https://nanopass.org/