Compilation using multiple source-to-source stages
Eduardus Antonius Theodorus Merks · Summit (Simon Fraser University) · 1987
Compilers have bzditionJly been pro&ed as monolit@c entities.There i s little or n o control over the ---.p-ess of compilation since the behaviour of the compiler is completely determined by its fixed implementation.Much of a conventional compilef s inflexibility can be attributed to the technique of mslating the high-level Language to an inaccessible intermediate form.The proposed alternative is to use transformations which replace complex high-level constructions with equivalent iower-level constructions still in source form.The final transformed program is then directly translated t o object code.Thus the source language is also the intermediate language.A source-to-source compiler is composed of general purpose components which can be used in many other applications.Compiler flexibility is achiwed through reconfiguration of the individual transformations.Yhese transformations produce conceptually simple changes and can therefore be reliably coinbined to produce a customized compiler.A Modula-2 compiler has been constructed to explore increases in functionality, flexibility and reliability.