reopened by
1,188 views
2 votes
2 votes
Consider the grammar :

$S\rightarrow SS+ | SS* | a$

Which of the following is true:

A) SLR(1) but not LL(1)

B) LALR(1) but not  SLR(1)

C) LR(1) but not LALR(1)

D) Neither LL(1) nor LR(1)

I feel the grammar is unambiguous as I couldn't get more than one parse tree for any inputs I tried. (Their key is suggesting the answer D saying it's ambiguous)
Shouldn't A be the answer? Please guide me and correct me if I'm wrong
reopened by

1 Answer

0 votes
0 votes
I think it is SLR(1) becoz of no R/R or S/R conflict but not LR(1) or LL(1)

therefore ans should be A

Related questions

0 votes
0 votes
1 answer
1
Aibi asked Sep 22, 2017
734 views
S - AaA - AbA - cWhich of the following item is present in LR(1) item with S' - .S, $\$$ ?A) A - .Ab, $\$$B) A - .c, $\$$C) A - .Ab, a/bD) None
8 votes
8 votes
2 answers
2
1 votes
1 votes
1 answer
3
thor asked Nov 17, 2016
328 views
0 votes
0 votes
1 answer
4