COMPILER DESIGN

TOOLS AND TECHNIQUES FOR COMPILER DESIGN

MISCELLENOUS

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which is taken as input for the synthesis phase?
A
Source code
B
Object code
C
Intermediate code
D
Optimized code
Explanation: 

Detailed explanation-1: -Intermediate code generator receives input from its predecessor phase and semantic analyzer phase. It takes input in the form of an annotated syntax tree. Using the intermediate code, the second phase of the compiler synthesis phase is changed according to the target machine.

Detailed explanation-2: -Intermediate code can be represented in three forms, which are postfix notation, Syntax trees, Three address code. In a compiler, three address code can be implemented as records with fields for operator and operands. There are three such representations, Quadruples, Triples, Indirect triples.

Detailed explanation-3: -Synthesis Phase Phase : A phase of a compiler is a distinguishable stage, which takes input from the previous stage, processes and yields output that can be used as input for the next stage. A pass can have more than one phase.

There is 1 question to complete.