| 1209 |
/* These are escaped items that aren't just an encoding of a particular data |
/* These are escaped items that aren't just an encoding of a particular data |
| 1210 |
value such as \n. They must have non-zero values, as check_escape() returns |
value such as \n. They must have non-zero values, as check_escape() returns |
| 1211 |
their negation. Also, they must appear in the same order as in the opcode |
their negation. Also, they must appear in the same order as in the opcode |
| 1212 |
definitions below, up to ESC_z. There's a dummy for OP_ANY because it |
definitions below, up to ESC_z. There's a dummy for OP_ALLANY because it |
| 1213 |
corresponds to "." rather than an escape sequence, and another for OP_ALLANY |
corresponds to "." in DOTALL mode rather than an escape sequence. It is also |
| 1214 |
(which is used for [^] in JavaScript compatibility mode). |
used for [^] in JavaScript compatibility mode. In non-DOTALL mode, "." behaves |
| 1215 |
|
like \N. |
| 1216 |
|
|
| 1217 |
The final escape must be ESC_REF as subsequent values are used for |
The final escape must be ESC_REF as subsequent values are used for |
| 1218 |
backreferences (\1, \2, \3, etc). There are two tests in the code for an escape |
backreferences (\1, \2, \3, etc). There are two tests in the code for an escape |
| 1222 |
*/ |
*/ |
| 1223 |
|
|
| 1224 |
enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, |
enum { ESC_A = 1, ESC_G, ESC_K, ESC_B, ESC_b, ESC_D, ESC_d, ESC_S, ESC_s, |
| 1225 |
ESC_W, ESC_w, ESC_dum1, ESC_dum2, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H, |
ESC_W, ESC_w, ESC_N, ESC_dum, ESC_C, ESC_P, ESC_p, ESC_R, ESC_H, |
| 1226 |
ESC_h, ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z, ESC_E, ESC_Q, ESC_g, ESC_k, |
ESC_h, ESC_V, ESC_v, ESC_X, ESC_Z, ESC_z, ESC_E, ESC_Q, ESC_g, ESC_k, |
| 1227 |
ESC_REF }; |
ESC_REF }; |
| 1228 |
|
|
| 1250 |
OP_WHITESPACE, /* 9 \s */ |
OP_WHITESPACE, /* 9 \s */ |
| 1251 |
OP_NOT_WORDCHAR, /* 10 \W */ |
OP_NOT_WORDCHAR, /* 10 \W */ |
| 1252 |
OP_WORDCHAR, /* 11 \w */ |
OP_WORDCHAR, /* 11 \w */ |
| 1253 |
OP_ANY, /* 12 Match any character (subject to DOTALL) */ |
OP_ANY, /* 12 Match any character except newline */ |
| 1254 |
OP_ALLANY, /* 13 Match any character (not subject to DOTALL) */ |
OP_ALLANY, /* 13 Match any character */ |
| 1255 |
OP_ANYBYTE, /* 14 Match any byte (\C); different to OP_ANY for UTF-8 */ |
OP_ANYBYTE, /* 14 Match any byte (\C); different to OP_ANY for UTF-8 */ |
| 1256 |
OP_NOTPROP, /* 15 \P (not Unicode property) */ |
OP_NOTPROP, /* 15 \P (not Unicode property) */ |
| 1257 |
OP_PROP, /* 16 \p (Unicode property) */ |
OP_PROP, /* 16 \p (Unicode property) */ |