Implement Regex engine on PCRE2#12856
Merged
straight-shoota merged 7 commits intomasterfrom Dec 22, 2022
Merged
Conversation
Closed
10 tasks
d952eb4 to
979f01c
Compare
Contributor
|
Nice! So this one seems to be working better than the last one. I ran the specs on https://github.com/jwoertink/CrystalEmail to test |
Contributor
|
No issues on my M2 via nix-shell (requires adding |
beta-ziliani
approved these changes
Dec 21, 2022
| end | ||
| end | ||
|
|
||
| class_getter general_context do |
Member
There was a problem hiding this comment.
shouldn't this be private (or protected)?
Member
Author
There was a problem hiding this comment.
The entire Regex::PCRE2 namespace is :nodoc: so I think visibility doesn't matter much. I suppose it could be protected, though.
Member
There was a problem hiding this comment.
yes, it's just nitpicking, I was wondering if there were a reason to leave it public
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a re-issue of #12840 which was reverted due to errors. The updated branch includes several bugfixes and enhancements.
This is an initial implementation of a
Regexengine backend based on PCRE2 (see #12790).All existing regex specs succeed with PCRE2 🎉
This is an MVP and does not include JIT compilation (I'm planning a follow-up).
PCRE2 is currently not automatically selected. It's opt-in via the compiler flag
-Dforce_pcre2.If you have Crystal software that makes heavy use of regular expressions, please give this patch a try in order to identify potential issues in practical use cases. Performance comparisons are also welcome.
libpcre2-8(this is also the package name on some systems).pkg-configneeds the.pcconfiguration which may require installing the devel package oflibpcre2.Significant changes from #12840: