|
1 | 1 | #= |
2 | 2 | Constants for PCRE2 library API |
3 | 3 |
|
4 | | -Copyright 2018 Gandalf Software, Inc., Scott P. Jones, and contributors to pcre2.h |
| 4 | +Copyright 2018,2022 Gandalf Software, Inc., Scott P. Jones, and contributors to pcre2.h |
5 | 5 | (based on pcre2.h (copyright University of Cambridge), see PCRE2_LICENSE) |
6 | 6 | Licensed under MIT License, see LICENSE.md |
7 | 7 | =# |
@@ -49,19 +49,24 @@ const ALT_VERBNAMES = 0x00400000 # C |
49 | 49 | const USE_OFFSET_LIMIT = 0x00800000 # J M D |
50 | 50 | const EXTENDED_MORE = 0x01000000 # C |
51 | 51 | const LITERAL = 0x02000000 # C |
| 52 | +const MATCH_INVALID_UTF = 0x04000000 # J M D |
52 | 53 |
|
53 | 54 | ## An additional compile options word is available in the compile context. |
54 | 55 |
|
55 | 56 | const EXTRA_ALLOW_SURROGATE_ESCAPES = 0x00000001 # C |
56 | 57 | const EXTRA_BAD_ESCAPE_IS_LITERAL = 0x00000002 # C |
57 | 58 | const EXTRA_MATCH_WORD = 0x00000004 # C |
58 | 59 | const EXTRA_MATCH_LINE = 0x00000008 # C |
| 60 | +const EXTRA_ESCAPED_CR_IS_LF = 0x00000010 # C |
| 61 | +const EXTRA_ALT_BSUX = 0x00000020 # C |
| 62 | +const EXTRA_ALLOW_LOOKAROUND_BSK = 0x00000040 # C |
59 | 63 |
|
60 | 64 | ## These are for pcre2_jit_compile(). |
61 | 65 |
|
62 | | -const JIT_COMPLETE = 0x00000001 # For full matching */ |
| 66 | +const JIT_COMPLETE = 0x00000001 # For full matching |
63 | 67 | const JIT_PARTIAL_SOFT = 0x00000002 |
64 | 68 | const JIT_PARTIAL_HARD = 0x00000004 |
| 69 | +const JIT_INVALID_UTF = 0x00000100 |
65 | 70 |
|
66 | 71 | ## These are for pcre2_match(), pcre2_dfa_match(), and pcre2_jit_match(). |
67 | 72 | ## Note that PCRE2_ANCHORED and PCRE2_NO_UTF_CHECK can also be passed to these functions |
@@ -91,6 +96,11 @@ const SUBSTITUTE_OVERFLOW_LENGTH = 0x00001000 |
91 | 96 |
|
92 | 97 | const NO_JIT = 0x00002000 |
93 | 98 |
|
| 99 | +const COPY_MATCHED_SUBJECT = 0x00004000 |
| 100 | +const SUBSTITUTE_LITERAL = 0x00008000 # pcre2_substitute() only |
| 101 | +const SUBSTITUTE_MATCHED = 0x00010000 # pcre2_substitute() only |
| 102 | +const SUBSTITUTE_REPLACEMENT_ONLY = 0x00020000 # pcre2_substitute() only |
| 103 | + |
94 | 104 | ## Options for pattern_convert() |
95 | 105 |
|
96 | 106 | const CONVERT_UTF = 0x00000001 |
@@ -162,8 +172,8 @@ const BSR_ANYCRLF = 2 |
162 | 172 | CONFIG_VERSION, |
163 | 173 | CONFIG_HEAPLIMIT, |
164 | 174 | CONFIG_NEVER_BACKSLASH_C, |
165 | | - CONFIG_COMPILED_WIDTHS) |
166 | | - |
| 175 | + CONFIG_COMPILED_WIDTHS, |
| 176 | + CONFIG_TABLES_LENGTH) |
167 | 177 |
|
168 | 178 | # supported options for different use cases |
169 | 179 |
|
|
0 commit comments