2 ms·
I would recommend "Compiler Construction" by Niklaus Wirth. This small book (< 200 pages) will teach you the basics and show you how to build a single-pass comp
by lboasso 9y ago
I would recommend "Compiler Construction" by Niklaus Wirth. This small book (< 200 pages) will teach you the basics and show you how to build a single-pass compiler for a subset of Oberon (a Pascal successor).
The book is freely available here: http://people.inf.ethz.ch/wirth/CompilerConstruction/index.html http://people.inf.ethz.ch/wirth/CompilerConstruction/index.h...
For a more comprehensive example, you can have a look at my compiler for the full Oberon language targeting the JVM. It is based on the principles of that book: https://github.com/lboasso/oberonc https://github.com/lboasso/oberonc
- i_don_t_know 9y agoI second the recommendation. Wirth's compiler book is a wonderful, concise and very readable introduction.