Hacker News new | ask | show | jobs
by celnardur 2326 days ago
In my compilers class we used a book that my professor wrote that takes you through all the steps and algorithms for making a compiler for a c like language. You can find it online for free at: https://www3.nd.edu/~dthain/compilerbook/

I really like this book because it really takes you through all the steps. However, it's very readable and provides great examples of how to actually implement some of the components.

I also like it because it explains how to use tools like Yacc and Bison, while explaining how they work underneath and the motivation for using such tools.

I leaned on this book heavily in the class where the main assignment was writing our own compiler from scratch in C, and I'm currently using it now to make a compiler in rust for a custom language.