Chapter 2: Introduction to compilers

Bootstrapping .

. A compiler can be characterized by three languages: the source language (S), the target language (T), and the implementation language (I)

. The three language S, I, and T can be quite different. Such a compiler is called cross-compiler

Compilers are of two kinds: native and cross .

Native compilers are written in the same language as the target language. For example, SMM is a compiler for the language S that is in a language that runs on machine M and generates output code that runs on machine M.

Cross compilers are written in different language as the target language. For example, SNM is a compiler for the language S that is in a language that runs on machine N and generates output code that runs on machine M.