Professional Documents
Culture Documents
introduction:
1
حيدر عبد الرضا عبد الحسين/ اعداد الطالب مسائي/ المرحلة األولى COMPILER
What is a compiler?
2
حيدر عبد الرضا عبد الحسين/ اعداد الطالب مسائي/ المرحلة األولى COMPILER
Types of compilers
Compilers can be divided into three types in terms of how they
perform their task and generate the target code:
1- Single-Pass Compiler: With this type of compiler, high-level
source code is translated directly into low-level code
without any intermediate stages.
2- Two-Pass Compiler: With this type of compiler,
intermediate source code is generated so that the work of
the compiler as a whole is understood as two parts: the
front-end and the back-end. The function of the proximal
section is to convert the source code to the intermediate
representation and perform text and vocabulary analysis
operations in addition to optimization operations, and then
the back-end section converts the intermediate source code
to the low-level target code.
4
حيدر عبد الرضا عبد الحسين/ اعداد الطالب مسائي/ المرحلة األولى COMPILER
Loader: The loader is one of the parts of the operating system and
its function is to download the executable file resulting from the
link, place it in memory, and then run it.
5
حيدر عبد الرضا عبد الحسين/ اعداد الطالب مسائي/ المرحلة األولى COMPILER
Compiler Phases
As we found, the compiler itself represents a step in the
processing steps needed to transform the script from its high-
level form into machine language instructions executable by the
processor, but this does not mean that the compiler itself is an
independent stage in itself, but rather it also consists of a set of
steps In general, the translator's work can be divided into two
basic parts:
Analysis Phase / Front-End
Synthesis Phase / Back-End