| The Correctness of LR(0) parsing |
1 .
2 ] 
(
0,
) iff [ N
1 .
2 ] is valid for
.
[N ->
1 .
2 ] 
(
0,
)
only if
[ N
1 .
2 ] is valid for
.
. S ], or
1 .
2 ]
for
1 !=
.
Note that the set of items associated with a state in the LR(0) machine is
just the closure of the set of kernel items associated with the state. In
particular, all items in goto(
,x) are kernel items.
Lemma 1: Given a set
of LR(0) items valid for some

(Vn U Vt)*, all items in closure(
) are
valid for
.
Lemma 2:
For kernel items,
[N ->
1 .
2 ] 
(
0,
)
only if
[ N
1 .
2 ] is valid for
.
| The Correctness of LR(0) parsing |