You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem here was that match instructions from each regex in a set
were being carried through all of the DFA states. This was intentional
so that when the DFA was done executing, we could look at the last state
the machine was in and figure which match instructions were reached, and
therefore determine which expressions in the set matched.
This doesn't work when every regex in the set is anchored, because it
causes the DFA to continue creating non-dead states, even when no other
regex could possibly match.
To fix this, we are more selective about adding match instructions to
states. This will cause the match instructions to eventually disappear,
so we build up the matches in the set as they occur when producing cached
states. This is a little hokey, but since we're only interested in the
existence of a match, it works.
0 commit comments