@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
42
42
/* The current PCRE version information. */
43
43
44
44
#define PCRE2_MAJOR 10
45
- #define PCRE2_MINOR 30
46
- #define PCRE2_PRERELEASE
47
- #define PCRE2_DATE 2017-08-14
45
+ #define PCRE2_MINOR 31
46
+ #define PCRE2_PRERELEASE
47
+ #define PCRE2_DATE 2018-02-12
48
48
49
49
/* When an application links to a PCRE DLL in Windows, the symbols that are
50
50
imported have to be identified as such. When building PCRE2, the appropriate
@@ -208,7 +208,104 @@ greater than zero. */
208
208
#define PCRE2_BSR_UNICODE 1
209
209
#define PCRE2_BSR_ANYCRLF 2
210
210
211
- /* Error codes: no match and partial match are "expected" errors. */
211
+ /* Error codes for pcre2_compile(). Some of these are also used by
212
+ pcre2_pattern_convert(). */
213
+
214
+ #define PCRE2_ERROR_END_BACKSLASH 101
215
+ #define PCRE2_ERROR_END_BACKSLASH_C 102
216
+ #define PCRE2_ERROR_UNKNOWN_ESCAPE 103
217
+ #define PCRE2_ERROR_QUANTIFIER_OUT_OF_ORDER 104
218
+ #define PCRE2_ERROR_QUANTIFIER_TOO_BIG 105
219
+ #define PCRE2_ERROR_MISSING_SQUARE_BRACKET 106
220
+ #define PCRE2_ERROR_ESCAPE_INVALID_IN_CLASS 107
221
+ #define PCRE2_ERROR_CLASS_RANGE_ORDER 108
222
+ #define PCRE2_ERROR_QUANTIFIER_INVALID 109
223
+ #define PCRE2_ERROR_INTERNAL_UNEXPECTED_REPEAT 110
224
+ #define PCRE2_ERROR_INVALID_AFTER_PARENS_QUERY 111
225
+ #define PCRE2_ERROR_POSIX_CLASS_NOT_IN_CLASS 112
226
+ #define PCRE2_ERROR_POSIX_NO_SUPPORT_COLLATING 113
227
+ #define PCRE2_ERROR_MISSING_CLOSING_PARENTHESIS 114
228
+ #define PCRE2_ERROR_BAD_SUBPATTERN_REFERENCE 115
229
+ #define PCRE2_ERROR_NULL_PATTERN 116
230
+ #define PCRE2_ERROR_BAD_OPTIONS 117
231
+ #define PCRE2_ERROR_MISSING_COMMENT_CLOSING 118
232
+ #define PCRE2_ERROR_PARENTHESES_NEST_TOO_DEEP 119
233
+ #define PCRE2_ERROR_PATTERN_TOO_LARGE 120
234
+ #define PCRE2_ERROR_HEAP_FAILED 121
235
+ #define PCRE2_ERROR_UNMATCHED_CLOSING_PARENTHESIS 122
236
+ #define PCRE2_ERROR_INTERNAL_CODE_OVERFLOW 123
237
+ #define PCRE2_ERROR_MISSING_CONDITION_CLOSING 124
238
+ #define PCRE2_ERROR_LOOKBEHIND_NOT_FIXED_LENGTH 125
239
+ #define PCRE2_ERROR_ZERO_RELATIVE_REFERENCE 126
240
+ #define PCRE2_ERROR_TOO_MANY_CONDITION_BRANCHES 127
241
+ #define PCRE2_ERROR_CONDITION_ASSERTION_EXPECTED 128
242
+ #define PCRE2_ERROR_BAD_RELATIVE_REFERENCE 129
243
+ #define PCRE2_ERROR_UNKNOWN_POSIX_CLASS 130
244
+ #define PCRE2_ERROR_INTERNAL_STUDY_ERROR 131
245
+ #define PCRE2_ERROR_UNICODE_NOT_SUPPORTED 132
246
+ #define PCRE2_ERROR_PARENTHESES_STACK_CHECK 133
247
+ #define PCRE2_ERROR_CODE_POINT_TOO_BIG 134
248
+ #define PCRE2_ERROR_LOOKBEHIND_TOO_COMPLICATED 135
249
+ #define PCRE2_ERROR_LOOKBEHIND_INVALID_BACKSLASH_C 136
250
+ #define PCRE2_ERROR_UNSUPPORTED_ESCAPE_SEQUENCE 137
251
+ #define PCRE2_ERROR_CALLOUT_NUMBER_TOO_BIG 138
252
+ #define PCRE2_ERROR_MISSING_CALLOUT_CLOSING 139
253
+ #define PCRE2_ERROR_ESCAPE_INVALID_IN_VERB 140
254
+ #define PCRE2_ERROR_UNRECOGNIZED_AFTER_QUERY_P 141
255
+ #define PCRE2_ERROR_MISSING_NAME_TERMINATOR 142
256
+ #define PCRE2_ERROR_DUPLICATE_SUBPATTERN_NAME 143
257
+ #define PCRE2_ERROR_INVALID_SUBPATTERN_NAME 144
258
+ #define PCRE2_ERROR_UNICODE_PROPERTIES_UNAVAILABLE 145
259
+ #define PCRE2_ERROR_MALFORMED_UNICODE_PROPERTY 146
260
+ #define PCRE2_ERROR_UNKNOWN_UNICODE_PROPERTY 147
261
+ #define PCRE2_ERROR_SUBPATTERN_NAME_TOO_LONG 148
262
+ #define PCRE2_ERROR_TOO_MANY_NAMED_SUBPATTERNS 149
263
+ #define PCRE2_ERROR_CLASS_INVALID_RANGE 150
264
+ #define PCRE2_ERROR_OCTAL_BYTE_TOO_BIG 151
265
+ #define PCRE2_ERROR_INTERNAL_OVERRAN_WORKSPACE 152
266
+ #define PCRE2_ERROR_INTERNAL_MISSING_SUBPATTERN 153
267
+ #define PCRE2_ERROR_DEFINE_TOO_MANY_BRANCHES 154
268
+ #define PCRE2_ERROR_BACKSLASH_O_MISSING_BRACE 155
269
+ #define PCRE2_ERROR_INTERNAL_UNKNOWN_NEWLINE 156
270
+ #define PCRE2_ERROR_BACKSLASH_G_SYNTAX 157
271
+ #define PCRE2_ERROR_PARENS_QUERY_R_MISSING_CLOSING 158
272
+ #define PCRE2_ERROR_VERB_ARGUMENT_NOT_ALLOWED 159
273
+ #define PCRE2_ERROR_VERB_UNKNOWN 160
274
+ #define PCRE2_ERROR_SUBPATTERN_NUMBER_TOO_BIG 161
275
+ #define PCRE2_ERROR_SUBPATTERN_NAME_EXPECTED 162
276
+ #define PCRE2_ERROR_INTERNAL_PARSED_OVERFLOW 163
277
+ #define PCRE2_ERROR_INVALID_OCTAL 164
278
+ #define PCRE2_ERROR_SUBPATTERN_NAMES_MISMATCH 165
279
+ #define PCRE2_ERROR_MARK_MISSING_ARGUMENT 166
280
+ #define PCRE2_ERROR_INVALID_HEXADECIMAL 167
281
+ #define PCRE2_ERROR_BACKSLASH_C_SYNTAX 168
282
+ #define PCRE2_ERROR_BACKSLASH_K_SYNTAX 169
283
+ #define PCRE2_ERROR_INTERNAL_BAD_CODE_LOOKBEHINDS 170
284
+ #define PCRE2_ERROR_BACKSLASH_N_IN_CLASS 171
285
+ #define PCRE2_ERROR_CALLOUT_STRING_TOO_LONG 172
286
+ #define PCRE2_ERROR_UNICODE_DISALLOWED_CODE_POINT 173
287
+ #define PCRE2_ERROR_UTF_IS_DISABLED 174
288
+ #define PCRE2_ERROR_UCP_IS_DISABLED 175
289
+ #define PCRE2_ERROR_VERB_NAME_TOO_LONG 176
290
+ #define PCRE2_ERROR_BACKSLASH_U_CODE_POINT_TOO_BIG 177
291
+ #define PCRE2_ERROR_MISSING_OCTAL_OR_HEX_DIGITS 178
292
+ #define PCRE2_ERROR_VERSION_CONDITION_SYNTAX 179
293
+ #define PCRE2_ERROR_INTERNAL_BAD_CODE_AUTO_POSSESS 180
294
+ #define PCRE2_ERROR_CALLOUT_NO_STRING_DELIMITER 181
295
+ #define PCRE2_ERROR_CALLOUT_BAD_STRING_DELIMITER 182
296
+ #define PCRE2_ERROR_BACKSLASH_C_CALLER_DISABLED 183
297
+ #define PCRE2_ERROR_QUERY_BARJX_NEST_TOO_DEEP 184
298
+ #define PCRE2_ERROR_BACKSLASH_C_LIBRARY_DISABLED 185
299
+ #define PCRE2_ERROR_PATTERN_TOO_COMPLICATED 186
300
+ #define PCRE2_ERROR_LOOKBEHIND_TOO_LONG 187
301
+ #define PCRE2_ERROR_PATTERN_STRING_TOO_LONG 188
302
+ #define PCRE2_ERROR_INTERNAL_BAD_CODE 189
303
+ #define PCRE2_ERROR_INTERNAL_BAD_CODE_IN_SKIP 190
304
+ #define PCRE2_ERROR_NO_SURROGATES_IN_UTF16 191
305
+ #define PCRE2_ERROR_BAD_LITERAL_OPTIONS 192
306
+
307
+
308
+ /* "Expected" matching error codes: no match and partial match. */
212
309
213
310
#define PCRE2_ERROR_NOMATCH (-1)
214
311
#define PCRE2_ERROR_PARTIAL (-2)
@@ -248,10 +345,10 @@ greater than zero. */
248
345
#define PCRE2_ERROR_UTF32_ERR1 (-27)
249
346
#define PCRE2_ERROR_UTF32_ERR2 (-28)
250
347
251
- /* Error codes for pcre2[_dfa]_match(), substring extraction functions, context
252
- functions, and serializing functions. They are in numerical order. Originally
253
- they were in alphabetical order too, but now that PCRE2 is released, the
254
- numbers must not be changed. */
348
+ /* Miscellaneous error codes for pcre2[_dfa]_match(), substring extraction
349
+ functions, context functions, and serializing functions. They are in numerical
350
+ order. Originally they were in alphabetical order too, but now that PCRE2 is
351
+ released, the numbers must not be changed. */
255
352
256
353
#define PCRE2_ERROR_BADDATA (-29)
257
354
#define PCRE2_ERROR_MIXEDTABLES (-30) /* Name was changed */
@@ -321,6 +418,7 @@ numbers must not be changed. */
321
418
#define PCRE2_INFO_HASBACKSLASHC 23
322
419
#define PCRE2_INFO_FRAMESIZE 24
323
420
#define PCRE2_INFO_HEAPLIMIT 25
421
+ #define PCRE2_INFO_EXTRAOPTIONS 26
324
422
325
423
/* Request types for pcre2_config(). */
326
424
@@ -338,6 +436,9 @@ numbers must not be changed. */
338
436
#define PCRE2_CONFIG_UNICODE_VERSION 10
339
437
#define PCRE2_CONFIG_VERSION 11
340
438
#define PCRE2_CONFIG_HEAPLIMIT 12
439
+ #define PCRE2_CONFIG_NEVER_BACKSLASH_C 13
440
+ #define PCRE2_CONFIG_COMPILED_WIDTHS 14
441
+
341
442
342
443
/* Types for code units in patterns and subject strings. */
343
444
@@ -393,6 +494,11 @@ without changing the API of the function, thereby allowing old clients to work
393
494
without modification. Define the generic version in a macro; the width-specific
394
495
versions are generated from this macro below. */
395
496
497
+ /* Flags for the callout_flags field. These are cleared after a callout. */
498
+
499
+ #define PCRE2_CALLOUT_STARTMATCH 0x00000001u /* Set for each bumpalong */
500
+ #define PCRE2_CALLOUT_BACKTRACK 0x00000002u /* Set after a backtrack */
501
+
396
502
#define PCRE2_STRUCTURE_LIST \
397
503
typedef struct pcre2_callout_block { \
398
504
uint32_t version; /* Identifies version of block */ \
@@ -412,6 +518,8 @@ typedef struct pcre2_callout_block { \
412
518
PCRE2_SIZE callout_string_offset ; /* Offset to string within pattern */ \
413
519
PCRE2_SIZE callout_string_length ; /* Length of string compiled into pattern */ \
414
520
PCRE2_SPTR callout_string ; /* String compiled into pattern */ \
521
+ /* ------------------- Added for Version 2 -------------------------- */ \
522
+ uint32_t callout_flags ; /* See above for list */ \
415
523
/* ------------------------------------------------------------------ */ \
416
524
} pcre2_callout_block ; \
417
525
\
0 commit comments