(→Problem) |
|||
Line 2: | Line 2: | ||
= Problem = | = Problem = | ||
− | + | Initial symbol: '''S''' | |
− | |||
− | |||
− | + | Terminals: '''{ =, *, id }''' | |
− | |||
− | Terminals: { =, *, id } | ||
Input: | Input: | ||
− | + | S → L = R | R | |
+ | L → * R | id | ||
+ | R → L | ||
Is this an SLR(1) grammar? | Is this an SLR(1) grammar? | ||
+ | |||
+ | Compute and compact the parse table. | ||
== Solution == | == Solution == |
Contents |
Initial symbol: S
Terminals: { =, *, id }
Input:
S → L = R | R L → * R | id R → L
Is this an SLR(1) grammar?
Compute and compact the parse table.