
472 Appendix D
The only inadequate state is 7, with Shift/Reduce conflict on B. So we find
FOLLOW(B) = {#, e} and {#, e} ∩ {e} ≠ ∅
so it is not an SLR(1) grammar.
Then in order to check if LASL(1) can be applied, we find LA(7,B). Suppose we have reduction
at state 7, then two symbols ‘C’ nd ‘c’ are unstacked and state 3 is uncovered. On taking a transition
on ‘B’ from here, we arrive at state 5, where another reduction takes place on ‘b’‘B’ and state 0 is
uncovered. Taking transition ‘A’ from there we arrive at state 2, where the look-ahead symbol is #.
Therefore LA(7,B) = {#} and as this is disjoint with {e}, we can apply LALR(1) resolution ...