+1 vote
91 views
Consider the grammar given below. It is

E -> T+E | T

T -> a

a. SLR(1) but not LL(1)

b. Not an operator grammar

c. Ambiguous

d. None of these

+1 vote

For LL(1) :

First(T+E) ⋂⋂ First(T) = PHI

{a }  ⋂⋂ {a} != PHI

SO not LL(1).

Is it a ? Its not LL 1 as first of E one will have conflict of two production s.To chk SLR1 we can construct canonical collections and then chk.
I dont have the answer. And don't have any idea how to proceed in these questions.

For LL(1) :

First(T+E) $\bigcap_{}^{}$ First(T) = PHI

{a }  $\bigcap_{}^{}$ {a} != PHI

SO not LL(1).