This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regen/regcharclass.pl: Add optimization
[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
RGS
12 * Any changes made here will be lost!
13 */
12b72891 14
d10c72f2
KW
15
16#ifndef H_REGCHARCLASS /* Guard against nested #includes */
17#define H_REGCHARCLASS 1
18
12b72891
RGS
19/*
20 LNBREAK: Line Break: \R
21
58fbde93 22 "\x0D\x0A" # CRLF - Network (Windows) line ending
05b688d9 23 \p{VertSpace}
12b72891
RGS
24*/
25/*** GENERATED CODE ***/
26#define is_LNBREAK(s,is_utf8) \
e64b1bd1
YO
27( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
28: ( 0x0D == ((U8*)s)[0] ) ? \
29 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
30: ( is_utf8 ) ? \
31 ( ( 0xC2 == ((U8*)s)[0] ) ? \
32 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
33 : ( 0xE2 == ((U8*)s)[0] ) ? \
2efb8143 34 ( ( ( 0x80 == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
e64b1bd1
YO
35 : 0 ) \
36: ( 0x85 == ((U8*)s)[0] ) )
e1d1eefb 37
12b72891
RGS
38/*** GENERATED CODE ***/
39#define is_LNBREAK_safe(s,e,is_utf8) \
e64b1bd1
YO
40( ((e)-(s) > 2) ? \
41 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
42 : ( 0x0D == ((U8*)s)[0] ) ? \
43 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
44 : ( is_utf8 ) ? \
45 ( ( 0xC2 == ((U8*)s)[0] ) ? \
46 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
47 : ( 0xE2 == ((U8*)s)[0] ) ? \
2efb8143 48 ( ( ( 0x80 == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
e64b1bd1
YO
49 : 0 ) \
50 : ( 0x85 == ((U8*)s)[0] ) ) \
51: ((e)-(s) > 1) ? \
52 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
53 : ( 0x0D == ((U8*)s)[0] ) ? \
54 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
55 : ( is_utf8 ) ? \
56 ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \
57 : ( 0x85 == ((U8*)s)[0] ) ) \
58: ((e)-(s) > 0) ? \
59 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \
60 : ( !( is_utf8 ) ) ? \
61 ( 0x85 == ((U8*)s)[0] ) \
62 : 0 ) \
63: 0 )
e1d1eefb 64
12b72891
RGS
65/*** GENERATED CODE ***/
66#define is_LNBREAK_utf8(s) \
e64b1bd1
YO
67( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
68: ( 0x0D == ((U8*)s)[0] ) ? \
69 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
70: ( 0xC2 == ((U8*)s)[0] ) ? \
71 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
72: ( 0xE2 == ((U8*)s)[0] ) ? \
2efb8143 73 ( ( ( 0x80 == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
e64b1bd1 74: 0 )
e1d1eefb 75
12b72891
RGS
76/*** GENERATED CODE ***/
77#define is_LNBREAK_utf8_safe(s,e) \
e64b1bd1
YO
78( ((e)-(s) > 2) ? \
79 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
80 : ( 0x0D == ((U8*)s)[0] ) ? \
81 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
82 : ( 0xC2 == ((U8*)s)[0] ) ? \
83 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
84 : ( 0xE2 == ((U8*)s)[0] ) ? \
2efb8143 85 ( ( ( 0x80 == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
e64b1bd1
YO
86 : 0 ) \
87: ((e)-(s) > 1) ? \
88 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
89 : ( 0x0D == ((U8*)s)[0] ) ? \
90 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
91 : ( 0xC2 == ((U8*)s)[0] ) ? \
92 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
93 : 0 ) \
94: ((e)-(s) > 0) ? \
95 ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) \
96: 0 )
e1d1eefb 97
12b72891
RGS
98/*** GENERATED CODE ***/
99#define is_LNBREAK_latin1(s) \
e64b1bd1
YO
100( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
101: ( 0x0D == ((U8*)s)[0] ) ? \
102 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
103: ( 0x85 == ((U8*)s)[0] ) )
e1d1eefb 104
12b72891
RGS
105/*** GENERATED CODE ***/
106#define is_LNBREAK_latin1_safe(s,e) \
e64b1bd1
YO
107( ((e)-(s) > 1) ? \
108 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \
109 : ( 0x0D == ((U8*)s)[0] ) ? \
110 ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \
111 : ( 0x85 == ((U8*)s)[0] ) ) \
112: ((e)-(s) > 0) ? \
113 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] )\
114: 0 )
12b72891
RGS
115
116/*
117 HORIZWS: Horizontal Whitespace: \h \H
118
05b688d9 119 \p{HorizSpace}
12b72891
RGS
120*/
121/*** GENERATED CODE ***/
122#define is_HORIZWS(s,is_utf8) \
e64b1bd1
YO
123( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \
124: ( is_utf8 ) ? \
125 ( ( 0xC2 == ((U8*)s)[0] ) ? \
126 ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \
127 : ( 0xE1 == ((U8*)s)[0] ) ? \
128 ( ( 0x9A == ((U8*)s)[1] ) ? \
129 ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \
130 : ( 0xA0 == ((U8*)s)[1] ) ? \
131 ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \
132 : 0 ) \
133 : ( 0xE2 == ((U8*)s)[0] ) ? \
134 ( ( 0x80 == ((U8*)s)[1] ) ? \
135 ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\
136 : ( 0x81 == ((U8*)s)[1] ) ? \
137 ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \
138 : 0 ) \
139 : ( 0xE3 == ((U8*)s)[0] ) ? \
140 ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
141 : 0 ) \
142: ( 0xA0 == ((U8*)s)[0] ) )
e1d1eefb 143
12b72891
RGS
144/*** GENERATED CODE ***/
145#define is_HORIZWS_safe(s,e,is_utf8) \
e64b1bd1
YO
146( ((e)-(s) > 2) ? \
147 ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \
148 : ( is_utf8 ) ? \
149 ( ( 0xC2 == ((U8*)s)[0] ) ? \
150 ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \
151 : ( 0xE1 == ((U8*)s)[0] ) ? \
152 ( ( 0x9A == ((U8*)s)[1] ) ? \
153 ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \
154 : ( 0xA0 == ((U8*)s)[1] ) ? \
155 ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \
156 : 0 ) \
157 : ( 0xE2 == ((U8*)s)[0] ) ? \
158 ( ( 0x80 == ((U8*)s)[1] ) ? \
159 ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\
160 : ( 0x81 == ((U8*)s)[1] ) ? \
161 ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \
162 : 0 ) \
163 : ( 0xE3 == ((U8*)s)[0] ) ? \
164 ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 )\
165 : 0 ) \
166 : ( 0xA0 == ((U8*)s)[0] ) ) \
167: ((e)-(s) > 1) ? \
168 ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \
169 : ( is_utf8 ) ? \
170 ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0xA0 == ((U8*)s)[1] ) ) ? 2 : 0 ) \
171 : ( 0xA0 == ((U8*)s)[0] ) ) \
172: ((e)-(s) > 0) ? \
173 ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \
174 : ( !( is_utf8 ) ) ? \
175 ( 0xA0 == ((U8*)s)[0] ) \
176 : 0 ) \
177: 0 )
e1d1eefb 178
12b72891
RGS
179/*** GENERATED CODE ***/
180#define is_HORIZWS_utf8(s) \
e64b1bd1
YO
181( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \
182: ( 0xC2 == ((U8*)s)[0] ) ? \
183 ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \
184: ( 0xE1 == ((U8*)s)[0] ) ? \
185 ( ( 0x9A == ((U8*)s)[1] ) ? \
186 ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \
187 : ( 0xA0 == ((U8*)s)[1] ) ? \
188 ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \
189 : 0 ) \
190: ( 0xE2 == ((U8*)s)[0] ) ? \
191 ( ( 0x80 == ((U8*)s)[1] ) ? \
6e130234 192 ( ( ( ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 ) \
e64b1bd1
YO
193 : ( 0x81 == ((U8*)s)[1] ) ? \
194 ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \
195 : 0 ) \
196: ( 0xE3 == ((U8*)s)[0] ) ? \
197 ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
198: 0 )
e1d1eefb 199
12b72891
RGS
200/*** GENERATED CODE ***/
201#define is_HORIZWS_utf8_safe(s,e) \
e64b1bd1
YO
202( ((e)-(s) > 2) ? \
203 ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \
204 : ( 0xC2 == ((U8*)s)[0] ) ? \
205 ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \
206 : ( 0xE1 == ((U8*)s)[0] ) ? \
207 ( ( 0x9A == ((U8*)s)[1] ) ? \
208 ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \
209 : ( 0xA0 == ((U8*)s)[1] ) ? \
210 ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \
211 : 0 ) \
212 : ( 0xE2 == ((U8*)s)[0] ) ? \
213 ( ( 0x80 == ((U8*)s)[1] ) ? \
214 ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\
215 : ( 0x81 == ((U8*)s)[1] ) ? \
216 ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \
217 : 0 ) \
218 : ( 0xE3 == ((U8*)s)[0] ) ? \
219 ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \
220 : 0 ) \
221: ((e)-(s) > 1) ? \
222 ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \
223 : ( 0xC2 == ((U8*)s)[0] ) ? \
224 ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \
225 : 0 ) \
226: ((e)-(s) > 0) ? \
227 ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) \
228: 0 )
e1d1eefb 229
12b72891
RGS
230/*** GENERATED CODE ***/
231#define is_HORIZWS_latin1(s) \
e64b1bd1 232( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] || 0xA0 == ((U8*)s)[0] )
e1d1eefb 233
12b72891
RGS
234/*** GENERATED CODE ***/
235#define is_HORIZWS_latin1_safe(s,e) \
e64b1bd1
YO
236( ((e)-(s) > 0) ? \
237 ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] || 0xA0 == ((U8*)s)[0] ) \
238: 0 )
e1d1eefb 239
12b72891
RGS
240/*** GENERATED CODE ***/
241#define is_HORIZWS_cp(cp) \
e64b1bd1
YO
242( 0x09 == cp || ( 0x09 < cp && \
243( 0x20 == cp || ( 0x20 < cp && \
244( 0xA0 == cp || ( 0xA0 < cp && \
245( 0x1680 == cp || ( 0x1680 < cp && \
246( 0x180E == cp || ( 0x180E < cp && \
247( ( 0x2000 <= cp && cp <= 0x200A ) || ( 0x200A < cp && \
248( 0x202F == cp || ( 0x202F < cp && \
249( 0x205F == cp || ( 0x205F < cp && \
2500x3000 == cp ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )
e1d1eefb 251
12b72891
RGS
252/*
253 VERTWS: Vertical Whitespace: \v \V
e1d1eefb 254
05b688d9 255 \p{VertSpace}
12b72891
RGS
256*/
257/*** GENERATED CODE ***/
258#define is_VERTWS(s,is_utf8) \
e64b1bd1
YO
259( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \
260: ( is_utf8 ) ? \
261 ( ( 0xC2 == ((U8*)s)[0] ) ? \
262 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
263 : ( 0xE2 == ((U8*)s)[0] ) ? \
2efb8143 264 ( ( ( 0x80 == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
e64b1bd1
YO
265 : 0 ) \
266: ( 0x85 == ((U8*)s)[0] ) )
e1d1eefb 267
12b72891
RGS
268/*** GENERATED CODE ***/
269#define is_VERTWS_safe(s,e,is_utf8) \
e64b1bd1
YO
270( ((e)-(s) > 2) ? \
271 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \
272 : ( is_utf8 ) ? \
273 ( ( 0xC2 == ((U8*)s)[0] ) ? \
274 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
275 : ( 0xE2 == ((U8*)s)[0] ) ? \
2efb8143 276 ( ( ( 0x80 == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
e64b1bd1
YO
277 : 0 ) \
278 : ( 0x85 == ((U8*)s)[0] ) ) \
279: ((e)-(s) > 1) ? \
280 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \
281 : ( is_utf8 ) ? \
282 ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \
283 : ( 0x85 == ((U8*)s)[0] ) ) \
284: ((e)-(s) > 0) ? \
285 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \
286 : ( !( is_utf8 ) ) ? \
287 ( 0x85 == ((U8*)s)[0] ) \
288 : 0 ) \
289: 0 )
e1d1eefb 290
12b72891
RGS
291/*** GENERATED CODE ***/
292#define is_VERTWS_utf8(s) \
e64b1bd1
YO
293( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \
294: ( 0xC2 == ((U8*)s)[0] ) ? \
295 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
296: ( 0xE2 == ((U8*)s)[0] ) ? \
2efb8143 297 ( ( ( 0x80 == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
e64b1bd1 298: 0 )
e1d1eefb 299
12b72891
RGS
300/*** GENERATED CODE ***/
301#define is_VERTWS_utf8_safe(s,e) \
e64b1bd1
YO
302( ((e)-(s) > 2) ? \
303 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \
304 : ( 0xC2 == ((U8*)s)[0] ) ? \
305 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
306 : ( 0xE2 == ((U8*)s)[0] ) ? \
2efb8143 307 ( ( ( 0x80 == ((U8*)s)[1] ) && ( ( ((U8*)s)[2] & 0xFE ) == 0xA8 ) ) ? 3 : 0 )\
e64b1bd1
YO
308 : 0 ) \
309: ((e)-(s) > 1) ? \
310 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \
311 : ( 0xC2 == ((U8*)s)[0] ) ? \
312 ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \
313 : 0 ) \
314: ((e)-(s) > 0) ? \
315 ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) \
316: 0 )
e1d1eefb 317
12b72891
RGS
318/*** GENERATED CODE ***/
319#define is_VERTWS_latin1(s) \
e64b1bd1 320( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] )
e1d1eefb 321
12b72891
RGS
322/*** GENERATED CODE ***/
323#define is_VERTWS_latin1_safe(s,e) \
e64b1bd1
YO
324( ((e)-(s) > 0) ? \
325 ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] )\
326: 0 )
e1d1eefb 327
12b72891
RGS
328/*** GENERATED CODE ***/
329#define is_VERTWS_cp(cp) \
e64b1bd1
YO
330( ( 0x0A <= cp && cp <= 0x0D ) || ( 0x0D < cp && \
331( 0x85 == cp || ( 0x85 < cp && \
332( 0x2028 == cp || ( 0x2028 < cp && \
3330x2029 == cp ) ) ) ) ) )
e1d1eefb 334
612ead59
KW
335/*
336 GCB_L: Grapheme_Cluster_Break=L
337
338 \p{_X_GCB_L}
339*/
340/*** GENERATED CODE ***/
341#define is_GCB_L_utf8(s) \
342( ( 0xE1 == ((U8*)s)[0] ) ? \
343 ( ( 0x84 == ((U8*)s)[1] ) ? \
6e130234 344 3 \
612ead59 345 : ( 0x85 == ((U8*)s)[1] ) ? \
6e130234 346 ( ( ((U8*)s)[2] <= 0x9F ) ? 3 : 0 ) \
612ead59
KW
347 : 0 ) \
348: ( 0xEA == ((U8*)s)[0] ) ? \
349 ( ( ( 0xA5 == ((U8*)s)[1] ) && ( 0xA0 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBC ) ) ? 3 : 0 )\
350: 0 )
351
352/*
353 GCB_LV_LVT_V: Grapheme_Cluster_Break=(LV or LVT or V)
354
355 \p{_X_LV_LVT_V}
356*/
357/*** GENERATED CODE ***/
358#define is_GCB_LV_LVT_V_utf8(s) \
359( ( 0xE1 == ((U8*)s)[0] ) ? \
360 ( ( 0x85 == ((U8*)s)[1] ) ? \
6e130234 361 ( ( ((U8*)s)[2] >= 0xA0 ) ? 3 : 0 ) \
612ead59 362 : ( 0x86 == ((U8*)s)[1] ) ? \
6e130234 363 ( ( ((U8*)s)[2] <= 0xA7 ) ? 3 : 0 ) \
612ead59
KW
364 : 0 ) \
365: ( 0xEA == ((U8*)s)[0] ) ? \
6e130234
KW
366 ( ( ((U8*)s)[1] >= 0xB0 ) ? \
367 3 \
368 : 0 ) \
612ead59 369: ( 0xEB == ((U8*)s)[0] || 0xEC == ((U8*)s)[0] ) ? \
6e130234 370 3 \
612ead59 371: ( 0xED == ((U8*)s)[0] ) ? \
6e130234
KW
372 ( ( ((U8*)s)[1] <= 0x9D ) ? \
373 3 \
612ead59 374 : ( 0x9E == ((U8*)s)[1] ) ? \
6e130234 375 ( ( ( ((U8*)s)[2] <= 0xA3 ) || ( ((U8*)s)[2] >= 0xB0 ) ) ? 3 : 0 ) \
612ead59 376 : ( 0x9F == ((U8*)s)[1] ) ? \
6e130234 377 ( ( ((U8*)s)[2] <= 0x86 ) ? 3 : 0 ) \
612ead59
KW
378 : 0 ) \
379: 0 )
380
381/*
382 GCB_Prepend: Grapheme_Cluster_Break=Prepend
383
384 \p{_X_GCB_Prepend}
385*/
386/*** GENERATED CODE ***/
387#define is_GCB_Prepend_utf8(s) \
388( 0 )
389
390/*
391 GCB_RI: Grapheme_Cluster_Break=RI
392
393 \p{_X_RI}
394*/
395/*** GENERATED CODE ***/
396#define is_GCB_RI_utf8(s) \
6e130234 397( ( ( ( ( 0xF0 == ((U8*)s)[0] ) && ( 0x9F == ((U8*)s)[1] ) ) && ( 0x87 == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xA6 ) ) ? 4 : 0 )
612ead59
KW
398
399/*
400 GCB_SPECIAL_BEGIN: Grapheme_Cluster_Break=special_begins
401
402 \p{_X_Special_Begin}
403*/
404/*** GENERATED CODE ***/
405#define is_GCB_SPECIAL_BEGIN_utf8(s) \
6e130234
KW
406( ( 0xE1 == ((U8*)s)[0] ) ? \
407 ( ( ( ((U8*)s)[1] & 0xFC ) == 0x84 ) ? \
408 3 \
409 : 0 ) \
612ead59
KW
410: ( 0xEA == ((U8*)s)[0] ) ? \
411 ( ( 0xA5 == ((U8*)s)[1] ) ? \
412 ( ( 0xA0 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBC ) ? 3 : 0 ) \
6e130234
KW
413 : ( ((U8*)s)[1] >= 0xB0 ) ? \
414 3 \
612ead59
KW
415 : 0 ) \
416: ( 0xEB == ((U8*)s)[0] || 0xEC == ((U8*)s)[0] ) ? \
6e130234 417 3 \
612ead59 418: ( 0xED == ((U8*)s)[0] ) ? \
6e130234
KW
419 ( ( ((U8*)s)[1] <= 0x9D ) ? \
420 3 \
612ead59 421 : ( 0x9E == ((U8*)s)[1] ) ? \
6e130234 422 ( ( ( ((U8*)s)[2] <= 0xA3 ) || ( ((U8*)s)[2] >= 0xB0 ) ) ? 3 : 0 ) \
612ead59 423 : ( 0x9F == ((U8*)s)[1] ) ? \
6e130234 424 ( ( ( ((U8*)s)[2] <= 0x86 ) || ( 0x8B <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBB ) ) ? 3 : 0 )\
612ead59
KW
425 : 0 ) \
426: ( 0xF0 == ((U8*)s)[0] ) ? \
6e130234 427 ( ( ( ( 0x9F == ((U8*)s)[1] ) && ( 0x87 == ((U8*)s)[2] ) ) && ( ((U8*)s)[3] >= 0xA6 ) ) ? 4 : 0 )\
612ead59
KW
428: 0 )
429
430/*
431 GCB_T: Grapheme_Cluster_Break=T
432
433 \p{_X_GCB_T}
434*/
435/*** GENERATED CODE ***/
436#define is_GCB_T_utf8(s) \
437( ( 0xE1 == ((U8*)s)[0] ) ? \
438 ( ( 0x86 == ((U8*)s)[1] ) ? \
6e130234 439 ( ( ((U8*)s)[2] >= 0xA8 ) ? 3 : 0 ) \
612ead59 440 : ( 0x87 == ((U8*)s)[1] ) ? \
6e130234 441 3 \
612ead59
KW
442 : 0 ) \
443: ( 0xED == ((U8*)s)[0] ) ? \
444 ( ( ( 0x9F == ((U8*)s)[1] ) && ( 0x8B <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xBB ) ) ? 3 : 0 )\
445: 0 )
446
447/*
448 GCB_V: Grapheme_Cluster_Break=V
449
450 \p{_X_GCB_V}
451*/
452/*** GENERATED CODE ***/
453#define is_GCB_V_utf8(s) \
454( ( 0xE1 == ((U8*)s)[0] ) ? \
455 ( ( 0x85 == ((U8*)s)[1] ) ? \
6e130234 456 ( ( ((U8*)s)[2] >= 0xA0 ) ? 3 : 0 ) \
612ead59 457 : ( 0x86 == ((U8*)s)[1] ) ? \
6e130234 458 ( ( ((U8*)s)[2] <= 0xA7 ) ? 3 : 0 ) \
612ead59
KW
459 : 0 ) \
460: ( 0xED == ((U8*)s)[0] ) ? \
461 ( ( 0x9E == ((U8*)s)[1] ) ? \
6e130234 462 ( ( ((U8*)s)[2] >= 0xB0 ) ? 3 : 0 ) \
612ead59 463 : ( 0x9F == ((U8*)s)[1] ) ? \
6e130234 464 ( ( ((U8*)s)[2] <= 0x86 ) ? 3 : 0 ) \
612ead59
KW
465 : 0 ) \
466: 0 )
467
685289b5
KW
468/*
469 QUOTEMETA: Meta-characters that \Q should quote
470
471 \p{_Perl_Quotemeta}
472*/
473/*** GENERATED CODE ***/
474#define is_QUOTEMETA_high(s) \
475( ( 0xCD == ((U8*)s)[0] ) ? \
476 ( ( 0x8F == ((U8*)s)[1] ) ? 2 : 0 ) \
477: ( 0xE1 == ((U8*)s)[0] ) ? \
478 ( ( 0x85 == ((U8*)s)[1] ) ? \
479 ( ( 0x9F == ((U8*)s)[2] || 0xA0 == ((U8*)s)[2] ) ? 3 : 0 ) \
480 : ( 0x9A == ((U8*)s)[1] ) ? \
481 ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \
482 : ( 0x9E == ((U8*)s)[1] ) ? \
2efb8143 483 ( ( ( ((U8*)s)[2] & 0xFE ) == 0xB4 ) ? 3 : 0 ) \
685289b5
KW
484 : ( 0xA0 == ((U8*)s)[1] ) ? \
485 ( ( 0x8B <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8E ) ? 3 : 0 ) \
486 : 0 ) \
487: ( 0xE2 == ((U8*)s)[0] ) ? \
488 ( ( 0x80 == ((U8*)s)[1] ) ? \
6e130234 489 ( ( ((U8*)s)[2] <= 0xBE ) ? 3 : 0 ) \
685289b5
KW
490 : ( 0x81 == ((U8*)s)[1] ) ? \
491 ( ( ( 0x81 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x93 ) || ( 0x95 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xAF ) ) ? 3 : 0 )\
492 : ( 0x86 == ((U8*)s)[1] ) ? \
6e130234 493 ( ( ((U8*)s)[2] >= 0x90 ) ? 3 : 0 ) \
685289b5 494 : ( 0x87 <= ((U8*)s)[1] && ((U8*)s)[1] <= 0x90 ) ? \
6e130234 495 3 \
685289b5 496 : ( 0x91 == ((U8*)s)[1] ) ? \
6e130234 497 ( ( ((U8*)s)[2] <= 0x9F ) ? 3 : 0 ) \
685289b5 498 : ( 0x94 <= ((U8*)s)[1] && ((U8*)s)[1] <= 0x9C ) ? \
6e130234 499 3 \
685289b5 500 : ( 0x9D == ((U8*)s)[1] ) ? \
6e130234 501 ( ( ((U8*)s)[2] <= 0xB5 ) ? 3 : 0 ) \
685289b5 502 : ( 0x9E == ((U8*)s)[1] ) ? \
6e130234 503 ( ( ((U8*)s)[2] >= 0x94 ) ? 3 : 0 ) \
f5772832 504 : ( ( 0x9F <= ((U8*)s)[1] && ((U8*)s)[1] <= 0xAF ) || ( ((U8*)s)[1] & 0xFE ) == 0xB8 ) ?\
6e130234 505 3 \
685289b5
KW
506 : 0 ) \
507: ( 0xE3 == ((U8*)s)[0] ) ? \
508 ( ( 0x80 == ((U8*)s)[1] ) ? \
6e130234 509 ( ( ( ((U8*)s)[2] <= 0x83 ) || ( 0x88 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xA0 ) || 0xB0 == ((U8*)s)[2] ) ? 3 : 0 )\
685289b5
KW
510 : ( 0x85 == ((U8*)s)[1] ) ? \
511 ( ( 0xA4 == ((U8*)s)[2] ) ? 3 : 0 ) \
512 : 0 ) \
513: ( 0xEF == ((U8*)s)[0] ) ? \
514 ( ( 0xB4 == ((U8*)s)[1] ) ? \
6e130234 515 ( ( ((U8*)s)[2] >= 0xBE ) ? 3 : 0 ) \
685289b5 516 : ( 0xB8 == ((U8*)s)[1] ) ? \
6e130234 517 ( ( ((U8*)s)[2] <= 0x8F ) ? 3 : 0 ) \
685289b5
KW
518 : ( 0xB9 == ((U8*)s)[1] ) ? \
519 ( ( 0x85 == ((U8*)s)[2] || 0x86 == ((U8*)s)[2] ) ? 3 : 0 ) \
520 : ( 0xBB == ((U8*)s)[1] ) ? \
521 ( ( 0xBF == ((U8*)s)[2] ) ? 3 : 0 ) \
522 : ( 0xBE == ((U8*)s)[1] ) ? \
523 ( ( 0xA0 == ((U8*)s)[2] ) ? 3 : 0 ) \
524 : ( 0xBF == ((U8*)s)[1] ) ? \
525 ( ( 0xB0 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0xB8 ) ? 3 : 0 ) \
526 : 0 ) \
527: ( 0xF0 == ((U8*)s)[0] ) ? \
528 ( ( ( ( 0x9D == ((U8*)s)[1] ) && ( 0x85 == ((U8*)s)[2] ) ) && ( 0xB3 <= ((U8*)s)[3] && ((U8*)s)[3] <= 0xBA ) ) ? 4 : 0 )\
529: ( 0xF3 == ((U8*)s)[0] ) ? \
6e130234
KW
530 ( ( 0xA0 == ((U8*)s)[1] ) ? \
531 4 \
532 : 0 ) \
685289b5
KW
533: 0 )
534
8770da0e 535
d10c72f2
KW
536#endif /* H_REGCHARCLASS */
537
58fbde93 538/* ex: set ro: */