UGC NET CS 2022Theory of Computation and Compilers › Syntax AnalysisVerified
UGC NET CS 2022 PYQ: Consider the following statements: Statement $\text{I}$ : $\text{LALR}$ parser is more powerful than…
Consider the following statements:
Statement $\text{I}$: $\text{LALR}$ parser is more powerful than canonical $\text{LR}$ Parser.
Statement $\text{II}$: $\text{SLR}$ parser is more powerful than $\text{LALR}$
Which of the following is correct?
- AStatement $\text{I}$ true and Statement $\text{II}$ false
- BStatement $\text{I}$ false and Statement $\text{II}$ true
- CBoth Statement $\text{I}$ and Statement $\text{II}$ falseCorrect answer
- DBoth Statement $\text{I}$ and Statement $\text{II}$ true
Answer
(C) Both Statement $\text{I}$ and Statement $\text{II}$ false
Approach
Compare the power of SLR, LALR and canonical LR parsers.
Reviewed by UGC IQ Editorial Team.