Vadim Zaytsev aka @grammarware

Brinch Hansen's book DYOL: Design Your Own Language

Book sourcesLanguage Implementation — Brinch Hansen

P. B. Hansen, Brinch Hansen on Pascal Compilers, Prentice-Hall, 1985.

	title     = "{Brinch Hansen on Pascal Compilers}",
	author    = "Per Brinch Hansen",
	publisher = "Prentice-Hall",
	isbn      = "978-0130830982",
	year      = 1985,

LI-BH is a book about compilers for beginners. It takes the readers by the hand and walks them very gently through all phases of designing and developing a compiler of a subset of Pascal written in a superset of Pascal. Some terminology has become outdated: e.g., Keywords are “word symbols” and Virtual Machines are “language-based computers”. The author also heavily optimises every step which has a fair chance of teaching people premature optimisation, and makes some sections unnecessarily outdated for dismissing certain design options for the compiler because they would require 82kb more memory than the personal computer could have. Besides those points, it is a great introductory resource for writing language translators.

Favourite quote:

The compiler course is probably the only chance you will get as a student to write a realistic program of 1000 lines (or more) and make it work.


The DYOL toolkit was created and is maintained by Dr. Vadim Zaytsev a.k.a. @grammarware. Page last updated in March 2021.