by ernst_klim · 6y ago · 0 comments
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.
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.
You can just give students grammar for parser generator, and a parsetree/AST. Or use Lisp (Common Lisp or Scheme) and avoid syntax whatsoever.