[Oberon] Compiler Construction by Niklaus Wirth

Paul Reed paulreed at paddedcell.com
Thu Jan 7 11:29:21 CET 2021

On 2021-01-07 10:00, Andreas Pirklbauer wrote:
> ... But all you need is to thoroughly read
> NW’s book Compiler Construction. Better than any PhD for this task!

I completely agree. As a printed book, it's only 131 pages, and 
wonderfully concise. "A refreshing antidote to heavy theoretical 
tomes..." loved on sight by time-poor students, for example.

It's really worth trying to get a physical copy - the act of picking it 
up and turning it to see how thin it is, gives one a great deal of 

It certainly launched my compiler construction path much better than 
those other tomes, most of which, for example, leave actual code 
generation almost as an exercise to the reader.

I built an Oberon-0 compiler for DOS and 16-bit Windows (yeah I know) 
and made it compile some simple Oberon-0 programs as a goal.

Then I started again with what I'd learned, converting the full Project 
Oberon compiler.


(Little did I know, then, how the Compiler Construction compiler's 
abstract RISC target was going to figure again in my life, much later.) 

Note that this is a good example of Prof. Wirth's objective when 
publishing: it's not to dump some source code out there, but to present 
carefully-designed working programs in such a way that, primarily, it's 
possible to learn from them, "not merely copy". His books reward (more 
than one) careful reading in a way that most don't, in my experience.

As a corollary it's worth remembering that Wirth's Oberon work is not 
designed as (and shouldn't be criticised as) a body of code to be 
"maintained" and "improved" by "the community", just because it's now on 
the web rather than in a book.


More information about the Oberon mailing list