-
Notifications
You must be signed in to change notification settings - Fork 912
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
Fix regex parsing logic handling of nested quantifiers #16798
Fix regex parsing logic handling of nested quantifiers #16798
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.
If I understand correctly, all of the in->out substitutions exist because in the nested case out could be filled with additional instructions (lines 746-759), so the sizes now depend on that. Is that right? I think I've grokked this PR but I want to confirm my understanding before I approve.
Out of scope for this PR, but should regcomp.h be renamed to regcomp.hpp? It's not a C header, there are classes in there.
That sounds right. Previously it was just copying the input and so did not account for previous expanded (nested) instructions. |
/merge |
Fixes regex logic handling of a pattern with a fixed quantifier that includes a zero-range. Added new gtests for this specific case. Bug was introduced in #16798 Closes #17065 Authors: - David Wendt (https://github.com/davidwendt) Approvers: - Robert (Bobby) Evans (https://github.com/revans2) - Vyas Ramasubramani (https://github.com/vyasr) - MithunR (https://github.com/mythrocks) - Basit Ayantunde (https://github.com/lamarrr) URL: #17067
Description
Fixes the libcudf regex parsing logic when handling nested fixed quantifiers. The logic handles fixed quantifiers by simple repeating the previous instruction. If the previous item is a group (capture or non-capture) that group may also contain an internal fixed quantifier as well.
Found while working on #16730
Checklist