Web-Technologies
February 24, 2025Process-Scheduling
February 26, 2025GATE 2010
Question 38
|
The grammar S → aSa|bS|c is
LL(1) but not LR(1)
|
|
LR(1) but not LR(1)
|
|
Both LL(1) and LR(1)
|
|
Neither LL(1) nor LR(1)
|
Question 38 Explanation:
The LL(1) parsing table for the given grammar is:

As there is no conflict in LL(1) parsing table, hence the given grammar is LL(1) and since every LL(1) is LR(1) also, so the given grammar is LL(1) as well as LR(1).

As there is no conflict in LL(1) parsing table, hence the given grammar is LL(1) and since every LL(1) is LR(1) also, so the given grammar is LL(1) as well as LR(1).
Correct Answer: C
Question 38 Explanation:
The LL(1) parsing table for the given grammar is:

As there is no conflict in LL(1) parsing table, hence the given grammar is LL(1) and since every LL(1) is LR(1) also, so the given grammar is LL(1) as well as LR(1).

As there is no conflict in LL(1) parsing table, hence the given grammar is LL(1) and since every LL(1) is LR(1) also, so the given grammar is LL(1) as well as LR(1).
Subscribe
Login
0 Comments