hylo-lang / Lotsawa

A Swift implementation of the MARPA algorithms
Apache License 2.0
18 stars 2 forks source link

Consider more efficient storage for Leo items #1

Closed dabrahams closed 2 years ago

dabrahams commented 2 years ago

We could store them along with Earley items (PartialParses) in a single array in various ways:

  1. Add storage for a symbol (perhaps the postdot symbol) to Earley items to make them the same size as Leo items. Burn a bit to indicate Leo or Earley.
  2. Store the transition symbol of a Leo item separately from its PartialParse
dabrahams commented 2 years ago

Done