This is a hack not a hack, since find needs this anyway (to keep the same behaviour as re/nre). A better fix would not call find in findAll repeatedly, it'd implement the matchImpl as an iterator. Also, that change would enable data stream input for findAll (issue #14). However, that's a more involved change as it'd require to prune the capture tree after some threshold (i.e: the first X nodes are no longer useful when the first parallel/submatch state boundaries are > X) of N KiB, and discard overlapping submatch states after a match.
^ update: the above is simpler now that there is no multi capture support, and no capture tree. The better fix was implemented a while ago, and overlapping submatch states are discarded.
Fixes #13 Fixes #29 (except for the last example)
This is a hacknot a hack, sincefind
needs this anyway (to keep the same behaviour as re/nre). A better fix would not callfind
infindAll
repeatedly, it'd implement thematchImpl
as an iterator. Also, that change would enable data stream input forfindAll
(issue #14). However, that's a more involved change as it'd require to prune the capture tree after some threshold (i.e: the first X nodes are no longer useful when the first parallel/submatch state boundaries are > X) of N KiB, and discard overlapping submatch states after a match.^ update: the above is simpler now that there is no multi capture support, and no capture tree. The better fix was implemented a while ago, and overlapping submatch states are discarded.