Next: Early's Algorithm
Up: Early's Parser
Previous: Early's Parser
  Contents
This is achieved by enhancing the concept of an item. In
Early's parser an item has the form:
where
and
are numbers, and
is a production rule. An item of this form is interpreted as meaning:
- We are at position
on the input (when
we are at the start of the string).
- The non-terminal
corresponds to some sub-string of the input which starts at position
- We have recognised an
on the input, and should we go on to recognise
, we can then make the reduction to
If the start symbol is
, we can represent this situation as:
Thus at any stage during the parse we always have that
where
is the length of the input string.
We will need to define a version of the closure operation for these items:
- State Closure (Marker before a non-terminal)
For each state with an item of the form
where
is any non-terminal, take all rules of the form
, and add the states for:
Next: Early's Algorithm
Up: Early's Parser
Previous: Early's Parser
  Contents
James Power
2002-11-29