From: Rafael Garcia-Suarez Date: Mon, 23 Apr 2007 15:31:48 +0000 (+0000) Subject: Switch to hex format for integer constants in regcharclass.h X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0ccab2bc1ed9d8d9446194047fec5d4b241a67bf;p=p5sagit%2Fp5-mst-13.2.git Switch to hex format for integer constants in regcharclass.h (Yves Orton). Also, avoid trailing spaces. p4raw-id: //depot/perl@31037 --- diff --git a/Porting/regcharclass.pl b/Porting/regcharclass.pl index 21372da..c895440 100644 --- a/Porting/regcharclass.pl +++ b/Porting/regcharclass.pl @@ -5,6 +5,8 @@ use Text::Wrap qw(wrap); use Encode; use Data::Dumper; +our $hex_fmt="0x%02X"; + # Author: Yves Orton (demerphq) 2007. =pod @@ -222,9 +224,9 @@ sub _cond { # map the ranges into conditions @r= map { # singleton - $_->[0] == $_->[1] ? "$alu==$_->[0]" : + $_->[0] == $_->[1] ? sprintf("$alu == $hex_fmt",$_->[0]) : # range - "($_->[0]<=$alu && $alu<=$_->[1])" + sprintf("($hex_fmt <= $alu && $alu <= $hex_fmt)",@$_) } @r; # return the joined results. return '( ' . join( " || ", @r ) . ' )'; @@ -242,8 +244,8 @@ sub combine { my $alu=shift; local $_ = shift; my $txt= $_->[0] == $_->[1] - ? "$alu==$_->[0]" - : "($_->[0]<=$alu && $alu<=$_->[1])"; + ? sprintf("$alu == $hex_fmt",$_->[0]) + : sprintf("($hex_fmt <= $alu && $alu <= $hex_fmt)",@$_); return $txt unless @_; return "( $txt || ( $alu > $_->[1] && \n".combine($alu,@_)." ) )"; } @@ -362,7 +364,9 @@ sub _optree_to_ternary { sub _macro($) { my $str= shift; my @lines= split /[^\S\n]*\n/, $str; - return join( "\\\n", map { sprintf "%-76s", $_ } @lines ) . "\n\n"; + my $macro = join( "\\\n", map { sprintf "%-76s", $_ } @lines ); + $macro =~ s/ *$//; + return $macro . "\n\n"; } # default type extensions. 'uln' dont have one because normally diff --git a/regcharclass.h b/regcharclass.h index c9ffcb5..40d21bf 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: Mon Apr 23 12:29:30 2007 GMT) + * (Generated at: Mon Apr 23 15:30:51 2007 GMT) * Any changes made here will be lost! */ @@ -27,88 +27,88 @@ */ /*** GENERATED CODE ***/ #define is_LNBREAK(s,is_utf8) \ -( ( ((U8*)s)[0]==13 ) ? \ - ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ? 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]==194 ) ? \ - ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \ - (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\ - ( ((U8*)s)[0]==133 ) ) ) ) + ( ( ((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 ) ) ) ) /*** GENERATED CODE ***/ #define is_LNBREAK_safe(s,e,is_utf8) \ ( ( (e) - (s) > 2 ) ? \ - ( ( ((U8*)s)[0]==13 ) ? \ - ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ? 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]==194 ) ? \ - ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \ - (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\ - ( ((U8*)s)[0]==133 ) ) ) ) : \ + ( ( ((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]==13 ) ? \ - ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ? 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]==194 ) && ( ((U8*)s)[1]==133 )) ? 2 : 0) : \ - ( ((U8*)s)[0]==133 ) ) ) ) : \ + ((( ((U8*)s)[0] == 0xC2 ) && ( ((U8*)s)[1] == 0x85 )) ? 2 : 0) : \ + ( ((U8*)s)[0] == 0x85 ) ) ) ) : \ ( ( (e) - (s) > 0 ) ? \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \ + ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ? 1 : \ ( (!is_utf8) ? \ - ( ((U8*)s)[0]==133 ) : 0 ) ) : 0 ) ) ) + ( ((U8*)s)[0] == 0x85 ) : 0 ) ) : 0 ) ) ) /*** GENERATED CODE ***/ #define is_LNBREAK_utf8(s) \ -( ( ((U8*)s)[0]==194 ) ? \ - ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0]==226 ) ? \ - ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\ - ( ( ((U8*)s)[0]==13 ) ? \ - ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \ - (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ) ) ) +( ( ((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) ) ) ) /*** GENERATED CODE ***/ #define is_LNBREAK_utf8_safe(s,e) \ ( ( (e) - (s) > 2 ) ? \ - ( ( ((U8*)s)[0]==194 ) ? \ - ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0]==226 ) ? \ - ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\ - ( ( ((U8*)s)[0]==13 ) ? \ - ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \ - (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ) ) ) : \ + ( ( ((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]==194 ) ? \ - ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0]==13 ) ? \ - ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \ - (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ) ) : \ + ( ( ((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 ) ? \ - (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) : 0 ) ) ) + (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) : 0 ) ) ) /*** GENERATED CODE ***/ #define is_LNBREAK_latin1(s) \ -( ( ((U8*)s)[0]==13 ) ? \ - ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) || ((U8*)s)[0]==133 ) ) +( ( ((U8*)s)[0] == 0x0D ) ? \ + ( ( ((U8*)s)[1] == 0x0A ) ? 2 : 1 ) : \ + ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C) || ((U8*)s)[0] == 0x85 ) ) /*** GENERATED CODE ***/ #define is_LNBREAK_latin1_safe(s,e) \ ( ( (e) - (s) > 1 ) ? \ - ( ( ((U8*)s)[0]==13 ) ? \ - ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) || ((U8*)s)[0]==133 ) ) : \ + ( ( ((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 ) ? \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) || ((U8*)s)[0]==133 ) : 0 ) ) + ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) || ((U8*)s)[0] == 0x85 ) : 0 ) ) /*** GENERATED CODE ***/ #define is_LNBREAK_cp(cp) \ -( (10<=cp && cp<=13) || ( cp > 13 && \ -( cp==133 || ( cp > 133 && \ -( cp==8232 || ( cp > 8232 && \ -cp==8233 ) ) ) ) ) ) +( (0x0A <= cp && cp <= 0x0D) || ( cp > 13 && \ +( cp == 0x85 || ( cp > 133 && \ +( cp == 0x2028 || ( cp > 8232 && \ +cp == 0x2029 ) ) ) ) ) ) /* HORIZWS: Horizontal Whitespace: \h \H @@ -135,107 +135,107 @@ cp==8233 ) ) ) ) ) ) */ /*** GENERATED CODE ***/ #define is_HORIZWS(s,is_utf8) \ -( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \ +( ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ? 1 : \ ( (is_utf8) ? \ - ( ( ((U8*)s)[0]==194 ) ? \ - ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0]==225 ) ? \ - ( ( ((U8*)s)[1]==160 ) ? \ - ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \ - ( ( ((U8*)s)[0]==226 ) ? \ - ( ( ((U8*)s)[1]==129 ) ? \ - ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\ - (((( ((U8*)s)[0]==227 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) ) ) :\ - ( ((U8*)s)[0]==160 ) ) ) + ( ( ((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 ) ) ) /*** GENERATED CODE ***/ #define is_HORIZWS_safe(s,e,is_utf8) \ ( ( (e) - (s) > 2 ) ? \ - ( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \ + ( ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ? 1 : \ ( (is_utf8) ? \ - ( ( ((U8*)s)[0]==194 ) ? \ - ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0]==225 ) ? \ - ( ( ((U8*)s)[1]==160 ) ? \ - ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \ - ( ( ((U8*)s)[0]==226 ) ? \ - ( ( ((U8*)s)[1]==129 ) ? \ - ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\ - (((( ((U8*)s)[0]==227 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) ) ) :\ - ( ((U8*)s)[0]==160 ) ) ) : \ + ( ( ((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]==9 || ((U8*)s)[0]==32 ) ? 1 : \ + ( ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ? 1 : \ ( (is_utf8) ? \ - ((( ((U8*)s)[0]==194 ) && ( ((U8*)s)[1]==160 )) ? 2 : 0) : \ - ( ((U8*)s)[0]==160 ) ) ) : \ + ((( ((U8*)s)[0] == 0xC2 ) && ( ((U8*)s)[1] == 0xA0 )) ? 2 : 0) : \ + ( ((U8*)s)[0] == 0xA0 ) ) ) : \ ( ( (e) - (s) > 0 ) ? \ - ( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \ + ( ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ? 1 : \ ( (!is_utf8) ? \ - ( ((U8*)s)[0]==160 ) : 0 ) ) : 0 ) ) ) + ( ((U8*)s)[0] == 0xA0 ) : 0 ) ) : 0 ) ) ) /*** GENERATED CODE ***/ #define is_HORIZWS_utf8(s) \ -( ( ((U8*)s)[0]==194 ) ? \ - ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0]==225 ) ? \ - ( ( ((U8*)s)[1]==160 ) ? \ - ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \ - ( ( ((U8*)s)[0]==226 ) ? \ - ( ( ((U8*)s)[1]==129 ) ? \ - ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\ - ( ( ((U8*)s)[0]==227 ) ? \ - ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) : \ - ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ) ) ) ) +( ( ((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 ) ) ) ) ) /*** GENERATED CODE ***/ #define is_HORIZWS_utf8_safe(s,e) \ ( ( (e) - (s) > 2 ) ? \ - ( ( ((U8*)s)[0]==194 ) ? \ - ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0]==225 ) ? \ - ( ( ((U8*)s)[1]==160 ) ? \ - ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \ - ( ( ((U8*)s)[0]==226 ) ? \ - ( ( ((U8*)s)[1]==129 ) ? \ - ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \ - ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\ - ( ( ((U8*)s)[0]==227 ) ? \ - ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) : \ - ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ) ) ) ) : \ + ( ( ((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]==194 ) ? \ - ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \ - ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ) : \ + ( ( ((U8*)s)[0] == 0xC2 ) ? \ + ( ( ((U8*)s)[1] == 0xA0 ) ? 2 : 0 ) : \ + ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) ) : \ ( ( (e) - (s) > 0 ) ? \ - ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) : 0 ) ) ) + ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 ) : 0 ) ) ) /*** GENERATED CODE ***/ #define is_HORIZWS_latin1(s) \ -( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 || ((U8*)s)[0]==160 ) +( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 || ((U8*)s)[0] == 0xA0 ) /*** GENERATED CODE ***/ #define is_HORIZWS_latin1_safe(s,e) \ ( ( (e) - (s) > 0 ) ? \ - ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 || ((U8*)s)[0]==160 ) : 0 ) + ( ((U8*)s)[0] == 0x09 || ((U8*)s)[0] == 0x20 || ((U8*)s)[0] == 0xA0 ) : 0 ) /*** GENERATED CODE ***/ #define is_HORIZWS_cp(cp) \ -( cp==9 || ( cp > 9 && \ -( cp==32 || ( cp > 32 && \ -( cp==160 || ( cp > 160 && \ -( cp==5760 || ( cp > 5760 && \ -( cp==6158 || ( cp > 6158 && \ -( (8192<=cp && cp<=8202) || ( cp > 8202 && \ -( cp==8239 || ( cp > 8239 && \ -( cp==8287 || ( cp > 8287 && \ -cp==12288 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) +( cp == 0x09 || ( cp > 9 && \ +( cp == 0x20 || ( cp > 32 && \ +( cp == 0xA0 || ( cp > 160 && \ +( cp == 0x1680 || ( cp > 5760 && \ +( cp == 0x180E || ( cp > 6158 && \ +( (0x2000 <= cp && cp <= 0x200A) || ( cp > 8202 && \ +( cp == 0x202F || ( cp > 8239 && \ +( cp == 0x205F || ( cp > 8287 && \ +cp == 0x3000 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) /* VERTWS: Vertical Whitespace: \v \V @@ -250,69 +250,69 @@ cp==12288 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) */ /*** GENERATED CODE ***/ #define is_VERTWS(s,is_utf8) \ -( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \ +( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ? 1 : \ ( (is_utf8) ? \ - ( ( ((U8*)s)[0]==194 ) ? \ - ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \ - (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\ - ( ((U8*)s)[0]==133 ) ) ) + ( ( ((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 ) ) ) /*** GENERATED CODE ***/ #define is_VERTWS_safe(s,e,is_utf8) \ ( ( (e) - (s) > 2 ) ? \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \ + ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ? 1 : \ ( (is_utf8) ? \ - ( ( ((U8*)s)[0]==194 ) ? \ - ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \ - (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\ - ( ((U8*)s)[0]==133 ) ) ) : \ + ( ( ((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 ) ? \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \ + ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ? 1 : \ ( (is_utf8) ? \ - ((( ((U8*)s)[0]==194 ) && ( ((U8*)s)[1]==133 )) ? 2 : 0) : \ - ( ((U8*)s)[0]==133 ) ) ) : \ + ((( ((U8*)s)[0] == 0xC2 ) && ( ((U8*)s)[1] == 0x85 )) ? 2 : 0) : \ + ( ((U8*)s)[0] == 0x85 ) ) ) : \ ( ( (e) - (s) > 0 ) ? \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \ + ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ? 1 : \ ( (!is_utf8) ? \ - ( ((U8*)s)[0]==133 ) : 0 ) ) : 0 ) ) ) + ( ((U8*)s)[0] == 0x85 ) : 0 ) ) : 0 ) ) ) /*** GENERATED CODE ***/ #define is_VERTWS_utf8(s) \ -( ( ((U8*)s)[0]==194 ) ? \ - ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0]==226 ) ? \ - ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\ - (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ) ) +( ( ((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) ) ) /*** GENERATED CODE ***/ #define is_VERTWS_utf8_safe(s,e) \ ( ( (e) - (s) > 2 ) ? \ - ( ( ((U8*)s)[0]==194 ) ? \ - ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \ - ( ( ((U8*)s)[0]==226 ) ? \ - ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\ - (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ) ) : \ + ( ( ((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]==194 ) ? \ - ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \ - (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ) : \ + ( ( ((U8*)s)[0] == 0xC2 ) ? \ + ( ( ((U8*)s)[1] == 0x85 ) ? 2 : 0 ) : \ + (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) ) : \ ( ( (e) - (s) > 0 ) ? \ - (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) : 0 ) ) ) + (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) : 0 ) ) ) /*** GENERATED CODE ***/ #define is_VERTWS_latin1(s) \ -( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) || ((U8*)s)[0]==133 ) +( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) || ((U8*)s)[0] == 0x85 ) /*** GENERATED CODE ***/ #define is_VERTWS_latin1_safe(s,e) \ ( ( (e) - (s) > 0 ) ? \ - ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) || ((U8*)s)[0]==133 ) : 0 ) + ( (0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D) || ((U8*)s)[0] == 0x85 ) : 0 ) /*** GENERATED CODE ***/ #define is_VERTWS_cp(cp) \ -( (10<=cp && cp<=13) || ( cp > 13 && \ -( cp==133 || ( cp > 133 && \ -( cp==8232 || ( cp > 8232 && \ -cp==8233 ) ) ) ) ) ) +( (0x0A <= cp && cp <= 0x0D) || ( cp > 13 && \ +( cp == 0x85 || ( cp > 133 && \ +( cp == 0x2028 || ( cp > 8232 && \ +cp == 0x2029 ) ) ) ) ) ) /* ex: set ro: */