![]() | ![]() | ![]() | About this closure stuff... |
By identifying the invariant of the loop. Namely:
At the beginning (and end) of each iteration of step (b),
' is a subset of the closure of
.
These facts establish that ' will always be a subset of
closure(
). If the loop terminates, then we know that
' must contain closure(
) and therefore
' = closure(
). Luckily, the loop must terminate since
there are only a finite number of LR(0) items that step (b)
could add to
'.
![]() | ![]() | ![]() | About this closure stuff... |