next up previous contents
Next: Unger's Method Up: Early's Parser Previous: Early's Items   Contents

Early's Algorithm

Early's algorithm proceeds as follows:

Given any grammar with start symbol $S$, and some input string $x_0...x_{n-1}$ of length $n$,

  1. Form the start state, which consists of the item

    \begin{displaymath}0:\;\;{}_0\; \rightarrow {}_\triangle S\end{displaymath}

    and its closure

  2. For each new state (for some position $i$) that we create, and for each item in that state:

  3. Keep applying step (2) until all states up to $n$ have been generated. If one of these then contains the item

    \begin{displaymath}n:\;\; {}_0\; \rightarrow\; S {}_\triangle \end{displaymath}

    the parse has been successful.


next up previous contents
Next: Unger's Method Up: Early's Parser Previous: Early's Items   Contents
James Power 2002-11-29