NTA UGC NET Aug 2024 Paper-2
February 24, 2025
Process-Scheduling
February 26, 2025
NTA UGC NET Aug 2024 Paper-2
February 24, 2025
Process-Scheduling
February 26, 2025

GATE 2010

Question 38

The grammar S → aSa|bS|c is

A
LL(1) but not LR(1)
B
LR(1) but not LR(1)
C
Both LL(1) and LR(1)
D
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).

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).

Leave a Reply

Your email address will not be published. Required fields are marked *