summaryrefslogtreecommitdiff
path: root/regnodes.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-03-17 13:33:48 +0000
committerNicholas Clark <nick@ccl4.org>2010-05-27 10:30:01 +0100
commitf9ef50a71935a8e93b4030c12dcd1206ccab71ab (patch)
treeeb3fd930cc49176fa359201be519a6563a343321 /regnodes.h
parentf8abb37e5b952f76a9e019137369e3f8ef5a58ae (diff)
downloadperl-f9ef50a71935a8e93b4030c12dcd1206ccab71ab.tar.gz
Generate PL_simple[] and PL_varies[] with regcomp.pl, rather than hard-coding.
Add a new flags column to regcomp.sym, with V if the node type is in PL_varies, S if it is in PL_simple, and . if a placeholder is needed because subsequent optional columns are present.
Diffstat (limited to 'regnodes.h')
-rw-r--r--regnodes.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/regnodes.h b/regnodes.h
index d87acfd4b5..a501416f9a 100644
--- a/regnodes.h
+++ b/regnodes.h
@@ -661,4 +661,28 @@ EXTCONST char * const PL_reg_extflags_name[] = {
};
#endif /* DOINIT */
+/* The following have no fixed length. U8 so we can do strchr() on it. */
+#ifndef DOINIT
+EXTCONST U8 PL_varies[];
+#else
+EXTCONST U8 PL_varies[] = {
+ CLUMP, BRANCH, BACK, STAR, PLUS, CURLY, CURLYN, CURLYM, CURLYX, WHILEM,
+ REF, REFF, REFFL, SUSPEND, IFTHEN, BRANCHJ, NREF, NREFF, NREFFL,
+ 0
+};
+#endif /* DOINIT */
+
+/* The following always have a length of 1. U8 we can do strchr() on it. */
+/* (Note that length 1 means "one character" under UTF8, not "one octet".) */
+#ifndef DOINIT
+EXTCONST U8 PL_simple[];
+#else
+EXTCONST U8 PL_simple[] = {
+ REG_ANY, SANY, CANY, ANYOF, ALNUM, ALNUML, NALNUM, NALNUML, SPACE,
+ SPACEL, NSPACE, NSPACEL, DIGIT, NDIGIT, VERTWS, NVERTWS, HORIZWS,
+ NHORIZWS,
+ 0
+};
+#endif /* DOINIT */
+
/* ex: set ro: */