Source: https://www.dabeaz.com/compiler.html
Compilers is often considered a capstone course for computer science majors. There is a good reason for that–compilers are tools that programmers use in their day-to-day work regardless of the application domain. Moreover, implementing a compiler touches nearly every topic of computer science ranging from the theoretical to the practical. Thus, learning more about how a compiler works makes you a more informed programmer.
That said, it might not seem like writing a compiler would be directly related to the typical kinds of programming you’d do at work. This is probably true. However, writing a compiler is really an exercise in managing software complexity. Compilers have a lot of moving parts, are difficult to test, and challenging to debug. Thus, compilers a great playground for studying problems that confront all sorts of real-world software projects.
A true story: I once had a former student stop by my office to tell me how he helped save a major coding disaster involving health insurance. I asked “how’d you do that?” He said, “I used something I learned while writing a compiler.”
Prerequisites
You might not think that you’re ready to write a compiler, but if you’ve been coding for awhile and know the basics of data structures, it’s something that you could probably tackle. No prior background in compilers is required although awareness of common programming language concepts (e.g., types, functions, classes, scoping rules, etc.) is strongly advised. Some knowledge of text manipulation, computer architecture (machine instructions, memory, etc.), and prior use of a compiled language is also recommended. Robert Nystrom’s Crafting Interpreters book is also an excellent source of background information.
Download Links
Password: cms.ddpanda.org












