1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:37:46 +00:00

LibRegex: Fully interpret the Compare Op when looking for overlaps

We had a really naive and simplistic implementation, which lead to
various issues where the optimiser incorrectly rewrote the regex to use
atomic groups; this commit fixes that.
This commit is contained in:
Ali Mohammad Pur 2022-07-04 21:11:15 +04:30 committed by Andreas Kling
parent b6f2ba6917
commit 6e655b7f89
4 changed files with 206 additions and 98 deletions

View file

@ -745,6 +745,7 @@ public:
String arguments_string() const override;
Vector<String> variable_arguments_to_string(Optional<MatchInput> input = {}) const;
Vector<CompareTypeAndValuePair> flat_compares() const;
static bool matches_character_class(CharClass, u32, bool insensitive);
private:
ALWAYS_INLINE static void compare_char(MatchInput const& input, MatchState& state, u32 ch1, bool inverse, bool& inverse_matched);