Next: Operation of a handle-recognising
Up: Handle-recognising DFAs and LR(0)
Previous: Handle-recognising DFAs and LR(0)
  Contents
To construct a handle-recognising DFA from a context-free grammar, perform the
following:
- Prepare the grammar by:
- Eliminating any -productions
- If is the start symbol, add a new rule to the grammar
.
- The start state of the DFA is
- Each time we create a new state in the DFA perform the following:
For each grammar symbol (terminal or non-terminal):
work out the closure of the move operation applied to newly created state and this symbol; this may create new states.
Note the similarities between this and the "subset construction"
algorithm which we used to convert a NFA to a DFA.
James Power
2002-11-29