This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen/regcharclass.pl: make a 'do' into a 'require'
[perl5.git] / regcharclass.h
CommitLineData
8770da0e 1/* -*- buffer-read-only: t -*-
58fbde93
RGS
2 *
3 * regcharclass.h
4 *
2eee27d7 5 * Copyright (C) 2007, 2011 by Larry Wall and others
58fbde93
RGS
6 *
7 * You may distribute under the terms of either the GNU General Public
8 * License or the Artistic License, as specified in the README file.
9 *
10 * !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
98e310af 11 * This file is built by regen/regcharclass.pl.
58fbde93 12 * Any changes made here will be lost!
212b6c86
KW
13 * WARNING: These macros are for internal Perl core use only, and may be
14 * changed or removed without notice.
58fbde93 15 */
12b72891 16
d10c72f2
KW
17
18#ifndef H_REGCHARCLASS /* Guard against nested #includes */
19#define H_REGCHARCLASS 1
20
12b72891
RGS
21/*
22 LNBREAK: Line Break: \R
23
58fbde93 24 "\x0D\x0A" # CRLF - Network (Windows) line ending
05b688d9 25 \p{VertSpace}
12b72891
RGS
26*/
27/*** GENERATED CODE ***/
12b72891 28#define is_LNBREAK_safe(s,e,is_utf8) \
e64b1bd1 29( ((e)-(s) > 2) ? \
c7c8bf55
KW
30 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
31 : ( 0x0D == ((U8*)s)[0] ) ? \
32 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
e64b1bd1 33 : ( is_utf8 ) ? \
c7c8bf55
KW
34 ( ( 0xC2 == ((U8*)s)[0] ) ? \
35 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
36 : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
37 : ( 0x85 == ((U8*)s)[0] ) ) \
e64b1bd1 38: ((e)-(s) > 1) ? \
c7c8bf55
KW
39 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
40 : ( 0x0D == ((U8*)s)[0] ) ? \
41 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
e64b1bd1 42 : ( is_utf8 ) ? \
c7c8bf55
KW
43 ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \
44 : ( 0x85 == ((U8*)s)[0] ) ) \
e64b1bd1 45: ((e)-(s) > 0) ? \
c7c8bf55 46 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \
e64b1bd1 47 : ( !( is_utf8 ) ) ? \
c7c8bf55 48 ( 0x85 == ((U8*)s)[0] ) \
e64b1bd1
YO
49 : 0 ) \
50: 0 )
e1d1eefb 51
12b72891 52/*** GENERATED CODE ***/
12b72891 53#define is_LNBREAK_utf8_safe(s,e) \
e64b1bd1 54( ((e)-(s) > 2) ? \
c7c8bf55
KW
55 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
56 : ( 0x0D == ((U8*)s)[0] ) ? \
57 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
58 : ( 0xC2 == ((U8*)s)[0] ) ? \
59 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
60 : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
e64b1bd1 61: ((e)-(s) > 1) ? \
c7c8bf55
KW
62 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
63 : ( 0x0D == ((U8*)s)[0] ) ? \
64 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
65 : ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \
e64b1bd1 66: ((e)-(s) > 0) ? \
c7c8bf55 67 ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) \
e64b1bd1 68: 0 )
e1d1eefb 69
12b72891 70/*** GENERATED CODE ***/
12b72891 71#define is_LNBREAK_latin1_safe(s,e) \
e64b1bd1 72( ((e)-(s) > 1) ? \
c7c8bf55
KW
73 ( ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) || 0x85 == ((U8*)s)[0] ) ? 1\
74 : ( 0x0D == ((U8*)s)[0] ) ? \
75 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
9a3182e9 76 : 0 ) \
e64b1bd1 77: ((e)-(s) > 0) ? \
c7c8bf55 78 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] )\
e64b1bd1 79: 0 )
12b72891
RGS
80
81/*
82 HORIZWS: Horizontal Whitespace: \h \H
83
05b688d9 84 \p{HorizSpace}
12b72891
RGS
85*/
86/*** GENERATED CODE ***/
2cafb56b 87#define is_HORIZWS_high(s) \
c7c8bf55
KW
88( ( 0xE1 == ((U8*)s)[0] ) ? \
89 ( ( ( 0x9A == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
90: ( 0xE2 == ((U8*)s)[0] ) ? \
91 ( ( 0x80 == ((U8*)s)[1] ) ? \
92 ( ( ( ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 ) \
93 : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 ) \
94: ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 )
2cafb56b
KW
95
96/*** GENERATED CODE ***/
2cafb56b 97#define is_HORIZWS_cp_high(cp) \
c7c8bf55
KW
98( 0x1680 == cp || ( 0x1680 < cp && \
99( ( 0x2000 <= cp && cp <= 0x200A ) || ( 0x200A < cp && \
100( 0x202F == cp || ( 0x202F < cp && \
101( 0x205F == cp || 0x3000 == cp ) ) ) ) ) ) )
2cafb56b 102
12b72891
RGS
103/*
104 VERTWS: Vertical Whitespace: \v \V
e1d1eefb 105
05b688d9 106 \p{VertSpace}
12b72891
RGS
107*/
108/*** GENERATED CODE ***/
840f8e92 109#define is_VERTWS_high(s) \
c7c8bf55 110( ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )
840f8e92
KW
111
112/*** GENERATED CODE ***/
840f8e92 113#define is_VERTWS_cp_high(cp) \
c7c8bf55 114( 0x2028 == cp || 0x2029 == cp )
840f8e92 115
612ead59 116/*
4ac6419d
KW
117 XDIGIT: Hexadecimal digits
118
119 \p{XDigit}
120*/
121/*** GENERATED CODE ***/
4ac6419d 122#define is_XDIGIT_high(s) \
c7c8bf55
KW
123( ( 0xEF == ((U8*)s)[0] ) ? \
124 ( ( 0xBC == ((U8*)s)[1] ) ? \
125 ( ( ( 0x90 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x99 ) || ( 0xA1 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xA6 ) ) ? 3 : 0 )\
126 : ( ( 0xBD == ((U8*)s)[1] ) && ( 0x81 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x86 ) ) ? 3 : 0 )\
4ac6419d
KW
127: 0 )
128
129/*** GENERATED CODE ***/
130#define is_XDIGIT_cp_high(cp) \
c7c8bf55
KW
131( ( 0xFF10 <= cp && cp <= 0xFF19 ) || ( 0xFF19 < cp && \
132( ( 0xFF21 <= cp && cp <= 0xFF26 ) || ( 0xFF41 <= cp && cp <= 0xFF46 ) ) ) )
4ac6419d
KW
133
134/*
bedac28b
KW
135 XPERLSPACE: \p{XPerlSpace}
136
137 \p{XPerlSpace}
138*/
139/*** GENERATED CODE ***/
bedac28b 140#define is_XPERLSPACE_high(s) \
c7c8bf55
KW
141( ( 0xE1 == ((U8*)s)[0] ) ? \
142 ( ( ( 0x9A == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
143: ( 0xE2 == ((U8*)s)[0] ) ? \
144 ( ( 0x80 == ((U8*)s)[1] ) ? \
145 ( ( ( ((U8*)s)[2] <= 0x8A ) || ( ((U8*)s)[2] & 0xFE ) == 0xA8 || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\
146 : ( ( 0x81 == ((U8*)s)[1] ) && ( 0x9F == ((U8*)s)[2] ) ) ? 3 : 0 ) \
147: ( ( ( 0xE3 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 )
bedac28b
KW
148
149/*** GENERATED CODE ***/
150#define is_XPERLSPACE_cp_high(cp) \
c7c8bf55
KW
151( 0x1680 == cp || ( 0x1680 < cp && \
152( ( 0x2000 <= cp && cp <= 0x200A ) || ( 0x200A < cp && \
153( 0x2028 == cp || ( 0x2028 < cp && \
154( 0x2029 == cp || ( 0x2029 < cp && \
155( 0x202F == cp || ( 0x202F < cp && \
156( 0x205F == cp || 0x3000 == cp ) ) ) ) ) ) ) ) ) ) )
bedac28b
KW
157
158/*
b96a92fb
KW
159 REPLACEMENT: Unicode REPLACEMENT CHARACTER
160
161 0xFFFD
162*/
163/*** GENERATED CODE ***/
164#define is_REPLACEMENT_utf8_safe(s,e) \
c7c8bf55 165( ( ( ( ( ((e) - (s)) >= 3 ) && ( 0xEF == ((U8*)s)[0] ) ) && ( 0xBF == ((U8*)s)[1] ) ) && ( 0xBD == ((U8*)s)[2] ) ) ? 3 : 0 )
b96a92fb
KW
166
167/*
168 NONCHAR: Non character code points
169
170 \p{Nchar}
171*/
172/*** GENERATED CODE ***/
173#define is_NONCHAR_utf8(s) \
c7c8bf55
KW
174( ( 0xEF == ((U8*)s)[0] ) ? \
175 ( ( 0xB7 == ((U8*)s)[1] ) ? \
176 ( ( 0x90 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xAF ) ? 3 : 0 ) \
177 : ( ( 0xBF == ((U8*)s)[1] ) && ( ((U8*)s)[2] >= 0xBE ) ) ? 3 : 0 ) \
178: ( 0xF0 == ((U8*)s)[0] ) ? \
179 ( ( ( ( ((U8*)s)[1] == 0x9F || ( ( ((U8*)s)[1] & 0xEF ) == 0xAF ) ) && ( 0xBF == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xBE ) ) ? 4 : 0 )\
180: ( 0xF1 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0xF3 ) ? \
181 ( ( ( ( ( ((U8*)s)[1] & 0xCF ) == 0x8F ) && ( 0xBF == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xBE ) ) ? 4 : 0 )\
182: ( ( ( ( 0xF4 == ((U8*)s)[0] ) && ( 0x8F == ((U8*)s)[1] ) ) && ( 0xBF == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xBE ) ) ? 4 : 0 )
b96a92fb
KW
183
184/*
185 SURROGATE: Surrogate characters
186
187 \p{Gc=Cs}
188*/
189/*** GENERATED CODE ***/
190#define is_SURROGATE_utf8(s) \
c7c8bf55 191( ( ( 0xED == ((U8*)s)[0] ) && ( ((U8*)s)[1] >= 0xA0 ) ) ? 3 : 0 )
b96a92fb
KW
192
193/*
612ead59
KW
194 GCB_L: Grapheme_Cluster_Break=L
195
196 \p{_X_GCB_L}
197*/
198/*** GENERATED CODE ***/
199#define is_GCB_L_utf8(s) \
c7c8bf55
KW
200( ( 0xE1 == ((U8*)s)[0] ) ? \
201 ( ( 0x84 == ((U8*)s)[1] ) ? \
6e130234 202 3 \
c7c8bf55
KW
203 : ( ( 0x85 == ((U8*)s)[1] ) && ( ((U8*)s)[2] <= 0x9F ) ) ? 3 : 0 ) \
204: ( ( ( 0xEA == ((U8*)s)[0] ) && ( 0xA5 == ((U8*)s)[1] ) ) && ( 0xA0 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBC ) ) ? 3 : 0 )
612ead59
KW
205
206/*
207 GCB_LV_LVT_V: Grapheme_Cluster_Break=(LV or LVT or V)
208
209 \p{_X_LV_LVT_V}
210*/
211/*** GENERATED CODE ***/
212#define is_GCB_LV_LVT_V_utf8(s) \
c7c8bf55
KW
213( ( 0xE1 == ((U8*)s)[0] ) ? \
214 ( ( 0x85 == ((U8*)s)[1] ) ? \
215 ( ( ((U8*)s)[2] >= 0xA0 ) ? 3 : 0 ) \
216 : ( ( 0x86 == ((U8*)s)[1] ) && ( ((U8*)s)[2] <= 0xA7 ) ) ? 3 : 0 ) \
217: ( 0xEA == ((U8*)s)[0] ) ? \
218 ( ( ((U8*)s)[1] >= 0xB0 ) ? \
6e130234
KW
219 3 \
220 : 0 ) \
c7c8bf55 221: ( 0xEB == ((U8*)s)[0] || 0xEC == ((U8*)s)[0] ) ? \
6e130234 222 3 \
c7c8bf55
KW
223: ( 0xED == ((U8*)s)[0] ) ? \
224 ( ( ((U8*)s)[1] <= 0x9D ) ? \
6e130234 225 3 \
c7c8bf55
KW
226 : ( 0x9E == ((U8*)s)[1] ) ? \
227 ( ( ( ((U8*)s)[2] <= 0xA3 ) || ( ((U8*)s)[2] >= 0xB0 ) ) ? 3 : 0 ) \
228 : ( ( 0x9F == ((U8*)s)[1] ) && ( ((U8*)s)[2] <= 0x86 ) ) ? 3 : 0 ) \
612ead59
KW
229: 0 )
230
231/*
232 GCB_Prepend: Grapheme_Cluster_Break=Prepend
233
234 \p{_X_GCB_Prepend}
235*/
236/*** GENERATED CODE ***/
237#define is_GCB_Prepend_utf8(s) \
238( 0 )
239
240/*
241 GCB_RI: Grapheme_Cluster_Break=RI
242
243 \p{_X_RI}
244*/
245/*** GENERATED CODE ***/
246#define is_GCB_RI_utf8(s) \
c7c8bf55 247( ( ( ( ( 0xF0 == ((U8*)s)[0] ) && ( 0x9F == ((U8*)s)[1] ) ) && ( 0x87 == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xA6 ) ) ? 4 : 0 )
612ead59
KW
248
249/*
bff53399 250 GCB_SPECIAL_BEGIN_START: Grapheme_Cluster_Break=special_begin_starts
612ead59 251
bff53399 252 \p{_X_Special_Begin_Start}
612ead59
KW
253*/
254/*** GENERATED CODE ***/
bff53399 255#define is_GCB_SPECIAL_BEGIN_START_utf8(s) \
c7c8bf55
KW
256( ( 0xE1 == ((U8*)s)[0] ) ? \
257 ( ( ( ((U8*)s)[1] & 0xFC ) == 0x84 ) ? \
6e130234
KW
258 3 \
259 : 0 ) \
c7c8bf55
KW
260: ( 0xEA == ((U8*)s)[0] ) ? \
261 ( ( 0xA5 == ((U8*)s)[1] ) ? \
262 ( ( 0xA0 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBC ) ? 3 : 0 ) \
263 : ( ((U8*)s)[1] >= 0xB0 ) ? \
6e130234 264 3 \
612ead59 265 : 0 ) \
c7c8bf55 266: ( 0xEB == ((U8*)s)[0] || 0xEC == ((U8*)s)[0] ) ? \
6e130234 267 3 \
c7c8bf55
KW
268: ( 0xED == ((U8*)s)[0] ) ? \
269 ( ( ((U8*)s)[1] <= 0x9D ) ? \
6e130234 270 3 \
c7c8bf55
KW
271 : ( 0x9E == ((U8*)s)[1] ) ? \
272 ( ( ( ((U8*)s)[2] <= 0xA3 ) || ( ((U8*)s)[2] >= 0xB0 ) ) ? 3 : 0 ) \
273 : ( ( 0x9F == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] <= 0x86 ) || ( 0x8B <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBB ) ) ) ? 3 : 0 )\
274: ( ( ( ( 0xF0 == ((U8*)s)[0] ) && ( 0x9F == ((U8*)s)[1] ) ) && ( 0x87 == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xA6 ) ) ? 4 : 0 )
612ead59
KW
275
276/*
277 GCB_T: Grapheme_Cluster_Break=T
278
279 \p{_X_GCB_T}
280*/
281/*** GENERATED CODE ***/
282#define is_GCB_T_utf8(s) \
c7c8bf55
KW
283( ( 0xE1 == ((U8*)s)[0] ) ? \
284 ( ( 0x86 == ((U8*)s)[1] ) ? \
285 ( ( ((U8*)s)[2] >= 0xA8 ) ? 3 : 0 ) \
286 : ( 0x87 == ((U8*)s)[1] ) ? \
6e130234 287 3 \
612ead59 288 : 0 ) \
c7c8bf55 289: ( ( ( 0xED == ((U8*)s)[0] ) && ( 0x9F == ((U8*)s)[1] ) ) && ( 0x8B <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBB ) ) ? 3 : 0 )
612ead59
KW
290
291/*
292 GCB_V: Grapheme_Cluster_Break=V
293
294 \p{_X_GCB_V}
295*/
296/*** GENERATED CODE ***/
297#define is_GCB_V_utf8(s) \
c7c8bf55
KW
298( ( 0xE1 == ((U8*)s)[0] ) ? \
299 ( ( 0x85 == ((U8*)s)[1] ) ? \
300 ( ( ((U8*)s)[2] >= 0xA0 ) ? 3 : 0 ) \
301 : ( ( 0x86 == ((U8*)s)[1] ) && ( ((U8*)s)[2] <= 0xA7 ) ) ? 3 : 0 ) \
302: ( 0xED == ((U8*)s)[0] ) ? \
303 ( ( 0x9E == ((U8*)s)[1] ) ? \
304 ( ( ((U8*)s)[2] >= 0xB0 ) ? 3 : 0 ) \
305 : ( ( 0x9F == ((U8*)s)[1] ) && ( ((U8*)s)[2] <= 0x86 ) ) ? 3 : 0 ) \
612ead59
KW
306: 0 )
307
685289b5
KW
308/*
309 QUOTEMETA: Meta-characters that \Q should quote
310
311 \p{_Perl_Quotemeta}
312*/
313/*** GENERATED CODE ***/
314#define is_QUOTEMETA_high(s) \
c7c8bf55
KW
315( ( 0xCD == ((U8*)s)[0] ) ? \
316 ( ( 0x8F == ((U8*)s)[1] ) ? 2 : 0 ) \
317: ( 0xD8 == ((U8*)s)[0] ) ? \
318 ( ( 0x9C == ((U8*)s)[1] ) ? 2 : 0 ) \
319: ( 0xE1 == ((U8*)s)[0] ) ? \
320 ( ( 0x85 == ((U8*)s)[1] ) ? \
321 ( ( 0x9F == ((U8*)s)[2] || 0xA0 == ((U8*)s)[2] ) ? 3 : 0 ) \
322 : ( 0x9A == ((U8*)s)[1] ) ? \
323 ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \
324 : ( 0x9E == ((U8*)s)[1] ) ? \
325 ( ( ( ((U8*)s)[2] & 0xFE ) == 0xB4 ) ? 3 : 0 ) \
326 : ( ( 0xA0 == ((U8*)s)[1] ) && ( 0x8B <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8E ) ) ? 3 : 0 )\
327: ( 0xE2 == ((U8*)s)[0] ) ? \
328 ( ( 0x80 == ((U8*)s)[1] ) ? \
329 ( ( ((U8*)s)[2] <= 0xBE ) ? 3 : 0 ) \
330 : ( 0x81 == ((U8*)s)[1] ) ? \
331 ( ( ( 0x81 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x93 ) || ( 0x95 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xAF ) ) ? 3 : 0 )\
332 : ( 0x86 == ((U8*)s)[1] ) ? \
333 ( ( ((U8*)s)[2] >= 0x90 ) ? 3 : 0 ) \
334 : ( ( 0x87 <= ((U8*)s)[1] && ((U8*)s)[1] <= 0x90 ) || ( 0x94 <= ((U8*)s)[1] && ((U8*)s)[1] <= 0x9C ) || ( 0x9F <= ((U8*)s)[1] && ((U8*)s)[1] <= 0xAF ) || ( ((U8*)s)[1] & 0xFE ) == 0xB8 ) ?\
6e130234 335 3 \
c7c8bf55
KW
336 : ( 0x91 == ((U8*)s)[1] ) ? \
337 ( ( ((U8*)s)[2] <= 0x9F ) ? 3 : 0 ) \
338 : ( 0x9D == ((U8*)s)[1] ) ? \
339 ( ( ((U8*)s)[2] <= 0xB5 ) ? 3 : 0 ) \
340 : ( ( 0x9E == ((U8*)s)[1] ) && ( ((U8*)s)[2] >= 0x94 ) ) ? 3 : 0 ) \
341: ( 0xE3 == ((U8*)s)[0] ) ? \
342 ( ( 0x80 == ((U8*)s)[1] ) ? \
343 ( ( ( ((U8*)s)[2] <= 0x83 ) || ( 0x88 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xA0 ) || 0xB0 == ((U8*)s)[2] ) ? 3 : 0 )\
344 : ( ( 0x85 == ((U8*)s)[1] ) && ( 0xA4 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
345: ( 0xEF == ((U8*)s)[0] ) ? \
346 ( ( 0xB4 == ((U8*)s)[1] ) ? \
347 ( ( ((U8*)s)[2] >= 0xBE ) ? 3 : 0 ) \
348 : ( 0xB8 == ((U8*)s)[1] ) ? \
349 ( ( ((U8*)s)[2] <= 0x8F ) ? 3 : 0 ) \
350 : ( 0xB9 == ((U8*)s)[1] ) ? \
351 ( ( 0x85 == ((U8*)s)[2] || 0x86 == ((U8*)s)[2] ) ? 3 : 0 ) \
352 : ( 0xBB == ((U8*)s)[1] ) ? \
353 ( ( 0xBF == ((U8*)s)[2] ) ? 3 : 0 ) \
354 : ( 0xBE == ((U8*)s)[1] ) ? \
355 ( ( 0xA0 == ((U8*)s)[2] ) ? 3 : 0 ) \
356 : ( ( 0xBF == ((U8*)s)[1] ) && ( 0xB0 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xB8 ) ) ? 3 : 0 )\
357: ( 0xF0 == ((U8*)s)[0] ) ? \
358 ( ( ( ( 0x9D == ((U8*)s)[1] ) && ( 0x85 == ((U8*)s)[2] ) ) && ( 0xB3 <= ((U8*)s)[3] && ((U8*)s)[3] <= 0xBA ) ) ? 4 : 0 )\
359: ( ( 0xF3 == ((U8*)s)[0] ) && ( 0xA0 == ((U8*)s)[1] ) ) ? 4 : 0 )
685289b5 360
8769f413
KW
361/*
362 MULTI_CHAR_FOLD: multi-char strings that are folded to by a single character
363
8769f413
KW
364 &regcharclass_multi_char_folds::multi_char_folds(1)
365*/
366/*** GENERATED CODE ***/
251b239f 367#define is_MULTI_CHAR_FOLD_utf8_safe_part0(s,e) \
c7c8bf55
KW
368( ( 0x61 == ((U8*)s)[0] ) ? \
369 ( ( ( 0xCA == ((U8*)s)[1] ) && ( 0xBE == ((U8*)s)[2] ) ) ? 3 : 0 ) \
370 : ( 0x66 == ((U8*)s)[0] ) ? \
371 ( ( 0x66 == ((U8*)s)[1] ) ? \
372 ( ( 0x69 == ((U8*)s)[2] || 0x6C == ((U8*)s)[2] ) ? 3 : 2 ) \
373 : ( 0x69 == ((U8*)s)[1] || 0x6C == ((U8*)s)[1] ) ? 2 : 0 ) \
374 : ( 0x68 == ((U8*)s)[0] ) ? \
375 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0xB1 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
376 : ( 0x69 == ((U8*)s)[0] ) ? \
377 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x87 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
378 : ( 0x6A == ((U8*)s)[0] ) ? \
379 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8C == ((U8*)s)[2] ) ) ? 3 : 0 ) \
380 : ( 0x73 == ((U8*)s)[0] ) ? \
381 ( ( 0x73 == ((U8*)s)[1] || 0x74 == ((U8*)s)[1] ) ? 2 : 0 ) \
382 : ( 0x74 == ((U8*)s)[0] ) ? \
383 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x88 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
384 : ( 0x77 == ((U8*)s)[0] || 0x79 == ((U8*)s)[0] ) ? \
385 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8A == ((U8*)s)[2] ) ) ? 3 : 0 ) \
386 : ( 0xC5 == ((U8*)s)[0] ) ? \
387 ( ( ( ( 0xBF == ((U8*)s)[1] ) && ( 0xC5 == ((U8*)s)[2] ) ) && ( 0xBF == ((U8*)s)[3] ) ) ? 4 : 0 )\
388 : ( 0xCA == ((U8*)s)[0] ) ? \
389 ( ( ( 0xBC == ((U8*)s)[1] ) && ( 0x6E == ((U8*)s)[2] ) ) ? 3 : 0 ) \
390 : ( 0xCE == ((U8*)s)[0] ) ? \
391 ( ( ( ((U8*)s)[1] & 0xFD ) == 0xAC ) ? \
392 ( ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
393 : ( 0xB1 == ((U8*)s)[1] || 0xB7 == ((U8*)s)[1] ) ? \
394 ( ( 0xCD == ((U8*)s)[2] ) ? \
395 ( ( 0x82 == ((U8*)s)[3] ) ? 4 : 0 ) \
396 : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
397 : ( ( ( 0xB9 == ((U8*)s)[1] ) && ( 0xCD == ((U8*)s)[2] ) ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\
398 : ( 0xCF == ((U8*)s)[0] ) ? \
399 ( ( 0x81 == ((U8*)s)[1] ) ? \
400 ( ( ( 0xCC == ((U8*)s)[2] ) && ( 0x93 == ((U8*)s)[3] ) ) ? 4 : 0 )\
401 : ( 0x85 == ((U8*)s)[1] ) ? \
402 ( ( 0xCC == ((U8*)s)[2] ) ? \
403 ( ( 0x93 == ((U8*)s)[3] ) ? 4 : 0 ) \
404 : ( ( 0xCD == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\
405 : ( 0x89 == ((U8*)s)[1] ) ? \
406 ( ( 0xCD == ((U8*)s)[2] ) ? \
407 ( ( 0x82 == ((U8*)s)[3] ) ? 4 : 0 ) \
408 : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
409 : ( ( ( 0x8E == ((U8*)s)[1] ) && ( 0xCE == ((U8*)s)[2] ) ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
410 : ( 0xD5 == ((U8*)s)[0] ) ? \
411 ( ( 0xA5 == ((U8*)s)[1] ) ? \
412 ( ( ( 0xD6 == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\
413 : ( 0xB4 == ((U8*)s)[1] ) ? \
414 ( ( ( 0xD5 == ((U8*)s)[2] ) && ( ( ( ((U8*)s)[3] & 0xF7 ) == 0xA5 ) || ((U8*)s)[3] == 0xAB || ((U8*)s)[3] == 0xB6 ) ) ? 4 : 0 )\
415 : ( ( ( 0xBE == ((U8*)s)[1] ) && ( 0xD5 == ((U8*)s)[2] ) ) && ( 0xB6 == ((U8*)s)[3] ) ) ? 4 : 0 )\
416 : ( 0xE1 == ((U8*)s)[0] ) ? \
417 ( ( 0xBC == ((U8*)s)[1] ) ? \
418 ( ( ( ( ( ((U8*)s)[2] & 0xD8 ) == 0x80 ) && ( 0xCE == ((U8*)s)[3] ) ) && ( 0xB9 == ((U8*)s)[4] ) ) ? 5 : 0 )\
419 : ( ( ( ( 0xBD == ((U8*)s)[1] ) && ( ( ( ((U8*)s)[2] & 0xF8 ) == 0xA0 ) || ( ( ((U8*)s)[2] & 0xFB ) == 0xB0 ) || ((U8*)s)[2] == 0xBC ) ) && ( 0xCE == ((U8*)s)[3] ) ) && ( 0xB9 == ((U8*)s)[4] ) ) ? 5 : 0 )\
251b239f
KW
420 : 0 )
421
422
423/*** GENERATED CODE ***/
c7c8bf55
KW
424#define is_MULTI_CHAR_FOLD_utf8_safe_part1(s,e) \
425( ((e)-(s) > 3) ? \
426 ( ( 0x61 == ((U8*)s)[0] ) ? \
427 ( ( ( 0xCA == ((U8*)s)[1] ) && ( 0xBE == ((U8*)s)[2] ) ) ? 3 : 0 ) \
428 : ( 0x66 == ((U8*)s)[0] ) ? \
429 ( ( 0x66 == ((U8*)s)[1] ) ? \
430 ( ( 0x69 == ((U8*)s)[2] || 0x6C == ((U8*)s)[2] ) ? 3 : 2 ) \
431 : ( 0x69 == ((U8*)s)[1] || 0x6C == ((U8*)s)[1] ) ? 2 : 0 ) \
432 : ( 0x68 == ((U8*)s)[0] ) ? \
433 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0xB1 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
434 : ( 0x69 == ((U8*)s)[0] ) ? \
435 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x87 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
436 : ( 0x6A == ((U8*)s)[0] ) ? \
437 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8C == ((U8*)s)[2] ) ) ? 3 : 0 ) \
438 : ( 0x73 == ((U8*)s)[0] ) ? \
439 ( ( 0x73 == ((U8*)s)[1] || 0x74 == ((U8*)s)[1] ) ? 2 : 0 ) \
440 : ( 0x74 == ((U8*)s)[0] ) ? \
441 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x88 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
442 : ( 0x77 == ((U8*)s)[0] || 0x79 == ((U8*)s)[0] ) ? \
443 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8A == ((U8*)s)[2] ) ) ? 3 : 0 ) \
444 : ( 0xC5 == ((U8*)s)[0] ) ? \
445 ( ( ( ( 0xBF == ((U8*)s)[1] ) && ( 0xC5 == ((U8*)s)[2] ) ) && ( 0xBF == ((U8*)s)[3] ) ) ? 4 : 0 )\
446 : ( 0xCA == ((U8*)s)[0] ) ? \
447 ( ( ( 0xBC == ((U8*)s)[1] ) && ( 0x6E == ((U8*)s)[2] ) ) ? 3 : 0 ) \
448 : ( 0xCE == ((U8*)s)[0] ) ? \
449 ( ( ( ((U8*)s)[1] & 0xFD ) == 0xAC ) ? \
450 ( ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
451 : ( 0xB1 == ((U8*)s)[1] || 0xB7 == ((U8*)s)[1] ) ? \
452 ( ( 0xCD == ((U8*)s)[2] ) ? \
453 ( ( 0x82 == ((U8*)s)[3] ) ? 4 : 0 ) \
454 : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
455 : ( ( ( 0xB9 == ((U8*)s)[1] ) && ( 0xCD == ((U8*)s)[2] ) ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\
456 : ( 0xCF == ((U8*)s)[0] ) ? \
457 ( ( 0x81 == ((U8*)s)[1] ) ? \
458 ( ( ( 0xCC == ((U8*)s)[2] ) && ( 0x93 == ((U8*)s)[3] ) ) ? 4 : 0 )\
459 : ( 0x85 == ((U8*)s)[1] ) ? \
460 ( ( 0xCC == ((U8*)s)[2] ) ? \
461 ( ( 0x93 == ((U8*)s)[3] ) ? 4 : 0 ) \
462 : ( ( 0xCD == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\
463 : ( 0x89 == ((U8*)s)[1] ) ? \
464 ( ( 0xCD == ((U8*)s)[2] ) ? \
465 ( ( 0x82 == ((U8*)s)[3] ) ? 4 : 0 ) \
466 : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
467 : ( ( ( 0x8E == ((U8*)s)[1] ) && ( 0xCE == ((U8*)s)[2] ) ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
468 : ( 0xD5 == ((U8*)s)[0] ) ? \
469 ( ( 0xA5 == ((U8*)s)[1] ) ? \
470 ( ( ( 0xD6 == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\
471 : ( 0xB4 == ((U8*)s)[1] ) ? \
472 ( ( ( 0xD5 == ((U8*)s)[2] ) && ( ( ( ((U8*)s)[3] & 0xF7 ) == 0xA5 ) || ((U8*)s)[3] == 0xAB || ((U8*)s)[3] == 0xB6 ) ) ? 4 : 0 )\
473 : ( ( ( 0xBE == ((U8*)s)[1] ) && ( 0xD5 == ((U8*)s)[2] ) ) && ( 0xB6 == ((U8*)s)[3] ) ) ? 4 : 0 )\
474 : 0 ) \
475: ((e)-(s) > 2) ? \
476 ( ( 0x61 == ((U8*)s)[0] ) ? \
477 ( ( ( 0xCA == ((U8*)s)[1] ) && ( 0xBE == ((U8*)s)[2] ) ) ? 3 : 0 ) \
478 : ( 0x66 == ((U8*)s)[0] ) ? \
479 ( ( 0x66 == ((U8*)s)[1] ) ? \
480 ( ( 0x69 == ((U8*)s)[2] || 0x6C == ((U8*)s)[2] ) ? 3 : 2 ) \
481 : ( 0x69 == ((U8*)s)[1] || 0x6C == ((U8*)s)[1] ) ? 2 : 0 ) \
482 : ( 0x68 == ((U8*)s)[0] ) ? \
483 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0xB1 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
484 : ( 0x69 == ((U8*)s)[0] ) ? \
485 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x87 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
486 : ( 0x6A == ((U8*)s)[0] ) ? \
487 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8C == ((U8*)s)[2] ) ) ? 3 : 0 ) \
488 : ( 0x73 == ((U8*)s)[0] ) ? \
489 ( ( 0x73 == ((U8*)s)[1] || 0x74 == ((U8*)s)[1] ) ? 2 : 0 ) \
490 : ( 0x74 == ((U8*)s)[0] ) ? \
491 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x88 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
492 : ( 0x77 == ((U8*)s)[0] || 0x79 == ((U8*)s)[0] ) ? \
493 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8A == ((U8*)s)[2] ) ) ? 3 : 0 ) \
494 : ( ( ( 0xCA == ((U8*)s)[0] ) && ( 0xBC == ((U8*)s)[1] ) ) && ( 0x6E == ((U8*)s)[2] ) ) ? 3 : 0 )\
251b239f 495: ((e)-(s) > 1) ? \
c7c8bf55
KW
496 ( ( 0x66 == ((U8*)s)[0] ) ? \
497 ( ( 0x66 == ((U8*)s)[1] || 0x69 == ((U8*)s)[1] || 0x6C == ((U8*)s)[1] ) ? 2 : 0 )\
498 : ( ( 0x73 == ((U8*)s)[0] ) && ( 0x73 == ((U8*)s)[1] || 0x74 == ((U8*)s)[1] ) ) ? 2 : 0 )\
c4c8e615
KW
499: 0 )
500
501
502/*** GENERATED CODE ***/
251b239f 503#define is_MULTI_CHAR_FOLD_utf8_safe(s,e) \
c7c8bf55
KW
504( ((e)-(s) > 5) ? \
505 ( ( 0x61 == ((U8*)s)[0] ) ? \
506 ( ( ( 0xCA == ((U8*)s)[1] ) && ( 0xBE == ((U8*)s)[2] ) ) ? 3 : 0 ) \
507 : ( 0x66 == ((U8*)s)[0] ) ? \
508 ( ( 0x66 == ((U8*)s)[1] ) ? \
509 ( ( 0x69 == ((U8*)s)[2] || 0x6C == ((U8*)s)[2] ) ? 3 : 2 ) \
510 : ( 0x69 == ((U8*)s)[1] || 0x6C == ((U8*)s)[1] ) ? 2 : 0 ) \
511 : ( 0x68 == ((U8*)s)[0] ) ? \
512 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0xB1 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
513 : ( 0x69 == ((U8*)s)[0] ) ? \
514 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x87 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
515 : ( 0x6A == ((U8*)s)[0] ) ? \
516 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8C == ((U8*)s)[2] ) ) ? 3 : 0 ) \
517 : ( 0x73 == ((U8*)s)[0] ) ? \
518 ( ( 0x73 == ((U8*)s)[1] || 0x74 == ((U8*)s)[1] ) ? 2 : 0 ) \
519 : ( 0x74 == ((U8*)s)[0] ) ? \
520 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x88 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
521 : ( 0x77 == ((U8*)s)[0] || 0x79 == ((U8*)s)[0] ) ? \
522 ( ( ( 0xCC == ((U8*)s)[1] ) && ( 0x8A == ((U8*)s)[2] ) ) ? 3 : 0 ) \
523 : ( 0xC5 == ((U8*)s)[0] ) ? \
524 ( ( ( ( 0xBF == ((U8*)s)[1] ) && ( 0xC5 == ((U8*)s)[2] ) ) && ( 0xBF == ((U8*)s)[3] ) ) ? 4 : 0 )\
525 : ( 0xCA == ((U8*)s)[0] ) ? \
526 ( ( ( 0xBC == ((U8*)s)[1] ) && ( 0x6E == ((U8*)s)[2] ) ) ? 3 : 0 ) \
527 : ( 0xCE == ((U8*)s)[0] ) ? \
528 ( ( ( ((U8*)s)[1] & 0xFD ) == 0xAC ) ? \
529 ( ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
530 : ( 0xB1 == ((U8*)s)[1] || 0xB7 == ((U8*)s)[1] ) ? \
531 ( ( 0xCD == ((U8*)s)[2] ) ? \
532 ( ( 0x82 == ((U8*)s)[3] ) ? \
533 ( ( ( 0xCE == ((U8*)s)[4] ) && ( 0xB9 == ((U8*)s)[5] ) ) ? 6 : 4 )\
534 : 0 ) \
535 : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
536 : ( 0xB9 == ((U8*)s)[1] ) ? \
537 ( ( 0xCC == ((U8*)s)[2] ) ? \
538 ( ( 0x88 == ((U8*)s)[3] ) ? \
539 ( ( 0xCC == ((U8*)s)[4] ) ? \
540 ( ( ( ((U8*)s)[5] & 0xFE ) == 0x80 ) ? 6 : 0 ) \
541 : ( ( 0xCD == ((U8*)s)[4] ) && ( 0x82 == ((U8*)s)[5] ) ) ? 6 : 0 )\
542 : 0 ) \
543 : ( ( 0xCD == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\
544 : 0 ) \
545 : ( 0xCF == ((U8*)s)[0] ) ? \
546 ( ( 0x81 == ((U8*)s)[1] ) ? \
547 ( ( ( 0xCC == ((U8*)s)[2] ) && ( 0x93 == ((U8*)s)[3] ) ) ? 4 : 0 )\
548 : ( 0x85 == ((U8*)s)[1] ) ? \
549 ( ( 0xCC == ((U8*)s)[2] ) ? \
550 ( ( 0x88 == ((U8*)s)[3] ) ? \
551 ( ( 0xCC == ((U8*)s)[4] ) ? \
552 ( ( ( ((U8*)s)[5] & 0xFE ) == 0x80 ) ? 6 : 0 ) \
553 : ( ( 0xCD == ((U8*)s)[4] ) && ( 0x82 == ((U8*)s)[5] ) ) ? 6 : 0 )\
554 : ( 0x93 == ((U8*)s)[3] ) ? \
555 ( ( 0xCC == ((U8*)s)[4] ) ? \
556 ( ( ( ((U8*)s)[5] & 0xFE ) == 0x80 ) ? 6 : 4 ) \
557 : ( ( 0xCD == ((U8*)s)[4] ) && ( 0x82 == ((U8*)s)[5] ) ) ? 6 : 4 )\
558 : 0 ) \
559 : ( ( 0xCD == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\
560 : ( 0x89 == ((U8*)s)[1] ) ? \
561 ( ( 0xCD == ((U8*)s)[2] ) ? \
562 ( ( 0x82 == ((U8*)s)[3] ) ? \
563 ( ( ( 0xCE == ((U8*)s)[4] ) && ( 0xB9 == ((U8*)s)[5] ) ) ? 6 : 4 )\
564 : 0 ) \
565 : ( ( 0xCE == ((U8*)s)[2] ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
566 : ( ( ( 0x8E == ((U8*)s)[1] ) && ( 0xCE == ((U8*)s)[2] ) ) && ( 0xB9 == ((U8*)s)[3] ) ) ? 4 : 0 )\
567 : ( 0xD5 == ((U8*)s)[0] ) ? \
568 ( ( 0xA5 == ((U8*)s)[1] ) ? \
569 ( ( ( 0xD6 == ((U8*)s)[2] ) && ( 0x82 == ((U8*)s)[3] ) ) ? 4 : 0 )\
570 : ( 0xB4 == ((U8*)s)[1] ) ? \
571 ( ( ( 0xD5 == ((U8*)s)[2] ) && ( ( ( ((U8*)s)[3] & 0xF7 ) == 0xA5 ) || ((U8*)s)[3] == 0xAB || ((U8*)s)[3] == 0xB6 ) ) ? 4 : 0 )\
572 : ( ( ( 0xBE == ((U8*)s)[1] ) && ( 0xD5 == ((U8*)s)[2] ) ) && ( 0xB6 == ((U8*)s)[3] ) ) ? 4 : 0 )\
573 : ( 0xE1 == ((U8*)s)[0] ) ? \
574 ( ( 0xBC == ((U8*)s)[1] ) ? \
575 ( ( ( ( ( ((U8*)s)[2] & 0xD8 ) == 0x80 ) && ( 0xCE == ((U8*)s)[3] ) ) && ( 0xB9 == ((U8*)s)[4] ) ) ? 5 : 0 )\
576 : ( ( ( ( 0xBD == ((U8*)s)[1] ) && ( ( ( ((U8*)s)[2] & 0xF8 ) == 0xA0 ) || ( ( ((U8*)s)[2] & 0xFB ) == 0xB0 ) || ((U8*)s)[2] == 0xBC ) ) && ( 0xCE == ((U8*)s)[3] ) ) && ( 0xB9 == ((U8*)s)[4] ) ) ? 5 : 0 )\
577 : 0 ) \
578: ((e)-(s) > 4) ? is_MULTI_CHAR_FOLD_utf8_safe_part0(s,e) : is_MULTI_CHAR_FOLD_utf8_safe_part1(s,e) )
8769f413
KW
579
580/*
40b1ba4f 581 MULTI_CHAR_FOLD: multi-char strings that are folded to by a single character
8769f413
KW
582
583 &regcharclass_multi_char_folds::multi_char_folds(0)
584*/
585/*** GENERATED CODE ***/
251b239f
KW
586#define is_MULTI_CHAR_FOLD_latin1_safe(s,e) \
587( ((e)-(s) > 2) ? \
c7c8bf55
KW
588 ( ( ( ((U8*)s)[0] & 0xDF ) == 0x46 ) ? \
589 ( ( ( ((U8*)s)[1] & 0xDF ) == 0x46 ) ? \
590 ( ( ( ( ((U8*)s)[2] & 0xDF ) == 0x49 ) || ( ( ((U8*)s)[2] & 0xDF ) == 0x4C ) ) ? 3 : 2 )\
591 : ( ( ( ((U8*)s)[1] & 0xDF ) == 0x49 ) || ( ( ((U8*)s)[1] & 0xDF ) == 0x4C ) ) ? 2 : 0 )\
592 : ( ( ( ((U8*)s)[0] & 0xDF ) == 0x53 ) && ( ( ( ((U8*)s)[1] & 0xDF ) == 0x53 ) || ( ( ((U8*)s)[1] & 0xDF ) == 0x54 ) ) ) ? 2 : 0 )\
251b239f 593: ((e)-(s) > 1) ? \
c7c8bf55
KW
594 ( ( ( ((U8*)s)[0] & 0xDF ) == 0x46 ) ? \
595 ( ( ( ( ((U8*)s)[1] & 0xDF ) == 0x46 ) || ( ( ((U8*)s)[1] & 0xDF ) == 0x49 ) || ( ( ((U8*)s)[1] & 0xDF ) == 0x4C ) ) ? 2 : 0 )\
596 : ( ( ( ((U8*)s)[0] & 0xDF ) == 0x53 ) && ( ( ( ((U8*)s)[1] & 0xDF ) == 0x53 ) || ( ( ((U8*)s)[1] & 0xDF ) == 0x54 ) ) ) ? 2 : 0 )\
251b239f 597: 0 )
8769f413 598
0b50d62a 599/*
1a27eb96
KW
600 FOLDS_TO_MULTI: characters that fold to multi-char strings
601
602 \p{_Perl_Folds_To_Multi_Char}
603*/
604/*** GENERATED CODE ***/
605#define is_FOLDS_TO_MULTI_utf8(s) \
c7c8bf55
KW
606( ( 0xC3 == ((U8*)s)[0] ) ? \
607 ( ( 0x9F == ((U8*)s)[1] ) ? 2 : 0 ) \
608: ( 0xC4 == ((U8*)s)[0] || 0xC7 == ((U8*)s)[0] ) ? \
609 ( ( 0xB0 == ((U8*)s)[1] ) ? 2 : 0 ) \
610: ( 0xC5 == ((U8*)s)[0] ) ? \
611 ( ( 0x89 == ((U8*)s)[1] ) ? 2 : 0 ) \
612: ( 0xCE == ((U8*)s)[0] ) ? \
613 ( ( ( ((U8*)s)[1] & 0xDF ) == 0x90 ) ? 2 : 0 ) \
614: ( 0xD6 == ((U8*)s)[0] ) ? \
615 ( ( 0x87 == ((U8*)s)[1] ) ? 2 : 0 ) \
616: ( 0xE1 == ((U8*)s)[0] ) ? \
617 ( ( 0xBA == ((U8*)s)[1] ) ? \
618 ( ( ( 0x96 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x9A ) || 0x9E == ((U8*)s)[2] ) ? 3 : 0 )\
619 : ( 0xBD == ((U8*)s)[1] ) ? \
620 ( ( ( ((U8*)s)[2] & 0xF9 ) == 0x90 ) ? 3 : 0 ) \
621 : ( 0xBE == ((U8*)s)[1] ) ? \
622 ( ( ( ( ((U8*)s)[2] & 0xE0 ) == 0x80 ) || ( ( ((U8*)s)[2] & 0xF0 ) == 0xA0 ) || ( ( ((U8*)s)[2] & 0xFA ) == 0xB2 ) || ( ( ((U8*)s)[2] & 0xF7 ) == 0xB4 ) ) ? 3 : 0 )\
623 : ( ( 0xBF == ((U8*)s)[1] ) && ( ( ( ((U8*)s)[2] & 0xCA ) == 0x82 ) || ( ( ((U8*)s)[2] & 0xF7 ) == 0x84 ) || ((U8*)s)[2] == 0xA4 || ( ( ((U8*)s)[2] & 0xF7 ) == 0xB4 ) ) ) ? 3 : 0 )\
624: ( ( ( 0xEF == ((U8*)s)[0] ) && ( 0xAC == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] <= 0x86 ) || ( 0x93 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x97 ) ) ) ? 3 : 0 )
1a27eb96
KW
625
626/*
31f05a37
KW
627 PROBLEMATIC_LOCALE_FOLD: characters whose fold is problematic under locale
628
629 \p{_Perl_Problematic_Locale_Folds}
630*/
631/*** GENERATED CODE ***/
632#define is_PROBLEMATIC_LOCALE_FOLD_utf8(s) \
c7c8bf55
KW
633( ( ((U8*)s)[0] <= 0x7F ) ? 1 \
634: ( ( ((U8*)s)[0] & 0xFE ) == 0xC2 ) ? \
31f05a37 635 2 \
c7c8bf55
KW
636: ( 0xC4 == ((U8*)s)[0] || 0xC7 == ((U8*)s)[0] ) ? \
637 ( ( 0xB0 == ((U8*)s)[1] ) ? 2 : 0 ) \
638: ( 0xC5 == ((U8*)s)[0] ) ? \
639 ( ( 0x89 == ((U8*)s)[1] || 0xB8 == ((U8*)s)[1] || 0xBF == ((U8*)s)[1] ) ? 2 : 0 )\
640: ( 0xCE == ((U8*)s)[0] ) ? \
641 ( ( ( ((U8*)s)[1] & 0xDF ) == 0x9C ) ? 2 : 0 ) \
642: ( 0xE1 == ((U8*)s)[0] ) ? \
643 ( ( ( 0xBA == ((U8*)s)[1] ) && ( ( 0x96 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x9A ) || 0x9E == ((U8*)s)[2] ) ) ? 3 : 0 )\
644: ( 0xE2 == ((U8*)s)[0] ) ? \
645 ( ( ( 0x84 == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xAA ) ) ? 3 : 0 )\
646: ( ( ( 0xEF == ((U8*)s)[0] ) && ( 0xAC == ((U8*)s)[1] ) ) && ( ((U8*)s)[2] <= 0x86 ) ) ? 3 : 0 )
31f05a37
KW
647
648/*** GENERATED CODE ***/
649#define is_PROBLEMATIC_LOCALE_FOLD_cp(cp) \
c7c8bf55
KW
650( cp <= 0xFF || ( 0xFF < cp && \
651( 0x130 == cp || ( 0x130 < cp && \
652( 0x149 == cp || ( 0x149 < cp && \
653( 0x178 == cp || ( 0x178 < cp && \
654( 0x17F == cp || ( 0x17F < cp && \
655( 0x1F0 == cp || ( 0x1F0 < cp && \
656( 0x39C == cp || ( 0x39C < cp && \
657( 0x3BC == cp || ( 0x3BC < cp && \
658( ( 0x1E96 <= cp && cp <= 0x1E9A ) || ( 0x1E9A < cp && \
659( 0x1E9E == cp || ( 0x1E9E < cp && \
660( 0x212A == cp || ( 0x212A < cp && \
661( 0x212B == cp || ( 0xFB00 <= cp && cp <= 0xFB06 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )
31f05a37
KW
662
663/*
664 PROBLEMATIC_LOCALE_FOLDEDS_START: The first folded character of folds which are problematic under locale
665
666 \p{_Perl_Problematic_Locale_Foldeds_Start}
667*/
668/*** GENERATED CODE ***/
669#define is_PROBLEMATIC_LOCALE_FOLDEDS_START_utf8(s) \
c7c8bf55
KW
670( ( ((U8*)s)[0] <= 0x7F ) ? 1 \
671: ( ( ((U8*)s)[0] & 0xFE ) == 0xC2 ) ? \
31f05a37 672 2 \
c7c8bf55
KW
673: ( 0xC4 == ((U8*)s)[0] || 0xC7 == ((U8*)s)[0] ) ? \
674 ( ( 0xB0 == ((U8*)s)[1] ) ? 2 : 0 ) \
675: ( 0xC5 == ((U8*)s)[0] ) ? \
676 ( ( 0x89 == ((U8*)s)[1] || 0xB8 == ((U8*)s)[1] || 0xBF == ((U8*)s)[1] ) ? 2 : 0 )\
677: ( 0xCA == ((U8*)s)[0] ) ? \
678 ( ( 0xBC == ((U8*)s)[1] ) ? 2 : 0 ) \
679: ( 0xCE == ((U8*)s)[0] ) ? \
680 ( ( ( ((U8*)s)[1] & 0xDF ) == 0x9C ) ? 2 : 0 ) \
681: ( 0xE1 == ((U8*)s)[0] ) ? \
682 ( ( ( 0xBA == ((U8*)s)[1] ) && ( ( 0x96 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x9A ) || 0x9E == ((U8*)s)[2] ) ) ? 3 : 0 )\
683: ( 0xE2 == ((U8*)s)[0] ) ? \
684 ( ( ( 0x84 == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xAA ) ) ? 3 : 0 )\
685: ( ( ( 0xEF == ((U8*)s)[0] ) && ( 0xAC == ((U8*)s)[1] ) ) && ( ((U8*)s)[2] <= 0x86 ) ) ? 3 : 0 )
31f05a37
KW
686
687/*** GENERATED CODE ***/
688#define is_PROBLEMATIC_LOCALE_FOLDEDS_START_cp(cp) \
c7c8bf55
KW
689( cp <= 0xFF || ( 0xFF < cp && \
690( 0x130 == cp || ( 0x130 < cp && \
691( 0x149 == cp || ( 0x149 < cp && \
692( 0x178 == cp || ( 0x178 < cp && \
693( 0x17F == cp || ( 0x17F < cp && \
694( 0x1F0 == cp || ( 0x1F0 < cp && \
695( 0x2BC == cp || ( 0x2BC < cp && \
696( 0x39C == cp || ( 0x39C < cp && \
697( 0x3BC == cp || ( 0x3BC < cp && \
698( ( 0x1E96 <= cp && cp <= 0x1E9A ) || ( 0x1E9A < cp && \
699( 0x1E9E == cp || ( 0x1E9E < cp && \
700( 0x212A == cp || ( 0x212A < cp && \
701( 0x212B == cp || ( 0xFB00 <= cp && cp <= 0xFB06 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )
31f05a37
KW
702
703/*
0b50d62a
KW
704 PATWS: pattern white space
705
706 \p{PatWS}
707*/
708/*** GENERATED CODE ***/
0b50d62a 709#define is_PATWS_safe(s,e,is_utf8) \
5ab0c3af 710( ((e) > (s)) ? \
c7c8bf55 711 ( ( ( 0x09 <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x20 == ((U8*)s)[0] ) ? 1\
5ab0c3af 712 : (! is_utf8 ) ? \
c7c8bf55 713 ( 0x85 == ((U8*)s)[0] ) \
5ab0c3af 714 : (((e) - (s)) >= UTF8SKIP(s)) ? \
c7c8bf55
KW
715 ( ( 0xC2 == ((U8*)s)[0] ) ? \
716 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
717 : ( ( ( 0xE2 == ((U8*)s)[0] ) && ( 0x80 == ((U8*)s)[1] ) ) && ( ( ((U8*)s)[2] & 0xFE ) == 0x8E || ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
5ab0c3af 718 : 0 ) \
0b50d62a
KW
719: 0 )
720
721/*** GENERATED CODE ***/
722#define is_PATWS_cp(cp) \
c7c8bf55
KW
723( ( 0x09 <= cp && cp <= 0x0D ) || ( 0x0D < cp && \
724( 0x20 == cp || ( 0x20 < cp && \
725( 0x85 == cp || ( 0x85 < cp && \
726( 0x200E == cp || ( 0x200E < cp && \
727( 0x200F == cp || ( 0x200F < cp && \
728( 0x2028 == cp || 0x2029 == cp ) ) ) ) ) ) ) ) ) ) )
0b50d62a 729
8770da0e 730
d10c72f2
KW
731#endif /* H_REGCHARCLASS */
732
58fbde93 733/* ex: set ro: */