diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-24 21:16:56 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-24 21:16:56 -0700 |
commit | 977d61d2229d3517226edfb3a32b929c6d95d19b (patch) | |
tree | 97490af644fca30b67e839e04dd74cb9215352f3 /arith.c | |
parent | 1b5b19c0d1e1399f1276cdcad14b3f30bfca9001 (diff) | |
download | txr-977d61d2229d3517226edfb3a32b929c6d95d19b.tar.gz txr-977d61d2229d3517226edfb3a32b929c6d95d19b.tar.bz2 txr-977d61d2229d3517226edfb3a32b929c6d95d19b.zip |
regex: major optimization for complement operator.
This change a huge improvement for expressions that use
complement, directly or via the non-greedy % operator.
* regex.c (reg_matches_all): New static function.
(reg_derivative): When the dervative is applied
to a complement expression, identify situations when
the remaining expression cannot possibly match
anything, and convert them to the t expression.
Diffstat (limited to 'arith.c')
0 files changed, 0 insertions, 0 deletions