Pascal is one of my least favorite languages, but reading about how compilers work and examining real code of the (actually fairly simple) system works is fun. Check out:
Included here is the Pascal source of a public-domain Pascal compiler and interpreter, the P4 compiler and interpreter. It is coded entirely in Pascal, and produces a high-level so-called intermediate code as output. The program ‘pint’ is an assembler and interpreter for this language.
The complete text of the book explaining the compiler is also available.
[tags]Programming Languages, Pascal[/tags]
To that end, have you read Alan Holub’s “Compiler Design in C”? I think I’ve got it around here somewhere, although I may have given it to John, of Genehack fame, but if I’ve got it and you haven’t read it yet I’ll try to get it to you at some point. It’s a complete bootstrapping of a C compiler, and (at least when I last perused it was) a good read.