INTRODUCTION TO COMPILER DESIGN
KEY COMPONENTS OF A COMPILER
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
Syntax Analysis
|
|
Intermediate Code generation
|
|
Lexical Analysis
|
|
All of the mentioned
|
Detailed explanation-1: -Explanation: Machine independent phases are Lexical analysis, Syntax analysis, Semantic analysis, Intermediate code generation and sometime code optimization.
Detailed explanation-2: -Machine dependent code optimization is applied to object code. Machine-independent code optimization is applied to intermediate code. Machine dependent optimization involves CPU registers and absolute memory references. Machine independent code optimization does not involve CPU registers or absolute memory references.
Detailed explanation-3: -There are two phases of the compilation process: Analysis: It breaks up the source code/program into small parts and creates an intermediate representation of the source program. Synthesis phase: It takes the intermediate representation of the source program as input and creates the desired target code/program.
Detailed explanation-4: -1. Which phase of the compiler is Syntax Analysis? Explanation: It is Second Phase Of Compiler after Lexical Analyzer. Explanation: It is also called as Hierarchical Analysis or Parsing.