3 ms·
> bare minimum compiler But who needs books on that? Especially considering that if I would like to write a simple toyish compiler I would rather use a parser
by ernst_klim 7y ago
> bare minimum compiler
But who needs books on that? Especially considering that if I would like to write a simple toyish compiler I would rather use a parser generator (handcrafting a parser makes sense only in the case of serious industrial grade compiler).
These books are books on parsers, not books on compilers. IMHO for learning a compiler craft it's much better to use a parser generator (or even Lisp) to skip the syntax part and move to something that constitutes an actual compiler: runtime interaction, exceptions mechanisms, code generation, type inference, intermediate languages, effect tracking etc etc.
- Athas 7y agoThis is a textbook for a university course. The intended audience for this book needs a bare minimum compiler, because that is all they will have time to write. You can't just say "use a parser generator". Who is supposed to write the parser generator, then? This book is for people who want to learn how to do all that foundational stuff, not an industrial programmer who needs to build a good product quickly.
- ernst_klim 7y ago>You can't just say "use a parser generator" You can just give students grammar for parser generator, and a parsetree/AST. Or use Lisp (Common Lisp or Scheme) and avoid syntax whatsoever.
- rhardih 7y agoYeah, imagine going through all that, trying to build your first ever Compiler, in an 8 week course as a CS freshman... (which is the intended audience)