106 |
|
|
107 |
|
|
108 |
/* This table identifies those opcodes that are followed immediately by a |
/* This table identifies those opcodes that are followed immediately by a |
109 |
character that is to be tested in some way. This makes is possible to |
character that is to be tested in some way. This makes it possible to |
110 |
centralize the loading of these characters. In the case of Type * etc, the |
centralize the loading of these characters. In the case of Type * etc, the |
111 |
"character" is the opcode for \D, \d, \S, \s, \W, or \w, which will always be a |
"character" is the opcode for \D, \d, \S, \s, \W, or \w, which will always be a |
112 |
small value. Non-zero values in the table are the offsets from the opcode where |
small value. Non-zero values in the table are the offsets from the opcode where |
161 |
0, 0, /* RREF, NRREF */ |
0, 0, /* RREF, NRREF */ |
162 |
0, /* DEF */ |
0, /* DEF */ |
163 |
0, 0, /* BRAZERO, BRAMINZERO */ |
0, 0, /* BRAZERO, BRAMINZERO */ |
164 |
0, 0, 0, 0, /* PRUNE, SKIP, THEN, COMMIT */ |
0, 0, 0, /* MARK, PRUNE, PRUNE_ARG, */ |
165 |
0, 0, 0, 0 /* FAIL, ACCEPT, CLOSE, SKIPZERO */ |
0, 0, 0, 0, /* SKIP, SKIP_ARG, THEN, THEN_ARG, */ |
166 |
|
0, 0, 0, 0, 0 /* COMMIT, FAIL, ACCEPT, CLOSE, SKIPZERO */ |
167 |
}; |
}; |
168 |
|
|
169 |
/* This table identifies those opcodes that inspect a character. It is used to |
/* This table identifies those opcodes that inspect a character. It is used to |
219 |
0, 0, /* RREF, NRREF */ |
0, 0, /* RREF, NRREF */ |
220 |
0, /* DEF */ |
0, /* DEF */ |
221 |
0, 0, /* BRAZERO, BRAMINZERO */ |
0, 0, /* BRAZERO, BRAMINZERO */ |
222 |
0, 0, 0, 0, /* PRUNE, SKIP, THEN, COMMIT */ |
0, 0, 0, /* MARK, PRUNE, PRUNE_ARG, */ |
223 |
0, 0, 0, 0 /* FAIL, ACCEPT, CLOSE, SKIPZERO */ |
0, 0, 0, 0, /* SKIP, SKIP_ARG, THEN, THEN_ARG, */ |
224 |
|
0, 0, 0, 0, 0 /* COMMIT, FAIL, ACCEPT, CLOSE, SKIPZERO */ |
225 |
}; |
}; |
226 |
|
|
227 |
/* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W, |
/* These 2 tables allow for compact code for testing for \D, \d, \S, \s, \W, |
716 |
opcode, are not the correct length. It seems to be the only way to do |
opcode, are not the correct length. It seems to be the only way to do |
717 |
such a check at compile time, as the sizeof() operator does not work |
such a check at compile time, as the sizeof() operator does not work |
718 |
in the C preprocessor. */ |
in the C preprocessor. */ |
719 |
|
|
720 |
case OP_TABLE_LENGTH: |
case OP_TABLE_LENGTH: |
721 |
case OP_TABLE_LENGTH + |
case OP_TABLE_LENGTH + |
722 |
((sizeof(coptable) == OP_TABLE_LENGTH) && |
((sizeof(coptable) == OP_TABLE_LENGTH) && |
723 |
(sizeof(poptable) == OP_TABLE_LENGTH)): |
(sizeof(poptable) == OP_TABLE_LENGTH)): |
724 |
break; |
break; |
725 |
|
|
726 |
/* ========================================================================== */ |
/* ========================================================================== */ |
727 |
/* Reached a closing bracket. If not at the end of the pattern, carry |
/* Reached a closing bracket. If not at the end of the pattern, carry |