Skip to content
Related Articles

Related Articles

ISRO | ISRO CS 2015 | Question 29
  • Last Updated : 06 Apr, 2018

Which statement is true?
(A) LALR parser is more powerful and costly as compare to other parsers
(B) All CFG’s are LP and not all grammars are uniquely defined
(C) Every SLR grammar is unambiguous but not every unambiguous grammar is SLR
(D) LR(K) is the most general back tracking shift reduce parsing method


Answer: (C)

Explanation: 1) Canonical LR is the most powerful parser as compared to other LR parsers. Order: LR(0)< SLR < LALR < CLR 2) LP (Linear Precedence) Grammars are CFL but not vice-versa. 3) SLR grammar cannot be ambigious but if any unambigious grammar has shift-reduce conflict then it cannot be parsed with a SLR parser. 4) LR(k) has a k-look ahead which can always see ahead the input in order to avoid backtracking. So, it is a non-bacaktracking parser. Option (C) is correct.

Quiz of this Question

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :