Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/pcre2/src/pcre2_intmodedep.h
21928 views
1
/*************************************************
2
* Perl-Compatible Regular Expressions *
3
*************************************************/
4
5
/* PCRE is a library of functions to support regular expressions whose syntax
6
and semantics are as close as possible to those of the Perl 5 language.
7
8
Written by Philip Hazel
9
Original API code Copyright (c) 1997-2012 University of Cambridge
10
New API code Copyright (c) 2016-2024 University of Cambridge
11
12
-----------------------------------------------------------------------------
13
Redistribution and use in source and binary forms, with or without
14
modification, are permitted provided that the following conditions are met:
15
16
* Redistributions of source code must retain the above copyright notice,
17
this list of conditions and the following disclaimer.
18
19
* Redistributions in binary form must reproduce the above copyright
20
notice, this list of conditions and the following disclaimer in the
21
documentation and/or other materials provided with the distribution.
22
23
* Neither the name of the University of Cambridge nor the names of its
24
contributors may be used to endorse or promote products derived from
25
this software without specific prior written permission.
26
27
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
28
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
31
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37
POSSIBILITY OF SUCH DAMAGE.
38
-----------------------------------------------------------------------------
39
*/
40
41
42
/* This module contains mode-dependent macro and structure definitions. The
43
file is #included by pcre2_internal.h if PCRE2_CODE_UNIT_WIDTH is defined.
44
These mode-dependent items are kept in a separate file so that they can also be
45
#included multiple times for different code unit widths by pcre2test in order
46
to have access to the hidden structures at all supported widths.
47
48
Some of the mode-dependent macros are required at different widths for
49
different parts of the pcre2test code (in particular, the included
50
pcre2_printint_inc.h file). We undefine them here so that they can be re-defined
51
for multiple inclusions. Not all of these are used in pcre2test, but it's easier
52
just to undefine them all.
53
54
You can also include pcre2_intmodedep.h with PCRE2_CODE_UNIT_WIDTH defined to
55
zero in order to simply clear the previous macros. */
56
57
#ifndef PCRE2_CODE_UNIT_WIDTH
58
#error PCRE2_CODE_UNIT_WIDTH must be defined
59
#endif
60
61
#undef ACROSSCHAR
62
#undef BACKCHAR
63
#undef BYTES2CU
64
#undef CHMAX_255
65
#undef CU2BYTES
66
#undef FORWARDCHAR
67
#undef FORWARDCHARTEST
68
#undef GET
69
#undef GET2
70
#undef GETCHAR
71
#undef GETCHARINC
72
#undef GETCHARINCTEST
73
#undef GETCHARLEN
74
#undef GETCHARLENTEST
75
#undef GETCHARTEST
76
#undef GET_EXTRALEN
77
#undef HAS_EXTRALEN
78
#undef IMM2_SIZE
79
#undef MAX_255
80
#undef MAX_MARK
81
#undef MAX_PATTERN_SIZE
82
#undef MAX_UTF_SINGLE_CU
83
#undef NOT_FIRSTCU
84
#undef PUT
85
#undef PUT2
86
#undef PUT2INC
87
#undef PUTCHAR
88
#undef PUTINC
89
#undef TABLE_GET
90
91
/*************************************************
92
* MACROS *
93
*************************************************/
94
95
/* Macros may be undefined and re-defined if the same file handles multiple
96
bit-widths. */
97
98
#if PCRE2_CODE_UNIT_WIDTH != 0
99
100
/* PCRE keeps offsets in its compiled code as at least 16-bit quantities
101
(always stored in big-endian order in 8-bit mode) by default. These are used,
102
for example, to link from the start of a subpattern to its alternatives and its
103
end. The use of 16 bits per offset limits the size of an 8-bit compiled regex
104
to around 64K, which is big enough for almost everybody. However, I received a
105
request for an even bigger limit. For this reason, and also to make the code
106
easier to maintain, the storing and loading of offsets from the compiled code
107
unit string is now handled by the macros that are defined here.
108
109
The macros are controlled by the value of LINK_SIZE. This defaults to 2, but
110
values of 3 or 4 are also supported. */
111
112
#ifndef CONFIGURED_LINK_SIZE
113
#if LINK_SIZE == 2
114
#define CONFIGURED_LINK_SIZE 2
115
#elif LINK_SIZE == 3
116
#define CONFIGURED_LINK_SIZE 3
117
#elif LINK_SIZE == 4
118
#define CONFIGURED_LINK_SIZE 4
119
#else
120
#error LINK_SIZE must be 2, 3, or 4
121
#endif
122
#endif /* CONFIGURED_LINK_SIZE */
123
124
/* ------------------- 8-bit support ------------------ */
125
126
#if PCRE2_CODE_UNIT_WIDTH == 8
127
128
#if CONFIGURED_LINK_SIZE == 2
129
#define PUT(a,n,d) \
130
(a[n] = (PCRE2_UCHAR)((d) >> 8)), \
131
(a[(n)+1] = (PCRE2_UCHAR)((d) & 255))
132
#define GET(a,n) \
133
(unsigned int)(((a)[n] << 8) | (a)[(n)+1])
134
#define MAX_PATTERN_SIZE (1 << 16)
135
136
#elif CONFIGURED_LINK_SIZE == 3
137
#define PUT(a,n,d) \
138
(a[n] = (PCRE2_UCHAR)((d) >> 16)), \
139
(a[(n)+1] = (PCRE2_UCHAR)((d) >> 8)), \
140
(a[(n)+2] = (PCRE2_UCHAR)((d) & 255))
141
#define GET(a,n) \
142
(unsigned int)(((a)[n] << 16) | ((a)[(n)+1] << 8) | (a)[(n)+2])
143
#define MAX_PATTERN_SIZE (1 << 24)
144
145
#elif CONFIGURED_LINK_SIZE == 4
146
#define PUT(a,n,d) \
147
(a[n] = (PCRE2_UCHAR)((d) >> 24)), \
148
(a[(n)+1] = (PCRE2_UCHAR)((d) >> 16)), \
149
(a[(n)+2] = (PCRE2_UCHAR)((d) >> 8)), \
150
(a[(n)+3] = (PCRE2_UCHAR)((d) & 255))
151
#define GET(a,n) \
152
(unsigned int)(((a)[n] << 24) | ((a)[(n)+1] << 16) | ((a)[(n)+2] << 8) | (a)[(n)+3])
153
#define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */
154
155
#endif
156
157
158
/* ------------------- 16-bit support ------------------ */
159
160
#elif PCRE2_CODE_UNIT_WIDTH == 16
161
162
#if CONFIGURED_LINK_SIZE == 2
163
#undef LINK_SIZE
164
#define LINK_SIZE 1
165
#define PUT(a,n,d) \
166
(a[n] = (PCRE2_UCHAR)(d))
167
#define GET(a,n) \
168
(a[n])
169
#define MAX_PATTERN_SIZE (1 << 16)
170
171
#elif CONFIGURED_LINK_SIZE == 3 || CONFIGURED_LINK_SIZE == 4
172
#undef LINK_SIZE
173
#define LINK_SIZE 2
174
#define PUT(a,n,d) \
175
(a[n] = (PCRE2_UCHAR)((d) >> 16)), \
176
(a[(n)+1] = (PCRE2_UCHAR)((d) & 65535))
177
#define GET(a,n) \
178
(unsigned int)(((a)[n] << 16) | (a)[(n)+1])
179
#define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */
180
181
#endif
182
183
184
/* ------------------- 32-bit support ------------------ */
185
186
#elif PCRE2_CODE_UNIT_WIDTH == 32
187
#undef LINK_SIZE
188
#define LINK_SIZE 1
189
#define PUT(a,n,d) \
190
(a[n] = (d))
191
#define GET(a,n) \
192
(a[n])
193
#define MAX_PATTERN_SIZE (1 << 30) /* Keep it positive */
194
195
#else
196
#error Unsupported compiling mode
197
#endif
198
199
200
/* --------------- Other mode-specific macros ----------------- */
201
202
/* PCRE uses some other (at least) 16-bit quantities that do not change when
203
the size of offsets changes. There are used for repeat counts and for other
204
things such as capturing parenthesis numbers in back references.
205
206
Define the number of code units required to hold a 16-bit count/offset, and
207
macros to load and store such a value. For reasons that I do not understand,
208
the expression in the 8-bit GET2 macro is treated by gcc as a signed
209
expression, even when a is declared as unsigned. It seems that any kind of
210
arithmetic results in a signed value. Hence the cast. */
211
212
#if PCRE2_CODE_UNIT_WIDTH == 8
213
#define IMM2_SIZE 2
214
#define GET2(a,n) (unsigned int)(((a)[n] << 8) | (a)[(n)+1])
215
#define PUT2(a,n,d) a[n] = (d) >> 8, a[(n)+1] = (d) & 255
216
217
#elif PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
218
#define IMM2_SIZE 1
219
#define GET2(a,n) a[n]
220
#define PUT2(a,n,d) a[n] = d
221
#endif
222
223
/* Other macros that are different for 8-bit mode. The MAX_255 macro checks
224
whether its argument, which is assumed to be one code unit, is less than 256.
225
The CHMAX_255 macro does not assume one code unit. The maximum length of a MARK
226
name must fit in one code unit; currently it is set to 255 or 65535. The
227
TABLE_GET macro is used to access elements of tables containing exactly 256
228
items. Its argument is a code unit. When code points can be greater than 255, a
229
check is needed before accessing these tables. */
230
231
#if PCRE2_CODE_UNIT_WIDTH == 8
232
#define MAX_255(c) TRUE
233
#define MAX_MARK ((1u << 8) - 1)
234
#define TABLE_GET(c, table, default) ((table)[c])
235
#ifdef SUPPORT_UNICODE
236
#define SUPPORT_WIDE_CHARS
237
#define CHMAX_255(c) ((c) <= 255u)
238
#else
239
#define CHMAX_255(c) TRUE
240
#endif /* SUPPORT_UNICODE */
241
242
#elif PCRE2_CODE_UNIT_WIDTH == 16 || PCRE2_CODE_UNIT_WIDTH == 32
243
#define CHMAX_255(c) ((c) <= 255u)
244
#define MAX_255(c) ((c) <= 255u)
245
#define MAX_MARK ((1u << 16) - 1)
246
#define SUPPORT_WIDE_CHARS
247
#define TABLE_GET(c, table, default) (MAX_255(c)? ((table)[c]):(default))
248
#endif
249
250
251
/* ----------------- Character-handling macros ----------------- */
252
253
/* There is a proposed future special "UTF-21" mode, in which only the lowest
254
21 bits of a 32-bit character are interpreted as UTF, with the remaining 11
255
high-order bits available to the application for other uses. In preparation for
256
the future implementation of this mode, there are macros that load a data item
257
and, if in this special mode, mask it to 21 bits. These macros all have names
258
starting with UCHAR21. In all other modes, including the normal 32-bit
259
library, the macros all have the same simple definitions. When the new mode is
260
implemented, it is expected that these definitions will be varied appropriately
261
using #ifdef when compiling the library that supports the special mode. */
262
263
#define UCHAR21(eptr) (*(eptr))
264
#define UCHAR21TEST(eptr) (*(eptr))
265
#define UCHAR21INC(eptr) (*(eptr)++)
266
#define UCHAR21INCTEST(eptr) (*(eptr)++)
267
268
/* When UTF encoding is being used, a character is no longer just a single
269
byte in 8-bit mode or a single short in 16-bit mode. The macros for character
270
handling generate simple sequences when used in the basic mode, and more
271
complicated ones for UTF characters. GETCHARLENTEST and other macros are not
272
used when UTF is not supported. To make sure they can never even appear when
273
UTF support is omitted, we don't even define them. */
274
275
#ifndef SUPPORT_UNICODE
276
277
/* #define MAX_UTF_SINGLE_CU */
278
/* #define HAS_EXTRALEN(c) */
279
/* #define GET_EXTRALEN(c) */
280
/* #define NOT_FIRSTCU(c) */
281
#define GETCHAR(c, eptr) c = *eptr;
282
#define GETCHARTEST(c, eptr) c = *eptr;
283
#define GETCHARINC(c, eptr) c = *eptr++;
284
#define GETCHARINCTEST(c, eptr) c = *eptr++;
285
#define GETCHARLEN(c, eptr, len) c = *eptr;
286
#define PUTCHAR(c, p) (*p = c, 1)
287
/* #define GETCHARLENTEST(c, eptr, len) */
288
/* #define BACKCHAR(eptr) */
289
/* #define FORWARDCHAR(eptr) */
290
/* #define FORWARCCHARTEST(eptr,end) */
291
/* #define ACROSSCHAR(condition, eptr, action) */
292
293
#else /* SUPPORT_UNICODE */
294
295
/* ------------------- 8-bit support ------------------ */
296
297
#if PCRE2_CODE_UNIT_WIDTH == 8
298
#define MAYBE_UTF_MULTI /* UTF chars may use multiple code units */
299
300
/* The largest UTF code point that can be encoded as a single code unit. */
301
302
#define MAX_UTF_SINGLE_CU 127
303
304
/* Tests whether the code point needs extra characters to decode. */
305
306
#define HAS_EXTRALEN(c) HASUTF8EXTRALEN(c)
307
308
/* Returns with the additional number of characters if HAS_EXTRALEN(c) is TRUE.
309
Otherwise it has an undefined behaviour. */
310
311
#define GET_EXTRALEN(c) (PRIV(utf8_table4)[(c) & 0x3fu])
312
313
/* Returns TRUE, if the given value is not the first code unit of a UTF
314
sequence. */
315
316
#define NOT_FIRSTCU(c) (((c) & 0xc0u) == 0x80u)
317
318
/* Get the next UTF-8 character, not advancing the pointer. This is called when
319
we know we are in UTF-8 mode. */
320
321
#define GETCHAR(c, eptr) \
322
c = *eptr; \
323
if (c >= 0xc0u) GETUTF8(c, eptr);
324
325
/* Get the next UTF-8 character, testing for UTF-8 mode, and not advancing the
326
pointer. */
327
328
#define GETCHARTEST(c, eptr) \
329
c = *eptr; \
330
if (utf && c >= 0xc0u) GETUTF8(c, eptr);
331
332
/* Get the next UTF-8 character, advancing the pointer. This is called when we
333
know we are in UTF-8 mode. */
334
335
#define GETCHARINC(c, eptr) \
336
c = *eptr++; \
337
if (c >= 0xc0u) GETUTF8INC(c, eptr);
338
339
/* Get the next character, testing for UTF-8 mode, and advancing the pointer.
340
This is called when we don't know if we are in UTF-8 mode. */
341
342
#define GETCHARINCTEST(c, eptr) \
343
c = *eptr++; \
344
if (utf && c >= 0xc0u) GETUTF8INC(c, eptr);
345
346
/* Get the next UTF-8 character, not advancing the pointer, incrementing length
347
if there are extra bytes. This is called when we know we are in UTF-8 mode. */
348
349
#define GETCHARLEN(c, eptr, len) \
350
c = *eptr; \
351
if (c >= 0xc0u) GETUTF8LEN(c, eptr, len);
352
353
/* Get the next UTF-8 character, testing for UTF-8 mode, not advancing the
354
pointer, incrementing length if there are extra bytes. This is called when we
355
do not know if we are in UTF-8 mode. */
356
357
#define GETCHARLENTEST(c, eptr, len) \
358
c = *eptr; \
359
if (utf && c >= 0xc0u) GETUTF8LEN(c, eptr, len);
360
361
/* If the pointer is not at the start of a character, move it back until
362
it is. This is called only in UTF-8 mode - we don't put a test within the macro
363
because almost all calls are already within a block of UTF-8 only code. */
364
365
#define BACKCHAR(eptr) while((*eptr & 0xc0u) == 0x80u) eptr--
366
367
/* Same as above, just in the other direction. */
368
#define FORWARDCHAR(eptr) while((*eptr & 0xc0u) == 0x80u) eptr++
369
#define FORWARDCHARTEST(eptr,end) while(eptr < end && (*eptr & 0xc0u) == 0x80u) eptr++
370
371
/* Same as above, but it allows a fully customizable form. */
372
#define ACROSSCHAR(condition, eptr, action) \
373
while((condition) && ((*eptr) & 0xc0u) == 0x80u) action
374
375
/* Deposit a character into memory, returning the number of code units. */
376
377
#define PUTCHAR(c, p) ((utf && c > MAX_UTF_SINGLE_CU)? \
378
PRIV(ord2utf)(c,p) : (*p = c, 1))
379
380
381
/* ------------------- 16-bit support ------------------ */
382
383
#elif PCRE2_CODE_UNIT_WIDTH == 16
384
#define MAYBE_UTF_MULTI /* UTF chars may use multiple code units */
385
386
/* The largest UTF code point that can be encoded as a single code unit. */
387
388
#define MAX_UTF_SINGLE_CU 65535
389
390
/* Tests whether the code point needs extra characters to decode. */
391
392
#define HAS_EXTRALEN(c) (((c) & 0xfc00u) == 0xd800u)
393
394
/* Returns with the additional number of characters if HAS_EXTRALEN(c) is TRUE.
395
Otherwise it has an undefined behaviour. */
396
397
#define GET_EXTRALEN(c) 1
398
399
/* Returns TRUE, if the given value is not the first code unit of a UTF
400
sequence. */
401
402
#define NOT_FIRSTCU(c) (((c) & 0xfc00u) == 0xdc00u)
403
404
/* Base macro to pick up the low surrogate of a UTF-16 character, not
405
advancing the pointer. */
406
407
#define GETUTF16(c, eptr) \
408
{ c = (((c & 0x3ffu) << 10) | (eptr[1] & 0x3ffu)) + 0x10000u; }
409
410
/* Get the next UTF-16 character, not advancing the pointer. This is called when
411
we know we are in UTF-16 mode. */
412
413
#define GETCHAR(c, eptr) \
414
c = *eptr; \
415
if ((c & 0xfc00u) == 0xd800u) GETUTF16(c, eptr);
416
417
/* Get the next UTF-16 character, testing for UTF-16 mode, and not advancing the
418
pointer. */
419
420
#define GETCHARTEST(c, eptr) \
421
c = *eptr; \
422
if (utf && (c & 0xfc00u) == 0xd800u) GETUTF16(c, eptr);
423
424
/* Base macro to pick up the low surrogate of a UTF-16 character, advancing
425
the pointer. */
426
427
#define GETUTF16INC(c, eptr) \
428
{ c = (((c & 0x3ffu) << 10) | (*eptr++ & 0x3ffu)) + 0x10000u; }
429
430
/* Get the next UTF-16 character, advancing the pointer. This is called when we
431
know we are in UTF-16 mode. */
432
433
#define GETCHARINC(c, eptr) \
434
c = *eptr++; \
435
if ((c & 0xfc00u) == 0xd800u) GETUTF16INC(c, eptr);
436
437
/* Get the next character, testing for UTF-16 mode, and advancing the pointer.
438
This is called when we don't know if we are in UTF-16 mode. */
439
440
#define GETCHARINCTEST(c, eptr) \
441
c = *eptr++; \
442
if (utf && (c & 0xfc00u) == 0xd800u) GETUTF16INC(c, eptr);
443
444
/* Base macro to pick up the low surrogate of a UTF-16 character, not
445
advancing the pointer, incrementing the length. */
446
447
#define GETUTF16LEN(c, eptr, len) \
448
{ c = (((c & 0x3ffu) << 10) | (eptr[1] & 0x3ffu)) + 0x10000u; len++; }
449
450
/* Get the next UTF-16 character, not advancing the pointer, incrementing
451
length if there is a low surrogate. This is called when we know we are in
452
UTF-16 mode. */
453
454
#define GETCHARLEN(c, eptr, len) \
455
c = *eptr; \
456
if ((c & 0xfc00u) == 0xd800u) GETUTF16LEN(c, eptr, len);
457
458
/* Get the next UTF-16 character, testing for UTF-16 mode, not advancing the
459
pointer, incrementing length if there is a low surrogate. This is called when
460
we do not know if we are in UTF-16 mode. */
461
462
#define GETCHARLENTEST(c, eptr, len) \
463
c = *eptr; \
464
if (utf && (c & 0xfc00u) == 0xd800u) GETUTF16LEN(c, eptr, len);
465
466
/* If the pointer is not at the start of a character, move it back until
467
it is. This is called only in UTF-16 mode - we don't put a test within the
468
macro because almost all calls are already within a block of UTF-16 only
469
code. */
470
471
#define BACKCHAR(eptr) if ((*eptr & 0xfc00u) == 0xdc00u) eptr--
472
473
/* Same as above, just in the other direction. */
474
#define FORWARDCHAR(eptr) if ((*eptr & 0xfc00u) == 0xdc00u) eptr++
475
#define FORWARDCHARTEST(eptr,end) if (eptr < end && (*eptr & 0xfc00u) == 0xdc00u) eptr++
476
477
/* Same as above, but it allows a fully customizable form. */
478
#define ACROSSCHAR(condition, eptr, action) \
479
if ((condition) && ((*eptr) & 0xfc00u) == 0xdc00u) action
480
481
/* Deposit a character into memory, returning the number of code units. */
482
483
#define PUTCHAR(c, p) ((utf && c > MAX_UTF_SINGLE_CU)? \
484
PRIV(ord2utf)(c,p) : (*p = c, 1))
485
486
487
/* ------------------- 32-bit support ------------------ */
488
489
#elif PCRE2_CODE_UNIT_WIDTH == 32
490
491
/* These are trivial for the 32-bit library, since all UTF-32 characters fit
492
into one PCRE2_UCHAR unit. */
493
494
#define MAX_UTF_SINGLE_CU (0x10ffffu)
495
#define HAS_EXTRALEN(c) (0)
496
#define GET_EXTRALEN(c) (0)
497
#define NOT_FIRSTCU(c) (0)
498
499
/* Get the next UTF-32 character, not advancing the pointer. This is called when
500
we know we are in UTF-32 mode. */
501
502
#define GETCHAR(c, eptr) \
503
c = *(eptr);
504
505
/* Get the next UTF-32 character, testing for UTF-32 mode, and not advancing the
506
pointer. */
507
508
#define GETCHARTEST(c, eptr) \
509
c = *(eptr);
510
511
/* Get the next UTF-32 character, advancing the pointer. This is called when we
512
know we are in UTF-32 mode. */
513
514
#define GETCHARINC(c, eptr) \
515
c = *((eptr)++);
516
517
/* Get the next character, testing for UTF-32 mode, and advancing the pointer.
518
This is called when we don't know if we are in UTF-32 mode. */
519
520
#define GETCHARINCTEST(c, eptr) \
521
c = *((eptr)++);
522
523
/* Get the next UTF-32 character, not advancing the pointer, not incrementing
524
length (since all UTF-32 is of length 1). This is called when we know we are in
525
UTF-32 mode. */
526
527
#define GETCHARLEN(c, eptr, len) \
528
GETCHAR(c, eptr)
529
530
/* Get the next UTF-32character, testing for UTF-32 mode, not advancing the
531
pointer, not incrementing the length (since all UTF-32 is of length 1).
532
This is called when we do not know if we are in UTF-32 mode. */
533
534
#define GETCHARLENTEST(c, eptr, len) \
535
GETCHARTEST(c, eptr)
536
537
/* If the pointer is not at the start of a character, move it back until
538
it is. This is called only in UTF-32 mode - we don't put a test within the
539
macro because almost all calls are already within a block of UTF-32 only
540
code.
541
542
These are all no-ops since all UTF-32 characters fit into one PCRE2_UCHAR. */
543
544
#define BACKCHAR(eptr) do { } while (0)
545
546
/* Same as above, just in the other direction. */
547
548
#define FORWARDCHAR(eptr) do { } while (0)
549
#define FORWARDCHARTEST(eptr,end) do { } while (0)
550
551
/* Same as above, but it allows a fully customizable form. */
552
553
#define ACROSSCHAR(condition, eptr, action) do { } while (0)
554
555
/* Deposit a character into memory, returning the number of code units. */
556
557
#define PUTCHAR(c, p) (*p = c, 1)
558
559
#endif /* UTF-32 character handling */
560
#endif /* SUPPORT_UNICODE */
561
562
563
/* Mode-dependent macros that have the same definition in all modes. */
564
565
#define CU2BYTES(x) ((x)*((PCRE2_CODE_UNIT_WIDTH/8)))
566
#define BYTES2CU(x) ((x)/((PCRE2_CODE_UNIT_WIDTH/8)))
567
#define PUTINC(a,n,d) PUT(a,n,d), a += LINK_SIZE
568
#define PUT2INC(a,n,d) PUT2(a,n,d), a += IMM2_SIZE
569
570
#endif /* PCRE2_CODE_UNIT_WIDTH != 0 */
571
572
573
574
/*************************************************
575
* STRUCTURES *
576
*************************************************/
577
578
/* We need a more complex include guard than usual, because the file can be
579
included once for each bit-width to define the various structures. */
580
581
#if PCRE2_CODE_UNIT_WIDTH == 8 && !defined PCRE2_INTMODEDEP_IDEMPOTENT_GUARD_8
582
#define PCRE2_INTMODEDEP_IDEMPOTENT_GUARD_8
583
#define PCRE2_INTMODEDEP_CAN_DEFINE
584
#endif
585
#if PCRE2_CODE_UNIT_WIDTH == 16 && !defined PCRE2_INTMODEDEP_IDEMPOTENT_GUARD_16
586
#define PCRE2_INTMODEDEP_IDEMPOTENT_GUARD_16
587
#define PCRE2_INTMODEDEP_CAN_DEFINE
588
#endif
589
#if PCRE2_CODE_UNIT_WIDTH == 32 && !defined PCRE2_INTMODEDEP_IDEMPOTENT_GUARD_32
590
#define PCRE2_INTMODEDEP_IDEMPOTENT_GUARD_32
591
#define PCRE2_INTMODEDEP_CAN_DEFINE
592
#endif
593
594
#ifdef PCRE2_INTMODEDEP_CAN_DEFINE
595
#undef PCRE2_INTMODEDEP_CAN_DEFINE
596
597
/* ----------------------- HIDDEN STRUCTURES ----------------------------- */
598
599
/* NOTE: All these structures *must* start with a pcre2_memctl structure. The
600
code that uses them is simpler because it assumes this. */
601
602
/* The real general context structure. At present it holds only data for custom
603
memory control. */
604
605
/* WARNING: if this is ever changed, code in pcre2_substitute.c will have to be
606
changed because it builds a general context "by hand" in order to avoid the
607
malloc() call in pcre2_general_context)_create(). There is also code in
608
pcre2_match.c that makes the same assumption. */
609
610
typedef struct pcre2_real_general_context {
611
pcre2_memctl memctl;
612
} pcre2_real_general_context;
613
614
/* The real compile context structure */
615
616
typedef struct pcre2_real_compile_context {
617
pcre2_memctl memctl;
618
int (*stack_guard)(uint32_t, void *);
619
void *stack_guard_data;
620
const uint8_t *tables;
621
PCRE2_SIZE max_pattern_length;
622
PCRE2_SIZE max_pattern_compiled_length;
623
uint16_t bsr_convention;
624
uint16_t newline_convention;
625
uint32_t parens_nest_limit;
626
uint32_t extra_options;
627
uint32_t max_varlookbehind;
628
uint32_t optimization_flags;
629
} pcre2_real_compile_context;
630
631
/* The real match context structure. */
632
633
typedef struct pcre2_real_match_context {
634
pcre2_memctl memctl;
635
#ifdef SUPPORT_JIT
636
pcre2_jit_callback jit_callback;
637
void *jit_callback_data;
638
#endif
639
int (*callout)(pcre2_callout_block *, void *);
640
void *callout_data;
641
int (*substitute_callout)(pcre2_substitute_callout_block *, void *);
642
void *substitute_callout_data;
643
PCRE2_SIZE (*substitute_case_callout)(PCRE2_SPTR, PCRE2_SIZE, PCRE2_UCHAR *,
644
PCRE2_SIZE, int, void *);
645
void *substitute_case_callout_data;
646
PCRE2_SIZE offset_limit;
647
uint32_t heap_limit;
648
uint32_t match_limit;
649
uint32_t depth_limit;
650
} pcre2_real_match_context;
651
652
/* The real convert context structure. */
653
654
typedef struct pcre2_real_convert_context {
655
pcre2_memctl memctl;
656
uint32_t glob_separator;
657
uint32_t glob_escape;
658
} pcre2_real_convert_context;
659
660
/* The real compiled code structure. The type for the blocksize field is
661
defined specially because it is required in pcre2_serialize_decode() when
662
copying the size from possibly unaligned memory into a variable of the same
663
type. Use a macro rather than a typedef to avoid compiler warnings when this
664
file is included multiple times by pcre2test. LOOKBEHIND_MAX specifies the
665
largest lookbehind that is supported. (OP_REVERSE and OP_VREVERSE in a pattern
666
have 16-bit arguments in 8-bit and 16-bit modes, so we need no more than a
667
16-bit field here.) */
668
669
#undef CODE_BLOCKSIZE_TYPE
670
#define CODE_BLOCKSIZE_TYPE PCRE2_SIZE
671
672
#undef LOOKBEHIND_MAX
673
#define LOOKBEHIND_MAX ((int)UINT16_MAX)
674
675
typedef struct pcre2_real_code {
676
pcre2_memctl memctl; /* Memory control fields */
677
const uint8_t *tables; /* The character tables */
678
void *executable_jit; /* Pointer to JIT code */
679
uint8_t start_bitmap[32]; /* Bitmap for starting code unit < 256 */
680
CODE_BLOCKSIZE_TYPE blocksize; /* Total (bytes) that was malloc-ed */
681
CODE_BLOCKSIZE_TYPE code_start; /* Byte code start offset */
682
uint32_t magic_number; /* Paranoid and endianness check */
683
uint32_t compile_options; /* Options passed to pcre2_compile() */
684
uint32_t overall_options; /* Options after processing the pattern */
685
uint32_t extra_options; /* Taken from compile_context */
686
uint32_t flags; /* Various state flags */
687
uint32_t limit_heap; /* Limit set in the pattern */
688
uint32_t limit_match; /* Limit set in the pattern */
689
uint32_t limit_depth; /* Limit set in the pattern */
690
uint32_t first_codeunit; /* Starting code unit */
691
uint32_t last_codeunit; /* This codeunit must be seen */
692
uint16_t bsr_convention; /* What \R matches */
693
uint16_t newline_convention; /* What is a newline? */
694
uint16_t max_lookbehind; /* Longest lookbehind (characters) */
695
uint16_t minlength; /* Minimum length of match */
696
uint16_t top_bracket; /* Highest numbered group */
697
uint16_t top_backref; /* Highest numbered back reference */
698
uint16_t name_entry_size; /* Size (code units) of table entries */
699
uint16_t name_count; /* Number of name entries in the table */
700
uint32_t optimization_flags; /* Optimizations enabled at compile time */
701
} pcre2_real_code;
702
703
/* The real match data structure. Define ovector as large as it can ever
704
actually be so that array bound checkers don't grumble. Memory for this
705
structure is obtained by calling pcre2_match_data_create(), which sets the size
706
as the offset of ovector plus a pair of elements for each capturable string, so
707
the size varies from call to call. As the maximum number of capturing
708
subpatterns is 65535 we must allow for 65536 strings to include the overall
709
match. (See also the heapframe structure below.) */
710
711
struct heapframe; /* Forward reference */
712
713
typedef struct pcre2_real_match_data {
714
pcre2_memctl memctl; /* Memory control fields */
715
const pcre2_real_code *code; /* The pattern used for the match */
716
PCRE2_SPTR subject; /* The subject that was matched */
717
PCRE2_SPTR mark; /* Pointer to last mark */
718
struct heapframe *heapframes; /* Backtracking frames heap memory */
719
PCRE2_SIZE heapframes_size; /* Malloc-ed size */
720
PCRE2_SIZE subject_length; /* Subject length */
721
PCRE2_SIZE start_offset; /* Offset to start of search */
722
PCRE2_SIZE leftchar; /* Offset to leftmost code unit */
723
PCRE2_SIZE rightchar; /* Offset to rightmost code unit */
724
PCRE2_SIZE startchar; /* Offset to starting code unit */
725
uint8_t matchedby; /* Type of match (normal, JIT, DFA) */
726
uint8_t flags; /* Various flags */
727
uint16_t oveccount; /* Number of pairs */
728
uint32_t options; /* Options passed in to the match call */
729
int rc; /* The return code from the match */
730
PCRE2_SIZE ovector[131072]; /* Must be last in the structure */
731
} pcre2_real_match_data;
732
733
734
/* ----------------------- PRIVATE STRUCTURES ----------------------------- */
735
736
/* These structures are not needed for pcre2test. */
737
738
#ifndef PCRE2_PCRE2TEST
739
740
/* Structures for checking for mutual function recursion when scanning compiled
741
or parsed code. */
742
743
typedef struct recurse_check {
744
struct recurse_check *prev;
745
PCRE2_SPTR group;
746
} recurse_check;
747
748
typedef struct parsed_recurse_check {
749
struct parsed_recurse_check *prev;
750
uint32_t *groupptr;
751
} parsed_recurse_check;
752
753
/* Structure for building a cache when filling in pattern recursion offsets. */
754
755
typedef struct recurse_cache {
756
PCRE2_SPTR group;
757
int groupnumber;
758
} recurse_cache;
759
760
/* Structure for maintaining a chain of pointers to the currently incomplete
761
branches, for testing for left recursion while compiling. */
762
763
typedef struct branch_chain {
764
struct branch_chain *outer;
765
PCRE2_UCHAR *current_branch;
766
} branch_chain;
767
768
/* Structure for building a list of named groups during the first pass of
769
compiling. When a duplicate name is stored in the list, its name is set to
770
the name of the first entry with the same name, and its length is set to 0. */
771
772
typedef struct named_group {
773
PCRE2_SPTR name; /* Points to the name in the pattern */
774
uint32_t number; /* Group number */
775
uint16_t length; /* Length of the name */
776
uint16_t hash_dup; /* A concatenation of a 15 bit hash code and
777
a singe bit which represents duplication */
778
} named_group;
779
780
/* Structure for storing compile time data. */
781
782
typedef struct compile_data {
783
struct compile_data *next; /* Next compile data */
784
#ifdef PCRE2_DEBUG
785
uint8_t type; /* Debug only type of the data */
786
#endif
787
} compile_data;
788
789
/* Structure for caching sorted ranges. This improves the performance
790
of translating META code to byte code. */
791
792
typedef struct class_ranges {
793
compile_data header; /* Common header */
794
size_t char_lists_size; /* Total size of encoded char lists */
795
size_t char_lists_start; /* Start offset of encoded char lists */
796
uint16_t range_list_size; /* Size of ranges array */
797
uint16_t char_lists_types; /* The XCL_LIST header of char lists */
798
/* Followed by the list of ranges (start/end pairs) */
799
} class_ranges;
800
801
/* Structure for sorted recurse arguments. */
802
803
typedef struct recurse_arguments {
804
compile_data header; /* Common header */
805
size_t size; /* Total size */
806
size_t skip_size; /* Space consumed by arguments */
807
} recurse_arguments;
808
809
typedef union class_bits_storage {
810
uint8_t classbits[32];
811
uint32_t classwords[8];
812
} class_bits_storage;
813
814
/* Structure for passing "static" information around between the functions
815
doing the compiling, so that they are thread-safe. */
816
817
typedef struct compile_block {
818
pcre2_real_compile_context *cx; /* Points to the compile context */
819
const uint8_t *lcc; /* Points to lower casing table */
820
const uint8_t *fcc; /* Points to case-flipping table */
821
const uint8_t *cbits; /* Points to character type table */
822
const uint8_t *ctypes; /* Points to table of type maps */
823
PCRE2_UCHAR *start_workspace; /* The start of working space */
824
PCRE2_UCHAR *start_code; /* The start of the compiled code */
825
PCRE2_SPTR start_pattern; /* The start of the pattern */
826
PCRE2_SPTR end_pattern; /* The end of the pattern */
827
PCRE2_UCHAR *name_table; /* The name/number table */
828
PCRE2_SIZE workspace_size; /* Size of workspace */
829
PCRE2_SIZE small_ref_offset[10]; /* Offsets for \1 to \9 */
830
PCRE2_SIZE erroroffset; /* Offset of error in pattern */
831
class_bits_storage classbits; /* Temporary store for classbits */
832
uint16_t names_found; /* Number of entries so far */
833
uint16_t name_entry_size; /* Size of each entry */
834
uint16_t parens_depth; /* Depth of nested parentheses */
835
uint16_t assert_depth; /* Depth of nested assertions */
836
named_group *named_groups; /* Points to vector in pre-compile */
837
uint32_t named_group_list_size; /* Number of entries in the list */
838
uint32_t external_options; /* External (initial) options */
839
uint32_t external_flags; /* External flag bits to be set */
840
uint32_t bracount; /* Count of capturing parentheses */
841
uint32_t lastcapture; /* Last capture encountered */
842
uint32_t *parsed_pattern; /* Parsed pattern buffer */
843
uint32_t *parsed_pattern_end; /* Parsed pattern should not get here */
844
uint32_t *groupinfo; /* Group info vector */
845
uint32_t top_backref; /* Maximum back reference */
846
uint32_t backref_map; /* Bitmap of low back refs */
847
uint32_t nltype; /* Newline type */
848
uint32_t nllen; /* Newline string length */
849
PCRE2_UCHAR nl[4]; /* Newline string when fixed length */
850
uint8_t class_op_used[ECLASS_NEST_LIMIT]; /* Operation used for
851
extended classes */
852
uint32_t req_varyopt; /* "After variable item" flag for reqbyte */
853
uint32_t max_varlookbehind; /* Limit for variable lookbehinds */
854
int max_lookbehind; /* Maximum lookbehind encountered (characters) */
855
BOOL had_accept; /* (*ACCEPT) encountered */
856
BOOL had_pruneorskip; /* (*PRUNE) or (*SKIP) encountered */
857
BOOL had_recurse; /* Had a pattern recursion or subroutine call */
858
BOOL dupnames; /* Duplicate names exist */
859
compile_data *first_data; /* First item in the compile data list */
860
compile_data *last_data; /* Last item in the compile data list */
861
#ifdef SUPPORT_WIDE_CHARS
862
size_t char_lists_size; /* Current size of character lists */
863
#endif
864
} compile_block;
865
866
/* Structure for keeping the properties of the in-memory stack used
867
by the JIT matcher. */
868
869
typedef struct pcre2_real_jit_stack {
870
pcre2_memctl memctl;
871
void* stack;
872
} pcre2_real_jit_stack;
873
874
/* Structure for items in a linked list that represents an explicit recursive
875
call within the pattern when running pcre2_dfa_match(). */
876
877
typedef struct dfa_recursion_info {
878
struct dfa_recursion_info *prevrec;
879
PCRE2_SPTR subject_position;
880
PCRE2_SPTR last_used_ptr;
881
uint32_t group_num;
882
} dfa_recursion_info;
883
884
/* Structure for "stack" frames that are used for remembering backtracking
885
positions during matching. As these are used in a vector, with the ovector item
886
being extended, the size of the structure must be a multiple of PCRE2_SIZE. The
887
only way to check this at compile time is to force an error by generating an
888
array with a negative size. By putting this in a typedef (which is never used),
889
we don't generate any code when all is well. */
890
891
typedef struct heapframe {
892
893
/* The first set of fields are variables that have to be preserved over calls
894
to RRMATCH(), but which do not need to be copied to new frames. */
895
896
PCRE2_SPTR ecode; /* The current position in the pattern */
897
PCRE2_SPTR temp_sptr[2]; /* Used for short-term PCRE2_SPTR values */
898
PCRE2_SIZE length; /* Used for character, string, or code lengths */
899
PCRE2_SIZE back_frame; /* Amount to subtract on RRETURN */
900
PCRE2_SIZE temp_size; /* Used for short-term PCRE2_SIZE values */
901
uint32_t rdepth; /* Function "recursion" depth within pcre2_match() */
902
uint32_t group_frame_type; /* Type information for group frames */
903
uint32_t temp_32[4]; /* Used for short-term 32-bit or BOOL values */
904
uint8_t return_id; /* Where to go on in internal "return" */
905
uint8_t op; /* Processing opcode */
906
907
/* At this point, the structure is 16-bit aligned. On most architectures
908
the alignment requirement for a pointer will ensure that the eptr field below
909
is 32-bit or 64-bit aligned. However, on m68k it is fine to have a pointer
910
that is 16-bit aligned. We must therefore ensure that what comes between here
911
and eptr is an odd multiple of 16 bits so as to get back into 32-bit
912
alignment. This happens naturally when PCRE2_UCHAR is 8 bits wide, but needs
913
fudges in the other cases. In the 32-bit case the padding comes first so that
914
the occu field itself is 32-bit aligned. Without the padding, this structure
915
is no longer a multiple of PCRE2_SIZE on m68k, and the check below fails. */
916
917
#if PCRE2_CODE_UNIT_WIDTH == 8
918
PCRE2_UCHAR occu[6]; /* Used for other case code units */
919
#elif PCRE2_CODE_UNIT_WIDTH == 16
920
PCRE2_UCHAR occu[2]; /* Used for other case code units */
921
uint8_t unused[2]; /* Ensure 32-bit alignment (see above) */
922
#else
923
uint8_t unused[2]; /* Ensure 32-bit alignment (see above) */
924
PCRE2_UCHAR occu[1]; /* Used for other case code units */
925
#endif
926
927
/* The rest have to be copied from the previous frame whenever a new frame
928
becomes current. The final field is specified as a large vector so that
929
runtime array bound checks don't catch references to it. However, for any
930
specific call to pcre2_match() the memory allocated for each frame structure
931
allows for exactly the right size ovector for the number of capturing
932
parentheses. (See also the comment for pcre2_real_match_data above.) */
933
934
PCRE2_SPTR eptr; /* MUST BE FIRST */
935
PCRE2_SPTR start_match; /* Can be adjusted by \K */
936
PCRE2_SPTR mark; /* Most recent mark on the success path */
937
PCRE2_SPTR recurse_last_used; /* Last character used at time of pattern recursion */
938
uint32_t current_recurse; /* Group number of current (deepest) pattern recursion */
939
uint32_t capture_last; /* Most recent capture */
940
PCRE2_SIZE last_group_offset; /* Saved offset to most recent group frame */
941
PCRE2_SIZE offset_top; /* Offset after highest capture */
942
PCRE2_SIZE ovector[131072]; /* Must be last in the structure */
943
} heapframe;
944
945
/* Assert that the size of the heapframe structure is a multiple of PCRE2_SIZE.
946
See various comments above. */
947
948
STATIC_ASSERT((sizeof(heapframe) % sizeof(PCRE2_SIZE)) == 0, heapframe_size);
949
950
/* Structure for computing the alignment of heapframe. */
951
952
typedef struct heapframe_align {
953
char unalign; /* Completely unalign the current offset */
954
heapframe frame; /* Offset is its alignment */
955
} heapframe_align;
956
957
/* This define is the minimum alignment required for a heapframe, in bytes. */
958
959
#define HEAPFRAME_ALIGNMENT offsetof(heapframe_align, frame)
960
961
/* Structure for passing "static" information around between the functions
962
doing traditional NFA matching (pcre2_match() and friends). */
963
964
typedef struct match_block {
965
pcre2_memctl memctl; /* For general use */
966
uint32_t heap_limit; /* As it says */
967
uint32_t match_limit; /* As it says */
968
uint32_t match_limit_depth; /* As it says */
969
uint32_t match_call_count; /* Number of times a new frame is created */
970
BOOL hitend; /* Hit the end of the subject at some point */
971
BOOL hasthen; /* Pattern contains (*THEN) */
972
BOOL hasbsk; /* Pattern contains \K */
973
BOOL allowemptypartial; /* Allow empty hard partial */
974
BOOL allowlookaroundbsk; /* Allow \K within lookarounds */
975
const uint8_t *lcc; /* Points to lower casing table */
976
const uint8_t *fcc; /* Points to case-flipping table */
977
const uint8_t *ctypes; /* Points to table of type maps */
978
PCRE2_SIZE start_offset; /* The start offset value */
979
PCRE2_SIZE end_offset_top; /* Highwater mark at end of match */
980
uint16_t partial; /* PARTIAL options */
981
uint16_t bsr_convention; /* \R interpretation */
982
uint16_t name_count; /* Number of names in name table */
983
uint16_t name_entry_size; /* Size of entry in names table */
984
PCRE2_SPTR name_table; /* Table of group names */
985
PCRE2_SPTR start_code; /* For use in pattern recursion */
986
PCRE2_SPTR start_subject; /* Start of the subject string */
987
PCRE2_SPTR check_subject; /* Where UTF-checked from */
988
PCRE2_SPTR end_subject; /* Usable end of the subject string */
989
PCRE2_SPTR true_end_subject; /* Actual end of the subject string */
990
PCRE2_SPTR end_match_ptr; /* Subject position at end match */
991
PCRE2_SPTR start_used_ptr; /* Earliest consulted character */
992
PCRE2_SPTR last_used_ptr; /* Latest consulted character */
993
PCRE2_SPTR mark; /* Mark pointer to pass back on success */
994
PCRE2_SPTR nomatch_mark; /* Mark pointer to pass back on failure */
995
PCRE2_SPTR verb_ecode_ptr; /* For passing back info */
996
PCRE2_SPTR verb_skip_ptr; /* For passing back a (*SKIP) name */
997
uint32_t verb_current_recurse; /* Current recursion group when (*VERB) happens */
998
uint32_t moptions; /* Match options */
999
uint32_t poptions; /* Pattern options */
1000
uint32_t skip_arg_count; /* For counting SKIP_ARGs */
1001
uint32_t ignore_skip_arg; /* For re-run when SKIP arg name not found */
1002
uint32_t nltype; /* Newline type */
1003
uint32_t nllen; /* Newline string length */
1004
PCRE2_UCHAR nl[4]; /* Newline string when fixed */
1005
pcre2_callout_block *cb; /* Points to a callout block */
1006
void *callout_data; /* To pass back to callouts */
1007
int (*callout)(pcre2_callout_block *,void *); /* Callout function or NULL */
1008
} match_block;
1009
1010
/* A similar structure is used for the same purpose by the DFA matching
1011
functions. */
1012
1013
typedef struct dfa_match_block {
1014
pcre2_memctl memctl; /* For general use */
1015
PCRE2_SPTR start_code; /* Start of the compiled pattern */
1016
PCRE2_SPTR start_subject ; /* Start of the subject string */
1017
PCRE2_SPTR end_subject; /* End of subject string */
1018
PCRE2_SPTR start_used_ptr; /* Earliest consulted character */
1019
PCRE2_SPTR last_used_ptr; /* Latest consulted character */
1020
const uint8_t *tables; /* Character tables */
1021
PCRE2_SIZE start_offset; /* The start offset value */
1022
uint32_t heap_limit; /* As it says */
1023
PCRE2_SIZE heap_used; /* As it says */
1024
uint32_t match_limit; /* As it says */
1025
uint32_t match_limit_depth; /* As it says */
1026
uint32_t match_call_count; /* Number of calls of internal function */
1027
uint32_t moptions; /* Match options */
1028
uint32_t poptions; /* Pattern options */
1029
uint32_t nltype; /* Newline type */
1030
uint32_t nllen; /* Newline string length */
1031
BOOL allowemptypartial; /* Allow empty hard partial */
1032
PCRE2_UCHAR nl[4]; /* Newline string when fixed */
1033
uint16_t bsr_convention; /* \R interpretation */
1034
pcre2_callout_block *cb; /* Points to a callout block */
1035
void *callout_data; /* To pass back to callouts */
1036
int (*callout)(pcre2_callout_block *,void *); /* Callout function or NULL */
1037
dfa_recursion_info *recursive; /* Linked list of pattern recursion data */
1038
} dfa_match_block;
1039
1040
#endif /* PCRE2_PCRE2TEST */
1041
1042
#endif /* PCRE2_INTMODEDEP_CAN_DEFINE */
1043
1044
/* End of pcre2_intmodedep.h */
1045
1046