summaryrefslogtreecommitdiff
path: root/regnodes.h
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2006-10-26 16:59:11 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-26 15:58:18 +0000
commit7f69552c33ff9bd1eb6665f732d0f22956ac2f30 (patch)
tree347e535bd40a59d18a31921fa858fa5f56e0145b /regnodes.h
parent258133d1989d727199a2ae29d4f498d5d7e9a2f9 (diff)
downloadperl-7f69552c33ff9bd1eb6665f732d0f22956ac2f30.tar.gz
Fix a problem with jump-tries, add (?FAIL) pattern.
Message-ID: <9b18b3110610260559k3efa98barc28987e88c581a8a@mail.gmail.com> p4raw-id: //depot/perl@29118
Diffstat (limited to 'regnodes.h')
-rw-r--r--regnodes.h137
1 files changed, 71 insertions, 66 deletions
diff --git a/regnodes.h b/regnodes.h
index f7ebda17df..d6842b52c3 100644
--- a/regnodes.h
+++ b/regnodes.h
@@ -6,8 +6,8 @@
/* Regops and State definitions */
-#define REGNODE_MAX 74
-#define REGMATCH_STATE_MAX 104
+#define REGNODE_MAX 75
+#define REGMATCH_STATE_MAX 105
#define END 0 /* 0000 End of program. */
#define SUCCEED 1 /* 0x01 Return from a subroutine, basically. */
@@ -82,41 +82,42 @@
#define NGROUPP 70 /* 0x46 Whether the group matched. */
#define RECURSEP 71 /* 0x47 Whether we are in a specific recurse. */
#define DEFINEP 72 /* 0x48 Never execute directly. */
-#define OPTIMIZED 73 /* 0x49 Placeholder for dump. */
-#define PSEUDO 74 /* 0x4a Pseudo opcode for internal use. */
+#define OPFAIL 73 /* 0x49 Same as (?!) */
+#define OPTIMIZED 74 /* 0x4a Placeholder for dump. */
+#define PSEUDO 75 /* 0x4b Pseudo opcode for internal use. */
/* ------------ States ------------- */
-#define TRIE_next 75 /* 0x4b Regmatch state for TRIE */
-#define TRIE_next_fail 76 /* 0x4c Regmatch state for TRIE */
-#define EVAL_AB 77 /* 0x4d Regmatch state for EVAL */
-#define EVAL_AB_fail 78 /* 0x4e Regmatch state for EVAL */
-#define CURLYX_end 79 /* 0x4f Regmatch state for CURLYX */
-#define CURLYX_end_fail 80 /* 0x50 Regmatch state for CURLYX */
-#define WHILEM_A_pre 81 /* 0x51 Regmatch state for WHILEM */
-#define WHILEM_A_pre_fail 82 /* 0x52 Regmatch state for WHILEM */
-#define WHILEM_A_min 83 /* 0x53 Regmatch state for WHILEM */
-#define WHILEM_A_min_fail 84 /* 0x54 Regmatch state for WHILEM */
-#define WHILEM_A_max 85 /* 0x55 Regmatch state for WHILEM */
-#define WHILEM_A_max_fail 86 /* 0x56 Regmatch state for WHILEM */
-#define WHILEM_B_min 87 /* 0x57 Regmatch state for WHILEM */
-#define WHILEM_B_min_fail 88 /* 0x58 Regmatch state for WHILEM */
-#define WHILEM_B_max 89 /* 0x59 Regmatch state for WHILEM */
-#define WHILEM_B_max_fail 90 /* 0x5a Regmatch state for WHILEM */
-#define BRANCH_next 91 /* 0x5b Regmatch state for BRANCH */
-#define BRANCH_next_fail 92 /* 0x5c Regmatch state for BRANCH */
-#define CURLYM_A 93 /* 0x5d Regmatch state for CURLYM */
-#define CURLYM_A_fail 94 /* 0x5e Regmatch state for CURLYM */
-#define CURLYM_B 95 /* 0x5f Regmatch state for CURLYM */
-#define CURLYM_B_fail 96 /* 0x60 Regmatch state for CURLYM */
-#define IFMATCH_A 97 /* 0x61 Regmatch state for IFMATCH */
-#define IFMATCH_A_fail 98 /* 0x62 Regmatch state for IFMATCH */
-#define CURLY_B_min_known 99 /* 0x63 Regmatch state for CURLY */
-#define CURLY_B_min_known_fail 100 /* 0x64 Regmatch state for CURLY */
-#define CURLY_B_min 101 /* 0x65 Regmatch state for CURLY */
-#define CURLY_B_min_fail 102 /* 0x66 Regmatch state for CURLY */
-#define CURLY_B_max 103 /* 0x67 Regmatch state for CURLY */
-#define CURLY_B_max_fail 104 /* 0x68 Regmatch state for CURLY */
+#define TRIE_next 76 /* 0x4c Regmatch state for TRIE */
+#define TRIE_next_fail 77 /* 0x4d Regmatch state for TRIE */
+#define EVAL_AB 78 /* 0x4e Regmatch state for EVAL */
+#define EVAL_AB_fail 79 /* 0x4f Regmatch state for EVAL */
+#define CURLYX_end 80 /* 0x50 Regmatch state for CURLYX */
+#define CURLYX_end_fail 81 /* 0x51 Regmatch state for CURLYX */
+#define WHILEM_A_pre 82 /* 0x52 Regmatch state for WHILEM */
+#define WHILEM_A_pre_fail 83 /* 0x53 Regmatch state for WHILEM */
+#define WHILEM_A_min 84 /* 0x54 Regmatch state for WHILEM */
+#define WHILEM_A_min_fail 85 /* 0x55 Regmatch state for WHILEM */
+#define WHILEM_A_max 86 /* 0x56 Regmatch state for WHILEM */
+#define WHILEM_A_max_fail 87 /* 0x57 Regmatch state for WHILEM */
+#define WHILEM_B_min 88 /* 0x58 Regmatch state for WHILEM */
+#define WHILEM_B_min_fail 89 /* 0x59 Regmatch state for WHILEM */
+#define WHILEM_B_max 90 /* 0x5a Regmatch state for WHILEM */
+#define WHILEM_B_max_fail 91 /* 0x5b Regmatch state for WHILEM */
+#define BRANCH_next 92 /* 0x5c Regmatch state for BRANCH */
+#define BRANCH_next_fail 93 /* 0x5d Regmatch state for BRANCH */
+#define CURLYM_A 94 /* 0x5e Regmatch state for CURLYM */
+#define CURLYM_A_fail 95 /* 0x5f Regmatch state for CURLYM */
+#define CURLYM_B 96 /* 0x60 Regmatch state for CURLYM */
+#define CURLYM_B_fail 97 /* 0x61 Regmatch state for CURLYM */
+#define IFMATCH_A 98 /* 0x62 Regmatch state for IFMATCH */
+#define IFMATCH_A_fail 99 /* 0x63 Regmatch state for IFMATCH */
+#define CURLY_B_min_known 100 /* 0x64 Regmatch state for CURLY */
+#define CURLY_B_min_known_fail 101 /* 0x65 Regmatch state for CURLY */
+#define CURLY_B_min 102 /* 0x66 Regmatch state for CURLY */
+#define CURLY_B_min_fail 103 /* 0x67 Regmatch state for CURLY */
+#define CURLY_B_max 104 /* 0x68 Regmatch state for CURLY */
+#define CURLY_B_max_fail 105 /* 0x69 Regmatch state for CURLY */
/* PL_regkind[] What type of regop or state is this. */
@@ -197,6 +198,7 @@ EXTCONST U8 PL_regkind[] = {
NGROUPP, /* NGROUPP */
RECURSEP, /* RECURSEP */
DEFINEP, /* DEFINEP */
+ OPFAIL, /* OPFAIL */
NOTHING, /* OPTIMIZED */
PSEUDO, /* PSEUDO */
/* ------------ States ------------- */
@@ -310,6 +312,7 @@ static const U8 regarglen[] = {
EXTRA_SIZE(struct regnode_1), /* NGROUPP */
EXTRA_SIZE(struct regnode_1), /* RECURSEP */
EXTRA_SIZE(struct regnode_1), /* DEFINEP */
+ 0, /* OPFAIL */
0, /* OPTIMIZED */
0, /* PSEUDO */
};
@@ -390,6 +393,7 @@ static const char reg_off_by_arg[] = {
0, /* NGROUPP */
0, /* RECURSEP */
0, /* DEFINEP */
+ 0, /* OPFAIL */
0, /* OPTIMIZED */
0, /* PSEUDO */
};
@@ -471,39 +475,40 @@ const char * reg_name[] = {
"NGROUPP", /* 0x46 */
"RECURSEP", /* 0x47 */
"DEFINEP", /* 0x48 */
- "OPTIMIZED", /* 0x49 */
- "PSEUDO", /* 0x4a */
+ "OPFAIL", /* 0x49 */
+ "OPTIMIZED", /* 0x4a */
+ "PSEUDO", /* 0x4b */
/* ------------ States ------------- */
- "TRIE_next", /* 0x4b */
- "TRIE_next_fail", /* 0x4c */
- "EVAL_AB", /* 0x4d */
- "EVAL_AB_fail", /* 0x4e */
- "CURLYX_end", /* 0x4f */
- "CURLYX_end_fail", /* 0x50 */
- "WHILEM_A_pre", /* 0x51 */
- "WHILEM_A_pre_fail", /* 0x52 */
- "WHILEM_A_min", /* 0x53 */
- "WHILEM_A_min_fail", /* 0x54 */
- "WHILEM_A_max", /* 0x55 */
- "WHILEM_A_max_fail", /* 0x56 */
- "WHILEM_B_min", /* 0x57 */
- "WHILEM_B_min_fail", /* 0x58 */
- "WHILEM_B_max", /* 0x59 */
- "WHILEM_B_max_fail", /* 0x5a */
- "BRANCH_next", /* 0x5b */
- "BRANCH_next_fail", /* 0x5c */
- "CURLYM_A", /* 0x5d */
- "CURLYM_A_fail", /* 0x5e */
- "CURLYM_B", /* 0x5f */
- "CURLYM_B_fail", /* 0x60 */
- "IFMATCH_A", /* 0x61 */
- "IFMATCH_A_fail", /* 0x62 */
- "CURLY_B_min_known", /* 0x63 */
- "CURLY_B_min_known_fail", /* 0x64 */
- "CURLY_B_min", /* 0x65 */
- "CURLY_B_min_fail", /* 0x66 */
- "CURLY_B_max", /* 0x67 */
- "CURLY_B_max_fail", /* 0x68 */
+ "TRIE_next", /* 0x4c */
+ "TRIE_next_fail", /* 0x4d */
+ "EVAL_AB", /* 0x4e */
+ "EVAL_AB_fail", /* 0x4f */
+ "CURLYX_end", /* 0x50 */
+ "CURLYX_end_fail", /* 0x51 */
+ "WHILEM_A_pre", /* 0x52 */
+ "WHILEM_A_pre_fail", /* 0x53 */
+ "WHILEM_A_min", /* 0x54 */
+ "WHILEM_A_min_fail", /* 0x55 */
+ "WHILEM_A_max", /* 0x56 */
+ "WHILEM_A_max_fail", /* 0x57 */
+ "WHILEM_B_min", /* 0x58 */
+ "WHILEM_B_min_fail", /* 0x59 */
+ "WHILEM_B_max", /* 0x5a */
+ "WHILEM_B_max_fail", /* 0x5b */
+ "BRANCH_next", /* 0x5c */
+ "BRANCH_next_fail", /* 0x5d */
+ "CURLYM_A", /* 0x5e */
+ "CURLYM_A_fail", /* 0x5f */
+ "CURLYM_B", /* 0x60 */
+ "CURLYM_B_fail", /* 0x61 */
+ "IFMATCH_A", /* 0x62 */
+ "IFMATCH_A_fail", /* 0x63 */
+ "CURLY_B_min_known", /* 0x64 */
+ "CURLY_B_min_known_fail", /* 0x65 */
+ "CURLY_B_min", /* 0x66 */
+ "CURLY_B_min_fail", /* 0x67 */
+ "CURLY_B_max", /* 0x68 */
+ "CURLY_B_max_fail", /* 0x69 */
};
#endif /* DEBUGGING */
#else