EarleyParseCompletedItemSetsExample

(derived from Dick Grune and Ceriel J.H. Jacob's "Parsing Techniques -- A Practical Guide" -- my compliments to the authors! See page 149 in Edition 1 -- which is the 139th page in the .pdf book file.)



Example: Parse "xyz $a |- ( ph <-> x = A ) $."

This generates the rule format expr (with empty index 0)
 "( wff  <->  set = class )"

And the correct parse RPN is "wph vx cv cA wceq wb"


expr

0
  1
  2
  3
  4
  5
  6
  7

(
wff
<->
set
=
class )

CompletedItemSet[6]
___________rule___________
rule
Typ
at
Index

dot
Index
after
Dot
_______________comments_______________
18:wceq
"set = class"
wff
4
4



CompletedItemSet[7]
___________rule___________
rule
Typ
at
Index

dot
Index
after
Dot
_______________comments_______________
3:wb
"( wff <-> wff )"
wff
1
6