This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Change meaning of \v, \V, and add \h, \H to match Perl6, add \R to match PCRE and...
[perl5.git] / regcharclass.h
CommitLineData
e1d1eefb
YO
1/****** WARNING WARNING WARNING ********/
2/* */
3/* Autogenerated code, do not modify! */
4/* */
5/****** WARNING WARNING WARNING ********/
6
7/* LNBREAK Line Break: \j \J
8 Codepoints: 0x0A, 0x0B, 0x0C, 0x0D, 0x0D.0x0A, 0x85, 0x2028, 0x2029
9 */
10#define is_LNBREAK(s,is_utf8) /*** Line Break: \j \J ***/ \
11( ( ((U8*)s)[0]==13 ) ? \
12 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
13 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ? 1 : \
14( (is_utf8) ? \
15 ( ( ((U8*)s)[0]==194 ) ? \
16 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
17 (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\
18 ( ((U8*)s)[0]==133 ) ) ) )
19
20#define is_LNBREAK_safe(s,e,is_utf8) /*** Line Break: \j \J ***/ \
21( ( (e) - (s) > 2 ) ? \
22 ( ( ((U8*)s)[0]==13 ) ? \
23 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
24 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ? 1 : \
25( (is_utf8) ? \
26 ( ( ((U8*)s)[0]==194 ) ? \
27 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
28 (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\
29 ( ((U8*)s)[0]==133 ) ) ) ) : \
30( ( (e) - (s) > 1 ) ? \
31 ( ( ((U8*)s)[0]==13 ) ? \
32 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
33 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ? 1 : \
34( (is_utf8) ? \
35 ((( ((U8*)s)[0]==194 ) && ( ((U8*)s)[1]==133 )) ? 2 : 0) : \
36 ( ((U8*)s)[0]==133 ) ) ) ) : \
37( ( (e) - (s) > 0 ) ? \
38 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \
39( (!is_utf8) ? \
40 ( ((U8*)s)[0]==133 ) : 0 ) ) : 0 ) ) )
41
42#define is_LNBREAK_utf8(s) /*** Line Break: \j \J ***/ \
43( ( ((U8*)s)[0]==194 ) ? \
44 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
45 ( ( ((U8*)s)[0]==226 ) ? \
46 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\
47 ( ( ((U8*)s)[0]==13 ) ? \
48 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
49 (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ) ) )
50
51#define is_LNBREAK_utf8_safe(s,e) /*** Line Break: \j \J ***/ \
52( ( (e) - (s) > 2 ) ? \
53 ( ( ((U8*)s)[0]==194 ) ? \
54 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
55 ( ( ((U8*)s)[0]==226 ) ? \
56 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\
57 ( ( ((U8*)s)[0]==13 ) ? \
58 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
59 (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ) ) ) : \
60( ( (e) - (s) > 1 ) ? \
61 ( ( ((U8*)s)[0]==194 ) ? \
62 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
63 ( ( ((U8*)s)[0]==13 ) ? \
64 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
65 (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ) ) : \
66( ( (e) - (s) > 0 ) ? \
67 (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) : 0 ) ) )
68
69#define is_LNBREAK_latin1(s) /*** Line Break: \j \J ***/ \
70( ( ((U8*)s)[0]==13 ) ? \
71 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
72 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) || ((U8*)s)[0]==133 ) )
73
74#define is_LNBREAK_latin1_safe(s,e) /*** Line Break: \j \J ***/ \
75( ( (e) - (s) > 1 ) ? \
76 ( ( ((U8*)s)[0]==13 ) ? \
77 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
78 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) || ((U8*)s)[0]==133 ) ) : \
79( ( (e) - (s) > 0 ) ? \
80 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) || ((U8*)s)[0]==133 ) : 0 ) )
81
82#define is_LNBREAK_cp(cp) /*** Line Break: \j \J ***/ \
83( (10<=cp && cp<=13) || ( cp > 13 && ( cp==133 || ( cp > 133 && ( cp==8232 || ( cp > 8232 && cp==8233 ) ) ) ) ) )
84
85/****** WARNING WARNING WARNING ********/
86/* */
87/* Autogenerated code, do not modify! */
88/* */
89/****** WARNING WARNING WARNING ********/
90
91/* HORIZWS Horizontal Whitespace: \h \H
92 Codepoints: 0x09, 0x20, 0xA0, 0x1680, 0x180E, 0x2000, 0x2001, 0x2002,
93 0x2003, 0x2004, 0x2005, 0x2006, 0x2007, 0x2008, 0x2009, 0x200A, 0x202F,
94 0x205F, 0x3000
95 */
96#define is_HORIZWS(s,is_utf8) /*** Horizontal Whitespace: \h \H ***/ \
97( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \
98( (is_utf8) ? \
99 ( ( ((U8*)s)[0]==194 ) ? \
100 ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \
101 ( ( ((U8*)s)[0]==225 ) ? \
102 ( ( ((U8*)s)[1]==160 ) ? \
103 ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \
104 ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \
105 ( ( ((U8*)s)[0]==226 ) ? \
106 ( ( ((U8*)s)[1]==129 ) ? \
107 ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \
108 ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\
109 (((( ((U8*)s)[0]==227 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) ) ) :\
110 ( ((U8*)s)[0]==160 ) ) )
111
112#define is_HORIZWS_safe(s,e,is_utf8) /*** Horizontal Whitespace: \h \H ***/ \
113( ( (e) - (s) > 2 ) ? \
114 ( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \
115( (is_utf8) ? \
116 ( ( ((U8*)s)[0]==194 ) ? \
117 ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \
118 ( ( ((U8*)s)[0]==225 ) ? \
119 ( ( ((U8*)s)[1]==160 ) ? \
120 ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \
121 ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \
122 ( ( ((U8*)s)[0]==226 ) ? \
123 ( ( ((U8*)s)[1]==129 ) ? \
124 ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \
125 ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\
126 (((( ((U8*)s)[0]==227 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) ) ) :\
127 ( ((U8*)s)[0]==160 ) ) ) : \
128( ( (e) - (s) > 1 ) ? \
129 ( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \
130( (is_utf8) ? \
131 ((( ((U8*)s)[0]==194 ) && ( ((U8*)s)[1]==160 )) ? 2 : 0) : \
132 ( ((U8*)s)[0]==160 ) ) ) : \
133( ( (e) - (s) > 0 ) ? \
134 ( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \
135( (!is_utf8) ? \
136 ( ((U8*)s)[0]==160 ) : 0 ) ) : 0 ) ) )
137
138#define is_HORIZWS_utf8(s) /*** Horizontal Whitespace: \h \H ***/ \
139( ( ((U8*)s)[0]==194 ) ? \
140 ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \
141 ( ( ((U8*)s)[0]==225 ) ? \
142 ( ( ((U8*)s)[1]==160 ) ? \
143 ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \
144 ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \
145 ( ( ((U8*)s)[0]==226 ) ? \
146 ( ( ((U8*)s)[1]==129 ) ? \
147 ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \
148 ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\
149 ( ( ((U8*)s)[0]==227 ) ? \
150 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) : \
151 ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ) ) ) )
152
153#define is_HORIZWS_utf8_safe(s,e) /*** Horizontal Whitespace: \h \H ***/ \
154( ( (e) - (s) > 2 ) ? \
155 ( ( ((U8*)s)[0]==194 ) ? \
156 ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \
157 ( ( ((U8*)s)[0]==225 ) ? \
158 ( ( ((U8*)s)[1]==160 ) ? \
159 ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \
160 ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \
161 ( ( ((U8*)s)[0]==226 ) ? \
162 ( ( ((U8*)s)[1]==129 ) ? \
163 ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \
164 ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\
165 ( ( ((U8*)s)[0]==227 ) ? \
166 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) : \
167 ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ) ) ) ) : \
168( ( (e) - (s) > 1 ) ? \
169 ( ( ((U8*)s)[0]==194 ) ? \
170 ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \
171 ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ) : \
172( ( (e) - (s) > 0 ) ? \
173 ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) : 0 ) ) )
174
175#define is_HORIZWS_latin1(s) /*** Horizontal Whitespace: \h \H ***/ \
176( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 || ((U8*)s)[0]==160 )
177
178#define is_HORIZWS_latin1_safe(s,e) /*** Horizontal Whitespace: \h \H ***/ \
179( ( (e) - (s) > 0 ) ? \
180 ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 || ((U8*)s)[0]==160 ) : 0 )
181
182#define is_HORIZWS_cp(cp) /*** Horizontal Whitespace: \h \H ***/ \
183( cp==9 || ( cp > 9 && ( cp==32 || ( cp > 32 && ( cp==160 || ( cp > 160 && ( cp==5760 || ( cp > 5760 && ( cp==6158 || ( cp > 6158 && ( (8192<=cp && cp<=8202) || ( cp > 8202 && ( cp==8239 || ( cp > 8239 && ( cp==8287 || ( cp > 8287 && cp==12288 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )
184
185/****** WARNING WARNING WARNING ********/
186/* */
187/* Autogenerated code, do not modify! */
188/* */
189/****** WARNING WARNING WARNING ********/
190
191/* VERTWS Vertical Whitespace: \v \V
192 Codepoints: 0x0A, 0x0B, 0x0C, 0x0D, 0x85, 0x2028, 0x2029
193 */
194#define is_VERTWS(s,is_utf8) /*** Vertical Whitespace: \v \V ***/ \
195( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \
196( (is_utf8) ? \
197 ( ( ((U8*)s)[0]==194 ) ? \
198 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
199 (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\
200 ( ((U8*)s)[0]==133 ) ) )
201
202#define is_VERTWS_safe(s,e,is_utf8) /*** Vertical Whitespace: \v \V ***/ \
203( ( (e) - (s) > 2 ) ? \
204 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \
205( (is_utf8) ? \
206 ( ( ((U8*)s)[0]==194 ) ? \
207 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
208 (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\
209 ( ((U8*)s)[0]==133 ) ) ) : \
210( ( (e) - (s) > 1 ) ? \
211 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \
212( (is_utf8) ? \
213 ((( ((U8*)s)[0]==194 ) && ( ((U8*)s)[1]==133 )) ? 2 : 0) : \
214 ( ((U8*)s)[0]==133 ) ) ) : \
215( ( (e) - (s) > 0 ) ? \
216 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \
217( (!is_utf8) ? \
218 ( ((U8*)s)[0]==133 ) : 0 ) ) : 0 ) ) )
219
220#define is_VERTWS_utf8(s) /*** Vertical Whitespace: \v \V ***/ \
221( ( ((U8*)s)[0]==194 ) ? \
222 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
223 ( ( ((U8*)s)[0]==226 ) ? \
224 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\
225 (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ) )
226
227#define is_VERTWS_utf8_safe(s,e) /*** Vertical Whitespace: \v \V ***/ \
228( ( (e) - (s) > 2 ) ? \
229 ( ( ((U8*)s)[0]==194 ) ? \
230 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
231 ( ( ((U8*)s)[0]==226 ) ? \
232 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\
233 (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ) ) : \
234( ( (e) - (s) > 1 ) ? \
235 ( ( ((U8*)s)[0]==194 ) ? \
236 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
237 (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ) : \
238( ( (e) - (s) > 0 ) ? \
239 (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) : 0 ) ) )
240
241#define is_VERTWS_latin1(s) /*** Vertical Whitespace: \v \V ***/ \
242( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) || ((U8*)s)[0]==133 )
243
244#define is_VERTWS_latin1_safe(s,e) /*** Vertical Whitespace: \v \V ***/ \
245( ( (e) - (s) > 0 ) ? \
246 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) || ((U8*)s)[0]==133 ) : 0 )
247
248#define is_VERTWS_cp(cp) /*** Vertical Whitespace: \v \V ***/ \
249( (10<=cp && cp<=13) || ( cp > 13 && ( cp==133 || ( cp > 133 && ( cp==8232 || ( cp > 8232 && cp==8233 ) ) ) ) ) )
250