Pascal Implementation

September 29, 2007 | Programming Languages | By: Mark VandeWettering

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:

Pascal Implementation

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]

Comments

Comment from Dan Lyke
Time 9/30/2007 at 11:23 am

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.