https://github.com/deepanprabhu/simple-expression-compiler<p>Guys, would anybody be interested to read a simple, pithy ebook, that describes fundamentals of building a simple tiny compiler in Java to begin with ? I would also take the reader through building a simple compiler themselves, step by step, using Java. The exercise simple enough that i chose is, taking a mathematical expression like 6 * 5 + 3 * ( 2 -1 ), and generating NASM assembly code, that we would compile and execute using NASM. Please give me your thoughts !
I think the best tutorial would not be for a toy language or just for simple expressions. But for a subset of a real language. That way the details learnt are directly applicable to the real world. Create a compiler for a subset of C or a subset of Java. Then it is possible for the reader to continue developing that compiler to include more and more features.