Dervall / Piglet

An easier to use parsing and lexing tool that is configurable in fluent code without a pre-build step.
binarysculpting.com
MIT License
91 stars 11 forks source link

Improve speed of NFA closure algorithm #10

Closed Dervall closed 12 years ago

Dervall commented 12 years ago

The NFA closure algorithm is very slow right now, since it is completely unoptimized and looks through the closures again and again, even though they never change. Change this to precomputing the closures for all nodes in the grammar ONCE and only refer to the precomputed closurse when making the DFA

Dervall commented 12 years ago

This should be OK now, it's not extremely fast, but good enough for use