CS 1622 – Homework 2
Due: Tuesday, February 24, 2015 at the start of
class
Please submit a typewritten document. I’d prefer you draw your DFA on the computer, but if this is a challenge, you may hand draw them neatly on the paper by hand.
1.) Construct the DFA of LR(0) items for the following grammar:
A → a b B
B → b C d | b
C → e | ε
2.) Is this grammar LR(0)? Prove it.
3.) Show an SLR parse with full parse table for the input:
a b b d
Show the stack, input, and actions in an action table as was done in the slides.