Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | GATE-CS-2003 | Question 90

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Consider the grammar shown below.

S → C C
C → c C | d

The grammar is
(A) LL(1)
(B) SLR(1) but not LL(1)
(C) LALR(1) but not SLR(1)
(D) LR(1) but not LALR(1)


Answer: (A)

Explanation: Since there is no conflict, the grammar is LL(1). We can construct a predictive parse table with no conflicts. This grammar also LR(0), SLR(1), CLR(1) and LALR(1).

Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 28 Jun, 2021
Like Article
Save Article
Similar Reads