This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Add ability to take intersection of complement
authorKarl Williamson <public@khwilliamson.com>
Fri, 3 Feb 2012 17:32:15 +0000 (10:32 -0700)
committerKarl Williamson <public@khwilliamson.com>
Thu, 9 Feb 2012 17:13:54 +0000 (10:13 -0700)
commit52ae8f7ebb1f32bbd4f574c090ff4ae9d6b468c7
tree77b71b06f5772f2e2ad5e2b8a849759d5f5591c6
parent112b0fc601abb62ef38610a2a8edb67f8f59fade
regcomp.c: Add ability to take intersection of complement

It turns out that it is a common paradigm to want to take the
intersection of an inversion list with the complement of another
inversion list.  In fact, this is the how to subtract the second
inversion list from the first, as what remains in the first after the
subtraction is everything in it that is not in the second.

It also turns out that it adds very few cycles to an intersection to
complement one (or both, should we choose to) of the operands.  By
adding this capability, we don't have to create a copy of the inverted
operand beforehand, just to throw it away.
embed.fnc
embed.h
proto.h
regcomp.c
regexp.h