|Algol 60 compiler(s) J.vanKatwijk@EWI.TUDelft.NL (Katwijk, Jan van) (2003-09-30)|
|Re: Algol 60 compiler(s) firstname.lastname@example.org (2003-10-06)|
|From:||"Katwijk, Jan van" <J.vanKatwijk@EWI.TUDelft.NL>|
|Date:||30 Sep 2003 23:55:51 -0400|
|Posted-Date:||30 Sep 2003 23:55:50 EDT|
Long time ago I used to be active in the field of compilers. For the
last decade I have been involved in managerial work. Last year I
decided to do a toy compiler project and I wrote an ALGOL 60
compiler. I agree, not the most modern language, but nevertheless, an
interesting language (about 30 years ago I wrote an ALGOL 60 compiler
for the PDP-11)
The compiler fully implements ALGOL 60 as described in the modified
report on ALGOL 60.
Its main characteristics are:
a. just use a recursive descent parser to build an AST
b. make a walk over the AST for handling context conditions
c. make another walk (actually two) and generate C code
2. operators are not "hard-wired" in the language, a special operator
definition file is used which contains the operator descriptions and
their C translation
Starting point was that the C code should be as readable as possible,
i.e. no "simulation" of stack machines. The distribution I have
contains a manual with a number of examples of the translationscheme
One of the things I am missing is example programs (non-trivial ones).
All standard examples. man or boy, jenssens device etc work.
Implementation language = C, I started with C++ for the nodes of the
AST but recently rewrote the treenode access functions in a way that
the compiler can be rewritten in ALGOL itself.
The distribution was sent to John Cowan for the retro computing
museum, it is made available under the GNU license.
Of course, I'm willing to send you the distribution (more or less
jan van katwijk
I would like to get some feedback.
Return to the
Search the comp.compilers archives again.