The process of building a handle-recognising DFA from items is
very similar to converting a NFA to a DFA using the "subset
construction" algorithm of section 1. Hence we will need some
equivalent of
-closure and the NFA
function.
To get the closure of a set of items, take all those items which
have the marker immediately to the left of a non-terminal, and add in
all the non-kernel items for that non-terminal. This operation is
very similar to the -closure operation since we can ``get
to'' all items in the closure set of an item without shifting any
symbols (ie. without consuming any input).
The transitions in the DFA will correspond to moves between item-sets
based on some symbol. Basically move works as follows:
Let represent any symbol (terminal or non-terminal),
and
are any sequence of symbols, then: