Merge branch 'khw/invlist' into blead
This topic branch deals mostly with bracketed character classes in
regular expressions. It has several main thrusts:
1) The character class macros in handy.h are tied to the class numbers
in regcomp.h, and a new set of regnode types, POSIX, are introduced.
This will allow more table driven code in regular expression
compilation and matching, so that the same regnode type can be used
for any of the Posix-like character classes, such as \w as well as
[:upper:]. This will allow removal of nearly-duplicate (and
triplicate, etc) code.
2) The optimizations for bracketed character classes are extended to
work off not just the first 256 characters, but all code points.
This extends some char class optimizations to Unicode, and will
allow future work to change the regular expression optimizer to work
off all Unicode characters, instead of its current behavior of mostly
giving up on these.
3) Several new character class optimizations are introduced, with the
groundwork laid for more. A character class containing a single
character is the same as the single character without the class,
except that most metacharacters are treated as literals. Thus,
/a[.]b/ produces identical results to /a\.b/. Prior to this merge,
the first form's compiled version would require quite a bit more
space than the second. Now they are identical.
Inversion lists of the whole class are used for optimization
calculations.