summaryrefslogtreecommitdiff
path: root/regnodes.h
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-12-23 19:37:36 -0700
committerKarl Williamson <public@khwilliamson.com>2012-01-19 11:58:18 -0700
commitca600955b124a74a55428f5d252241f4119646d4 (patch)
tree1e72ab454aba32865a19439683f1b7984169b6b6 /regnodes.h
parent3c7606610aea217f76f5efe36a0540064ff6919a (diff)
downloadperl-ca600955b124a74a55428f5d252241f4119646d4.tar.gz
regex: Add new node type EXACTFU_NO_TRIE
This new node is like EXACTFU but is not currently trie'able. This adds handling for it in regexec.c, but it is not currently generated; this commit is preparing for future commits
Diffstat (limited to 'regnodes.h')
-rw-r--r--regnodes.h253
1 files changed, 129 insertions, 124 deletions
diff --git a/regnodes.h b/regnodes.h
index 3714f5256c..785ff1c9ca 100644
--- a/regnodes.h
+++ b/regnodes.h
@@ -6,8 +6,8 @@
/* Regops and State definitions */
-#define REGNODE_MAX 112
-#define REGMATCH_STATE_MAX 152
+#define REGNODE_MAX 113
+#define REGMATCH_STATE_MAX 153
#define END 0 /* 0000 End of program. */
#define SUCCEED 1 /* 0x01 Return from a subroutine, basically. */
@@ -62,66 +62,67 @@
#define EXACTFL 50 /* 0x32 Match this string (not guaranteed to be folded) using /il rules (w/len). */
#define EXACTFU 51 /* 0x33 Match this string (folded iff in UTF-8, length in folding doesn't change if not in UTF-8) using /iu rules (w/len). */
#define EXACTFU_SS 52 /* 0x34 Match this string (folded iff in UTF-8, length in folding may change even if not in UTF-8) using /iu rules (w/len). */
-#define EXACTFA 53 /* 0x35 Match this string (not guaranteed to be folded) using /iaa rules (w/len). */
-#define NOTHING 54 /* 0x36 Match empty string. */
-#define TAIL 55 /* 0x37 Match empty string. Can jump here from outside. */
-#define STAR 56 /* 0x38 Match this (simple) thing 0 or more times. */
-#define PLUS 57 /* 0x39 Match this (simple) thing 1 or more times. */
-#define CURLY 58 /* 0x3a Match this simple thing {n,m} times. */
-#define CURLYN 59 /* 0x3b Capture next-after-this simple thing */
-#define CURLYM 60 /* 0x3c Capture this medium-complex thing {n,m} times. */
-#define CURLYX 61 /* 0x3d Match this complex thing {n,m} times. */
-#define WHILEM 62 /* 0x3e Do curly processing and see if rest matches. */
-#define OPEN 63 /* 0x3f Mark this point in input as start of */
-#define CLOSE 64 /* 0x40 Analogous to OPEN. */
-#define REF 65 /* 0x41 Match some already matched string */
-#define REFF 66 /* 0x42 Match already matched string, folded using native charset semantics for non-utf8 */
-#define REFFL 67 /* 0x43 Match already matched string, folded in loc. */
-#define REFFU 68 /* 0x44 Match already matched string, folded using unicode semantics for non-utf8 */
-#define REFFA 69 /* 0x45 Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */
-#define NREF 70 /* 0x46 Match some already matched string */
-#define NREFF 71 /* 0x47 Match already matched string, folded using native charset semantics for non-utf8 */
-#define NREFFL 72 /* 0x48 Match already matched string, folded in loc. */
-#define NREFFU 73 /* 0x49 Match already matched string, folded using unicode semantics for non-utf8 */
-#define NREFFA 74 /* 0x4a Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */
-#define IFMATCH 75 /* 0x4b Succeeds if the following matches. */
-#define UNLESSM 76 /* 0x4c Fails if the following matches. */
-#define SUSPEND 77 /* 0x4d "Independent" sub-RE. */
-#define IFTHEN 78 /* 0x4e Switch, should be preceded by switcher . */
-#define GROUPP 79 /* 0x4f Whether the group matched. */
-#define LONGJMP 80 /* 0x50 Jump far away. */
-#define BRANCHJ 81 /* 0x51 BRANCH with long offset. */
-#define EVAL 82 /* 0x52 Execute some Perl code. */
-#define MINMOD 83 /* 0x53 Next operator is not greedy. */
-#define LOGICAL 84 /* 0x54 Next opcode should set the flag only. */
-#define RENUM 85 /* 0x55 Group with independently numbered parens. */
-#define TRIE 86 /* 0x56 Match many EXACT(F[ALU]?)? at once. flags==type */
-#define TRIEC 87 /* 0x57 Same as TRIE, but with embedded charclass data */
-#define AHOCORASICK 88 /* 0x58 Aho Corasick stclass. flags==type */
-#define AHOCORASICKC 89 /* 0x59 Same as AHOCORASICK, but with embedded charclass data */
-#define GOSUB 90 /* 0x5a recurse to paren arg1 at (signed) ofs arg2 */
-#define GOSTART 91 /* 0x5b recurse to start of pattern */
-#define NGROUPP 92 /* 0x5c Whether the group matched. */
-#define INSUBP 93 /* 0x5d Whether we are in a specific recurse. */
-#define DEFINEP 94 /* 0x5e Never execute directly. */
-#define ENDLIKE 95 /* 0x5f Used only for the type field of verbs */
-#define OPFAIL 96 /* 0x60 Same as (?!) */
-#define ACCEPT 97 /* 0x61 Accepts the current matched string. */
-#define VERB 98 /* 0x62 Used only for the type field of verbs */
-#define PRUNE 99 /* 0x63 Pattern fails at this startpoint if no-backtracking through this */
-#define MARKPOINT 100 /* 0x64 Push the current location for rollback by cut. */
-#define SKIP 101 /* 0x65 On failure skip forward (to the mark) before retrying */
-#define COMMIT 102 /* 0x66 Pattern fails outright if backtracking through this */
-#define CUTGROUP 103 /* 0x67 On failure go to the next alternation in the group */
-#define KEEPS 104 /* 0x68 $& begins here. */
-#define LNBREAK 105 /* 0x69 generic newline pattern */
-#define VERTWS 106 /* 0x6a vertical whitespace (Perl 6) */
-#define NVERTWS 107 /* 0x6b not vertical whitespace (Perl 6) */
-#define HORIZWS 108 /* 0x6c horizontal whitespace (Perl 6) */
-#define NHORIZWS 109 /* 0x6d not horizontal whitespace (Perl 6) */
-#define FOLDCHAR 110 /* 0x6e codepoint with tricky case folding properties. */
-#define OPTIMIZED 111 /* 0x6f Placeholder for dump. */
-#define PSEUDO 112 /* 0x70 Pseudo opcode for internal use. */
+#define EXACTFU_NO_TRIE 53 /* 0x35 Match this folded UTF-8 string using /iu rules, but don't generate a trie for it */
+#define EXACTFA 54 /* 0x36 Match this string (not guaranteed to be folded) using /iaa rules (w/len). */
+#define NOTHING 55 /* 0x37 Match empty string. */
+#define TAIL 56 /* 0x38 Match empty string. Can jump here from outside. */
+#define STAR 57 /* 0x39 Match this (simple) thing 0 or more times. */
+#define PLUS 58 /* 0x3a Match this (simple) thing 1 or more times. */
+#define CURLY 59 /* 0x3b Match this simple thing {n,m} times. */
+#define CURLYN 60 /* 0x3c Capture next-after-this simple thing */
+#define CURLYM 61 /* 0x3d Capture this medium-complex thing {n,m} times. */
+#define CURLYX 62 /* 0x3e Match this complex thing {n,m} times. */
+#define WHILEM 63 /* 0x3f Do curly processing and see if rest matches. */
+#define OPEN 64 /* 0x40 Mark this point in input as start of */
+#define CLOSE 65 /* 0x41 Analogous to OPEN. */
+#define REF 66 /* 0x42 Match some already matched string */
+#define REFF 67 /* 0x43 Match already matched string, folded using native charset semantics for non-utf8 */
+#define REFFL 68 /* 0x44 Match already matched string, folded in loc. */
+#define REFFU 69 /* 0x45 Match already matched string, folded using unicode semantics for non-utf8 */
+#define REFFA 70 /* 0x46 Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */
+#define NREF 71 /* 0x47 Match some already matched string */
+#define NREFF 72 /* 0x48 Match already matched string, folded using native charset semantics for non-utf8 */
+#define NREFFL 73 /* 0x49 Match already matched string, folded in loc. */
+#define NREFFU 74 /* 0x4a Match already matched string, folded using unicode semantics for non-utf8 */
+#define NREFFA 75 /* 0x4b Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */
+#define IFMATCH 76 /* 0x4c Succeeds if the following matches. */
+#define UNLESSM 77 /* 0x4d Fails if the following matches. */
+#define SUSPEND 78 /* 0x4e "Independent" sub-RE. */
+#define IFTHEN 79 /* 0x4f Switch, should be preceded by switcher . */
+#define GROUPP 80 /* 0x50 Whether the group matched. */
+#define LONGJMP 81 /* 0x51 Jump far away. */
+#define BRANCHJ 82 /* 0x52 BRANCH with long offset. */
+#define EVAL 83 /* 0x53 Execute some Perl code. */
+#define MINMOD 84 /* 0x54 Next operator is not greedy. */
+#define LOGICAL 85 /* 0x55 Next opcode should set the flag only. */
+#define RENUM 86 /* 0x56 Group with independently numbered parens. */
+#define TRIE 87 /* 0x57 Match many EXACT(F[ALU]?)? at once. flags==type */
+#define TRIEC 88 /* 0x58 Same as TRIE, but with embedded charclass data */
+#define AHOCORASICK 89 /* 0x59 Aho Corasick stclass. flags==type */
+#define AHOCORASICKC 90 /* 0x5a Same as AHOCORASICK, but with embedded charclass data */
+#define GOSUB 91 /* 0x5b recurse to paren arg1 at (signed) ofs arg2 */
+#define GOSTART 92 /* 0x5c recurse to start of pattern */
+#define NGROUPP 93 /* 0x5d Whether the group matched. */
+#define INSUBP 94 /* 0x5e Whether we are in a specific recurse. */
+#define DEFINEP 95 /* 0x5f Never execute directly. */
+#define ENDLIKE 96 /* 0x60 Used only for the type field of verbs */
+#define OPFAIL 97 /* 0x61 Same as (?!) */
+#define ACCEPT 98 /* 0x62 Accepts the current matched string. */
+#define VERB 99 /* 0x63 Used only for the type field of verbs */
+#define PRUNE 100 /* 0x64 Pattern fails at this startpoint if no-backtracking through this */
+#define MARKPOINT 101 /* 0x65 Push the current location for rollback by cut. */
+#define SKIP 102 /* 0x66 On failure skip forward (to the mark) before retrying */
+#define COMMIT 103 /* 0x67 Pattern fails outright if backtracking through this */
+#define CUTGROUP 104 /* 0x68 On failure go to the next alternation in the group */
+#define KEEPS 105 /* 0x69 $& begins here. */
+#define LNBREAK 106 /* 0x6a generic newline pattern */
+#define VERTWS 107 /* 0x6b vertical whitespace (Perl 6) */
+#define NVERTWS 108 /* 0x6c not vertical whitespace (Perl 6) */
+#define HORIZWS 109 /* 0x6d horizontal whitespace (Perl 6) */
+#define NHORIZWS 110 /* 0x6e not horizontal whitespace (Perl 6) */
+#define FOLDCHAR 111 /* 0x6f codepoint with tricky case folding properties. */
+#define OPTIMIZED 112 /* 0x70 Placeholder for dump. */
+#define PSEUDO 113 /* 0x71 Pseudo opcode for internal use. */
/* ------------ States ------------- */
#define TRIE_next (REGNODE_MAX + 1) /* state for TRIE */
#define TRIE_next_fail (REGNODE_MAX + 2) /* state for TRIE */
@@ -223,6 +224,7 @@ EXTCONST U8 PL_regkind[] = {
EXACT, /* EXACTFL */
EXACT, /* EXACTFU */
EXACT, /* EXACTFU_SS */
+ EXACT, /* EXACTFU_NO_TRIE */
EXACT, /* EXACTFA */
NOTHING, /* NOTHING */
NOTHING, /* TAIL */
@@ -384,6 +386,7 @@ static const U8 regarglen[] = {
0, /* EXACTFL */
0, /* EXACTFU */
0, /* EXACTFU_SS */
+ 0, /* EXACTFU_NO_TRIE */
0, /* EXACTFA */
0, /* NOTHING */
0, /* TAIL */
@@ -502,6 +505,7 @@ static const char reg_off_by_arg[] = {
0, /* EXACTFL */
0, /* EXACTFU */
0, /* EXACTFU_SS */
+ 0, /* EXACTFU_NO_TRIE */
0, /* EXACTFA */
0, /* NOTHING */
0, /* TAIL */
@@ -625,66 +629,67 @@ EXTCONST char * const PL_reg_name[] = {
"EXACTFL", /* 0x32 */
"EXACTFU", /* 0x33 */
"EXACTFU_SS", /* 0x34 */
- "EXACTFA", /* 0x35 */
- "NOTHING", /* 0x36 */
- "TAIL", /* 0x37 */
- "STAR", /* 0x38 */
- "PLUS", /* 0x39 */
- "CURLY", /* 0x3a */
- "CURLYN", /* 0x3b */
- "CURLYM", /* 0x3c */
- "CURLYX", /* 0x3d */
- "WHILEM", /* 0x3e */
- "OPEN", /* 0x3f */
- "CLOSE", /* 0x40 */
- "REF", /* 0x41 */
- "REFF", /* 0x42 */
- "REFFL", /* 0x43 */
- "REFFU", /* 0x44 */
- "REFFA", /* 0x45 */
- "NREF", /* 0x46 */
- "NREFF", /* 0x47 */
- "NREFFL", /* 0x48 */
- "NREFFU", /* 0x49 */
- "NREFFA", /* 0x4a */
- "IFMATCH", /* 0x4b */
- "UNLESSM", /* 0x4c */
- "SUSPEND", /* 0x4d */
- "IFTHEN", /* 0x4e */
- "GROUPP", /* 0x4f */
- "LONGJMP", /* 0x50 */
- "BRANCHJ", /* 0x51 */
- "EVAL", /* 0x52 */
- "MINMOD", /* 0x53 */
- "LOGICAL", /* 0x54 */
- "RENUM", /* 0x55 */
- "TRIE", /* 0x56 */
- "TRIEC", /* 0x57 */
- "AHOCORASICK", /* 0x58 */
- "AHOCORASICKC", /* 0x59 */
- "GOSUB", /* 0x5a */
- "GOSTART", /* 0x5b */
- "NGROUPP", /* 0x5c */
- "INSUBP", /* 0x5d */
- "DEFINEP", /* 0x5e */
- "ENDLIKE", /* 0x5f */
- "OPFAIL", /* 0x60 */
- "ACCEPT", /* 0x61 */
- "VERB", /* 0x62 */
- "PRUNE", /* 0x63 */
- "MARKPOINT", /* 0x64 */
- "SKIP", /* 0x65 */
- "COMMIT", /* 0x66 */
- "CUTGROUP", /* 0x67 */
- "KEEPS", /* 0x68 */
- "LNBREAK", /* 0x69 */
- "VERTWS", /* 0x6a */
- "NVERTWS", /* 0x6b */
- "HORIZWS", /* 0x6c */
- "NHORIZWS", /* 0x6d */
- "FOLDCHAR", /* 0x6e */
- "OPTIMIZED", /* 0x6f */
- "PSEUDO", /* 0x70 */
+ "EXACTFU_NO_TRIE", /* 0x35 */
+ "EXACTFA", /* 0x36 */
+ "NOTHING", /* 0x37 */
+ "TAIL", /* 0x38 */
+ "STAR", /* 0x39 */
+ "PLUS", /* 0x3a */
+ "CURLY", /* 0x3b */
+ "CURLYN", /* 0x3c */
+ "CURLYM", /* 0x3d */
+ "CURLYX", /* 0x3e */
+ "WHILEM", /* 0x3f */
+ "OPEN", /* 0x40 */
+ "CLOSE", /* 0x41 */
+ "REF", /* 0x42 */
+ "REFF", /* 0x43 */
+ "REFFL", /* 0x44 */
+ "REFFU", /* 0x45 */
+ "REFFA", /* 0x46 */
+ "NREF", /* 0x47 */
+ "NREFF", /* 0x48 */
+ "NREFFL", /* 0x49 */
+ "NREFFU", /* 0x4a */
+ "NREFFA", /* 0x4b */
+ "IFMATCH", /* 0x4c */
+ "UNLESSM", /* 0x4d */
+ "SUSPEND", /* 0x4e */
+ "IFTHEN", /* 0x4f */
+ "GROUPP", /* 0x50 */
+ "LONGJMP", /* 0x51 */
+ "BRANCHJ", /* 0x52 */
+ "EVAL", /* 0x53 */
+ "MINMOD", /* 0x54 */
+ "LOGICAL", /* 0x55 */
+ "RENUM", /* 0x56 */
+ "TRIE", /* 0x57 */
+ "TRIEC", /* 0x58 */
+ "AHOCORASICK", /* 0x59 */
+ "AHOCORASICKC", /* 0x5a */
+ "GOSUB", /* 0x5b */
+ "GOSTART", /* 0x5c */
+ "NGROUPP", /* 0x5d */
+ "INSUBP", /* 0x5e */
+ "DEFINEP", /* 0x5f */
+ "ENDLIKE", /* 0x60 */
+ "OPFAIL", /* 0x61 */
+ "ACCEPT", /* 0x62 */
+ "VERB", /* 0x63 */
+ "PRUNE", /* 0x64 */
+ "MARKPOINT", /* 0x65 */
+ "SKIP", /* 0x66 */
+ "COMMIT", /* 0x67 */
+ "CUTGROUP", /* 0x68 */
+ "KEEPS", /* 0x69 */
+ "LNBREAK", /* 0x6a */
+ "VERTWS", /* 0x6b */
+ "NVERTWS", /* 0x6c */
+ "HORIZWS", /* 0x6d */
+ "NHORIZWS", /* 0x6e */
+ "FOLDCHAR", /* 0x6f */
+ "OPTIMIZED", /* 0x70 */
+ "PSEUDO", /* 0x71 */
/* ------------ States ------------- */
"TRIE_next", /* REGNODE_MAX +0x01 */
"TRIE_next_fail", /* REGNODE_MAX +0x02 */
@@ -789,7 +794,7 @@ EXTCONST U8 PL_varies[] __attribute__deprecated__ = {
EXTCONST U8 PL_varies_bitmask[];
#else
EXTCONST U8 PL_varies_bitmask[] = {
- 0x00, 0x00, 0x40, 0x00, 0x00, 0xE0, 0x00, 0x7F, 0xFE, 0x67, 0x02, 0x00, 0x00, 0x00, 0x00
+ 0x00, 0x00, 0x40, 0x00, 0x00, 0xE0, 0x00, 0xFE, 0xFC, 0xCF, 0x04, 0x00, 0x00, 0x00, 0x00
};
#endif /* DOINIT */
@@ -813,7 +818,7 @@ EXTCONST U8 PL_simple[] __attribute__deprecated__ = {
EXTCONST U8 PL_simple_bitmask[];
#else
EXTCONST U8 PL_simple_bitmask[] = {
- 0x00, 0x00, 0xBC, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, 0x00
+ 0x00, 0x00, 0xBC, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00
};
#endif /* DOINIT */