hylo-lang / Lotsawa

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

Consider eliminating nulling symbols from the transformed grammar #6

Closed dabrahams closed 2 years ago

dabrahams commented 2 years ago

It's an optimization, but MARPA's implementation does this, and simply reconstructs them during tree traversal.

dabrahams commented 2 years ago

Aha! I think this step eliminates the problem that the current earleme is being scanned while it's being updated, which would make addressing #2 by sorting into a more practical idea, since wouldn't need a special-case to search the current earleme linearly.

dabrahams commented 2 years ago

This is done.