Which phase of compiler generates stream of atoms?
(A) Syntax Analysis
(B) Lexical Analysis
(C) Code Generation
(D) Code Optimization
Answer: (A)
Explanation:
- Syntax Analysis generates stream of atoms.
- Lexical Analysis is the first phase of compiler also known as scanner. It converts the input program into a sequence of Tokens.
- In the analysis-synthesis model of a compiler, the front end of a compiler translates a source program into an independent intermediate code, then the back end of the compiler uses this intermediate code to generate the target code (which can be understood by the machine).
- The code optimization in the synthesis phase is a program transformation technique, which tries to improve the intermediate code by making it consume fewer resources (i.e. CPU, Memory) so that faster-running machine code will result.
So, option (A) is correct.
Quiz of this Question
Article Tags :
Recommended Articles