Match the description of several parts of a classic optimizing compiler in List-I, with the names of those parts in List - II :
Match the description of several parts of a classic optimizing compiler in List-I, with the names of those parts in List - II :
List-I
A. A part of a compiler that is responsible for recognizing syntax
B. A part of a complier that takes as input a stream of characters and produces as output a stream of words along with their associated syntactic categories
C. A part of a compiler that understand the meanings of variable names and other symbols and checks that they are used in ways consistent with their definitions.
D. An IR-to-IR transformer that tries to improve the IR program in some way (Intermediate Representation)
List-II
i. Optimizer
ii. Semantic Analysis
iii. Parser
iv. Scanner
Code :
A B C D
Show answerHide answer
Correct answer: (A) iii iv ii i
Explanation
The parser (syntax analyzer) recognizes syntax (A-iii); the scanner (lexical analyzer) turns the character stream into words/tokens (B-iv); the semantic analyzer checks meanings and consistent use of names (C-ii); the optimizer is an IR-to-IR transformer that improves the IR program (D-i).