GATE | GATE CS 1999 | Question 17

Which of the following is the most powerful parsing method?
(A) LL(1)
(B) Canonical LR
(C) SLR
(D) LALR


Answer: (B)

Explanation: Canonical LR is the most powerful parser as compared to other LR parsers.

Order: LR(0) < SLR < LALR < CLR . SLR parser is a type of LR parser with small parse tables and a relatively simple parser generator algorithm. Canonical LR parser or LR(1) parser is an LR(k) parser for k=1, i.e., with a single lookahead terminal. It can handle all deterministic context-free languages. LALR parser or Look-Ahead LR parser is a simplified version of a canonical LR parser. Option (B) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up

Improved By : vivekkumarmth0077

Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.