Skip to content
Related Articles
Open in App
Not now

Related Articles

ISRO | ISRO CS 2015 | Question 29

Improve Article
Save Article
  • Last Updated : 13 Nov, 2022
Improve Article
Save Article

Which statement is true?


LALR parser is more powerful and costly as compare to other parsers


All CFG\’s are LP and not all grammars are uniquely defined


Every SLR grammar is unambiguous but not every unambiguous grammar is SLR


LR(K) is the most general back tracking shift reduce parsing method

Answer: (C)


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 ambiguous but if any unambiguous 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
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!