diff options
author | Karl Williamson <public@khwilliamson.com> | 2014-01-23 20:34:15 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2014-01-27 11:07:17 -0700 |
commit | 1a27eb967982a1b8fdc2ab7ae9af98f318c808ec (patch) | |
tree | 9fa41e716d7e18f8bd6b9a49925cc17b5a6b0af9 /regcharclass.h | |
parent | f0672d4d47b5a2683d20833c31c6a5238588be20 (diff) | |
download | perl-1a27eb967982a1b8fdc2ab7ae9af98f318c808ec.tar.gz |
Move an inversion list generation to mktables
Prior to this patch, this was in regen/mk_invlists.pl, but future
commits will want it to also be used by the header generated by
regen/regcharclass.pl, so use a common source so the logic doesn't have
to be duplicated.
Diffstat (limited to 'regcharclass.h')
-rw-r--r-- | regcharclass.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/regcharclass.h b/regcharclass.h index 8b175fd1b8..2c482ce013 100644 --- a/regcharclass.h +++ b/regcharclass.h @@ -854,6 +854,33 @@ : 0 ) /* + FOLDS_TO_MULTI: characters that fold to multi-char strings + + \p{_Perl_Folds_To_Multi_Char} +*/ +/*** GENERATED CODE ***/ +#define is_FOLDS_TO_MULTI_utf8(s) \ +( ( 0xC3 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x9F == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xC4 == NATIVE_TO_LATIN1(((U8*)s)[0]) || 0xC7 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ?\ + ( ( 0xB0 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xC5 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x89 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xCE == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[1]) & 0xDF ) == 0x90 ) ? 2 : 0 ) \ +: ( 0xD6 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0x87 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \ +: ( 0xE1 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \ + ( ( 0xBA == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( 0x96 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x9A ) || 0x9E == NATIVE_TO_LATIN1(((U8*)s)[2]) ) ? 3 : 0 )\ + : ( 0xBD == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF9 ) == 0x90 ) ? 3 : 0 ) \ + : ( 0xBE == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? \ + ( ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xE0 ) == 0x80 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF0 ) == 0xA0 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFA ) == 0xB2 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF7 ) == 0xB4 ) ) ? 3 : 0 )\ + : ( ( 0xBF == NATIVE_TO_LATIN1(((U8*)s)[1]) ) && ( ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xCA ) == 0x82 ) || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF7 ) == 0x84 ) || NATIVE_TO_LATIN1(((U8*)s)[2]) == 0xA4 || ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xF7 ) == 0xB4 ) ) ) ? 3 : 0 )\ +: ( ( ( 0xEF == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0xAC == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x86 ) || ( 0x93 <= NATIVE_TO_LATIN1(((U8*)s)[2]) && NATIVE_TO_LATIN1(((U8*)s)[2]) <= 0x97 ) ) ) ? 3 : 0 ) + +/* PATWS: pattern white space \p{PatWS} |