Which parser statements are correct? I: Canonical LR is more powerful than SLR. II: SLR is more powerful than LALR. III: SLR is more powerful than Canonical LR.
The grammar-class inclusion is SLR(1) ⊂ LALR(1) ⊂ canonical LR(1). Canonical LR retains full LR(1) lookahead context; SLR uses the coarser FOLLOW sets. Thus only I is true, A.
More Parsing and Syntax Analysis questions
GATE 2017 CS (CS2) Q42– G has E→E−T T, T→T+F F, F→(E) id. Which equivalent grammar has no left recursion?
GATE 2012 CS (CS1) Q62– S→aAbB bAaB ε; A→S; B→S. The partial predictive table has S row (E1,E2,S→ε), A row…
GATE 2012 CS (CS1) Q63– S→aAbB bAaB ε; A→S; B→S. The partial predictive table has S row (E1,E2,S→ε), A row…
GATE 2013 CS (CS1) Q19– A grammar has no ε-productions or unit productions (the source gives types A→ε and A→a).…
GATE 2013 CS (CS1) Q50– Two LR(1) item sets share core X→c·X, X→·cX, X→·d. Their lookaheads are respectively c,d…
GATE 2011 CS (CS1) Q37– Binary operator ↓ has lower precedence than ↑. Operator ↑ is right-associative and ↓…