If you have a JVM installed, you could use oberonc[0]. I have a local branch where I test that each release of the compiler can compile and run the examples in that book.
I guess what I'm asking is if Oberon-0 is a subset of Oberon-7, which oberonc seems to implement. Do you think it is possible to implement Oberon-0 in itself ?
Oberon-0 is too limited to easily bootstrap itself. I wrote oberonc first in Java and then I rewrote it in Oberon-07 for the final bootstrap step. Oberon-0 is a toy subset of the full Oberon-07 language.
I can push the changes in a repo if you are interested.
Thanks. That would be great for the people that want to follow the Compiler Construction book. (Thanks for posting the link for the 2017 version) Oberon-0 is a toy subset of the full Oberon-07 language.
So I can write small Oberon-0 programs and try these using Oberon-07.Yes, you can write small Oberon-0 programs and compile them with an Oberon-07 compiler, but it is simpler to just use the Oberon-0 compiler from the repo above.
A proposed adhoc parser without an intermediate representation is a sure way to create an unnecessary mess in reader's head. Somewhat understandable given the technical limitations of those days, but still the authors could do a better job there.
Dragon Book (Compilers: Principles, Techniques, and Tools) and "Compiler Construction" by Niklaus Wirth are much more sensible choices.