PCRE2Project / pcre2

PCRE2 development is now based here.
Other
918 stars 191 forks source link

Extended character classes: optimisation #537

Open NWilson opened 4 weeks ago

NWilson commented 4 weeks ago

As a follow-up to my PR, I will refactor the parser which consumes META codes.

It should do constant-folding on simple cases, such as [a-z -- m] or [^[^a-z]]. We do still need the OP_ECLASS code, for tricky cases that can't be folded (complex logical ops over XCLASS), but doing AND/OR operations on an OP_CLASS can be folded at compile-time.