COMPILER DESIGN

SYNTAX ANALYSIS

ROLE OF THE PARSER

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Number of phases in an interpreter are
A
2
B
4
C
6
D
8
Explanation: 

Detailed explanation-1: -Interpretation Phases. That is, an interpreter does lexing, parsing, and semantic analysis.

Detailed explanation-2: -There are 6 phases in the compiler, namely, lexical analysis, syntax analysis, semantics analysis, intermediate code generation, code optimization, and code generation.

Detailed explanation-3: -Strategies of an Interpreter It can work in three ways: Execute the source code directly and produce the output. Translate the source code in some intermediate code and then execute this code. Using an internal compiler to produce a precompiled code.

Detailed explanation-4: -An interpreter is a general purpose language providing very efficient execution. View Answer. Correct Option: C.

There is 1 question to complete.