This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Optimize e.g., /[^\w]/, /[[^:word:]]/ into /\W/
authorKarl Williamson <public@khwilliamson.com>
Wed, 27 Jun 2012 20:43:41 +0000 (14:43 -0600)
committerKarl Williamson <public@khwilliamson.com>
Sat, 30 Jun 2012 04:22:42 +0000 (22:22 -0600)
commit3172e3fd885a9c54105d3b6156f18dc761fe29e5
treed3b2ef63938ee83c1873a6a4b0f845b522bc63e4
parent693fefec6759ebf0a9ec40a0f59346d86831349c
regcomp.c: Optimize e.g., /[^\w]/, /[[^:word:]]/ into /\W/

This optimizes character classes that have a single element that is one
of the ops that have the same meaning outside (namely \d, \h, \s, \w,
\v, :word:, :digit: and their complements) to that op.  Those
ops take less space than a character class and run faster.   An initial
'^' for complementing the class is also handled.
regcomp.c
regcomp.sym