Next: Books Up: C73-Compiler Techniques Previous: Preface

Introduction

A more realistic title would be Language Implementation Techniques since compilers incorporate interpreters, although for very specialized languages, and interpreters incorporate compilers.

What is a compiler? A translator from one language to another. The target language is usually either at the ``same'' level or ``lower'' according to some fuzzy metric by which we classify languages.

What is an interpreter? A giver of meaning, for example, the hardware gives meaning to the bit patterns representing instructions or consider languages such as Basic, ML and Lisp.

Influences: architecture (CISC, RISC, microcoded), grammar (complexity), semantics (procedural, logic, functional, dataflow, rewrite, object-oriented, typeless, statically typed, dynamically typed).

Philosophical aspects of compilation: interpreter (meaning), translator (grammar), transformer (optimisation).

Task of compiler writing is to find a path through this jungle of ideas using the tools that have been created to assist in compiler writing over many years-program generators exist for each phase of compilation.

Examples will be given in C, Lisp, ML and M68000 assembler.

Classify kinds of compiler by the kind of output:

and the format of their output: Interpreters fall into two categories: Interpreters use compilation and compilers use interpretation, therefore we must study both.


Next: Books Up: C73-Compiler Techniques Previous: Preface


masjap@
Fri Oct 21 18:42:03 BST 1994