diff options
Diffstat (limited to 'regcharclass.h')
-rw-r--r-- | regcharclass.h | 538 |
1 files changed, 310 insertions, 228 deletions
diff --git a/regcharclass.h b/regcharclass.h index 8425693b0b..9c61489cd1 100644 --- a/regcharclass.h +++ b/regcharclass.h @@ -9,7 +9,7 @@ * * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! * This file is built by Porting/regcharclass.pl. - * (Generated at: Tue Apr 24 12:19:13 2007 GMT) + * (Generated at: Fri Apr 27 12:34:16 2007 GMT) * Any changes made here will be lost! */ @@ -27,88 +27,94 @@ */ /*** GENERATED CODE ***/ #define is_LNBREAK(s,is_utf8) \ -( ( ((U8*)s)[0] == 0x0D ) ? \ - ( ( ((U8*)s)[1] == 0x0A ) ? 2 : 1 ) : \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C) ? 1 : \ -( (is_utf8) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ - (((( ((U8*)s)[0] == 0xE2 ) && ( ((U8*)s)[1] == 0x80 )) && ( ((U8*)s)[2] == 0xA8 || ((U8*)s)[2] == 0xA9 )) ? 3 : 0) ) :\ - ( ((U8*)s)[0] == 0x85 ) ) ) ) +( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ +: ( 0x0D == ((U8*)s)[0] ) ? \ + ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ +: ( is_utf8 ) ? \ + ( ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ + : 0 ) \ +: ( 0x85 == ((U8*)s)[0] ) ) /*** GENERATED CODE ***/ #define is_LNBREAK_safe(s,e,is_utf8) \ -( ( (e) - (s) > 2 ) ? \ - ( ( ((U8*)s)[0] == 0x0D ) ? \ - ( ( ((U8*)s)[1] == 0x0A ) ? 2 : 1 ) : \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C) ? 1 : \ -( (is_utf8) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ - (((( ((U8*)s)[0] == 0xE2 ) && ( ((U8*)s)[1] == 0x80 )) && ( ((U8*)s)[2] == 0xA8 || ((U8*)s)[2] == 0xA9 )) ? 3 : 0) ) :\ - ( ((U8*)s)[0] == 0x85 ) ) ) ) : \ -( ( (e) - (s) > 1 ) ? \ - ( ( ((U8*)s)[0] == 0x0D ) ? \ - ( ( ((U8*)s)[1] == 0x0A ) ? 2 : 1 ) : \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C) ? 1 : \ -( (is_utf8) ? \ - ((( ((U8*)s)[0] == 0xC2 ) && ( ((U8*)s)[1] == 0x85 )) ? 2 : 0) : \ - ( ((U8*)s)[0] == 0x85 ) ) ) ) : \ -( ( (e) - (s) > 0 ) ? \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ? 1 : \ -( (!is_utf8) ? \ - ( ((U8*)s)[0] == 0x85 ) : 0 ) ) : 0 ) ) ) +( ((e)-(s) > 2) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ + : ( 0x0D == ((U8*)s)[0] ) ? \ + ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ + : ( is_utf8 ) ? \ + ( ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ + : 0 ) \ + : ( 0x85 == ((U8*)s)[0] ) ) \ +: ((e)-(s) > 1) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ + : ( 0x0D == ((U8*)s)[0] ) ? \ + ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ + : ( is_utf8 ) ? \ + ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ + : ( 0x85 == ((U8*)s)[0] ) ) \ +: ((e)-(s) > 0) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ + : ( !( is_utf8 ) ) ? \ + ( 0x85 == ((U8*)s)[0] ) \ + : 0 ) \ +: 0 ) /*** GENERATED CODE ***/ #define is_LNBREAK_utf8(s) \ -( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0] == 0xE2 ) ? \ - ((( ((U8*)s)[1] == 0x80 ) && ( ((U8*)s)[2] == 0xA8 || ((U8*)s)[2] == 0xA9 )) ? 3 : 0) :\ - ( ( ((U8*)s)[0] == 0x0D ) ? \ - ( ( ((U8*)s)[1] == 0x0A ) ? 2 : 1 ) : \ - (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C) ) ) ) +( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ +: ( 0x0D == ((U8*)s)[0] ) ? \ + ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ +: ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ +: ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ +: 0 ) /*** GENERATED CODE ***/ #define is_LNBREAK_utf8_safe(s,e) \ -( ( (e) - (s) > 2 ) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0] == 0xE2 ) ? \ - ((( ((U8*)s)[1] == 0x80 ) && ( ((U8*)s)[2] == 0xA8 || ((U8*)s)[2] == 0xA9 )) ? 3 : 0) :\ - ( ( ((U8*)s)[0] == 0x0D ) ? \ - ( ( ((U8*)s)[1] == 0x0A ) ? 2 : 1 ) : \ - (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C) ) ) ) : \ -( ( (e) - (s) > 1 ) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0] == 0x0D ) ? \ - ( ( ((U8*)s)[1] == 0x0A ) ? 2 : 1 ) : \ - (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C) ) ) : \ -( ( (e) - (s) > 0 ) ? \ - (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) : 0 ) ) ) +( ((e)-(s) > 2) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ + : ( 0x0D == ((U8*)s)[0] ) ? \ + ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ + : ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ + : 0 ) \ +: ((e)-(s) > 1) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ + : ( 0x0D == ((U8*)s)[0] ) ? \ + ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ + : ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : 0 ) \ +: ((e)-(s) > 0) ? \ + ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) \ +: 0 ) /*** GENERATED CODE ***/ #define is_LNBREAK_latin1(s) \ -( ( ((U8*)s)[0] == 0x0D ) ? \ - ( ( ((U8*)s)[1] == 0x0A ) ? 2 : 1 ) : \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C) || ((U8*)s)[0] == 0x85 ) ) +( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ +: ( 0x0D == ((U8*)s)[0] ) ? \ + ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ +: ( 0x85 == ((U8*)s)[0] ) ) /*** GENERATED CODE ***/ #define is_LNBREAK_latin1_safe(s,e) \ -( ( (e) - (s) > 1 ) ? \ - ( ( ((U8*)s)[0] == 0x0D ) ? \ - ( ( ((U8*)s)[1] == 0x0A ) ? 2 : 1 ) : \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C) || ((U8*)s)[0] == 0x85 ) ) :\ -( ( (e) - (s) > 0 ) ? \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) || ((U8*)s)[0] == 0x85 ) : 0 ) ) - -/*** GENERATED CODE ***/ -#define is_LNBREAK_cp(cp) \ -( (0x0A <= cp && cp <= 0x0D) ||( cp > 0x0D && \ -( cp == 0x85 ||( cp > 0x85 && \ -( cp == 0x2028 ||( cp > 0x2028 && \ -cp == 0x2029 ) ) ) ) ) ) +( ((e)-(s) > 1) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ + : ( 0x0D == ((U8*)s)[0] ) ? \ + ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ + : ( 0x85 == ((U8*)s)[0] ) ) \ +: ((e)-(s) > 0) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] )\ +: 0 ) /* HORIZWS: Horizontal Whitespace: \h \H @@ -135,107 +141,134 @@ cp == 0x2029 ) ) ) ) ) ) */ /*** GENERATED CODE ***/ #define is_HORIZWS(s,is_utf8) \ -( ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ? 1 : \ -( (is_utf8) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0xA0 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0] == 0xE1 ) ? \ - ( ( ((U8*)s)[1] == 0xA0 ) ? \ - ( ( ((U8*)s)[2] == 0x8E ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1] == 0x9A ) && ( ((U8*)s)[2] == 0x80 )) ? 3 : 0) ) : \ - ( ( ((U8*)s)[0] == 0xE2 ) ? \ - ( ( ((U8*)s)[1] == 0x81 ) ? \ - ( ( ((U8*)s)[2] == 0x9F ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1] == 0x80 ) && ( (0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A) || ((U8*)s)[2] == 0xAF )) ? 3 : 0) ) :\ - (((( ((U8*)s)[0] == 0xE3 ) && ( ((U8*)s)[1] == 0x80 )) && ( ((U8*)s)[2] == 0x80 )) ? 3 : 0) ) ) ) :\ - ( ((U8*)s)[0] == 0xA0 ) ) ) +( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ +: ( is_utf8 ) ? \ + ( ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xE1 == ((U8*)s)[0] ) ? \ + ( ( 0x9A == ((U8*)s)[1] ) ? \ + ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ + : ( 0xA0 == ((U8*)s)[1] ) ? \ + ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \ + : 0 ) \ + : ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( 0x80 == ((U8*)s)[1] ) ? \ + ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ + : ( 0x81 == ((U8*)s)[1] ) ? \ + ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \ + : 0 ) \ + : ( 0xE3 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ + : 0 ) \ +: ( 0xA0 == ((U8*)s)[0] ) ) /*** GENERATED CODE ***/ #define is_HORIZWS_safe(s,e,is_utf8) \ -( ( (e) - (s) > 2 ) ? \ - ( ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ? 1 : \ -( (is_utf8) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0xA0 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0] == 0xE1 ) ? \ - ( ( ((U8*)s)[1] == 0xA0 ) ? \ - ( ( ((U8*)s)[2] == 0x8E ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1] == 0x9A ) && ( ((U8*)s)[2] == 0x80 )) ? 3 : 0) ) : \ - ( ( ((U8*)s)[0] == 0xE2 ) ? \ - ( ( ((U8*)s)[1] == 0x81 ) ? \ - ( ( ((U8*)s)[2] == 0x9F ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1] == 0x80 ) && ( (0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A) || ((U8*)s)[2] == 0xAF )) ? 3 : 0) ) :\ - (((( ((U8*)s)[0] == 0xE3 ) && ( ((U8*)s)[1] == 0x80 )) && ( ((U8*)s)[2] == 0x80 )) ? 3 : 0) ) ) ) :\ - ( ((U8*)s)[0] == 0xA0 ) ) ) : \ -( ( (e) - (s) > 1 ) ? \ - ( ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ? 1 : \ -( (is_utf8) ? \ - ((( ((U8*)s)[0] == 0xC2 ) && ( ((U8*)s)[1] == 0xA0 )) ? 2 : 0) : \ - ( ((U8*)s)[0] == 0xA0 ) ) ) : \ -( ( (e) - (s) > 0 ) ? \ - ( ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ? 1 : \ -( (!is_utf8) ? \ - ( ((U8*)s)[0] == 0xA0 ) : 0 ) ) : 0 ) ) ) +( ((e)-(s) > 2) ? \ + ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ + : ( is_utf8 ) ? \ + ( ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xE1 == ((U8*)s)[0] ) ? \ + ( ( 0x9A == ((U8*)s)[1] ) ? \ + ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ + : ( 0xA0 == ((U8*)s)[1] ) ? \ + ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \ + : 0 ) \ + : ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( 0x80 == ((U8*)s)[1] ) ? \ + ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ + : ( 0x81 == ((U8*)s)[1] ) ? \ + ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \ + : 0 ) \ + : ( 0xE3 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 )\ + : 0 ) \ + : ( 0xA0 == ((U8*)s)[0] ) ) \ +: ((e)-(s) > 1) ? \ + ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ + : ( is_utf8 ) ? \ + ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0xA0 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ + : ( 0xA0 == ((U8*)s)[0] ) ) \ +: ((e)-(s) > 0) ? \ + ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ + : ( !( is_utf8 ) ) ? \ + ( 0xA0 == ((U8*)s)[0] ) \ + : 0 ) \ +: 0 ) /*** GENERATED CODE ***/ #define is_HORIZWS_utf8(s) \ -( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0xA0 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0] == 0xE1 ) ? \ - ( ( ((U8*)s)[1] == 0xA0 ) ? \ - ( ( ((U8*)s)[2] == 0x8E ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1] == 0x9A ) && ( ((U8*)s)[2] == 0x80 )) ? 3 : 0) ) : \ - ( ( ((U8*)s)[0] == 0xE2 ) ? \ - ( ( ((U8*)s)[1] == 0x81 ) ? \ - ( ( ((U8*)s)[2] == 0x9F ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1] == 0x80 ) && ( (0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A) || ((U8*)s)[2] == 0xAF )) ? 3 : 0) ) :\ - ( ( ((U8*)s)[0] == 0xE3 ) ? \ - ((( ((U8*)s)[1] == 0x80 ) && ( ((U8*)s)[2] == 0x80 )) ? 3 : 0) : \ - ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ) ) ) ) +( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ +: ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ +: ( 0xE1 == ((U8*)s)[0] ) ? \ + ( ( 0x9A == ((U8*)s)[1] ) ? \ + ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ + : ( 0xA0 == ((U8*)s)[1] ) ? \ + ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \ + : 0 ) \ +: ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( 0x80 == ((U8*)s)[1] ) ? \ + ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ + : ( 0x81 == ((U8*)s)[1] ) ? \ + ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \ + : 0 ) \ +: ( 0xE3 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ +: 0 ) /*** GENERATED CODE ***/ #define is_HORIZWS_utf8_safe(s,e) \ -( ( (e) - (s) > 2 ) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0xA0 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0] == 0xE1 ) ? \ - ( ( ((U8*)s)[1] == 0xA0 ) ? \ - ( ( ((U8*)s)[2] == 0x8E ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1] == 0x9A ) && ( ((U8*)s)[2] == 0x80 )) ? 3 : 0) ) : \ - ( ( ((U8*)s)[0] == 0xE2 ) ? \ - ( ( ((U8*)s)[1] == 0x81 ) ? \ - ( ( ((U8*)s)[2] == 0x9F ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1] == 0x80 ) && ( (0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A) || ((U8*)s)[2] == 0xAF )) ? 3 : 0) ) :\ - ( ( ((U8*)s)[0] == 0xE3 ) ? \ - ((( ((U8*)s)[1] == 0x80 ) && ( ((U8*)s)[2] == 0x80 )) ? 3 : 0) : \ - ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ) ) ) ) : \ -( ( (e) - (s) > 1 ) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0xA0 ) ? 2 : 0 ) : \ - ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ) : \ -( ( (e) - (s) > 0 ) ? \ - ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) : 0 ) ) ) +( ((e)-(s) > 2) ? \ + ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ + : ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xE1 == ((U8*)s)[0] ) ? \ + ( ( 0x9A == ((U8*)s)[1] ) ? \ + ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ + : ( 0xA0 == ((U8*)s)[1] ) ? \ + ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \ + : 0 ) \ + : ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( 0x80 == ((U8*)s)[1] ) ? \ + ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ + : ( 0x81 == ((U8*)s)[1] ) ? \ + ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \ + : 0 ) \ + : ( 0xE3 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ + : 0 ) \ +: ((e)-(s) > 1) ? \ + ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ + : ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : 0 ) \ +: ((e)-(s) > 0) ? \ + ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) \ +: 0 ) /*** GENERATED CODE ***/ #define is_HORIZWS_latin1(s) \ -( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 || ((U8*)s)[0] == 0xA0 ) +( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] || 0xA0 == ((U8*)s)[0] ) /*** GENERATED CODE ***/ #define is_HORIZWS_latin1_safe(s,e) \ -( ( (e) - (s) > 0 ) ? \ - ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 || ((U8*)s)[0] == 0xA0 ) : 0 ) +( ((e)-(s) > 0) ? \ + ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] || 0xA0 == ((U8*)s)[0] ) \ +: 0 ) /*** GENERATED CODE ***/ #define is_HORIZWS_cp(cp) \ -( cp == 0x09 ||( cp > 0x09 && \ -( cp == 0x20 ||( cp > 0x20 && \ -( cp == 0xA0 ||( cp > 0xA0 && \ -( cp == 0x1680 ||( cp > 0x1680 && \ -( cp == 0x180E ||( cp > 0x180E && \ -( (0x2000 <= cp && cp <= 0x200A) ||( cp > 0x200A && \ -( cp == 0x202F ||( cp > 0x202F && \ -( cp == 0x205F ||( cp > 0x205F && \ -cp == 0x3000 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) +( 0x09 == cp || ( 0x09 < cp && \ +( 0x20 == cp || ( 0x20 < cp && \ +( 0xA0 == cp || ( 0xA0 < cp && \ +( 0x1680 == cp || ( 0x1680 < cp && \ +( 0x180E == cp || ( 0x180E < cp && \ +( ( 0x2000 <= cp && cp <= 0x200A ) || ( 0x200A < cp && \ +( 0x202F == cp || ( 0x202F < cp && \ +( 0x205F == cp || ( 0x205F < cp && \ +0x3000 == cp ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) /* VERTWS: Vertical Whitespace: \v \V @@ -250,122 +283,171 @@ cp == 0x3000 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) */ /*** GENERATED CODE ***/ #define is_VERTWS(s,is_utf8) \ -( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ? 1 : \ -( (is_utf8) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ - (((( ((U8*)s)[0] == 0xE2 ) && ( ((U8*)s)[1] == 0x80 )) && ( ((U8*)s)[2] == 0xA8 || ((U8*)s)[2] == 0xA9 )) ? 3 : 0) ) :\ - ( ((U8*)s)[0] == 0x85 ) ) ) +( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ +: ( is_utf8 ) ? \ + ( ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ + : 0 ) \ +: ( 0x85 == ((U8*)s)[0] ) ) /*** GENERATED CODE ***/ #define is_VERTWS_safe(s,e,is_utf8) \ -( ( (e) - (s) > 2 ) ? \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ? 1 : \ -( (is_utf8) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ - (((( ((U8*)s)[0] == 0xE2 ) && ( ((U8*)s)[1] == 0x80 )) && ( ((U8*)s)[2] == 0xA8 || ((U8*)s)[2] == 0xA9 )) ? 3 : 0) ) :\ - ( ((U8*)s)[0] == 0x85 ) ) ) : \ -( ( (e) - (s) > 1 ) ? \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ? 1 : \ -( (is_utf8) ? \ - ((( ((U8*)s)[0] == 0xC2 ) && ( ((U8*)s)[1] == 0x85 )) ? 2 : 0) : \ - ( ((U8*)s)[0] == 0x85 ) ) ) : \ -( ( (e) - (s) > 0 ) ? \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ? 1 : \ -( (!is_utf8) ? \ - ( ((U8*)s)[0] == 0x85 ) : 0 ) ) : 0 ) ) ) +( ((e)-(s) > 2) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ + : ( is_utf8 ) ? \ + ( ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ + : 0 ) \ + : ( 0x85 == ((U8*)s)[0] ) ) \ +: ((e)-(s) > 1) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ + : ( is_utf8 ) ? \ + ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ + : ( 0x85 == ((U8*)s)[0] ) ) \ +: ((e)-(s) > 0) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ + : ( !( is_utf8 ) ) ? \ + ( 0x85 == ((U8*)s)[0] ) \ + : 0 ) \ +: 0 ) /*** GENERATED CODE ***/ #define is_VERTWS_utf8(s) \ -( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0] == 0xE2 ) ? \ - ((( ((U8*)s)[1] == 0x80 ) && ( ((U8*)s)[2] == 0xA8 || ((U8*)s)[2] == 0xA9 )) ? 3 : 0) :\ - (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ) ) +( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ +: ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ +: ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ +: 0 ) /*** GENERATED CODE ***/ #define is_VERTWS_utf8_safe(s,e) \ -( ( (e) - (s) > 2 ) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0] == 0xE2 ) ? \ - ((( ((U8*)s)[1] == 0x80 ) && ( ((U8*)s)[2] == 0xA8 || ((U8*)s)[2] == 0xA9 )) ? 3 : 0) :\ - (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ) ) : \ -( ( (e) - (s) > 1 ) ? \ - ( ( ((U8*)s)[0] == 0xC2 ) ? \ - ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ - (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ) : \ -( ( (e) - (s) > 0 ) ? \ - (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) : 0 ) ) ) +( ((e)-(s) > 2) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ + : ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xE2 == ((U8*)s)[0] ) ? \ + ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ + : 0 ) \ +: ((e)-(s) > 1) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ + : ( 0xC2 == ((U8*)s)[0] ) ? \ + ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : 0 ) \ +: ((e)-(s) > 0) ? \ + ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) \ +: 0 ) /*** GENERATED CODE ***/ #define is_VERTWS_latin1(s) \ -( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) || ((U8*)s)[0] == 0x85 ) +( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] ) /*** GENERATED CODE ***/ #define is_VERTWS_latin1_safe(s,e) \ -( ( (e) - (s) > 0 ) ? \ - ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) || ((U8*)s)[0] == 0x85 ) : 0 ) +( ((e)-(s) > 0) ? \ + ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] )\ +: 0 ) /*** GENERATED CODE ***/ #define is_VERTWS_cp(cp) \ -( (0x0A <= cp && cp <= 0x0D) ||( cp > 0x0D && \ -( cp == 0x85 ||( cp > 0x85 && \ -( cp == 0x2028 ||( cp > 0x2028 && \ -cp == 0x2029 ) ) ) ) ) ) +( ( 0x0A <= cp && cp <= 0x0D ) || ( 0x0D < cp && \ +( 0x85 == cp || ( 0x85 < cp && \ +( 0x2028 == cp || ( 0x2028 < cp && \ +0x2029 == cp ) ) ) ) ) ) /* TRICKYFOLD: Problematic fold case letters. - 0x00DF # LATIN SMALL LETTER SHARP S + 0x00DF # LATIN1 SMALL LETTER SHARP S 0x0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS 0x03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS */ /*** GENERATED CODE ***/ #define is_TRICKYFOLD(s,is_utf8) \ -( (is_utf8) ? \ - ( ( ((U8*)s)[0] == 0xC3 ) ? \ - ( ( ((U8*)s)[1] == 0x9F ) ? 2 : 0 ) : \ - ((( ((U8*)s)[0] == 0xCE ) && ( ((U8*)s)[1] == 0x90 || ((U8*)s)[1] == 0xB0 )) ? 2 : 0) ) :\ - ( ((U8*)s)[0] == 0xDF ) ) +( ( is_utf8 ) ? \ + ( ( 0xC3 == ((U8*)s)[0] ) ? \ + ( ( 0x9F == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xCE == ((U8*)s)[0] ) ? \ + ( ( 0x90 == ((U8*)s)[1] || 0xB0 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : 0 ) \ +: ( 0xDF == ((U8*)s)[0] ) ) /*** GENERATED CODE ***/ #define is_TRICKYFOLD_safe(s,e,is_utf8) \ -( ( (e) - (s) > 1 ) ? \ -( (is_utf8) ? \ - ( ( ((U8*)s)[0] == 0xC3 ) ? \ - ( ( ((U8*)s)[1] == 0x9F ) ? 2 : 0 ) : \ - ((( ((U8*)s)[0] == 0xCE ) && ( ((U8*)s)[1] == 0x90 || ((U8*)s)[1] == 0xB0 )) ? 2 : 0) ) :\ - ( ((U8*)s)[0] == 0xDF ) ) : \ -((( (e) - (s) > 0 ) && (!is_utf8)) ? ( ((U8*)s)[0] == 0xDF ) : 0) ) +( ((e)-(s) > 1) ? \ + ( ( is_utf8 ) ? \ + ( ( 0xC3 == ((U8*)s)[0] ) ? \ + ( ( 0x9F == ((U8*)s)[1] ) ? 2 : 0 ) \ + : ( 0xCE == ((U8*)s)[0] ) ? \ + ( ( 0x90 == ((U8*)s)[1] || 0xB0 == ((U8*)s)[1] ) ? 2 : 0 ) \ + : 0 ) \ + : ( 0xDF == ((U8*)s)[0] ) ) \ +: ((e)-(s) > 0) ? \ + ( ( !( is_utf8 ) ) ? \ + ( 0xDF == ((U8*)s)[0] ) \ + : 0 ) \ +: 0 ) /*** GENERATED CODE ***/ -#define is_TRICKYFOLD_utf8(s) \ -( ( ((U8*)s)[0] == 0xC3 ) ? \ - ( ( ((U8*)s)[1] == 0x9F ) ? 2 : 0 ) : \ - ((( ((U8*)s)[0] == 0xCE ) && ( ((U8*)s)[1] == 0x90 || ((U8*)s)[1] == 0xB0 )) ? 2 : 0) ) +#define is_TRICKYFOLD_cp(cp) \ +( 0xDF == cp || ( 0xDF < cp && \ +( 0x390 == cp || ( 0x390 < cp && \ +0x3B0 == cp ) ) ) ) /*** GENERATED CODE ***/ -#define is_TRICKYFOLD_utf8_safe(s,e) \ -( ( (e) - (s) > 1 ) ? \ - ( ( ((U8*)s)[0] == 0xC3 ) ? \ - ( ( ((U8*)s)[1] == 0x9F ) ? 2 : 0 ) : \ - ((( ((U8*)s)[0] == 0xCE ) && ( ((U8*)s)[1] == 0x90 || ((U8*)s)[1] == 0xB0 )) ? 2 : 0) ) : 0 ) +#define what_TRICKYFOLD(s,is_utf8) \ +( ( is_utf8 ) ? \ + ( ( 0xC3 == ((U8*)s)[0] ) ? \ + ( ( 0x9F == ((U8*)s)[1] ) ? 0xDF : 0 ) \ + : ( 0xCE == ((U8*)s)[0] ) ? \ + ( ( 0x90 == ((U8*)s)[1] ) ? 0x390 \ + : ( 0xB0 == ((U8*)s)[1] ) ? 0x3B0 : 0 ) \ + : 0 ) \ +: ( 0xDF == ((U8*)s)[0] ) ? 0xDF : 0 ) /*** GENERATED CODE ***/ -#define is_TRICKYFOLD_latin1(s) \ -( ((U8*)s)[0] == 0xDF ) +#define what_TRICKYFOLD_safe(s,e,is_utf8) \ +( ((e)-(s) > 1) ? \ + ( ( is_utf8 ) ? \ + ( ( 0xC3 == ((U8*)s)[0] ) ? \ + ( ( 0x9F == ((U8*)s)[1] ) ? 0xDF : 0 ) \ + : ( 0xCE == ((U8*)s)[0] ) ? \ + ( ( 0x90 == ((U8*)s)[1] ) ? 0x390 \ + : ( 0xB0 == ((U8*)s)[1] ) ? 0x3B0 : 0 ) \ + : 0 ) \ + : ( 0xDF == ((U8*)s)[0] ) ? 0xDF : 0 ) \ +: ((e)-(s) > 0) ? \ + ( ( ( !( is_utf8 ) ) && ( 0xDF == ((U8*)s)[0] ) ) ? 0xDF : 0 ) \ +: 0 ) /*** GENERATED CODE ***/ -#define is_TRICKYFOLD_latin1_safe(s,e) \ -( ( (e) - (s) > 0 ) ? \ - ( ((U8*)s)[0] == 0xDF ) : 0 ) +#define what_len_TRICKYFOLD(s,is_utf8,len) \ +( ( is_utf8 ) ? \ + ( ( 0xC3 == ((U8*)s)[0] ) ? \ + ( ( 0x9F == ((U8*)s)[1] ) ? len=2, 0xDF : 0 ) \ + : ( 0xCE == ((U8*)s)[0] ) ? \ + ( ( 0x90 == ((U8*)s)[1] ) ? len=2, 0x390 \ + : ( 0xB0 == ((U8*)s)[1] ) ? len=2, 0x3B0 : 0 ) \ + : 0 ) \ +: ( 0xDF == ((U8*)s)[0] ) ? len=1, 0xDF : 0 ) /*** GENERATED CODE ***/ -#define is_TRICKYFOLD_cp(cp) \ -( cp == 0xDF ||( cp > 0xDF && \ -( cp == 0x390 ||( cp > 0x390 && \ -cp == 0x3B0 ) ) ) ) +#define what_len_TRICKYFOLD_safe(s,e,is_utf8,len) \ +( ((e)-(s) > 1) ? \ + ( ( is_utf8 ) ? \ + ( ( 0xC3 == ((U8*)s)[0] ) ? \ + ( ( 0x9F == ((U8*)s)[1] ) ? len=2, 0xDF : 0 ) \ + : ( 0xCE == ((U8*)s)[0] ) ? \ + ( ( 0x90 == ((U8*)s)[1] ) ? len=2, 0x390 \ + : ( 0xB0 == ((U8*)s)[1] ) ? len=2, 0x3B0 : 0 ) \ + : 0 ) \ + : ( 0xDF == ((U8*)s)[0] ) ? len=1, 0xDF : 0 ) \ +: ((e)-(s) > 0) ? \ + ( ( ( !( is_utf8 ) ) && ( 0xDF == ((U8*)s)[0] ) ) ? len=1, 0xDF : 0 ) \ +: 0 ) /* ex: set ro: */ |