blib/lib/Eutf2.pm

filter: Statementstmt 43.5% 1444 / 3318 Branchbran 45.2% 1351 / 2984 Conditioncond 44.0% 163 / 370 MC/DCmcdc 28.6% 63 / 220 Subroutinesub 71.6% 86 / 120 Podpod 4.6% 3 / 64 totaltotal 43.9% 3110 / 7076 CC 1663 SCAR 96.8
CC
1663
Cov
44%
escape_token
39986.7
e_string
33153.0
e_s1
2752.5
CRAP 15951.9
↑ Summary blib/lib/UTF2.pm »
1 package Eutf2;
2 629 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 ######################################################################
4 #
5 # Eutf2 - Run-time routines for UTF2.pm
6 #
7 # http://search.cpan.org/dist/Char-UTF2/
8 #
9 # Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018, 2019 INABA Hitoshi <ina@cpan.org>
10 ######################################################################
11  
12 629 ▶use 5.00503; # Galapagos Consensus 1998 for primetools
Subroutine BEGIN: called CC=1 SCAR=0.0
13 # use 5.008001; # Lancaster Consensus 2013 for toolchains
14  
15 # 12.3. Delaying use Until Runtime
16 # in Chapter 12. Packages, Libraries, and Modules
17 # of ISBN 0-596-00313-7 Perl Cookbook, 2nd Edition.
18 # (and so on)
19  
20 # Version numbers should be boring
21 # http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/
22 # For the impatient, the disinterested or those who just want to follow
23 # a recipe, my advice for all modules is this:
24 # our $VERSION = "0.001"; # or "0.001_001" for a dev release
25 # $VERSION = eval $VERSION; # No!! because '1.10' makes '1.1'
26  
27 629 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
28 629 $VERSION = '1.15';
29 629 $VERSION = $VERSION;
30  
31 629 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=7.6
32 629 ▶ if ($^X =~ / jperl /oxmsi) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^X =~ / jperl /imosx) 0 629 629
33 0 die __FILE__, ": needs perl(not jperl) 5.00503 or later. (\$^X==$^X)\n";
34 }
35 629 if (CORE::ord('A') == 193) {
36 die __FILE__, ": is not US-ASCII script (may be EBCDIC or EBCDIK script).\n";
37 }
38 629 if (CORE::ord('A') != 0x41) {
39 die __FILE__, ": is not US-ASCII script (must be US-ASCII script).\n";
40 }
41 }
42  
43 629 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=9.5
44  
45 # instead of utf8.pm
46 629 ▶ CORE::eval q{
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
47 no warnings qw(redefine);
48 *utf8::upgrade = sub { CORE::length $_[0] };
49 *utf8::downgrade = sub { 1 };
50 *utf8::encode = sub { };
51 *utf8::decode = sub { 1 };
52 *utf8::is_utf8 = sub { };
53 *utf8::valid = sub { 1 };
54 };
55 629 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 629 629
56 0 ▶ *utf8::upgrade = sub { CORE::length $_[0] };
Subroutine __ANON__: not called CC=1 SCAR=6.9
57 0 ▶ *utf8::downgrade = sub { 1 };
Subroutine __ANON__: not called CC=1 SCAR=6.9
58 0 ▶ *utf8::encode = sub { };
Subroutine __ANON__: not called CC=1 SCAR=6.9
59 0 ▶ *utf8::decode = sub { 1 };
Subroutine __ANON__: not called CC=1 SCAR=6.9
60 0 ▶ *utf8::is_utf8 = sub { };
Subroutine __ANON__: not called CC=1 SCAR=6.9
61 0 ▶ *utf8::valid = sub { 1 };
Subroutine __ANON__: not called CC=1 SCAR=6.9
62 }
63 }
64  
65 # instead of Symbol.pm
66 BEGIN {
67 0 ▶ sub gensym () {
Subroutine gensym: not called CC=2 SCAR=17.9
Pod undocumented
68 0 ▶ if ($] < 5.006) {
Branch: 1 branch
BranchTrueFalseTotal
if ($] < 5.006) { } 0 0 0
69 0 return \do { local *_ };
70 }
71 else {
72 0 return undef;
73 }
74 }
75  
76 56 ▶ sub qualify ($$) {
Subroutine qualify: called CC=8 SCAR=28.9
Pod undocumented
77 56 my($name) = @_;
78  
79 56 ▶ if (ref $name) {
Branch: 7 branches
BranchTrueFalseTotal
if (ref $name) { } 14 42 56
elsif (&Eutf2::index($name, '::') >= 0) { } 0 42 42
elsif (&Eutf2::index($name, q[']) >= 0) { } 0 42 42
elsif ($name =~ /\A \^ [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]+ \z/x) { } 0 42 42
elsif ($name =~ /\A (?: ARGV | ARGVOUT | ENV | INC | SIG | STDERR | STDIN | STDOUT ) \z/x) { } 0 42 42
elsif ($name =~ /\A [^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz] \z/x) { } 0 42 42
elsif (defined $_[1]) { } 42 0 42
80 14 return $name;
81 }
82 elsif (Eutf2::index($name,'::') >= 0) {
83 0 return $name;
84 }
85 elsif (Eutf2::index($name,"'") >= 0) {
86 0 return $name;
87 }
88  
89 # special character, "^xyz"
90 elsif ($name =~ /\A \^ [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]+ \z/x) {
91  
92 # RGS 2001-11-05 : translate leading ^X to control-char
93 0 $name =~ s{\A \^ ([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]) }{'qq(\c'.$1.')'}xee;
94 0 return 'main::' . $name;
95 }
96  
97 # Global names
98 elsif ($name =~ /\A (?: ARGV | ARGVOUT | ENV | INC | SIG | STDERR | STDIN | STDOUT ) \z/x) {
99 0 return 'main::' . $name;
100 }
101  
102 # or other
103 elsif ($name =~ /\A [^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz] \z/x) {
104 0 return 'main::' . $name;
105 }
106  
107 elsif (defined $_[1]) {
108 42 return $_[1] . '::' . $name;
109 }
110 else {
111 0 return (caller)[0] . '::' . $name;
112 }
113 }
114  
115 56 ▶ sub qualify_to_ref ($;$) {
Subroutine qualify_to_ref: called CC=2 SCAR=7.2
Pod undocumented
116 56 ▶ if (defined $_[1]) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_[1]) { } 56 0 56
117 629 ▶ no strict qw(refs);
Subroutine BEGIN: called CC=1 SCAR=0.0
118 56 return \*{ qualify $_[0], $_[1] };
119 }
120 else {
121 629 ▶ no strict qw(refs);
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: not called CC=1 SCAR=0.0
122 0 return \*{ qualify $_[0], (caller)[0] };
123 }
124 }
125 }
126  
127 # P.714 29.2.39. flock
128 # in Chapter 29: Functions
129 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
130  
131 # P.863 flock
132 # in Chapter 27: Functions
133 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
134  
135 sub LOCK_SH() {1}
136 sub LOCK_EX() {2}
137 sub LOCK_UN() {8}
138 sub LOCK_NB() {4}
139  
140 # instead of Carp.pm
141 sub carp;
142 sub croak;
143 sub cluck;
144 sub confess;
145  
146 # 6.18. Matching Multiple-Byte Characters
147 # in Chapter 6. Pattern Matching
148 # of ISBN 978-1-56592-243-3 Perl Perl Cookbook.
149 # (and so on)
150  
151 # regexp of character
152 629 my $your_char = q{(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF]|[\x00-\x7F\xF5-\xFF]};
153 629 ▶use vars qw($qq_char); $qq_char = qr/\\c[\x40-\x5F]|\\?(?:$your_char)/oxms;
Subroutine BEGIN: called CC=1 SCAR=0.0
154 629 ▶use vars qw($q_char); $q_char = qr/$your_char/oxms;
Subroutine BEGIN: called CC=1 SCAR=0.0
155  
156 #
157 # UTF-8 character range per length
158 #
159 629 my %range_tr = ();
160  
161 #
162 # UTF-8 case conversion
163 #
164 629 my %lc = ();
165 629 @lc{qw(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)} =
166 qw(a b c d e f g h i j k l m n o p q r s t u v w x y z);
167 629 my %uc = ();
168 629 @uc{qw(a b c d e f g h i j k l m n o p q r s t u v w x y z)} =
169 qw(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z);
170 629 my %fc = ();
171 629 @fc{qw(A B C D E F G H I J K L M N O P Q R S T U V W X Y Z)} =
172 qw(a b c d e f g h i j k l m n o p q r s t u v w x y z);
173  
174 629 ▶if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { __PACKAGE__ =~ / \b Eutf2 \z/mosx }) { } 629 0 629
175 }
176  
177 elsif (__PACKAGE__ =~ / \b Eutf2 \z/oxms) {
178 629 %range_tr = (
179 1 => [ [0x00..0x7F],
180 [0xF5..0xFF], # malformed octet
181 ],
182 2 => [ [0xC2..0xDF],[0x80..0xBF],
183 ],
184 3 => [ [0xE0..0xE0],[0xA0..0xBF],[0x80..0xBF],
185 [0xE1..0xEC],[0x80..0xBF],[0x80..0xBF],
186 [0xED..0xED],[0x80..0x9F],[0x80..0xBF],
187 [0xEE..0xEF],[0x80..0xBF],[0x80..0xBF],
188 ],
189 4 => [ [0xF0..0xF0],[0x90..0xBF],[0x80..0xBF],[0x80..0xBF],
190 [0xF1..0xF3],[0x80..0xBF],[0x80..0xBF],[0x80..0xBF],
191 [0xF4..0xF4],[0x80..0x8F],[0x80..0xBF],[0x80..0xBF],
192 ],
193 );
194  
195 # CaseFolding-12.0.0.txt
196 # Date: 2019-01-22, 08:18:22 GMT
197 # c 2019 UnicodeR, Inc.
198 # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
199 # For terms of use, see http://www.unicode.org/terms_of_use.html
200 #
201 # Unicode Character Database
202 # For documentation, see http://www.unicode.org/reports/tr44/
203  
204 # you can use "make_CaseFolding.pl" to update this hash
205  
206 629 %fc = (
207 "\x41" => "\x61", # LATIN CAPITAL LETTER A
208 "\x42" => "\x62", # LATIN CAPITAL LETTER B
209 "\x43" => "\x63", # LATIN CAPITAL LETTER C
210 "\x44" => "\x64", # LATIN CAPITAL LETTER D
211 "\x45" => "\x65", # LATIN CAPITAL LETTER E
212 "\x46" => "\x66", # LATIN CAPITAL LETTER F
213 "\x47" => "\x67", # LATIN CAPITAL LETTER G
214 "\x48" => "\x68", # LATIN CAPITAL LETTER H
215 "\x49" => "\x69", # LATIN CAPITAL LETTER I
216 "\x4A" => "\x6A", # LATIN CAPITAL LETTER J
217 "\x4B" => "\x6B", # LATIN CAPITAL LETTER K
218 "\x4C" => "\x6C", # LATIN CAPITAL LETTER L
219 "\x4D" => "\x6D", # LATIN CAPITAL LETTER M
220 "\x4E" => "\x6E", # LATIN CAPITAL LETTER N
221 "\x4F" => "\x6F", # LATIN CAPITAL LETTER O
222 "\x50" => "\x70", # LATIN CAPITAL LETTER P
223 "\x51" => "\x71", # LATIN CAPITAL LETTER Q
224 "\x52" => "\x72", # LATIN CAPITAL LETTER R
225 "\x53" => "\x73", # LATIN CAPITAL LETTER S
226 "\x54" => "\x74", # LATIN CAPITAL LETTER T
227 "\x55" => "\x75", # LATIN CAPITAL LETTER U
228 "\x56" => "\x76", # LATIN CAPITAL LETTER V
229 "\x57" => "\x77", # LATIN CAPITAL LETTER W
230 "\x58" => "\x78", # LATIN CAPITAL LETTER X
231 "\x59" => "\x79", # LATIN CAPITAL LETTER Y
232 "\x5A" => "\x7A", # LATIN CAPITAL LETTER Z
233 "\xC2\xB5" => "\xCE\xBC", # MICRO SIGN
234 "\xC3\x80" => "\xC3\xA0", # LATIN CAPITAL LETTER A WITH GRAVE
235 "\xC3\x81" => "\xC3\xA1", # LATIN CAPITAL LETTER A WITH ACUTE
236 "\xC3\x82" => "\xC3\xA2", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
237 "\xC3\x83" => "\xC3\xA3", # LATIN CAPITAL LETTER A WITH TILDE
238 "\xC3\x84" => "\xC3\xA4", # LATIN CAPITAL LETTER A WITH DIAERESIS
239 "\xC3\x85" => "\xC3\xA5", # LATIN CAPITAL LETTER A WITH RING ABOVE
240 "\xC3\x86" => "\xC3\xA6", # LATIN CAPITAL LETTER AE
241 "\xC3\x87" => "\xC3\xA7", # LATIN CAPITAL LETTER C WITH CEDILLA
242 "\xC3\x88" => "\xC3\xA8", # LATIN CAPITAL LETTER E WITH GRAVE
243 "\xC3\x89" => "\xC3\xA9", # LATIN CAPITAL LETTER E WITH ACUTE
244 "\xC3\x8A" => "\xC3\xAA", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX
245 "\xC3\x8B" => "\xC3\xAB", # LATIN CAPITAL LETTER E WITH DIAERESIS
246 "\xC3\x8C" => "\xC3\xAC", # LATIN CAPITAL LETTER I WITH GRAVE
247 "\xC3\x8D" => "\xC3\xAD", # LATIN CAPITAL LETTER I WITH ACUTE
248 "\xC3\x8E" => "\xC3\xAE", # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
249 "\xC3\x8F" => "\xC3\xAF", # LATIN CAPITAL LETTER I WITH DIAERESIS
250 "\xC3\x90" => "\xC3\xB0", # LATIN CAPITAL LETTER ETH
251 "\xC3\x91" => "\xC3\xB1", # LATIN CAPITAL LETTER N WITH TILDE
252 "\xC3\x92" => "\xC3\xB2", # LATIN CAPITAL LETTER O WITH GRAVE
253 "\xC3\x93" => "\xC3\xB3", # LATIN CAPITAL LETTER O WITH ACUTE
254 "\xC3\x94" => "\xC3\xB4", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
255 "\xC3\x95" => "\xC3\xB5", # LATIN CAPITAL LETTER O WITH TILDE
256 "\xC3\x96" => "\xC3\xB6", # LATIN CAPITAL LETTER O WITH DIAERESIS
257 "\xC3\x98" => "\xC3\xB8", # LATIN CAPITAL LETTER O WITH STROKE
258 "\xC3\x99" => "\xC3\xB9", # LATIN CAPITAL LETTER U WITH GRAVE
259 "\xC3\x9A" => "\xC3\xBA", # LATIN CAPITAL LETTER U WITH ACUTE
260 "\xC3\x9B" => "\xC3\xBB", # LATIN CAPITAL LETTER U WITH CIRCUMFLEX
261 "\xC3\x9C" => "\xC3\xBC", # LATIN CAPITAL LETTER U WITH DIAERESIS
262 "\xC3\x9D" => "\xC3\xBD", # LATIN CAPITAL LETTER Y WITH ACUTE
263 "\xC3\x9E" => "\xC3\xBE", # LATIN CAPITAL LETTER THORN
264 "\xC3\x9F" => "\x73\x73", # LATIN SMALL LETTER SHARP S
265 "\xC4\x80" => "\xC4\x81", # LATIN CAPITAL LETTER A WITH MACRON
266 "\xC4\x82" => "\xC4\x83", # LATIN CAPITAL LETTER A WITH BREVE
267 "\xC4\x84" => "\xC4\x85", # LATIN CAPITAL LETTER A WITH OGONEK
268 "\xC4\x86" => "\xC4\x87", # LATIN CAPITAL LETTER C WITH ACUTE
269 "\xC4\x88" => "\xC4\x89", # LATIN CAPITAL LETTER C WITH CIRCUMFLEX
270 "\xC4\x8A" => "\xC4\x8B", # LATIN CAPITAL LETTER C WITH DOT ABOVE
271 "\xC4\x8C" => "\xC4\x8D", # LATIN CAPITAL LETTER C WITH CARON
272 "\xC4\x8E" => "\xC4\x8F", # LATIN CAPITAL LETTER D WITH CARON
273 "\xC4\x90" => "\xC4\x91", # LATIN CAPITAL LETTER D WITH STROKE
274 "\xC4\x92" => "\xC4\x93", # LATIN CAPITAL LETTER E WITH MACRON
275 "\xC4\x94" => "\xC4\x95", # LATIN CAPITAL LETTER E WITH BREVE
276 "\xC4\x96" => "\xC4\x97", # LATIN CAPITAL LETTER E WITH DOT ABOVE
277 "\xC4\x98" => "\xC4\x99", # LATIN CAPITAL LETTER E WITH OGONEK
278 "\xC4\x9A" => "\xC4\x9B", # LATIN CAPITAL LETTER E WITH CARON
279 "\xC4\x9C" => "\xC4\x9D", # LATIN CAPITAL LETTER G WITH CIRCUMFLEX
280 "\xC4\x9E" => "\xC4\x9F", # LATIN CAPITAL LETTER G WITH BREVE
281 "\xC4\xA0" => "\xC4\xA1", # LATIN CAPITAL LETTER G WITH DOT ABOVE
282 "\xC4\xA2" => "\xC4\xA3", # LATIN CAPITAL LETTER G WITH CEDILLA
283 "\xC4\xA4" => "\xC4\xA5", # LATIN CAPITAL LETTER H WITH CIRCUMFLEX
284 "\xC4\xA6" => "\xC4\xA7", # LATIN CAPITAL LETTER H WITH STROKE
285 "\xC4\xA8" => "\xC4\xA9", # LATIN CAPITAL LETTER I WITH TILDE
286 "\xC4\xAA" => "\xC4\xAB", # LATIN CAPITAL LETTER I WITH MACRON
287 "\xC4\xAC" => "\xC4\xAD", # LATIN CAPITAL LETTER I WITH BREVE
288 "\xC4\xAE" => "\xC4\xAF", # LATIN CAPITAL LETTER I WITH OGONEK
289 "\xC4\xB0" => "\x69\xCC\x87", # LATIN CAPITAL LETTER I WITH DOT ABOVE
290 "\xC4\xB2" => "\xC4\xB3", # LATIN CAPITAL LIGATURE IJ
291 "\xC4\xB4" => "\xC4\xB5", # LATIN CAPITAL LETTER J WITH CIRCUMFLEX
292 "\xC4\xB6" => "\xC4\xB7", # LATIN CAPITAL LETTER K WITH CEDILLA
293 "\xC4\xB9" => "\xC4\xBA", # LATIN CAPITAL LETTER L WITH ACUTE
294 "\xC4\xBB" => "\xC4\xBC", # LATIN CAPITAL LETTER L WITH CEDILLA
295 "\xC4\xBD" => "\xC4\xBE", # LATIN CAPITAL LETTER L WITH CARON
296 "\xC4\xBF" => "\xC5\x80", # LATIN CAPITAL LETTER L WITH MIDDLE DOT
297 "\xC5\x81" => "\xC5\x82", # LATIN CAPITAL LETTER L WITH STROKE
298 "\xC5\x83" => "\xC5\x84", # LATIN CAPITAL LETTER N WITH ACUTE
299 "\xC5\x85" => "\xC5\x86", # LATIN CAPITAL LETTER N WITH CEDILLA
300 "\xC5\x87" => "\xC5\x88", # LATIN CAPITAL LETTER N WITH CARON
301 "\xC5\x89" => "\xCA\xBC\x6E", # LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
302 "\xC5\x8A" => "\xC5\x8B", # LATIN CAPITAL LETTER ENG
303 "\xC5\x8C" => "\xC5\x8D", # LATIN CAPITAL LETTER O WITH MACRON
304 "\xC5\x8E" => "\xC5\x8F", # LATIN CAPITAL LETTER O WITH BREVE
305 "\xC5\x90" => "\xC5\x91", # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
306 "\xC5\x92" => "\xC5\x93", # LATIN CAPITAL LIGATURE OE
307 "\xC5\x94" => "\xC5\x95", # LATIN CAPITAL LETTER R WITH ACUTE
308 "\xC5\x96" => "\xC5\x97", # LATIN CAPITAL LETTER R WITH CEDILLA
309 "\xC5\x98" => "\xC5\x99", # LATIN CAPITAL LETTER R WITH CARON
310 "\xC5\x9A" => "\xC5\x9B", # LATIN CAPITAL LETTER S WITH ACUTE
311 "\xC5\x9C" => "\xC5\x9D", # LATIN CAPITAL LETTER S WITH CIRCUMFLEX
312 "\xC5\x9E" => "\xC5\x9F", # LATIN CAPITAL LETTER S WITH CEDILLA
313 "\xC5\xA0" => "\xC5\xA1", # LATIN CAPITAL LETTER S WITH CARON
314 "\xC5\xA2" => "\xC5\xA3", # LATIN CAPITAL LETTER T WITH CEDILLA
315 "\xC5\xA4" => "\xC5\xA5", # LATIN CAPITAL LETTER T WITH CARON
316 "\xC5\xA6" => "\xC5\xA7", # LATIN CAPITAL LETTER T WITH STROKE
317 "\xC5\xA8" => "\xC5\xA9", # LATIN CAPITAL LETTER U WITH TILDE
318 "\xC5\xAA" => "\xC5\xAB", # LATIN CAPITAL LETTER U WITH MACRON
319 "\xC5\xAC" => "\xC5\xAD", # LATIN CAPITAL LETTER U WITH BREVE
320 "\xC5\xAE" => "\xC5\xAF", # LATIN CAPITAL LETTER U WITH RING ABOVE
321 "\xC5\xB0" => "\xC5\xB1", # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
322 "\xC5\xB2" => "\xC5\xB3", # LATIN CAPITAL LETTER U WITH OGONEK
323 "\xC5\xB4" => "\xC5\xB5", # LATIN CAPITAL LETTER W WITH CIRCUMFLEX
324 "\xC5\xB6" => "\xC5\xB7", # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX
325 "\xC5\xB8" => "\xC3\xBF", # LATIN CAPITAL LETTER Y WITH DIAERESIS
326 "\xC5\xB9" => "\xC5\xBA", # LATIN CAPITAL LETTER Z WITH ACUTE
327 "\xC5\xBB" => "\xC5\xBC", # LATIN CAPITAL LETTER Z WITH DOT ABOVE
328 "\xC5\xBD" => "\xC5\xBE", # LATIN CAPITAL LETTER Z WITH CARON
329 "\xC5\xBF" => "\x73", # LATIN SMALL LETTER LONG S
330 "\xC6\x81" => "\xC9\x93", # LATIN CAPITAL LETTER B WITH HOOK
331 "\xC6\x82" => "\xC6\x83", # LATIN CAPITAL LETTER B WITH TOPBAR
332 "\xC6\x84" => "\xC6\x85", # LATIN CAPITAL LETTER TONE SIX
333 "\xC6\x86" => "\xC9\x94", # LATIN CAPITAL LETTER OPEN O
334 "\xC6\x87" => "\xC6\x88", # LATIN CAPITAL LETTER C WITH HOOK
335 "\xC6\x89" => "\xC9\x96", # LATIN CAPITAL LETTER AFRICAN D
336 "\xC6\x8A" => "\xC9\x97", # LATIN CAPITAL LETTER D WITH HOOK
337 "\xC6\x8B" => "\xC6\x8C", # LATIN CAPITAL LETTER D WITH TOPBAR
338 "\xC6\x8E" => "\xC7\x9D", # LATIN CAPITAL LETTER REVERSED E
339 "\xC6\x8F" => "\xC9\x99", # LATIN CAPITAL LETTER SCHWA
340 "\xC6\x90" => "\xC9\x9B", # LATIN CAPITAL LETTER OPEN E
341 "\xC6\x91" => "\xC6\x92", # LATIN CAPITAL LETTER F WITH HOOK
342 "\xC6\x93" => "\xC9\xA0", # LATIN CAPITAL LETTER G WITH HOOK
343 "\xC6\x94" => "\xC9\xA3", # LATIN CAPITAL LETTER GAMMA
344 "\xC6\x96" => "\xC9\xA9", # LATIN CAPITAL LETTER IOTA
345 "\xC6\x97" => "\xC9\xA8", # LATIN CAPITAL LETTER I WITH STROKE
346 "\xC6\x98" => "\xC6\x99", # LATIN CAPITAL LETTER K WITH HOOK
347 "\xC6\x9C" => "\xC9\xAF", # LATIN CAPITAL LETTER TURNED M
348 "\xC6\x9D" => "\xC9\xB2", # LATIN CAPITAL LETTER N WITH LEFT HOOK
349 "\xC6\x9F" => "\xC9\xB5", # LATIN CAPITAL LETTER O WITH MIDDLE TILDE
350 "\xC6\xA0" => "\xC6\xA1", # LATIN CAPITAL LETTER O WITH HORN
351 "\xC6\xA2" => "\xC6\xA3", # LATIN CAPITAL LETTER OI
352 "\xC6\xA4" => "\xC6\xA5", # LATIN CAPITAL LETTER P WITH HOOK
353 "\xC6\xA6" => "\xCA\x80", # LATIN LETTER YR
354 "\xC6\xA7" => "\xC6\xA8", # LATIN CAPITAL LETTER TONE TWO
355 "\xC6\xA9" => "\xCA\x83", # LATIN CAPITAL LETTER ESH
356 "\xC6\xAC" => "\xC6\xAD", # LATIN CAPITAL LETTER T WITH HOOK
357 "\xC6\xAE" => "\xCA\x88", # LATIN CAPITAL LETTER T WITH RETROFLEX HOOK
358 "\xC6\xAF" => "\xC6\xB0", # LATIN CAPITAL LETTER U WITH HORN
359 "\xC6\xB1" => "\xCA\x8A", # LATIN CAPITAL LETTER UPSILON
360 "\xC6\xB2" => "\xCA\x8B", # LATIN CAPITAL LETTER V WITH HOOK
361 "\xC6\xB3" => "\xC6\xB4", # LATIN CAPITAL LETTER Y WITH HOOK
362 "\xC6\xB5" => "\xC6\xB6", # LATIN CAPITAL LETTER Z WITH STROKE
363 "\xC6\xB7" => "\xCA\x92", # LATIN CAPITAL LETTER EZH
364 "\xC6\xB8" => "\xC6\xB9", # LATIN CAPITAL LETTER EZH REVERSED
365 "\xC6\xBC" => "\xC6\xBD", # LATIN CAPITAL LETTER TONE FIVE
366 "\xC7\x84" => "\xC7\x86", # LATIN CAPITAL LETTER DZ WITH CARON
367 "\xC7\x85" => "\xC7\x86", # LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON
368 "\xC7\x87" => "\xC7\x89", # LATIN CAPITAL LETTER LJ
369 "\xC7\x88" => "\xC7\x89", # LATIN CAPITAL LETTER L WITH SMALL LETTER J
370 "\xC7\x8A" => "\xC7\x8C", # LATIN CAPITAL LETTER NJ
371 "\xC7\x8B" => "\xC7\x8C", # LATIN CAPITAL LETTER N WITH SMALL LETTER J
372 "\xC7\x8D" => "\xC7\x8E", # LATIN CAPITAL LETTER A WITH CARON
373 "\xC7\x8F" => "\xC7\x90", # LATIN CAPITAL LETTER I WITH CARON
374 "\xC7\x91" => "\xC7\x92", # LATIN CAPITAL LETTER O WITH CARON
375 "\xC7\x93" => "\xC7\x94", # LATIN CAPITAL LETTER U WITH CARON
376 "\xC7\x95" => "\xC7\x96", # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON
377 "\xC7\x97" => "\xC7\x98", # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE
378 "\xC7\x99" => "\xC7\x9A", # LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON
379 "\xC7\x9B" => "\xC7\x9C", # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE
380 "\xC7\x9E" => "\xC7\x9F", # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON
381 "\xC7\xA0" => "\xC7\xA1", # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON
382 "\xC7\xA2" => "\xC7\xA3", # LATIN CAPITAL LETTER AE WITH MACRON
383 "\xC7\xA4" => "\xC7\xA5", # LATIN CAPITAL LETTER G WITH STROKE
384 "\xC7\xA6" => "\xC7\xA7", # LATIN CAPITAL LETTER G WITH CARON
385 "\xC7\xA8" => "\xC7\xA9", # LATIN CAPITAL LETTER K WITH CARON
386 "\xC7\xAA" => "\xC7\xAB", # LATIN CAPITAL LETTER O WITH OGONEK
387 "\xC7\xAC" => "\xC7\xAD", # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON
388 "\xC7\xAE" => "\xC7\xAF", # LATIN CAPITAL LETTER EZH WITH CARON
389 "\xC7\xB0" => "\x6A\xCC\x8C", # LATIN SMALL LETTER J WITH CARON
390 "\xC7\xB1" => "\xC7\xB3", # LATIN CAPITAL LETTER DZ
391 "\xC7\xB2" => "\xC7\xB3", # LATIN CAPITAL LETTER D WITH SMALL LETTER Z
392 "\xC7\xB4" => "\xC7\xB5", # LATIN CAPITAL LETTER G WITH ACUTE
393 "\xC7\xB6" => "\xC6\x95", # LATIN CAPITAL LETTER HWAIR
394 "\xC7\xB7" => "\xC6\xBF", # LATIN CAPITAL LETTER WYNN
395 "\xC7\xB8" => "\xC7\xB9", # LATIN CAPITAL LETTER N WITH GRAVE
396 "\xC7\xBA" => "\xC7\xBB", # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE
397 "\xC7\xBC" => "\xC7\xBD", # LATIN CAPITAL LETTER AE WITH ACUTE
398 "\xC7\xBE" => "\xC7\xBF", # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE
399 "\xC8\x80" => "\xC8\x81", # LATIN CAPITAL LETTER A WITH DOUBLE GRAVE
400 "\xC8\x82" => "\xC8\x83", # LATIN CAPITAL LETTER A WITH INVERTED BREVE
401 "\xC8\x84" => "\xC8\x85", # LATIN CAPITAL LETTER E WITH DOUBLE GRAVE
402 "\xC8\x86" => "\xC8\x87", # LATIN CAPITAL LETTER E WITH INVERTED BREVE
403 "\xC8\x88" => "\xC8\x89", # LATIN CAPITAL LETTER I WITH DOUBLE GRAVE
404 "\xC8\x8A" => "\xC8\x8B", # LATIN CAPITAL LETTER I WITH INVERTED BREVE
405 "\xC8\x8C" => "\xC8\x8D", # LATIN CAPITAL LETTER O WITH DOUBLE GRAVE
406 "\xC8\x8E" => "\xC8\x8F", # LATIN CAPITAL LETTER O WITH INVERTED BREVE
407 "\xC8\x90" => "\xC8\x91", # LATIN CAPITAL LETTER R WITH DOUBLE GRAVE
408 "\xC8\x92" => "\xC8\x93", # LATIN CAPITAL LETTER R WITH INVERTED BREVE
409 "\xC8\x94" => "\xC8\x95", # LATIN CAPITAL LETTER U WITH DOUBLE GRAVE
410 "\xC8\x96" => "\xC8\x97", # LATIN CAPITAL LETTER U WITH INVERTED BREVE
411 "\xC8\x98" => "\xC8\x99", # LATIN CAPITAL LETTER S WITH COMMA BELOW
412 "\xC8\x9A" => "\xC8\x9B", # LATIN CAPITAL LETTER T WITH COMMA BELOW
413 "\xC8\x9C" => "\xC8\x9D", # LATIN CAPITAL LETTER YOGH
414 "\xC8\x9E" => "\xC8\x9F", # LATIN CAPITAL LETTER H WITH CARON
415 "\xC8\xA0" => "\xC6\x9E", # LATIN CAPITAL LETTER N WITH LONG RIGHT LEG
416 "\xC8\xA2" => "\xC8\xA3", # LATIN CAPITAL LETTER OU
417 "\xC8\xA4" => "\xC8\xA5", # LATIN CAPITAL LETTER Z WITH HOOK
418 "\xC8\xA6" => "\xC8\xA7", # LATIN CAPITAL LETTER A WITH DOT ABOVE
419 "\xC8\xA8" => "\xC8\xA9", # LATIN CAPITAL LETTER E WITH CEDILLA
420 "\xC8\xAA" => "\xC8\xAB", # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON
421 "\xC8\xAC" => "\xC8\xAD", # LATIN CAPITAL LETTER O WITH TILDE AND MACRON
422 "\xC8\xAE" => "\xC8\xAF", # LATIN CAPITAL LETTER O WITH DOT ABOVE
423 "\xC8\xB0" => "\xC8\xB1", # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON
424 "\xC8\xB2" => "\xC8\xB3", # LATIN CAPITAL LETTER Y WITH MACRON
425 "\xC8\xBA" => "\xE2\xB1\xA5", # LATIN CAPITAL LETTER A WITH STROKE
426 "\xC8\xBB" => "\xC8\xBC", # LATIN CAPITAL LETTER C WITH STROKE
427 "\xC8\xBD" => "\xC6\x9A", # LATIN CAPITAL LETTER L WITH BAR
428 "\xC8\xBE" => "\xE2\xB1\xA6", # LATIN CAPITAL LETTER T WITH DIAGONAL STROKE
429 "\xC9\x81" => "\xC9\x82", # LATIN CAPITAL LETTER GLOTTAL STOP
430 "\xC9\x83" => "\xC6\x80", # LATIN CAPITAL LETTER B WITH STROKE
431 "\xC9\x84" => "\xCA\x89", # LATIN CAPITAL LETTER U BAR
432 "\xC9\x85" => "\xCA\x8C", # LATIN CAPITAL LETTER TURNED V
433 "\xC9\x86" => "\xC9\x87", # LATIN CAPITAL LETTER E WITH STROKE
434 "\xC9\x88" => "\xC9\x89", # LATIN CAPITAL LETTER J WITH STROKE
435 "\xC9\x8A" => "\xC9\x8B", # LATIN CAPITAL LETTER SMALL Q WITH HOOK TAIL
436 "\xC9\x8C" => "\xC9\x8D", # LATIN CAPITAL LETTER R WITH STROKE
437 "\xC9\x8E" => "\xC9\x8F", # LATIN CAPITAL LETTER Y WITH STROKE
438 "\xCD\x85" => "\xCE\xB9", # COMBINING GREEK YPOGEGRAMMENI
439 "\xCD\xB0" => "\xCD\xB1", # GREEK CAPITAL LETTER HETA
440 "\xCD\xB2" => "\xCD\xB3", # GREEK CAPITAL LETTER ARCHAIC SAMPI
441 "\xCD\xB6" => "\xCD\xB7", # GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA
442 "\xCD\xBF" => "\xCF\xB3", # GREEK CAPITAL LETTER YOT
443 "\xCE\x86" => "\xCE\xAC", # GREEK CAPITAL LETTER ALPHA WITH TONOS
444 "\xCE\x88" => "\xCE\xAD", # GREEK CAPITAL LETTER EPSILON WITH TONOS
445 "\xCE\x89" => "\xCE\xAE", # GREEK CAPITAL LETTER ETA WITH TONOS
446 "\xCE\x8A" => "\xCE\xAF", # GREEK CAPITAL LETTER IOTA WITH TONOS
447 "\xCE\x8C" => "\xCF\x8C", # GREEK CAPITAL LETTER OMICRON WITH TONOS
448 "\xCE\x8E" => "\xCF\x8D", # GREEK CAPITAL LETTER UPSILON WITH TONOS
449 "\xCE\x8F" => "\xCF\x8E", # GREEK CAPITAL LETTER OMEGA WITH TONOS
450 "\xCE\x90" => "\xCE\xB9\xCC\x88\xCC\x81", # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
451 "\xCE\x91" => "\xCE\xB1", # GREEK CAPITAL LETTER ALPHA
452 "\xCE\x92" => "\xCE\xB2", # GREEK CAPITAL LETTER BETA
453 "\xCE\x93" => "\xCE\xB3", # GREEK CAPITAL LETTER GAMMA
454 "\xCE\x94" => "\xCE\xB4", # GREEK CAPITAL LETTER DELTA
455 "\xCE\x95" => "\xCE\xB5", # GREEK CAPITAL LETTER EPSILON
456 "\xCE\x96" => "\xCE\xB6", # GREEK CAPITAL LETTER ZETA
457 "\xCE\x97" => "\xCE\xB7", # GREEK CAPITAL LETTER ETA
458 "\xCE\x98" => "\xCE\xB8", # GREEK CAPITAL LETTER THETA
459 "\xCE\x99" => "\xCE\xB9", # GREEK CAPITAL LETTER IOTA
460 "\xCE\x9A" => "\xCE\xBA", # GREEK CAPITAL LETTER KAPPA
461 "\xCE\x9B" => "\xCE\xBB", # GREEK CAPITAL LETTER LAMDA
462 "\xCE\x9C" => "\xCE\xBC", # GREEK CAPITAL LETTER MU
463 "\xCE\x9D" => "\xCE\xBD", # GREEK CAPITAL LETTER NU
464 "\xCE\x9E" => "\xCE\xBE", # GREEK CAPITAL LETTER XI
465 "\xCE\x9F" => "\xCE\xBF", # GREEK CAPITAL LETTER OMICRON
466 "\xCE\xA0" => "\xCF\x80", # GREEK CAPITAL LETTER PI
467 "\xCE\xA1" => "\xCF\x81", # GREEK CAPITAL LETTER RHO
468 "\xCE\xA3" => "\xCF\x83", # GREEK CAPITAL LETTER SIGMA
469 "\xCE\xA4" => "\xCF\x84", # GREEK CAPITAL LETTER TAU
470 "\xCE\xA5" => "\xCF\x85", # GREEK CAPITAL LETTER UPSILON
471 "\xCE\xA6" => "\xCF\x86", # GREEK CAPITAL LETTER PHI
472 "\xCE\xA7" => "\xCF\x87", # GREEK CAPITAL LETTER CHI
473 "\xCE\xA8" => "\xCF\x88", # GREEK CAPITAL LETTER PSI
474 "\xCE\xA9" => "\xCF\x89", # GREEK CAPITAL LETTER OMEGA
475 "\xCE\xAA" => "\xCF\x8A", # GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
476 "\xCE\xAB" => "\xCF\x8B", # GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
477 "\xCE\xB0" => "\xCF\x85\xCC\x88\xCC\x81", # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
478 "\xCF\x82" => "\xCF\x83", # GREEK SMALL LETTER FINAL SIGMA
479 "\xCF\x8F" => "\xCF\x97", # GREEK CAPITAL KAI SYMBOL
480 "\xCF\x90" => "\xCE\xB2", # GREEK BETA SYMBOL
481 "\xCF\x91" => "\xCE\xB8", # GREEK THETA SYMBOL
482 "\xCF\x95" => "\xCF\x86", # GREEK PHI SYMBOL
483 "\xCF\x96" => "\xCF\x80", # GREEK PI SYMBOL
484 "\xCF\x98" => "\xCF\x99", # GREEK LETTER ARCHAIC KOPPA
485 "\xCF\x9A" => "\xCF\x9B", # GREEK LETTER STIGMA
486 "\xCF\x9C" => "\xCF\x9D", # GREEK LETTER DIGAMMA
487 "\xCF\x9E" => "\xCF\x9F", # GREEK LETTER KOPPA
488 "\xCF\xA0" => "\xCF\xA1", # GREEK LETTER SAMPI
489 "\xCF\xA2" => "\xCF\xA3", # COPTIC CAPITAL LETTER SHEI
490 "\xCF\xA4" => "\xCF\xA5", # COPTIC CAPITAL LETTER FEI
491 "\xCF\xA6" => "\xCF\xA7", # COPTIC CAPITAL LETTER KHEI
492 "\xCF\xA8" => "\xCF\xA9", # COPTIC CAPITAL LETTER HORI
493 "\xCF\xAA" => "\xCF\xAB", # COPTIC CAPITAL LETTER GANGIA
494 "\xCF\xAC" => "\xCF\xAD", # COPTIC CAPITAL LETTER SHIMA
495 "\xCF\xAE" => "\xCF\xAF", # COPTIC CAPITAL LETTER DEI
496 "\xCF\xB0" => "\xCE\xBA", # GREEK KAPPA SYMBOL
497 "\xCF\xB1" => "\xCF\x81", # GREEK RHO SYMBOL
498 "\xCF\xB4" => "\xCE\xB8", # GREEK CAPITAL THETA SYMBOL
499 "\xCF\xB5" => "\xCE\xB5", # GREEK LUNATE EPSILON SYMBOL
500 "\xCF\xB7" => "\xCF\xB8", # GREEK CAPITAL LETTER SHO
501 "\xCF\xB9" => "\xCF\xB2", # GREEK CAPITAL LUNATE SIGMA SYMBOL
502 "\xCF\xBA" => "\xCF\xBB", # GREEK CAPITAL LETTER SAN
503 "\xCF\xBD" => "\xCD\xBB", # GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL
504 "\xCF\xBE" => "\xCD\xBC", # GREEK CAPITAL DOTTED LUNATE SIGMA SYMBOL
505 "\xCF\xBF" => "\xCD\xBD", # GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL
506 "\xD0\x80" => "\xD1\x90", # CYRILLIC CAPITAL LETTER IE WITH GRAVE
507 "\xD0\x81" => "\xD1\x91", # CYRILLIC CAPITAL LETTER IO
508 "\xD0\x82" => "\xD1\x92", # CYRILLIC CAPITAL LETTER DJE
509 "\xD0\x83" => "\xD1\x93", # CYRILLIC CAPITAL LETTER GJE
510 "\xD0\x84" => "\xD1\x94", # CYRILLIC CAPITAL LETTER UKRAINIAN IE
511 "\xD0\x85" => "\xD1\x95", # CYRILLIC CAPITAL LETTER DZE
512 "\xD0\x86" => "\xD1\x96", # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
513 "\xD0\x87" => "\xD1\x97", # CYRILLIC CAPITAL LETTER YI
514 "\xD0\x88" => "\xD1\x98", # CYRILLIC CAPITAL LETTER JE
515 "\xD0\x89" => "\xD1\x99", # CYRILLIC CAPITAL LETTER LJE
516 "\xD0\x8A" => "\xD1\x9A", # CYRILLIC CAPITAL LETTER NJE
517 "\xD0\x8B" => "\xD1\x9B", # CYRILLIC CAPITAL LETTER TSHE
518 "\xD0\x8C" => "\xD1\x9C", # CYRILLIC CAPITAL LETTER KJE
519 "\xD0\x8D" => "\xD1\x9D", # CYRILLIC CAPITAL LETTER I WITH GRAVE
520 "\xD0\x8E" => "\xD1\x9E", # CYRILLIC CAPITAL LETTER SHORT U
521 "\xD0\x8F" => "\xD1\x9F", # CYRILLIC CAPITAL LETTER DZHE
522 "\xD0\x90" => "\xD0\xB0", # CYRILLIC CAPITAL LETTER A
523 "\xD0\x91" => "\xD0\xB1", # CYRILLIC CAPITAL LETTER BE
524 "\xD0\x92" => "\xD0\xB2", # CYRILLIC CAPITAL LETTER VE
525 "\xD0\x93" => "\xD0\xB3", # CYRILLIC CAPITAL LETTER GHE
526 "\xD0\x94" => "\xD0\xB4", # CYRILLIC CAPITAL LETTER DE
527 "\xD0\x95" => "\xD0\xB5", # CYRILLIC CAPITAL LETTER IE
528 "\xD0\x96" => "\xD0\xB6", # CYRILLIC CAPITAL LETTER ZHE
529 "\xD0\x97" => "\xD0\xB7", # CYRILLIC CAPITAL LETTER ZE
530 "\xD0\x98" => "\xD0\xB8", # CYRILLIC CAPITAL LETTER I
531 "\xD0\x99" => "\xD0\xB9", # CYRILLIC CAPITAL LETTER SHORT I
532 "\xD0\x9A" => "\xD0\xBA", # CYRILLIC CAPITAL LETTER KA
533 "\xD0\x9B" => "\xD0\xBB", # CYRILLIC CAPITAL LETTER EL
534 "\xD0\x9C" => "\xD0\xBC", # CYRILLIC CAPITAL LETTER EM
535 "\xD0\x9D" => "\xD0\xBD", # CYRILLIC CAPITAL LETTER EN
536 "\xD0\x9E" => "\xD0\xBE", # CYRILLIC CAPITAL LETTER O
537 "\xD0\x9F" => "\xD0\xBF", # CYRILLIC CAPITAL LETTER PE
538 "\xD0\xA0" => "\xD1\x80", # CYRILLIC CAPITAL LETTER ER
539 "\xD0\xA1" => "\xD1\x81", # CYRILLIC CAPITAL LETTER ES
540 "\xD0\xA2" => "\xD1\x82", # CYRILLIC CAPITAL LETTER TE
541 "\xD0\xA3" => "\xD1\x83", # CYRILLIC CAPITAL LETTER U
542 "\xD0\xA4" => "\xD1\x84", # CYRILLIC CAPITAL LETTER EF
543 "\xD0\xA5" => "\xD1\x85", # CYRILLIC CAPITAL LETTER HA
544 "\xD0\xA6" => "\xD1\x86", # CYRILLIC CAPITAL LETTER TSE
545 "\xD0\xA7" => "\xD1\x87", # CYRILLIC CAPITAL LETTER CHE
546 "\xD0\xA8" => "\xD1\x88", # CYRILLIC CAPITAL LETTER SHA
547 "\xD0\xA9" => "\xD1\x89", # CYRILLIC CAPITAL LETTER SHCHA
548 "\xD0\xAA" => "\xD1\x8A", # CYRILLIC CAPITAL LETTER HARD SIGN
549 "\xD0\xAB" => "\xD1\x8B", # CYRILLIC CAPITAL LETTER YERU
550 "\xD0\xAC" => "\xD1\x8C", # CYRILLIC CAPITAL LETTER SOFT SIGN
551 "\xD0\xAD" => "\xD1\x8D", # CYRILLIC CAPITAL LETTER E
552 "\xD0\xAE" => "\xD1\x8E", # CYRILLIC CAPITAL LETTER YU
553 "\xD0\xAF" => "\xD1\x8F", # CYRILLIC CAPITAL LETTER YA
554 "\xD1\xA0" => "\xD1\xA1", # CYRILLIC CAPITAL LETTER OMEGA
555 "\xD1\xA2" => "\xD1\xA3", # CYRILLIC CAPITAL LETTER YAT
556 "\xD1\xA4" => "\xD1\xA5", # CYRILLIC CAPITAL LETTER IOTIFIED E
557 "\xD1\xA6" => "\xD1\xA7", # CYRILLIC CAPITAL LETTER LITTLE YUS
558 "\xD1\xA8" => "\xD1\xA9", # CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS
559 "\xD1\xAA" => "\xD1\xAB", # CYRILLIC CAPITAL LETTER BIG YUS
560 "\xD1\xAC" => "\xD1\xAD", # CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS
561 "\xD1\xAE" => "\xD1\xAF", # CYRILLIC CAPITAL LETTER KSI
562 "\xD1\xB0" => "\xD1\xB1", # CYRILLIC CAPITAL LETTER PSI
563 "\xD1\xB2" => "\xD1\xB3", # CYRILLIC CAPITAL LETTER FITA
564 "\xD1\xB4" => "\xD1\xB5", # CYRILLIC CAPITAL LETTER IZHITSA
565 "\xD1\xB6" => "\xD1\xB7", # CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
566 "\xD1\xB8" => "\xD1\xB9", # CYRILLIC CAPITAL LETTER UK
567 "\xD1\xBA" => "\xD1\xBB", # CYRILLIC CAPITAL LETTER ROUND OMEGA
568 "\xD1\xBC" => "\xD1\xBD", # CYRILLIC CAPITAL LETTER OMEGA WITH TITLO
569 "\xD1\xBE" => "\xD1\xBF", # CYRILLIC CAPITAL LETTER OT
570 "\xD2\x80" => "\xD2\x81", # CYRILLIC CAPITAL LETTER KOPPA
571 "\xD2\x8A" => "\xD2\x8B", # CYRILLIC CAPITAL LETTER SHORT I WITH TAIL
572 "\xD2\x8C" => "\xD2\x8D", # CYRILLIC CAPITAL LETTER SEMISOFT SIGN
573 "\xD2\x8E" => "\xD2\x8F", # CYRILLIC CAPITAL LETTER ER WITH TICK
574 "\xD2\x90" => "\xD2\x91", # CYRILLIC CAPITAL LETTER GHE WITH UPTURN
575 "\xD2\x92" => "\xD2\x93", # CYRILLIC CAPITAL LETTER GHE WITH STROKE
576 "\xD2\x94" => "\xD2\x95", # CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK
577 "\xD2\x96" => "\xD2\x97", # CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER
578 "\xD2\x98" => "\xD2\x99", # CYRILLIC CAPITAL LETTER ZE WITH DESCENDER
579 "\xD2\x9A" => "\xD2\x9B", # CYRILLIC CAPITAL LETTER KA WITH DESCENDER
580 "\xD2\x9C" => "\xD2\x9D", # CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE
581 "\xD2\x9E" => "\xD2\x9F", # CYRILLIC CAPITAL LETTER KA WITH STROKE
582 "\xD2\xA0" => "\xD2\xA1", # CYRILLIC CAPITAL LETTER BASHKIR KA
583 "\xD2\xA2" => "\xD2\xA3", # CYRILLIC CAPITAL LETTER EN WITH DESCENDER
584 "\xD2\xA4" => "\xD2\xA5", # CYRILLIC CAPITAL LIGATURE EN GHE
585 "\xD2\xA6" => "\xD2\xA7", # CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK
586 "\xD2\xA8" => "\xD2\xA9", # CYRILLIC CAPITAL LETTER ABKHASIAN HA
587 "\xD2\xAA" => "\xD2\xAB", # CYRILLIC CAPITAL LETTER ES WITH DESCENDER
588 "\xD2\xAC" => "\xD2\xAD", # CYRILLIC CAPITAL LETTER TE WITH DESCENDER
589 "\xD2\xAE" => "\xD2\xAF", # CYRILLIC CAPITAL LETTER STRAIGHT U
590 "\xD2\xB0" => "\xD2\xB1", # CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE
591 "\xD2\xB2" => "\xD2\xB3", # CYRILLIC CAPITAL LETTER HA WITH DESCENDER
592 "\xD2\xB4" => "\xD2\xB5", # CYRILLIC CAPITAL LIGATURE TE TSE
593 "\xD2\xB6" => "\xD2\xB7", # CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
594 "\xD2\xB8" => "\xD2\xB9", # CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE
595 "\xD2\xBA" => "\xD2\xBB", # CYRILLIC CAPITAL LETTER SHHA
596 "\xD2\xBC" => "\xD2\xBD", # CYRILLIC CAPITAL LETTER ABKHASIAN CHE
597 "\xD2\xBE" => "\xD2\xBF", # CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER
598 "\xD3\x80" => "\xD3\x8F", # CYRILLIC LETTER PALOCHKA
599 "\xD3\x81" => "\xD3\x82", # CYRILLIC CAPITAL LETTER ZHE WITH BREVE
600 "\xD3\x83" => "\xD3\x84", # CYRILLIC CAPITAL LETTER KA WITH HOOK
601 "\xD3\x85" => "\xD3\x86", # CYRILLIC CAPITAL LETTER EL WITH TAIL
602 "\xD3\x87" => "\xD3\x88", # CYRILLIC CAPITAL LETTER EN WITH HOOK
603 "\xD3\x89" => "\xD3\x8A", # CYRILLIC CAPITAL LETTER EN WITH TAIL
604 "\xD3\x8B" => "\xD3\x8C", # CYRILLIC CAPITAL LETTER KHAKASSIAN CHE
605 "\xD3\x8D" => "\xD3\x8E", # CYRILLIC CAPITAL LETTER EM WITH TAIL
606 "\xD3\x90" => "\xD3\x91", # CYRILLIC CAPITAL LETTER A WITH BREVE
607 "\xD3\x92" => "\xD3\x93", # CYRILLIC CAPITAL LETTER A WITH DIAERESIS
608 "\xD3\x94" => "\xD3\x95", # CYRILLIC CAPITAL LIGATURE A IE
609 "\xD3\x96" => "\xD3\x97", # CYRILLIC CAPITAL LETTER IE WITH BREVE
610 "\xD3\x98" => "\xD3\x99", # CYRILLIC CAPITAL LETTER SCHWA
611 "\xD3\x9A" => "\xD3\x9B", # CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS
612 "\xD3\x9C" => "\xD3\x9D", # CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS
613 "\xD3\x9E" => "\xD3\x9F", # CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS
614 "\xD3\xA0" => "\xD3\xA1", # CYRILLIC CAPITAL LETTER ABKHASIAN DZE
615 "\xD3\xA2" => "\xD3\xA3", # CYRILLIC CAPITAL LETTER I WITH MACRON
616 "\xD3\xA4" => "\xD3\xA5", # CYRILLIC CAPITAL LETTER I WITH DIAERESIS
617 "\xD3\xA6" => "\xD3\xA7", # CYRILLIC CAPITAL LETTER O WITH DIAERESIS
618 "\xD3\xA8" => "\xD3\xA9", # CYRILLIC CAPITAL LETTER BARRED O
619 "\xD3\xAA" => "\xD3\xAB", # CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS
620 "\xD3\xAC" => "\xD3\xAD", # CYRILLIC CAPITAL LETTER E WITH DIAERESIS
621 "\xD3\xAE" => "\xD3\xAF", # CYRILLIC CAPITAL LETTER U WITH MACRON
622 "\xD3\xB0" => "\xD3\xB1", # CYRILLIC CAPITAL LETTER U WITH DIAERESIS
623 "\xD3\xB2" => "\xD3\xB3", # CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE
624 "\xD3\xB4" => "\xD3\xB5", # CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS
625 "\xD3\xB6" => "\xD3\xB7", # CYRILLIC CAPITAL LETTER GHE WITH DESCENDER
626 "\xD3\xB8" => "\xD3\xB9", # CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS
627 "\xD3\xBA" => "\xD3\xBB", # CYRILLIC CAPITAL LETTER GHE WITH STROKE AND HOOK
628 "\xD3\xBC" => "\xD3\xBD", # CYRILLIC CAPITAL LETTER HA WITH HOOK
629 "\xD3\xBE" => "\xD3\xBF", # CYRILLIC CAPITAL LETTER HA WITH STROKE
630 "\xD4\x80" => "\xD4\x81", # CYRILLIC CAPITAL LETTER KOMI DE
631 "\xD4\x82" => "\xD4\x83", # CYRILLIC CAPITAL LETTER KOMI DJE
632 "\xD4\x84" => "\xD4\x85", # CYRILLIC CAPITAL LETTER KOMI ZJE
633 "\xD4\x86" => "\xD4\x87", # CYRILLIC CAPITAL LETTER KOMI DZJE
634 "\xD4\x88" => "\xD4\x89", # CYRILLIC CAPITAL LETTER KOMI LJE
635 "\xD4\x8A" => "\xD4\x8B", # CYRILLIC CAPITAL LETTER KOMI NJE
636 "\xD4\x8C" => "\xD4\x8D", # CYRILLIC CAPITAL LETTER KOMI SJE
637 "\xD4\x8E" => "\xD4\x8F", # CYRILLIC CAPITAL LETTER KOMI TJE
638 "\xD4\x90" => "\xD4\x91", # CYRILLIC CAPITAL LETTER REVERSED ZE
639 "\xD4\x92" => "\xD4\x93", # CYRILLIC CAPITAL LETTER EL WITH HOOK
640 "\xD4\x94" => "\xD4\x95", # CYRILLIC CAPITAL LETTER LHA
641 "\xD4\x96" => "\xD4\x97", # CYRILLIC CAPITAL LETTER RHA
642 "\xD4\x98" => "\xD4\x99", # CYRILLIC CAPITAL LETTER YAE
643 "\xD4\x9A" => "\xD4\x9B", # CYRILLIC CAPITAL LETTER QA
644 "\xD4\x9C" => "\xD4\x9D", # CYRILLIC CAPITAL LETTER WE
645 "\xD4\x9E" => "\xD4\x9F", # CYRILLIC CAPITAL LETTER ALEUT KA
646 "\xD4\xA0" => "\xD4\xA1", # CYRILLIC CAPITAL LETTER EL WITH MIDDLE HOOK
647 "\xD4\xA2" => "\xD4\xA3", # CYRILLIC CAPITAL LETTER EN WITH MIDDLE HOOK
648 "\xD4\xA4" => "\xD4\xA5", # CYRILLIC CAPITAL LETTER PE WITH DESCENDER
649 "\xD4\xA6" => "\xD4\xA7", # CYRILLIC CAPITAL LETTER SHHA WITH DESCENDER
650 "\xD4\xA8" => "\xD4\xA9", # CYRILLIC CAPITAL LETTER EN WITH LEFT HOOK
651 "\xD4\xAA" => "\xD4\xAB", # CYRILLIC CAPITAL LETTER DZZHE
652 "\xD4\xAC" => "\xD4\xAD", # CYRILLIC CAPITAL LETTER DCHE
653 "\xD4\xAE" => "\xD4\xAF", # CYRILLIC CAPITAL LETTER EL WITH DESCENDER
654 "\xD4\xB1" => "\xD5\xA1", # ARMENIAN CAPITAL LETTER AYB
655 "\xD4\xB2" => "\xD5\xA2", # ARMENIAN CAPITAL LETTER BEN
656 "\xD4\xB3" => "\xD5\xA3", # ARMENIAN CAPITAL LETTER GIM
657 "\xD4\xB4" => "\xD5\xA4", # ARMENIAN CAPITAL LETTER DA
658 "\xD4\xB5" => "\xD5\xA5", # ARMENIAN CAPITAL LETTER ECH
659 "\xD4\xB6" => "\xD5\xA6", # ARMENIAN CAPITAL LETTER ZA
660 "\xD4\xB7" => "\xD5\xA7", # ARMENIAN CAPITAL LETTER EH
661 "\xD4\xB8" => "\xD5\xA8", # ARMENIAN CAPITAL LETTER ET
662 "\xD4\xB9" => "\xD5\xA9", # ARMENIAN CAPITAL LETTER TO
663 "\xD4\xBA" => "\xD5\xAA", # ARMENIAN CAPITAL LETTER ZHE
664 "\xD4\xBB" => "\xD5\xAB", # ARMENIAN CAPITAL LETTER INI
665 "\xD4\xBC" => "\xD5\xAC", # ARMENIAN CAPITAL LETTER LIWN
666 "\xD4\xBD" => "\xD5\xAD", # ARMENIAN CAPITAL LETTER XEH
667 "\xD4\xBE" => "\xD5\xAE", # ARMENIAN CAPITAL LETTER CA
668 "\xD4\xBF" => "\xD5\xAF", # ARMENIAN CAPITAL LETTER KEN
669 "\xD5\x80" => "\xD5\xB0", # ARMENIAN CAPITAL LETTER HO
670 "\xD5\x81" => "\xD5\xB1", # ARMENIAN CAPITAL LETTER JA
671 "\xD5\x82" => "\xD5\xB2", # ARMENIAN CAPITAL LETTER GHAD
672 "\xD5\x83" => "\xD5\xB3", # ARMENIAN CAPITAL LETTER CHEH
673 "\xD5\x84" => "\xD5\xB4", # ARMENIAN CAPITAL LETTER MEN
674 "\xD5\x85" => "\xD5\xB5", # ARMENIAN CAPITAL LETTER YI
675 "\xD5\x86" => "\xD5\xB6", # ARMENIAN CAPITAL LETTER NOW
676 "\xD5\x87" => "\xD5\xB7", # ARMENIAN CAPITAL LETTER SHA
677 "\xD5\x88" => "\xD5\xB8", # ARMENIAN CAPITAL LETTER VO
678 "\xD5\x89" => "\xD5\xB9", # ARMENIAN CAPITAL LETTER CHA
679 "\xD5\x8A" => "\xD5\xBA", # ARMENIAN CAPITAL LETTER PEH
680 "\xD5\x8B" => "\xD5\xBB", # ARMENIAN CAPITAL LETTER JHEH
681 "\xD5\x8C" => "\xD5\xBC", # ARMENIAN CAPITAL LETTER RA
682 "\xD5\x8D" => "\xD5\xBD", # ARMENIAN CAPITAL LETTER SEH
683 "\xD5\x8E" => "\xD5\xBE", # ARMENIAN CAPITAL LETTER VEW
684 "\xD5\x8F" => "\xD5\xBF", # ARMENIAN CAPITAL LETTER TIWN
685 "\xD5\x90" => "\xD6\x80", # ARMENIAN CAPITAL LETTER REH
686 "\xD5\x91" => "\xD6\x81", # ARMENIAN CAPITAL LETTER CO
687 "\xD5\x92" => "\xD6\x82", # ARMENIAN CAPITAL LETTER YIWN
688 "\xD5\x93" => "\xD6\x83", # ARMENIAN CAPITAL LETTER PIWR
689 "\xD5\x94" => "\xD6\x84", # ARMENIAN CAPITAL LETTER KEH
690 "\xD5\x95" => "\xD6\x85", # ARMENIAN CAPITAL LETTER OH
691 "\xD5\x96" => "\xD6\x86", # ARMENIAN CAPITAL LETTER FEH
692 "\xD6\x87" => "\xD5\xA5\xD6\x82", # ARMENIAN SMALL LIGATURE ECH YIWN
693 "\xE1\x82\xA0" => "\xE2\xB4\x80", # GEORGIAN CAPITAL LETTER AN
694 "\xE1\x82\xA1" => "\xE2\xB4\x81", # GEORGIAN CAPITAL LETTER BAN
695 "\xE1\x82\xA2" => "\xE2\xB4\x82", # GEORGIAN CAPITAL LETTER GAN
696 "\xE1\x82\xA3" => "\xE2\xB4\x83", # GEORGIAN CAPITAL LETTER DON
697 "\xE1\x82\xA4" => "\xE2\xB4\x84", # GEORGIAN CAPITAL LETTER EN
698 "\xE1\x82\xA5" => "\xE2\xB4\x85", # GEORGIAN CAPITAL LETTER VIN
699 "\xE1\x82\xA6" => "\xE2\xB4\x86", # GEORGIAN CAPITAL LETTER ZEN
700 "\xE1\x82\xA7" => "\xE2\xB4\x87", # GEORGIAN CAPITAL LETTER TAN
701 "\xE1\x82\xA8" => "\xE2\xB4\x88", # GEORGIAN CAPITAL LETTER IN
702 "\xE1\x82\xA9" => "\xE2\xB4\x89", # GEORGIAN CAPITAL LETTER KAN
703 "\xE1\x82\xAA" => "\xE2\xB4\x8A", # GEORGIAN CAPITAL LETTER LAS
704 "\xE1\x82\xAB" => "\xE2\xB4\x8B", # GEORGIAN CAPITAL LETTER MAN
705 "\xE1\x82\xAC" => "\xE2\xB4\x8C", # GEORGIAN CAPITAL LETTER NAR
706 "\xE1\x82\xAD" => "\xE2\xB4\x8D", # GEORGIAN CAPITAL LETTER ON
707 "\xE1\x82\xAE" => "\xE2\xB4\x8E", # GEORGIAN CAPITAL LETTER PAR
708 "\xE1\x82\xAF" => "\xE2\xB4\x8F", # GEORGIAN CAPITAL LETTER ZHAR
709 "\xE1\x82\xB0" => "\xE2\xB4\x90", # GEORGIAN CAPITAL LETTER RAE
710 "\xE1\x82\xB1" => "\xE2\xB4\x91", # GEORGIAN CAPITAL LETTER SAN
711 "\xE1\x82\xB2" => "\xE2\xB4\x92", # GEORGIAN CAPITAL LETTER TAR
712 "\xE1\x82\xB3" => "\xE2\xB4\x93", # GEORGIAN CAPITAL LETTER UN
713 "\xE1\x82\xB4" => "\xE2\xB4\x94", # GEORGIAN CAPITAL LETTER PHAR
714 "\xE1\x82\xB5" => "\xE2\xB4\x95", # GEORGIAN CAPITAL LETTER KHAR
715 "\xE1\x82\xB6" => "\xE2\xB4\x96", # GEORGIAN CAPITAL LETTER GHAN
716 "\xE1\x82\xB7" => "\xE2\xB4\x97", # GEORGIAN CAPITAL LETTER QAR
717 "\xE1\x82\xB8" => "\xE2\xB4\x98", # GEORGIAN CAPITAL LETTER SHIN
718 "\xE1\x82\xB9" => "\xE2\xB4\x99", # GEORGIAN CAPITAL LETTER CHIN
719 "\xE1\x82\xBA" => "\xE2\xB4\x9A", # GEORGIAN CAPITAL LETTER CAN
720 "\xE1\x82\xBB" => "\xE2\xB4\x9B", # GEORGIAN CAPITAL LETTER JIL
721 "\xE1\x82\xBC" => "\xE2\xB4\x9C", # GEORGIAN CAPITAL LETTER CIL
722 "\xE1\x82\xBD" => "\xE2\xB4\x9D", # GEORGIAN CAPITAL LETTER CHAR
723 "\xE1\x82\xBE" => "\xE2\xB4\x9E", # GEORGIAN CAPITAL LETTER XAN
724 "\xE1\x82\xBF" => "\xE2\xB4\x9F", # GEORGIAN CAPITAL LETTER JHAN
725 "\xE1\x83\x80" => "\xE2\xB4\xA0", # GEORGIAN CAPITAL LETTER HAE
726 "\xE1\x83\x81" => "\xE2\xB4\xA1", # GEORGIAN CAPITAL LETTER HE
727 "\xE1\x83\x82" => "\xE2\xB4\xA2", # GEORGIAN CAPITAL LETTER HIE
728 "\xE1\x83\x83" => "\xE2\xB4\xA3", # GEORGIAN CAPITAL LETTER WE
729 "\xE1\x83\x84" => "\xE2\xB4\xA4", # GEORGIAN CAPITAL LETTER HAR
730 "\xE1\x83\x85" => "\xE2\xB4\xA5", # GEORGIAN CAPITAL LETTER HOE
731 "\xE1\x83\x87" => "\xE2\xB4\xA7", # GEORGIAN CAPITAL LETTER YN
732 "\xE1\x83\x8D" => "\xE2\xB4\xAD", # GEORGIAN CAPITAL LETTER AEN
733 "\xE1\x8F\xB8" => "\xE1\x8F\xB0", # CHEROKEE SMALL LETTER YE
734 "\xE1\x8F\xB9" => "\xE1\x8F\xB1", # CHEROKEE SMALL LETTER YI
735 "\xE1\x8F\xBA" => "\xE1\x8F\xB2", # CHEROKEE SMALL LETTER YO
736 "\xE1\x8F\xBB" => "\xE1\x8F\xB3", # CHEROKEE SMALL LETTER YU
737 "\xE1\x8F\xBC" => "\xE1\x8F\xB4", # CHEROKEE SMALL LETTER YV
738 "\xE1\x8F\xBD" => "\xE1\x8F\xB5", # CHEROKEE SMALL LETTER MV
739 "\xE1\xB2\x80" => "\xD0\xB2", # CYRILLIC SMALL LETTER ROUNDED VE
740 "\xE1\xB2\x81" => "\xD0\xB4", # CYRILLIC SMALL LETTER LONG-LEGGED DE
741 "\xE1\xB2\x82" => "\xD0\xBE", # CYRILLIC SMALL LETTER NARROW O
742 "\xE1\xB2\x83" => "\xD1\x81", # CYRILLIC SMALL LETTER WIDE ES
743 "\xE1\xB2\x84" => "\xD1\x82", # CYRILLIC SMALL LETTER TALL TE
744 "\xE1\xB2\x85" => "\xD1\x82", # CYRILLIC SMALL LETTER THREE-LEGGED TE
745 "\xE1\xB2\x86" => "\xD1\x8A", # CYRILLIC SMALL LETTER TALL HARD SIGN
746 "\xE1\xB2\x87" => "\xD1\xA3", # CYRILLIC SMALL LETTER TALL YAT
747 "\xE1\xB2\x88" => "\xEA\x99\x8B", # CYRILLIC SMALL LETTER UNBLENDED UK
748 "\xE1\xB2\x90" => "\xE1\x83\x90", # GEORGIAN MTAVRULI CAPITAL LETTER AN
749 "\xE1\xB2\x91" => "\xE1\x83\x91", # GEORGIAN MTAVRULI CAPITAL LETTER BAN
750 "\xE1\xB2\x92" => "\xE1\x83\x92", # GEORGIAN MTAVRULI CAPITAL LETTER GAN
751 "\xE1\xB2\x93" => "\xE1\x83\x93", # GEORGIAN MTAVRULI CAPITAL LETTER DON
752 "\xE1\xB2\x94" => "\xE1\x83\x94", # GEORGIAN MTAVRULI CAPITAL LETTER EN
753 "\xE1\xB2\x95" => "\xE1\x83\x95", # GEORGIAN MTAVRULI CAPITAL LETTER VIN
754 "\xE1\xB2\x96" => "\xE1\x83\x96", # GEORGIAN MTAVRULI CAPITAL LETTER ZEN
755 "\xE1\xB2\x97" => "\xE1\x83\x97", # GEORGIAN MTAVRULI CAPITAL LETTER TAN
756 "\xE1\xB2\x98" => "\xE1\x83\x98", # GEORGIAN MTAVRULI CAPITAL LETTER IN
757 "\xE1\xB2\x99" => "\xE1\x83\x99", # GEORGIAN MTAVRULI CAPITAL LETTER KAN
758 "\xE1\xB2\x9A" => "\xE1\x83\x9A", # GEORGIAN MTAVRULI CAPITAL LETTER LAS
759 "\xE1\xB2\x9B" => "\xE1\x83\x9B", # GEORGIAN MTAVRULI CAPITAL LETTER MAN
760 "\xE1\xB2\x9C" => "\xE1\x83\x9C", # GEORGIAN MTAVRULI CAPITAL LETTER NAR
761 "\xE1\xB2\x9D" => "\xE1\x83\x9D", # GEORGIAN MTAVRULI CAPITAL LETTER ON
762 "\xE1\xB2\x9E" => "\xE1\x83\x9E", # GEORGIAN MTAVRULI CAPITAL LETTER PAR
763 "\xE1\xB2\x9F" => "\xE1\x83\x9F", # GEORGIAN MTAVRULI CAPITAL LETTER ZHAR
764 "\xE1\xB2\xA0" => "\xE1\x83\xA0", # GEORGIAN MTAVRULI CAPITAL LETTER RAE
765 "\xE1\xB2\xA1" => "\xE1\x83\xA1", # GEORGIAN MTAVRULI CAPITAL LETTER SAN
766 "\xE1\xB2\xA2" => "\xE1\x83\xA2", # GEORGIAN MTAVRULI CAPITAL LETTER TAR
767 "\xE1\xB2\xA3" => "\xE1\x83\xA3", # GEORGIAN MTAVRULI CAPITAL LETTER UN
768 "\xE1\xB2\xA4" => "\xE1\x83\xA4", # GEORGIAN MTAVRULI CAPITAL LETTER PHAR
769 "\xE1\xB2\xA5" => "\xE1\x83\xA5", # GEORGIAN MTAVRULI CAPITAL LETTER KHAR
770 "\xE1\xB2\xA6" => "\xE1\x83\xA6", # GEORGIAN MTAVRULI CAPITAL LETTER GHAN
771 "\xE1\xB2\xA7" => "\xE1\x83\xA7", # GEORGIAN MTAVRULI CAPITAL LETTER QAR
772 "\xE1\xB2\xA8" => "\xE1\x83\xA8", # GEORGIAN MTAVRULI CAPITAL LETTER SHIN
773 "\xE1\xB2\xA9" => "\xE1\x83\xA9", # GEORGIAN MTAVRULI CAPITAL LETTER CHIN
774 "\xE1\xB2\xAA" => "\xE1\x83\xAA", # GEORGIAN MTAVRULI CAPITAL LETTER CAN
775 "\xE1\xB2\xAB" => "\xE1\x83\xAB", # GEORGIAN MTAVRULI CAPITAL LETTER JIL
776 "\xE1\xB2\xAC" => "\xE1\x83\xAC", # GEORGIAN MTAVRULI CAPITAL LETTER CIL
777 "\xE1\xB2\xAD" => "\xE1\x83\xAD", # GEORGIAN MTAVRULI CAPITAL LETTER CHAR
778 "\xE1\xB2\xAE" => "\xE1\x83\xAE", # GEORGIAN MTAVRULI CAPITAL LETTER XAN
779 "\xE1\xB2\xAF" => "\xE1\x83\xAF", # GEORGIAN MTAVRULI CAPITAL LETTER JHAN
780 "\xE1\xB2\xB0" => "\xE1\x83\xB0", # GEORGIAN MTAVRULI CAPITAL LETTER HAE
781 "\xE1\xB2\xB1" => "\xE1\x83\xB1", # GEORGIAN MTAVRULI CAPITAL LETTER HE
782 "\xE1\xB2\xB2" => "\xE1\x83\xB2", # GEORGIAN MTAVRULI CAPITAL LETTER HIE
783 "\xE1\xB2\xB3" => "\xE1\x83\xB3", # GEORGIAN MTAVRULI CAPITAL LETTER WE
784 "\xE1\xB2\xB4" => "\xE1\x83\xB4", # GEORGIAN MTAVRULI CAPITAL LETTER HAR
785 "\xE1\xB2\xB5" => "\xE1\x83\xB5", # GEORGIAN MTAVRULI CAPITAL LETTER HOE
786 "\xE1\xB2\xB6" => "\xE1\x83\xB6", # GEORGIAN MTAVRULI CAPITAL LETTER FI
787 "\xE1\xB2\xB7" => "\xE1\x83\xB7", # GEORGIAN MTAVRULI CAPITAL LETTER YN
788 "\xE1\xB2\xB8" => "\xE1\x83\xB8", # GEORGIAN MTAVRULI CAPITAL LETTER ELIFI
789 "\xE1\xB2\xB9" => "\xE1\x83\xB9", # GEORGIAN MTAVRULI CAPITAL LETTER TURNED GAN
790 "\xE1\xB2\xBA" => "\xE1\x83\xBA", # GEORGIAN MTAVRULI CAPITAL LETTER AIN
791 "\xE1\xB2\xBD" => "\xE1\x83\xBD", # GEORGIAN MTAVRULI CAPITAL LETTER AEN
792 "\xE1\xB2\xBE" => "\xE1\x83\xBE", # GEORGIAN MTAVRULI CAPITAL LETTER HARD SIGN
793 "\xE1\xB2\xBF" => "\xE1\x83\xBF", # GEORGIAN MTAVRULI CAPITAL LETTER LABIAL SIGN
794 "\xE1\xB8\x80" => "\xE1\xB8\x81", # LATIN CAPITAL LETTER A WITH RING BELOW
795 "\xE1\xB8\x82" => "\xE1\xB8\x83", # LATIN CAPITAL LETTER B WITH DOT ABOVE
796 "\xE1\xB8\x84" => "\xE1\xB8\x85", # LATIN CAPITAL LETTER B WITH DOT BELOW
797 "\xE1\xB8\x86" => "\xE1\xB8\x87", # LATIN CAPITAL LETTER B WITH LINE BELOW
798 "\xE1\xB8\x88" => "\xE1\xB8\x89", # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE
799 "\xE1\xB8\x8A" => "\xE1\xB8\x8B", # LATIN CAPITAL LETTER D WITH DOT ABOVE
800 "\xE1\xB8\x8C" => "\xE1\xB8\x8D", # LATIN CAPITAL LETTER D WITH DOT BELOW
801 "\xE1\xB8\x8E" => "\xE1\xB8\x8F", # LATIN CAPITAL LETTER D WITH LINE BELOW
802 "\xE1\xB8\x90" => "\xE1\xB8\x91", # LATIN CAPITAL LETTER D WITH CEDILLA
803 "\xE1\xB8\x92" => "\xE1\xB8\x93", # LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW
804 "\xE1\xB8\x94" => "\xE1\xB8\x95", # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE
805 "\xE1\xB8\x96" => "\xE1\xB8\x97", # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE
806 "\xE1\xB8\x98" => "\xE1\xB8\x99", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW
807 "\xE1\xB8\x9A" => "\xE1\xB8\x9B", # LATIN CAPITAL LETTER E WITH TILDE BELOW
808 "\xE1\xB8\x9C" => "\xE1\xB8\x9D", # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE
809 "\xE1\xB8\x9E" => "\xE1\xB8\x9F", # LATIN CAPITAL LETTER F WITH DOT ABOVE
810 "\xE1\xB8\xA0" => "\xE1\xB8\xA1", # LATIN CAPITAL LETTER G WITH MACRON
811 "\xE1\xB8\xA2" => "\xE1\xB8\xA3", # LATIN CAPITAL LETTER H WITH DOT ABOVE
812 "\xE1\xB8\xA4" => "\xE1\xB8\xA5", # LATIN CAPITAL LETTER H WITH DOT BELOW
813 "\xE1\xB8\xA6" => "\xE1\xB8\xA7", # LATIN CAPITAL LETTER H WITH DIAERESIS
814 "\xE1\xB8\xA8" => "\xE1\xB8\xA9", # LATIN CAPITAL LETTER H WITH CEDILLA
815 "\xE1\xB8\xAA" => "\xE1\xB8\xAB", # LATIN CAPITAL LETTER H WITH BREVE BELOW
816 "\xE1\xB8\xAC" => "\xE1\xB8\xAD", # LATIN CAPITAL LETTER I WITH TILDE BELOW
817 "\xE1\xB8\xAE" => "\xE1\xB8\xAF", # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE
818 "\xE1\xB8\xB0" => "\xE1\xB8\xB1", # LATIN CAPITAL LETTER K WITH ACUTE
819 "\xE1\xB8\xB2" => "\xE1\xB8\xB3", # LATIN CAPITAL LETTER K WITH DOT BELOW
820 "\xE1\xB8\xB4" => "\xE1\xB8\xB5", # LATIN CAPITAL LETTER K WITH LINE BELOW
821 "\xE1\xB8\xB6" => "\xE1\xB8\xB7", # LATIN CAPITAL LETTER L WITH DOT BELOW
822 "\xE1\xB8\xB8" => "\xE1\xB8\xB9", # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON
823 "\xE1\xB8\xBA" => "\xE1\xB8\xBB", # LATIN CAPITAL LETTER L WITH LINE BELOW
824 "\xE1\xB8\xBC" => "\xE1\xB8\xBD", # LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW
825 "\xE1\xB8\xBE" => "\xE1\xB8\xBF", # LATIN CAPITAL LETTER M WITH ACUTE
826 "\xE1\xB9\x80" => "\xE1\xB9\x81", # LATIN CAPITAL LETTER M WITH DOT ABOVE
827 "\xE1\xB9\x82" => "\xE1\xB9\x83", # LATIN CAPITAL LETTER M WITH DOT BELOW
828 "\xE1\xB9\x84" => "\xE1\xB9\x85", # LATIN CAPITAL LETTER N WITH DOT ABOVE
829 "\xE1\xB9\x86" => "\xE1\xB9\x87", # LATIN CAPITAL LETTER N WITH DOT BELOW
830 "\xE1\xB9\x88" => "\xE1\xB9\x89", # LATIN CAPITAL LETTER N WITH LINE BELOW
831 "\xE1\xB9\x8A" => "\xE1\xB9\x8B", # LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW
832 "\xE1\xB9\x8C" => "\xE1\xB9\x8D", # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE
833 "\xE1\xB9\x8E" => "\xE1\xB9\x8F", # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS
834 "\xE1\xB9\x90" => "\xE1\xB9\x91", # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE
835 "\xE1\xB9\x92" => "\xE1\xB9\x93", # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE
836 "\xE1\xB9\x94" => "\xE1\xB9\x95", # LATIN CAPITAL LETTER P WITH ACUTE
837 "\xE1\xB9\x96" => "\xE1\xB9\x97", # LATIN CAPITAL LETTER P WITH DOT ABOVE
838 "\xE1\xB9\x98" => "\xE1\xB9\x99", # LATIN CAPITAL LETTER R WITH DOT ABOVE
839 "\xE1\xB9\x9A" => "\xE1\xB9\x9B", # LATIN CAPITAL LETTER R WITH DOT BELOW
840 "\xE1\xB9\x9C" => "\xE1\xB9\x9D", # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON
841 "\xE1\xB9\x9E" => "\xE1\xB9\x9F", # LATIN CAPITAL LETTER R WITH LINE BELOW
842 "\xE1\xB9\xA0" => "\xE1\xB9\xA1", # LATIN CAPITAL LETTER S WITH DOT ABOVE
843 "\xE1\xB9\xA2" => "\xE1\xB9\xA3", # LATIN CAPITAL LETTER S WITH DOT BELOW
844 "\xE1\xB9\xA4" => "\xE1\xB9\xA5", # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE
845 "\xE1\xB9\xA6" => "\xE1\xB9\xA7", # LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE
846 "\xE1\xB9\xA8" => "\xE1\xB9\xA9", # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE
847 "\xE1\xB9\xAA" => "\xE1\xB9\xAB", # LATIN CAPITAL LETTER T WITH DOT ABOVE
848 "\xE1\xB9\xAC" => "\xE1\xB9\xAD", # LATIN CAPITAL LETTER T WITH DOT BELOW
849 "\xE1\xB9\xAE" => "\xE1\xB9\xAF", # LATIN CAPITAL LETTER T WITH LINE BELOW
850 "\xE1\xB9\xB0" => "\xE1\xB9\xB1", # LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW
851 "\xE1\xB9\xB2" => "\xE1\xB9\xB3", # LATIN CAPITAL LETTER U WITH DIAERESIS BELOW
852 "\xE1\xB9\xB4" => "\xE1\xB9\xB5", # LATIN CAPITAL LETTER U WITH TILDE BELOW
853 "\xE1\xB9\xB6" => "\xE1\xB9\xB7", # LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW
854 "\xE1\xB9\xB8" => "\xE1\xB9\xB9", # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE
855 "\xE1\xB9\xBA" => "\xE1\xB9\xBB", # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS
856 "\xE1\xB9\xBC" => "\xE1\xB9\xBD", # LATIN CAPITAL LETTER V WITH TILDE
857 "\xE1\xB9\xBE" => "\xE1\xB9\xBF", # LATIN CAPITAL LETTER V WITH DOT BELOW
858 "\xE1\xBA\x80" => "\xE1\xBA\x81", # LATIN CAPITAL LETTER W WITH GRAVE
859 "\xE1\xBA\x82" => "\xE1\xBA\x83", # LATIN CAPITAL LETTER W WITH ACUTE
860 "\xE1\xBA\x84" => "\xE1\xBA\x85", # LATIN CAPITAL LETTER W WITH DIAERESIS
861 "\xE1\xBA\x86" => "\xE1\xBA\x87", # LATIN CAPITAL LETTER W WITH DOT ABOVE
862 "\xE1\xBA\x88" => "\xE1\xBA\x89", # LATIN CAPITAL LETTER W WITH DOT BELOW
863 "\xE1\xBA\x8A" => "\xE1\xBA\x8B", # LATIN CAPITAL LETTER X WITH DOT ABOVE
864 "\xE1\xBA\x8C" => "\xE1\xBA\x8D", # LATIN CAPITAL LETTER X WITH DIAERESIS
865 "\xE1\xBA\x8E" => "\xE1\xBA\x8F", # LATIN CAPITAL LETTER Y WITH DOT ABOVE
866 "\xE1\xBA\x90" => "\xE1\xBA\x91", # LATIN CAPITAL LETTER Z WITH CIRCUMFLEX
867 "\xE1\xBA\x92" => "\xE1\xBA\x93", # LATIN CAPITAL LETTER Z WITH DOT BELOW
868 "\xE1\xBA\x94" => "\xE1\xBA\x95", # LATIN CAPITAL LETTER Z WITH LINE BELOW
869 "\xE1\xBA\x96" => "\x68\xCC\xB1", # LATIN SMALL LETTER H WITH LINE BELOW
870 "\xE1\xBA\x97" => "\x74\xCC\x88", # LATIN SMALL LETTER T WITH DIAERESIS
871 "\xE1\xBA\x98" => "\x77\xCC\x8A", # LATIN SMALL LETTER W WITH RING ABOVE
872 "\xE1\xBA\x99" => "\x79\xCC\x8A", # LATIN SMALL LETTER Y WITH RING ABOVE
873 "\xE1\xBA\x9A" => "\x61\xCA\xBE", # LATIN SMALL LETTER A WITH RIGHT HALF RING
874 "\xE1\xBA\x9B" => "\xE1\xB9\xA1", # LATIN SMALL LETTER LONG S WITH DOT ABOVE
875 "\xE1\xBA\x9E" => "\x73\x73", # LATIN CAPITAL LETTER SHARP S
876 "\xE1\xBA\xA0" => "\xE1\xBA\xA1", # LATIN CAPITAL LETTER A WITH DOT BELOW
877 "\xE1\xBA\xA2" => "\xE1\xBA\xA3", # LATIN CAPITAL LETTER A WITH HOOK ABOVE
878 "\xE1\xBA\xA4" => "\xE1\xBA\xA5", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE
879 "\xE1\xBA\xA6" => "\xE1\xBA\xA7", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE
880 "\xE1\xBA\xA8" => "\xE1\xBA\xA9", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
881 "\xE1\xBA\xAA" => "\xE1\xBA\xAB", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE
882 "\xE1\xBA\xAC" => "\xE1\xBA\xAD", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW
883 "\xE1\xBA\xAE" => "\xE1\xBA\xAF", # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE
884 "\xE1\xBA\xB0" => "\xE1\xBA\xB1", # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE
885 "\xE1\xBA\xB2" => "\xE1\xBA\xB3", # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE
886 "\xE1\xBA\xB4" => "\xE1\xBA\xB5", # LATIN CAPITAL LETTER A WITH BREVE AND TILDE
887 "\xE1\xBA\xB6" => "\xE1\xBA\xB7", # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW
888 "\xE1\xBA\xB8" => "\xE1\xBA\xB9", # LATIN CAPITAL LETTER E WITH DOT BELOW
889 "\xE1\xBA\xBA" => "\xE1\xBA\xBB", # LATIN CAPITAL LETTER E WITH HOOK ABOVE
890 "\xE1\xBA\xBC" => "\xE1\xBA\xBD", # LATIN CAPITAL LETTER E WITH TILDE
891 "\xE1\xBA\xBE" => "\xE1\xBA\xBF", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE
892 "\xE1\xBB\x80" => "\xE1\xBB\x81", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE
893 "\xE1\xBB\x82" => "\xE1\xBB\x83", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
894 "\xE1\xBB\x84" => "\xE1\xBB\x85", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE
895 "\xE1\xBB\x86" => "\xE1\xBB\x87", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW
896 "\xE1\xBB\x88" => "\xE1\xBB\x89", # LATIN CAPITAL LETTER I WITH HOOK ABOVE
897 "\xE1\xBB\x8A" => "\xE1\xBB\x8B", # LATIN CAPITAL LETTER I WITH DOT BELOW
898 "\xE1\xBB\x8C" => "\xE1\xBB\x8D", # LATIN CAPITAL LETTER O WITH DOT BELOW
899 "\xE1\xBB\x8E" => "\xE1\xBB\x8F", # LATIN CAPITAL LETTER O WITH HOOK ABOVE
900 "\xE1\xBB\x90" => "\xE1\xBB\x91", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE
901 "\xE1\xBB\x92" => "\xE1\xBB\x93", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE
902 "\xE1\xBB\x94" => "\xE1\xBB\x95", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
903 "\xE1\xBB\x96" => "\xE1\xBB\x97", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE
904 "\xE1\xBB\x98" => "\xE1\xBB\x99", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW
905 "\xE1\xBB\x9A" => "\xE1\xBB\x9B", # LATIN CAPITAL LETTER O WITH HORN AND ACUTE
906 "\xE1\xBB\x9C" => "\xE1\xBB\x9D", # LATIN CAPITAL LETTER O WITH HORN AND GRAVE
907 "\xE1\xBB\x9E" => "\xE1\xBB\x9F", # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE
908 "\xE1\xBB\xA0" => "\xE1\xBB\xA1", # LATIN CAPITAL LETTER O WITH HORN AND TILDE
909 "\xE1\xBB\xA2" => "\xE1\xBB\xA3", # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW
910 "\xE1\xBB\xA4" => "\xE1\xBB\xA5", # LATIN CAPITAL LETTER U WITH DOT BELOW
911 "\xE1\xBB\xA6" => "\xE1\xBB\xA7", # LATIN CAPITAL LETTER U WITH HOOK ABOVE
912 "\xE1\xBB\xA8" => "\xE1\xBB\xA9", # LATIN CAPITAL LETTER U WITH HORN AND ACUTE
913 "\xE1\xBB\xAA" => "\xE1\xBB\xAB", # LATIN CAPITAL LETTER U WITH HORN AND GRAVE
914 "\xE1\xBB\xAC" => "\xE1\xBB\xAD", # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE
915 "\xE1\xBB\xAE" => "\xE1\xBB\xAF", # LATIN CAPITAL LETTER U WITH HORN AND TILDE
916 "\xE1\xBB\xB0" => "\xE1\xBB\xB1", # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW
917 "\xE1\xBB\xB2" => "\xE1\xBB\xB3", # LATIN CAPITAL LETTER Y WITH GRAVE
918 "\xE1\xBB\xB4" => "\xE1\xBB\xB5", # LATIN CAPITAL LETTER Y WITH DOT BELOW
919 "\xE1\xBB\xB6" => "\xE1\xBB\xB7", # LATIN CAPITAL LETTER Y WITH HOOK ABOVE
920 "\xE1\xBB\xB8" => "\xE1\xBB\xB9", # LATIN CAPITAL LETTER Y WITH TILDE
921 "\xE1\xBB\xBA" => "\xE1\xBB\xBB", # LATIN CAPITAL LETTER MIDDLE-WELSH LL
922 "\xE1\xBB\xBC" => "\xE1\xBB\xBD", # LATIN CAPITAL LETTER MIDDLE-WELSH V
923 "\xE1\xBB\xBE" => "\xE1\xBB\xBF", # LATIN CAPITAL LETTER Y WITH LOOP
924 "\xE1\xBC\x88" => "\xE1\xBC\x80", # GREEK CAPITAL LETTER ALPHA WITH PSILI
925 "\xE1\xBC\x89" => "\xE1\xBC\x81", # GREEK CAPITAL LETTER ALPHA WITH DASIA
926 "\xE1\xBC\x8A" => "\xE1\xBC\x82", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA
927 "\xE1\xBC\x8B" => "\xE1\xBC\x83", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA
928 "\xE1\xBC\x8C" => "\xE1\xBC\x84", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA
929 "\xE1\xBC\x8D" => "\xE1\xBC\x85", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA
930 "\xE1\xBC\x8E" => "\xE1\xBC\x86", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI
931 "\xE1\xBC\x8F" => "\xE1\xBC\x87", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI
932 "\xE1\xBC\x98" => "\xE1\xBC\x90", # GREEK CAPITAL LETTER EPSILON WITH PSILI
933 "\xE1\xBC\x99" => "\xE1\xBC\x91", # GREEK CAPITAL LETTER EPSILON WITH DASIA
934 "\xE1\xBC\x9A" => "\xE1\xBC\x92", # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA
935 "\xE1\xBC\x9B" => "\xE1\xBC\x93", # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA
936 "\xE1\xBC\x9C" => "\xE1\xBC\x94", # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA
937 "\xE1\xBC\x9D" => "\xE1\xBC\x95", # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA
938 "\xE1\xBC\xA8" => "\xE1\xBC\xA0", # GREEK CAPITAL LETTER ETA WITH PSILI
939 "\xE1\xBC\xA9" => "\xE1\xBC\xA1", # GREEK CAPITAL LETTER ETA WITH DASIA
940 "\xE1\xBC\xAA" => "\xE1\xBC\xA2", # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA
941 "\xE1\xBC\xAB" => "\xE1\xBC\xA3", # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA
942 "\xE1\xBC\xAC" => "\xE1\xBC\xA4", # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA
943 "\xE1\xBC\xAD" => "\xE1\xBC\xA5", # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA
944 "\xE1\xBC\xAE" => "\xE1\xBC\xA6", # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI
945 "\xE1\xBC\xAF" => "\xE1\xBC\xA7", # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI
946 "\xE1\xBC\xB8" => "\xE1\xBC\xB0", # GREEK CAPITAL LETTER IOTA WITH PSILI
947 "\xE1\xBC\xB9" => "\xE1\xBC\xB1", # GREEK CAPITAL LETTER IOTA WITH DASIA
948 "\xE1\xBC\xBA" => "\xE1\xBC\xB2", # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA
949 "\xE1\xBC\xBB" => "\xE1\xBC\xB3", # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA
950 "\xE1\xBC\xBC" => "\xE1\xBC\xB4", # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA
951 "\xE1\xBC\xBD" => "\xE1\xBC\xB5", # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA
952 "\xE1\xBC\xBE" => "\xE1\xBC\xB6", # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI
953 "\xE1\xBC\xBF" => "\xE1\xBC\xB7", # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI
954 "\xE1\xBD\x88" => "\xE1\xBD\x80", # GREEK CAPITAL LETTER OMICRON WITH PSILI
955 "\xE1\xBD\x89" => "\xE1\xBD\x81", # GREEK CAPITAL LETTER OMICRON WITH DASIA
956 "\xE1\xBD\x8A" => "\xE1\xBD\x82", # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA
957 "\xE1\xBD\x8B" => "\xE1\xBD\x83", # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA
958 "\xE1\xBD\x8C" => "\xE1\xBD\x84", # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA
959 "\xE1\xBD\x8D" => "\xE1\xBD\x85", # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA
960 "\xE1\xBD\x90" => "\xCF\x85\xCC\x93", # GREEK SMALL LETTER UPSILON WITH PSILI
961 "\xE1\xBD\x92" => "\xCF\x85\xCC\x93\xCC\x80", # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA
962 "\xE1\xBD\x94" => "\xCF\x85\xCC\x93\xCC\x81", # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA
963 "\xE1\xBD\x96" => "\xCF\x85\xCC\x93\xCD\x82", # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI
964 "\xE1\xBD\x99" => "\xE1\xBD\x91", # GREEK CAPITAL LETTER UPSILON WITH DASIA
965 "\xE1\xBD\x9B" => "\xE1\xBD\x93", # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA
966 "\xE1\xBD\x9D" => "\xE1\xBD\x95", # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA
967 "\xE1\xBD\x9F" => "\xE1\xBD\x97", # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI
968 "\xE1\xBD\xA8" => "\xE1\xBD\xA0", # GREEK CAPITAL LETTER OMEGA WITH PSILI
969 "\xE1\xBD\xA9" => "\xE1\xBD\xA1", # GREEK CAPITAL LETTER OMEGA WITH DASIA
970 "\xE1\xBD\xAA" => "\xE1\xBD\xA2", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA
971 "\xE1\xBD\xAB" => "\xE1\xBD\xA3", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA
972 "\xE1\xBD\xAC" => "\xE1\xBD\xA4", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA
973 "\xE1\xBD\xAD" => "\xE1\xBD\xA5", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA
974 "\xE1\xBD\xAE" => "\xE1\xBD\xA6", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI
975 "\xE1\xBD\xAF" => "\xE1\xBD\xA7", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI
976 "\xE1\xBE\x80" => "\xE1\xBC\x80\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI
977 "\xE1\xBE\x81" => "\xE1\xBC\x81\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI
978 "\xE1\xBE\x82" => "\xE1\xBC\x82\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI
979 "\xE1\xBE\x83" => "\xE1\xBC\x83\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI
980 "\xE1\xBE\x84" => "\xE1\xBC\x84\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI
981 "\xE1\xBE\x85" => "\xE1\xBC\x85\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI
982 "\xE1\xBE\x86" => "\xE1\xBC\x86\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
983 "\xE1\xBE\x87" => "\xE1\xBC\x87\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
984 "\xE1\xBE\x88" => "\xE1\xBC\x80\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI
985 "\xE1\xBE\x89" => "\xE1\xBC\x81\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI
986 "\xE1\xBE\x8A" => "\xE1\xBC\x82\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI
987 "\xE1\xBE\x8B" => "\xE1\xBC\x83\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI
988 "\xE1\xBE\x8C" => "\xE1\xBC\x84\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI
989 "\xE1\xBE\x8D" => "\xE1\xBC\x85\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI
990 "\xE1\xBE\x8E" => "\xE1\xBC\x86\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
991 "\xE1\xBE\x8F" => "\xE1\xBC\x87\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
992 "\xE1\xBE\x90" => "\xE1\xBC\xA0\xCE\xB9", # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI
993 "\xE1\xBE\x91" => "\xE1\xBC\xA1\xCE\xB9", # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI
994 "\xE1\xBE\x92" => "\xE1\xBC\xA2\xCE\xB9", # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI
995 "\xE1\xBE\x93" => "\xE1\xBC\xA3\xCE\xB9", # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI
996 "\xE1\xBE\x94" => "\xE1\xBC\xA4\xCE\xB9", # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI
997 "\xE1\xBE\x95" => "\xE1\xBC\xA5\xCE\xB9", # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI
998 "\xE1\xBE\x96" => "\xE1\xBC\xA6\xCE\xB9", # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
999 "\xE1\xBE\x97" => "\xE1\xBC\xA7\xCE\xB9", # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
1000 "\xE1\xBE\x98" => "\xE1\xBC\xA0\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI
1001 "\xE1\xBE\x99" => "\xE1\xBC\xA1\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI
1002 "\xE1\xBE\x9A" => "\xE1\xBC\xA2\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI
1003 "\xE1\xBE\x9B" => "\xE1\xBC\xA3\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI
1004 "\xE1\xBE\x9C" => "\xE1\xBC\xA4\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI
1005 "\xE1\xBE\x9D" => "\xE1\xBC\xA5\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI
1006 "\xE1\xBE\x9E" => "\xE1\xBC\xA6\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
1007 "\xE1\xBE\x9F" => "\xE1\xBC\xA7\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
1008 "\xE1\xBE\xA0" => "\xE1\xBD\xA0\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI
1009 "\xE1\xBE\xA1" => "\xE1\xBD\xA1\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI
1010 "\xE1\xBE\xA2" => "\xE1\xBD\xA2\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI
1011 "\xE1\xBE\xA3" => "\xE1\xBD\xA3\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI
1012 "\xE1\xBE\xA4" => "\xE1\xBD\xA4\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI
1013 "\xE1\xBE\xA5" => "\xE1\xBD\xA5\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI
1014 "\xE1\xBE\xA6" => "\xE1\xBD\xA6\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
1015 "\xE1\xBE\xA7" => "\xE1\xBD\xA7\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
1016 "\xE1\xBE\xA8" => "\xE1\xBD\xA0\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI
1017 "\xE1\xBE\xA9" => "\xE1\xBD\xA1\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI
1018 "\xE1\xBE\xAA" => "\xE1\xBD\xA2\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI
1019 "\xE1\xBE\xAB" => "\xE1\xBD\xA3\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI
1020 "\xE1\xBE\xAC" => "\xE1\xBD\xA4\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI
1021 "\xE1\xBE\xAD" => "\xE1\xBD\xA5\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI
1022 "\xE1\xBE\xAE" => "\xE1\xBD\xA6\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
1023 "\xE1\xBE\xAF" => "\xE1\xBD\xA7\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
1024 "\xE1\xBE\xB2" => "\xE1\xBD\xB0\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI
1025 "\xE1\xBE\xB3" => "\xCE\xB1\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI
1026 "\xE1\xBE\xB4" => "\xCE\xAC\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
1027 "\xE1\xBE\xB6" => "\xCE\xB1\xCD\x82", # GREEK SMALL LETTER ALPHA WITH PERISPOMENI
1028 "\xE1\xBE\xB7" => "\xCE\xB1\xCD\x82\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI
1029 "\xE1\xBE\xB8" => "\xE1\xBE\xB0", # GREEK CAPITAL LETTER ALPHA WITH VRACHY
1030 "\xE1\xBE\xB9" => "\xE1\xBE\xB1", # GREEK CAPITAL LETTER ALPHA WITH MACRON
1031 "\xE1\xBE\xBA" => "\xE1\xBD\xB0", # GREEK CAPITAL LETTER ALPHA WITH VARIA
1032 "\xE1\xBE\xBB" => "\xE1\xBD\xB1", # GREEK CAPITAL LETTER ALPHA WITH OXIA
1033 "\xE1\xBE\xBC" => "\xCE\xB1\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
1034 "\xE1\xBE\xBE" => "\xCE\xB9", # GREEK PROSGEGRAMMENI
1035 "\xE1\xBF\x82" => "\xE1\xBD\xB4\xCE\xB9", # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI
1036 "\xE1\xBF\x83" => "\xCE\xB7\xCE\xB9", # GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI
1037 "\xE1\xBF\x84" => "\xCE\xAE\xCE\xB9", # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
1038 "\xE1\xBF\x86" => "\xCE\xB7\xCD\x82", # GREEK SMALL LETTER ETA WITH PERISPOMENI
1039 "\xE1\xBF\x87" => "\xCE\xB7\xCD\x82\xCE\xB9", # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI
1040 "\xE1\xBF\x88" => "\xE1\xBD\xB2", # GREEK CAPITAL LETTER EPSILON WITH VARIA
1041 "\xE1\xBF\x89" => "\xE1\xBD\xB3", # GREEK CAPITAL LETTER EPSILON WITH OXIA
1042 "\xE1\xBF\x8A" => "\xE1\xBD\xB4", # GREEK CAPITAL LETTER ETA WITH VARIA
1043 "\xE1\xBF\x8B" => "\xE1\xBD\xB5", # GREEK CAPITAL LETTER ETA WITH OXIA
1044 "\xE1\xBF\x8C" => "\xCE\xB7\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
1045 "\xE1\xBF\x92" => "\xCE\xB9\xCC\x88\xCC\x80", # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA
1046 "\xE1\xBF\x93" => "\xCE\xB9\xCC\x88\xCC\x81", # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
1047 "\xE1\xBF\x96" => "\xCE\xB9\xCD\x82", # GREEK SMALL LETTER IOTA WITH PERISPOMENI
1048 "\xE1\xBF\x97" => "\xCE\xB9\xCC\x88\xCD\x82", # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI
1049 "\xE1\xBF\x98" => "\xE1\xBF\x90", # GREEK CAPITAL LETTER IOTA WITH VRACHY
1050 "\xE1\xBF\x99" => "\xE1\xBF\x91", # GREEK CAPITAL LETTER IOTA WITH MACRON
1051 "\xE1\xBF\x9A" => "\xE1\xBD\xB6", # GREEK CAPITAL LETTER IOTA WITH VARIA
1052 "\xE1\xBF\x9B" => "\xE1\xBD\xB7", # GREEK CAPITAL LETTER IOTA WITH OXIA
1053 "\xE1\xBF\xA2" => "\xCF\x85\xCC\x88\xCC\x80", # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA
1054 "\xE1\xBF\xA3" => "\xCF\x85\xCC\x88\xCC\x81", # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
1055 "\xE1\xBF\xA4" => "\xCF\x81\xCC\x93", # GREEK SMALL LETTER RHO WITH PSILI
1056 "\xE1\xBF\xA6" => "\xCF\x85\xCD\x82", # GREEK SMALL LETTER UPSILON WITH PERISPOMENI
1057 "\xE1\xBF\xA7" => "\xCF\x85\xCC\x88\xCD\x82", # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI
1058 "\xE1\xBF\xA8" => "\xE1\xBF\xA0", # GREEK CAPITAL LETTER UPSILON WITH VRACHY
1059 "\xE1\xBF\xA9" => "\xE1\xBF\xA1", # GREEK CAPITAL LETTER UPSILON WITH MACRON
1060 "\xE1\xBF\xAA" => "\xE1\xBD\xBA", # GREEK CAPITAL LETTER UPSILON WITH VARIA
1061 "\xE1\xBF\xAB" => "\xE1\xBD\xBB", # GREEK CAPITAL LETTER UPSILON WITH OXIA
1062 "\xE1\xBF\xAC" => "\xE1\xBF\xA5", # GREEK CAPITAL LETTER RHO WITH DASIA
1063 "\xE1\xBF\xB2" => "\xE1\xBD\xBC\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI
1064 "\xE1\xBF\xB3" => "\xCF\x89\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI
1065 "\xE1\xBF\xB4" => "\xCF\x8E\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
1066 "\xE1\xBF\xB6" => "\xCF\x89\xCD\x82", # GREEK SMALL LETTER OMEGA WITH PERISPOMENI
1067 "\xE1\xBF\xB7" => "\xCF\x89\xCD\x82\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI
1068 "\xE1\xBF\xB8" => "\xE1\xBD\xB8", # GREEK CAPITAL LETTER OMICRON WITH VARIA
1069 "\xE1\xBF\xB9" => "\xE1\xBD\xB9", # GREEK CAPITAL LETTER OMICRON WITH OXIA
1070 "\xE1\xBF\xBA" => "\xE1\xBD\xBC", # GREEK CAPITAL LETTER OMEGA WITH VARIA
1071 "\xE1\xBF\xBB" => "\xE1\xBD\xBD", # GREEK CAPITAL LETTER OMEGA WITH OXIA
1072 "\xE1\xBF\xBC" => "\xCF\x89\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
1073 "\xE2\x84\xA6" => "\xCF\x89", # OHM SIGN
1074 "\xE2\x84\xAA" => "\x6B", # KELVIN SIGN
1075 "\xE2\x84\xAB" => "\xC3\xA5", # ANGSTROM SIGN
1076 "\xE2\x84\xB2" => "\xE2\x85\x8E", # TURNED CAPITAL F
1077 "\xE2\x85\xA0" => "\xE2\x85\xB0", # ROMAN NUMERAL ONE
1078 "\xE2\x85\xA1" => "\xE2\x85\xB1", # ROMAN NUMERAL TWO
1079 "\xE2\x85\xA2" => "\xE2\x85\xB2", # ROMAN NUMERAL THREE
1080 "\xE2\x85\xA3" => "\xE2\x85\xB3", # ROMAN NUMERAL FOUR
1081 "\xE2\x85\xA4" => "\xE2\x85\xB4", # ROMAN NUMERAL FIVE
1082 "\xE2\x85\xA5" => "\xE2\x85\xB5", # ROMAN NUMERAL SIX
1083 "\xE2\x85\xA6" => "\xE2\x85\xB6", # ROMAN NUMERAL SEVEN
1084 "\xE2\x85\xA7" => "\xE2\x85\xB7", # ROMAN NUMERAL EIGHT
1085 "\xE2\x85\xA8" => "\xE2\x85\xB8", # ROMAN NUMERAL NINE
1086 "\xE2\x85\xA9" => "\xE2\x85\xB9", # ROMAN NUMERAL TEN
1087 "\xE2\x85\xAA" => "\xE2\x85\xBA", # ROMAN NUMERAL ELEVEN
1088 "\xE2\x85\xAB" => "\xE2\x85\xBB", # ROMAN NUMERAL TWELVE
1089 "\xE2\x85\xAC" => "\xE2\x85\xBC", # ROMAN NUMERAL FIFTY
1090 "\xE2\x85\xAD" => "\xE2\x85\xBD", # ROMAN NUMERAL ONE HUNDRED
1091 "\xE2\x85\xAE" => "\xE2\x85\xBE", # ROMAN NUMERAL FIVE HUNDRED
1092 "\xE2\x85\xAF" => "\xE2\x85\xBF", # ROMAN NUMERAL ONE THOUSAND
1093 "\xE2\x86\x83" => "\xE2\x86\x84", # ROMAN NUMERAL REVERSED ONE HUNDRED
1094 "\xE2\x92\xB6" => "\xE2\x93\x90", # CIRCLED LATIN CAPITAL LETTER A
1095 "\xE2\x92\xB7" => "\xE2\x93\x91", # CIRCLED LATIN CAPITAL LETTER B
1096 "\xE2\x92\xB8" => "\xE2\x93\x92", # CIRCLED LATIN CAPITAL LETTER C
1097 "\xE2\x92\xB9" => "\xE2\x93\x93", # CIRCLED LATIN CAPITAL LETTER D
1098 "\xE2\x92\xBA" => "\xE2\x93\x94", # CIRCLED LATIN CAPITAL LETTER E
1099 "\xE2\x92\xBB" => "\xE2\x93\x95", # CIRCLED LATIN CAPITAL LETTER F
1100 "\xE2\x92\xBC" => "\xE2\x93\x96", # CIRCLED LATIN CAPITAL LETTER G
1101 "\xE2\x92\xBD" => "\xE2\x93\x97", # CIRCLED LATIN CAPITAL LETTER H
1102 "\xE2\x92\xBE" => "\xE2\x93\x98", # CIRCLED LATIN CAPITAL LETTER I
1103 "\xE2\x92\xBF" => "\xE2\x93\x99", # CIRCLED LATIN CAPITAL LETTER J
1104 "\xE2\x93\x80" => "\xE2\x93\x9A", # CIRCLED LATIN CAPITAL LETTER K
1105 "\xE2\x93\x81" => "\xE2\x93\x9B", # CIRCLED LATIN CAPITAL LETTER L
1106 "\xE2\x93\x82" => "\xE2\x93\x9C", # CIRCLED LATIN CAPITAL LETTER M
1107 "\xE2\x93\x83" => "\xE2\x93\x9D", # CIRCLED LATIN CAPITAL LETTER N
1108 "\xE2\x93\x84" => "\xE2\x93\x9E", # CIRCLED LATIN CAPITAL LETTER O
1109 "\xE2\x93\x85" => "\xE2\x93\x9F", # CIRCLED LATIN CAPITAL LETTER P
1110 "\xE2\x93\x86" => "\xE2\x93\xA0", # CIRCLED LATIN CAPITAL LETTER Q
1111 "\xE2\x93\x87" => "\xE2\x93\xA1", # CIRCLED LATIN CAPITAL LETTER R
1112 "\xE2\x93\x88" => "\xE2\x93\xA2", # CIRCLED LATIN CAPITAL LETTER S
1113 "\xE2\x93\x89" => "\xE2\x93\xA3", # CIRCLED LATIN CAPITAL LETTER T
1114 "\xE2\x93\x8A" => "\xE2\x93\xA4", # CIRCLED LATIN CAPITAL LETTER U
1115 "\xE2\x93\x8B" => "\xE2\x93\xA5", # CIRCLED LATIN CAPITAL LETTER V
1116 "\xE2\x93\x8C" => "\xE2\x93\xA6", # CIRCLED LATIN CAPITAL LETTER W
1117 "\xE2\x93\x8D" => "\xE2\x93\xA7", # CIRCLED LATIN CAPITAL LETTER X
1118 "\xE2\x93\x8E" => "\xE2\x93\xA8", # CIRCLED LATIN CAPITAL LETTER Y
1119 "\xE2\x93\x8F" => "\xE2\x93\xA9", # CIRCLED LATIN CAPITAL LETTER Z
1120 "\xE2\xB0\x80" => "\xE2\xB0\xB0", # GLAGOLITIC CAPITAL LETTER AZU
1121 "\xE2\xB0\x81" => "\xE2\xB0\xB1", # GLAGOLITIC CAPITAL LETTER BUKY
1122 "\xE2\xB0\x82" => "\xE2\xB0\xB2", # GLAGOLITIC CAPITAL LETTER VEDE
1123 "\xE2\xB0\x83" => "\xE2\xB0\xB3", # GLAGOLITIC CAPITAL LETTER GLAGOLI
1124 "\xE2\xB0\x84" => "\xE2\xB0\xB4", # GLAGOLITIC CAPITAL LETTER DOBRO
1125 "\xE2\xB0\x85" => "\xE2\xB0\xB5", # GLAGOLITIC CAPITAL LETTER YESTU
1126 "\xE2\xB0\x86" => "\xE2\xB0\xB6", # GLAGOLITIC CAPITAL LETTER ZHIVETE
1127 "\xE2\xB0\x87" => "\xE2\xB0\xB7", # GLAGOLITIC CAPITAL LETTER DZELO
1128 "\xE2\xB0\x88" => "\xE2\xB0\xB8", # GLAGOLITIC CAPITAL LETTER ZEMLJA
1129 "\xE2\xB0\x89" => "\xE2\xB0\xB9", # GLAGOLITIC CAPITAL LETTER IZHE
1130 "\xE2\xB0\x8A" => "\xE2\xB0\xBA", # GLAGOLITIC CAPITAL LETTER INITIAL IZHE
1131 "\xE2\xB0\x8B" => "\xE2\xB0\xBB", # GLAGOLITIC CAPITAL LETTER I
1132 "\xE2\xB0\x8C" => "\xE2\xB0\xBC", # GLAGOLITIC CAPITAL LETTER DJERVI
1133 "\xE2\xB0\x8D" => "\xE2\xB0\xBD", # GLAGOLITIC CAPITAL LETTER KAKO
1134 "\xE2\xB0\x8E" => "\xE2\xB0\xBE", # GLAGOLITIC CAPITAL LETTER LJUDIJE
1135 "\xE2\xB0\x8F" => "\xE2\xB0\xBF", # GLAGOLITIC CAPITAL LETTER MYSLITE
1136 "\xE2\xB0\x90" => "\xE2\xB1\x80", # GLAGOLITIC CAPITAL LETTER NASHI
1137 "\xE2\xB0\x91" => "\xE2\xB1\x81", # GLAGOLITIC CAPITAL LETTER ONU
1138 "\xE2\xB0\x92" => "\xE2\xB1\x82", # GLAGOLITIC CAPITAL LETTER POKOJI
1139 "\xE2\xB0\x93" => "\xE2\xB1\x83", # GLAGOLITIC CAPITAL LETTER RITSI
1140 "\xE2\xB0\x94" => "\xE2\xB1\x84", # GLAGOLITIC CAPITAL LETTER SLOVO
1141 "\xE2\xB0\x95" => "\xE2\xB1\x85", # GLAGOLITIC CAPITAL LETTER TVRIDO
1142 "\xE2\xB0\x96" => "\xE2\xB1\x86", # GLAGOLITIC CAPITAL LETTER UKU
1143 "\xE2\xB0\x97" => "\xE2\xB1\x87", # GLAGOLITIC CAPITAL LETTER FRITU
1144 "\xE2\xB0\x98" => "\xE2\xB1\x88", # GLAGOLITIC CAPITAL LETTER HERU
1145 "\xE2\xB0\x99" => "\xE2\xB1\x89", # GLAGOLITIC CAPITAL LETTER OTU
1146 "\xE2\xB0\x9A" => "\xE2\xB1\x8A", # GLAGOLITIC CAPITAL LETTER PE
1147 "\xE2\xB0\x9B" => "\xE2\xB1\x8B", # GLAGOLITIC CAPITAL LETTER SHTA
1148 "\xE2\xB0\x9C" => "\xE2\xB1\x8C", # GLAGOLITIC CAPITAL LETTER TSI
1149 "\xE2\xB0\x9D" => "\xE2\xB1\x8D", # GLAGOLITIC CAPITAL LETTER CHRIVI
1150 "\xE2\xB0\x9E" => "\xE2\xB1\x8E", # GLAGOLITIC CAPITAL LETTER SHA
1151 "\xE2\xB0\x9F" => "\xE2\xB1\x8F", # GLAGOLITIC CAPITAL LETTER YERU
1152 "\xE2\xB0\xA0" => "\xE2\xB1\x90", # GLAGOLITIC CAPITAL LETTER YERI
1153 "\xE2\xB0\xA1" => "\xE2\xB1\x91", # GLAGOLITIC CAPITAL LETTER YATI
1154 "\xE2\xB0\xA2" => "\xE2\xB1\x92", # GLAGOLITIC CAPITAL LETTER SPIDERY HA
1155 "\xE2\xB0\xA3" => "\xE2\xB1\x93", # GLAGOLITIC CAPITAL LETTER YU
1156 "\xE2\xB0\xA4" => "\xE2\xB1\x94", # GLAGOLITIC CAPITAL LETTER SMALL YUS
1157 "\xE2\xB0\xA5" => "\xE2\xB1\x95", # GLAGOLITIC CAPITAL LETTER SMALL YUS WITH TAIL
1158 "\xE2\xB0\xA6" => "\xE2\xB1\x96", # GLAGOLITIC CAPITAL LETTER YO
1159 "\xE2\xB0\xA7" => "\xE2\xB1\x97", # GLAGOLITIC CAPITAL LETTER IOTATED SMALL YUS
1160 "\xE2\xB0\xA8" => "\xE2\xB1\x98", # GLAGOLITIC CAPITAL LETTER BIG YUS
1161 "\xE2\xB0\xA9" => "\xE2\xB1\x99", # GLAGOLITIC CAPITAL LETTER IOTATED BIG YUS
1162 "\xE2\xB0\xAA" => "\xE2\xB1\x9A", # GLAGOLITIC CAPITAL LETTER FITA
1163 "\xE2\xB0\xAB" => "\xE2\xB1\x9B", # GLAGOLITIC CAPITAL LETTER IZHITSA
1164 "\xE2\xB0\xAC" => "\xE2\xB1\x9C", # GLAGOLITIC CAPITAL LETTER SHTAPIC
1165 "\xE2\xB0\xAD" => "\xE2\xB1\x9D", # GLAGOLITIC CAPITAL LETTER TROKUTASTI A
1166 "\xE2\xB0\xAE" => "\xE2\xB1\x9E", # GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE
1167 "\xE2\xB1\xA0" => "\xE2\xB1\xA1", # LATIN CAPITAL LETTER L WITH DOUBLE BAR
1168 "\xE2\xB1\xA2" => "\xC9\xAB", # LATIN CAPITAL LETTER L WITH MIDDLE TILDE
1169 "\xE2\xB1\xA3" => "\xE1\xB5\xBD", # LATIN CAPITAL LETTER P WITH STROKE
1170 "\xE2\xB1\xA4" => "\xC9\xBD", # LATIN CAPITAL LETTER R WITH TAIL
1171 "\xE2\xB1\xA7" => "\xE2\xB1\xA8", # LATIN CAPITAL LETTER H WITH DESCENDER
1172 "\xE2\xB1\xA9" => "\xE2\xB1\xAA", # LATIN CAPITAL LETTER K WITH DESCENDER
1173 "\xE2\xB1\xAB" => "\xE2\xB1\xAC", # LATIN CAPITAL LETTER Z WITH DESCENDER
1174 "\xE2\xB1\xAD" => "\xC9\x91", # LATIN CAPITAL LETTER ALPHA
1175 "\xE2\xB1\xAE" => "\xC9\xB1", # LATIN CAPITAL LETTER M WITH HOOK
1176 "\xE2\xB1\xAF" => "\xC9\x90", # LATIN CAPITAL LETTER TURNED A
1177 "\xE2\xB1\xB0" => "\xC9\x92", # LATIN CAPITAL LETTER TURNED ALPHA
1178 "\xE2\xB1\xB2" => "\xE2\xB1\xB3", # LATIN CAPITAL LETTER W WITH HOOK
1179 "\xE2\xB1\xB5" => "\xE2\xB1\xB6", # LATIN CAPITAL LETTER HALF H
1180 "\xE2\xB1\xBE" => "\xC8\xBF", # LATIN CAPITAL LETTER S WITH SWASH TAIL
1181 "\xE2\xB1\xBF" => "\xC9\x80", # LATIN CAPITAL LETTER Z WITH SWASH TAIL
1182 "\xE2\xB2\x80" => "\xE2\xB2\x81", # COPTIC CAPITAL LETTER ALFA
1183 "\xE2\xB2\x82" => "\xE2\xB2\x83", # COPTIC CAPITAL LETTER VIDA
1184 "\xE2\xB2\x84" => "\xE2\xB2\x85", # COPTIC CAPITAL LETTER GAMMA
1185 "\xE2\xB2\x86" => "\xE2\xB2\x87", # COPTIC CAPITAL LETTER DALDA
1186 "\xE2\xB2\x88" => "\xE2\xB2\x89", # COPTIC CAPITAL LETTER EIE
1187 "\xE2\xB2\x8A" => "\xE2\xB2\x8B", # COPTIC CAPITAL LETTER SOU
1188 "\xE2\xB2\x8C" => "\xE2\xB2\x8D", # COPTIC CAPITAL LETTER ZATA
1189 "\xE2\xB2\x8E" => "\xE2\xB2\x8F", # COPTIC CAPITAL LETTER HATE
1190 "\xE2\xB2\x90" => "\xE2\xB2\x91", # COPTIC CAPITAL LETTER THETHE
1191 "\xE2\xB2\x92" => "\xE2\xB2\x93", # COPTIC CAPITAL LETTER IAUDA
1192 "\xE2\xB2\x94" => "\xE2\xB2\x95", # COPTIC CAPITAL LETTER KAPA
1193 "\xE2\xB2\x96" => "\xE2\xB2\x97", # COPTIC CAPITAL LETTER LAULA
1194 "\xE2\xB2\x98" => "\xE2\xB2\x99", # COPTIC CAPITAL LETTER MI
1195 "\xE2\xB2\x9A" => "\xE2\xB2\x9B", # COPTIC CAPITAL LETTER NI
1196 "\xE2\xB2\x9C" => "\xE2\xB2\x9D", # COPTIC CAPITAL LETTER KSI
1197 "\xE2\xB2\x9E" => "\xE2\xB2\x9F", # COPTIC CAPITAL LETTER O
1198 "\xE2\xB2\xA0" => "\xE2\xB2\xA1", # COPTIC CAPITAL LETTER PI
1199 "\xE2\xB2\xA2" => "\xE2\xB2\xA3", # COPTIC CAPITAL LETTER RO
1200 "\xE2\xB2\xA4" => "\xE2\xB2\xA5", # COPTIC CAPITAL LETTER SIMA
1201 "\xE2\xB2\xA6" => "\xE2\xB2\xA7", # COPTIC CAPITAL LETTER TAU
1202 "\xE2\xB2\xA8" => "\xE2\xB2\xA9", # COPTIC CAPITAL LETTER UA
1203 "\xE2\xB2\xAA" => "\xE2\xB2\xAB", # COPTIC CAPITAL LETTER FI
1204 "\xE2\xB2\xAC" => "\xE2\xB2\xAD", # COPTIC CAPITAL LETTER KHI
1205 "\xE2\xB2\xAE" => "\xE2\xB2\xAF", # COPTIC CAPITAL LETTER PSI
1206 "\xE2\xB2\xB0" => "\xE2\xB2\xB1", # COPTIC CAPITAL LETTER OOU
1207 "\xE2\xB2\xB2" => "\xE2\xB2\xB3", # COPTIC CAPITAL LETTER DIALECT-P ALEF
1208 "\xE2\xB2\xB4" => "\xE2\xB2\xB5", # COPTIC CAPITAL LETTER OLD COPTIC AIN
1209 "\xE2\xB2\xB6" => "\xE2\xB2\xB7", # COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE
1210 "\xE2\xB2\xB8" => "\xE2\xB2\xB9", # COPTIC CAPITAL LETTER DIALECT-P KAPA
1211 "\xE2\xB2\xBA" => "\xE2\xB2\xBB", # COPTIC CAPITAL LETTER DIALECT-P NI
1212 "\xE2\xB2\xBC" => "\xE2\xB2\xBD", # COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI
1213 "\xE2\xB2\xBE" => "\xE2\xB2\xBF", # COPTIC CAPITAL LETTER OLD COPTIC OOU
1214 "\xE2\xB3\x80" => "\xE2\xB3\x81", # COPTIC CAPITAL LETTER SAMPI
1215 "\xE2\xB3\x82" => "\xE2\xB3\x83", # COPTIC CAPITAL LETTER CROSSED SHEI
1216 "\xE2\xB3\x84" => "\xE2\xB3\x85", # COPTIC CAPITAL LETTER OLD COPTIC SHEI
1217 "\xE2\xB3\x86" => "\xE2\xB3\x87", # COPTIC CAPITAL LETTER OLD COPTIC ESH
1218 "\xE2\xB3\x88" => "\xE2\xB3\x89", # COPTIC CAPITAL LETTER AKHMIMIC KHEI
1219 "\xE2\xB3\x8A" => "\xE2\xB3\x8B", # COPTIC CAPITAL LETTER DIALECT-P HORI
1220 "\xE2\xB3\x8C" => "\xE2\xB3\x8D", # COPTIC CAPITAL LETTER OLD COPTIC HORI
1221 "\xE2\xB3\x8E" => "\xE2\xB3\x8F", # COPTIC CAPITAL LETTER OLD COPTIC HA
1222 "\xE2\xB3\x90" => "\xE2\xB3\x91", # COPTIC CAPITAL LETTER L-SHAPED HA
1223 "\xE2\xB3\x92" => "\xE2\xB3\x93", # COPTIC CAPITAL LETTER OLD COPTIC HEI
1224 "\xE2\xB3\x94" => "\xE2\xB3\x95", # COPTIC CAPITAL LETTER OLD COPTIC HAT
1225 "\xE2\xB3\x96" => "\xE2\xB3\x97", # COPTIC CAPITAL LETTER OLD COPTIC GANGIA
1226 "\xE2\xB3\x98" => "\xE2\xB3\x99", # COPTIC CAPITAL LETTER OLD COPTIC DJA
1227 "\xE2\xB3\x9A" => "\xE2\xB3\x9B", # COPTIC CAPITAL LETTER OLD COPTIC SHIMA
1228 "\xE2\xB3\x9C" => "\xE2\xB3\x9D", # COPTIC CAPITAL LETTER OLD NUBIAN SHIMA
1229 "\xE2\xB3\x9E" => "\xE2\xB3\x9F", # COPTIC CAPITAL LETTER OLD NUBIAN NGI
1230 "\xE2\xB3\xA0" => "\xE2\xB3\xA1", # COPTIC CAPITAL LETTER OLD NUBIAN NYI
1231 "\xE2\xB3\xA2" => "\xE2\xB3\xA3", # COPTIC CAPITAL LETTER OLD NUBIAN WAU
1232 "\xE2\xB3\xAB" => "\xE2\xB3\xAC", # COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI
1233 "\xE2\xB3\xAD" => "\xE2\xB3\xAE", # COPTIC CAPITAL LETTER CRYPTOGRAMMIC GANGIA
1234 "\xE2\xB3\xB2" => "\xE2\xB3\xB3", # COPTIC CAPITAL LETTER BOHAIRIC KHEI
1235 "\xEA\x99\x80" => "\xEA\x99\x81", # CYRILLIC CAPITAL LETTER ZEMLYA
1236 "\xEA\x99\x82" => "\xEA\x99\x83", # CYRILLIC CAPITAL LETTER DZELO
1237 "\xEA\x99\x84" => "\xEA\x99\x85", # CYRILLIC CAPITAL LETTER REVERSED DZE
1238 "\xEA\x99\x86" => "\xEA\x99\x87", # CYRILLIC CAPITAL LETTER IOTA
1239 "\xEA\x99\x88" => "\xEA\x99\x89", # CYRILLIC CAPITAL LETTER DJERV
1240 "\xEA\x99\x8A" => "\xEA\x99\x8B", # CYRILLIC CAPITAL LETTER MONOGRAPH UK
1241 "\xEA\x99\x8C" => "\xEA\x99\x8D", # CYRILLIC CAPITAL LETTER BROAD OMEGA
1242 "\xEA\x99\x8E" => "\xEA\x99\x8F", # CYRILLIC CAPITAL LETTER NEUTRAL YER
1243 "\xEA\x99\x90" => "\xEA\x99\x91", # CYRILLIC CAPITAL LETTER YERU WITH BACK YER
1244 "\xEA\x99\x92" => "\xEA\x99\x93", # CYRILLIC CAPITAL LETTER IOTIFIED YAT
1245 "\xEA\x99\x94" => "\xEA\x99\x95", # CYRILLIC CAPITAL LETTER REVERSED YU
1246 "\xEA\x99\x96" => "\xEA\x99\x97", # CYRILLIC CAPITAL LETTER IOTIFIED A
1247 "\xEA\x99\x98" => "\xEA\x99\x99", # CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS
1248 "\xEA\x99\x9A" => "\xEA\x99\x9B", # CYRILLIC CAPITAL LETTER BLENDED YUS
1249 "\xEA\x99\x9C" => "\xEA\x99\x9D", # CYRILLIC CAPITAL LETTER IOTIFIED CLOSED LITTLE YUS
1250 "\xEA\x99\x9E" => "\xEA\x99\x9F", # CYRILLIC CAPITAL LETTER YN
1251 "\xEA\x99\xA0" => "\xEA\x99\xA1", # CYRILLIC CAPITAL LETTER REVERSED TSE
1252 "\xEA\x99\xA2" => "\xEA\x99\xA3", # CYRILLIC CAPITAL LETTER SOFT DE
1253 "\xEA\x99\xA4" => "\xEA\x99\xA5", # CYRILLIC CAPITAL LETTER SOFT EL
1254 "\xEA\x99\xA6" => "\xEA\x99\xA7", # CYRILLIC CAPITAL LETTER SOFT EM
1255 "\xEA\x99\xA8" => "\xEA\x99\xA9", # CYRILLIC CAPITAL LETTER MONOCULAR O
1256 "\xEA\x99\xAA" => "\xEA\x99\xAB", # CYRILLIC CAPITAL LETTER BINOCULAR O
1257 "\xEA\x99\xAC" => "\xEA\x99\xAD", # CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O
1258 "\xEA\x9A\x80" => "\xEA\x9A\x81", # CYRILLIC CAPITAL LETTER DWE
1259 "\xEA\x9A\x82" => "\xEA\x9A\x83", # CYRILLIC CAPITAL LETTER DZWE
1260 "\xEA\x9A\x84" => "\xEA\x9A\x85", # CYRILLIC CAPITAL LETTER ZHWE
1261 "\xEA\x9A\x86" => "\xEA\x9A\x87", # CYRILLIC CAPITAL LETTER CCHE
1262 "\xEA\x9A\x88" => "\xEA\x9A\x89", # CYRILLIC CAPITAL LETTER DZZE
1263 "\xEA\x9A\x8A" => "\xEA\x9A\x8B", # CYRILLIC CAPITAL LETTER TE WITH MIDDLE HOOK
1264 "\xEA\x9A\x8C" => "\xEA\x9A\x8D", # CYRILLIC CAPITAL LETTER TWE
1265 "\xEA\x9A\x8E" => "\xEA\x9A\x8F", # CYRILLIC CAPITAL LETTER TSWE
1266 "\xEA\x9A\x90" => "\xEA\x9A\x91", # CYRILLIC CAPITAL LETTER TSSE
1267 "\xEA\x9A\x92" => "\xEA\x9A\x93", # CYRILLIC CAPITAL LETTER TCHE
1268 "\xEA\x9A\x94" => "\xEA\x9A\x95", # CYRILLIC CAPITAL LETTER HWE
1269 "\xEA\x9A\x96" => "\xEA\x9A\x97", # CYRILLIC CAPITAL LETTER SHWE
1270 "\xEA\x9A\x98" => "\xEA\x9A\x99", # CYRILLIC CAPITAL LETTER DOUBLE O
1271 "\xEA\x9A\x9A" => "\xEA\x9A\x9B", # CYRILLIC CAPITAL LETTER CROSSED O
1272 "\xEA\x9C\xA2" => "\xEA\x9C\xA3", # LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF
1273 "\xEA\x9C\xA4" => "\xEA\x9C\xA5", # LATIN CAPITAL LETTER EGYPTOLOGICAL AIN
1274 "\xEA\x9C\xA6" => "\xEA\x9C\xA7", # LATIN CAPITAL LETTER HENG
1275 "\xEA\x9C\xA8" => "\xEA\x9C\xA9", # LATIN CAPITAL LETTER TZ
1276 "\xEA\x9C\xAA" => "\xEA\x9C\xAB", # LATIN CAPITAL LETTER TRESILLO
1277 "\xEA\x9C\xAC" => "\xEA\x9C\xAD", # LATIN CAPITAL LETTER CUATRILLO
1278 "\xEA\x9C\xAE" => "\xEA\x9C\xAF", # LATIN CAPITAL LETTER CUATRILLO WITH COMMA
1279 "\xEA\x9C\xB2" => "\xEA\x9C\xB3", # LATIN CAPITAL LETTER AA
1280 "\xEA\x9C\xB4" => "\xEA\x9C\xB5", # LATIN CAPITAL LETTER AO
1281 "\xEA\x9C\xB6" => "\xEA\x9C\xB7", # LATIN CAPITAL LETTER AU
1282 "\xEA\x9C\xB8" => "\xEA\x9C\xB9", # LATIN CAPITAL LETTER AV
1283 "\xEA\x9C\xBA" => "\xEA\x9C\xBB", # LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR
1284 "\xEA\x9C\xBC" => "\xEA\x9C\xBD", # LATIN CAPITAL LETTER AY
1285 "\xEA\x9C\xBE" => "\xEA\x9C\xBF", # LATIN CAPITAL LETTER REVERSED C WITH DOT
1286 "\xEA\x9D\x80" => "\xEA\x9D\x81", # LATIN CAPITAL LETTER K WITH STROKE
1287 "\xEA\x9D\x82" => "\xEA\x9D\x83", # LATIN CAPITAL LETTER K WITH DIAGONAL STROKE
1288 "\xEA\x9D\x84" => "\xEA\x9D\x85", # LATIN CAPITAL LETTER K WITH STROKE AND DIAGONAL STROKE
1289 "\xEA\x9D\x86" => "\xEA\x9D\x87", # LATIN CAPITAL LETTER BROKEN L
1290 "\xEA\x9D\x88" => "\xEA\x9D\x89", # LATIN CAPITAL LETTER L WITH HIGH STROKE
1291 "\xEA\x9D\x8A" => "\xEA\x9D\x8B", # LATIN CAPITAL LETTER O WITH LONG STROKE OVERLAY
1292 "\xEA\x9D\x8C" => "\xEA\x9D\x8D", # LATIN CAPITAL LETTER O WITH LOOP
1293 "\xEA\x9D\x8E" => "\xEA\x9D\x8F", # LATIN CAPITAL LETTER OO
1294 "\xEA\x9D\x90" => "\xEA\x9D\x91", # LATIN CAPITAL LETTER P WITH STROKE THROUGH DESCENDER
1295 "\xEA\x9D\x92" => "\xEA\x9D\x93", # LATIN CAPITAL LETTER P WITH FLOURISH
1296 "\xEA\x9D\x94" => "\xEA\x9D\x95", # LATIN CAPITAL LETTER P WITH SQUIRREL TAIL
1297 "\xEA\x9D\x96" => "\xEA\x9D\x97", # LATIN CAPITAL LETTER Q WITH STROKE THROUGH DESCENDER
1298 "\xEA\x9D\x98" => "\xEA\x9D\x99", # LATIN CAPITAL LETTER Q WITH DIAGONAL STROKE
1299 "\xEA\x9D\x9A" => "\xEA\x9D\x9B", # LATIN CAPITAL LETTER R ROTUNDA
1300 "\xEA\x9D\x9C" => "\xEA\x9D\x9D", # LATIN CAPITAL LETTER RUM ROTUNDA
1301 "\xEA\x9D\x9E" => "\xEA\x9D\x9F", # LATIN CAPITAL LETTER V WITH DIAGONAL STROKE
1302 "\xEA\x9D\xA0" => "\xEA\x9D\xA1", # LATIN CAPITAL LETTER VY
1303 "\xEA\x9D\xA2" => "\xEA\x9D\xA3", # LATIN CAPITAL LETTER VISIGOTHIC Z
1304 "\xEA\x9D\xA4" => "\xEA\x9D\xA5", # LATIN CAPITAL LETTER THORN WITH STROKE
1305 "\xEA\x9D\xA6" => "\xEA\x9D\xA7", # LATIN CAPITAL LETTER THORN WITH STROKE THROUGH DESCENDER
1306 "\xEA\x9D\xA8" => "\xEA\x9D\xA9", # LATIN CAPITAL LETTER VEND
1307 "\xEA\x9D\xAA" => "\xEA\x9D\xAB", # LATIN CAPITAL LETTER ET
1308 "\xEA\x9D\xAC" => "\xEA\x9D\xAD", # LATIN CAPITAL LETTER IS
1309 "\xEA\x9D\xAE" => "\xEA\x9D\xAF", # LATIN CAPITAL LETTER CON
1310 "\xEA\x9D\xB9" => "\xEA\x9D\xBA", # LATIN CAPITAL LETTER INSULAR D
1311 "\xEA\x9D\xBB" => "\xEA\x9D\xBC", # LATIN CAPITAL LETTER INSULAR F
1312 "\xEA\x9D\xBD" => "\xE1\xB5\xB9", # LATIN CAPITAL LETTER INSULAR G
1313 "\xEA\x9D\xBE" => "\xEA\x9D\xBF", # LATIN CAPITAL LETTER TURNED INSULAR G
1314 "\xEA\x9E\x80" => "\xEA\x9E\x81", # LATIN CAPITAL LETTER TURNED L
1315 "\xEA\x9E\x82" => "\xEA\x9E\x83", # LATIN CAPITAL LETTER INSULAR R
1316 "\xEA\x9E\x84" => "\xEA\x9E\x85", # LATIN CAPITAL LETTER INSULAR S
1317 "\xEA\x9E\x86" => "\xEA\x9E\x87", # LATIN CAPITAL LETTER INSULAR T
1318 "\xEA\x9E\x8B" => "\xEA\x9E\x8C", # LATIN CAPITAL LETTER SALTILLO
1319 "\xEA\x9E\x8D" => "\xC9\xA5", # LATIN CAPITAL LETTER TURNED H
1320 "\xEA\x9E\x90" => "\xEA\x9E\x91", # LATIN CAPITAL LETTER N WITH DESCENDER
1321 "\xEA\x9E\x92" => "\xEA\x9E\x93", # LATIN CAPITAL LETTER C WITH BAR
1322 "\xEA\x9E\x96" => "\xEA\x9E\x97", # LATIN CAPITAL LETTER B WITH FLOURISH
1323 "\xEA\x9E\x98" => "\xEA\x9E\x99", # LATIN CAPITAL LETTER F WITH STROKE
1324 "\xEA\x9E\x9A" => "\xEA\x9E\x9B", # LATIN CAPITAL LETTER VOLAPUK AE
1325 "\xEA\x9E\x9C" => "\xEA\x9E\x9D", # LATIN CAPITAL LETTER VOLAPUK OE
1326 "\xEA\x9E\x9E" => "\xEA\x9E\x9F", # LATIN CAPITAL LETTER VOLAPUK UE
1327 "\xEA\x9E\xA0" => "\xEA\x9E\xA1", # LATIN CAPITAL LETTER G WITH OBLIQUE STROKE
1328 "\xEA\x9E\xA2" => "\xEA\x9E\xA3", # LATIN CAPITAL LETTER K WITH OBLIQUE STROKE
1329 "\xEA\x9E\xA4" => "\xEA\x9E\xA5", # LATIN CAPITAL LETTER N WITH OBLIQUE STROKE
1330 "\xEA\x9E\xA6" => "\xEA\x9E\xA7", # LATIN CAPITAL LETTER R WITH OBLIQUE STROKE
1331 "\xEA\x9E\xA8" => "\xEA\x9E\xA9", # LATIN CAPITAL LETTER S WITH OBLIQUE STROKE
1332 "\xEA\x9E\xAA" => "\xC9\xA6", # LATIN CAPITAL LETTER H WITH HOOK
1333 "\xEA\x9E\xAB" => "\xC9\x9C", # LATIN CAPITAL LETTER REVERSED OPEN E
1334 "\xEA\x9E\xAC" => "\xC9\xA1", # LATIN CAPITAL LETTER SCRIPT G
1335 "\xEA\x9E\xAD" => "\xC9\xAC", # LATIN CAPITAL LETTER L WITH BELT
1336 "\xEA\x9E\xAE" => "\xC9\xAA", # LATIN CAPITAL LETTER SMALL CAPITAL I
1337 "\xEA\x9E\xB0" => "\xCA\x9E", # LATIN CAPITAL LETTER TURNED K
1338 "\xEA\x9E\xB1" => "\xCA\x87", # LATIN CAPITAL LETTER TURNED T
1339 "\xEA\x9E\xB2" => "\xCA\x9D", # LATIN CAPITAL LETTER J WITH CROSSED-TAIL
1340 "\xEA\x9E\xB3" => "\xEA\xAD\x93", # LATIN CAPITAL LETTER CHI
1341 "\xEA\x9E\xB4" => "\xEA\x9E\xB5", # LATIN CAPITAL LETTER BETA
1342 "\xEA\x9E\xB6" => "\xEA\x9E\xB7", # LATIN CAPITAL LETTER OMEGA
1343 "\xEA\x9E\xB8" => "\xEA\x9E\xB9", # LATIN CAPITAL LETTER U WITH STROKE
1344 "\xEA\x9E\xBA" => "\xEA\x9E\xBB", # LATIN CAPITAL LETTER GLOTTAL A
1345 "\xEA\x9E\xBC" => "\xEA\x9E\xBD", # LATIN CAPITAL LETTER GLOTTAL I
1346 "\xEA\x9E\xBE" => "\xEA\x9E\xBF", # LATIN CAPITAL LETTER GLOTTAL U
1347 "\xEA\x9F\x82" => "\xEA\x9F\x83", # LATIN CAPITAL LETTER ANGLICANA W
1348 "\xEA\x9F\x84" => "\xEA\x9E\x94", # LATIN CAPITAL LETTER C WITH PALATAL HOOK
1349 "\xEA\x9F\x85" => "\xCA\x82", # LATIN CAPITAL LETTER S WITH HOOK
1350 "\xEA\x9F\x86" => "\xE1\xB6\x8E", # LATIN CAPITAL LETTER Z WITH PALATAL HOOK
1351 "\xEA\xAD\xB0" => "\xE1\x8E\xA0", # CHEROKEE SMALL LETTER A
1352 "\xEA\xAD\xB1" => "\xE1\x8E\xA1", # CHEROKEE SMALL LETTER E
1353 "\xEA\xAD\xB2" => "\xE1\x8E\xA2", # CHEROKEE SMALL LETTER I
1354 "\xEA\xAD\xB3" => "\xE1\x8E\xA3", # CHEROKEE SMALL LETTER O
1355 "\xEA\xAD\xB4" => "\xE1\x8E\xA4", # CHEROKEE SMALL LETTER U
1356 "\xEA\xAD\xB5" => "\xE1\x8E\xA5", # CHEROKEE SMALL LETTER V
1357 "\xEA\xAD\xB6" => "\xE1\x8E\xA6", # CHEROKEE SMALL LETTER GA
1358 "\xEA\xAD\xB7" => "\xE1\x8E\xA7", # CHEROKEE SMALL LETTER KA
1359 "\xEA\xAD\xB8" => "\xE1\x8E\xA8", # CHEROKEE SMALL LETTER GE
1360 "\xEA\xAD\xB9" => "\xE1\x8E\xA9", # CHEROKEE SMALL LETTER GI
1361 "\xEA\xAD\xBA" => "\xE1\x8E\xAA", # CHEROKEE SMALL LETTER GO
1362 "\xEA\xAD\xBB" => "\xE1\x8E\xAB", # CHEROKEE SMALL LETTER GU
1363 "\xEA\xAD\xBC" => "\xE1\x8E\xAC", # CHEROKEE SMALL LETTER GV
1364 "\xEA\xAD\xBD" => "\xE1\x8E\xAD", # CHEROKEE SMALL LETTER HA
1365 "\xEA\xAD\xBE" => "\xE1\x8E\xAE", # CHEROKEE SMALL LETTER HE
1366 "\xEA\xAD\xBF" => "\xE1\x8E\xAF", # CHEROKEE SMALL LETTER HI
1367 "\xEA\xAE\x80" => "\xE1\x8E\xB0", # CHEROKEE SMALL LETTER HO
1368 "\xEA\xAE\x81" => "\xE1\x8E\xB1", # CHEROKEE SMALL LETTER HU
1369 "\xEA\xAE\x82" => "\xE1\x8E\xB2", # CHEROKEE SMALL LETTER HV
1370 "\xEA\xAE\x83" => "\xE1\x8E\xB3", # CHEROKEE SMALL LETTER LA
1371 "\xEA\xAE\x84" => "\xE1\x8E\xB4", # CHEROKEE SMALL LETTER LE
1372 "\xEA\xAE\x85" => "\xE1\x8E\xB5", # CHEROKEE SMALL LETTER LI
1373 "\xEA\xAE\x86" => "\xE1\x8E\xB6", # CHEROKEE SMALL LETTER LO
1374 "\xEA\xAE\x87" => "\xE1\x8E\xB7", # CHEROKEE SMALL LETTER LU
1375 "\xEA\xAE\x88" => "\xE1\x8E\xB8", # CHEROKEE SMALL LETTER LV
1376 "\xEA\xAE\x89" => "\xE1\x8E\xB9", # CHEROKEE SMALL LETTER MA
1377 "\xEA\xAE\x8A" => "\xE1\x8E\xBA", # CHEROKEE SMALL LETTER ME
1378 "\xEA\xAE\x8B" => "\xE1\x8E\xBB", # CHEROKEE SMALL LETTER MI
1379 "\xEA\xAE\x8C" => "\xE1\x8E\xBC", # CHEROKEE SMALL LETTER MO
1380 "\xEA\xAE\x8D" => "\xE1\x8E\xBD", # CHEROKEE SMALL LETTER MU
1381 "\xEA\xAE\x8E" => "\xE1\x8E\xBE", # CHEROKEE SMALL LETTER NA
1382 "\xEA\xAE\x8F" => "\xE1\x8E\xBF", # CHEROKEE SMALL LETTER HNA
1383 "\xEA\xAE\x90" => "\xE1\x8F\x80", # CHEROKEE SMALL LETTER NAH
1384 "\xEA\xAE\x91" => "\xE1\x8F\x81", # CHEROKEE SMALL LETTER NE
1385 "\xEA\xAE\x92" => "\xE1\x8F\x82", # CHEROKEE SMALL LETTER NI
1386 "\xEA\xAE\x93" => "\xE1\x8F\x83", # CHEROKEE SMALL LETTER NO
1387 "\xEA\xAE\x94" => "\xE1\x8F\x84", # CHEROKEE SMALL LETTER NU
1388 "\xEA\xAE\x95" => "\xE1\x8F\x85", # CHEROKEE SMALL LETTER NV
1389 "\xEA\xAE\x96" => "\xE1\x8F\x86", # CHEROKEE SMALL LETTER QUA
1390 "\xEA\xAE\x97" => "\xE1\x8F\x87", # CHEROKEE SMALL LETTER QUE
1391 "\xEA\xAE\x98" => "\xE1\x8F\x88", # CHEROKEE SMALL LETTER QUI
1392 "\xEA\xAE\x99" => "\xE1\x8F\x89", # CHEROKEE SMALL LETTER QUO
1393 "\xEA\xAE\x9A" => "\xE1\x8F\x8A", # CHEROKEE SMALL LETTER QUU
1394 "\xEA\xAE\x9B" => "\xE1\x8F\x8B", # CHEROKEE SMALL LETTER QUV
1395 "\xEA\xAE\x9C" => "\xE1\x8F\x8C", # CHEROKEE SMALL LETTER SA
1396 "\xEA\xAE\x9D" => "\xE1\x8F\x8D", # CHEROKEE SMALL LETTER S
1397 "\xEA\xAE\x9E" => "\xE1\x8F\x8E", # CHEROKEE SMALL LETTER SE
1398 "\xEA\xAE\x9F" => "\xE1\x8F\x8F", # CHEROKEE SMALL LETTER SI
1399 "\xEA\xAE\xA0" => "\xE1\x8F\x90", # CHEROKEE SMALL LETTER SO
1400 "\xEA\xAE\xA1" => "\xE1\x8F\x91", # CHEROKEE SMALL LETTER SU
1401 "\xEA\xAE\xA2" => "\xE1\x8F\x92", # CHEROKEE SMALL LETTER SV
1402 "\xEA\xAE\xA3" => "\xE1\x8F\x93", # CHEROKEE SMALL LETTER DA
1403 "\xEA\xAE\xA4" => "\xE1\x8F\x94", # CHEROKEE SMALL LETTER TA
1404 "\xEA\xAE\xA5" => "\xE1\x8F\x95", # CHEROKEE SMALL LETTER DE
1405 "\xEA\xAE\xA6" => "\xE1\x8F\x96", # CHEROKEE SMALL LETTER TE
1406 "\xEA\xAE\xA7" => "\xE1\x8F\x97", # CHEROKEE SMALL LETTER DI
1407 "\xEA\xAE\xA8" => "\xE1\x8F\x98", # CHEROKEE SMALL LETTER TI
1408 "\xEA\xAE\xA9" => "\xE1\x8F\x99", # CHEROKEE SMALL LETTER DO
1409 "\xEA\xAE\xAA" => "\xE1\x8F\x9A", # CHEROKEE SMALL LETTER DU
1410 "\xEA\xAE\xAB" => "\xE1\x8F\x9B", # CHEROKEE SMALL LETTER DV
1411 "\xEA\xAE\xAC" => "\xE1\x8F\x9C", # CHEROKEE SMALL LETTER DLA
1412 "\xEA\xAE\xAD" => "\xE1\x8F\x9D", # CHEROKEE SMALL LETTER TLA
1413 "\xEA\xAE\xAE" => "\xE1\x8F\x9E", # CHEROKEE SMALL LETTER TLE
1414 "\xEA\xAE\xAF" => "\xE1\x8F\x9F", # CHEROKEE SMALL LETTER TLI
1415 "\xEA\xAE\xB0" => "\xE1\x8F\xA0", # CHEROKEE SMALL LETTER TLO
1416 "\xEA\xAE\xB1" => "\xE1\x8F\xA1", # CHEROKEE SMALL LETTER TLU
1417 "\xEA\xAE\xB2" => "\xE1\x8F\xA2", # CHEROKEE SMALL LETTER TLV
1418 "\xEA\xAE\xB3" => "\xE1\x8F\xA3", # CHEROKEE SMALL LETTER TSA
1419 "\xEA\xAE\xB4" => "\xE1\x8F\xA4", # CHEROKEE SMALL LETTER TSE
1420 "\xEA\xAE\xB5" => "\xE1\x8F\xA5", # CHEROKEE SMALL LETTER TSI
1421 "\xEA\xAE\xB6" => "\xE1\x8F\xA6", # CHEROKEE SMALL LETTER TSO
1422 "\xEA\xAE\xB7" => "\xE1\x8F\xA7", # CHEROKEE SMALL LETTER TSU
1423 "\xEA\xAE\xB8" => "\xE1\x8F\xA8", # CHEROKEE SMALL LETTER TSV
1424 "\xEA\xAE\xB9" => "\xE1\x8F\xA9", # CHEROKEE SMALL LETTER WA
1425 "\xEA\xAE\xBA" => "\xE1\x8F\xAA", # CHEROKEE SMALL LETTER WE
1426 "\xEA\xAE\xBB" => "\xE1\x8F\xAB", # CHEROKEE SMALL LETTER WI
1427 "\xEA\xAE\xBC" => "\xE1\x8F\xAC", # CHEROKEE SMALL LETTER WO
1428 "\xEA\xAE\xBD" => "\xE1\x8F\xAD", # CHEROKEE SMALL LETTER WU
1429 "\xEA\xAE\xBE" => "\xE1\x8F\xAE", # CHEROKEE SMALL LETTER WV
1430 "\xEA\xAE\xBF" => "\xE1\x8F\xAF", # CHEROKEE SMALL LETTER YA
1431 "\xEF\xAC\x80" => "\x66\x66", # LATIN SMALL LIGATURE FF
1432 "\xEF\xAC\x81" => "\x66\x69", # LATIN SMALL LIGATURE FI
1433 "\xEF\xAC\x82" => "\x66\x6C", # LATIN SMALL LIGATURE FL
1434 "\xEF\xAC\x83" => "\x66\x66\x69", # LATIN SMALL LIGATURE FFI
1435 "\xEF\xAC\x84" => "\x66\x66\x6C", # LATIN SMALL LIGATURE FFL
1436 "\xEF\xAC\x85" => "\x73\x74", # LATIN SMALL LIGATURE LONG S T
1437 "\xEF\xAC\x86" => "\x73\x74", # LATIN SMALL LIGATURE ST
1438 "\xEF\xAC\x93" => "\xD5\xB4\xD5\xB6", # ARMENIAN SMALL LIGATURE MEN NOW
1439 "\xEF\xAC\x94" => "\xD5\xB4\xD5\xA5", # ARMENIAN SMALL LIGATURE MEN ECH
1440 "\xEF\xAC\x95" => "\xD5\xB4\xD5\xAB", # ARMENIAN SMALL LIGATURE MEN INI
1441 "\xEF\xAC\x96" => "\xD5\xBE\xD5\xB6", # ARMENIAN SMALL LIGATURE VEW NOW
1442 "\xEF\xAC\x97" => "\xD5\xB4\xD5\xAD", # ARMENIAN SMALL LIGATURE MEN XEH
1443 "\xEF\xBC\xA1" => "\xEF\xBD\x81", # FULLWIDTH LATIN CAPITAL LETTER A
1444 "\xEF\xBC\xA2" => "\xEF\xBD\x82", # FULLWIDTH LATIN CAPITAL LETTER B
1445 "\xEF\xBC\xA3" => "\xEF\xBD\x83", # FULLWIDTH LATIN CAPITAL LETTER C
1446 "\xEF\xBC\xA4" => "\xEF\xBD\x84", # FULLWIDTH LATIN CAPITAL LETTER D
1447 "\xEF\xBC\xA5" => "\xEF\xBD\x85", # FULLWIDTH LATIN CAPITAL LETTER E
1448 "\xEF\xBC\xA6" => "\xEF\xBD\x86", # FULLWIDTH LATIN CAPITAL LETTER F
1449 "\xEF\xBC\xA7" => "\xEF\xBD\x87", # FULLWIDTH LATIN CAPITAL LETTER G
1450 "\xEF\xBC\xA8" => "\xEF\xBD\x88", # FULLWIDTH LATIN CAPITAL LETTER H
1451 "\xEF\xBC\xA9" => "\xEF\xBD\x89", # FULLWIDTH LATIN CAPITAL LETTER I
1452 "\xEF\xBC\xAA" => "\xEF\xBD\x8A", # FULLWIDTH LATIN CAPITAL LETTER J
1453 "\xEF\xBC\xAB" => "\xEF\xBD\x8B", # FULLWIDTH LATIN CAPITAL LETTER K
1454 "\xEF\xBC\xAC" => "\xEF\xBD\x8C", # FULLWIDTH LATIN CAPITAL LETTER L
1455 "\xEF\xBC\xAD" => "\xEF\xBD\x8D", # FULLWIDTH LATIN CAPITAL LETTER M
1456 "\xEF\xBC\xAE" => "\xEF\xBD\x8E", # FULLWIDTH LATIN CAPITAL LETTER N
1457 "\xEF\xBC\xAF" => "\xEF\xBD\x8F", # FULLWIDTH LATIN CAPITAL LETTER O
1458 "\xEF\xBC\xB0" => "\xEF\xBD\x90", # FULLWIDTH LATIN CAPITAL LETTER P
1459 "\xEF\xBC\xB1" => "\xEF\xBD\x91", # FULLWIDTH LATIN CAPITAL LETTER Q
1460 "\xEF\xBC\xB2" => "\xEF\xBD\x92", # FULLWIDTH LATIN CAPITAL LETTER R
1461 "\xEF\xBC\xB3" => "\xEF\xBD\x93", # FULLWIDTH LATIN CAPITAL LETTER S
1462 "\xEF\xBC\xB4" => "\xEF\xBD\x94", # FULLWIDTH LATIN CAPITAL LETTER T
1463 "\xEF\xBC\xB5" => "\xEF\xBD\x95", # FULLWIDTH LATIN CAPITAL LETTER U
1464 "\xEF\xBC\xB6" => "\xEF\xBD\x96", # FULLWIDTH LATIN CAPITAL LETTER V
1465 "\xEF\xBC\xB7" => "\xEF\xBD\x97", # FULLWIDTH LATIN CAPITAL LETTER W
1466 "\xEF\xBC\xB8" => "\xEF\xBD\x98", # FULLWIDTH LATIN CAPITAL LETTER X
1467 "\xEF\xBC\xB9" => "\xEF\xBD\x99", # FULLWIDTH LATIN CAPITAL LETTER Y
1468 "\xEF\xBC\xBA" => "\xEF\xBD\x9A", # FULLWIDTH LATIN CAPITAL LETTER Z
1469 "\xF0\x90\x90\x80" => "\xF0\x90\x90\xA8", # DESERET CAPITAL LETTER LONG I
1470 "\xF0\x90\x90\x81" => "\xF0\x90\x90\xA9", # DESERET CAPITAL LETTER LONG E
1471 "\xF0\x90\x90\x82" => "\xF0\x90\x90\xAA", # DESERET CAPITAL LETTER LONG A
1472 "\xF0\x90\x90\x83" => "\xF0\x90\x90\xAB", # DESERET CAPITAL LETTER LONG AH
1473 "\xF0\x90\x90\x84" => "\xF0\x90\x90\xAC", # DESERET CAPITAL LETTER LONG O
1474 "\xF0\x90\x90\x85" => "\xF0\x90\x90\xAD", # DESERET CAPITAL LETTER LONG OO
1475 "\xF0\x90\x90\x86" => "\xF0\x90\x90\xAE", # DESERET CAPITAL LETTER SHORT I
1476 "\xF0\x90\x90\x87" => "\xF0\x90\x90\xAF", # DESERET CAPITAL LETTER SHORT E
1477 "\xF0\x90\x90\x88" => "\xF0\x90\x90\xB0", # DESERET CAPITAL LETTER SHORT A
1478 "\xF0\x90\x90\x89" => "\xF0\x90\x90\xB1", # DESERET CAPITAL LETTER SHORT AH
1479 "\xF0\x90\x90\x8A" => "\xF0\x90\x90\xB2", # DESERET CAPITAL LETTER SHORT O
1480 "\xF0\x90\x90\x8B" => "\xF0\x90\x90\xB3", # DESERET CAPITAL LETTER SHORT OO
1481 "\xF0\x90\x90\x8C" => "\xF0\x90\x90\xB4", # DESERET CAPITAL LETTER AY
1482 "\xF0\x90\x90\x8D" => "\xF0\x90\x90\xB5", # DESERET CAPITAL LETTER OW
1483 "\xF0\x90\x90\x8E" => "\xF0\x90\x90\xB6", # DESERET CAPITAL LETTER WU
1484 "\xF0\x90\x90\x8F" => "\xF0\x90\x90\xB7", # DESERET CAPITAL LETTER YEE
1485 "\xF0\x90\x90\x90" => "\xF0\x90\x90\xB8", # DESERET CAPITAL LETTER H
1486 "\xF0\x90\x90\x91" => "\xF0\x90\x90\xB9", # DESERET CAPITAL LETTER PEE
1487 "\xF0\x90\x90\x92" => "\xF0\x90\x90\xBA", # DESERET CAPITAL LETTER BEE
1488 "\xF0\x90\x90\x93" => "\xF0\x90\x90\xBB", # DESERET CAPITAL LETTER TEE
1489 "\xF0\x90\x90\x94" => "\xF0\x90\x90\xBC", # DESERET CAPITAL LETTER DEE
1490 "\xF0\x90\x90\x95" => "\xF0\x90\x90\xBD", # DESERET CAPITAL LETTER CHEE
1491 "\xF0\x90\x90\x96" => "\xF0\x90\x90\xBE", # DESERET CAPITAL LETTER JEE
1492 "\xF0\x90\x90\x97" => "\xF0\x90\x90\xBF", # DESERET CAPITAL LETTER KAY
1493 "\xF0\x90\x90\x98" => "\xF0\x90\x91\x80", # DESERET CAPITAL LETTER GAY
1494 "\xF0\x90\x90\x99" => "\xF0\x90\x91\x81", # DESERET CAPITAL LETTER EF
1495 "\xF0\x90\x90\x9A" => "\xF0\x90\x91\x82", # DESERET CAPITAL LETTER VEE
1496 "\xF0\x90\x90\x9B" => "\xF0\x90\x91\x83", # DESERET CAPITAL LETTER ETH
1497 "\xF0\x90\x90\x9C" => "\xF0\x90\x91\x84", # DESERET CAPITAL LETTER THEE
1498 "\xF0\x90\x90\x9D" => "\xF0\x90\x91\x85", # DESERET CAPITAL LETTER ES
1499 "\xF0\x90\x90\x9E" => "\xF0\x90\x91\x86", # DESERET CAPITAL LETTER ZEE
1500 "\xF0\x90\x90\x9F" => "\xF0\x90\x91\x87", # DESERET CAPITAL LETTER ESH
1501 "\xF0\x90\x90\xA0" => "\xF0\x90\x91\x88", # DESERET CAPITAL LETTER ZHEE
1502 "\xF0\x90\x90\xA1" => "\xF0\x90\x91\x89", # DESERET CAPITAL LETTER ER
1503 "\xF0\x90\x90\xA2" => "\xF0\x90\x91\x8A", # DESERET CAPITAL LETTER EL
1504 "\xF0\x90\x90\xA3" => "\xF0\x90\x91\x8B", # DESERET CAPITAL LETTER EM
1505 "\xF0\x90\x90\xA4" => "\xF0\x90\x91\x8C", # DESERET CAPITAL LETTER EN
1506 "\xF0\x90\x90\xA5" => "\xF0\x90\x91\x8D", # DESERET CAPITAL LETTER ENG
1507 "\xF0\x90\x90\xA6" => "\xF0\x90\x91\x8E", # DESERET CAPITAL LETTER OI
1508 "\xF0\x90\x90\xA7" => "\xF0\x90\x91\x8F", # DESERET CAPITAL LETTER EW
1509 "\xF0\x90\x92\xB0" => "\xF0\x90\x93\x98", # OSAGE CAPITAL LETTER A
1510 "\xF0\x90\x92\xB1" => "\xF0\x90\x93\x99", # OSAGE CAPITAL LETTER AI
1511 "\xF0\x90\x92\xB2" => "\xF0\x90\x93\x9A", # OSAGE CAPITAL LETTER AIN
1512 "\xF0\x90\x92\xB3" => "\xF0\x90\x93\x9B", # OSAGE CAPITAL LETTER AH
1513 "\xF0\x90\x92\xB4" => "\xF0\x90\x93\x9C", # OSAGE CAPITAL LETTER BRA
1514 "\xF0\x90\x92\xB5" => "\xF0\x90\x93\x9D", # OSAGE CAPITAL LETTER CHA
1515 "\xF0\x90\x92\xB6" => "\xF0\x90\x93\x9E", # OSAGE CAPITAL LETTER EHCHA
1516 "\xF0\x90\x92\xB7" => "\xF0\x90\x93\x9F", # OSAGE CAPITAL LETTER E
1517 "\xF0\x90\x92\xB8" => "\xF0\x90\x93\xA0", # OSAGE CAPITAL LETTER EIN
1518 "\xF0\x90\x92\xB9" => "\xF0\x90\x93\xA1", # OSAGE CAPITAL LETTER HA
1519 "\xF0\x90\x92\xBA" => "\xF0\x90\x93\xA2", # OSAGE CAPITAL LETTER HYA
1520 "\xF0\x90\x92\xBB" => "\xF0\x90\x93\xA3", # OSAGE CAPITAL LETTER I
1521 "\xF0\x90\x92\xBC" => "\xF0\x90\x93\xA4", # OSAGE CAPITAL LETTER KA
1522 "\xF0\x90\x92\xBD" => "\xF0\x90\x93\xA5", # OSAGE CAPITAL LETTER EHKA
1523 "\xF0\x90\x92\xBE" => "\xF0\x90\x93\xA6", # OSAGE CAPITAL LETTER KYA
1524 "\xF0\x90\x92\xBF" => "\xF0\x90\x93\xA7", # OSAGE CAPITAL LETTER LA
1525 "\xF0\x90\x93\x80" => "\xF0\x90\x93\xA8", # OSAGE CAPITAL LETTER MA
1526 "\xF0\x90\x93\x81" => "\xF0\x90\x93\xA9", # OSAGE CAPITAL LETTER NA
1527 "\xF0\x90\x93\x82" => "\xF0\x90\x93\xAA", # OSAGE CAPITAL LETTER O
1528 "\xF0\x90\x93\x83" => "\xF0\x90\x93\xAB", # OSAGE CAPITAL LETTER OIN
1529 "\xF0\x90\x93\x84" => "\xF0\x90\x93\xAC", # OSAGE CAPITAL LETTER PA
1530 "\xF0\x90\x93\x85" => "\xF0\x90\x93\xAD", # OSAGE CAPITAL LETTER EHPA
1531 "\xF0\x90\x93\x86" => "\xF0\x90\x93\xAE", # OSAGE CAPITAL LETTER SA
1532 "\xF0\x90\x93\x87" => "\xF0\x90\x93\xAF", # OSAGE CAPITAL LETTER SHA
1533 "\xF0\x90\x93\x88" => "\xF0\x90\x93\xB0", # OSAGE CAPITAL LETTER TA
1534 "\xF0\x90\x93\x89" => "\xF0\x90\x93\xB1", # OSAGE CAPITAL LETTER EHTA
1535 "\xF0\x90\x93\x8A" => "\xF0\x90\x93\xB2", # OSAGE CAPITAL LETTER TSA
1536 "\xF0\x90\x93\x8B" => "\xF0\x90\x93\xB3", # OSAGE CAPITAL LETTER EHTSA
1537 "\xF0\x90\x93\x8C" => "\xF0\x90\x93\xB4", # OSAGE CAPITAL LETTER TSHA
1538 "\xF0\x90\x93\x8D" => "\xF0\x90\x93\xB5", # OSAGE CAPITAL LETTER DHA
1539 "\xF0\x90\x93\x8E" => "\xF0\x90\x93\xB6", # OSAGE CAPITAL LETTER U
1540 "\xF0\x90\x93\x8F" => "\xF0\x90\x93\xB7", # OSAGE CAPITAL LETTER WA
1541 "\xF0\x90\x93\x90" => "\xF0\x90\x93\xB8", # OSAGE CAPITAL LETTER KHA
1542 "\xF0\x90\x93\x91" => "\xF0\x90\x93\xB9", # OSAGE CAPITAL LETTER GHA
1543 "\xF0\x90\x93\x92" => "\xF0\x90\x93\xBA", # OSAGE CAPITAL LETTER ZA
1544 "\xF0\x90\x93\x93" => "\xF0\x90\x93\xBB", # OSAGE CAPITAL LETTER ZHA
1545 "\xF0\x90\xB2\x80" => "\xF0\x90\xB3\x80", # OLD HUNGARIAN CAPITAL LETTER A
1546 "\xF0\x90\xB2\x81" => "\xF0\x90\xB3\x81", # OLD HUNGARIAN CAPITAL LETTER AA
1547 "\xF0\x90\xB2\x82" => "\xF0\x90\xB3\x82", # OLD HUNGARIAN CAPITAL LETTER EB
1548 "\xF0\x90\xB2\x83" => "\xF0\x90\xB3\x83", # OLD HUNGARIAN CAPITAL LETTER AMB
1549 "\xF0\x90\xB2\x84" => "\xF0\x90\xB3\x84", # OLD HUNGARIAN CAPITAL LETTER EC
1550 "\xF0\x90\xB2\x85" => "\xF0\x90\xB3\x85", # OLD HUNGARIAN CAPITAL LETTER ENC
1551 "\xF0\x90\xB2\x86" => "\xF0\x90\xB3\x86", # OLD HUNGARIAN CAPITAL LETTER ECS
1552 "\xF0\x90\xB2\x87" => "\xF0\x90\xB3\x87", # OLD HUNGARIAN CAPITAL LETTER ED
1553 "\xF0\x90\xB2\x88" => "\xF0\x90\xB3\x88", # OLD HUNGARIAN CAPITAL LETTER AND
1554 "\xF0\x90\xB2\x89" => "\xF0\x90\xB3\x89", # OLD HUNGARIAN CAPITAL LETTER E
1555 "\xF0\x90\xB2\x8A" => "\xF0\x90\xB3\x8A", # OLD HUNGARIAN CAPITAL LETTER CLOSE E
1556 "\xF0\x90\xB2\x8B" => "\xF0\x90\xB3\x8B", # OLD HUNGARIAN CAPITAL LETTER EE
1557 "\xF0\x90\xB2\x8C" => "\xF0\x90\xB3\x8C", # OLD HUNGARIAN CAPITAL LETTER EF
1558 "\xF0\x90\xB2\x8D" => "\xF0\x90\xB3\x8D", # OLD HUNGARIAN CAPITAL LETTER EG
1559 "\xF0\x90\xB2\x8E" => "\xF0\x90\xB3\x8E", # OLD HUNGARIAN CAPITAL LETTER EGY
1560 "\xF0\x90\xB2\x8F" => "\xF0\x90\xB3\x8F", # OLD HUNGARIAN CAPITAL LETTER EH
1561 "\xF0\x90\xB2\x90" => "\xF0\x90\xB3\x90", # OLD HUNGARIAN CAPITAL LETTER I
1562 "\xF0\x90\xB2\x91" => "\xF0\x90\xB3\x91", # OLD HUNGARIAN CAPITAL LETTER II
1563 "\xF0\x90\xB2\x92" => "\xF0\x90\xB3\x92", # OLD HUNGARIAN CAPITAL LETTER EJ
1564 "\xF0\x90\xB2\x93" => "\xF0\x90\xB3\x93", # OLD HUNGARIAN CAPITAL LETTER EK
1565 "\xF0\x90\xB2\x94" => "\xF0\x90\xB3\x94", # OLD HUNGARIAN CAPITAL LETTER AK
1566 "\xF0\x90\xB2\x95" => "\xF0\x90\xB3\x95", # OLD HUNGARIAN CAPITAL LETTER UNK
1567 "\xF0\x90\xB2\x96" => "\xF0\x90\xB3\x96", # OLD HUNGARIAN CAPITAL LETTER EL
1568 "\xF0\x90\xB2\x97" => "\xF0\x90\xB3\x97", # OLD HUNGARIAN CAPITAL LETTER ELY
1569 "\xF0\x90\xB2\x98" => "\xF0\x90\xB3\x98", # OLD HUNGARIAN CAPITAL LETTER EM
1570 "\xF0\x90\xB2\x99" => "\xF0\x90\xB3\x99", # OLD HUNGARIAN CAPITAL LETTER EN
1571 "\xF0\x90\xB2\x9A" => "\xF0\x90\xB3\x9A", # OLD HUNGARIAN CAPITAL LETTER ENY
1572 "\xF0\x90\xB2\x9B" => "\xF0\x90\xB3\x9B", # OLD HUNGARIAN CAPITAL LETTER O
1573 "\xF0\x90\xB2\x9C" => "\xF0\x90\xB3\x9C", # OLD HUNGARIAN CAPITAL LETTER OO
1574 "\xF0\x90\xB2\x9D" => "\xF0\x90\xB3\x9D", # OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE
1575 "\xF0\x90\xB2\x9E" => "\xF0\x90\xB3\x9E", # OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE
1576 "\xF0\x90\xB2\x9F" => "\xF0\x90\xB3\x9F", # OLD HUNGARIAN CAPITAL LETTER OEE
1577 "\xF0\x90\xB2\xA0" => "\xF0\x90\xB3\xA0", # OLD HUNGARIAN CAPITAL LETTER EP
1578 "\xF0\x90\xB2\xA1" => "\xF0\x90\xB3\xA1", # OLD HUNGARIAN CAPITAL LETTER EMP
1579 "\xF0\x90\xB2\xA2" => "\xF0\x90\xB3\xA2", # OLD HUNGARIAN CAPITAL LETTER ER
1580 "\xF0\x90\xB2\xA3" => "\xF0\x90\xB3\xA3", # OLD HUNGARIAN CAPITAL LETTER SHORT ER
1581 "\xF0\x90\xB2\xA4" => "\xF0\x90\xB3\xA4", # OLD HUNGARIAN CAPITAL LETTER ES
1582 "\xF0\x90\xB2\xA5" => "\xF0\x90\xB3\xA5", # OLD HUNGARIAN CAPITAL LETTER ESZ
1583 "\xF0\x90\xB2\xA6" => "\xF0\x90\xB3\xA6", # OLD HUNGARIAN CAPITAL LETTER ET
1584 "\xF0\x90\xB2\xA7" => "\xF0\x90\xB3\xA7", # OLD HUNGARIAN CAPITAL LETTER ENT
1585 "\xF0\x90\xB2\xA8" => "\xF0\x90\xB3\xA8", # OLD HUNGARIAN CAPITAL LETTER ETY
1586 "\xF0\x90\xB2\xA9" => "\xF0\x90\xB3\xA9", # OLD HUNGARIAN CAPITAL LETTER ECH
1587 "\xF0\x90\xB2\xAA" => "\xF0\x90\xB3\xAA", # OLD HUNGARIAN CAPITAL LETTER U
1588 "\xF0\x90\xB2\xAB" => "\xF0\x90\xB3\xAB", # OLD HUNGARIAN CAPITAL LETTER UU
1589 "\xF0\x90\xB2\xAC" => "\xF0\x90\xB3\xAC", # OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE
1590 "\xF0\x90\xB2\xAD" => "\xF0\x90\xB3\xAD", # OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE
1591 "\xF0\x90\xB2\xAE" => "\xF0\x90\xB3\xAE", # OLD HUNGARIAN CAPITAL LETTER EV
1592 "\xF0\x90\xB2\xAF" => "\xF0\x90\xB3\xAF", # OLD HUNGARIAN CAPITAL LETTER EZ
1593 "\xF0\x90\xB2\xB0" => "\xF0\x90\xB3\xB0", # OLD HUNGARIAN CAPITAL LETTER EZS
1594 "\xF0\x90\xB2\xB1" => "\xF0\x90\xB3\xB1", # OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN
1595 "\xF0\x90\xB2\xB2" => "\xF0\x90\xB3\xB2", # OLD HUNGARIAN CAPITAL LETTER US
1596 "\xF0\x91\xA2\xA0" => "\xF0\x91\xA3\x80", # WARANG CITI CAPITAL LETTER NGAA
1597 "\xF0\x91\xA2\xA1" => "\xF0\x91\xA3\x81", # WARANG CITI CAPITAL LETTER A
1598 "\xF0\x91\xA2\xA2" => "\xF0\x91\xA3\x82", # WARANG CITI CAPITAL LETTER WI
1599 "\xF0\x91\xA2\xA3" => "\xF0\x91\xA3\x83", # WARANG CITI CAPITAL LETTER YU
1600 "\xF0\x91\xA2\xA4" => "\xF0\x91\xA3\x84", # WARANG CITI CAPITAL LETTER YA
1601 "\xF0\x91\xA2\xA5" => "\xF0\x91\xA3\x85", # WARANG CITI CAPITAL LETTER YO
1602 "\xF0\x91\xA2\xA6" => "\xF0\x91\xA3\x86", # WARANG CITI CAPITAL LETTER II
1603 "\xF0\x91\xA2\xA7" => "\xF0\x91\xA3\x87", # WARANG CITI CAPITAL LETTER UU
1604 "\xF0\x91\xA2\xA8" => "\xF0\x91\xA3\x88", # WARANG CITI CAPITAL LETTER E
1605 "\xF0\x91\xA2\xA9" => "\xF0\x91\xA3\x89", # WARANG CITI CAPITAL LETTER O
1606 "\xF0\x91\xA2\xAA" => "\xF0\x91\xA3\x8A", # WARANG CITI CAPITAL LETTER ANG
1607 "\xF0\x91\xA2\xAB" => "\xF0\x91\xA3\x8B", # WARANG CITI CAPITAL LETTER GA
1608 "\xF0\x91\xA2\xAC" => "\xF0\x91\xA3\x8C", # WARANG CITI CAPITAL LETTER KO
1609 "\xF0\x91\xA2\xAD" => "\xF0\x91\xA3\x8D", # WARANG CITI CAPITAL LETTER ENY
1610 "\xF0\x91\xA2\xAE" => "\xF0\x91\xA3\x8E", # WARANG CITI CAPITAL LETTER YUJ
1611 "\xF0\x91\xA2\xAF" => "\xF0\x91\xA3\x8F", # WARANG CITI CAPITAL LETTER UC
1612 "\xF0\x91\xA2\xB0" => "\xF0\x91\xA3\x90", # WARANG CITI CAPITAL LETTER ENN
1613 "\xF0\x91\xA2\xB1" => "\xF0\x91\xA3\x91", # WARANG CITI CAPITAL LETTER ODD
1614 "\xF0\x91\xA2\xB2" => "\xF0\x91\xA3\x92", # WARANG CITI CAPITAL LETTER TTE
1615 "\xF0\x91\xA2\xB3" => "\xF0\x91\xA3\x93", # WARANG CITI CAPITAL LETTER NUNG
1616 "\xF0\x91\xA2\xB4" => "\xF0\x91\xA3\x94", # WARANG CITI CAPITAL LETTER DA
1617 "\xF0\x91\xA2\xB5" => "\xF0\x91\xA3\x95", # WARANG CITI CAPITAL LETTER AT
1618 "\xF0\x91\xA2\xB6" => "\xF0\x91\xA3\x96", # WARANG CITI CAPITAL LETTER AM
1619 "\xF0\x91\xA2\xB7" => "\xF0\x91\xA3\x97", # WARANG CITI CAPITAL LETTER BU
1620 "\xF0\x91\xA2\xB8" => "\xF0\x91\xA3\x98", # WARANG CITI CAPITAL LETTER PU
1621 "\xF0\x91\xA2\xB9" => "\xF0\x91\xA3\x99", # WARANG CITI CAPITAL LETTER HIYO
1622 "\xF0\x91\xA2\xBA" => "\xF0\x91\xA3\x9A", # WARANG CITI CAPITAL LETTER HOLO
1623 "\xF0\x91\xA2\xBB" => "\xF0\x91\xA3\x9B", # WARANG CITI CAPITAL LETTER HORR
1624 "\xF0\x91\xA2\xBC" => "\xF0\x91\xA3\x9C", # WARANG CITI CAPITAL LETTER HAR
1625 "\xF0\x91\xA2\xBD" => "\xF0\x91\xA3\x9D", # WARANG CITI CAPITAL LETTER SSUU
1626 "\xF0\x91\xA2\xBE" => "\xF0\x91\xA3\x9E", # WARANG CITI CAPITAL LETTER SII
1627 "\xF0\x91\xA2\xBF" => "\xF0\x91\xA3\x9F", # WARANG CITI CAPITAL LETTER VIYO
1628 "\xF0\x96\xB9\x80" => "\xF0\x96\xB9\xA0", # MEDEFAIDRIN CAPITAL LETTER M
1629 "\xF0\x96\xB9\x81" => "\xF0\x96\xB9\xA1", # MEDEFAIDRIN CAPITAL LETTER S
1630 "\xF0\x96\xB9\x82" => "\xF0\x96\xB9\xA2", # MEDEFAIDRIN CAPITAL LETTER V
1631 "\xF0\x96\xB9\x83" => "\xF0\x96\xB9\xA3", # MEDEFAIDRIN CAPITAL LETTER W
1632 "\xF0\x96\xB9\x84" => "\xF0\x96\xB9\xA4", # MEDEFAIDRIN CAPITAL LETTER ATIU
1633 "\xF0\x96\xB9\x85" => "\xF0\x96\xB9\xA5", # MEDEFAIDRIN CAPITAL LETTER Z
1634 "\xF0\x96\xB9\x86" => "\xF0\x96\xB9\xA6", # MEDEFAIDRIN CAPITAL LETTER KP
1635 "\xF0\x96\xB9\x87" => "\xF0\x96\xB9\xA7", # MEDEFAIDRIN CAPITAL LETTER P
1636 "\xF0\x96\xB9\x88" => "\xF0\x96\xB9\xA8", # MEDEFAIDRIN CAPITAL LETTER T
1637 "\xF0\x96\xB9\x89" => "\xF0\x96\xB9\xA9", # MEDEFAIDRIN CAPITAL LETTER G
1638 "\xF0\x96\xB9\x8A" => "\xF0\x96\xB9\xAA", # MEDEFAIDRIN CAPITAL LETTER F
1639 "\xF0\x96\xB9\x8B" => "\xF0\x96\xB9\xAB", # MEDEFAIDRIN CAPITAL LETTER I
1640 "\xF0\x96\xB9\x8C" => "\xF0\x96\xB9\xAC", # MEDEFAIDRIN CAPITAL LETTER K
1641 "\xF0\x96\xB9\x8D" => "\xF0\x96\xB9\xAD", # MEDEFAIDRIN CAPITAL LETTER A
1642 "\xF0\x96\xB9\x8E" => "\xF0\x96\xB9\xAE", # MEDEFAIDRIN CAPITAL LETTER J
1643 "\xF0\x96\xB9\x8F" => "\xF0\x96\xB9\xAF", # MEDEFAIDRIN CAPITAL LETTER E
1644 "\xF0\x96\xB9\x90" => "\xF0\x96\xB9\xB0", # MEDEFAIDRIN CAPITAL LETTER B
1645 "\xF0\x96\xB9\x91" => "\xF0\x96\xB9\xB1", # MEDEFAIDRIN CAPITAL LETTER C
1646 "\xF0\x96\xB9\x92" => "\xF0\x96\xB9\xB2", # MEDEFAIDRIN CAPITAL LETTER U
1647 "\xF0\x96\xB9\x93" => "\xF0\x96\xB9\xB3", # MEDEFAIDRIN CAPITAL LETTER YU
1648 "\xF0\x96\xB9\x94" => "\xF0\x96\xB9\xB4", # MEDEFAIDRIN CAPITAL LETTER L
1649 "\xF0\x96\xB9\x95" => "\xF0\x96\xB9\xB5", # MEDEFAIDRIN CAPITAL LETTER Q
1650 "\xF0\x96\xB9\x96" => "\xF0\x96\xB9\xB6", # MEDEFAIDRIN CAPITAL LETTER HP
1651 "\xF0\x96\xB9\x97" => "\xF0\x96\xB9\xB7", # MEDEFAIDRIN CAPITAL LETTER NY
1652 "\xF0\x96\xB9\x98" => "\xF0\x96\xB9\xB8", # MEDEFAIDRIN CAPITAL LETTER X
1653 "\xF0\x96\xB9\x99" => "\xF0\x96\xB9\xB9", # MEDEFAIDRIN CAPITAL LETTER D
1654 "\xF0\x96\xB9\x9A" => "\xF0\x96\xB9\xBA", # MEDEFAIDRIN CAPITAL LETTER OE
1655 "\xF0\x96\xB9\x9B" => "\xF0\x96\xB9\xBB", # MEDEFAIDRIN CAPITAL LETTER N
1656 "\xF0\x96\xB9\x9C" => "\xF0\x96\xB9\xBC", # MEDEFAIDRIN CAPITAL LETTER R
1657 "\xF0\x96\xB9\x9D" => "\xF0\x96\xB9\xBD", # MEDEFAIDRIN CAPITAL LETTER O
1658 "\xF0\x96\xB9\x9E" => "\xF0\x96\xB9\xBE", # MEDEFAIDRIN CAPITAL LETTER AI
1659 "\xF0\x96\xB9\x9F" => "\xF0\x96\xB9\xBF", # MEDEFAIDRIN CAPITAL LETTER Y
1660 "\xF0\x9E\xA4\x80" => "\xF0\x9E\xA4\xA2", # ADLAM CAPITAL LETTER ALIF
1661 "\xF0\x9E\xA4\x81" => "\xF0\x9E\xA4\xA3", # ADLAM CAPITAL LETTER DAALI
1662 "\xF0\x9E\xA4\x82" => "\xF0\x9E\xA4\xA4", # ADLAM CAPITAL LETTER LAAM
1663 "\xF0\x9E\xA4\x83" => "\xF0\x9E\xA4\xA5", # ADLAM CAPITAL LETTER MIIM
1664 "\xF0\x9E\xA4\x84" => "\xF0\x9E\xA4\xA6", # ADLAM CAPITAL LETTER BA
1665 "\xF0\x9E\xA4\x85" => "\xF0\x9E\xA4\xA7", # ADLAM CAPITAL LETTER SINNYIIYHE
1666 "\xF0\x9E\xA4\x86" => "\xF0\x9E\xA4\xA8", # ADLAM CAPITAL LETTER PE
1667 "\xF0\x9E\xA4\x87" => "\xF0\x9E\xA4\xA9", # ADLAM CAPITAL LETTER BHE
1668 "\xF0\x9E\xA4\x88" => "\xF0\x9E\xA4\xAA", # ADLAM CAPITAL LETTER RA
1669 "\xF0\x9E\xA4\x89" => "\xF0\x9E\xA4\xAB", # ADLAM CAPITAL LETTER E
1670 "\xF0\x9E\xA4\x8A" => "\xF0\x9E\xA4\xAC", # ADLAM CAPITAL LETTER FA
1671 "\xF0\x9E\xA4\x8B" => "\xF0\x9E\xA4\xAD", # ADLAM CAPITAL LETTER I
1672 "\xF0\x9E\xA4\x8C" => "\xF0\x9E\xA4\xAE", # ADLAM CAPITAL LETTER O
1673 "\xF0\x9E\xA4\x8D" => "\xF0\x9E\xA4\xAF", # ADLAM CAPITAL LETTER DHA
1674 "\xF0\x9E\xA4\x8E" => "\xF0\x9E\xA4\xB0", # ADLAM CAPITAL LETTER YHE
1675 "\xF0\x9E\xA4\x8F" => "\xF0\x9E\xA4\xB1", # ADLAM CAPITAL LETTER WAW
1676 "\xF0\x9E\xA4\x90" => "\xF0\x9E\xA4\xB2", # ADLAM CAPITAL LETTER NUN
1677 "\xF0\x9E\xA4\x91" => "\xF0\x9E\xA4\xB3", # ADLAM CAPITAL LETTER KAF
1678 "\xF0\x9E\xA4\x92" => "\xF0\x9E\xA4\xB4", # ADLAM CAPITAL LETTER YA
1679 "\xF0\x9E\xA4\x93" => "\xF0\x9E\xA4\xB5", # ADLAM CAPITAL LETTER U
1680 "\xF0\x9E\xA4\x94" => "\xF0\x9E\xA4\xB6", # ADLAM CAPITAL LETTER JIIM
1681 "\xF0\x9E\xA4\x95" => "\xF0\x9E\xA4\xB7", # ADLAM CAPITAL LETTER CHI
1682 "\xF0\x9E\xA4\x96" => "\xF0\x9E\xA4\xB8", # ADLAM CAPITAL LETTER HA
1683 "\xF0\x9E\xA4\x97" => "\xF0\x9E\xA4\xB9", # ADLAM CAPITAL LETTER QAAF
1684 "\xF0\x9E\xA4\x98" => "\xF0\x9E\xA4\xBA", # ADLAM CAPITAL LETTER GA
1685 "\xF0\x9E\xA4\x99" => "\xF0\x9E\xA4\xBB", # ADLAM CAPITAL LETTER NYA
1686 "\xF0\x9E\xA4\x9A" => "\xF0\x9E\xA4\xBC", # ADLAM CAPITAL LETTER TU
1687 "\xF0\x9E\xA4\x9B" => "\xF0\x9E\xA4\xBD", # ADLAM CAPITAL LETTER NHA
1688 "\xF0\x9E\xA4\x9C" => "\xF0\x9E\xA4\xBE", # ADLAM CAPITAL LETTER VA
1689 "\xF0\x9E\xA4\x9D" => "\xF0\x9E\xA4\xBF", # ADLAM CAPITAL LETTER KHA
1690 "\xF0\x9E\xA4\x9E" => "\xF0\x9E\xA5\x80", # ADLAM CAPITAL LETTER GBE
1691 "\xF0\x9E\xA4\x9F" => "\xF0\x9E\xA5\x81", # ADLAM CAPITAL LETTER ZAL
1692 "\xF0\x9E\xA4\xA0" => "\xF0\x9E\xA5\x82", # ADLAM CAPITAL LETTER KPO
1693 "\xF0\x9E\xA4\xA1" => "\xF0\x9E\xA5\x83", # ADLAM CAPITAL LETTER SHA
1694 );
1695 }
1696  
1697 else {
1698 0 croak "Don't know my package name '@{[__PACKAGE__]}'";
1699 }
1700  
1701 #
1702 # @ARGV wildcard globbing
1703 #
1704 314 ▶sub import {
Subroutine import: called CC=7 SCAR=28.3
1705  
1706 314 ▶ if ($^O =~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O =~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/mosx) 0 314 314
1707 0 my @argv = ();
1708 0 for (@ARGV) {
1709  
1710 # has space
1711 0 ▶ if (/\A (?:$q_char)*? [ ] /oxms) {
Branch: 2 branches
BranchTrueFalseTotal
if (/\A (?:$Eutf2::q_char)*? [ ] /mosx) { } 0 0 0
elsif (/\A (?:$Eutf2::q_char)*? [*?] /mosx) { } 0 0 0
1712 0 ▶ if (my @glob = Eutf2::glob(qq{"$_"})) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@glob) = &Eutf2::glob(qq["$_"])) { } 0 0 0
1713 0 push @argv, @glob;
1714 }
1715 else {
1716 0 push @argv, $_;
1717 }
1718 }
1719  
1720 # has wildcard metachar
1721 elsif (/\A (?:$q_char)*? [*?] /oxms) {
1722 0 ▶ if (my @glob = Eutf2::glob($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@glob) = &Eutf2::glob($_)) { } 0 0 0
1723 0 push @argv, @glob;
1724 }
1725 else {
1726 0 push @argv, $_;
1727 }
1728 }
1729  
1730 # no wildcard globbing
1731 else {
1732 0 push @argv, $_;
1733 }
1734 }
1735 0 @ARGV = @argv;
1736 }
1737  
1738 314 *Char::ord = \&UTF2::ord;
1739 314 *Char::ord_ = \&UTF2::ord_;
1740 314 *Char::reverse = \&UTF2::reverse;
1741 314 *Char::getc = \&UTF2::getc;
1742 314 *Char::length = \&UTF2::length;
1743 314 *Char::substr = \&UTF2::substr;
1744 314 *Char::index = \&UTF2::index;
1745 314 *Char::rindex = \&UTF2::rindex;
1746 314 *Char::eval = \&UTF2::eval;
1747 314 *Char::escape = \&UTF2::escape;
1748 314 *Char::escape_token = \&UTF2::escape_token;
1749 314 *Char::escape_script = \&UTF2::escape_script;
1750 }
1751  
1752 # P.230 Care with Prototypes
1753 # in Chapter 6: Subroutines
1754 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
1755 #
1756 # If you aren't careful, you can get yourself into trouble with prototypes.
1757 # But if you are careful, you can do a lot of neat things with them. This is
1758 # all very powerful, of course, and should only be used in moderation to make
1759 # the world a better place.
1760  
1761 # P.332 Care with Prototypes
1762 # in Chapter 7: Subroutines
1763 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
1764 #
1765 # If you aren't careful, you can get yourself into trouble with prototypes.
1766 # But if you are careful, you can do a lot of neat things with them. This is
1767 # all very powerful, of course, and should only be used in moderation to make
1768 # the world a better place.
1769  
1770 #
1771 # Prototypes of subroutines
1772 #
1773 0 ▶sub unimport {}
Subroutine unimport: not called CC=1 SCAR=0.0
1774 sub Eutf2::split(;$$$);
1775 sub Eutf2::tr($$$$;$);
1776 sub Eutf2::chop(@);
1777 sub Eutf2::index($$;$);
1778 sub Eutf2::rindex($$;$);
1779 sub Eutf2::lcfirst(@);
1780 sub Eutf2::lcfirst_();
1781 sub Eutf2::lc(@);
1782 sub Eutf2::lc_();
1783 sub Eutf2::ucfirst(@);
1784 sub Eutf2::ucfirst_();
1785 sub Eutf2::uc(@);
1786 sub Eutf2::uc_();
1787 sub Eutf2::fc(@);
1788 sub Eutf2::fc_();
1789 sub Eutf2::ignorecase;
1790 sub Eutf2::classic_character_class;
1791 sub Eutf2::capture;
1792 sub Eutf2::chr(;$);
1793 sub Eutf2::chr_();
1794 sub Eutf2::glob($);
1795 sub Eutf2::glob_();
1796  
1797 sub UTF2::ord(;$);
1798 sub UTF2::ord_();
1799 sub UTF2::reverse(@);
1800 sub UTF2::getc(;*@);
1801 sub UTF2::length(;$);
1802 sub UTF2::substr($$;$$);
1803 sub UTF2::index($$;$);
1804 sub UTF2::rindex($$;$);
1805 sub UTF2::escape(;$);
1806  
1807 #
1808 # Regexp work
1809 #
1810 629 ▶use vars qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
1811 $re_a
1812 $re_t
1813 $re_n
1814 $re_r
1815 629 );
1816  
1817 #
1818 # Character class
1819 #
1820 629 ▶use vars qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
1821 $dot
1822 $dot_s
1823 $eD
1824 $eS
1825 $eW
1826 $eH
1827 $eV
1828 $eR
1829 $eN
1830 $not_alnum
1831 $not_alpha
1832 $not_ascii
1833 $not_blank
1834 $not_cntrl
1835 $not_digit
1836 $not_graph
1837 $not_lower
1838 $not_lower_i
1839 $not_print
1840 $not_punct
1841 $not_space
1842 $not_upper
1843 $not_upper_i
1844 $not_word
1845 $not_xdigit
1846 $eb
1847 $eB
1848 629 );
1849  
1850 629 ${Eutf2::dot} = qr{(?>[^\x80-\xFF\x0A]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1851 629 ${Eutf2::dot_s} = qr{(?>[^\x80-\xFF]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1852 629 ${Eutf2::eD} = qr{(?>[^\x80-\xFF0-9]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1853  
1854 # Vertical tabs are now whitespace
1855 # \s in a regex now matches a vertical tab in all circumstances.
1856 # http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Vertical_tabs_are_now_whitespace
1857 # ${Eutf2::eS} = qr{(?>[^\x80-\xFF\x09\x0A \x0C\x0D\x20]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1858 # ${Eutf2::eS} = qr{(?>[^\x80-\xFF\x09\x0A\x0B\x0C\x0D\x20]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1859 629 ${Eutf2::eS} = qr{(?>[^\x80-\xFF\s]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1860  
1861 629 ${Eutf2::eW} = qr{(?>[^\x80-\xFF0-9A-Z_a-z]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1862 629 ${Eutf2::eH} = qr{(?>[^\x80-\xFF\x09\x20]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1863 629 ${Eutf2::eV} = qr{(?>[^\x80-\xFF\x0A\x0B\x0C\x0D]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1864 629 ${Eutf2::eR} = qr{(?>\x0D\x0A|[\x0A\x0D])};
1865 629 ${Eutf2::eN} = qr{(?>[^\x80-\xFF\x0A]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1866 629 ${Eutf2::not_alnum} = qr{(?>[^\x80-\xFF\x30-\x39\x41-\x5A\x61-\x7A]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1867 629 ${Eutf2::not_alpha} = qr{(?>[^\x80-\xFF\x41-\x5A\x61-\x7A]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1868 629 ${Eutf2::not_ascii} = qr{(?>[^\x80-\xFF\x00-\x7F]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1869 629 ${Eutf2::not_blank} = qr{(?>[^\x80-\xFF\x09\x20]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1870 629 ${Eutf2::not_cntrl} = qr{(?>[^\x80-\xFF\x00-\x1F\x7F]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1871 629 ${Eutf2::not_digit} = qr{(?>[^\x80-\xFF\x30-\x39]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1872 629 ${Eutf2::not_graph} = qr{(?>[^\x80-\xFF\x21-\x7F]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1873 629 ${Eutf2::not_lower} = qr{(?>[^\x80-\xFF\x61-\x7A]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1874 629 ${Eutf2::not_lower_i} = qr{(?>[^\x80-\xFF\x41-\x5A\x61-\x7A]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])}; # Perl 5.16 compatible
1875 # ${Eutf2::not_lower_i} = qr{(?>[^\x80-\xFF]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])}; # older Perl compatible
1876 629 ${Eutf2::not_print} = qr{(?>[^\x80-\xFF\x20-\x7F]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1877 629 ${Eutf2::not_punct} = qr{(?>[^\x80-\xFF\x21-\x2F\x3A-\x3F\x40\x5B-\x5F\x60\x7B-\x7E]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1878 629 ${Eutf2::not_space} = qr{(?>[^\x80-\xFF\s\x0B]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1879 629 ${Eutf2::not_upper} = qr{(?>[^\x80-\xFF\x41-\x5A]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1880 629 ${Eutf2::not_upper_i} = qr{(?>[^\x80-\xFF\x41-\x5A\x61-\x7A]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])}; # Perl 5.16 compatible
1881 # ${Eutf2::not_upper_i} = qr{(?>[^\x80-\xFF]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])}; # older Perl compatible
1882 629 ${Eutf2::not_word} = qr{(?>[^\x80-\xFF\x30-\x39\x41-\x5A\x5F\x61-\x7A]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1883 629 ${Eutf2::not_xdigit} = qr{(?>[^\x80-\xFF\x30-\x39\x41-\x46\x61-\x66]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])};
1884 629 ${Eutf2::eb} = qr{(?:\A(?=[0-9A-Z_a-z])|(?<=[\x00-\x2F\x40\x5B-\x5E\x60\x7B-\xFF])(?=[0-9A-Z_a-z])|(?<=[0-9A-Z_a-z])(?=[\x00-\x2F\x40\x5B-\x5E\x60\x7B-\xFF]|\z))};
1885 629 ${Eutf2::eB} = qr{(?:(?<=[0-9A-Z_a-z])(?=[0-9A-Z_a-z])|(?<=[\x00-\x2F\x40\x5B-\x5E\x60\x7B-\xFF])(?=[\x00-\x2F\x40\x5B-\x5E\x60\x7B-\xFF]))};
1886  
1887 # avoid: Name "Eutf2::foo" used only once: possible typo at here.
1888 629 ${Eutf2::dot} = ${Eutf2::dot};
1889 629 ${Eutf2::dot_s} = ${Eutf2::dot_s};
1890 629 ${Eutf2::eD} = ${Eutf2::eD};
1891 629 ${Eutf2::eS} = ${Eutf2::eS};
1892 629 ${Eutf2::eW} = ${Eutf2::eW};
1893 629 ${Eutf2::eH} = ${Eutf2::eH};
1894 629 ${Eutf2::eV} = ${Eutf2::eV};
1895 629 ${Eutf2::eR} = ${Eutf2::eR};
1896 629 ${Eutf2::eN} = ${Eutf2::eN};
1897 629 ${Eutf2::not_alnum} = ${Eutf2::not_alnum};
1898 629 ${Eutf2::not_alpha} = ${Eutf2::not_alpha};
1899 629 ${Eutf2::not_ascii} = ${Eutf2::not_ascii};
1900 629 ${Eutf2::not_blank} = ${Eutf2::not_blank};
1901 629 ${Eutf2::not_cntrl} = ${Eutf2::not_cntrl};
1902 629 ${Eutf2::not_digit} = ${Eutf2::not_digit};
1903 629 ${Eutf2::not_graph} = ${Eutf2::not_graph};
1904 629 ${Eutf2::not_lower} = ${Eutf2::not_lower};
1905 629 ${Eutf2::not_lower_i} = ${Eutf2::not_lower_i};
1906 629 ${Eutf2::not_print} = ${Eutf2::not_print};
1907 629 ${Eutf2::not_punct} = ${Eutf2::not_punct};
1908 629 ${Eutf2::not_space} = ${Eutf2::not_space};
1909 629 ${Eutf2::not_upper} = ${Eutf2::not_upper};
1910 629 ${Eutf2::not_upper_i} = ${Eutf2::not_upper_i};
1911 629 ${Eutf2::not_word} = ${Eutf2::not_word};
1912 629 ${Eutf2::not_xdigit} = ${Eutf2::not_xdigit};
1913 629 ${Eutf2::eb} = ${Eutf2::eb};
1914 629 ${Eutf2::eB} = ${Eutf2::eB};
1915  
1916 #
1917 # UTF-8 split
1918 #
1919 90 ▶sub Eutf2::split(;$$$) {
Subroutine split: called CC=34 SCAR=37.3
Pod undocumented
1920  
1921 # P.794 29.2.161. split
1922 # in Chapter 29: Functions
1923 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
1924  
1925 # P.951 split
1926 # in Chapter 27: Functions
1927 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
1928  
1929 90 my $pattern = $_[0];
1930 90 my $string = $_[1];
1931 90 my $limit = $_[2];
1932  
1933 # if $pattern is also omitted or is the literal space, " "
1934 90 ▶ if (not defined $pattern) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $pattern) 3 87 90
1935 3 $pattern = ' ';
1936 }
1937  
1938 # if $string is omitted, the function splits the $_ string
1939 90 ▶ if (not defined $string) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $string) 8 82 90
1940 8 ▶ if (defined $_) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_) { } 2 6 8
1941 2 $string = $_;
1942 }
1943 else {
1944 6 $string = '';
1945 }
1946 }
1947  
1948 90 my @split = ();
1949  
1950 # when string is empty
1951 90 ▶ if ($string eq '') {
Branch: 2 branches
BranchTrueFalseTotal
if ($string eq '') { } 10 80 90
elsif ($pattern eq ' ') { } 5 75 80
1952  
1953 # resulting list value in list context
1954 10 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 5 5 10
1955 5 return @split;
1956 }
1957  
1958 # count of substrings in scalar context
1959 else {
1960 5 ▶ carp "Use of implicit split to \@_ is deprecated" if $^W;
Branch: 1 branch
BranchTrueFalseTotal
if $^W 0 5 5
1961 5 @_ = @split;
1962 5 return scalar @_;
1963 }
1964 }
1965  
1966 # split's first argument is more consistently interpreted
1967 #
1968 # After some changes earlier in v5.17, split's behavior has been simplified:
1969 # if the PATTERN argument evaluates to a string containing one space, it is
1970 # treated the way that a literal string containing one space once was.
1971 # http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#split's_first_argument_is_more_consistently_interpreted
1972  
1973 # if $pattern is also omitted or is the literal space, " ", the function splits
1974 # on whitespace, /\s+/, after skipping any leading whitespace
1975 # (and so on)
1976  
1977 elsif ($pattern eq ' ') {
1978 5 ▶ if (not defined $limit) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $limit) { } 4 1 5
1979 4 return CORE::split(' ', $string);
1980 }
1981 else {
1982 1 return CORE::split(' ', $string, $limit);
1983 }
1984 }
1985  
1986 # if $limit is negative, it is treated as if an arbitrarily large $limit has been specified
1987 75 ▶ if ((not defined $limit) or ($limit <= 0)) {
Branch: 2 branches
BranchTrueFalseTotal
if (not defined $limit or $limit <= 0) { } 74 1 75
elsif ($limit > 0) { } 1 0 1
Condition66%2/3
not defined $limit or $limit <= 0
l!l&&r!l&&!r
7401
MC/DC50%1/2
not defined $limit or $limit <= 0
not defined $limit $limit <= 0
Truth table66%2/3
not(A) or B
A= not defined $limitB= $limit <= 0
ABresult
1X1
011
000
1988  
1989 # a pattern capable of matching either the null string or something longer than the
1990 # null string will split the value of $string into separate characters wherever it
1991 # matches the null string between characters
1992 # (and so on)
1993  
1994 74 ▶ if ('' =~ / \A $pattern \z /xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ('' =~ / \A $pattern \z /msx) { } 7 67 74
1995 7 my $last_subexpression_offsets = _last_subexpression_offsets($pattern);
1996 7 my $limit = scalar(() = $string =~ /($pattern)/oxmsg);
1997  
1998 # P.1024 Appendix W.10 Multibyte Processing
1999 # of ISBN 1-56592-224-7 CJKV Information Processing
2000 # (and so on)
2001  
2002 # the //m modifier is assumed when you split on the pattern /^/
2003 # (and so on)
2004  
2005 # V
2006 7 ▶ while ((--$limit > 0) and ($string =~ s/\A((?:$q_char)+?)$pattern//m)) {
Branch: 1 branch
BranchTrueFalseTotal
if (--$limit > 0 and $string =~ s/\A((?:$Eutf2::q_char)+?)$pattern//m) 29 7 36
Condition100%3/3
--$limit > 0 and $string =~ s/\A((?:$Eutf2::q_char)+?)$pattern//m
!ll&&!rl&&r
1629
MC/DC100%2/2
--$limit > 0 and $string =~ s/\A((?:$Eutf2::q_char)+?)$pattern//m
--$limit > 0 $string =~ s/\A((?:$Eutf2::q_char)+?)$pattern//m
Truth table100%3/3
A and B
A= --$limit > 0B= $string =~ s/\A((?:$Eutf2::q_char)+?)$pattern//m
ABresult
0X0
100
111
2007  
2008 # if the $pattern contains parentheses, then the substring matched by each pair of parentheses
2009 # is included in the resulting list, interspersed with the fields that are ordinarily returned
2010 # (and so on)
2011  
2012 29 local $@;
2013 29 ▶ for (my $digit=1; $digit <= ($last_subexpression_offsets + 1); $digit++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($digit <= $last_subexpression_offsets + 1) 29 29 58
2014 29 push @split, CORE::eval('$' . $digit);
2015 }
2016 }
2017 }
2018  
2019 else {
2020 67 my $last_subexpression_offsets = _last_subexpression_offsets($pattern);
2021  
2022 # V
2023 67 ▶ while ($string =~ s/\A((?:$q_char)*?)$pattern//m) {
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ s/\A((?:$Eutf2::q_char)*?)$pattern//m) 203 67 270
2024 203 local $@;
2025 203 ▶ for (my $digit=1; $digit <= ($last_subexpression_offsets + 1); $digit++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($digit <= $last_subexpression_offsets + 1) 280 203 483
2026 280 push @split, CORE::eval('$' . $digit);
2027 }
2028 }
2029 }
2030 }
2031  
2032 elsif ($limit > 0) {
2033 1 ▶ if ('' =~ / \A $pattern \z /xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ('' =~ / \A $pattern \z /msx) { } 0 1 1
2034 0 my $last_subexpression_offsets = _last_subexpression_offsets($pattern);
2035 0 ▶ while ((--$limit > 0) and (CORE::length($string) > 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if (--$limit > 0 and length $string > 0) 0 0 0
Condition0%0/3
--$limit > 0 and length $string > 0
!ll&&!rl&&r
000
MC/DC0%0/2
--$limit > 0 and length $string > 0
--$limit > 0 length $string > 0
Truth table0%0/3
A and B
A= --$limit > 0B= length $string > 0
ABresult
0X0
100
111
2036  
2037 # V
2038 0 ▶ if ($string =~ s/\A((?:$q_char)+?)$pattern//m) {
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ s/\A((?:$Eutf2::q_char)+?)$pattern//m) 0 0 0
2039 0 local $@;
2040 0 ▶ for (my $digit=1; $digit <= ($last_subexpression_offsets + 1); $digit++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($digit <= $last_subexpression_offsets + 1) 0 0 0
2041 0 push @split, CORE::eval('$' . $digit);
2042 }
2043 }
2044 }
2045 }
2046 else {
2047 1 my $last_subexpression_offsets = _last_subexpression_offsets($pattern);
2048 1 ▶ while ((--$limit > 0) and (CORE::length($string) > 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if (--$limit > 0 and length $string > 0) 2 1 3
Condition66%2/3
--$limit > 0 and length $string > 0
!ll&&!rl&&r
102
MC/DC50%1/2
--$limit > 0 and length $string > 0
--$limit > 0 length $string > 0
Truth table66%2/3
A and B
A= --$limit > 0B= length $string > 0
ABresult
0X0
100
111
2049  
2050 # V
2051 2 ▶ if ($string =~ s/\A((?:$q_char)*?)$pattern//m) {
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ s/\A((?:$Eutf2::q_char)*?)$pattern//m) 2 0 2
2052 2 local $@;
2053 2 ▶ for (my $digit=1; $digit <= ($last_subexpression_offsets + 1); $digit++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($digit <= $last_subexpression_offsets + 1) 2 2 4
2054 2 push @split, CORE::eval('$' . $digit);
2055 }
2056 }
2057 }
2058 }
2059 }
2060  
2061 75 ▶ if (CORE::length($string) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $string > 0) 67 8 75
2062 67 push @split, $string;
2063 }
2064  
2065 # if $_[2] (NOT "$limit") is omitted or zero, trailing null fields are stripped from the result
2066 75 ▶ if ((not defined $_[2]) or ($_[2] == 0)) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $_[2] or $_[2] == 0) 74 1 75
Condition66%2/3
not defined $_[2] or $_[2] == 0
l!l&&r!l&&!r
7401
MC/DC50%1/2
not defined $_[2] or $_[2] == 0
not defined $_[2] $_[2] == 0
Truth table66%2/3
not(A) or B
A= not defined $_[2]B= $_[2] == 0
ABresult
1X1
011
000
2067 74 ▶ while ((scalar(@split) >= 1) and ($split[-1] eq '')) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @split >= 1 and $split[-1] eq "") 2 74 76
Condition66%2/3
scalar @split >= 1 and $split[-1] eq ""
!ll&&!rl&&r
0742
MC/DC50%1/2
scalar @split >= 1 and $split[-1] eq ""
scalar @split >= 1 $split[-1] eq ""
Truth table66%2/3
A and B
A= scalar @split >= 1B= $split[-1] eq ""
ABresult
0X0
100
111
2068 2 pop @split;
2069 }
2070 }
2071  
2072 # resulting list value in list context
2073 75 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 73 2 75
2074 73 return @split;
2075 }
2076  
2077 # count of substrings in scalar context
2078 else {
2079 2 ▶ carp "Use of implicit split to \@_ is deprecated" if $^W;
Branch: 1 branch
BranchTrueFalseTotal
if $^W 0 2 2
2080 2 @_ = @split;
2081 2 return scalar @_;
2082 }
2083 }
2084  
2085 #
2086 # get last subexpression offsets
2087 #
2088 75 ▶sub _last_subexpression_offsets {
Subroutine _last_subexpression_offsets: called CC=3 SCAR=11.0
2089 75 my $pattern = $_[0];
2090  
2091 # remove comment
2092 75 $pattern =~ s/\(\?\# .*? \)//oxmsg;
2093  
2094 75 my $modifier = '';
2095 75 ▶ if ($pattern =~ /\(\?\^? ([\-A-Za-z]+) :/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pattern =~ /\(\?\^? ([\-A-Za-z]+) :/mosx) 13 62 75
2096 13 $modifier = $1;
2097 13 $modifier =~ s/-[A-Za-z]*//;
2098 }
2099  
2100 # with /x modifier
2101 75 my @char = ();
2102 75 ▶ if ($modifier =~ /x/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /x/mosx) { } 5 70 75
2103 5 @char = $pattern =~ /\G((?>
2104 [^\x80-\xFF\\\#\[\(]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
2105 \\ $q_char |
2106 \# (?>[^\n]*) $ |
2107 \[ (?>(?:[^\x80-\xFF\\\]]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF]|\\\\|\\\]|$q_char)+) \] |
2108 \(\? |
2109 $q_char
2110 ))/oxmsg;
2111 }
2112  
2113 # without /x modifier
2114 else {
2115 70 @char = $pattern =~ /\G((?>
2116 [^\x80-\xFF\\\[\(]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
2117 \\ $q_char |
2118 \[ (?>(?:[^\x80-\xFF\\\]]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF]|\\\\|\\\]|$q_char)+) \] |
2119 \(\? |
2120 $q_char
2121 ))/oxmsg;
2122 }
2123  
2124 75 return scalar grep { $_ eq '(' } @char;
2125 }
2126  
2127 #
2128 # UTF-8 transliteration (tr///)
2129 #
2130 14 ▶sub Eutf2::tr($$$$;$) {
Subroutine tr: called CC=26 SCAR=34.7
Pod undocumented
2131  
2132 14 my $bind_operator = $_[1];
2133 14 my $searchlist = $_[2];
2134 14 my $replacementlist = $_[3];
2135 14 ▶ my $modifier = $_[4] || '';
Condition100%2/2
$_[4] || ''
l!l
95
MC/DC100%1/1
$_[4] || ''
$_[4]
Truth table100%2/2
A
A= $_[4]
Aresult
11
00
2136  
2137 14 ▶ if ($modifier =~ /r/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /r/mosx) 5 9 14
2138 5 ▶ if ($bind_operator =~ / !~ /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($bind_operator =~ / !~ /mosx) 0 5 5
2139 0 croak "Using !~ with tr///r doesn't make sense";
2140 }
2141 }
2142  
2143 14 my @char = $_[0] =~ /\G (?>$q_char) /oxmsg;
2144 14 my @searchlist = _charlist_tr($searchlist);
2145 14 my @replacementlist = _charlist_tr($replacementlist);
2146  
2147 14 my %tr = ();
2148 14 ▶ for (my $i=0; $i <= $#searchlist; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#searchlist) 53 14 67
2149 53 ▶ if (not exists $tr{$searchlist[$i]}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $tr{$searchlist[$i]}) 53 0 53
2150 53 ▶ if (defined $replacementlist[$i] and ($replacementlist[$i] ne '')) {
Branch: 3 branches
BranchTrueFalseTotal
if (defined $replacementlist[$i] and $replacementlist[$i] ne '') { } 39 14 53
elsif ($modifier =~ /d/mosx) { } 10 4 14
elsif (defined $replacementlist[-1] and $replacementlist[-1] ne '') { } 4 0 4
Condition66%2/3
defined $replacementlist[$i] and $replacementlist[$i] ne ""
!ll&&!rl&&r
14039
MC/DC50%1/2
defined $replacementlist[$i] and $replacementlist[$i] ne ""
defined $replacementlist[$i] $replacementlist[$i] ne ""
Truth table66%2/3
A and B
A= defined $replacementlist[$i]B= $replacementlist[$i] ne ""
ABresult
0X0
100
111
2151 39 $tr{$searchlist[$i]} = $replacementlist[$i];
2152 }
2153 elsif ($modifier =~ /d/oxms) {
2154 10 $tr{$searchlist[$i]} = '';
2155 }
2156 ▶ elsif (defined $replacementlist[-1] and ($replacementlist[-1] ne '')) {
Condition33%1/3
defined $replacementlist[-1] and $replacementlist[-1] ne ""
!ll&&!rl&&r
004
MC/DC0%0/2
defined $replacementlist[-1] and $replacementlist[-1] ne ""
defined $replacementlist[-1] $replacementlist[-1] ne ""
Truth table33%1/3
A and B
A= defined $replacementlist[-1]B= $replacementlist[-1] ne ""
ABresult
0X0
100
111
2157 4 $tr{$searchlist[$i]} = $replacementlist[-1];
2158 }
2159 else {
2160 0 $tr{$searchlist[$i]} = $searchlist[$i];
2161 }
2162 }
2163 }
2164  
2165 14 my $tr = 0;
2166 14 my $replaced = '';
2167 14 ▶ if ($modifier =~ /c/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /c/mosx) { } 2 12 14
2168 2 ▶ while (defined(my $char = shift @char)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined(my $char = shift @char)) 20 2 22
2169 20 ▶ if (not exists $tr{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
if (not exists $tr{$char}) { } 12 8 20
2170 12 ▶ if (defined $replacementlist[0]) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $replacementlist[0]) 10 2 12
2171 10 $replaced .= $replacementlist[0];
2172 }
2173 12 $tr++;
2174 12 ▶ if ($modifier =~ /s/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /s/mosx) 0 12 12
2175 0 ▶ while (@char and (not exists $tr{$char[0]})) {
Branch: 1 branch
BranchTrueFalseTotal
if (@char and not exists $tr{$char[0]}) 0 0 0
Condition0%0/3
@char and not exists $tr{$char[0]}
!ll&&!rl&&r
000
MC/DC0%0/2
@char and not exists $tr{$char[0]}
@char not exists $tr{$char[0]}
Truth table0%0/3
A and not(B)
A= @charB= not exists $tr{$char[0]}
ABresult
0X0
100
111
2176 0 shift @char;
2177 0 $tr++;
2178 }
2179 }
2180 }
2181 else {
2182 8 $replaced .= $char;
2183 }
2184 }
2185 }
2186 else {
2187 12 ▶ while (defined(my $char = shift @char)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined(my $char = shift @char)) 88 12 100
2188 88 ▶ if (exists $tr{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $tr{$char}) { } 49 39 88
2189 49 $replaced .= $tr{$char};
2190 49 $tr++;
2191 49 ▶ if ($modifier =~ /s/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /s/mosx) 1 48 49
2192 1 ▶ while (@char and (exists $tr{$char[0]}) and ($tr{$char[0]} eq $tr{$char})) {
Branch: 1 branch
BranchTrueFalseTotal
if (@char and exists $tr{$char[0]} and $tr{$char[0]} eq $tr{$char}) 4 1 5
Condition66%4/6
@char and exists $tr{$char[0]} and $tr{$char[0]} eq $tr{$char}
!ll&&!rl&&r
104
@char and exists $tr{$char[0]}
!ll&&!rl&&r
014
MC/DC33%1/3
@char and exists $tr{$char[0]} and $tr{$char[0]} eq $tr{$char}
@char exists $tr{$char[0]} $tr{$char[0]} eq $tr{$char}
Truth table50%2/4
A and B and C
A= @charB= exists $tr{$char[0]}C= $tr{$char[0]} eq $tr{$char}
ABCresult
0XX0
10X0
1100
1111
2193 4 shift @char;
2194 4 $tr++;
2195 }
2196 }
2197 }
2198 else {
2199 39 $replaced .= $char;
2200 }
2201 }
2202 }
2203  
2204 14 ▶ if ($modifier =~ /r/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /r/mosx) { } 5 9 14
2205 5 return $replaced;
2206 }
2207 else {
2208 9 $_[0] = $replaced;
2209 9 ▶ if ($bind_operator =~ / !~ /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($bind_operator =~ / !~ /mosx) { } 0 9 9
2210 0 return not $tr;
2211 }
2212 else {
2213 9 return $tr;
2214 }
2215 }
2216 }
2217  
2218 #
2219 # UTF-8 chop
2220 #
2221 2 ▶sub Eutf2::chop(@) {
Subroutine chop: called CC=3 SCAR=12.0
Pod undocumented
2222  
2223 2 my $chop;
2224 2 ▶ if (@_ == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 0) { } 0 2 2
2225 0 my @char = /\G (?>$q_char) /oxmsg;
2226 0 $chop = pop @char;
2227 0 $_ = join '', @char;
2228 }
2229 else {
2230 2 for (@_) {
2231 2 my @char = /\G (?>$q_char) /oxmsg;
2232 2 $chop = pop @char;
2233 2 $_ = join '', @char;
2234 }
2235 }
2236 2 return $chop;
2237 }
2238  
2239 #
2240 # UTF-8 index by octet
2241 #
2242 88 ▶sub Eutf2::index($$;$) {
Subroutine index: called CC=6 SCAR=18.0
Pod documented
2243  
2244 88 my($str,$substr,$position) = @_;
2245 88 ▶ $position ||= 0;
Condition100%2/2
$position ||= 0
l!l
286
MC/DC100%1/1
$position ||= 0
$position
Truth table100%2/2
A
A= $position
Aresult
11
00
2246 88 my $pos = 0;
2247  
2248 88 ▶ while ($pos < CORE::length($str)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pos < length $str) 386 84 470
2249 386 ▶ if (CORE::substr($str,$pos,CORE::length($substr)) eq $substr) {
Branch: 1 branch
BranchTrueFalseTotal
if (substr($str, $pos, length $substr) eq $substr) 6 380 386
2250 6 ▶ if ($pos >= $position) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pos >= $position) 4 2 6
2251 4 return $pos;
2252 }
2253 }
2254 382 ▶ if (CORE::substr($str,$pos) =~ /\A ($q_char) /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if (substr($str, $pos) =~ /\A ($Eutf2::q_char) /mosx) { } 382 0 382
2255 382 $pos += CORE::length($1);
2256 }
2257 else {
2258 0 $pos += 1;
2259 }
2260 }
2261 84 return -1;
2262 }
2263  
2264 #
2265 # UTF-8 reverse index
2266 #
2267 4 ▶sub Eutf2::rindex($$;$) {
Subroutine rindex: called CC=6 SCAR=18.0
Pod undocumented
2268  
2269 4 my($str,$substr,$position) = @_;
2270 4 ▶ $position ||= CORE::length($str) - 1;
Condition66%2/3
$position ||= length($str) - 1
l!l&&r!l&&!r
220
MC/DC0%0/2
$position ||= length($str) - 1
$position length($str) - 1
Truth table66%2/3
A ||= B
A= $positionB= length($str) - 1
ABresult
1X1
011
000
2271 4 my $pos = 0;
2272 4 my $rindex = -1;
2273  
2274 4 ▶ while (($pos < CORE::length($str)) and ($pos <= $position)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pos < length $str and $pos <= $position) 32 4 36
Condition100%3/3
$pos < length $str and $pos <= $position
!ll&&!rl&&r
2232
MC/DC100%2/2
$pos < length $str and $pos <= $position
$pos < length $str $pos <= $position
Truth table100%3/3
A and B
A= $pos < length $strB= $pos <= $position
ABresult
0X0
100
111
2275 32 ▶ if (CORE::substr($str,$pos,CORE::length($substr)) eq $substr) {
Branch: 1 branch
BranchTrueFalseTotal
if (substr($str, $pos, length $substr) eq $substr) 6 26 32
2276 6 $rindex = $pos;
2277 }
2278 32 ▶ if (CORE::substr($str,$pos) =~ /\A ($q_char) /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if (substr($str, $pos) =~ /\A ($Eutf2::q_char) /mosx) { } 32 0 32
2279 32 $pos += CORE::length($1);
2280 }
2281 else {
2282 0 $pos += 1;
2283 }
2284 }
2285 4 return $rindex;
2286 }
2287  
2288 #
2289 # UTF-8 lower case first with parameter
2290 #
2291 0 ▶sub Eutf2::lcfirst(@) {
Subroutine lcfirst: not called CC=4 SCAR=30.0
Pod undocumented
2292 0 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 0 0 0
2293 0 my $s = shift @_;
2294 0 ▶ if (@_ and wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ and wantarray) { } 0 0 0
Condition0%0/3
@_ and wantarray
!ll&&!rl&&r
000
MC/DC0%0/2
@_ and wantarray
@_ wantarray
Truth table0%0/3
A and B
A= @_B= wantarray
ABresult
0X0
100
111
2295 0 return Eutf2::lc(CORE::substr($s,0,1)) . CORE::substr($s,1), @_;
2296 }
2297 else {
2298 0 return Eutf2::lc(CORE::substr($s,0,1)) . CORE::substr($s,1);
2299 }
2300 }
2301 else {
2302 0 return Eutf2::lc(CORE::substr($_,0,1)) . CORE::substr($_,1);
2303 }
2304 }
2305  
2306 #
2307 # UTF-8 lower case first without parameter
2308 #
2309 0 ▶sub Eutf2::lcfirst_() {
Subroutine lcfirst_: not called CC=1 SCAR=6.9
Pod undocumented
2310 0 return Eutf2::lc(CORE::substr($_,0,1)) . CORE::substr($_,1);
2311 }
2312  
2313 #
2314 # UTF-8 lower case with parameter
2315 #
2316 14 ▶sub Eutf2::lc(@) {
Subroutine lc: called CC=6 SCAR=22.9
Pod undocumented
2317 14 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 14 0 14
2318 14 my $s = shift @_;
2319 14 ▶ if (@_ and wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ and wantarray) { } 0 14 14
Condition33%1/3
@_ and wantarray
!ll&&!rl&&r
1400
MC/DC0%0/2
@_ and wantarray
@_ wantarray
Truth table33%1/3
A and B
A= @_B= wantarray
ABresult
0X0
100
111
2320 0 ▶ return join('', map {defined($lc{$_}) ? $lc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg)), @_;
Branch: 1 branch
BranchTrueFalseTotal
defined $lc{$_} ? : 0 0 0
2321 }
2322 else {
2323 14 ▶ return join('', map {defined($lc{$_}) ? $lc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg));
Branch: 1 branch
BranchTrueFalseTotal
defined $lc{$_} ? : 39 14 53
2324 }
2325 }
2326 else {
2327 0 return Eutf2::lc_();
2328 }
2329 }
2330  
2331 #
2332 # UTF-8 lower case without parameter
2333 #
2334 0 ▶sub Eutf2::lc_() {
Subroutine lc_: not called CC=2 SCAR=17.9
Pod undocumented
2335 0 my $s = $_;
2336 0 ▶ return join '', map {defined($lc{$_}) ? $lc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg);
Branch: 1 branch
BranchTrueFalseTotal
defined $lc{$_} ? : 0 0 0
2337 }
2338  
2339 #
2340 # UTF-8 upper case first with parameter
2341 #
2342 0 ▶sub Eutf2::ucfirst(@) {
Subroutine ucfirst: not called CC=4 SCAR=30.0
Pod undocumented
2343 0 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 0 0 0
2344 0 my $s = shift @_;
2345 0 ▶ if (@_ and wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ and wantarray) { } 0 0 0
Condition0%0/3
@_ and wantarray
!ll&&!rl&&r
000
MC/DC0%0/2
@_ and wantarray
@_ wantarray
Truth table0%0/3
A and B
A= @_B= wantarray
ABresult
0X0
100
111
2346 0 return Eutf2::uc(CORE::substr($s,0,1)) . CORE::substr($s,1), @_;
2347 }
2348 else {
2349 0 return Eutf2::uc(CORE::substr($s,0,1)) . CORE::substr($s,1);
2350 }
2351 }
2352 else {
2353 0 return Eutf2::uc(CORE::substr($_,0,1)) . CORE::substr($_,1);
2354 }
2355 }
2356  
2357 #
2358 # UTF-8 upper case first without parameter
2359 #
2360 0 ▶sub Eutf2::ucfirst_() {
Subroutine ucfirst_: not called CC=1 SCAR=6.9
Pod undocumented
2361 0 return Eutf2::uc(CORE::substr($_,0,1)) . CORE::substr($_,1);
2362 }
2363  
2364 #
2365 # UTF-8 upper case with parameter
2366 #
2367 17008 ▶sub Eutf2::uc(@) {
Subroutine uc: called CC=6 SCAR=22.9
Pod undocumented
2368 17008 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 17008 0 17008
2369 17008 my $s = shift @_;
2370 17008 ▶ if (@_ and wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ and wantarray) { } 0 17008 17008
Condition33%1/3
@_ and wantarray
!ll&&!rl&&r
1700800
MC/DC0%0/2
@_ and wantarray
@_ wantarray
Truth table33%1/3
A and B
A= @_B= wantarray
ABresult
0X0
100
111
2371 0 ▶ return join('', map {defined($uc{$_}) ? $uc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg)), @_;
Branch: 1 branch
BranchTrueFalseTotal
defined $uc{$_} ? : 0 0 0
2372 }
2373 else {
2374 17008 ▶ return join('', map {defined($uc{$_}) ? $uc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg));
Branch: 1 branch
BranchTrueFalseTotal
defined $uc{$_} ? : 1481 15529 17010
2375 }
2376 }
2377 else {
2378 0 return Eutf2::uc_();
2379 }
2380 }
2381  
2382 #
2383 # UTF-8 upper case without parameter
2384 #
2385 0 ▶sub Eutf2::uc_() {
Subroutine uc_: not called CC=2 SCAR=17.9
Pod undocumented
2386 0 my $s = $_;
2387 0 ▶ return join '', map {defined($uc{$_}) ? $uc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg);
Branch: 1 branch
BranchTrueFalseTotal
defined $uc{$_} ? : 0 0 0
2388 }
2389  
2390 #
2391 # UTF-8 fold case with parameter
2392 #
2393 17100 ▶sub Eutf2::fc(@) {
Subroutine fc: called CC=6 SCAR=22.9
Pod undocumented
2394 17100 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 17100 0 17100
2395 17100 my $s = shift @_;
2396 17100 ▶ if (@_ and wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ and wantarray) { } 0 17100 17100
Condition33%1/3
@_ and wantarray
!ll&&!rl&&r
1710000
MC/DC0%0/2
@_ and wantarray
@_ wantarray
Truth table33%1/3
A and B
A= @_B= wantarray
ABresult
0X0
100
111
2397 0 ▶ return join('', map {defined($fc{$_}) ? $fc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg)), @_;
Branch: 1 branch
BranchTrueFalseTotal
defined $fc{$_} ? : 0 0 0
2398 }
2399 else {
2400 17100 ▶ return join('', map {defined($fc{$_}) ? $fc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg));
Branch: 1 branch
BranchTrueFalseTotal
defined $fc{$_} ? : 25994 88972 114966
2401 }
2402 }
2403 else {
2404 0 return Eutf2::fc_();
2405 }
2406 }
2407  
2408 #
2409 # UTF-8 fold case without parameter
2410 #
2411 0 ▶sub Eutf2::fc_() {
Subroutine fc_: not called CC=2 SCAR=17.9
Pod undocumented
2412 0 my $s = $_;
2413 0 ▶ return join '', map {defined($fc{$_}) ? $fc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg);
Branch: 1 branch
BranchTrueFalseTotal
defined $fc{$_} ? : 0 0 0
2414 }
2415  
2416 #
2417 # UTF-8 regexp capture
2418 #
2419 {
2420 0 ▶ sub Eutf2::capture {
Subroutine capture: not called CC=1 SCAR=6.9
Pod documented
2421 0 return $_[0];
2422 }
2423 }
2424  
2425 #
2426 # UTF-8 regexp ignore case modifier
2427 #
2428 629 ▶sub Eutf2::ignorecase {
Subroutine ignorecase: called CC=25 SCAR=52.5
Pod undocumented
2429  
2430 9 my @string = @_;
2431 9 my $metachar = qr/[\@\\|[\]{]/oxms;
2432  
2433 # ignore case of $scalar or @array
2434 9 for my $string (@string) {
2435  
2436 # split regexp
2437 9 my @char = $string =~ /\G (?>\[\^|\\$q_char|$q_char) /oxmsg;
2438  
2439 # unescape character
2440 9 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 24387 9 24396
2441 24387 ▶ next if not defined $char[$i];
Branch: 1 branch
BranchTrueFalseTotal
unless defined $char[$i] 0 24387 24387
2442  
2443 # open character class [...]
2444 24387 ▶ if ($char[$i] eq '[') {
Branch: 4 branches
BranchTrueFalseTotal
if ($char[$i] eq '[') { } 0 24387 24387
elsif ($char[$i] eq '[^') { } 0 24387 24387
elsif (my $char = classic_character_class($char[$i])) { } 0 24387 24387
elsif ($char[$i] =~ /\A [\x00-\xFF] \z/mosx) { } 12249 12138 24387
2445 0 my $left = $i;
2446  
2447 # [] make die "unmatched [] in regexp ...\n"
2448  
2449 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
2450 0 $i++;
2451 }
2452  
2453 0 while (1) {
2454 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
2455 0 croak "Unmatched [] in regexp";
2456 }
2457 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
2458 0 my $right = $i;
2459 0 my @charlist = charlist_qr(@char[$left+1..$right-1], 'i');
2460  
2461 # escape character
2462 0 for my $char (@charlist) {
2463 0 ▶ if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { $char =~ /\A [.|)] \z/mosx }) 0 0 0
2464 }
2465  
2466 0 elsif ($char =~ /\A [.|)] \z/oxms) {
2467 0 $char = '\\' . $char;
2468 }
2469 }
2470  
2471 # [...]
2472 0 splice @char, $left, $right-$left+1, '(?:' . join('|', @charlist) . ')';
2473  
2474 0 $i = $left;
2475 0 last;
2476 }
2477 }
2478 }
2479  
2480 # open character class [^...]
2481 elsif ($char[$i] eq '[^') {
2482 0 my $left = $i;
2483  
2484 # [^] make die "unmatched [] in regexp ...\n"
2485  
2486 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
2487 0 $i++;
2488 }
2489  
2490 0 while (1) {
2491 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
2492 0 croak "Unmatched [] in regexp";
2493 }
2494 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
2495 0 my $right = $i;
2496 0 my @charlist = charlist_not_qr(@char[$left+1..$right-1], 'i');
2497  
2498 # escape character
2499 0 for my $char (@charlist) {
2500 0 ▶ if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { $char =~ /\A [.|)] \z/mosx }) 0 0 0
2501 }
2502  
2503 0 elsif ($char =~ /\A [.|)] \z/oxms) {
2504 0 $char = '\\' . $char;
2505 }
2506 }
2507  
2508 # [^...]
2509 0 splice @char, $left, $right-$left+1, '(?!' . join('|', @charlist) . ")(?:$your_char)";
2510  
2511 0 $i = $left;
2512 0 last;
2513 }
2514 }
2515 }
2516  
2517 # rewrite classic character class or escape character
2518 elsif (my $char = classic_character_class($char[$i])) {
2519 0 $char[$i] = $char;
2520 }
2521  
2522 # with /i modifier
2523 elsif ($char[$i] =~ /\A [\x00-\xFF] \z/oxms) {
2524 12249 my $uc = Eutf2::uc($char[$i]);
2525 12249 my $fc = Eutf2::fc($char[$i]);
2526 12249 ▶ if ($uc ne $fc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($uc ne $fc) 361 11888 12249
2527 361 ▶ if (CORE::length($fc) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $fc == 1) { } 361 0 361
2528 361 $char[$i] = '[' . $uc . $fc . ']';
2529 }
2530 else {
2531 0 $char[$i] = '(?:' . $uc . '|' . $fc . ')';
2532 }
2533 }
2534 }
2535 }
2536  
2537 # characterize
2538 9 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 24387 9 24396
2539 24387 ▶ next if not defined $char[$i];
Branch: 1 branch
BranchTrueFalseTotal
unless defined $char[$i] 0 24387 24387
2540  
2541 24387 ▶ if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { $i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx }) 0 24396 24396
2542 }
2543  
2544 # quote character before ? + * {
2545 0 ▶ elsif (($i >= 1) and ($char[$i] =~ /\A [\?\+\*\{] \z/oxms)) {
Condition66%2/3
$i >= 1 && $char[$i] =~ /\A [\?\+\*\{] \z/mosx
!ll&&!rl&&r
9243780
MC/DC0%0/2
$i >= 1 && $char[$i] =~ /\A [\?\+\*\{] \z/mosx
$i >= 1 $char[$i] =~ /\A [\?\+\*\{] \z/mosx
Truth table66%2/3
A && B
A= $i >= 1B= $char[$i] =~ /\A [\?\+\*\{] \z/mosx
ABresult
0X0
100
111
2546 0 ▶ if ($char[$i-1] !~ /\A [\x00-\xFF] \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($char[$i - 1] =~ /\A [\x00-\xFF] \z/mosx) 0 0 0
2547 0 $char[$i-1] = '(?:' . $char[$i-1] . ')';
2548 }
2549 }
2550 }
2551  
2552 9 $string = join '', @char;
2553 }
2554  
2555 # make regexp string
2556 9 return @string;
2557 }
2558  
2559 #
2560 # classic character class ( \D \S \W \d \s \w \C \X \H \V \h \v \R \N \b \B )
2561 #
2562 27213 ▶sub Eutf2::classic_character_class {
Subroutine classic_character_class: called CC=2 SCAR=6.9
Pod undocumented
2563 27213 my($char) = @_;
2564  
2565 return {
2566 '\D' => '${Eutf2::eD}',
2567 '\S' => '${Eutf2::eS}',
2568 '\W' => '${Eutf2::eW}',
2569 '\d' => '[0-9]',
2570  
2571 # Before Perl 5.6, \s only matched the five whitespace characters
2572 # tab, newline, form-feed, carriage return, and the space character
2573 # itself, which, taken together, is the character class [\t\n\f\r ].
2574  
2575 # Vertical tabs are now whitespace
2576 # \s in a regex now matches a vertical tab in all circumstances.
2577 # http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Vertical_tabs_are_now_whitespace
2578 # \t \n \v \f \r space
2579 # '\s' => '[\x09\x0A \x0C\x0D\x20]',
2580 # '\s' => '[\x09\x0A\x0B\x0C\x0D\x20]',
2581 '\s' => '\s',
2582  
2583 '\w' => '[0-9A-Z_a-z]',
2584 '\C' => '[\x00-\xFF]',
2585 '\X' => 'X',
2586  
2587 # \h \v \H \V
2588  
2589 # P.114 Character Class Shortcuts
2590 # in Chapter 7: In the World of Regular Expressions
2591 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
2592  
2593 # P.357 13.2.3 Whitespace
2594 # in Chapter 13: perlrecharclass: Perl Regular Expression Character Classes
2595 # of ISBN-13: 978-1-906966-02-7 The Perl Language Reference Manual (for Perl version 5.12.1)
2596 #
2597 # 0x00009 CHARACTER TABULATION h s
2598 # 0x0000a LINE FEED (LF) vs
2599 # 0x0000b LINE TABULATION v
2600 # 0x0000c FORM FEED (FF) vs
2601 # 0x0000d CARRIAGE RETURN (CR) vs
2602 # 0x00020 SPACE h s
2603  
2604 # P.196 Table 5-9. Alphanumeric regex metasymbols
2605 # in Chapter 5. Pattern Matching
2606 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
2607  
2608 # (and so on)
2609  
2610 '\H' => '${Eutf2::eH}',
2611 '\V' => '${Eutf2::eV}',
2612 '\h' => '[\x09\x20]',
2613 '\v' => '[\x0A\x0B\x0C\x0D]',
2614 '\R' => '${Eutf2::eR}',
2615  
2616 # \N
2617 #
2618 # http://perldoc.perl.org/perlre.html
2619 # Character Classes and other Special Escapes
2620 # Any character but \n (experimental). Not affected by /s modifier
2621  
2622 '\N' => '${Eutf2::eN}',
2623  
2624 # \b \B
2625  
2626 # P.180 Boundaries: The \b and \B Assertions
2627 # in Chapter 5: Pattern Matching
2628 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
2629  
2630 # P.219 Boundaries: The \b and \B Assertions
2631 # in Chapter 5: Pattern Matching
2632 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
2633  
2634 # \b really means (?:(?<=\w)(?!\w)|(?<!\w)(?=\w))
2635 # or (?:(?<=\A|\W)(?=\w)|(?<=\w)(?=\W|\z))
2636 '\b' => '${Eutf2::eb}',
2637  
2638 # \B really means (?:(?<=\w)(?=\w)|(?<!\w)(?!\w))
2639 # or (?:(?<=\w)(?=\w)|(?<=\W)(?=\W))
2640 '\B' => '${Eutf2::eB}',
2641  
2642 27213 ▶ }->{$char} || '';
Condition100%2/2
{'\\D', '${Eutf2::eD}', '\\S', '${Eutf2::eS}', '\\W', '${Eutf2::eW}', '\\d', '[0-9]', '\\s', '\\s', '\\w', '[0-9A-Z_a-z]', '\\C', '[\\x00-\\xFF]', '\\X', 'X', '\\H', '${Eutf2::eH}', '\\V', '${Eutf2::eV}', '\\h', '[\\x09\\x20]', '\\v', '[\\x0A\\x0B\\x0C\\x0D]', '\\R', '${Eutf2::eR}', '\\N', '${Eutf2::eN}', '\\b', '${Eutf2::eb}', '\\B', '${Eutf2::eB}'}->{$char} || ''
l!l
12227091
MC/DC100%1/1
{'\\D', '${Eutf2::eD}', '\\S', '${Eutf2::eS}', '\\W', '${Eutf2::eW}', '\\d', '[0-9]', '\\s', '\\s', '\\w', '[0-9A-Z_a-z]', '\\C', '[\\x00-\\xFF]', '\\X', 'X', '\\H', '${Eutf2::eH}', '\\V', '${Eutf2::eV}', '\\h', '[\\x09\\x20]', '\\v', '[\\x0A\\x0B\\x0C\\x0D]', '\\R', '${Eutf2::eR}', '\\N', '${Eutf2::eN}', '\\b', '${Eutf2::eb}', '\\B', '${Eutf2::eB}'}->{$char} || ''
{'\\D', '${Eutf2::eD}', '\\S', '${Eutf2::eS}', '\\W', '${Eutf2::eW}', '\\d', '[0-9]', '\\s', '\\s', '\\w', '[0-9A-Z_a-z]', '\\C', '[\\x00-\\xFF]', '\\X', 'X', '\\H', '${Eutf2::eH}', '\\V', '${Eutf2::eV}', '\\h', '[\\x09\\x20]', '\\v', '[\\x0A\\x0B\\x0C\\x0D]', '\\R', '${Eutf2::eR}', '\\N', '${Eutf2::eN}', '\\b', '${Eutf2::eb}', '\\B', '${Eutf2::eB}'}->{$char}
Truth table100%2/2
A
A= {'\\D', '${Eutf2::eD}', '\\S', '${Eutf2::eS}', '\\W', '${Eutf2::eW}', '\\d', '[0-9]', '\\s', '\\s', '\\w', '[0-9A-Z_a-z]', '\\C', '[\\x00-\\xFF]', '\\X', 'X', '\\H', '${Eutf2::eH}', '\\V', '${Eutf2::eV}', '\\h', '[\\x09\\x20]', '\\v', '[\\x0A\\x0B\\x0C\\x0D]', '\\R', '${Eutf2::eR}', '\\N', '${Eutf2::eN}', '\\b', '${Eutf2::eb}', '\\B', '${Eutf2::eB}'}->{$char}
Aresult
11
00
2643 }
2644  
2645 #
2646 # prepare UTF-8 characters per length
2647 #
2648  
2649 # 1 octet characters
2650 629 my @chars1 = ();
2651 2 ▶sub chars1 {
Subroutine chars1: called CC=5 SCAR=16.1
Pod undocumented
2652 2 ▶ if (@chars1) {
Branch: 1 branch
BranchTrueFalseTotal
if (@chars1) 1 1 2
2653 1 return @chars1;
2654 }
2655 1 ▶ if (exists $range_tr{1}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $range_tr{1}) 1 0 1
2656 1 my @ranges = @{ $range_tr{1} };
2657 1 ▶ while (my @range = splice(@ranges,0,1)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@range) = splice(@ranges, 0, 1)) 2 1 3
2658 2 for my $oct0 (@{$range[0]}) {
2659 139 push @chars1, pack 'C', $oct0;
2660 }
2661 }
2662 }
2663 1 return @chars1;
2664 }
2665  
2666 # 2 octets characters
2667 629 my @chars2 = ();
2668 0 ▶sub chars2 {
Subroutine chars2: not called CC=6 SCAR=37.4
Pod undocumented
2669 0 ▶ if (@chars2) {
Branch: 1 branch
BranchTrueFalseTotal
if (@chars2) 0 0 0
2670 0 return @chars2;
2671 }
2672 0 ▶ if (exists $range_tr{2}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $range_tr{2}) 0 0 0
2673 0 my @ranges = @{ $range_tr{2} };
2674 0 ▶ while (my @range = splice(@ranges,0,2)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@range) = splice(@ranges, 0, 2)) 0 0 0
2675 0 for my $oct0 (@{$range[0]}) {
2676 0 for my $oct1 (@{$range[1]}) {
2677 0 push @chars2, pack 'CC', $oct0,$oct1;
2678 }
2679 }
2680 }
2681 }
2682 0 return @chars2;
2683 }
2684  
2685 # 3 octets characters
2686 629 my @chars3 = ();
2687 3 ▶sub chars3 {
Subroutine chars3: called CC=7 SCAR=19.5
Pod undocumented
2688 3 ▶ if (@chars3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@chars3) 2 1 3
2689 2 return @chars3;
2690 }
2691 1 ▶ if (exists $range_tr{3}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $range_tr{3}) 1 0 1
2692 1 my @ranges = @{ $range_tr{3} };
2693 1 ▶ while (my @range = splice(@ranges,0,3)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@range) = splice(@ranges, 0, 3)) 4 1 5
2694 4 for my $oct0 (@{$range[0]}) {
2695 16 for my $oct1 (@{$range[1]}) {
2696 960 for my $oct2 (@{$range[2]}) {
2697 61440 push @chars3, pack 'CCC', $oct0,$oct1,$oct2;
2698 }
2699 }
2700 }
2701 }
2702 }
2703 1 return @chars3;
2704 }
2705  
2706 # 4 octets characters
2707 629 my @chars4 = ();
2708 0 ▶sub chars4 {
Subroutine chars4: not called CC=8 SCAR=42.8
Pod undocumented
2709 0 ▶ if (@chars4) {
Branch: 1 branch
BranchTrueFalseTotal
if (@chars4) 0 0 0
2710 0 return @chars4;
2711 }
2712 0 ▶ if (exists $range_tr{4}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $range_tr{4}) 0 0 0
2713 0 my @ranges = @{ $range_tr{4} };
2714 0 ▶ while (my @range = splice(@ranges,0,4)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@range) = splice(@ranges, 0, 4)) 0 0 0
2715 0 for my $oct0 (@{$range[0]}) {
2716 0 for my $oct1 (@{$range[1]}) {
2717 0 for my $oct2 (@{$range[2]}) {
2718 0 for my $oct3 (@{$range[3]}) {
2719 0 push @chars4, pack 'CCCC', $oct0,$oct1,$oct2,$oct3;
2720 }
2721 }
2722 }
2723 }
2724 }
2725 }
2726 0 return @chars4;
2727 }
2728  
2729 #
2730 # UTF-8 open character list for tr
2731 #
2732 28 ▶sub _charlist_tr {
Subroutine _charlist_tr: called CC=35 SCAR=58.6
2733  
2734 28 local $_ = shift @_;
2735  
2736 # unescape character
2737 28 my @char = ();
2738 28 ▶ while (not /\G \z/oxmsgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgmosx) 86 28 114
2739 86 ▶ if (/\G (\\0?55|\\x2[Dd]|\\-) /oxmsgc) {
Branch: 7 branches
BranchTrueFalseTotal
if (/\G (\\0?55|\\x2[Dd]|\\-) /cgmosx) { } 0 86 86
elsif (/\G \\ ([0-7]{2,3}) /cgmosx) { } 0 86 86
elsif (/\G \\x ([0-9A-Fa-f]{1,2}) /cgmosx) { } 0 86 86
elsif (/\G \\c ([\x40-\x5F]) /cgmosx) { } 0 86 86
elsif (/\G (\\ [0nrtfbae]) /cgmosx) { } 0 86 86
elsif (/\G \\ ($Eutf2::q_char) /cgmosx) { } 0 86 86
elsif (/\G ($Eutf2::q_char) /cgmosx) { } 86 0 86
2740 0 push @char, '\-';
2741 }
2742 elsif (/\G \\ ([0-7]{2,3}) /oxmsgc) {
2743 0 push @char, CORE::chr(oct $1);
2744 }
2745 elsif (/\G \\x ([0-9A-Fa-f]{1,2}) /oxmsgc) {
2746 0 push @char, CORE::chr(hex $1);
2747 }
2748 elsif (/\G \\c ([\x40-\x5F]) /oxmsgc) {
2749 0 push @char, CORE::chr(CORE::ord($1) & 0x1F);
2750 }
2751 elsif (/\G (\\ [0nrtfbae]) /oxmsgc) {
2752 push @char, {
2753 '\0' => "\0",
2754 '\n' => "\n",
2755 '\r' => "\r",
2756 '\t' => "\t",
2757 '\f' => "\f",
2758 '\b' => "\x08", # \b means backspace in character class
2759 '\a' => "\a",
2760 '\e' => "\e",
2761 0 }->{$1};
2762 }
2763 elsif (/\G \\ ($q_char) /oxmsgc) {
2764 0 push @char, $1;
2765 }
2766 elsif (/\G ($q_char) /oxmsgc) {
2767 86 push @char, $1;
2768 }
2769 }
2770  
2771 # join separated multiple-octet
2772 28 @char = join('',@char) =~ /\G (?>\\-|$q_char) /oxmsg;
2773  
2774 # unescape '-'
2775 28 my @i = ();
2776 28 for my $i (0 .. $#char) {
2777 86 ▶ if ($char[$i] eq '\-') {
Branch: 2 branches
BranchTrueFalseTotal
if ($char[$i] eq '\\-') { } 0 86 86
elsif ($char[$i] eq '-') { } 5 81 86
2778 0 $char[$i] = '-';
2779 }
2780 elsif ($char[$i] eq '-') {
2781 5 ▶ if ((0 < $i) and ($i < $#char)) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $i and $i < $#char) 5 0 5
Condition33%1/3
0 < $i and $i < $#char
!ll&&!rl&&r
005
MC/DC0%0/2
0 < $i and $i < $#char
0 < $i $i < $#char
Truth table33%1/3
A and B
A= 0 < $iB= $i < $#char
ABresult
0X0
100
111
2782 5 push @i, $i;
2783 }
2784 }
2785 }
2786  
2787 # open character list (reverse for splice)
2788 28 for my $i (CORE::reverse @i) {
2789 5 my @range = ();
2790  
2791 # range error
2792 5 ▶ if ((CORE::length($char[$i-1]) > CORE::length($char[$i+1])) or ($char[$i-1] gt $char[$i+1])) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $char[$i - 1] > length $char[$i + 1] or $char[$i - 1] gt $char[$i + 1]) 0 5 5
Condition33%1/3
length $char[$i - 1] > length $char[$i + 1] or $char[$i - 1] gt $char[$i + 1]
l!l&&r!l&&!r
005
MC/DC0%0/2
length $char[$i - 1] > length $char[$i + 1] or $char[$i - 1] gt $char[$i + 1]
length $char[$i - 1] > length $char[$i + 1] $char[$i - 1] gt $char[$i + 1]
Truth table33%1/3
A or B
A= length $char[$i - 1] > length $char[$i + 1]B= $char[$i - 1] gt $char[$i + 1]
ABresult
1X1
011
000
2793 0 croak "Invalid tr/// range \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2794 }
2795  
2796 # range of multiple-octet code
2797 5 ▶ if (CORE::length($char[$i-1]) == 1) {
Branch: 4 branches
BranchTrueFalseTotal
if (length $char[$i - 1] == 1) { } 2 3 5
elsif (length $char[$i - 1] == 2) { } 0 3 3
elsif (length $char[$i - 1] == 3) { } 3 0 3
elsif (length $char[$i - 1] == 4) { } 0 0 0
2798 2 ▶ if (CORE::length($char[$i+1]) == 1) {
Branch: 4 branches
BranchTrueFalseTotal
if (length $char[$i + 1] == 1) { } 2 0 2
elsif (length $char[$i + 1] == 2) { } 0 0 0
elsif (length $char[$i + 1] == 3) { } 0 0 0
elsif (length $char[$i + 1] == 4) { } 0 0 0
2799 2 ▶ push @range, grep {($char[$i-1] le $_) and ($_ le $char[$i+1])} chars1();
Condition100%3/3
$char[$i - 1] le $_ && $_ le $char[$i + 1]
!ll&&!rl&&r
197756
MC/DC100%2/2
$char[$i - 1] le $_ && $_ le $char[$i + 1]
$char[$i - 1] le $_ $_ le $char[$i + 1]
Truth table100%3/3
A && B
A= $char[$i - 1] le $_B= $_ le $char[$i + 1]
ABresult
0X0
100
111
2800 }
2801 elsif (CORE::length($char[$i+1]) == 2) {
2802 0 push @range, grep {$char[$i-1] le $_} chars1();
2803 0 push @range, grep {$_ le $char[$i+1]} chars2();
2804 }
2805 elsif (CORE::length($char[$i+1]) == 3) {
2806 0 push @range, grep {$char[$i-1] le $_} chars1();
2807 0 push @range, chars2();
2808 0 push @range, grep {$_ le $char[$i+1]} chars3();
2809 }
2810 elsif (CORE::length($char[$i+1]) == 4) {
2811 0 push @range, grep {$char[$i-1] le $_} chars1();
2812 0 push @range, chars2();
2813 0 push @range, chars3();
2814 0 push @range, grep {$_ le $char[$i+1]} chars4();
2815 }
2816 else {
2817 0 croak "Invalid tr/// range (over 4octets) \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2818 }
2819 }
2820 elsif (CORE::length($char[$i-1]) == 2) {
2821 0 ▶ if (CORE::length($char[$i+1]) == 2) {
Branch: 3 branches
BranchTrueFalseTotal
if (length $char[$i + 1] == 2) { } 0 0 0
elsif (length $char[$i + 1] == 3) { } 0 0 0
elsif (length $char[$i + 1] == 4) { } 0 0 0
2822 0 ▶ push @range, grep {($char[$i-1] le $_) and ($_ le $char[$i+1])} chars2();
Condition0%0/3
$char[$i - 1] le $_ && $_ le $char[$i + 1]
!ll&&!rl&&r
000
MC/DC0%0/2
$char[$i - 1] le $_ && $_ le $char[$i + 1]
$char[$i - 1] le $_ $_ le $char[$i + 1]
Truth table0%0/3
A && B
A= $char[$i - 1] le $_B= $_ le $char[$i + 1]
ABresult
0X0
100
111
2823 }
2824 elsif (CORE::length($char[$i+1]) == 3) {
2825 0 push @range, grep {$char[$i-1] le $_} chars2();
2826 0 push @range, grep {$_ le $char[$i+1]} chars3();
2827 }
2828 elsif (CORE::length($char[$i+1]) == 4) {
2829 0 push @range, grep {$char[$i-1] le $_} chars2();
2830 0 push @range, chars3();
2831 0 push @range, grep {$_ le $char[$i+1]} chars4();
2832 }
2833 else {
2834 0 croak "Invalid tr/// range (over 4octets) \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2835 }
2836 }
2837 elsif (CORE::length($char[$i-1]) == 3) {
2838 3 ▶ if (CORE::length($char[$i+1]) == 3) {
Branch: 2 branches
BranchTrueFalseTotal
if (length $char[$i + 1] == 3) { } 3 0 3
elsif (length $char[$i + 1] == 4) { } 0 0 0
2839 3 ▶ push @range, grep {($char[$i-1] le $_) and ($_ le $char[$i+1])} chars3();
Condition100%3/3
$char[$i - 1] le $_ && $_ le $char[$i + 1]
!ll&&!rl&&r
3092715337815
MC/DC100%2/2
$char[$i - 1] le $_ && $_ le $char[$i + 1]
$char[$i - 1] le $_ $_ le $char[$i + 1]
Truth table100%3/3
A && B
A= $char[$i - 1] le $_B= $_ le $char[$i + 1]
ABresult
0X0
100
111
2840 }
2841 elsif (CORE::length($char[$i+1]) == 4) {
2842 0 push @range, grep {$char[$i-1] le $_} chars3();
2843 0 push @range, grep {$_ le $char[$i+1]} chars4();
2844 }
2845 else {
2846 0 croak "Invalid tr/// range (over 4octets) \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2847 }
2848 }
2849 elsif (CORE::length($char[$i-1]) == 4) {
2850 0 ▶ if (CORE::length($char[$i+1]) == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $char[$i + 1] == 4) { } 0 0 0
2851 0 ▶ push @range, grep {($char[$i-1] le $_) and ($_ le $char[$i+1])} chars4();
Condition0%0/3
$char[$i - 1] le $_ && $_ le $char[$i + 1]
!ll&&!rl&&r
000
MC/DC0%0/2
$char[$i - 1] le $_ && $_ le $char[$i + 1]
$char[$i - 1] le $_ $_ le $char[$i + 1]
Truth table0%0/3
A && B
A= $char[$i - 1] le $_B= $_ le $char[$i + 1]
ABresult
0X0
100
111
2852 }
2853 else {
2854 0 croak "Invalid tr/// range (over 4octets) \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2855 }
2856 }
2857 else {
2858 0 croak "Invalid tr/// range (over 4octets) \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2859 }
2860  
2861 5 splice @char, $i-1, 3, @range;
2862 }
2863  
2864 28 return @char;
2865 }
2866  
2867 #
2868 # UTF-8 open character class
2869 #
2870 2916 ▶sub _cc {
Subroutine _cc: called CC=7 SCAR=23.4
2871 2916 ▶ if (scalar(@_) == 0) {
Branch: 3 branches
BranchTrueFalseTotal
if (scalar @_ == 0) { } 0 2916 2916
elsif (scalar @_ == 1) { } 1384 1532 2916
elsif (scalar @_ == 2) { } 1532 0 1532
2872 0 die __FILE__, ": subroutine cc got no parameter.\n";
2873 }
2874 elsif (scalar(@_) == 1) {
2875 1384 return sprintf('\x%02X',$_[0]);
2876 }
2877 elsif (scalar(@_) == 2) {
2878 1532 ▶ if ($_[0] > $_[1]) {
Branch: 3 branches
BranchTrueFalseTotal
if ($_[0] > $_[1]) { } 0 1532 1532
elsif ($_[0] == $_[1]) { } 160 1372 1532
elsif ($_[0] + 1 == $_[1]) { } 0 1372 1372
2879 0 die __FILE__, ": subroutine cc got \$_[0] > \$_[1] parameters).\n";
2880 }
2881 elsif ($_[0] == $_[1]) {
2882 160 return sprintf('\x%02X',$_[0]);
2883 }
2884 elsif (($_[0]+1) == $_[1]) {
2885 0 return sprintf('[\\x%02X\\x%02X]',$_[0],$_[1]);
2886 }
2887 else {
2888 1372 return sprintf('[\\x%02X-\\x%02X]',$_[0],$_[1]);
2889 }
2890 }
2891 else {
2892 0 die __FILE__, ": subroutine cc got 3 or more parameters (@{[scalar(@_)]} parameters).\n";
2893 }
2894 }
2895  
2896 #
2897 # UTF-8 octet range
2898 #
2899 1002 ▶sub _octets {
Subroutine _octets: called CC=20 SCAR=44.0
2900 1002 my $length = shift @_;
2901  
2902 1002 ▶ if ($length == 1) {
Branch: 4 branches
BranchTrueFalseTotal
if ($length == 1) { } 590 412 1002
elsif ($length == 2) { } 80 332 412
elsif ($length == 3) { } 332 0 332
elsif ($length == 4) { } 0 0 0
2903 590 my($a1) = unpack 'C', $_[0];
2904 590 my($z1) = unpack 'C', $_[1];
2905  
2906 590 ▶ if ($a1 > $z1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($a1 > $z1) 0 590 590
2907 0 croak 'Invalid [] range in regexp (CORE::ord(A) > CORE::ord(B)) ' . '\x' . unpack('H*',$a1) . '-\x' . unpack('H*',$z1);
2908 }
2909  
2910 590 ▶ if ($a1 == $z1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a1 == $z1) { } 0 590 590
elsif ($a1 + 1 == $z1) { } 0 590 590
2911 0 return sprintf('\x%02X',$a1);
2912 }
2913 elsif (($a1+1) == $z1) {
2914 0 return sprintf('\x%02X\x%02X',$a1,$z1);
2915 }
2916 else {
2917 590 return sprintf('\x%02X-\x%02X',$a1,$z1);
2918 }
2919 }
2920 elsif ($length == 2) {
2921 80 my($a1,$a2) = unpack 'CC', $_[0];
2922 80 my($z1,$z2) = unpack 'CC', $_[1];
2923 80 my($A1,$A2) = unpack 'CC', $_[2];
2924 80 my($Z1,$Z2) = unpack 'CC', $_[3];
2925  
2926 80 ▶ if ($a1 == $z1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a1 == $z1) { } 0 80 80
elsif ($a1 + 1 == $z1) { } 0 80 80
2927 return (
2928 # 11111111 222222222222
2929 # A A Z
2930 0 _cc($a1) . _cc($a2,$z2), # a2-z2
2931 );
2932 }
2933 elsif (($a1+1) == $z1) {
2934 return (
2935 # 11111111111 222222222222
2936 # A Z A Z
2937 0 _cc($a1) . _cc($a2,$Z2), # a2-
2938 _cc( $z1) . _cc($A2,$z2), # -z2
2939 );
2940 }
2941 else {
2942 return (
2943 # 1111111111111111 222222222222
2944 # A Z A Z
2945 80 _cc($a1) . _cc($a2,$Z2), # a2-
2946 _cc($a1+1,$z1-1) . _cc($A2,$Z2), # -
2947 _cc( $z1) . _cc($A2,$z2), # -z2
2948 );
2949 }
2950 }
2951 elsif ($length == 3) {
2952 332 my($a1,$a2,$a3) = unpack 'CCC', $_[0];
2953 332 my($z1,$z2,$z3) = unpack 'CCC', $_[1];
2954 332 my($A1,$A2,$A3) = unpack 'CCC', $_[2];
2955 332 my($Z1,$Z2,$Z3) = unpack 'CCC', $_[3];
2956  
2957 332 ▶ if ($a1 == $z1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a1 == $z1) { } 252 80 332
elsif ($a1 + 1 == $z1) { } 0 80 80
2958 252 ▶ if ($a2 == $z2) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a2 == $z2) { } 172 80 252
elsif ($a2 + 1 == $z2) { } 0 80 80
2959 return (
2960 # 11111111 22222222 333333333333
2961 # A A A Z
2962 172 _cc($a1) . _cc($a2) . _cc($a3,$z3), # a3-z3
2963 );
2964 }
2965 elsif (($a2+1) == $z2) {
2966 return (
2967 # 11111111 22222222222 333333333333
2968 # A A Z A Z
2969 0 _cc($a1) . _cc($a2) . _cc($a3,$Z3), # a3-
2970 _cc($a1) . _cc( $z2) . _cc($A3,$z3), # -z3
2971 );
2972 }
2973 else {
2974 return (
2975 # 11111111 2222222222222222 333333333333
2976 # A A Z A Z
2977 80 _cc($a1) . _cc($a2) . _cc($a3,$Z3), # a3-
2978 _cc($a1) . _cc($a2+1,$z2-1) . _cc($A3,$Z3), # -
2979 _cc($a1) . _cc( $z2) . _cc($A3,$z3), # -z3
2980 );
2981 }
2982 }
2983 elsif (($a1+1) == $z1) {
2984 return (
2985 # 11111111111 22222222222222 333333333333
2986 # A Z A Z A Z
2987 0 _cc($a1) . _cc($a2) . _cc($a3,$Z3), # a3-
2988 _cc($a1) . _cc($a2+1,$Z2) . _cc($A3,$Z3), # -
2989 _cc( $z1) . _cc($A2,$z2-1) . _cc($A3,$Z3), # -
2990 _cc( $z1) . _cc( $z2) . _cc($A3,$z3), # -z3
2991 );
2992 }
2993 else {
2994 return (
2995 # 1111111111111111 22222222222222 333333333333
2996 # A Z A Z A Z
2997 80 _cc($a1) . _cc($a2) . _cc($a3,$Z3), # a3-
2998 _cc($a1) . _cc($a2+1,$Z2) . _cc($A3,$Z3), # -
2999 _cc($a1+1,$z1-1) . _cc($A2,$Z2) . _cc($A3,$Z3), # -
3000 _cc( $z1) . _cc($A2,$z2-1) . _cc($A3,$Z3), # -
3001 _cc( $z1) . _cc( $z2) . _cc($A3,$z3), # -z3
3002 );
3003 }
3004 }
3005 elsif ($length == 4) {
3006 0 my($a1,$a2,$a3,$a4) = unpack 'CCCC', $_[0];
3007 0 my($z1,$z2,$z3,$z4) = unpack 'CCCC', $_[1];
3008 0 my($A1,$A2,$A3,$A4) = unpack 'CCCC', $_[0];
3009 0 my($Z1,$Z2,$Z3,$Z4) = unpack 'CCCC', $_[1];
3010  
3011 0 ▶ if ($a1 == $z1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a1 == $z1) { } 0 0 0
elsif ($a1 + 1 == $z1) { } 0 0 0
3012 0 ▶ if ($a2 == $z2) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a2 == $z2) { } 0 0 0
elsif ($a2 + 1 == $z2) { } 0 0 0
3013 0 ▶ if ($a3 == $z3) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a3 == $z3) { } 0 0 0
elsif ($a3 + 1 == $z3) { } 0 0 0
3014 return (
3015 # 11111111 22222222 33333333 444444444444
3016 # A A A A Z
3017 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$z4), # a4-z4
3018 );
3019 }
3020 elsif (($a3+1) == $z3) {
3021 return (
3022 # 11111111 22222222 33333333333 444444444444
3023 # A A A Z A Z
3024 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3025 _cc($a1) . _cc($a2) . _cc( $z3) . _cc($A4,$z4), # -z4
3026 );
3027 }
3028 else {
3029 return (
3030 # 11111111 22222222 3333333333333333 444444444444
3031 # A A A Z A Z
3032 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3033 _cc($a1) . _cc($a2) . _cc($a3+1,$z3-1) . _cc($A4,$Z4), # -
3034 _cc($a1) . _cc($a2) . _cc( $z3) . _cc($A4,$z4), # -z4
3035 );
3036 }
3037 }
3038 elsif (($a2+1) == $z2) {
3039 return (
3040 # 11111111 22222222222 33333333333333 444444444444
3041 # A A Z A Z A Z
3042 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3043 _cc($a1) . _cc($a2) . _cc($a3+1,$Z3) . _cc($A4,$Z4), # -
3044 _cc($a1) . _cc( $z2) . _cc($A3,$z3-1) . _cc($A4,$Z4), # -
3045 _cc($a1) . _cc( $z2) . _cc( $z3) . _cc($A4,$z4), # -z4
3046 );
3047 }
3048 else {
3049 return (
3050 # 11111111 2222222222222222 33333333333333 444444444444
3051 # A A Z A Z A Z
3052 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3053 _cc($a1) . _cc($a2) . _cc($a3+1,$Z3) . _cc($A4,$Z4), # -
3054 _cc($a1) . _cc($a2+1,$z2-1) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3055 _cc($a1) . _cc( $z2) . _cc($A3,$z3-1) . _cc($A4,$Z4), # -
3056 _cc($a1) . _cc( $z2) . _cc( $z3) . _cc($A4,$z4), # -z4
3057 );
3058 }
3059 }
3060 elsif (($a1+1) == $z1) {
3061 return (
3062 # 11111111111 22222222222222 33333333333333 444444444444
3063 # A Z A Z A Z A Z
3064 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3065 _cc($a1) . _cc($a2) . _cc($a3+1,$Z3) . _cc($A4,$Z4), # -
3066 _cc($a1) . _cc($a2+1,$Z2) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3067 _cc( $z1) . _cc($A2,$z2-1) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3068 _cc( $z1) . _cc( $z2) . _cc($A3,$z3-1) . _cc($A4,$Z4), # -
3069 _cc( $z1) . _cc( $z2) . _cc( $z3) . _cc($A4,$z4), # -z4
3070 );
3071 }
3072 else {
3073 return (
3074 # 1111111111111111 22222222222222 33333333333333 444444444444
3075 # A Z A Z A Z A Z
3076 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3077 _cc($a1) . _cc($a2) . _cc($a3+1,$Z3) . _cc($A4,$Z4), # -
3078 _cc($a1) . _cc($a2+1,$Z2) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3079 _cc($a1+1,$z1-1) . _cc($A2,$Z2) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3080 _cc( $z1) . _cc($A2,$z2-1) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3081 _cc( $z1) . _cc( $z2) . _cc($A3,$z3-1) . _cc($A4,$Z4), # -
3082 _cc( $z1) . _cc( $z2) . _cc( $z3) . _cc($A4,$z4), # -z4
3083 );
3084 }
3085 }
3086 else {
3087 0 die __FILE__, ": subroutine _octets got invalid length ($length).\n";
3088 }
3089 }
3090  
3091 #
3092 # UTF-8 range regexp
3093 #
3094 842 ▶sub _range_regexp {
Subroutine _range_regexp: called CC=18 SCAR=30.2
3095 842 my($length,$first,$last) = @_;
3096  
3097 842 my @range_regexp = ();
3098 842 ▶ if (not exists $range_tr{$length}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $range_tr{$length}) 0 842 842
3099 0 return @range_regexp;
3100 }
3101  
3102 842 my @ranges = @{ $range_tr{$length} };
3103 842 ▶ while (my @range = splice(@ranges,0,$length)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@range) = splice(@ranges, 0, $length)) 2108 842 2950
3104 2108 my $min = '';
3105 2108 my $max = '';
3106 2108 ▶ for (my $i=0; $i < $length; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i < $length) 4204 2108 6312
3107 4204 $min .= pack 'C', $range[$i][0];
3108 4204 $max .= pack 'C', $range[$i][-1];
3109 }
3110  
3111 # min___max
3112 # FIRST_____________LAST
3113 # (nothing)
3114  
3115 2108 ▶ if ($max lt $first) {
Branch: 7 branches
BranchTrueFalseTotal
if ($max lt $first) { } 172 1936 2108
elsif ($min le $first and $first le $max and $max le $last) { } 88 1848 1936
elsif ($min eq $first and $max eq $last) { } 0 1848 1848
elsif ($first le $min and $max le $last) { } 240 1608 1848
elsif ($min le $first and $last le $max) { } 594 1014 1608
elsif ($first le $min and $min le $last and $last le $max) { } 80 934 1014
elsif ($last lt $min) { } 934 0 934
3116 }
3117  
3118 # **********
3119 # min_________max
3120 # FIRST_____________LAST
3121 # **********
3122  
3123 ▶ elsif (($min le $first) and ($first le $max) and ($max le $last)) {
Condition83%5/6
$min le $first and $first le $max and $max le $last
!ll&&!rl&&r
125459488
$min le $first and $first le $max
!ll&&!rl&&r
12540682
MC/DC66%2/3
$min le $first and $first le $max and $max le $last
$min le $first $first le $max $max le $last
Truth table75%3/4
A and B and C
A= $min le $firstB= $first le $maxC= $max le $last
ABCresult
0XX0
10X0
1100
1111
3124 88 push @range_regexp, _octets($length,$first,$max,$min,$max);
3125 }
3126  
3127 # **********************
3128 # min________________max
3129 # FIRST_____________LAST
3130 # **********************
3131  
3132 ▶ elsif (($min eq $first) and ($max eq $last)) {
Condition33%1/3
$min eq $first and $max eq $last
!ll&&!rl&&r
184800
MC/DC0%0/2
$min eq $first and $max eq $last
$min eq $first $max eq $last
Truth table33%1/3
A and B
A= $min eq $firstB= $max eq $last
ABresult
0X0
100
111
3133 0 push @range_regexp, _octets($length,$first,$last,$min,$max);
3134 }
3135  
3136 # *********
3137 # min___max
3138 # FIRST_____________LAST
3139 # *********
3140  
3141 ▶ elsif (($first le $min) and ($max le $last)) {
Condition100%3/3
$first le $min and $max le $last
!ll&&!rl&&r
5941014240
MC/DC100%2/2
$first le $min and $max le $last
$first le $min $max le $last
Truth table100%3/3
A and B
A= $first le $minB= $max le $last
ABresult
0X0
100
111
3142 240 push @range_regexp, _octets($length,$min,$max,$min,$max);
3143 }
3144  
3145 # **********************
3146 # min__________________________max
3147 # FIRST_____________LAST
3148 # **********************
3149  
3150 ▶ elsif (($min le $first) and ($last le $max)) {
Condition66%2/3
$min le $first and $last le $max
!ll&&!rl&&r
10140594
MC/DC50%1/2
$min le $first and $last le $max
$min le $first $last le $max
Truth table66%2/3
A and B
A= $min le $firstB= $last le $max
ABresult
0X0
100
111
3151 594 push @range_regexp, _octets($length,$first,$last,$min,$max);
3152 }
3153  
3154 # *********
3155 # min________max
3156 # FIRST_____________LAST
3157 # *********
3158  
3159 ▶ elsif (($first le $min) and ($min le $last) and ($last le $max)) {
Condition66%4/6
$first le $min and $min le $last and $last le $max
!ll&&!rl&&r
934080
$first le $min and $min le $last
!ll&&!rl&&r
093480
MC/DC33%1/3
$first le $min and $min le $last and $last le $max
$first le $min $min le $last $last le $max
Truth table50%2/4
A and B and C
A= $first le $minB= $min le $lastC= $last le $max
ABCresult
0XX0
10X0
1100
1111
3160 80 push @range_regexp, _octets($length,$min,$last,$min,$max);
3161 }
3162  
3163 # min___max
3164 # FIRST_____________LAST
3165 # (nothing)
3166  
3167 elsif ($last lt $min) {
3168 }
3169  
3170 else {
3171 0 die __FILE__, ": subroutine _range_regexp panic.\n";
3172 }
3173 }
3174  
3175 842 return @range_regexp;
3176 }
3177  
3178 #
3179 # UTF-8 open character list for qr and not qr
3180 #
3181 1184 ▶sub _charlist {
Subroutine _charlist: called CC=46 SCAR=41.0
3182  
3183 1184 my $modifier = pop @_;
3184 1184 my @char = @_;
3185  
3186 1184 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 354 830 1184
3187  
3188 # unescape character
3189 1184 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 3446 1184 4630
3190  
3191 # escape - to ...
3192 3446 ▶ if ($char[$i] eq '-') {
Branch: 12 branches
BranchTrueFalseTotal
if ($char[$i] eq '-') { } 708 2738 3446
elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/mosx) { } 0 2738 2738
elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/mosx) { } 0 2738 2738
elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/mosx) { } 0 2738 2738
elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/mosx) { } 0 2738 2738
elsif ($char[$i] =~ /\A \\ ([0-7]{2,3}) \z/mosx) { } 0 2738 2738
elsif ($char[$i] =~ /\A \\x ([0-9A-Fa-f]{1,2}) \z/mosx) { } 206 2532 2738
elsif ($char[$i] =~ /\A \\c ([\x40-\x5F]) \z/mosx) { } 0 2532 2532
elsif ($char[$i] =~ /\A (\\ [0nrtfbaedswDSWHVhvR]) \z/mosx) { } 33 2499 2532
elsif ($ignorecase and $char[$i] =~ /\A ( \[\: \^? (?:lower|upper) :\] ) \z/mosx) { } 8 2491 2499
elsif ($char[$i] =~ /\A ( \[\: \^? (?:alnum|alpha|ascii|blank|cntrl|digit|graph|lower|print|punct|space|upper|word|xdigit) :\] ) \z/mosx) { } 70 2421 2491
elsif ($char[$i] =~ /\A \\ ($Eutf2::q_char) \z/mosx) { } 7 2414 2421
3193 708 ▶ if ((0 < $i) and ($i < $#char)) {
Branch: 1 branch
BranchTrueFalseTotal
if (0 < $i and $i < $#char) 683 25 708
Condition100%3/3
0 < $i and $i < $#char
!ll&&!rl&&r
205683
MC/DC100%2/2
0 < $i and $i < $#char
0 < $i $i < $#char
Truth table100%3/3
A and B
A= 0 < $iB= $i < $#char
ABresult
0X0
100
111
3194 683 $char[$i] = '...';
3195 }
3196 }
3197  
3198 # octal escape sequence
3199 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
3200 0 $char[$i] = octchr($1);
3201 }
3202  
3203 # hexadecimal escape sequence
3204 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
3205 0 $char[$i] = hexchr($1);
3206 }
3207  
3208 # \b{...} --> b\{...}
3209 # \B{...} --> B\{...}
3210 # \N{CHARNAME} --> N\{CHARNAME}
3211 # \p{PROPERTY} --> p\{PROPERTY}
3212 # \P{PROPERTY} --> P\{PROPERTY}
3213 elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
3214 0 $char[$i] = $1 . '\\' . $2;
3215 }
3216  
3217 # \p, \P, \X --> p, P, X
3218 elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/oxms) {
3219 0 $char[$i] = $1;
3220 }
3221  
3222 elsif ($char[$i] =~ /\A \\ ([0-7]{2,3}) \z/oxms) {
3223 0 $char[$i] = CORE::chr oct $1;
3224 }
3225 elsif ($char[$i] =~ /\A \\x ([0-9A-Fa-f]{1,2}) \z/oxms) {
3226 206 $char[$i] = CORE::chr hex $1;
3227 }
3228 elsif ($char[$i] =~ /\A \\c ([\x40-\x5F]) \z/oxms) {
3229 0 $char[$i] = CORE::chr(CORE::ord($1) & 0x1F);
3230 }
3231 elsif ($char[$i] =~ /\A (\\ [0nrtfbaedswDSWHVhvR]) \z/oxms) {
3232 $char[$i] = {
3233 '\0' => "\0",
3234 '\n' => "\n",
3235 '\r' => "\r",
3236 '\t' => "\t",
3237 '\f' => "\f",
3238 '\b' => "\x08", # \b means backspace in character class
3239 '\a' => "\a",
3240 '\e' => "\e",
3241 '\d' => '[0-9]',
3242  
3243 # Vertical tabs are now whitespace
3244 # \s in a regex now matches a vertical tab in all circumstances.
3245 # http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Vertical_tabs_are_now_whitespace
3246 # \t \n \v \f \r space
3247 # '\s' => '[\x09\x0A \x0C\x0D\x20]',
3248 # '\s' => '[\x09\x0A\x0B\x0C\x0D\x20]',
3249 '\s' => '\s',
3250  
3251 '\w' => '[0-9A-Z_a-z]',
3252 '\D' => '${Eutf2::eD}',
3253 '\S' => '${Eutf2::eS}',
3254 '\W' => '${Eutf2::eW}',
3255  
3256 '\H' => '${Eutf2::eH}',
3257 '\V' => '${Eutf2::eV}',
3258 '\h' => '[\x09\x20]',
3259 '\v' => '[\x0A\x0B\x0C\x0D]',
3260 '\R' => '${Eutf2::eR}',
3261  
3262 33 }->{$1};
3263 }
3264  
3265 # POSIX-style character classes
3266 ▶ elsif ($ignorecase and ($char[$i] =~ /\A ( \[\: \^? (?:lower|upper) :\] ) \z/oxms)) {
Condition100%3/3
$ignorecase and $char[$i] =~ /\A ( \[\: \^? (?:lower|upper) :\] ) \z/mosx
!ll&&!rl&&r
17057868
MC/DC100%2/2
$ignorecase and $char[$i] =~ /\A ( \[\: \^? (?:lower|upper) :\] ) \z/mosx
$ignorecase $char[$i] =~ /\A ( \[\: \^? (?:lower|upper) :\] ) \z/mosx
Truth table100%3/3
A and B
A= $ignorecaseB= $char[$i] =~ /\A ( \[\: \^? (?:lower|upper) :\] ) \z/mosx
ABresult
0X0
100
111
3267 $char[$i] = {
3268  
3269 '[:lower:]' => '[\x41-\x5A\x61-\x7A]',
3270 '[:upper:]' => '[\x41-\x5A\x61-\x7A]',
3271 '[:^lower:]' => '${Eutf2::not_lower_i}',
3272 '[:^upper:]' => '${Eutf2::not_upper_i}',
3273  
3274 8 }->{$1};
3275 }
3276 elsif ($char[$i] =~ /\A ( \[\: \^? (?:alnum|alpha|ascii|blank|cntrl|digit|graph|lower|print|punct|space|upper|word|xdigit) :\] ) \z/oxms) {
3277 $char[$i] = {
3278  
3279 '[:alnum:]' => '[\x30-\x39\x41-\x5A\x61-\x7A]',
3280 '[:alpha:]' => '[\x41-\x5A\x61-\x7A]',
3281 '[:ascii:]' => '[\x00-\x7F]',
3282 '[:blank:]' => '[\x09\x20]',
3283 '[:cntrl:]' => '[\x00-\x1F\x7F]',
3284 '[:digit:]' => '[\x30-\x39]',
3285 '[:graph:]' => '[\x21-\x7F]',
3286 '[:lower:]' => '[\x61-\x7A]',
3287 '[:print:]' => '[\x20-\x7F]',
3288 '[:punct:]' => '[\x21-\x2F\x3A-\x3F\x40\x5B-\x5F\x60\x7B-\x7E]',
3289  
3290 # P.174 POSIX-Style Character Classes
3291 # in Chapter 5: Pattern Matching
3292 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
3293  
3294 # P.311 11.2.4 Character Classes and other Special Escapes
3295 # in Chapter 11: perlre: Perl regular expressions
3296 # of ISBN-13: 978-1-906966-02-7 The Perl Language Reference Manual (for Perl version 5.12.1)
3297  
3298 # P.210 POSIX-Style Character Classes
3299 # in Chapter 5: Pattern Matching
3300 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
3301  
3302 '[:space:]' => '[\s\x0B]', # "\s" plus vertical tab ("\cK")
3303  
3304 '[:upper:]' => '[\x41-\x5A]',
3305 '[:word:]' => '[\x30-\x39\x41-\x5A\x5F\x61-\x7A]',
3306 '[:xdigit:]' => '[\x30-\x39\x41-\x46\x61-\x66]',
3307 '[:^alnum:]' => '${Eutf2::not_alnum}',
3308 '[:^alpha:]' => '${Eutf2::not_alpha}',
3309 '[:^ascii:]' => '${Eutf2::not_ascii}',
3310 '[:^blank:]' => '${Eutf2::not_blank}',
3311 '[:^cntrl:]' => '${Eutf2::not_cntrl}',
3312 '[:^digit:]' => '${Eutf2::not_digit}',
3313 '[:^graph:]' => '${Eutf2::not_graph}',
3314 '[:^lower:]' => '${Eutf2::not_lower}',
3315 '[:^print:]' => '${Eutf2::not_print}',
3316 '[:^punct:]' => '${Eutf2::not_punct}',
3317 '[:^space:]' => '${Eutf2::not_space}',
3318 '[:^upper:]' => '${Eutf2::not_upper}',
3319 '[:^word:]' => '${Eutf2::not_word}',
3320 '[:^xdigit:]' => '${Eutf2::not_xdigit}',
3321  
3322 70 }->{$1};
3323 }
3324 elsif ($char[$i] =~ /\A \\ ($q_char) \z/oxms) {
3325 7 $char[$i] = $1;
3326 }
3327 }
3328  
3329 # open character list
3330 1184 my @singleoctet = ();
3331 1184 my @multipleoctet = ();
3332 1184 ▶ for (my $i=0; $i <= $#char; ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 2763 1183 3946
3333  
3334 # escaped -
3335 2763 ▶ if (defined($char[$i+1]) and ($char[$i+1] eq '...')) {
Branch: 6 branches
BranchTrueFalseTotal
if (defined $char[$i + 1] and $char[$i + 1] eq '...') { } 683 2080 2763
elsif ($char[$i] eq '...') { } 683 1397 2080
elsif ($char[$i] =~ /\A [\x00-\xFF] \z/mosx) { } 764 633 1397
elsif ($char[$i] =~ /\A (?: \\h ) \z/mosx) { } 0 633 633
elsif ($char[$i] =~ /\A (?: \\v ) \z/mosx) { } 0 633 633
elsif ($char[$i] =~ /\A (?: \\d | \\s | \\w ) \z/mosx) { } 2 631 633
Condition100%3/3
defined $char[$i + 1] and $char[$i + 1] eq "..."
!ll&&!rl&&r
5591521683
MC/DC100%2/2
defined $char[$i + 1] and $char[$i + 1] eq "..."
defined $char[$i + 1] $char[$i + 1] eq "..."
Truth table100%3/3
A and B
A= defined $char[$i + 1]B= $char[$i + 1] eq "..."
ABresult
0X0
100
111
3336 683 $i += 1;
3337 683 next;
3338 }
3339  
3340 # make range regexp
3341 elsif ($char[$i] eq '...') {
3342  
3343 # range error
3344 683 ▶ if (CORE::length($char[$i-1]) > CORE::length($char[$i+1])) {
Branch: 2 branches
BranchTrueFalseTotal
if (length $char[$i - 1] > length $char[$i + 1]) { } 0 683 683
elsif (length $char[$i - 1] == length $char[$i + 1]) { } 603 80 683
3345 0 croak 'Invalid [] range in regexp (length(A) > length(B)) ' . '\x' . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]);
3346 }
3347 elsif (CORE::length($char[$i-1]) == CORE::length($char[$i+1])) {
3348 603 ▶ if ($char[$i-1] gt $char[$i+1]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i - 1] gt $char[$i + 1]) 1 602 603
3349 1 croak 'Invalid [] range in regexp (CORE::ord(A) > CORE::ord(B)) ' . '\x' . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]);
3350 }
3351 }
3352  
3353 # make range regexp per length
3354 682 for my $length (CORE::length($char[$i-1]) .. CORE::length($char[$i+1])) {
3355 842 my @regexp = ();
3356  
3357 # is first and last
3358 842 ▶ if (($length == CORE::length($char[$i-1])) and ($length == CORE::length($char[$i+1]))) {
Branch: 4 branches
BranchTrueFalseTotal
if ($length == length $char[$i - 1] and $length == length $char[$i + 1]) { } 602 240 842
elsif ($length == length $char[$i - 1]) { } 80 160 240
elsif (length $char[$i - 1] < $length and $length < length $char[$i + 1]) { } 80 80 160
elsif ($length == length $char[$i + 1]) { } 80 0 80
Condition100%3/3
$length == length $char[$i - 1] and $length == length $char[$i + 1]
!ll&&!rl&&r
16080602
MC/DC100%2/2
$length == length $char[$i - 1] and $length == length $char[$i + 1]
$length == length $char[$i - 1] $length == length $char[$i + 1]
Truth table100%3/3
A and B
A= $length == length $char[$i - 1]B= $length == length $char[$i + 1]
ABresult
0X0
100
111
3359 602 push @regexp, _range_regexp($length, $char[$i-1], $char[$i+1]);
3360 }
3361  
3362 # is first
3363 elsif ($length == CORE::length($char[$i-1])) {
3364 80 push @regexp, _range_regexp($length, $char[$i-1], "\xFF" x $length);
3365 }
3366  
3367 # is inside in first and last
3368 ▶ elsif ((CORE::length($char[$i-1]) < $length) and ($length < CORE::length($char[$i+1]))) {
Condition66%2/3
length $char[$i - 1] < $length and $length < length $char[$i + 1]
!ll&&!rl&&r
08080
MC/DC50%1/2
length $char[$i - 1] < $length and $length < length $char[$i + 1]
length $char[$i - 1] < $length $length < length $char[$i + 1]
Truth table66%2/3
A and B
A= length $char[$i - 1] < $lengthB= $length < length $char[$i + 1]
ABresult
0X0
100
111
3369 80 push @regexp, _range_regexp($length, "\x00" x $length, "\xFF" x $length);
3370 }
3371  
3372 # is last
3373 elsif ($length == CORE::length($char[$i+1])) {
3374 80 push @regexp, _range_regexp($length, "\x00" x $length, $char[$i+1]);
3375 }
3376  
3377 else {
3378 0 die __FILE__, ": subroutine make_regexp panic.\n";
3379 }
3380  
3381 842 ▶ if ($length == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($length == 1) { } 510 332 842
3382 510 push @singleoctet, @regexp;
3383 }
3384 else {
3385 332 push @multipleoctet, @regexp;
3386 }
3387 }
3388  
3389 682 $i += 2;
3390 }
3391  
3392 # with /i modifier
3393 elsif ($char[$i] =~ /\A [\x00-\xFF] \z/oxms) {
3394 764 ▶ if ($modifier =~ /i/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /i/mosx) { } 192 572 764
3395 192 my $uc = Eutf2::uc($char[$i]);
3396 192 my $fc = Eutf2::fc($char[$i]);
3397 192 ▶ if ($uc ne $fc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($uc ne $fc) { } 192 0 192
3398 192 ▶ if (CORE::length($fc) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $fc == 1) { } 192 0 192
3399 192 push @singleoctet, $uc, $fc;
3400 }
3401 else {
3402 0 push @singleoctet, $uc;
3403 0 push @multipleoctet, $fc;
3404 }
3405 }
3406 else {
3407 0 push @singleoctet, $char[$i];
3408 }
3409 }
3410 else {
3411 572 push @singleoctet, $char[$i];
3412 }
3413 764 $i += 1;
3414 }
3415  
3416 # single character of single octet code
3417 elsif ($char[$i] =~ /\A (?: \\h ) \z/oxms) {
3418 0 push @singleoctet, "\t", "\x20";
3419 0 $i += 1;
3420 }
3421 elsif ($char[$i] =~ /\A (?: \\v ) \z/oxms) {
3422 0 push @singleoctet, "\x0A", "\x0B", "\x0C", "\x0D";
3423 0 $i += 1;
3424 }
3425 elsif ($char[$i] =~ /\A (?: \\d | \\s | \\w ) \z/oxms) {
3426 2 push @singleoctet, $char[$i];
3427 2 $i += 1;
3428 }
3429  
3430 # single character of multiple-octet code
3431 else {
3432 631 push @multipleoctet, $char[$i];
3433 631 $i += 1;
3434 }
3435 }
3436  
3437 # quote metachar
3438 1183 for (@singleoctet) {
3439 1548 ▶ if ($_ eq '...') {
Branch: 5 branches
BranchTrueFalseTotal
if ($_ eq '...') { } 0 1548 1548
elsif (/\A \n \z/mosx) { } 8 1540 1548
elsif (/\A \r \z/mosx) { } 8 1532 1540
elsif (/\A ([\x00-\x20\x7F-\xFF]) \z/mosx) { } 1 1531 1532
elsif (/\A [\x00-\xFF] \z/mosx) { } 939 592 1531
3440 0 $_ = '-';
3441 }
3442 elsif (/\A \n \z/oxms) {
3443 8 $_ = '\n';
3444 }
3445 elsif (/\A \r \z/oxms) {
3446 8 $_ = '\r';
3447 }
3448 elsif (/\A ([\x00-\x20\x7F-\xFF]) \z/oxms) {
3449 1 $_ = sprintf('\x%02X', CORE::ord $1);
3450 }
3451 elsif (/\A [\x00-\xFF] \z/oxms) {
3452 939 $_ = quotemeta $_;
3453 }
3454 }
3455  
3456 # return character list
3457 1183 return \@singleoctet, \@multipleoctet;
3458 }
3459  
3460 #
3461 # UTF-8 octal escape sequence
3462 #
3463 5 ▶sub octchr {
Subroutine octchr: called CC=2 SCAR=6.9
Pod undocumented
3464 5 my($octdigit) = @_;
3465  
3466 5 my @binary = ();
3467 5 for my $octal (split(//,$octdigit)) {
3468 push @binary, {
3469 '0' => '000',
3470 '1' => '001',
3471 '2' => '010',
3472 '3' => '011',
3473 '4' => '100',
3474 '5' => '101',
3475 '6' => '110',
3476 '7' => '111',
3477 50 }->{$octal};
3478 }
3479 5 my $binary = join '', @binary;
3480  
3481 my $octchr = {
3482 # 1234567
3483 1 => pack('B*', "0000000$binary"),
3484 2 => pack('B*', "000000$binary"),
3485 3 => pack('B*', "00000$binary"),
3486 4 => pack('B*', "0000$binary"),
3487 5 => pack('B*', "000$binary"),
3488 6 => pack('B*', "00$binary"),
3489 7 => pack('B*', "0$binary"),
3490 0 => pack('B*', "$binary"),
3491  
3492 5 }->{CORE::length($binary) % 8};
3493  
3494 5 return $octchr;
3495 }
3496  
3497 #
3498 # UTF-8 hexadecimal escape sequence
3499 #
3500 5 ▶sub hexchr {
Subroutine hexchr: called CC=1 SCAR=0.0
Pod undocumented
3501 5 my($hexdigit) = @_;
3502  
3503 my $hexchr = {
3504 1 => pack('H*', "0$hexdigit"),
3505 0 => pack('H*', "$hexdigit"),
3506  
3507 5 }->{CORE::length($_[0]) % 2};
3508  
3509 5 return $hexchr;
3510 }
3511  
3512 #
3513 # UTF-8 open character list for qr
3514 #
3515 855 ▶sub charlist_qr {
Subroutine charlist_qr: called CC=17 SCAR=29.0
Pod undocumented
3516  
3517 855 my $modifier = pop @_;
3518 855 my @char = @_;
3519  
3520 855 my($singleoctet, $multipleoctet) = _charlist(@char, $modifier);
3521 854 my @singleoctet = @$singleoctet;
3522 854 my @multipleoctet = @$multipleoctet;
3523  
3524 # return character list
3525 854 ▶ if (scalar(@singleoctet) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @singleoctet >= 1) 448 406 854
3526  
3527 # with /i modifier
3528 448 ▶ if ($modifier =~ m/i/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /i/mosx) 137 311 448
3529 137 my %singleoctet_ignorecase = ();
3530 137 for (@singleoctet) {
3531 317 ▶ while (s/ \A \\x(..) - \\x(..) //oxms or s/ \A \\x((..)) //oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if (s/ \A \\x(..) - \\x(..) //mosx or s/ \A \\x((..)) //mosx) 125 317 442
Condition66%2/3
s/ \A \\x(..) - \\x(..) //mosx or s/ \A \\x((..)) //mosx
l!l&&r!l&&!r
1250317
MC/DC50%1/2
s/ \A \\x(..) - \\x(..) //mosx or s/ \A \\x((..)) //mosx
s/ \A \\x(..) - \\x(..) //mosx s/ \A \\x((..)) //mosx
Truth table66%2/3
A or B
A= s/ \A \\x(..) - \\x(..) //mosxB= s/ \A \\x((..)) //mosx
ABresult
1X1
011
000
3532 125 for my $ord (hex($1) .. hex($2)) {
3533 2231 my $char = CORE::chr($ord);
3534 2231 my $uc = Eutf2::uc($char);
3535 2231 my $fc = Eutf2::fc($char);
3536 2231 ▶ if ($uc eq $fc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($uc eq $fc) { } 832 1399 2231
3537 832 $singleoctet_ignorecase{unpack 'C*', $char} = 1;
3538 }
3539 else {
3540 1399 ▶ if (CORE::length($fc) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $fc == 1) { } 1399 0 1399
3541 1399 $singleoctet_ignorecase{unpack 'C*', $uc} = 1;
3542 1399 $singleoctet_ignorecase{unpack 'C*', $fc} = 1;
3543 }
3544 else {
3545 0 $singleoctet_ignorecase{unpack 'C*', $uc} = 1;
3546 0 push @multipleoctet, join '', map {sprintf('\x%02X',$_)} unpack 'C*', $fc;
3547 }
3548 }
3549 }
3550 }
3551 317 ▶ if ($_ ne '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($_ ne "") 192 125 317
3552 192 $singleoctet_ignorecase{unpack 'C*', $_} = 1;
3553 }
3554 }
3555 137 my $i = 0;
3556 137 my @singleoctet_ignorecase = ();
3557 137 for my $ord (0 .. 255) {
3558 35072 ▶ if (exists $singleoctet_ignorecase{$ord}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $singleoctet_ignorecase{$ord}) { } 2822 32250 35072
3559 2822 push @{$singleoctet_ignorecase[$i]}, $ord;
3560 }
3561 else {
3562 32250 $i++;
3563 }
3564 }
3565 137 @singleoctet = ();
3566 137 for my $range (@singleoctet_ignorecase) {
3567 15552 ▶ if (ref $range) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $range) 274 15278 15552
3568 274 ▶ if (scalar(@{$range}) == 1) {
Branch: 2 branches
BranchTrueFalseTotal
if (scalar @{$range;} == 1) { } 0 274 274
elsif (scalar @{$range;} == 2) { } 0 274 274
3569 0 push @singleoctet, sprintf('\x%02X', @{$range}[0]);
3570 }
3571 274 elsif (scalar(@{$range}) == 2) {
3572 0 push @singleoctet, sprintf('\x%02X\x%02X', @{$range}[0], @{$range}[-1]);
3573 }
3574 else {
3575 274 push @singleoctet, sprintf('\x%02X-\x%02X', @{$range}[0], @{$range}[-1]);
3576 }
3577 }
3578 }
3579 }
3580  
3581 448 my $not_anchor = '';
3582 448 $not_anchor = '(?!(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF]))';
3583  
3584 448 push @multipleoctet, join('', $not_anchor, '[', @singleoctet, ']' );
3585 }
3586 854 ▶ if (scalar(@multipleoctet) >= 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @multipleoctet >= 2) { } 132 722 854
3587 132 return '(?:' . join('|', @multipleoctet) . ')';
3588 }
3589 else {
3590 722 return $multipleoctet[0];
3591 }
3592 }
3593  
3594 #
3595 # UTF-8 open character list for not qr
3596 #
3597 329 ▶sub charlist_not_qr {
Subroutine charlist_not_qr: called CC=18 SCAR=29.9
Pod undocumented
3598  
3599 329 my $modifier = pop @_;
3600 329 my @char = @_;
3601  
3602 329 my($singleoctet, $multipleoctet) = _charlist(@char, $modifier);
3603 329 my @singleoctet = @$singleoctet;
3604 329 my @multipleoctet = @$multipleoctet;
3605  
3606 # with /i modifier
3607 329 ▶ if ($modifier =~ m/i/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /i/mosx) 173 156 329
3608 173 my %singleoctet_ignorecase = ();
3609 173 for (@singleoctet) {
3610 317 ▶ while (s/ \A \\x(..) - \\x(..) //oxms or s/ \A \\x((..)) //oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if (s/ \A \\x(..) - \\x(..) //mosx or s/ \A \\x((..)) //mosx) 125 317 442
Condition66%2/3
s/ \A \\x(..) - \\x(..) //mosx or s/ \A \\x((..)) //mosx
l!l&&r!l&&!r
1250317
MC/DC50%1/2
s/ \A \\x(..) - \\x(..) //mosx or s/ \A \\x((..)) //mosx
s/ \A \\x(..) - \\x(..) //mosx s/ \A \\x((..)) //mosx
Truth table66%2/3
A or B
A= s/ \A \\x(..) - \\x(..) //mosxB= s/ \A \\x((..)) //mosx
ABresult
1X1
011
000
3611 125 for my $ord (hex($1) .. hex($2)) {
3612 2231 my $char = CORE::chr($ord);
3613 2231 my $uc = Eutf2::uc($char);
3614 2231 my $fc = Eutf2::fc($char);
3615 2231 ▶ if ($uc eq $fc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($uc eq $fc) { } 832 1399 2231
3616 832 $singleoctet_ignorecase{unpack 'C*', $char} = 1;
3617 }
3618 else {
3619 1399 ▶ if (CORE::length($fc) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $fc == 1) { } 1399 0 1399
3620 1399 $singleoctet_ignorecase{unpack 'C*', $uc} = 1;
3621 1399 $singleoctet_ignorecase{unpack 'C*', $fc} = 1;
3622 }
3623 else {
3624 0 $singleoctet_ignorecase{unpack 'C*', $uc} = 1;
3625 0 push @multipleoctet, join '', map {sprintf('\x%02X',$_)} unpack 'C*', $fc;
3626 }
3627 }
3628 }
3629 }
3630 317 ▶ if ($_ ne '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($_ ne "") 192 125 317
3631 192 $singleoctet_ignorecase{unpack 'C*', $_} = 1;
3632 }
3633 }
3634 173 my $i = 0;
3635 173 my @singleoctet_ignorecase = ();
3636 173 for my $ord (0 .. 255) {
3637 44288 ▶ if (exists $singleoctet_ignorecase{$ord}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $singleoctet_ignorecase{$ord}) { } 2822 41466 44288
3638 2822 push @{$singleoctet_ignorecase[$i]}, $ord;
3639 }
3640 else {
3641 41466 $i++;
3642 }
3643 }
3644 173 @singleoctet = ();
3645 173 for my $range (@singleoctet_ignorecase) {
3646 15552 ▶ if (ref $range) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $range) 274 15278 15552
3647 274 ▶ if (scalar(@{$range}) == 1) {
Branch: 2 branches
BranchTrueFalseTotal
if (scalar @{$range;} == 1) { } 0 274 274
elsif (scalar @{$range;} == 2) { } 0 274 274
3648 0 push @singleoctet, sprintf('\x%02X', @{$range}[0]);
3649 }
3650 274 elsif (scalar(@{$range}) == 2) {
3651 0 push @singleoctet, sprintf('\x%02X\x%02X', @{$range}[0], @{$range}[-1]);
3652 }
3653 else {
3654 274 push @singleoctet, sprintf('\x%02X-\x%02X', @{$range}[0], @{$range}[-1]);
3655 }
3656 }
3657 }
3658 }
3659  
3660 # return character list
3661 329 ▶ if (scalar(@multipleoctet) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @multipleoctet >= 1) { } 174 155 329
3662 174 ▶ if (scalar(@singleoctet) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @singleoctet >= 1) { } 100 74 174
3663  
3664 # any character other than multiple-octet and single octet character class
3665 100 return '(?!' . join('|', @multipleoctet) . ')(?:[^\x80-\xFF' . join('', @singleoctet) . ']|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])';
3666 }
3667 else {
3668  
3669 # any character other than multiple-octet character class
3670 74 return '(?!' . join('|', @multipleoctet) . ")(?:$your_char)";
3671 }
3672 }
3673 else {
3674 155 ▶ if (scalar(@singleoctet) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @singleoctet >= 1) { } 155 0 155
3675  
3676 # any character other than single octet character class
3677 155 return '(?:[^\x80-\xFF' . join('', @singleoctet) . ']|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])';
3678 }
3679 else {
3680  
3681 # any character
3682 0 return "(?:$your_char)";
3683 }
3684 }
3685 }
3686  
3687 #
3688 # open file in read mode
3689 #
3690 629 ▶sub _open_r {
Subroutine _open_r: called CC=1 SCAR=0.0
3691 629 my(undef,$file) = @_;
3692 629 ▶ use Fcntl qw(O_RDONLY);
Subroutine BEGIN: called CC=1 SCAR=0.0
3693 629 return CORE::sysopen($_[0], $file, &O_RDONLY);
3694 }
3695  
3696 #
3697 # open file in append mode
3698 #
3699 315 ▶sub _open_a {
Subroutine _open_a: called CC=1 SCAR=0.0
3700 315 my(undef,$file) = @_;
3701 629 ▶ use Fcntl qw(O_WRONLY O_APPEND O_CREAT);
Subroutine BEGIN: called CC=1 SCAR=0.0
3702 315 return CORE::sysopen($_[0], $file, &O_WRONLY|&O_APPEND|&O_CREAT);
3703 }
3704  
3705 #
3706 # safe system
3707 #
3708 314 ▶sub _systemx {
Subroutine _systemx: called CC=1 SCAR=0.0
3709  
3710 # P.707 29.2.33. exec
3711 # in Chapter 29: Functions
3712 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
3713 #
3714 # Be aware that in older releases of Perl, exec (and system) did not flush
3715 # your output buffer, so you needed to enable command buffering by setting $|
3716 # on one or more filehandles to avoid lost output in the case of exec, or
3717 # misordererd output in the case of system. This situation was largely remedied
3718 # in the 5.6 release of Perl. (So, 5.005 release not yet.)
3719  
3720 # P.855 exec
3721 # in Chapter 27: Functions
3722 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
3723 #
3724 # In very old release of Perl (before v5.6), exec (and system) did not flush
3725 # your output buffer, so you needed to enable command buffering by setting $|
3726 # on one or more filehandles to avoid lost output with exec or misordered
3727 # output with system.
3728  
3729 314 $| = 1;
3730  
3731 # P.565 23.1.2. Cleaning Up Your Environment
3732 # in Chapter 23: Security
3733 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
3734  
3735 # P.656 Cleaning Up Your Environment
3736 # in Chapter 20: Security
3737 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
3738  
3739 # local $ENV{'PATH'} = '.';
3740 314 local @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer
3741  
3742 # P.707 29.2.33. exec
3743 # in Chapter 29: Functions
3744 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
3745 #
3746 # As we mentioned earlier, exec treats a discrete list of arguments as an
3747 # indication that it should bypass shell processing. However, there is one
3748 # place where you might still get tripped up. The exec call (and system, too)
3749 # will not distinguish between a single scalar argument and an array containing
3750 # only one element.
3751 #
3752 # @args = ("echo surprise"); # just one element in list
3753 # exec @args # still subject to shell escapes
3754 # or die "exec: $!"; # because @args == 1
3755 #
3756 # To avoid this, you can use the PATHNAME syntax, explicitly duplicating the
3757 # first argument as the pathname, which forces the rest of the arguments to be
3758 # interpreted as a list, even if there is only one of them:
3759 #
3760 # exec { $args[0] } @args # safe even with one-argument list
3761 # or die "can't exec @args: $!";
3762  
3763 # P.855 exec
3764 # in Chapter 27: Functions
3765 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
3766 #
3767 # As we mentioned earlier, exec treats a discrete list of arguments as a
3768 # directive to bypass shell processing. However, there is one place where
3769 # you might still get tripped up. The exec call (and system, too) cannot
3770 # distinguish between a single scalar argument and an array containing
3771 # only one element.
3772 #
3773 # @args = ("echo surprise"); # just one element in list
3774 # exec @args # still subject to shell escapes
3775 # || die "exec: $!"; # because @args == 1
3776 #
3777 # To avoid this, use the PATHNAME syntax, explicitly duplicating the first
3778 # argument as the pathname, which forces the rest of the arguments to be
3779 # interpreted as a list, even if there is only one of them:
3780 #
3781 # exec { $args[0] } @args # safe even with one-argument list
3782 # || die "can't exec @args: $!";
3783  
3784 314 return CORE::system { $_[0] } @_; # safe even with one-argument list
3785 }
3786  
3787 #
3788 # UTF-8 order to character (with parameter)
3789 #
3790 3469 ▶sub Eutf2::chr(;$) {
Subroutine chr: called CC=4 SCAR=13.9
Pod undocumented
3791  
3792 3469 ▶ my $c = @_ ? $_[0] : $_;
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 3469 0 3469
3793  
3794 3469 ▶ if ($c == 0x00) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c == 0) { } 24 3445 3469
3795 24 return "\x00";
3796 }
3797 else {
3798 3445 my @chr = ();
3799 3445 ▶ while ($c > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c > 0) 3445 3445 6890
3800 3445 unshift @chr, ($c % 0x100);
3801 3445 $c = int($c / 0x100);
3802 }
3803 3445 return pack 'C*', @chr;
3804 }
3805 }
3806  
3807 #
3808 # UTF-8 order to character (without parameter)
3809 #
3810 0 ▶sub Eutf2::chr_() {
Subroutine chr_: not called CC=3 SCAR=24.8
Pod undocumented
3811  
3812 0 my $c = $_;
3813  
3814 0 ▶ if ($c == 0x00) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c == 0) { } 0 0 0
3815 0 return "\x00";
3816 }
3817 else {
3818 0 my @chr = ();
3819 0 ▶ while ($c > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c > 0) 0 0 0
3820 0 unshift @chr, ($c % 0x100);
3821 0 $c = int($c / 0x100);
3822 }
3823 0 return pack 'C*', @chr;
3824 }
3825 }
3826  
3827 #
3828 # UTF-8 path globbing (with parameter)
3829 #
3830 0 ▶sub Eutf2::glob($) {
Subroutine glob: not called CC=3 SCAR=24.8
Pod undocumented
3831  
3832 0 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 0 0 0
3833 0 my @glob = _DOS_like_glob(@_);
3834 0 for my $glob (@glob) {
3835 0 $glob =~ s{ \A (?:\./)+ }{}oxms;
3836 }
3837 0 return @glob;
3838 }
3839 else {
3840 0 my $glob = _DOS_like_glob(@_);
3841 0 $glob =~ s{ \A (?:\./)+ }{}oxms;
3842 0 return $glob;
3843 }
3844 }
3845  
3846 #
3847 # UTF-8 path globbing (without parameter)
3848 #
3849 0 ▶sub Eutf2::glob_() {
Subroutine glob_: not called CC=3 SCAR=24.8
Pod undocumented
3850  
3851 0 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 0 0 0
3852 0 my @glob = _DOS_like_glob();
3853 0 for my $glob (@glob) {
3854 0 $glob =~ s{ \A (?:\./)+ }{}oxms;
3855 }
3856 0 return @glob;
3857 }
3858 else {
3859 0 my $glob = _DOS_like_glob();
3860 0 $glob =~ s{ \A (?:\./)+ }{}oxms;
3861 0 return $glob;
3862 }
3863 }
3864  
3865 #
3866 # UTF-8 path globbing via File::DosGlob 1.10
3867 #
3868 # Often I confuse "_dosglob" and "_doglob".
3869 # So, I renamed "_dosglob" to "_DOS_like_glob".
3870 #
3871 629 my %iter;
3872 my %entries;
3873 0 ▶sub _DOS_like_glob {
Subroutine _DOS_like_glob: not called CC=10 SCAR=47.0
3874  
3875 # context (keyed by second cxix argument provided by core)
3876 0 my($expr,$cxix) = @_;
3877  
3878 # glob without args defaults to $_
3879 0 ▶ $expr = $_ if not defined $expr;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $expr 0 0 0
3880  
3881 # represents the current user's home directory
3882 #
3883 # 7.3. Expanding Tildes in Filenames
3884 # in Chapter 7. File Access
3885 # of ISBN 0-596-00313-7 Perl Cookbook, 2nd Edition.
3886 #
3887 # and File::HomeDir, File::HomeDir::Windows module
3888  
3889 # DOS-like system
3890 0 ▶ if ($^O =~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O =~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/mosx) { } 0 0 0
3891 0 $expr =~ s{ \A ~ (?= [^/\\] ) }
3892 0 { my_home_MSWin32() }oxmse;
3893 }
3894  
3895 # UNIX-like system
3896 else {
3897 0 $expr =~ s{ \A ~ ( (?:[^\x80-\xFF/]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])* ) }
3898 0 ▶ { $1 ? (CORE::eval(q{(getpwnam($1))[7]})||my_home()) : my_home() }oxmse;
Branch: 1 branch
BranchTrueFalseTotal
$1 ? : 0 0 0
Condition0%0/3
eval "(getpwnam(\$1))[7]" or my_home()
l!l&&r!l&&!r
000
MC/DC0%0/2
eval "(getpwnam(\$1))[7]" or my_home()
eval "(getpwnam(\$1))[7]" my_home()
Truth table0%0/3
A or B
A= eval "(getpwnam(\$1))[7]"B= my_home()
ABresult
1X1
011
000
3899 }
3900  
3901 # assume global context if not provided one
3902 0 ▶ $cxix = '_G_' if not defined $cxix;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $cxix 0 0 0
3903 0 ▶ $iter{$cxix} = 0 if not exists $iter{$cxix};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $iter{$cxix} 0 0 0
3904  
3905 # if we're just beginning, do it all first
3906 0 ▶ if ($iter{$cxix} == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($iter{$cxix} == 0) 0 0 0
3907 0 $entries{$cxix} = [ _do_glob(1, _parse_line($expr)) ];
3908 }
3909  
3910 # chuck it all out, quick or slow
3911 0 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 0 0 0
3912 0 delete $iter{$cxix};
3913 0 return @{delete $entries{$cxix}};
3914 }
3915 else {
3916 0 ▶ if ($iter{$cxix} = scalar @{$entries{$cxix}}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($iter{$cxix} = scalar @{$entries{$cxix};}) { } 0 0 0
3917 0 return shift @{$entries{$cxix}};
3918 }
3919 else {
3920 # return undef for EOL
3921 0 delete $iter{$cxix};
3922 0 delete $entries{$cxix};
3923 0 return undef;
3924 }
3925 }
3926 }
3927  
3928 #
3929 # UTF-8 path globbing subroutine
3930 #
3931 0 ▶sub _do_glob {
Subroutine _do_glob: not called CC=44 SCAR=75.9
3932  
3933 0 my($cond,@expr) = @_;
3934 0 my @glob = ();
3935 0 my $fix_drive_relative_paths = 0;
3936  
3937 OUTER:
3938 0 for my $expr (@expr) {
3939 0 ▶ next OUTER if not defined $expr;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $expr 0 0 0
3940 0 ▶ next OUTER if $expr eq '';
Branch: 1 branch
BranchTrueFalseTotal
if $expr eq "" 0 0 0
3941  
3942 0 my @matched = ();
3943 0 my @globdir = ();
3944 0 my $head = '.';
3945 0 my $pathsep = '/';
3946 0 my $tail;
3947  
3948 # if argument is within quotes strip em and do no globbing
3949 0 ▶ if ($expr =~ /\A " ((?:$q_char)*?) " \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($expr =~ /\A " ((?:$Eutf2::q_char)*?) " \z/mosx) 0 0 0
3950 0 $expr = $1;
3951 0 ▶ if ($cond eq 'd') {
Branch: 1 branch
BranchTrueFalseTotal
if ($cond eq 'd') { } 0 0 0
3952 0 ▶ if (-d $expr) {
Branch: 1 branch
BranchTrueFalseTotal
if (-d $expr) 0 0 0
3953 0 push @glob, $expr;
3954 }
3955 }
3956 else {
3957 0 ▶ if (-e $expr) {
Branch: 1 branch
BranchTrueFalseTotal
if (-e $expr) 0 0 0
3958 0 push @glob, $expr;
3959 }
3960 }
3961 0 next OUTER;
3962 }
3963  
3964 # wildcards with a drive prefix such as h:*.pm must be changed
3965 # to h:./*.pm to expand correctly
3966 0 ▶ if ($^O =~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O =~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/mosx) 0 0 0
3967 0 ▶ if ($expr =~ s# \A ((?:[A-Za-z]:)?) ([^\x80-\xFF/\\]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF]) #$1./$2#oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($expr =~ s( \A ((?:[A-Za-z]:)?) ([^\x80-\xFF/\\]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF]) )[$1./$2]mosx) 0 0 0
3968 0 $fix_drive_relative_paths = 1;
3969 }
3970 }
3971  
3972 0 ▶ if (($head, $tail) = _parse_path($expr,$pathsep)) {
Branch: 1 branch
BranchTrueFalseTotal
if (($head, $tail) = _parse_path($expr, $pathsep)) 0 0 0
3973 0 ▶ if ($tail eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($tail eq "") 0 0 0
3974 0 push @glob, $expr;
3975 0 next OUTER;
3976 }
3977 0 ▶ if ($head =~ / \A (?:$q_char)*? [*?] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($head =~ / \A (?:$Eutf2::q_char)*? [*?] /mosx) 0 0 0
3978 0 ▶ if (@globdir = _do_glob('d', $head)) {
Branch: 1 branch
BranchTrueFalseTotal
if (@globdir = _do_glob("d", $head)) 0 0 0
3979 0 push @glob, _do_glob($cond, map {"$_$pathsep$tail"} @globdir);
3980 0 next OUTER;
3981 }
3982 }
3983 0 ▶ if ($head eq '' or $head =~ /\A [A-Za-z]: \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($head eq "" or $head =~ /\A [A-Za-z]: \z/mosx) 0 0 0
Condition0%0/3
$head eq "" or $head =~ /\A [A-Za-z]: \z/mosx
l!l&&r!l&&!r
000
MC/DC0%0/2
$head eq "" or $head =~ /\A [A-Za-z]: \z/mosx
$head eq "" $head =~ /\A [A-Za-z]: \z/mosx
Truth table0%0/3
A or B
A= $head eq ""B= $head =~ /\A [A-Za-z]: \z/mosx
ABresult
1X1
011
000
3984 0 $head .= $pathsep;
3985 }
3986 0 $expr = $tail;
3987 }
3988  
3989 # If file component has no wildcards, we can avoid opendir
3990 0 ▶ if ($expr !~ / \A (?:$q_char)*? [*?] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($expr =~ / \A (?:$Eutf2::q_char)*? [*?] /mosx) 0 0 0
3991 0 ▶ if ($head eq '.') {
Branch: 1 branch
BranchTrueFalseTotal
if ($head eq ".") 0 0 0
3992 0 $head = '';
3993 }
3994 0 ▶ if ($head ne '' and ($head =~ / \G ($q_char) /oxmsg)[-1] ne $pathsep) {
Branch: 1 branch
BranchTrueFalseTotal
if ($head ne "" and ($head =~ / \G ($Eutf2::q_char) /gmosx)[-1] ne $pathsep) 0 0 0
Condition0%0/3
$head ne "" and ($head =~ / \G ($Eutf2::q_char) /gmosx)[-1] ne $pathsep
!ll&&!rl&&r
000
MC/DC0%0/2
$head ne "" and ($head =~ / \G ($Eutf2::q_char) /gmosx)[-1] ne $pathsep
$head ne "" ($head =~ / \G ($Eutf2::q_char) /gmosx)[-1] ne $pathsep
Truth table0%0/3
A and B
A= $head ne ""B= ($head =~ / \G ($Eutf2::q_char) /gmosx)[-1] ne $pathsep
ABresult
0X0
100
111
3995 0 $head .= $pathsep;
3996 }
3997 0 $head .= $expr;
3998 0 ▶ if ($cond eq 'd') {
Branch: 1 branch
BranchTrueFalseTotal
if ($cond eq 'd') { } 0 0 0
3999 0 ▶ if (-d $head) {
Branch: 1 branch
BranchTrueFalseTotal
if (-d $head) 0 0 0
4000 0 push @glob, $head;
4001 }
4002 }
4003 else {
4004 0 ▶ if (-e $head) {
Branch: 1 branch
BranchTrueFalseTotal
if (-e $head) 0 0 0
4005 0 push @glob, $head;
4006 }
4007 }
4008 0 next OUTER;
4009 }
4010 0 ▶ opendir(*DIR, $head) or next OUTER;
Branch: 1 branch
BranchTrueFalseTotal
opendir *DIR, $head or next OUTER 0 0 0
4011 0 my @leaf = readdir DIR;
4012 0 closedir DIR;
4013  
4014 0 ▶ if ($head eq '.') {
Branch: 1 branch
BranchTrueFalseTotal
if ($head eq ".") 0 0 0
4015 0 $head = '';
4016 }
4017 0 ▶ if ($head ne '' and ($head =~ / \G ($q_char) /oxmsg)[-1] ne $pathsep) {
Branch: 1 branch
BranchTrueFalseTotal
if ($head ne "" and ($head =~ / \G ($Eutf2::q_char) /gmosx)[-1] ne $pathsep) 0 0 0
Condition0%0/3
$head ne "" and ($head =~ / \G ($Eutf2::q_char) /gmosx)[-1] ne $pathsep
!ll&&!rl&&r
000
MC/DC0%0/2
$head ne "" and ($head =~ / \G ($Eutf2::q_char) /gmosx)[-1] ne $pathsep
$head ne "" ($head =~ / \G ($Eutf2::q_char) /gmosx)[-1] ne $pathsep
Truth table0%0/3
A and B
A= $head ne ""B= ($head =~ / \G ($Eutf2::q_char) /gmosx)[-1] ne $pathsep
ABresult
0X0
100
111
4018 0 $head .= $pathsep;
4019 }
4020  
4021 0 my $pattern = '';
4022 0 ▶ while ($expr =~ / \G ($q_char) /oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($expr =~ / \G ($Eutf2::q_char) /cgox) 0 0 0
4023 0 my $char = $1;
4024  
4025 # 6.9. Matching Shell Globs as Regular Expressions
4026 # in Chapter 6. Pattern Matching
4027 # of ISBN 0-596-00313-7 Perl Cookbook, 2nd Edition.
4028 # (and so on)
4029  
4030 0 ▶ if ($char eq '*') {
Branch: 3 branches
BranchTrueFalseTotal
if ($char eq '*') { } 0 0 0
elsif ($char eq '?') { } 0 0 0
elsif ((my $fc = &fc($char)) ne $char) { } 0 0 0
4031 0 $pattern .= "(?:$your_char)*",
4032 }
4033 elsif ($char eq '?') {
4034 0 $pattern .= "(?:$your_char)?", # DOS style
4035 # $pattern .= "(?:$your_char)", # UNIX style
4036 }
4037 elsif ((my $fc = Eutf2::fc($char)) ne $char) {
4038 0 $pattern .= $fc;
4039 }
4040 else {
4041 0 $pattern .= quotemeta $char;
4042 }
4043 }
4044 0 ▶ my $matchsub = sub { Eutf2::fc($_[0]) =~ /\A $pattern \z/xms };
Subroutine __ANON__: not called CC=1 SCAR=6.9
4045  
4046 # if ($@) {
4047 # print STDERR "$0: $@\n";
4048 # next OUTER;
4049 # }
4050  
4051 INNER:
4052 0 for my $leaf (@leaf) {
4053 0 ▶ if ($leaf eq '.' or $leaf eq '..') {
Branch: 1 branch
BranchTrueFalseTotal
if ($leaf eq "." or $leaf eq "..") 0 0 0
Condition0%0/3
$leaf eq "." or $leaf eq ".."
l!l&&r!l&&!r
000
MC/DC0%0/2
$leaf eq "." or $leaf eq ".."
$leaf eq "." $leaf eq ".."
Truth table0%0/3
A or B
A= $leaf eq "."B= $leaf eq ".."
ABresult
1X1
011
000
4054 0 next INNER;
4055 }
4056 0 ▶ if ($cond eq 'd' and not -d "$head$leaf") {
Branch: 1 branch
BranchTrueFalseTotal
if ($cond eq "d" and not -d "$head$leaf") 0 0 0
Condition0%0/3
$cond eq "d" and not -d "$head$leaf"
!ll&&!rl&&r
000
MC/DC0%0/2
$cond eq "d" and not -d "$head$leaf"
$cond eq "d" not -d "$head$leaf"
Truth table0%0/3
A and not(B)
A= $cond eq "d"B= not -d "$head$leaf"
ABresult
0X0
100
111
4057 0 next INNER;
4058 }
4059  
4060 0 ▶ if (&$matchsub($leaf)) {
Branch: 1 branch
BranchTrueFalseTotal
if (&$matchsub($leaf)) 0 0 0
4061 0 push @matched, "$head$leaf";
4062 0 next INNER;
4063 }
4064  
4065 # [DOS compatibility special case]
4066 # Failed, add a trailing dot and try again, but only...
4067  
4068 0 ▶ if (Eutf2::index($leaf,'.') == -1 and # if name does not have a dot in it *and*
Branch: 1 branch
BranchTrueFalseTotal
if (&Eutf2::index($leaf, ".") == -1 and length $leaf <= 8 and &Eutf2::index($pattern, "\\.") != -1) 0 0 0
Condition0%0/6
&Eutf2::index($leaf, ".") == -1 and length $leaf <= 8 and &Eutf2::index($pattern, "\\.") != -1
!ll&&!rl&&r
000
&Eutf2::index($leaf, ".") == -1 and length $leaf <= 8
!ll&&!rl&&r
000
MC/DC0%0/3
&Eutf2::index($leaf, ".") == -1 and length $leaf <= 8 and &Eutf2::index($pattern, "\\.") != -1
&Eutf2::index($leaf, ".") == -1 length $leaf <= 8 &Eutf2::index($pattern, "\\.") != -1
Truth table0%0/4
A and B and C
A= &Eutf2::index($leaf, ".") == -1B= length $leaf <= 8C= &Eutf2::index($pattern, "\\.") != -1
ABCresult
0XX0
10X0
1100
1111
4069 CORE::length($leaf) <= 8 and # name is shorter than or equal to 8 chars *and*
4070 Eutf2::index($pattern,'\\.') != -1 # pattern has a dot.
4071 ) {
4072 0 ▶ if (&$matchsub("$leaf.")) {
Branch: 1 branch
BranchTrueFalseTotal
if (&$matchsub("$leaf.")) 0 0 0
4073 0 push @matched, "$head$leaf";
4074 0 next INNER;
4075 }
4076 }
4077 }
4078 0 ▶ if (@matched) {
Branch: 1 branch
BranchTrueFalseTotal
if (@matched) 0 0 0
4079 0 push @glob, @matched;
4080 }
4081 }
4082 0 ▶ if ($fix_drive_relative_paths) {
Branch: 1 branch
BranchTrueFalseTotal
if ($fix_drive_relative_paths) 0 0 0
4083 0 for my $glob (@glob) {
4084 0 $glob =~ s# \A ([A-Za-z]:) \./ #$1#oxms;
4085 }
4086 }
4087 0 return @glob;
4088 }
4089  
4090 #
4091 # UTF-8 parse line
4092 #
4093 0 ▶sub _parse_line {
Subroutine _parse_line: not called CC=3 SCAR=24.8
4094  
4095 0 my($line) = @_;
4096  
4097 0 $line .= ' ';
4098 0 my @piece = ();
4099 0 ▶ while ($line =~ /
Branch: 1 branch
BranchTrueFalseTotal
if ($line =~ / " ( (?>(?: [^\x80-\xFF"] |(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] )* ) ) " (?>\s+) | ( (?>(?: [^\x80-\xFF"\s]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] )* ) ) (?>\s+) /gmosx) 0 0 0
4100 " ( (?>(?: [^\x80-\xFF"] |(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] )* ) ) " (?>\s+) |
4101 ( (?>(?: [^\x80-\xFF"\s]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] )* ) ) (?>\s+)
4102 /oxmsg
4103 ) {
4104 0 ▶ push @piece, defined($1) ? $1 : $2;
Branch: 1 branch
BranchTrueFalseTotal
defined $1 ? : 0 0 0
4105 }
4106 0 return @piece;
4107 }
4108  
4109 #
4110 # UTF-8 parse path
4111 #
4112 0 ▶sub _parse_path {
Subroutine _parse_path: not called CC=2 SCAR=17.9
4113  
4114 0 my($path,$pathsep) = @_;
4115  
4116 0 $path .= '/';
4117 0 my @subpath = ();
4118 0 ▶ while ($path =~ /
Branch: 1 branch
BranchTrueFalseTotal
if ($path =~ m( ((?: [^\x80-\xFF/\\]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] )+?) [/\\] )gmosx) 0 0 0
4119 ((?: [^\x80-\xFF\/\\]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] )+?) [\/\\]
4120 /oxmsg
4121 ) {
4122 0 push @subpath, $1;
4123 }
4124  
4125 0 my $tail = pop @subpath;
4126 0 my $head = join $pathsep, @subpath;
4127 0 return $head, $tail;
4128 }
4129  
4130 #
4131 # via File::HomeDir::Windows 1.00
4132 #
4133 0 ▶sub my_home_MSWin32 {
Subroutine my_home_MSWin32: not called CC=9 SCAR=45.0
Pod undocumented
4134  
4135 # A lot of unix people and unix-derived tools rely on
4136 # the ability to overload HOME. We will support it too
4137 # so that they can replace raw HOME calls with File::HomeDir.
4138 0 ▶ if (exists $ENV{'HOME'} and $ENV{'HOME'}) {
Branch: 3 branches
BranchTrueFalseTotal
if (exists $ENV{'HOME'} and $ENV{'HOME'}) { } 0 0 0
elsif (exists $ENV{'USERPROFILE'} and $ENV{'USERPROFILE'}) { } 0 0 0
elsif (exists $ENV{'HOMEDRIVE'} and exists $ENV{'HOMEPATH'} and $ENV{'HOMEDRIVE'} and $ENV{'HOMEPATH'}) { } 0 0 0
Condition0%0/3
exists $ENV{"HOME"} and $ENV{"HOME"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $ENV{"HOME"} and $ENV{"HOME"}
exists $ENV{"HOME"} $ENV{"HOME"}
Truth table0%0/3
A and B
A= exists $ENV{"HOME"}B= $ENV{"HOME"}
ABresult
0X0
100
111
4139 0 return $ENV{'HOME'};
4140 }
4141  
4142 # Do we have a user profile?
4143 ▶ elsif (exists $ENV{'USERPROFILE'} and $ENV{'USERPROFILE'}) {
Condition0%0/3
exists $ENV{"USERPROFILE"} and $ENV{"USERPROFILE"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $ENV{"USERPROFILE"} and $ENV{"USERPROFILE"}
exists $ENV{"USERPROFILE"} $ENV{"USERPROFILE"}
Truth table0%0/3
A and B
A= exists $ENV{"USERPROFILE"}B= $ENV{"USERPROFILE"}
ABresult
0X0
100
111
4144 0 return $ENV{'USERPROFILE'};
4145 }
4146  
4147 # Some Windows use something like $ENV{'HOME'}
4148 ▶ elsif (exists $ENV{'HOMEDRIVE'} and exists $ENV{'HOMEPATH'} and $ENV{'HOMEDRIVE'} and $ENV{'HOMEPATH'}) {
Condition0%0/9
exists $ENV{"HOMEDRIVE"} and exists $ENV{"HOMEPATH"} and $ENV{"HOMEDRIVE"} and $ENV{"HOMEPATH"}
!ll&&!rl&&r
000
exists $ENV{"HOMEDRIVE"} and exists $ENV{"HOMEPATH"} and $ENV{"HOMEDRIVE"}
!ll&&!rl&&r
000
exists $ENV{"HOMEDRIVE"} and exists $ENV{"HOMEPATH"}
!ll&&!rl&&r
000
MC/DC0%0/4
exists $ENV{"HOMEDRIVE"} and exists $ENV{"HOMEPATH"} and $ENV{"HOMEDRIVE"} and $ENV{"HOMEPATH"}
exists $ENV{"HOMEDRIVE"} exists $ENV{"HOMEPATH"} $ENV{"HOMEDRIVE"} $ENV{"HOMEPATH"}
Truth table0%0/5
A and B and C and D
A= exists $ENV{"HOMEDRIVE"}B= exists $ENV{"HOMEPATH"}C= $ENV{"HOMEDRIVE"}D= $ENV{"HOMEPATH"}
ABCDresult
0XXX0
10XX0
110X0
11100
11111
4149 0 return join '', $ENV{'HOMEDRIVE'}, $ENV{'HOMEPATH'};
4150 }
4151  
4152 0 return undef;
4153 }
4154  
4155 #
4156 # via File::HomeDir::Unix 1.00
4157 #
4158 0 ▶sub my_home {
Subroutine my_home: not called CC=7 SCAR=40.3
Pod undocumented
4159 0 my $home;
4160  
4161 0 ▶ if (exists $ENV{'HOME'} and defined $ENV{'HOME'}) {
Branch: 2 branches
BranchTrueFalseTotal
if (exists $ENV{'HOME'} and defined $ENV{'HOME'}) { } 0 0 0
elsif (exists $ENV{'LOGDIR'} and $ENV{'LOGDIR'}) { } 0 0 0
Condition0%0/3
exists $ENV{"HOME"} and defined $ENV{"HOME"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $ENV{"HOME"} and defined $ENV{"HOME"}
exists $ENV{"HOME"} defined $ENV{"HOME"}
Truth table0%0/3
A and B
A= exists $ENV{"HOME"}B= defined $ENV{"HOME"}
ABresult
0X0
100
111
4162 0 $home = $ENV{'HOME'};
4163 }
4164  
4165 # This is from the original code, but I'm guessing
4166 # it means "login directory" and exists on some Unixes.
4167 ▶ elsif (exists $ENV{'LOGDIR'} and $ENV{'LOGDIR'}) {
Condition0%0/3
exists $ENV{"LOGDIR"} and $ENV{"LOGDIR"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $ENV{"LOGDIR"} and $ENV{"LOGDIR"}
exists $ENV{"LOGDIR"} $ENV{"LOGDIR"}
Truth table0%0/3
A and B
A= exists $ENV{"LOGDIR"}B= $ENV{"LOGDIR"}
ABresult
0X0
100
111
4168 0 $home = $ENV{'LOGDIR'};
4169 }
4170  
4171 ### More-desperate methods
4172  
4173 # Light desperation on any (Unixish) platform
4174 else {
4175 0 $home = CORE::eval q{ (getpwuid($<))[7] };
4176 }
4177  
4178 # On Unix in general, a non-existant home means "no home"
4179 # For example, "nobody"-like users might use /nonexistant
4180 0 ▶ if (defined $home and ! -d($home)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $home and not -d $home) 0 0 0
Condition0%0/3
defined $home and not -d $home
!ll&&!rl&&r
000
MC/DC0%0/2
defined $home and not -d $home
defined $home not -d $home
Truth table0%0/3
A and not(B)
A= defined $homeB= not -d $home
ABresult
0X0
100
111
4181 0 $home = undef;
4182 }
4183 0 return $home;
4184 }
4185  
4186 #
4187 # ${^PREMATCH}, $PREMATCH, $` the string preceding what was matched
4188 #
4189 56 ▶sub Eutf2::PREMATCH {
Subroutine PREMATCH: called CC=1 SCAR=0.0
Pod undocumented
4190 56 return $`;
4191 }
4192  
4193 #
4194 # ${^MATCH}, $MATCH, $& the string that matched
4195 #
4196 81 ▶sub Eutf2::MATCH {
Subroutine MATCH: called CC=1 SCAR=0.0
Pod undocumented
4197 81 return $&;
4198 }
4199  
4200 #
4201 # ${^POSTMATCH}, $POSTMATCH, $' the string following what was matched
4202 #
4203 42 ▶sub Eutf2::POSTMATCH {
Subroutine POSTMATCH: called CC=1 SCAR=0.0
Pod undocumented
4204 42 return $';
4205 }
4206  
4207 #
4208 # UTF-8 character to order (with parameter)
4209 #
4210 4 ▶sub UTF2::ord(;$) {
Subroutine ord: called CC=4 SCAR=14.0
4211  
4212 4 ▶ local $_ = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 2 4
4213  
4214 4 ▶ if (/\A ($q_char) /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\A ($Eutf2::q_char) /mosx) { } 4 0 4
4215 4 my @ord = unpack 'C*', $1;
4216 4 my $ord = 0;
4217 4 ▶ while (my $o = shift @ord) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $o = shift @ord) 12 4 16
4218 12 $ord = $ord * 0x100 + $o;
4219 }
4220 4 return $ord;
4221 }
4222 else {
4223 0 return CORE::ord $_;
4224 }
4225 }
4226  
4227 #
4228 # UTF-8 character to order (without parameter)
4229 #
4230 0 ▶sub UTF2::ord_() {
Subroutine ord_: not called CC=3 SCAR=24.8
4231  
4232 0 ▶ if (/\A ($q_char) /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\A ($Eutf2::q_char) /mosx) { } 0 0 0
4233 0 my @ord = unpack 'C*', $1;
4234 0 my $ord = 0;
4235 0 ▶ while (my $o = shift @ord) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $o = shift @ord) 0 0 0
4236 0 $ord = $ord * 0x100 + $o;
4237 }
4238 0 return $ord;
4239 }
4240 else {
4241 0 return CORE::ord $_;
4242 }
4243 }
4244  
4245 #
4246 # UTF-8 reverse
4247 #
4248 4 ▶sub UTF2::reverse(@) {
Subroutine reverse: called CC=2 SCAR=6.9
4249  
4250 4 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 2 2 4
4251 2 return CORE::reverse @_;
4252 }
4253 else {
4254  
4255 # One of us once cornered Larry in an elevator and asked him what
4256 # problem he was solving with this, but he looked as far off into
4257 # the distance as he could in an elevator and said, "It seemed like
4258 # a good idea at the time."
4259  
4260 2 return join '', CORE::reverse(join('',@_) =~ /\G ($q_char) /oxmsg);
4261 }
4262 }
4263  
4264 #
4265 # UTF-8 getc (with parameter, without parameter)
4266 #
4267 56 ▶sub UTF2::getc(;*@) {
Subroutine getc: called CC=9 SCAR=24.8
4268  
4269 56 my($package) = caller;
4270 56 ▶ my $fh = @_ ? qualify_to_ref(shift,$package) : \*STDIN;
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 56 0 56
4271 56 ▶ croak 'Too many arguments for UTF2::getc' if @_ and not wantarray;
Branch: 1 branch
BranchTrueFalseTotal
if @_ and not wantarray 0 56 56
Condition33%1/3
@_ and not wantarray
!ll&&!rl&&r
5600
MC/DC0%0/2
@_ and not wantarray
@_ not wantarray
Truth table33%1/3
A and not(B)
A= @_B= not wantarray
ABresult
0X0
100
111
4272  
4273 56 my @length = sort { $a <=> $b } keys %range_tr;
4274 56 my $getc = '';
4275 56 for my $length ($length[0] .. $length[-1]) {
4276 120 $getc .= CORE::getc($fh);
4277 120 ▶ if (exists $range_tr{CORE::length($getc)}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $range_tr{length $getc}) 120 0 120
4278 120 ▶ if ($getc =~ /\A ${Eutf2::dot_s} \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($getc =~ /\A $Eutf2::dot_s \z/mosx) 56 64 120
4279 56 ▶ return wantarray ? ($getc,@_) : $getc;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 56 56
4280 }
4281 }
4282 }
4283 0 ▶ return wantarray ? ($getc,@_) : $getc;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
4284 }
4285  
4286 #
4287 # UTF-8 length by character
4288 #
4289 5 ▶sub UTF2::length(;$) {
Subroutine length: called CC=2 SCAR=7.1
4290  
4291 5 ▶ local $_ = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 5 0 5
4292  
4293 5 local @_ = /\G ($q_char) /oxmsg;
4294 5 return scalar @_;
4295 }
4296  
4297 #
4298 # UTF-8 substr by character
4299 #
4300 629 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=6.9
4301  
4302 # P.232 The lvalue Attribute
4303 # in Chapter 6: Subroutines
4304 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
4305  
4306 # P.336 The lvalue Attribute
4307 # in Chapter 7: Subroutines
4308 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
4309  
4310 # P.144 8.4 Lvalue subroutines
4311 # in Chapter 8: perlsub: Perl subroutines
4312 # of ISBN-13: 978-1-906966-02-7 The Perl Language Reference Manual (for Perl version 5.12.1)
4313  
4314 0 ▶ CORE::eval sprintf(<<'END', ($] >= 5.014000) ? ':lvalue' : '');
Subroutine substr: called CC=11 SCAR=24.0
Branch: 10 branches
BranchTrueFalseTotal
$] >= 5.014 ? : 629 0 629
if ($offset > scalar @char or $offset < -1 * scalar(@char)) 2 37 39
if (@_ == 4) { } 5 32 37
elsif (@_ == 3) { } 27 5 32
if ($offset == 0) { } 2 25 27
elsif ($offset > 0) { } 22 3 25
if ($length == 0) { } 2 25 27
elsif ($length > 0) { } 24 1 25
if ($offset == 0) { } 0 5 5
elsif ($offset > 0) { } 3 2 5
Condition66%2/3
$offset > scalar @char or $offset < -1 * scalar(@char)
l!l&&r!l&&!r
2037
MC/DC50%1/2
$offset > scalar @char or $offset < -1 * scalar(@char)
$offset > scalar @char $offset < -1 * scalar(@char)
Truth table66%2/3
A or B
A= $offset > scalar @charB= $offset < -1 * scalar(@char)
ABresult
1X1
011
000
4315 # vv----------------------*******
4316 sub UTF2::substr($$;$$) %s {
4317  
4318 my @char = $_[0] =~ /\G (?>$q_char) /oxmsg;
4319  
4320 # If the substring is beyond either end of the string, substr() returns the undefined
4321 # value and produces a warning. When used as an lvalue, specifying a substring that
4322 # is entirely outside the string raises an exception.
4323 # http://perldoc.perl.org/functions/substr.html
4324  
4325 # A return with no argument returns the scalar value undef in scalar context,
4326 # an empty list () in list context, and (naturally) nothing at all in void
4327 # context.
4328  
4329 my $offset = $_[1];
4330 if (($offset > scalar(@char)) or ($offset < (-1 * scalar(@char)))) {
4331 return;
4332 }
4333  
4334 # substr($string,$offset,$length,$replacement)
4335 if (@_ == 4) {
4336 my(undef,undef,$length,$replacement) = @_;
4337 my $substr = join '', splice(@char, $offset, $length, $replacement);
4338 $_[0] = join '', @char;
4339  
4340 # return $substr; this doesn't work, don't say "return"
4341 $substr;
4342 }
4343  
4344 # substr($string,$offset,$length)
4345 elsif (@_ == 3) {
4346 my(undef,undef,$length) = @_;
4347 my $octet_offset = 0;
4348 my $octet_length = 0;
4349 if ($offset == 0) {
4350 $octet_offset = 0;
4351 }
4352 elsif ($offset > 0) {
4353 $octet_offset = CORE::length(join '', @char[0..$offset-1]);
4354 }
4355 else {
4356 $octet_offset = -1 * CORE::length(join '', @char[$#char+$offset+1..$#char]);
4357 }
4358 if ($length == 0) {
4359 $octet_length = 0;
4360 }
4361 elsif ($length > 0) {
4362 $octet_length = CORE::length(join '', @char[$offset..$offset+$length-1]);
4363 }
4364 else {
4365 $octet_length = -1 * CORE::length(join '', @char[$#char+$length+1..$#char]);
4366 }
4367 CORE::substr($_[0], $octet_offset, $octet_length);
4368 }
4369  
4370 # substr($string,$offset)
4371 else {
4372 my $octet_offset = 0;
4373 if ($offset == 0) {
4374 $octet_offset = 0;
4375 }
4376 elsif ($offset > 0) {
4377 $octet_offset = CORE::length(join '', @char[0..$offset-1]);
4378 }
4379 else {
4380 $octet_offset = -1 * CORE::length(join '', @char[$#char+$offset+1..$#char]);
4381 }
4382 CORE::substr($_[0], $octet_offset);
4383 }
4384 }
4385 END
4386 }
4387  
4388 #
4389 # UTF-8 index by character
4390 #
4391 2 ▶sub UTF2::index($$;$) {
Subroutine index: called CC=3 SCAR=11.2
4392  
4393 2 my $index;
4394 2 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 1 1 2
4395 1 $index = Eutf2::index($_[0], $_[1], CORE::length(UTF2::substr($_[0], 0, $_[2])));
4396 }
4397 else {
4398 1 $index = Eutf2::index($_[0], $_[1]);
4399 }
4400  
4401 2 ▶ if ($index == -1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($index == -1) { } 0 2 2
4402 0 return -1;
4403 }
4404 else {
4405 2 return UTF2::length(CORE::substr $_[0], 0, $index);
4406 }
4407 }
4408  
4409 #
4410 # UTF-8 rindex by character
4411 #
4412 2 ▶sub UTF2::rindex($$;$) {
Subroutine rindex: called CC=3 SCAR=11.2
4413  
4414 2 my $rindex;
4415 2 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 1 1 2
4416 1 $rindex = Eutf2::rindex($_[0], $_[1], CORE::length(UTF2::substr($_[0], 0, $_[2])));
4417 }
4418 else {
4419 1 $rindex = Eutf2::rindex($_[0], $_[1]);
4420 }
4421  
4422 2 ▶ if ($rindex == -1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($rindex == -1) { } 0 2 2
4423 0 return -1;
4424 }
4425 else {
4426 2 return UTF2::length(CORE::substr $_[0], 0, $rindex);
4427 }
4428 }
4429  
4430 # when 'm//', '/' means regexp match 'm//' and '?' means regexp match '??'
4431 # when 'div', '/' means division operator and '?' means conditional operator (condition ? then : else)
4432 629 ▶use vars qw($slash); $slash = 'm//';
Subroutine BEGIN: called CC=1 SCAR=0.0
4433  
4434 # ord() to ord() or UTF2::ord()
4435 629 my $function_ord = 'ord';
4436  
4437 # ord to ord or UTF2::ord_
4438 629 my $function_ord_ = 'ord';
4439  
4440 # reverse to reverse or UTF2::reverse
4441 629 my $function_reverse = 'reverse';
4442  
4443 # getc to getc or UTF2::getc
4444 629 my $function_getc = 'getc';
4445  
4446 # P.1023 Appendix W.9 Multibyte Anchoring
4447 # of ISBN 1-56592-224-7 CJKV Information Processing
4448  
4449 629 my $anchor = '';
4450  
4451 629 ▶use vars qw($nest);
Subroutine BEGIN: called CC=1 SCAR=0.0
4452  
4453 # regexp of nested parens in qqXX
4454  
4455 # P.340 Matching Nested Constructs with Embedded Code
4456 # in Chapter 7: Perl
4457 # of ISBN 0-596-00289-0 Mastering Regular Expressions, Second edition
4458  
4459 my $qq_paren = qr{(?{local $nest=0}) (?>(?:
4460 [^\x80-\xFF\\()] |
4461 \( (?{$nest++}) |
4462 \) (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4463 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4464 \\ [^\x80-\xFFc] |
4465 \\c[\x40-\x5F] |
4466 \\ (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4467 [\x00-\xFF]
4468 629 }xms;
4469  
4470 my $qq_brace = qr{(?{local $nest=0}) (?>(?:
4471 [^\x80-\xFF\\{}] |
4472 \{ (?{$nest++}) |
4473 \} (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4474 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4475 \\ [^\x80-\xFFc] |
4476 \\c[\x40-\x5F] |
4477 \\ (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4478 [\x00-\xFF]
4479 629 }xms;
4480  
4481 my $qq_bracket = qr{(?{local $nest=0}) (?>(?:
4482 [^\x80-\xFF\\\[\]] |
4483 \[ (?{$nest++}) |
4484 \] (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4485 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4486 \\ [^\x80-\xFFc] |
4487 \\c[\x40-\x5F] |
4488 \\ (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4489 [\x00-\xFF]
4490 629 }xms;
4491  
4492 my $qq_angle = qr{(?{local $nest=0}) (?>(?:
4493 [^\x80-\xFF\\<>] |
4494 \< (?{$nest++}) |
4495 \> (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4496 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4497 \\ [^\x80-\xFFc] |
4498 \\c[\x40-\x5F] |
4499 \\ (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4500 [\x00-\xFF]
4501 629 }xms;
4502  
4503 629 my $qq_scalar = qr{(?: \{ (?:$qq_brace)*? \} |
4504 (?: ::)? (?:
4505 (?> [a-zA-Z_][a-zA-Z_0-9]* (?: ::[a-zA-Z_][a-zA-Z_0-9]*)* )
4506 (?>(?: \[ (?: \$\[ | \$\] | $qq_char )*? \] | \{ (?:$qq_brace)*? \} )*)
4507 (?>(?: (?: -> )? (?: [\$\@\%\&\*]\* | \$\#\* | [\@\%]? \[ (?: \$\[ | \$\] | $qq_char )*? \] | [\@\%\*]? \{ (?:$qq_brace)*? \} ) )*)
4508 ))
4509 }xms;
4510  
4511 629 my $qq_variable = qr{(?: \{ (?:$qq_brace)*? \} |
4512 (?: ::)? (?:
4513 (?>[0-9]+) |
4514 [^\x80-\xFFa-zA-Z_0-9\[\]] |
4515 ^[A-Z] |
4516 (?> [a-zA-Z_][a-zA-Z_0-9]* (?: ::[a-zA-Z_][a-zA-Z_0-9]*)* )
4517 (?>(?: \[ (?: \$\[ | \$\] | $qq_char )*? \] | \{ (?:$qq_brace)*? \} )*)
4518 (?>(?: (?: -> )? (?: [\$\@\%\&\*]\* | \$\#\* | [\@\%]? \[ (?: \$\[ | \$\] | $qq_char )*? \] | [\@\%\*]? \{ (?:$qq_brace)*? \} ) )*)
4519 ))
4520 }xms;
4521  
4522 629 my $qq_substr = qr{(?> Char::substr | UTF2::substr | CORE::substr | substr ) (?>\s*) \( $qq_paren \)
4523 }xms;
4524  
4525 # regexp of nested parens in qXX
4526 my $q_paren = qr{(?{local $nest=0}) (?>(?:
4527 [^\x80-\xFF()] |
4528 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4529 \( (?{$nest++}) |
4530 \) (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4531 [\x00-\xFF]
4532 629 }xms;
4533  
4534 my $q_brace = qr{(?{local $nest=0}) (?>(?:
4535 [^\x80-\xFF\{\}] |
4536 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4537 \{ (?{$nest++}) |
4538 \} (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4539 [\x00-\xFF]
4540 629 }xms;
4541  
4542 my $q_bracket = qr{(?{local $nest=0}) (?>(?:
4543 [^\x80-\xFF\[\]] |
4544 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4545 \[ (?{$nest++}) |
4546 \] (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4547 [\x00-\xFF]
4548 629 }xms;
4549  
4550 my $q_angle = qr{(?{local $nest=0}) (?>(?:
4551 [^\x80-\xFF<>] |
4552 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
4553 \< (?{$nest++}) |
4554 \> (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4555 [\x00-\xFF]
4556 629 }xms;
4557  
4558 629 my $matched = '';
4559 629 my $s_matched = '';
4560  
4561 629 my $tr_variable = ''; # variable of tr///
4562 629 my $sub_variable = ''; # variable of s///
4563 629 my $bind_operator = ''; # =~ or !~
4564  
4565 629 my @heredoc = (); # here document
4566 629 my @heredoc_delimiter = ();
4567 629 my $here_script = ''; # here script
4568  
4569 #
4570 # escape UTF-8 script
4571 #
4572 651 ▶sub UTF2::escape(;$) {
Subroutine escape: called CC=3 SCAR=11.0
4573 651 ▶ local($_) = $_[0] if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 292 359 651
4574  
4575 # P.359 The Study Function
4576 # in Chapter 7: Perl
4577 # of ISBN 0-596-00289-0 Mastering Regular Expressions, Second edition
4578  
4579 651 study $_; # Yes, I studied study yesterday.
4580  
4581 # while all script
4582  
4583 # 6.14. Matching from Where the Last Pattern Left Off
4584 # in Chapter 6. Pattern Matching
4585 # of ISBN 0-596-00313-7 Perl Cookbook, 2nd Edition.
4586 # (and so on)
4587  
4588 # one member of Tag-team
4589 #
4590 # P.128 Start of match (or end of previous match): \G
4591 # P.130 Advanced Use of \G with Perl
4592 # in Chapter 3: Overview of Regular Expression Features and Flavors
4593 # P.255 Use leading anchors
4594 # P.256 Expose ^ and \G at the front expressions
4595 # in Chapter 6: Crafting an Efficient Expression
4596 # P.315 "Tag-team" matching with /gc
4597 # in Chapter 7: Perl
4598 # of ISBN 0-596-00289-0 Mastering Regular Expressions, Second edition
4599  
4600 651 my $e_script = '';
4601 651 ▶ while (not /\G \z/oxgc) { # member
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 146705 650 147355
4602 146705 $e_script .= UTF2::escape_token();
4603 }
4604  
4605 650 return $e_script;
4606 }
4607  
4608 #
4609 # escape UTF-8 token of script
4610 #
4611 146705 ▶sub UTF2::escape_token {
Subroutine escape_token: called CC=504 SCAR=106.0
4612  
4613 # \n output here document
4614  
4615 146705 my $ignore_modules = join('|', qw(
4616 utf8
4617 bytes
4618 charnames
4619 I18N::Japanese
4620 I18N::Collate
4621 I18N::JExt
4622 File::DosGlob
4623 Wild
4624 Wildcard
4625 Japanese
4626 ));
4627  
4628 # another member of Tag-team
4629 #
4630 # P.315 "Tag-team" matching with /gc
4631 # in Chapter 7: Perl
4632 # of ISBN 0-596-00289-0 Mastering Regular Expressions, Second edition
4633  
4634 146705 ▶ if (/\G ( \n ) /oxgc) { # another member (and so on)
Branch: 139 branches
BranchTrueFalseTotal
if (/\G ( \n ) /cgox) { } 22423 124282 146705
elsif (/\G ((?>\s+)|\#.*) /cgox) { } 39374 84908 124282
elsif (/\G ( (?: if | elsif | unless | while | until | given | when ) (?>\s*) \( ) /cgox) { } 2641 82267 84908
elsif (/\G ( \( (?>\s*) (?: local \b | my \b | our \b | state \b )? (?>\s*) \$ $qq_scalar ) /cgox) { } 143 82124 82267
elsif (/\G ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH \b | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) /cgmosx) { } 4 82120 82124
elsif (/\G ( \$& | \$\{&\} | \$ (?>\s*) MATCH \b | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) /cgmosx) { } 28 82092 82120
elsif (/\G ( \$' | \$\{'\} ) /cgmosx) { } 1 82091 82092
elsif (/\G ( \$ (?>\s*) POSTMATCH \b | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) /cgmosx) { } 3 82088 82091
elsif (/\G ( \$ $qq_scalar | $qq_substr ) /cgox) { } 2399 79689 82088
elsif (/\G ( [,;] ) /cgox) { } 9282 70407 79689
elsif (/\G ( \{ (?>\s*) (?: tr | index | rindex | reverse ) (?>\s*) \} ) /cgmosx) { } 0 70407 70407
elsif (/\G ( \$ 0 ) /cgmosx) { } 2 70405 70407
elsif (/\G ( \$ \{ (?>\s*) 0 (?>\s*) \} ) /cgmosx) { } 0 70405 70405
elsif (/\G ( \$ \$ ) (?![\w\{]) /cgmosx) { } 1 70404 70405
elsif (/\G \$ ((?>[1-9][0-9]*)) /cgmosx) { } 57 70347 70404
elsif (/\G \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} /cgmosx) { } 0 70347 70347
elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ .+? \] ) /cgmosx) { } 0 70347 70347
elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ .+? \} ) /cgmosx) { } 0 70347 70347
elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) /cgmosx) { } 0 70347 70347
elsif (/\G \$ (?>\s*) \{ ( (?>\s*) (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* ) (?>\s*) ) \} /cgmosx) { } 0 70347 70347
elsif (/\G \$ (?>\s*) \{ (?>\s*) ( $qq_brace ) (?>\s*) \} /cgmosx) { } 0 70347 70347
elsif (/\G ( (?: [\$\@\%\&\*] | \$\# | -> | \b sub \b) (?>\s*) (?: split | chop | index | rindex | lc | uc | fc | chr | ord | reverse | getc | tr | y | q | qq | qx | qw | m | s | qr | glob | lstat | opendir | stat | unlink | chdir ) ) \b /cgmosx) { } 27 70320 70347
elsif (m{\G ( \$[\$\@\#\\\'\"/\?\(\)\[\]\<\>] ) }cgmosx) { } 91 70229 70320
elsif (/\G \b (while (?>\s*) \( (?>\s*) <[\$]?[A-Za-z_][A-Za-z_0-9]*> (?>\s*) \)) \b /cgox) { } 0 70229 70229
elsif (/\G \b while (?>\s*) \( (?>\s*) < ((?:[^\x80-\xFF>\0\a\e\f\n\r\t]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])+?) > (?>\s*) \) \b /cgox) { } 0 70229 70229
elsif (/\G \b while (?>\s*) \( (?>\s*) glob (?>\s*) \) /cgox) { } 0 70229 70229
elsif (/\G \b while (?>\s*) \( (?>\s*) glob \b /cgox) { } 0 70229 70229
elsif (/\G \b ( if | unless | while | until | for | when ) \b /cgox) { } 404 69825 70229
elsif (/\G \b (CORE:: | ->(>?\s*) (?: atan2 | [a-z]{2,})) \b /cgox) { } 19 69806 69825
elsif (/\G \b Char::eval (?= (?>\s*) \{ ) /cgox) { } 0 69806 69806
elsif (/\G \b UTF2::eval (?= (?>\s*) \{ ) /cgox) { } 22 69784 69806
elsif (/\G \b Char::eval \b (?! (?>\s*) => ) /cgox) { } 0 69784 69784
elsif (/\G \b UTF2::eval \b (?! (?>\s*) => ) /cgox) { } 168 69616 69784
elsif (/\G \b bytes::substr \b (?! (?>\s*) => ) /cgox) { } 2 69614 69616
elsif (/\G \b chop \b (?! (?>\s*) => ) /cgox) { } 2 69612 69614
elsif (/\G \b bytes::index \b (?! (?>\s*) => ) /cgox) { } 2 69610 69612
elsif (/\G \b Char::index \b (?! (?>\s*) => ) /cgox) { } 0 69610 69610
elsif (/\G \b UTF2::index \b (?! (?>\s*) => ) /cgox) { } 2 69608 69610
elsif (/\G \b index \b (?! (?>\s*) => ) /cgox) { } 2 69606 69608
elsif (/\G \b bytes::rindex \b (?! (?>\s*) => ) /cgox) { } 2 69604 69606
elsif (/\G \b Char::rindex \b (?! (?>\s*) => ) /cgox) { } 0 69604 69604
elsif (/\G \b UTF2::rindex \b (?! (?>\s*) => ) /cgox) { } 2 69602 69604
elsif (/\G \b rindex \b (?! (?>\s*) => ) /cgox) { } 2 69600 69602
elsif (/\G \b lc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 1 69599 69600
elsif (/\G \b lcfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 69599 69599
elsif (/\G \b uc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 69599 69599
elsif (/\G \b ucfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 69599 69599
elsif (/\G \b fc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 7 69592 69599
elsif (/\G -s (?>\s*) (\") ((?:$Eutf2::qq_char)+?) (\") /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) qq (?>\s*) (\#) ((?:$Eutf2::qq_char)+?) (\#) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) qq (?>\s*) (\() ((?:$qq_paren)+?) (\)) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) qq (?>\s*) (\{) ((?:$qq_brace)+?) (\}) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) qq (?>\s*) (\[) ((?:$qq_bracket)+?) (\]) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) qq (?>\s*) (\<) ((?:$qq_angle)+?) (\>) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) qq (?>\s*) (\S) ((?:$Eutf2::qq_char)+?) (\1) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s*) (\') ((?:\\\'|\\\\|$Eutf2::q_char)+?) (\') /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) q (?>\s*) (\#) ((?:\\\#|\\\\|$Eutf2::q_char)+?) (\#) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) q (?>\s*) (\() ((?:\\\)|\\\\|$q_paren)+?) (\)) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) q (?>\s*) (\{) ((?:\\\}|\\\\|$q_brace)+?) (\}) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) q (?>\s*) (\[) ((?:\\\]|\\\\|$q_bracket)+?) (\]) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) q (?>\s*) (\<) ((?:\\\>|\\\\|$q_angle)+?) (\>) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) q (?>\s*) (\S) ((?:\\\1|\\\\|$Eutf2::q_char)+?) (\1) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s*) (\$ (?> \w+ (?: ::\w+)* ) (?: (?: ->)? (?: [\$\@\%\&\*]\* | \$\#\* | \( (?:$qq_paren)*? \) | [\@\%\*]? \{ (?:$qq_brace)+? \} | [\@\%]? \[ (?:$qq_bracket)+? \] ) )*) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s*) \( ((?:$qq_paren)*?) \) /cgox) { } 0 69592 69592
elsif (/\G -s (?= (?>\s+) [a-z]+) /cgox) { } 0 69592 69592
elsif (/\G -s (?>\s+) ((?>\w+)) /cgox) { } 0 69592 69592
elsif (/\G \b bytes::length (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 2 69590 69592
elsif (/\G \b bytes::chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 2 69588 69590
elsif (/\G \b chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 36 69552 69588
elsif (/\G \b bytes::ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 2 69550 69552
elsif (/\G \b ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 2 69548 69550
elsif (/\G \b glob (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 69548 69548
elsif (/\G \b lc \b (?! (?>\s*) => ) /cgox) { } 0 69548 69548
elsif (/\G \b lcfirst \b (?! (?>\s*) => ) /cgox) { } 0 69548 69548
elsif (/\G \b uc \b (?! (?>\s*) => ) /cgox) { } 0 69548 69548
elsif (/\G \b ucfirst \b (?! (?>\s*) => ) /cgox) { } 0 69548 69548
elsif (/\G \b fc \b (?! (?>\s*) => ) /cgox) { } 0 69548 69548
elsif (/\G -s \b (?! (?>\s*) => ) /cgox) { } 0 69548 69548
elsif (/\G \b bytes::length \b (?! (?>\s*) => ) /cgox) { } 0 69548 69548
elsif (/\G \b bytes::chr \b (?! (?>\s*) => ) /cgox) { } 0 69548 69548
elsif (/\G \b chr \b (?! (?>\s*) => ) /cgox) { } 0 69548 69548
elsif (/\G \b bytes::ord \b (?! (?>\s*) => ) /cgox) { } 0 69548 69548
elsif (/\G \b ord \b (?! (?>\s*) => ) /cgox) { } 2 69546 69548
elsif (/\G \b glob \b (?! (?>\s*) => ) /cgox) { } 0 69546 69546
elsif (/\G \b reverse \b (?! (?>\s*) => ) /cgox) { } 4 69542 69546
elsif (/\G \b getc \b (?! (?>\s*) => ) /cgox) { } 8 69534 69542
elsif (/\G \b (split) \b (?! (?>\s*) => ) /cgox) { } 120 69414 69534
elsif (/\G \b ( tr | y ) \b /cgox) { } 12 69402 69414
elsif (/\G \b (qq) \b /cgox) { } 3894 65508 69402
elsif (/\G \b (qr) \b /cgox) { } 36 65472 65508
elsif (/\G \b (qw) \b /cgox) { } 34 65438 65472
elsif (/\G \b (qx) \b /cgox) { } 2 65436 65438
elsif (/\G \b (q) \b /cgox) { } 590 64846 65436
elsif (/\G \b (m) \b /cgox) { } 269 64577 64846
elsif (/\G \b (s) \b /cgox) { } 136 64441 64577
elsif (/\G \b require ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /cgmosx) { } 0 64441 64441
elsif (/\G \b require ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /cgmosx) { } 0 64441 64441
elsif (/\G \b require ((?>\s+) (?:$ignore_modules)) \b /cgmosx) { } 0 64441 64441
elsif (/\G \b use ((?>\s+) strict .*? ;) ([ \t]* [#\n]) /cgmosx) { } 43 64398 64441
elsif (/\G \b use ((?>\s+) strict .*? ;) ([ \t]* [^\x80-\xFF#]) /cgmosx) { } 0 64398 64398
elsif (/\G \b use ((?>\s+) strict) \b /cgmosx) { } 0 64398 64398
elsif (/\G \b use (?>\s+) ((?>([1-9][0-9_]*)(?:\.([0-9_]+))*)) (?>\s*) ; /cgmosx) { } 3 64395 64398
elsif (/\G \b use (?>\s+) ((?>v([0-9][0-9_]*)(?:\.([0-9_]+))*)) (?>\s*) ; /cgmosx) { } 0 64395 64395
elsif (/\G \b use ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /cgmosx) { } 2 64393 64395
elsif (/\G \b use ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /cgmosx) { } 0 64393 64393
elsif (/\G \b use ((?>\s+) (?:$ignore_modules)) \b /cgmosx) { } 0 64393 64393
elsif (/\G \b no ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /cgmosx) { } 0 64393 64393
elsif (/\G \b no ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /cgmosx) { } 0 64393 64393
elsif (/\G \b no ((?>\s+) (?:$ignore_modules)) \b /cgmosx) { } 0 64393 64393
elsif (/\G \b use \b /cgmosx) { } 0 64393 64393
elsif (/\G \b no \b /cgmosx) { } 2 64391 64393
elsif (/\G (?<![\w\$\@\%\&\*]) (\') /cgox) { } 1885 62506 64391
elsif (/\G (\") /cgox) { } 5681 56825 62506
elsif (/\G (\`) /cgox) { } 1 56824 56825
elsif ($Eutf2::slash eq 'm//' and m[\G (/) ]cgox) { } 1299 55525 56824
elsif ($Eutf2::slash eq 'm//' and /\G (\?) /cgox) { } 18 55507 55525
elsif (/\G ( <<>> ) /cgox) { } 0 55507 55507
elsif (/\G ( << (?>\s*) ) (?= [0-9\$\@\&] ) /cgox) { } 0 55507 55507
elsif (/\G ( <<~ [\t ]* '([a-zA-Z_0-9]*)' ) /cgox) { } 6 55501 55507
elsif (/\G ( <<~ \\([a-zA-Z_0-9]+) ) /cgox) { } 3 55498 55501
elsif (/\G ( <<~ [\t ]* "([a-zA-Z_0-9]*)" ) /cgox) { } 6 55492 55498
elsif (/\G ( <<~ ([a-zA-Z_0-9]+) ) /cgox) { } 3 55489 55492
elsif (/\G ( <<~ [\t ]* `([a-zA-Z_0-9]*)` ) /cgox) { } 6 55483 55489
elsif (/\G ( << '([a-zA-Z_0-9]*)' ) /cgox) { } 80 55403 55483
elsif (/\G ( << \\([a-zA-Z_0-9]+) ) /cgox) { } 2 55401 55403
elsif (/\G ( << "([a-zA-Z_0-9]*)" ) /cgox) { } 39 55362 55401
elsif (/\G ( << ([a-zA-Z_0-9]+) ) /cgox) { } 54 55308 55362
elsif (/\G ( << `([a-zA-Z_0-9]*)` ) /cgox) { } 0 55308 55308
elsif (/\G ( <<= | <=> | <= | < ) (?= (?>\s*) [A-Za-z_0-9'"`\$\@\&\*\(\+\-] )/cgox) { } 12 55296 55308
elsif (/\G (<[\$]?[A-Za-z_][A-Za-z_0-9]*>) /cgox) { } 0 55296 55296
elsif (/\G < ((?:[^\x80-\xFF>\0\a\e\f\n\r\t]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])+?) > /cgox) { } 0 55296 55296
elsif (/\G ^ ( __DATA__ \n .*) \z /cgmosx) { } 0 55296 55296
elsif (/\G ^ ( __END__ \n .*) \z /cgmosx) { } 312 54984 55296
elsif (/\G ( \cD .*) \z /cgmosx) { } 0 54984 54984
elsif (/\G ( \cZ .*) \z /cgmosx) { } 0 54984 54984
elsif (/\G ( -- | \+\+ | [\)\}\]] ) /cgox) { } 9312 45672 54984
elsif (/\G ( \.\.\. ) /cgox) { } 7 45665 45672
elsif (m"\G ((?> !~~ | !~ | != | ! | %= | % | &&= | && | &= | &\.= | &\. | & | -= | -> | - | :(?>\s*)= | : | <<>> | <<= | <=> | <= | < | == | => | =~ | = | >>= | >> | >= | > | \*\*= | \*\* | \*= | \* | \+= | \+ | \.\. | \.= | \. | //= | // | /= | / | \? | \\ | \^= | \^\.= | \^\. | \^ | \b x= | \|\|= | \|\| | \|= | \|\.= | \|\. | \| | ~~ | ~\. | ~ | \b(?: and | cmp | eq | ge | gt | le | lt | ne | not | or | xor | x )\b | \b(?: print )\b | [,;\(\{\[] )) "cgox) { } 17259 28406 45665
elsif (/\G ($Eutf2::q_char) /cgox) { } 28406 0 28406
4635 22423 my $heredoc = '';
4636 22423 ▶ if (scalar(@heredoc_delimiter) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @heredoc_delimiter >= 1) 191 22232 22423
4637 191 $slash = 'm//';
4638  
4639 191 $heredoc = join '', @heredoc;
4640 191 @heredoc = ();
4641  
4642 # skip here document
4643 191 for my $heredoc_delimiter (@heredoc_delimiter) {
4644 199 /\G .*? \n $heredoc_delimiter \n/xmsgc;
4645 }
4646 191 @heredoc_delimiter = ();
4647  
4648 191 $here_script = '';
4649 }
4650 22423 return "\n" . $heredoc;
4651 }
4652  
4653 # ignore space, comment
4654 39374 elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
4655  
4656 # if (, elsif (, unless (, while (, until (, given (, and when (
4657  
4658 # given, when
4659  
4660 # P.225 The given Statement
4661 # in Chapter 15: Smart Matching and given-when
4662 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
4663  
4664 # P.133 The given Statement
4665 # in Chapter 4: Statements and Declarations
4666 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
4667  
4668 elsif (/\G ( (?: if | elsif | unless | while | until | given | when ) (?>\s*) \( ) /oxgc) {
4669 2641 $slash = 'm//';
4670 2641 return $1;
4671 }
4672  
4673 # scalar variable ($scalar = ...) =~ tr///;
4674 # scalar variable ($scalar = ...) =~ s///;
4675  
4676 # state
4677  
4678 # P.68 Persistent, Private Variables
4679 # in Chapter 4: Subroutines
4680 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
4681  
4682 # P.160 Persistent Lexically Scoped Variables: state
4683 # in Chapter 4: Statements and Declarations
4684 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
4685  
4686 # (and so on)
4687  
4688 elsif (/\G ( \( (?>\s*) (?: local \b | my \b | our \b | state \b )? (?>\s*) \$ $qq_scalar ) /oxgc) {
4689 143 my $e_string = e_string($1);
4690  
4691 143 ▶ if (/\G ( (?>\s*) = $qq_paren \) ) ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= (?: tr | y ) \b ) /oxgc) {
Branch: 2 branches
BranchTrueFalseTotal
if (/\G ( (?>\s*) = $qq_paren \) ) ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= (?: tr | y ) \b ) /cgox) { } 0 143 143
elsif (/\G ( (?>\s*) = $qq_paren \) ) ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= s \b ) /cgox) { } 0 143 143
4692 0 $tr_variable = $e_string . e_string($1);
4693 0 $bind_operator = $2;
4694 0 $slash = 'm//';
4695 0 return '';
4696 }
4697 elsif (/\G ( (?>\s*) = $qq_paren \) ) ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= s \b ) /oxgc) {
4698 0 $sub_variable = $e_string . e_string($1);
4699 0 $bind_operator = $2;
4700 0 $slash = 'm//';
4701 0 return '';
4702 }
4703 else {
4704 143 $slash = 'div';
4705 143 return $e_string;
4706 }
4707 }
4708  
4709 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
4710 elsif (/\G ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH \b | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) /oxmsgc) {
4711 4 $slash = 'div';
4712 4 return q{Eutf2::PREMATCH()};
4713 }
4714  
4715 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
4716 elsif (/\G ( \$& | \$\{&\} | \$ (?>\s*) MATCH \b | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) /oxmsgc) {
4717 28 $slash = 'div';
4718 28 return q{Eutf2::MATCH()};
4719 }
4720  
4721 # $', ${'} --> $', ${'}
4722 elsif (/\G ( \$' | \$\{'\} ) /oxmsgc) {
4723 1 $slash = 'div';
4724 1 return $1;
4725 }
4726  
4727 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
4728 elsif (/\G ( \$ (?>\s*) POSTMATCH \b | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) /oxmsgc) {
4729 3 $slash = 'div';
4730 3 return q{Eutf2::POSTMATCH()};
4731 }
4732  
4733 # scalar variable $scalar =~ tr///;
4734 # scalar variable $scalar =~ s///;
4735 # substr() =~ tr///;
4736 # substr() =~ s///;
4737 elsif (/\G ( \$ $qq_scalar | $qq_substr ) /oxgc) {
4738 2399 my $scalar = e_string($1);
4739  
4740 2399 ▶ if (/\G ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= (?: tr | y ) \b ) /oxgc) {
Branch: 2 branches
BranchTrueFalseTotal
if (/\G ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= (?: tr | y ) \b ) /cgox) { } 10 2389 2399
elsif (/\G ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= s \b ) /cgox) { } 99 2290 2389
4741 10 $tr_variable = $scalar;
4742 10 $bind_operator = $1;
4743 10 $slash = 'm//';
4744 10 return '';
4745 }
4746 elsif (/\G ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= s \b ) /oxgc) {
4747 99 $sub_variable = $scalar;
4748 99 $bind_operator = $1;
4749 99 $slash = 'm//';
4750 99 return '';
4751 }
4752 else {
4753 2290 $slash = 'div';
4754 2290 return $scalar;
4755 }
4756 }
4757  
4758 # end of statement
4759 elsif (/\G ( [,;] ) /oxgc) {
4760 9282 $slash = 'm//';
4761  
4762 # clear tr/// variable
4763 9282 $tr_variable = '';
4764  
4765 # clear s/// variable
4766 9282 $sub_variable = '';
4767  
4768 9282 $bind_operator = '';
4769  
4770 9282 return $1;
4771 }
4772  
4773 # bareword
4774 elsif (/\G ( \{ (?>\s*) (?: tr | index | rindex | reverse ) (?>\s*) \} ) /oxmsgc) {
4775 0 return $1;
4776 }
4777  
4778 # $0 --> $0
4779 elsif (/\G ( \$ 0 ) /oxmsgc) {
4780 2 $slash = 'div';
4781 2 return $1;
4782 }
4783 elsif (/\G ( \$ \{ (?>\s*) 0 (?>\s*) \} ) /oxmsgc) {
4784 0 $slash = 'div';
4785 0 return $1;
4786 }
4787  
4788 # $$ --> $$
4789 elsif (/\G ( \$ \$ ) (?![\w\{]) /oxmsgc) {
4790 1 $slash = 'div';
4791 1 return $1;
4792 }
4793  
4794 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
4795 # $1, $2, $3 --> $1, $2, $3 otherwise
4796 elsif (/\G \$ ((?>[1-9][0-9]*)) /oxmsgc) {
4797 57 $slash = 'div';
4798 57 return e_capture($1);
4799 }
4800 elsif (/\G \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} /oxmsgc) {
4801 0 $slash = 'div';
4802 0 return e_capture($1);
4803 }
4804  
4805 # $$foo[ ... ] --> $ $foo->[ ... ]
4806 elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ .+? \] ) /oxmsgc) {
4807 0 $slash = 'div';
4808 0 return e_capture($1.'->'.$2);
4809 }
4810  
4811 # $$foo{ ... } --> $ $foo->{ ... }
4812 elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ .+? \} ) /oxmsgc) {
4813 0 $slash = 'div';
4814 0 return e_capture($1.'->'.$2);
4815 }
4816  
4817 # $$foo
4818 elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) /oxmsgc) {
4819 0 $slash = 'div';
4820 0 return e_capture($1);
4821 }
4822  
4823 # ${ foo }
4824 elsif (/\G \$ (?>\s*) \{ ( (?>\s*) (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* ) (?>\s*) ) \} /oxmsgc) {
4825 0 $slash = 'div';
4826 0 return '${' . $1 . '}';
4827 }
4828  
4829 # ${ ... }
4830 elsif (/\G \$ (?>\s*) \{ (?>\s*) ( $qq_brace ) (?>\s*) \} /oxmsgc) {
4831 0 $slash = 'div';
4832 0 return e_capture($1);
4833 }
4834  
4835 # variable or function
4836 # $ @ % & * $ #
4837 elsif (/\G ( (?: [\$\@\%\&\*] | \$\# | -> | \b sub \b) (?>\s*) (?: split | chop | index | rindex | lc | uc | fc | chr | ord | reverse | getc | tr | y | q | qq | qx | qw | m | s | qr | glob | lstat | opendir | stat | unlink | chdir ) ) \b /oxmsgc) {
4838 27 $slash = 'div';
4839 27 return $1;
4840 }
4841 # $ $ $ $ $ $ $ $ $ $ $ $ $ $
4842 # $ @ # \ ' " / ? ( ) [ ] < >
4843 elsif (/\G ( \$[\$\@\#\\\'\"\/\?\(\)\[\]\<\>] ) /oxmsgc) {
4844 91 $slash = 'div';
4845 91 return $1;
4846 }
4847  
4848 # while (<FILEHANDLE>)
4849 elsif (/\G \b (while (?>\s*) \( (?>\s*) <[\$]?[A-Za-z_][A-Za-z_0-9]*> (?>\s*) \)) \b /oxgc) {
4850 0 return $1;
4851 }
4852  
4853 # while (<WILDCARD>) --- glob
4854  
4855 # avoid "Error: Runtime exception" of perl version 5.005_03
4856  
4857 elsif (/\G \b while (?>\s*) \( (?>\s*) < ((?:[^\x80-\xFF>\0\a\e\f\n\r\t]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])+?) > (?>\s*) \) \b /oxgc) {
4858 0 return 'while ($_ = Eutf2::glob("' . $1 . '"))';
4859 }
4860  
4861 # while (glob)
4862 elsif (/\G \b while (?>\s*) \( (?>\s*) glob (?>\s*) \) /oxgc) {
4863 0 return 'while ($_ = Eutf2::glob_)';
4864 }
4865  
4866 # while (glob(WILDCARD))
4867 elsif (/\G \b while (?>\s*) \( (?>\s*) glob \b /oxgc) {
4868 0 return 'while ($_ = Eutf2::glob';
4869 }
4870  
4871 # doit if, doit unless, doit while, doit until, doit for, doit when
4872 404 elsif (/\G \b ( if | unless | while | until | for | when ) \b /oxgc) { $slash = 'm//'; return $1; }
4873  
4874 # subroutines of package Eutf2
4875 19 elsif (/\G \b (CORE:: | ->(>?\s*) (?: atan2 | [a-z]{2,})) \b /oxgc) { $slash = 'm//'; return $1; }
4876 0 elsif (/\G \b Char::eval (?= (?>\s*) \{ ) /oxgc) { $slash = 'm//'; return 'eval'; }
4877 22 elsif (/\G \b UTF2::eval (?= (?>\s*) \{ ) /oxgc) { $slash = 'm//'; return 'eval'; }
4878 0 elsif (/\G \b Char::eval \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'eval Char::escape'; }
4879 168 elsif (/\G \b UTF2::eval \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'eval UTF2::escape'; }
4880 2 elsif (/\G \b bytes::substr \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'substr'; }
4881 2 elsif (/\G \b chop \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::chop'; }
4882 2 elsif (/\G \b bytes::index \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'index'; }
4883 0 elsif (/\G \b Char::index \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Char::index'; }
4884 2 elsif (/\G \b UTF2::index \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'UTF2::index'; }
4885 2 elsif (/\G \b index \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::index'; }
4886 2 elsif (/\G \b bytes::rindex \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'rindex'; }
4887 0 elsif (/\G \b Char::rindex \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Char::rindex'; }
4888 2 elsif (/\G \b UTF2::rindex \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'UTF2::rindex'; }
4889 2 elsif (/\G \b rindex \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::rindex'; }
4890 1 elsif (/\G \b lc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::lc'; }
4891 0 elsif (/\G \b lcfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::lcfirst'; }
4892 0 elsif (/\G \b uc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::uc'; }
4893 0 elsif (/\G \b ucfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::ucfirst'; }
4894 7 elsif (/\G \b fc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::fc'; }
4895  
4896 # "-s '' ..." means file test "-s 'filename' ..." (not means "- s/// ...")
4897 0 elsif (/\G -s (?>\s*) (\") ((?:$qq_char)+?) (\") /oxgc) { $slash = 'm//'; return '-s ' . e_qq('', $1,$3,$2); }
4898 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\#) ((?:$qq_char)+?) (\#) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4899 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\() ((?:$qq_paren)+?) (\)) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4900 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\{) ((?:$qq_brace)+?) (\}) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4901 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\[) ((?:$qq_bracket)+?) (\]) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4902 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\<) ((?:$qq_angle)+?) (\>) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4903 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\S) ((?:$qq_char)+?) (\1) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4904  
4905 0 elsif (/\G -s (?>\s*) (\') ((?:\\\'|\\\\|$q_char)+?) (\') /oxgc) { $slash = 'm//'; return '-s ' . e_q ('', $1,$3,$2); }
4906 0 elsif (/\G -s (?>\s+) q (?>\s*) (\#) ((?:\\\#|\\\\|$q_char)+?) (\#) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4907 0 elsif (/\G -s (?>\s+) q (?>\s*) (\() ((?:\\\)|\\\\|$q_paren)+?) (\)) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4908 0 elsif (/\G -s (?>\s+) q (?>\s*) (\{) ((?:\\\}|\\\\|$q_brace)+?) (\}) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4909 0 elsif (/\G -s (?>\s+) q (?>\s*) (\[) ((?:\\\]|\\\\|$q_bracket)+?) (\]) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4910 0 elsif (/\G -s (?>\s+) q (?>\s*) (\<) ((?:\\\>|\\\\|$q_angle)+?) (\>) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4911 0 elsif (/\G -s (?>\s+) q (?>\s*) (\S) ((?:\\\1|\\\\|$q_char)+?) (\1) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4912  
4913 elsif (/\G -s (?>\s*) (\$ (?> \w+ (?: ::\w+)* ) (?: (?: ->)? (?: [\$\@\%\&\*]\* | \$\#\* | \( (?:$qq_paren)*? \) | [\@\%\*]? \{ (?:$qq_brace)+? \} | [\@\%]? \[ (?:$qq_bracket)+? \] ) )*) /oxgc)
4914 0 { $slash = 'm//'; return "-s $1"; }
4915 0 elsif (/\G -s (?>\s*) \( ((?:$qq_paren)*?) \) /oxgc) { $slash = 'm//'; return "-s ($1)"; }
4916 0 elsif (/\G -s (?= (?>\s+) [a-z]+) /oxgc) { $slash = 'm//'; return '-s'; }
4917 0 elsif (/\G -s (?>\s+) ((?>\w+)) /oxgc) { $slash = 'm//'; return "-s $1"; }
4918  
4919 2 elsif (/\G \b bytes::length (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'length'; }
4920 2 elsif (/\G \b bytes::chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'chr'; }
4921 36 elsif (/\G \b chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::chr'; }
4922 2 elsif (/\G \b bytes::ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'div'; return 'ord'; }
4923 2 elsif (/\G \b ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'div'; return $function_ord; }
4924 0 elsif (/\G \b glob (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::glob'; }
4925 0 elsif (/\G \b lc \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::lc_'; }
4926 0 elsif (/\G \b lcfirst \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::lcfirst_'; }
4927 0 elsif (/\G \b uc \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::uc_'; }
4928 0 elsif (/\G \b ucfirst \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::ucfirst_'; }
4929 0 elsif (/\G \b fc \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::fc_'; }
4930 0 elsif (/\G -s \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return '-s '; }
4931  
4932 0 elsif (/\G \b bytes::length \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'length'; }
4933 0 elsif (/\G \b bytes::chr \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'chr'; }
4934 0 elsif (/\G \b chr \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::chr_'; }
4935 0 elsif (/\G \b bytes::ord \b (?! (?>\s*) => ) /oxgc) { $slash = 'div'; return 'ord'; }
4936 2 elsif (/\G \b ord \b (?! (?>\s*) => ) /oxgc) { $slash = 'div'; return $function_ord_; }
4937 0 elsif (/\G \b glob \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::glob_'; }
4938 4 elsif (/\G \b reverse \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return $function_reverse; }
4939 8 elsif (/\G \b getc \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return $function_getc; }
4940 # split
4941 elsif (/\G \b (split) \b (?! (?>\s*) => ) /oxgc) {
4942 120 $slash = 'm//';
4943  
4944 120 my $e = '';
4945 120 ▶ while (/\G ( (?>\s+) | \( | \#.* ) /oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\G ( (?>\s+) | \( | \#.* ) /cgox) 117 120 237
4946 117 $e .= $1;
4947 }
4948  
4949 # end of split
4950 120 ▶ if (/\G (?= [,;\)\}\]] ) /oxgc) { return 'Eutf2::split' . $e; }
Branch: 23 branches
BranchTrueFalseTotal
if (/\G (?= [,;\)\}\]] ) /cgox) { } 3 117 120
elsif (/\G ( [\$\@\&\*] $qq_scalar ) /cgox) { } 1 116 117
elsif (/\G \b qq (\#) [ ] (\#) /cgox) { } 0 116 116
elsif (/\G \b qq ((?>\s*)) (\() [ ] (\)) /cgox) { } 0 116 116
elsif (/\G \b qq ((?>\s*)) (\{) [ ] (\}) /cgox) { } 0 116 116
elsif (/\G \b qq ((?>\s*)) (\[) [ ] (\]) /cgox) { } 0 116 116
elsif (/\G \b qq ((?>\s*)) (\<) [ ] (\>) /cgox) { } 0 116 116
elsif (/\G \b qq ((?>\s*)) (\S) [ ] (\2) /cgox) { } 0 116 116
elsif (/\G \b q (\#) [ ] (\#) /cgox) { } 0 116 116
elsif (/\G \b q ((?>\s*)) (\() [ ] (\)) /cgox) { } 0 116 116
elsif (/\G \b q ((?>\s*)) (\{) [ ] (\}) /cgox) { } 0 116 116
elsif (/\G \b q ((?>\s*)) (\[) [ ] (\]) /cgox) { } 0 116 116
elsif (/\G \b q ((?>\s*)) (\<) [ ] (\>) /cgox) { } 0 116 116
elsif (/\G \b q ((?>\s*)) (\S) [ ] (\2) /cgox) { } 0 116 116
elsif (/\G ' [ ] ' /cgox) { } 13 103 116
elsif (/\G " [ ] " /cgox) { } 2 101 103
elsif (/\G \b (qq) \b /cgox) { } 0 101 101
elsif (/\G \b (qr) \b /cgox) { } 12 89 101
elsif (/\G \b (q) \b /cgox) { } 0 89 89
elsif (/\G \b (m) \b /cgox) { } 24 65 89
elsif (/\G (\') /cgox) { } 0 65 65
elsif (/\G (\") /cgox) { } 0 65 65
elsif (m[\G (/) ]cgox) { } 65 0 65
4951  
4952 # split scalar value
4953 1 elsif (/\G ( [\$\@\&\*] $qq_scalar ) /oxgc) { return 'Eutf2::split' . $e . e_string($1); }
4954  
4955 # split literal space
4956 0 elsif (/\G \b qq (\#) [ ] (\#) /oxgc) { return 'Eutf2::split' . $e . qq {qq$1 $2}; }
4957 0 elsif (/\G \b qq ((?>\s*)) (\() [ ] (\)) /oxgc) { return 'Eutf2::split' . $e . qq{$1qq$2 $3}; }
4958 0 elsif (/\G \b qq ((?>\s*)) (\{) [ ] (\}) /oxgc) { return 'Eutf2::split' . $e . qq{$1qq$2 $3}; }
4959 0 elsif (/\G \b qq ((?>\s*)) (\[) [ ] (\]) /oxgc) { return 'Eutf2::split' . $e . qq{$1qq$2 $3}; }
4960 0 elsif (/\G \b qq ((?>\s*)) (\<) [ ] (\>) /oxgc) { return 'Eutf2::split' . $e . qq{$1qq$2 $3}; }
4961 0 elsif (/\G \b qq ((?>\s*)) (\S) [ ] (\2) /oxgc) { return 'Eutf2::split' . $e . qq{$1qq$2 $3}; }
4962 0 elsif (/\G \b q (\#) [ ] (\#) /oxgc) { return 'Eutf2::split' . $e . qq {q$1 $2}; }
4963 0 elsif (/\G \b q ((?>\s*)) (\() [ ] (\)) /oxgc) { return 'Eutf2::split' . $e . qq {$1q$2 $3}; }
4964 0 elsif (/\G \b q ((?>\s*)) (\{) [ ] (\}) /oxgc) { return 'Eutf2::split' . $e . qq {$1q$2 $3}; }
4965 0 elsif (/\G \b q ((?>\s*)) (\[) [ ] (\]) /oxgc) { return 'Eutf2::split' . $e . qq {$1q$2 $3}; }
4966 0 elsif (/\G \b q ((?>\s*)) (\<) [ ] (\>) /oxgc) { return 'Eutf2::split' . $e . qq {$1q$2 $3}; }
4967 0 elsif (/\G \b q ((?>\s*)) (\S) [ ] (\2) /oxgc) { return 'Eutf2::split' . $e . qq {$1q$2 $3}; }
4968 13 elsif (/\G ' [ ] ' /oxgc) { return 'Eutf2::split' . $e . qq {' '}; }
4969 2 elsif (/\G " [ ] " /oxgc) { return 'Eutf2::split' . $e . qq {" "}; }
4970  
4971 # split qq//
4972 elsif (/\G \b (qq) \b /oxgc) {
4973 0 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq# # --> qr # #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) /cgox) { } 0 0 0
4974 else {
4975 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
4976 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 7 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif (/\G (\() ((?:$qq_paren)*?) (\)) /cgox) { } 0 0 0
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /cgox) { } 0 0 0
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /cgox) { } 0 0 0
elsif (/\G ([*\-:?\\^|]) ((?:$Eutf2::qq_char)*?) (\1) /cgox) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) /cgox) { } 0 0 0
4977 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq ( ) --> qr ( )
4978 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq { } --> qr { }
4979 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq [ ] --> qr [ ]
4980 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq < > --> qr < >
4981 0 elsif (/\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) /oxgc) { return e_split($e.'qr','{','}',$2,''); } # qq | | --> qr { }
4982 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq * * --> qr * *
4983 }
4984 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
4985 }
4986 }
4987  
4988 # split qr//
4989 elsif (/\G \b (qr) \b /oxgc) {
4990 0 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1,$3,$2,$4); } # qr# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) ([imosxpadlunbB]*) /cgox) { } 0 12 12
4991 else {
4992 12 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 12 0 12
4993 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 8 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 12 12
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([imosxpadlunbB]*) /cgox) { } 0 12 12
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([imosxpadlunbB]*) /cgox) { } 0 12 12
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([imosxpadlunbB]*) /cgox) { } 0 12 12
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([imosxpadlunbB]*) /cgox) { } 0 12 12
elsif (/\G (\') ((?:$Eutf2::qq_char)*?) (\') ([imosxpadlunbB]*) /cgox) { } 0 12 12
elsif (/\G ([*\-:?\\^|]) ((?:$Eutf2::qq_char)*?) (\1) ([imosxpadlunbB]*) /cgox) { } 0 12 12
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([imosxpadlunbB]*) /cgox) { } 12 0 12
4994 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # qr ( )
4995 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # qr { }
4996 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # qr [ ]
4997 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # qr < >
4998 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([imosxpadlunbB]*) /oxgc) { return e_split_q($e.'qr',$1, $3, $2,$4); } # qr ' '
4999 0 elsif (/\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr','{','}',$2,$4); } # qr | | --> qr { }
5000 12 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # qr * *
5001 }
5002 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5003 }
5004 }
5005  
5006 # split q//
5007 elsif (/\G \b (q) \b /oxgc) {
5008 0 ▶ if (/\G (\#) ((?:\\\#|\\\\|$q_char)*?) (\#) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q# # --> qr # #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:\\\#|\\\\|$Eutf2::q_char)*?) (\#) /cgox) { } 0 0 0
5009 else {
5010 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5011 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 7 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif (/\G (\() ((?:\\\\|\\\)|\\\(|$q_paren)*?) (\)) /cgox) { } 0 0 0
elsif (/\G (\{) ((?:\\\\|\\\}|\\\{|$q_brace)*?) (\}) /cgox) { } 0 0 0
elsif (/\G (\[) ((?:\\\\|\\\]|\\\[|$q_bracket)*?) (\]) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:\\\\|\\\>|\\\<|$q_angle)*?) (\>) /cgox) { } 0 0 0
elsif (/\G ([*\-:?\\^|]) ((?:$Eutf2::q_char)*?) (\1) /cgox) { } 0 0 0
elsif (/\G (\S) ((?:\\\\|\\\1| $Eutf2::q_char)*?) (\1) /cgox) { } 0 0 0
5012 0 elsif (/\G (\() ((?:\\\\|\\\)|\\\(|$q_paren)*?) (\)) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q ( ) --> qr ( )
5013 0 elsif (/\G (\{) ((?:\\\\|\\\}|\\\{|$q_brace)*?) (\}) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q { } --> qr { }
5014 0 elsif (/\G (\[) ((?:\\\\|\\\]|\\\[|$q_bracket)*?) (\]) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q [ ] --> qr [ ]
5015 0 elsif (/\G (\<) ((?:\\\\|\\\>|\\\<|$q_angle)*?) (\>) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q < > --> qr < >
5016 0 elsif (/\G ([*\-:?\\^|]) ((?:$q_char)*?) (\1) /oxgc) { return e_split_q($e.'qr','{','}',$2,''); } # q | | --> qr { }
5017 0 elsif (/\G (\S) ((?:\\\\|\\\1| $q_char)*?) (\1) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q * * --> qr * *
5018 }
5019 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5020 }
5021 }
5022  
5023 # split m//
5024 elsif (/\G \b (m) \b /oxgc) {
5025 0 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1,$3,$2,$4); } # m# # --> qr # #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) ([cgimosxpadlunbB]*) /cgox) { } 0 24 24
5026 else {
5027 24 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 24 0 24
5028 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 8 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 24 24
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cgimosxpadlunbB]*) /cgox) { } 0 24 24
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cgimosxpadlunbB]*) /cgox) { } 0 24 24
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cgimosxpadlunbB]*) /cgox) { } 0 24 24
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cgimosxpadlunbB]*) /cgox) { } 0 24 24
elsif (/\G (\') ((?:$Eutf2::qq_char)*?) (\') ([cgimosxpadlunbB]*) /cgox) { } 0 24 24
elsif (/\G ([*\-:?\\^|]) ((?:$Eutf2::qq_char)*?) (\1) ([cgimosxpadlunbB]*) /cgox) { } 0 24 24
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cgimosxpadlunbB]*) /cgox) { } 24 0 24
5029 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # m ( ) --> qr ( )
5030 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # m { } --> qr { }
5031 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # m [ ] --> qr [ ]
5032 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # m < > --> qr < >
5033 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cgimosxpadlunbB]*) /oxgc) { return e_split_q($e.'qr',$1, $3, $2,$4); } # m ' ' --> qr ' '
5034 0 elsif (/\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr','{','}',$2,$4); } # m | | --> qr { }
5035 24 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # m * * --> qr * *
5036 }
5037 0 die __FILE__, ": Search pattern not terminated\n";
5038 }
5039 }
5040  
5041 # split ''
5042 elsif (/\G (\') /oxgc) {
5043 0 my $q_string = '';
5044 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5045 0 ▶ if (/\G (\\\\) /oxgc) { $q_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 0 0
elsif (/\G (\\\') /cgox) { } 0 0 0
elsif (/\G \' /cgox) { } 0 0 0
elsif (/\G ($Eutf2::q_char) /cgox) { } 0 0 0
5046 0 elsif (/\G (\\\') /oxgc) { $q_string .= $1; } # splitqr'' --> split qr''
5047 0 elsif (/\G \' /oxgc) { return e_split_q($e.q{ qr},"'","'",$q_string,''); } # ' ' --> qr ' '
5048 0 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5049 }
5050 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5051 }
5052  
5053 # split ""
5054 elsif (/\G (\") /oxgc) {
5055 0 my $qq_string = '';
5056 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5057 0 ▶ if (/\G (\\\\) /oxgc) { $qq_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 0 0
elsif (/\G (\\\") /cgox) { } 0 0 0
elsif (/\G \" /cgox) { } 0 0 0
elsif (/\G ($Eutf2::q_char) /cgox) { } 0 0 0
5058 0 elsif (/\G (\\\") /oxgc) { $qq_string .= $1; } # splitqr"" --> split qr""
5059 0 elsif (/\G \" /oxgc) { return e_split($e.q{ qr},'"','"',$qq_string,''); } # " " --> qr " "
5060 0 elsif (/\G ($q_char) /oxgc) { $qq_string .= $1; }
5061 }
5062 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5063 }
5064  
5065 # split //
5066 elsif (/\G (\/) /oxgc) {
5067 65 my $regexp = '';
5068 65 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 434 0 434
5069 0 ▶ if (/\G (\\\\) /oxgc) { $regexp .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 434 434
elsif (m[\G (\\/) ]cgox) { } 0 434 434
elsif (m[\G / ([cgimosxpadlunbB]*) ]cgox) { } 65 369 434
elsif (/\G ($Eutf2::q_char) /cgox) { } 369 0 369
5070 0 elsif (/\G (\\\/) /oxgc) { $regexp .= $1; } # splitqr// --> split qr//
5071 65 elsif (/\G \/ ([cgimosxpadlunbB]*) /oxgc) { return e_split($e.q{ qr}, '/','/',$regexp,$1); } # / / --> qr / /
5072 369 elsif (/\G ($q_char) /oxgc) { $regexp .= $1; }
5073 }
5074 0 die __FILE__, ": Search pattern not terminated\n";
5075 }
5076 }
5077  
5078 # tr/// or y///
5079  
5080 # about [cdsrbB]* (/B modifier)
5081 #
5082 # P.559 appendix C
5083 # of ISBN 4-89052-384-7 Programming perl
5084 # (Japanese title is: Perl puroguramingu)
5085  
5086 elsif (/\G \b ( tr | y ) \b /oxgc) {
5087 12 my $ope = $1;
5088  
5089 # $1 $2 $3 $4 $5 $6
5090 12 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) ((?:$qq_char)*?) (\#) ([cdsrbB]*) /oxgc) { # tr# # #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) ((?:$Eutf2::qq_char)*?) (\#) ([cdsrbB]*) /cgox) { } 0 12 12
5091 0 my @tr = ($tr_variable,$2);
5092 0 return e_tr(@tr,'',$4,$6);
5093 }
5094 else {
5095 12 my $e = '';
5096 12 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 12 0 12
5097 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 12 12
elsif (/\G (\() ((?:$qq_paren)*?) (\)) /cgox) { } 0 12 12
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /cgox) { } 0 12 12
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /cgox) { } 0 12 12
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /cgox) { } 0 12 12
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ((?:$Eutf2::qq_char)*?) (\1) ([cdsrbB]*) /cgox) { } 12 0 12
5098 elsif (/\G (\() ((?:$qq_paren)*?) (\)) /oxgc) {
5099 0 my @tr = ($tr_variable,$2);
5100 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5101 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cdsrbB]*) /cgox) { } 0 0 0
5102 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr ( ) ( )
5103 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr ( ) { }
5104 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr ( ) [ ]
5105 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr ( ) < >
5106 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr ( ) * *
5107 }
5108 0 die __FILE__, ": Transliteration replacement not terminated\n";
5109 }
5110 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) {
5111 0 my @tr = ($tr_variable,$2);
5112 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5113 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cdsrbB]*) /cgox) { } 0 0 0
5114 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr { } ( )
5115 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr { } { }
5116 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr { } [ ]
5117 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr { } < >
5118 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr { } * *
5119 }
5120 0 die __FILE__, ": Transliteration replacement not terminated\n";
5121 }
5122 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) {
5123 0 my @tr = ($tr_variable,$2);
5124 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5125 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cdsrbB]*) /cgox) { } 0 0 0
5126 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr [ ] ( )
5127 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr [ ] { }
5128 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr [ ] [ ]
5129 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr [ ] < >
5130 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr [ ] * *
5131 }
5132 0 die __FILE__, ": Transliteration replacement not terminated\n";
5133 }
5134 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) {
5135 0 my @tr = ($tr_variable,$2);
5136 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5137 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /cgox) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cdsrbB]*) /cgox) { } 0 0 0
5138 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr < > ( )
5139 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr < > { }
5140 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr < > [ ]
5141 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr < > < >
5142 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr < > * *
5143 }
5144 0 die __FILE__, ": Transliteration replacement not terminated\n";
5145 }
5146 # $1 $2 $3 $4 $5 $6
5147 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ((?:$qq_char)*?) (\1) ([cdsrbB]*) /oxgc) { # tr * * *
5148 12 my @tr = ($tr_variable,$2);
5149 12 return e_tr(@tr,'',$4,$6);
5150 }
5151 }
5152 0 die __FILE__, ": Transliteration pattern not terminated\n";
5153 }
5154 }
5155  
5156 # qq//
5157 elsif (/\G \b (qq) \b /oxgc) {
5158 3894 my $ope = $1;
5159  
5160 # if (/\G (\#) ((?:$qq_char)*?) (\#) /oxgc) { return e_qq($ope,$1,$3,$2); } # qq# #
5161 3894 ▶ if (/\G (\#) /oxgc) { # qq# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) /cgox) { } 40 3854 3894
5162 40 my $qq_string = '';
5163 40 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 1948 0 1948
5164 1948 ▶ if (/\G (\\\\) /oxgc) { $qq_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 80 1868 1948
elsif (/\G (\\\#) /cgox) { } 0 1868 1868
elsif (/\G (\#) /cgox) { } 40 1828 1868
elsif (/\G ($Eutf2::qq_char) /cgox) { } 1828 0 1828
5165 0 elsif (/\G (\\\#) /oxgc) { $qq_string .= $1; }
5166 40 elsif (/\G (\#) /oxgc) { return e_qq($ope,'#','#',$qq_string); }
5167 1828 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5168 }
5169 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5170 }
5171  
5172 else {
5173 3854 my $e = '';
5174 3854 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 3854 0 3854
5175 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 3854 3854
elsif (/\G (\() /cgox) { } 0 3854 3854
elsif (/\G (\{) /cgox) { } 3796 58 3854
elsif (/\G (\[) /cgox) { } 0 58 58
elsif (/\G (\<) /cgox) { } 38 20 58
elsif (/\G (\S) /cgox) { } 20 0 20
5176  
5177 # elsif (/\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qq ( )
5178 elsif (/\G (\() /oxgc) { # qq ( )
5179 0 my $qq_string = '';
5180 0 local $nest = 1;
5181 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5182 0 ▶ if (/\G (\\\\) /oxgc) { $qq_string .= $1; }
Branch: 5 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 0 0
elsif (/\G (\\\)) /cgox) { } 0 0 0
elsif (/\G (\() /cgox) { } 0 0 0
elsif (/\G (\)) /cgox) { } 0 0 0
elsif (/\G ($Eutf2::qq_char) /cgox) { } 0 0 0
5183 0 elsif (/\G (\\\)) /oxgc) { $qq_string .= $1; }
5184 0 elsif (/\G (\() /oxgc) { $qq_string .= $1; $nest++; }
5185 elsif (/\G (\)) /oxgc) {
5186 0 ▶ if (--$nest == 0) { return $e . e_qq($ope,'(',')',$qq_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 0 0 0
5187 0 else { $qq_string .= $1; }
5188 }
5189 0 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5190 }
5191 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5192 }
5193  
5194 # elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qq { }
5195 elsif (/\G (\{) /oxgc) { # qq { }
5196 3796 my $qq_string = '';
5197 3796 local $nest = 1;
5198 3796 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 156797 0 156797
5199 156797 ▶ if (/\G (\\\\) /oxgc) { $qq_string .= $1; }
Branch: 5 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 792 156005 156797
elsif (/\G (\\\}) /cgox) { } 0 156005 156005
elsif (/\G (\{) /cgox) { } 1420 154585 156005
elsif (/\G (\}) /cgox) { } 5216 149369 154585
elsif (/\G ($Eutf2::qq_char) /cgox) { } 149369 0 149369
5200 0 elsif (/\G (\\\}) /oxgc) { $qq_string .= $1; }
5201 1420 elsif (/\G (\{) /oxgc) { $qq_string .= $1; $nest++; }
5202 elsif (/\G (\}) /oxgc) {
5203 5216 ▶ if (--$nest == 0) { return $e . e_qq($ope,'{','}',$qq_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 3796 1420 5216
5204 1420 else { $qq_string .= $1; }
5205 }
5206 149369 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5207 }
5208 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5209 }
5210  
5211 # elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qq [ ]
5212 elsif (/\G (\[) /oxgc) { # qq [ ]
5213 0 my $qq_string = '';
5214 0 local $nest = 1;
5215 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5216 0 ▶ if (/\G (\\\\) /oxgc) { $qq_string .= $1; }
Branch: 5 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 0 0
elsif (/\G (\\\]) /cgox) { } 0 0 0
elsif (/\G (\[) /cgox) { } 0 0 0
elsif (/\G (\]) /cgox) { } 0 0 0
elsif (/\G ($Eutf2::qq_char) /cgox) { } 0 0 0
5217 0 elsif (/\G (\\\]) /oxgc) { $qq_string .= $1; }
5218 0 elsif (/\G (\[) /oxgc) { $qq_string .= $1; $nest++; }
5219 elsif (/\G (\]) /oxgc) {
5220 0 ▶ if (--$nest == 0) { return $e . e_qq($ope,'[',']',$qq_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 0 0 0
5221 0 else { $qq_string .= $1; }
5222 }
5223 0 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5224 }
5225 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5226 }
5227  
5228 # elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qq < >
5229 elsif (/\G (\<) /oxgc) { # qq < >
5230 38 my $qq_string = '';
5231 38 local $nest = 1;
5232 38 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 1418 0 1418
5233 1418 ▶ if (/\G (\\\\) /oxgc) { $qq_string .= $1; }
Branch: 5 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 22 1396 1418
elsif (/\G (\\\>) /cgox) { } 0 1396 1396
elsif (/\G (\<) /cgox) { } 0 1396 1396
elsif (/\G (\>) /cgox) { } 38 1358 1396
elsif (/\G ($Eutf2::qq_char) /cgox) { } 1358 0 1358
5234 0 elsif (/\G (\\\>) /oxgc) { $qq_string .= $1; }
5235 0 elsif (/\G (\<) /oxgc) { $qq_string .= $1; $nest++; }
5236 elsif (/\G (\>) /oxgc) {
5237 38 ▶ if (--$nest == 0) { return $e . e_qq($ope,'<','>',$qq_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 38 0 38
5238 0 else { $qq_string .= $1; }
5239 }
5240 1358 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5241 }
5242 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5243 }
5244  
5245 # elsif (/\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qq * *
5246 elsif (/\G (\S) /oxgc) { # qq * *
5247 20 my $delimiter = $1;
5248 20 my $qq_string = '';
5249 20 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 840 0 840
5250 0 ▶ if (/\G (\\\\) /oxgc) { $qq_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 840 840
elsif (/\G (\\\Q$delimiter\E) /cgox) { } 0 840 840
elsif (/\G (\Q$delimiter\E) /cgox) { } 20 820 840
elsif (/\G ($Eutf2::qq_char) /cgox) { } 820 0 820
5251 0 elsif (/\G (\\\Q$delimiter\E) /oxgc) { $qq_string .= $1; }
5252 20 elsif (/\G (\Q$delimiter\E) /oxgc) { return $e . e_qq($ope,$delimiter,$delimiter,$qq_string); }
5253 820 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5254 }
5255 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5256 }
5257 }
5258 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5259 }
5260 }
5261  
5262 # qr//
5263 elsif (/\G \b (qr) \b /oxgc) {
5264 36 my $ope = $1;
5265 36 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) ([imosxpadlunbB]*) /oxgc) { # qr# # #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) ([imosxpadlunbB]*) /cgox) { } 0 36 36
5266 0 return e_qr($ope,$1,$3,$2,$4);
5267 }
5268 else {
5269 36 my $e = '';
5270 36 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 36 0 36
5271 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 8 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 36 36
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([imosxpadlunbB]*) /cgox) { } 0 36 36
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([imosxpadlunbB]*) /cgox) { } 1 35 36
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([imosxpadlunbB]*) /cgox) { } 0 35 35
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([imosxpadlunbB]*) /cgox) { } 0 35 35
elsif (/\G (\') ((?:$Eutf2::qq_char)*?) (\') ([imosxpadlunbB]*) /cgox) { } 2 33 35
elsif (/\G ([*\-:?\\^|]) ((?:$Eutf2::qq_char)*?) (\1) ([imosxpadlunbB]*) /cgox) { } 0 33 33
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([imosxpadlunbB]*) /cgox) { } 33 0 33
5272 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # qr ( )
5273 1 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # qr { }
5274 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # qr [ ]
5275 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # qr < >
5276 2 elsif (/\G (\') ((?:$qq_char)*?) (\') ([imosxpadlunbB]*) /oxgc) { return $e . e_qr_q($ope,$1, $3, $2,$4); } # qr ' '
5277 0 elsif (/\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,'{','}',$2,$4); } # qr | | --> qr { }
5278 33 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # qr * *
5279 }
5280 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5281 }
5282 }
5283  
5284 # qw//
5285 elsif (/\G \b (qw) \b /oxgc) {
5286 34 my $ope = $1;
5287 34 ▶ if (/\G (\#) (.*?) (\#) /oxmsgc) { # qw# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) (.*?) (\#) /cgmosx) { } 0 34 34
5288 0 return e_qw($ope,$1,$3,$2);
5289 }
5290 else {
5291 34 my $e = '';
5292 34 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 34 0 34
5293 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 11 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 34 34
elsif (/\G (\() ([^(]*?) (\)) /cgmosx) { } 34 0 34
elsif (/\G (\() ((?:$q_paren)*?) (\)) /cgmosx) { } 0 0 0
elsif (/\G (\{) ([^{]*?) (\}) /cgmosx) { } 0 0 0
elsif (/\G (\{) ((?:$q_brace)*?) (\}) /cgmosx) { } 0 0 0
elsif (/\G (\[) ([^[]*?) (\]) /cgmosx) { } 0 0 0
elsif (/\G (\[) ((?:$q_bracket)*?) (\]) /cgmosx) { } 0 0 0
elsif (/\G (\<) ([^<]*?) (\>) /cgmosx) { } 0 0 0
elsif (/\G (\<) ((?:$q_angle)*?) (\>) /cgmosx) { } 0 0 0
elsif (/\G ([\x21-\x3F]) (.*?) (\1) /cgmosx) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::q_char)*?) (\1) /cgmosx) { } 0 0 0
5294  
5295 34 elsif (/\G (\() ([^(]*?) (\)) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw ( )
5296 0 elsif (/\G (\() ((?:$q_paren)*?) (\)) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw ( )
5297  
5298 0 elsif (/\G (\{) ([^{]*?) (\}) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw { }
5299 0 elsif (/\G (\{) ((?:$q_brace)*?) (\}) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw { }
5300  
5301 0 elsif (/\G (\[) ([^[]*?) (\]) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw [ ]
5302 0 elsif (/\G (\[) ((?:$q_bracket)*?) (\]) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw [ ]
5303  
5304 0 elsif (/\G (\<) ([^<]*?) (\>) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw < >
5305 0 elsif (/\G (\<) ((?:$q_angle)*?) (\>) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw < >
5306  
5307 0 elsif (/\G ([\x21-\x3F]) (.*?) (\1) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw * *
5308 0 elsif (/\G (\S) ((?:$q_char)*?) (\1) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw * *
5309 }
5310 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5311 }
5312 }
5313  
5314 # qx//
5315 elsif (/\G \b (qx) \b /oxgc) {
5316 2 my $ope = $1;
5317 2 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) /oxgc) { # qx# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) /cgox) { } 0 2 2
5318 0 return e_qq($ope,$1,$3,$2);
5319 }
5320 else {
5321 2 my $e = '';
5322 2 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 2 0 2
5323 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 7 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 2 2
elsif (/\G (\() ((?:$qq_paren)*?) (\)) /cgox) { } 0 2 2
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /cgox) { } 2 0 2
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /cgox) { } 0 0 0
elsif (/\G (\') ((?:$Eutf2::qq_char)*?) (\') /cgox) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) /cgox) { } 0 0 0
5324 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qx ( )
5325 2 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qx { }
5326 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qx [ ]
5327 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qx < >
5328 0 elsif (/\G (\') ((?:$qq_char)*?) (\') /oxgc) { return $e . e_q ($ope,$1,$3,$2); } # qx ' '
5329 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qx * *
5330 }
5331 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5332 }
5333 }
5334  
5335 # q//
5336 elsif (/\G \b (q) \b /oxgc) {
5337 590 my $ope = $1;
5338  
5339 # if (/\G (\#) ((?:\\\#|\\\\|$q_char)*?) (\#) /oxgc) { return e_q($ope,$1,$3,$2); } # q# #
5340  
5341 # avoid "Error: Runtime exception" of perl version 5.005_03
5342 # (and so on)
5343  
5344 590 ▶ if (/\G (\#) /oxgc) { # q# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) /cgox) { } 0 590 590
5345 0 my $q_string = '';
5346 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5347 0 ▶ if (/\G (\\\\) /oxgc) { $q_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 0 0
elsif (/\G (\\\#) /cgox) { } 0 0 0
elsif (/\G (\#) /cgox) { } 0 0 0
elsif (/\G ($Eutf2::q_char) /cgox) { } 0 0 0
5348 0 elsif (/\G (\\\#) /oxgc) { $q_string .= $1; }
5349 0 elsif (/\G (\#) /oxgc) { return e_q($ope,'#','#',$q_string); }
5350 0 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5351 }
5352 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5353 }
5354  
5355 else {
5356 590 my $e = '';
5357 590 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 590 0 590
5358 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 590 590
elsif (/\G (\() /cgox) { } 0 590 590
elsif (/\G (\{) /cgox) { } 584 6 590
elsif (/\G (\[) /cgox) { } 0 6 6
elsif (/\G (\<) /cgox) { } 5 1 6
elsif (/\G (\S) /cgox) { } 1 0 1
5359  
5360 # elsif (/\G (\() ((?:\\\)|\\\\|$q_paren)*?) (\)) /oxgc) { return $e . e_q($ope,$1,$3,$2); } # q ( )
5361 elsif (/\G (\() /oxgc) { # q ( )
5362 0 my $q_string = '';
5363 0 local $nest = 1;
5364 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5365 0 ▶ if (/\G (\\\\) /oxgc) { $q_string .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 0 0
elsif (/\G (\\\)) /cgox) { } 0 0 0
elsif (/\G (\\\() /cgox) { } 0 0 0
elsif (/\G (\() /cgox) { } 0 0 0
elsif (/\G (\)) /cgox) { } 0 0 0
elsif (/\G ($Eutf2::q_char) /cgox) { } 0 0 0
5366 0 elsif (/\G (\\\)) /oxgc) { $q_string .= $1; }
5367 0 elsif (/\G (\\\() /oxgc) { $q_string .= $1; }
5368 0 elsif (/\G (\() /oxgc) { $q_string .= $1; $nest++; }
5369 elsif (/\G (\)) /oxgc) {
5370 0 ▶ if (--$nest == 0) { return $e . e_q($ope,'(',')',$q_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 0 0 0
5371 0 else { $q_string .= $1; }
5372 }
5373 0 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5374 }
5375 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5376 }
5377  
5378 # elsif (/\G (\{) ((?:\\\}|\\\\|$q_brace)*?) (\}) /oxgc) { return $e . e_q($ope,$1,$3,$2); } # q { }
5379 elsif (/\G (\{) /oxgc) { # q { }
5380 584 my $q_string = '';
5381 584 local $nest = 1;
5382 584 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 9554 0 9554
5383 0 ▶ if (/\G (\\\\) /oxgc) { $q_string .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 9554 9554
elsif (/\G (\\\}) /cgox) { } 0 9554 9554
elsif (/\G (\\\{) /cgox) { } 0 9554 9554
elsif (/\G (\{) /cgox) { } 166 9388 9554
elsif (/\G (\}) /cgox) { } 750 8638 9388
elsif (/\G ($Eutf2::q_char) /cgox) { } 8638 0 8638
5384 0 elsif (/\G (\\\}) /oxgc) { $q_string .= $1; }
5385 0 elsif (/\G (\\\{) /oxgc) { $q_string .= $1; }
5386 166 elsif (/\G (\{) /oxgc) { $q_string .= $1; $nest++; }
5387 elsif (/\G (\}) /oxgc) {
5388 750 ▶ if (--$nest == 0) { return $e . e_q($ope,'{','}',$q_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 584 166 750
5389 166 else { $q_string .= $1; }
5390 }
5391 8638 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5392 }
5393 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5394 }
5395  
5396 # elsif (/\G (\[) ((?:\\\]|\\\\|$q_bracket)*?) (\]) /oxgc) { return $e . e_q($ope,$1,$3,$2); } # q [ ]
5397 elsif (/\G (\[) /oxgc) { # q [ ]
5398 0 my $q_string = '';
5399 0 local $nest = 1;
5400 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5401 0 ▶ if (/\G (\\\\) /oxgc) { $q_string .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 0 0
elsif (/\G (\\\]) /cgox) { } 0 0 0
elsif (/\G (\\\[) /cgox) { } 0 0 0
elsif (/\G (\[) /cgox) { } 0 0 0
elsif (/\G (\]) /cgox) { } 0 0 0
elsif (/\G ($Eutf2::q_char) /cgox) { } 0 0 0
5402 0 elsif (/\G (\\\]) /oxgc) { $q_string .= $1; }
5403 0 elsif (/\G (\\\[) /oxgc) { $q_string .= $1; }
5404 0 elsif (/\G (\[) /oxgc) { $q_string .= $1; $nest++; }
5405 elsif (/\G (\]) /oxgc) {
5406 0 ▶ if (--$nest == 0) { return $e . e_q($ope,'[',']',$q_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 0 0 0
5407 0 else { $q_string .= $1; }
5408 }
5409 0 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5410 }
5411 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5412 }
5413  
5414 # elsif (/\G (\<) ((?:\\\>|\\\\|$q_angle)*?) (\>) /oxgc) { return $e . e_q($ope,$1,$3,$2); } # q < >
5415 elsif (/\G (\<) /oxgc) { # q < >
5416 5 my $q_string = '';
5417 5 local $nest = 1;
5418 5 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 82 0 82
5419 0 ▶ if (/\G (\\\\) /oxgc) { $q_string .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 82 82
elsif (/\G (\\\>) /cgox) { } 0 82 82
elsif (/\G (\\\<) /cgox) { } 0 82 82
elsif (/\G (\<) /cgox) { } 0 82 82
elsif (/\G (\>) /cgox) { } 5 77 82
elsif (/\G ($Eutf2::q_char) /cgox) { } 77 0 77
5420 0 elsif (/\G (\\\>) /oxgc) { $q_string .= $1; }
5421 0 elsif (/\G (\\\<) /oxgc) { $q_string .= $1; }
5422 0 elsif (/\G (\<) /oxgc) { $q_string .= $1; $nest++; }
5423 elsif (/\G (\>) /oxgc) {
5424 5 ▶ if (--$nest == 0) { return $e . e_q($ope,'<','>',$q_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 5 0 5
5425 0 else { $q_string .= $1; }
5426 }
5427 77 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5428 }
5429 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5430 }
5431  
5432 # elsif (/\G (\S) ((?:\\\1|\\\\|$q_char)*?) (\1) /oxgc) { return $e . e_q($ope,$1,$3,$2); } # q * *
5433 elsif (/\G (\S) /oxgc) { # q * *
5434 1 my $delimiter = $1;
5435 1 my $q_string = '';
5436 1 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 14 0 14
5437 0 ▶ if (/\G (\\\\) /oxgc) { $q_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 14 14
elsif (/\G (\\\Q$delimiter\E) /cgox) { } 0 14 14
elsif (/\G (\Q$delimiter\E) /cgox) { } 1 13 14
elsif (/\G ($Eutf2::q_char) /cgox) { } 13 0 13
5438 0 elsif (/\G (\\\Q$delimiter\E) /oxgc) { $q_string .= $1; }
5439 1 elsif (/\G (\Q$delimiter\E) /oxgc) { return $e . e_q($ope,$delimiter,$delimiter,$q_string); }
5440 13 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5441 }
5442 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5443 }
5444 }
5445 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5446 }
5447 }
5448  
5449 # m//
5450 elsif (/\G \b (m) \b /oxgc) {
5451 269 my $ope = $1;
5452 269 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) ([cgimosxpadlunbB]*) /oxgc) { # m# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) ([cgimosxpadlunbB]*) /cgox) { } 0 269 269
5453 0 return e_qr($ope,$1,$3,$2,$4);
5454 }
5455 else {
5456 269 my $e = '';
5457 269 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 269 0 269
5458 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 9 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 269 269
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cgimosxpadlunbB]*) /cgox) { } 0 269 269
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cgimosxpadlunbB]*) /cgox) { } 0 269 269
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cgimosxpadlunbB]*) /cgox) { } 0 269 269
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cgimosxpadlunbB]*) /cgox) { } 0 269 269
elsif (/\G (\?) ((?:$Eutf2::qq_char)*?) (\?) ([cgimosxpadlunbB]*) /cgox) { } 18 251 269
elsif (/\G (\') ((?:$Eutf2::qq_char)*?) (\') ([cgimosxpadlunbB]*) /cgox) { } 13 238 251
elsif (/\G ([*\-:\\^|]) ((?:$Eutf2::qq_char)*?) (\1) ([cgimosxpadlunbB]*) /cgox) { } 0 238 238
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cgimosxpadlunbB]*) /cgox) { } 238 0 238
5459 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m ( )
5460 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m { }
5461 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m [ ]
5462 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m < >
5463 18 elsif (/\G (\?) ((?:$qq_char)*?) (\?) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m ? ?
5464 13 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr_q($ope,$1, $3, $2,$4); } # m ' '
5465 0 elsif (/\G ([*\-:\\^|]) ((?:$qq_char)*?) (\1) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,'{','}',$2,$4); } # m | | --> m { }
5466 238 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m * *
5467 }
5468 0 die __FILE__, ": Search pattern not terminated\n";
5469 }
5470 }
5471  
5472 # s///
5473  
5474 # about [cegimosxpradlunbB]* (/cg modifier)
5475 #
5476 # P.67 Pattern-Matching Operators
5477 # of ISBN 0-596-00241-6 Perl in a Nutshell, Second Edition.
5478  
5479 elsif (/\G \b (s) \b /oxgc) {
5480 136 my $ope = $1;
5481  
5482 # $1 $2 $3 $4 $5 $6
5483 136 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) ((?:$qq_char)*?) (\#) ([cegimosxpradlunbB]*) /oxgc) { # s# # #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) ((?:$Eutf2::qq_char)*?) (\#) ([cegimosxpradlunbB]*) /cgox) { } 1 135 136
5484 1 return e_sub($sub_variable,$1,$2,$3,$3,$4,$5,$6);
5485 }
5486 else {
5487 135 my $e = '';
5488 135 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 135 0 135
5489 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 9 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 135 135
elsif (/\G (\() ((?:$qq_paren)*?) (\)) /cgox) { } 0 135 135
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /cgox) { } 0 135 135
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /cgox) { } 0 135 135
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /cgox) { } 0 135 135
elsif (/\G (\') ((?:$Eutf2::qq_char)*?) (\') ((?:$Eutf2::qq_char)*?) (\') ([cegimosxpradlunbB]*) /cgox) { } 22 113 135
elsif (/\G ([*\-:?\\^|]) ((?:$Eutf2::qq_char)*?) (\1) ((?:$Eutf2::qq_char)*?) (\1) ([cegimosxpradlunbB]*) /cgox) { } 2 111 113
elsif (/\G (\$) ((?:$Eutf2::qq_char)*?) (\1) ((?:$Eutf2::qq_char)*?) (\1) ([cegimosxpradlunbB]*) /cgox) { } 0 111 111
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ((?:$Eutf2::qq_char)*?) (\1) ([cegimosxpradlunbB]*) /cgox) { } 111 0 111
5490 elsif (/\G (\() ((?:$qq_paren)*?) (\)) /oxgc) {
5491 0 my @s = ($1,$2,$3);
5492 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5493 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 10 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\') ((?:$Eutf2::qq_char)*?) (\') ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\$) ((?:$Eutf2::qq_char)*?) (\$) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\:) ((?:$Eutf2::qq_char)*?) (\:) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\@) ((?:$Eutf2::qq_char)*?) (\@) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
5494 # $1 $2 $3 $4
5495 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5496 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5497 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5498 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5499 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5500 0 elsif (/\G (\$) ((?:$qq_char)*?) (\$) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5501 0 elsif (/\G (\:) ((?:$qq_char)*?) (\:) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5502 0 elsif (/\G (\@) ((?:$qq_char)*?) (\@) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5503 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5504 }
5505 0 die __FILE__, ": Substitution replacement not terminated\n";
5506 }
5507 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) {
5508 0 my @s = ($1,$2,$3);
5509 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5510 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 10 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\') ((?:$Eutf2::qq_char)*?) (\') ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\$) ((?:$Eutf2::qq_char)*?) (\$) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\:) ((?:$Eutf2::qq_char)*?) (\:) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\@) ((?:$Eutf2::qq_char)*?) (\@) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
5511 # $1 $2 $3 $4
5512 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5513 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5514 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5515 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5516 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5517 0 elsif (/\G (\$) ((?:$qq_char)*?) (\$) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5518 0 elsif (/\G (\:) ((?:$qq_char)*?) (\:) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5519 0 elsif (/\G (\@) ((?:$qq_char)*?) (\@) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5520 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5521 }
5522 0 die __FILE__, ": Substitution replacement not terminated\n";
5523 }
5524 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) {
5525 0 my @s = ($1,$2,$3);
5526 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5527 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 8 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\') ((?:$Eutf2::qq_char)*?) (\') ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\$) ((?:$Eutf2::qq_char)*?) (\$) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
5528 # $1 $2 $3 $4
5529 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5530 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5531 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5532 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5533 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5534 0 elsif (/\G (\$) ((?:$qq_char)*?) (\$) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5535 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5536 }
5537 0 die __FILE__, ": Substitution replacement not terminated\n";
5538 }
5539 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) {
5540 0 my @s = ($1,$2,$3);
5541 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5542 0 ▶ if (/\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 10 branches
BranchTrueFalseTotal
if (/\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\') ((?:$Eutf2::qq_char)*?) (\') ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\$) ((?:$Eutf2::qq_char)*?) (\$) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\:) ((?:$Eutf2::qq_char)*?) (\:) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\@) ((?:$Eutf2::qq_char)*?) (\@) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
elsif (/\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cegimosxpradlunbB]*) /cgox) { } 0 0 0
5543 # $1 $2 $3 $4
5544 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5545 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5546 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5547 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5548 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5549 0 elsif (/\G (\$) ((?:$qq_char)*?) (\$) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5550 0 elsif (/\G (\:) ((?:$qq_char)*?) (\:) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5551 0 elsif (/\G (\@) ((?:$qq_char)*?) (\@) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5552 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5553 }
5554 0 die __FILE__, ": Substitution replacement not terminated\n";
5555 }
5556 # $1 $2 $3 $4 $5 $6
5557 elsif (/\G (\') ((?:$qq_char)*?) (\') ((?:$qq_char)*?) (\') ([cegimosxpradlunbB]*) /oxgc) {
5558 22 return e_sub($sub_variable,$1,$2,$3,$3,$4,$5,$6);
5559 }
5560 # $1 $2 $3 $4 $5 $6
5561 elsif (/\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) {
5562 2 return e_sub($sub_variable,'{',$2,'}','{',$4,'}',$6); # s | | | --> s { } { }
5563 }
5564 # $1 $2 $3 $4 $5 $6
5565 elsif (/\G (\$) ((?:$qq_char)*?) (\1) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) {
5566 0 return e_sub($sub_variable,$1,$2,$3,$3,$4,$5,$6);
5567 }
5568 # $1 $2 $3 $4 $5 $6
5569 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) {
5570 111 return e_sub($sub_variable,$1,$2,$3,$3,$4,$5,$6);
5571 }
5572 }
5573 0 die __FILE__, ": Substitution pattern not terminated\n";
5574 }
5575 }
5576  
5577 # require ignore module
5578 0 elsif (/\G \b require ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /oxmsgc) { return "# require$1$2"; }
5579 0 elsif (/\G \b require ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /oxmsgc) { return "# require$1\n$2"; }
5580 0 elsif (/\G \b require ((?>\s+) (?:$ignore_modules)) \b /oxmsgc) { return "# require$1"; }
5581  
5582 # use strict; --> use strict; no strict qw(refs);
5583 43 elsif (/\G \b use ((?>\s+) strict .*? ;) ([ \t]* [#\n]) /oxmsgc) { return "use$1 no strict qw(refs);$2"; }
5584 0 elsif (/\G \b use ((?>\s+) strict .*? ;) ([ \t]* [^\x80-\xFF#]) /oxmsgc) { return "use$1 no strict qw(refs);\n$2"; }
5585 0 elsif (/\G \b use ((?>\s+) strict) \b /oxmsgc) { return "use$1; no strict qw(refs)"; }
5586  
5587 # use 5.12.0; --> use 5.12.0; no strict qw(refs);
5588 elsif (/\G \b use (?>\s+) ((?>([1-9][0-9_]*)(?:\.([0-9_]+))*)) (?>\s*) ; /oxmsgc) {
5589 3 ▶ if (($2 >= 6) or (($2 == 5) and ($3 ge '012'))) {
Branch: 1 branch
BranchTrueFalseTotal
if ($2 >= 6 or $2 == 5 and $3 ge '012') { } 0 3 3
Condition33%2/6
$2 >= 6 or $2 == 5 and $3 ge "012"
l!l&&r!l&&!r
003
$2 == 5 and $3 ge "012"
!ll&&!rl&&r
030
MC/DC0%0/3
$2 >= 6 or $2 == 5 and $3 ge "012"
$2 >= 6 $2 == 5 $3 ge "012"
Truth table25%1/4
A or B and C
A= $2 >= 6B= $2 == 5C= $3 ge "012"
ABCresult
1XX1
0111
00X0
0100
5590 0 return "use $1; no strict qw(refs);";
5591 }
5592 else {
5593 3 return "use $1;";
5594 }
5595 }
5596 elsif (/\G \b use (?>\s+) ((?>v([0-9][0-9_]*)(?:\.([0-9_]+))*)) (?>\s*) ; /oxmsgc) {
5597 0 ▶ if (($2 >= 6) or (($2 == 5) and ($3 >= 12))) {
Branch: 1 branch
BranchTrueFalseTotal
if ($2 >= 6 or $2 == 5 and $3 >= 12) { } 0 0 0
Condition0%0/6
$2 >= 6 or $2 == 5 and $3 >= 12
l!l&&r!l&&!r
000
$2 == 5 and $3 >= 12
!ll&&!rl&&r
000
MC/DC0%0/3
$2 >= 6 or $2 == 5 and $3 >= 12
$2 >= 6 $2 == 5 $3 >= 12
Truth table0%0/4
A or B and C
A= $2 >= 6B= $2 == 5C= $3 >= 12
ABCresult
1XX1
0111
00X0
0100
5598 0 return "use $1; no strict qw(refs);";
5599 }
5600 else {
5601 0 return "use $1;";
5602 }
5603 }
5604  
5605 # ignore use module
5606 2 elsif (/\G \b use ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /oxmsgc) { return "# use$1$2"; }
5607 0 elsif (/\G \b use ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /oxmsgc) { return "# use$1\n$2"; }
5608 0 elsif (/\G \b use ((?>\s+) (?:$ignore_modules)) \b /oxmsgc) { return "# use$1"; }
5609  
5610 # ignore no module
5611 0 elsif (/\G \b no ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /oxmsgc) { return "# no$1$2"; }
5612 0 elsif (/\G \b no ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /oxmsgc) { return "# no$1\n$2"; }
5613 0 elsif (/\G \b no ((?>\s+) (?:$ignore_modules)) \b /oxmsgc) { return "# no$1"; }
5614  
5615 # use else
5616 0 elsif (/\G \b use \b /oxmsgc) { return "use"; }
5617  
5618 # use else
5619 2 elsif (/\G \b no \b /oxmsgc) { return "no"; }
5620  
5621 # ''
5622 elsif (/\G (?<![\w\$\@\%\&\*]) (\') /oxgc) {
5623 1885 my $q_string = '';
5624 1885 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 12447 0 12447
5625 12447 ▶ if (/\G (\\\\) /oxgc) { $q_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 4 12443 12447
elsif (/\G (\\\') /cgox) { } 48 12395 12443
elsif (/\G \' /cgox) { } 1885 10510 12395
elsif (/\G ($Eutf2::q_char) /cgox) { } 10510 0 10510
5626 48 elsif (/\G (\\\') /oxgc) { $q_string .= $1; }
5627 1885 elsif (/\G \' /oxgc) { return e_q('', "'","'",$q_string); }
5628 10510 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5629 }
5630 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5631 }
5632  
5633 # ""
5634 elsif (/\G (\") /oxgc) {
5635 5681 my $qq_string = '';
5636 5681 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 88859 0 88859
5637 88859 ▶ if (/\G (\\\\) /oxgc) { $qq_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 109 88750 88859
elsif (/\G (\\\") /cgox) { } 12 88738 88750
elsif (/\G \" /cgox) { } 5681 83057 88738
elsif (/\G ($Eutf2::q_char) /cgox) { } 83057 0 83057
5638 12 elsif (/\G (\\\") /oxgc) { $qq_string .= $1; }
5639 5681 elsif (/\G \" /oxgc) { return e_qq('', '"','"',$qq_string); }
5640 83057 elsif (/\G ($q_char) /oxgc) { $qq_string .= $1; }
5641 }
5642 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5643 }
5644  
5645 # ``
5646 elsif (/\G (\`) /oxgc) {
5647 1 my $qx_string = '';
5648 1 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 19 0 19
5649 0 ▶ if (/\G (\\\\) /oxgc) { $qx_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 19 19
elsif (/\G (\\\`) /cgox) { } 0 19 19
elsif (/\G \` /cgox) { } 1 18 19
elsif (/\G ($Eutf2::q_char) /cgox) { } 18 0 18
5650 0 elsif (/\G (\\\`) /oxgc) { $qx_string .= $1; }
5651 1 elsif (/\G \` /oxgc) { return e_qq('', '`','`',$qx_string); }
5652 18 elsif (/\G ($q_char) /oxgc) { $qx_string .= $1; }
5653 }
5654 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5655 }
5656  
5657 # // --- not divide operator (num / num), not defined-or
5658 ▶ elsif (($slash eq 'm//') and /\G (\/) /oxgc) {
Condition100%3/3
$Eutf2::slash eq "m//" and m[\G (/) ]cgox
!ll&&!rl&&r
41570139551299
MC/DC100%2/2
$Eutf2::slash eq "m//" and m[\G (/) ]cgox
$Eutf2::slash eq "m//" m[\G (/) ]cgox
Truth table100%3/3
A and B
A= $Eutf2::slash eq "m//"B= m[\G (/) ]cgox
ABresult
0X0
100
111
5659 1299 my $regexp = '';
5660 1299 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 11165 0 11165
5661 11165 ▶ if (/\G (\\\\) /oxgc) { $regexp .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 1 11164 11165
elsif (m[\G (\\/) ]cgox) { } 0 11164 11164
elsif (m[\G / ([cgimosxpadlunbB]*) ]cgox) { } 1299 9865 11164
elsif (/\G ($Eutf2::q_char) /cgox) { } 9865 0 9865
5662 0 elsif (/\G (\\\/) /oxgc) { $regexp .= $1; }
5663 1299 elsif (/\G \/ ([cgimosxpadlunbB]*) /oxgc) { return e_qr('', '/','/',$regexp,$1); }
5664 9865 elsif (/\G ($q_char) /oxgc) { $regexp .= $1; }
5665 }
5666 0 die __FILE__, ": Search pattern not terminated\n";
5667 }
5668  
5669 # ?? --- not conditional operator (condition ? then : else)
5670 ▶ elsif (($slash eq 'm//') and /\G (\?) /oxgc) {
Condition100%3/3
$Eutf2::slash eq "m//" and /\G (\?) /cgox
!ll&&!rl&&r
415701393718
MC/DC100%2/2
$Eutf2::slash eq "m//" and /\G (\?) /cgox
$Eutf2::slash eq "m//" /\G (\?) /cgox
Truth table100%3/3
A and B
A= $Eutf2::slash eq "m//"B= /\G (\?) /cgox
ABresult
0X0
100
111
5671 18 my $regexp = '';
5672 18 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 82 0 82
5673 0 ▶ if (/\G (\\\\) /oxgc) { $regexp .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 0 82 82
elsif (/\G (\\\?) /cgox) { } 0 82 82
elsif (/\G \? ([cgimosxpadlunbB]*) /cgox) { } 18 64 82
elsif (/\G ($Eutf2::q_char) /cgox) { } 64 0 64
5674 0 elsif (/\G (\\\?) /oxgc) { $regexp .= $1; }
5675 18 elsif (/\G \? ([cgimosxpadlunbB]*) /oxgc) { return e_qr('m','?','?',$regexp,$1); }
5676 64 elsif (/\G ($q_char) /oxgc) { $regexp .= $1; }
5677 }
5678 0 die __FILE__, ": Search pattern not terminated\n";
5679 }
5680  
5681 # <<>> (a safer ARGV)
5682 0 elsif (/\G ( <<>> ) /oxgc) { $slash = 'm//'; return $1; }
5683  
5684 # << (bit shift) --- not here document
5685 0 elsif (/\G ( << (?>\s*) ) (?= [0-9\$\@\&] ) /oxgc) { $slash = 'm//'; return $1; }
5686  
5687 # <<~'HEREDOC'
5688 elsif (/\G ( <<~ [\t ]* '([a-zA-Z_0-9]*)' ) /oxgc) {
5689 6 $slash = 'm//';
5690 6 my $here_quote = $1;
5691 6 my $delimiter = $2;
5692  
5693 # get here document
5694 6 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 6 0 6
5695 6 $here_script = CORE::substr $_, pos $_;
5696 6 $here_script =~ s/.*?\n//oxm;
5697 }
5698 6 ▶ if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //msx) { } 6 0 6
5699 6 my $heredoc = $1;
5700 6 my $indent = $2;
5701 6 $heredoc =~ s{^$indent}{}msg; # no /ox
5702 6 push @heredoc, $heredoc . qq{\n$delimiter\n};
5703 6 push @heredoc_delimiter, qq{\\s*$delimiter};
5704 }
5705 else {
5706 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5707 }
5708 6 return qq{<<'$delimiter'};
5709 }
5710  
5711 # <<~\HEREDOC
5712  
5713 # P.66 2.6.6. "Here" Documents
5714 # in Chapter 2: Bits and Pieces
5715 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
5716  
5717 # P.73 "Here" Documents
5718 # in Chapter 2: Bits and Pieces
5719 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
5720  
5721 elsif (/\G ( <<~ \\([a-zA-Z_0-9]+) ) /oxgc) {
5722 3 $slash = 'm//';
5723 3 my $here_quote = $1;
5724 3 my $delimiter = $2;
5725  
5726 # get here document
5727 3 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 3 0 3
5728 3 $here_script = CORE::substr $_, pos $_;
5729 3 $here_script =~ s/.*?\n//oxm;
5730 }
5731 3 ▶ if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //msx) { } 3 0 3
5732 3 my $heredoc = $1;
5733 3 my $indent = $2;
5734 3 $heredoc =~ s{^$indent}{}msg; # no /ox
5735 3 push @heredoc, $heredoc . qq{\n$delimiter\n};
5736 3 push @heredoc_delimiter, qq{\\s*$delimiter};
5737 }
5738 else {
5739 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5740 }
5741 3 return qq{<<\\$delimiter};
5742 }
5743  
5744 # <<~"HEREDOC"
5745 elsif (/\G ( <<~ [\t ]* "([a-zA-Z_0-9]*)" ) /oxgc) {
5746 6 $slash = 'm//';
5747 6 my $here_quote = $1;
5748 6 my $delimiter = $2;
5749  
5750 # get here document
5751 6 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 6 0 6
5752 6 $here_script = CORE::substr $_, pos $_;
5753 6 $here_script =~ s/.*?\n//oxm;
5754 }
5755 6 ▶ if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //msx) { } 6 0 6
5756 6 my $heredoc = $1;
5757 6 my $indent = $2;
5758 6 $heredoc =~ s{^$indent}{}msg; # no /ox
5759 6 push @heredoc, e_heredoc($heredoc) . qq{\n$delimiter\n};
5760 6 push @heredoc_delimiter, qq{\\s*$delimiter};
5761 }
5762 else {
5763 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5764 }
5765 6 return qq{<<"$delimiter"};
5766 }
5767  
5768 # <<~HEREDOC
5769 elsif (/\G ( <<~ ([a-zA-Z_0-9]+) ) /oxgc) {
5770 3 $slash = 'm//';
5771 3 my $here_quote = $1;
5772 3 my $delimiter = $2;
5773  
5774 # get here document
5775 3 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 3 0 3
5776 3 $here_script = CORE::substr $_, pos $_;
5777 3 $here_script =~ s/.*?\n//oxm;
5778 }
5779 3 ▶ if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //msx) { } 3 0 3
5780 3 my $heredoc = $1;
5781 3 my $indent = $2;
5782 3 $heredoc =~ s{^$indent}{}msg; # no /ox
5783 3 push @heredoc, e_heredoc($heredoc) . qq{\n$delimiter\n};
5784 3 push @heredoc_delimiter, qq{\\s*$delimiter};
5785 }
5786 else {
5787 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5788 }
5789 3 return qq{<<$delimiter};
5790 }
5791  
5792 # <<~`HEREDOC`
5793 elsif (/\G ( <<~ [\t ]* `([a-zA-Z_0-9]*)` ) /oxgc) {
5794 6 $slash = 'm//';
5795 6 my $here_quote = $1;
5796 6 my $delimiter = $2;
5797  
5798 # get here document
5799 6 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 6 0 6
5800 6 $here_script = CORE::substr $_, pos $_;
5801 6 $here_script =~ s/.*?\n//oxm;
5802 }
5803 6 ▶ if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //msx) { } 6 0 6
5804 6 my $heredoc = $1;
5805 6 my $indent = $2;
5806 6 $heredoc =~ s{^$indent}{}msg; # no /ox
5807 6 push @heredoc, e_heredoc($heredoc) . qq{\n$delimiter\n};
5808 6 push @heredoc_delimiter, qq{\\s*$delimiter};
5809 }
5810 else {
5811 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5812 }
5813 6 return qq{<<`$delimiter`};
5814 }
5815  
5816 # <<'HEREDOC'
5817 elsif (/\G ( << '([a-zA-Z_0-9]*)' ) /oxgc) {
5818 80 $slash = 'm//';
5819 80 my $here_quote = $1;
5820 80 my $delimiter = $2;
5821  
5822 # get here document
5823 80 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 77 3 80
5824 77 $here_script = CORE::substr $_, pos $_;
5825 77 $here_script =~ s/.*?\n//oxm;
5826 }
5827 80 ▶ if ($here_script =~ s/\A (.*?) \n $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n $delimiter \n //msx) { } 80 0 80
5828 80 push @heredoc, $1 . qq{\n$delimiter\n};
5829 80 push @heredoc_delimiter, $delimiter;
5830 }
5831 else {
5832 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5833 }
5834 80 return $here_quote;
5835 }
5836  
5837 # <<\HEREDOC
5838  
5839 # P.66 2.6.6. "Here" Documents
5840 # in Chapter 2: Bits and Pieces
5841 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
5842  
5843 # P.73 "Here" Documents
5844 # in Chapter 2: Bits and Pieces
5845 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
5846  
5847 elsif (/\G ( << \\([a-zA-Z_0-9]+) ) /oxgc) {
5848 2 $slash = 'm//';
5849 2 my $here_quote = $1;
5850 2 my $delimiter = $2;
5851  
5852 # get here document
5853 2 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 1 1 2
5854 1 $here_script = CORE::substr $_, pos $_;
5855 1 $here_script =~ s/.*?\n//oxm;
5856 }
5857 2 ▶ if ($here_script =~ s/\A (.*?) \n $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n $delimiter \n //msx) { } 2 0 2
5858 2 push @heredoc, $1 . qq{\n$delimiter\n};
5859 2 push @heredoc_delimiter, $delimiter;
5860 }
5861 else {
5862 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5863 }
5864 2 return $here_quote;
5865 }
5866  
5867 # <<"HEREDOC"
5868 elsif (/\G ( << "([a-zA-Z_0-9]*)" ) /oxgc) {
5869 39 $slash = 'm//';
5870 39 my $here_quote = $1;
5871 39 my $delimiter = $2;
5872  
5873 # get here document
5874 39 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 38 1 39
5875 38 $here_script = CORE::substr $_, pos $_;
5876 38 $here_script =~ s/.*?\n//oxm;
5877 }
5878 39 ▶ if ($here_script =~ s/\A (.*?) \n $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n $delimiter \n //msx) { } 39 0 39
5879 39 push @heredoc, e_heredoc($1) . qq{\n$delimiter\n};
5880 39 push @heredoc_delimiter, $delimiter;
5881 }
5882 else {
5883 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5884 }
5885 39 return $here_quote;
5886 }
5887  
5888 # <<HEREDOC
5889 elsif (/\G ( << ([a-zA-Z_0-9]+) ) /oxgc) {
5890 54 $slash = 'm//';
5891 54 my $here_quote = $1;
5892 54 my $delimiter = $2;
5893  
5894 # get here document
5895 54 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 51 3 54
5896 51 $here_script = CORE::substr $_, pos $_;
5897 51 $here_script =~ s/.*?\n//oxm;
5898 }
5899 54 ▶ if ($here_script =~ s/\A (.*?) \n $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n $delimiter \n //msx) { } 54 0 54
5900 54 push @heredoc, e_heredoc($1) . qq{\n$delimiter\n};
5901 54 push @heredoc_delimiter, $delimiter;
5902 }
5903 else {
5904 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5905 }
5906 54 return $here_quote;
5907 }
5908  
5909 # <<`HEREDOC`
5910 elsif (/\G ( << `([a-zA-Z_0-9]*)` ) /oxgc) {
5911 0 $slash = 'm//';
5912 0 my $here_quote = $1;
5913 0 my $delimiter = $2;
5914  
5915 # get here document
5916 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
5917 0 $here_script = CORE::substr $_, pos $_;
5918 0 $here_script =~ s/.*?\n//oxm;
5919 }
5920 0 ▶ if ($here_script =~ s/\A (.*?) \n $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n $delimiter \n //msx) { } 0 0 0
5921 0 push @heredoc, e_heredoc($1) . qq{\n$delimiter\n};
5922 0 push @heredoc_delimiter, $delimiter;
5923 }
5924 else {
5925 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5926 }
5927 0 return $here_quote;
5928 }
5929  
5930 # <<= <=> <= < operator
5931 elsif (/\G ( <<= | <=> | <= | < ) (?= (?>\s*) [A-Za-z_0-9'"`\$\@\&\*\(\+\-] )/oxgc) {
5932 12 return $1;
5933 }
5934  
5935 # <FILEHANDLE>
5936 elsif (/\G (<[\$]?[A-Za-z_][A-Za-z_0-9]*>) /oxgc) {
5937 0 return $1;
5938 }
5939  
5940 # <WILDCARD> --- glob
5941  
5942 # avoid "Error: Runtime exception" of perl version 5.005_03
5943  
5944 elsif (/\G < ((?:[^\x80-\xFF>\0\a\e\f\n\r\t]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF])+?) > /oxgc) {
5945 0 return 'Eutf2::glob("' . $1 . '")';
5946 }
5947  
5948 # __DATA__
5949 0 elsif (/\G ^ ( __DATA__ \n .*) \z /oxmsgc) { return $1; }
5950  
5951 # __END__
5952 312 elsif (/\G ^ ( __END__ \n .*) \z /oxmsgc) { return $1; }
5953  
5954 # \cD Control-D
5955  
5956 # P.68 2.6.8. Other Literal Tokens
5957 # in Chapter 2: Bits and Pieces
5958 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
5959  
5960 # P.76 Other Literal Tokens
5961 # in Chapter 2: Bits and Pieces
5962 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
5963  
5964 0 elsif (/\G ( \cD .*) \z /oxmsgc) { return $1; }
5965  
5966 # \cZ Control-Z
5967 0 elsif (/\G ( \cZ .*) \z /oxmsgc) { return $1; }
5968  
5969 # any operator before div
5970 elsif (/\G (
5971 -- | \+\+ |
5972 [\)\}\]]
5973  
5974 9312 ) /oxgc) { $slash = 'div'; return $1; }
5975  
5976 # yada-yada or triple-dot operator
5977 elsif (/\G (
5978 \.\.\.
5979  
5980 7 ) /oxgc) { $slash = 'm//'; return q{die('Unimplemented')}; }
5981  
5982 # any operator before m//
5983  
5984 # //, //= (defined-or)
5985  
5986 # P.164 Logical Operators
5987 # in Chapter 10: More Control Structures
5988 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
5989  
5990 # P.119 C-Style Logical (Short-Circuit) Operators
5991 # in Chapter 3: Unary and Binary Operators
5992 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
5993  
5994 # (and so on)
5995  
5996 # ~~
5997  
5998 # P.221 The Smart Match Operator
5999 # in Chapter 15: Smart Matching and given-when
6000 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
6001  
6002 # P.112 Smartmatch Operator
6003 # in Chapter 3: Unary and Binary Operators
6004 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
6005  
6006 # (and so on)
6007  
6008 elsif (/\G ((?>
6009  
6010 !~~ | !~ | != | ! |
6011 %= | % |
6012 &&= | && | &= | &\.= | &\. | & |
6013 -= | -> | - |
6014 :(?>\s*)= |
6015 : |
6016 <<>> |
6017 <<= | <=> | <= | < |
6018 == | => | =~ | = |
6019 >>= | >> | >= | > |
6020 \*\*= | \*\* | \*= | \* |
6021 \+= | \+ |
6022 \.\. | \.= | \. |
6023 \/\/= | \/\/ |
6024 \/= | \/ |
6025 \? |
6026 \\ |
6027 \^= | \^\.= | \^\. | \^ |
6028 \b x= |
6029 \|\|= | \|\| | \|= | \|\.= | \|\. | \| |
6030 ~~ | ~\. | ~ |
6031 \b(?: and | cmp | eq | ge | gt | le | lt | ne | not | or | xor | x )\b |
6032 \b(?: print )\b |
6033  
6034 [,;\(\{\[]
6035  
6036 17259 )) /oxgc) { $slash = 'm//'; return $1; }
6037  
6038 # other any character
6039 28406 elsif (/\G ($q_char) /oxgc) { $slash = 'div'; return $1; }
6040  
6041 # system error
6042 else {
6043 0 die __FILE__, ": Oops, this shouldn't happen!\n";
6044 }
6045 }
6046  
6047 # escape UTF-8 string
6048 2597 ▶sub e_string {
Subroutine e_string: called CC=228 SCAR=104.1
Pod documented
6049 2597 my($string) = @_;
6050 2597 my $e_string = '';
6051  
6052 2597 local $slash = 'm//';
6053  
6054 # P.1024 Appendix W.10 Multibyte Processing
6055 # of ISBN 1-56592-224-7 CJKV Information Processing
6056 # (and so on)
6057  
6058 2597 my @char = $string =~ / \G (?>[^\x80-\xFF\\]|\\$q_char|$q_char) /oxmsg;
6059  
6060 # without { ... }
6061 2597 ▶ if (not (grep(/\A \{ \z/xms, @char) and grep(/\A \} \z/xms, @char))) {
Branch: 1 branch
BranchTrueFalseTotal
unless (grep /\A \{ \z/msx, @char and grep /\A \} \z/msx, @char) 2558 39 2597
Condition66%2/3
grep /\A \{ \z/msx, @char and grep /\A \} \z/msx, @char
!ll&&!rl&&r
2558039
MC/DC50%1/2
grep /\A \{ \z/msx, @char and grep /\A \} \z/msx, @char
grep /\A \{ \z/msx, @char grep /\A \} \z/msx, @char
Truth table66%2/3
A and B
A= grep /\A \{ \z/msx, @charB= grep /\A \} \z/msx, @char
ABresult
0X0
100
111
6062 2558 ▶ if ($string !~ /<</oxms) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /<</mosx) 2558 0 2558
6063 2558 return $string;
6064 }
6065 }
6066  
6067 E_STRING_LOOP:
6068 39 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 293 39 332
6069 293 ▶ if (0) {
Branch: 101 branches
BranchTrueFalseTotal
if (do { $string =~ /\G ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH \b | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) /cgmosx }) { } 0 293 293
elsif ($string =~ /\G ( \$& | \$\{&\} | \$ (?>\s*) MATCH \b | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) /cgmosx) { } 0 293 293
elsif ($string =~ /\G ( \$' | \$\{'\} ) /cgmosx) { } 0 293 293
elsif ($string =~ /\G ( \$ (?>\s*) POSTMATCH \b | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) /cgmosx) { } 0 293 293
elsif ($string =~ /\G ( \{ (?>\s*) (?: tr | index | rindex | reverse ) (?>\s*) \} ) /cgmosx) { } 0 293 293
elsif ($string =~ /\G ( \$ 0 ) /cgmosx) { } 0 293 293
elsif ($string =~ /\G ( \$ \{ (?>\s*) 0 (?>\s*) \} ) /cgmosx) { } 0 293 293
elsif ($string =~ /\G ( \$ \$ ) (?![\w\{]) /cgmosx) { } 0 293 293
elsif ($string =~ /\G \$ ((?>[1-9][0-9]*)) /cgmosx) { } 0 293 293
elsif ($string =~ /\G \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} /cgmosx) { } 0 293 293
elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ .+? \] ) /cgmosx) { } 0 293 293
elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ .+? \} ) /cgmosx) { } 0 293 293
elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) /cgmosx) { } 0 293 293
elsif ($string =~ /\G \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} /cgmosx) { } 0 293 293
elsif ($string =~ /\G \$ (?>\s*) \{ (?>\s*) ( $qq_brace ) (?>\s*) \} /cgmosx) { } 3 290 293
elsif ($string =~ /\G ( (?: [\$\@\%\&\*] | \$\# | -> | \b sub \b) (?>\s*) (?: split | chop | index | rindex | lc | uc | fc | chr | ord | reverse | getc | tr | y | q | qq | qx | qw | m | s | qr | glob | lstat | opendir | stat | unlink | chdir ) ) \b /cgmosx) { } 1 289 290
elsif ($string =~ m{\G ( \$[\$\@\#\\\'\"/\?\(\)\[\]\<\>] ) }cgmosx) { } 0 289 289
elsif ($string =~ /\G \b (CORE:: | ->(>?\s*) (?: atan2 | [a-z]{2,})) \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b Char::eval (?= (?>\s*) \{ ) /cgox) { } 0 289 289
elsif ($string =~ /\G \b UTF2::eval (?= (?>\s*) \{ ) /cgox) { } 0 289 289
elsif ($string =~ /\G \b Char::eval \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b UTF2::eval \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b bytes::substr \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b chop \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b bytes::index \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b Char::index \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b UTF2::index \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b index \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b bytes::rindex \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b Char::rindex \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b UTF2::rindex \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b rindex \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b lc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G \b lcfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G \b uc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G \b ucfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G \b fc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s*) (\") ((?:$Eutf2::qq_char)+?) (\") /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\#) ((?:$Eutf2::qq_char)+?) (\#) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\() ((?:$qq_paren)+?) (\)) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\{) ((?:$qq_brace)+?) (\}) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\[) ((?:$qq_bracket)+?) (\]) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\<) ((?:$qq_angle)+?) (\>) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\S) ((?:$Eutf2::qq_char)+?) (\1) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s*) (\') ((?:\\\'|\\\\|$Eutf2::q_char)+?) (\') /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\#) ((?:\\\#|\\\\|$Eutf2::q_char)+?) (\#) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\() ((?:\\\)|\\\\|$q_paren)+?) (\)) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\{) ((?:\\\}|\\\\|$q_brace)+?) (\}) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\[) ((?:\\\]|\\\\|$q_bracket)+?) (\]) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\<) ((?:\\\>|\\\\|$q_angle)+?) (\>) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\S) ((?:\\\1|\\\\|$Eutf2::q_char)+?) (\1) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s*) (\$ (?> \w+ (?: ::\w+)*) (?: (?: ->)? (?: [\$\@\%\&\*]\* | \$\#\* | \( (?:$qq_paren)*? \) | [\@\%\*]? \{ (?:$qq_brace)+? \} | [\@\%]? \[ (?:$qq_bracket)+? \] ))*) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s*) \( ((?:$qq_paren)*?) \) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?= (?>\s+) [a-z]+) /cgox) { } 0 289 289
elsif ($string =~ /\G -s (?>\s+) ((?>\w+)) /cgox) { } 0 289 289
elsif ($string =~ /\G \b bytes::length (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G \b bytes::chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G \b chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G \b bytes::ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G \b ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G \b glob (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 289 289
elsif ($string =~ /\G \b lc \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b lcfirst \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b uc \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b ucfirst \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b fc \b /cgox) { } 0 289 289
elsif ($string =~ /\G -s \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b bytes::length \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b bytes::chr \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b chr \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b bytes::ord \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b ord \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b glob \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b reverse \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b getc \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b (split) \b (?! (?>\s*) => ) /cgox) { } 0 289 289
elsif ($string =~ /\G \b (qq) \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b (qx) \b /cgox) { } 0 289 289
elsif ($string =~ /\G \b (q) \b /cgox) { } 0 289 289
elsif ($string =~ /\G (?<![\w\$\@\%\&\*]) (\') ((?:\\\'|\\\\|$Eutf2::q_char)*?) (\') /cgox) { } 12 277 289
elsif ($string =~ /\G (\") ((?:$Eutf2::qq_char)*?) (\") /cgox) { } 6 271 277
elsif ($string =~ /\G (\`) ((?:$Eutf2::qq_char)*?) (\`) /cgox) { } 0 271 271
elsif ($string =~ /\G ( <<>> ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( <<= | <=> | <= | < ) (?= (?>\s*) [A-Za-z_0-9'"`\$\@\&\*\(\+\-] )/cgox) { } 0 271 271
elsif ($string =~ /\G (<[\$]?[A-Za-z_][A-Za-z_0-9]*>) /cgox) { } 0 271 271
elsif ($string =~ /\G < ((?:$Eutf2::q_char)+?) > /cgox) { } 0 271 271
elsif ($string =~ /\G ( << (?>\s*) ) (?= [0-9\$\@\&] ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( <<~ [\t ]* '([a-zA-Z_0-9]*)' ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( <<~ \\([a-zA-Z_0-9]+) ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( <<~ [\t ]* "([a-zA-Z_0-9]*)" ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( <<~ ([a-zA-Z_0-9]+) ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( <<~ [\t ]* `([a-zA-Z_0-9]*)` ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( << '([a-zA-Z_0-9]*)' ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( << \\([a-zA-Z_0-9]+) ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( << "([a-zA-Z_0-9]*)" ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( << ([a-zA-Z_0-9]+) ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( << `([a-zA-Z_0-9]*)` ) /cgox) { } 0 271 271
elsif ($string =~ /\G ( -- | \+\+ | [\)\}\]] ) /cgox) { } 40 231 271
elsif ($string =~ /\G ( \.\.\. ) /cgox) { } 0 231 231
elsif ($string =~ m"\G ((?> !~~ | !~ | != | ! | %= | % | &&= | && | &= | &\.= | &\. | & | -= | -> | - | :(?>\s*)= | : | <<>> | <<= | <=> | <= | < | == | => | =~ | = | >>= | >> | >= | > | \*\*= | \*\* | \*= | \* | \+= | \+ | \.\. | \.= | \. | //= | // | /= | / | \? | \\ | \^= | \^\.= | \^\. | \^ | \b x= | \|\|= | \|\| | \|= | \|\.= | \|\. | \| | ~~ | ~\. | ~ | \b(?: and | cmp | eq | ge | gt | le | lt | ne | not | or | xor | x )\b | \b(?: print )\b | [,;\(\{\[] )) "cgox) { } 50 181 231
elsif ($string =~ /\G ($Eutf2::q_char) /cgox) { } 181 0 181
6070 }
6071  
6072 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> @{[Eutf2::PREMATCH()]}
6073 elsif ($string =~ /\G ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH \b | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) /oxmsgc) {
6074 0 $e_string .= q{Eutf2::PREMATCH()};
6075 0 $slash = 'div';
6076 }
6077  
6078 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> @{[Eutf2::MATCH()]}
6079 elsif ($string =~ /\G ( \$& | \$\{&\} | \$ (?>\s*) MATCH \b | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) /oxmsgc) {
6080 0 $e_string .= q{Eutf2::MATCH()};
6081 0 $slash = 'div';
6082 }
6083  
6084 # $', ${'} --> $', ${'}
6085 elsif ($string =~ /\G ( \$' | \$\{'\} ) /oxmsgc) {
6086 0 $e_string .= $1;
6087 0 $slash = 'div';
6088 }
6089  
6090 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> @{[Eutf2::POSTMATCH()]}
6091 elsif ($string =~ /\G ( \$ (?>\s*) POSTMATCH \b | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) /oxmsgc) {
6092 0 $e_string .= q{Eutf2::POSTMATCH()};
6093 0 $slash = 'div';
6094 }
6095  
6096 # bareword
6097 elsif ($string =~ /\G ( \{ (?>\s*) (?: tr | index | rindex | reverse ) (?>\s*) \} ) /oxmsgc) {
6098 0 $e_string .= $1;
6099 0 $slash = 'div';
6100 }
6101  
6102 # $0 --> $0
6103 elsif ($string =~ /\G ( \$ 0 ) /oxmsgc) {
6104 0 $e_string .= $1;
6105 0 $slash = 'div';
6106 }
6107 elsif ($string =~ /\G ( \$ \{ (?>\s*) 0 (?>\s*) \} ) /oxmsgc) {
6108 0 $e_string .= $1;
6109 0 $slash = 'div';
6110 }
6111  
6112 # $$ --> $$
6113 elsif ($string =~ /\G ( \$ \$ ) (?![\w\{]) /oxmsgc) {
6114 0 $e_string .= $1;
6115 0 $slash = 'div';
6116 }
6117  
6118 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
6119 # $1, $2, $3 --> $1, $2, $3 otherwise
6120 elsif ($string =~ /\G \$ ((?>[1-9][0-9]*)) /oxmsgc) {
6121 0 $e_string .= e_capture($1);
6122 0 $slash = 'div';
6123 }
6124 elsif ($string =~ /\G \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} /oxmsgc) {
6125 0 $e_string .= e_capture($1);
6126 0 $slash = 'div';
6127 }
6128  
6129 # $$foo[ ... ] --> $ $foo->[ ... ]
6130 elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ .+? \] ) /oxmsgc) {
6131 0 $e_string .= e_capture($1.'->'.$2);
6132 0 $slash = 'div';
6133 }
6134  
6135 # $$foo{ ... } --> $ $foo->{ ... }
6136 elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ .+? \} ) /oxmsgc) {
6137 0 $e_string .= e_capture($1.'->'.$2);
6138 0 $slash = 'div';
6139 }
6140  
6141 # $$foo
6142 elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) /oxmsgc) {
6143 0 $e_string .= e_capture($1);
6144 0 $slash = 'div';
6145 }
6146  
6147 # ${ foo }
6148 elsif ($string =~ /\G \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} /oxmsgc) {
6149 0 $e_string .= '${' . $1 . '}';
6150 0 $slash = 'div';
6151 }
6152  
6153 # ${ ... }
6154 elsif ($string =~ /\G \$ (?>\s*) \{ (?>\s*) ( $qq_brace ) (?>\s*) \} /oxmsgc) {
6155 3 $e_string .= e_capture($1);
6156 3 $slash = 'div';
6157 }
6158  
6159 # variable or function
6160 # $ @ % & * $ #
6161 elsif ($string =~ /\G ( (?: [\$\@\%\&\*] | \$\# | -> | \b sub \b) (?>\s*) (?: split | chop | index | rindex | lc | uc | fc | chr | ord | reverse | getc | tr | y | q | qq | qx | qw | m | s | qr | glob | lstat | opendir | stat | unlink | chdir ) ) \b /oxmsgc) {
6162 1 $e_string .= $1;
6163 1 $slash = 'div';
6164 }
6165 # $ $ $ $ $ $ $ $ $ $ $ $ $ $
6166 # $ @ # \ ' " / ? ( ) [ ] < >
6167 elsif ($string =~ /\G ( \$[\$\@\#\\\'\"\/\?\(\)\[\]\<\>] ) /oxmsgc) {
6168 0 $e_string .= $1;
6169 0 $slash = 'div';
6170 }
6171  
6172 # subroutines of package Eutf2
6173 0 elsif ($string =~ /\G \b (CORE:: | ->(>?\s*) (?: atan2 | [a-z]{2,})) \b /oxgc) { $e_string .= $1; $slash = 'm//'; }
6174 0 elsif ($string =~ /\G \b Char::eval (?= (?>\s*) \{ ) /oxgc) { $e_string .= 'eval'; $slash = 'm//'; }
6175 0 elsif ($string =~ /\G \b UTF2::eval (?= (?>\s*) \{ ) /oxgc) { $e_string .= 'eval'; $slash = 'm//'; }
6176 0 elsif ($string =~ /\G \b Char::eval \b /oxgc) { $e_string .= 'eval Char::escape'; $slash = 'm//'; }
6177 0 elsif ($string =~ /\G \b UTF2::eval \b /oxgc) { $e_string .= 'eval UTF2::escape'; $slash = 'm//'; }
6178 0 elsif ($string =~ /\G \b bytes::substr \b /oxgc) { $e_string .= 'substr'; $slash = 'm//'; }
6179 0 elsif ($string =~ /\G \b chop \b /oxgc) { $e_string .= 'Eutf2::chop'; $slash = 'm//'; }
6180 0 elsif ($string =~ /\G \b bytes::index \b /oxgc) { $e_string .= 'index'; $slash = 'm//'; }
6181 0 elsif ($string =~ /\G \b Char::index \b /oxgc) { $e_string .= 'Char::index'; $slash = 'm//'; }
6182 0 elsif ($string =~ /\G \b UTF2::index \b /oxgc) { $e_string .= 'UTF2::index'; $slash = 'm//'; }
6183 0 elsif ($string =~ /\G \b index \b /oxgc) { $e_string .= 'Eutf2::index'; $slash = 'm//'; }
6184 0 elsif ($string =~ /\G \b bytes::rindex \b /oxgc) { $e_string .= 'rindex'; $slash = 'm//'; }
6185 0 elsif ($string =~ /\G \b Char::rindex \b /oxgc) { $e_string .= 'Char::rindex'; $slash = 'm//'; }
6186 0 elsif ($string =~ /\G \b UTF2::rindex \b /oxgc) { $e_string .= 'UTF2::rindex'; $slash = 'm//'; }
6187 0 elsif ($string =~ /\G \b rindex \b /oxgc) { $e_string .= 'Eutf2::rindex'; $slash = 'm//'; }
6188 0 elsif ($string =~ /\G \b lc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= 'Eutf2::lc'; $slash = 'm//'; }
6189 0 elsif ($string =~ /\G \b lcfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= 'Eutf2::lcfirst'; $slash = 'm//'; }
6190 0 elsif ($string =~ /\G \b uc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= 'Eutf2::uc'; $slash = 'm//'; }
6191 0 elsif ($string =~ /\G \b ucfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= 'Eutf2::ucfirst'; $slash = 'm//'; }
6192 0 elsif ($string =~ /\G \b fc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= 'Eutf2::fc'; $slash = 'm//'; }
6193  
6194 # "-s '' ..." means file test "-s 'filename' ..." (not means "- s/// ...")
6195 0 elsif ($string =~ /\G -s (?>\s*) (\") ((?:$qq_char)+?) (\") /oxgc) { $e_string .= '-s ' . e_qq('', $1,$3,$2); $slash = 'm//'; }
6196 0 elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\#) ((?:$qq_char)+?) (\#) /oxgc) { $e_string .= '-s ' . e_qq('qq',$1,$3,$2); $slash = 'm//'; }
6197 0 elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\() ((?:$qq_paren)+?) (\)) /oxgc) { $e_string .= '-s ' . e_qq('qq',$1,$3,$2); $slash = 'm//'; }
6198 0 elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\{) ((?:$qq_brace)+?) (\}) /oxgc) { $e_string .= '-s ' . e_qq('qq',$1,$3,$2); $slash = 'm//'; }
6199 0 elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\[) ((?:$qq_bracket)+?) (\]) /oxgc) { $e_string .= '-s ' . e_qq('qq',$1,$3,$2); $slash = 'm//'; }
6200 0 elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\<) ((?:$qq_angle)+?) (\>) /oxgc) { $e_string .= '-s ' . e_qq('qq',$1,$3,$2); $slash = 'm//'; }
6201 0 elsif ($string =~ /\G -s (?>\s+) qq (?>\s*) (\S) ((?:$qq_char)+?) (\1) /oxgc) { $e_string .= '-s ' . e_qq('qq',$1,$3,$2); $slash = 'm//'; }
6202  
6203 0 elsif ($string =~ /\G -s (?>\s*) (\') ((?:\\\'|\\\\|$q_char)+?) (\') /oxgc) { $e_string .= '-s ' . e_q ('', $1,$3,$2); $slash = 'm//'; }
6204 0 elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\#) ((?:\\\#|\\\\|$q_char)+?) (\#) /oxgc) { $e_string .= '-s ' . e_q ('q', $1,$3,$2); $slash = 'm//'; }
6205 0 elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\() ((?:\\\)|\\\\|$q_paren)+?) (\)) /oxgc) { $e_string .= '-s ' . e_q ('q', $1,$3,$2); $slash = 'm//'; }
6206 0 elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\{) ((?:\\\}|\\\\|$q_brace)+?) (\}) /oxgc) { $e_string .= '-s ' . e_q ('q', $1,$3,$2); $slash = 'm//'; }
6207 0 elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\[) ((?:\\\]|\\\\|$q_bracket)+?) (\]) /oxgc) { $e_string .= '-s ' . e_q ('q', $1,$3,$2); $slash = 'm//'; }
6208 0 elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\<) ((?:\\\>|\\\\|$q_angle)+?) (\>) /oxgc) { $e_string .= '-s ' . e_q ('q', $1,$3,$2); $slash = 'm//'; }
6209 0 elsif ($string =~ /\G -s (?>\s+) q (?>\s*) (\S) ((?:\\\1|\\\\|$q_char)+?) (\1) /oxgc) { $e_string .= '-s ' . e_q ('q', $1,$3,$2); $slash = 'm//'; }
6210  
6211 elsif ($string =~ /\G -s (?>\s*) (\$ (?> \w+ (?: ::\w+)*) (?: (?: ->)? (?: [\$\@\%\&\*]\* | \$\#\* | \( (?:$qq_paren)*? \) | [\@\%\*]? \{ (?:$qq_brace)+? \} | [\@\%]? \[ (?:$qq_bracket)+? \] ))*) /oxgc)
6212 0 { $e_string .= "-s $1"; $slash = 'm//'; }
6213 0 elsif ($string =~ /\G -s (?>\s*) \( ((?:$qq_paren)*?) \) /oxgc) { $e_string .= "-s ($1)"; $slash = 'm//'; }
6214 0 elsif ($string =~ /\G -s (?= (?>\s+) [a-z]+) /oxgc) { $e_string .= '-s'; $slash = 'm//'; }
6215 0 elsif ($string =~ /\G -s (?>\s+) ((?>\w+)) /oxgc) { $e_string .= "-s $1"; $slash = 'm//'; }
6216  
6217 0 elsif ($string =~ /\G \b bytes::length (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= 'length'; $slash = 'm//'; }
6218 0 elsif ($string =~ /\G \b bytes::chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= 'chr'; $slash = 'm//'; }
6219 0 elsif ($string =~ /\G \b chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= 'Eutf2::chr'; $slash = 'm//'; }
6220 0 elsif ($string =~ /\G \b bytes::ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= 'ord'; $slash = 'div'; }
6221 0 elsif ($string =~ /\G \b ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= $function_ord; $slash = 'div'; }
6222 0 elsif ($string =~ /\G \b glob (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $e_string .= 'Eutf2::glob'; $slash = 'm//'; }
6223 0 elsif ($string =~ /\G \b lc \b /oxgc) { $e_string .= 'Eutf2::lc_'; $slash = 'm//'; }
6224 0 elsif ($string =~ /\G \b lcfirst \b /oxgc) { $e_string .= 'Eutf2::lcfirst_'; $slash = 'm//'; }
6225 0 elsif ($string =~ /\G \b uc \b /oxgc) { $e_string .= 'Eutf2::uc_'; $slash = 'm//'; }
6226 0 elsif ($string =~ /\G \b ucfirst \b /oxgc) { $e_string .= 'Eutf2::ucfirst_'; $slash = 'm//'; }
6227 0 elsif ($string =~ /\G \b fc \b /oxgc) { $e_string .= 'Eutf2::fc_'; $slash = 'm//'; }
6228 0 elsif ($string =~ /\G -s \b /oxgc) { $e_string .= '-s '; $slash = 'm//'; }
6229  
6230 0 elsif ($string =~ /\G \b bytes::length \b /oxgc) { $e_string .= 'length'; $slash = 'm//'; }
6231 0 elsif ($string =~ /\G \b bytes::chr \b /oxgc) { $e_string .= 'chr'; $slash = 'm//'; }
6232 0 elsif ($string =~ /\G \b chr \b /oxgc) { $e_string .= 'Eutf2::chr_'; $slash = 'm//'; }
6233 0 elsif ($string =~ /\G \b bytes::ord \b /oxgc) { $e_string .= 'ord'; $slash = 'div'; }
6234 0 elsif ($string =~ /\G \b ord \b /oxgc) { $e_string .= $function_ord_; $slash = 'div'; }
6235 0 elsif ($string =~ /\G \b glob \b /oxgc) { $e_string .= 'Eutf2::glob_'; $slash = 'm//'; }
6236 0 elsif ($string =~ /\G \b reverse \b /oxgc) { $e_string .= $function_reverse; $slash = 'm//'; }
6237 0 elsif ($string =~ /\G \b getc \b /oxgc) { $e_string .= $function_getc; $slash = 'm//'; }
6238 # split
6239 elsif ($string =~ /\G \b (split) \b (?! (?>\s*) => ) /oxgc) {
6240 0 $slash = 'm//';
6241  
6242 0 my $e = '';
6243 0 ▶ while ($string =~ /\G ( (?>\s+) | \( | \#.* ) /oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G ( (?>\s+) | \( | \#.* ) /cgox) 0 0 0
6244 0 $e .= $1;
6245 }
6246  
6247 # end of split
6248 0 ▶ if ($string =~ /\G (?= [,;\)\}\]] ) /oxgc) { return 'Eutf2::split' . $e; }
Branch: 23 branches
BranchTrueFalseTotal
if ($string =~ /\G (?= [,;\)\}\]] ) /cgox) { } 0 0 0
elsif ($string =~ /\G ( [\$\@\&\*] $qq_scalar ) /cgox) { } 0 0 0
elsif ($string =~ /\G \b qq (\#) [ ] (\#) /cgox) { } 0 0 0
elsif ($string =~ /\G \b qq ((?>\s*)) (\() [ ] (\)) /cgox) { } 0 0 0
elsif ($string =~ /\G \b qq ((?>\s*)) (\{) [ ] (\}) /cgox) { } 0 0 0
elsif ($string =~ /\G \b qq ((?>\s*)) (\[) [ ] (\]) /cgox) { } 0 0 0
elsif ($string =~ /\G \b qq ((?>\s*)) (\<) [ ] (\>) /cgox) { } 0 0 0
elsif ($string =~ /\G \b qq ((?>\s*)) (\S) [ ] (\2) /cgox) { } 0 0 0
elsif ($string =~ /\G \b q (\#) [ ] (\#) /cgox) { } 0 0 0
elsif ($string =~ /\G \b q ((?>\s*)) (\() [ ] (\)) /cgox) { } 0 0 0
elsif ($string =~ /\G \b q ((?>\s*)) (\{) [ ] (\}) /cgox) { } 0 0 0
elsif ($string =~ /\G \b q ((?>\s*)) (\[) [ ] (\]) /cgox) { } 0 0 0
elsif ($string =~ /\G \b q ((?>\s*)) (\<) [ ] (\>) /cgox) { } 0 0 0
elsif ($string =~ /\G \b q ((?>\s*)) (\S) [ ] (\2) /cgox) { } 0 0 0
elsif ($string =~ /\G ' [ ] ' /cgox) { } 0 0 0
elsif ($string =~ /\G " [ ] " /cgox) { } 0 0 0
elsif ($string =~ /\G \b (qq) \b /cgox) { } 0 0 0
elsif ($string =~ /\G \b (qr) \b /cgox) { } 0 0 0
elsif ($string =~ /\G \b (q) \b /cgox) { } 0 0 0
elsif ($string =~ /\G \b (m) \b /cgox) { } 0 0 0
elsif ($string =~ /\G (\') /cgox) { } 0 0 0
elsif ($string =~ /\G (\") /cgox) { } 0 0 0
elsif ($string =~ m[\G (/) ]cgox) { } 0 0 0
6249  
6250 # split scalar value
6251 0 elsif ($string =~ /\G ( [\$\@\&\*] $qq_scalar ) /oxgc) { $e_string .= 'Eutf2::split' . $e . e_string($1); next E_STRING_LOOP; }
6252  
6253 # split literal space
6254 0 elsif ($string =~ /\G \b qq (\#) [ ] (\#) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq {qq$1 $2}; next E_STRING_LOOP; }
6255 0 elsif ($string =~ /\G \b qq ((?>\s*)) (\() [ ] (\)) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq{$1qq$2 $3}; next E_STRING_LOOP; }
6256 0 elsif ($string =~ /\G \b qq ((?>\s*)) (\{) [ ] (\}) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq{$1qq$2 $3}; next E_STRING_LOOP; }
6257 0 elsif ($string =~ /\G \b qq ((?>\s*)) (\[) [ ] (\]) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq{$1qq$2 $3}; next E_STRING_LOOP; }
6258 0 elsif ($string =~ /\G \b qq ((?>\s*)) (\<) [ ] (\>) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq{$1qq$2 $3}; next E_STRING_LOOP; }
6259 0 elsif ($string =~ /\G \b qq ((?>\s*)) (\S) [ ] (\2) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq{$1qq$2 $3}; next E_STRING_LOOP; }
6260 0 elsif ($string =~ /\G \b q (\#) [ ] (\#) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq {q$1 $2}; next E_STRING_LOOP; }
6261 0 elsif ($string =~ /\G \b q ((?>\s*)) (\() [ ] (\)) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq {$1q$2 $3}; next E_STRING_LOOP; }
6262 0 elsif ($string =~ /\G \b q ((?>\s*)) (\{) [ ] (\}) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq {$1q$2 $3}; next E_STRING_LOOP; }
6263 0 elsif ($string =~ /\G \b q ((?>\s*)) (\[) [ ] (\]) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq {$1q$2 $3}; next E_STRING_LOOP; }
6264 0 elsif ($string =~ /\G \b q ((?>\s*)) (\<) [ ] (\>) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq {$1q$2 $3}; next E_STRING_LOOP; }
6265 0 elsif ($string =~ /\G \b q ((?>\s*)) (\S) [ ] (\2) /oxgc) { $e_string .= 'Eutf2::split' . $e . qq {$1q$2 $3}; next E_STRING_LOOP; }
6266 0 elsif ($string =~ /\G ' [ ] ' /oxgc) { $e_string .= 'Eutf2::split' . $e . qq {' '}; next E_STRING_LOOP; }
6267 0 elsif ($string =~ /\G " [ ] " /oxgc) { $e_string .= 'Eutf2::split' . $e . qq {" "}; next E_STRING_LOOP; }
6268  
6269 # split qq//
6270 elsif ($string =~ /\G \b (qq) \b /oxgc) {
6271 0 ▶ if ($string =~ /\G (\#) ((?:$qq_char)*?) (\#) /oxgc) { $e_string .= e_split($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # qq# # --> qr # #
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G (\#) ((?:$Eutf2::qq_char)*?) (\#) /cgox) { } 0 0 0
6272 else {
6273 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6274 0 ▶ if ($string =~ /\G ((?>\s+)|\#.*) /oxgc) { $e_string .= $e . $1; }
Branch: 7 branches
BranchTrueFalseTotal
if ($string =~ /\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) /cgox) { } 0 0 0
elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) /cgox) { } 0 0 0
elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) /cgox) { } 0 0 0
elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) /cgox) { } 0 0 0
elsif ($string =~ /\G ([*\-:?\\^|]) ((?:$Eutf2::qq_char)*?) (\1) /cgox) { } 0 0 0
elsif ($string =~ /\G (\S) ((?:$Eutf2::qq_char)*?) (\1) /cgox) { } 0 0 0
6275 0 elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { $e_string .= e_split($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # qq ( ) --> qr ( )
6276 0 elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { $e_string .= e_split($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # qq { } --> qr { }
6277 0 elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { $e_string .= e_split($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # qq [ ] --> qr [ ]
6278 0 elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { $e_string .= e_split($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # qq < > --> qr < >
6279 0 elsif ($string =~ /\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) /oxgc) { $e_string .= e_split($e.'qr','{','}',$2,''); next E_STRING_LOOP; } # qq | | --> qr { }
6280 0 elsif ($string =~ /\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { $e_string .= e_split($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # qq * * --> qr * *
6281 }
6282 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6283 }
6284 }
6285  
6286 # split qr//
6287 elsif ($string =~ /\G \b (qr) \b /oxgc) {
6288 0 ▶ if ($string =~ /\G (\#) ((?:$qq_char)*?) (\#) ([imosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1,$3,$2,$4); next E_STRING_LOOP; } # qr# #
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G (\#) ((?:$Eutf2::qq_char)*?) (\#) ([imosxpadlunbB]*) /cgox) { } 0 0 0
6289 else {
6290 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6291 0 ▶ if ($string =~ /\G ((?>\s+)|\#.*) /oxgc) { $e_string .= $e . $1; }
Branch: 8 branches
BranchTrueFalseTotal
if ($string =~ /\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) ([imosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) ([imosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) ([imosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) ([imosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\') ((?:$Eutf2::qq_char)*?) (\') ([imosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G ([*\-:?\\^|]) ((?:$Eutf2::qq_char)*?) (\1) ([imosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([imosxpadlunbB]*) /cgox) { } 0 0 0
6292 0 elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) ([imosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # qr ( )
6293 0 elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) ([imosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # qr { }
6294 0 elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) ([imosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # qr [ ]
6295 0 elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) ([imosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # qr < >
6296 0 elsif ($string =~ /\G (\') ((?:$qq_char)*?) (\') ([imosxpadlunbB]*) /oxgc) { $e_string .= e_split_q($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # qr ' '
6297 0 elsif ($string =~ /\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) ([imosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr','{','}',$2,$4); next E_STRING_LOOP; } # qr | | --> qr { }
6298 0 elsif ($string =~ /\G (\S) ((?:$qq_char)*?) (\1) ([imosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # qr * *
6299 }
6300 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6301 }
6302 }
6303  
6304 # split q//
6305 elsif ($string =~ /\G \b (q) \b /oxgc) {
6306 0 ▶ if ($string =~ /\G (\#) ((?:\\\#|\\\\|$q_char)*?) (\#) /oxgc) { $e_string .= e_split_q($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # q# # --> qr # #
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G (\#) ((?:\\\#|\\\\|$Eutf2::q_char)*?) (\#) /cgox) { } 0 0 0
6307 else {
6308 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6309 0 ▶ if ($string =~ /\G ((?>\s+)|\#.*) /oxgc) { $e_string .= $e . $1; }
Branch: 7 branches
BranchTrueFalseTotal
if ($string =~ /\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\() ((?:\\\\|\\\)|\\\(|$q_paren)*?) (\)) /cgox) { } 0 0 0
elsif ($string =~ /\G (\{) ((?:\\\\|\\\}|\\\{|$q_brace)*?) (\}) /cgox) { } 0 0 0
elsif ($string =~ /\G (\[) ((?:\\\\|\\\]|\\\[|$q_bracket)*?) (\]) /cgox) { } 0 0 0
elsif ($string =~ /\G (\<) ((?:\\\\|\\\>|\\\<|$q_angle)*?) (\>) /cgox) { } 0 0 0
elsif ($string =~ /\G ([*\-:?\\^|]) ((?:$Eutf2::q_char)*?) (\1) /cgox) { } 0 0 0
elsif ($string =~ /\G (\S) ((?:\\\\|\\\1| $Eutf2::q_char)*?) (\1) /cgox) { } 0 0 0
6310 0 elsif ($string =~ /\G (\() ((?:\\\\|\\\)|\\\(|$q_paren)*?) (\)) /oxgc) { $e_string .= e_split_q($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # q ( ) --> qr ( )
6311 0 elsif ($string =~ /\G (\{) ((?:\\\\|\\\}|\\\{|$q_brace)*?) (\}) /oxgc) { $e_string .= e_split_q($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # q { } --> qr { }
6312 0 elsif ($string =~ /\G (\[) ((?:\\\\|\\\]|\\\[|$q_bracket)*?) (\]) /oxgc) { $e_string .= e_split_q($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # q [ ] --> qr [ ]
6313 0 elsif ($string =~ /\G (\<) ((?:\\\\|\\\>|\\\<|$q_angle)*?) (\>) /oxgc) { $e_string .= e_split_q($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # q < > --> qr < >
6314 0 elsif ($string =~ /\G ([*\-:?\\^|]) ((?:$q_char)*?) (\1) /oxgc) { $e_string .= e_split_q($e.'qr','{','}',$2,''); next E_STRING_LOOP; } # q | | --> qr { }
6315 0 elsif ($string =~ /\G (\S) ((?:\\\\|\\\1| $q_char)*?) (\1) /oxgc) { $e_string .= e_split_q($e.'qr',$1,$3,$2,''); next E_STRING_LOOP; } # q * * --> qr * *
6316 }
6317 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6318 }
6319 }
6320  
6321 # split m//
6322 elsif ($string =~ /\G \b (m) \b /oxgc) {
6323 0 ▶ if ($string =~ /\G (\#) ((?:$qq_char)*?) (\#) ([cgimosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1,$3,$2,$4); next E_STRING_LOOP; } # m# # --> qr # #
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G (\#) ((?:$Eutf2::qq_char)*?) (\#) ([cgimosxpadlunbB]*) /cgox) { } 0 0 0
6324 else {
6325 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6326 0 ▶ if ($string =~ /\G ((?>\s+)|\#.*) /oxgc) { $e_string .= $e . $1; }
Branch: 8 branches
BranchTrueFalseTotal
if ($string =~ /\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) ([cgimosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) ([cgimosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) ([cgimosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) ([cgimosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\') ((?:$Eutf2::qq_char)*?) (\') ([cgimosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G ([*\-:?\\^|]) ((?:$Eutf2::qq_char)*?) (\1) ([cgimosxpadlunbB]*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\S) ((?:$Eutf2::qq_char)*?) (\1) ([cgimosxpadlunbB]*) /cgox) { } 0 0 0
6327 0 elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) ([cgimosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # m ( ) --> qr ( )
6328 0 elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) ([cgimosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # m { } --> qr { }
6329 0 elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) ([cgimosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # m [ ] --> qr [ ]
6330 0 elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) ([cgimosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # m < > --> qr < >
6331 0 elsif ($string =~ /\G (\') ((?:$qq_char)*?) (\') ([cgimosxpadlunbB]*) /oxgc) { $e_string .= e_split_q($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # m ' ' --> qr ' '
6332 0 elsif ($string =~ /\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) ([cgimosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr','{','}',$2,$4); next E_STRING_LOOP; } # m | | --> qr { }
6333 0 elsif ($string =~ /\G (\S) ((?:$qq_char)*?) (\1) ([cgimosxpadlunbB]*) /oxgc) { $e_string .= e_split ($e.'qr',$1, $3, $2,$4); next E_STRING_LOOP; } # m * * --> qr * *
6334 }
6335 0 die __FILE__, ": Search pattern not terminated\n";
6336 }
6337 }
6338  
6339 # split ''
6340 elsif ($string =~ /\G (\') /oxgc) {
6341 0 my $q_string = '';
6342 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6343 0 ▶ if ($string =~ /\G (\\\\) /oxgc) { $q_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if ($string =~ /\G (\\\\) /cgox) { } 0 0 0
elsif ($string =~ /\G (\\\') /cgox) { } 0 0 0
elsif ($string =~ /\G \' /cgox) { } 0 0 0
elsif ($string =~ /\G ($Eutf2::q_char) /cgox) { } 0 0 0
6344 0 elsif ($string =~ /\G (\\\') /oxgc) { $q_string .= $1; } # splitqr'' --> split qr''
6345 0 elsif ($string =~ /\G \' /oxgc) { $e_string .= e_split_q($e.q{ qr},"'","'",$q_string,''); next E_STRING_LOOP; } # ' ' --> qr ' '
6346 0 elsif ($string =~ /\G ($q_char) /oxgc) { $q_string .= $1; }
6347 }
6348 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6349 }
6350  
6351 # split ""
6352 elsif ($string =~ /\G (\") /oxgc) {
6353 0 my $qq_string = '';
6354 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6355 0 ▶ if ($string =~ /\G (\\\\) /oxgc) { $qq_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if ($string =~ /\G (\\\\) /cgox) { } 0 0 0
elsif ($string =~ /\G (\\\") /cgox) { } 0 0 0
elsif ($string =~ /\G \" /cgox) { } 0 0 0
elsif ($string =~ /\G ($Eutf2::q_char) /cgox) { } 0 0 0
6356 0 elsif ($string =~ /\G (\\\") /oxgc) { $qq_string .= $1; } # splitqr"" --> split qr""
6357 0 elsif ($string =~ /\G \" /oxgc) { $e_string .= e_split($e.q{ qr},'"','"',$qq_string,''); next E_STRING_LOOP; } # " " --> qr " "
6358 0 elsif ($string =~ /\G ($q_char) /oxgc) { $qq_string .= $1; }
6359 }
6360 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6361 }
6362  
6363 # split //
6364 elsif ($string =~ /\G (\/) /oxgc) {
6365 0 my $regexp = '';
6366 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6367 0 ▶ if ($string =~ /\G (\\\\) /oxgc) { $regexp .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if ($string =~ /\G (\\\\) /cgox) { } 0 0 0
elsif ($string =~ m[\G (\\/) ]cgox) { } 0 0 0
elsif ($string =~ m[\G / ([cgimosxpadlunbB]*) ]cgox) { } 0 0 0
elsif ($string =~ /\G ($Eutf2::q_char) /cgox) { } 0 0 0
6368 0 elsif ($string =~ /\G (\\\/) /oxgc) { $regexp .= $1; } # splitqr// --> split qr//
6369 0 elsif ($string =~ /\G \/ ([cgimosxpadlunbB]*) /oxgc) { $e_string .= e_split($e.q{ qr}, '/','/',$regexp,$1); next E_STRING_LOOP; } # / / --> qr / /
6370 0 elsif ($string =~ /\G ($q_char) /oxgc) { $regexp .= $1; }
6371 }
6372 0 die __FILE__, ": Search pattern not terminated\n";
6373 }
6374 }
6375  
6376 # qq//
6377 elsif ($string =~ /\G \b (qq) \b /oxgc) {
6378 0 my $ope = $1;
6379 0 ▶ if ($string =~ /\G (\#) ((?:$qq_char)*?) (\#) /oxgc) { # qq# #
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G (\#) ((?:$Eutf2::qq_char)*?) (\#) /cgox) { } 0 0 0
6380 0 $e_string .= e_qq($ope,$1,$3,$2);
6381 }
6382 else {
6383 0 my $e = '';
6384 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6385 0 ▶ if ($string =~ /\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if ($string =~ /\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) /cgox) { } 0 0 0
elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) /cgox) { } 0 0 0
elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) /cgox) { } 0 0 0
elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) /cgox) { } 0 0 0
elsif ($string =~ /\G (\S) ((?:$Eutf2::qq_char)*?) (\1) /cgox) { } 0 0 0
6386 0 elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qq ( )
6387 0 elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qq { }
6388 0 elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qq [ ]
6389 0 elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qq < >
6390 0 elsif ($string =~ /\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qq * *
6391 }
6392 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6393 }
6394 }
6395  
6396 # qx//
6397 elsif ($string =~ /\G \b (qx) \b /oxgc) {
6398 0 my $ope = $1;
6399 0 ▶ if ($string =~ /\G (\#) ((?:$qq_char)*?) (\#) /oxgc) { # qx# #
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G (\#) ((?:$Eutf2::qq_char)*?) (\#) /cgox) { } 0 0 0
6400 0 $e_string .= e_qq($ope,$1,$3,$2);
6401 }
6402 else {
6403 0 my $e = '';
6404 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6405 0 ▶ if ($string =~ /\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 7 branches
BranchTrueFalseTotal
if ($string =~ /\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) /cgox) { } 0 0 0
elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) /cgox) { } 0 0 0
elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) /cgox) { } 0 0 0
elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) /cgox) { } 0 0 0
elsif ($string =~ /\G (\') ((?:$Eutf2::qq_char)*?) (\') /cgox) { } 0 0 0
elsif ($string =~ /\G (\S) ((?:$Eutf2::qq_char)*?) (\1) /cgox) { } 0 0 0
6406 0 elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qx ( )
6407 0 elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qx { }
6408 0 elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qx [ ]
6409 0 elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qx < >
6410 0 elsif ($string =~ /\G (\') ((?:$qq_char)*?) (\') /oxgc) { $e_string .= $e . e_q ($ope,$1,$3,$2); next E_STRING_LOOP; } # qx ' '
6411 0 elsif ($string =~ /\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qx * *
6412 }
6413 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6414 }
6415 }
6416  
6417 # q//
6418 elsif ($string =~ /\G \b (q) \b /oxgc) {
6419 0 my $ope = $1;
6420 0 ▶ if ($string =~ /\G (\#) ((?:\\\#|\\\\|$q_char)*?) (\#) /oxgc) { # q# #
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G (\#) ((?:\\\#|\\\\|$Eutf2::q_char)*?) (\#) /cgox) { } 0 0 0
6421 0 $e_string .= e_q($ope,$1,$3,$2);
6422 }
6423 else {
6424 0 my $e = '';
6425 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6426 0 ▶ if ($string =~ /\G ((?>\s+)|\#.*) /oxgc) { $e .= $1; }
Branch: 6 branches
BranchTrueFalseTotal
if ($string =~ /\G ((?>\s+)|\#.*) /cgox) { } 0 0 0
elsif ($string =~ /\G (\() ((?:\\\\|\\\)|\\\(|$q_paren)*?) (\)) /cgox) { } 0 0 0
elsif ($string =~ /\G (\{) ((?:\\\\|\\\}|\\\{|$q_brace)*?) (\}) /cgox) { } 0 0 0
elsif ($string =~ /\G (\[) ((?:\\\\|\\\]|\\\[|$q_bracket)*?) (\]) /cgox) { } 0 0 0
elsif ($string =~ /\G (\<) ((?:\\\\|\\\>|\\\<|$q_angle)*?) (\>) /cgox) { } 0 0 0
elsif ($string =~ /\G (\S) ((?:\\\\|\\\1| $Eutf2::q_char)*?) (\1) /cgox) { } 0 0 0
6427 0 elsif ($string =~ /\G (\() ((?:\\\\|\\\)|\\\(|$q_paren)*?) (\)) /oxgc) { $e_string .= $e . e_q($ope,$1,$3,$2); next E_STRING_LOOP; } # q ( )
6428 0 elsif ($string =~ /\G (\{) ((?:\\\\|\\\}|\\\{|$q_brace)*?) (\}) /oxgc) { $e_string .= $e . e_q($ope,$1,$3,$2); next E_STRING_LOOP; } # q { }
6429 0 elsif ($string =~ /\G (\[) ((?:\\\\|\\\]|\\\[|$q_bracket)*?) (\]) /oxgc) { $e_string .= $e . e_q($ope,$1,$3,$2); next E_STRING_LOOP; } # q [ ]
6430 0 elsif ($string =~ /\G (\<) ((?:\\\\|\\\>|\\\<|$q_angle)*?) (\>) /oxgc) { $e_string .= $e . e_q($ope,$1,$3,$2); next E_STRING_LOOP; } # q < >
6431 0 elsif ($string =~ /\G (\S) ((?:\\\\|\\\1| $q_char)*?) (\1) /oxgc) { $e_string .= $e . e_q($ope,$1,$3,$2); next E_STRING_LOOP; } # q * *
6432 }
6433 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6434 }
6435 }
6436  
6437 # ''
6438 12 elsif ($string =~ /\G (?<![\w\$\@\%\&\*]) (\') ((?:\\\'|\\\\|$q_char)*?) (\') /oxgc) { $e_string .= e_q('',$1,$3,$2); }
6439  
6440 # ""
6441 6 elsif ($string =~ /\G (\") ((?:$qq_char)*?) (\") /oxgc) { $e_string .= e_qq('',$1,$3,$2); }
6442  
6443 # ``
6444 0 elsif ($string =~ /\G (\`) ((?:$qq_char)*?) (\`) /oxgc) { $e_string .= e_qq('',$1,$3,$2); }
6445  
6446 # <<>> (a safer ARGV)
6447 0 elsif ($string =~ /\G ( <<>> ) /oxgc) { $e_string .= $1; }
6448  
6449 # <<= <=> <= < operator
6450 0 elsif ($string =~ /\G ( <<= | <=> | <= | < ) (?= (?>\s*) [A-Za-z_0-9'"`\$\@\&\*\(\+\-] )/oxgc) { $e_string .= $1; }
6451  
6452 # <FILEHANDLE>
6453 0 elsif ($string =~ /\G (<[\$]?[A-Za-z_][A-Za-z_0-9]*>) /oxgc) { $e_string .= $1; }
6454  
6455 # <WILDCARD> --- glob
6456 elsif ($string =~ /\G < ((?:$q_char)+?) > /oxgc) {
6457 0 $e_string .= 'Eutf2::glob("' . $1 . '")';
6458 }
6459  
6460 # << (bit shift) --- not here document
6461 elsif ($string =~ /\G ( << (?>\s*) ) (?= [0-9\$\@\&] ) /oxgc) {
6462 0 $slash = 'm//';
6463 0 $e_string .= $1;
6464 }
6465  
6466 # <<~'HEREDOC'
6467 elsif ($string =~ /\G ( <<~ [\t ]* '([a-zA-Z_0-9]*)' ) /oxgc) {
6468 0 $slash = 'm//';
6469 0 my $here_quote = $1;
6470 0 my $delimiter = $2;
6471  
6472 # get here document
6473 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
6474 0 $here_script = CORE::substr $_, pos $_;
6475 0 $here_script =~ s/.*?\n//oxm;
6476 }
6477 0 ▶ if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //msx) { } 0 0 0
6478 0 my $heredoc = $1;
6479 0 my $indent = $2;
6480 0 $heredoc =~ s{^$indent}{}msg; # no /ox
6481 0 push @heredoc, $heredoc . qq{\n$delimiter\n};
6482 0 push @heredoc_delimiter, qq{\\s*$delimiter};
6483 }
6484 else {
6485 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
6486 }
6487 0 $e_string .= qq{<<'$delimiter'};
6488 }
6489  
6490 # <<~\HEREDOC
6491 elsif ($string =~ /\G ( <<~ \\([a-zA-Z_0-9]+) ) /oxgc) {
6492 0 $slash = 'm//';
6493 0 my $here_quote = $1;
6494 0 my $delimiter = $2;
6495  
6496 # get here document
6497 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
6498 0 $here_script = CORE::substr $_, pos $_;
6499 0 $here_script =~ s/.*?\n//oxm;
6500 }
6501 0 ▶ if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //msx) { } 0 0 0
6502 0 my $heredoc = $1;
6503 0 my $indent = $2;
6504 0 $heredoc =~ s{^$indent}{}msg; # no /ox
6505 0 push @heredoc, $heredoc . qq{\n$delimiter\n};
6506 0 push @heredoc_delimiter, qq{\\s*$delimiter};
6507 }
6508 else {
6509 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
6510 }
6511 0 $e_string .= qq{<<\\$delimiter};
6512 }
6513  
6514 # <<~"HEREDOC"
6515 elsif ($string =~ /\G ( <<~ [\t ]* "([a-zA-Z_0-9]*)" ) /oxgc) {
6516 0 $slash = 'm//';
6517 0 my $here_quote = $1;
6518 0 my $delimiter = $2;
6519  
6520 # get here document
6521 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
6522 0 $here_script = CORE::substr $_, pos $_;
6523 0 $here_script =~ s/.*?\n//oxm;
6524 }
6525 0 ▶ if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //msx) { } 0 0 0
6526 0 my $heredoc = $1;
6527 0 my $indent = $2;
6528 0 $heredoc =~ s{^$indent}{}msg; # no /ox
6529 0 push @heredoc, e_heredoc($heredoc) . qq{\n$delimiter\n};
6530 0 push @heredoc_delimiter, qq{\\s*$delimiter};
6531 }
6532 else {
6533 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
6534 }
6535 0 $e_string .= qq{<<"$delimiter"};
6536 }
6537  
6538 # <<~HEREDOC
6539 elsif ($string =~ /\G ( <<~ ([a-zA-Z_0-9]+) ) /oxgc) {
6540 0 $slash = 'm//';
6541 0 my $here_quote = $1;
6542 0 my $delimiter = $2;
6543  
6544 # get here document
6545 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
6546 0 $here_script = CORE::substr $_, pos $_;
6547 0 $here_script =~ s/.*?\n//oxm;
6548 }
6549 0 ▶ if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //msx) { } 0 0 0
6550 0 my $heredoc = $1;
6551 0 my $indent = $2;
6552 0 $heredoc =~ s{^$indent}{}msg; # no /ox
6553 0 push @heredoc, e_heredoc($heredoc) . qq{\n$delimiter\n};
6554 0 push @heredoc_delimiter, qq{\\s*$delimiter};
6555 }
6556 else {
6557 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
6558 }
6559 0 $e_string .= qq{<<$delimiter};
6560 }
6561  
6562 # <<~`HEREDOC`
6563 elsif ($string =~ /\G ( <<~ [\t ]* `([a-zA-Z_0-9]*)` ) /oxgc) {
6564 0 $slash = 'm//';
6565 0 my $here_quote = $1;
6566 0 my $delimiter = $2;
6567  
6568 # get here document
6569 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
6570 0 $here_script = CORE::substr $_, pos $_;
6571 0 $here_script =~ s/.*?\n//oxm;
6572 }
6573 0 ▶ if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n ([\t ]*) $delimiter \n //msx) { } 0 0 0
6574 0 my $heredoc = $1;
6575 0 my $indent = $2;
6576 0 $heredoc =~ s{^$indent}{}msg; # no /ox
6577 0 push @heredoc, e_heredoc($heredoc) . qq{\n$delimiter\n};
6578 0 push @heredoc_delimiter, qq{\\s*$delimiter};
6579 }
6580 else {
6581 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
6582 }
6583 0 $e_string .= qq{<<`$delimiter`};
6584 }
6585  
6586 # <<'HEREDOC'
6587 elsif ($string =~ /\G ( << '([a-zA-Z_0-9]*)' ) /oxgc) {
6588 0 $slash = 'm//';
6589 0 my $here_quote = $1;
6590 0 my $delimiter = $2;
6591  
6592 # get here document
6593 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
6594 0 $here_script = CORE::substr $_, pos $_;
6595 0 $here_script =~ s/.*?\n//oxm;
6596 }
6597 0 ▶ if ($here_script =~ s/\A (.*?) \n $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n $delimiter \n //msx) { } 0 0 0
6598 0 push @heredoc, $1 . qq{\n$delimiter\n};
6599 0 push @heredoc_delimiter, $delimiter;
6600 }
6601 else {
6602 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
6603 }
6604 0 $e_string .= $here_quote;
6605 }
6606  
6607 # <<\HEREDOC
6608 elsif ($string =~ /\G ( << \\([a-zA-Z_0-9]+) ) /oxgc) {
6609 0 $slash = 'm//';
6610 0 my $here_quote = $1;
6611 0 my $delimiter = $2;
6612  
6613 # get here document
6614 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
6615 0 $here_script = CORE::substr $_, pos $_;
6616 0 $here_script =~ s/.*?\n//oxm;
6617 }
6618 0 ▶ if ($here_script =~ s/\A (.*?) \n $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n $delimiter \n //msx) { } 0 0 0
6619 0 push @heredoc, $1 . qq{\n$delimiter\n};
6620 0 push @heredoc_delimiter, $delimiter;
6621 }
6622 else {
6623 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
6624 }
6625 0 $e_string .= $here_quote;
6626 }
6627  
6628 # <<"HEREDOC"
6629 elsif ($string =~ /\G ( << "([a-zA-Z_0-9]*)" ) /oxgc) {
6630 0 $slash = 'm//';
6631 0 my $here_quote = $1;
6632 0 my $delimiter = $2;
6633  
6634 # get here document
6635 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
6636 0 $here_script = CORE::substr $_, pos $_;
6637 0 $here_script =~ s/.*?\n//oxm;
6638 }
6639 0 ▶ if ($here_script =~ s/\A (.*?) \n $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n $delimiter \n //msx) { } 0 0 0
6640 0 push @heredoc, e_heredoc($1) . qq{\n$delimiter\n};
6641 0 push @heredoc_delimiter, $delimiter;
6642 }
6643 else {
6644 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
6645 }
6646 0 $e_string .= $here_quote;
6647 }
6648  
6649 # <<HEREDOC
6650 elsif ($string =~ /\G ( << ([a-zA-Z_0-9]+) ) /oxgc) {
6651 0 $slash = 'm//';
6652 0 my $here_quote = $1;
6653 0 my $delimiter = $2;
6654  
6655 # get here document
6656 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
6657 0 $here_script = CORE::substr $_, pos $_;
6658 0 $here_script =~ s/.*?\n//oxm;
6659 }
6660 0 ▶ if ($here_script =~ s/\A (.*?) \n $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n $delimiter \n //msx) { } 0 0 0
6661 0 push @heredoc, e_heredoc($1) . qq{\n$delimiter\n};
6662 0 push @heredoc_delimiter, $delimiter;
6663 }
6664 else {
6665 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
6666 }
6667 0 $e_string .= $here_quote;
6668 }
6669  
6670 # <<`HEREDOC`
6671 elsif ($string =~ /\G ( << `([a-zA-Z_0-9]*)` ) /oxgc) {
6672 0 $slash = 'm//';
6673 0 my $here_quote = $1;
6674 0 my $delimiter = $2;
6675  
6676 # get here document
6677 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
6678 0 $here_script = CORE::substr $_, pos $_;
6679 0 $here_script =~ s/.*?\n//oxm;
6680 }
6681 0 ▶ if ($here_script =~ s/\A (.*?) \n $delimiter \n //xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script =~ s/\A (.*?) \n $delimiter \n //msx) { } 0 0 0
6682 0 push @heredoc, e_heredoc($1) . qq{\n$delimiter\n};
6683 0 push @heredoc_delimiter, $delimiter;
6684 }
6685 else {
6686 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
6687 }
6688 0 $e_string .= $here_quote;
6689 }
6690  
6691 # any operator before div
6692 elsif ($string =~ /\G (
6693 -- | \+\+ |
6694 [\)\}\]]
6695  
6696 40 ) /oxgc) { $slash = 'div'; $e_string .= $1; }
6697  
6698 # yada-yada or triple-dot operator
6699 elsif ($string =~ /\G (
6700 \.\.\.
6701  
6702 0 ) /oxgc) { $slash = 'm//'; $e_string .= q{die('Unimplemented')}; }
6703  
6704 # any operator before m//
6705 elsif ($string =~ /\G ((?>
6706  
6707 !~~ | !~ | != | ! |
6708 %= | % |
6709 &&= | && | &= | &\.= | &\. | & |
6710 -= | -> | - |
6711 :(?>\s*)= |
6712 : |
6713 <<>> |
6714 <<= | <=> | <= | < |
6715 == | => | =~ | = |
6716 >>= | >> | >= | > |
6717 \*\*= | \*\* | \*= | \* |
6718 \+= | \+ |
6719 \.\. | \.= | \. |
6720 \/\/= | \/\/ |
6721 \/= | \/ |
6722 \? |
6723 \\ |
6724 \^= | \^\.= | \^\. | \^ |
6725 \b x= |
6726 \|\|= | \|\| | \|= | \|\.= | \|\. | \| |
6727 ~~ | ~\. | ~ |
6728 \b(?: and | cmp | eq | ge | gt | le | lt | ne | not | or | xor | x )\b |
6729 \b(?: print )\b |
6730  
6731 [,;\(\{\[]
6732  
6733 50 )) /oxgc) { $slash = 'm//'; $e_string .= $1; }
6734  
6735 # other any character
6736 181 elsif ($string =~ /\G ($q_char) /oxgc) { $e_string .= $1; }
6737  
6738 # system error
6739 else {
6740 0 die __FILE__, ": Oops, this shouldn't happen!\n";
6741 }
6742 }
6743  
6744 39 return $e_string;
6745 }
6746  
6747 #
6748 # character class
6749 #
6750 2941 ▶sub character_class {
Subroutine character_class: called CC=3 SCAR=11.0
Pod undocumented
6751 2941 my($char,$modifier) = @_;
6752  
6753 2941 ▶ if ($char eq '.') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char eq '.') { } 115 2826 2941
6754 115 ▶ if ($modifier =~ /s/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /s/) { } 23 92 115
6755 23 return '${Eutf2::dot_s}';
6756 }
6757 else {
6758 92 return '${Eutf2::dot}';
6759 }
6760 }
6761 else {
6762 2826 return Eutf2::classic_character_class($char);
6763 }
6764 }
6765  
6766 #
6767 # escape capture ($1, $2, $3, ...)
6768 #
6769 469 ▶sub e_capture {
Subroutine e_capture: called CC=1 SCAR=0.0
Pod undocumented
6770  
6771 469 return join '', '${', $_[0], '}';
6772 }
6773  
6774 #
6775 # escape transliteration (tr/// or y///)
6776 #
6777 12 ▶sub e_tr {
Subroutine e_tr: called CC=5 SCAR=16.8
Pod undocumented
6778 12 my($variable,$charclass,$e,$charclass2,$modifier) = @_;
6779 12 my $e_tr = '';
6780 12 ▶ $modifier ||= '';
Condition100%2/2
$modifier ||= ""
l!l
75
MC/DC100%1/1
$modifier ||= ""
$modifier
Truth table100%2/2
A
A= $modifier
Aresult
11
00
6781  
6782 12 $slash = 'div';
6783  
6784 # quote character class 1
6785 12 $charclass = q_tr($charclass);
6786  
6787 # quote character class 2
6788 12 $charclass2 = q_tr($charclass2);
6789  
6790 # /b /B modifier
6791 12 ▶ if ($modifier =~ tr/bB//d) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ tr/Bb//d) { } 0 12 12
6792 0 ▶ if ($variable eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($variable eq '') { } 0 0 0
6793 0 $e_tr = qq{tr$charclass$e$charclass2$modifier};
6794 }
6795 else {
6796 0 $e_tr = qq{$variable${bind_operator}tr$charclass$e$charclass2$modifier};
6797 }
6798 }
6799 else {
6800 12 ▶ if ($variable eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($variable eq '') { } 2 10 12
6801 2 $e_tr = qq{Eutf2::tr(\$_,' =~ ',$charclass,$e$charclass2,'$modifier')};
6802 }
6803 else {
6804 10 $e_tr = qq{Eutf2::tr($variable,'$bind_operator',$charclass,$e$charclass2,'$modifier')};
6805 }
6806 }
6807  
6808 # clear tr/// variable
6809 12 $tr_variable = '';
6810 12 $bind_operator = '';
6811  
6812 12 return $e_tr;
6813 }
6814  
6815 #
6816 # quote for escape transliteration (tr/// or y///)
6817 #
6818 24 ▶sub q_tr {
Subroutine q_tr: called CC=9 SCAR=40.6
Pod undocumented
6819 24 my($charclass) = @_;
6820  
6821 # quote character class
6822 24 ▶ if ($charclass !~ /'/oxms) {
Branch: 6 branches
BranchTrueFalseTotal
if (not $charclass =~ /'/mosx) { } 24 0 24
elsif (not $charclass =~ m[/]mosx) { } 0 0 0
elsif (not $charclass =~ /\#/mosx) { } 0 0 0
elsif (not $charclass =~ /[\<\>]/mosx) { } 0 0 0
elsif (not $charclass =~ /[\(\)]/mosx) { } 0 0 0
elsif (not $charclass =~ /[\{\}]/mosx) { } 0 0 0
6823 24 return e_q('', "'", "'", $charclass); # --> q' '
6824 }
6825 elsif ($charclass !~ /\//oxms) {
6826 0 return e_q('q', '/', '/', $charclass); # --> q/ /
6827 }
6828 elsif ($charclass !~ /\#/oxms) {
6829 0 return e_q('q', '#', '#', $charclass); # --> q# #
6830 }
6831 elsif ($charclass !~ /[\<\>]/oxms) {
6832 0 return e_q('q', '<', '>', $charclass); # --> q< >
6833 }
6834 elsif ($charclass !~ /[\(\)]/oxms) {
6835 0 return e_q('q', '(', ')', $charclass); # --> q( )
6836 }
6837 elsif ($charclass !~ /[\{\}]/oxms) {
6838 0 return e_q('q', '{', '}', $charclass); # --> q{ }
6839 }
6840 else {
6841 0 for my $char (qw( ! " $ % & * + . : = ? @ ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
6842 0 ▶ if ($charclass !~ /\Q$char\E/xms) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($charclass =~ /\Q$char\E/msx) 0 0 0
6843 0 return e_q('q', $char, $char, $charclass);
6844 }
6845 }
6846 }
6847  
6848 0 return e_q('q', '{', '}', $charclass);
6849 }
6850  
6851 #
6852 # escape q string (q//, '')
6853 #
6854 2511 ▶sub e_q {
Subroutine e_q: called CC=1 SCAR=0.0
Pod undocumented
6855 2511 my($ope,$delimiter,$end_delimiter,$string) = @_;
6856  
6857 2511 $slash = 'div';
6858  
6859 2511 return join '', $ope, $delimiter, $string, $end_delimiter;
6860 }
6861  
6862 #
6863 # escape qq string (qq//, "", qx//, ``)
6864 #
6865 9703 ▶sub e_qq {
Subroutine e_qq: called CC=37 SCAR=48.3
Pod undocumented
6866 9703 my($ope,$delimiter,$end_delimiter,$string) = @_;
6867  
6868 9703 $slash = 'div';
6869  
6870 9703 my $left_e = 0;
6871 9703 my $right_e = 0;
6872  
6873 # split regexp
6874 9703 my @char = $string =~ /\G((?>
6875 [^\x80-\xFF\\\$]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
6876 \\x\{ (?>[0-9A-Fa-f]+) \} |
6877 \\o\{ (?>[0-7]+) \} |
6878 \\N\{ (?>[^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} |
6879 \\ $q_char |
6880 \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} |
6881 \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} |
6882 \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} |
6883 \$ (?>\s* [0-9]+) |
6884 \$ (?>\s*) \{ (?>\s* [0-9]+ \s*) \} |
6885 \$ \$ (?![\w\{]) |
6886 \$ (?>\s*) \$ (?>\s*) $qq_variable |
6887 $q_char
6888 ))/oxmsg;
6889  
6890 9703 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 228375 9703 238078
6891  
6892 # "\L\u" --> "\u\L"
6893 228375 ▶ if (($char[$i] eq '\L') and ($char[$i+1] eq '\u')) {
Branch: 5 branches
BranchTrueFalseTotal
if ($char[$i] eq '\\L' and $char[$i + 1] eq '\\u') { } 0 228375 228375
elsif ($char[$i] eq '\\U' and $char[$i + 1] eq '\\l') { } 0 228375 228375
elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/mosx) { } 1 228374 228375
elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/mosx) { } 1 228373 228374
elsif ($char[$i] =~ /\A \\ ( N\{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/mosx) { } 0 228373 228373
Condition66%2/3
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
!ll&&!rl&&r
22836960
MC/DC0%0/2
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
$char[$i] eq "\\L" $char[$i + 1] eq "\\u"
Truth table66%2/3
A and B
A= $char[$i] eq "\\L"B= $char[$i + 1] eq "\\u"
ABresult
0X0
100
111
6894 0 @char[$i,$i+1] = @char[$i+1,$i];
6895 }
6896  
6897 # "\U\l" --> "\l\U"
6898 ▶ elsif (($char[$i] eq '\U') and ($char[$i+1] eq '\l')) {
Condition33%1/3
$char[$i] eq "\\U" and $char[$i + 1] eq "\\l"
!ll&&!rl&&r
22837500
MC/DC0%0/2
$char[$i] eq "\\U" and $char[$i + 1] eq "\\l"
$char[$i] eq "\\U" $char[$i + 1] eq "\\l"
Truth table33%1/3
A and B
A= $char[$i] eq "\\U"B= $char[$i + 1] eq "\\l"
ABresult
0X0
100
111
6899 0 @char[$i,$i+1] = @char[$i+1,$i];
6900 }
6901  
6902 # octal escape sequence
6903 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
6904 1 $char[$i] = Eutf2::octchr($1);
6905 }
6906  
6907 # hexadecimal escape sequence
6908 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
6909 1 $char[$i] = Eutf2::hexchr($1);
6910 }
6911  
6912 # \N{CHARNAME} --> N{CHARNAME}
6913 elsif ($char[$i] =~ /\A \\ ( N\{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
6914 0 $char[$i] = $1;
6915 }
6916  
6917 228375 ▶ if (0) {
Branch: 23 branches
BranchTrueFalseTotal
if (do { $char[$i] =~ /\A ([<>]) \z/mosx }) { } 602 227773 228375
elsif ($char[$i] eq '\\u') { } 0 227773 227773
elsif ($char[$i] eq '\\l') { } 0 227773 227773
elsif ($char[$i] eq '\\U') { } 0 227773 227773
elsif ($char[$i] eq '\\L') { } 6 227767 227773
elsif ($char[$i] eq '\\F') { } 23 227744 227767
elsif ($char[$i] eq '\\Q') { } 0 227744 227744
elsif ($char[$i] eq '\\E') { } 26 227718 227744
elsif ($char[$i] eq '\\Q') { } 0 227718 227718
elsif ($char[$i] eq '\\E') { } 0 227718 227718
elsif ($char[$i] =~ /\A \$ 0 \z/mosx) { } 18 227700 227718
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/mosx) { } 0 227700 227700
elsif ($char[$i] =~ /\A \$\$ \z/mosx) { } 0 227700 227700
elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/mosx) { } 409 227291 227700
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/mosx) { } 0 227291 227291
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/mosx) { } 0 227291 227291
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/mosx) { } 0 227291 227291
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/mosx) { } 0 227291 227291
elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/cgmosx) { } 44 227247 227291
elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/cgmosx) { } 45 227202 227247
elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/cgmosx) { } 33 227169 227202
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ (?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* ) \} \z/mosx) { } 0 227169 227169
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/mosx) { } 0 227169 227169
6918 }
6919  
6920 # \F
6921 #
6922 # P.69 Table 2-6. Translation escapes
6923 # in Chapter 2: Bits and Pieces
6924 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
6925 # (and so on)
6926  
6927 # \u \l \U \L \F \Q \E
6928 elsif ($char[$i] =~ /\A ([<>]) \z/oxms) {
6929 602 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) 0 602 602
6930 0 $char[$i] = '\\' . $char[$i];
6931 }
6932 }
6933 elsif ($char[$i] eq '\u') {
6934  
6935 # "STRING @{[ LIST EXPR ]} MORE STRING"
6936  
6937 # P.257 Other Tricks You Can Do with Hard References
6938 # in Chapter 8: References
6939 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
6940  
6941 # P.353 Other Tricks You Can Do with Hard References
6942 # in Chapter 8: References
6943 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
6944  
6945 # (and so on)
6946  
6947 0 $char[$i] = '@{[Eutf2::ucfirst qq<';
6948 0 $left_e++;
6949 }
6950 elsif ($char[$i] eq '\l') {
6951 0 $char[$i] = '@{[Eutf2::lcfirst qq<';
6952 0 $left_e++;
6953 }
6954 elsif ($char[$i] eq '\U') {
6955 0 $char[$i] = '@{[Eutf2::uc qq<';
6956 0 $left_e++;
6957 }
6958 elsif ($char[$i] eq '\L') {
6959 6 $char[$i] = '@{[Eutf2::lc qq<';
6960 6 $left_e++;
6961 }
6962 elsif ($char[$i] eq '\F') {
6963 23 $char[$i] = '@{[Eutf2::fc qq<';
6964 23 $left_e++;
6965 }
6966 elsif ($char[$i] eq '\Q') {
6967 0 $char[$i] = '@{[CORE::quotemeta qq<';
6968 0 $left_e++;
6969 }
6970 elsif ($char[$i] eq '\E') {
6971 26 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) { } 26 0 26
6972 26 $char[$i] = '>]}';
6973 26 $right_e++;
6974 }
6975 else {
6976 0 $char[$i] = '';
6977 }
6978 }
6979 elsif ($char[$i] eq '\Q') {
6980 0 while (1) {
6981 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
6982 0 last;
6983 }
6984 0 ▶ if ($char[$i] eq '\E') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "\\E") 0 0 0
6985 0 last;
6986 }
6987 }
6988 }
6989 elsif ($char[$i] eq '\E') {
6990 }
6991  
6992 # $0 --> $0
6993 elsif ($char[$i] =~ /\A \$ 0 \z/oxms) {
6994 }
6995 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/oxms) {
6996 }
6997  
6998 # $$ --> $$
6999 elsif ($char[$i] =~ /\A \$\$ \z/oxms) {
7000 }
7001  
7002 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
7003 # $1, $2, $3 --> $1, $2, $3 otherwise
7004 elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/oxms) {
7005 409 $char[$i] = e_capture($1);
7006 }
7007 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
7008 0 $char[$i] = e_capture($1);
7009 }
7010  
7011 # $$foo[ ... ] --> $ $foo->[ ... ]
7012 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/oxms) {
7013 0 $char[$i] = e_capture($1.'->'.$2);
7014 }
7015  
7016 # $$foo{ ... } --> $ $foo->{ ... }
7017 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/oxms) {
7018 0 $char[$i] = e_capture($1.'->'.$2);
7019 }
7020  
7021 # $$foo
7022 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/oxms) {
7023 0 $char[$i] = e_capture($1);
7024 }
7025  
7026 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
7027 elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/oxmsgc) {
7028 44 $char[$i] = '@{[Eutf2::PREMATCH()]}';
7029 }
7030  
7031 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
7032 elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/oxmsgc) {
7033 45 $char[$i] = '@{[Eutf2::MATCH()]}';
7034 }
7035  
7036 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
7037 elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/oxmsgc) {
7038 33 $char[$i] = '@{[Eutf2::POSTMATCH()]}';
7039 }
7040  
7041 # ${ foo } --> ${ foo }
7042 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ (?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* ) \} \z/oxms) {
7043 }
7044  
7045 # ${ ... }
7046 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/oxms) {
7047 0 $char[$i] = e_capture($1);
7048 }
7049 }
7050  
7051 # return string
7052 9703 ▶ if ($left_e > $right_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($left_e > $right_e) 3 9700 9703
7053 3 return join '', $ope, $delimiter, @char, '>]}' x ($left_e - $right_e), $end_delimiter;
7054 }
7055 9700 return join '', $ope, $delimiter, @char, $end_delimiter;
7056 }
7057  
7058 #
7059 # escape qw string (qw//)
7060 #
7061 34 ▶sub e_qw {
Subroutine e_qw: called CC=11 SCAR=43.1
Pod undocumented
7062 34 my($ope,$delimiter,$end_delimiter,$string) = @_;
7063  
7064 34 $slash = 'div';
7065  
7066 # choice again delimiter
7067 34 my %octet = map {$_ => 1} ($string =~ /\G ([\x00-\xFF]) /oxmsg);
7068 34 ▶ if (not $octet{$end_delimiter}) {
Branch: 5 branches
BranchTrueFalseTotal
if (not $octet{$end_delimiter}) { } 34 0 34
elsif (not $octet{')'}) { } 0 0 0
elsif (not $octet{'}'}) { } 0 0 0
elsif (not $octet{']'}) { } 0 0 0
elsif (not $octet{'>'}) { } 0 0 0
7069 34 return join '', $ope, $delimiter, $string, $end_delimiter;
7070 }
7071 elsif (not $octet{')'}) {
7072 0 return join '', $ope, '(', $string, ')';
7073 }
7074 elsif (not $octet{'}'}) {
7075 0 return join '', $ope, '{', $string, '}';
7076 }
7077 elsif (not $octet{']'}) {
7078 0 return join '', $ope, '[', $string, ']';
7079 }
7080 elsif (not $octet{'>'}) {
7081 0 return join '', $ope, '<', $string, '>';
7082 }
7083 else {
7084 0 for my $char (qw( ! " $ % & * + - . / : = ? @ ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
7085 0 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 0 0 0
7086 0 return join '', $ope, $char, $string, $char;
7087 }
7088 }
7089 }
7090  
7091 # qw/AAA BBB C'CC/ --> ('AAA', 'BBB', 'C\'CC')
7092 0 my @string = CORE::split(/\s+/, $string);
7093 0 for my $string (@string) {
7094 0 my @octet = $string =~ /\G ([\x00-\xFF]) /oxmsg;
7095 0 for my $octet (@octet) {
7096 0 ▶ if ($octet =~ /\A (['\\]) \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($octet =~ /\A (['\\]) \z/mosx) 0 0 0
7097 0 $octet = '\\' . $1;
7098 }
7099 }
7100 0 $string = join '', @octet;
7101 }
7102 0 return join '', '(', (join ', ', map { "'$_'" } @string), ')';
7103 }
7104  
7105 #
7106 # escape here document (<<"HEREDOC", <<HEREDOC, <<`HEREDOC`, <<~"HEREDOC", <<~HEREDOC, <<~`HEREDOC`)
7107 #
7108 108 ▶sub e_heredoc {
Subroutine e_heredoc: called CC=37 SCAR=50.7
Pod undocumented
7109 108 my($string) = @_;
7110  
7111 108 $slash = 'm//';
7112  
7113 108 my $metachar = qr/[\@\\|]/oxms; # '|' is for <<`HEREDOC`
7114  
7115 108 my $left_e = 0;
7116 108 my $right_e = 0;
7117  
7118 # split regexp
7119 108 my @char = $string =~ /\G((?>
7120 [^\x80-\xFF\\\$]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
7121 \\x\{ (?>[0-9A-Fa-f]+) \} |
7122 \\o\{ (?>[0-7]+) \} |
7123 \\N\{ (?>[^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} |
7124 \\ $q_char |
7125 \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} |
7126 \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} |
7127 \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} |
7128 \$ (?>\s* [0-9]+) |
7129 \$ (?>\s*) \{ (?>\s* [0-9]+ \s*) \} |
7130 \$ \$ (?![\w\{]) |
7131 \$ (?>\s*) \$ (?>\s*) $qq_variable |
7132 $q_char
7133 ))/oxmsg;
7134  
7135 108 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 3305 108 3413
7136  
7137 # "\L\u" --> "\u\L"
7138 3305 ▶ if (($char[$i] eq '\L') and ($char[$i+1] eq '\u')) {
Branch: 5 branches
BranchTrueFalseTotal
if ($char[$i] eq '\\L' and $char[$i + 1] eq '\\u') { } 0 3305 3305
elsif ($char[$i] eq '\\U' and $char[$i + 1] eq '\\l') { } 0 3305 3305
elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/mosx) { } 1 3304 3305
elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/mosx) { } 1 3303 3304
elsif ($char[$i] =~ /\A \\ ( N\{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/mosx) { } 0 3303 3303
Condition66%2/3
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
!ll&&!rl&&r
329960
MC/DC0%0/2
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
$char[$i] eq "\\L" $char[$i + 1] eq "\\u"
Truth table66%2/3
A and B
A= $char[$i] eq "\\L"B= $char[$i + 1] eq "\\u"
ABresult
0X0
100
111
7139 0 @char[$i,$i+1] = @char[$i+1,$i];
7140 }
7141  
7142 # "\U\l" --> "\l\U"
7143 ▶ elsif (($char[$i] eq '\U') and ($char[$i+1] eq '\l')) {
Condition33%1/3
$char[$i] eq "\\U" and $char[$i + 1] eq "\\l"
!ll&&!rl&&r
330500
MC/DC0%0/2
$char[$i] eq "\\U" and $char[$i + 1] eq "\\l"
$char[$i] eq "\\U" $char[$i + 1] eq "\\l"
Truth table33%1/3
A and B
A= $char[$i] eq "\\U"B= $char[$i + 1] eq "\\l"
ABresult
0X0
100
111
7144 0 @char[$i,$i+1] = @char[$i+1,$i];
7145 }
7146  
7147 # octal escape sequence
7148 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
7149 1 $char[$i] = Eutf2::octchr($1);
7150 }
7151  
7152 # hexadecimal escape sequence
7153 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
7154 1 $char[$i] = Eutf2::hexchr($1);
7155 }
7156  
7157 # \N{CHARNAME} --> N{CHARNAME}
7158 elsif ($char[$i] =~ /\A \\ ( N\{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
7159 0 $char[$i] = $1;
7160 }
7161  
7162 3305 ▶ if (0) {
Branch: 23 branches
BranchTrueFalseTotal
if (do { $char[$i] =~ /\A ([<>]) \z/mosx }) { } 72 3233 3305
elsif ($char[$i] eq '\\u') { } 0 3233 3233
elsif ($char[$i] eq '\\l') { } 0 3233 3233
elsif ($char[$i] eq '\\U') { } 0 3233 3233
elsif ($char[$i] eq '\\L') { } 6 3227 3233
elsif ($char[$i] eq '\\F') { } 0 3227 3227
elsif ($char[$i] eq '\\Q') { } 0 3227 3227
elsif ($char[$i] eq '\\E') { } 3 3224 3227
elsif ($char[$i] eq '\\Q') { } 0 3224 3224
elsif ($char[$i] eq '\\E') { } 0 3224 3224
elsif ($char[$i] =~ /\A \$ 0 \z/mosx) { } 0 3224 3224
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/mosx) { } 0 3224 3224
elsif ($char[$i] =~ /\A \$\$ \z/mosx) { } 0 3224 3224
elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/mosx) { } 0 3224 3224
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/mosx) { } 0 3224 3224
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/mosx) { } 0 3224 3224
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/mosx) { } 0 3224 3224
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/mosx) { } 0 3224 3224
elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/cgmosx) { } 8 3216 3224
elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/cgmosx) { } 8 3208 3216
elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/cgmosx) { } 6 3202 3208
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ (?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* ) \} \z/mosx) { } 0 3202 3202
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/mosx) { } 0 3202 3202
7163 }
7164  
7165 # \u \l \U \L \F \Q \E
7166 elsif ($char[$i] =~ /\A ([<>]) \z/oxms) {
7167 72 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) 0 72 72
7168 0 $char[$i] = '\\' . $char[$i];
7169 }
7170 }
7171 elsif ($char[$i] eq '\u') {
7172 0 $char[$i] = '@{[Eutf2::ucfirst qq<';
7173 0 $left_e++;
7174 }
7175 elsif ($char[$i] eq '\l') {
7176 0 $char[$i] = '@{[Eutf2::lcfirst qq<';
7177 0 $left_e++;
7178 }
7179 elsif ($char[$i] eq '\U') {
7180 0 $char[$i] = '@{[Eutf2::uc qq<';
7181 0 $left_e++;
7182 }
7183 elsif ($char[$i] eq '\L') {
7184 6 $char[$i] = '@{[Eutf2::lc qq<';
7185 6 $left_e++;
7186 }
7187 elsif ($char[$i] eq '\F') {
7188 0 $char[$i] = '@{[Eutf2::fc qq<';
7189 0 $left_e++;
7190 }
7191 elsif ($char[$i] eq '\Q') {
7192 0 $char[$i] = '@{[CORE::quotemeta qq<';
7193 0 $left_e++;
7194 }
7195 elsif ($char[$i] eq '\E') {
7196 3 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) { } 3 0 3
7197 3 $char[$i] = '>]}';
7198 3 $right_e++;
7199 }
7200 else {
7201 0 $char[$i] = '';
7202 }
7203 }
7204 elsif ($char[$i] eq '\Q') {
7205 0 while (1) {
7206 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
7207 0 last;
7208 }
7209 0 ▶ if ($char[$i] eq '\E') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "\\E") 0 0 0
7210 0 last;
7211 }
7212 }
7213 }
7214 elsif ($char[$i] eq '\E') {
7215 }
7216  
7217 # $0 --> $0
7218 elsif ($char[$i] =~ /\A \$ 0 \z/oxms) {
7219 }
7220 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/oxms) {
7221 }
7222  
7223 # $$ --> $$
7224 elsif ($char[$i] =~ /\A \$\$ \z/oxms) {
7225 }
7226  
7227 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
7228 # $1, $2, $3 --> $1, $2, $3 otherwise
7229 elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/oxms) {
7230 0 $char[$i] = e_capture($1);
7231 }
7232 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
7233 0 $char[$i] = e_capture($1);
7234 }
7235  
7236 # $$foo[ ... ] --> $ $foo->[ ... ]
7237 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/oxms) {
7238 0 $char[$i] = e_capture($1.'->'.$2);
7239 }
7240  
7241 # $$foo{ ... } --> $ $foo->{ ... }
7242 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/oxms) {
7243 0 $char[$i] = e_capture($1.'->'.$2);
7244 }
7245  
7246 # $$foo
7247 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/oxms) {
7248 0 $char[$i] = e_capture($1);
7249 }
7250  
7251 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
7252 elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/oxmsgc) {
7253 8 $char[$i] = '@{[Eutf2::PREMATCH()]}';
7254 }
7255  
7256 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
7257 elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/oxmsgc) {
7258 8 $char[$i] = '@{[Eutf2::MATCH()]}';
7259 }
7260  
7261 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
7262 elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/oxmsgc) {
7263 6 $char[$i] = '@{[Eutf2::POSTMATCH()]}';
7264 }
7265  
7266 # ${ foo } --> ${ foo }
7267 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ (?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* ) \} \z/oxms) {
7268 }
7269  
7270 # ${ ... }
7271 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/oxms) {
7272 0 $char[$i] = e_capture($1);
7273 }
7274 }
7275  
7276 # return string
7277 108 ▶ if ($left_e > $right_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($left_e > $right_e) 3 105 108
7278 3 return join '', @char, '>]}' x ($left_e - $right_e);
7279 }
7280 105 return join '', @char;
7281 }
7282  
7283 #
7284 # escape regexp (m//, qr//)
7285 #
7286 1607 ▶sub e_qr {
Subroutine e_qr: called CC=110 SCAR=72.3
Pod undocumented
7287 1607 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7288 1607 ▶ $modifier ||= '';
Condition100%2/2
$modifier ||= ""
l!l
5031104
MC/DC100%1/1
$modifier ||= ""
$modifier
Truth table100%2/2
A
A= $modifier
Aresult
11
00
7289  
7290 1607 $modifier =~ tr/p//d;
7291 1607 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 1607 1607
7292 0 my $line = 0;
7293 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
7294 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
7295 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
7296 0 last;
7297 }
7298 }
7299 0 die qq{Unsupported modifier "$1" used at line $line.\n};
7300 }
7301  
7302 1607 $slash = 'div';
7303  
7304 # literal null string pattern
7305 1607 ▶ if ($string eq '') {
Branch: 2 branches
BranchTrueFalseTotal
if ($string eq '') { } 8 1599 1607
elsif ($modifier =~ tr/Bb//d) { } 25 1574 1599
7306 8 $modifier =~ tr/bB//d;
7307 8 $modifier =~ tr/i//d;
7308 8 return join '', $ope, $delimiter, $end_delimiter, $modifier;
7309 }
7310  
7311 # /b /B modifier
7312 elsif ($modifier =~ tr/bB//d) {
7313  
7314 # choice again delimiter
7315 25 ▶ if ($delimiter =~ / [\@:] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($delimiter =~ / [\@:] /mosx) 0 25 25
7316 0 my @char = $string =~ /\G ([\x00-\xFF]) /oxmsg;
7317 0 my %octet = map {$_ => 1} @char;
7318 0 ▶ if (not $octet{')'}) {
Branch: 4 branches
BranchTrueFalseTotal
if (not $octet{')'}) { } 0 0 0
elsif (not $octet{'}'}) { } 0 0 0
elsif (not $octet{']'}) { } 0 0 0
elsif (not $octet{'>'}) { } 0 0 0
7319 0 $delimiter = '(';
7320 0 $end_delimiter = ')';
7321 }
7322 elsif (not $octet{'}'}) {
7323 0 $delimiter = '{';
7324 0 $end_delimiter = '}';
7325 }
7326 elsif (not $octet{']'}) {
7327 0 $delimiter = '[';
7328 0 $end_delimiter = ']';
7329 }
7330 elsif (not $octet{'>'}) {
7331 0 $delimiter = '<';
7332 0 $end_delimiter = '>';
7333 }
7334 else {
7335 0 for my $char (qw( ! " $ % & * + - . / = ? ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
7336 0 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 0 0 0
7337 0 $delimiter = $char;
7338 0 $end_delimiter = $char;
7339 0 last;
7340 }
7341 }
7342 }
7343 }
7344  
7345 25 ▶ if (($ope =~ /\A m? \z/oxms) and ($delimiter eq '?')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ope =~ /\A m? \z/mosx and $delimiter eq '?') { } 4 21 25
Condition100%3/3
$ope =~ /\A m? \z/mosx and $delimiter eq "?"
!ll&&!rl&&r
1204
MC/DC100%2/2
$ope =~ /\A m? \z/mosx and $delimiter eq "?"
$ope =~ /\A m? \z/mosx $delimiter eq "?"
Truth table100%3/3
A and B
A= $ope =~ /\A m? \z/mosxB= $delimiter eq "?"
ABresult
0X0
100
111
7346 4 return join '', $ope, $delimiter, $string, $matched, $end_delimiter, $modifier;
7347 }
7348 else {
7349 21 return join '', $ope, $delimiter, '(?:', $string, ')', $matched, $end_delimiter, $modifier;
7350 }
7351 }
7352  
7353 1574 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 373 1201 1574
7354 1574 my $metachar = qr/[\@\\|[\]{^]/oxms;
7355  
7356 # split regexp
7357 1574 my @char = $string =~ /\G((?>
7358 [^\x80-\xFF\\\$\@\[\(]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
7359 \\x (?>[0-9A-Fa-f]{1,2}) |
7360 \\ (?>[0-7]{2,3}) |
7361 \\c [\x40-\x5F] |
7362 \\x\{ (?>[0-9A-Fa-f]+) \} |
7363 \\o\{ (?>[0-7]+) \} |
7364 \\[bBNpP]\{ (?>[^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} |
7365 \\ $q_char |
7366 \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} |
7367 \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} |
7368 \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} |
7369 [\$\@] $qq_variable |
7370 \$ (?>\s* [0-9]+) |
7371 \$ (?>\s*) \{ (?>\s* [0-9]+ \s*) \} |
7372 \$ \$ (?![\w\{]) |
7373 \$ (?>\s*) \$ (?>\s*) $qq_variable |
7374 \[\^ |
7375 \[\: (?>[a-z]+) :\] |
7376 \[\:\^ (?>[a-z]+) :\] |
7377 \(\? |
7378 $q_char
7379 ))/oxmsg;
7380  
7381 # choice again delimiter
7382 1574 ▶ if ($delimiter =~ / [\@:] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($delimiter =~ / [\@:] /mosx) 0 1574 1574
7383 0 my %octet = map {$_ => 1} @char;
7384 0 ▶ if (not $octet{')'}) {
Branch: 4 branches
BranchTrueFalseTotal
if (not $octet{')'}) { } 0 0 0
elsif (not $octet{'}'}) { } 0 0 0
elsif (not $octet{']'}) { } 0 0 0
elsif (not $octet{'>'}) { } 0 0 0
7385 0 $delimiter = '(';
7386 0 $end_delimiter = ')';
7387 }
7388 elsif (not $octet{'}'}) {
7389 0 $delimiter = '{';
7390 0 $end_delimiter = '}';
7391 }
7392 elsif (not $octet{']'}) {
7393 0 $delimiter = '[';
7394 0 $end_delimiter = ']';
7395 }
7396 elsif (not $octet{'>'}) {
7397 0 $delimiter = '<';
7398 0 $end_delimiter = '>';
7399 }
7400 else {
7401 0 for my $char (qw( ! " $ % & * + - . / = ? ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
7402 0 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 0 0 0
7403 0 $delimiter = $char;
7404 0 $end_delimiter = $char;
7405 0 last;
7406 }
7407 }
7408 }
7409 }
7410  
7411 1574 my $left_e = 0;
7412 1574 my $right_e = 0;
7413 1574 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 3466 1573 5039
7414  
7415 # "\L\u" --> "\u\L"
7416 3466 ▶ if (($char[$i] eq '\L') and ($char[$i+1] eq '\u')) {
Branch: 6 branches
BranchTrueFalseTotal
if ($char[$i] eq '\\L' and $char[$i + 1] eq '\\u') { } 0 3466 3466
elsif ($char[$i] eq '\\U' and $char[$i + 1] eq '\\l') { } 0 3466 3466
elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/mosx) { } 1 3465 3466
elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/mosx) { } 1 3464 3465
elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/mosx) { } 6 3458 3464
elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/mosx) { } 4 3454 3458
Condition66%2/3
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
!ll&&!rl&&r
346510
MC/DC0%0/2
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
$char[$i] eq "\\L" $char[$i + 1] eq "\\u"
Truth table66%2/3
A and B
A= $char[$i] eq "\\L"B= $char[$i + 1] eq "\\u"
ABresult
0X0
100
111
7417 0 @char[$i,$i+1] = @char[$i+1,$i];
7418 }
7419  
7420 # "\U\l" --> "\l\U"
7421 ▶ elsif (($char[$i] eq '\U') and ($char[$i+1] eq '\l')) {
Condition66%2/3
$char[$i] eq "\\U" and $char[$i + 1] eq "\\l"
!ll&&!rl&&r
346510
MC/DC0%0/2
$char[$i] eq "\\U" and $char[$i + 1] eq "\\l"
$char[$i] eq "\\U" $char[$i + 1] eq "\\l"
Truth table66%2/3
A and B
A= $char[$i] eq "\\U"B= $char[$i + 1] eq "\\l"
ABresult
0X0
100
111
7422 0 @char[$i,$i+1] = @char[$i+1,$i];
7423 }
7424  
7425 # octal escape sequence
7426 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
7427 1 $char[$i] = Eutf2::octchr($1);
7428 }
7429  
7430 # hexadecimal escape sequence
7431 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
7432 1 $char[$i] = Eutf2::hexchr($1);
7433 }
7434  
7435 # \b{...} --> b\{...}
7436 # \B{...} --> B\{...}
7437 # \N{CHARNAME} --> N\{CHARNAME}
7438 # \p{PROPERTY} --> p\{PROPERTY}
7439 # \P{PROPERTY} --> P\{PROPERTY}
7440 elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
7441 6 $char[$i] = $1 . '\\' . $2;
7442 }
7443  
7444 # \p, \P, \X --> p, P, X
7445 elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/oxms) {
7446 4 $char[$i] = $1;
7447 }
7448  
7449 3466 ▶ if (0) {
Branch: 30 branches
BranchTrueFalseTotal
if (do { $char[$i] =~ /\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx }) { } 6 3460 3466
elsif ($char[$i] eq '[') { } 828 2632 3460
elsif ($char[$i] eq '[^') { } 328 2304 2632
elsif (my $char = character_class($char[$i], $modifier)) { } 215 2089 2304
elsif ($ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])) { } 44 2045 2089
elsif ($char[$i] =~ /\A [<>] \z/mosx) { } 1 2044 2045
elsif ($char[$i] eq '\\u') { } 0 2044 2044
elsif ($char[$i] eq '\\l') { } 0 2044 2044
elsif ($char[$i] eq '\\U') { } 1 2043 2044
elsif ($char[$i] eq '\\L') { } 1 2042 2043
elsif ($char[$i] eq '\\F') { } 16 2026 2042
elsif ($char[$i] eq '\\Q') { } 20 2006 2026
elsif ($char[$i] eq '\\E') { } 38 1968 2006
elsif ($char[$i] eq '\\Q') { } 0 1968 1968
elsif ($char[$i] eq '\\E') { } 0 1968 1968
elsif ($char[$i] =~ /\A \$ 0 \z/mosx) { } 0 1968 1968
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/mosx) { } 0 1968 1968
elsif ($char[$i] =~ /\A \$\$ \z/mosx) { } 0 1968 1968
elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/mosx) { } 0 1968 1968
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/mosx) { } 0 1968 1968
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/mosx) { } 0 1968 1968
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/mosx) { } 0 1968 1968
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/mosx) { } 0 1968 1968
elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/cgmosx) { } 8 1960 1968
elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/cgmosx) { } 8 1952 1960
elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/cgmosx) { } 6 1946 1952
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} \z/mosx) { } 0 1946 1946
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/mosx) { } 0 1946 1946
elsif ($char[$i] =~ /\A [\$\@].+ /mosx) { } 42 1904 1946
elsif ($i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx) { } 188 2188 2376
7450 }
7451  
7452 # join separated multiple-octet
7453 elsif ($char[$i] =~ /\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms) {
7454 6 ▶ if ( ($i+3 <= $#char) and (grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms, @char[$i+1..$i+3]) == 3) and (CORE::eval(sprintf '"%s%s%s%s"', @char[$i..$i+3]) =~ /\A $q_char \z/oxms)) {
Branch: 3 branches
BranchTrueFalseTotal
if ($i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 and eval(sprintf '"%s%s%s%s"', @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx) { } 0 6 6
elsif ($i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 and eval(sprintf '"%s%s%s"', @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx) { } 0 6 6
elsif ($i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 and eval(sprintf '"%s%s"', @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx) { } 0 12 12
Condition33%2/6
$i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 and eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
!ll&&!rl&&r
600
$i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3
!ll&&!rl&&r
600
MC/DC0%0/3
$i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 and eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
$i + 3 <= $#char grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
Truth table25%1/4
A and B and C
A= $i + 3 <= $#charB= grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3C= eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
ABCresult
0XX0
10X0
1100
1111
7455 0 $char[$i] .= join '', splice @char, $i+1, 3;
7456 }
7457 ▶ elsif (($i+2 <= $#char) and (grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms, @char[$i+1..$i+2]) == 2) and (CORE::eval(sprintf '"%s%s%s"', @char[$i..$i+2]) =~ /\A $q_char \z/oxms)) {
Condition33%2/6
$i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 and eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
!ll&&!rl&&r
600
$i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2
!ll&&!rl&&r
600
MC/DC0%0/3
$i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 and eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
$i + 2 <= $#char grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
Truth table25%1/4
A and B and C
A= $i + 2 <= $#charB= grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2C= eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
ABCresult
0XX0
10X0
1100
1111
7458 0 $char[$i] .= join '', splice @char, $i+1, 2;
7459 }
7460 ▶ elsif (($i+1 <= $#char) and (grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms, $char[$i+1 ]) == 1) and (CORE::eval(sprintf '"%s%s"', @char[$i..$i+1]) =~ /\A $q_char \z/oxms)) {
Condition50%3/6
$i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 and eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
!ll&&!rl&&r
600
$i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1
!ll&&!rl&&r
420
MC/DC0%0/3
$i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 and eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
$i + 1 <= $#char grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
Truth table50%2/4
A and B and C
A= $i + 1 <= $#charB= grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1C= eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
ABCresult
0XX0
10X0
1100
1111
7461 0 $char[$i] .= join '', splice @char, $i+1, 1;
7462 }
7463 }
7464  
7465 # open character class [...]
7466 elsif ($char[$i] eq '[') {
7467 828 my $left = $i;
7468  
7469 # [] make die "Unmatched [] in regexp ...\n"
7470 # (and so on)
7471  
7472 828 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 3 825 828
7473 3 $i++;
7474 }
7475  
7476 828 while (1) {
7477 3071 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 3071 3071
7478 0 die __FILE__, ": Unmatched [] in regexp\n";
7479 }
7480 3071 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 828 2243 3071
7481 828 my $right = $i;
7482  
7483 # [...]
7484 828 ▶ if (grep(/\A [\$\@]/oxms,@char[$left+1..$right-1]) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep(/\A [\$\@]/mosx, @char[$left + 1 .. $right - 1]) >= 1) { } 90 738 828
7485 90 splice @char, $left, $right-$left+1, sprintf(q{@{[Eutf2::charlist_qr(%s,'%s')]}}, join(',', map {qq_stuff($delimiter,$end_delimiter,$_)} @char[$left+1..$right-1]), $modifier);
7486 }
7487 else {
7488 738 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
7489 }
7490  
7491 827 $i = $left;
7492 827 last;
7493 }
7494 }
7495 }
7496  
7497 # open character class [^...]
7498 elsif ($char[$i] eq '[^') {
7499 328 my $left = $i;
7500  
7501 # [^] make die "Unmatched [] in regexp ...\n"
7502 # (and so on)
7503  
7504 328 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 5 323 328
7505 5 $i++;
7506 }
7507  
7508 328 while (1) {
7509 1447 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 1447 1447
7510 0 die __FILE__, ": Unmatched [] in regexp\n";
7511 }
7512 1447 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 328 1119 1447
7513 328 my $right = $i;
7514  
7515 # [^...]
7516 328 ▶ if (grep(/\A [\$\@]/oxms,@char[$left+1..$right-1]) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep(/\A [\$\@]/mosx, @char[$left + 1 .. $right - 1]) >= 1) { } 90 238 328
7517 90 splice @char, $left, $right-$left+1, sprintf(q{@{[Eutf2::charlist_not_qr(%s,'%s')]}}, join(',', map {qq_stuff($delimiter,$end_delimiter,$_)} @char[$left+1..$right-1]), $modifier);
7518 }
7519 else {
7520 238 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
7521 }
7522  
7523 328 $i = $left;
7524 328 last;
7525 }
7526 }
7527 }
7528  
7529 # rewrite character class or escape character
7530 elsif (my $char = character_class($char[$i],$modifier)) {
7531 215 $char[$i] = $char;
7532 }
7533  
7534 # /i modifier
7535 ▶ elsif ($ignorecase and ($char[$i] =~ /\A [\x00-\xFF] \z/oxms) and (Eutf2::uc($char[$i]) ne Eutf2::fc($char[$i]))) {
Condition100%6/6
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
!ll&&!rl&&r
20351044
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx
!ll&&!rl&&r
20072854
MC/DC100%3/3
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
$ignorecase $char[$i] =~ /\A [\x00-\xFF] \z/mosx &Eutf2::uc($char[$i]) ne &fc($char[$i])
Truth table100%4/4
A and B and C
A= $ignorecaseB= $char[$i] =~ /\A [\x00-\xFF] \z/mosxC= &Eutf2::uc($char[$i]) ne &fc($char[$i])
ABCresult
0XX0
10X0
1100
1111
7536 44 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 44 0 44
7537 44 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
7538 }
7539 else {
7540 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
7541 }
7542 }
7543  
7544 # \u \l \U \L \F \Q \E
7545 elsif ($char[$i] =~ /\A [<>] \z/oxms) {
7546 1 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) 0 1 1
7547 0 $char[$i] = '\\' . $char[$i];
7548 }
7549 }
7550 elsif ($char[$i] eq '\u') {
7551 0 $char[$i] = '@{[Eutf2::ucfirst qq<';
7552 0 $left_e++;
7553 }
7554 elsif ($char[$i] eq '\l') {
7555 0 $char[$i] = '@{[Eutf2::lcfirst qq<';
7556 0 $left_e++;
7557 }
7558 elsif ($char[$i] eq '\U') {
7559 1 $char[$i] = '@{[Eutf2::uc qq<';
7560 1 $left_e++;
7561 }
7562 elsif ($char[$i] eq '\L') {
7563 1 $char[$i] = '@{[Eutf2::lc qq<';
7564 1 $left_e++;
7565 }
7566 elsif ($char[$i] eq '\F') {
7567 16 $char[$i] = '@{[Eutf2::fc qq<';
7568 16 $left_e++;
7569 }
7570 elsif ($char[$i] eq '\Q') {
7571 20 $char[$i] = '@{[CORE::quotemeta qq<';
7572 20 $left_e++;
7573 }
7574 elsif ($char[$i] eq '\E') {
7575 38 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) { } 38 0 38
7576 38 $char[$i] = '>]}';
7577 38 $right_e++;
7578 }
7579 else {
7580 0 $char[$i] = '';
7581 }
7582 }
7583 elsif ($char[$i] eq '\Q') {
7584 0 while (1) {
7585 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
7586 0 last;
7587 }
7588 0 ▶ if ($char[$i] eq '\E') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "\\E") 0 0 0
7589 0 last;
7590 }
7591 }
7592 }
7593 elsif ($char[$i] eq '\E') {
7594 }
7595  
7596 # $0 --> $0
7597 elsif ($char[$i] =~ /\A \$ 0 \z/oxms) {
7598 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7599 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7600 }
7601 }
7602 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/oxms) {
7603 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7604 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7605 }
7606 }
7607  
7608 # $$ --> $$
7609 elsif ($char[$i] =~ /\A \$\$ \z/oxms) {
7610 }
7611  
7612 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
7613 # $1, $2, $3 --> $1, $2, $3 otherwise
7614 elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/oxms) {
7615 0 $char[$i] = e_capture($1);
7616 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7617 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7618 }
7619 }
7620 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
7621 0 $char[$i] = e_capture($1);
7622 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7623 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7624 }
7625 }
7626  
7627 # $$foo[ ... ] --> $ $foo->[ ... ]
7628 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/oxms) {
7629 0 $char[$i] = e_capture($1.'->'.$2);
7630 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7631 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7632 }
7633 }
7634  
7635 # $$foo{ ... } --> $ $foo->{ ... }
7636 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/oxms) {
7637 0 $char[$i] = e_capture($1.'->'.$2);
7638 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7639 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7640 }
7641 }
7642  
7643 # $$foo
7644 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/oxms) {
7645 0 $char[$i] = e_capture($1);
7646 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7647 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7648 }
7649 }
7650  
7651 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
7652 elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/oxmsgc) {
7653 8 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 8 8
7654 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::PREMATCH())]}';
7655 }
7656 else {
7657 8 $char[$i] = '@{[Eutf2::PREMATCH()]}';
7658 }
7659 }
7660  
7661 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
7662 elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/oxmsgc) {
7663 8 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 8 8
7664 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::MATCH())]}';
7665 }
7666 else {
7667 8 $char[$i] = '@{[Eutf2::MATCH()]}';
7668 }
7669 }
7670  
7671 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
7672 elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/oxmsgc) {
7673 6 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 6 6
7674 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::POSTMATCH())]}';
7675 }
7676 else {
7677 6 $char[$i] = '@{[Eutf2::POSTMATCH()]}';
7678 }
7679 }
7680  
7681 # ${ foo }
7682 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} \z/oxms) {
7683 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7684 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7685 }
7686 }
7687  
7688 # ${ ... }
7689 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/oxms) {
7690 0 $char[$i] = e_capture($1);
7691 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7692 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7693 }
7694 }
7695  
7696 # $scalar or @array
7697 elsif ($char[$i] =~ /\A [\$\@].+ /oxms) {
7698 42 $char[$i] = e_string($char[$i]);
7699 42 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 9 33 42
7700 9 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7701 }
7702 }
7703  
7704 # quote character before ? + * {
7705 ▶ elsif (($i >= 1) and ($char[$i] =~ /\A [\?\+\*\{] \z/oxms)) {
Condition100%3/3
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
!ll&&!rl&&r
4721244188
MC/DC100%2/2
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
$i >= 1 $char[$i] =~ /\A [\?\+\*\{] \z/mosx
Truth table100%3/3
A and B
A= $i >= 1B= $char[$i] =~ /\A [\?\+\*\{] \z/mosx
ABresult
0X0
100
111
7706 188 ▶ if ($char[$i-1] =~ /\A (?:[\x00-\xFF]|\\[0-7]{2,3}|\\x[0-9-A-Fa-f]{1,2}) \z/oxms) {
Branch: 2 branches
BranchTrueFalseTotal
if ($char[$i - 1] =~ /\A (?:[\x00-\xFF]|\\[0-7]{2,3}|\\x[0-9-A-Fa-f]{1,2}) \z/mosx) { } 1 187 188
elsif ($ope =~ /\A m? \z/mosx and $delimiter eq '?') { } 0 187 187
7707 }
7708 ▶ elsif (($ope =~ /\A m? \z/oxms) and ($delimiter eq '?')) {
Condition66%2/3
$ope =~ /\A m? \z/mosx and $delimiter eq "?"
!ll&&!rl&&r
101770
MC/DC0%0/2
$ope =~ /\A m? \z/mosx and $delimiter eq "?"
$ope =~ /\A m? \z/mosx $delimiter eq "?"
Truth table66%2/3
A and B
A= $ope =~ /\A m? \z/mosxB= $delimiter eq "?"
ABresult
0X0
100
111
7709 0 my $char = $char[$i-1];
7710 0 ▶ if ($char[$i] eq '{') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq '{') { } 0 0 0
7711 0 die __FILE__, qq{: "MULTIBYTE{n}" should be "(MULTIBYTE){n}" in m?? (and shift \$1,\$2,\$3,...) ($char){n}\n};
7712 }
7713 else {
7714 0 die __FILE__, qq{: "MULTIBYTE$char[$i]" should be "(MULTIBYTE)$char[$i]" in m?? (and shift \$1,\$2,\$3,...) ($char)$char[$i]\n};
7715 }
7716 }
7717 else {
7718 187 $char[$i-1] = '(?:' . $char[$i-1] . ')';
7719 }
7720 }
7721 }
7722  
7723 # make regexp string
7724 1573 $modifier =~ tr/i//d;
7725 1573 ▶ if ($left_e > $right_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($left_e > $right_e) 0 1573 1573
7726 0 ▶ if (($ope =~ /\A m? \z/oxms) and ($delimiter eq '?')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ope =~ /\A m? \z/mosx and $delimiter eq '?') { } 0 0 0
Condition0%0/3
$ope =~ /\A m? \z/mosx and $delimiter eq "?"
!ll&&!rl&&r
000
MC/DC0%0/2
$ope =~ /\A m? \z/mosx and $delimiter eq "?"
$ope =~ /\A m? \z/mosx $delimiter eq "?"
Truth table0%0/3
A and B
A= $ope =~ /\A m? \z/mosxB= $delimiter eq "?"
ABresult
0X0
100
111
7727 0 return join '', $ope, $delimiter, $anchor, @char, '>]}' x ($left_e - $right_e), $matched, $end_delimiter, $modifier;
7728 }
7729 else {
7730 0 return join '', $ope, $delimiter, $anchor, '(?:', @char, '>]}' x ($left_e - $right_e), ')', $matched, $end_delimiter, $modifier;
7731 }
7732 }
7733 1573 ▶ if (($ope =~ /\A m? \z/oxms) and ($delimiter eq '?')) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ope =~ /\A m? \z/mosx and $delimiter eq '?') { } 32 1541 1573
Condition100%3/3
$ope =~ /\A m? \z/mosx and $delimiter eq "?"
!ll&&!rl&&r
33150832
MC/DC100%2/2
$ope =~ /\A m? \z/mosx and $delimiter eq "?"
$ope =~ /\A m? \z/mosx $delimiter eq "?"
Truth table100%3/3
A and B
A= $ope =~ /\A m? \z/mosxB= $delimiter eq "?"
ABresult
0X0
100
111
7734 32 return join '', $ope, $delimiter, $anchor, @char, $matched, $end_delimiter, $modifier;
7735 }
7736 else {
7737 1541 return join '', $ope, $delimiter, $anchor, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
7738 }
7739 }
7740  
7741 #
7742 # double quote stuff
7743 #
7744 540 ▶sub qq_stuff {
Subroutine qq_stuff: called CC=6 SCAR=18.5
Pod undocumented
7745 540 my($delimiter,$end_delimiter,$stuff) = @_;
7746  
7747 # scalar variable or array variable
7748 540 ▶ if ($stuff =~ /\A [\$\@] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($stuff =~ /\A [\$\@] /mosx) 300 240 540
7749 300 return $stuff;
7750 }
7751  
7752 # quote by delimiter
7753 240 my %octet = map {$_ => 1} ($stuff =~ /\G ([\x00-\xFF]) /oxmsg);
7754 240 for my $char (qw( ! " $ % & * + - . / : = ? @ ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
7755 240 ▶ next if $char eq $delimiter;
Branch: 1 branch
BranchTrueFalseTotal
if $char eq $delimiter 0 240 240
7756 240 ▶ next if $char eq $end_delimiter;
Branch: 1 branch
BranchTrueFalseTotal
if $char eq $end_delimiter 0 240 240
7757 240 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 240 0 240
7758 240 return join '', 'qq', $char, $stuff, $char;
7759 }
7760 }
7761 0 return join '', 'qq', '<', $stuff, '>';
7762 }
7763  
7764 #
7765 # escape regexp (m'', qr'', and m''b, qr''b)
7766 #
7767 15 ▶sub e_qr_q {
Subroutine e_qr_q: called CC=7 SCAR=22.7
Pod undocumented
7768 15 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7769 15 ▶ $modifier ||= '';
Condition100%2/2
$modifier ||= ""
l!l
312
MC/DC100%1/1
$modifier ||= ""
$modifier
Truth table100%2/2
A
A= $modifier
Aresult
11
00
7770  
7771 15 $modifier =~ tr/p//d;
7772 15 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 15 15
7773 0 my $line = 0;
7774 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
7775 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
7776 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
7777 0 last;
7778 }
7779 }
7780 0 die qq{Unsupported modifier "$1" used at line $line.\n};
7781 }
7782  
7783 15 $slash = 'div';
7784  
7785 # literal null string pattern
7786 15 ▶ if ($string eq '') {
Branch: 2 branches
BranchTrueFalseTotal
if ($string eq '') { } 8 7 15
elsif ($modifier =~ tr/Bb//d) { } 3 4 7
7787 8 $modifier =~ tr/bB//d;
7788 8 $modifier =~ tr/i//d;
7789 8 return join '', $ope, $delimiter, $end_delimiter, $modifier;
7790 }
7791  
7792 # with /b /B modifier
7793 elsif ($modifier =~ tr/bB//d) {
7794 3 return e_qr_qb($ope,$delimiter,$end_delimiter,$string,$modifier);
7795 }
7796  
7797 # without /b /B modifier
7798 else {
7799 4 return e_qr_qt($ope,$delimiter,$end_delimiter,$string,$modifier);
7800 }
7801 }
7802  
7803 #
7804 # escape regexp (m'', qr'')
7805 #
7806 4 ▶sub e_qr_qt {
Subroutine e_qr_qt: called CC=20 SCAR=51.4
Pod undocumented
7807 4 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7808  
7809 4 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 0 4 4
7810  
7811 # split regexp
7812 4 my @char = $string =~ /\G((?>
7813 [^\x80-\xFF\\\[\$\@\/] |
7814 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
7815 \[\^ |
7816 \[\: (?>[a-z]+) \:\] |
7817 \[\:\^ (?>[a-z]+) \:\] |
7818 [\$\@\/] |
7819 \\ (?:$q_char) |
7820 (?:$q_char)
7821 ))/oxmsg;
7822  
7823 # unescape character
7824 4 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 5 4 9
7825 5 ▶ if (0) {
Branch: 6 branches
BranchTrueFalseTotal
if (do { $char[$i] eq '[' }) { } 0 5 5
elsif ($char[$i] eq '[^') { } 0 5 5
elsif ($char[$i] =~ m(\A [\$\@/\\] \z)mosx) { } 0 5 5
elsif (my $char = character_class($char[$i], $modifier)) { } 0 5 5
elsif ($ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])) { } 0 5 5
elsif ($i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx) { } 0 9 9
7826 }
7827  
7828 # open character class [...]
7829 elsif ($char[$i] eq '[') {
7830 0 my $left = $i;
7831 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
7832 0 $i++;
7833 }
7834 0 while (1) {
7835 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
7836 0 die __FILE__, ": Unmatched [] in regexp\n";
7837 }
7838 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
7839 0 my $right = $i;
7840  
7841 # [...]
7842 0 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
7843  
7844 0 $i = $left;
7845 0 last;
7846 }
7847 }
7848 }
7849  
7850 # open character class [^...]
7851 elsif ($char[$i] eq '[^') {
7852 0 my $left = $i;
7853 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
7854 0 $i++;
7855 }
7856 0 while (1) {
7857 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
7858 0 die __FILE__, ": Unmatched [] in regexp\n";
7859 }
7860 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
7861 0 my $right = $i;
7862  
7863 # [^...]
7864 0 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
7865  
7866 0 $i = $left;
7867 0 last;
7868 }
7869 }
7870 }
7871  
7872 # escape $ @ / and \
7873 elsif ($char[$i] =~ /\A [\$\@\/\\] \z/oxms) {
7874 0 $char[$i] = '\\' . $char[$i];
7875 }
7876  
7877 # rewrite character class or escape character
7878 elsif (my $char = character_class($char[$i],$modifier)) {
7879 0 $char[$i] = $char;
7880 }
7881  
7882 # /i modifier
7883 ▶ elsif ($ignorecase and ($char[$i] =~ /\A [\x00-\xFF] \z/oxms) and (Eutf2::uc($char[$i]) ne Eutf2::fc($char[$i]))) {
Condition33%2/6
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
!ll&&!rl&&r
500
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx
!ll&&!rl&&r
500
MC/DC0%0/3
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
$ignorecase $char[$i] =~ /\A [\x00-\xFF] \z/mosx &Eutf2::uc($char[$i]) ne &fc($char[$i])
Truth table25%1/4
A and B and C
A= $ignorecaseB= $char[$i] =~ /\A [\x00-\xFF] \z/mosxC= &Eutf2::uc($char[$i]) ne &fc($char[$i])
ABCresult
0XX0
10X0
1100
1111
7884 0 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 0 0 0
7885 0 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
7886 }
7887 else {
7888 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
7889 }
7890 }
7891  
7892 # quote character before ? + * {
7893 ▶ elsif (($i >= 1) and ($char[$i] =~ /\A [\?\+\*\{] \z/oxms)) {
Condition66%2/3
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
!ll&&!rl&&r
410
MC/DC0%0/2
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
$i >= 1 $char[$i] =~ /\A [\?\+\*\{] \z/mosx
Truth table66%2/3
A and B
A= $i >= 1B= $char[$i] =~ /\A [\?\+\*\{] \z/mosx
ABresult
0X0
100
111
7894 0 ▶ if ($char[$i-1] =~ /\A [\x00-\xFF] \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i - 1] =~ /\A [\x00-\xFF] \z/mosx) { } 0 0 0
7895 }
7896 else {
7897 0 $char[$i-1] = '(?:' . $char[$i-1] . ')';
7898 }
7899 }
7900 }
7901  
7902 4 $delimiter = '/';
7903 4 $end_delimiter = '/';
7904  
7905 4 $modifier =~ tr/i//d;
7906 4 return join '', $ope, $delimiter, $anchor, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
7907 }
7908  
7909 #
7910 # escape regexp (m''b, qr''b)
7911 #
7912 3 ▶sub e_qr_qb {
Subroutine e_qr_qb: called CC=4 SCAR=14.2
Pod undocumented
7913 3 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7914  
7915 # split regexp
7916 3 my @char = $string =~ /\G ((?>[^\\]|\\\\|[\x00-\xFF])) /oxmsg;
7917  
7918 # unescape character
7919 3 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 9 3 12
7920 9 ▶ if (0) {
Branch: 2 branches
BranchTrueFalseTotal
if (do { $char[$i] eq '\\\\' }) { } 0 9 9
elsif ($char[$i] =~ m(\A [\$\@/\\] \z)mosx) { } 0 9 9
7921 }
7922  
7923 # remain \\
7924 elsif ($char[$i] eq '\\\\') {
7925 }
7926  
7927 # escape $ @ / and \
7928 elsif ($char[$i] =~ /\A [\$\@\/\\] \z/oxms) {
7929 0 $char[$i] = '\\' . $char[$i];
7930 }
7931 }
7932  
7933 3 $delimiter = '/';
7934 3 $end_delimiter = '/';
7935 3 return join '', $ope, $delimiter, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
7936 }
7937  
7938 #
7939 # escape regexp (s/here//)
7940 #
7941 114 ▶sub e_s1 {
Subroutine e_s1: called CC=106 SCAR=79.2
Pod undocumented
7942 114 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7943 114 ▶ $modifier ||= '';
Condition100%2/2
$modifier ||= ""
l!l
3876
MC/DC100%1/1
$modifier ||= ""
$modifier
Truth table100%2/2
A
A= $modifier
Aresult
11
00
7944  
7945 114 $modifier =~ tr/p//d;
7946 114 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 114 114
7947 0 my $line = 0;
7948 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
7949 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
7950 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
7951 0 last;
7952 }
7953 }
7954 0 die qq{Unsupported modifier "$1" used at line $line.\n};
7955 }
7956  
7957 114 $slash = 'div';
7958  
7959 # literal null string pattern
7960 114 ▶ if ($string eq '') {
Branch: 2 branches
BranchTrueFalseTotal
if ($string eq '') { } 8 106 114
elsif ($modifier =~ tr/Bb//d) { } 1 105 106
7961 8 $modifier =~ tr/bB//d;
7962 8 $modifier =~ tr/i//d;
7963 8 return join '', $ope, $delimiter, $end_delimiter, $modifier;
7964 }
7965  
7966 # /b /B modifier
7967 elsif ($modifier =~ tr/bB//d) {
7968  
7969 # choice again delimiter
7970 1 ▶ if ($delimiter =~ / [\@:] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($delimiter =~ / [\@:] /mosx) 0 1 1
7971 0 my @char = $string =~ /\G ([\x00-\xFF]) /oxmsg;
7972 0 my %octet = map {$_ => 1} @char;
7973 0 ▶ if (not $octet{')'}) {
Branch: 4 branches
BranchTrueFalseTotal
if (not $octet{')'}) { } 0 0 0
elsif (not $octet{'}'}) { } 0 0 0
elsif (not $octet{']'}) { } 0 0 0
elsif (not $octet{'>'}) { } 0 0 0
7974 0 $delimiter = '(';
7975 0 $end_delimiter = ')';
7976 }
7977 elsif (not $octet{'}'}) {
7978 0 $delimiter = '{';
7979 0 $end_delimiter = '}';
7980 }
7981 elsif (not $octet{']'}) {
7982 0 $delimiter = '[';
7983 0 $end_delimiter = ']';
7984 }
7985 elsif (not $octet{'>'}) {
7986 0 $delimiter = '<';
7987 0 $end_delimiter = '>';
7988 }
7989 else {
7990 0 for my $char (qw( ! " $ % & * + - . / = ? ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
7991 0 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 0 0 0
7992 0 $delimiter = $char;
7993 0 $end_delimiter = $char;
7994 0 last;
7995 }
7996 }
7997 }
7998 }
7999  
8000 1 my $prematch = '';
8001 1 return join '', $ope, $delimiter, $prematch, '(?:', $string, ')', $matched, $end_delimiter, $modifier;
8002 }
8003  
8004 105 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 1 104 105
8005 105 my $metachar = qr/[\@\\|[\]{^]/oxms;
8006  
8007 # split regexp
8008 105 my @char = $string =~ /\G((?>
8009 [^\x80-\xFF\\\$\@\[\(]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
8010 \\ (?>[1-9][0-9]*) |
8011 \\g (?>\s*) (?>[1-9][0-9]*) |
8012 \\g (?>\s*) \{ (?>\s*) (?>[1-9][0-9]*) (?>\s*) \} |
8013 \\g (?>\s*) \{ (?>\s*) - (?>\s*) (?>[1-9][0-9]*) (?>\s*) \} |
8014 \\x (?>[0-9A-Fa-f]{1,2}) |
8015 \\ (?>[0-7]{2,3}) |
8016 \\c [\x40-\x5F] |
8017 \\x\{ (?>[0-9A-Fa-f]+) \} |
8018 \\o\{ (?>[0-7]+) \} |
8019 \\[bBNpP]\{ (?>[^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} |
8020 \\ $q_char |
8021 \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} |
8022 \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} |
8023 \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} |
8024 [\$\@] $qq_variable |
8025 \$ (?>\s* [0-9]+) |
8026 \$ (?>\s*) \{ (?>\s* [0-9]+ \s*) \} |
8027 \$ \$ (?![\w\{]) |
8028 \$ (?>\s*) \$ (?>\s*) $qq_variable |
8029 \[\^ |
8030 \[\: (?>[a-z]+) :\] |
8031 \[\:\^ (?>[a-z]+) :\] |
8032 \(\? |
8033 $q_char
8034 ))/oxmsg;
8035  
8036 # choice again delimiter
8037 105 ▶ if ($delimiter =~ / [\@:] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($delimiter =~ / [\@:] /mosx) 0 105 105
8038 0 my %octet = map {$_ => 1} @char;
8039 0 ▶ if (not $octet{')'}) {
Branch: 4 branches
BranchTrueFalseTotal
if (not $octet{')'}) { } 0 0 0
elsif (not $octet{'}'}) { } 0 0 0
elsif (not $octet{']'}) { } 0 0 0
elsif (not $octet{'>'}) { } 0 0 0
8040 0 $delimiter = '(';
8041 0 $end_delimiter = ')';
8042 }
8043 elsif (not $octet{'}'}) {
8044 0 $delimiter = '{';
8045 0 $end_delimiter = '}';
8046 }
8047 elsif (not $octet{']'}) {
8048 0 $delimiter = '[';
8049 0 $end_delimiter = ']';
8050 }
8051 elsif (not $octet{'>'}) {
8052 0 $delimiter = '<';
8053 0 $end_delimiter = '>';
8054 }
8055 else {
8056 0 for my $char (qw( ! " $ % & * + - . / = ? ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
8057 0 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 0 0 0
8058 0 $delimiter = $char;
8059 0 $end_delimiter = $char;
8060 0 last;
8061 }
8062 }
8063 }
8064 }
8065  
8066 # count '('
8067 105 my $parens = grep { $_ eq '(' } @char;
8068  
8069 105 my $left_e = 0;
8070 105 my $right_e = 0;
8071 105 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 351 105 456
8072  
8073 # "\L\u" --> "\u\L"
8074 351 ▶ if (($char[$i] eq '\L') and ($char[$i+1] eq '\u')) {
Branch: 6 branches
BranchTrueFalseTotal
if ($char[$i] eq '\\L' and $char[$i + 1] eq '\\u') { } 0 351 351
elsif ($char[$i] eq '\\U' and $char[$i + 1] eq '\\l') { } 0 351 351
elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/mosx) { } 1 350 351
elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/mosx) { } 1 349 350
elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/mosx) { } 0 349 349
elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/mosx) { } 0 349 349
Condition33%1/3
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
!ll&&!rl&&r
35100
MC/DC0%0/2
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
$char[$i] eq "\\L" $char[$i + 1] eq "\\u"
Truth table33%1/3
A and B
A= $char[$i] eq "\\L"B= $char[$i + 1] eq "\\u"
ABresult
0X0
100
111
8075 0 @char[$i,$i+1] = @char[$i+1,$i];
8076 }
8077  
8078 # "\U\l" --> "\l\U"
8079 ▶ elsif (($char[$i] eq '\U') and ($char[$i+1] eq '\l')) {
Condition33%1/3
$char[$i] eq "\\U" and $char[$i + 1] eq "\\l"
!ll&&!rl&&r
35100
MC/DC0%0/2
$char[$i] eq "\\U" and $char[$i + 1] eq "\\l"
$char[$i] eq "\\U" $char[$i + 1] eq "\\l"
Truth table33%1/3
A and B
A= $char[$i] eq "\\U"B= $char[$i + 1] eq "\\l"
ABresult
0X0
100
111
8080 0 @char[$i,$i+1] = @char[$i+1,$i];
8081 }
8082  
8083 # octal escape sequence
8084 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
8085 1 $char[$i] = Eutf2::octchr($1);
8086 }
8087  
8088 # hexadecimal escape sequence
8089 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
8090 1 $char[$i] = Eutf2::hexchr($1);
8091 }
8092  
8093 # \b{...} --> b\{...}
8094 # \B{...} --> B\{...}
8095 # \N{CHARNAME} --> N\{CHARNAME}
8096 # \p{PROPERTY} --> p\{PROPERTY}
8097 # \P{PROPERTY} --> P\{PROPERTY}
8098 elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
8099 0 $char[$i] = $1 . '\\' . $2;
8100 }
8101  
8102 # \p, \P, \X --> p, P, X
8103 elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/oxms) {
8104 0 $char[$i] = $1;
8105 }
8106  
8107 351 ▶ if (0) {
Branch: 35 branches
BranchTrueFalseTotal
if (do { $char[$i] =~ /\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx }) { } 0 351 351
elsif ($char[$i] eq '[') { } 24 327 351
elsif ($char[$i] eq '[^') { } 0 327 327
elsif (my $char = character_class($char[$i], $modifier)) { } 11 316 327
elsif ($ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])) { } 3 313 316
elsif ($char[$i] =~ /\A [<>] \z/mosx) { } 8 305 313
elsif ($char[$i] eq '\\u') { } 0 305 305
elsif ($char[$i] eq '\\l') { } 0 305 305
elsif ($char[$i] eq '\\U') { } 0 305 305
elsif ($char[$i] eq '\\L') { } 0 305 305
elsif ($char[$i] eq '\\F') { } 0 305 305
elsif ($char[$i] eq '\\Q') { } 5 300 305
elsif ($char[$i] eq '\\E') { } 5 295 300
elsif ($char[$i] eq '\\Q') { } 0 295 295
elsif ($char[$i] eq '\\E') { } 0 295 295
elsif ($char[$i] =~ /\A \\ (?>\s*) 0 \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \\g (?>\s*) \{ (?>\s*) - (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \\g (?>\s*) \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \\g (?>\s*) ((?>[1-9][0-9]*)) \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \\ (?>\s*) ((?>[1-9][0-9]*)) \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \$ 0 \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \$\$ \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/mosx) { } 0 295 295
elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/cgmosx) { } 4 291 295
elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/cgmosx) { } 4 287 291
elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/cgmosx) { } 3 284 287
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} \z/mosx) { } 0 284 284
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/mosx) { } 0 284 284
elsif ($char[$i] =~ /\A [\$\@].+ /mosx) { } 9 275 284
elsif ($i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx) { } 24 337 361
8108 }
8109  
8110 # join separated multiple-octet
8111 elsif ($char[$i] =~ /\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms) {
8112 0 ▶ if ( ($i+3 <= $#char) and (grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms, @char[$i+1..$i+3]) == 3) and (CORE::eval(sprintf '"%s%s%s%s"', @char[$i..$i+3]) =~ /\A $q_char \z/oxms)) {
Branch: 3 branches
BranchTrueFalseTotal
if ($i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 and eval(sprintf '"%s%s%s%s"', @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx) { } 0 0 0
elsif ($i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 and eval(sprintf '"%s%s%s"', @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx) { } 0 0 0
elsif ($i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 and eval(sprintf '"%s%s"', @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx) { } 0 0 0
Condition0%0/6
$i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 and eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
!ll&&!rl&&r
000
$i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3
!ll&&!rl&&r
000
MC/DC0%0/3
$i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 and eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
$i + 3 <= $#char grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
Truth table0%0/4
A and B and C
A= $i + 3 <= $#charB= grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3C= eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
ABCresult
0XX0
10X0
1100
1111
8113 0 $char[$i] .= join '', splice @char, $i+1, 3;
8114 }
8115 ▶ elsif (($i+2 <= $#char) and (grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms, @char[$i+1..$i+2]) == 2) and (CORE::eval(sprintf '"%s%s%s"', @char[$i..$i+2]) =~ /\A $q_char \z/oxms)) {
Condition0%0/6
$i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 and eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
!ll&&!rl&&r
000
$i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2
!ll&&!rl&&r
000
MC/DC0%0/3
$i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 and eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
$i + 2 <= $#char grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
Truth table0%0/4
A and B and C
A= $i + 2 <= $#charB= grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2C= eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
ABCresult
0XX0
10X0
1100
1111
8116 0 $char[$i] .= join '', splice @char, $i+1, 2;
8117 }
8118 ▶ elsif (($i+1 <= $#char) and (grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms, $char[$i+1 ]) == 1) and (CORE::eval(sprintf '"%s%s"', @char[$i..$i+1]) =~ /\A $q_char \z/oxms)) {
Condition0%0/6
$i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 and eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
!ll&&!rl&&r
000
$i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1
!ll&&!rl&&r
000
MC/DC0%0/3
$i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 and eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
$i + 1 <= $#char grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
Truth table0%0/4
A and B and C
A= $i + 1 <= $#charB= grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1C= eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
ABCresult
0XX0
10X0
1100
1111
8119 0 $char[$i] .= join '', splice @char, $i+1, 1;
8120 }
8121 }
8122  
8123 # open character class [...]
8124 elsif ($char[$i] eq '[') {
8125 24 my $left = $i;
8126 24 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 24 24
8127 0 $i++;
8128 }
8129 24 while (1) {
8130 95 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 95 95
8131 0 die __FILE__, ": Unmatched [] in regexp\n";
8132 }
8133 95 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 24 71 95
8134 24 my $right = $i;
8135  
8136 # [...]
8137 24 ▶ if (grep(/\A [\$\@]/oxms,@char[$left+1..$right-1]) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep(/\A [\$\@]/mosx, @char[$left + 1 .. $right - 1]) >= 1) { } 0 24 24
8138 0 splice @char, $left, $right-$left+1, sprintf(q{@{[Eutf2::charlist_qr(%s,'%s')]}}, join(',', map {qq_stuff($delimiter,$end_delimiter,$_)} @char[$left+1..$right-1]), $modifier);
8139 }
8140 else {
8141 24 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
8142 }
8143  
8144 24 $i = $left;
8145 24 last;
8146 }
8147 }
8148 }
8149  
8150 # open character class [^...]
8151 elsif ($char[$i] eq '[^') {
8152 0 my $left = $i;
8153 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
8154 0 $i++;
8155 }
8156 0 while (1) {
8157 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
8158 0 die __FILE__, ": Unmatched [] in regexp\n";
8159 }
8160 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
8161 0 my $right = $i;
8162  
8163 # [^...]
8164 0 ▶ if (grep(/\A [\$\@]/oxms,@char[$left+1..$right-1]) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep(/\A [\$\@]/mosx, @char[$left + 1 .. $right - 1]) >= 1) { } 0 0 0
8165 0 splice @char, $left, $right-$left+1, sprintf(q{@{[Eutf2::charlist_not_qr(%s,'%s')]}}, join(',', map {qq_stuff($delimiter,$end_delimiter,$_)} @char[$left+1..$right-1]), $modifier);
8166 }
8167 else {
8168 0 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
8169 }
8170  
8171 0 $i = $left;
8172 0 last;
8173 }
8174 }
8175 }
8176  
8177 # rewrite character class or escape character
8178 elsif (my $char = character_class($char[$i],$modifier)) {
8179 11 $char[$i] = $char;
8180 }
8181  
8182 # /i modifier
8183 ▶ elsif ($ignorecase and ($char[$i] =~ /\A [\x00-\xFF] \z/oxms) and (Eutf2::uc($char[$i]) ne Eutf2::fc($char[$i]))) {
Condition66%4/6
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
!ll&&!rl&&r
31303
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx
!ll&&!rl&&r
31303
MC/DC33%1/3
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
$ignorecase $char[$i] =~ /\A [\x00-\xFF] \z/mosx &Eutf2::uc($char[$i]) ne &fc($char[$i])
Truth table50%2/4
A and B and C
A= $ignorecaseB= $char[$i] =~ /\A [\x00-\xFF] \z/mosxC= &Eutf2::uc($char[$i]) ne &fc($char[$i])
ABCresult
0XX0
10X0
1100
1111
8184 3 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 3 0 3
8185 3 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
8186 }
8187 else {
8188 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
8189 }
8190 }
8191  
8192 # \u \l \U \L \F \Q \E
8193 elsif ($char[$i] =~ /\A [<>] \z/oxms) {
8194 8 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) 0 8 8
8195 0 $char[$i] = '\\' . $char[$i];
8196 }
8197 }
8198 elsif ($char[$i] eq '\u') {
8199 0 $char[$i] = '@{[Eutf2::ucfirst qq<';
8200 0 $left_e++;
8201 }
8202 elsif ($char[$i] eq '\l') {
8203 0 $char[$i] = '@{[Eutf2::lcfirst qq<';
8204 0 $left_e++;
8205 }
8206 elsif ($char[$i] eq '\U') {
8207 0 $char[$i] = '@{[Eutf2::uc qq<';
8208 0 $left_e++;
8209 }
8210 elsif ($char[$i] eq '\L') {
8211 0 $char[$i] = '@{[Eutf2::lc qq<';
8212 0 $left_e++;
8213 }
8214 elsif ($char[$i] eq '\F') {
8215 0 $char[$i] = '@{[Eutf2::fc qq<';
8216 0 $left_e++;
8217 }
8218 elsif ($char[$i] eq '\Q') {
8219 5 $char[$i] = '@{[CORE::quotemeta qq<';
8220 5 $left_e++;
8221 }
8222 elsif ($char[$i] eq '\E') {
8223 5 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) { } 5 0 5
8224 5 $char[$i] = '>]}';
8225 5 $right_e++;
8226 }
8227 else {
8228 0 $char[$i] = '';
8229 }
8230 }
8231 elsif ($char[$i] eq '\Q') {
8232 0 while (1) {
8233 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
8234 0 last;
8235 }
8236 0 ▶ if ($char[$i] eq '\E') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "\\E") 0 0 0
8237 0 last;
8238 }
8239 }
8240 }
8241 elsif ($char[$i] eq '\E') {
8242 }
8243  
8244 # \0 --> \0
8245 elsif ($char[$i] =~ /\A \\ (?>\s*) 0 \z/oxms) {
8246 }
8247  
8248 # \g{N}, \g{-N}
8249  
8250 # P.108 Using Simple Patterns
8251 # in Chapter 7: In the World of Regular Expressions
8252 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
8253  
8254 # P.221 Capturing
8255 # in Chapter 5: Pattern Matching
8256 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
8257  
8258 # \g{-1}, \g{-2}, \g{-3} --> \g{-1}, \g{-2}, \g{-3}
8259 elsif ($char[$i] =~ /\A \\g (?>\s*) \{ (?>\s*) - (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
8260 }
8261  
8262 # \g{1}, \g{2}, \g{3} --> \g{2}, \g{3}, \g{4} (only when multibyte anchoring is enable)
8263 elsif ($char[$i] =~ /\A \\g (?>\s*) \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
8264 }
8265  
8266 # \g1, \g2, \g3 --> \g2, \g3, \g4 (only when multibyte anchoring is enable)
8267 elsif ($char[$i] =~ /\A \\g (?>\s*) ((?>[1-9][0-9]*)) \z/oxms) {
8268 }
8269  
8270 # \1, \2, \3 --> \2, \3, \4 (only when multibyte anchoring is enable)
8271 elsif ($char[$i] =~ /\A \\ (?>\s*) ((?>[1-9][0-9]*)) \z/oxms) {
8272 }
8273  
8274 # $0 --> $0
8275 elsif ($char[$i] =~ /\A \$ 0 \z/oxms) {
8276 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8277 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8278 }
8279 }
8280 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/oxms) {
8281 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8282 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8283 }
8284 }
8285  
8286 # $$ --> $$
8287 elsif ($char[$i] =~ /\A \$\$ \z/oxms) {
8288 }
8289  
8290 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
8291 # $1, $2, $3 --> $1, $2, $3 otherwise
8292 elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/oxms) {
8293 0 $char[$i] = e_capture($1);
8294 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8295 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8296 }
8297 }
8298 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
8299 0 $char[$i] = e_capture($1);
8300 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8301 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8302 }
8303 }
8304  
8305 # $$foo[ ... ] --> $ $foo->[ ... ]
8306 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/oxms) {
8307 0 $char[$i] = e_capture($1.'->'.$2);
8308 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8309 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8310 }
8311 }
8312  
8313 # $$foo{ ... } --> $ $foo->{ ... }
8314 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/oxms) {
8315 0 $char[$i] = e_capture($1.'->'.$2);
8316 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8317 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8318 }
8319 }
8320  
8321 # $$foo
8322 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/oxms) {
8323 0 $char[$i] = e_capture($1);
8324 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8325 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8326 }
8327 }
8328  
8329 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
8330 elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/oxmsgc) {
8331 4 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 4 4
8332 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::PREMATCH())]}';
8333 }
8334 else {
8335 4 $char[$i] = '@{[Eutf2::PREMATCH()]}';
8336 }
8337 }
8338  
8339 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
8340 elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/oxmsgc) {
8341 4 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 4 4
8342 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::MATCH())]}';
8343 }
8344 else {
8345 4 $char[$i] = '@{[Eutf2::MATCH()]}';
8346 }
8347 }
8348  
8349 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
8350 elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/oxmsgc) {
8351 3 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 3 3
8352 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::POSTMATCH())]}';
8353 }
8354 else {
8355 3 $char[$i] = '@{[Eutf2::POSTMATCH()]}';
8356 }
8357 }
8358  
8359 # ${ foo }
8360 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} \z/oxms) {
8361 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8362 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8363 }
8364 }
8365  
8366 # ${ ... }
8367 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/oxms) {
8368 0 $char[$i] = e_capture($1);
8369 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8370 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8371 }
8372 }
8373  
8374 # $scalar or @array
8375 elsif ($char[$i] =~ /\A [\$\@].+ /oxms) {
8376 9 $char[$i] = e_string($char[$i]);
8377 9 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 9 9
8378 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8379 }
8380 }
8381  
8382 # quote character before ? + * {
8383 ▶ elsif (($i >= 1) and ($char[$i] =~ /\A [\?\+\*\{] \z/oxms)) {
Condition100%3/3
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
!ll&&!rl&&r
8616524
MC/DC100%2/2
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
$i >= 1 $char[$i] =~ /\A [\?\+\*\{] \z/mosx
Truth table100%3/3
A and B
A= $i >= 1B= $char[$i] =~ /\A [\?\+\*\{] \z/mosx
ABresult
0X0
100
111
8384 24 ▶ if ($char[$i-1] =~ /\A (?:[\x00-\xFF]|\\[0-7]{2,3}|\\x[0-9-A-Fa-f]{1,2}) \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i - 1] =~ /\A (?:[\x00-\xFF]|\\[0-7]{2,3}|\\x[0-9-A-Fa-f]{1,2}) \z/mosx) { } 0 24 24
8385 }
8386 else {
8387 24 $char[$i-1] = '(?:' . $char[$i-1] . ')';
8388 }
8389 }
8390 }
8391  
8392 # make regexp string
8393 105 my $prematch = '';
8394 105 $modifier =~ tr/i//d;
8395 105 ▶ if ($left_e > $right_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($left_e > $right_e) 0 105 105
8396 0 return join '', $ope, $delimiter, $prematch, '(?:', @char, '>]}' x ($left_e - $right_e), ')', $matched, $end_delimiter, $modifier;
8397 }
8398 105 return join '', $ope, $delimiter, $prematch, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
8399 }
8400  
8401 #
8402 # escape regexp (s'here'' or s'here''b)
8403 #
8404 22 ▶sub e_s1_q {
Subroutine e_s1_q: called CC=7 SCAR=22.7
Pod undocumented
8405 22 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
8406 22 ▶ $modifier ||= '';
Condition100%2/2
$modifier ||= ""
l!l
418
MC/DC100%1/1
$modifier ||= ""
$modifier
Truth table100%2/2
A
A= $modifier
Aresult
11
00
8407  
8408 22 $modifier =~ tr/p//d;
8409 22 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 22 22
8410 0 my $line = 0;
8411 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
8412 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
8413 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
8414 0 last;
8415 }
8416 }
8417 0 die qq{Unsupported modifier "$1" used at line $line.\n};
8418 }
8419  
8420 22 $slash = 'div';
8421  
8422 # literal null string pattern
8423 22 ▶ if ($string eq '') {
Branch: 2 branches
BranchTrueFalseTotal
if ($string eq '') { } 8 14 22
elsif ($modifier =~ tr/Bb//d) { } 1 13 14
8424 8 $modifier =~ tr/bB//d;
8425 8 $modifier =~ tr/i//d;
8426 8 return join '', $ope, $delimiter, $end_delimiter, $modifier;
8427 }
8428  
8429 # with /b /B modifier
8430 elsif ($modifier =~ tr/bB//d) {
8431 1 return e_s1_qb($ope,$delimiter,$end_delimiter,$string,$modifier);
8432 }
8433  
8434 # without /b /B modifier
8435 else {
8436 13 return e_s1_qt($ope,$delimiter,$end_delimiter,$string,$modifier);
8437 }
8438 }
8439  
8440 #
8441 # escape regexp (s'here'')
8442 #
8443 13 ▶sub e_s1_qt {
Subroutine e_s1_qt: called CC=20 SCAR=50.1
Pod undocumented
8444 13 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
8445  
8446 13 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 0 13 13
8447  
8448 # split regexp
8449 13 my @char = $string =~ /\G((?>
8450 [^\x80-\xFF\\\[\$\@\/] |
8451 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
8452 \[\^ |
8453 \[\: (?>[a-z]+) \:\] |
8454 \[\:\^ (?>[a-z]+) \:\] |
8455 [\$\@\/] |
8456 \\ (?:$q_char) |
8457 (?:$q_char)
8458 ))/oxmsg;
8459  
8460 # unescape character
8461 13 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 25 13 38
8462 25 ▶ if (0) {
Branch: 6 branches
BranchTrueFalseTotal
if (do { $char[$i] eq '[' }) { } 0 25 25
elsif ($char[$i] eq '[^') { } 0 25 25
elsif ($char[$i] =~ m(\A [\$\@/\\] \z)mosx) { } 0 25 25
elsif (my $char = character_class($char[$i], $modifier)) { } 6 19 25
elsif ($ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])) { } 0 19 19
elsif ($i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx) { } 0 32 32
8463 }
8464  
8465 # open character class [...]
8466 elsif ($char[$i] eq '[') {
8467 0 my $left = $i;
8468 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
8469 0 $i++;
8470 }
8471 0 while (1) {
8472 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
8473 0 die __FILE__, ": Unmatched [] in regexp\n";
8474 }
8475 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
8476 0 my $right = $i;
8477  
8478 # [...]
8479 0 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
8480  
8481 0 $i = $left;
8482 0 last;
8483 }
8484 }
8485 }
8486  
8487 # open character class [^...]
8488 elsif ($char[$i] eq '[^') {
8489 0 my $left = $i;
8490 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
8491 0 $i++;
8492 }
8493 0 while (1) {
8494 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
8495 0 die __FILE__, ": Unmatched [] in regexp\n";
8496 }
8497 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
8498 0 my $right = $i;
8499  
8500 # [^...]
8501 0 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
8502  
8503 0 $i = $left;
8504 0 last;
8505 }
8506 }
8507 }
8508  
8509 # escape $ @ / and \
8510 elsif ($char[$i] =~ /\A [\$\@\/\\] \z/oxms) {
8511 0 $char[$i] = '\\' . $char[$i];
8512 }
8513  
8514 # rewrite character class or escape character
8515 elsif (my $char = character_class($char[$i],$modifier)) {
8516 6 $char[$i] = $char;
8517 }
8518  
8519 # /i modifier
8520 ▶ elsif ($ignorecase and ($char[$i] =~ /\A [\x00-\xFF] \z/oxms) and (Eutf2::uc($char[$i]) ne Eutf2::fc($char[$i]))) {
Condition33%2/6
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
!ll&&!rl&&r
1900
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx
!ll&&!rl&&r
1900
MC/DC0%0/3
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
$ignorecase $char[$i] =~ /\A [\x00-\xFF] \z/mosx &Eutf2::uc($char[$i]) ne &fc($char[$i])
Truth table25%1/4
A and B and C
A= $ignorecaseB= $char[$i] =~ /\A [\x00-\xFF] \z/mosxC= &Eutf2::uc($char[$i]) ne &fc($char[$i])
ABCresult
0XX0
10X0
1100
1111
8521 0 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 0 0 0
8522 0 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
8523 }
8524 else {
8525 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
8526 }
8527 }
8528  
8529 # quote character before ? + * {
8530 ▶ elsif (($i >= 1) and ($char[$i] =~ /\A [\?\+\*\{] \z/oxms)) {
Condition66%2/3
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
!ll&&!rl&&r
1360
MC/DC0%0/2
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
$i >= 1 $char[$i] =~ /\A [\?\+\*\{] \z/mosx
Truth table66%2/3
A and B
A= $i >= 1B= $char[$i] =~ /\A [\?\+\*\{] \z/mosx
ABresult
0X0
100
111
8531 0 ▶ if ($char[$i-1] =~ /\A [\x00-\xFF] \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i - 1] =~ /\A [\x00-\xFF] \z/mosx) { } 0 0 0
8532 }
8533 else {
8534 0 $char[$i-1] = '(?:' . $char[$i-1] . ')';
8535 }
8536 }
8537 }
8538  
8539 13 $modifier =~ tr/i//d;
8540 13 $delimiter = '/';
8541 13 $end_delimiter = '/';
8542 13 my $prematch = '';
8543 13 return join '', $ope, $delimiter, $prematch, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
8544 }
8545  
8546 #
8547 # escape regexp (s'here''b)
8548 #
8549 1 ▶sub e_s1_qb {
Subroutine e_s1_qb: called CC=4 SCAR=14.2
Pod undocumented
8550 1 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
8551  
8552 # split regexp
8553 1 my @char = $string =~ /\G (?>[^\\]|\\\\|[\x00-\xFF]) /oxmsg;
8554  
8555 # unescape character
8556 1 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 3 1 4
8557 3 ▶ if (0) {
Branch: 2 branches
BranchTrueFalseTotal
if (do { $char[$i] eq '\\\\' }) { } 0 3 3
elsif ($char[$i] =~ m(\A [\$\@/\\] \z)mosx) { } 0 3 3
8558 }
8559  
8560 # remain \\
8561 elsif ($char[$i] eq '\\\\') {
8562 }
8563  
8564 # escape $ @ / and \
8565 elsif ($char[$i] =~ /\A [\$\@\/\\] \z/oxms) {
8566 0 $char[$i] = '\\' . $char[$i];
8567 }
8568 }
8569  
8570 1 $delimiter = '/';
8571 1 $end_delimiter = '/';
8572 1 my $prematch = '';
8573 1 return join '', $ope, $delimiter, $prematch, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
8574 }
8575  
8576 #
8577 # escape regexp (s''here')
8578 #
8579 17 ▶sub e_s2_q {
Subroutine e_s2_q: called CC=4 SCAR=13.9
Pod undocumented
8580 17 my($ope,$delimiter,$end_delimiter,$string) = @_;
8581  
8582 17 $slash = 'div';
8583  
8584 17 my @char = $string =~ / \G (?>[^\x80-\xFF\\]|\\\\|$q_char) /oxmsg;
8585 17 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 9 17 26
8586 9 ▶ if (0) {
Branch: 2 branches
BranchTrueFalseTotal
if (do { $char[$i] =~ /\A \\\\ \z/mosx }) { } 1 8 9
elsif ($char[$i] =~ m(\A [\$\@/\\] \z)mosx) { } 5 3 8
8587 }
8588  
8589 # not escape \\
8590 elsif ($char[$i] =~ /\A \\\\ \z/oxms) {
8591 }
8592  
8593 # escape $ @ / and \
8594 elsif ($char[$i] =~ /\A [\$\@\/\\] \z/oxms) {
8595 5 $char[$i] = '\\' . $char[$i];
8596 }
8597 }
8598  
8599 17 return join '', $ope, $delimiter, @char, $end_delimiter;
8600 }
8601  
8602 #
8603 # escape regexp (s/here/and here/modifier)
8604 #
8605 136 ▶sub e_sub {
Subroutine e_sub: called CC=20 SCAR=32.6
Pod undocumented
8606 136 my($variable,$delimiter1,$pattern,$end_delimiter1,$delimiter2,$replacement,$end_delimiter2,$modifier) = @_;
8607 136 ▶ $modifier ||= '';
Condition100%2/2
$modifier ||= ""
l!l
5482
MC/DC100%1/1
$modifier ||= ""
$modifier
Truth table100%2/2
A
A= $modifier
Aresult
11
00
8608  
8609 136 $modifier =~ tr/p//d;
8610 136 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 136 136
8611 0 my $line = 0;
8612 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
8613 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
8614 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
8615 0 last;
8616 }
8617 }
8618 0 die qq{Unsupported modifier "$1" used at line $line.\n};
8619 }
8620  
8621 136 ▶ if ($variable eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($variable eq "") 37 99 136
8622 37 $variable = '$_';
8623 37 $bind_operator = ' =~ ';
8624 }
8625  
8626 136 $slash = 'div';
8627  
8628 # P.128 Start of match (or end of previous match): \G
8629 # P.130 Advanced Use of \G with Perl
8630 # in Chapter 3: Overview of Regular Expression Features and Flavors
8631 # P.312 Iterative Matching: Scalar Context, with /g
8632 # in Chapter 7: Perl
8633 # of ISBN 0-596-00289-0 Mastering Regular Expressions, Second edition
8634  
8635 # P.181 Where You Left Off: The \G Assertion
8636 # in Chapter 5: Pattern Matching
8637 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
8638  
8639 # P.220 Where You Left Off: The \G Assertion
8640 # in Chapter 5: Pattern Matching
8641 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
8642  
8643 136 my $e_modifier = $modifier =~ tr/e//d;
8644 136 my $r_modifier = $modifier =~ tr/r//d;
8645  
8646 136 my $my = '';
8647 136 ▶ if ($variable =~ s/\A \( (?>\s*) ( (?>(?: local \b | my \b | our \b | state \b )?) .+ ) \) \z/$1/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($variable =~ s/\A \( (?>\s*) ( (?>(?: local \b | my \b | our \b | state \b )?) .+ ) \) \z/$1/mosx) 0 136 136
8648 0 $my = $variable;
8649 0 $variable =~ s/ (?: local \b | my \b | our \b | state \b ) (?>\s*) //oxms;
8650 0 $variable =~ s/ = .+ \z//oxms;
8651 }
8652  
8653 136 (my $variable_basename = $variable) =~ s/ [\[\{].* \z//oxms;
8654 136 $variable_basename =~ s/ \s+ \z//oxms;
8655  
8656 # quote replacement string
8657 136 my $e_replacement = '';
8658 136 ▶ if ($e_modifier >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($e_modifier >= 1) { } 17 119 136
8659 17 $e_replacement = e_qq('', '', '', $replacement);
8660 17 $e_modifier--;
8661 }
8662 else {
8663 119 ▶ if ($delimiter2 eq "'") {
Branch: 1 branch
BranchTrueFalseTotal
if ($delimiter2 eq q[']) { } 17 102 119
8664 17 $e_replacement = e_s2_q('qq', '/', '/', $replacement);
8665 }
8666 else {
8667 102 $e_replacement = e_qq ('qq', $delimiter2, $end_delimiter2, $replacement);
8668 }
8669 }
8670  
8671 136 my $sub = '';
8672  
8673 # with /r
8674 136 ▶ if ($r_modifier) {
Branch: 1 branch
BranchTrueFalseTotal
if ($r_modifier) { } 10 126 136
8675 10 ▶ if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { $modifier =~ /g/mosx }) { } 5 5 10
8676 }
8677  
8678 # s///gr without multibyte anchoring
8679 elsif ($modifier =~ /g/oxms) {
8680 5 ▶ $sub = sprintf(
Branch: 1 branch
BranchTrueFalseTotal
$delimiter1 eq q['] ? : 0 5 5
8681 # 1 2 3 4 5
8682 q<CORE::eval{local $Eutf2::re_t=%s; while($Eutf2::re_t =~ %s){%s local $^W=0; local $Eutf2::re_r=%s; %s$Eutf2::re_t="$`$Eutf2::re_r$'"; pos($Eutf2::re_t)=length "$`$Eutf2::re_r"; } return $Eutf2::re_t}>,
8683  
8684 $variable, # 1
8685 ($delimiter1 eq "'") ? # 2
8686 e_s1_q('m', $delimiter1, $end_delimiter1, $pattern, $modifier) : # :
8687 e_s1 ('m', $delimiter1, $end_delimiter1, $pattern, $modifier), # :
8688 $s_matched, # 3
8689 $e_replacement, # 4
8690 '$Eutf2::re_r=CORE::eval $Eutf2::re_r; ' x $e_modifier, # 5
8691 );
8692 }
8693  
8694 # s///r
8695 else {
8696  
8697 5 my $prematch = q{$`};
8698  
8699 5 ▶ $sub = sprintf(
Branch: 1 branch
BranchTrueFalseTotal
$delimiter1 eq q['] ? : 0 5 5
8700 # 1 2 3 4 5 6 7
8701 q<(%s =~ %s) ? CORE::eval{%s local $^W=0; local $Eutf2::re_r=%s; %s"%s$Eutf2::re_r$'" } : %s>,
8702  
8703 $variable, # 1
8704 ($delimiter1 eq "'") ? # 2
8705 e_s1_q('m', $delimiter1, $end_delimiter1, $pattern, $modifier) : # :
8706 e_s1 ('m', $delimiter1, $end_delimiter1, $pattern, $modifier), # :
8707 $s_matched, # 3
8708 $e_replacement, # 4
8709 '$Eutf2::re_r=CORE::eval $Eutf2::re_r; ' x $e_modifier, # 5
8710 $prematch, # 6
8711 $variable, # 7
8712 );
8713 }
8714  
8715 # $var !~ s///r doesn't make sense
8716 10 ▶ if ($bind_operator =~ / !~ /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($bind_operator =~ / !~ /mosx) 0 10 10
8717 0 $sub = q{die("$0: Using !~ with s///r doesn't make sense"), } . $sub;
8718 }
8719 }
8720  
8721 # without /r
8722 else {
8723 126 ▶ if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { $modifier =~ /g/mosx }) { } 30 96 126
8724 }
8725  
8726 # s///g without multibyte anchoring
8727 elsif ($modifier =~ /g/oxms) {
8728 30 ▶ $sub = sprintf(
Branch: 2 branches
BranchTrueFalseTotal
$delimiter1 eq q['] ? : 3 27 30
$bind_operator =~ / !~ /mosx ? : 3 27 30
8729 # 1 2 3 4 5 6 7 8
8730 q<CORE::eval{local $Eutf2::re_n=0; while(%s =~ %s){%s local $^W=0; local $Eutf2::re_r=%s; %s%s="$`$Eutf2::re_r$'"; pos(%s)=length "$`$Eutf2::re_r"; $Eutf2::re_n++} return %s$Eutf2::re_n}>,
8731  
8732 $variable, # 1
8733 ($delimiter1 eq "'") ? # 2
8734 e_s1_q('m', $delimiter1, $end_delimiter1, $pattern, $modifier) : # :
8735 e_s1 ('m', $delimiter1, $end_delimiter1, $pattern, $modifier), # :
8736 $s_matched, # 3
8737 $e_replacement, # 4
8738 '$Eutf2::re_r=CORE::eval $Eutf2::re_r; ' x $e_modifier, # 5
8739 $variable, # 6
8740 $variable, # 7
8741 ($bind_operator =~ / !~ /oxms) ? '!' : '', # 8
8742 );
8743 }
8744  
8745 # s///
8746 else {
8747  
8748 96 my $prematch = q{$`};
8749  
8750 96 ▶ $sub = sprintf(
Branch: 2 branches
BranchTrueFalseTotal
$bind_operator =~ / =~ /mosx ? : 85 11 96
$delimiter1 eq q['] ? : 19 77 96
8751  
8752 ($bind_operator =~ / =~ /oxms) ?
8753  
8754 # 1 2 3 4 5 6 7 8
8755 q<(%s%s%s) ? CORE::eval{%s local $^W=0; local $Eutf2::re_r=%s; %s%s="%s$Eutf2::re_r$'"; 1 } : undef> :
8756  
8757 # 1 2 3 4 5 6 7 8
8758 q<(%s%s%s) ? 1 : CORE::eval{%s local $^W=0; local $Eutf2::re_r=%s; %s%s="%s$Eutf2::re_r$'"; undef }>,
8759  
8760 $variable, # 1
8761 $bind_operator, # 2
8762 ($delimiter1 eq "'") ? # 3
8763 e_s1_q('m', $delimiter1, $end_delimiter1, $pattern, $modifier) : # :
8764 e_s1 ('m', $delimiter1, $end_delimiter1, $pattern, $modifier), # :
8765 $s_matched, # 4
8766 $e_replacement, # 5
8767 '$Eutf2::re_r=CORE::eval $Eutf2::re_r; ' x $e_modifier, # 6
8768 $variable, # 7
8769 $prematch, # 8
8770 );
8771 }
8772 }
8773  
8774 # (my $foo = $bar) =~ s/// --> (my $foo = $bar, CORE::eval { ... })[1]
8775 136 ▶ if ($my ne '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($my ne "") 0 136 136
8776 0 $sub = "($my, $sub)[1]";
8777 }
8778  
8779 # clear s/// variable
8780 136 $sub_variable = '';
8781 136 $bind_operator = '';
8782  
8783 136 return $sub;
8784 }
8785  
8786 #
8787 # escape regexp of split qr//
8788 #
8789 101 ▶sub e_split {
Subroutine e_split: called CC=88 SCAR=73.2
Pod undocumented
8790 101 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
8791 101 ▶ $modifier ||= '';
Condition100%2/2
$modifier ||= ""
l!l
893
MC/DC100%1/1
$modifier ||= ""
$modifier
Truth table100%2/2
A
A= $modifier
Aresult
11
00
8792  
8793 101 $modifier =~ tr/p//d;
8794 101 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 101 101
8795 0 my $line = 0;
8796 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
8797 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
8798 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
8799 0 last;
8800 }
8801 }
8802 0 die qq{Unsupported modifier "$1" used at line $line.\n};
8803 }
8804  
8805 101 $slash = 'div';
8806  
8807 # /b /B modifier
8808 101 ▶ if ($modifier =~ tr/bB//d) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ tr/Bb//d) 0 101 101
8809 0 return join '', 'split', $ope, $delimiter, $string, $end_delimiter, $modifier;
8810 }
8811  
8812 101 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 0 101 101
8813 101 my $metachar = qr/[\@\\|[\]{^]/oxms;
8814  
8815 # split regexp
8816 101 my @char = $string =~ /\G((?>
8817 [^\x80-\xFF\\\$\@\[\(]|(?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
8818 \\x (?>[0-9A-Fa-f]{1,2}) |
8819 \\ (?>[0-7]{2,3}) |
8820 \\c [\x40-\x5F] |
8821 \\x\{ (?>[0-9A-Fa-f]+) \} |
8822 \\o\{ (?>[0-7]+) \} |
8823 \\[bBNpP]\{ (?>[^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} |
8824 \\ $q_char |
8825 \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} |
8826 \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} |
8827 \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} |
8828 [\$\@] $qq_variable |
8829 \$ (?>\s* [0-9]+) |
8830 \$ (?>\s*) \{ (?>\s* [0-9]+ \s*) \} |
8831 \$ \$ (?![\w\{]) |
8832 \$ (?>\s*) \$ (?>\s*) $qq_variable |
8833 \[\^ |
8834 \[\: (?>[a-z]+) :\] |
8835 \[\:\^ (?>[a-z]+) :\] |
8836 \(\? |
8837 $q_char
8838 ))/oxmsg;
8839  
8840 101 my $left_e = 0;
8841 101 my $right_e = 0;
8842 101 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 284 101 385
8843  
8844 # "\L\u" --> "\u\L"
8845 284 ▶ if (($char[$i] eq '\L') and ($char[$i+1] eq '\u')) {
Branch: 6 branches
BranchTrueFalseTotal
if ($char[$i] eq '\\L' and $char[$i + 1] eq '\\u') { } 0 284 284
elsif ($char[$i] eq '\\U' and $char[$i + 1] eq '\\l') { } 0 284 284
elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/mosx) { } 1 283 284
elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/mosx) { } 1 282 283
elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/mosx) { } 0 282 282
elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/mosx) { } 0 282 282
Condition33%1/3
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
!ll&&!rl&&r
28400
MC/DC0%0/2
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
$char[$i] eq "\\L" $char[$i + 1] eq "\\u"
Truth table33%1/3
A and B
A= $char[$i] eq "\\L"B= $char[$i + 1] eq "\\u"
ABresult
0X0
100
111
8846 0 @char[$i,$i+1] = @char[$i+1,$i];
8847 }
8848  
8849 # "\U\l" --> "\l\U"
8850 ▶ elsif (($char[$i] eq '\U') and ($char[$i+1] eq '\l')) {
Condition33%1/3
$char[$i] eq "\\U" and $char[$i + 1] eq "\\l"
!ll&&!rl&&r
28400
MC/DC0%0/2
$char[$i] eq "\\U" and $char[$i + 1] eq "\\l"
$char[$i] eq "\\U" $char[$i + 1] eq "\\l"
Truth table33%1/3
A and B
A= $char[$i] eq "\\U"B= $char[$i + 1] eq "\\l"
ABresult
0X0
100
111
8851 0 @char[$i,$i+1] = @char[$i+1,$i];
8852 }
8853  
8854 # octal escape sequence
8855 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
8856 1 $char[$i] = Eutf2::octchr($1);
8857 }
8858  
8859 # hexadecimal escape sequence
8860 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
8861 1 $char[$i] = Eutf2::hexchr($1);
8862 }
8863  
8864 # \b{...} --> b\{...}
8865 # \B{...} --> B\{...}
8866 # \N{CHARNAME} --> N\{CHARNAME}
8867 # \p{PROPERTY} --> p\{PROPERTY}
8868 # \P{PROPERTY} --> P\{PROPERTY}
8869 elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
8870 0 $char[$i] = $1 . '\\' . $2;
8871 }
8872  
8873 # \p, \P, \X --> p, P, X
8874 elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/oxms) {
8875 0 $char[$i] = $1;
8876 }
8877  
8878 284 ▶ if (0) {
Branch: 31 branches
BranchTrueFalseTotal
if (do { $char[$i] =~ /\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx }) { } 0 284 284
elsif ($char[$i] eq '[') { } 3 281 284
elsif ($char[$i] eq '[^') { } 1 280 281
elsif (my $char = character_class($char[$i], $modifier)) { } 5 275 280
elsif ($char[$i] eq '^' and not $modifier =~ /m/mosx) { } 11 264 275
elsif ($ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])) { } 0 264 264
elsif ($char[$i] =~ /\A ([<>]) \z/mosx) { } 2 262 264
elsif ($char[$i] eq '\\u') { } 0 262 262
elsif ($char[$i] eq '\\l') { } 0 262 262
elsif ($char[$i] eq '\\U') { } 0 262 262
elsif ($char[$i] eq '\\L') { } 0 262 262
elsif ($char[$i] eq '\\F') { } 0 262 262
elsif ($char[$i] eq '\\Q') { } 0 262 262
elsif ($char[$i] eq '\\E') { } 0 262 262
elsif ($char[$i] eq '\\Q') { } 0 262 262
elsif ($char[$i] eq '\\E') { } 0 262 262
elsif ($char[$i] =~ /\A \$ 0 \z/mosx) { } 0 262 262
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/mosx) { } 0 262 262
elsif ($char[$i] =~ /\A \$\$ \z/mosx) { } 0 262 262
elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/mosx) { } 0 262 262
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/mosx) { } 0 262 262
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/mosx) { } 0 262 262
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/mosx) { } 0 262 262
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/mosx) { } 0 262 262
elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/cgmosx) { } 12 250 262
elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/cgmosx) { } 12 238 250
elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/cgmosx) { } 9 229 238
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} \z/mosx) { } 0 229 229
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/mosx) { } 0 229 229
elsif ($char[$i] =~ /\A [\$\@].+ /mosx) { } 3 226 229
elsif ($i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx) { } 7 271 278
8879 }
8880  
8881 # join separated multiple-octet
8882 elsif ($char[$i] =~ /\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms) {
8883 0 ▶ if ( ($i+3 <= $#char) and (grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms, @char[$i+1..$i+3]) == 3) and (CORE::eval(sprintf '"%s%s%s%s"', @char[$i..$i+3]) =~ /\A $q_char \z/oxms)) {
Branch: 3 branches
BranchTrueFalseTotal
if ($i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 and eval(sprintf '"%s%s%s%s"', @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx) { } 0 0 0
elsif ($i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 and eval(sprintf '"%s%s%s"', @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx) { } 0 0 0
elsif ($i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 and eval(sprintf '"%s%s"', @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx) { } 0 0 0
Condition0%0/6
$i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 and eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
!ll&&!rl&&r
000
$i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3
!ll&&!rl&&r
000
MC/DC0%0/3
$i + 3 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 and eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
$i + 3 <= $#char grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3 eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
Truth table0%0/4
A and B and C
A= $i + 3 <= $#charB= grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 3]) == 3C= eval(sprintf "\"%s%s%s%s\"", @char[$i .. $i + 3]) =~ /\A $Eutf2::q_char \z/mosx
ABCresult
0XX0
10X0
1100
1111
8884 0 $char[$i] .= join '', splice @char, $i+1, 3;
8885 }
8886 ▶ elsif (($i+2 <= $#char) and (grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms, @char[$i+1..$i+2]) == 2) and (CORE::eval(sprintf '"%s%s%s"', @char[$i..$i+2]) =~ /\A $q_char \z/oxms)) {
Condition0%0/6
$i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 and eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
!ll&&!rl&&r
000
$i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2
!ll&&!rl&&r
000
MC/DC0%0/3
$i + 2 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 and eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
$i + 2 <= $#char grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2 eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
Truth table0%0/4
A and B and C
A= $i + 2 <= $#charB= grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, @char[$i + 1 .. $i + 2]) == 2C= eval(sprintf "\"%s%s%s\"", @char[$i .. $i + 2]) =~ /\A $Eutf2::q_char \z/mosx
ABCresult
0XX0
10X0
1100
1111
8887 0 $char[$i] .= join '', splice @char, $i+1, 2;
8888 }
8889 ▶ elsif (($i+1 <= $#char) and (grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms, $char[$i+1 ]) == 1) and (CORE::eval(sprintf '"%s%s"', @char[$i..$i+1]) =~ /\A $q_char \z/oxms)) {
Condition0%0/6
$i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 and eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
!ll&&!rl&&r
000
$i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1
!ll&&!rl&&r
000
MC/DC0%0/3
$i + 1 <= $#char and grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 and eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
$i + 1 <= $#char grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1 eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
Truth table0%0/4
A and B and C
A= $i + 1 <= $#charB= grep(/\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/mosx, $char[$i + 1]) == 1C= eval(sprintf "\"%s%s\"", @char[$i .. $i + 1]) =~ /\A $Eutf2::q_char \z/mosx
ABCresult
0XX0
10X0
1100
1111
8890 0 $char[$i] .= join '', splice @char, $i+1, 1;
8891 }
8892 }
8893  
8894 # open character class [...]
8895 elsif ($char[$i] eq '[') {
8896 3 my $left = $i;
8897 3 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 3 3
8898 0 $i++;
8899 }
8900 3 while (1) {
8901 7 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 7 7
8902 0 die __FILE__, ": Unmatched [] in regexp\n";
8903 }
8904 7 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 3 4 7
8905 3 my $right = $i;
8906  
8907 # [...]
8908 3 ▶ if (grep(/\A [\$\@]/oxms,@char[$left+1..$right-1]) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep(/\A [\$\@]/mosx, @char[$left + 1 .. $right - 1]) >= 1) { } 0 3 3
8909 0 splice @char, $left, $right-$left+1, sprintf(q{@{[Eutf2::charlist_qr(%s,'%s')]}}, join(',', map {qq_stuff($delimiter,$end_delimiter,$_)} @char[$left+1..$right-1]), $modifier);
8910 }
8911 else {
8912 3 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
8913 }
8914  
8915 3 $i = $left;
8916 3 last;
8917 }
8918 }
8919 }
8920  
8921 # open character class [^...]
8922 elsif ($char[$i] eq '[^') {
8923 1 my $left = $i;
8924 1 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 1 1
8925 0 $i++;
8926 }
8927 1 while (1) {
8928 2 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 2 2
8929 0 die __FILE__, ": Unmatched [] in regexp\n";
8930 }
8931 2 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 1 1 2
8932 1 my $right = $i;
8933  
8934 # [^...]
8935 1 ▶ if (grep(/\A [\$\@]/oxms,@char[$left+1..$right-1]) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep(/\A [\$\@]/mosx, @char[$left + 1 .. $right - 1]) >= 1) { } 0 1 1
8936 0 splice @char, $left, $right-$left+1, sprintf(q{@{[Eutf2::charlist_not_qr(%s,'%s')]}}, join(',', map {qq_stuff($delimiter,$end_delimiter,$_)} @char[$left+1..$right-1]), $modifier);
8937 }
8938 else {
8939 1 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
8940 }
8941  
8942 1 $i = $left;
8943 1 last;
8944 }
8945 }
8946 }
8947  
8948 # rewrite character class or escape character
8949 elsif (my $char = character_class($char[$i],$modifier)) {
8950 5 $char[$i] = $char;
8951 }
8952  
8953 # P.794 29.2.161. split
8954 # in Chapter 29: Functions
8955 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
8956  
8957 # P.951 split
8958 # in Chapter 27: Functions
8959 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
8960  
8961 # said "The //m modifier is assumed when you split on the pattern /^/",
8962 # but perl5.008 is not so. Therefore, this software adds //m.
8963 # (and so on)
8964  
8965 # split(m/^/) --> split(m/^/m)
8966 ▶ elsif (($char[$i] eq '^') and ($modifier !~ /m/oxms)) {
Condition100%3/3
$char[$i] eq "^" and not $modifier =~ /m/mosx
!ll&&!rl&&r
261311
MC/DC100%2/2
$char[$i] eq "^" and not $modifier =~ /m/mosx
$char[$i] eq "^" not $modifier =~ /m/mosx
Truth table100%3/3
A and not(B)
A= $char[$i] eq "^"B= not $modifier =~ /m/mosx
ABresult
0X0
100
111
8967 11 $modifier .= 'm';
8968 }
8969  
8970 # /i modifier
8971 ▶ elsif ($ignorecase and ($char[$i] =~ /\A [\x00-\xFF] \z/oxms) and (Eutf2::uc($char[$i]) ne Eutf2::fc($char[$i]))) {
Condition33%2/6
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
!ll&&!rl&&r
26400
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx
!ll&&!rl&&r
26400
MC/DC0%0/3
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
$ignorecase $char[$i] =~ /\A [\x00-\xFF] \z/mosx &Eutf2::uc($char[$i]) ne &fc($char[$i])
Truth table25%1/4
A and B and C
A= $ignorecaseB= $char[$i] =~ /\A [\x00-\xFF] \z/mosxC= &Eutf2::uc($char[$i]) ne &fc($char[$i])
ABCresult
0XX0
10X0
1100
1111
8972 0 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 0 0 0
8973 0 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
8974 }
8975 else {
8976 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
8977 }
8978 }
8979  
8980 # \u \l \U \L \F \Q \E
8981 elsif ($char[$i] =~ /\A ([<>]) \z/oxms) {
8982 2 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) 0 2 2
8983 0 $char[$i] = '\\' . $char[$i];
8984 }
8985 }
8986 elsif ($char[$i] eq '\u') {
8987 0 $char[$i] = '@{[Eutf2::ucfirst qq<';
8988 0 $left_e++;
8989 }
8990 elsif ($char[$i] eq '\l') {
8991 0 $char[$i] = '@{[Eutf2::lcfirst qq<';
8992 0 $left_e++;
8993 }
8994 elsif ($char[$i] eq '\U') {
8995 0 $char[$i] = '@{[Eutf2::uc qq<';
8996 0 $left_e++;
8997 }
8998 elsif ($char[$i] eq '\L') {
8999 0 $char[$i] = '@{[Eutf2::lc qq<';
9000 0 $left_e++;
9001 }
9002 elsif ($char[$i] eq '\F') {
9003 0 $char[$i] = '@{[Eutf2::fc qq<';
9004 0 $left_e++;
9005 }
9006 elsif ($char[$i] eq '\Q') {
9007 0 $char[$i] = '@{[CORE::quotemeta qq<';
9008 0 $left_e++;
9009 }
9010 elsif ($char[$i] eq '\E') {
9011 0 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) { } 0 0 0
9012 0 $char[$i] = '>]}';
9013 0 $right_e++;
9014 }
9015 else {
9016 0 $char[$i] = '';
9017 }
9018 }
9019 elsif ($char[$i] eq '\Q') {
9020 0 while (1) {
9021 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
9022 0 last;
9023 }
9024 0 ▶ if ($char[$i] eq '\E') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "\\E") 0 0 0
9025 0 last;
9026 }
9027 }
9028 }
9029 elsif ($char[$i] eq '\E') {
9030 }
9031  
9032 # $0 --> $0
9033 elsif ($char[$i] =~ /\A \$ 0 \z/oxms) {
9034 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
9035 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
9036 }
9037 }
9038 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/oxms) {
9039 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
9040 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
9041 }
9042 }
9043  
9044 # $$ --> $$
9045 elsif ($char[$i] =~ /\A \$\$ \z/oxms) {
9046 }
9047  
9048 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
9049 # $1, $2, $3 --> $1, $2, $3 otherwise
9050 elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/oxms) {
9051 0 $char[$i] = e_capture($1);
9052 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
9053 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
9054 }
9055 }
9056 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
9057 0 $char[$i] = e_capture($1);
9058 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
9059 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
9060 }
9061 }
9062  
9063 # $$foo[ ... ] --> $ $foo->[ ... ]
9064 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/oxms) {
9065 0 $char[$i] = e_capture($1.'->'.$2);
9066 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
9067 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
9068 }
9069 }
9070  
9071 # $$foo{ ... } --> $ $foo->{ ... }
9072 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/oxms) {
9073 0 $char[$i] = e_capture($1.'->'.$2);
9074 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
9075 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
9076 }
9077 }
9078  
9079 # $$foo
9080 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/oxms) {
9081 0 $char[$i] = e_capture($1);
9082 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
9083 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
9084 }
9085 }
9086  
9087 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
9088 elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/oxmsgc) {
9089 12 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 12 12
9090 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::PREMATCH())]}';
9091 }
9092 else {
9093 12 $char[$i] = '@{[Eutf2::PREMATCH()]}';
9094 }
9095 }
9096  
9097 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
9098 elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/oxmsgc) {
9099 12 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 12 12
9100 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::MATCH())]}';
9101 }
9102 else {
9103 12 $char[$i] = '@{[Eutf2::MATCH()]}';
9104 }
9105 }
9106  
9107 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
9108 elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/oxmsgc) {
9109 9 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 9 9
9110 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::POSTMATCH())]}';
9111 }
9112 else {
9113 9 $char[$i] = '@{[Eutf2::POSTMATCH()]}';
9114 }
9115 }
9116  
9117 # ${ foo }
9118 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} \z/oxms) {
9119 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
9120 0 $char[$i] = '@{[Eutf2::ignorecase(' . $1 . ')]}';
9121 }
9122 }
9123  
9124 # ${ ... }
9125 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/oxms) {
9126 0 $char[$i] = e_capture($1);
9127 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
9128 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
9129 }
9130 }
9131  
9132 # $scalar or @array
9133 elsif ($char[$i] =~ /\A [\$\@].+ /oxms) {
9134 3 $char[$i] = e_string($char[$i]);
9135 3 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 3 3
9136 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
9137 }
9138 }
9139  
9140 # quote character before ? + * {
9141 ▶ elsif (($i >= 1) and ($char[$i] =~ /\A [\?\+\*\{] \z/oxms)) {
Condition100%3/3
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
!ll&&!rl&&r
521677
MC/DC100%2/2
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
$i >= 1 $char[$i] =~ /\A [\?\+\*\{] \z/mosx
Truth table100%3/3
A and B
A= $i >= 1B= $char[$i] =~ /\A [\?\+\*\{] \z/mosx
ABresult
0X0
100
111
9142 7 ▶ if ($char[$i-1] =~ /\A (?:[\x00-\xFF]|\\[0-7]{2,3}|\\x[0-9-A-Fa-f]{1,2}) \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i - 1] =~ /\A (?:[\x00-\xFF]|\\[0-7]{2,3}|\\x[0-9-A-Fa-f]{1,2}) \z/mosx) { } 3 4 7
9143 }
9144 else {
9145 4 $char[$i-1] = '(?:' . $char[$i-1] . ')';
9146 }
9147 }
9148 }
9149  
9150 # make regexp string
9151 101 $modifier =~ tr/i//d;
9152 101 ▶ if ($left_e > $right_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($left_e > $right_e) 0 101 101
9153 0 return join '', 'Eutf2::split', $ope, $delimiter, @char, '>]}' x ($left_e - $right_e), $end_delimiter, $modifier;
9154 }
9155 101 return join '', 'Eutf2::split', $ope, $delimiter, @char, $end_delimiter, $modifier;
9156 }
9157  
9158 #
9159 # escape regexp of split qr''
9160 #
9161 0 ▶sub e_split_q {
Subroutine e_split_q: not called CC=26 SCAR=65.5
Pod undocumented
9162 0 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
9163 0 ▶ $modifier ||= '';
Condition0%0/2
$modifier ||= ""
l!l
00
MC/DC0%0/1
$modifier ||= ""
$modifier
Truth table0%0/2
A
A= $modifier
Aresult
11
00
9164  
9165 0 $modifier =~ tr/p//d;
9166 0 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 0 0
9167 0 my $line = 0;
9168 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
9169 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
9170 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
9171 0 last;
9172 }
9173 }
9174 0 die qq{Unsupported modifier "$1" used at line $line.\n};
9175 }
9176  
9177 0 $slash = 'div';
9178  
9179 # /b /B modifier
9180 0 ▶ if ($modifier =~ tr/bB//d) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ tr/Bb//d) 0 0 0
9181 0 return join '', 'split', $ope, $delimiter, $string, $end_delimiter, $modifier;
9182 }
9183  
9184 0 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 0 0 0
9185  
9186 # split regexp
9187 0 my @char = $string =~ /\G((?>
9188 [^\x80-\xFF\\\[] |
9189 (?:[\xC2-\xDF]|[\xE0-\xE0][\xA0-\xBF]|[\xE1-\xEC][\x80-\xBF]|[\xED-\xED][\x80-\x9F]|[\xEE-\xEF][\x80-\xBF]|[\xF0-\xF0][\x90-\xBF][\x80-\xBF]|[\xF1-\xF3][\x80-\xBF][\x80-\xBF]|[\xF4-\xF4][\x80-\x8F][\x80-\xBF])[\x80-\xBF] |
9190 \[\^ |
9191 \[\: (?>[a-z]+) \:\] |
9192 \[\:\^ (?>[a-z]+) \:\] |
9193 \\ (?:$q_char) |
9194 (?:$q_char)
9195 ))/oxmsg;
9196  
9197 # unescape character
9198 0 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 0 0 0
9199 0 ▶ if (0) {
Branch: 6 branches
BranchTrueFalseTotal
if (do { $char[$i] eq '[' }) { } 0 0 0
elsif ($char[$i] eq '[^') { } 0 0 0
elsif (my $char = character_class($char[$i], $modifier)) { } 0 0 0
elsif ($char[$i] eq '^' and not $modifier =~ /m/mosx) { } 0 0 0
elsif ($ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])) { } 0 0 0
elsif ($i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx) { } 0 0 0
9200 }
9201  
9202 # open character class [...]
9203 elsif ($char[$i] eq '[') {
9204 0 my $left = $i;
9205 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
9206 0 $i++;
9207 }
9208 0 while (1) {
9209 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
9210 0 die __FILE__, ": Unmatched [] in regexp\n";
9211 }
9212 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
9213 0 my $right = $i;
9214  
9215 # [...]
9216 0 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
9217  
9218 0 $i = $left;
9219 0 last;
9220 }
9221 }
9222 }
9223  
9224 # open character class [^...]
9225 elsif ($char[$i] eq '[^') {
9226 0 my $left = $i;
9227 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
9228 0 $i++;
9229 }
9230 0 while (1) {
9231 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
9232 0 die __FILE__, ": Unmatched [] in regexp\n";
9233 }
9234 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
9235 0 my $right = $i;
9236  
9237 # [^...]
9238 0 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
9239  
9240 0 $i = $left;
9241 0 last;
9242 }
9243 }
9244 }
9245  
9246 # rewrite character class or escape character
9247 elsif (my $char = character_class($char[$i],$modifier)) {
9248 0 $char[$i] = $char;
9249 }
9250  
9251 # split(m/^/) --> split(m/^/m)
9252 ▶ elsif (($char[$i] eq '^') and ($modifier !~ /m/oxms)) {
Condition0%0/3
$char[$i] eq "^" and not $modifier =~ /m/mosx
!ll&&!rl&&r
000
MC/DC0%0/2
$char[$i] eq "^" and not $modifier =~ /m/mosx
$char[$i] eq "^" not $modifier =~ /m/mosx
Truth table0%0/3
A and not(B)
A= $char[$i] eq "^"B= not $modifier =~ /m/mosx
ABresult
0X0
100
111
9253 0 $modifier .= 'm';
9254 }
9255  
9256 # /i modifier
9257 ▶ elsif ($ignorecase and ($char[$i] =~ /\A [\x00-\xFF] \z/oxms) and (Eutf2::uc($char[$i]) ne Eutf2::fc($char[$i]))) {
Condition0%0/6
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
!ll&&!rl&&r
000
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx
!ll&&!rl&&r
000
MC/DC0%0/3
$ignorecase and $char[$i] =~ /\A [\x00-\xFF] \z/mosx and &Eutf2::uc($char[$i]) ne &fc($char[$i])
$ignorecase $char[$i] =~ /\A [\x00-\xFF] \z/mosx &Eutf2::uc($char[$i]) ne &fc($char[$i])
Truth table0%0/4
A and B and C
A= $ignorecaseB= $char[$i] =~ /\A [\x00-\xFF] \z/mosxC= &Eutf2::uc($char[$i]) ne &fc($char[$i])
ABCresult
0XX0
10X0
1100
1111
9258 0 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 0 0 0
9259 0 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
9260 }
9261 else {
9262 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
9263 }
9264 }
9265  
9266 # quote character before ? + * {
9267 ▶ elsif (($i >= 1) and ($char[$i] =~ /\A [\?\+\*\{] \z/oxms)) {
Condition0%0/3
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
!ll&&!rl&&r
000
MC/DC0%0/2
$i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx
$i >= 1 $char[$i] =~ /\A [\?\+\*\{] \z/mosx
Truth table0%0/3
A and B
A= $i >= 1B= $char[$i] =~ /\A [\?\+\*\{] \z/mosx
ABresult
0X0
100
111
9268 0 ▶ if ($char[$i-1] =~ /\A [\x00-\xFF] \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i - 1] =~ /\A [\x00-\xFF] \z/mosx) { } 0 0 0
9269 }
9270 else {
9271 0 $char[$i-1] = '(?:' . $char[$i-1] . ')';
9272 }
9273 }
9274 }
9275  
9276 0 $modifier =~ tr/i//d;
9277 0 return join '', 'Eutf2::split', $ope, $delimiter, @char, $end_delimiter, $modifier;
9278 }
9279  
9280 #
9281 # instead of Carp::carp
9282 #
9283 0 ▶sub carp {
Subroutine carp: not called CC=1 SCAR=6.9
Pod undocumented
9284 0 my($package,$filename,$line) = caller(1);
9285 0 print STDERR "@_ at $filename line $line.\n";
9286 }
9287  
9288 #
9289 # instead of Carp::croak
9290 #
9291 1 ▶sub croak {
Subroutine croak: called CC=1 SCAR=0.0
Pod undocumented
9292 1 my($package,$filename,$line) = caller(1);
9293 1 print STDERR "@_ at $filename line $line.\n";
9294 1 die "\n";
9295 }
9296  
9297 #
9298 # instead of Carp::cluck
9299 #
9300 0 ▶sub cluck {
Subroutine cluck: not called CC=2 SCAR=17.9
Pod undocumented
9301 0 my $i = 0;
9302 0 my @cluck = ();
9303 0 ▶ while (my($package,$filename,$line,$subroutine) = caller($i)) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
9304 0 push @cluck, "[$i] $filename($line) $package::$subroutine\n";
9305 0 $i++;
9306 }
9307 0 print STDERR CORE::reverse @cluck;
9308 0 print STDERR "\n";
9309 0 print STDERR @_;
9310 }
9311  
9312 #
9313 # instead of Carp::confess
9314 #
9315 0 ▶sub confess {
Subroutine confess: not called CC=2 SCAR=17.9
Pod undocumented
9316 0 my $i = 0;
9317 0 my @confess = ();
9318 0 ▶ while (my($package,$filename,$line,$subroutine) = caller($i)) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
9319 0 push @confess, "[$i] $filename($line) $package::$subroutine\n";
9320 0 $i++;
9321 }
9322 0 print STDERR CORE::reverse @confess;
9323 0 print STDERR "\n";
9324 0 print STDERR @_;
9325 0 die "\n";
9326 }
9327  
9328 629 1;
9329  
9330 __END__
↑ Summary blib/lib/UTF2.pm »