3 ms·
You might have a look at "Write Your Own Compiler", which builds a full compiler (emitting ELF) for a block-structured language in less than 1600 lines of code.
by nils-m-holm 8y ago
You might have a look at "Write Your Own Compiler", which builds a full compiler (emitting ELF) for a block-structured language in less than 1600 lines of code. It is a very short introduction (slight more than 100 pages) and yet covers many aspects of compiler writing. The compiler source code is in the public domain.
Yes, I'm the author! There are other, more in-depth, compiler books on my homepage: http://t3x.org http://t3x.org
The home page also contains the source code to many compilers and interpreters at different levels of complexity, from trivial to real-world.