Note: Section 6.2.1 of our textbook talks about how to build the LR(0)
collection of states, which the book calls the CFSM (characteristic
finite-state machine). The book's treatment of lambda is a bit confusing,
because the dot (·) appears to the left of lambda in a
state, and never moves across it. If you have the rule
A → lambda
in your grammar, than I like to write this as
A → ·
in a state. This is consistent with having the bullet moved all the way
to the right of a rule's right-hand side, at which time a reduction is
Text exercise 1 on page 208. In lecture, I combien the
goto and action tables. Please do the same.
Also, the goto table for this exercise has an error: the entry for SimpleStmt
and state 9 should be 5 not 6.