[mod.compilers] Compilers digest Vol. 1 Number 5

compilers@ima.UUCP (01/03/86)

[from compilers-request at IMA]

To: compilers
--------

Hello all, just running tthrough my mailbox, and I hav found that this
maillist has had little or no traffic. I would like to run some ideas
by you all in an attempt to figure out how to get some discussion going.

I would like to start the ball rolling by introducing a simple pascal
like language(Wirth's PL0 from Algorithms + Data Structures = Programs),
using a specific target environment (PC/IX).

The reason I chose this particular combination is that I already have
a skelatal compiler written and running,  so that part is done.
The better part is to cover the implementation of a better error recovery
process, and better generation of assembler source.

Presently the compiler is written as a recursive descent with follow symbol
error recovery. It is a one pass compiler that produces an intermidiate
file that is piped into a second pass that does very simple peephole
optimization. This optimizer is a filter, so the output can be fed 
back into itself in order to reverse propagate constant expressions, etc...

Finally a third pass converts the intermediate output to assembler source.

I wonder if persons on this list would like to start hacking up this
example in order to better understand the mechanics of compilation.

The target environment is simple to hackk for a different machine, and 
by itself presents unique problems in code generation.

I think that it would be great to start discussions about parts of the
compiler(and BTW get ideas in order to improve it...).

The first pass is about 33k in size, so it is rather large (and almost
commentless...). Its all in C with a lex frontend. No YACC in it.

Any ideas and comments about this or any other ideas of compiler hacking???
-----------------------------------------------------------------------------
Send submissions to:  ima!compilers
Send requests for additions, deletions, back issues, etc. to:
	ima!compilers-request

ima is reachable as { ucbvax!cbosgd | ihnp4 | cca | bbncca | think |
	uiucdcs | allegra | inmet | yale | harvard }!ima!...

Arpa mail may make it to ima!compilers@CCA-UNIX or ima!compilers@BBNCCA

Peter Barada (editor)	John Levine (mailman)
--------