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