COMPUTER SCIENCE AND ENGINEERING
COMPILER DESIGN
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
1
|
|
2
|
|
6
|
|
8
|
Detailed explanation-1: -The 6 phases of a compiler are: Lexical Analysis. Syntactic Analysis or Parsing. Semantic Analysis.
Detailed explanation-2: -We basically have two phases of compilers, namely the Analysis phase and Synthesis phase. The analysis phase creates an intermediate representation from the given source code.
Detailed explanation-3: -Summary. Compiler operates in various phases each phase transforms the source program from one representation to another. Six phases of compiler design are 1) Lexical analysis 2) Syntax analysis 3) Semantic analysis 4) Intermediate code generator 5) Code optimizer 6) Code Generator.
Detailed explanation-4: -Compilation process in C involves four steps: pre-processing, compiling, assembling, and linking. The preprocessor tool helps in comments removal, macros expansion, file inclusion, and conditional compilation. These commands are executed in the first step of the compilation process.