LIST-I Input LIST-II Compiler Phase A. Syntax Tree I. Code Generator B. Character Stream II. Syntax Analyzer C. Intermediate Representation III. Semantic Analyzer D. Token Stream IV. Lexical Analyzer
This question requires matching concepts from LIST-I with the corresponding phases of a compiler listed in LIST-II. The correct matching is determined by understanding the role of each phase.
The Syntax Tree represents the grammatical structure of the code. The Semantic Analyzer processes this tree to check for type consistency, variable declarations, and other meaning-related rules.
The Character Stream is the raw sequence of input characters from the source code. The Lexical Analyzer (also known as the scanner) reads this stream to identify and group characters into meaningful tokens.
Intermediate Representation (IR) is a representation of the source code that is machine-independent but closer to machine code than the source. The Code Generator phase takes this IR as input to produce the final target machine code.
The Token Stream is the sequence of tokens produced by the Lexical Analyzer. The Syntax Analyzer (also known as the parser) takes this stream as input to verify the grammatical structure according to the language's rules, often building a syntax tree.
Based on the analysis, the correct matches are:
This corresponds to the option A-III, B-IV, C-I, D-II.
Consider the control flow graph shown in the figure.

Which one of the following options correctly lists the set of redundant expressions (common subexpressions) in the basic blocks B4 and B5?
Note: All the variables are integers.