summaryrefslogtreecommitdiff
path: root/regcomp.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-12-30 20:55:49 -0700
committerKarl Williamson <public@khwilliamson.com>2012-12-31 11:03:28 -0700
commite8d596e06a8502f992b53ea859e136ec40f7497c (patch)
tree8ec4e2a6452d2615edfcaae8cbf065082c4475b5 /regcomp.h
parent3da38613a3e506474535e2f53bc1f1cf8606ebca (diff)
downloadperl-e8d596e06a8502f992b53ea859e136ec40f7497c.tar.gz
handy.h, regcomp.h, regexec.c: Sort initializers, switch()
Until recently, these were needed to be (or it made sense to be) in numerical value of what the rhs of each #define evaluates to. But now, they are all initialized to something else, and the numerical value is not even apparent. Alphabetical order gives a logical ordering to help a reader find things.
Diffstat (limited to 'regcomp.h')
-rw-r--r--regcomp.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/regcomp.h b/regcomp.h
index dca3bfea9b..748863f373 100644
--- a/regcomp.h
+++ b/regcomp.h
@@ -362,36 +362,36 @@ struct regnode_charclass_class {
/* Should be synchronized with a table in regprop() */
/* 2n should be the normal one, paired with its complement at 2n+1 */
-#define ANYOF_WORDCHAR ((_CC_WORDCHAR) * 2) /* \w, PL_utf8_alnum, utf8::IsWord, ALNUM */
-#define ANYOF_NWORDCHAR ((ANYOF_WORDCHAR) + 1)
-#define ANYOF_SPACE ((_CC_SPACE) * 2) /* \s */
-#define ANYOF_NSPACE ((ANYOF_SPACE) + 1)
-#define ANYOF_DIGIT ((_CC_DIGIT) * 2) /* \d */
-#define ANYOF_NDIGIT ((ANYOF_DIGIT) + 1)
-#define ANYOF_ALPHANUMERIC ((_CC_ALPHANUMERIC) * 2) /* [[:alnum:]] isalnum(3), utf8::IsAlnum */
-#define ANYOF_NALPHANUMERIC ((ANYOF_ALPHANUMERIC) + 1)
#define ANYOF_ALPHA ((_CC_ALPHA) * 2)
#define ANYOF_NALPHA ((ANYOF_ALPHA) + 1)
+#define ANYOF_ALPHANUMERIC ((_CC_ALPHANUMERIC) * 2) /* [[:alnum:]] isalnum(3), utf8::IsAlnum */
+#define ANYOF_NALPHANUMERIC ((ANYOF_ALPHANUMERIC) + 1)
#define ANYOF_ASCII ((_CC_ASCII) * 2)
#define ANYOF_NASCII ((ANYOF_ASCII) + 1)
+#define ANYOF_BLANK ((_CC_BLANK) * 2) /* GNU extension: space and tab: non-vertical space */
+#define ANYOF_NBLANK ((ANYOF_BLANK) + 1)
#define ANYOF_CNTRL ((_CC_CNTRL) * 2)
#define ANYOF_NCNTRL ((ANYOF_CNTRL) + 1)
+#define ANYOF_DIGIT ((_CC_DIGIT) * 2) /* \d */
+#define ANYOF_NDIGIT ((ANYOF_DIGIT) + 1)
#define ANYOF_GRAPH ((_CC_GRAPH) * 2)
#define ANYOF_NGRAPH ((ANYOF_GRAPH) + 1)
#define ANYOF_LOWER ((_CC_LOWER) * 2)
#define ANYOF_NLOWER ((ANYOF_LOWER) + 1)
#define ANYOF_PRINT ((_CC_PRINT) * 2)
#define ANYOF_NPRINT ((ANYOF_PRINT) + 1)
+#define ANYOF_PSXSPC ((_CC_PSXSPC) * 2) /* POSIX space: \s plus the vertical tab */
+#define ANYOF_NPSXSPC ((ANYOF_PSXSPC) + 1)
#define ANYOF_PUNCT ((_CC_PUNCT) * 2)
#define ANYOF_NPUNCT ((ANYOF_PUNCT) + 1)
+#define ANYOF_SPACE ((_CC_SPACE) * 2) /* \s */
+#define ANYOF_NSPACE ((ANYOF_SPACE) + 1)
#define ANYOF_UPPER ((_CC_UPPER) * 2)
#define ANYOF_NUPPER ((ANYOF_UPPER) + 1)
+#define ANYOF_WORDCHAR ((_CC_WORDCHAR) * 2) /* \w, PL_utf8_alnum, utf8::IsWord, ALNUM */
+#define ANYOF_NWORDCHAR ((ANYOF_WORDCHAR) + 1)
#define ANYOF_XDIGIT ((_CC_XDIGIT) * 2)
#define ANYOF_NXDIGIT ((ANYOF_XDIGIT) + 1)
-#define ANYOF_PSXSPC ((_CC_PSXSPC) * 2) /* POSIX space: \s plus the vertical tab */
-#define ANYOF_NPSXSPC ((ANYOF_PSXSPC) + 1)
-#define ANYOF_BLANK ((_CC_BLANK) * 2) /* GNU extension: space and tab: non-vertical space */
-#define ANYOF_NBLANK ((ANYOF_BLANK) + 1)
/* pseudo classes below this, not stored in the class bitmap, but used as flags
during compilation of char classes */