This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add global hash to handle \p{user-defined}
[perl5.git] / t / re / anyof.t
CommitLineData
1ce8be81
N
1#!./perl
2
671d6967
KW
3use strict;
4use warnings;
847612ec
KW
5use utf8;
6
7# This tests that the ANYOF nodes generated by bracketed character classes are
8# as expected. The representation of these is not guaranteed, and this test
9# may need to be updated if it changes. But it is here to make sure that no
10# unexpected changes occur. These could come from faulty generation of the
11# node, or faulty display of them (or both). Because these causes come from
12# very different parts of the regex compiler, it is unlikely that a commit
13# would change both of them, so this test will adequately serve to test both.
14
15BEGIN {
16 chdir 't' if -d 't';
847612ec 17 require './test.pl';
1ce8be81
N
18 set_up_inc('../lib','.','../ext/re');
19 require Config; import Config;
847612ec
KW
20 skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
21}
22
23# An array is used instead of a hash, so that the tests are carried out in the
24# order given by this file. Even-numbered indices are the regexes to compile.
25# The next higher element is the expected compilation result.
26#
27# It is painful to port some of these to EBCDIC, as not only do the code point
28# numbers change (for those < 256), but the order changes, as the compiled
29# version is sorted by native code point order. On EBCDIC, \r comes before
30# \n, and 'k' before "K', for example. So, the tests where there are
31# differences are skipped on EBCDIC. They are all at the beginning of the
32# array, and a special marker entry is used to delmit the boundary between
33# skipped and not skipped.
87cafc45
KW
34#
35# NOTE: If the pattern contains (?8) it will be upgraded to UTF-8 after
36# stripping that
847612ec 37
542d7e4a
KW
38# 2**32-1 or 2**64-1
39my $highest_cp_string = "F" x (($Config{uvsize} < 8) ? 8 : 16);
40
41my $next_highest_cp_string = $highest_cp_string =~ s/ F $ /E/xr;
42
43my $highest_cp = "\\x{$highest_cp_string}";
44my $next_highest_cp = "\\x{$next_highest_cp_string}";
45
46sub get_compiled ($) {
47 # Convert platform-independent values to what is suitable for the
48 # platform
49
50 my $pattern = shift;
51
52 $pattern =~ s/\{INFTY\}/$highest_cp/g;
53 $pattern =~ s/\{INFTY_minus_1\}/$next_highest_cp/g;
54 my $use_utf8 = ($pattern =~ s/\Q(?8)//);
55
56 $pattern = "my \$a = '$pattern';";
57 $pattern .= "utf8::upgrade(\$a);" if $use_utf8;
58 $pattern .= "qr/\$a/";
59 my $actual_pattern = "use re qw(Debug COMPILE); $pattern";
60
61 my $result = fresh_perl($actual_pattern);
62 if ($? != 0) { # Re-run so as to display STDERR.
63 fail($pattern);
64 fresh_perl($actual_pattern, { stderr => 0, verbose => 1 });
65 return;
66 }
67
68 # The Debug output will come back as a bunch of lines. We are
69 # interested only in the line after /Final program/
70 my @lines = split /\n/, $result;
71 while (defined ($_ = shift @lines)) {
72 last if /Final program/;
73 }
74
75 $_ = shift @lines;
76
77 s/ \s* \( \d+ \) \s* //x; # Get rid of the node branch
78 s/ ^ \s* \d+ : \s* //x; # ... And the node number
79
80 # Use platform-independent values
81 s/$highest_cp_string/INFTY/g;
82 s/$next_highest_cp_string/INFTY_minus_1/g;
83
84 return $_;
85}
86
b2296192
KW
87# Note: EXACTish lowercases the hex; ANYOF uppercases, without braces
88
847612ec 89my @tests = (
b2296192
KW
90 '[\xe0\xc0]' => 'EXACTFU <\\x{e0}>',
91 '[\xe1\xc1]' => 'EXACTFU <\\x{e1}>',
92 '[\xe2\xc2]' => 'EXACTFU <\\x{e2}>',
93 '[\xe3\xc3]' => 'EXACTFU <\\x{e3}>',
94 '[\xe4\xc4]' => 'EXACTFU <\\x{e4}>',
95 '[\xc5\xe5]' => 'ANYOF[\\xC5\\xE5]',
96 '[\xe6\xc6]' => 'EXACTFU <\\x{e6}>',
97 '[\xe7\xc7]' => 'EXACTFU <\\x{e7}>',
98 '[\xe8\xc8]' => 'EXACTFU <\\x{e8}>',
99 '[\xe9\xc9]' => 'EXACTFU <\\x{e9}>',
100 '[\xea\xca]' => 'EXACTFU <\\x{ea}>',
101 '[\xeb\xcb]' => 'EXACTFU <\\x{eb}>',
102 '[\xec\xcc]' => 'EXACTFU <\\x{ec}>',
103 '[\xee\xce]' => 'EXACTFU <\\x{ee}>',
104 '[\xef\xcf]' => 'EXACTFU <\\x{ef}>',
105 '[\xf0\xd0]' => 'EXACTFU <\\x{f0}>',
106 '[\xf1\xd1]' => 'EXACTFU <\\x{f1}>',
107 '[\xf2\xd2]' => 'EXACTFU <\\x{f2}>',
108 '[\xf3\xd3]' => 'EXACTFU <\\x{f3}>',
109 '[\xf4\xd4]' => 'EXACTFU <\\x{f4}>',
110 '[\xf5\xd5]' => 'EXACTFU <\\x{f5}>',
111 '[\xf6\xd6]' => 'EXACTFU <\\x{f6}>',
112 '[\xf8\xd8]' => 'EXACTFU <\\x{f8}>',
113 '[\xf9\xd9]' => 'EXACTFU <\\x{f9}>',
114 '[\xfa\xda]' => 'EXACTFU <\\x{fa}>',
115 '[\xfb\xdb]' => 'EXACTFU <\\x{fb}>',
116 '[\xfc\xdc]' => 'EXACTFU <\\x{fc}>',
117 '[\xfd\xdd]' => 'EXACTFU <\\x{fd}>',
118 '[\xfe\xde]' => 'EXACTFU <\\x{fe}>',
119
2813d4ad 120 '[[{]' => 'ANYOFM[\[\{]',
02517e3f 121 '[^\S ]' => 'ANYOFD[\t\n\x0B\f\r{utf8}\x85\xA0][1680 2000-200A 2028-2029 202F 205F 3000]',
6b503dfb
KW
122 '[^\n\r]' => 'ANYOF[^\n\r][0100-INFTY]',
123 '[^\/\|,\$\%%\@\ \%"\<\>\:\#\&\*\{\}\[\]\(\)]' => 'ANYOF[^ "#$%&()*,/:<>@\[\]\{|\}][0100-INFTY]',
b2296192
KW
124 '[[:ascii:]]' => 'ANYOFM[\x00-\x7F]',
125 '[[:^ascii:]]' => 'NANYOFM[\x00-\x7F]',
126 '[[:^ascii:]\x{2C2}]' => 'NANYOFM[\x00-\x7F]',
127 '(?u)[[:ascii:]]' => 'ANYOFM[\x00-\x7F]',
128 '(?u)[[:^ascii:]]' => 'NANYOFM[\x00-\x7F]',
129 '(?a)[[:ascii:]]' => 'ANYOFM[\x00-\x7F]',
130 '(?a)[[:^ascii:]]' => 'NANYOFM[\x00-\x7F]',
131 '(?a)[[:^ascii:]\x{2C2}]' => 'NANYOFM[\x00-\x7F]',
132 '[[:cntrl:]]' => 'POSIXD[:cntrl:]',
a3049f27 133 '[^[:^print:][:^ascii:]]' => 'POSIXA[:print:]',
b2296192
KW
134 '[[:blank:]]' => 'POSIXD[:blank:]',
135 '[ [:blank:]]' => 'POSIXD[:blank:]',
136 '[_[:blank:]]' => 'ANYOFD[\t _{utf8}\xA0][1680 2000-200A 202F 205F 3000]',
137 '[_[:^blank:]]' => 'NPOSIXD[:blank:]',
6b503dfb 138 '[\xA0[:^blank:]]' => 'ANYOF[^\t ][0100-167F 1681-1FFF 200B-202E 2030-205E 2060-2FFF 3001-INFTY]',
b2296192 139 '(?d:[_[:^blank:]])' => 'NPOSIXD[:blank:]',
58f79e73 140 '[\x{07}-\x{0B}]' => 'ANYOF[\a\b\t\n\x0B]',
b2296192
KW
141 '(?il)[\x{212A}]' => 'ANYOFL{i}[{utf8 locale}Kk][212A]',
142 '(?il)(?[\x{212A}])' => 'ANYOFL{utf8-locale-reqd}[Kk][212A]',
143
6f0fba9b 144 '(?i)b[s]\xe0' => 'ANYOFM[Bb]', # The s goes into a 2nd node
847612ec 145
6f0fba9b
KW
146 '[aA]' => 'ANYOFM[Aa]',
147 '[bB]' => 'ANYOFM[Bb]',
148 '[kK]' => 'ANYOFM[Kk]',
847612ec 149
6f0fba9b 150 'ebcdic_ok_below_this_marker',
b2296192
KW
151
152 '(?i:[^:])' => 'NANYOFM[:]',
153
154 '[^\n]' => 'REG_ANY',
155
156 '[[:alpha:]]' => 'POSIXD[:alpha:]',
157 '[[:^alpha:]]' => 'NPOSIXD[:alpha:]',
158 '[[:^alpha:]\x{2C2}]' => 'NPOSIXU[:alpha:]',
159 '(?l)[[:alpha:]]' => 'POSIXL[:alpha:]',
160 '(?l)[[:^alpha:]]' => 'NPOSIXL[:alpha:]',
161 '(?l)[[:^alpha:]\x{2C2}]' => 'NPOSIXL[:alpha:]',
162 '(?u)[[:alpha:]]' => 'POSIXU[:alpha:]',
163 '(?u)[[:^alpha:]]' => 'NPOSIXU[:alpha:]',
164 '(?a)[[:alpha:]]' => 'POSIXA[:alpha:]',
165 '(?a)[[:^alpha:]]' => 'NPOSIXA[:alpha:]',
166 '(?a)[[:^alpha:]\x{2C2}]' => 'NPOSIXA[:alpha:]',
167 '[[:alpha:][:^alpha:]]' => 'SANY',
168 '[^[:alpha:][:^alpha:]]' => 'OPFAIL',
169 '(?l)[[:alpha:][:^alpha:]]' => 'SANY',
170 '(?l)[^[:alpha:][:^alpha:]]' => 'OPFAIL',
171 '(?u)[[:alpha:][:^alpha:]]' => 'SANY',
172 '(?u)[^[:alpha:][:^alpha:]]' => 'OPFAIL',
173 '(?a)[[:alpha:][:^alpha:]]' => 'SANY',
174 '(?a)[^[:alpha:][:^alpha:]]' => 'OPFAIL',
175 '[[:alnum:]]' => 'POSIXD[:alnum:]',
176 '[[:^alnum:]]' => 'NPOSIXD[:alnum:]',
177 '[[:^alnum:]\x{2C2}]' => 'NPOSIXU[:alnum:]',
178 '(?l)[[:alnum:]]' => 'POSIXL[:alnum:]',
179 '(?l)[[:^alnum:]]' => 'NPOSIXL[:alnum:]',
180 '(?l)[[:^alnum:]\x{2C2}]' => 'NPOSIXL[:alnum:]',
181 '(?u)[[:alnum:]]' => 'POSIXU[:alnum:]',
182 '(?u)[[:^alnum:]]' => 'NPOSIXU[:alnum:]',
183 '(?a)[[:alnum:]]' => 'POSIXA[:alnum:]',
184 '(?a)[[:^alnum:]]' => 'NPOSIXA[:alnum:]',
185 '(?a)[[:^alnum:]\x{2C2}]' => 'NPOSIXA[:alnum:]',
186 '[[:alnum:][:^alnum:]]' => 'SANY',
187 '[^[:alnum:][:^alnum:]]' => 'OPFAIL',
188 '(?l)[[:alnum:][:^alnum:]]' => 'SANY',
189 '(?l)[^[:alnum:][:^alnum:]]' => 'OPFAIL',
190 '(?u)[[:alnum:][:^alnum:]]' => 'SANY',
191 '(?u)[^[:alnum:][:^alnum:]]' => 'OPFAIL',
192 '(?a)[[:alnum:][:^alnum:]]' => 'SANY',
193 '(?a)[^[:alnum:][:^alnum:]]' => 'OPFAIL',
194 '(?l)[[:ascii:]]' => 'POSIXL[:ascii:]',
195 '(?l)[[:^ascii:]]' => 'NPOSIXL[:ascii:]',
196 '(?l)[[:^ascii:]\x{2C2}]' => 'NPOSIXL[:ascii:]',
197 '[[:ascii:][:^ascii:]]' => 'SANY',
198 '[^[:ascii:][:^ascii:]]' => 'OPFAIL',
199 '(?l)[[:ascii:][:^ascii:]]' => 'SANY',
200 '(?l)[^[:ascii:][:^ascii:]]' => 'OPFAIL',
201 '(?u)[[:ascii:][:^ascii:]]' => 'SANY',
202 '(?u)[^[:ascii:][:^ascii:]]' => 'OPFAIL',
203 '(?a)[[:ascii:][:^ascii:]]' => 'SANY',
204 '(?a)[^[:ascii:][:^ascii:]]' => 'OPFAIL',
205 '[[:^blank:]]' => 'NPOSIXD[:blank:]',
206 '[[:^blank:]\x{2C2}]' => 'NPOSIXU[:blank:]',
207 '(?l)[[:blank:]]' => 'POSIXL[:blank:]',
208 '(?l)[[:^blank:]]' => 'NPOSIXL[:blank:]',
209 '(?l)[[:^blank:]\x{2C2}]' => 'NPOSIXL[:blank:]',
210 '(?u)[[:blank:]]' => 'POSIXU[:blank:]',
211 '(?u)[[:^blank:]]' => 'NPOSIXU[:blank:]',
212 '(?a)[[:blank:]]' => 'POSIXA[:blank:]',
213 '(?a)[[:^blank:]]' => 'NPOSIXA[:blank:]',
214 '(?a)[[:^blank:]\x{2C2}]' => 'NPOSIXA[:blank:]',
215 '[[:blank:]]' => 'POSIXD[:blank:]',
216 '[[:blank:][:^blank:]]' => 'SANY',
217 '[^[:blank:][:^blank:]]' => 'OPFAIL',
218 '(?l)[[:blank:][:^blank:]]' => 'SANY',
219 '(?l)[^[:blank:][:^blank:]]' => 'OPFAIL',
220 '(?u)[[:blank:][:^blank:]]' => 'SANY',
221 '(?u)[^[:blank:][:^blank:]]' => 'OPFAIL',
222 '(?a)[[:blank:][:^blank:]]' => 'SANY',
223 '(?a)[^[:blank:][:^blank:]]' => 'OPFAIL',
224 '[[:^cntrl:]]' => 'NPOSIXD[:cntrl:]',
225 '[[:^cntrl:]\x{2C2}]' => 'NPOSIXU[:cntrl:]',
226 '(?l)[[:cntrl:]]' => 'POSIXL[:cntrl:]',
227 '(?l)[[:^cntrl:]]' => 'NPOSIXL[:cntrl:]',
228 '(?l)[[:^cntrl:]\x{2C2}]' => 'NPOSIXL[:cntrl:]',
229 '(?u)[[:cntrl:]]' => 'POSIXU[:cntrl:]',
230 '(?u)[[:^cntrl:]]' => 'NPOSIXU[:cntrl:]',
231 '(?a)[[:cntrl:]]' => 'POSIXA[:cntrl:]',
232 '(?a)[[:^cntrl:]]' => 'NPOSIXA[:cntrl:]',
233 '(?a)[[:^cntrl:]\x{2C2}]' => 'NPOSIXA[:cntrl:]',
234 '[[:cntrl:][:^cntrl:]]' => 'SANY',
235 '[^[:cntrl:][:^cntrl:]]' => 'OPFAIL',
236 '(?l)[[:cntrl:][:^cntrl:]]' => 'SANY',
237 '(?l)[^[:cntrl:][:^cntrl:]]' => 'OPFAIL',
238 '(?u)[[:cntrl:][:^cntrl:]]' => 'SANY',
239 '(?u)[^[:cntrl:][:^cntrl:]]' => 'OPFAIL',
240 '(?a)[[:cntrl:][:^cntrl:]]' => 'SANY',
241 '(?a)[^[:cntrl:][:^cntrl:]]' => 'OPFAIL',
242 '[[:digit:]]' => 'POSIXU[\d]',
243 '[[:^digit:]]' => 'NPOSIXU[\d]',
244 '[[:^digit:]\x{2C2}]' => 'NPOSIXU[\d]',
245 '(?l)[[:digit:]]' => 'POSIXL[\d]',
246 '(?l)[[:^digit:]]' => 'NPOSIXL[\d]',
247 '(?l)[[:^digit:]\x{2C2}]' => 'NPOSIXL[\d]',
248 '(?u)[[:digit:]]' => 'POSIXU[\d]',
249 '(?u)[[:^digit:]]' => 'NPOSIXU[\d]',
250 '(?a)[[:digit:]]' => 'POSIXA[\d]',
251 '(?a)[[:^digit:]]' => 'NPOSIXA[\d]',
252 '(?a)[[:^digit:]\x{2C2}]' => 'NPOSIXA[\d]',
253 '[[:digit:][:^digit:]]' => 'SANY',
254 '[^[:digit:][:^digit:]]' => 'OPFAIL',
255 '(?l)[[:digit:][:^digit:]]' => 'SANY',
256 '(?l)[^[:digit:][:^digit:]]' => 'OPFAIL',
257 '(?u)[[:digit:][:^digit:]]' => 'SANY',
258 '(?u)[^[:digit:][:^digit:]]' => 'OPFAIL',
259 '(?a)[[:digit:][:^digit:]]' => 'SANY',
260 '(?a)[^[:digit:][:^digit:]]' => 'OPFAIL',
261 '[[:graph:]]' => 'POSIXD[:graph:]',
262 '[[:^graph:]]' => 'NPOSIXD[:graph:]',
263 '[[:^graph:]\x{FFFF}]' => 'NPOSIXU[:graph:]',
264 '(?l)[[:graph:]]' => 'POSIXL[:graph:]',
265 '(?l)[[:^graph:]]' => 'NPOSIXL[:graph:]',
266 '(?l)[[:^graph:]\x{FFFF}]' => 'NPOSIXL[:graph:]',
267 '(?u)[[:graph:]]' => 'POSIXU[:graph:]',
268 '(?u)[[:^graph:]]' => 'NPOSIXU[:graph:]',
269 '(?a)[[:graph:]]' => 'POSIXA[:graph:]',
270 '(?a)[[:^graph:]]' => 'NPOSIXA[:graph:]',
271 '(?a)[[:^graph:]\x{FFFF}]' => 'NPOSIXA[:graph:]',
272 '[[:graph:][:^graph:]]' => 'SANY',
273 '[^[:graph:][:^graph:]]' => 'OPFAIL',
274 '(?l)[[:graph:][:^graph:]]' => 'SANY',
275 '(?l)[^[:graph:][:^graph:]]' => 'OPFAIL',
276 '(?u)[[:graph:][:^graph:]]' => 'SANY',
277 '(?u)[^[:graph:][:^graph:]]' => 'OPFAIL',
278 '(?a)[[:graph:][:^graph:]]' => 'SANY',
279 '(?a)[^[:graph:][:^graph:]]' => 'OPFAIL',
280 '[[:lower:]]' => 'POSIXD[:lower:]',
281 '[[:^lower:]]' => 'NPOSIXD[:lower:]',
282 '[[:^lower:]\x{2C2}]' => 'NPOSIXU[:lower:]',
283 '(?l)[[:lower:]]' => 'POSIXL[:lower:]',
284 '(?l)[[:^lower:]]' => 'NPOSIXL[:lower:]',
285 '(?l)[[:^lower:]\x{2C2}]' => 'NPOSIXL[:lower:]',
286 '(?u)[[:lower:]]' => 'POSIXU[:lower:]',
287 '(?u)[[:^lower:]]' => 'NPOSIXU[:lower:]',
288 '(?a)[[:lower:]]' => 'POSIXA[:lower:]',
289 '(?a)[[:^lower:]]' => 'NPOSIXA[:lower:]',
290 '(?a)[[:^lower:]\x{2C2}]' => 'NPOSIXA[:lower:]',
291 '[[:lower:][:^lower:]]' => 'SANY',
292 '[^[:lower:][:^lower:]]' => 'OPFAIL',
293 '(?l)[[:lower:][:^lower:]]' => 'SANY',
294 '(?l)[^[:lower:][:^lower:]]' => 'OPFAIL',
295 '(?u)[[:lower:][:^lower:]]' => 'SANY',
296 '(?u)[^[:lower:][:^lower:]]' => 'OPFAIL',
297 '(?a)[[:lower:][:^lower:]]' => 'SANY',
298 '(?a)[^[:lower:][:^lower:]]' => 'OPFAIL',
299 '[[:print:]]' => 'POSIXD[:print:]',
300 '[[:^print:]]' => 'NPOSIXD[:print:]',
301 '[[:^print:]\x{FFFF}]' => 'NPOSIXU[:print:]',
302 '(?l)[[:print:]]' => 'POSIXL[:print:]',
303 '(?l)[[:^print:]]' => 'NPOSIXL[:print:]',
304 '(?l)[[:^print:]\x{FFFF}]' => 'NPOSIXL[:print:]',
305 '(?u)[[:print:]]' => 'POSIXU[:print:]',
306 '(?u)[[:^print:]]' => 'NPOSIXU[:print:]',
307 '(?a)[[:print:]]' => 'POSIXA[:print:]',
308 '(?a)[[:^print:]]' => 'NPOSIXA[:print:]',
309 '(?a)[[:^print:]\x{FFFF}]' => 'NPOSIXA[:print:]',
310 '[[:print:][:^print:]]' => 'SANY',
311 '[^[:print:][:^print:]]' => 'OPFAIL',
312 '(?l)[[:print:][:^print:]]' => 'SANY',
313 '(?l)[^[:print:][:^print:]]' => 'OPFAIL',
314 '(?u)[[:print:][:^print:]]' => 'SANY',
315 '(?u)[^[:print:][:^print:]]' => 'OPFAIL',
316 '(?a)[[:print:][:^print:]]' => 'SANY',
317 '(?a)[^[:print:][:^print:]]' => 'OPFAIL',
318 '[[:punct:]]' => 'POSIXD[:punct:]',
319 '[[:^punct:]]' => 'NPOSIXD[:punct:]',
320 '[[:^punct:]\x{2C2}]' => 'NPOSIXU[:punct:]',
321 '(?l)[[:punct:]]' => 'POSIXL[:punct:]',
322 '(?l)[[:^punct:]]' => 'NPOSIXL[:punct:]',
323 '(?l)[[:^punct:]\x{2C2}]' => 'NPOSIXL[:punct:]',
324 '(?u)[[:punct:]]' => 'POSIXU[:punct:]',
325 '(?u)[[:^punct:]]' => 'NPOSIXU[:punct:]',
326 '(?a)[[:punct:]]' => 'POSIXA[:punct:]',
327 '(?a)[[:^punct:]]' => 'NPOSIXA[:punct:]',
328 '(?a)[[:^punct:]\x{2C2}]' => 'NPOSIXA[:punct:]',
329 '[[:punct:][:^punct:]]' => 'SANY',
330 '[^[:punct:][:^punct:]]' => 'OPFAIL',
331 '(?l)[[:punct:][:^punct:]]' => 'SANY',
332 '(?l)[^[:punct:][:^punct:]]' => 'OPFAIL',
333 '(?u)[[:punct:][:^punct:]]' => 'SANY',
334 '(?u)[^[:punct:][:^punct:]]' => 'OPFAIL',
335 '(?a)[[:punct:][:^punct:]]' => 'SANY',
336 '(?a)[^[:punct:][:^punct:]]' => 'OPFAIL',
337 '[[:space:]]' => 'POSIXD[\s]',
338 '[[:^space:]]' => 'NPOSIXD[\s]',
339 '[[:^space:]\x{2C2}]' => 'NPOSIXU[\s]',
340 '(?l)[[:space:]]' => 'POSIXL[\s]',
341 '(?l)[[:^space:]]' => 'NPOSIXL[\s]',
342 '(?l)[[:^space:]\x{2C2}]' => 'NPOSIXL[\s]',
343 '(?u)[[:space:]]' => 'POSIXU[\s]',
344 '(?u)[[:^space:]]' => 'NPOSIXU[\s]',
345 '(?a)[[:space:]]' => 'POSIXA[\s]',
346 '(?a)[[:^space:]]' => 'NPOSIXA[\s]',
347 '(?a)[[:^space:]\x{2C2}]' => 'NPOSIXA[\s]',
348 '[[:space:][:^space:]]' => 'SANY',
349 '[^[:space:][:^space:]]' => 'OPFAIL',
350 '(?l)[[:space:][:^space:]]' => 'SANY',
351 '(?l)[^[:space:][:^space:]]' => 'OPFAIL',
352 '(?u)[[:space:][:^space:]]' => 'SANY',
353 '(?u)[^[:space:][:^space:]]' => 'OPFAIL',
354 '(?a)[[:space:][:^space:]]' => 'SANY',
355 '(?a)[^[:space:][:^space:]]' => 'OPFAIL',
356 '[[:upper:]]' => 'POSIXD[:upper:]',
357 '[[:^upper:]]' => 'NPOSIXD[:upper:]',
358 '[[:^upper:]\x{2C2}]' => 'NPOSIXU[:upper:]',
359 '(?l)[[:upper:]]' => 'POSIXL[:upper:]',
360 '(?l)[[:^upper:]]' => 'NPOSIXL[:upper:]',
361 '(?l)[[:^upper:]\x{2C2}]' => 'NPOSIXL[:upper:]',
362 '(?u)[[:upper:]]' => 'POSIXU[:upper:]',
363 '(?u)[[:^upper:]]' => 'NPOSIXU[:upper:]',
364 '(?a)[[:upper:]]' => 'POSIXA[:upper:]',
365 '(?a)[[:^upper:]]' => 'NPOSIXA[:upper:]',
366 '(?a)[[:^upper:]\x{2C2}]' => 'NPOSIXA[:upper:]',
367 '[[:upper:][:^upper:]]' => 'SANY',
368 '[^[:upper:][:^upper:]]' => 'OPFAIL',
369 '(?l)[[:upper:][:^upper:]]' => 'SANY',
370 '(?l)[^[:upper:][:^upper:]]' => 'OPFAIL',
371 '(?u)[[:upper:][:^upper:]]' => 'SANY',
372 '(?u)[^[:upper:][:^upper:]]' => 'OPFAIL',
373 '(?a)[[:upper:][:^upper:]]' => 'SANY',
374 '(?a)[^[:upper:][:^upper:]]' => 'OPFAIL',
375 '[\v]' => 'POSIXU[\v]',
376 '[^\v]' => 'NPOSIXU[\v]',
377 '[\V\x{2C2}]' => 'NPOSIXU[\v]',
378 '(?l)[\v]' => 'POSIXU[\v]',
379 '(?l)[^\v]' => 'NPOSIXU[\v]',
380 '(?l)[\V\x{2C2}]' => 'NPOSIXU[\v]',
381 '(?u)[\v]' => 'POSIXU[\v]',
382 '(?u)[^\v]' => 'NPOSIXU[\v]',
383 '(?a)[\v]' => 'POSIXU[\v]',
384 '(?a)[^\v]' => 'NPOSIXU[\v]',
385 '(?a)[\V\x{2C2}]' => 'NPOSIXU[\v]',
386 '[\v\V]' => 'SANY',
387 '[^\v\V]' => 'OPFAIL',
388 '(?l)[\v\V]' => 'SANY',
389 '(?l)[^\v\V]' => 'OPFAIL',
390 '(?u)[\v\V]' => 'SANY',
391 '(?u)[^\v\V]' => 'OPFAIL',
392 '(?a)[\v\V]' => 'SANY',
393 '(?a)[^\v\V]' => 'OPFAIL',
394 '[[:word:]]' => 'POSIXD[\w]',
395 '[[:^word:]]' => 'NPOSIXD[\w]',
396 '[[:^word:]\x{2C2}]' => 'NPOSIXU[\w]',
397 '(?l)[[:word:]]' => 'POSIXL[\w]',
398 '(?l)[[:^word:]]' => 'NPOSIXL[\w]',
399 '(?l)[[:^word:]\x{2C2}]' => 'NPOSIXL[\w]',
400 '(?u)[[:word:]]' => 'POSIXU[\w]',
401 '(?u)[[:^word:]]' => 'NPOSIXU[\w]',
402 '(?a)[[:word:]]' => 'POSIXA[\w]',
403 '(?a)[[:^word:]]' => 'NPOSIXA[\w]',
404 '(?a)[[:^word:]\x{2C2}]' => 'NPOSIXA[\w]',
405 '[[:word:][:^word:]]' => 'SANY',
406 '[^[:word:][:^word:]]' => 'OPFAIL',
407 '(?l)[[:word:][:^word:]]' => 'SANY',
408 '(?l)[^[:word:][:^word:]]' => 'OPFAIL',
409 '(?u)[[:word:][:^word:]]' => 'SANY',
410 '(?u)[^[:word:][:^word:]]' => 'OPFAIL',
411 '(?a)[[:word:][:^word:]]' => 'SANY',
412 '(?a)[^[:word:][:^word:]]' => 'OPFAIL',
413 '[[:xdigit:]]' => 'POSIXU[:xdigit:]',
414 '[[:^xdigit:]]' => 'NPOSIXU[:xdigit:]',
415 '[[:^xdigit:]\x{2C2}]' => 'NPOSIXU[:xdigit:]',
416 '(?l)[[:xdigit:]]' => 'POSIXL[:xdigit:]',
417 '(?l)[[:^xdigit:]]' => 'NPOSIXL[:xdigit:]',
418 '(?l)[[:^xdigit:]\x{2C2}]' => 'NPOSIXL[:xdigit:]',
419 '(?u)[[:xdigit:]]' => 'POSIXU[:xdigit:]',
420 '(?u)[[:^xdigit:]]' => 'NPOSIXU[:xdigit:]',
421 '(?a)[[:xdigit:]]' => 'POSIXA[:xdigit:]',
422 '(?a)[[:^xdigit:]]' => 'NPOSIXA[:xdigit:]',
423 '(?a)[[:^xdigit:]\x{2C2}]' => 'NPOSIXA[:xdigit:]',
424 '[[:xdigit:][:^xdigit:]]' => 'SANY',
425 '[^[:xdigit:][:^xdigit:]]' => 'OPFAIL',
426 '(?l)[[:xdigit:][:^xdigit:]]' => 'SANY',
427 '(?l)[^[:xdigit:][:^xdigit:]]' => 'OPFAIL',
428 '(?u)[[:xdigit:][:^xdigit:]]' => 'SANY',
429 '(?u)[^[:xdigit:][:^xdigit:]]' => 'OPFAIL',
430 '(?a)[[:xdigit:][:^xdigit:]]' => 'SANY',
431 '(?a)[^[:xdigit:][:^xdigit:]]' => 'OPFAIL',
432 '(?i)[[:lower:]]' => 'POSIXD[:cased:]',
433 '(?i)[[:^lower:]]' => 'NPOSIXD[:cased:]',
434 '(?i)[[:^lower:]\x{2C2}]' => 'NPOSIXU[:cased:]',
435 '(?i)(?l)[[:lower:]]' => 'POSIXL[:cased:]',
436 '(?i)(?l)[[:^lower:]]' => 'NPOSIXL[:cased:]',
437 '(?i)(?l)[[:^lower:]\x{2C2}]' => 'NPOSIXL[:cased:]',
438 '(?i)(?u)[[:lower:]]' => 'POSIXU[:cased:]',
439 '(?i)(?u)[[:^lower:]]' => 'NPOSIXU[:cased:]',
440 '(?i)(?a)[[:lower:]]' => 'POSIXA[:alpha:]',
441 '(?i)(?a)[[:^lower:]]' => 'NPOSIXA[:alpha:]',
442 '(?i)(?a)[[:^lower:]\x{2C2}]' => 'NPOSIXA[:alpha:]',
443 '(?i)[[:upper:]]' => 'POSIXD[:cased:]',
444 '(?i)[[:^upper:]]' => 'NPOSIXD[:cased:]',
445 '(?i)[[:^upper:]\x{2C2}]' => 'NPOSIXU[:cased:]',
446 '(?i)(?l)[[:upper:]]' => 'POSIXL[:cased:]',
447 '(?i)(?l)[[:^upper:]]' => 'NPOSIXL[:cased:]',
448 '(?i)(?l)[[:^upper:]\x{2C2}]' => 'NPOSIXL[:cased:]',
449 '(?i)(?u)[[:upper:]]' => 'POSIXU[:cased:]',
450 '(?i)(?u)[[:^upper:]]' => 'NPOSIXU[:cased:]',
451 '(?i)(?a)[[:upper:]]' => 'POSIXA[:alpha:]',
452 '(?i)(?a)[[:^upper:]]' => 'NPOSIXA[:alpha:]',
453 '(?i)(?a)[[:^upper:]\x{2C2}]' => 'NPOSIXA[:alpha:]',
454 '(?i)[\d\w]' => 'POSIXD[\w]',
455 '(?i)[\D\w]' => 'SANY',
456 #'(?i)(?l)[\d\w]' => varies depending on Unicode release
35b8412f 457 '(?i)(?l)[\D\w]' => 'ANYOFPOSIXL{i}[\\w\\D][0100-INFTY]',
b2296192
KW
458 '(?i)(?u)[\d\w]' => 'POSIXU[\w]',
459 '(?i)(?u)[\D\w]' => 'SANY',
460 '(?i)(?a)[\d\w]' => 'POSIXA[\w]',
461 '(?i)(?a)[\D\w]' => 'SANY',
847612ec 462 '(?l:[\x{212A}])' => 'ANYOFL[212A]',
d156f5cb
KW
463 '(?l:[\s\x{212A}])' => 'ANYOFPOSIXL[\s][1680 2000-200A 2028-2029 202F 205F 212A 3000]',
464 '(?l:[^\S\x{202F}])' => 'ANYOFPOSIXL[^\\S][1680 2000-200A 2028-2029 205F 3000]',
75609742 465 '(?li:[a-z])' => 'ANYOFL{i}[a-z{utf8 locale}\x{017F}\x{212A}]',
b2296192
KW
466
467 '\p{All}' => 'SANY',
468 '\P{All}' => 'OPFAIL',
ecfe5375 469 '[\p{Any}]' => 'ANYOF[\x00-\xFF][0100-10FFFF]',
ff9145b9 470
ecfe5375
KW
471 '[\p{IsMyRuntimeProperty}]' => 'ANYOF[+utf8::IsMyRuntimeProperty]',
472 '[^\p{IsMyRuntimeProperty}]' => 'ANYOF[^{+utf8::IsMyRuntimeProperty}]',
473 '[a\p{IsMyRuntimeProperty}]' => 'ANYOF[a][+utf8::IsMyRuntimeProperty]',
474 '[^a\p{IsMyRuntimeProperty}]' => 'ANYOF[^a{+utf8::IsMyRuntimeProperty}]',
475 '[^a\x{100}\p{IsMyRuntimeProperty}]' => 'ANYOF[^a{+utf8::IsMyRuntimeProperty}0100]',
b2296192
KW
476 '[^\p{All}\p{IsMyRuntimeProperty}]' => 'OPFAIL',
477 '[\p{All}\p{IsMyRuntimeProperty}]' => 'SANY',
ff9145b9 478
6b503dfb
KW
479 '[\x{00}-{INFTY_minus_1}]' => 'ANYOF[\x00-\xFF][0100-INFTY_minus_1]',
480 '[\x{00}-{INFTY}]' => 'SANY',
c316b824
KW
481 '(?i)[\x{100}]' => 'ANYOFH[0100-0101]',
482 '[\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
483 '[\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY_minus_1]',
484 '[\x{102}\x{104}]' => 'ANYOFH[0102 0104]',
485 '[\x{102}-\x{104}{INFTY}]' => 'ANYOFH[0102-0104 INFTY-INFTY]',
486 '[\x{102}-\x{104}{INFTY_minus_1}]' => 'ANYOFH[0102-0104 INFTY_minus_1]',
487 '[\x{102}-\x{104}\x{101}]' => 'ANYOFH[0101-0104]',
488 '[\x{102}-\x{104}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
489 '[\x{102}-\x{104}\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY_minus_1]',
490 '[\x{102}-\x{104}\x{102}]' => 'ANYOFH[0102-0104]',
491 '[\x{102}-\x{104}\x{102}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
492 '[\x{102}-\x{104}\x{102}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
493 '[\x{102}-\x{104}\x{103}]' => 'ANYOFH[0102-0104]',
494 '[\x{102}-\x{104}\x{103}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
495 '[\x{102}-\x{104}\x{103}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
496 '[\x{102}-\x{104}\x{104}]' => 'ANYOFH[0102-0104]',
497 '[\x{102}-\x{104}\x{104}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
498 '[\x{102}-\x{104}\x{104}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
499 '[\x{102}-\x{104}\x{105}]' => 'ANYOFH[0102-0105]',
500 '[\x{102}-\x{104}\x{105}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
501 '[\x{102}-\x{104}\x{105}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
502 '[\x{102}-\x{104}\x{106}]' => 'ANYOFH[0102-0104 0106]',
503 '[\x{102}-\x{104}\x{106}-{INFTY}]' => 'ANYOFH[0102-0104 0106-INFTY]',
504 '[\x{102}-\x{104}\x{106}-{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0106-INFTY_minus_1]',
505 '[\x{102}-\x{104}\x{108}-\x{10A}{INFTY}]' => 'ANYOFH[0102-0104 0108-010A INFTY-INFTY]',
506 '[\x{102}-\x{104}\x{108}-\x{10A}{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0108-010A INFTY_minus_1]',
507 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}]' => 'ANYOFH[0101-0104 0108-010A]',
508 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
509 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY_minus_1]',
510 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{102}]' => 'ANYOFH[0101-0104 0108-010A]',
511 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{103}]' => 'ANYOFH[0101-0104 0108-010A]',
512 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{104}]' => 'ANYOFH[0101-0104 0108-010A]',
513 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{105}]' => 'ANYOFH[0101-0105 0108-010A]',
514 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{106}]' => 'ANYOFH[0101-0106 0108-010A]',
515 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOFH[0101-010A]',
516 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOFH[0101-010A]',
517 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOFH[0101-010A]',
518 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOFH[0101-010A]',
519 '[\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOFH[0101-010B]',
520 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}]' => 'ANYOFH[0102-0104 0108-010A]',
521 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
522 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
523 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{102}]' => 'ANYOFH[0102-0104 0108-010A]',
524 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{103}]' => 'ANYOFH[0102-0104 0108-010A]',
525 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{104}]' => 'ANYOFH[0102-0104 0108-010A]',
526 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A]',
527 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A]',
528 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOFH[0102-010A]',
529 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOFH[0102-010A]',
530 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOFH[0102-010A]',
531 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOFH[0102-010A]',
532 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOFH[0102-010B]',
533 '[\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOFH[0102-010C]',
534 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOFH[0102-0104 0108-010A]',
535 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
536 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
537 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{104}]' => 'ANYOFH[0102-0104 0108-010A]',
538 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A]',
539 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A]',
540 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOFH[0102-010A]',
541 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOFH[0102-010A]',
542 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOFH[0102-010A]',
543 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOFH[0102-010A]',
544 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOFH[0102-010B]',
545 '[\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOFH[0102-010C]',
546 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOFH[0102-0104 0108-010A]',
547 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
548 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
549 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A]',
550 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A]',
551 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOFH[0102-010A]',
552 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOFH[0102-010A]',
553 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOFH[0102-010A]',
554 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOFH[0102-010A]',
555 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOFH[0102-010B]',
556 '[\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOFH[0102-010C]',
557 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOFH[0102-0105 0108-010A]',
558 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
559 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY_minus_1]',
560 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A]',
561 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOFH[0102-010A]',
562 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOFH[0102-010A]',
563 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOFH[0102-010A]',
564 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOFH[0102-010A]',
565 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOFH[0102-010B]',
566 '[\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOFH[0102-010C]',
567 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOFH[0102-0104 0106 0108-010A]',
568 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY}]' => 'ANYOFH[0102-0104 0106-INFTY]',
569 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0106-INFTY_minus_1]',
570 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{107}]' => 'ANYOFH[0102-0104 0106-010A]',
571 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{108}]' => 'ANYOFH[0102-0104 0106-010A]',
572 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{109}]' => 'ANYOFH[0102-0104 0106-010A]',
573 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10A}]' => 'ANYOFH[0102-0104 0106-010A]',
574 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10B}]' => 'ANYOFH[0102-0104 0106-010B]',
575 '[\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10C}]' => 'ANYOFH[0102-0104 0106-010C]',
576 '[\x{102}-\x{104}\x{108}-\x{10A}\x{107}]' => 'ANYOFH[0102-0104 0107-010A]',
577 '[\x{102}-\x{104}\x{108}-\x{10A}\x{108}]' => 'ANYOFH[0102-0104 0108-010A]',
578 '[\x{102}-\x{104}\x{108}-\x{10A}\x{109}]' => 'ANYOFH[0102-0104 0108-010A]',
579 '[\x{102}-\x{104}\x{108}-\x{10A}\x{10A}]' => 'ANYOFH[0102-0104 0108-010A]',
580 '[\x{102}-\x{104}\x{108}-\x{10A}\x{10B}]' => 'ANYOFH[0102-0104 0108-010B]',
581 '[\x{103}\x{102}]' => 'ANYOFH[0102-0103]',
582 '[\x{104}\x{102}]' => 'ANYOFH[0102 0104]',
583 '[\x{104}\x{102}\x{103}]' => 'ANYOFH[0102-0104]',
584 '[\x{106}-{INFTY}\x{104}]' => 'ANYOFH[0104 0106-INFTY]',
585 '[\x{106}-{INFTY}\x{104}-{INFTY}]' => 'ANYOFH[0104-INFTY]',
586 '[\x{106}-{INFTY}\x{104}-{INFTY_minus_1}]' => 'ANYOFH[0104-INFTY]',
587 '[\x{106}-{INFTY}\x{104}-\x{105}]' => 'ANYOFH[0104-INFTY]',
588 '[\x{106}-{INFTY}\x{104}-\x{106}]' => 'ANYOFH[0104-INFTY]',
589 '[\x{106}-{INFTY}\x{104}-\x{107}]' => 'ANYOFH[0104-INFTY]',
590 '[\x{106}-{INFTY}\x{105}]' => 'ANYOFH[0105-INFTY]',
591 '[\x{106}-{INFTY}\x{105}-{INFTY}]' => 'ANYOFH[0105-INFTY]',
592 '[\x{106}-{INFTY}\x{105}-{INFTY_minus_1}]' => 'ANYOFH[0105-INFTY]',
593 '[\x{106}-{INFTY}\x{105}-\x{106}]' => 'ANYOFH[0105-INFTY]',
594 '[\x{106}-{INFTY}\x{105}-\x{107}]' => 'ANYOFH[0105-INFTY]',
595 '[\x{106}-{INFTY}\x{106}]' => 'ANYOFH[0106-INFTY]',
596 '[\x{106}-{INFTY}\x{106}-{INFTY}]' => 'ANYOFH[0106-INFTY]',
597 '[\x{106}-{INFTY}\x{106}-{INFTY_minus_1}]' => 'ANYOFH[0106-INFTY]',
598 '[\x{106}-{INFTY}\x{106}-\x{107}]' => 'ANYOFH[0106-INFTY]',
599 '[\x{106}-{INFTY}\x{107}]' => 'ANYOFH[0106-INFTY]',
600 '[\x{106}-{INFTY}\x{107}-{INFTY}]' => 'ANYOFH[0106-INFTY]',
601 '[\x{106}-{INFTY}\x{107}-{INFTY_minus_1}]' => 'ANYOFH[0106-INFTY]',
602 '[\x{106}-{INFTY}\x{107}-\x{107}]' => 'ANYOFH[0106-INFTY]',
603 '[\x{10C}-{INFTY}{INFTY}]' => 'ANYOFH[010C-INFTY]',
604 '[\x{10C}-{INFTY}{INFTY_minus_1}]' => 'ANYOFH[010C-INFTY]',
6b503dfb
KW
605 '[\x{10C}-{INFTY}\x{00}-{INFTY_minus_1}]' => 'SANY',
606 '[\x{10C}-{INFTY}\x{00}-{INFTY}]' => 'SANY',
c316b824
KW
607 '[\x{10C}-{INFTY}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
608 '[\x{10C}-{INFTY}\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY]',
609 '[\x{10C}-{INFTY}\x{102}\x{104}]' => 'ANYOFH[0102 0104 010C-INFTY]',
610 '[\x{10C}-{INFTY}\x{102}-\x{104}{INFTY}]' => 'ANYOFH[0102-0104 010C-INFTY]',
611 '[\x{10C}-{INFTY}\x{102}-\x{104}{INFTY_minus_1}]' => 'ANYOFH[0102-0104 010C-INFTY]',
612 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{100}]' => 'ANYOFH[0100 0102-0104 010C-INFTY]',
613 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{101}]' => 'ANYOFH[0101-0104 010C-INFTY]',
614 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
615 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY]',
616 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{102}]' => 'ANYOFH[0102-0104 010C-INFTY]',
617 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{102}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
618 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{102}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
619 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{103}]' => 'ANYOFH[0102-0104 010C-INFTY]',
620 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{103}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
621 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{103}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
622 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{104}]' => 'ANYOFH[0102-0104 010C-INFTY]',
623 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{104}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
624 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{104}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
625 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{105}]' => 'ANYOFH[0102-0105 010C-INFTY]',
626 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{105}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
627 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{105}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
628 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{106}]' => 'ANYOFH[0102-0104 0106 010C-INFTY]',
629 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{106}-{INFTY}]' => 'ANYOFH[0102-0104 0106-INFTY]',
630 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{106}-{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0106-INFTY]',
631 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}{INFTY}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
632 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
633 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}]' => 'ANYOFH[0101-0104 0108-010A 010C-INFTY]',
634 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY}]' => 'ANYOFH[0101-INFTY]',
635 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-{INFTY_minus_1}]' => 'ANYOFH[0101-INFTY]',
636 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{102}]' => 'ANYOFH[0101-0104 0108-010A 010C-INFTY]',
637 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{103}]' => 'ANYOFH[0101-0104 0108-010A 010C-INFTY]',
638 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{104}]' => 'ANYOFH[0101-0104 0108-010A 010C-INFTY]',
639 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{105}]' => 'ANYOFH[0101-0105 0108-010A 010C-INFTY]',
640 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{106}]' => 'ANYOFH[0101-0106 0108-010A 010C-INFTY]',
641 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{107}]' => 'ANYOFH[0101-010A 010C-INFTY]',
642 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{108}]' => 'ANYOFH[0101-010A 010C-INFTY]',
643 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{109}]' => 'ANYOFH[0101-010A 010C-INFTY]',
644 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10A}]' => 'ANYOFH[0101-010A 010C-INFTY]',
645 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{101}-\x{10B}]' => 'ANYOFH[0101-INFTY]',
646 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
647 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
648 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
649 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{102}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
650 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{103}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
651 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{104}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
652 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A 010C-INFTY]',
653 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A 010C-INFTY]',
654 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{107}]' => 'ANYOFH[0102-010A 010C-INFTY]',
655 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{108}]' => 'ANYOFH[0102-010A 010C-INFTY]',
656 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{109}]' => 'ANYOFH[0102-010A 010C-INFTY]',
657 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10A}]' => 'ANYOFH[0102-010A 010C-INFTY]',
658 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10B}]' => 'ANYOFH[0102-INFTY]',
659 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{102}-\x{10C}]' => 'ANYOFH[0102-INFTY]',
660 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
661 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
662 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
663 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{104}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
664 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A 010C-INFTY]',
665 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A 010C-INFTY]',
666 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{107}]' => 'ANYOFH[0102-010A 010C-INFTY]',
667 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{108}]' => 'ANYOFH[0102-010A 010C-INFTY]',
668 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{109}]' => 'ANYOFH[0102-010A 010C-INFTY]',
669 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10A}]' => 'ANYOFH[0102-010A 010C-INFTY]',
670 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10B}]' => 'ANYOFH[0102-INFTY]',
671 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{103}-\x{10C}]' => 'ANYOFH[0102-INFTY]',
672 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
673 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
674 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
675 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{105}]' => 'ANYOFH[0102-0105 0108-010A 010C-INFTY]',
676 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A 010C-INFTY]',
677 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{107}]' => 'ANYOFH[0102-010A 010C-INFTY]',
678 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{108}]' => 'ANYOFH[0102-010A 010C-INFTY]',
679 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{109}]' => 'ANYOFH[0102-010A 010C-INFTY]',
680 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10A}]' => 'ANYOFH[0102-010A 010C-INFTY]',
681 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10B}]' => 'ANYOFH[0102-INFTY]',
682 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{104}-\x{10C}]' => 'ANYOFH[0102-INFTY]',
683 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}]' => 'ANYOFH[0102-0105 0108-010A 010C-INFTY]',
684 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY}]' => 'ANYOFH[0102-INFTY]',
685 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-{INFTY_minus_1}]' => 'ANYOFH[0102-INFTY]',
686 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{106}]' => 'ANYOFH[0102-0106 0108-010A 010C-INFTY]',
687 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{107}]' => 'ANYOFH[0102-010A 010C-INFTY]',
688 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{108}]' => 'ANYOFH[0102-010A 010C-INFTY]',
689 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{109}]' => 'ANYOFH[0102-010A 010C-INFTY]',
690 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10A}]' => 'ANYOFH[0102-010A 010C-INFTY]',
691 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10B}]' => 'ANYOFH[0102-INFTY]',
692 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{105}-\x{10C}]' => 'ANYOFH[0102-INFTY]',
693 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}]' => 'ANYOFH[0102-0104 0106 0108-010A 010C-INFTY]',
694 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY}]' => 'ANYOFH[0102-0104 0106-INFTY]',
695 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-{INFTY_minus_1}]' => 'ANYOFH[0102-0104 0106-INFTY]',
696 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{107}]' => 'ANYOFH[0102-0104 0106-010A 010C-INFTY]',
697 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{108}]' => 'ANYOFH[0102-0104 0106-010A 010C-INFTY]',
698 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{109}]' => 'ANYOFH[0102-0104 0106-010A 010C-INFTY]',
699 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10A}]' => 'ANYOFH[0102-0104 0106-010A 010C-INFTY]',
700 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10B}]' => 'ANYOFH[0102-0104 0106-INFTY]',
701 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{106}-\x{10C}]' => 'ANYOFH[0102-0104 0106-INFTY]',
702 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{107}]' => 'ANYOFH[0102-0104 0107-010A 010C-INFTY]',
703 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{108}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
704 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{109}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
705 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{10A}]' => 'ANYOFH[0102-0104 0108-010A 010C-INFTY]',
706 '[\x{10C}-{INFTY}\x{102}-\x{104}\x{108}-\x{10A}\x{10B}]' => 'ANYOFH[0102-0104 0108-INFTY]',
707 '[\x{10C}-{INFTY}\x{103}\x{102}]' => 'ANYOFH[0102-0103 010C-INFTY]',
708 '[\x{10C}-{INFTY}\x{104}\x{102}]' => 'ANYOFH[0102 0104 010C-INFTY]',
709 '[\x{10C}-{INFTY}\x{104}\x{102}\x{103}]' => 'ANYOFH[0102-0104 010C-INFTY]',
710 '[{INFTY_minus_1}]' => 'ANYOFH[INFTY_minus_1]',
711 '[{INFTY}]' => 'ANYOFH[INFTY-INFTY]',
b2296192
KW
712
713 '(?8)(?i)[\x{100}]' => 'EXACTFU_ONLY8 <\x{101}>',
714 '(?8)(?i)[\x{399}]' => 'EXACTFU_ONLY8 <\x{3b9}>',
715 '(?8)(?i)[\x{345}\x{399}\x{3B9}\x{1FBE}]' => 'EXACTFU_ONLY8 <\x{3b9}>',
c316b824 716 '(?i)[\x{2b9}]' => 'ANYOFH[02B9]', # Doesn't participate in a fold
b2296192
KW
717 '(?8)(?i)[\x{2b9}]' => 'EXACT_ONLY8 <\x{2b9}>',
718 '(?i)[\x{2bc}]' => 'EXACTFU_ONLY8 <\x{2bc}>', # Part of a multi-char fold, ASCII component
719 '(?i)[\x{390}]' => 'EXACTFU_ONLY8 <\x{3b9}\x{308}\x{301}>', # Part of a multi-char fold, no ASCII component
720
721 '(?i)[\x{1E9E}]' => 'EXACTFU <ss>',
722 '(?iaa)[\x{1E9E}]' => 'EXACTFAA <\x{17f}\x{17f}>',
723 '(?i)[\x{FB00}]' => 'EXACTFU <ff>',
c316b824 724 '(?iaa)[\x{FB00}]' => 'ANYOFH[FB00]',
b2296192
KW
725 '(?i)[\x{FB00}]' => 'EXACTFU <ff>',
726 '(?i)[\x{FB01}]' => 'EXACTFU <fi>',
727 '(?i)[\x{FB02}]' => 'EXACTFU <fl>',
728 '(?i)[\x{FB03}]' => 'EXACTFU <ffi>',
729 '(?i)[\x{FB04}]' => 'EXACTFU <ffl>',
730 '(?i)[\x{FB05}]' => 'EXACTFU <st>',
731 '(?i)[\x{FB06}]' => 'EXACTFU <st>',
732
733 '[a][b]' => 'EXACT <ab>',
734 '[a]\x{100}' => 'EXACT_ONLY8 <a\x{100}>',
735 '(?8)[\x{100}]a' => 'EXACT_ONLY8 <\x{100}a>',
736 '(?i)[b][c]' => 'EXACTFU <bc>',
737 '(?i)[b]\x{100}' => 'EXACTFU_ONLY8 <b\x{101}>',
738 '(?8)(?i)[\x{100}]b' => 'EXACTFU_ONLY8 <\x{101}b>',
739 '(?i)b[s]' => 'EXACTFU <bs>',
740 '(?i)b[s]c' => 'EXACTFU <bsc>',
741 '(?i)bs[s]c' => 'EXACTF <bss>', # The c goes into a 2nd node
742 '(?iu)bs[s]c' => 'EXACTFUP <bssc>',
743 '(?i)b[s]sc' => 'EXACTF <bssc>',
744 '(?iu)b[s]sc' => 'EXACTFUP <bssc>',
745 '(?i)[b]st' => 'EXACTFU <bst>',
746 '(?i)[b]st[s]' => 'EXACTFU <bsts>',
747 '(?i)[b]st[s]st' => 'EXACTF <bstsst>',
748 '(?iu)[b]st[s]st' => 'EXACTFUP <bstsst>',
749 '(?i)[s][s]' => 'EXACTF <ss>',
750 '(?iu)[s][s]' => 'EXACTFUP <ss>',
847612ec
KW
751);
752
b2296192
KW
753my @single_chars_to_test =
754(
755 "\x00", # Always potentially problematic
756 "\x01", # Unnamed control
757 "\b", # Named control
758 "\n", # Potentially special
759 "\r", # Potentially special
760 "\cK", # Potentially special
761 "0", # Digit
762 ":", # Not in any fold
763 "A", # ASCII capital, participates in multi-char fold
764 "a", # ASCII small, participates in multi-char fold
765 "B", # ASCII capital, participates only in case-pair fold
766 "b", # ASCII small, participates only in case-pair fold
767 "K", # ASCII capital, folded to from above Latin1
768 "k", # ASCII small, folded to from above Latin1
769 "\c?", # Potentially special
770 "\x80", # Latin1 control
771 "\xB5", # Micro sign, folds to above Latin1
772 "\xC0", # Latin1 capital, participates only in case-pair fold
773 "\xE0", # Latin1 small, participates only in case-pair fold
774 "\xC5", # Latin1 capital, folded to from above Latin1
775 "\xE5", # Latin1 small, folded to from above Latin1
776 "\xDF", # Small sharp S. folds to 'ss'
777 "\xF7", # Doesn't participate in any fold
778 "\xFF", # Folded to by above Latin1
779 "\x{100}", # First few above Latin1 characters
780 "\x{101}",
781 "\x{102}",
782 "\x{103}",
783 "\x{104}",
784 "\x{105}",
785 "\x{106}",
786 "\x{107}",
787 "\x{108}",
788);
789
790my @single_tests;
791for my $char (@single_chars_to_test) {
792 my $cp = ord $char;
793 my $hex = sprintf "%02x", $cp;
794 my $oct = sprintf "%o", $cp;
795 my $cp_string;
796
797 my $cased;
798 my $folded_hex;
799
800 {
801 use feature 'unicode_strings';
802 $cased = uc $char ne $char || lc $char ne $char;
803 $folded_hex = ($cased)
804 ? sprintf("%02x", ord lc $char)
805 : $hex;
806 #print STDERR "$hex, $folded_hex\n";
807 }
808
809 for my $fold ("", "i") {
810 #next unless $fold;
811 for my $charset ("", "u", "l", "aa") {
812 #next if $charset eq "aa" && ! $fold;
813
814 my $modifiers = $fold . $charset;
815 $modifiers = "(?$modifiers)" if $modifiers;
816
817 for my $upgrade ("", "(?8)") {
818 push @single_tests, "$upgrade$modifiers\[\\x{$hex}\]";
819 if ($cp < 256 || $upgrade) {
820 push @single_tests, get_compiled("$upgrade$modifiers\\x{$hex}");
821 }
822 else {
823 my $interior = "";
824 my @list = $cp;
825 if ($fold) {
826 if (lc $char ne $char) {
827 push @list, ord lc $char;
828 }
829 elsif (uc $char ne $char) {
830 push @list, ord uc $char;
831 }
832 }
833 @list = sort { $a <=> $b } @list;
834 if (@list == 1) {
835 $interior = sprintf "%04X", $list[0];
836 }
837 elsif (@list == 2) {
838 my $separator = ($list[1] == $list[0] + 1) ? '-' : ', ';
839 $interior = sprintf "%04X$separator%04X", $list[0], $list[1];
840 }
841 else {
842 die join ", ", @list;
843 }
c316b824 844 my $anyof = ($charset eq "l") ? "ANYOFL" : "ANYOFH";
b2296192
KW
845 push @single_tests, "$anyof\[$interior\]";
846 }
847 }
848 }
849 }
850}
851
852unshift @tests, @single_tests;
853
847612ec
KW
854plan(scalar (@tests - 1) / 2); # -1 because of the marker.
855
856my $skip_ebcdic = $::IS_EBCDIC;
857while (defined (my $test = shift @tests)) {
858
859 if ($test eq 'ebcdic_ok_below_this_marker') {
860 $skip_ebcdic = 0;
861 next;
862 }
863
864 my $expected = shift @tests;
865
866 SKIP: {
867 skip("test not ported to EBCDIC", 1) if $skip_ebcdic;
868
869 my $display_expected = $expected
6b503dfb 870 =~ s/ INFTY_minus_1 /$next_highest_cp/xgr;
847612ec 871
542d7e4a
KW
872 my $result = get_compiled($test);
873 is($result, $expected,
847612ec 874 "Verify compilation of $test displays as $display_expected");
847612ec
KW
875 }
876}