Skip to content

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?

  1. A
    Statement $\text{I}$ true and Statement $\text{II}$ false
  2. B
    Statement $\text{I}$ false and Statement $\text{II}$ true
  3. C
    Both Statement $\text{I}$ and Statement $\text{II}$ false
    Correct answer
  4. D
    Both 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.