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
If the regex is anchored and a match is found in the forwards direction, then the reverse NFA is never needed to find the start position because the start position must necessarily be 0 as a result of the anchor.
It's important to avoid building a Core, since that will compile a reverse NFA. You'll want to short circuit a build what is essentially a near copy of Core, but a simpler version of it that never builds a reverse NFA. I suspect there may be a fair bit of code duplication. I'm not quite sure if it makes sense to try and reduce that duplication since I imagine it could complicate things.
The other unfortunate thing is that you won't be able to reuse, for example, the HybridEngine wrapper:
Since that wrapper unconditionally builds a reverse lazy DFA from a reverse NFA. Indeed, its constructor requires a reverse NFA. So we'll need a new wrapper for that (and the same applies to the fully compiled DFA wrapper too).
If the regex is anchored and a match is found in the forwards direction, then the reverse NFA is never needed to find the start position because the start position must necessarily be
0
as a result of the anchor.See this comment for a little more context: #1095 (comment)
The text was updated successfully, but these errors were encountered: