-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RE2Parser bug with regex begin line and end line markers #459
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
What does |
Can you clarify on what do you want to better explain? RE2 can increment its internal state multiple times while still operating on a single Mata NFA state. Therefore, we need to omit incrementing the current Mata NFA state when, for example, RE2 increments its state for |
If I understand correctly, it just ignores the flags |
As of right now, yes. But it is meant to be generally usable if something like this appears again. It is a mechanism to make the NFA state independent of RE2 state. |
I would have some discussion whether it is not better to throw an error for some of the flags, that we cannot handle them or something, but I am still ok with this. |
Definitely. We have not tested This will play a role when we open a discussion about regex interpretation, that is, |
The |
Good point. I believe this is correct. I will add the comment to the linked issue. |
This PR attempts to fix parsing
^
and$
in regexes parsed by RE2. There are a lot of missing features that remain unimplemented and will have to be resolved in the future.The PR is supposed to fix issues from #457, #437, and #450. Whether it actually fixes the issues, that remains to be seen.