Bootstrapping
Writing a compiler is a
quite complicated task, one will usually prefer to write it in a high-level
language. A possible choice is to use a language that is already available on
the machine where the compiler should eventually run.
To reduce the designing effort and to bring qualitative improvement a technique
is introduce. Such technique is called Bootstrapping of a compiler.
A
compiler is based on three languages :-
1. Source Language
2. Target Language
3. Implementation Language
For designing a compiler we use some notation :-
1. ”S” for Source Language.
2. ”T” for Target Language.
3. ”I” for Implementation Language.
# To
create a new language, L, for machine A:
1. Create , a compiler for a subset "S" of the desired language "L" using language "A", which runs on machine "A". (Language "A" may be assembly language.)
2. Create , a compiler for language "L" written in a subset of "L".
3. Compile using to obtain , a compiler for language "L", which runs on machine "A" and produces code
for machine "A".
The
process illustrated by the T-diagrams is called bootstrapping and can be
summarized by the equation:
0 comments