GATE CSE
First time here? Checkout the FAQ!
x
+1 vote
101 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
asked in Compiler Design by Active (1.1k points)   | 101 views

2 Answers

+1 vote
Best answer

Answered by gabber:

For LL(1) :

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

 {a }  ⋂⋂ {a} != PHI 

SO not LL(1).

 

 

 

 

answered by Veteran (14k points)  
0 votes
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.
answered by Junior (663 points)  
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).

 

 



Top Users Aug 2017
  1. Bikram

    4902 Points

  2. ABKUNDAN

    4704 Points

  3. akash.dinkar12

    3480 Points

  4. rahul sharma 5

    3158 Points

  5. manu00x

    3012 Points

  6. makhdoom ghaya

    2470 Points

  7. just_bhavana

    2388 Points

  8. stblue

    2138 Points

  9. Tesla!

    2060 Points

  10. joshi_nitish

    1758 Points


25,014 questions
32,139 answers
74,821 comments
30,185 users