summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2014-03-01 19:27:43 -0700
committerKarl Williamson <public@khwilliamson.com>2014-03-01 20:12:17 -0700
commit5c025f035e2b0abffadd613f6414974abb1bfb2a (patch)
tree0ac9a0bc0f3d3ac8466ab6d99589e3fb04bcb0b8
parent251b239f638a40fdf052716f0d8512fd4122ec8c (diff)
downloadperl-5c025f035e2b0abffadd613f6414974abb1bfb2a.tar.gz
regen/regcharclass.pl: Don't generate unused macros
The macros generated by these options are not needed in the core; generating them just clutters up the header file, and some will actually be forbidden by the next commit.
-rw-r--r--regcharclass.h43
-rwxr-xr-xregen/regcharclass.pl6
2 files changed, 3 insertions, 46 deletions
diff --git a/regcharclass.h b/regcharclass.h
index 7fe7235078..1412800d17 100644
--- a/regcharclass.h
+++ b/regcharclass.h
@@ -25,17 +25,6 @@
\p{VertSpace}
*/
/*** GENERATED CODE ***/
-#define is_LNBREAK(s,is_utf8) \
-( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) ? 1\
-: ( 0x0D == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \
- ( ( 0x0A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 1 ) \
-: ( is_utf8 ) ? \
- ( ( 0xC2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \
- ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \
- : ( ( ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
-: ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) )
-
-/*** GENERATED CODE ***/
#define is_LNBREAK_safe(s,e,is_utf8) \
( ((e)-(s) > 2) ? \
( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) ? 1\
@@ -61,15 +50,6 @@
: 0 )
/*** GENERATED CODE ***/
-#define is_LNBREAK_utf8(s) \
-( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) ? 1\
-: ( 0x0D == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \
- ( ( 0x0A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 1 ) \
-: ( 0xC2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \
- ( ( 0x85 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 0 ) \
-: ( ( ( 0xE2 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) && ( 0x80 == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ) && ( ( NATIVE_TO_LATIN1(((U8*)s)[2]) & 0xFE ) == 0xA8 ) ) ? 3 : 0 )
-
-/*** GENERATED CODE ***/
#define is_LNBREAK_utf8_safe(s,e) \
( ((e)-(s) > 2) ? \
( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) ? 1\
@@ -88,13 +68,6 @@
: 0 )
/*** GENERATED CODE ***/
-#define is_LNBREAK_latin1(s) \
-( ( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) || 0x85 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? 1\
-: ( 0x0D == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? \
- ( ( 0x0A == NATIVE_TO_LATIN1(((U8*)s)[1]) ) ? 2 : 1 ) \
-: 0 )
-
-/*** GENERATED CODE ***/
#define is_LNBREAK_latin1_safe(s,e) \
( ((e)-(s) > 1) ? \
( ( ( 0x0A <= NATIVE_TO_LATIN1(((U8*)s)[0]) && NATIVE_TO_LATIN1(((U8*)s)[0]) <= 0x0C ) || 0x85 == NATIVE_TO_LATIN1(((U8*)s)[0]) ) ? 1\
@@ -207,16 +180,6 @@
: 0 )
/*** GENERATED CODE ***/
-#define is_HORIZWS_cp(cp) \
-( 0x09 == NATIVE_TO_UNI(cp) || ( 0x09 < NATIVE_TO_UNI(cp) && \
-( 0x20 == NATIVE_TO_UNI(cp) || ( 0x20 < NATIVE_TO_UNI(cp) && \
-( 0xA0 == NATIVE_TO_UNI(cp) || ( 0xA0 < NATIVE_TO_UNI(cp) && \
-( 0x1680 == NATIVE_TO_UNI(cp) || ( 0x1680 < NATIVE_TO_UNI(cp) && \
-( ( 0x2000 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0x200A ) || ( 0x200A < NATIVE_TO_UNI(cp) &&\
-( 0x202F == NATIVE_TO_UNI(cp) || ( 0x202F < NATIVE_TO_UNI(cp) && \
-( 0x205F == NATIVE_TO_UNI(cp) || 0x3000 == NATIVE_TO_UNI(cp) ) ) ) ) ) ) ) ) ) ) ) ) )
-
-/*** GENERATED CODE ***/
#define is_HORIZWS_cp_high(cp) \
( 0x1680 == NATIVE_TO_UNI(cp) || ( 0x1680 < NATIVE_TO_UNI(cp) && \
( ( 0x2000 <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0x200A ) || ( 0x200A < NATIVE_TO_UNI(cp) &&\
@@ -287,12 +250,6 @@
: 0 )
/*** GENERATED CODE ***/
-#define is_VERTWS_cp(cp) \
-( ( 0x0A <= NATIVE_TO_UNI(cp) && NATIVE_TO_UNI(cp) <= 0x0D ) || ( 0x0D < NATIVE_TO_UNI(cp) &&\
-( 0x85 == NATIVE_TO_UNI(cp) || ( 0x85 < NATIVE_TO_UNI(cp) && \
-( 0x2028 == NATIVE_TO_UNI(cp) || 0x2029 == NATIVE_TO_UNI(cp) ) ) ) ) )
-
-/*** GENERATED CODE ***/
#define is_VERTWS_cp_high(cp) \
( 0x2028 == NATIVE_TO_UNI(cp) || 0x2029 == NATIVE_TO_UNI(cp) )
diff --git a/regen/regcharclass.pl b/regen/regcharclass.pl
index f7422bf5fa..40254f9171 100755
--- a/regen/regcharclass.pl
+++ b/regen/regcharclass.pl
@@ -1537,16 +1537,16 @@ __DATA__
# 0x1FE3 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA; maps same as 03B0
LNBREAK: Line Break: \R
-=> generic UTF8 LATIN1 :fast safe
+=> generic UTF8 LATIN1 : safe
"\x0D\x0A" # CRLF - Network (Windows) line ending
\p{VertSpace}
HORIZWS: Horizontal Whitespace: \h \H
-=> generic UTF8 LATIN1 high cp cp_high :fast safe
+=> generic UTF8 LATIN1 high cp_high :fast safe
\p{HorizSpace}
VERTWS: Vertical Whitespace: \v \V
-=> generic UTF8 high LATIN1 cp cp_high :fast safe
+=> generic UTF8 high LATIN1 cp_high :fast safe
\p{VertSpace}
XDIGIT: Hexadecimal digits