in Compiler Design edited by
2,034 views
1 vote
1 vote

​​​Consider the following two sets:

Set $\text{X}$Set $\text{Y}$
P. Lexical Analyzer1. Abstract Syntax Tree
Q. Syntax Analyzer2. Token
R. Intermediate Code Generator3. Parse Tree
S. Code Optimizer4. Constant Folding


Which one of the following options is the CORRECT match from Set $\boldsymbol{X}$ to Set $\boldsymbol{Y}$?

  1. $\mathrm{P}-4 ; \mathrm{Q}-1 ; \mathrm{R}-3 ; \mathrm{S}-2$
  2. $\mathrm{P}-2 ; \mathrm{Q}-3 ; \mathrm{R}-1 ; \mathrm{S}-4$
  3. $\mathrm{P}-2 ; \mathrm{Q}-1 ; \mathrm{R}-3 ; \mathrm{S}-4$
  4. $\mathrm{P}-4 ; \mathrm{Q}-3 ; \mathrm{R}-2 ; \mathrm{S}-1$
in Compiler Design edited by
by
2.0k views

2 Answers

0 votes
0 votes
  •  Lexical analysis $\rightarrow$ tokens
  • Syntax analysis $\rightarrow$ parse tree
  • ICG $\rightarrow$ abstract syntax tree
  • code optimization $\rightarrow$ constant folding (it is one of the code optimization methods)

Option $(B)$ is correct.

0 votes
0 votes
Option B is correct
Answer:

Related questions