Next: The Task of an
Up: No Title
Previous: Why study Compiler Construction?
- The main task of a compiler is to map programs written in a given
source language into a target language
- Often, the source language is a programming language and
the target language is a machine language
- Some exceptions: Source-to-source translators, machine-code translation,
data manipulation in XML
- Part of the task of a compiler is also to detect, whether a given
program conforms to the rules of the source language.
- A specification of a compiler consists of
- A specification of its source and target languages
- A specification of a mapping between them