quamina
quamina copied to clipboard
kaizen: Cleanup DFA/NFA
I am starting to implement the "suffix" pattern which obviously requires an NFA to implement (as does "shellstyle" and anything slightly regexp-ish). At the moment, Quamina reduces all NFAs to DFAs, which is well-known to be prone to producing O(2**N) explosions of the kind we're seeing in some tests (although it's not obvious this is the source of that problem). Anyhow, the DFA/NFA confusion is adding lots of complexity. We should throw away DFAs and do everything in NFAs. This would have a few benefits, including:
- lose a lot of code
- simplify the addPattern code path
- de-genericize the SmallTable structure - this doesn't seem to be a good use of generics, lots of things are made harder to read and write.