retagged by
1,580 views
0 votes
0 votes

Why isn't it LL(1) ?

retagged by

3 Answers

Best answer
3 votes
3 votes

Given grammar is not LL(1) because for Non-terminal "A" contains two entries in LL(1) table .

  a b $
S S-->aAb    
A

A-->aAb

A--->a

   

Given grammar is  LR(1)  because there is no conflict while constructing DFA for LR(1).

selected by
0 votes
0 votes
This grammar is not LL(1) coz we encounter a SR conflict while making canonical collection of LR(0) items.

but in case of LR(1) or CLR(1) we don't have any conflict so the correct option is c.
Answer:

Related questions

8 votes
8 votes
3 answers
1
Parshu gate asked Nov 13, 2017
15,505 views
Suppose we are given a grammar and asked to find the type of that grammar , what is the algorithm which needs to be followed for each of them? LL(1), OR LR(0) , OR CLR(1...
1 votes
1 votes
1 answer
2
thor asked Nov 17, 2016
328 views
2 votes
2 votes
1 answer
3
sripo asked Nov 10, 2018
3,259 views
Can you give an example which is not LL(1) but is CLR(1)
1 votes
1 votes
1 answer
4