This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add Yves Orton's script to regenerate regcharclass.h
[perl5.git] / regcharclass.h
CommitLineData
12b72891
RGS
1/*********************** WARNING WARNING WARNING ************************
2
3Do not modify this code directly: This file was autogenerated by
4
5 Porting/regcharclass.pl
6
7from data contained within the script. Change the script instead.
8
9Generated at: Mon Apr 23 11:33:52 2007 GMT
10
11************************ WARNING WARNING WARNING ************************/
12
13/*
14 LNBREAK: Line Break: \R
15
16 "\x0D\x0A" # CRLF - Network (Windows) line ending
17 0x0A # LF | LINE FEED
18 0x0B # VT | VERTICAL TAB
19 0x0C # FF | FORM FEED
20 0x0D # CR | CARRIAGE RETURN
21 0x85 # NEL | NEXT LINE
22 0x2028 # LINE SEPARATOR
23 0x2029 # PARAGRAPH SEPARATOR
24*/
25/*** GENERATED CODE ***/
26#define is_LNBREAK(s,is_utf8) \
e1d1eefb
YO
27( ( ((U8*)s)[0]==13 ) ? \
28 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
29 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ? 1 : \
30( (is_utf8) ? \
31 ( ( ((U8*)s)[0]==194 ) ? \
32 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
33 (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\
34 ( ((U8*)s)[0]==133 ) ) ) )
35
12b72891
RGS
36/*** GENERATED CODE ***/
37#define is_LNBREAK_safe(s,e,is_utf8) \
e1d1eefb
YO
38( ( (e) - (s) > 2 ) ? \
39 ( ( ((U8*)s)[0]==13 ) ? \
40 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
41 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ? 1 : \
42( (is_utf8) ? \
43 ( ( ((U8*)s)[0]==194 ) ? \
44 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
45 (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\
46 ( ((U8*)s)[0]==133 ) ) ) ) : \
47( ( (e) - (s) > 1 ) ? \
48 ( ( ((U8*)s)[0]==13 ) ? \
49 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
50 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ? 1 : \
51( (is_utf8) ? \
52 ((( ((U8*)s)[0]==194 ) && ( ((U8*)s)[1]==133 )) ? 2 : 0) : \
53 ( ((U8*)s)[0]==133 ) ) ) ) : \
54( ( (e) - (s) > 0 ) ? \
55 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \
56( (!is_utf8) ? \
57 ( ((U8*)s)[0]==133 ) : 0 ) ) : 0 ) ) )
58
12b72891
RGS
59/*** GENERATED CODE ***/
60#define is_LNBREAK_utf8(s) \
e1d1eefb
YO
61( ( ((U8*)s)[0]==194 ) ? \
62 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
63 ( ( ((U8*)s)[0]==226 ) ? \
64 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\
65 ( ( ((U8*)s)[0]==13 ) ? \
66 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
67 (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ) ) )
68
12b72891
RGS
69/*** GENERATED CODE ***/
70#define is_LNBREAK_utf8_safe(s,e) \
e1d1eefb
YO
71( ( (e) - (s) > 2 ) ? \
72 ( ( ((U8*)s)[0]==194 ) ? \
73 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
74 ( ( ((U8*)s)[0]==226 ) ? \
75 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\
76 ( ( ((U8*)s)[0]==13 ) ? \
77 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
78 (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ) ) ) : \
79( ( (e) - (s) > 1 ) ? \
80 ( ( ((U8*)s)[0]==194 ) ? \
81 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
82 ( ( ((U8*)s)[0]==13 ) ? \
83 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
84 (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) ) ) : \
85( ( (e) - (s) > 0 ) ? \
86 (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) : 0 ) ) )
87
12b72891
RGS
88/*** GENERATED CODE ***/
89#define is_LNBREAK_latin1(s) \
e1d1eefb
YO
90( ( ((U8*)s)[0]==13 ) ? \
91 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
92 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) || ((U8*)s)[0]==133 ) )
93
12b72891
RGS
94/*** GENERATED CODE ***/
95#define is_LNBREAK_latin1_safe(s,e) \
e1d1eefb
YO
96( ( (e) - (s) > 1 ) ? \
97 ( ( ((U8*)s)[0]==13 ) ? \
98 ( ( ((U8*)s)[1]==10 ) ? 2 : 1 ) : \
99 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=12) || ((U8*)s)[0]==133 ) ) : \
100( ( (e) - (s) > 0 ) ? \
101 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) || ((U8*)s)[0]==133 ) : 0 ) )
102
12b72891
RGS
103/*** GENERATED CODE ***/
104#define is_LNBREAK_cp(cp) \
105( (10<=cp && cp<=13) || ( cp > 13 && \
106( cp==133 || ( cp > 133 && \
107( cp==8232 || ( cp > 8232 && \
108cp==8233 ) ) ) ) ) )
109
110/*
111 HORIZWS: Horizontal Whitespace: \h \H
112
113 0x09 # HT
114 0x20 # SPACE
115 0xa0 # NBSP
116 0x1680 # OGHAM SPACE MARK
117 0x180e # MONGOLIAN VOWEL SEPARATOR
118 0x2000 # EN QUAD
119 0x2001 # EM QUAD
120 0x2002 # EN SPACE
121 0x2003 # EM SPACE
122 0x2004 # THREE-PER-EM SPACE
123 0x2005 # FOUR-PER-EM SPACE
124 0x2006 # SIX-PER-EM SPACE
125 0x2007 # FIGURE SPACE
126 0x2008 # PUNCTUATION SPACE
127 0x2009 # THIN SPACE
128 0x200A # HAIR SPACE
129 0x202f # NARROW NO-BREAK SPACE
130 0x205f # MEDIUM MATHEMATICAL SPACE
131 0x3000 # IDEOGRAPHIC SPACE
132*/
133/*** GENERATED CODE ***/
134#define is_HORIZWS(s,is_utf8) \
e1d1eefb
YO
135( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \
136( (is_utf8) ? \
137 ( ( ((U8*)s)[0]==194 ) ? \
138 ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \
139 ( ( ((U8*)s)[0]==225 ) ? \
140 ( ( ((U8*)s)[1]==160 ) ? \
141 ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \
142 ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \
143 ( ( ((U8*)s)[0]==226 ) ? \
144 ( ( ((U8*)s)[1]==129 ) ? \
145 ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \
146 ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\
147 (((( ((U8*)s)[0]==227 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) ) ) :\
148 ( ((U8*)s)[0]==160 ) ) )
149
12b72891
RGS
150/*** GENERATED CODE ***/
151#define is_HORIZWS_safe(s,e,is_utf8) \
e1d1eefb
YO
152( ( (e) - (s) > 2 ) ? \
153 ( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \
154( (is_utf8) ? \
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 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) ) ) :\
166 ( ((U8*)s)[0]==160 ) ) ) : \
167( ( (e) - (s) > 1 ) ? \
168 ( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \
169( (is_utf8) ? \
170 ((( ((U8*)s)[0]==194 ) && ( ((U8*)s)[1]==160 )) ? 2 : 0) : \
171 ( ((U8*)s)[0]==160 ) ) ) : \
172( ( (e) - (s) > 0 ) ? \
173 ( ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ? 1 : \
174( (!is_utf8) ? \
175 ( ((U8*)s)[0]==160 ) : 0 ) ) : 0 ) ) )
176
12b72891
RGS
177/*** GENERATED CODE ***/
178#define is_HORIZWS_utf8(s) \
e1d1eefb
YO
179( ( ((U8*)s)[0]==194 ) ? \
180 ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \
181 ( ( ((U8*)s)[0]==225 ) ? \
182 ( ( ((U8*)s)[1]==160 ) ? \
183 ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \
184 ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \
185 ( ( ((U8*)s)[0]==226 ) ? \
186 ( ( ((U8*)s)[1]==129 ) ? \
187 ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \
188 ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\
189 ( ( ((U8*)s)[0]==227 ) ? \
190 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) : \
191 ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ) ) ) )
192
12b72891
RGS
193/*** GENERATED CODE ***/
194#define is_HORIZWS_utf8_safe(s,e) \
e1d1eefb
YO
195( ( (e) - (s) > 2 ) ? \
196 ( ( ((U8*)s)[0]==194 ) ? \
197 ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \
198 ( ( ((U8*)s)[0]==225 ) ? \
199 ( ( ((U8*)s)[1]==160 ) ? \
200 ( ( ((U8*)s)[2]==142 ) ? 3 : 0 ) : \
201 ((( ((U8*)s)[1]==154 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) ) : \
202 ( ( ((U8*)s)[0]==226 ) ? \
203 ( ( ((U8*)s)[1]==129 ) ? \
204 ( ( ((U8*)s)[2]==159 ) ? 3 : 0 ) : \
205 ((( ((U8*)s)[1]==128 ) && ( (128<=((U8*)s)[2] && ((U8*)s)[2]<=138) || ((U8*)s)[2]==175 )) ? 3 : 0) ) :\
206 ( ( ((U8*)s)[0]==227 ) ? \
207 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==128 )) ? 3 : 0) : \
208 ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ) ) ) ) : \
209( ( (e) - (s) > 1 ) ? \
210 ( ( ((U8*)s)[0]==194 ) ? \
211 ( ( ((U8*)s)[1]==160 ) ? 2 : 0 ) : \
212 ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) ) : \
213( ( (e) - (s) > 0 ) ? \
214 ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 ) : 0 ) ) )
215
12b72891
RGS
216/*** GENERATED CODE ***/
217#define is_HORIZWS_latin1(s) \
e1d1eefb
YO
218( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 || ((U8*)s)[0]==160 )
219
12b72891
RGS
220/*** GENERATED CODE ***/
221#define is_HORIZWS_latin1_safe(s,e) \
e1d1eefb
YO
222( ( (e) - (s) > 0 ) ? \
223 ( ((U8*)s)[0]==9 || ((U8*)s)[0]==32 || ((U8*)s)[0]==160 ) : 0 )
224
12b72891
RGS
225/*** GENERATED CODE ***/
226#define is_HORIZWS_cp(cp) \
227( cp==9 || ( cp > 9 && \
228( cp==32 || ( cp > 32 && \
229( cp==160 || ( cp > 160 && \
230( cp==5760 || ( cp > 5760 && \
231( cp==6158 || ( cp > 6158 && \
232( (8192<=cp && cp<=8202) || ( cp > 8202 && \
233( cp==8239 || ( cp > 8239 && \
234( cp==8287 || ( cp > 8287 && \
235cp==12288 ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )
e1d1eefb 236
12b72891
RGS
237/*
238 VERTWS: Vertical Whitespace: \v \V
e1d1eefb 239
12b72891
RGS
240 0x0A # LF
241 0x0B # VT
242 0x0C # FF
243 0x0D # CR
244 0x85 # NEL
245 0x2028 # LINE SEPARATOR
246 0x2029 # PARAGRAPH SEPARATOR
247*/
248/*** GENERATED CODE ***/
249#define is_VERTWS(s,is_utf8) \
e1d1eefb
YO
250( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \
251( (is_utf8) ? \
252 ( ( ((U8*)s)[0]==194 ) ? \
253 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
254 (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\
255 ( ((U8*)s)[0]==133 ) ) )
256
12b72891
RGS
257/*** GENERATED CODE ***/
258#define is_VERTWS_safe(s,e,is_utf8) \
e1d1eefb
YO
259( ( (e) - (s) > 2 ) ? \
260 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \
261( (is_utf8) ? \
262 ( ( ((U8*)s)[0]==194 ) ? \
263 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
264 (((( ((U8*)s)[0]==226 ) && ( ((U8*)s)[1]==128 )) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) ) :\
265 ( ((U8*)s)[0]==133 ) ) ) : \
266( ( (e) - (s) > 1 ) ? \
267 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \
268( (is_utf8) ? \
269 ((( ((U8*)s)[0]==194 ) && ( ((U8*)s)[1]==133 )) ? 2 : 0) : \
270 ( ((U8*)s)[0]==133 ) ) ) : \
271( ( (e) - (s) > 0 ) ? \
272 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ? 1 : \
273( (!is_utf8) ? \
274 ( ((U8*)s)[0]==133 ) : 0 ) ) : 0 ) ) )
275
12b72891
RGS
276/*** GENERATED CODE ***/
277#define is_VERTWS_utf8(s) \
e1d1eefb
YO
278( ( ((U8*)s)[0]==194 ) ? \
279 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
280 ( ( ((U8*)s)[0]==226 ) ? \
281 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\
282 (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ) )
283
12b72891
RGS
284/*** GENERATED CODE ***/
285#define is_VERTWS_utf8_safe(s,e) \
e1d1eefb
YO
286( ( (e) - (s) > 2 ) ? \
287 ( ( ((U8*)s)[0]==194 ) ? \
288 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
289 ( ( ((U8*)s)[0]==226 ) ? \
290 ((( ((U8*)s)[1]==128 ) && ( ((U8*)s)[2]==168 || ((U8*)s)[2]==169 )) ? 3 : 0) :\
291 (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ) ) : \
292( ( (e) - (s) > 1 ) ? \
293 ( ( ((U8*)s)[0]==194 ) ? \
294 ( ( ((U8*)s)[1]==133 ) ? 2 : 0 ) : \
295 (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) ) : \
296( ( (e) - (s) > 0 ) ? \
297 (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) : 0 ) ) )
298
12b72891
RGS
299/*** GENERATED CODE ***/
300#define is_VERTWS_latin1(s) \
e1d1eefb
YO
301( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) || ((U8*)s)[0]==133 )
302
12b72891
RGS
303/*** GENERATED CODE ***/
304#define is_VERTWS_latin1_safe(s,e) \
e1d1eefb
YO
305( ( (e) - (s) > 0 ) ? \
306 ( (10<=((U8*)s)[0] && ((U8*)s)[0]<=13) || ((U8*)s)[0]==133 ) : 0 )
307
12b72891
RGS
308/*** GENERATED CODE ***/
309#define is_VERTWS_cp(cp) \
310( (10<=cp && cp<=13) || ( cp > 13 && \
311( cp==133 || ( cp > 133 && \
312( cp==8232 || ( cp > 8232 && \
313cp==8233 ) ) ) ) ) )
e1d1eefb 314