Question
SLR(1) 10.0 points possible (graded, results hidden) Consider the following grammar, 0.SS 1.SL=R 2.SR 3.LR 4.Lid 5.RL Figure 1 Figure 1 shows the skeleton of
SLR(1)
10.0 points possible (graded, results hidden)
Consider the following grammar,
0.SS
1.SL=R
2.SR
3.LR
4.Lid
5.RL
Figure 1
Figure 1 shows the skeleton of the LR(0) automaton for the grammar.
Complete the rest of the set of items. Construct the SLR(1) table and answer the following questions based on your derived results.
1. Which of the following actions are in the cell corresponding to (I0, *)?
S1
S2
S3
S4
S5
S6
S7
S8
S9
R1
R2
R3
R4
R5
None of the above
unanswered
2. Which of the following actions are in the cell corresponding to (I3, $)?
S1
S2
S3
S4
S5
S6
S7
S8
S9
R1
R2
R3
R4
R5
None of the above
unanswered
3. Which of the following actions are in the cell corresponding to (I5, $)?
S1
S2
S3
S4
S5
S6
S7
S8
S9
R1
R2
R3
R4
R5
None of the above
unanswered
4. Which of the following actions are in the cell corresponding to (I5, =)?
S1
S2
S3
S4
S5
S6
S7
S8
S9
S10
R1
R2
R3
R4
R5
None of the above
unanswered
5. Which of the following cells contain R5?
(I2, id)
(I2, =)
(I2, *)
(I2, $)
(I8, id)
(I8, =)
(I8, *)
(I8, $)
(I7, b)
(I7, $)
None of the above
unanswered
6. Which of the following cells contain R3?
(I2, id)
(I2, =)
(I2, *)
(I2, $)
(I7, id)
(I7, =)
(I7, *)
(I7, $)
(I8, b)
(I8, $)
None of the above
unanswered
7. Which of the following actions are in the cell corresponding to (I4, id)?
S1
S2
S3
S4
S5
S6
S7
S8
S9
R1
R2
R3
R4
R5
None of the above
unanswered
8. How many items are in the set of items I4? unanswered
9. Is the grammar an SLR(1) grammar?
Yes
No
unanswered
10. What kind of conflict(s) are there in the table (If any)?
Shift/Reduce
Reduce/Reduce
No conflict
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started