GATE CSE
First time here? Checkout the FAQ!
x
+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
asked in Compiler Design by Active (1.1k points)   | 91 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 (13.7k 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 (635 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 Jun 2017
  1. Bikram

    3704 Points

  2. Hemant Parihar

    1484 Points

  3. junaid ahmad

    1432 Points

  4. Arnab Bhadra

    1408 Points

  5. Niraj Singh 2

    1311 Points

  6. Rupendra Choudhary

    1194 Points

  7. rahul sharma 5

    1148 Points

  8. Debashish Deka

    1112 Points

  9. srestha

    932 Points

  10. Arjun

    930 Points

Monthly Topper: Rs. 500 gift card
Top Users 2017 Jun 19 - 25
  1. Bikram

    1960 Points

  2. Niraj Singh 2

    1306 Points

  3. junaid ahmad

    502 Points

  4. sudsho

    410 Points

  5. akankshadewangan24

    392 Points


23,361 questions
30,068 answers
67,376 comments
28,385 users