Eutf2.pm

filter: Statementstmt 51.9% 1603 / 3086 Branchbran 48.2% 1273 / 2638 Conditioncond 44.0% 163 / 370 MC/DCmcdc 28.6% 63 / 220 Subroutinesub 78.9% 139 / 176 Podpod 4.6% 3 / 64 totaltotal 49.5% 3244 / 6554 CC 1490 SCAR 94.3
CC
1490
Cov
50%
escape_token
39986.7
e_s1
2752.5
_do_glob
1980.0
CRAP 12472.5
↑ Summary UTF2.pm »
1 package Eutf2;
2 632 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 631 ▶BEGIN { $INC{'warnings.pm'} = '' if $] < 5.006 } use warnings;
Subroutine BEGIN: called CC=2 SCAR=7.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
if $] < "5.006" 0 631 631
4 ######################################################################
5 #
6 # Eutf2 - Run-time routines for UTF2.pm
7 #
8 # http://search.cpan.org/dist/Char-UTF2/
9 #
10 # Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2018, 2019 INABA Hitoshi <ina@cpan.org>
11 ######################################################################
12  
13 631 ▶use 5.00503; # Galapagos Consensus 1998 for primetools
Subroutine BEGIN: called CC=1 SCAR=0.0
14 # use 5.008001; # Lancaster Consensus 2013 for toolchains
15  
16 # 12.3. Delaying use Until Runtime
17 # in Chapter 12. Packages, Libraries, and Modules
18 # of ISBN 0-596-00313-7 Perl Cookbook, 2nd Edition.
19 # (and so on)
20  
21 # Version numbers should be boring
22 # http://www.dagolden.com/index.php/369/version-numbers-should-be-boring/
23 # For the impatient, the disinterested or those who just want to follow
24 # a recipe, my advice for all modules is this:
25 # our $VERSION = "0.001"; # or "0.001_001" for a dev release
26 # $VERSION = eval $VERSION; # No!! because '1.10' makes '1.1'
27  
28 631 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
29 631 $VERSION = '1.22';
30 631 $VERSION = $VERSION;
31  
32 631 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=7.6
33 631 ▶ if ($^X =~ / jperl /oxmsi) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^X =~ / jperl /imosx) 0 631 631
34 0 die __FILE__, ": needs perl(not jperl) 5.00503 or later. (\$^X==$^X)\n";
35 }
36 631 if (CORE::ord('A') == 193) {
37 die __FILE__, ": is not US-ASCII script (may be EBCDIC or EBCDIK script).\n";
38 }
39 631 if (CORE::ord('A') != 0x41) {
40 die __FILE__, ": is not US-ASCII script (must be US-ASCII script).\n";
41 }
42 }
43  
44 631 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=9.5
45  
46 # instead of utf8.pm
47 631 ▶ 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
48 no warnings qw(redefine);
49 *utf8::upgrade = sub { CORE::length $_[0] };
50 *utf8::downgrade = sub { 1 };
51 *utf8::encode = sub { };
52 *utf8::decode = sub { 1 };
53 *utf8::is_utf8 = sub { };
54 *utf8::valid = sub { 1 };
55 };
56 631 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 631 631
57 0 ▶ *utf8::upgrade = sub { CORE::length $_[0] };
Subroutine __ANON__: not called CC=1 SCAR=6.9
58 0 ▶ *utf8::downgrade = sub { 1 };
Subroutine __ANON__: not called CC=1 SCAR=6.9
59 0 ▶ *utf8::encode = sub { };
Subroutine __ANON__: not called CC=1 SCAR=6.9
60 0 ▶ *utf8::decode = sub { 1 };
Subroutine __ANON__: not called CC=1 SCAR=6.9
61 0 ▶ *utf8::is_utf8 = sub { };
Subroutine __ANON__: not called CC=1 SCAR=6.9
62 0 ▶ *utf8::valid = sub { 1 };
Subroutine __ANON__: not called CC=1 SCAR=6.9
63 }
64 }
65  
66 # instead of Symbol.pm
67 BEGIN {
68 0 ▶ sub gensym () {
Subroutine gensym: not called CC=2 SCAR=17.9
Pod undocumented
69 0 ▶ if ($] < 5.006) {
Branch: 1 branch
BranchTrueFalseTotal
if ($] < 5.006) { } 0 0 0
70 0 return \do { local *_ };
71 }
72 else {
73 0 return undef;
74 }
75 }
76  
77 56 ▶ sub qualify ($$) {
Subroutine qualify: called CC=8 SCAR=28.9
Pod undocumented
78 56 my($name) = @_;
79  
80 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
81 14 return $name;
82 }
83 elsif (Eutf2::index($name,'::') >= 0) {
84 0 return $name;
85 }
86 elsif (Eutf2::index($name,"'") >= 0) {
87 0 return $name;
88 }
89  
90 # special character, "^xyz"
91 elsif ($name =~ /\A \^ [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]+ \z/x) {
92  
93 # RGS 2001-11-05 : translate leading ^X to control-char
94 0 $name =~ s{\A \^ ([ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]) }{'qq(\c'.$1.')'}xee;
95 0 return 'main::' . $name;
96 }
97  
98 # Global names
99 elsif ($name =~ /\A (?: ARGV | ARGVOUT | ENV | INC | SIG | STDERR | STDIN | STDOUT ) \z/x) {
100 0 return 'main::' . $name;
101 }
102  
103 # or other
104 elsif ($name =~ /\A [^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz] \z/x) {
105 0 return 'main::' . $name;
106 }
107  
108 elsif (defined $_[1]) {
109 42 return $_[1] . '::' . $name;
110 }
111 else {
112 0 return (caller)[0] . '::' . $name;
113 }
114 }
115  
116 56 ▶ sub qualify_to_ref ($;$) {
Subroutine qualify_to_ref: called CC=2 SCAR=7.2
Pod undocumented
117 56 ▶ if (defined $_[1]) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_[1]) { } 56 0 56
118 631 ▶ no strict qw(refs);
Subroutine BEGIN: called CC=1 SCAR=0.0
119 56 return \*{ qualify $_[0], $_[1] };
120 }
121 else {
122 631 ▶ no strict qw(refs);
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: not called CC=1 SCAR=0.0
123 0 return \*{ qualify $_[0], (caller)[0] };
124 }
125 }
126 }
127  
128 # P.714 29.2.39. flock
129 # in Chapter 29: Functions
130 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
131  
132 # P.863 flock
133 # in Chapter 27: Functions
134 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
135  
136 sub LOCK_SH() {1}
137 sub LOCK_EX() {2}
138 sub LOCK_UN() {8}
139 sub LOCK_NB() {4}
140  
141 # instead of Carp.pm
142 sub carp;
143 sub croak;
144 sub cluck;
145 sub confess;
146  
147 # 6.18. Matching Multiple-Byte Characters
148 # in Chapter 6. Pattern Matching
149 # of ISBN 978-1-56592-243-3 Perl Perl Cookbook.
150 # (and so on)
151  
152 # regexp of character
153 631 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]};
154 631 ▶use vars qw($qq_char); $qq_char = qr/\\c[\x40-\x5F]|\\?(?:$your_char)/oxms;
Subroutine BEGIN: called CC=1 SCAR=0.0
155 631 ▶use vars qw($q_char); $q_char = qr/$your_char/oxms;
Subroutine BEGIN: called CC=1 SCAR=0.0
156  
157 #
158 # UTF-8 character range per length
159 #
160 631 my %range_tr = ();
161  
162 #
163 # UTF-8 case conversion
164 #
165 631 my %lc = ();
166 631 @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)} =
167 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);
168 631 my %uc = ();
169 631 @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)} =
170 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);
171 631 my %fc = ();
172 631 @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)} =
173 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);
174  
175 631 ▶if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { __PACKAGE__ =~ / \b Eutf2 \z/mosx }) { } 631 0 631
176 }
177  
178 elsif (__PACKAGE__ =~ / \b Eutf2 \z/oxms) {
179 631 %range_tr = (
180 1 => [ [0x00..0x7F],
181 [0xF5..0xFF], # malformed octet
182 ],
183 2 => [ [0xC2..0xDF],[0x80..0xBF],
184 ],
185 3 => [ [0xE0..0xE0],[0xA0..0xBF],[0x80..0xBF],
186 [0xE1..0xEC],[0x80..0xBF],[0x80..0xBF],
187 [0xED..0xED],[0x80..0x9F],[0x80..0xBF],
188 [0xEE..0xEF],[0x80..0xBF],[0x80..0xBF],
189 ],
190 4 => [ [0xF0..0xF0],[0x90..0xBF],[0x80..0xBF],[0x80..0xBF],
191 [0xF1..0xF3],[0x80..0xBF],[0x80..0xBF],[0x80..0xBF],
192 [0xF4..0xF4],[0x80..0x8F],[0x80..0xBF],[0x80..0xBF],
193 ],
194 );
195  
196 # CaseFolding-12.0.0.txt
197 # Date: 2019-01-22, 08:18:22 GMT
198 # c 2019 UnicodeR, Inc.
199 # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries.
200 # For terms of use, see http://www.unicode.org/terms_of_use.html
201 #
202 # Unicode Character Database
203 # For documentation, see http://www.unicode.org/reports/tr44/
204  
205 # you can use "make_CaseFolding.pl" to update this hash
206  
207 631 %fc = (
208 "\x41" => "\x61", # LATIN CAPITAL LETTER A
209 "\x42" => "\x62", # LATIN CAPITAL LETTER B
210 "\x43" => "\x63", # LATIN CAPITAL LETTER C
211 "\x44" => "\x64", # LATIN CAPITAL LETTER D
212 "\x45" => "\x65", # LATIN CAPITAL LETTER E
213 "\x46" => "\x66", # LATIN CAPITAL LETTER F
214 "\x47" => "\x67", # LATIN CAPITAL LETTER G
215 "\x48" => "\x68", # LATIN CAPITAL LETTER H
216 "\x49" => "\x69", # LATIN CAPITAL LETTER I
217 "\x4A" => "\x6A", # LATIN CAPITAL LETTER J
218 "\x4B" => "\x6B", # LATIN CAPITAL LETTER K
219 "\x4C" => "\x6C", # LATIN CAPITAL LETTER L
220 "\x4D" => "\x6D", # LATIN CAPITAL LETTER M
221 "\x4E" => "\x6E", # LATIN CAPITAL LETTER N
222 "\x4F" => "\x6F", # LATIN CAPITAL LETTER O
223 "\x50" => "\x70", # LATIN CAPITAL LETTER P
224 "\x51" => "\x71", # LATIN CAPITAL LETTER Q
225 "\x52" => "\x72", # LATIN CAPITAL LETTER R
226 "\x53" => "\x73", # LATIN CAPITAL LETTER S
227 "\x54" => "\x74", # LATIN CAPITAL LETTER T
228 "\x55" => "\x75", # LATIN CAPITAL LETTER U
229 "\x56" => "\x76", # LATIN CAPITAL LETTER V
230 "\x57" => "\x77", # LATIN CAPITAL LETTER W
231 "\x58" => "\x78", # LATIN CAPITAL LETTER X
232 "\x59" => "\x79", # LATIN CAPITAL LETTER Y
233 "\x5A" => "\x7A", # LATIN CAPITAL LETTER Z
234 "\xC2\xB5" => "\xCE\xBC", # MICRO SIGN
235 "\xC3\x80" => "\xC3\xA0", # LATIN CAPITAL LETTER A WITH GRAVE
236 "\xC3\x81" => "\xC3\xA1", # LATIN CAPITAL LETTER A WITH ACUTE
237 "\xC3\x82" => "\xC3\xA2", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX
238 "\xC3\x83" => "\xC3\xA3", # LATIN CAPITAL LETTER A WITH TILDE
239 "\xC3\x84" => "\xC3\xA4", # LATIN CAPITAL LETTER A WITH DIAERESIS
240 "\xC3\x85" => "\xC3\xA5", # LATIN CAPITAL LETTER A WITH RING ABOVE
241 "\xC3\x86" => "\xC3\xA6", # LATIN CAPITAL LETTER AE
242 "\xC3\x87" => "\xC3\xA7", # LATIN CAPITAL LETTER C WITH CEDILLA
243 "\xC3\x88" => "\xC3\xA8", # LATIN CAPITAL LETTER E WITH GRAVE
244 "\xC3\x89" => "\xC3\xA9", # LATIN CAPITAL LETTER E WITH ACUTE
245 "\xC3\x8A" => "\xC3\xAA", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX
246 "\xC3\x8B" => "\xC3\xAB", # LATIN CAPITAL LETTER E WITH DIAERESIS
247 "\xC3\x8C" => "\xC3\xAC", # LATIN CAPITAL LETTER I WITH GRAVE
248 "\xC3\x8D" => "\xC3\xAD", # LATIN CAPITAL LETTER I WITH ACUTE
249 "\xC3\x8E" => "\xC3\xAE", # LATIN CAPITAL LETTER I WITH CIRCUMFLEX
250 "\xC3\x8F" => "\xC3\xAF", # LATIN CAPITAL LETTER I WITH DIAERESIS
251 "\xC3\x90" => "\xC3\xB0", # LATIN CAPITAL LETTER ETH
252 "\xC3\x91" => "\xC3\xB1", # LATIN CAPITAL LETTER N WITH TILDE
253 "\xC3\x92" => "\xC3\xB2", # LATIN CAPITAL LETTER O WITH GRAVE
254 "\xC3\x93" => "\xC3\xB3", # LATIN CAPITAL LETTER O WITH ACUTE
255 "\xC3\x94" => "\xC3\xB4", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX
256 "\xC3\x95" => "\xC3\xB5", # LATIN CAPITAL LETTER O WITH TILDE
257 "\xC3\x96" => "\xC3\xB6", # LATIN CAPITAL LETTER O WITH DIAERESIS
258 "\xC3\x98" => "\xC3\xB8", # LATIN CAPITAL LETTER O WITH STROKE
259 "\xC3\x99" => "\xC3\xB9", # LATIN CAPITAL LETTER U WITH GRAVE
260 "\xC3\x9A" => "\xC3\xBA", # LATIN CAPITAL LETTER U WITH ACUTE
261 "\xC3\x9B" => "\xC3\xBB", # LATIN CAPITAL LETTER U WITH CIRCUMFLEX
262 "\xC3\x9C" => "\xC3\xBC", # LATIN CAPITAL LETTER U WITH DIAERESIS
263 "\xC3\x9D" => "\xC3\xBD", # LATIN CAPITAL LETTER Y WITH ACUTE
264 "\xC3\x9E" => "\xC3\xBE", # LATIN CAPITAL LETTER THORN
265 "\xC3\x9F" => "\x73\x73", # LATIN SMALL LETTER SHARP S
266 "\xC4\x80" => "\xC4\x81", # LATIN CAPITAL LETTER A WITH MACRON
267 "\xC4\x82" => "\xC4\x83", # LATIN CAPITAL LETTER A WITH BREVE
268 "\xC4\x84" => "\xC4\x85", # LATIN CAPITAL LETTER A WITH OGONEK
269 "\xC4\x86" => "\xC4\x87", # LATIN CAPITAL LETTER C WITH ACUTE
270 "\xC4\x88" => "\xC4\x89", # LATIN CAPITAL LETTER C WITH CIRCUMFLEX
271 "\xC4\x8A" => "\xC4\x8B", # LATIN CAPITAL LETTER C WITH DOT ABOVE
272 "\xC4\x8C" => "\xC4\x8D", # LATIN CAPITAL LETTER C WITH CARON
273 "\xC4\x8E" => "\xC4\x8F", # LATIN CAPITAL LETTER D WITH CARON
274 "\xC4\x90" => "\xC4\x91", # LATIN CAPITAL LETTER D WITH STROKE
275 "\xC4\x92" => "\xC4\x93", # LATIN CAPITAL LETTER E WITH MACRON
276 "\xC4\x94" => "\xC4\x95", # LATIN CAPITAL LETTER E WITH BREVE
277 "\xC4\x96" => "\xC4\x97", # LATIN CAPITAL LETTER E WITH DOT ABOVE
278 "\xC4\x98" => "\xC4\x99", # LATIN CAPITAL LETTER E WITH OGONEK
279 "\xC4\x9A" => "\xC4\x9B", # LATIN CAPITAL LETTER E WITH CARON
280 "\xC4\x9C" => "\xC4\x9D", # LATIN CAPITAL LETTER G WITH CIRCUMFLEX
281 "\xC4\x9E" => "\xC4\x9F", # LATIN CAPITAL LETTER G WITH BREVE
282 "\xC4\xA0" => "\xC4\xA1", # LATIN CAPITAL LETTER G WITH DOT ABOVE
283 "\xC4\xA2" => "\xC4\xA3", # LATIN CAPITAL LETTER G WITH CEDILLA
284 "\xC4\xA4" => "\xC4\xA5", # LATIN CAPITAL LETTER H WITH CIRCUMFLEX
285 "\xC4\xA6" => "\xC4\xA7", # LATIN CAPITAL LETTER H WITH STROKE
286 "\xC4\xA8" => "\xC4\xA9", # LATIN CAPITAL LETTER I WITH TILDE
287 "\xC4\xAA" => "\xC4\xAB", # LATIN CAPITAL LETTER I WITH MACRON
288 "\xC4\xAC" => "\xC4\xAD", # LATIN CAPITAL LETTER I WITH BREVE
289 "\xC4\xAE" => "\xC4\xAF", # LATIN CAPITAL LETTER I WITH OGONEK
290 "\xC4\xB0" => "\x69\xCC\x87", # LATIN CAPITAL LETTER I WITH DOT ABOVE
291 "\xC4\xB2" => "\xC4\xB3", # LATIN CAPITAL LIGATURE IJ
292 "\xC4\xB4" => "\xC4\xB5", # LATIN CAPITAL LETTER J WITH CIRCUMFLEX
293 "\xC4\xB6" => "\xC4\xB7", # LATIN CAPITAL LETTER K WITH CEDILLA
294 "\xC4\xB9" => "\xC4\xBA", # LATIN CAPITAL LETTER L WITH ACUTE
295 "\xC4\xBB" => "\xC4\xBC", # LATIN CAPITAL LETTER L WITH CEDILLA
296 "\xC4\xBD" => "\xC4\xBE", # LATIN CAPITAL LETTER L WITH CARON
297 "\xC4\xBF" => "\xC5\x80", # LATIN CAPITAL LETTER L WITH MIDDLE DOT
298 "\xC5\x81" => "\xC5\x82", # LATIN CAPITAL LETTER L WITH STROKE
299 "\xC5\x83" => "\xC5\x84", # LATIN CAPITAL LETTER N WITH ACUTE
300 "\xC5\x85" => "\xC5\x86", # LATIN CAPITAL LETTER N WITH CEDILLA
301 "\xC5\x87" => "\xC5\x88", # LATIN CAPITAL LETTER N WITH CARON
302 "\xC5\x89" => "\xCA\xBC\x6E", # LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
303 "\xC5\x8A" => "\xC5\x8B", # LATIN CAPITAL LETTER ENG
304 "\xC5\x8C" => "\xC5\x8D", # LATIN CAPITAL LETTER O WITH MACRON
305 "\xC5\x8E" => "\xC5\x8F", # LATIN CAPITAL LETTER O WITH BREVE
306 "\xC5\x90" => "\xC5\x91", # LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
307 "\xC5\x92" => "\xC5\x93", # LATIN CAPITAL LIGATURE OE
308 "\xC5\x94" => "\xC5\x95", # LATIN CAPITAL LETTER R WITH ACUTE
309 "\xC5\x96" => "\xC5\x97", # LATIN CAPITAL LETTER R WITH CEDILLA
310 "\xC5\x98" => "\xC5\x99", # LATIN CAPITAL LETTER R WITH CARON
311 "\xC5\x9A" => "\xC5\x9B", # LATIN CAPITAL LETTER S WITH ACUTE
312 "\xC5\x9C" => "\xC5\x9D", # LATIN CAPITAL LETTER S WITH CIRCUMFLEX
313 "\xC5\x9E" => "\xC5\x9F", # LATIN CAPITAL LETTER S WITH CEDILLA
314 "\xC5\xA0" => "\xC5\xA1", # LATIN CAPITAL LETTER S WITH CARON
315 "\xC5\xA2" => "\xC5\xA3", # LATIN CAPITAL LETTER T WITH CEDILLA
316 "\xC5\xA4" => "\xC5\xA5", # LATIN CAPITAL LETTER T WITH CARON
317 "\xC5\xA6" => "\xC5\xA7", # LATIN CAPITAL LETTER T WITH STROKE
318 "\xC5\xA8" => "\xC5\xA9", # LATIN CAPITAL LETTER U WITH TILDE
319 "\xC5\xAA" => "\xC5\xAB", # LATIN CAPITAL LETTER U WITH MACRON
320 "\xC5\xAC" => "\xC5\xAD", # LATIN CAPITAL LETTER U WITH BREVE
321 "\xC5\xAE" => "\xC5\xAF", # LATIN CAPITAL LETTER U WITH RING ABOVE
322 "\xC5\xB0" => "\xC5\xB1", # LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
323 "\xC5\xB2" => "\xC5\xB3", # LATIN CAPITAL LETTER U WITH OGONEK
324 "\xC5\xB4" => "\xC5\xB5", # LATIN CAPITAL LETTER W WITH CIRCUMFLEX
325 "\xC5\xB6" => "\xC5\xB7", # LATIN CAPITAL LETTER Y WITH CIRCUMFLEX
326 "\xC5\xB8" => "\xC3\xBF", # LATIN CAPITAL LETTER Y WITH DIAERESIS
327 "\xC5\xB9" => "\xC5\xBA", # LATIN CAPITAL LETTER Z WITH ACUTE
328 "\xC5\xBB" => "\xC5\xBC", # LATIN CAPITAL LETTER Z WITH DOT ABOVE
329 "\xC5\xBD" => "\xC5\xBE", # LATIN CAPITAL LETTER Z WITH CARON
330 "\xC5\xBF" => "\x73", # LATIN SMALL LETTER LONG S
331 "\xC6\x81" => "\xC9\x93", # LATIN CAPITAL LETTER B WITH HOOK
332 "\xC6\x82" => "\xC6\x83", # LATIN CAPITAL LETTER B WITH TOPBAR
333 "\xC6\x84" => "\xC6\x85", # LATIN CAPITAL LETTER TONE SIX
334 "\xC6\x86" => "\xC9\x94", # LATIN CAPITAL LETTER OPEN O
335 "\xC6\x87" => "\xC6\x88", # LATIN CAPITAL LETTER C WITH HOOK
336 "\xC6\x89" => "\xC9\x96", # LATIN CAPITAL LETTER AFRICAN D
337 "\xC6\x8A" => "\xC9\x97", # LATIN CAPITAL LETTER D WITH HOOK
338 "\xC6\x8B" => "\xC6\x8C", # LATIN CAPITAL LETTER D WITH TOPBAR
339 "\xC6\x8E" => "\xC7\x9D", # LATIN CAPITAL LETTER REVERSED E
340 "\xC6\x8F" => "\xC9\x99", # LATIN CAPITAL LETTER SCHWA
341 "\xC6\x90" => "\xC9\x9B", # LATIN CAPITAL LETTER OPEN E
342 "\xC6\x91" => "\xC6\x92", # LATIN CAPITAL LETTER F WITH HOOK
343 "\xC6\x93" => "\xC9\xA0", # LATIN CAPITAL LETTER G WITH HOOK
344 "\xC6\x94" => "\xC9\xA3", # LATIN CAPITAL LETTER GAMMA
345 "\xC6\x96" => "\xC9\xA9", # LATIN CAPITAL LETTER IOTA
346 "\xC6\x97" => "\xC9\xA8", # LATIN CAPITAL LETTER I WITH STROKE
347 "\xC6\x98" => "\xC6\x99", # LATIN CAPITAL LETTER K WITH HOOK
348 "\xC6\x9C" => "\xC9\xAF", # LATIN CAPITAL LETTER TURNED M
349 "\xC6\x9D" => "\xC9\xB2", # LATIN CAPITAL LETTER N WITH LEFT HOOK
350 "\xC6\x9F" => "\xC9\xB5", # LATIN CAPITAL LETTER O WITH MIDDLE TILDE
351 "\xC6\xA0" => "\xC6\xA1", # LATIN CAPITAL LETTER O WITH HORN
352 "\xC6\xA2" => "\xC6\xA3", # LATIN CAPITAL LETTER OI
353 "\xC6\xA4" => "\xC6\xA5", # LATIN CAPITAL LETTER P WITH HOOK
354 "\xC6\xA6" => "\xCA\x80", # LATIN LETTER YR
355 "\xC6\xA7" => "\xC6\xA8", # LATIN CAPITAL LETTER TONE TWO
356 "\xC6\xA9" => "\xCA\x83", # LATIN CAPITAL LETTER ESH
357 "\xC6\xAC" => "\xC6\xAD", # LATIN CAPITAL LETTER T WITH HOOK
358 "\xC6\xAE" => "\xCA\x88", # LATIN CAPITAL LETTER T WITH RETROFLEX HOOK
359 "\xC6\xAF" => "\xC6\xB0", # LATIN CAPITAL LETTER U WITH HORN
360 "\xC6\xB1" => "\xCA\x8A", # LATIN CAPITAL LETTER UPSILON
361 "\xC6\xB2" => "\xCA\x8B", # LATIN CAPITAL LETTER V WITH HOOK
362 "\xC6\xB3" => "\xC6\xB4", # LATIN CAPITAL LETTER Y WITH HOOK
363 "\xC6\xB5" => "\xC6\xB6", # LATIN CAPITAL LETTER Z WITH STROKE
364 "\xC6\xB7" => "\xCA\x92", # LATIN CAPITAL LETTER EZH
365 "\xC6\xB8" => "\xC6\xB9", # LATIN CAPITAL LETTER EZH REVERSED
366 "\xC6\xBC" => "\xC6\xBD", # LATIN CAPITAL LETTER TONE FIVE
367 "\xC7\x84" => "\xC7\x86", # LATIN CAPITAL LETTER DZ WITH CARON
368 "\xC7\x85" => "\xC7\x86", # LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON
369 "\xC7\x87" => "\xC7\x89", # LATIN CAPITAL LETTER LJ
370 "\xC7\x88" => "\xC7\x89", # LATIN CAPITAL LETTER L WITH SMALL LETTER J
371 "\xC7\x8A" => "\xC7\x8C", # LATIN CAPITAL LETTER NJ
372 "\xC7\x8B" => "\xC7\x8C", # LATIN CAPITAL LETTER N WITH SMALL LETTER J
373 "\xC7\x8D" => "\xC7\x8E", # LATIN CAPITAL LETTER A WITH CARON
374 "\xC7\x8F" => "\xC7\x90", # LATIN CAPITAL LETTER I WITH CARON
375 "\xC7\x91" => "\xC7\x92", # LATIN CAPITAL LETTER O WITH CARON
376 "\xC7\x93" => "\xC7\x94", # LATIN CAPITAL LETTER U WITH CARON
377 "\xC7\x95" => "\xC7\x96", # LATIN CAPITAL LETTER U WITH DIAERESIS AND MACRON
378 "\xC7\x97" => "\xC7\x98", # LATIN CAPITAL LETTER U WITH DIAERESIS AND ACUTE
379 "\xC7\x99" => "\xC7\x9A", # LATIN CAPITAL LETTER U WITH DIAERESIS AND CARON
380 "\xC7\x9B" => "\xC7\x9C", # LATIN CAPITAL LETTER U WITH DIAERESIS AND GRAVE
381 "\xC7\x9E" => "\xC7\x9F", # LATIN CAPITAL LETTER A WITH DIAERESIS AND MACRON
382 "\xC7\xA0" => "\xC7\xA1", # LATIN CAPITAL LETTER A WITH DOT ABOVE AND MACRON
383 "\xC7\xA2" => "\xC7\xA3", # LATIN CAPITAL LETTER AE WITH MACRON
384 "\xC7\xA4" => "\xC7\xA5", # LATIN CAPITAL LETTER G WITH STROKE
385 "\xC7\xA6" => "\xC7\xA7", # LATIN CAPITAL LETTER G WITH CARON
386 "\xC7\xA8" => "\xC7\xA9", # LATIN CAPITAL LETTER K WITH CARON
387 "\xC7\xAA" => "\xC7\xAB", # LATIN CAPITAL LETTER O WITH OGONEK
388 "\xC7\xAC" => "\xC7\xAD", # LATIN CAPITAL LETTER O WITH OGONEK AND MACRON
389 "\xC7\xAE" => "\xC7\xAF", # LATIN CAPITAL LETTER EZH WITH CARON
390 "\xC7\xB0" => "\x6A\xCC\x8C", # LATIN SMALL LETTER J WITH CARON
391 "\xC7\xB1" => "\xC7\xB3", # LATIN CAPITAL LETTER DZ
392 "\xC7\xB2" => "\xC7\xB3", # LATIN CAPITAL LETTER D WITH SMALL LETTER Z
393 "\xC7\xB4" => "\xC7\xB5", # LATIN CAPITAL LETTER G WITH ACUTE
394 "\xC7\xB6" => "\xC6\x95", # LATIN CAPITAL LETTER HWAIR
395 "\xC7\xB7" => "\xC6\xBF", # LATIN CAPITAL LETTER WYNN
396 "\xC7\xB8" => "\xC7\xB9", # LATIN CAPITAL LETTER N WITH GRAVE
397 "\xC7\xBA" => "\xC7\xBB", # LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE
398 "\xC7\xBC" => "\xC7\xBD", # LATIN CAPITAL LETTER AE WITH ACUTE
399 "\xC7\xBE" => "\xC7\xBF", # LATIN CAPITAL LETTER O WITH STROKE AND ACUTE
400 "\xC8\x80" => "\xC8\x81", # LATIN CAPITAL LETTER A WITH DOUBLE GRAVE
401 "\xC8\x82" => "\xC8\x83", # LATIN CAPITAL LETTER A WITH INVERTED BREVE
402 "\xC8\x84" => "\xC8\x85", # LATIN CAPITAL LETTER E WITH DOUBLE GRAVE
403 "\xC8\x86" => "\xC8\x87", # LATIN CAPITAL LETTER E WITH INVERTED BREVE
404 "\xC8\x88" => "\xC8\x89", # LATIN CAPITAL LETTER I WITH DOUBLE GRAVE
405 "\xC8\x8A" => "\xC8\x8B", # LATIN CAPITAL LETTER I WITH INVERTED BREVE
406 "\xC8\x8C" => "\xC8\x8D", # LATIN CAPITAL LETTER O WITH DOUBLE GRAVE
407 "\xC8\x8E" => "\xC8\x8F", # LATIN CAPITAL LETTER O WITH INVERTED BREVE
408 "\xC8\x90" => "\xC8\x91", # LATIN CAPITAL LETTER R WITH DOUBLE GRAVE
409 "\xC8\x92" => "\xC8\x93", # LATIN CAPITAL LETTER R WITH INVERTED BREVE
410 "\xC8\x94" => "\xC8\x95", # LATIN CAPITAL LETTER U WITH DOUBLE GRAVE
411 "\xC8\x96" => "\xC8\x97", # LATIN CAPITAL LETTER U WITH INVERTED BREVE
412 "\xC8\x98" => "\xC8\x99", # LATIN CAPITAL LETTER S WITH COMMA BELOW
413 "\xC8\x9A" => "\xC8\x9B", # LATIN CAPITAL LETTER T WITH COMMA BELOW
414 "\xC8\x9C" => "\xC8\x9D", # LATIN CAPITAL LETTER YOGH
415 "\xC8\x9E" => "\xC8\x9F", # LATIN CAPITAL LETTER H WITH CARON
416 "\xC8\xA0" => "\xC6\x9E", # LATIN CAPITAL LETTER N WITH LONG RIGHT LEG
417 "\xC8\xA2" => "\xC8\xA3", # LATIN CAPITAL LETTER OU
418 "\xC8\xA4" => "\xC8\xA5", # LATIN CAPITAL LETTER Z WITH HOOK
419 "\xC8\xA6" => "\xC8\xA7", # LATIN CAPITAL LETTER A WITH DOT ABOVE
420 "\xC8\xA8" => "\xC8\xA9", # LATIN CAPITAL LETTER E WITH CEDILLA
421 "\xC8\xAA" => "\xC8\xAB", # LATIN CAPITAL LETTER O WITH DIAERESIS AND MACRON
422 "\xC8\xAC" => "\xC8\xAD", # LATIN CAPITAL LETTER O WITH TILDE AND MACRON
423 "\xC8\xAE" => "\xC8\xAF", # LATIN CAPITAL LETTER O WITH DOT ABOVE
424 "\xC8\xB0" => "\xC8\xB1", # LATIN CAPITAL LETTER O WITH DOT ABOVE AND MACRON
425 "\xC8\xB2" => "\xC8\xB3", # LATIN CAPITAL LETTER Y WITH MACRON
426 "\xC8\xBA" => "\xE2\xB1\xA5", # LATIN CAPITAL LETTER A WITH STROKE
427 "\xC8\xBB" => "\xC8\xBC", # LATIN CAPITAL LETTER C WITH STROKE
428 "\xC8\xBD" => "\xC6\x9A", # LATIN CAPITAL LETTER L WITH BAR
429 "\xC8\xBE" => "\xE2\xB1\xA6", # LATIN CAPITAL LETTER T WITH DIAGONAL STROKE
430 "\xC9\x81" => "\xC9\x82", # LATIN CAPITAL LETTER GLOTTAL STOP
431 "\xC9\x83" => "\xC6\x80", # LATIN CAPITAL LETTER B WITH STROKE
432 "\xC9\x84" => "\xCA\x89", # LATIN CAPITAL LETTER U BAR
433 "\xC9\x85" => "\xCA\x8C", # LATIN CAPITAL LETTER TURNED V
434 "\xC9\x86" => "\xC9\x87", # LATIN CAPITAL LETTER E WITH STROKE
435 "\xC9\x88" => "\xC9\x89", # LATIN CAPITAL LETTER J WITH STROKE
436 "\xC9\x8A" => "\xC9\x8B", # LATIN CAPITAL LETTER SMALL Q WITH HOOK TAIL
437 "\xC9\x8C" => "\xC9\x8D", # LATIN CAPITAL LETTER R WITH STROKE
438 "\xC9\x8E" => "\xC9\x8F", # LATIN CAPITAL LETTER Y WITH STROKE
439 "\xCD\x85" => "\xCE\xB9", # COMBINING GREEK YPOGEGRAMMENI
440 "\xCD\xB0" => "\xCD\xB1", # GREEK CAPITAL LETTER HETA
441 "\xCD\xB2" => "\xCD\xB3", # GREEK CAPITAL LETTER ARCHAIC SAMPI
442 "\xCD\xB6" => "\xCD\xB7", # GREEK CAPITAL LETTER PAMPHYLIAN DIGAMMA
443 "\xCD\xBF" => "\xCF\xB3", # GREEK CAPITAL LETTER YOT
444 "\xCE\x86" => "\xCE\xAC", # GREEK CAPITAL LETTER ALPHA WITH TONOS
445 "\xCE\x88" => "\xCE\xAD", # GREEK CAPITAL LETTER EPSILON WITH TONOS
446 "\xCE\x89" => "\xCE\xAE", # GREEK CAPITAL LETTER ETA WITH TONOS
447 "\xCE\x8A" => "\xCE\xAF", # GREEK CAPITAL LETTER IOTA WITH TONOS
448 "\xCE\x8C" => "\xCF\x8C", # GREEK CAPITAL LETTER OMICRON WITH TONOS
449 "\xCE\x8E" => "\xCF\x8D", # GREEK CAPITAL LETTER UPSILON WITH TONOS
450 "\xCE\x8F" => "\xCF\x8E", # GREEK CAPITAL LETTER OMEGA WITH TONOS
451 "\xCE\x90" => "\xCE\xB9\xCC\x88\xCC\x81", # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
452 "\xCE\x91" => "\xCE\xB1", # GREEK CAPITAL LETTER ALPHA
453 "\xCE\x92" => "\xCE\xB2", # GREEK CAPITAL LETTER BETA
454 "\xCE\x93" => "\xCE\xB3", # GREEK CAPITAL LETTER GAMMA
455 "\xCE\x94" => "\xCE\xB4", # GREEK CAPITAL LETTER DELTA
456 "\xCE\x95" => "\xCE\xB5", # GREEK CAPITAL LETTER EPSILON
457 "\xCE\x96" => "\xCE\xB6", # GREEK CAPITAL LETTER ZETA
458 "\xCE\x97" => "\xCE\xB7", # GREEK CAPITAL LETTER ETA
459 "\xCE\x98" => "\xCE\xB8", # GREEK CAPITAL LETTER THETA
460 "\xCE\x99" => "\xCE\xB9", # GREEK CAPITAL LETTER IOTA
461 "\xCE\x9A" => "\xCE\xBA", # GREEK CAPITAL LETTER KAPPA
462 "\xCE\x9B" => "\xCE\xBB", # GREEK CAPITAL LETTER LAMDA
463 "\xCE\x9C" => "\xCE\xBC", # GREEK CAPITAL LETTER MU
464 "\xCE\x9D" => "\xCE\xBD", # GREEK CAPITAL LETTER NU
465 "\xCE\x9E" => "\xCE\xBE", # GREEK CAPITAL LETTER XI
466 "\xCE\x9F" => "\xCE\xBF", # GREEK CAPITAL LETTER OMICRON
467 "\xCE\xA0" => "\xCF\x80", # GREEK CAPITAL LETTER PI
468 "\xCE\xA1" => "\xCF\x81", # GREEK CAPITAL LETTER RHO
469 "\xCE\xA3" => "\xCF\x83", # GREEK CAPITAL LETTER SIGMA
470 "\xCE\xA4" => "\xCF\x84", # GREEK CAPITAL LETTER TAU
471 "\xCE\xA5" => "\xCF\x85", # GREEK CAPITAL LETTER UPSILON
472 "\xCE\xA6" => "\xCF\x86", # GREEK CAPITAL LETTER PHI
473 "\xCE\xA7" => "\xCF\x87", # GREEK CAPITAL LETTER CHI
474 "\xCE\xA8" => "\xCF\x88", # GREEK CAPITAL LETTER PSI
475 "\xCE\xA9" => "\xCF\x89", # GREEK CAPITAL LETTER OMEGA
476 "\xCE\xAA" => "\xCF\x8A", # GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
477 "\xCE\xAB" => "\xCF\x8B", # GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
478 "\xCE\xB0" => "\xCF\x85\xCC\x88\xCC\x81", # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
479 "\xCF\x82" => "\xCF\x83", # GREEK SMALL LETTER FINAL SIGMA
480 "\xCF\x8F" => "\xCF\x97", # GREEK CAPITAL KAI SYMBOL
481 "\xCF\x90" => "\xCE\xB2", # GREEK BETA SYMBOL
482 "\xCF\x91" => "\xCE\xB8", # GREEK THETA SYMBOL
483 "\xCF\x95" => "\xCF\x86", # GREEK PHI SYMBOL
484 "\xCF\x96" => "\xCF\x80", # GREEK PI SYMBOL
485 "\xCF\x98" => "\xCF\x99", # GREEK LETTER ARCHAIC KOPPA
486 "\xCF\x9A" => "\xCF\x9B", # GREEK LETTER STIGMA
487 "\xCF\x9C" => "\xCF\x9D", # GREEK LETTER DIGAMMA
488 "\xCF\x9E" => "\xCF\x9F", # GREEK LETTER KOPPA
489 "\xCF\xA0" => "\xCF\xA1", # GREEK LETTER SAMPI
490 "\xCF\xA2" => "\xCF\xA3", # COPTIC CAPITAL LETTER SHEI
491 "\xCF\xA4" => "\xCF\xA5", # COPTIC CAPITAL LETTER FEI
492 "\xCF\xA6" => "\xCF\xA7", # COPTIC CAPITAL LETTER KHEI
493 "\xCF\xA8" => "\xCF\xA9", # COPTIC CAPITAL LETTER HORI
494 "\xCF\xAA" => "\xCF\xAB", # COPTIC CAPITAL LETTER GANGIA
495 "\xCF\xAC" => "\xCF\xAD", # COPTIC CAPITAL LETTER SHIMA
496 "\xCF\xAE" => "\xCF\xAF", # COPTIC CAPITAL LETTER DEI
497 "\xCF\xB0" => "\xCE\xBA", # GREEK KAPPA SYMBOL
498 "\xCF\xB1" => "\xCF\x81", # GREEK RHO SYMBOL
499 "\xCF\xB4" => "\xCE\xB8", # GREEK CAPITAL THETA SYMBOL
500 "\xCF\xB5" => "\xCE\xB5", # GREEK LUNATE EPSILON SYMBOL
501 "\xCF\xB7" => "\xCF\xB8", # GREEK CAPITAL LETTER SHO
502 "\xCF\xB9" => "\xCF\xB2", # GREEK CAPITAL LUNATE SIGMA SYMBOL
503 "\xCF\xBA" => "\xCF\xBB", # GREEK CAPITAL LETTER SAN
504 "\xCF\xBD" => "\xCD\xBB", # GREEK CAPITAL REVERSED LUNATE SIGMA SYMBOL
505 "\xCF\xBE" => "\xCD\xBC", # GREEK CAPITAL DOTTED LUNATE SIGMA SYMBOL
506 "\xCF\xBF" => "\xCD\xBD", # GREEK CAPITAL REVERSED DOTTED LUNATE SIGMA SYMBOL
507 "\xD0\x80" => "\xD1\x90", # CYRILLIC CAPITAL LETTER IE WITH GRAVE
508 "\xD0\x81" => "\xD1\x91", # CYRILLIC CAPITAL LETTER IO
509 "\xD0\x82" => "\xD1\x92", # CYRILLIC CAPITAL LETTER DJE
510 "\xD0\x83" => "\xD1\x93", # CYRILLIC CAPITAL LETTER GJE
511 "\xD0\x84" => "\xD1\x94", # CYRILLIC CAPITAL LETTER UKRAINIAN IE
512 "\xD0\x85" => "\xD1\x95", # CYRILLIC CAPITAL LETTER DZE
513 "\xD0\x86" => "\xD1\x96", # CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
514 "\xD0\x87" => "\xD1\x97", # CYRILLIC CAPITAL LETTER YI
515 "\xD0\x88" => "\xD1\x98", # CYRILLIC CAPITAL LETTER JE
516 "\xD0\x89" => "\xD1\x99", # CYRILLIC CAPITAL LETTER LJE
517 "\xD0\x8A" => "\xD1\x9A", # CYRILLIC CAPITAL LETTER NJE
518 "\xD0\x8B" => "\xD1\x9B", # CYRILLIC CAPITAL LETTER TSHE
519 "\xD0\x8C" => "\xD1\x9C", # CYRILLIC CAPITAL LETTER KJE
520 "\xD0\x8D" => "\xD1\x9D", # CYRILLIC CAPITAL LETTER I WITH GRAVE
521 "\xD0\x8E" => "\xD1\x9E", # CYRILLIC CAPITAL LETTER SHORT U
522 "\xD0\x8F" => "\xD1\x9F", # CYRILLIC CAPITAL LETTER DZHE
523 "\xD0\x90" => "\xD0\xB0", # CYRILLIC CAPITAL LETTER A
524 "\xD0\x91" => "\xD0\xB1", # CYRILLIC CAPITAL LETTER BE
525 "\xD0\x92" => "\xD0\xB2", # CYRILLIC CAPITAL LETTER VE
526 "\xD0\x93" => "\xD0\xB3", # CYRILLIC CAPITAL LETTER GHE
527 "\xD0\x94" => "\xD0\xB4", # CYRILLIC CAPITAL LETTER DE
528 "\xD0\x95" => "\xD0\xB5", # CYRILLIC CAPITAL LETTER IE
529 "\xD0\x96" => "\xD0\xB6", # CYRILLIC CAPITAL LETTER ZHE
530 "\xD0\x97" => "\xD0\xB7", # CYRILLIC CAPITAL LETTER ZE
531 "\xD0\x98" => "\xD0\xB8", # CYRILLIC CAPITAL LETTER I
532 "\xD0\x99" => "\xD0\xB9", # CYRILLIC CAPITAL LETTER SHORT I
533 "\xD0\x9A" => "\xD0\xBA", # CYRILLIC CAPITAL LETTER KA
534 "\xD0\x9B" => "\xD0\xBB", # CYRILLIC CAPITAL LETTER EL
535 "\xD0\x9C" => "\xD0\xBC", # CYRILLIC CAPITAL LETTER EM
536 "\xD0\x9D" => "\xD0\xBD", # CYRILLIC CAPITAL LETTER EN
537 "\xD0\x9E" => "\xD0\xBE", # CYRILLIC CAPITAL LETTER O
538 "\xD0\x9F" => "\xD0\xBF", # CYRILLIC CAPITAL LETTER PE
539 "\xD0\xA0" => "\xD1\x80", # CYRILLIC CAPITAL LETTER ER
540 "\xD0\xA1" => "\xD1\x81", # CYRILLIC CAPITAL LETTER ES
541 "\xD0\xA2" => "\xD1\x82", # CYRILLIC CAPITAL LETTER TE
542 "\xD0\xA3" => "\xD1\x83", # CYRILLIC CAPITAL LETTER U
543 "\xD0\xA4" => "\xD1\x84", # CYRILLIC CAPITAL LETTER EF
544 "\xD0\xA5" => "\xD1\x85", # CYRILLIC CAPITAL LETTER HA
545 "\xD0\xA6" => "\xD1\x86", # CYRILLIC CAPITAL LETTER TSE
546 "\xD0\xA7" => "\xD1\x87", # CYRILLIC CAPITAL LETTER CHE
547 "\xD0\xA8" => "\xD1\x88", # CYRILLIC CAPITAL LETTER SHA
548 "\xD0\xA9" => "\xD1\x89", # CYRILLIC CAPITAL LETTER SHCHA
549 "\xD0\xAA" => "\xD1\x8A", # CYRILLIC CAPITAL LETTER HARD SIGN
550 "\xD0\xAB" => "\xD1\x8B", # CYRILLIC CAPITAL LETTER YERU
551 "\xD0\xAC" => "\xD1\x8C", # CYRILLIC CAPITAL LETTER SOFT SIGN
552 "\xD0\xAD" => "\xD1\x8D", # CYRILLIC CAPITAL LETTER E
553 "\xD0\xAE" => "\xD1\x8E", # CYRILLIC CAPITAL LETTER YU
554 "\xD0\xAF" => "\xD1\x8F", # CYRILLIC CAPITAL LETTER YA
555 "\xD1\xA0" => "\xD1\xA1", # CYRILLIC CAPITAL LETTER OMEGA
556 "\xD1\xA2" => "\xD1\xA3", # CYRILLIC CAPITAL LETTER YAT
557 "\xD1\xA4" => "\xD1\xA5", # CYRILLIC CAPITAL LETTER IOTIFIED E
558 "\xD1\xA6" => "\xD1\xA7", # CYRILLIC CAPITAL LETTER LITTLE YUS
559 "\xD1\xA8" => "\xD1\xA9", # CYRILLIC CAPITAL LETTER IOTIFIED LITTLE YUS
560 "\xD1\xAA" => "\xD1\xAB", # CYRILLIC CAPITAL LETTER BIG YUS
561 "\xD1\xAC" => "\xD1\xAD", # CYRILLIC CAPITAL LETTER IOTIFIED BIG YUS
562 "\xD1\xAE" => "\xD1\xAF", # CYRILLIC CAPITAL LETTER KSI
563 "\xD1\xB0" => "\xD1\xB1", # CYRILLIC CAPITAL LETTER PSI
564 "\xD1\xB2" => "\xD1\xB3", # CYRILLIC CAPITAL LETTER FITA
565 "\xD1\xB4" => "\xD1\xB5", # CYRILLIC CAPITAL LETTER IZHITSA
566 "\xD1\xB6" => "\xD1\xB7", # CYRILLIC CAPITAL LETTER IZHITSA WITH DOUBLE GRAVE ACCENT
567 "\xD1\xB8" => "\xD1\xB9", # CYRILLIC CAPITAL LETTER UK
568 "\xD1\xBA" => "\xD1\xBB", # CYRILLIC CAPITAL LETTER ROUND OMEGA
569 "\xD1\xBC" => "\xD1\xBD", # CYRILLIC CAPITAL LETTER OMEGA WITH TITLO
570 "\xD1\xBE" => "\xD1\xBF", # CYRILLIC CAPITAL LETTER OT
571 "\xD2\x80" => "\xD2\x81", # CYRILLIC CAPITAL LETTER KOPPA
572 "\xD2\x8A" => "\xD2\x8B", # CYRILLIC CAPITAL LETTER SHORT I WITH TAIL
573 "\xD2\x8C" => "\xD2\x8D", # CYRILLIC CAPITAL LETTER SEMISOFT SIGN
574 "\xD2\x8E" => "\xD2\x8F", # CYRILLIC CAPITAL LETTER ER WITH TICK
575 "\xD2\x90" => "\xD2\x91", # CYRILLIC CAPITAL LETTER GHE WITH UPTURN
576 "\xD2\x92" => "\xD2\x93", # CYRILLIC CAPITAL LETTER GHE WITH STROKE
577 "\xD2\x94" => "\xD2\x95", # CYRILLIC CAPITAL LETTER GHE WITH MIDDLE HOOK
578 "\xD2\x96" => "\xD2\x97", # CYRILLIC CAPITAL LETTER ZHE WITH DESCENDER
579 "\xD2\x98" => "\xD2\x99", # CYRILLIC CAPITAL LETTER ZE WITH DESCENDER
580 "\xD2\x9A" => "\xD2\x9B", # CYRILLIC CAPITAL LETTER KA WITH DESCENDER
581 "\xD2\x9C" => "\xD2\x9D", # CYRILLIC CAPITAL LETTER KA WITH VERTICAL STROKE
582 "\xD2\x9E" => "\xD2\x9F", # CYRILLIC CAPITAL LETTER KA WITH STROKE
583 "\xD2\xA0" => "\xD2\xA1", # CYRILLIC CAPITAL LETTER BASHKIR KA
584 "\xD2\xA2" => "\xD2\xA3", # CYRILLIC CAPITAL LETTER EN WITH DESCENDER
585 "\xD2\xA4" => "\xD2\xA5", # CYRILLIC CAPITAL LIGATURE EN GHE
586 "\xD2\xA6" => "\xD2\xA7", # CYRILLIC CAPITAL LETTER PE WITH MIDDLE HOOK
587 "\xD2\xA8" => "\xD2\xA9", # CYRILLIC CAPITAL LETTER ABKHASIAN HA
588 "\xD2\xAA" => "\xD2\xAB", # CYRILLIC CAPITAL LETTER ES WITH DESCENDER
589 "\xD2\xAC" => "\xD2\xAD", # CYRILLIC CAPITAL LETTER TE WITH DESCENDER
590 "\xD2\xAE" => "\xD2\xAF", # CYRILLIC CAPITAL LETTER STRAIGHT U
591 "\xD2\xB0" => "\xD2\xB1", # CYRILLIC CAPITAL LETTER STRAIGHT U WITH STROKE
592 "\xD2\xB2" => "\xD2\xB3", # CYRILLIC CAPITAL LETTER HA WITH DESCENDER
593 "\xD2\xB4" => "\xD2\xB5", # CYRILLIC CAPITAL LIGATURE TE TSE
594 "\xD2\xB6" => "\xD2\xB7", # CYRILLIC CAPITAL LETTER CHE WITH DESCENDER
595 "\xD2\xB8" => "\xD2\xB9", # CYRILLIC CAPITAL LETTER CHE WITH VERTICAL STROKE
596 "\xD2\xBA" => "\xD2\xBB", # CYRILLIC CAPITAL LETTER SHHA
597 "\xD2\xBC" => "\xD2\xBD", # CYRILLIC CAPITAL LETTER ABKHASIAN CHE
598 "\xD2\xBE" => "\xD2\xBF", # CYRILLIC CAPITAL LETTER ABKHASIAN CHE WITH DESCENDER
599 "\xD3\x80" => "\xD3\x8F", # CYRILLIC LETTER PALOCHKA
600 "\xD3\x81" => "\xD3\x82", # CYRILLIC CAPITAL LETTER ZHE WITH BREVE
601 "\xD3\x83" => "\xD3\x84", # CYRILLIC CAPITAL LETTER KA WITH HOOK
602 "\xD3\x85" => "\xD3\x86", # CYRILLIC CAPITAL LETTER EL WITH TAIL
603 "\xD3\x87" => "\xD3\x88", # CYRILLIC CAPITAL LETTER EN WITH HOOK
604 "\xD3\x89" => "\xD3\x8A", # CYRILLIC CAPITAL LETTER EN WITH TAIL
605 "\xD3\x8B" => "\xD3\x8C", # CYRILLIC CAPITAL LETTER KHAKASSIAN CHE
606 "\xD3\x8D" => "\xD3\x8E", # CYRILLIC CAPITAL LETTER EM WITH TAIL
607 "\xD3\x90" => "\xD3\x91", # CYRILLIC CAPITAL LETTER A WITH BREVE
608 "\xD3\x92" => "\xD3\x93", # CYRILLIC CAPITAL LETTER A WITH DIAERESIS
609 "\xD3\x94" => "\xD3\x95", # CYRILLIC CAPITAL LIGATURE A IE
610 "\xD3\x96" => "\xD3\x97", # CYRILLIC CAPITAL LETTER IE WITH BREVE
611 "\xD3\x98" => "\xD3\x99", # CYRILLIC CAPITAL LETTER SCHWA
612 "\xD3\x9A" => "\xD3\x9B", # CYRILLIC CAPITAL LETTER SCHWA WITH DIAERESIS
613 "\xD3\x9C" => "\xD3\x9D", # CYRILLIC CAPITAL LETTER ZHE WITH DIAERESIS
614 "\xD3\x9E" => "\xD3\x9F", # CYRILLIC CAPITAL LETTER ZE WITH DIAERESIS
615 "\xD3\xA0" => "\xD3\xA1", # CYRILLIC CAPITAL LETTER ABKHASIAN DZE
616 "\xD3\xA2" => "\xD3\xA3", # CYRILLIC CAPITAL LETTER I WITH MACRON
617 "\xD3\xA4" => "\xD3\xA5", # CYRILLIC CAPITAL LETTER I WITH DIAERESIS
618 "\xD3\xA6" => "\xD3\xA7", # CYRILLIC CAPITAL LETTER O WITH DIAERESIS
619 "\xD3\xA8" => "\xD3\xA9", # CYRILLIC CAPITAL LETTER BARRED O
620 "\xD3\xAA" => "\xD3\xAB", # CYRILLIC CAPITAL LETTER BARRED O WITH DIAERESIS
621 "\xD3\xAC" => "\xD3\xAD", # CYRILLIC CAPITAL LETTER E WITH DIAERESIS
622 "\xD3\xAE" => "\xD3\xAF", # CYRILLIC CAPITAL LETTER U WITH MACRON
623 "\xD3\xB0" => "\xD3\xB1", # CYRILLIC CAPITAL LETTER U WITH DIAERESIS
624 "\xD3\xB2" => "\xD3\xB3", # CYRILLIC CAPITAL LETTER U WITH DOUBLE ACUTE
625 "\xD3\xB4" => "\xD3\xB5", # CYRILLIC CAPITAL LETTER CHE WITH DIAERESIS
626 "\xD3\xB6" => "\xD3\xB7", # CYRILLIC CAPITAL LETTER GHE WITH DESCENDER
627 "\xD3\xB8" => "\xD3\xB9", # CYRILLIC CAPITAL LETTER YERU WITH DIAERESIS
628 "\xD3\xBA" => "\xD3\xBB", # CYRILLIC CAPITAL LETTER GHE WITH STROKE AND HOOK
629 "\xD3\xBC" => "\xD3\xBD", # CYRILLIC CAPITAL LETTER HA WITH HOOK
630 "\xD3\xBE" => "\xD3\xBF", # CYRILLIC CAPITAL LETTER HA WITH STROKE
631 "\xD4\x80" => "\xD4\x81", # CYRILLIC CAPITAL LETTER KOMI DE
632 "\xD4\x82" => "\xD4\x83", # CYRILLIC CAPITAL LETTER KOMI DJE
633 "\xD4\x84" => "\xD4\x85", # CYRILLIC CAPITAL LETTER KOMI ZJE
634 "\xD4\x86" => "\xD4\x87", # CYRILLIC CAPITAL LETTER KOMI DZJE
635 "\xD4\x88" => "\xD4\x89", # CYRILLIC CAPITAL LETTER KOMI LJE
636 "\xD4\x8A" => "\xD4\x8B", # CYRILLIC CAPITAL LETTER KOMI NJE
637 "\xD4\x8C" => "\xD4\x8D", # CYRILLIC CAPITAL LETTER KOMI SJE
638 "\xD4\x8E" => "\xD4\x8F", # CYRILLIC CAPITAL LETTER KOMI TJE
639 "\xD4\x90" => "\xD4\x91", # CYRILLIC CAPITAL LETTER REVERSED ZE
640 "\xD4\x92" => "\xD4\x93", # CYRILLIC CAPITAL LETTER EL WITH HOOK
641 "\xD4\x94" => "\xD4\x95", # CYRILLIC CAPITAL LETTER LHA
642 "\xD4\x96" => "\xD4\x97", # CYRILLIC CAPITAL LETTER RHA
643 "\xD4\x98" => "\xD4\x99", # CYRILLIC CAPITAL LETTER YAE
644 "\xD4\x9A" => "\xD4\x9B", # CYRILLIC CAPITAL LETTER QA
645 "\xD4\x9C" => "\xD4\x9D", # CYRILLIC CAPITAL LETTER WE
646 "\xD4\x9E" => "\xD4\x9F", # CYRILLIC CAPITAL LETTER ALEUT KA
647 "\xD4\xA0" => "\xD4\xA1", # CYRILLIC CAPITAL LETTER EL WITH MIDDLE HOOK
648 "\xD4\xA2" => "\xD4\xA3", # CYRILLIC CAPITAL LETTER EN WITH MIDDLE HOOK
649 "\xD4\xA4" => "\xD4\xA5", # CYRILLIC CAPITAL LETTER PE WITH DESCENDER
650 "\xD4\xA6" => "\xD4\xA7", # CYRILLIC CAPITAL LETTER SHHA WITH DESCENDER
651 "\xD4\xA8" => "\xD4\xA9", # CYRILLIC CAPITAL LETTER EN WITH LEFT HOOK
652 "\xD4\xAA" => "\xD4\xAB", # CYRILLIC CAPITAL LETTER DZZHE
653 "\xD4\xAC" => "\xD4\xAD", # CYRILLIC CAPITAL LETTER DCHE
654 "\xD4\xAE" => "\xD4\xAF", # CYRILLIC CAPITAL LETTER EL WITH DESCENDER
655 "\xD4\xB1" => "\xD5\xA1", # ARMENIAN CAPITAL LETTER AYB
656 "\xD4\xB2" => "\xD5\xA2", # ARMENIAN CAPITAL LETTER BEN
657 "\xD4\xB3" => "\xD5\xA3", # ARMENIAN CAPITAL LETTER GIM
658 "\xD4\xB4" => "\xD5\xA4", # ARMENIAN CAPITAL LETTER DA
659 "\xD4\xB5" => "\xD5\xA5", # ARMENIAN CAPITAL LETTER ECH
660 "\xD4\xB6" => "\xD5\xA6", # ARMENIAN CAPITAL LETTER ZA
661 "\xD4\xB7" => "\xD5\xA7", # ARMENIAN CAPITAL LETTER EH
662 "\xD4\xB8" => "\xD5\xA8", # ARMENIAN CAPITAL LETTER ET
663 "\xD4\xB9" => "\xD5\xA9", # ARMENIAN CAPITAL LETTER TO
664 "\xD4\xBA" => "\xD5\xAA", # ARMENIAN CAPITAL LETTER ZHE
665 "\xD4\xBB" => "\xD5\xAB", # ARMENIAN CAPITAL LETTER INI
666 "\xD4\xBC" => "\xD5\xAC", # ARMENIAN CAPITAL LETTER LIWN
667 "\xD4\xBD" => "\xD5\xAD", # ARMENIAN CAPITAL LETTER XEH
668 "\xD4\xBE" => "\xD5\xAE", # ARMENIAN CAPITAL LETTER CA
669 "\xD4\xBF" => "\xD5\xAF", # ARMENIAN CAPITAL LETTER KEN
670 "\xD5\x80" => "\xD5\xB0", # ARMENIAN CAPITAL LETTER HO
671 "\xD5\x81" => "\xD5\xB1", # ARMENIAN CAPITAL LETTER JA
672 "\xD5\x82" => "\xD5\xB2", # ARMENIAN CAPITAL LETTER GHAD
673 "\xD5\x83" => "\xD5\xB3", # ARMENIAN CAPITAL LETTER CHEH
674 "\xD5\x84" => "\xD5\xB4", # ARMENIAN CAPITAL LETTER MEN
675 "\xD5\x85" => "\xD5\xB5", # ARMENIAN CAPITAL LETTER YI
676 "\xD5\x86" => "\xD5\xB6", # ARMENIAN CAPITAL LETTER NOW
677 "\xD5\x87" => "\xD5\xB7", # ARMENIAN CAPITAL LETTER SHA
678 "\xD5\x88" => "\xD5\xB8", # ARMENIAN CAPITAL LETTER VO
679 "\xD5\x89" => "\xD5\xB9", # ARMENIAN CAPITAL LETTER CHA
680 "\xD5\x8A" => "\xD5\xBA", # ARMENIAN CAPITAL LETTER PEH
681 "\xD5\x8B" => "\xD5\xBB", # ARMENIAN CAPITAL LETTER JHEH
682 "\xD5\x8C" => "\xD5\xBC", # ARMENIAN CAPITAL LETTER RA
683 "\xD5\x8D" => "\xD5\xBD", # ARMENIAN CAPITAL LETTER SEH
684 "\xD5\x8E" => "\xD5\xBE", # ARMENIAN CAPITAL LETTER VEW
685 "\xD5\x8F" => "\xD5\xBF", # ARMENIAN CAPITAL LETTER TIWN
686 "\xD5\x90" => "\xD6\x80", # ARMENIAN CAPITAL LETTER REH
687 "\xD5\x91" => "\xD6\x81", # ARMENIAN CAPITAL LETTER CO
688 "\xD5\x92" => "\xD6\x82", # ARMENIAN CAPITAL LETTER YIWN
689 "\xD5\x93" => "\xD6\x83", # ARMENIAN CAPITAL LETTER PIWR
690 "\xD5\x94" => "\xD6\x84", # ARMENIAN CAPITAL LETTER KEH
691 "\xD5\x95" => "\xD6\x85", # ARMENIAN CAPITAL LETTER OH
692 "\xD5\x96" => "\xD6\x86", # ARMENIAN CAPITAL LETTER FEH
693 "\xD6\x87" => "\xD5\xA5\xD6\x82", # ARMENIAN SMALL LIGATURE ECH YIWN
694 "\xE1\x82\xA0" => "\xE2\xB4\x80", # GEORGIAN CAPITAL LETTER AN
695 "\xE1\x82\xA1" => "\xE2\xB4\x81", # GEORGIAN CAPITAL LETTER BAN
696 "\xE1\x82\xA2" => "\xE2\xB4\x82", # GEORGIAN CAPITAL LETTER GAN
697 "\xE1\x82\xA3" => "\xE2\xB4\x83", # GEORGIAN CAPITAL LETTER DON
698 "\xE1\x82\xA4" => "\xE2\xB4\x84", # GEORGIAN CAPITAL LETTER EN
699 "\xE1\x82\xA5" => "\xE2\xB4\x85", # GEORGIAN CAPITAL LETTER VIN
700 "\xE1\x82\xA6" => "\xE2\xB4\x86", # GEORGIAN CAPITAL LETTER ZEN
701 "\xE1\x82\xA7" => "\xE2\xB4\x87", # GEORGIAN CAPITAL LETTER TAN
702 "\xE1\x82\xA8" => "\xE2\xB4\x88", # GEORGIAN CAPITAL LETTER IN
703 "\xE1\x82\xA9" => "\xE2\xB4\x89", # GEORGIAN CAPITAL LETTER KAN
704 "\xE1\x82\xAA" => "\xE2\xB4\x8A", # GEORGIAN CAPITAL LETTER LAS
705 "\xE1\x82\xAB" => "\xE2\xB4\x8B", # GEORGIAN CAPITAL LETTER MAN
706 "\xE1\x82\xAC" => "\xE2\xB4\x8C", # GEORGIAN CAPITAL LETTER NAR
707 "\xE1\x82\xAD" => "\xE2\xB4\x8D", # GEORGIAN CAPITAL LETTER ON
708 "\xE1\x82\xAE" => "\xE2\xB4\x8E", # GEORGIAN CAPITAL LETTER PAR
709 "\xE1\x82\xAF" => "\xE2\xB4\x8F", # GEORGIAN CAPITAL LETTER ZHAR
710 "\xE1\x82\xB0" => "\xE2\xB4\x90", # GEORGIAN CAPITAL LETTER RAE
711 "\xE1\x82\xB1" => "\xE2\xB4\x91", # GEORGIAN CAPITAL LETTER SAN
712 "\xE1\x82\xB2" => "\xE2\xB4\x92", # GEORGIAN CAPITAL LETTER TAR
713 "\xE1\x82\xB3" => "\xE2\xB4\x93", # GEORGIAN CAPITAL LETTER UN
714 "\xE1\x82\xB4" => "\xE2\xB4\x94", # GEORGIAN CAPITAL LETTER PHAR
715 "\xE1\x82\xB5" => "\xE2\xB4\x95", # GEORGIAN CAPITAL LETTER KHAR
716 "\xE1\x82\xB6" => "\xE2\xB4\x96", # GEORGIAN CAPITAL LETTER GHAN
717 "\xE1\x82\xB7" => "\xE2\xB4\x97", # GEORGIAN CAPITAL LETTER QAR
718 "\xE1\x82\xB8" => "\xE2\xB4\x98", # GEORGIAN CAPITAL LETTER SHIN
719 "\xE1\x82\xB9" => "\xE2\xB4\x99", # GEORGIAN CAPITAL LETTER CHIN
720 "\xE1\x82\xBA" => "\xE2\xB4\x9A", # GEORGIAN CAPITAL LETTER CAN
721 "\xE1\x82\xBB" => "\xE2\xB4\x9B", # GEORGIAN CAPITAL LETTER JIL
722 "\xE1\x82\xBC" => "\xE2\xB4\x9C", # GEORGIAN CAPITAL LETTER CIL
723 "\xE1\x82\xBD" => "\xE2\xB4\x9D", # GEORGIAN CAPITAL LETTER CHAR
724 "\xE1\x82\xBE" => "\xE2\xB4\x9E", # GEORGIAN CAPITAL LETTER XAN
725 "\xE1\x82\xBF" => "\xE2\xB4\x9F", # GEORGIAN CAPITAL LETTER JHAN
726 "\xE1\x83\x80" => "\xE2\xB4\xA0", # GEORGIAN CAPITAL LETTER HAE
727 "\xE1\x83\x81" => "\xE2\xB4\xA1", # GEORGIAN CAPITAL LETTER HE
728 "\xE1\x83\x82" => "\xE2\xB4\xA2", # GEORGIAN CAPITAL LETTER HIE
729 "\xE1\x83\x83" => "\xE2\xB4\xA3", # GEORGIAN CAPITAL LETTER WE
730 "\xE1\x83\x84" => "\xE2\xB4\xA4", # GEORGIAN CAPITAL LETTER HAR
731 "\xE1\x83\x85" => "\xE2\xB4\xA5", # GEORGIAN CAPITAL LETTER HOE
732 "\xE1\x83\x87" => "\xE2\xB4\xA7", # GEORGIAN CAPITAL LETTER YN
733 "\xE1\x83\x8D" => "\xE2\xB4\xAD", # GEORGIAN CAPITAL LETTER AEN
734 "\xE1\x8F\xB8" => "\xE1\x8F\xB0", # CHEROKEE SMALL LETTER YE
735 "\xE1\x8F\xB9" => "\xE1\x8F\xB1", # CHEROKEE SMALL LETTER YI
736 "\xE1\x8F\xBA" => "\xE1\x8F\xB2", # CHEROKEE SMALL LETTER YO
737 "\xE1\x8F\xBB" => "\xE1\x8F\xB3", # CHEROKEE SMALL LETTER YU
738 "\xE1\x8F\xBC" => "\xE1\x8F\xB4", # CHEROKEE SMALL LETTER YV
739 "\xE1\x8F\xBD" => "\xE1\x8F\xB5", # CHEROKEE SMALL LETTER MV
740 "\xE1\xB2\x80" => "\xD0\xB2", # CYRILLIC SMALL LETTER ROUNDED VE
741 "\xE1\xB2\x81" => "\xD0\xB4", # CYRILLIC SMALL LETTER LONG-LEGGED DE
742 "\xE1\xB2\x82" => "\xD0\xBE", # CYRILLIC SMALL LETTER NARROW O
743 "\xE1\xB2\x83" => "\xD1\x81", # CYRILLIC SMALL LETTER WIDE ES
744 "\xE1\xB2\x84" => "\xD1\x82", # CYRILLIC SMALL LETTER TALL TE
745 "\xE1\xB2\x85" => "\xD1\x82", # CYRILLIC SMALL LETTER THREE-LEGGED TE
746 "\xE1\xB2\x86" => "\xD1\x8A", # CYRILLIC SMALL LETTER TALL HARD SIGN
747 "\xE1\xB2\x87" => "\xD1\xA3", # CYRILLIC SMALL LETTER TALL YAT
748 "\xE1\xB2\x88" => "\xEA\x99\x8B", # CYRILLIC SMALL LETTER UNBLENDED UK
749 "\xE1\xB2\x90" => "\xE1\x83\x90", # GEORGIAN MTAVRULI CAPITAL LETTER AN
750 "\xE1\xB2\x91" => "\xE1\x83\x91", # GEORGIAN MTAVRULI CAPITAL LETTER BAN
751 "\xE1\xB2\x92" => "\xE1\x83\x92", # GEORGIAN MTAVRULI CAPITAL LETTER GAN
752 "\xE1\xB2\x93" => "\xE1\x83\x93", # GEORGIAN MTAVRULI CAPITAL LETTER DON
753 "\xE1\xB2\x94" => "\xE1\x83\x94", # GEORGIAN MTAVRULI CAPITAL LETTER EN
754 "\xE1\xB2\x95" => "\xE1\x83\x95", # GEORGIAN MTAVRULI CAPITAL LETTER VIN
755 "\xE1\xB2\x96" => "\xE1\x83\x96", # GEORGIAN MTAVRULI CAPITAL LETTER ZEN
756 "\xE1\xB2\x97" => "\xE1\x83\x97", # GEORGIAN MTAVRULI CAPITAL LETTER TAN
757 "\xE1\xB2\x98" => "\xE1\x83\x98", # GEORGIAN MTAVRULI CAPITAL LETTER IN
758 "\xE1\xB2\x99" => "\xE1\x83\x99", # GEORGIAN MTAVRULI CAPITAL LETTER KAN
759 "\xE1\xB2\x9A" => "\xE1\x83\x9A", # GEORGIAN MTAVRULI CAPITAL LETTER LAS
760 "\xE1\xB2\x9B" => "\xE1\x83\x9B", # GEORGIAN MTAVRULI CAPITAL LETTER MAN
761 "\xE1\xB2\x9C" => "\xE1\x83\x9C", # GEORGIAN MTAVRULI CAPITAL LETTER NAR
762 "\xE1\xB2\x9D" => "\xE1\x83\x9D", # GEORGIAN MTAVRULI CAPITAL LETTER ON
763 "\xE1\xB2\x9E" => "\xE1\x83\x9E", # GEORGIAN MTAVRULI CAPITAL LETTER PAR
764 "\xE1\xB2\x9F" => "\xE1\x83\x9F", # GEORGIAN MTAVRULI CAPITAL LETTER ZHAR
765 "\xE1\xB2\xA0" => "\xE1\x83\xA0", # GEORGIAN MTAVRULI CAPITAL LETTER RAE
766 "\xE1\xB2\xA1" => "\xE1\x83\xA1", # GEORGIAN MTAVRULI CAPITAL LETTER SAN
767 "\xE1\xB2\xA2" => "\xE1\x83\xA2", # GEORGIAN MTAVRULI CAPITAL LETTER TAR
768 "\xE1\xB2\xA3" => "\xE1\x83\xA3", # GEORGIAN MTAVRULI CAPITAL LETTER UN
769 "\xE1\xB2\xA4" => "\xE1\x83\xA4", # GEORGIAN MTAVRULI CAPITAL LETTER PHAR
770 "\xE1\xB2\xA5" => "\xE1\x83\xA5", # GEORGIAN MTAVRULI CAPITAL LETTER KHAR
771 "\xE1\xB2\xA6" => "\xE1\x83\xA6", # GEORGIAN MTAVRULI CAPITAL LETTER GHAN
772 "\xE1\xB2\xA7" => "\xE1\x83\xA7", # GEORGIAN MTAVRULI CAPITAL LETTER QAR
773 "\xE1\xB2\xA8" => "\xE1\x83\xA8", # GEORGIAN MTAVRULI CAPITAL LETTER SHIN
774 "\xE1\xB2\xA9" => "\xE1\x83\xA9", # GEORGIAN MTAVRULI CAPITAL LETTER CHIN
775 "\xE1\xB2\xAA" => "\xE1\x83\xAA", # GEORGIAN MTAVRULI CAPITAL LETTER CAN
776 "\xE1\xB2\xAB" => "\xE1\x83\xAB", # GEORGIAN MTAVRULI CAPITAL LETTER JIL
777 "\xE1\xB2\xAC" => "\xE1\x83\xAC", # GEORGIAN MTAVRULI CAPITAL LETTER CIL
778 "\xE1\xB2\xAD" => "\xE1\x83\xAD", # GEORGIAN MTAVRULI CAPITAL LETTER CHAR
779 "\xE1\xB2\xAE" => "\xE1\x83\xAE", # GEORGIAN MTAVRULI CAPITAL LETTER XAN
780 "\xE1\xB2\xAF" => "\xE1\x83\xAF", # GEORGIAN MTAVRULI CAPITAL LETTER JHAN
781 "\xE1\xB2\xB0" => "\xE1\x83\xB0", # GEORGIAN MTAVRULI CAPITAL LETTER HAE
782 "\xE1\xB2\xB1" => "\xE1\x83\xB1", # GEORGIAN MTAVRULI CAPITAL LETTER HE
783 "\xE1\xB2\xB2" => "\xE1\x83\xB2", # GEORGIAN MTAVRULI CAPITAL LETTER HIE
784 "\xE1\xB2\xB3" => "\xE1\x83\xB3", # GEORGIAN MTAVRULI CAPITAL LETTER WE
785 "\xE1\xB2\xB4" => "\xE1\x83\xB4", # GEORGIAN MTAVRULI CAPITAL LETTER HAR
786 "\xE1\xB2\xB5" => "\xE1\x83\xB5", # GEORGIAN MTAVRULI CAPITAL LETTER HOE
787 "\xE1\xB2\xB6" => "\xE1\x83\xB6", # GEORGIAN MTAVRULI CAPITAL LETTER FI
788 "\xE1\xB2\xB7" => "\xE1\x83\xB7", # GEORGIAN MTAVRULI CAPITAL LETTER YN
789 "\xE1\xB2\xB8" => "\xE1\x83\xB8", # GEORGIAN MTAVRULI CAPITAL LETTER ELIFI
790 "\xE1\xB2\xB9" => "\xE1\x83\xB9", # GEORGIAN MTAVRULI CAPITAL LETTER TURNED GAN
791 "\xE1\xB2\xBA" => "\xE1\x83\xBA", # GEORGIAN MTAVRULI CAPITAL LETTER AIN
792 "\xE1\xB2\xBD" => "\xE1\x83\xBD", # GEORGIAN MTAVRULI CAPITAL LETTER AEN
793 "\xE1\xB2\xBE" => "\xE1\x83\xBE", # GEORGIAN MTAVRULI CAPITAL LETTER HARD SIGN
794 "\xE1\xB2\xBF" => "\xE1\x83\xBF", # GEORGIAN MTAVRULI CAPITAL LETTER LABIAL SIGN
795 "\xE1\xB8\x80" => "\xE1\xB8\x81", # LATIN CAPITAL LETTER A WITH RING BELOW
796 "\xE1\xB8\x82" => "\xE1\xB8\x83", # LATIN CAPITAL LETTER B WITH DOT ABOVE
797 "\xE1\xB8\x84" => "\xE1\xB8\x85", # LATIN CAPITAL LETTER B WITH DOT BELOW
798 "\xE1\xB8\x86" => "\xE1\xB8\x87", # LATIN CAPITAL LETTER B WITH LINE BELOW
799 "\xE1\xB8\x88" => "\xE1\xB8\x89", # LATIN CAPITAL LETTER C WITH CEDILLA AND ACUTE
800 "\xE1\xB8\x8A" => "\xE1\xB8\x8B", # LATIN CAPITAL LETTER D WITH DOT ABOVE
801 "\xE1\xB8\x8C" => "\xE1\xB8\x8D", # LATIN CAPITAL LETTER D WITH DOT BELOW
802 "\xE1\xB8\x8E" => "\xE1\xB8\x8F", # LATIN CAPITAL LETTER D WITH LINE BELOW
803 "\xE1\xB8\x90" => "\xE1\xB8\x91", # LATIN CAPITAL LETTER D WITH CEDILLA
804 "\xE1\xB8\x92" => "\xE1\xB8\x93", # LATIN CAPITAL LETTER D WITH CIRCUMFLEX BELOW
805 "\xE1\xB8\x94" => "\xE1\xB8\x95", # LATIN CAPITAL LETTER E WITH MACRON AND GRAVE
806 "\xE1\xB8\x96" => "\xE1\xB8\x97", # LATIN CAPITAL LETTER E WITH MACRON AND ACUTE
807 "\xE1\xB8\x98" => "\xE1\xB8\x99", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX BELOW
808 "\xE1\xB8\x9A" => "\xE1\xB8\x9B", # LATIN CAPITAL LETTER E WITH TILDE BELOW
809 "\xE1\xB8\x9C" => "\xE1\xB8\x9D", # LATIN CAPITAL LETTER E WITH CEDILLA AND BREVE
810 "\xE1\xB8\x9E" => "\xE1\xB8\x9F", # LATIN CAPITAL LETTER F WITH DOT ABOVE
811 "\xE1\xB8\xA0" => "\xE1\xB8\xA1", # LATIN CAPITAL LETTER G WITH MACRON
812 "\xE1\xB8\xA2" => "\xE1\xB8\xA3", # LATIN CAPITAL LETTER H WITH DOT ABOVE
813 "\xE1\xB8\xA4" => "\xE1\xB8\xA5", # LATIN CAPITAL LETTER H WITH DOT BELOW
814 "\xE1\xB8\xA6" => "\xE1\xB8\xA7", # LATIN CAPITAL LETTER H WITH DIAERESIS
815 "\xE1\xB8\xA8" => "\xE1\xB8\xA9", # LATIN CAPITAL LETTER H WITH CEDILLA
816 "\xE1\xB8\xAA" => "\xE1\xB8\xAB", # LATIN CAPITAL LETTER H WITH BREVE BELOW
817 "\xE1\xB8\xAC" => "\xE1\xB8\xAD", # LATIN CAPITAL LETTER I WITH TILDE BELOW
818 "\xE1\xB8\xAE" => "\xE1\xB8\xAF", # LATIN CAPITAL LETTER I WITH DIAERESIS AND ACUTE
819 "\xE1\xB8\xB0" => "\xE1\xB8\xB1", # LATIN CAPITAL LETTER K WITH ACUTE
820 "\xE1\xB8\xB2" => "\xE1\xB8\xB3", # LATIN CAPITAL LETTER K WITH DOT BELOW
821 "\xE1\xB8\xB4" => "\xE1\xB8\xB5", # LATIN CAPITAL LETTER K WITH LINE BELOW
822 "\xE1\xB8\xB6" => "\xE1\xB8\xB7", # LATIN CAPITAL LETTER L WITH DOT BELOW
823 "\xE1\xB8\xB8" => "\xE1\xB8\xB9", # LATIN CAPITAL LETTER L WITH DOT BELOW AND MACRON
824 "\xE1\xB8\xBA" => "\xE1\xB8\xBB", # LATIN CAPITAL LETTER L WITH LINE BELOW
825 "\xE1\xB8\xBC" => "\xE1\xB8\xBD", # LATIN CAPITAL LETTER L WITH CIRCUMFLEX BELOW
826 "\xE1\xB8\xBE" => "\xE1\xB8\xBF", # LATIN CAPITAL LETTER M WITH ACUTE
827 "\xE1\xB9\x80" => "\xE1\xB9\x81", # LATIN CAPITAL LETTER M WITH DOT ABOVE
828 "\xE1\xB9\x82" => "\xE1\xB9\x83", # LATIN CAPITAL LETTER M WITH DOT BELOW
829 "\xE1\xB9\x84" => "\xE1\xB9\x85", # LATIN CAPITAL LETTER N WITH DOT ABOVE
830 "\xE1\xB9\x86" => "\xE1\xB9\x87", # LATIN CAPITAL LETTER N WITH DOT BELOW
831 "\xE1\xB9\x88" => "\xE1\xB9\x89", # LATIN CAPITAL LETTER N WITH LINE BELOW
832 "\xE1\xB9\x8A" => "\xE1\xB9\x8B", # LATIN CAPITAL LETTER N WITH CIRCUMFLEX BELOW
833 "\xE1\xB9\x8C" => "\xE1\xB9\x8D", # LATIN CAPITAL LETTER O WITH TILDE AND ACUTE
834 "\xE1\xB9\x8E" => "\xE1\xB9\x8F", # LATIN CAPITAL LETTER O WITH TILDE AND DIAERESIS
835 "\xE1\xB9\x90" => "\xE1\xB9\x91", # LATIN CAPITAL LETTER O WITH MACRON AND GRAVE
836 "\xE1\xB9\x92" => "\xE1\xB9\x93", # LATIN CAPITAL LETTER O WITH MACRON AND ACUTE
837 "\xE1\xB9\x94" => "\xE1\xB9\x95", # LATIN CAPITAL LETTER P WITH ACUTE
838 "\xE1\xB9\x96" => "\xE1\xB9\x97", # LATIN CAPITAL LETTER P WITH DOT ABOVE
839 "\xE1\xB9\x98" => "\xE1\xB9\x99", # LATIN CAPITAL LETTER R WITH DOT ABOVE
840 "\xE1\xB9\x9A" => "\xE1\xB9\x9B", # LATIN CAPITAL LETTER R WITH DOT BELOW
841 "\xE1\xB9\x9C" => "\xE1\xB9\x9D", # LATIN CAPITAL LETTER R WITH DOT BELOW AND MACRON
842 "\xE1\xB9\x9E" => "\xE1\xB9\x9F", # LATIN CAPITAL LETTER R WITH LINE BELOW
843 "\xE1\xB9\xA0" => "\xE1\xB9\xA1", # LATIN CAPITAL LETTER S WITH DOT ABOVE
844 "\xE1\xB9\xA2" => "\xE1\xB9\xA3", # LATIN CAPITAL LETTER S WITH DOT BELOW
845 "\xE1\xB9\xA4" => "\xE1\xB9\xA5", # LATIN CAPITAL LETTER S WITH ACUTE AND DOT ABOVE
846 "\xE1\xB9\xA6" => "\xE1\xB9\xA7", # LATIN CAPITAL LETTER S WITH CARON AND DOT ABOVE
847 "\xE1\xB9\xA8" => "\xE1\xB9\xA9", # LATIN CAPITAL LETTER S WITH DOT BELOW AND DOT ABOVE
848 "\xE1\xB9\xAA" => "\xE1\xB9\xAB", # LATIN CAPITAL LETTER T WITH DOT ABOVE
849 "\xE1\xB9\xAC" => "\xE1\xB9\xAD", # LATIN CAPITAL LETTER T WITH DOT BELOW
850 "\xE1\xB9\xAE" => "\xE1\xB9\xAF", # LATIN CAPITAL LETTER T WITH LINE BELOW
851 "\xE1\xB9\xB0" => "\xE1\xB9\xB1", # LATIN CAPITAL LETTER T WITH CIRCUMFLEX BELOW
852 "\xE1\xB9\xB2" => "\xE1\xB9\xB3", # LATIN CAPITAL LETTER U WITH DIAERESIS BELOW
853 "\xE1\xB9\xB4" => "\xE1\xB9\xB5", # LATIN CAPITAL LETTER U WITH TILDE BELOW
854 "\xE1\xB9\xB6" => "\xE1\xB9\xB7", # LATIN CAPITAL LETTER U WITH CIRCUMFLEX BELOW
855 "\xE1\xB9\xB8" => "\xE1\xB9\xB9", # LATIN CAPITAL LETTER U WITH TILDE AND ACUTE
856 "\xE1\xB9\xBA" => "\xE1\xB9\xBB", # LATIN CAPITAL LETTER U WITH MACRON AND DIAERESIS
857 "\xE1\xB9\xBC" => "\xE1\xB9\xBD", # LATIN CAPITAL LETTER V WITH TILDE
858 "\xE1\xB9\xBE" => "\xE1\xB9\xBF", # LATIN CAPITAL LETTER V WITH DOT BELOW
859 "\xE1\xBA\x80" => "\xE1\xBA\x81", # LATIN CAPITAL LETTER W WITH GRAVE
860 "\xE1\xBA\x82" => "\xE1\xBA\x83", # LATIN CAPITAL LETTER W WITH ACUTE
861 "\xE1\xBA\x84" => "\xE1\xBA\x85", # LATIN CAPITAL LETTER W WITH DIAERESIS
862 "\xE1\xBA\x86" => "\xE1\xBA\x87", # LATIN CAPITAL LETTER W WITH DOT ABOVE
863 "\xE1\xBA\x88" => "\xE1\xBA\x89", # LATIN CAPITAL LETTER W WITH DOT BELOW
864 "\xE1\xBA\x8A" => "\xE1\xBA\x8B", # LATIN CAPITAL LETTER X WITH DOT ABOVE
865 "\xE1\xBA\x8C" => "\xE1\xBA\x8D", # LATIN CAPITAL LETTER X WITH DIAERESIS
866 "\xE1\xBA\x8E" => "\xE1\xBA\x8F", # LATIN CAPITAL LETTER Y WITH DOT ABOVE
867 "\xE1\xBA\x90" => "\xE1\xBA\x91", # LATIN CAPITAL LETTER Z WITH CIRCUMFLEX
868 "\xE1\xBA\x92" => "\xE1\xBA\x93", # LATIN CAPITAL LETTER Z WITH DOT BELOW
869 "\xE1\xBA\x94" => "\xE1\xBA\x95", # LATIN CAPITAL LETTER Z WITH LINE BELOW
870 "\xE1\xBA\x96" => "\x68\xCC\xB1", # LATIN SMALL LETTER H WITH LINE BELOW
871 "\xE1\xBA\x97" => "\x74\xCC\x88", # LATIN SMALL LETTER T WITH DIAERESIS
872 "\xE1\xBA\x98" => "\x77\xCC\x8A", # LATIN SMALL LETTER W WITH RING ABOVE
873 "\xE1\xBA\x99" => "\x79\xCC\x8A", # LATIN SMALL LETTER Y WITH RING ABOVE
874 "\xE1\xBA\x9A" => "\x61\xCA\xBE", # LATIN SMALL LETTER A WITH RIGHT HALF RING
875 "\xE1\xBA\x9B" => "\xE1\xB9\xA1", # LATIN SMALL LETTER LONG S WITH DOT ABOVE
876 "\xE1\xBA\x9E" => "\x73\x73", # LATIN CAPITAL LETTER SHARP S
877 "\xE1\xBA\xA0" => "\xE1\xBA\xA1", # LATIN CAPITAL LETTER A WITH DOT BELOW
878 "\xE1\xBA\xA2" => "\xE1\xBA\xA3", # LATIN CAPITAL LETTER A WITH HOOK ABOVE
879 "\xE1\xBA\xA4" => "\xE1\xBA\xA5", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND ACUTE
880 "\xE1\xBA\xA6" => "\xE1\xBA\xA7", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND GRAVE
881 "\xE1\xBA\xA8" => "\xE1\xBA\xA9", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND HOOK ABOVE
882 "\xE1\xBA\xAA" => "\xE1\xBA\xAB", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND TILDE
883 "\xE1\xBA\xAC" => "\xE1\xBA\xAD", # LATIN CAPITAL LETTER A WITH CIRCUMFLEX AND DOT BELOW
884 "\xE1\xBA\xAE" => "\xE1\xBA\xAF", # LATIN CAPITAL LETTER A WITH BREVE AND ACUTE
885 "\xE1\xBA\xB0" => "\xE1\xBA\xB1", # LATIN CAPITAL LETTER A WITH BREVE AND GRAVE
886 "\xE1\xBA\xB2" => "\xE1\xBA\xB3", # LATIN CAPITAL LETTER A WITH BREVE AND HOOK ABOVE
887 "\xE1\xBA\xB4" => "\xE1\xBA\xB5", # LATIN CAPITAL LETTER A WITH BREVE AND TILDE
888 "\xE1\xBA\xB6" => "\xE1\xBA\xB7", # LATIN CAPITAL LETTER A WITH BREVE AND DOT BELOW
889 "\xE1\xBA\xB8" => "\xE1\xBA\xB9", # LATIN CAPITAL LETTER E WITH DOT BELOW
890 "\xE1\xBA\xBA" => "\xE1\xBA\xBB", # LATIN CAPITAL LETTER E WITH HOOK ABOVE
891 "\xE1\xBA\xBC" => "\xE1\xBA\xBD", # LATIN CAPITAL LETTER E WITH TILDE
892 "\xE1\xBA\xBE" => "\xE1\xBA\xBF", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND ACUTE
893 "\xE1\xBB\x80" => "\xE1\xBB\x81", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND GRAVE
894 "\xE1\xBB\x82" => "\xE1\xBB\x83", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND HOOK ABOVE
895 "\xE1\xBB\x84" => "\xE1\xBB\x85", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND TILDE
896 "\xE1\xBB\x86" => "\xE1\xBB\x87", # LATIN CAPITAL LETTER E WITH CIRCUMFLEX AND DOT BELOW
897 "\xE1\xBB\x88" => "\xE1\xBB\x89", # LATIN CAPITAL LETTER I WITH HOOK ABOVE
898 "\xE1\xBB\x8A" => "\xE1\xBB\x8B", # LATIN CAPITAL LETTER I WITH DOT BELOW
899 "\xE1\xBB\x8C" => "\xE1\xBB\x8D", # LATIN CAPITAL LETTER O WITH DOT BELOW
900 "\xE1\xBB\x8E" => "\xE1\xBB\x8F", # LATIN CAPITAL LETTER O WITH HOOK ABOVE
901 "\xE1\xBB\x90" => "\xE1\xBB\x91", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND ACUTE
902 "\xE1\xBB\x92" => "\xE1\xBB\x93", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND GRAVE
903 "\xE1\xBB\x94" => "\xE1\xBB\x95", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND HOOK ABOVE
904 "\xE1\xBB\x96" => "\xE1\xBB\x97", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND TILDE
905 "\xE1\xBB\x98" => "\xE1\xBB\x99", # LATIN CAPITAL LETTER O WITH CIRCUMFLEX AND DOT BELOW
906 "\xE1\xBB\x9A" => "\xE1\xBB\x9B", # LATIN CAPITAL LETTER O WITH HORN AND ACUTE
907 "\xE1\xBB\x9C" => "\xE1\xBB\x9D", # LATIN CAPITAL LETTER O WITH HORN AND GRAVE
908 "\xE1\xBB\x9E" => "\xE1\xBB\x9F", # LATIN CAPITAL LETTER O WITH HORN AND HOOK ABOVE
909 "\xE1\xBB\xA0" => "\xE1\xBB\xA1", # LATIN CAPITAL LETTER O WITH HORN AND TILDE
910 "\xE1\xBB\xA2" => "\xE1\xBB\xA3", # LATIN CAPITAL LETTER O WITH HORN AND DOT BELOW
911 "\xE1\xBB\xA4" => "\xE1\xBB\xA5", # LATIN CAPITAL LETTER U WITH DOT BELOW
912 "\xE1\xBB\xA6" => "\xE1\xBB\xA7", # LATIN CAPITAL LETTER U WITH HOOK ABOVE
913 "\xE1\xBB\xA8" => "\xE1\xBB\xA9", # LATIN CAPITAL LETTER U WITH HORN AND ACUTE
914 "\xE1\xBB\xAA" => "\xE1\xBB\xAB", # LATIN CAPITAL LETTER U WITH HORN AND GRAVE
915 "\xE1\xBB\xAC" => "\xE1\xBB\xAD", # LATIN CAPITAL LETTER U WITH HORN AND HOOK ABOVE
916 "\xE1\xBB\xAE" => "\xE1\xBB\xAF", # LATIN CAPITAL LETTER U WITH HORN AND TILDE
917 "\xE1\xBB\xB0" => "\xE1\xBB\xB1", # LATIN CAPITAL LETTER U WITH HORN AND DOT BELOW
918 "\xE1\xBB\xB2" => "\xE1\xBB\xB3", # LATIN CAPITAL LETTER Y WITH GRAVE
919 "\xE1\xBB\xB4" => "\xE1\xBB\xB5", # LATIN CAPITAL LETTER Y WITH DOT BELOW
920 "\xE1\xBB\xB6" => "\xE1\xBB\xB7", # LATIN CAPITAL LETTER Y WITH HOOK ABOVE
921 "\xE1\xBB\xB8" => "\xE1\xBB\xB9", # LATIN CAPITAL LETTER Y WITH TILDE
922 "\xE1\xBB\xBA" => "\xE1\xBB\xBB", # LATIN CAPITAL LETTER MIDDLE-WELSH LL
923 "\xE1\xBB\xBC" => "\xE1\xBB\xBD", # LATIN CAPITAL LETTER MIDDLE-WELSH V
924 "\xE1\xBB\xBE" => "\xE1\xBB\xBF", # LATIN CAPITAL LETTER Y WITH LOOP
925 "\xE1\xBC\x88" => "\xE1\xBC\x80", # GREEK CAPITAL LETTER ALPHA WITH PSILI
926 "\xE1\xBC\x89" => "\xE1\xBC\x81", # GREEK CAPITAL LETTER ALPHA WITH DASIA
927 "\xE1\xBC\x8A" => "\xE1\xBC\x82", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA
928 "\xE1\xBC\x8B" => "\xE1\xBC\x83", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA
929 "\xE1\xBC\x8C" => "\xE1\xBC\x84", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA
930 "\xE1\xBC\x8D" => "\xE1\xBC\x85", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA
931 "\xE1\xBC\x8E" => "\xE1\xBC\x86", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI
932 "\xE1\xBC\x8F" => "\xE1\xBC\x87", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI
933 "\xE1\xBC\x98" => "\xE1\xBC\x90", # GREEK CAPITAL LETTER EPSILON WITH PSILI
934 "\xE1\xBC\x99" => "\xE1\xBC\x91", # GREEK CAPITAL LETTER EPSILON WITH DASIA
935 "\xE1\xBC\x9A" => "\xE1\xBC\x92", # GREEK CAPITAL LETTER EPSILON WITH PSILI AND VARIA
936 "\xE1\xBC\x9B" => "\xE1\xBC\x93", # GREEK CAPITAL LETTER EPSILON WITH DASIA AND VARIA
937 "\xE1\xBC\x9C" => "\xE1\xBC\x94", # GREEK CAPITAL LETTER EPSILON WITH PSILI AND OXIA
938 "\xE1\xBC\x9D" => "\xE1\xBC\x95", # GREEK CAPITAL LETTER EPSILON WITH DASIA AND OXIA
939 "\xE1\xBC\xA8" => "\xE1\xBC\xA0", # GREEK CAPITAL LETTER ETA WITH PSILI
940 "\xE1\xBC\xA9" => "\xE1\xBC\xA1", # GREEK CAPITAL LETTER ETA WITH DASIA
941 "\xE1\xBC\xAA" => "\xE1\xBC\xA2", # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA
942 "\xE1\xBC\xAB" => "\xE1\xBC\xA3", # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA
943 "\xE1\xBC\xAC" => "\xE1\xBC\xA4", # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA
944 "\xE1\xBC\xAD" => "\xE1\xBC\xA5", # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA
945 "\xE1\xBC\xAE" => "\xE1\xBC\xA6", # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI
946 "\xE1\xBC\xAF" => "\xE1\xBC\xA7", # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI
947 "\xE1\xBC\xB8" => "\xE1\xBC\xB0", # GREEK CAPITAL LETTER IOTA WITH PSILI
948 "\xE1\xBC\xB9" => "\xE1\xBC\xB1", # GREEK CAPITAL LETTER IOTA WITH DASIA
949 "\xE1\xBC\xBA" => "\xE1\xBC\xB2", # GREEK CAPITAL LETTER IOTA WITH PSILI AND VARIA
950 "\xE1\xBC\xBB" => "\xE1\xBC\xB3", # GREEK CAPITAL LETTER IOTA WITH DASIA AND VARIA
951 "\xE1\xBC\xBC" => "\xE1\xBC\xB4", # GREEK CAPITAL LETTER IOTA WITH PSILI AND OXIA
952 "\xE1\xBC\xBD" => "\xE1\xBC\xB5", # GREEK CAPITAL LETTER IOTA WITH DASIA AND OXIA
953 "\xE1\xBC\xBE" => "\xE1\xBC\xB6", # GREEK CAPITAL LETTER IOTA WITH PSILI AND PERISPOMENI
954 "\xE1\xBC\xBF" => "\xE1\xBC\xB7", # GREEK CAPITAL LETTER IOTA WITH DASIA AND PERISPOMENI
955 "\xE1\xBD\x88" => "\xE1\xBD\x80", # GREEK CAPITAL LETTER OMICRON WITH PSILI
956 "\xE1\xBD\x89" => "\xE1\xBD\x81", # GREEK CAPITAL LETTER OMICRON WITH DASIA
957 "\xE1\xBD\x8A" => "\xE1\xBD\x82", # GREEK CAPITAL LETTER OMICRON WITH PSILI AND VARIA
958 "\xE1\xBD\x8B" => "\xE1\xBD\x83", # GREEK CAPITAL LETTER OMICRON WITH DASIA AND VARIA
959 "\xE1\xBD\x8C" => "\xE1\xBD\x84", # GREEK CAPITAL LETTER OMICRON WITH PSILI AND OXIA
960 "\xE1\xBD\x8D" => "\xE1\xBD\x85", # GREEK CAPITAL LETTER OMICRON WITH DASIA AND OXIA
961 "\xE1\xBD\x90" => "\xCF\x85\xCC\x93", # GREEK SMALL LETTER UPSILON WITH PSILI
962 "\xE1\xBD\x92" => "\xCF\x85\xCC\x93\xCC\x80", # GREEK SMALL LETTER UPSILON WITH PSILI AND VARIA
963 "\xE1\xBD\x94" => "\xCF\x85\xCC\x93\xCC\x81", # GREEK SMALL LETTER UPSILON WITH PSILI AND OXIA
964 "\xE1\xBD\x96" => "\xCF\x85\xCC\x93\xCD\x82", # GREEK SMALL LETTER UPSILON WITH PSILI AND PERISPOMENI
965 "\xE1\xBD\x99" => "\xE1\xBD\x91", # GREEK CAPITAL LETTER UPSILON WITH DASIA
966 "\xE1\xBD\x9B" => "\xE1\xBD\x93", # GREEK CAPITAL LETTER UPSILON WITH DASIA AND VARIA
967 "\xE1\xBD\x9D" => "\xE1\xBD\x95", # GREEK CAPITAL LETTER UPSILON WITH DASIA AND OXIA
968 "\xE1\xBD\x9F" => "\xE1\xBD\x97", # GREEK CAPITAL LETTER UPSILON WITH DASIA AND PERISPOMENI
969 "\xE1\xBD\xA8" => "\xE1\xBD\xA0", # GREEK CAPITAL LETTER OMEGA WITH PSILI
970 "\xE1\xBD\xA9" => "\xE1\xBD\xA1", # GREEK CAPITAL LETTER OMEGA WITH DASIA
971 "\xE1\xBD\xAA" => "\xE1\xBD\xA2", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA
972 "\xE1\xBD\xAB" => "\xE1\xBD\xA3", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA
973 "\xE1\xBD\xAC" => "\xE1\xBD\xA4", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA
974 "\xE1\xBD\xAD" => "\xE1\xBD\xA5", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA
975 "\xE1\xBD\xAE" => "\xE1\xBD\xA6", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI
976 "\xE1\xBD\xAF" => "\xE1\xBD\xA7", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI
977 "\xE1\xBE\x80" => "\xE1\xBC\x80\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH PSILI AND YPOGEGRAMMENI
978 "\xE1\xBE\x81" => "\xE1\xBC\x81\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH DASIA AND YPOGEGRAMMENI
979 "\xE1\xBE\x82" => "\xE1\xBC\x82\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH PSILI AND VARIA AND YPOGEGRAMMENI
980 "\xE1\xBE\x83" => "\xE1\xBC\x83\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH DASIA AND VARIA AND YPOGEGRAMMENI
981 "\xE1\xBE\x84" => "\xE1\xBC\x84\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH PSILI AND OXIA AND YPOGEGRAMMENI
982 "\xE1\xBE\x85" => "\xE1\xBC\x85\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH DASIA AND OXIA AND YPOGEGRAMMENI
983 "\xE1\xBE\x86" => "\xE1\xBC\x86\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
984 "\xE1\xBE\x87" => "\xE1\xBC\x87\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
985 "\xE1\xBE\x88" => "\xE1\xBC\x80\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI
986 "\xE1\xBE\x89" => "\xE1\xBC\x81\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI
987 "\xE1\xBE\x8A" => "\xE1\xBC\x82\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI
988 "\xE1\xBE\x8B" => "\xE1\xBC\x83\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI
989 "\xE1\xBE\x8C" => "\xE1\xBC\x84\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI
990 "\xE1\xBE\x8D" => "\xE1\xBC\x85\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI
991 "\xE1\xBE\x8E" => "\xE1\xBC\x86\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
992 "\xE1\xBE\x8F" => "\xE1\xBC\x87\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
993 "\xE1\xBE\x90" => "\xE1\xBC\xA0\xCE\xB9", # GREEK SMALL LETTER ETA WITH PSILI AND YPOGEGRAMMENI
994 "\xE1\xBE\x91" => "\xE1\xBC\xA1\xCE\xB9", # GREEK SMALL LETTER ETA WITH DASIA AND YPOGEGRAMMENI
995 "\xE1\xBE\x92" => "\xE1\xBC\xA2\xCE\xB9", # GREEK SMALL LETTER ETA WITH PSILI AND VARIA AND YPOGEGRAMMENI
996 "\xE1\xBE\x93" => "\xE1\xBC\xA3\xCE\xB9", # GREEK SMALL LETTER ETA WITH DASIA AND VARIA AND YPOGEGRAMMENI
997 "\xE1\xBE\x94" => "\xE1\xBC\xA4\xCE\xB9", # GREEK SMALL LETTER ETA WITH PSILI AND OXIA AND YPOGEGRAMMENI
998 "\xE1\xBE\x95" => "\xE1\xBC\xA5\xCE\xB9", # GREEK SMALL LETTER ETA WITH DASIA AND OXIA AND YPOGEGRAMMENI
999 "\xE1\xBE\x96" => "\xE1\xBC\xA6\xCE\xB9", # GREEK SMALL LETTER ETA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
1000 "\xE1\xBE\x97" => "\xE1\xBC\xA7\xCE\xB9", # GREEK SMALL LETTER ETA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
1001 "\xE1\xBE\x98" => "\xE1\xBC\xA0\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI
1002 "\xE1\xBE\x99" => "\xE1\xBC\xA1\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI
1003 "\xE1\xBE\x9A" => "\xE1\xBC\xA2\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI
1004 "\xE1\xBE\x9B" => "\xE1\xBC\xA3\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI
1005 "\xE1\xBE\x9C" => "\xE1\xBC\xA4\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI
1006 "\xE1\xBE\x9D" => "\xE1\xBC\xA5\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI
1007 "\xE1\xBE\x9E" => "\xE1\xBC\xA6\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
1008 "\xE1\xBE\x9F" => "\xE1\xBC\xA7\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
1009 "\xE1\xBE\xA0" => "\xE1\xBD\xA0\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH PSILI AND YPOGEGRAMMENI
1010 "\xE1\xBE\xA1" => "\xE1\xBD\xA1\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH DASIA AND YPOGEGRAMMENI
1011 "\xE1\xBE\xA2" => "\xE1\xBD\xA2\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH PSILI AND VARIA AND YPOGEGRAMMENI
1012 "\xE1\xBE\xA3" => "\xE1\xBD\xA3\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH DASIA AND VARIA AND YPOGEGRAMMENI
1013 "\xE1\xBE\xA4" => "\xE1\xBD\xA4\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH PSILI AND OXIA AND YPOGEGRAMMENI
1014 "\xE1\xBE\xA5" => "\xE1\xBD\xA5\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH DASIA AND OXIA AND YPOGEGRAMMENI
1015 "\xE1\xBE\xA6" => "\xE1\xBD\xA6\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH PSILI AND PERISPOMENI AND YPOGEGRAMMENI
1016 "\xE1\xBE\xA7" => "\xE1\xBD\xA7\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH DASIA AND PERISPOMENI AND YPOGEGRAMMENI
1017 "\xE1\xBE\xA8" => "\xE1\xBD\xA0\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI
1018 "\xE1\xBE\xA9" => "\xE1\xBD\xA1\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI
1019 "\xE1\xBE\xAA" => "\xE1\xBD\xA2\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI
1020 "\xE1\xBE\xAB" => "\xE1\xBD\xA3\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI
1021 "\xE1\xBE\xAC" => "\xE1\xBD\xA4\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI
1022 "\xE1\xBE\xAD" => "\xE1\xBD\xA5\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI
1023 "\xE1\xBE\xAE" => "\xE1\xBD\xA6\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI
1024 "\xE1\xBE\xAF" => "\xE1\xBD\xA7\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI
1025 "\xE1\xBE\xB2" => "\xE1\xBD\xB0\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH VARIA AND YPOGEGRAMMENI
1026 "\xE1\xBE\xB3" => "\xCE\xB1\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH YPOGEGRAMMENI
1027 "\xE1\xBE\xB4" => "\xCE\xAC\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH OXIA AND YPOGEGRAMMENI
1028 "\xE1\xBE\xB6" => "\xCE\xB1\xCD\x82", # GREEK SMALL LETTER ALPHA WITH PERISPOMENI
1029 "\xE1\xBE\xB7" => "\xCE\xB1\xCD\x82\xCE\xB9", # GREEK SMALL LETTER ALPHA WITH PERISPOMENI AND YPOGEGRAMMENI
1030 "\xE1\xBE\xB8" => "\xE1\xBE\xB0", # GREEK CAPITAL LETTER ALPHA WITH VRACHY
1031 "\xE1\xBE\xB9" => "\xE1\xBE\xB1", # GREEK CAPITAL LETTER ALPHA WITH MACRON
1032 "\xE1\xBE\xBA" => "\xE1\xBD\xB0", # GREEK CAPITAL LETTER ALPHA WITH VARIA
1033 "\xE1\xBE\xBB" => "\xE1\xBD\xB1", # GREEK CAPITAL LETTER ALPHA WITH OXIA
1034 "\xE1\xBE\xBC" => "\xCE\xB1\xCE\xB9", # GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI
1035 "\xE1\xBE\xBE" => "\xCE\xB9", # GREEK PROSGEGRAMMENI
1036 "\xE1\xBF\x82" => "\xE1\xBD\xB4\xCE\xB9", # GREEK SMALL LETTER ETA WITH VARIA AND YPOGEGRAMMENI
1037 "\xE1\xBF\x83" => "\xCE\xB7\xCE\xB9", # GREEK SMALL LETTER ETA WITH YPOGEGRAMMENI
1038 "\xE1\xBF\x84" => "\xCE\xAE\xCE\xB9", # GREEK SMALL LETTER ETA WITH OXIA AND YPOGEGRAMMENI
1039 "\xE1\xBF\x86" => "\xCE\xB7\xCD\x82", # GREEK SMALL LETTER ETA WITH PERISPOMENI
1040 "\xE1\xBF\x87" => "\xCE\xB7\xCD\x82\xCE\xB9", # GREEK SMALL LETTER ETA WITH PERISPOMENI AND YPOGEGRAMMENI
1041 "\xE1\xBF\x88" => "\xE1\xBD\xB2", # GREEK CAPITAL LETTER EPSILON WITH VARIA
1042 "\xE1\xBF\x89" => "\xE1\xBD\xB3", # GREEK CAPITAL LETTER EPSILON WITH OXIA
1043 "\xE1\xBF\x8A" => "\xE1\xBD\xB4", # GREEK CAPITAL LETTER ETA WITH VARIA
1044 "\xE1\xBF\x8B" => "\xE1\xBD\xB5", # GREEK CAPITAL LETTER ETA WITH OXIA
1045 "\xE1\xBF\x8C" => "\xCE\xB7\xCE\xB9", # GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI
1046 "\xE1\xBF\x92" => "\xCE\xB9\xCC\x88\xCC\x80", # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND VARIA
1047 "\xE1\xBF\x93" => "\xCE\xB9\xCC\x88\xCC\x81", # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND OXIA
1048 "\xE1\xBF\x96" => "\xCE\xB9\xCD\x82", # GREEK SMALL LETTER IOTA WITH PERISPOMENI
1049 "\xE1\xBF\x97" => "\xCE\xB9\xCC\x88\xCD\x82", # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND PERISPOMENI
1050 "\xE1\xBF\x98" => "\xE1\xBF\x90", # GREEK CAPITAL LETTER IOTA WITH VRACHY
1051 "\xE1\xBF\x99" => "\xE1\xBF\x91", # GREEK CAPITAL LETTER IOTA WITH MACRON
1052 "\xE1\xBF\x9A" => "\xE1\xBD\xB6", # GREEK CAPITAL LETTER IOTA WITH VARIA
1053 "\xE1\xBF\x9B" => "\xE1\xBD\xB7", # GREEK CAPITAL LETTER IOTA WITH OXIA
1054 "\xE1\xBF\xA2" => "\xCF\x85\xCC\x88\xCC\x80", # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND VARIA
1055 "\xE1\xBF\xA3" => "\xCF\x85\xCC\x88\xCC\x81", # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND OXIA
1056 "\xE1\xBF\xA4" => "\xCF\x81\xCC\x93", # GREEK SMALL LETTER RHO WITH PSILI
1057 "\xE1\xBF\xA6" => "\xCF\x85\xCD\x82", # GREEK SMALL LETTER UPSILON WITH PERISPOMENI
1058 "\xE1\xBF\xA7" => "\xCF\x85\xCC\x88\xCD\x82", # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND PERISPOMENI
1059 "\xE1\xBF\xA8" => "\xE1\xBF\xA0", # GREEK CAPITAL LETTER UPSILON WITH VRACHY
1060 "\xE1\xBF\xA9" => "\xE1\xBF\xA1", # GREEK CAPITAL LETTER UPSILON WITH MACRON
1061 "\xE1\xBF\xAA" => "\xE1\xBD\xBA", # GREEK CAPITAL LETTER UPSILON WITH VARIA
1062 "\xE1\xBF\xAB" => "\xE1\xBD\xBB", # GREEK CAPITAL LETTER UPSILON WITH OXIA
1063 "\xE1\xBF\xAC" => "\xE1\xBF\xA5", # GREEK CAPITAL LETTER RHO WITH DASIA
1064 "\xE1\xBF\xB2" => "\xE1\xBD\xBC\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH VARIA AND YPOGEGRAMMENI
1065 "\xE1\xBF\xB3" => "\xCF\x89\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH YPOGEGRAMMENI
1066 "\xE1\xBF\xB4" => "\xCF\x8E\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH OXIA AND YPOGEGRAMMENI
1067 "\xE1\xBF\xB6" => "\xCF\x89\xCD\x82", # GREEK SMALL LETTER OMEGA WITH PERISPOMENI
1068 "\xE1\xBF\xB7" => "\xCF\x89\xCD\x82\xCE\xB9", # GREEK SMALL LETTER OMEGA WITH PERISPOMENI AND YPOGEGRAMMENI
1069 "\xE1\xBF\xB8" => "\xE1\xBD\xB8", # GREEK CAPITAL LETTER OMICRON WITH VARIA
1070 "\xE1\xBF\xB9" => "\xE1\xBD\xB9", # GREEK CAPITAL LETTER OMICRON WITH OXIA
1071 "\xE1\xBF\xBA" => "\xE1\xBD\xBC", # GREEK CAPITAL LETTER OMEGA WITH VARIA
1072 "\xE1\xBF\xBB" => "\xE1\xBD\xBD", # GREEK CAPITAL LETTER OMEGA WITH OXIA
1073 "\xE1\xBF\xBC" => "\xCF\x89\xCE\xB9", # GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI
1074 "\xE2\x84\xA6" => "\xCF\x89", # OHM SIGN
1075 "\xE2\x84\xAA" => "\x6B", # KELVIN SIGN
1076 "\xE2\x84\xAB" => "\xC3\xA5", # ANGSTROM SIGN
1077 "\xE2\x84\xB2" => "\xE2\x85\x8E", # TURNED CAPITAL F
1078 "\xE2\x85\xA0" => "\xE2\x85\xB0", # ROMAN NUMERAL ONE
1079 "\xE2\x85\xA1" => "\xE2\x85\xB1", # ROMAN NUMERAL TWO
1080 "\xE2\x85\xA2" => "\xE2\x85\xB2", # ROMAN NUMERAL THREE
1081 "\xE2\x85\xA3" => "\xE2\x85\xB3", # ROMAN NUMERAL FOUR
1082 "\xE2\x85\xA4" => "\xE2\x85\xB4", # ROMAN NUMERAL FIVE
1083 "\xE2\x85\xA5" => "\xE2\x85\xB5", # ROMAN NUMERAL SIX
1084 "\xE2\x85\xA6" => "\xE2\x85\xB6", # ROMAN NUMERAL SEVEN
1085 "\xE2\x85\xA7" => "\xE2\x85\xB7", # ROMAN NUMERAL EIGHT
1086 "\xE2\x85\xA8" => "\xE2\x85\xB8", # ROMAN NUMERAL NINE
1087 "\xE2\x85\xA9" => "\xE2\x85\xB9", # ROMAN NUMERAL TEN
1088 "\xE2\x85\xAA" => "\xE2\x85\xBA", # ROMAN NUMERAL ELEVEN
1089 "\xE2\x85\xAB" => "\xE2\x85\xBB", # ROMAN NUMERAL TWELVE
1090 "\xE2\x85\xAC" => "\xE2\x85\xBC", # ROMAN NUMERAL FIFTY
1091 "\xE2\x85\xAD" => "\xE2\x85\xBD", # ROMAN NUMERAL ONE HUNDRED
1092 "\xE2\x85\xAE" => "\xE2\x85\xBE", # ROMAN NUMERAL FIVE HUNDRED
1093 "\xE2\x85\xAF" => "\xE2\x85\xBF", # ROMAN NUMERAL ONE THOUSAND
1094 "\xE2\x86\x83" => "\xE2\x86\x84", # ROMAN NUMERAL REVERSED ONE HUNDRED
1095 "\xE2\x92\xB6" => "\xE2\x93\x90", # CIRCLED LATIN CAPITAL LETTER A
1096 "\xE2\x92\xB7" => "\xE2\x93\x91", # CIRCLED LATIN CAPITAL LETTER B
1097 "\xE2\x92\xB8" => "\xE2\x93\x92", # CIRCLED LATIN CAPITAL LETTER C
1098 "\xE2\x92\xB9" => "\xE2\x93\x93", # CIRCLED LATIN CAPITAL LETTER D
1099 "\xE2\x92\xBA" => "\xE2\x93\x94", # CIRCLED LATIN CAPITAL LETTER E
1100 "\xE2\x92\xBB" => "\xE2\x93\x95", # CIRCLED LATIN CAPITAL LETTER F
1101 "\xE2\x92\xBC" => "\xE2\x93\x96", # CIRCLED LATIN CAPITAL LETTER G
1102 "\xE2\x92\xBD" => "\xE2\x93\x97", # CIRCLED LATIN CAPITAL LETTER H
1103 "\xE2\x92\xBE" => "\xE2\x93\x98", # CIRCLED LATIN CAPITAL LETTER I
1104 "\xE2\x92\xBF" => "\xE2\x93\x99", # CIRCLED LATIN CAPITAL LETTER J
1105 "\xE2\x93\x80" => "\xE2\x93\x9A", # CIRCLED LATIN CAPITAL LETTER K
1106 "\xE2\x93\x81" => "\xE2\x93\x9B", # CIRCLED LATIN CAPITAL LETTER L
1107 "\xE2\x93\x82" => "\xE2\x93\x9C", # CIRCLED LATIN CAPITAL LETTER M
1108 "\xE2\x93\x83" => "\xE2\x93\x9D", # CIRCLED LATIN CAPITAL LETTER N
1109 "\xE2\x93\x84" => "\xE2\x93\x9E", # CIRCLED LATIN CAPITAL LETTER O
1110 "\xE2\x93\x85" => "\xE2\x93\x9F", # CIRCLED LATIN CAPITAL LETTER P
1111 "\xE2\x93\x86" => "\xE2\x93\xA0", # CIRCLED LATIN CAPITAL LETTER Q
1112 "\xE2\x93\x87" => "\xE2\x93\xA1", # CIRCLED LATIN CAPITAL LETTER R
1113 "\xE2\x93\x88" => "\xE2\x93\xA2", # CIRCLED LATIN CAPITAL LETTER S
1114 "\xE2\x93\x89" => "\xE2\x93\xA3", # CIRCLED LATIN CAPITAL LETTER T
1115 "\xE2\x93\x8A" => "\xE2\x93\xA4", # CIRCLED LATIN CAPITAL LETTER U
1116 "\xE2\x93\x8B" => "\xE2\x93\xA5", # CIRCLED LATIN CAPITAL LETTER V
1117 "\xE2\x93\x8C" => "\xE2\x93\xA6", # CIRCLED LATIN CAPITAL LETTER W
1118 "\xE2\x93\x8D" => "\xE2\x93\xA7", # CIRCLED LATIN CAPITAL LETTER X
1119 "\xE2\x93\x8E" => "\xE2\x93\xA8", # CIRCLED LATIN CAPITAL LETTER Y
1120 "\xE2\x93\x8F" => "\xE2\x93\xA9", # CIRCLED LATIN CAPITAL LETTER Z
1121 "\xE2\xB0\x80" => "\xE2\xB0\xB0", # GLAGOLITIC CAPITAL LETTER AZU
1122 "\xE2\xB0\x81" => "\xE2\xB0\xB1", # GLAGOLITIC CAPITAL LETTER BUKY
1123 "\xE2\xB0\x82" => "\xE2\xB0\xB2", # GLAGOLITIC CAPITAL LETTER VEDE
1124 "\xE2\xB0\x83" => "\xE2\xB0\xB3", # GLAGOLITIC CAPITAL LETTER GLAGOLI
1125 "\xE2\xB0\x84" => "\xE2\xB0\xB4", # GLAGOLITIC CAPITAL LETTER DOBRO
1126 "\xE2\xB0\x85" => "\xE2\xB0\xB5", # GLAGOLITIC CAPITAL LETTER YESTU
1127 "\xE2\xB0\x86" => "\xE2\xB0\xB6", # GLAGOLITIC CAPITAL LETTER ZHIVETE
1128 "\xE2\xB0\x87" => "\xE2\xB0\xB7", # GLAGOLITIC CAPITAL LETTER DZELO
1129 "\xE2\xB0\x88" => "\xE2\xB0\xB8", # GLAGOLITIC CAPITAL LETTER ZEMLJA
1130 "\xE2\xB0\x89" => "\xE2\xB0\xB9", # GLAGOLITIC CAPITAL LETTER IZHE
1131 "\xE2\xB0\x8A" => "\xE2\xB0\xBA", # GLAGOLITIC CAPITAL LETTER INITIAL IZHE
1132 "\xE2\xB0\x8B" => "\xE2\xB0\xBB", # GLAGOLITIC CAPITAL LETTER I
1133 "\xE2\xB0\x8C" => "\xE2\xB0\xBC", # GLAGOLITIC CAPITAL LETTER DJERVI
1134 "\xE2\xB0\x8D" => "\xE2\xB0\xBD", # GLAGOLITIC CAPITAL LETTER KAKO
1135 "\xE2\xB0\x8E" => "\xE2\xB0\xBE", # GLAGOLITIC CAPITAL LETTER LJUDIJE
1136 "\xE2\xB0\x8F" => "\xE2\xB0\xBF", # GLAGOLITIC CAPITAL LETTER MYSLITE
1137 "\xE2\xB0\x90" => "\xE2\xB1\x80", # GLAGOLITIC CAPITAL LETTER NASHI
1138 "\xE2\xB0\x91" => "\xE2\xB1\x81", # GLAGOLITIC CAPITAL LETTER ONU
1139 "\xE2\xB0\x92" => "\xE2\xB1\x82", # GLAGOLITIC CAPITAL LETTER POKOJI
1140 "\xE2\xB0\x93" => "\xE2\xB1\x83", # GLAGOLITIC CAPITAL LETTER RITSI
1141 "\xE2\xB0\x94" => "\xE2\xB1\x84", # GLAGOLITIC CAPITAL LETTER SLOVO
1142 "\xE2\xB0\x95" => "\xE2\xB1\x85", # GLAGOLITIC CAPITAL LETTER TVRIDO
1143 "\xE2\xB0\x96" => "\xE2\xB1\x86", # GLAGOLITIC CAPITAL LETTER UKU
1144 "\xE2\xB0\x97" => "\xE2\xB1\x87", # GLAGOLITIC CAPITAL LETTER FRITU
1145 "\xE2\xB0\x98" => "\xE2\xB1\x88", # GLAGOLITIC CAPITAL LETTER HERU
1146 "\xE2\xB0\x99" => "\xE2\xB1\x89", # GLAGOLITIC CAPITAL LETTER OTU
1147 "\xE2\xB0\x9A" => "\xE2\xB1\x8A", # GLAGOLITIC CAPITAL LETTER PE
1148 "\xE2\xB0\x9B" => "\xE2\xB1\x8B", # GLAGOLITIC CAPITAL LETTER SHTA
1149 "\xE2\xB0\x9C" => "\xE2\xB1\x8C", # GLAGOLITIC CAPITAL LETTER TSI
1150 "\xE2\xB0\x9D" => "\xE2\xB1\x8D", # GLAGOLITIC CAPITAL LETTER CHRIVI
1151 "\xE2\xB0\x9E" => "\xE2\xB1\x8E", # GLAGOLITIC CAPITAL LETTER SHA
1152 "\xE2\xB0\x9F" => "\xE2\xB1\x8F", # GLAGOLITIC CAPITAL LETTER YERU
1153 "\xE2\xB0\xA0" => "\xE2\xB1\x90", # GLAGOLITIC CAPITAL LETTER YERI
1154 "\xE2\xB0\xA1" => "\xE2\xB1\x91", # GLAGOLITIC CAPITAL LETTER YATI
1155 "\xE2\xB0\xA2" => "\xE2\xB1\x92", # GLAGOLITIC CAPITAL LETTER SPIDERY HA
1156 "\xE2\xB0\xA3" => "\xE2\xB1\x93", # GLAGOLITIC CAPITAL LETTER YU
1157 "\xE2\xB0\xA4" => "\xE2\xB1\x94", # GLAGOLITIC CAPITAL LETTER SMALL YUS
1158 "\xE2\xB0\xA5" => "\xE2\xB1\x95", # GLAGOLITIC CAPITAL LETTER SMALL YUS WITH TAIL
1159 "\xE2\xB0\xA6" => "\xE2\xB1\x96", # GLAGOLITIC CAPITAL LETTER YO
1160 "\xE2\xB0\xA7" => "\xE2\xB1\x97", # GLAGOLITIC CAPITAL LETTER IOTATED SMALL YUS
1161 "\xE2\xB0\xA8" => "\xE2\xB1\x98", # GLAGOLITIC CAPITAL LETTER BIG YUS
1162 "\xE2\xB0\xA9" => "\xE2\xB1\x99", # GLAGOLITIC CAPITAL LETTER IOTATED BIG YUS
1163 "\xE2\xB0\xAA" => "\xE2\xB1\x9A", # GLAGOLITIC CAPITAL LETTER FITA
1164 "\xE2\xB0\xAB" => "\xE2\xB1\x9B", # GLAGOLITIC CAPITAL LETTER IZHITSA
1165 "\xE2\xB0\xAC" => "\xE2\xB1\x9C", # GLAGOLITIC CAPITAL LETTER SHTAPIC
1166 "\xE2\xB0\xAD" => "\xE2\xB1\x9D", # GLAGOLITIC CAPITAL LETTER TROKUTASTI A
1167 "\xE2\xB0\xAE" => "\xE2\xB1\x9E", # GLAGOLITIC CAPITAL LETTER LATINATE MYSLITE
1168 "\xE2\xB1\xA0" => "\xE2\xB1\xA1", # LATIN CAPITAL LETTER L WITH DOUBLE BAR
1169 "\xE2\xB1\xA2" => "\xC9\xAB", # LATIN CAPITAL LETTER L WITH MIDDLE TILDE
1170 "\xE2\xB1\xA3" => "\xE1\xB5\xBD", # LATIN CAPITAL LETTER P WITH STROKE
1171 "\xE2\xB1\xA4" => "\xC9\xBD", # LATIN CAPITAL LETTER R WITH TAIL
1172 "\xE2\xB1\xA7" => "\xE2\xB1\xA8", # LATIN CAPITAL LETTER H WITH DESCENDER
1173 "\xE2\xB1\xA9" => "\xE2\xB1\xAA", # LATIN CAPITAL LETTER K WITH DESCENDER
1174 "\xE2\xB1\xAB" => "\xE2\xB1\xAC", # LATIN CAPITAL LETTER Z WITH DESCENDER
1175 "\xE2\xB1\xAD" => "\xC9\x91", # LATIN CAPITAL LETTER ALPHA
1176 "\xE2\xB1\xAE" => "\xC9\xB1", # LATIN CAPITAL LETTER M WITH HOOK
1177 "\xE2\xB1\xAF" => "\xC9\x90", # LATIN CAPITAL LETTER TURNED A
1178 "\xE2\xB1\xB0" => "\xC9\x92", # LATIN CAPITAL LETTER TURNED ALPHA
1179 "\xE2\xB1\xB2" => "\xE2\xB1\xB3", # LATIN CAPITAL LETTER W WITH HOOK
1180 "\xE2\xB1\xB5" => "\xE2\xB1\xB6", # LATIN CAPITAL LETTER HALF H
1181 "\xE2\xB1\xBE" => "\xC8\xBF", # LATIN CAPITAL LETTER S WITH SWASH TAIL
1182 "\xE2\xB1\xBF" => "\xC9\x80", # LATIN CAPITAL LETTER Z WITH SWASH TAIL
1183 "\xE2\xB2\x80" => "\xE2\xB2\x81", # COPTIC CAPITAL LETTER ALFA
1184 "\xE2\xB2\x82" => "\xE2\xB2\x83", # COPTIC CAPITAL LETTER VIDA
1185 "\xE2\xB2\x84" => "\xE2\xB2\x85", # COPTIC CAPITAL LETTER GAMMA
1186 "\xE2\xB2\x86" => "\xE2\xB2\x87", # COPTIC CAPITAL LETTER DALDA
1187 "\xE2\xB2\x88" => "\xE2\xB2\x89", # COPTIC CAPITAL LETTER EIE
1188 "\xE2\xB2\x8A" => "\xE2\xB2\x8B", # COPTIC CAPITAL LETTER SOU
1189 "\xE2\xB2\x8C" => "\xE2\xB2\x8D", # COPTIC CAPITAL LETTER ZATA
1190 "\xE2\xB2\x8E" => "\xE2\xB2\x8F", # COPTIC CAPITAL LETTER HATE
1191 "\xE2\xB2\x90" => "\xE2\xB2\x91", # COPTIC CAPITAL LETTER THETHE
1192 "\xE2\xB2\x92" => "\xE2\xB2\x93", # COPTIC CAPITAL LETTER IAUDA
1193 "\xE2\xB2\x94" => "\xE2\xB2\x95", # COPTIC CAPITAL LETTER KAPA
1194 "\xE2\xB2\x96" => "\xE2\xB2\x97", # COPTIC CAPITAL LETTER LAULA
1195 "\xE2\xB2\x98" => "\xE2\xB2\x99", # COPTIC CAPITAL LETTER MI
1196 "\xE2\xB2\x9A" => "\xE2\xB2\x9B", # COPTIC CAPITAL LETTER NI
1197 "\xE2\xB2\x9C" => "\xE2\xB2\x9D", # COPTIC CAPITAL LETTER KSI
1198 "\xE2\xB2\x9E" => "\xE2\xB2\x9F", # COPTIC CAPITAL LETTER O
1199 "\xE2\xB2\xA0" => "\xE2\xB2\xA1", # COPTIC CAPITAL LETTER PI
1200 "\xE2\xB2\xA2" => "\xE2\xB2\xA3", # COPTIC CAPITAL LETTER RO
1201 "\xE2\xB2\xA4" => "\xE2\xB2\xA5", # COPTIC CAPITAL LETTER SIMA
1202 "\xE2\xB2\xA6" => "\xE2\xB2\xA7", # COPTIC CAPITAL LETTER TAU
1203 "\xE2\xB2\xA8" => "\xE2\xB2\xA9", # COPTIC CAPITAL LETTER UA
1204 "\xE2\xB2\xAA" => "\xE2\xB2\xAB", # COPTIC CAPITAL LETTER FI
1205 "\xE2\xB2\xAC" => "\xE2\xB2\xAD", # COPTIC CAPITAL LETTER KHI
1206 "\xE2\xB2\xAE" => "\xE2\xB2\xAF", # COPTIC CAPITAL LETTER PSI
1207 "\xE2\xB2\xB0" => "\xE2\xB2\xB1", # COPTIC CAPITAL LETTER OOU
1208 "\xE2\xB2\xB2" => "\xE2\xB2\xB3", # COPTIC CAPITAL LETTER DIALECT-P ALEF
1209 "\xE2\xB2\xB4" => "\xE2\xB2\xB5", # COPTIC CAPITAL LETTER OLD COPTIC AIN
1210 "\xE2\xB2\xB6" => "\xE2\xB2\xB7", # COPTIC CAPITAL LETTER CRYPTOGRAMMIC EIE
1211 "\xE2\xB2\xB8" => "\xE2\xB2\xB9", # COPTIC CAPITAL LETTER DIALECT-P KAPA
1212 "\xE2\xB2\xBA" => "\xE2\xB2\xBB", # COPTIC CAPITAL LETTER DIALECT-P NI
1213 "\xE2\xB2\xBC" => "\xE2\xB2\xBD", # COPTIC CAPITAL LETTER CRYPTOGRAMMIC NI
1214 "\xE2\xB2\xBE" => "\xE2\xB2\xBF", # COPTIC CAPITAL LETTER OLD COPTIC OOU
1215 "\xE2\xB3\x80" => "\xE2\xB3\x81", # COPTIC CAPITAL LETTER SAMPI
1216 "\xE2\xB3\x82" => "\xE2\xB3\x83", # COPTIC CAPITAL LETTER CROSSED SHEI
1217 "\xE2\xB3\x84" => "\xE2\xB3\x85", # COPTIC CAPITAL LETTER OLD COPTIC SHEI
1218 "\xE2\xB3\x86" => "\xE2\xB3\x87", # COPTIC CAPITAL LETTER OLD COPTIC ESH
1219 "\xE2\xB3\x88" => "\xE2\xB3\x89", # COPTIC CAPITAL LETTER AKHMIMIC KHEI
1220 "\xE2\xB3\x8A" => "\xE2\xB3\x8B", # COPTIC CAPITAL LETTER DIALECT-P HORI
1221 "\xE2\xB3\x8C" => "\xE2\xB3\x8D", # COPTIC CAPITAL LETTER OLD COPTIC HORI
1222 "\xE2\xB3\x8E" => "\xE2\xB3\x8F", # COPTIC CAPITAL LETTER OLD COPTIC HA
1223 "\xE2\xB3\x90" => "\xE2\xB3\x91", # COPTIC CAPITAL LETTER L-SHAPED HA
1224 "\xE2\xB3\x92" => "\xE2\xB3\x93", # COPTIC CAPITAL LETTER OLD COPTIC HEI
1225 "\xE2\xB3\x94" => "\xE2\xB3\x95", # COPTIC CAPITAL LETTER OLD COPTIC HAT
1226 "\xE2\xB3\x96" => "\xE2\xB3\x97", # COPTIC CAPITAL LETTER OLD COPTIC GANGIA
1227 "\xE2\xB3\x98" => "\xE2\xB3\x99", # COPTIC CAPITAL LETTER OLD COPTIC DJA
1228 "\xE2\xB3\x9A" => "\xE2\xB3\x9B", # COPTIC CAPITAL LETTER OLD COPTIC SHIMA
1229 "\xE2\xB3\x9C" => "\xE2\xB3\x9D", # COPTIC CAPITAL LETTER OLD NUBIAN SHIMA
1230 "\xE2\xB3\x9E" => "\xE2\xB3\x9F", # COPTIC CAPITAL LETTER OLD NUBIAN NGI
1231 "\xE2\xB3\xA0" => "\xE2\xB3\xA1", # COPTIC CAPITAL LETTER OLD NUBIAN NYI
1232 "\xE2\xB3\xA2" => "\xE2\xB3\xA3", # COPTIC CAPITAL LETTER OLD NUBIAN WAU
1233 "\xE2\xB3\xAB" => "\xE2\xB3\xAC", # COPTIC CAPITAL LETTER CRYPTOGRAMMIC SHEI
1234 "\xE2\xB3\xAD" => "\xE2\xB3\xAE", # COPTIC CAPITAL LETTER CRYPTOGRAMMIC GANGIA
1235 "\xE2\xB3\xB2" => "\xE2\xB3\xB3", # COPTIC CAPITAL LETTER BOHAIRIC KHEI
1236 "\xEA\x99\x80" => "\xEA\x99\x81", # CYRILLIC CAPITAL LETTER ZEMLYA
1237 "\xEA\x99\x82" => "\xEA\x99\x83", # CYRILLIC CAPITAL LETTER DZELO
1238 "\xEA\x99\x84" => "\xEA\x99\x85", # CYRILLIC CAPITAL LETTER REVERSED DZE
1239 "\xEA\x99\x86" => "\xEA\x99\x87", # CYRILLIC CAPITAL LETTER IOTA
1240 "\xEA\x99\x88" => "\xEA\x99\x89", # CYRILLIC CAPITAL LETTER DJERV
1241 "\xEA\x99\x8A" => "\xEA\x99\x8B", # CYRILLIC CAPITAL LETTER MONOGRAPH UK
1242 "\xEA\x99\x8C" => "\xEA\x99\x8D", # CYRILLIC CAPITAL LETTER BROAD OMEGA
1243 "\xEA\x99\x8E" => "\xEA\x99\x8F", # CYRILLIC CAPITAL LETTER NEUTRAL YER
1244 "\xEA\x99\x90" => "\xEA\x99\x91", # CYRILLIC CAPITAL LETTER YERU WITH BACK YER
1245 "\xEA\x99\x92" => "\xEA\x99\x93", # CYRILLIC CAPITAL LETTER IOTIFIED YAT
1246 "\xEA\x99\x94" => "\xEA\x99\x95", # CYRILLIC CAPITAL LETTER REVERSED YU
1247 "\xEA\x99\x96" => "\xEA\x99\x97", # CYRILLIC CAPITAL LETTER IOTIFIED A
1248 "\xEA\x99\x98" => "\xEA\x99\x99", # CYRILLIC CAPITAL LETTER CLOSED LITTLE YUS
1249 "\xEA\x99\x9A" => "\xEA\x99\x9B", # CYRILLIC CAPITAL LETTER BLENDED YUS
1250 "\xEA\x99\x9C" => "\xEA\x99\x9D", # CYRILLIC CAPITAL LETTER IOTIFIED CLOSED LITTLE YUS
1251 "\xEA\x99\x9E" => "\xEA\x99\x9F", # CYRILLIC CAPITAL LETTER YN
1252 "\xEA\x99\xA0" => "\xEA\x99\xA1", # CYRILLIC CAPITAL LETTER REVERSED TSE
1253 "\xEA\x99\xA2" => "\xEA\x99\xA3", # CYRILLIC CAPITAL LETTER SOFT DE
1254 "\xEA\x99\xA4" => "\xEA\x99\xA5", # CYRILLIC CAPITAL LETTER SOFT EL
1255 "\xEA\x99\xA6" => "\xEA\x99\xA7", # CYRILLIC CAPITAL LETTER SOFT EM
1256 "\xEA\x99\xA8" => "\xEA\x99\xA9", # CYRILLIC CAPITAL LETTER MONOCULAR O
1257 "\xEA\x99\xAA" => "\xEA\x99\xAB", # CYRILLIC CAPITAL LETTER BINOCULAR O
1258 "\xEA\x99\xAC" => "\xEA\x99\xAD", # CYRILLIC CAPITAL LETTER DOUBLE MONOCULAR O
1259 "\xEA\x9A\x80" => "\xEA\x9A\x81", # CYRILLIC CAPITAL LETTER DWE
1260 "\xEA\x9A\x82" => "\xEA\x9A\x83", # CYRILLIC CAPITAL LETTER DZWE
1261 "\xEA\x9A\x84" => "\xEA\x9A\x85", # CYRILLIC CAPITAL LETTER ZHWE
1262 "\xEA\x9A\x86" => "\xEA\x9A\x87", # CYRILLIC CAPITAL LETTER CCHE
1263 "\xEA\x9A\x88" => "\xEA\x9A\x89", # CYRILLIC CAPITAL LETTER DZZE
1264 "\xEA\x9A\x8A" => "\xEA\x9A\x8B", # CYRILLIC CAPITAL LETTER TE WITH MIDDLE HOOK
1265 "\xEA\x9A\x8C" => "\xEA\x9A\x8D", # CYRILLIC CAPITAL LETTER TWE
1266 "\xEA\x9A\x8E" => "\xEA\x9A\x8F", # CYRILLIC CAPITAL LETTER TSWE
1267 "\xEA\x9A\x90" => "\xEA\x9A\x91", # CYRILLIC CAPITAL LETTER TSSE
1268 "\xEA\x9A\x92" => "\xEA\x9A\x93", # CYRILLIC CAPITAL LETTER TCHE
1269 "\xEA\x9A\x94" => "\xEA\x9A\x95", # CYRILLIC CAPITAL LETTER HWE
1270 "\xEA\x9A\x96" => "\xEA\x9A\x97", # CYRILLIC CAPITAL LETTER SHWE
1271 "\xEA\x9A\x98" => "\xEA\x9A\x99", # CYRILLIC CAPITAL LETTER DOUBLE O
1272 "\xEA\x9A\x9A" => "\xEA\x9A\x9B", # CYRILLIC CAPITAL LETTER CROSSED O
1273 "\xEA\x9C\xA2" => "\xEA\x9C\xA3", # LATIN CAPITAL LETTER EGYPTOLOGICAL ALEF
1274 "\xEA\x9C\xA4" => "\xEA\x9C\xA5", # LATIN CAPITAL LETTER EGYPTOLOGICAL AIN
1275 "\xEA\x9C\xA6" => "\xEA\x9C\xA7", # LATIN CAPITAL LETTER HENG
1276 "\xEA\x9C\xA8" => "\xEA\x9C\xA9", # LATIN CAPITAL LETTER TZ
1277 "\xEA\x9C\xAA" => "\xEA\x9C\xAB", # LATIN CAPITAL LETTER TRESILLO
1278 "\xEA\x9C\xAC" => "\xEA\x9C\xAD", # LATIN CAPITAL LETTER CUATRILLO
1279 "\xEA\x9C\xAE" => "\xEA\x9C\xAF", # LATIN CAPITAL LETTER CUATRILLO WITH COMMA
1280 "\xEA\x9C\xB2" => "\xEA\x9C\xB3", # LATIN CAPITAL LETTER AA
1281 "\xEA\x9C\xB4" => "\xEA\x9C\xB5", # LATIN CAPITAL LETTER AO
1282 "\xEA\x9C\xB6" => "\xEA\x9C\xB7", # LATIN CAPITAL LETTER AU
1283 "\xEA\x9C\xB8" => "\xEA\x9C\xB9", # LATIN CAPITAL LETTER AV
1284 "\xEA\x9C\xBA" => "\xEA\x9C\xBB", # LATIN CAPITAL LETTER AV WITH HORIZONTAL BAR
1285 "\xEA\x9C\xBC" => "\xEA\x9C\xBD", # LATIN CAPITAL LETTER AY
1286 "\xEA\x9C\xBE" => "\xEA\x9C\xBF", # LATIN CAPITAL LETTER REVERSED C WITH DOT
1287 "\xEA\x9D\x80" => "\xEA\x9D\x81", # LATIN CAPITAL LETTER K WITH STROKE
1288 "\xEA\x9D\x82" => "\xEA\x9D\x83", # LATIN CAPITAL LETTER K WITH DIAGONAL STROKE
1289 "\xEA\x9D\x84" => "\xEA\x9D\x85", # LATIN CAPITAL LETTER K WITH STROKE AND DIAGONAL STROKE
1290 "\xEA\x9D\x86" => "\xEA\x9D\x87", # LATIN CAPITAL LETTER BROKEN L
1291 "\xEA\x9D\x88" => "\xEA\x9D\x89", # LATIN CAPITAL LETTER L WITH HIGH STROKE
1292 "\xEA\x9D\x8A" => "\xEA\x9D\x8B", # LATIN CAPITAL LETTER O WITH LONG STROKE OVERLAY
1293 "\xEA\x9D\x8C" => "\xEA\x9D\x8D", # LATIN CAPITAL LETTER O WITH LOOP
1294 "\xEA\x9D\x8E" => "\xEA\x9D\x8F", # LATIN CAPITAL LETTER OO
1295 "\xEA\x9D\x90" => "\xEA\x9D\x91", # LATIN CAPITAL LETTER P WITH STROKE THROUGH DESCENDER
1296 "\xEA\x9D\x92" => "\xEA\x9D\x93", # LATIN CAPITAL LETTER P WITH FLOURISH
1297 "\xEA\x9D\x94" => "\xEA\x9D\x95", # LATIN CAPITAL LETTER P WITH SQUIRREL TAIL
1298 "\xEA\x9D\x96" => "\xEA\x9D\x97", # LATIN CAPITAL LETTER Q WITH STROKE THROUGH DESCENDER
1299 "\xEA\x9D\x98" => "\xEA\x9D\x99", # LATIN CAPITAL LETTER Q WITH DIAGONAL STROKE
1300 "\xEA\x9D\x9A" => "\xEA\x9D\x9B", # LATIN CAPITAL LETTER R ROTUNDA
1301 "\xEA\x9D\x9C" => "\xEA\x9D\x9D", # LATIN CAPITAL LETTER RUM ROTUNDA
1302 "\xEA\x9D\x9E" => "\xEA\x9D\x9F", # LATIN CAPITAL LETTER V WITH DIAGONAL STROKE
1303 "\xEA\x9D\xA0" => "\xEA\x9D\xA1", # LATIN CAPITAL LETTER VY
1304 "\xEA\x9D\xA2" => "\xEA\x9D\xA3", # LATIN CAPITAL LETTER VISIGOTHIC Z
1305 "\xEA\x9D\xA4" => "\xEA\x9D\xA5", # LATIN CAPITAL LETTER THORN WITH STROKE
1306 "\xEA\x9D\xA6" => "\xEA\x9D\xA7", # LATIN CAPITAL LETTER THORN WITH STROKE THROUGH DESCENDER
1307 "\xEA\x9D\xA8" => "\xEA\x9D\xA9", # LATIN CAPITAL LETTER VEND
1308 "\xEA\x9D\xAA" => "\xEA\x9D\xAB", # LATIN CAPITAL LETTER ET
1309 "\xEA\x9D\xAC" => "\xEA\x9D\xAD", # LATIN CAPITAL LETTER IS
1310 "\xEA\x9D\xAE" => "\xEA\x9D\xAF", # LATIN CAPITAL LETTER CON
1311 "\xEA\x9D\xB9" => "\xEA\x9D\xBA", # LATIN CAPITAL LETTER INSULAR D
1312 "\xEA\x9D\xBB" => "\xEA\x9D\xBC", # LATIN CAPITAL LETTER INSULAR F
1313 "\xEA\x9D\xBD" => "\xE1\xB5\xB9", # LATIN CAPITAL LETTER INSULAR G
1314 "\xEA\x9D\xBE" => "\xEA\x9D\xBF", # LATIN CAPITAL LETTER TURNED INSULAR G
1315 "\xEA\x9E\x80" => "\xEA\x9E\x81", # LATIN CAPITAL LETTER TURNED L
1316 "\xEA\x9E\x82" => "\xEA\x9E\x83", # LATIN CAPITAL LETTER INSULAR R
1317 "\xEA\x9E\x84" => "\xEA\x9E\x85", # LATIN CAPITAL LETTER INSULAR S
1318 "\xEA\x9E\x86" => "\xEA\x9E\x87", # LATIN CAPITAL LETTER INSULAR T
1319 "\xEA\x9E\x8B" => "\xEA\x9E\x8C", # LATIN CAPITAL LETTER SALTILLO
1320 "\xEA\x9E\x8D" => "\xC9\xA5", # LATIN CAPITAL LETTER TURNED H
1321 "\xEA\x9E\x90" => "\xEA\x9E\x91", # LATIN CAPITAL LETTER N WITH DESCENDER
1322 "\xEA\x9E\x92" => "\xEA\x9E\x93", # LATIN CAPITAL LETTER C WITH BAR
1323 "\xEA\x9E\x96" => "\xEA\x9E\x97", # LATIN CAPITAL LETTER B WITH FLOURISH
1324 "\xEA\x9E\x98" => "\xEA\x9E\x99", # LATIN CAPITAL LETTER F WITH STROKE
1325 "\xEA\x9E\x9A" => "\xEA\x9E\x9B", # LATIN CAPITAL LETTER VOLAPUK AE
1326 "\xEA\x9E\x9C" => "\xEA\x9E\x9D", # LATIN CAPITAL LETTER VOLAPUK OE
1327 "\xEA\x9E\x9E" => "\xEA\x9E\x9F", # LATIN CAPITAL LETTER VOLAPUK UE
1328 "\xEA\x9E\xA0" => "\xEA\x9E\xA1", # LATIN CAPITAL LETTER G WITH OBLIQUE STROKE
1329 "\xEA\x9E\xA2" => "\xEA\x9E\xA3", # LATIN CAPITAL LETTER K WITH OBLIQUE STROKE
1330 "\xEA\x9E\xA4" => "\xEA\x9E\xA5", # LATIN CAPITAL LETTER N WITH OBLIQUE STROKE
1331 "\xEA\x9E\xA6" => "\xEA\x9E\xA7", # LATIN CAPITAL LETTER R WITH OBLIQUE STROKE
1332 "\xEA\x9E\xA8" => "\xEA\x9E\xA9", # LATIN CAPITAL LETTER S WITH OBLIQUE STROKE
1333 "\xEA\x9E\xAA" => "\xC9\xA6", # LATIN CAPITAL LETTER H WITH HOOK
1334 "\xEA\x9E\xAB" => "\xC9\x9C", # LATIN CAPITAL LETTER REVERSED OPEN E
1335 "\xEA\x9E\xAC" => "\xC9\xA1", # LATIN CAPITAL LETTER SCRIPT G
1336 "\xEA\x9E\xAD" => "\xC9\xAC", # LATIN CAPITAL LETTER L WITH BELT
1337 "\xEA\x9E\xAE" => "\xC9\xAA", # LATIN CAPITAL LETTER SMALL CAPITAL I
1338 "\xEA\x9E\xB0" => "\xCA\x9E", # LATIN CAPITAL LETTER TURNED K
1339 "\xEA\x9E\xB1" => "\xCA\x87", # LATIN CAPITAL LETTER TURNED T
1340 "\xEA\x9E\xB2" => "\xCA\x9D", # LATIN CAPITAL LETTER J WITH CROSSED-TAIL
1341 "\xEA\x9E\xB3" => "\xEA\xAD\x93", # LATIN CAPITAL LETTER CHI
1342 "\xEA\x9E\xB4" => "\xEA\x9E\xB5", # LATIN CAPITAL LETTER BETA
1343 "\xEA\x9E\xB6" => "\xEA\x9E\xB7", # LATIN CAPITAL LETTER OMEGA
1344 "\xEA\x9E\xB8" => "\xEA\x9E\xB9", # LATIN CAPITAL LETTER U WITH STROKE
1345 "\xEA\x9E\xBA" => "\xEA\x9E\xBB", # LATIN CAPITAL LETTER GLOTTAL A
1346 "\xEA\x9E\xBC" => "\xEA\x9E\xBD", # LATIN CAPITAL LETTER GLOTTAL I
1347 "\xEA\x9E\xBE" => "\xEA\x9E\xBF", # LATIN CAPITAL LETTER GLOTTAL U
1348 "\xEA\x9F\x82" => "\xEA\x9F\x83", # LATIN CAPITAL LETTER ANGLICANA W
1349 "\xEA\x9F\x84" => "\xEA\x9E\x94", # LATIN CAPITAL LETTER C WITH PALATAL HOOK
1350 "\xEA\x9F\x85" => "\xCA\x82", # LATIN CAPITAL LETTER S WITH HOOK
1351 "\xEA\x9F\x86" => "\xE1\xB6\x8E", # LATIN CAPITAL LETTER Z WITH PALATAL HOOK
1352 "\xEA\xAD\xB0" => "\xE1\x8E\xA0", # CHEROKEE SMALL LETTER A
1353 "\xEA\xAD\xB1" => "\xE1\x8E\xA1", # CHEROKEE SMALL LETTER E
1354 "\xEA\xAD\xB2" => "\xE1\x8E\xA2", # CHEROKEE SMALL LETTER I
1355 "\xEA\xAD\xB3" => "\xE1\x8E\xA3", # CHEROKEE SMALL LETTER O
1356 "\xEA\xAD\xB4" => "\xE1\x8E\xA4", # CHEROKEE SMALL LETTER U
1357 "\xEA\xAD\xB5" => "\xE1\x8E\xA5", # CHEROKEE SMALL LETTER V
1358 "\xEA\xAD\xB6" => "\xE1\x8E\xA6", # CHEROKEE SMALL LETTER GA
1359 "\xEA\xAD\xB7" => "\xE1\x8E\xA7", # CHEROKEE SMALL LETTER KA
1360 "\xEA\xAD\xB8" => "\xE1\x8E\xA8", # CHEROKEE SMALL LETTER GE
1361 "\xEA\xAD\xB9" => "\xE1\x8E\xA9", # CHEROKEE SMALL LETTER GI
1362 "\xEA\xAD\xBA" => "\xE1\x8E\xAA", # CHEROKEE SMALL LETTER GO
1363 "\xEA\xAD\xBB" => "\xE1\x8E\xAB", # CHEROKEE SMALL LETTER GU
1364 "\xEA\xAD\xBC" => "\xE1\x8E\xAC", # CHEROKEE SMALL LETTER GV
1365 "\xEA\xAD\xBD" => "\xE1\x8E\xAD", # CHEROKEE SMALL LETTER HA
1366 "\xEA\xAD\xBE" => "\xE1\x8E\xAE", # CHEROKEE SMALL LETTER HE
1367 "\xEA\xAD\xBF" => "\xE1\x8E\xAF", # CHEROKEE SMALL LETTER HI
1368 "\xEA\xAE\x80" => "\xE1\x8E\xB0", # CHEROKEE SMALL LETTER HO
1369 "\xEA\xAE\x81" => "\xE1\x8E\xB1", # CHEROKEE SMALL LETTER HU
1370 "\xEA\xAE\x82" => "\xE1\x8E\xB2", # CHEROKEE SMALL LETTER HV
1371 "\xEA\xAE\x83" => "\xE1\x8E\xB3", # CHEROKEE SMALL LETTER LA
1372 "\xEA\xAE\x84" => "\xE1\x8E\xB4", # CHEROKEE SMALL LETTER LE
1373 "\xEA\xAE\x85" => "\xE1\x8E\xB5", # CHEROKEE SMALL LETTER LI
1374 "\xEA\xAE\x86" => "\xE1\x8E\xB6", # CHEROKEE SMALL LETTER LO
1375 "\xEA\xAE\x87" => "\xE1\x8E\xB7", # CHEROKEE SMALL LETTER LU
1376 "\xEA\xAE\x88" => "\xE1\x8E\xB8", # CHEROKEE SMALL LETTER LV
1377 "\xEA\xAE\x89" => "\xE1\x8E\xB9", # CHEROKEE SMALL LETTER MA
1378 "\xEA\xAE\x8A" => "\xE1\x8E\xBA", # CHEROKEE SMALL LETTER ME
1379 "\xEA\xAE\x8B" => "\xE1\x8E\xBB", # CHEROKEE SMALL LETTER MI
1380 "\xEA\xAE\x8C" => "\xE1\x8E\xBC", # CHEROKEE SMALL LETTER MO
1381 "\xEA\xAE\x8D" => "\xE1\x8E\xBD", # CHEROKEE SMALL LETTER MU
1382 "\xEA\xAE\x8E" => "\xE1\x8E\xBE", # CHEROKEE SMALL LETTER NA
1383 "\xEA\xAE\x8F" => "\xE1\x8E\xBF", # CHEROKEE SMALL LETTER HNA
1384 "\xEA\xAE\x90" => "\xE1\x8F\x80", # CHEROKEE SMALL LETTER NAH
1385 "\xEA\xAE\x91" => "\xE1\x8F\x81", # CHEROKEE SMALL LETTER NE
1386 "\xEA\xAE\x92" => "\xE1\x8F\x82", # CHEROKEE SMALL LETTER NI
1387 "\xEA\xAE\x93" => "\xE1\x8F\x83", # CHEROKEE SMALL LETTER NO
1388 "\xEA\xAE\x94" => "\xE1\x8F\x84", # CHEROKEE SMALL LETTER NU
1389 "\xEA\xAE\x95" => "\xE1\x8F\x85", # CHEROKEE SMALL LETTER NV
1390 "\xEA\xAE\x96" => "\xE1\x8F\x86", # CHEROKEE SMALL LETTER QUA
1391 "\xEA\xAE\x97" => "\xE1\x8F\x87", # CHEROKEE SMALL LETTER QUE
1392 "\xEA\xAE\x98" => "\xE1\x8F\x88", # CHEROKEE SMALL LETTER QUI
1393 "\xEA\xAE\x99" => "\xE1\x8F\x89", # CHEROKEE SMALL LETTER QUO
1394 "\xEA\xAE\x9A" => "\xE1\x8F\x8A", # CHEROKEE SMALL LETTER QUU
1395 "\xEA\xAE\x9B" => "\xE1\x8F\x8B", # CHEROKEE SMALL LETTER QUV
1396 "\xEA\xAE\x9C" => "\xE1\x8F\x8C", # CHEROKEE SMALL LETTER SA
1397 "\xEA\xAE\x9D" => "\xE1\x8F\x8D", # CHEROKEE SMALL LETTER S
1398 "\xEA\xAE\x9E" => "\xE1\x8F\x8E", # CHEROKEE SMALL LETTER SE
1399 "\xEA\xAE\x9F" => "\xE1\x8F\x8F", # CHEROKEE SMALL LETTER SI
1400 "\xEA\xAE\xA0" => "\xE1\x8F\x90", # CHEROKEE SMALL LETTER SO
1401 "\xEA\xAE\xA1" => "\xE1\x8F\x91", # CHEROKEE SMALL LETTER SU
1402 "\xEA\xAE\xA2" => "\xE1\x8F\x92", # CHEROKEE SMALL LETTER SV
1403 "\xEA\xAE\xA3" => "\xE1\x8F\x93", # CHEROKEE SMALL LETTER DA
1404 "\xEA\xAE\xA4" => "\xE1\x8F\x94", # CHEROKEE SMALL LETTER TA
1405 "\xEA\xAE\xA5" => "\xE1\x8F\x95", # CHEROKEE SMALL LETTER DE
1406 "\xEA\xAE\xA6" => "\xE1\x8F\x96", # CHEROKEE SMALL LETTER TE
1407 "\xEA\xAE\xA7" => "\xE1\x8F\x97", # CHEROKEE SMALL LETTER DI
1408 "\xEA\xAE\xA8" => "\xE1\x8F\x98", # CHEROKEE SMALL LETTER TI
1409 "\xEA\xAE\xA9" => "\xE1\x8F\x99", # CHEROKEE SMALL LETTER DO
1410 "\xEA\xAE\xAA" => "\xE1\x8F\x9A", # CHEROKEE SMALL LETTER DU
1411 "\xEA\xAE\xAB" => "\xE1\x8F\x9B", # CHEROKEE SMALL LETTER DV
1412 "\xEA\xAE\xAC" => "\xE1\x8F\x9C", # CHEROKEE SMALL LETTER DLA
1413 "\xEA\xAE\xAD" => "\xE1\x8F\x9D", # CHEROKEE SMALL LETTER TLA
1414 "\xEA\xAE\xAE" => "\xE1\x8F\x9E", # CHEROKEE SMALL LETTER TLE
1415 "\xEA\xAE\xAF" => "\xE1\x8F\x9F", # CHEROKEE SMALL LETTER TLI
1416 "\xEA\xAE\xB0" => "\xE1\x8F\xA0", # CHEROKEE SMALL LETTER TLO
1417 "\xEA\xAE\xB1" => "\xE1\x8F\xA1", # CHEROKEE SMALL LETTER TLU
1418 "\xEA\xAE\xB2" => "\xE1\x8F\xA2", # CHEROKEE SMALL LETTER TLV
1419 "\xEA\xAE\xB3" => "\xE1\x8F\xA3", # CHEROKEE SMALL LETTER TSA
1420 "\xEA\xAE\xB4" => "\xE1\x8F\xA4", # CHEROKEE SMALL LETTER TSE
1421 "\xEA\xAE\xB5" => "\xE1\x8F\xA5", # CHEROKEE SMALL LETTER TSI
1422 "\xEA\xAE\xB6" => "\xE1\x8F\xA6", # CHEROKEE SMALL LETTER TSO
1423 "\xEA\xAE\xB7" => "\xE1\x8F\xA7", # CHEROKEE SMALL LETTER TSU
1424 "\xEA\xAE\xB8" => "\xE1\x8F\xA8", # CHEROKEE SMALL LETTER TSV
1425 "\xEA\xAE\xB9" => "\xE1\x8F\xA9", # CHEROKEE SMALL LETTER WA
1426 "\xEA\xAE\xBA" => "\xE1\x8F\xAA", # CHEROKEE SMALL LETTER WE
1427 "\xEA\xAE\xBB" => "\xE1\x8F\xAB", # CHEROKEE SMALL LETTER WI
1428 "\xEA\xAE\xBC" => "\xE1\x8F\xAC", # CHEROKEE SMALL LETTER WO
1429 "\xEA\xAE\xBD" => "\xE1\x8F\xAD", # CHEROKEE SMALL LETTER WU
1430 "\xEA\xAE\xBE" => "\xE1\x8F\xAE", # CHEROKEE SMALL LETTER WV
1431 "\xEA\xAE\xBF" => "\xE1\x8F\xAF", # CHEROKEE SMALL LETTER YA
1432 "\xEF\xAC\x80" => "\x66\x66", # LATIN SMALL LIGATURE FF
1433 "\xEF\xAC\x81" => "\x66\x69", # LATIN SMALL LIGATURE FI
1434 "\xEF\xAC\x82" => "\x66\x6C", # LATIN SMALL LIGATURE FL
1435 "\xEF\xAC\x83" => "\x66\x66\x69", # LATIN SMALL LIGATURE FFI
1436 "\xEF\xAC\x84" => "\x66\x66\x6C", # LATIN SMALL LIGATURE FFL
1437 "\xEF\xAC\x85" => "\x73\x74", # LATIN SMALL LIGATURE LONG S T
1438 "\xEF\xAC\x86" => "\x73\x74", # LATIN SMALL LIGATURE ST
1439 "\xEF\xAC\x93" => "\xD5\xB4\xD5\xB6", # ARMENIAN SMALL LIGATURE MEN NOW
1440 "\xEF\xAC\x94" => "\xD5\xB4\xD5\xA5", # ARMENIAN SMALL LIGATURE MEN ECH
1441 "\xEF\xAC\x95" => "\xD5\xB4\xD5\xAB", # ARMENIAN SMALL LIGATURE MEN INI
1442 "\xEF\xAC\x96" => "\xD5\xBE\xD5\xB6", # ARMENIAN SMALL LIGATURE VEW NOW
1443 "\xEF\xAC\x97" => "\xD5\xB4\xD5\xAD", # ARMENIAN SMALL LIGATURE MEN XEH
1444 "\xEF\xBC\xA1" => "\xEF\xBD\x81", # FULLWIDTH LATIN CAPITAL LETTER A
1445 "\xEF\xBC\xA2" => "\xEF\xBD\x82", # FULLWIDTH LATIN CAPITAL LETTER B
1446 "\xEF\xBC\xA3" => "\xEF\xBD\x83", # FULLWIDTH LATIN CAPITAL LETTER C
1447 "\xEF\xBC\xA4" => "\xEF\xBD\x84", # FULLWIDTH LATIN CAPITAL LETTER D
1448 "\xEF\xBC\xA5" => "\xEF\xBD\x85", # FULLWIDTH LATIN CAPITAL LETTER E
1449 "\xEF\xBC\xA6" => "\xEF\xBD\x86", # FULLWIDTH LATIN CAPITAL LETTER F
1450 "\xEF\xBC\xA7" => "\xEF\xBD\x87", # FULLWIDTH LATIN CAPITAL LETTER G
1451 "\xEF\xBC\xA8" => "\xEF\xBD\x88", # FULLWIDTH LATIN CAPITAL LETTER H
1452 "\xEF\xBC\xA9" => "\xEF\xBD\x89", # FULLWIDTH LATIN CAPITAL LETTER I
1453 "\xEF\xBC\xAA" => "\xEF\xBD\x8A", # FULLWIDTH LATIN CAPITAL LETTER J
1454 "\xEF\xBC\xAB" => "\xEF\xBD\x8B", # FULLWIDTH LATIN CAPITAL LETTER K
1455 "\xEF\xBC\xAC" => "\xEF\xBD\x8C", # FULLWIDTH LATIN CAPITAL LETTER L
1456 "\xEF\xBC\xAD" => "\xEF\xBD\x8D", # FULLWIDTH LATIN CAPITAL LETTER M
1457 "\xEF\xBC\xAE" => "\xEF\xBD\x8E", # FULLWIDTH LATIN CAPITAL LETTER N
1458 "\xEF\xBC\xAF" => "\xEF\xBD\x8F", # FULLWIDTH LATIN CAPITAL LETTER O
1459 "\xEF\xBC\xB0" => "\xEF\xBD\x90", # FULLWIDTH LATIN CAPITAL LETTER P
1460 "\xEF\xBC\xB1" => "\xEF\xBD\x91", # FULLWIDTH LATIN CAPITAL LETTER Q
1461 "\xEF\xBC\xB2" => "\xEF\xBD\x92", # FULLWIDTH LATIN CAPITAL LETTER R
1462 "\xEF\xBC\xB3" => "\xEF\xBD\x93", # FULLWIDTH LATIN CAPITAL LETTER S
1463 "\xEF\xBC\xB4" => "\xEF\xBD\x94", # FULLWIDTH LATIN CAPITAL LETTER T
1464 "\xEF\xBC\xB5" => "\xEF\xBD\x95", # FULLWIDTH LATIN CAPITAL LETTER U
1465 "\xEF\xBC\xB6" => "\xEF\xBD\x96", # FULLWIDTH LATIN CAPITAL LETTER V
1466 "\xEF\xBC\xB7" => "\xEF\xBD\x97", # FULLWIDTH LATIN CAPITAL LETTER W
1467 "\xEF\xBC\xB8" => "\xEF\xBD\x98", # FULLWIDTH LATIN CAPITAL LETTER X
1468 "\xEF\xBC\xB9" => "\xEF\xBD\x99", # FULLWIDTH LATIN CAPITAL LETTER Y
1469 "\xEF\xBC\xBA" => "\xEF\xBD\x9A", # FULLWIDTH LATIN CAPITAL LETTER Z
1470 "\xF0\x90\x90\x80" => "\xF0\x90\x90\xA8", # DESERET CAPITAL LETTER LONG I
1471 "\xF0\x90\x90\x81" => "\xF0\x90\x90\xA9", # DESERET CAPITAL LETTER LONG E
1472 "\xF0\x90\x90\x82" => "\xF0\x90\x90\xAA", # DESERET CAPITAL LETTER LONG A
1473 "\xF0\x90\x90\x83" => "\xF0\x90\x90\xAB", # DESERET CAPITAL LETTER LONG AH
1474 "\xF0\x90\x90\x84" => "\xF0\x90\x90\xAC", # DESERET CAPITAL LETTER LONG O
1475 "\xF0\x90\x90\x85" => "\xF0\x90\x90\xAD", # DESERET CAPITAL LETTER LONG OO
1476 "\xF0\x90\x90\x86" => "\xF0\x90\x90\xAE", # DESERET CAPITAL LETTER SHORT I
1477 "\xF0\x90\x90\x87" => "\xF0\x90\x90\xAF", # DESERET CAPITAL LETTER SHORT E
1478 "\xF0\x90\x90\x88" => "\xF0\x90\x90\xB0", # DESERET CAPITAL LETTER SHORT A
1479 "\xF0\x90\x90\x89" => "\xF0\x90\x90\xB1", # DESERET CAPITAL LETTER SHORT AH
1480 "\xF0\x90\x90\x8A" => "\xF0\x90\x90\xB2", # DESERET CAPITAL LETTER SHORT O
1481 "\xF0\x90\x90\x8B" => "\xF0\x90\x90\xB3", # DESERET CAPITAL LETTER SHORT OO
1482 "\xF0\x90\x90\x8C" => "\xF0\x90\x90\xB4", # DESERET CAPITAL LETTER AY
1483 "\xF0\x90\x90\x8D" => "\xF0\x90\x90\xB5", # DESERET CAPITAL LETTER OW
1484 "\xF0\x90\x90\x8E" => "\xF0\x90\x90\xB6", # DESERET CAPITAL LETTER WU
1485 "\xF0\x90\x90\x8F" => "\xF0\x90\x90\xB7", # DESERET CAPITAL LETTER YEE
1486 "\xF0\x90\x90\x90" => "\xF0\x90\x90\xB8", # DESERET CAPITAL LETTER H
1487 "\xF0\x90\x90\x91" => "\xF0\x90\x90\xB9", # DESERET CAPITAL LETTER PEE
1488 "\xF0\x90\x90\x92" => "\xF0\x90\x90\xBA", # DESERET CAPITAL LETTER BEE
1489 "\xF0\x90\x90\x93" => "\xF0\x90\x90\xBB", # DESERET CAPITAL LETTER TEE
1490 "\xF0\x90\x90\x94" => "\xF0\x90\x90\xBC", # DESERET CAPITAL LETTER DEE
1491 "\xF0\x90\x90\x95" => "\xF0\x90\x90\xBD", # DESERET CAPITAL LETTER CHEE
1492 "\xF0\x90\x90\x96" => "\xF0\x90\x90\xBE", # DESERET CAPITAL LETTER JEE
1493 "\xF0\x90\x90\x97" => "\xF0\x90\x90\xBF", # DESERET CAPITAL LETTER KAY
1494 "\xF0\x90\x90\x98" => "\xF0\x90\x91\x80", # DESERET CAPITAL LETTER GAY
1495 "\xF0\x90\x90\x99" => "\xF0\x90\x91\x81", # DESERET CAPITAL LETTER EF
1496 "\xF0\x90\x90\x9A" => "\xF0\x90\x91\x82", # DESERET CAPITAL LETTER VEE
1497 "\xF0\x90\x90\x9B" => "\xF0\x90\x91\x83", # DESERET CAPITAL LETTER ETH
1498 "\xF0\x90\x90\x9C" => "\xF0\x90\x91\x84", # DESERET CAPITAL LETTER THEE
1499 "\xF0\x90\x90\x9D" => "\xF0\x90\x91\x85", # DESERET CAPITAL LETTER ES
1500 "\xF0\x90\x90\x9E" => "\xF0\x90\x91\x86", # DESERET CAPITAL LETTER ZEE
1501 "\xF0\x90\x90\x9F" => "\xF0\x90\x91\x87", # DESERET CAPITAL LETTER ESH
1502 "\xF0\x90\x90\xA0" => "\xF0\x90\x91\x88", # DESERET CAPITAL LETTER ZHEE
1503 "\xF0\x90\x90\xA1" => "\xF0\x90\x91\x89", # DESERET CAPITAL LETTER ER
1504 "\xF0\x90\x90\xA2" => "\xF0\x90\x91\x8A", # DESERET CAPITAL LETTER EL
1505 "\xF0\x90\x90\xA3" => "\xF0\x90\x91\x8B", # DESERET CAPITAL LETTER EM
1506 "\xF0\x90\x90\xA4" => "\xF0\x90\x91\x8C", # DESERET CAPITAL LETTER EN
1507 "\xF0\x90\x90\xA5" => "\xF0\x90\x91\x8D", # DESERET CAPITAL LETTER ENG
1508 "\xF0\x90\x90\xA6" => "\xF0\x90\x91\x8E", # DESERET CAPITAL LETTER OI
1509 "\xF0\x90\x90\xA7" => "\xF0\x90\x91\x8F", # DESERET CAPITAL LETTER EW
1510 "\xF0\x90\x92\xB0" => "\xF0\x90\x93\x98", # OSAGE CAPITAL LETTER A
1511 "\xF0\x90\x92\xB1" => "\xF0\x90\x93\x99", # OSAGE CAPITAL LETTER AI
1512 "\xF0\x90\x92\xB2" => "\xF0\x90\x93\x9A", # OSAGE CAPITAL LETTER AIN
1513 "\xF0\x90\x92\xB3" => "\xF0\x90\x93\x9B", # OSAGE CAPITAL LETTER AH
1514 "\xF0\x90\x92\xB4" => "\xF0\x90\x93\x9C", # OSAGE CAPITAL LETTER BRA
1515 "\xF0\x90\x92\xB5" => "\xF0\x90\x93\x9D", # OSAGE CAPITAL LETTER CHA
1516 "\xF0\x90\x92\xB6" => "\xF0\x90\x93\x9E", # OSAGE CAPITAL LETTER EHCHA
1517 "\xF0\x90\x92\xB7" => "\xF0\x90\x93\x9F", # OSAGE CAPITAL LETTER E
1518 "\xF0\x90\x92\xB8" => "\xF0\x90\x93\xA0", # OSAGE CAPITAL LETTER EIN
1519 "\xF0\x90\x92\xB9" => "\xF0\x90\x93\xA1", # OSAGE CAPITAL LETTER HA
1520 "\xF0\x90\x92\xBA" => "\xF0\x90\x93\xA2", # OSAGE CAPITAL LETTER HYA
1521 "\xF0\x90\x92\xBB" => "\xF0\x90\x93\xA3", # OSAGE CAPITAL LETTER I
1522 "\xF0\x90\x92\xBC" => "\xF0\x90\x93\xA4", # OSAGE CAPITAL LETTER KA
1523 "\xF0\x90\x92\xBD" => "\xF0\x90\x93\xA5", # OSAGE CAPITAL LETTER EHKA
1524 "\xF0\x90\x92\xBE" => "\xF0\x90\x93\xA6", # OSAGE CAPITAL LETTER KYA
1525 "\xF0\x90\x92\xBF" => "\xF0\x90\x93\xA7", # OSAGE CAPITAL LETTER LA
1526 "\xF0\x90\x93\x80" => "\xF0\x90\x93\xA8", # OSAGE CAPITAL LETTER MA
1527 "\xF0\x90\x93\x81" => "\xF0\x90\x93\xA9", # OSAGE CAPITAL LETTER NA
1528 "\xF0\x90\x93\x82" => "\xF0\x90\x93\xAA", # OSAGE CAPITAL LETTER O
1529 "\xF0\x90\x93\x83" => "\xF0\x90\x93\xAB", # OSAGE CAPITAL LETTER OIN
1530 "\xF0\x90\x93\x84" => "\xF0\x90\x93\xAC", # OSAGE CAPITAL LETTER PA
1531 "\xF0\x90\x93\x85" => "\xF0\x90\x93\xAD", # OSAGE CAPITAL LETTER EHPA
1532 "\xF0\x90\x93\x86" => "\xF0\x90\x93\xAE", # OSAGE CAPITAL LETTER SA
1533 "\xF0\x90\x93\x87" => "\xF0\x90\x93\xAF", # OSAGE CAPITAL LETTER SHA
1534 "\xF0\x90\x93\x88" => "\xF0\x90\x93\xB0", # OSAGE CAPITAL LETTER TA
1535 "\xF0\x90\x93\x89" => "\xF0\x90\x93\xB1", # OSAGE CAPITAL LETTER EHTA
1536 "\xF0\x90\x93\x8A" => "\xF0\x90\x93\xB2", # OSAGE CAPITAL LETTER TSA
1537 "\xF0\x90\x93\x8B" => "\xF0\x90\x93\xB3", # OSAGE CAPITAL LETTER EHTSA
1538 "\xF0\x90\x93\x8C" => "\xF0\x90\x93\xB4", # OSAGE CAPITAL LETTER TSHA
1539 "\xF0\x90\x93\x8D" => "\xF0\x90\x93\xB5", # OSAGE CAPITAL LETTER DHA
1540 "\xF0\x90\x93\x8E" => "\xF0\x90\x93\xB6", # OSAGE CAPITAL LETTER U
1541 "\xF0\x90\x93\x8F" => "\xF0\x90\x93\xB7", # OSAGE CAPITAL LETTER WA
1542 "\xF0\x90\x93\x90" => "\xF0\x90\x93\xB8", # OSAGE CAPITAL LETTER KHA
1543 "\xF0\x90\x93\x91" => "\xF0\x90\x93\xB9", # OSAGE CAPITAL LETTER GHA
1544 "\xF0\x90\x93\x92" => "\xF0\x90\x93\xBA", # OSAGE CAPITAL LETTER ZA
1545 "\xF0\x90\x93\x93" => "\xF0\x90\x93\xBB", # OSAGE CAPITAL LETTER ZHA
1546 "\xF0\x90\xB2\x80" => "\xF0\x90\xB3\x80", # OLD HUNGARIAN CAPITAL LETTER A
1547 "\xF0\x90\xB2\x81" => "\xF0\x90\xB3\x81", # OLD HUNGARIAN CAPITAL LETTER AA
1548 "\xF0\x90\xB2\x82" => "\xF0\x90\xB3\x82", # OLD HUNGARIAN CAPITAL LETTER EB
1549 "\xF0\x90\xB2\x83" => "\xF0\x90\xB3\x83", # OLD HUNGARIAN CAPITAL LETTER AMB
1550 "\xF0\x90\xB2\x84" => "\xF0\x90\xB3\x84", # OLD HUNGARIAN CAPITAL LETTER EC
1551 "\xF0\x90\xB2\x85" => "\xF0\x90\xB3\x85", # OLD HUNGARIAN CAPITAL LETTER ENC
1552 "\xF0\x90\xB2\x86" => "\xF0\x90\xB3\x86", # OLD HUNGARIAN CAPITAL LETTER ECS
1553 "\xF0\x90\xB2\x87" => "\xF0\x90\xB3\x87", # OLD HUNGARIAN CAPITAL LETTER ED
1554 "\xF0\x90\xB2\x88" => "\xF0\x90\xB3\x88", # OLD HUNGARIAN CAPITAL LETTER AND
1555 "\xF0\x90\xB2\x89" => "\xF0\x90\xB3\x89", # OLD HUNGARIAN CAPITAL LETTER E
1556 "\xF0\x90\xB2\x8A" => "\xF0\x90\xB3\x8A", # OLD HUNGARIAN CAPITAL LETTER CLOSE E
1557 "\xF0\x90\xB2\x8B" => "\xF0\x90\xB3\x8B", # OLD HUNGARIAN CAPITAL LETTER EE
1558 "\xF0\x90\xB2\x8C" => "\xF0\x90\xB3\x8C", # OLD HUNGARIAN CAPITAL LETTER EF
1559 "\xF0\x90\xB2\x8D" => "\xF0\x90\xB3\x8D", # OLD HUNGARIAN CAPITAL LETTER EG
1560 "\xF0\x90\xB2\x8E" => "\xF0\x90\xB3\x8E", # OLD HUNGARIAN CAPITAL LETTER EGY
1561 "\xF0\x90\xB2\x8F" => "\xF0\x90\xB3\x8F", # OLD HUNGARIAN CAPITAL LETTER EH
1562 "\xF0\x90\xB2\x90" => "\xF0\x90\xB3\x90", # OLD HUNGARIAN CAPITAL LETTER I
1563 "\xF0\x90\xB2\x91" => "\xF0\x90\xB3\x91", # OLD HUNGARIAN CAPITAL LETTER II
1564 "\xF0\x90\xB2\x92" => "\xF0\x90\xB3\x92", # OLD HUNGARIAN CAPITAL LETTER EJ
1565 "\xF0\x90\xB2\x93" => "\xF0\x90\xB3\x93", # OLD HUNGARIAN CAPITAL LETTER EK
1566 "\xF0\x90\xB2\x94" => "\xF0\x90\xB3\x94", # OLD HUNGARIAN CAPITAL LETTER AK
1567 "\xF0\x90\xB2\x95" => "\xF0\x90\xB3\x95", # OLD HUNGARIAN CAPITAL LETTER UNK
1568 "\xF0\x90\xB2\x96" => "\xF0\x90\xB3\x96", # OLD HUNGARIAN CAPITAL LETTER EL
1569 "\xF0\x90\xB2\x97" => "\xF0\x90\xB3\x97", # OLD HUNGARIAN CAPITAL LETTER ELY
1570 "\xF0\x90\xB2\x98" => "\xF0\x90\xB3\x98", # OLD HUNGARIAN CAPITAL LETTER EM
1571 "\xF0\x90\xB2\x99" => "\xF0\x90\xB3\x99", # OLD HUNGARIAN CAPITAL LETTER EN
1572 "\xF0\x90\xB2\x9A" => "\xF0\x90\xB3\x9A", # OLD HUNGARIAN CAPITAL LETTER ENY
1573 "\xF0\x90\xB2\x9B" => "\xF0\x90\xB3\x9B", # OLD HUNGARIAN CAPITAL LETTER O
1574 "\xF0\x90\xB2\x9C" => "\xF0\x90\xB3\x9C", # OLD HUNGARIAN CAPITAL LETTER OO
1575 "\xF0\x90\xB2\x9D" => "\xF0\x90\xB3\x9D", # OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG OE
1576 "\xF0\x90\xB2\x9E" => "\xF0\x90\xB3\x9E", # OLD HUNGARIAN CAPITAL LETTER RUDIMENTA OE
1577 "\xF0\x90\xB2\x9F" => "\xF0\x90\xB3\x9F", # OLD HUNGARIAN CAPITAL LETTER OEE
1578 "\xF0\x90\xB2\xA0" => "\xF0\x90\xB3\xA0", # OLD HUNGARIAN CAPITAL LETTER EP
1579 "\xF0\x90\xB2\xA1" => "\xF0\x90\xB3\xA1", # OLD HUNGARIAN CAPITAL LETTER EMP
1580 "\xF0\x90\xB2\xA2" => "\xF0\x90\xB3\xA2", # OLD HUNGARIAN CAPITAL LETTER ER
1581 "\xF0\x90\xB2\xA3" => "\xF0\x90\xB3\xA3", # OLD HUNGARIAN CAPITAL LETTER SHORT ER
1582 "\xF0\x90\xB2\xA4" => "\xF0\x90\xB3\xA4", # OLD HUNGARIAN CAPITAL LETTER ES
1583 "\xF0\x90\xB2\xA5" => "\xF0\x90\xB3\xA5", # OLD HUNGARIAN CAPITAL LETTER ESZ
1584 "\xF0\x90\xB2\xA6" => "\xF0\x90\xB3\xA6", # OLD HUNGARIAN CAPITAL LETTER ET
1585 "\xF0\x90\xB2\xA7" => "\xF0\x90\xB3\xA7", # OLD HUNGARIAN CAPITAL LETTER ENT
1586 "\xF0\x90\xB2\xA8" => "\xF0\x90\xB3\xA8", # OLD HUNGARIAN CAPITAL LETTER ETY
1587 "\xF0\x90\xB2\xA9" => "\xF0\x90\xB3\xA9", # OLD HUNGARIAN CAPITAL LETTER ECH
1588 "\xF0\x90\xB2\xAA" => "\xF0\x90\xB3\xAA", # OLD HUNGARIAN CAPITAL LETTER U
1589 "\xF0\x90\xB2\xAB" => "\xF0\x90\xB3\xAB", # OLD HUNGARIAN CAPITAL LETTER UU
1590 "\xF0\x90\xB2\xAC" => "\xF0\x90\xB3\xAC", # OLD HUNGARIAN CAPITAL LETTER NIKOLSBURG UE
1591 "\xF0\x90\xB2\xAD" => "\xF0\x90\xB3\xAD", # OLD HUNGARIAN CAPITAL LETTER RUDIMENTA UE
1592 "\xF0\x90\xB2\xAE" => "\xF0\x90\xB3\xAE", # OLD HUNGARIAN CAPITAL LETTER EV
1593 "\xF0\x90\xB2\xAF" => "\xF0\x90\xB3\xAF", # OLD HUNGARIAN CAPITAL LETTER EZ
1594 "\xF0\x90\xB2\xB0" => "\xF0\x90\xB3\xB0", # OLD HUNGARIAN CAPITAL LETTER EZS
1595 "\xF0\x90\xB2\xB1" => "\xF0\x90\xB3\xB1", # OLD HUNGARIAN CAPITAL LETTER ENT-SHAPED SIGN
1596 "\xF0\x90\xB2\xB2" => "\xF0\x90\xB3\xB2", # OLD HUNGARIAN CAPITAL LETTER US
1597 "\xF0\x91\xA2\xA0" => "\xF0\x91\xA3\x80", # WARANG CITI CAPITAL LETTER NGAA
1598 "\xF0\x91\xA2\xA1" => "\xF0\x91\xA3\x81", # WARANG CITI CAPITAL LETTER A
1599 "\xF0\x91\xA2\xA2" => "\xF0\x91\xA3\x82", # WARANG CITI CAPITAL LETTER WI
1600 "\xF0\x91\xA2\xA3" => "\xF0\x91\xA3\x83", # WARANG CITI CAPITAL LETTER YU
1601 "\xF0\x91\xA2\xA4" => "\xF0\x91\xA3\x84", # WARANG CITI CAPITAL LETTER YA
1602 "\xF0\x91\xA2\xA5" => "\xF0\x91\xA3\x85", # WARANG CITI CAPITAL LETTER YO
1603 "\xF0\x91\xA2\xA6" => "\xF0\x91\xA3\x86", # WARANG CITI CAPITAL LETTER II
1604 "\xF0\x91\xA2\xA7" => "\xF0\x91\xA3\x87", # WARANG CITI CAPITAL LETTER UU
1605 "\xF0\x91\xA2\xA8" => "\xF0\x91\xA3\x88", # WARANG CITI CAPITAL LETTER E
1606 "\xF0\x91\xA2\xA9" => "\xF0\x91\xA3\x89", # WARANG CITI CAPITAL LETTER O
1607 "\xF0\x91\xA2\xAA" => "\xF0\x91\xA3\x8A", # WARANG CITI CAPITAL LETTER ANG
1608 "\xF0\x91\xA2\xAB" => "\xF0\x91\xA3\x8B", # WARANG CITI CAPITAL LETTER GA
1609 "\xF0\x91\xA2\xAC" => "\xF0\x91\xA3\x8C", # WARANG CITI CAPITAL LETTER KO
1610 "\xF0\x91\xA2\xAD" => "\xF0\x91\xA3\x8D", # WARANG CITI CAPITAL LETTER ENY
1611 "\xF0\x91\xA2\xAE" => "\xF0\x91\xA3\x8E", # WARANG CITI CAPITAL LETTER YUJ
1612 "\xF0\x91\xA2\xAF" => "\xF0\x91\xA3\x8F", # WARANG CITI CAPITAL LETTER UC
1613 "\xF0\x91\xA2\xB0" => "\xF0\x91\xA3\x90", # WARANG CITI CAPITAL LETTER ENN
1614 "\xF0\x91\xA2\xB1" => "\xF0\x91\xA3\x91", # WARANG CITI CAPITAL LETTER ODD
1615 "\xF0\x91\xA2\xB2" => "\xF0\x91\xA3\x92", # WARANG CITI CAPITAL LETTER TTE
1616 "\xF0\x91\xA2\xB3" => "\xF0\x91\xA3\x93", # WARANG CITI CAPITAL LETTER NUNG
1617 "\xF0\x91\xA2\xB4" => "\xF0\x91\xA3\x94", # WARANG CITI CAPITAL LETTER DA
1618 "\xF0\x91\xA2\xB5" => "\xF0\x91\xA3\x95", # WARANG CITI CAPITAL LETTER AT
1619 "\xF0\x91\xA2\xB6" => "\xF0\x91\xA3\x96", # WARANG CITI CAPITAL LETTER AM
1620 "\xF0\x91\xA2\xB7" => "\xF0\x91\xA3\x97", # WARANG CITI CAPITAL LETTER BU
1621 "\xF0\x91\xA2\xB8" => "\xF0\x91\xA3\x98", # WARANG CITI CAPITAL LETTER PU
1622 "\xF0\x91\xA2\xB9" => "\xF0\x91\xA3\x99", # WARANG CITI CAPITAL LETTER HIYO
1623 "\xF0\x91\xA2\xBA" => "\xF0\x91\xA3\x9A", # WARANG CITI CAPITAL LETTER HOLO
1624 "\xF0\x91\xA2\xBB" => "\xF0\x91\xA3\x9B", # WARANG CITI CAPITAL LETTER HORR
1625 "\xF0\x91\xA2\xBC" => "\xF0\x91\xA3\x9C", # WARANG CITI CAPITAL LETTER HAR
1626 "\xF0\x91\xA2\xBD" => "\xF0\x91\xA3\x9D", # WARANG CITI CAPITAL LETTER SSUU
1627 "\xF0\x91\xA2\xBE" => "\xF0\x91\xA3\x9E", # WARANG CITI CAPITAL LETTER SII
1628 "\xF0\x91\xA2\xBF" => "\xF0\x91\xA3\x9F", # WARANG CITI CAPITAL LETTER VIYO
1629 "\xF0\x96\xB9\x80" => "\xF0\x96\xB9\xA0", # MEDEFAIDRIN CAPITAL LETTER M
1630 "\xF0\x96\xB9\x81" => "\xF0\x96\xB9\xA1", # MEDEFAIDRIN CAPITAL LETTER S
1631 "\xF0\x96\xB9\x82" => "\xF0\x96\xB9\xA2", # MEDEFAIDRIN CAPITAL LETTER V
1632 "\xF0\x96\xB9\x83" => "\xF0\x96\xB9\xA3", # MEDEFAIDRIN CAPITAL LETTER W
1633 "\xF0\x96\xB9\x84" => "\xF0\x96\xB9\xA4", # MEDEFAIDRIN CAPITAL LETTER ATIU
1634 "\xF0\x96\xB9\x85" => "\xF0\x96\xB9\xA5", # MEDEFAIDRIN CAPITAL LETTER Z
1635 "\xF0\x96\xB9\x86" => "\xF0\x96\xB9\xA6", # MEDEFAIDRIN CAPITAL LETTER KP
1636 "\xF0\x96\xB9\x87" => "\xF0\x96\xB9\xA7", # MEDEFAIDRIN CAPITAL LETTER P
1637 "\xF0\x96\xB9\x88" => "\xF0\x96\xB9\xA8", # MEDEFAIDRIN CAPITAL LETTER T
1638 "\xF0\x96\xB9\x89" => "\xF0\x96\xB9\xA9", # MEDEFAIDRIN CAPITAL LETTER G
1639 "\xF0\x96\xB9\x8A" => "\xF0\x96\xB9\xAA", # MEDEFAIDRIN CAPITAL LETTER F
1640 "\xF0\x96\xB9\x8B" => "\xF0\x96\xB9\xAB", # MEDEFAIDRIN CAPITAL LETTER I
1641 "\xF0\x96\xB9\x8C" => "\xF0\x96\xB9\xAC", # MEDEFAIDRIN CAPITAL LETTER K
1642 "\xF0\x96\xB9\x8D" => "\xF0\x96\xB9\xAD", # MEDEFAIDRIN CAPITAL LETTER A
1643 "\xF0\x96\xB9\x8E" => "\xF0\x96\xB9\xAE", # MEDEFAIDRIN CAPITAL LETTER J
1644 "\xF0\x96\xB9\x8F" => "\xF0\x96\xB9\xAF", # MEDEFAIDRIN CAPITAL LETTER E
1645 "\xF0\x96\xB9\x90" => "\xF0\x96\xB9\xB0", # MEDEFAIDRIN CAPITAL LETTER B
1646 "\xF0\x96\xB9\x91" => "\xF0\x96\xB9\xB1", # MEDEFAIDRIN CAPITAL LETTER C
1647 "\xF0\x96\xB9\x92" => "\xF0\x96\xB9\xB2", # MEDEFAIDRIN CAPITAL LETTER U
1648 "\xF0\x96\xB9\x93" => "\xF0\x96\xB9\xB3", # MEDEFAIDRIN CAPITAL LETTER YU
1649 "\xF0\x96\xB9\x94" => "\xF0\x96\xB9\xB4", # MEDEFAIDRIN CAPITAL LETTER L
1650 "\xF0\x96\xB9\x95" => "\xF0\x96\xB9\xB5", # MEDEFAIDRIN CAPITAL LETTER Q
1651 "\xF0\x96\xB9\x96" => "\xF0\x96\xB9\xB6", # MEDEFAIDRIN CAPITAL LETTER HP
1652 "\xF0\x96\xB9\x97" => "\xF0\x96\xB9\xB7", # MEDEFAIDRIN CAPITAL LETTER NY
1653 "\xF0\x96\xB9\x98" => "\xF0\x96\xB9\xB8", # MEDEFAIDRIN CAPITAL LETTER X
1654 "\xF0\x96\xB9\x99" => "\xF0\x96\xB9\xB9", # MEDEFAIDRIN CAPITAL LETTER D
1655 "\xF0\x96\xB9\x9A" => "\xF0\x96\xB9\xBA", # MEDEFAIDRIN CAPITAL LETTER OE
1656 "\xF0\x96\xB9\x9B" => "\xF0\x96\xB9\xBB", # MEDEFAIDRIN CAPITAL LETTER N
1657 "\xF0\x96\xB9\x9C" => "\xF0\x96\xB9\xBC", # MEDEFAIDRIN CAPITAL LETTER R
1658 "\xF0\x96\xB9\x9D" => "\xF0\x96\xB9\xBD", # MEDEFAIDRIN CAPITAL LETTER O
1659 "\xF0\x96\xB9\x9E" => "\xF0\x96\xB9\xBE", # MEDEFAIDRIN CAPITAL LETTER AI
1660 "\xF0\x96\xB9\x9F" => "\xF0\x96\xB9\xBF", # MEDEFAIDRIN CAPITAL LETTER Y
1661 "\xF0\x9E\xA4\x80" => "\xF0\x9E\xA4\xA2", # ADLAM CAPITAL LETTER ALIF
1662 "\xF0\x9E\xA4\x81" => "\xF0\x9E\xA4\xA3", # ADLAM CAPITAL LETTER DAALI
1663 "\xF0\x9E\xA4\x82" => "\xF0\x9E\xA4\xA4", # ADLAM CAPITAL LETTER LAAM
1664 "\xF0\x9E\xA4\x83" => "\xF0\x9E\xA4\xA5", # ADLAM CAPITAL LETTER MIIM
1665 "\xF0\x9E\xA4\x84" => "\xF0\x9E\xA4\xA6", # ADLAM CAPITAL LETTER BA
1666 "\xF0\x9E\xA4\x85" => "\xF0\x9E\xA4\xA7", # ADLAM CAPITAL LETTER SINNYIIYHE
1667 "\xF0\x9E\xA4\x86" => "\xF0\x9E\xA4\xA8", # ADLAM CAPITAL LETTER PE
1668 "\xF0\x9E\xA4\x87" => "\xF0\x9E\xA4\xA9", # ADLAM CAPITAL LETTER BHE
1669 "\xF0\x9E\xA4\x88" => "\xF0\x9E\xA4\xAA", # ADLAM CAPITAL LETTER RA
1670 "\xF0\x9E\xA4\x89" => "\xF0\x9E\xA4\xAB", # ADLAM CAPITAL LETTER E
1671 "\xF0\x9E\xA4\x8A" => "\xF0\x9E\xA4\xAC", # ADLAM CAPITAL LETTER FA
1672 "\xF0\x9E\xA4\x8B" => "\xF0\x9E\xA4\xAD", # ADLAM CAPITAL LETTER I
1673 "\xF0\x9E\xA4\x8C" => "\xF0\x9E\xA4\xAE", # ADLAM CAPITAL LETTER O
1674 "\xF0\x9E\xA4\x8D" => "\xF0\x9E\xA4\xAF", # ADLAM CAPITAL LETTER DHA
1675 "\xF0\x9E\xA4\x8E" => "\xF0\x9E\xA4\xB0", # ADLAM CAPITAL LETTER YHE
1676 "\xF0\x9E\xA4\x8F" => "\xF0\x9E\xA4\xB1", # ADLAM CAPITAL LETTER WAW
1677 "\xF0\x9E\xA4\x90" => "\xF0\x9E\xA4\xB2", # ADLAM CAPITAL LETTER NUN
1678 "\xF0\x9E\xA4\x91" => "\xF0\x9E\xA4\xB3", # ADLAM CAPITAL LETTER KAF
1679 "\xF0\x9E\xA4\x92" => "\xF0\x9E\xA4\xB4", # ADLAM CAPITAL LETTER YA
1680 "\xF0\x9E\xA4\x93" => "\xF0\x9E\xA4\xB5", # ADLAM CAPITAL LETTER U
1681 "\xF0\x9E\xA4\x94" => "\xF0\x9E\xA4\xB6", # ADLAM CAPITAL LETTER JIIM
1682 "\xF0\x9E\xA4\x95" => "\xF0\x9E\xA4\xB7", # ADLAM CAPITAL LETTER CHI
1683 "\xF0\x9E\xA4\x96" => "\xF0\x9E\xA4\xB8", # ADLAM CAPITAL LETTER HA
1684 "\xF0\x9E\xA4\x97" => "\xF0\x9E\xA4\xB9", # ADLAM CAPITAL LETTER QAAF
1685 "\xF0\x9E\xA4\x98" => "\xF0\x9E\xA4\xBA", # ADLAM CAPITAL LETTER GA
1686 "\xF0\x9E\xA4\x99" => "\xF0\x9E\xA4\xBB", # ADLAM CAPITAL LETTER NYA
1687 "\xF0\x9E\xA4\x9A" => "\xF0\x9E\xA4\xBC", # ADLAM CAPITAL LETTER TU
1688 "\xF0\x9E\xA4\x9B" => "\xF0\x9E\xA4\xBD", # ADLAM CAPITAL LETTER NHA
1689 "\xF0\x9E\xA4\x9C" => "\xF0\x9E\xA4\xBE", # ADLAM CAPITAL LETTER VA
1690 "\xF0\x9E\xA4\x9D" => "\xF0\x9E\xA4\xBF", # ADLAM CAPITAL LETTER KHA
1691 "\xF0\x9E\xA4\x9E" => "\xF0\x9E\xA5\x80", # ADLAM CAPITAL LETTER GBE
1692 "\xF0\x9E\xA4\x9F" => "\xF0\x9E\xA5\x81", # ADLAM CAPITAL LETTER ZAL
1693 "\xF0\x9E\xA4\xA0" => "\xF0\x9E\xA5\x82", # ADLAM CAPITAL LETTER KPO
1694 "\xF0\x9E\xA4\xA1" => "\xF0\x9E\xA5\x83", # ADLAM CAPITAL LETTER SHA
1695 );
1696 }
1697  
1698 else {
1699 0 croak "Don't know my package name '@{[__PACKAGE__]}'";
1700 }
1701  
1702 #
1703 # @ARGV wildcard globbing
1704 #
1705 315 ▶sub import {
Subroutine import: called CC=7 SCAR=28.3
1706  
1707 315 ▶ if ($^O =~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($^O =~ /\A (?: MSWin32 | NetWare | symbian | dos ) \z/mosx) 0 315 315
1708 0 my @argv = ();
1709 0 for (@ARGV) {
1710  
1711 # has space
1712 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
1713 0 ▶ if (my @glob = Eutf2::glob(qq{"$_"})) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@glob) = &Eutf2::glob(qq["$_"])) { } 0 0 0
1714 0 push @argv, @glob;
1715 }
1716 else {
1717 0 push @argv, $_;
1718 }
1719 }
1720  
1721 # has wildcard metachar
1722 elsif (/\A (?:$q_char)*? [*?] /oxms) {
1723 0 ▶ if (my @glob = Eutf2::glob($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@glob) = &Eutf2::glob($_)) { } 0 0 0
1724 0 push @argv, @glob;
1725 }
1726 else {
1727 0 push @argv, $_;
1728 }
1729 }
1730  
1731 # no wildcard globbing
1732 else {
1733 0 push @argv, $_;
1734 }
1735 }
1736 0 @ARGV = @argv;
1737 }
1738  
1739 315 *Char::ord = \&UTF2::ord;
1740 315 *Char::ord_ = \&UTF2::ord_;
1741 315 *Char::reverse = \&UTF2::reverse;
1742 315 *Char::getc = \&UTF2::getc;
1743 315 *Char::length = \&UTF2::length;
1744 315 *Char::substr = \&UTF2::substr;
1745 315 *Char::index = \&UTF2::index;
1746 315 *Char::rindex = \&UTF2::rindex;
1747 315 *Char::eval = \&UTF2::eval;
1748 315 *Char::escape = \&UTF2::escape;
1749 315 *Char::escape_token = \&UTF2::escape_token;
1750 315 *Char::escape_script = \&UTF2::escape_script;
1751 }
1752  
1753 # P.230 Care with Prototypes
1754 # in Chapter 6: Subroutines
1755 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
1756 #
1757 # If you aren't careful, you can get yourself into trouble with prototypes.
1758 # But if you are careful, you can do a lot of neat things with them. This is
1759 # all very powerful, of course, and should only be used in moderation to make
1760 # the world a better place.
1761  
1762 # P.332 Care with Prototypes
1763 # in Chapter 7: Subroutines
1764 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
1765 #
1766 # If you aren't careful, you can get yourself into trouble with prototypes.
1767 # But if you are careful, you can do a lot of neat things with them. This is
1768 # all very powerful, of course, and should only be used in moderation to make
1769 # the world a better place.
1770  
1771 #
1772 # Prototypes of subroutines
1773 #
1774 0 ▶sub unimport {}
Subroutine unimport: not called CC=1 SCAR=0.0
1775 sub Eutf2::split(;$$$);
1776 sub Eutf2::tr($$$$;$);
1777 sub Eutf2::chop(@);
1778 sub Eutf2::index($$;$);
1779 sub Eutf2::rindex($$;$);
1780 sub Eutf2::lcfirst(@);
1781 sub Eutf2::lcfirst_();
1782 sub Eutf2::lc(@);
1783 sub Eutf2::lc_();
1784 sub Eutf2::ucfirst(@);
1785 sub Eutf2::ucfirst_();
1786 sub Eutf2::uc(@);
1787 sub Eutf2::uc_();
1788 sub Eutf2::fc(@);
1789 sub Eutf2::fc_();
1790 sub Eutf2::ignorecase;
1791 sub Eutf2::classic_character_class;
1792 sub Eutf2::capture;
1793 sub Eutf2::chr(;$);
1794 sub Eutf2::chr_();
1795 sub Eutf2::glob($);
1796 sub Eutf2::glob_();
1797  
1798 sub UTF2::ord(;$);
1799 sub UTF2::ord_();
1800 sub UTF2::reverse(@);
1801 sub UTF2::getc(;*@);
1802 sub UTF2::length(;$);
1803 sub UTF2::substr($$;$$);
1804 sub UTF2::index($$;$);
1805 sub UTF2::rindex($$;$);
1806 sub UTF2::escape(;$);
1807  
1808 #
1809 # Regexp work
1810 #
1811 631 ▶use vars qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
1812 $re_a
1813 $re_t
1814 $re_n
1815 $re_r
1816 631 );
1817  
1818 #
1819 # Character class
1820 #
1821 631 ▶use vars qw(
Subroutine BEGIN: called CC=1 SCAR=0.0
1822 $dot
1823 $dot_s
1824 $eD
1825 $eS
1826 $eW
1827 $eH
1828 $eV
1829 $eR
1830 $eN
1831 $not_alnum
1832 $not_alpha
1833 $not_ascii
1834 $not_blank
1835 $not_cntrl
1836 $not_digit
1837 $not_graph
1838 $not_lower
1839 $not_lower_i
1840 $not_print
1841 $not_punct
1842 $not_space
1843 $not_upper
1844 $not_upper_i
1845 $not_word
1846 $not_xdigit
1847 $eb
1848 $eB
1849 631 );
1850  
1851 631 ${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])};
1852 631 ${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])};
1853 631 ${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])};
1854  
1855 # Vertical tabs are now whitespace
1856 # \s in a regex now matches a vertical tab in all circumstances.
1857 # http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Vertical_tabs_are_now_whitespace
1858 # ${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])};
1859 # ${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])};
1860 631 ${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])};
1861  
1862 631 ${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])};
1863 631 ${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])};
1864 631 ${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])};
1865 631 ${Eutf2::eR} = qr{(?>\x0D\x0A|[\x0A\x0D])};
1866 631 ${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])};
1867 631 ${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])};
1868 631 ${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])};
1869 631 ${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])};
1870 631 ${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])};
1871 631 ${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])};
1872 631 ${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])};
1873 631 ${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])};
1874 631 ${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])};
1875 631 ${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
1876 # ${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
1877 631 ${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])};
1878 631 ${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])};
1879 631 ${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])};
1880 631 ${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])};
1881 631 ${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
1882 # ${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
1883 631 ${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])};
1884 631 ${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])};
1885 631 ${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))};
1886 631 ${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]))};
1887  
1888 # avoid: Name "Eutf2::foo" used only once: possible typo at here.
1889 631 ${Eutf2::dot} = ${Eutf2::dot};
1890 631 ${Eutf2::dot_s} = ${Eutf2::dot_s};
1891 631 ${Eutf2::eD} = ${Eutf2::eD};
1892 631 ${Eutf2::eS} = ${Eutf2::eS};
1893 631 ${Eutf2::eW} = ${Eutf2::eW};
1894 631 ${Eutf2::eH} = ${Eutf2::eH};
1895 631 ${Eutf2::eV} = ${Eutf2::eV};
1896 631 ${Eutf2::eR} = ${Eutf2::eR};
1897 631 ${Eutf2::eN} = ${Eutf2::eN};
1898 631 ${Eutf2::not_alnum} = ${Eutf2::not_alnum};
1899 631 ${Eutf2::not_alpha} = ${Eutf2::not_alpha};
1900 631 ${Eutf2::not_ascii} = ${Eutf2::not_ascii};
1901 631 ${Eutf2::not_blank} = ${Eutf2::not_blank};
1902 631 ${Eutf2::not_cntrl} = ${Eutf2::not_cntrl};
1903 631 ${Eutf2::not_digit} = ${Eutf2::not_digit};
1904 631 ${Eutf2::not_graph} = ${Eutf2::not_graph};
1905 631 ${Eutf2::not_lower} = ${Eutf2::not_lower};
1906 631 ${Eutf2::not_lower_i} = ${Eutf2::not_lower_i};
1907 631 ${Eutf2::not_print} = ${Eutf2::not_print};
1908 631 ${Eutf2::not_punct} = ${Eutf2::not_punct};
1909 631 ${Eutf2::not_space} = ${Eutf2::not_space};
1910 631 ${Eutf2::not_upper} = ${Eutf2::not_upper};
1911 631 ${Eutf2::not_upper_i} = ${Eutf2::not_upper_i};
1912 631 ${Eutf2::not_word} = ${Eutf2::not_word};
1913 631 ${Eutf2::not_xdigit} = ${Eutf2::not_xdigit};
1914 631 ${Eutf2::eb} = ${Eutf2::eb};
1915 631 ${Eutf2::eB} = ${Eutf2::eB};
1916  
1917 #
1918 # UTF-8 split
1919 #
1920 90 ▶sub Eutf2::split(;$$$) {
Subroutine split: called CC=34 SCAR=35.5
Pod undocumented
1921  
1922 # P.794 29.2.161. split
1923 # in Chapter 29: Functions
1924 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
1925  
1926 # P.951 split
1927 # in Chapter 27: Functions
1928 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
1929  
1930 90 my $pattern = $_[0];
1931 90 my $string = $_[1];
1932 90 my $limit = $_[2];
1933  
1934 # if $pattern is also omitted or is the literal space, " "
1935 90 ▶ if (not defined $pattern) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $pattern) 3 87 90
1936 3 $pattern = ' ';
1937 }
1938  
1939 # if $string is omitted, the function splits the $_ string
1940 90 ▶ if (not defined $string) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $string) 8 82 90
1941 8 ▶ if (defined $_) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_) { } 2 6 8
1942 2 $string = $_;
1943 }
1944 else {
1945 6 $string = '';
1946 }
1947 }
1948  
1949 90 my @split = ();
1950  
1951 # when string is empty
1952 90 ▶ if ($string eq '') {
Branch: 2 branches
BranchTrueFalseTotal
if ($string eq '') { } 10 80 90
elsif ($pattern eq ' ') { } 5 75 80
1953  
1954 # resulting list value in list context
1955 10 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 5 5 10
1956 5 return @split;
1957 }
1958  
1959 # count of substrings in scalar context
1960 else {
1961 5 ▶ carp "Use of implicit split to \@_ is deprecated" if $^W;
Branch: 1 branch
BranchTrueFalseTotal
if $^W 0 5 5
1962 5 @_ = @split;
1963 5 return scalar @_;
1964 }
1965 }
1966  
1967 # split's first argument is more consistently interpreted
1968 #
1969 # After some changes earlier in v5.17, split's behavior has been simplified:
1970 # if the PATTERN argument evaluates to a string containing one space, it is
1971 # treated the way that a literal string containing one space once was.
1972 # http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#split's_first_argument_is_more_consistently_interpreted
1973  
1974 # if $pattern is also omitted or is the literal space, " ", the function splits
1975 # on whitespace, /\s+/, after skipping any leading whitespace
1976 # (and so on)
1977  
1978 elsif ($pattern eq ' ') {
1979 5 ▶ if (not defined $limit) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $limit) { } 4 1 5
1980 4 return CORE::split(' ', $string);
1981 }
1982 else {
1983 1 return CORE::split(' ', $string, $limit);
1984 }
1985 }
1986  
1987 # if $limit is negative, it is treated as if an arbitrarily large $limit has been specified
1988 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
1989  
1990 # a pattern capable of matching either the null string or something longer than the
1991 # null string will split the value of $string into separate characters wherever it
1992 # matches the null string between characters
1993 # (and so on)
1994  
1995 74 ▶ if ('' =~ / \A $pattern \z /xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ('' =~ / \A $pattern \z /msx) { } 7 67 74
1996 7 my $last_subexpression_offsets = _last_subexpression_offsets($pattern);
1997 7 my $limit = scalar(() = $string =~ /($pattern)/oxmsg);
1998  
1999 # P.1024 Appendix W.10 Multibyte Processing
2000 # of ISBN 1-56592-224-7 CJKV Information Processing
2001 # (and so on)
2002  
2003 # the //m modifier is assumed when you split on the pattern /^/
2004 # (and so on)
2005  
2006 7 ▶ eval q{ no warnings }; # avoid: Complex regular subexpression recursion limit (32766) exceeded at ...
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
2007 # V
2008 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
2009  
2010 # if the $pattern contains parentheses, then the substring matched by each pair of parentheses
2011 # is included in the resulting list, interspersed with the fields that are ordinarily returned
2012 # (and so on)
2013  
2014 29 local $@;
2015 29 ▶ eval q{ no warnings }; # avoid: Complex regular subexpression recursion limit (32766) exceeded at ...
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
2016 29 ▶ for (my $digit=1; $digit <= ($last_subexpression_offsets + 1); $digit++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($digit <= $last_subexpression_offsets + 1) 29 29 58
2017 29 push @split, CORE::eval('$' . $digit);
2018 }
2019 }
2020 }
2021  
2022 else {
2023 67 my $last_subexpression_offsets = _last_subexpression_offsets($pattern);
2024  
2025 67 ▶ eval q{ no warnings }; # avoid: Complex regular subexpression recursion limit (32766) exceeded at ...
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
2026 # V
2027 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
2028 203 local $@;
2029 203 ▶ eval q{ no warnings }; # avoid: Complex regular subexpression recursion limit (32766) exceeded at ...
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
2030 203 ▶ for (my $digit=1; $digit <= ($last_subexpression_offsets + 1); $digit++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($digit <= $last_subexpression_offsets + 1) 280 203 483
2031 280 push @split, CORE::eval('$' . $digit);
2032 }
2033 }
2034 }
2035 }
2036  
2037 elsif ($limit > 0) {
2038 1 ▶ if ('' =~ / \A $pattern \z /xms) {
Branch: 1 branch
BranchTrueFalseTotal
if ('' =~ / \A $pattern \z /msx) { } 0 1 1
2039 0 my $last_subexpression_offsets = _last_subexpression_offsets($pattern);
2040 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
2041  
2042 0 eval q{ no warnings }; # avoid: Complex regular subexpression recursion limit (32766) exceeded at ...
2043 # V
2044 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
2045 0 local $@;
2046 0 ▶ for (my $digit=1; $digit <= ($last_subexpression_offsets + 1); $digit++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($digit <= $last_subexpression_offsets + 1) 0 0 0
2047 0 push @split, CORE::eval('$' . $digit);
2048 }
2049 }
2050 }
2051 }
2052 else {
2053 1 my $last_subexpression_offsets = _last_subexpression_offsets($pattern);
2054 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
2055  
2056 2 ▶ eval q{ no warnings }; # avoid: Complex regular subexpression recursion limit (32766) exceeded at ...
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
2057 # V
2058 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
2059 2 local $@;
2060 2 ▶ for (my $digit=1; $digit <= ($last_subexpression_offsets + 1); $digit++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($digit <= $last_subexpression_offsets + 1) 2 2 4
2061 2 push @split, CORE::eval('$' . $digit);
2062 }
2063 }
2064 }
2065 }
2066 }
2067  
2068 75 ▶ if (CORE::length($string) > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $string > 0) 67 8 75
2069 67 push @split, $string;
2070 }
2071  
2072 # if $_[2] (NOT "$limit") is omitted or zero, trailing null fields are stripped from the result
2073 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
2074 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
2075 2 pop @split;
2076 }
2077 }
2078  
2079 # resulting list value in list context
2080 75 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 73 2 75
2081 73 return @split;
2082 }
2083  
2084 # count of substrings in scalar context
2085 else {
2086 2 ▶ carp "Use of implicit split to \@_ is deprecated" if $^W;
Branch: 1 branch
BranchTrueFalseTotal
if $^W 0 2 2
2087 2 @_ = @split;
2088 2 return scalar @_;
2089 }
2090 }
2091  
2092 #
2093 # get last subexpression offsets
2094 #
2095 75 ▶sub _last_subexpression_offsets {
Subroutine _last_subexpression_offsets: called CC=3 SCAR=11.0
2096 75 my $pattern = $_[0];
2097  
2098 # remove comment
2099 75 $pattern =~ s/\(\?\# .*? \)//oxmsg;
2100  
2101 75 my $modifier = '';
2102 75 ▶ if ($pattern =~ /\(\?\^? ([\-A-Za-z]+) :/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pattern =~ /\(\?\^? ([\-A-Za-z]+) :/mosx) 13 62 75
2103 13 $modifier = $1;
2104 13 $modifier =~ s/-[A-Za-z]*//;
2105 }
2106  
2107 # with /x modifier
2108 75 my @char = ();
2109 75 ▶ if ($modifier =~ /x/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /x/mosx) { } 5 70 75
2110 5 @char = $pattern =~ /\G((?>
2111 [^\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] |
2112 \\ $q_char |
2113 \# (?>[^\n]*) $ |
2114 \[ (?>(?:[^\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)+) \] |
2115 \(\? |
2116 $q_char
2117 ))/oxmsg;
2118 }
2119  
2120 # without /x modifier
2121 else {
2122 70 @char = $pattern =~ /\G((?>
2123 [^\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] |
2124 \\ $q_char |
2125 \[ (?>(?:[^\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)+) \] |
2126 \(\? |
2127 $q_char
2128 ))/oxmsg;
2129 }
2130  
2131 75 return scalar grep { $_ eq '(' } @char;
2132 }
2133  
2134 #
2135 # UTF-8 transliteration (tr///)
2136 #
2137 14 ▶sub Eutf2::tr($$$$;$) {
Subroutine tr: called CC=26 SCAR=34.7
Pod undocumented
2138  
2139 14 my $bind_operator = $_[1];
2140 14 my $searchlist = $_[2];
2141 14 my $replacementlist = $_[3];
2142 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
2143  
2144 14 ▶ if ($modifier =~ /r/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /r/mosx) 5 9 14
2145 5 ▶ if ($bind_operator =~ / !~ /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($bind_operator =~ / !~ /mosx) 0 5 5
2146 0 croak "Using !~ with tr///r doesn't make sense";
2147 }
2148 }
2149  
2150 14 my @char = $_[0] =~ /\G (?>$q_char) /oxmsg;
2151 14 my @searchlist = _charlist_tr($searchlist);
2152 14 my @replacementlist = _charlist_tr($replacementlist);
2153  
2154 14 my %tr = ();
2155 14 ▶ for (my $i=0; $i <= $#searchlist; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#searchlist) 53 14 67
2156 53 ▶ if (not exists $tr{$searchlist[$i]}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $tr{$searchlist[$i]}) 53 0 53
2157 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
2158 39 $tr{$searchlist[$i]} = $replacementlist[$i];
2159 }
2160 elsif ($modifier =~ /d/oxms) {
2161 10 $tr{$searchlist[$i]} = '';
2162 }
2163 ▶ 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
2164 4 $tr{$searchlist[$i]} = $replacementlist[-1];
2165 }
2166 else {
2167 0 $tr{$searchlist[$i]} = $searchlist[$i];
2168 }
2169 }
2170 }
2171  
2172 14 my $tr = 0;
2173 14 my $replaced = '';
2174 14 ▶ if ($modifier =~ /c/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /c/mosx) { } 2 12 14
2175 2 ▶ while (defined(my $char = shift @char)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined(my $char = shift @char)) 20 2 22
2176 20 ▶ if (not exists $tr{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
if (not exists $tr{$char}) { } 12 8 20
2177 12 ▶ if (defined $replacementlist[-1]) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $replacementlist[-1]) 10 2 12
2178 10 $replaced .= $replacementlist[-1];
2179 }
2180 12 $tr++;
2181 12 ▶ if ($modifier =~ /s/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /s/mosx) 0 12 12
2182 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
2183 0 shift @char;
2184 0 $tr++;
2185 }
2186 }
2187 }
2188 else {
2189 8 $replaced .= $char;
2190 }
2191 }
2192 }
2193 else {
2194 12 ▶ while (defined(my $char = shift @char)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined(my $char = shift @char)) 88 12 100
2195 88 ▶ if (exists $tr{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $tr{$char}) { } 49 39 88
2196 49 $replaced .= $tr{$char};
2197 49 $tr++;
2198 49 ▶ if ($modifier =~ /s/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /s/mosx) 1 48 49
2199 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
2200 4 shift @char;
2201 4 $tr++;
2202 }
2203 }
2204 }
2205 else {
2206 39 $replaced .= $char;
2207 }
2208 }
2209 }
2210  
2211 14 ▶ if ($modifier =~ /r/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /r/mosx) { } 5 9 14
2212 5 return $replaced;
2213 }
2214 else {
2215 9 $_[0] = $replaced;
2216 9 ▶ if ($bind_operator =~ / !~ /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($bind_operator =~ / !~ /mosx) { } 0 9 9
2217 0 return not $tr;
2218 }
2219 else {
2220 9 return $tr;
2221 }
2222 }
2223 }
2224  
2225 #
2226 # UTF-8 chop
2227 #
2228 2 ▶sub Eutf2::chop(@) {
Subroutine chop: called CC=3 SCAR=12.0
Pod undocumented
2229  
2230 2 my $chop;
2231 2 ▶ if (@_ == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 0) { } 0 2 2
2232 0 my @char = /\G (?>$q_char) /oxmsg;
2233 0 $chop = pop @char;
2234 0 $_ = join '', @char;
2235 }
2236 else {
2237 2 for (@_) {
2238 2 my @char = /\G (?>$q_char) /oxmsg;
2239 2 $chop = pop @char;
2240 2 $_ = join '', @char;
2241 }
2242 }
2243 2 return $chop;
2244 }
2245  
2246 #
2247 # UTF-8 index by octet
2248 #
2249 88 ▶sub Eutf2::index($$;$) {
Subroutine index: called CC=6 SCAR=18.0
Pod documented
2250  
2251 88 my($str,$substr,$position) = @_;
2252 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
2253 88 my $pos = 0;
2254  
2255 88 ▶ while ($pos < CORE::length($str)) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pos < length $str) 386 84 470
2256 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
2257 6 ▶ if ($pos >= $position) {
Branch: 1 branch
BranchTrueFalseTotal
if ($pos >= $position) 4 2 6
2258 4 return $pos;
2259 }
2260 }
2261 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
2262 382 $pos += CORE::length($1);
2263 }
2264 else {
2265 0 $pos += 1;
2266 }
2267 }
2268 84 return -1;
2269 }
2270  
2271 #
2272 # UTF-8 reverse index
2273 #
2274 4 ▶sub Eutf2::rindex($$;$) {
Subroutine rindex: called CC=6 SCAR=18.0
Pod undocumented
2275  
2276 4 my($str,$substr,$position) = @_;
2277 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
2278 4 my $pos = 0;
2279 4 my $rindex = -1;
2280  
2281 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
2282 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
2283 6 $rindex = $pos;
2284 }
2285 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
2286 32 $pos += CORE::length($1);
2287 }
2288 else {
2289 0 $pos += 1;
2290 }
2291 }
2292 4 return $rindex;
2293 }
2294  
2295 #
2296 # UTF-8 lower case first with parameter
2297 #
2298 0 ▶sub Eutf2::lcfirst(@) {
Subroutine lcfirst: not called CC=4 SCAR=30.0
Pod undocumented
2299 0 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 0 0 0
2300 0 my $s = shift @_;
2301 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
2302 0 return Eutf2::lc(CORE::substr($s,0,1)) . CORE::substr($s,1), @_;
2303 }
2304 else {
2305 0 return Eutf2::lc(CORE::substr($s,0,1)) . CORE::substr($s,1);
2306 }
2307 }
2308 else {
2309 0 return Eutf2::lc(CORE::substr($_,0,1)) . CORE::substr($_,1);
2310 }
2311 }
2312  
2313 #
2314 # UTF-8 lower case first without parameter
2315 #
2316 0 ▶sub Eutf2::lcfirst_() {
Subroutine lcfirst_: not called CC=1 SCAR=6.9
Pod undocumented
2317 0 return Eutf2::lc(CORE::substr($_,0,1)) . CORE::substr($_,1);
2318 }
2319  
2320 #
2321 # UTF-8 lower case with parameter
2322 #
2323 14 ▶sub Eutf2::lc(@) {
Subroutine lc: called CC=6 SCAR=22.9
Pod undocumented
2324 14 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 14 0 14
2325 14 my $s = shift @_;
2326 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
2327 0 ▶ return join('', map {defined($lc{$_}) ? $lc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg)), @_;
Branch: 1 branch
BranchTrueFalseTotal
defined $lc{$_} ? : 0 0 0
2328 }
2329 else {
2330 14 ▶ return join('', map {defined($lc{$_}) ? $lc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg));
Branch: 1 branch
BranchTrueFalseTotal
defined $lc{$_} ? : 39 14 53
2331 }
2332 }
2333 else {
2334 0 return Eutf2::lc_();
2335 }
2336 }
2337  
2338 #
2339 # UTF-8 lower case without parameter
2340 #
2341 0 ▶sub Eutf2::lc_() {
Subroutine lc_: not called CC=2 SCAR=17.9
Pod undocumented
2342 0 my $s = $_;
2343 0 ▶ return join '', map {defined($lc{$_}) ? $lc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg);
Branch: 1 branch
BranchTrueFalseTotal
defined $lc{$_} ? : 0 0 0
2344 }
2345  
2346 #
2347 # UTF-8 upper case first with parameter
2348 #
2349 0 ▶sub Eutf2::ucfirst(@) {
Subroutine ucfirst: not called CC=4 SCAR=30.0
Pod undocumented
2350 0 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 0 0 0
2351 0 my $s = shift @_;
2352 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
2353 0 return Eutf2::uc(CORE::substr($s,0,1)) . CORE::substr($s,1), @_;
2354 }
2355 else {
2356 0 return Eutf2::uc(CORE::substr($s,0,1)) . CORE::substr($s,1);
2357 }
2358 }
2359 else {
2360 0 return Eutf2::uc(CORE::substr($_,0,1)) . CORE::substr($_,1);
2361 }
2362 }
2363  
2364 #
2365 # UTF-8 upper case first without parameter
2366 #
2367 0 ▶sub Eutf2::ucfirst_() {
Subroutine ucfirst_: not called CC=1 SCAR=6.9
Pod undocumented
2368 0 return Eutf2::uc(CORE::substr($_,0,1)) . CORE::substr($_,1);
2369 }
2370  
2371 #
2372 # UTF-8 upper case with parameter
2373 #
2374 17008 ▶sub Eutf2::uc(@) {
Subroutine uc: called CC=6 SCAR=22.9
Pod undocumented
2375 17008 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 17008 0 17008
2376 17008 my $s = shift @_;
2377 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
2378 0 ▶ return join('', map {defined($uc{$_}) ? $uc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg)), @_;
Branch: 1 branch
BranchTrueFalseTotal
defined $uc{$_} ? : 0 0 0
2379 }
2380 else {
2381 17008 ▶ return join('', map {defined($uc{$_}) ? $uc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg));
Branch: 1 branch
BranchTrueFalseTotal
defined $uc{$_} ? : 1481 15529 17010
2382 }
2383 }
2384 else {
2385 0 return Eutf2::uc_();
2386 }
2387 }
2388  
2389 #
2390 # UTF-8 upper case without parameter
2391 #
2392 0 ▶sub Eutf2::uc_() {
Subroutine uc_: not called CC=2 SCAR=17.9
Pod undocumented
2393 0 my $s = $_;
2394 0 ▶ return join '', map {defined($uc{$_}) ? $uc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg);
Branch: 1 branch
BranchTrueFalseTotal
defined $uc{$_} ? : 0 0 0
2395 }
2396  
2397 #
2398 # UTF-8 fold case with parameter
2399 #
2400 17100 ▶sub Eutf2::fc(@) {
Subroutine fc: called CC=6 SCAR=22.9
Pod undocumented
2401 17100 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) { } 17100 0 17100
2402 17100 my $s = shift @_;
2403 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
2404 0 ▶ return join('', map {defined($fc{$_}) ? $fc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg)), @_;
Branch: 1 branch
BranchTrueFalseTotal
defined $fc{$_} ? : 0 0 0
2405 }
2406 else {
2407 17100 ▶ return join('', map {defined($fc{$_}) ? $fc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg));
Branch: 1 branch
BranchTrueFalseTotal
defined $fc{$_} ? : 25994 88972 114966
2408 }
2409 }
2410 else {
2411 0 return Eutf2::fc_();
2412 }
2413 }
2414  
2415 #
2416 # UTF-8 fold case without parameter
2417 #
2418 0 ▶sub Eutf2::fc_() {
Subroutine fc_: not called CC=2 SCAR=17.9
Pod undocumented
2419 0 my $s = $_;
2420 0 ▶ return join '', map {defined($fc{$_}) ? $fc{$_} : $_} ($s =~ /\G ($q_char) /oxmsg);
Branch: 1 branch
BranchTrueFalseTotal
defined $fc{$_} ? : 0 0 0
2421 }
2422  
2423 #
2424 # UTF-8 regexp capture
2425 #
2426 {
2427 0 ▶ sub Eutf2::capture {
Subroutine capture: not called CC=1 SCAR=6.9
Pod documented
2428 0 return $_[0];
2429 }
2430 }
2431  
2432 #
2433 # UTF-8 regexp ignore case modifier
2434 #
2435 631 ▶sub Eutf2::ignorecase {
Subroutine ignorecase: called CC=25 SCAR=52.5
Pod undocumented
2436  
2437 9 my @string = @_;
2438 9 my $metachar = qr/[\@\\|[\]{]/oxms;
2439  
2440 # ignore case of $scalar or @array
2441 9 for my $string (@string) {
2442  
2443 # split regexp
2444 9 my @char = $string =~ /\G (?>\[\^|\\$q_char|$q_char) /oxmsg;
2445  
2446 # unescape character
2447 9 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 24387 9 24396
2448 24387 ▶ next if not defined $char[$i];
Branch: 1 branch
BranchTrueFalseTotal
unless defined $char[$i] 0 24387 24387
2449  
2450 # open character class [...]
2451 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
2452 0 my $left = $i;
2453  
2454 # [] make die "unmatched [] in regexp ...\n"
2455  
2456 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
2457 0 $i++;
2458 }
2459  
2460 0 while (1) {
2461 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
2462 0 croak "Unmatched [] in regexp";
2463 }
2464 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
2465 0 my $right = $i;
2466 0 my @charlist = charlist_qr(@char[$left+1..$right-1], 'i');
2467  
2468 # escape character
2469 0 for my $char (@charlist) {
2470 0 ▶ if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { $char =~ /\A [.|)] \z/mosx }) 0 0 0
2471 }
2472  
2473 0 elsif ($char =~ /\A [.|)] \z/oxms) {
2474 0 $char = '\\' . $char;
2475 }
2476 }
2477  
2478 # [...]
2479 0 splice @char, $left, $right-$left+1, '(?:' . join('|', @charlist) . ')';
2480  
2481 0 $i = $left;
2482 0 last;
2483 }
2484 }
2485 }
2486  
2487 # open character class [^...]
2488 elsif ($char[$i] eq '[^') {
2489 0 my $left = $i;
2490  
2491 # [^] make die "unmatched [] in regexp ...\n"
2492  
2493 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
2494 0 $i++;
2495 }
2496  
2497 0 while (1) {
2498 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
2499 0 croak "Unmatched [] in regexp";
2500 }
2501 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
2502 0 my $right = $i;
2503 0 my @charlist = charlist_not_qr(@char[$left+1..$right-1], 'i');
2504  
2505 # escape character
2506 0 for my $char (@charlist) {
2507 0 ▶ if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { $char =~ /\A [.|)] \z/mosx }) 0 0 0
2508 }
2509  
2510 0 elsif ($char =~ /\A [.|)] \z/oxms) {
2511 0 $char = '\\' . $char;
2512 }
2513 }
2514  
2515 # [^...]
2516 0 splice @char, $left, $right-$left+1, '(?!' . join('|', @charlist) . ")(?:$your_char)";
2517  
2518 0 $i = $left;
2519 0 last;
2520 }
2521 }
2522 }
2523  
2524 # rewrite classic character class or escape character
2525 elsif (my $char = classic_character_class($char[$i])) {
2526 0 $char[$i] = $char;
2527 }
2528  
2529 # with /i modifier
2530 elsif ($char[$i] =~ /\A [\x00-\xFF] \z/oxms) {
2531 12249 my $uc = Eutf2::uc($char[$i]);
2532 12249 my $fc = Eutf2::fc($char[$i]);
2533 12249 ▶ if ($uc ne $fc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($uc ne $fc) 361 11888 12249
2534 361 ▶ if (CORE::length($fc) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $fc == 1) { } 361 0 361
2535 361 $char[$i] = '[' . $uc . $fc . ']';
2536 }
2537 else {
2538 0 $char[$i] = '(?:' . $uc . '|' . $fc . ')';
2539 }
2540 }
2541 }
2542 }
2543  
2544 # characterize
2545 9 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 24387 9 24396
2546 24387 ▶ next if not defined $char[$i];
Branch: 1 branch
BranchTrueFalseTotal
unless defined $char[$i] 0 24387 24387
2547  
2548 24387 ▶ if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { $i >= 1 and $char[$i] =~ /\A [\?\+\*\{] \z/mosx }) 0 24396 24396
2549 }
2550  
2551 # quote character before ? + * {
2552 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
2553 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
2554 0 $char[$i-1] = '(?:' . $char[$i-1] . ')';
2555 }
2556 }
2557 }
2558  
2559 9 $string = join '', @char;
2560 }
2561  
2562 # make regexp string
2563 9 return @string;
2564 }
2565  
2566 #
2567 # classic character class ( \D \S \W \d \s \w \C \X \H \V \h \v \R \N \b \B )
2568 #
2569 27213 ▶sub Eutf2::classic_character_class {
Subroutine classic_character_class: called CC=2 SCAR=6.9
Pod undocumented
2570 27213 my($char) = @_;
2571  
2572 return {
2573 '\D' => '${Eutf2::eD}',
2574 '\S' => '${Eutf2::eS}',
2575 '\W' => '${Eutf2::eW}',
2576 '\d' => '[0-9]',
2577  
2578 # Before Perl 5.6, \s only matched the five whitespace characters
2579 # tab, newline, form-feed, carriage return, and the space character
2580 # itself, which, taken together, is the character class [\t\n\f\r ].
2581  
2582 # Vertical tabs are now whitespace
2583 # \s in a regex now matches a vertical tab in all circumstances.
2584 # http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Vertical_tabs_are_now_whitespace
2585 # \t \n \v \f \r space
2586 # '\s' => '[\x09\x0A \x0C\x0D\x20]',
2587 # '\s' => '[\x09\x0A\x0B\x0C\x0D\x20]',
2588 '\s' => '\s',
2589  
2590 '\w' => '[0-9A-Z_a-z]',
2591 '\C' => '[\x00-\xFF]',
2592 '\X' => 'X',
2593  
2594 # \h \v \H \V
2595  
2596 # P.114 Character Class Shortcuts
2597 # in Chapter 7: In the World of Regular Expressions
2598 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
2599  
2600 # P.357 13.2.3 Whitespace
2601 # in Chapter 13: perlrecharclass: Perl Regular Expression Character Classes
2602 # of ISBN-13: 978-1-906966-02-7 The Perl Language Reference Manual (for Perl version 5.12.1)
2603 #
2604 # 0x00009 CHARACTER TABULATION h s
2605 # 0x0000a LINE FEED (LF) vs
2606 # 0x0000b LINE TABULATION v
2607 # 0x0000c FORM FEED (FF) vs
2608 # 0x0000d CARRIAGE RETURN (CR) vs
2609 # 0x00020 SPACE h s
2610  
2611 # P.196 Table 5-9. Alphanumeric regex metasymbols
2612 # in Chapter 5. Pattern Matching
2613 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
2614  
2615 # (and so on)
2616  
2617 '\H' => '${Eutf2::eH}',
2618 '\V' => '${Eutf2::eV}',
2619 '\h' => '[\x09\x20]',
2620 '\v' => '[\x0A\x0B\x0C\x0D]',
2621 '\R' => '${Eutf2::eR}',
2622  
2623 # \N
2624 #
2625 # http://perldoc.perl.org/perlre.html
2626 # Character Classes and other Special Escapes
2627 # Any character but \n (experimental). Not affected by /s modifier
2628  
2629 '\N' => '${Eutf2::eN}',
2630  
2631 # \b \B
2632  
2633 # P.180 Boundaries: The \b and \B Assertions
2634 # in Chapter 5: Pattern Matching
2635 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
2636  
2637 # P.219 Boundaries: The \b and \B Assertions
2638 # in Chapter 5: Pattern Matching
2639 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
2640  
2641 # \b really means (?:(?<=\w)(?!\w)|(?<!\w)(?=\w))
2642 # or (?:(?<=\A|\W)(?=\w)|(?<=\w)(?=\W|\z))
2643 '\b' => '${Eutf2::eb}',
2644  
2645 # \B really means (?:(?<=\w)(?=\w)|(?<!\w)(?!\w))
2646 # or (?:(?<=\w)(?=\w)|(?<=\W)(?=\W))
2647 '\B' => '${Eutf2::eB}',
2648  
2649 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
2650 }
2651  
2652 #
2653 # prepare UTF-8 characters per length
2654 #
2655  
2656 # 1 octet characters
2657 631 my @chars1 = ();
2658 2 ▶sub chars1 {
Subroutine chars1: called CC=5 SCAR=16.1
Pod undocumented
2659 2 ▶ if (@chars1) {
Branch: 1 branch
BranchTrueFalseTotal
if (@chars1) 1 1 2
2660 1 return @chars1;
2661 }
2662 1 ▶ if (exists $range_tr{1}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $range_tr{1}) 1 0 1
2663 1 my @ranges = @{ $range_tr{1} };
2664 1 ▶ while (my @range = splice(@ranges,0,1)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@range) = splice(@ranges, 0, 1)) 2 1 3
2665 2 for my $oct0 (@{$range[0]}) {
2666 139 push @chars1, pack 'C', $oct0;
2667 }
2668 }
2669 }
2670 1 return @chars1;
2671 }
2672  
2673 # 2 octets characters
2674 631 my @chars2 = ();
2675 0 ▶sub chars2 {
Subroutine chars2: not called CC=6 SCAR=37.4
Pod undocumented
2676 0 ▶ if (@chars2) {
Branch: 1 branch
BranchTrueFalseTotal
if (@chars2) 0 0 0
2677 0 return @chars2;
2678 }
2679 0 ▶ if (exists $range_tr{2}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $range_tr{2}) 0 0 0
2680 0 my @ranges = @{ $range_tr{2} };
2681 0 ▶ while (my @range = splice(@ranges,0,2)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@range) = splice(@ranges, 0, 2)) 0 0 0
2682 0 for my $oct0 (@{$range[0]}) {
2683 0 for my $oct1 (@{$range[1]}) {
2684 0 push @chars2, pack 'CC', $oct0,$oct1;
2685 }
2686 }
2687 }
2688 }
2689 0 return @chars2;
2690 }
2691  
2692 # 3 octets characters
2693 631 my @chars3 = ();
2694 3 ▶sub chars3 {
Subroutine chars3: called CC=7 SCAR=19.5
Pod undocumented
2695 3 ▶ if (@chars3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@chars3) 2 1 3
2696 2 return @chars3;
2697 }
2698 1 ▶ if (exists $range_tr{3}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $range_tr{3}) 1 0 1
2699 1 my @ranges = @{ $range_tr{3} };
2700 1 ▶ while (my @range = splice(@ranges,0,3)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@range) = splice(@ranges, 0, 3)) 4 1 5
2701 4 for my $oct0 (@{$range[0]}) {
2702 16 for my $oct1 (@{$range[1]}) {
2703 960 for my $oct2 (@{$range[2]}) {
2704 61440 push @chars3, pack 'CCC', $oct0,$oct1,$oct2;
2705 }
2706 }
2707 }
2708 }
2709 }
2710 1 return @chars3;
2711 }
2712  
2713 # 4 octets characters
2714 631 my @chars4 = ();
2715 0 ▶sub chars4 {
Subroutine chars4: not called CC=8 SCAR=42.8
Pod undocumented
2716 0 ▶ if (@chars4) {
Branch: 1 branch
BranchTrueFalseTotal
if (@chars4) 0 0 0
2717 0 return @chars4;
2718 }
2719 0 ▶ if (exists $range_tr{4}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $range_tr{4}) 0 0 0
2720 0 my @ranges = @{ $range_tr{4} };
2721 0 ▶ while (my @range = splice(@ranges,0,4)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@range) = splice(@ranges, 0, 4)) 0 0 0
2722 0 for my $oct0 (@{$range[0]}) {
2723 0 for my $oct1 (@{$range[1]}) {
2724 0 for my $oct2 (@{$range[2]}) {
2725 0 for my $oct3 (@{$range[3]}) {
2726 0 push @chars4, pack 'CCCC', $oct0,$oct1,$oct2,$oct3;
2727 }
2728 }
2729 }
2730 }
2731 }
2732 }
2733 0 return @chars4;
2734 }
2735  
2736 #
2737 # UTF-8 open character list for tr
2738 #
2739 28 ▶sub _charlist_tr {
Subroutine _charlist_tr: called CC=35 SCAR=58.6
2740  
2741 28 local $_ = shift @_;
2742  
2743 # unescape character
2744 28 my @char = ();
2745 28 ▶ while (not /\G \z/oxmsgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgmosx) 86 28 114
2746 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
2747 0 push @char, '\-';
2748 }
2749 elsif (/\G \\ ([0-7]{2,3}) /oxmsgc) {
2750 0 push @char, CORE::chr(oct $1);
2751 }
2752 elsif (/\G \\x ([0-9A-Fa-f]{1,2}) /oxmsgc) {
2753 0 push @char, CORE::chr(hex $1);
2754 }
2755 elsif (/\G \\c ([\x40-\x5F]) /oxmsgc) {
2756 0 push @char, CORE::chr(CORE::ord($1) & 0x1F);
2757 }
2758 elsif (/\G (\\ [0nrtfbae]) /oxmsgc) {
2759 push @char, {
2760 '\0' => "\0",
2761 '\n' => "\n",
2762 '\r' => "\r",
2763 '\t' => "\t",
2764 '\f' => "\f",
2765 '\b' => "\x08", # \b means backspace in character class
2766 '\a' => "\a",
2767 '\e' => "\e",
2768 0 }->{$1};
2769 }
2770 elsif (/\G \\ ($q_char) /oxmsgc) {
2771 0 push @char, $1;
2772 }
2773 elsif (/\G ($q_char) /oxmsgc) {
2774 86 push @char, $1;
2775 }
2776 }
2777  
2778 # join separated multiple-octet
2779 28 @char = join('',@char) =~ /\G (?>\\-|$q_char) /oxmsg;
2780  
2781 # unescape '-'
2782 28 my @i = ();
2783 28 for my $i (0 .. $#char) {
2784 86 ▶ if ($char[$i] eq '\-') {
Branch: 2 branches
BranchTrueFalseTotal
if ($char[$i] eq '\\-') { } 0 86 86
elsif ($char[$i] eq '-') { } 5 81 86
2785 0 $char[$i] = '-';
2786 }
2787 elsif ($char[$i] eq '-') {
2788 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
2789 5 push @i, $i;
2790 }
2791 }
2792 }
2793  
2794 # open character list (reverse for splice)
2795 28 for my $i (CORE::reverse @i) {
2796 5 my @range = ();
2797  
2798 # range error
2799 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
2800 0 croak "Invalid tr/// range \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2801 }
2802  
2803 # range of multiple-octet code
2804 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
2805 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
2806 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
2807 }
2808 elsif (CORE::length($char[$i+1]) == 2) {
2809 0 push @range, grep {$char[$i-1] le $_} chars1();
2810 0 push @range, grep {$_ le $char[$i+1]} chars2();
2811 }
2812 elsif (CORE::length($char[$i+1]) == 3) {
2813 0 push @range, grep {$char[$i-1] le $_} chars1();
2814 0 push @range, chars2();
2815 0 push @range, grep {$_ le $char[$i+1]} chars3();
2816 }
2817 elsif (CORE::length($char[$i+1]) == 4) {
2818 0 push @range, grep {$char[$i-1] le $_} chars1();
2819 0 push @range, chars2();
2820 0 push @range, chars3();
2821 0 push @range, grep {$_ le $char[$i+1]} chars4();
2822 }
2823 else {
2824 0 croak "Invalid tr/// range (over 4octets) \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2825 }
2826 }
2827 elsif (CORE::length($char[$i-1]) == 2) {
2828 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
2829 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
2830 }
2831 elsif (CORE::length($char[$i+1]) == 3) {
2832 0 push @range, grep {$char[$i-1] le $_} chars2();
2833 0 push @range, grep {$_ le $char[$i+1]} chars3();
2834 }
2835 elsif (CORE::length($char[$i+1]) == 4) {
2836 0 push @range, grep {$char[$i-1] le $_} chars2();
2837 0 push @range, chars3();
2838 0 push @range, grep {$_ le $char[$i+1]} chars4();
2839 }
2840 else {
2841 0 croak "Invalid tr/// range (over 4octets) \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2842 }
2843 }
2844 elsif (CORE::length($char[$i-1]) == 3) {
2845 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
2846 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
2847 }
2848 elsif (CORE::length($char[$i+1]) == 4) {
2849 0 push @range, grep {$char[$i-1] le $_} chars3();
2850 0 push @range, grep {$_ le $char[$i+1]} chars4();
2851 }
2852 else {
2853 0 croak "Invalid tr/// range (over 4octets) \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2854 }
2855 }
2856 elsif (CORE::length($char[$i-1]) == 4) {
2857 0 ▶ if (CORE::length($char[$i+1]) == 4) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $char[$i + 1] == 4) { } 0 0 0
2858 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
2859 }
2860 else {
2861 0 croak "Invalid tr/// range (over 4octets) \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2862 }
2863 }
2864 else {
2865 0 croak "Invalid tr/// range (over 4octets) \"\\x" . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]) . '"';
2866 }
2867  
2868 5 splice @char, $i-1, 3, @range;
2869 }
2870  
2871 28 return @char;
2872 }
2873  
2874 #
2875 # UTF-8 open character class
2876 #
2877 2916 ▶sub _cc {
Subroutine _cc: called CC=7 SCAR=23.4
2878 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
2879 0 die __FILE__, ": subroutine cc got no parameter.\n";
2880 }
2881 elsif (scalar(@_) == 1) {
2882 1384 return sprintf('\x%02X',$_[0]);
2883 }
2884 elsif (scalar(@_) == 2) {
2885 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
2886 0 die __FILE__, ": subroutine cc got \$_[0] > \$_[1] parameters).\n";
2887 }
2888 elsif ($_[0] == $_[1]) {
2889 160 return sprintf('\x%02X',$_[0]);
2890 }
2891 elsif (($_[0]+1) == $_[1]) {
2892 0 return sprintf('[\\x%02X\\x%02X]',$_[0],$_[1]);
2893 }
2894 else {
2895 1372 return sprintf('[\\x%02X-\\x%02X]',$_[0],$_[1]);
2896 }
2897 }
2898 else {
2899 0 die __FILE__, ": subroutine cc got 3 or more parameters (@{[scalar(@_)]} parameters).\n";
2900 }
2901 }
2902  
2903 #
2904 # UTF-8 octet range
2905 #
2906 1002 ▶sub _octets {
Subroutine _octets: called CC=20 SCAR=44.0
2907 1002 my $length = shift @_;
2908  
2909 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
2910 590 my($a1) = unpack 'C', $_[0];
2911 590 my($z1) = unpack 'C', $_[1];
2912  
2913 590 ▶ if ($a1 > $z1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($a1 > $z1) 0 590 590
2914 0 croak 'Invalid [] range in regexp (CORE::ord(A) > CORE::ord(B)) ' . '\x' . unpack('H*',$a1) . '-\x' . unpack('H*',$z1);
2915 }
2916  
2917 590 ▶ if ($a1 == $z1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a1 == $z1) { } 0 590 590
elsif ($a1 + 1 == $z1) { } 0 590 590
2918 0 return sprintf('\x%02X',$a1);
2919 }
2920 elsif (($a1+1) == $z1) {
2921 0 return sprintf('\x%02X\x%02X',$a1,$z1);
2922 }
2923 else {
2924 590 return sprintf('\x%02X-\x%02X',$a1,$z1);
2925 }
2926 }
2927 elsif ($length == 2) {
2928 80 my($a1,$a2) = unpack 'CC', $_[0];
2929 80 my($z1,$z2) = unpack 'CC', $_[1];
2930 80 my($A1,$A2) = unpack 'CC', $_[2];
2931 80 my($Z1,$Z2) = unpack 'CC', $_[3];
2932  
2933 80 ▶ if ($a1 == $z1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a1 == $z1) { } 0 80 80
elsif ($a1 + 1 == $z1) { } 0 80 80
2934 return (
2935 # 11111111 222222222222
2936 # A A Z
2937 0 _cc($a1) . _cc($a2,$z2), # a2-z2
2938 );
2939 }
2940 elsif (($a1+1) == $z1) {
2941 return (
2942 # 11111111111 222222222222
2943 # A Z A Z
2944 0 _cc($a1) . _cc($a2,$Z2), # a2-
2945 _cc( $z1) . _cc($A2,$z2), # -z2
2946 );
2947 }
2948 else {
2949 return (
2950 # 1111111111111111 222222222222
2951 # A Z A Z
2952 80 _cc($a1) . _cc($a2,$Z2), # a2-
2953 _cc($a1+1,$z1-1) . _cc($A2,$Z2), # -
2954 _cc( $z1) . _cc($A2,$z2), # -z2
2955 );
2956 }
2957 }
2958 elsif ($length == 3) {
2959 332 my($a1,$a2,$a3) = unpack 'CCC', $_[0];
2960 332 my($z1,$z2,$z3) = unpack 'CCC', $_[1];
2961 332 my($A1,$A2,$A3) = unpack 'CCC', $_[2];
2962 332 my($Z1,$Z2,$Z3) = unpack 'CCC', $_[3];
2963  
2964 332 ▶ if ($a1 == $z1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a1 == $z1) { } 252 80 332
elsif ($a1 + 1 == $z1) { } 0 80 80
2965 252 ▶ if ($a2 == $z2) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a2 == $z2) { } 172 80 252
elsif ($a2 + 1 == $z2) { } 0 80 80
2966 return (
2967 # 11111111 22222222 333333333333
2968 # A A A Z
2969 172 _cc($a1) . _cc($a2) . _cc($a3,$z3), # a3-z3
2970 );
2971 }
2972 elsif (($a2+1) == $z2) {
2973 return (
2974 # 11111111 22222222222 333333333333
2975 # A A Z A Z
2976 0 _cc($a1) . _cc($a2) . _cc($a3,$Z3), # a3-
2977 _cc($a1) . _cc( $z2) . _cc($A3,$z3), # -z3
2978 );
2979 }
2980 else {
2981 return (
2982 # 11111111 2222222222222222 333333333333
2983 # A A Z A Z
2984 80 _cc($a1) . _cc($a2) . _cc($a3,$Z3), # a3-
2985 _cc($a1) . _cc($a2+1,$z2-1) . _cc($A3,$Z3), # -
2986 _cc($a1) . _cc( $z2) . _cc($A3,$z3), # -z3
2987 );
2988 }
2989 }
2990 elsif (($a1+1) == $z1) {
2991 return (
2992 # 11111111111 22222222222222 333333333333
2993 # A Z A Z A Z
2994 0 _cc($a1) . _cc($a2) . _cc($a3,$Z3), # a3-
2995 _cc($a1) . _cc($a2+1,$Z2) . _cc($A3,$Z3), # -
2996 _cc( $z1) . _cc($A2,$z2-1) . _cc($A3,$Z3), # -
2997 _cc( $z1) . _cc( $z2) . _cc($A3,$z3), # -z3
2998 );
2999 }
3000 else {
3001 return (
3002 # 1111111111111111 22222222222222 333333333333
3003 # A Z A Z A Z
3004 80 _cc($a1) . _cc($a2) . _cc($a3,$Z3), # a3-
3005 _cc($a1) . _cc($a2+1,$Z2) . _cc($A3,$Z3), # -
3006 _cc($a1+1,$z1-1) . _cc($A2,$Z2) . _cc($A3,$Z3), # -
3007 _cc( $z1) . _cc($A2,$z2-1) . _cc($A3,$Z3), # -
3008 _cc( $z1) . _cc( $z2) . _cc($A3,$z3), # -z3
3009 );
3010 }
3011 }
3012 elsif ($length == 4) {
3013 0 my($a1,$a2,$a3,$a4) = unpack 'CCCC', $_[0];
3014 0 my($z1,$z2,$z3,$z4) = unpack 'CCCC', $_[1];
3015 0 my($A1,$A2,$A3,$A4) = unpack 'CCCC', $_[0];
3016 0 my($Z1,$Z2,$Z3,$Z4) = unpack 'CCCC', $_[1];
3017  
3018 0 ▶ if ($a1 == $z1) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a1 == $z1) { } 0 0 0
elsif ($a1 + 1 == $z1) { } 0 0 0
3019 0 ▶ if ($a2 == $z2) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a2 == $z2) { } 0 0 0
elsif ($a2 + 1 == $z2) { } 0 0 0
3020 0 ▶ if ($a3 == $z3) {
Branch: 2 branches
BranchTrueFalseTotal
if ($a3 == $z3) { } 0 0 0
elsif ($a3 + 1 == $z3) { } 0 0 0
3021 return (
3022 # 11111111 22222222 33333333 444444444444
3023 # A A A A Z
3024 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$z4), # a4-z4
3025 );
3026 }
3027 elsif (($a3+1) == $z3) {
3028 return (
3029 # 11111111 22222222 33333333333 444444444444
3030 # A A A Z A Z
3031 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3032 _cc($a1) . _cc($a2) . _cc( $z3) . _cc($A4,$z4), # -z4
3033 );
3034 }
3035 else {
3036 return (
3037 # 11111111 22222222 3333333333333333 444444444444
3038 # A A A Z A Z
3039 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3040 _cc($a1) . _cc($a2) . _cc($a3+1,$z3-1) . _cc($A4,$Z4), # -
3041 _cc($a1) . _cc($a2) . _cc( $z3) . _cc($A4,$z4), # -z4
3042 );
3043 }
3044 }
3045 elsif (($a2+1) == $z2) {
3046 return (
3047 # 11111111 22222222222 33333333333333 444444444444
3048 # A A Z A Z A Z
3049 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3050 _cc($a1) . _cc($a2) . _cc($a3+1,$Z3) . _cc($A4,$Z4), # -
3051 _cc($a1) . _cc( $z2) . _cc($A3,$z3-1) . _cc($A4,$Z4), # -
3052 _cc($a1) . _cc( $z2) . _cc( $z3) . _cc($A4,$z4), # -z4
3053 );
3054 }
3055 else {
3056 return (
3057 # 11111111 2222222222222222 33333333333333 444444444444
3058 # A A Z A Z A Z
3059 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3060 _cc($a1) . _cc($a2) . _cc($a3+1,$Z3) . _cc($A4,$Z4), # -
3061 _cc($a1) . _cc($a2+1,$z2-1) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3062 _cc($a1) . _cc( $z2) . _cc($A3,$z3-1) . _cc($A4,$Z4), # -
3063 _cc($a1) . _cc( $z2) . _cc( $z3) . _cc($A4,$z4), # -z4
3064 );
3065 }
3066 }
3067 elsif (($a1+1) == $z1) {
3068 return (
3069 # 11111111111 22222222222222 33333333333333 444444444444
3070 # A Z A Z A Z A Z
3071 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3072 _cc($a1) . _cc($a2) . _cc($a3+1,$Z3) . _cc($A4,$Z4), # -
3073 _cc($a1) . _cc($a2+1,$Z2) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3074 _cc( $z1) . _cc($A2,$z2-1) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3075 _cc( $z1) . _cc( $z2) . _cc($A3,$z3-1) . _cc($A4,$Z4), # -
3076 _cc( $z1) . _cc( $z2) . _cc( $z3) . _cc($A4,$z4), # -z4
3077 );
3078 }
3079 else {
3080 return (
3081 # 1111111111111111 22222222222222 33333333333333 444444444444
3082 # A Z A Z A Z A Z
3083 0 _cc($a1) . _cc($a2) . _cc($a3) . _cc($a4,$Z4), # a4-
3084 _cc($a1) . _cc($a2) . _cc($a3+1,$Z3) . _cc($A4,$Z4), # -
3085 _cc($a1) . _cc($a2+1,$Z2) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3086 _cc($a1+1,$z1-1) . _cc($A2,$Z2) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3087 _cc( $z1) . _cc($A2,$z2-1) . _cc($A3,$Z3) . _cc($A4,$Z4), # -
3088 _cc( $z1) . _cc( $z2) . _cc($A3,$z3-1) . _cc($A4,$Z4), # -
3089 _cc( $z1) . _cc( $z2) . _cc( $z3) . _cc($A4,$z4), # -z4
3090 );
3091 }
3092 }
3093 else {
3094 0 die __FILE__, ": subroutine _octets got invalid length ($length).\n";
3095 }
3096 }
3097  
3098 #
3099 # UTF-8 range regexp
3100 #
3101 842 ▶sub _range_regexp {
Subroutine _range_regexp: called CC=18 SCAR=30.2
3102 842 my($length,$first,$last) = @_;
3103  
3104 842 my @range_regexp = ();
3105 842 ▶ if (not exists $range_tr{$length}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $range_tr{$length}) 0 842 842
3106 0 return @range_regexp;
3107 }
3108  
3109 842 my @ranges = @{ $range_tr{$length} };
3110 842 ▶ while (my @range = splice(@ranges,0,$length)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my(@range) = splice(@ranges, 0, $length)) 2108 842 2950
3111 2108 my $min = '';
3112 2108 my $max = '';
3113 2108 ▶ for (my $i=0; $i < $length; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i < $length) 4204 2108 6312
3114 4204 $min .= pack 'C', $range[$i][0];
3115 4204 $max .= pack 'C', $range[$i][-1];
3116 }
3117  
3118 # min___max
3119 # FIRST_____________LAST
3120 # (nothing)
3121  
3122 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
3123 }
3124  
3125 # **********
3126 # min_________max
3127 # FIRST_____________LAST
3128 # **********
3129  
3130 ▶ 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
3131 88 push @range_regexp, _octets($length,$first,$max,$min,$max);
3132 }
3133  
3134 # **********************
3135 # min________________max
3136 # FIRST_____________LAST
3137 # **********************
3138  
3139 ▶ 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
3140 0 push @range_regexp, _octets($length,$first,$last,$min,$max);
3141 }
3142  
3143 # *********
3144 # min___max
3145 # FIRST_____________LAST
3146 # *********
3147  
3148 ▶ 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
3149 240 push @range_regexp, _octets($length,$min,$max,$min,$max);
3150 }
3151  
3152 # **********************
3153 # min__________________________max
3154 # FIRST_____________LAST
3155 # **********************
3156  
3157 ▶ 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
3158 594 push @range_regexp, _octets($length,$first,$last,$min,$max);
3159 }
3160  
3161 # *********
3162 # min________max
3163 # FIRST_____________LAST
3164 # *********
3165  
3166 ▶ 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
3167 80 push @range_regexp, _octets($length,$min,$last,$min,$max);
3168 }
3169  
3170 # min___max
3171 # FIRST_____________LAST
3172 # (nothing)
3173  
3174 elsif ($last lt $min) {
3175 }
3176  
3177 else {
3178 0 die __FILE__, ": subroutine _range_regexp panic.\n";
3179 }
3180 }
3181  
3182 842 return @range_regexp;
3183 }
3184  
3185 #
3186 # UTF-8 open character list for qr and not qr
3187 #
3188 1184 ▶sub _charlist {
Subroutine _charlist: called CC=46 SCAR=41.0
3189  
3190 1184 my $modifier = pop @_;
3191 1184 my @char = @_;
3192  
3193 1184 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 354 830 1184
3194  
3195 # unescape character
3196 1184 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 3446 1184 4630
3197  
3198 # escape - to ...
3199 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
3200 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
3201 683 $char[$i] = '...';
3202 }
3203 }
3204  
3205 # octal escape sequence
3206 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
3207 0 $char[$i] = octchr($1);
3208 }
3209  
3210 # hexadecimal escape sequence
3211 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
3212 0 $char[$i] = hexchr($1);
3213 }
3214  
3215 # \b{...} --> b\{...}
3216 # \B{...} --> B\{...}
3217 # \N{CHARNAME} --> N\{CHARNAME}
3218 # \p{PROPERTY} --> p\{PROPERTY}
3219 # \P{PROPERTY} --> P\{PROPERTY}
3220 elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
3221 0 $char[$i] = $1 . '\\' . $2;
3222 }
3223  
3224 # \p, \P, \X --> p, P, X
3225 elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/oxms) {
3226 0 $char[$i] = $1;
3227 }
3228  
3229 elsif ($char[$i] =~ /\A \\ ([0-7]{2,3}) \z/oxms) {
3230 0 $char[$i] = CORE::chr oct $1;
3231 }
3232 elsif ($char[$i] =~ /\A \\x ([0-9A-Fa-f]{1,2}) \z/oxms) {
3233 206 $char[$i] = CORE::chr hex $1;
3234 }
3235 elsif ($char[$i] =~ /\A \\c ([\x40-\x5F]) \z/oxms) {
3236 0 $char[$i] = CORE::chr(CORE::ord($1) & 0x1F);
3237 }
3238 elsif ($char[$i] =~ /\A (\\ [0nrtfbaedswDSWHVhvR]) \z/oxms) {
3239 $char[$i] = {
3240 '\0' => "\0",
3241 '\n' => "\n",
3242 '\r' => "\r",
3243 '\t' => "\t",
3244 '\f' => "\f",
3245 '\b' => "\x08", # \b means backspace in character class
3246 '\a' => "\a",
3247 '\e' => "\e",
3248 '\d' => '[0-9]',
3249  
3250 # Vertical tabs are now whitespace
3251 # \s in a regex now matches a vertical tab in all circumstances.
3252 # http://search.cpan.org/dist/perl-5.18.0/pod/perldelta.pod#Vertical_tabs_are_now_whitespace
3253 # \t \n \v \f \r space
3254 # '\s' => '[\x09\x0A \x0C\x0D\x20]',
3255 # '\s' => '[\x09\x0A\x0B\x0C\x0D\x20]',
3256 '\s' => '\s',
3257  
3258 '\w' => '[0-9A-Z_a-z]',
3259 '\D' => '${Eutf2::eD}',
3260 '\S' => '${Eutf2::eS}',
3261 '\W' => '${Eutf2::eW}',
3262  
3263 '\H' => '${Eutf2::eH}',
3264 '\V' => '${Eutf2::eV}',
3265 '\h' => '[\x09\x20]',
3266 '\v' => '[\x0A\x0B\x0C\x0D]',
3267 '\R' => '${Eutf2::eR}',
3268  
3269 33 }->{$1};
3270 }
3271  
3272 # POSIX-style character classes
3273 ▶ 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
3274 $char[$i] = {
3275  
3276 '[:lower:]' => '[\x41-\x5A\x61-\x7A]',
3277 '[:upper:]' => '[\x41-\x5A\x61-\x7A]',
3278 '[:^lower:]' => '${Eutf2::not_lower_i}',
3279 '[:^upper:]' => '${Eutf2::not_upper_i}',
3280  
3281 8 }->{$1};
3282 }
3283 elsif ($char[$i] =~ /\A ( \[\: \^? (?:alnum|alpha|ascii|blank|cntrl|digit|graph|lower|print|punct|space|upper|word|xdigit) :\] ) \z/oxms) {
3284 $char[$i] = {
3285  
3286 '[:alnum:]' => '[\x30-\x39\x41-\x5A\x61-\x7A]',
3287 '[:alpha:]' => '[\x41-\x5A\x61-\x7A]',
3288 '[:ascii:]' => '[\x00-\x7F]',
3289 '[:blank:]' => '[\x09\x20]',
3290 '[:cntrl:]' => '[\x00-\x1F\x7F]',
3291 '[:digit:]' => '[\x30-\x39]',
3292 '[:graph:]' => '[\x21-\x7F]',
3293 '[:lower:]' => '[\x61-\x7A]',
3294 '[:print:]' => '[\x20-\x7F]',
3295 '[:punct:]' => '[\x21-\x2F\x3A-\x3F\x40\x5B-\x5F\x60\x7B-\x7E]',
3296  
3297 # P.174 POSIX-Style Character Classes
3298 # in Chapter 5: Pattern Matching
3299 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
3300  
3301 # P.311 11.2.4 Character Classes and other Special Escapes
3302 # in Chapter 11: perlre: Perl regular expressions
3303 # of ISBN-13: 978-1-906966-02-7 The Perl Language Reference Manual (for Perl version 5.12.1)
3304  
3305 # P.210 POSIX-Style Character Classes
3306 # in Chapter 5: Pattern Matching
3307 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
3308  
3309 '[:space:]' => '[\s\x0B]', # "\s" plus vertical tab ("\cK")
3310  
3311 '[:upper:]' => '[\x41-\x5A]',
3312 '[:word:]' => '[\x30-\x39\x41-\x5A\x5F\x61-\x7A]',
3313 '[:xdigit:]' => '[\x30-\x39\x41-\x46\x61-\x66]',
3314 '[:^alnum:]' => '${Eutf2::not_alnum}',
3315 '[:^alpha:]' => '${Eutf2::not_alpha}',
3316 '[:^ascii:]' => '${Eutf2::not_ascii}',
3317 '[:^blank:]' => '${Eutf2::not_blank}',
3318 '[:^cntrl:]' => '${Eutf2::not_cntrl}',
3319 '[:^digit:]' => '${Eutf2::not_digit}',
3320 '[:^graph:]' => '${Eutf2::not_graph}',
3321 '[:^lower:]' => '${Eutf2::not_lower}',
3322 '[:^print:]' => '${Eutf2::not_print}',
3323 '[:^punct:]' => '${Eutf2::not_punct}',
3324 '[:^space:]' => '${Eutf2::not_space}',
3325 '[:^upper:]' => '${Eutf2::not_upper}',
3326 '[:^word:]' => '${Eutf2::not_word}',
3327 '[:^xdigit:]' => '${Eutf2::not_xdigit}',
3328  
3329 70 }->{$1};
3330 }
3331 elsif ($char[$i] =~ /\A \\ ($q_char) \z/oxms) {
3332 7 $char[$i] = $1;
3333 }
3334 }
3335  
3336 # open character list
3337 1184 my @singleoctet = ();
3338 1184 my @multipleoctet = ();
3339 1184 ▶ for (my $i=0; $i <= $#char; ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 2763 1183 3946
3340  
3341 # escaped -
3342 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
3343 683 $i += 1;
3344 683 next;
3345 }
3346  
3347 # make range regexp
3348 elsif ($char[$i] eq '...') {
3349  
3350 # range error
3351 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
3352 0 croak 'Invalid [] range in regexp (length(A) > length(B)) ' . '\x' . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]);
3353 }
3354 elsif (CORE::length($char[$i-1]) == CORE::length($char[$i+1])) {
3355 603 ▶ if ($char[$i-1] gt $char[$i+1]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i - 1] gt $char[$i + 1]) 1 602 603
3356 1 croak 'Invalid [] range in regexp (CORE::ord(A) > CORE::ord(B)) ' . '\x' . unpack('H*',$char[$i-1]) . '-\x' . unpack('H*',$char[$i+1]);
3357 }
3358 }
3359  
3360 # make range regexp per length
3361 682 for my $length (CORE::length($char[$i-1]) .. CORE::length($char[$i+1])) {
3362 842 my @regexp = ();
3363  
3364 # is first and last
3365 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
3366 602 push @regexp, _range_regexp($length, $char[$i-1], $char[$i+1]);
3367 }
3368  
3369 # is first
3370 elsif ($length == CORE::length($char[$i-1])) {
3371 80 push @regexp, _range_regexp($length, $char[$i-1], "\xFF" x $length);
3372 }
3373  
3374 # is inside in first and last
3375 ▶ 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
3376 80 push @regexp, _range_regexp($length, "\x00" x $length, "\xFF" x $length);
3377 }
3378  
3379 # is last
3380 elsif ($length == CORE::length($char[$i+1])) {
3381 80 push @regexp, _range_regexp($length, "\x00" x $length, $char[$i+1]);
3382 }
3383  
3384 else {
3385 0 die __FILE__, ": subroutine make_regexp panic.\n";
3386 }
3387  
3388 842 ▶ if ($length == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($length == 1) { } 510 332 842
3389 510 push @singleoctet, @regexp;
3390 }
3391 else {
3392 332 push @multipleoctet, @regexp;
3393 }
3394 }
3395  
3396 682 $i += 2;
3397 }
3398  
3399 # with /i modifier
3400 elsif ($char[$i] =~ /\A [\x00-\xFF] \z/oxms) {
3401 764 ▶ if ($modifier =~ /i/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /i/mosx) { } 192 572 764
3402 192 my $uc = Eutf2::uc($char[$i]);
3403 192 my $fc = Eutf2::fc($char[$i]);
3404 192 ▶ if ($uc ne $fc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($uc ne $fc) { } 192 0 192
3405 192 ▶ if (CORE::length($fc) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $fc == 1) { } 192 0 192
3406 192 push @singleoctet, $uc, $fc;
3407 }
3408 else {
3409 0 push @singleoctet, $uc;
3410 0 push @multipleoctet, $fc;
3411 }
3412 }
3413 else {
3414 0 push @singleoctet, $char[$i];
3415 }
3416 }
3417 else {
3418 572 push @singleoctet, $char[$i];
3419 }
3420 764 $i += 1;
3421 }
3422  
3423 # single character of single octet code
3424 elsif ($char[$i] =~ /\A (?: \\h ) \z/oxms) {
3425 0 push @singleoctet, "\t", "\x20";
3426 0 $i += 1;
3427 }
3428 elsif ($char[$i] =~ /\A (?: \\v ) \z/oxms) {
3429 0 push @singleoctet, "\x0A", "\x0B", "\x0C", "\x0D";
3430 0 $i += 1;
3431 }
3432 elsif ($char[$i] =~ /\A (?: \\d | \\s | \\w ) \z/oxms) {
3433 2 push @singleoctet, $char[$i];
3434 2 $i += 1;
3435 }
3436  
3437 # single character of multiple-octet code
3438 else {
3439 631 push @multipleoctet, $char[$i];
3440 631 $i += 1;
3441 }
3442 }
3443  
3444 # quote metachar
3445 1183 for (@singleoctet) {
3446 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
3447 0 $_ = '-';
3448 }
3449 elsif (/\A \n \z/oxms) {
3450 8 $_ = '\n';
3451 }
3452 elsif (/\A \r \z/oxms) {
3453 8 $_ = '\r';
3454 }
3455 elsif (/\A ([\x00-\x20\x7F-\xFF]) \z/oxms) {
3456 1 $_ = sprintf('\x%02X', CORE::ord $1);
3457 }
3458 elsif (/\A [\x00-\xFF] \z/oxms) {
3459 939 $_ = quotemeta $_;
3460 }
3461 }
3462  
3463 # return character list
3464 1183 return \@singleoctet, \@multipleoctet;
3465 }
3466  
3467 #
3468 # UTF-8 octal escape sequence
3469 #
3470 5 ▶sub octchr {
Subroutine octchr: called CC=2 SCAR=6.9
Pod undocumented
3471 5 my($octdigit) = @_;
3472  
3473 5 my @binary = ();
3474 5 for my $octal (split(//,$octdigit)) {
3475 push @binary, {
3476 '0' => '000',
3477 '1' => '001',
3478 '2' => '010',
3479 '3' => '011',
3480 '4' => '100',
3481 '5' => '101',
3482 '6' => '110',
3483 '7' => '111',
3484 50 }->{$octal};
3485 }
3486 5 my $binary = join '', @binary;
3487  
3488 my $octchr = {
3489 # 1234567
3490 1 => pack('B*', "0000000$binary"),
3491 2 => pack('B*', "000000$binary"),
3492 3 => pack('B*', "00000$binary"),
3493 4 => pack('B*', "0000$binary"),
3494 5 => pack('B*', "000$binary"),
3495 6 => pack('B*', "00$binary"),
3496 7 => pack('B*', "0$binary"),
3497 0 => pack('B*', "$binary"),
3498  
3499 5 }->{CORE::length($binary) % 8};
3500  
3501 5 return $octchr;
3502 }
3503  
3504 #
3505 # UTF-8 hexadecimal escape sequence
3506 #
3507 5 ▶sub hexchr {
Subroutine hexchr: called CC=1 SCAR=0.0
Pod undocumented
3508 5 my($hexdigit) = @_;
3509  
3510 my $hexchr = {
3511 1 => pack('H*', "0$hexdigit"),
3512 0 => pack('H*', "$hexdigit"),
3513  
3514 5 }->{CORE::length($_[0]) % 2};
3515  
3516 5 return $hexchr;
3517 }
3518  
3519 #
3520 # UTF-8 open character list for qr
3521 #
3522 855 ▶sub charlist_qr {
Subroutine charlist_qr: called CC=17 SCAR=29.0
Pod undocumented
3523  
3524 855 my $modifier = pop @_;
3525 855 my @char = @_;
3526  
3527 855 my($singleoctet, $multipleoctet) = _charlist(@char, $modifier);
3528 854 my @singleoctet = @$singleoctet;
3529 854 my @multipleoctet = @$multipleoctet;
3530  
3531 # return character list
3532 854 ▶ if (scalar(@singleoctet) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @singleoctet >= 1) 448 406 854
3533  
3534 # with /i modifier
3535 448 ▶ if ($modifier =~ m/i/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /i/mosx) 137 311 448
3536 137 my %singleoctet_ignorecase = ();
3537 137 for (@singleoctet) {
3538 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
3539 125 for my $ord (hex($1) .. hex($2)) {
3540 2231 my $char = CORE::chr($ord);
3541 2231 my $uc = Eutf2::uc($char);
3542 2231 my $fc = Eutf2::fc($char);
3543 2231 ▶ if ($uc eq $fc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($uc eq $fc) { } 832 1399 2231
3544 832 $singleoctet_ignorecase{unpack 'C*', $char} = 1;
3545 }
3546 else {
3547 1399 ▶ if (CORE::length($fc) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $fc == 1) { } 1399 0 1399
3548 1399 $singleoctet_ignorecase{unpack 'C*', $uc} = 1;
3549 1399 $singleoctet_ignorecase{unpack 'C*', $fc} = 1;
3550 }
3551 else {
3552 0 $singleoctet_ignorecase{unpack 'C*', $uc} = 1;
3553 0 push @multipleoctet, join '', map {sprintf('\x%02X',$_)} unpack 'C*', $fc;
3554 }
3555 }
3556 }
3557 }
3558 317 ▶ if ($_ ne '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($_ ne "") 192 125 317
3559 192 $singleoctet_ignorecase{unpack 'C*', $_} = 1;
3560 }
3561 }
3562 137 my $i = 0;
3563 137 my @singleoctet_ignorecase = ();
3564 137 for my $ord (0 .. 255) {
3565 35072 ▶ if (exists $singleoctet_ignorecase{$ord}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $singleoctet_ignorecase{$ord}) { } 2822 32250 35072
3566 2822 push @{$singleoctet_ignorecase[$i]}, $ord;
3567 }
3568 else {
3569 32250 $i++;
3570 }
3571 }
3572 137 @singleoctet = ();
3573 137 for my $range (@singleoctet_ignorecase) {
3574 15552 ▶ if (ref $range) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $range) 274 15278 15552
3575 274 ▶ if (scalar(@{$range}) == 1) {
Branch: 2 branches
BranchTrueFalseTotal
if (scalar @{$range;} == 1) { } 0 274 274
elsif (scalar @{$range;} == 2) { } 0 274 274
3576 0 push @singleoctet, sprintf('\x%02X', @{$range}[0]);
3577 }
3578 274 elsif (scalar(@{$range}) == 2) {
3579 0 push @singleoctet, sprintf('\x%02X\x%02X', @{$range}[0], @{$range}[-1]);
3580 }
3581 else {
3582 274 push @singleoctet, sprintf('\x%02X-\x%02X', @{$range}[0], @{$range}[-1]);
3583 }
3584 }
3585 }
3586 }
3587  
3588 448 my $not_anchor = '';
3589 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]))';
3590  
3591 448 push @multipleoctet, join('', $not_anchor, '[', @singleoctet, ']' );
3592 }
3593 854 ▶ if (scalar(@multipleoctet) >= 2) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @multipleoctet >= 2) { } 132 722 854
3594 132 return '(?:' . join('|', @multipleoctet) . ')';
3595 }
3596 else {
3597 722 return $multipleoctet[0];
3598 }
3599 }
3600  
3601 #
3602 # UTF-8 open character list for not qr
3603 #
3604 329 ▶sub charlist_not_qr {
Subroutine charlist_not_qr: called CC=18 SCAR=29.9
Pod undocumented
3605  
3606 329 my $modifier = pop @_;
3607 329 my @char = @_;
3608  
3609 329 my($singleoctet, $multipleoctet) = _charlist(@char, $modifier);
3610 329 my @singleoctet = @$singleoctet;
3611 329 my @multipleoctet = @$multipleoctet;
3612  
3613 # with /i modifier
3614 329 ▶ if ($modifier =~ m/i/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /i/mosx) 173 156 329
3615 173 my %singleoctet_ignorecase = ();
3616 173 for (@singleoctet) {
3617 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
3618 125 for my $ord (hex($1) .. hex($2)) {
3619 2231 my $char = CORE::chr($ord);
3620 2231 my $uc = Eutf2::uc($char);
3621 2231 my $fc = Eutf2::fc($char);
3622 2231 ▶ if ($uc eq $fc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($uc eq $fc) { } 832 1399 2231
3623 832 $singleoctet_ignorecase{unpack 'C*', $char} = 1;
3624 }
3625 else {
3626 1399 ▶ if (CORE::length($fc) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $fc == 1) { } 1399 0 1399
3627 1399 $singleoctet_ignorecase{unpack 'C*', $uc} = 1;
3628 1399 $singleoctet_ignorecase{unpack 'C*', $fc} = 1;
3629 }
3630 else {
3631 0 $singleoctet_ignorecase{unpack 'C*', $uc} = 1;
3632 0 push @multipleoctet, join '', map {sprintf('\x%02X',$_)} unpack 'C*', $fc;
3633 }
3634 }
3635 }
3636 }
3637 317 ▶ if ($_ ne '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($_ ne "") 192 125 317
3638 192 $singleoctet_ignorecase{unpack 'C*', $_} = 1;
3639 }
3640 }
3641 173 my $i = 0;
3642 173 my @singleoctet_ignorecase = ();
3643 173 for my $ord (0 .. 255) {
3644 44288 ▶ if (exists $singleoctet_ignorecase{$ord}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $singleoctet_ignorecase{$ord}) { } 2822 41466 44288
3645 2822 push @{$singleoctet_ignorecase[$i]}, $ord;
3646 }
3647 else {
3648 41466 $i++;
3649 }
3650 }
3651 173 @singleoctet = ();
3652 173 for my $range (@singleoctet_ignorecase) {
3653 15552 ▶ if (ref $range) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $range) 274 15278 15552
3654 274 ▶ if (scalar(@{$range}) == 1) {
Branch: 2 branches
BranchTrueFalseTotal
if (scalar @{$range;} == 1) { } 0 274 274
elsif (scalar @{$range;} == 2) { } 0 274 274
3655 0 push @singleoctet, sprintf('\x%02X', @{$range}[0]);
3656 }
3657 274 elsif (scalar(@{$range}) == 2) {
3658 0 push @singleoctet, sprintf('\x%02X\x%02X', @{$range}[0], @{$range}[-1]);
3659 }
3660 else {
3661 274 push @singleoctet, sprintf('\x%02X-\x%02X', @{$range}[0], @{$range}[-1]);
3662 }
3663 }
3664 }
3665 }
3666  
3667 # return character list
3668 329 ▶ if (scalar(@multipleoctet) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @multipleoctet >= 1) { } 174 155 329
3669 174 ▶ if (scalar(@singleoctet) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @singleoctet >= 1) { } 100 74 174
3670  
3671 # any character other than multiple-octet and single octet character class
3672 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])';
3673 }
3674 else {
3675  
3676 # any character other than multiple-octet character class
3677 74 return '(?!' . join('|', @multipleoctet) . ")(?:$your_char)";
3678 }
3679 }
3680 else {
3681 155 ▶ if (scalar(@singleoctet) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @singleoctet >= 1) { } 155 0 155
3682  
3683 # any character other than single octet character class
3684 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])';
3685 }
3686 else {
3687  
3688 # any character
3689 0 return "(?:$your_char)";
3690 }
3691 }
3692 }
3693  
3694 #
3695 # open file in read mode
3696 #
3697 631 ▶sub _open_r {
Subroutine _open_r: called CC=1 SCAR=0.0
3698 631 my(undef,$file) = @_;
3699 631 ▶ use Fcntl qw(O_RDONLY);
Subroutine BEGIN: called CC=1 SCAR=0.0
3700 631 return CORE::sysopen($_[0], $file, &O_RDONLY);
3701 }
3702  
3703 #
3704 # open file in append mode
3705 #
3706 316 ▶sub _open_a {
Subroutine _open_a: called CC=1 SCAR=0.0
3707 316 my(undef,$file) = @_;
3708 631 ▶ use Fcntl qw(O_WRONLY O_APPEND O_CREAT);
Subroutine BEGIN: called CC=1 SCAR=0.0
3709 316 return CORE::sysopen($_[0], $file, &O_WRONLY|&O_APPEND|&O_CREAT);
3710 }
3711  
3712 #
3713 # safe system
3714 #
3715 315 ▶sub _systemx {
Subroutine _systemx: called CC=1 SCAR=0.0
3716  
3717 # P.707 29.2.33. exec
3718 # in Chapter 29: Functions
3719 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
3720 #
3721 # Be aware that in older releases of Perl, exec (and system) did not flush
3722 # your output buffer, so you needed to enable command buffering by setting $|
3723 # on one or more filehandles to avoid lost output in the case of exec, or
3724 # misordererd output in the case of system. This situation was largely remedied
3725 # in the 5.6 release of Perl. (So, 5.005 release not yet.)
3726  
3727 # P.855 exec
3728 # in Chapter 27: Functions
3729 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
3730 #
3731 # In very old release of Perl (before v5.6), exec (and system) did not flush
3732 # your output buffer, so you needed to enable command buffering by setting $|
3733 # on one or more filehandles to avoid lost output with exec or misordered
3734 # output with system.
3735  
3736 315 $| = 1;
3737  
3738 # P.565 23.1.2. Cleaning Up Your Environment
3739 # in Chapter 23: Security
3740 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
3741  
3742 # P.656 Cleaning Up Your Environment
3743 # in Chapter 20: Security
3744 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
3745  
3746 # local $ENV{'PATH'} = '.';
3747 315 local @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # Make %ENV safer
3748  
3749 # P.707 29.2.33. exec
3750 # in Chapter 29: Functions
3751 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
3752 #
3753 # As we mentioned earlier, exec treats a discrete list of arguments as an
3754 # indication that it should bypass shell processing. However, there is one
3755 # place where you might still get tripped up. The exec call (and system, too)
3756 # will not distinguish between a single scalar argument and an array containing
3757 # only one element.
3758 #
3759 # @args = ("echo surprise"); # just one element in list
3760 # exec @args # still subject to shell escapes
3761 # or die "exec: $!"; # because @args == 1
3762 #
3763 # To avoid this, you can use the PATHNAME syntax, explicitly duplicating the
3764 # first argument as the pathname, which forces the rest of the arguments to be
3765 # interpreted as a list, even if there is only one of them:
3766 #
3767 # exec { $args[0] } @args # safe even with one-argument list
3768 # or die "can't exec @args: $!";
3769  
3770 # P.855 exec
3771 # in Chapter 27: Functions
3772 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
3773 #
3774 # As we mentioned earlier, exec treats a discrete list of arguments as a
3775 # directive to bypass shell processing. However, there is one place where
3776 # you might still get tripped up. The exec call (and system, too) cannot
3777 # distinguish between a single scalar argument and an array containing
3778 # only one element.
3779 #
3780 # @args = ("echo surprise"); # just one element in list
3781 # exec @args # still subject to shell escapes
3782 # || die "exec: $!"; # because @args == 1
3783 #
3784 # To avoid this, use the PATHNAME syntax, explicitly duplicating the first
3785 # argument as the pathname, which forces the rest of the arguments to be
3786 # interpreted as a list, even if there is only one of them:
3787 #
3788 # exec { $args[0] } @args # safe even with one-argument list
3789 # || die "can't exec @args: $!";
3790  
3791 315 return CORE::system { $_[0] } @_; # safe even with one-argument list
3792 }
3793  
3794 #
3795 # UTF-8 order to character (with parameter)
3796 #
3797 3469 ▶sub Eutf2::chr(;$) {
Subroutine chr: called CC=4 SCAR=13.9
Pod undocumented
3798  
3799 3469 ▶ my $c = @_ ? $_[0] : $_;
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 3469 0 3469
3800  
3801 3469 ▶ if ($c == 0x00) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c == 0) { } 24 3445 3469
3802 24 return "\x00";
3803 }
3804 else {
3805 3445 my @chr = ();
3806 3445 ▶ while ($c > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c > 0) 3445 3445 6890
3807 3445 unshift @chr, ($c % 0x100);
3808 3445 $c = int($c / 0x100);
3809 }
3810 3445 return pack 'C*', @chr;
3811 }
3812 }
3813  
3814 #
3815 # UTF-8 order to character (without parameter)
3816 #
3817 0 ▶sub Eutf2::chr_() {
Subroutine chr_: not called CC=3 SCAR=24.8
Pod undocumented
3818  
3819 0 my $c = $_;
3820  
3821 0 ▶ if ($c == 0x00) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c == 0) { } 0 0 0
3822 0 return "\x00";
3823 }
3824 else {
3825 0 my @chr = ();
3826 0 ▶ while ($c > 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($c > 0) 0 0 0
3827 0 unshift @chr, ($c % 0x100);
3828 0 $c = int($c / 0x100);
3829 }
3830 0 return pack 'C*', @chr;
3831 }
3832 }
3833  
3834 #
3835 # UTF-8 path globbing (with parameter)
3836 #
3837 0 ▶sub Eutf2::glob($) {
Subroutine glob: not called CC=3 SCAR=24.8
Pod undocumented
3838  
3839 0 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 0 0 0
3840 0 my @glob = _DOS_like_glob(@_);
3841 0 for my $glob (@glob) {
3842 0 $glob =~ s{ \A (?:\./)+ }{}oxms;
3843 }
3844 0 return @glob;
3845 }
3846 else {
3847 0 my $glob = _DOS_like_glob(@_);
3848 0 $glob =~ s{ \A (?:\./)+ }{}oxms;
3849 0 return $glob;
3850 }
3851 }
3852  
3853 #
3854 # UTF-8 path globbing (without parameter)
3855 #
3856 0 ▶sub Eutf2::glob_() {
Subroutine glob_: not called CC=3 SCAR=24.8
Pod undocumented
3857  
3858 0 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 0 0 0
3859 0 my @glob = _DOS_like_glob();
3860 0 for my $glob (@glob) {
3861 0 $glob =~ s{ \A (?:\./)+ }{}oxms;
3862 }
3863 0 return @glob;
3864 }
3865 else {
3866 0 my $glob = _DOS_like_glob();
3867 0 $glob =~ s{ \A (?:\./)+ }{}oxms;
3868 0 return $glob;
3869 }
3870 }
3871  
3872 #
3873 # UTF-8 path globbing via File::DosGlob 1.10
3874 #
3875 # Often I confuse "_dosglob" and "_doglob".
3876 # So, I renamed "_dosglob" to "_DOS_like_glob".
3877 #
3878 631 my %iter;
3879 my %entries;
3880 0 ▶sub _DOS_like_glob {
Subroutine _DOS_like_glob: not called CC=10 SCAR=47.0
3881  
3882 # context (keyed by second cxix argument provided by core)
3883 0 my($expr,$cxix) = @_;
3884  
3885 # glob without args defaults to $_
3886 0 ▶ $expr = $_ if not defined $expr;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $expr 0 0 0
3887  
3888 # represents the current user's home directory
3889 #
3890 # 7.3. Expanding Tildes in Filenames
3891 # in Chapter 7. File Access
3892 # of ISBN 0-596-00313-7 Perl Cookbook, 2nd Edition.
3893 #
3894 # and File::HomeDir, File::HomeDir::Windows module
3895  
3896 # DOS-like system
3897 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
3898 0 $expr =~ s{ \A ~ (?= [^/\\] ) }
3899 0 { my_home_MSWin32() }oxmse;
3900 }
3901  
3902 # UNIX-like system
3903 else {
3904 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])* ) }
3905 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
3906 }
3907  
3908 # assume global context if not provided one
3909 0 ▶ $cxix = '_G_' if not defined $cxix;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $cxix 0 0 0
3910 0 ▶ $iter{$cxix} = 0 if not exists $iter{$cxix};
Branch: 1 branch
BranchTrueFalseTotal
unless exists $iter{$cxix} 0 0 0
3911  
3912 # if we're just beginning, do it all first
3913 0 ▶ if ($iter{$cxix} == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if ($iter{$cxix} == 0) 0 0 0
3914 0 $entries{$cxix} = [ _do_glob(1, _parse_line($expr)) ];
3915 }
3916  
3917 # chuck it all out, quick or slow
3918 0 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 0 0 0
3919 0 delete $iter{$cxix};
3920 0 return @{delete $entries{$cxix}};
3921 }
3922 else {
3923 0 ▶ if ($iter{$cxix} = scalar @{$entries{$cxix}}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($iter{$cxix} = scalar @{$entries{$cxix};}) { } 0 0 0
3924 0 return shift @{$entries{$cxix}};
3925 }
3926 else {
3927 # return undef for EOL
3928 0 delete $iter{$cxix};
3929 0 delete $entries{$cxix};
3930 0 return undef;
3931 }
3932 }
3933 }
3934  
3935 #
3936 # UTF-8 path globbing subroutine
3937 #
3938 0 ▶sub _do_glob {
Subroutine _do_glob: not called CC=44 SCAR=75.9
3939  
3940 0 my($cond,@expr) = @_;
3941 0 my @glob = ();
3942 0 my $fix_drive_relative_paths = 0;
3943  
3944 OUTER:
3945 0 for my $expr (@expr) {
3946 0 ▶ next OUTER if not defined $expr;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $expr 0 0 0
3947 0 ▶ next OUTER if $expr eq '';
Branch: 1 branch
BranchTrueFalseTotal
if $expr eq "" 0 0 0
3948  
3949 0 my @matched = ();
3950 0 my @globdir = ();
3951 0 my $head = '.';
3952 0 my $pathsep = '/';
3953 0 my $tail;
3954  
3955 # if argument is within quotes strip em and do no globbing
3956 0 ▶ if ($expr =~ /\A " ((?:$q_char)*?) " \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($expr =~ /\A " ((?:$Eutf2::q_char)*?) " \z/mosx) 0 0 0
3957 0 $expr = $1;
3958 0 ▶ if ($cond eq 'd') {
Branch: 1 branch
BranchTrueFalseTotal
if ($cond eq 'd') { } 0 0 0
3959 0 ▶ if (-d $expr) {
Branch: 1 branch
BranchTrueFalseTotal
if (-d $expr) 0 0 0
3960 0 push @glob, $expr;
3961 }
3962 }
3963 else {
3964 0 ▶ if (-e $expr) {
Branch: 1 branch
BranchTrueFalseTotal
if (-e $expr) 0 0 0
3965 0 push @glob, $expr;
3966 }
3967 }
3968 0 next OUTER;
3969 }
3970  
3971 # wildcards with a drive prefix such as h:*.pm must be changed
3972 # to h:./*.pm to expand correctly
3973 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
3974 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
3975 0 $fix_drive_relative_paths = 1;
3976 }
3977 }
3978  
3979 0 ▶ if (($head, $tail) = _parse_path($expr,$pathsep)) {
Branch: 1 branch
BranchTrueFalseTotal
if (($head, $tail) = _parse_path($expr, $pathsep)) 0 0 0
3980 0 ▶ if ($tail eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($tail eq "") 0 0 0
3981 0 push @glob, $expr;
3982 0 next OUTER;
3983 }
3984 0 ▶ if ($head =~ / \A (?:$q_char)*? [*?] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($head =~ / \A (?:$Eutf2::q_char)*? [*?] /mosx) 0 0 0
3985 0 ▶ if (@globdir = _do_glob('d', $head)) {
Branch: 1 branch
BranchTrueFalseTotal
if (@globdir = _do_glob("d", $head)) 0 0 0
3986 0 push @glob, _do_glob($cond, map {"$_$pathsep$tail"} @globdir);
3987 0 next OUTER;
3988 }
3989 }
3990 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
3991 0 $head .= $pathsep;
3992 }
3993 0 $expr = $tail;
3994 }
3995  
3996 # If file component has no wildcards, we can avoid opendir
3997 0 ▶ if ($expr !~ / \A (?:$q_char)*? [*?] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($expr =~ / \A (?:$Eutf2::q_char)*? [*?] /mosx) 0 0 0
3998 0 ▶ if ($head eq '.') {
Branch: 1 branch
BranchTrueFalseTotal
if ($head eq ".") 0 0 0
3999 0 $head = '';
4000 }
4001 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
4002 0 $head .= $pathsep;
4003 }
4004 0 $head .= $expr;
4005 0 ▶ if ($cond eq 'd') {
Branch: 1 branch
BranchTrueFalseTotal
if ($cond eq 'd') { } 0 0 0
4006 0 ▶ if (-d $head) {
Branch: 1 branch
BranchTrueFalseTotal
if (-d $head) 0 0 0
4007 0 push @glob, $head;
4008 }
4009 }
4010 else {
4011 0 ▶ if (-e $head) {
Branch: 1 branch
BranchTrueFalseTotal
if (-e $head) 0 0 0
4012 0 push @glob, $head;
4013 }
4014 }
4015 0 next OUTER;
4016 }
4017 0 ▶ opendir(*DIR, $head) or next OUTER;
Branch: 1 branch
BranchTrueFalseTotal
opendir *DIR, $head or next OUTER 0 0 0
4018 0 my @leaf = readdir DIR;
4019 0 closedir DIR;
4020  
4021 0 ▶ if ($head eq '.') {
Branch: 1 branch
BranchTrueFalseTotal
if ($head eq ".") 0 0 0
4022 0 $head = '';
4023 }
4024 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
4025 0 $head .= $pathsep;
4026 }
4027  
4028 0 my $pattern = '';
4029 0 ▶ while ($expr =~ / \G ($q_char) /oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
if ($expr =~ / \G ($Eutf2::q_char) /cgox) 0 0 0
4030 0 my $char = $1;
4031  
4032 # 6.9. Matching Shell Globs as Regular Expressions
4033 # in Chapter 6. Pattern Matching
4034 # of ISBN 0-596-00313-7 Perl Cookbook, 2nd Edition.
4035 # (and so on)
4036  
4037 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
4038 0 $pattern .= "(?:$your_char)*",
4039 }
4040 elsif ($char eq '?') {
4041 0 $pattern .= "(?:$your_char)?", # DOS style
4042 # $pattern .= "(?:$your_char)", # UNIX style
4043 }
4044 elsif ((my $fc = Eutf2::fc($char)) ne $char) {
4045 0 $pattern .= $fc;
4046 }
4047 else {
4048 0 $pattern .= quotemeta $char;
4049 }
4050 }
4051 0 ▶ my $matchsub = sub { Eutf2::fc($_[0]) =~ /\A $pattern \z/xms };
Subroutine __ANON__: not called CC=1 SCAR=6.9
4052  
4053 # if ($@) {
4054 # print STDERR "$0: $@\n";
4055 # next OUTER;
4056 # }
4057  
4058 INNER:
4059 0 for my $leaf (@leaf) {
4060 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
4061 0 next INNER;
4062 }
4063 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
4064 0 next INNER;
4065 }
4066  
4067 0 ▶ if (&$matchsub($leaf)) {
Branch: 1 branch
BranchTrueFalseTotal
if (&$matchsub($leaf)) 0 0 0
4068 0 push @matched, "$head$leaf";
4069 0 next INNER;
4070 }
4071  
4072 # [DOS compatibility special case]
4073 # Failed, add a trailing dot and try again, but only...
4074  
4075 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
4076 CORE::length($leaf) <= 8 and # name is shorter than or equal to 8 chars *and*
4077 Eutf2::index($pattern,'\\.') != -1 # pattern has a dot.
4078 ) {
4079 0 ▶ if (&$matchsub("$leaf.")) {
Branch: 1 branch
BranchTrueFalseTotal
if (&$matchsub("$leaf.")) 0 0 0
4080 0 push @matched, "$head$leaf";
4081 0 next INNER;
4082 }
4083 }
4084 }
4085 0 ▶ if (@matched) {
Branch: 1 branch
BranchTrueFalseTotal
if (@matched) 0 0 0
4086 0 push @glob, @matched;
4087 }
4088 }
4089 0 ▶ if ($fix_drive_relative_paths) {
Branch: 1 branch
BranchTrueFalseTotal
if ($fix_drive_relative_paths) 0 0 0
4090 0 for my $glob (@glob) {
4091 0 $glob =~ s# \A ([A-Za-z]:) \./ #$1#oxms;
4092 }
4093 }
4094 0 return @glob;
4095 }
4096  
4097 #
4098 # UTF-8 parse line
4099 #
4100 0 ▶sub _parse_line {
Subroutine _parse_line: not called CC=3 SCAR=24.8
4101  
4102 0 my($line) = @_;
4103  
4104 0 $line .= ' ';
4105 0 my @piece = ();
4106 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
4107 " ( (?>(?: [^\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+) |
4108 ( (?>(?: [^\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+)
4109 /oxmsg
4110 ) {
4111 0 ▶ push @piece, defined($1) ? $1 : $2;
Branch: 1 branch
BranchTrueFalseTotal
defined $1 ? : 0 0 0
4112 }
4113 0 return @piece;
4114 }
4115  
4116 #
4117 # UTF-8 parse path
4118 #
4119 0 ▶sub _parse_path {
Subroutine _parse_path: not called CC=2 SCAR=17.9
4120  
4121 0 my($path,$pathsep) = @_;
4122  
4123 0 $path .= '/';
4124 0 my @subpath = ();
4125 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
4126 ((?: [^\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] )+?) [\/\\]
4127 /oxmsg
4128 ) {
4129 0 push @subpath, $1;
4130 }
4131  
4132 0 my $tail = pop @subpath;
4133 0 my $head = join $pathsep, @subpath;
4134 0 return $head, $tail;
4135 }
4136  
4137 #
4138 # via File::HomeDir::Windows 1.00
4139 #
4140 0 ▶sub my_home_MSWin32 {
Subroutine my_home_MSWin32: not called CC=9 SCAR=45.0
Pod undocumented
4141  
4142 # A lot of unix people and unix-derived tools rely on
4143 # the ability to overload HOME. We will support it too
4144 # so that they can replace raw HOME calls with File::HomeDir.
4145 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
4146 0 return $ENV{'HOME'};
4147 }
4148  
4149 # Do we have a user profile?
4150 ▶ 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
4151 0 return $ENV{'USERPROFILE'};
4152 }
4153  
4154 # Some Windows use something like $ENV{'HOME'}
4155 ▶ 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
4156 0 return join '', $ENV{'HOMEDRIVE'}, $ENV{'HOMEPATH'};
4157 }
4158  
4159 0 return undef;
4160 }
4161  
4162 #
4163 # via File::HomeDir::Unix 1.00
4164 #
4165 0 ▶sub my_home {
Subroutine my_home: not called CC=7 SCAR=40.3
Pod undocumented
4166 0 my $home;
4167  
4168 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
4169 0 $home = $ENV{'HOME'};
4170 }
4171  
4172 # This is from the original code, but I'm guessing
4173 # it means "login directory" and exists on some Unixes.
4174 ▶ 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
4175 0 $home = $ENV{'LOGDIR'};
4176 }
4177  
4178 ### More-desperate methods
4179  
4180 # Light desperation on any (Unixish) platform
4181 else {
4182 0 $home = CORE::eval q{ (getpwuid($<))[7] };
4183 }
4184  
4185 # On Unix in general, a non-existant home means "no home"
4186 # For example, "nobody"-like users might use /nonexistant
4187 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
4188 0 $home = undef;
4189 }
4190 0 return $home;
4191 }
4192  
4193 #
4194 # ${^PREMATCH}, $PREMATCH, $` the string preceding what was matched
4195 #
4196 56 ▶sub Eutf2::PREMATCH {
Subroutine PREMATCH: called CC=1 SCAR=0.0
Pod undocumented
4197 56 return $`;
4198 }
4199  
4200 #
4201 # ${^MATCH}, $MATCH, $& the string that matched
4202 #
4203 81 ▶sub Eutf2::MATCH {
Subroutine MATCH: called CC=1 SCAR=0.0
Pod undocumented
4204 81 return $&;
4205 }
4206  
4207 #
4208 # ${^POSTMATCH}, $POSTMATCH, $' the string following what was matched
4209 #
4210 42 ▶sub Eutf2::POSTMATCH {
Subroutine POSTMATCH: called CC=1 SCAR=0.0
Pod undocumented
4211 42 return $';
4212 }
4213  
4214 #
4215 # UTF-8 character to order (with parameter)
4216 #
4217 4 ▶sub UTF2::ord(;$) {
Subroutine ord: called CC=4 SCAR=14.0
4218  
4219 4 ▶ local $_ = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 2 2 4
4220  
4221 4 ▶ if (/\A ($q_char) /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\A ($Eutf2::q_char) /mosx) { } 4 0 4
4222 4 my @ord = unpack 'C*', $1;
4223 4 my $ord = 0;
4224 4 ▶ while (my $o = shift @ord) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $o = shift @ord) 12 4 16
4225 12 $ord = $ord * 0x100 + $o;
4226 }
4227 4 return $ord;
4228 }
4229 else {
4230 0 return CORE::ord $_;
4231 }
4232 }
4233  
4234 #
4235 # UTF-8 character to order (without parameter)
4236 #
4237 0 ▶sub UTF2::ord_() {
Subroutine ord_: not called CC=3 SCAR=24.8
4238  
4239 0 ▶ if (/\A ($q_char) /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\A ($Eutf2::q_char) /mosx) { } 0 0 0
4240 0 my @ord = unpack 'C*', $1;
4241 0 my $ord = 0;
4242 0 ▶ while (my $o = shift @ord) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $o = shift @ord) 0 0 0
4243 0 $ord = $ord * 0x100 + $o;
4244 }
4245 0 return $ord;
4246 }
4247 else {
4248 0 return CORE::ord $_;
4249 }
4250 }
4251  
4252 #
4253 # UTF-8 reverse
4254 #
4255 4 ▶sub UTF2::reverse(@) {
Subroutine reverse: called CC=2 SCAR=6.9
4256  
4257 4 ▶ if (wantarray) {
Branch: 1 branch
BranchTrueFalseTotal
if (wantarray) { } 2 2 4
4258 2 return CORE::reverse @_;
4259 }
4260 else {
4261  
4262 # One of us once cornered Larry in an elevator and asked him what
4263 # problem he was solving with this, but he looked as far off into
4264 # the distance as he could in an elevator and said, "It seemed like
4265 # a good idea at the time."
4266  
4267 2 return join '', CORE::reverse(join('',@_) =~ /\G ($q_char) /oxmsg);
4268 }
4269 }
4270  
4271 #
4272 # UTF-8 getc (with parameter, without parameter)
4273 #
4274 56 ▶sub UTF2::getc(;*@) {
Subroutine getc: called CC=9 SCAR=24.8
4275  
4276 56 my($package) = caller;
4277 56 ▶ my $fh = @_ ? qualify_to_ref(shift,$package) : \*STDIN;
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 56 0 56
4278 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
4279  
4280 56 my @length = sort { $a <=> $b } keys %range_tr;
4281 56 my $getc = '';
4282 56 for my $length ($length[0] .. $length[-1]) {
4283 120 $getc .= CORE::getc($fh);
4284 120 ▶ if (exists $range_tr{CORE::length($getc)}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $range_tr{length $getc}) 120 0 120
4285 120 ▶ if ($getc =~ /\A ${Eutf2::dot_s} \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($getc =~ /\A $Eutf2::dot_s \z/mosx) 56 64 120
4286 56 ▶ return wantarray ? ($getc,@_) : $getc;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 56 56
4287 }
4288 }
4289 }
4290 0 ▶ return wantarray ? ($getc,@_) : $getc;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
4291 }
4292  
4293 #
4294 # UTF-8 length by character
4295 #
4296 5 ▶sub UTF2::length(;$) {
Subroutine length: called CC=2 SCAR=7.1
4297  
4298 5 ▶ local $_ = shift if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 5 0 5
4299  
4300 5 local @_ = /\G ($q_char) /oxmsg;
4301 5 return scalar @_;
4302 }
4303  
4304 #
4305 # UTF-8 substr by character
4306 #
4307 631 ▶BEGIN {
Subroutine BEGIN: called CC=2 SCAR=6.9
4308  
4309 # P.232 The lvalue Attribute
4310 # in Chapter 6: Subroutines
4311 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
4312  
4313 # P.336 The lvalue Attribute
4314 # in Chapter 7: Subroutines
4315 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
4316  
4317 # P.144 8.4 Lvalue subroutines
4318 # in Chapter 8: perlsub: Perl subroutines
4319 # of ISBN-13: 978-1-906966-02-7 The Perl Language Reference Manual (for Perl version 5.12.1)
4320  
4321 0 ▶ CORE::eval sprintf(<<'END', ($] >= 5.014000) ? ':lvalue' : '');
Subroutine __ANON__: not called CC=1 SCAR=0.0
Subroutine __ANON__: not called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
Subroutine __ANON__: not called CC=1 SCAR=0.0
Subroutine substr: called CC=11 SCAR=24.0
Branch: 10 branches
BranchTrueFalseTotal
$] >= 5.014 ? : 631 0 631
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
4322 # vv----------------------*******
4323 sub UTF2::substr($$;$$) %s {
4324  
4325 my @char = $_[0] =~ /\G (?>$q_char) /oxmsg;
4326  
4327 # If the substring is beyond either end of the string, substr() returns the undefined
4328 # value and produces a warning. When used as an lvalue, specifying a substring that
4329 # is entirely outside the string raises an exception.
4330 # http://perldoc.perl.org/functions/substr.html
4331  
4332 # A return with no argument returns the scalar value undef in scalar context,
4333 # an empty list () in list context, and (naturally) nothing at all in void
4334 # context.
4335  
4336 my $offset = $_[1];
4337 if (($offset > scalar(@char)) or ($offset < (-1 * scalar(@char)))) {
4338 return;
4339 }
4340  
4341 # substr($string,$offset,$length,$replacement)
4342 if (@_ == 4) {
4343 my(undef,undef,$length,$replacement) = @_;
4344 my $substr = join '', splice(@char, $offset, $length, $replacement);
4345 $_[0] = join '', @char;
4346  
4347 # return $substr; this doesn't work, don't say "return"
4348 $substr;
4349 }
4350  
4351 # substr($string,$offset,$length)
4352 elsif (@_ == 3) {
4353 my(undef,undef,$length) = @_;
4354 my $octet_offset = 0;
4355 my $octet_length = 0;
4356 if ($offset == 0) {
4357 $octet_offset = 0;
4358 }
4359 elsif ($offset > 0) {
4360 local $SIG{__WARN__} = sub {}; # avoid: Use of uninitialized value in join or string at here
4361 $octet_offset = CORE::length(join '', @char[0..$offset-1]);
4362 }
4363 else {
4364 local $SIG{__WARN__} = sub {}; # avoid: Use of uninitialized value in join or string at here
4365 $octet_offset = -1 * CORE::length(join '', @char[$#char+$offset+1..$#char]);
4366 }
4367 if ($length == 0) {
4368 $octet_length = 0;
4369 }
4370 elsif ($length > 0) {
4371 local $SIG{__WARN__} = sub {}; # avoid: Use of uninitialized value in join or string at here
4372 $octet_length = CORE::length(join '', @char[$offset..$offset+$length-1]);
4373 }
4374 else {
4375 local $SIG{__WARN__} = sub {}; # avoid: Use of uninitialized value in join or string at here
4376 $octet_length = -1 * CORE::length(join '', @char[$#char+$length+1..$#char]);
4377 }
4378 CORE::substr($_[0], $octet_offset, $octet_length);
4379 }
4380  
4381 # substr($string,$offset)
4382 else {
4383 my $octet_offset = 0;
4384 if ($offset == 0) {
4385 $octet_offset = 0;
4386 }
4387 elsif ($offset > 0) {
4388 $octet_offset = CORE::length(join '', @char[0..$offset-1]);
4389 }
4390 else {
4391 $octet_offset = -1 * CORE::length(join '', @char[$#char+$offset+1..$#char]);
4392 }
4393 CORE::substr($_[0], $octet_offset);
4394 }
4395 }
4396 END
4397 }
4398  
4399 #
4400 # UTF-8 index by character
4401 #
4402 2 ▶sub UTF2::index($$;$) {
Subroutine index: called CC=3 SCAR=11.2
4403  
4404 2 my $index;
4405 2 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 1 1 2
4406 1 $index = Eutf2::index($_[0], $_[1], CORE::length(UTF2::substr($_[0], 0, $_[2])));
4407 }
4408 else {
4409 1 $index = Eutf2::index($_[0], $_[1]);
4410 }
4411  
4412 2 ▶ if ($index == -1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($index == -1) { } 0 2 2
4413 0 return -1;
4414 }
4415 else {
4416 2 return UTF2::length(CORE::substr $_[0], 0, $index);
4417 }
4418 }
4419  
4420 #
4421 # UTF-8 rindex by character
4422 #
4423 2 ▶sub UTF2::rindex($$;$) {
Subroutine rindex: called CC=3 SCAR=11.2
4424  
4425 2 my $rindex;
4426 2 ▶ if (@_ == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_ == 3) { } 1 1 2
4427 1 $rindex = Eutf2::rindex($_[0], $_[1], CORE::length(UTF2::substr($_[0], 0, $_[2])));
4428 }
4429 else {
4430 1 $rindex = Eutf2::rindex($_[0], $_[1]);
4431 }
4432  
4433 2 ▶ if ($rindex == -1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($rindex == -1) { } 0 2 2
4434 0 return -1;
4435 }
4436 else {
4437 2 return UTF2::length(CORE::substr $_[0], 0, $rindex);
4438 }
4439 }
4440  
4441 # when 'm//', '/' means regexp match 'm//' and '?' means regexp match '??'
4442 # when 'div', '/' means division operator and '?' means conditional operator (condition ? then : else)
4443 631 ▶use vars qw($slash); $slash = 'm//';
Subroutine BEGIN: called CC=1 SCAR=0.0
4444  
4445 # ord() to ord() or UTF2::ord()
4446 631 my $function_ord = 'ord';
4447  
4448 # ord to ord or UTF2::ord_
4449 631 my $function_ord_ = 'ord';
4450  
4451 # reverse to reverse or UTF2::reverse
4452 631 my $function_reverse = 'reverse';
4453  
4454 # getc to getc or UTF2::getc
4455 631 my $function_getc = 'getc';
4456  
4457 # P.1023 Appendix W.9 Multibyte Anchoring
4458 # of ISBN 1-56592-224-7 CJKV Information Processing
4459  
4460 631 my $anchor = '';
4461  
4462 631 ▶use vars qw($nest);
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
4463  
4464 # regexp of nested parens in qqXX
4465  
4466 # P.340 Matching Nested Constructs with Embedded Code
4467 # in Chapter 7: Perl
4468 # of ISBN 0-596-00289-0 Mastering Regular Expressions, Second edition
4469  
4470 my $qq_paren = 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 631 }xms;
4480  
4481 my $qq_brace = 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 631 }xms;
4491  
4492 my $qq_bracket = 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 631 }xms;
4502  
4503 my $qq_angle = qr{(?{local $nest=0}) (?>(?:
4504 [^\x80-\xFF\\<>] |
4505 \< (?{$nest++}) |
4506 \> (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4507 (?:[\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] |
4508 \\ [^\x80-\xFFc] |
4509 \\c[\x40-\x5F] |
4510 \\ (?:[\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] |
4511 [\x00-\xFF]
4512 631 }xms;
4513  
4514 631 my $qq_scalar = qr{(?: \{ (?:$qq_brace)*? \} |
4515 (?: ::)? (?:
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 631 my $qq_variable = qr{(?: \{ (?:$qq_brace)*? \} |
4523 (?: ::)? (?:
4524 (?>[0-9]+) |
4525 [^\x80-\xFFa-zA-Z_0-9\[\]] |
4526 ^[A-Z] |
4527 (?> [a-zA-Z_][a-zA-Z_0-9]* (?: ::[a-zA-Z_][a-zA-Z_0-9]*)* )
4528 (?>(?: \[ (?: \$\[ | \$\] | $qq_char )*? \] | \{ (?:$qq_brace)*? \} )*)
4529 (?>(?: (?: -> )? (?: [\$\@\%\&\*]\* | \$\#\* | [\@\%]? \[ (?: \$\[ | \$\] | $qq_char )*? \] | [\@\%\*]? \{ (?:$qq_brace)*? \} ) )*)
4530 ))
4531 }xms;
4532  
4533 631 my $qq_substr = qr{(?> Char::substr | UTF2::substr | CORE::substr | substr ) (?>\s*) \( $qq_paren \)
4534 }xms;
4535  
4536 # regexp of nested parens in qXX
4537 my $q_paren = qr{(?{local $nest=0}) (?>(?:
4538 [^\x80-\xFF()] |
4539 (?:[\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] |
4540 \( (?{$nest++}) |
4541 \) (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4542 [\x00-\xFF]
4543 631 }xms;
4544  
4545 my $q_brace = qr{(?{local $nest=0}) (?>(?:
4546 [^\x80-\xFF\{\}] |
4547 (?:[\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] |
4548 \{ (?{$nest++}) |
4549 \} (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4550 [\x00-\xFF]
4551 631 }xms;
4552  
4553 my $q_bracket = qr{(?{local $nest=0}) (?>(?:
4554 [^\x80-\xFF\[\]] |
4555 (?:[\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] |
4556 \[ (?{$nest++}) |
4557 \] (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4558 [\x00-\xFF]
4559 631 }xms;
4560  
4561 my $q_angle = qr{(?{local $nest=0}) (?>(?:
4562 [^\x80-\xFF<>] |
4563 (?:[\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] |
4564 \< (?{$nest++}) |
4565 \> (?(?{$nest>0})(?{$nest--})|(?!)))*) (?(?{$nest!=0})(?!)) |
4566 [\x00-\xFF]
4567 631 }xms;
4568  
4569 631 my $matched = '';
4570 631 my $s_matched = '';
4571  
4572 631 my $tr_variable = ''; # variable of tr///
4573 631 my $sub_variable = ''; # variable of s///
4574 631 my $bind_operator = ''; # =~ or !~
4575  
4576 631 my @heredoc = (); # here document
4577 631 my @heredoc_delimiter = ();
4578 631 my $here_script = ''; # here script
4579  
4580 #
4581 # escape UTF-8 script
4582 #
4583 652 ▶sub UTF2::escape(;$) {
Subroutine escape: called CC=3 SCAR=11.0
4584 652 ▶ local($_) = $_[0] if @_;
Branch: 1 branch
BranchTrueFalseTotal
if @_ 292 360 652
4585  
4586 # P.359 The Study Function
4587 # in Chapter 7: Perl
4588 # of ISBN 0-596-00289-0 Mastering Regular Expressions, Second edition
4589  
4590 652 study $_; # Yes, I studied study yesterday.
4591  
4592 # while all script
4593  
4594 # 6.14. Matching from Where the Last Pattern Left Off
4595 # in Chapter 6. Pattern Matching
4596 # of ISBN 0-596-00313-7 Perl Cookbook, 2nd Edition.
4597 # (and so on)
4598  
4599 # one member of Tag-team
4600 #
4601 # P.128 Start of match (or end of previous match): \G
4602 # P.130 Advanced Use of \G with Perl
4603 # in Chapter 3: Overview of Regular Expression Features and Flavors
4604 # P.255 Use leading anchors
4605 # P.256 Expose ^ and \G at the front expressions
4606 # in Chapter 6: Crafting an Efficient Expression
4607 # P.315 "Tag-team" matching with /gc
4608 # in Chapter 7: Perl
4609 # of ISBN 0-596-00289-0 Mastering Regular Expressions, Second edition
4610  
4611 652 my $e_script = '';
4612 652 ▶ while (not /\G \z/oxgc) { # member
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 146955 651 147606
4613 146955 $e_script .= UTF2::escape_token();
4614 }
4615  
4616 651 return $e_script;
4617 }
4618  
4619 #
4620 # escape UTF-8 token of script
4621 #
4622 146955 ▶sub UTF2::escape_token {
Subroutine escape_token: called CC=504 SCAR=106.0
4623  
4624 # \n output here document
4625  
4626 146955 my $ignore_modules = join('|', qw(
4627 utf8
4628 bytes
4629 charnames
4630 I18N::Japanese
4631 I18N::Collate
4632 I18N::JExt
4633 File::DosGlob
4634 Wild
4635 Wildcard
4636 Japanese
4637 ));
4638  
4639 # another member of Tag-team
4640 #
4641 # P.315 "Tag-team" matching with /gc
4642 # in Chapter 7: Perl
4643 # of ISBN 0-596-00289-0 Mastering Regular Expressions, Second edition
4644  
4645 146955 ▶ if (/\G ( \n ) /oxgc) { # another member (and so on)
Branch: 139 branches
BranchTrueFalseTotal
if (/\G ( \n ) /cgox) { } 22441 124514 146955
elsif (/\G ((?>\s+)|\#.*) /cgox) { } 39434 85080 124514
elsif (/\G ( (?: if | elsif | unless | while | until | given | when ) (?>\s*) \( ) /cgox) { } 2641 82439 85080
elsif (/\G ( \( (?>\s*) (?: local \b | my \b | our \b | state \b )? (?>\s*) \$ $qq_scalar ) /cgox) { } 143 82296 82439
elsif (/\G ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH \b | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) /cgmosx) { } 4 82292 82296
elsif (/\G ( \$& | \$\{&\} | \$ (?>\s*) MATCH \b | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) /cgmosx) { } 28 82264 82292
elsif (/\G ( \$' | \$\{'\} ) /cgmosx) { } 1 82263 82264
elsif (/\G ( \$ (?>\s*) POSTMATCH \b | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) /cgmosx) { } 3 82260 82263
elsif (/\G ( \$ $qq_scalar | $qq_substr ) /cgox) { } 2411 79849 82260
elsif (/\G ( [,;] ) /cgox) { } 9298 70551 79849
elsif (/\G ( \{ (?>\s*) (?: tr | index | rindex | reverse ) (?>\s*) \} ) /cgmosx) { } 0 70551 70551
elsif (/\G ( \$ 0 ) /cgmosx) { } 2 70549 70551
elsif (/\G ( \$ \{ (?>\s*) 0 (?>\s*) \} ) /cgmosx) { } 0 70549 70549
elsif (/\G ( \$ \$ ) (?![\w\{]) /cgmosx) { } 1 70548 70549
elsif (/\G \$ ((?>[1-9][0-9]*)) /cgmosx) { } 57 70491 70548
elsif (/\G \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} /cgmosx) { } 0 70491 70491
elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ .+? \] ) /cgmosx) { } 0 70491 70491
elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ .+? \} ) /cgmosx) { } 0 70491 70491
elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) /cgmosx) { } 0 70491 70491
elsif (/\G \$ (?>\s*) \{ ( (?>\s*) (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* ) (?>\s*) ) \} /cgmosx) { } 0 70491 70491
elsif (/\G \$ (?>\s*) \{ (?>\s*) ( $qq_brace ) (?>\s*) \} /cgmosx) { } 0 70491 70491
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 70464 70491
elsif (m{\G ( \$[\$\@\#\\\'\"/\?\(\)\[\]\<\>] ) }cgmosx) { } 91 70373 70464
elsif (/\G \b (while (?>\s*) \( (?>\s*) <[\$]?[A-Za-z_][A-Za-z_0-9]*> (?>\s*) \)) \b /cgox) { } 0 70373 70373
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 70373 70373
elsif (/\G \b while (?>\s*) \( (?>\s*) glob (?>\s*) \) /cgox) { } 0 70373 70373
elsif (/\G \b while (?>\s*) \( (?>\s*) glob \b /cgox) { } 0 70373 70373
elsif (/\G \b ( if | unless | while | until | for | when ) \b /cgox) { } 404 69969 70373
elsif (/\G \b (CORE:: | ->(>?\s*) (?: atan2 | [a-z]{2,})) \b /cgox) { } 19 69950 69969
elsif (/\G \b Char::eval (?= (?>\s*) \{ ) /cgox) { } 0 69950 69950
elsif (/\G \b UTF2::eval (?= (?>\s*) \{ ) /cgox) { } 22 69928 69950
elsif (/\G \b Char::eval \b (?! (?>\s*) => ) /cgox) { } 0 69928 69928
elsif (/\G \b UTF2::eval \b (?! (?>\s*) => ) /cgox) { } 168 69760 69928
elsif (/\G \b bytes::substr \b (?! (?>\s*) => ) /cgox) { } 2 69758 69760
elsif (/\G \b chop \b (?! (?>\s*) => ) /cgox) { } 2 69756 69758
elsif (/\G \b bytes::index \b (?! (?>\s*) => ) /cgox) { } 2 69754 69756
elsif (/\G \b Char::index \b (?! (?>\s*) => ) /cgox) { } 0 69754 69754
elsif (/\G \b UTF2::index \b (?! (?>\s*) => ) /cgox) { } 2 69752 69754
elsif (/\G \b index \b (?! (?>\s*) => ) /cgox) { } 2 69750 69752
elsif (/\G \b bytes::rindex \b (?! (?>\s*) => ) /cgox) { } 2 69748 69750
elsif (/\G \b Char::rindex \b (?! (?>\s*) => ) /cgox) { } 0 69748 69748
elsif (/\G \b UTF2::rindex \b (?! (?>\s*) => ) /cgox) { } 2 69746 69748
elsif (/\G \b rindex \b (?! (?>\s*) => ) /cgox) { } 2 69744 69746
elsif (/\G \b lc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 1 69743 69744
elsif (/\G \b lcfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 69743 69743
elsif (/\G \b uc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 69743 69743
elsif (/\G \b ucfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 69743 69743
elsif (/\G \b fc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 7 69736 69743
elsif (/\G -s (?>\s*) (\") ((?:$Eutf2::qq_char)+?) (\") /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) qq (?>\s*) (\#) ((?:$Eutf2::qq_char)+?) (\#) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) qq (?>\s*) (\() ((?:$qq_paren)+?) (\)) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) qq (?>\s*) (\{) ((?:$qq_brace)+?) (\}) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) qq (?>\s*) (\[) ((?:$qq_bracket)+?) (\]) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) qq (?>\s*) (\<) ((?:$qq_angle)+?) (\>) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) qq (?>\s*) (\S) ((?:$Eutf2::qq_char)+?) (\1) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s*) (\') ((?:\\\'|\\\\|$Eutf2::q_char)+?) (\') /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) q (?>\s*) (\#) ((?:\\\#|\\\\|$Eutf2::q_char)+?) (\#) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) q (?>\s*) (\() ((?:\\\)|\\\\|$q_paren)+?) (\)) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) q (?>\s*) (\{) ((?:\\\}|\\\\|$q_brace)+?) (\}) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) q (?>\s*) (\[) ((?:\\\]|\\\\|$q_bracket)+?) (\]) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) q (?>\s*) (\<) ((?:\\\>|\\\\|$q_angle)+?) (\>) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) q (?>\s*) (\S) ((?:\\\1|\\\\|$Eutf2::q_char)+?) (\1) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s*) (\$ (?> \w+ (?: ::\w+)* ) (?: (?: ->)? (?: [\$\@\%\&\*]\* | \$\#\* | \( (?:$qq_paren)*? \) | [\@\%\*]? \{ (?:$qq_brace)+? \} | [\@\%]? \[ (?:$qq_bracket)+? \] ) )*) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s*) \( ((?:$qq_paren)*?) \) /cgox) { } 0 69736 69736
elsif (/\G -s (?= (?>\s+) [a-z]+) /cgox) { } 0 69736 69736
elsif (/\G -s (?>\s+) ((?>\w+)) /cgox) { } 0 69736 69736
elsif (/\G \b bytes::length (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 2 69734 69736
elsif (/\G \b bytes::chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 2 69732 69734
elsif (/\G \b chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 36 69696 69732
elsif (/\G \b bytes::ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 2 69694 69696
elsif (/\G \b ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 2 69692 69694
elsif (/\G \b glob (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /cgox) { } 0 69692 69692
elsif (/\G \b lc \b (?! (?>\s*) => ) /cgox) { } 0 69692 69692
elsif (/\G \b lcfirst \b (?! (?>\s*) => ) /cgox) { } 0 69692 69692
elsif (/\G \b uc \b (?! (?>\s*) => ) /cgox) { } 0 69692 69692
elsif (/\G \b ucfirst \b (?! (?>\s*) => ) /cgox) { } 0 69692 69692
elsif (/\G \b fc \b (?! (?>\s*) => ) /cgox) { } 0 69692 69692
elsif (/\G -s \b (?! (?>\s*) => ) /cgox) { } 0 69692 69692
elsif (/\G \b bytes::length \b (?! (?>\s*) => ) /cgox) { } 0 69692 69692
elsif (/\G \b bytes::chr \b (?! (?>\s*) => ) /cgox) { } 0 69692 69692
elsif (/\G \b chr \b (?! (?>\s*) => ) /cgox) { } 0 69692 69692
elsif (/\G \b bytes::ord \b (?! (?>\s*) => ) /cgox) { } 0 69692 69692
elsif (/\G \b ord \b (?! (?>\s*) => ) /cgox) { } 2 69690 69692
elsif (/\G \b glob \b (?! (?>\s*) => ) /cgox) { } 0 69690 69690
elsif (/\G \b reverse \b (?! (?>\s*) => ) /cgox) { } 4 69686 69690
elsif (/\G \b getc \b (?! (?>\s*) => ) /cgox) { } 8 69678 69686
elsif (/\G \b (split) \b (?! (?>\s*) => ) /cgox) { } 120 69558 69678
elsif (/\G \b ( tr | y ) \b /cgox) { } 12 69546 69558
elsif (/\G \b (qq) \b /cgox) { } 3894 65652 69546
elsif (/\G \b (qr) \b /cgox) { } 36 65616 65652
elsif (/\G \b (qw) \b /cgox) { } 34 65582 65616
elsif (/\G \b (qx) \b /cgox) { } 2 65580 65582
elsif (/\G \b (q) \b /cgox) { } 590 64990 65580
elsif (/\G \b (m) \b /cgox) { } 269 64721 64990
elsif (/\G \b (s) \b /cgox) { } 136 64585 64721
elsif (/\G \b require ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /cgmosx) { } 0 64585 64585
elsif (/\G \b require ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /cgmosx) { } 0 64585 64585
elsif (/\G \b require ((?>\s+) (?:$ignore_modules)) \b /cgmosx) { } 0 64585 64585
elsif (/\G \b use ((?>\s+) strict .*? ;) ([ \t]* [#\n]) /cgmosx) { } 43 64542 64585
elsif (/\G \b use ((?>\s+) strict .*? ;) ([ \t]* [^\x80-\xFF#]) /cgmosx) { } 0 64542 64542
elsif (/\G \b use ((?>\s+) strict) \b /cgmosx) { } 0 64542 64542
elsif (/\G \b use (?>\s+) ((?>([1-9][0-9_]*)(?:\.([0-9_]+))*)) (?>\s*) ; /cgmosx) { } 3 64539 64542
elsif (/\G \b use (?>\s+) ((?>v([0-9][0-9_]*)(?:\.([0-9_]+))*)) (?>\s*) ; /cgmosx) { } 0 64539 64539
elsif (/\G \b use ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /cgmosx) { } 2 64537 64539
elsif (/\G \b use ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /cgmosx) { } 0 64537 64537
elsif (/\G \b use ((?>\s+) (?:$ignore_modules)) \b /cgmosx) { } 0 64537 64537
elsif (/\G \b no ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /cgmosx) { } 0 64537 64537
elsif (/\G \b no ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /cgmosx) { } 0 64537 64537
elsif (/\G \b no ((?>\s+) (?:$ignore_modules)) \b /cgmosx) { } 0 64537 64537
elsif (/\G \b use \b /cgmosx) { } 0 64537 64537
elsif (/\G \b no \b /cgmosx) { } 2 64535 64537
elsif (/\G (?<![\w\$\@\%\&\*]) (\') /cgox) { } 1885 62650 64535
elsif (/\G (\") /cgox) { } 5683 56967 62650
elsif (/\G (\`) /cgox) { } 1 56966 56967
elsif ($Eutf2::slash eq 'm//' and m[\G (/) ]cgox) { } 1299 55667 56966
elsif ($Eutf2::slash eq 'm//' and /\G (\?) /cgox) { } 18 55649 55667
elsif (/\G ( <<>> ) /cgox) { } 0 55649 55649
elsif (/\G ( << (?>\s*) ) (?= [0-9\$\@\&] ) /cgox) { } 0 55649 55649
elsif (/\G ( <<~ [\t ]* '([a-zA-Z_0-9]*)' ) /cgox) { } 6 55643 55649
elsif (/\G ( <<~ \\([a-zA-Z_0-9]+) ) /cgox) { } 3 55640 55643
elsif (/\G ( <<~ [\t ]* "([a-zA-Z_0-9]*)" ) /cgox) { } 6 55634 55640
elsif (/\G ( <<~ ([a-zA-Z_0-9]+) ) /cgox) { } 3 55631 55634
elsif (/\G ( <<~ [\t ]* `([a-zA-Z_0-9]*)` ) /cgox) { } 6 55625 55631
elsif (/\G ( << '([a-zA-Z_0-9]*)' ) /cgox) { } 80 55545 55625
elsif (/\G ( << \\([a-zA-Z_0-9]+) ) /cgox) { } 2 55543 55545
elsif (/\G ( << "([a-zA-Z_0-9]*)" ) /cgox) { } 39 55504 55543
elsif (/\G ( << ([a-zA-Z_0-9]+) ) /cgox) { } 54 55450 55504
elsif (/\G ( << `([a-zA-Z_0-9]*)` ) /cgox) { } 0 55450 55450
elsif (/\G ( <<= | <=> | <= | < ) (?= (?>\s*) [A-Za-z_0-9'"`\$\@\&\*\(\+\-] )/cgox) { } 12 55438 55450
elsif (/\G (<[\$]?[A-Za-z_][A-Za-z_0-9]*>) /cgox) { } 0 55438 55438
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 55438 55438
elsif (/\G ^ ( __DATA__ \n .*) \z /cgmosx) { } 0 55438 55438
elsif (/\G ^ ( __END__ \n .*) \z /cgmosx) { } 312 55126 55438
elsif (/\G ( \cD .*) \z /cgmosx) { } 0 55126 55126
elsif (/\G ( \cZ .*) \z /cgmosx) { } 0 55126 55126
elsif (/\G ( -- | \+\+ | [\)\}\]] ) /cgox) { } 9324 45802 55126
elsif (/\G ( \.\.\. ) /cgox) { } 7 45795 45802
elsif (m"\G ((?> !~~ | !~ | != | ! | %= | % | &&= | && | &= | &\.= | &\. | & | -= | -> | - | :(?>\s*)= | : | <<>> | <<= | <=> | <= | < | == | => | =~ | = | >>= | >> | >= | > | \*\*= | \*\* | \*= | \* | \+= | \+ | \.\. | \.= | \. | //= | // | /= | / | \? | \\ | \^= | \^\.= | \^\. | \^ | \b x= | \|\|= | \|\| | \|= | \|\.= | \|\. | \| | ~~ | ~\. | ~ | \b(?: and | cmp | eq | ge | gt | le | lt | ne | not | or | xor | x )\b | \b(?: print )\b | [,;\(\{\[] )) "cgox) { } 17287 28508 45795
elsif (/\G ($Eutf2::q_char) /cgox) { } 28508 0 28508
4646 22441 my $heredoc = '';
4647 22441 ▶ if (scalar(@heredoc_delimiter) >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @heredoc_delimiter >= 1) 191 22250 22441
4648 191 $slash = 'm//';
4649  
4650 191 $heredoc = join '', @heredoc;
4651 191 @heredoc = ();
4652  
4653 # skip here document
4654 191 for my $heredoc_delimiter (@heredoc_delimiter) {
4655 199 /\G .*? \n $heredoc_delimiter \n/xmsgc;
4656 }
4657 191 @heredoc_delimiter = ();
4658  
4659 191 $here_script = '';
4660 }
4661 22441 return "\n" . $heredoc;
4662 }
4663  
4664 # ignore space, comment
4665 39434 elsif (/\G ((?>\s+)|\#.*) /oxgc) { return $1; }
4666  
4667 # if (, elsif (, unless (, while (, until (, given (, and when (
4668  
4669 # given, when
4670  
4671 # P.225 The given Statement
4672 # in Chapter 15: Smart Matching and given-when
4673 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
4674  
4675 # P.133 The given Statement
4676 # in Chapter 4: Statements and Declarations
4677 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
4678  
4679 elsif (/\G ( (?: if | elsif | unless | while | until | given | when ) (?>\s*) \( ) /oxgc) {
4680 2641 $slash = 'm//';
4681 2641 return $1;
4682 }
4683  
4684 # scalar variable ($scalar = ...) =~ tr///;
4685 # scalar variable ($scalar = ...) =~ s///;
4686  
4687 # state
4688  
4689 # P.68 Persistent, Private Variables
4690 # in Chapter 4: Subroutines
4691 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
4692  
4693 # P.160 Persistent Lexically Scoped Variables: state
4694 # in Chapter 4: Statements and Declarations
4695 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
4696  
4697 # (and so on)
4698  
4699 elsif (/\G ( \( (?>\s*) (?: local \b | my \b | our \b | state \b )? (?>\s*) \$ $qq_scalar ) /oxgc) {
4700 143 my $e_string = e_string($1);
4701  
4702 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
4703 0 $tr_variable = $e_string . e_string($1);
4704 0 $bind_operator = $2;
4705 0 $slash = 'm//';
4706 0 return '';
4707 }
4708 elsif (/\G ( (?>\s*) = $qq_paren \) ) ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= s \b ) /oxgc) {
4709 0 $sub_variable = $e_string . e_string($1);
4710 0 $bind_operator = $2;
4711 0 $slash = 'm//';
4712 0 return '';
4713 }
4714 else {
4715 143 $slash = 'div';
4716 143 return $e_string;
4717 }
4718 }
4719  
4720 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
4721 elsif (/\G ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH \b | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) /oxmsgc) {
4722 4 $slash = 'div';
4723 4 return q{Eutf2::PREMATCH()};
4724 }
4725  
4726 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
4727 elsif (/\G ( \$& | \$\{&\} | \$ (?>\s*) MATCH \b | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) /oxmsgc) {
4728 28 $slash = 'div';
4729 28 return q{Eutf2::MATCH()};
4730 }
4731  
4732 # $', ${'} --> $', ${'}
4733 elsif (/\G ( \$' | \$\{'\} ) /oxmsgc) {
4734 1 $slash = 'div';
4735 1 return $1;
4736 }
4737  
4738 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
4739 elsif (/\G ( \$ (?>\s*) POSTMATCH \b | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) /oxmsgc) {
4740 3 $slash = 'div';
4741 3 return q{Eutf2::POSTMATCH()};
4742 }
4743  
4744 # scalar variable $scalar =~ tr///;
4745 # scalar variable $scalar =~ s///;
4746 # substr() =~ tr///;
4747 # substr() =~ s///;
4748 elsif (/\G ( \$ $qq_scalar | $qq_substr ) /oxgc) {
4749 2411 my $scalar = e_string($1);
4750  
4751 2411 ▶ if (/\G ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= (?: tr | y ) \b ) /oxgc) {
Branch: 2 branches
BranchTrueFalseTotal
if (/\G ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= (?: tr | y ) \b ) /cgox) { } 10 2401 2411
elsif (/\G ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= s \b ) /cgox) { } 99 2302 2401
4752 10 $tr_variable = $scalar;
4753 10 $bind_operator = $1;
4754 10 $slash = 'm//';
4755 10 return '';
4756 }
4757 elsif (/\G ( (?>\s*) (?: =~ | !~ ) (?>\s*) ) (?= s \b ) /oxgc) {
4758 99 $sub_variable = $scalar;
4759 99 $bind_operator = $1;
4760 99 $slash = 'm//';
4761 99 return '';
4762 }
4763 else {
4764 2302 $slash = 'div';
4765 2302 return $scalar;
4766 }
4767 }
4768  
4769 # end of statement
4770 elsif (/\G ( [,;] ) /oxgc) {
4771 9298 $slash = 'm//';
4772  
4773 # clear tr/// variable
4774 9298 $tr_variable = '';
4775  
4776 # clear s/// variable
4777 9298 $sub_variable = '';
4778  
4779 9298 $bind_operator = '';
4780  
4781 9298 return $1;
4782 }
4783  
4784 # bareword
4785 elsif (/\G ( \{ (?>\s*) (?: tr | index | rindex | reverse ) (?>\s*) \} ) /oxmsgc) {
4786 0 return $1;
4787 }
4788  
4789 # $0 --> $0
4790 elsif (/\G ( \$ 0 ) /oxmsgc) {
4791 2 $slash = 'div';
4792 2 return $1;
4793 }
4794 elsif (/\G ( \$ \{ (?>\s*) 0 (?>\s*) \} ) /oxmsgc) {
4795 0 $slash = 'div';
4796 0 return $1;
4797 }
4798  
4799 # $$ --> $$
4800 elsif (/\G ( \$ \$ ) (?![\w\{]) /oxmsgc) {
4801 1 $slash = 'div';
4802 1 return $1;
4803 }
4804  
4805 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
4806 # $1, $2, $3 --> $1, $2, $3 otherwise
4807 elsif (/\G \$ ((?>[1-9][0-9]*)) /oxmsgc) {
4808 57 $slash = 'div';
4809 57 return e_capture($1);
4810 }
4811 elsif (/\G \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} /oxmsgc) {
4812 0 $slash = 'div';
4813 0 return e_capture($1);
4814 }
4815  
4816 # $$foo[ ... ] --> $ $foo->[ ... ]
4817 elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ .+? \] ) /oxmsgc) {
4818 0 $slash = 'div';
4819 0 return e_capture($1.'->'.$2);
4820 }
4821  
4822 # $$foo{ ... } --> $ $foo->{ ... }
4823 elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ .+? \} ) /oxmsgc) {
4824 0 $slash = 'div';
4825 0 return e_capture($1.'->'.$2);
4826 }
4827  
4828 # $$foo
4829 elsif (/\G \$ ( \$ (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) /oxmsgc) {
4830 0 $slash = 'div';
4831 0 return e_capture($1);
4832 }
4833  
4834 # ${ foo }
4835 elsif (/\G \$ (?>\s*) \{ ( (?>\s*) (?> [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* ) (?>\s*) ) \} /oxmsgc) {
4836 0 $slash = 'div';
4837 0 return '${' . $1 . '}';
4838 }
4839  
4840 # ${ ... }
4841 elsif (/\G \$ (?>\s*) \{ (?>\s*) ( $qq_brace ) (?>\s*) \} /oxmsgc) {
4842 0 $slash = 'div';
4843 0 return e_capture($1);
4844 }
4845  
4846 # variable or function
4847 # $ @ % & * $ #
4848 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) {
4849 27 $slash = 'div';
4850 27 return $1;
4851 }
4852 # $ $ $ $ $ $ $ $ $ $ $ $ $ $
4853 # $ @ # \ ' " / ? ( ) [ ] < >
4854 elsif (/\G ( \$[\$\@\#\\\'\"\/\?\(\)\[\]\<\>] ) /oxmsgc) {
4855 91 $slash = 'div';
4856 91 return $1;
4857 }
4858  
4859 # while (<FILEHANDLE>)
4860 elsif (/\G \b (while (?>\s*) \( (?>\s*) <[\$]?[A-Za-z_][A-Za-z_0-9]*> (?>\s*) \)) \b /oxgc) {
4861 0 return $1;
4862 }
4863  
4864 # while (<WILDCARD>) --- glob
4865  
4866 # avoid "Error: Runtime exception" of perl version 5.005_03
4867  
4868 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) {
4869 0 return 'while ($_ = Eutf2::glob("' . $1 . '"))';
4870 }
4871  
4872 # while (glob)
4873 elsif (/\G \b while (?>\s*) \( (?>\s*) glob (?>\s*) \) /oxgc) {
4874 0 return 'while ($_ = Eutf2::glob_)';
4875 }
4876  
4877 # while (glob(WILDCARD))
4878 elsif (/\G \b while (?>\s*) \( (?>\s*) glob \b /oxgc) {
4879 0 return 'while ($_ = Eutf2::glob';
4880 }
4881  
4882 # doit if, doit unless, doit while, doit until, doit for, doit when
4883 404 elsif (/\G \b ( if | unless | while | until | for | when ) \b /oxgc) { $slash = 'm//'; return $1; }
4884  
4885 # subroutines of package Eutf2
4886 19 elsif (/\G \b (CORE:: | ->(>?\s*) (?: atan2 | [a-z]{2,})) \b /oxgc) { $slash = 'm//'; return $1; }
4887 0 elsif (/\G \b Char::eval (?= (?>\s*) \{ ) /oxgc) { $slash = 'm//'; return 'eval'; }
4888 22 elsif (/\G \b UTF2::eval (?= (?>\s*) \{ ) /oxgc) { $slash = 'm//'; return 'eval'; }
4889 0 elsif (/\G \b Char::eval \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'eval Char::escape'; }
4890 168 elsif (/\G \b UTF2::eval \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'eval UTF2::escape'; }
4891 2 elsif (/\G \b bytes::substr \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'substr'; }
4892 2 elsif (/\G \b chop \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::chop'; }
4893 2 elsif (/\G \b bytes::index \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'index'; }
4894 0 elsif (/\G \b Char::index \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Char::index'; }
4895 2 elsif (/\G \b UTF2::index \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'UTF2::index'; }
4896 2 elsif (/\G \b index \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::index'; }
4897 2 elsif (/\G \b bytes::rindex \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'rindex'; }
4898 0 elsif (/\G \b Char::rindex \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Char::rindex'; }
4899 2 elsif (/\G \b UTF2::rindex \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'UTF2::rindex'; }
4900 2 elsif (/\G \b rindex \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::rindex'; }
4901 1 elsif (/\G \b lc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::lc'; }
4902 0 elsif (/\G \b lcfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::lcfirst'; }
4903 0 elsif (/\G \b uc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::uc'; }
4904 0 elsif (/\G \b ucfirst (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::ucfirst'; }
4905 7 elsif (/\G \b fc (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::fc'; }
4906  
4907 # "-s '' ..." means file test "-s 'filename' ..." (not means "- s/// ...")
4908 0 elsif (/\G -s (?>\s*) (\") ((?:$qq_char)+?) (\") /oxgc) { $slash = 'm//'; return '-s ' . e_qq('', $1,$3,$2); }
4909 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\#) ((?:$qq_char)+?) (\#) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4910 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\() ((?:$qq_paren)+?) (\)) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4911 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\{) ((?:$qq_brace)+?) (\}) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4912 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\[) ((?:$qq_bracket)+?) (\]) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4913 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\<) ((?:$qq_angle)+?) (\>) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4914 0 elsif (/\G -s (?>\s+) qq (?>\s*) (\S) ((?:$qq_char)+?) (\1) /oxgc) { $slash = 'm//'; return '-s ' . e_qq('qq',$1,$3,$2); }
4915  
4916 0 elsif (/\G -s (?>\s*) (\') ((?:\\\'|\\\\|$q_char)+?) (\') /oxgc) { $slash = 'm//'; return '-s ' . e_q ('', $1,$3,$2); }
4917 0 elsif (/\G -s (?>\s+) q (?>\s*) (\#) ((?:\\\#|\\\\|$q_char)+?) (\#) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4918 0 elsif (/\G -s (?>\s+) q (?>\s*) (\() ((?:\\\)|\\\\|$q_paren)+?) (\)) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4919 0 elsif (/\G -s (?>\s+) q (?>\s*) (\{) ((?:\\\}|\\\\|$q_brace)+?) (\}) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4920 0 elsif (/\G -s (?>\s+) q (?>\s*) (\[) ((?:\\\]|\\\\|$q_bracket)+?) (\]) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4921 0 elsif (/\G -s (?>\s+) q (?>\s*) (\<) ((?:\\\>|\\\\|$q_angle)+?) (\>) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4922 0 elsif (/\G -s (?>\s+) q (?>\s*) (\S) ((?:\\\1|\\\\|$q_char)+?) (\1) /oxgc) { $slash = 'm//'; return '-s ' . e_q ('q', $1,$3,$2); }
4923  
4924 elsif (/\G -s (?>\s*) (\$ (?> \w+ (?: ::\w+)* ) (?: (?: ->)? (?: [\$\@\%\&\*]\* | \$\#\* | \( (?:$qq_paren)*? \) | [\@\%\*]? \{ (?:$qq_brace)+? \} | [\@\%]? \[ (?:$qq_bracket)+? \] ) )*) /oxgc)
4925 0 { $slash = 'm//'; return "-s $1"; }
4926 0 elsif (/\G -s (?>\s*) \( ((?:$qq_paren)*?) \) /oxgc) { $slash = 'm//'; return "-s ($1)"; }
4927 0 elsif (/\G -s (?= (?>\s+) [a-z]+) /oxgc) { $slash = 'm//'; return '-s'; }
4928 0 elsif (/\G -s (?>\s+) ((?>\w+)) /oxgc) { $slash = 'm//'; return "-s $1"; }
4929  
4930 2 elsif (/\G \b bytes::length (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'length'; }
4931 2 elsif (/\G \b bytes::chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'chr'; }
4932 36 elsif (/\G \b chr (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::chr'; }
4933 2 elsif (/\G \b bytes::ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'div'; return 'ord'; }
4934 2 elsif (/\G \b ord (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'div'; return $function_ord; }
4935 0 elsif (/\G \b glob (?= (?>\s+)[A-Za-z_]|(?>\s*)['"`\$\@\&\*\(]) /oxgc) { $slash = 'm//'; return 'Eutf2::glob'; }
4936 0 elsif (/\G \b lc \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::lc_'; }
4937 0 elsif (/\G \b lcfirst \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::lcfirst_'; }
4938 0 elsif (/\G \b uc \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::uc_'; }
4939 0 elsif (/\G \b ucfirst \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::ucfirst_'; }
4940 0 elsif (/\G \b fc \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::fc_'; }
4941 0 elsif (/\G -s \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return '-s '; }
4942  
4943 0 elsif (/\G \b bytes::length \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'length'; }
4944 0 elsif (/\G \b bytes::chr \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'chr'; }
4945 0 elsif (/\G \b chr \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::chr_'; }
4946 0 elsif (/\G \b bytes::ord \b (?! (?>\s*) => ) /oxgc) { $slash = 'div'; return 'ord'; }
4947 2 elsif (/\G \b ord \b (?! (?>\s*) => ) /oxgc) { $slash = 'div'; return $function_ord_; }
4948 0 elsif (/\G \b glob \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return 'Eutf2::glob_'; }
4949 4 elsif (/\G \b reverse \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return $function_reverse; }
4950 8 elsif (/\G \b getc \b (?! (?>\s*) => ) /oxgc) { $slash = 'm//'; return $function_getc; }
4951 # split
4952 elsif (/\G \b (split) \b (?! (?>\s*) => ) /oxgc) {
4953 120 $slash = 'm//';
4954  
4955 120 my $e = '';
4956 120 ▶ while (/\G ( (?>\s+) | \( | \#.* ) /oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
if (/\G ( (?>\s+) | \( | \#.* ) /cgox) 117 120 237
4957 117 $e .= $1;
4958 }
4959  
4960 # end of split
4961 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
4962  
4963 # split scalar value
4964 1 elsif (/\G ( [\$\@\&\*] $qq_scalar ) /oxgc) { return 'Eutf2::split' . $e . e_string($1); }
4965  
4966 # split literal space
4967 0 elsif (/\G \b qq (\#) [ ] (\#) /oxgc) { return 'Eutf2::split' . $e . qq {qq$1 $2}; }
4968 0 elsif (/\G \b qq ((?>\s*)) (\() [ ] (\)) /oxgc) { return 'Eutf2::split' . $e . qq{$1qq$2 $3}; }
4969 0 elsif (/\G \b qq ((?>\s*)) (\{) [ ] (\}) /oxgc) { return 'Eutf2::split' . $e . qq{$1qq$2 $3}; }
4970 0 elsif (/\G \b qq ((?>\s*)) (\[) [ ] (\]) /oxgc) { return 'Eutf2::split' . $e . qq{$1qq$2 $3}; }
4971 0 elsif (/\G \b qq ((?>\s*)) (\<) [ ] (\>) /oxgc) { return 'Eutf2::split' . $e . qq{$1qq$2 $3}; }
4972 0 elsif (/\G \b qq ((?>\s*)) (\S) [ ] (\2) /oxgc) { return 'Eutf2::split' . $e . qq{$1qq$2 $3}; }
4973 0 elsif (/\G \b q (\#) [ ] (\#) /oxgc) { return 'Eutf2::split' . $e . qq {q$1 $2}; }
4974 0 elsif (/\G \b q ((?>\s*)) (\() [ ] (\)) /oxgc) { return 'Eutf2::split' . $e . qq {$1q$2 $3}; }
4975 0 elsif (/\G \b q ((?>\s*)) (\{) [ ] (\}) /oxgc) { return 'Eutf2::split' . $e . qq {$1q$2 $3}; }
4976 0 elsif (/\G \b q ((?>\s*)) (\[) [ ] (\]) /oxgc) { return 'Eutf2::split' . $e . qq {$1q$2 $3}; }
4977 0 elsif (/\G \b q ((?>\s*)) (\<) [ ] (\>) /oxgc) { return 'Eutf2::split' . $e . qq {$1q$2 $3}; }
4978 0 elsif (/\G \b q ((?>\s*)) (\S) [ ] (\2) /oxgc) { return 'Eutf2::split' . $e . qq {$1q$2 $3}; }
4979 13 elsif (/\G ' [ ] ' /oxgc) { return 'Eutf2::split' . $e . qq {' '}; }
4980 2 elsif (/\G " [ ] " /oxgc) { return 'Eutf2::split' . $e . qq {" "}; }
4981  
4982 # split qq//
4983 elsif (/\G \b (qq) \b /oxgc) {
4984 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
4985 else {
4986 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
4987 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
4988 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq ( ) --> qr ( )
4989 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq { } --> qr { }
4990 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq [ ] --> qr [ ]
4991 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq < > --> qr < >
4992 0 elsif (/\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) /oxgc) { return e_split($e.'qr','{','}',$2,''); } # qq | | --> qr { }
4993 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { return e_split($e.'qr',$1,$3,$2,''); } # qq * * --> qr * *
4994 }
4995 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
4996 }
4997 }
4998  
4999 # split qr//
5000 elsif (/\G \b (qr) \b /oxgc) {
5001 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
5002 else {
5003 12 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 12 0 12
5004 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
5005 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # qr ( )
5006 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # qr { }
5007 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # qr [ ]
5008 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # qr < >
5009 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([imosxpadlunbB]*) /oxgc) { return e_split_q($e.'qr',$1, $3, $2,$4); } # qr ' '
5010 0 elsif (/\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr','{','}',$2,$4); } # qr | | --> qr { }
5011 12 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([imosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # qr * *
5012 }
5013 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5014 }
5015 }
5016  
5017 # split q//
5018 elsif (/\G \b (q) \b /oxgc) {
5019 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
5020 else {
5021 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5022 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
5023 0 elsif (/\G (\() ((?:\\\\|\\\)|\\\(|$q_paren)*?) (\)) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q ( ) --> qr ( )
5024 0 elsif (/\G (\{) ((?:\\\\|\\\}|\\\{|$q_brace)*?) (\}) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q { } --> qr { }
5025 0 elsif (/\G (\[) ((?:\\\\|\\\]|\\\[|$q_bracket)*?) (\]) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q [ ] --> qr [ ]
5026 0 elsif (/\G (\<) ((?:\\\\|\\\>|\\\<|$q_angle)*?) (\>) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q < > --> qr < >
5027 0 elsif (/\G ([*\-:?\\^|]) ((?:$q_char)*?) (\1) /oxgc) { return e_split_q($e.'qr','{','}',$2,''); } # q | | --> qr { }
5028 0 elsif (/\G (\S) ((?:\\\\|\\\1| $q_char)*?) (\1) /oxgc) { return e_split_q($e.'qr',$1,$3,$2,''); } # q * * --> qr * *
5029 }
5030 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5031 }
5032 }
5033  
5034 # split m//
5035 elsif (/\G \b (m) \b /oxgc) {
5036 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
5037 else {
5038 24 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 24 0 24
5039 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
5040 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # m ( ) --> qr ( )
5041 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # m { } --> qr { }
5042 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # m [ ] --> qr [ ]
5043 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # m < > --> qr < >
5044 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cgimosxpadlunbB]*) /oxgc) { return e_split_q($e.'qr',$1, $3, $2,$4); } # m ' ' --> qr ' '
5045 0 elsif (/\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr','{','}',$2,$4); } # m | | --> qr { }
5046 24 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cgimosxpadlunbB]*) /oxgc) { return e_split ($e.'qr',$1, $3, $2,$4); } # m * * --> qr * *
5047 }
5048 0 die __FILE__, ": Search pattern not terminated\n";
5049 }
5050 }
5051  
5052 # split ''
5053 elsif (/\G (\') /oxgc) {
5054 0 my $q_string = '';
5055 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5056 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
5057 0 elsif (/\G (\\\') /oxgc) { $q_string .= $1; } # splitqr'' --> split qr''
5058 0 elsif (/\G \' /oxgc) { return e_split_q($e.q{ qr},"'","'",$q_string,''); } # ' ' --> qr ' '
5059 0 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5060 }
5061 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5062 }
5063  
5064 # split ""
5065 elsif (/\G (\") /oxgc) {
5066 0 my $qq_string = '';
5067 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5068 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
5069 0 elsif (/\G (\\\") /oxgc) { $qq_string .= $1; } # splitqr"" --> split qr""
5070 0 elsif (/\G \" /oxgc) { return e_split($e.q{ qr},'"','"',$qq_string,''); } # " " --> qr " "
5071 0 elsif (/\G ($q_char) /oxgc) { $qq_string .= $1; }
5072 }
5073 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5074 }
5075  
5076 # split //
5077 elsif (/\G (\/) /oxgc) {
5078 65 my $regexp = '';
5079 65 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 434 0 434
5080 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
5081 0 elsif (/\G (\\\/) /oxgc) { $regexp .= $1; } # splitqr// --> split qr//
5082 65 elsif (/\G \/ ([cgimosxpadlunbB]*) /oxgc) { return e_split($e.q{ qr}, '/','/',$regexp,$1); } # / / --> qr / /
5083 369 elsif (/\G ($q_char) /oxgc) { $regexp .= $1; }
5084 }
5085 0 die __FILE__, ": Search pattern not terminated\n";
5086 }
5087 }
5088  
5089 # tr/// or y///
5090  
5091 # about [cdsrbB]* (/B modifier)
5092 #
5093 # P.559 appendix C
5094 # of ISBN 4-89052-384-7 Programming perl
5095 # (Japanese title is: Perl puroguramingu)
5096  
5097 elsif (/\G \b ( tr | y ) \b /oxgc) {
5098 12 my $ope = $1;
5099  
5100 # $1 $2 $3 $4 $5 $6
5101 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
5102 0 my @tr = ($tr_variable,$2);
5103 0 return e_tr(@tr,'',$4,$6);
5104 }
5105 else {
5106 12 my $e = '';
5107 12 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 12 0 12
5108 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
5109 elsif (/\G (\() ((?:$qq_paren)*?) (\)) /oxgc) {
5110 0 my @tr = ($tr_variable,$2);
5111 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5112 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
5113 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr ( ) ( )
5114 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr ( ) { }
5115 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr ( ) [ ]
5116 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr ( ) < >
5117 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr ( ) * *
5118 }
5119 0 die __FILE__, ": Transliteration replacement not terminated\n";
5120 }
5121 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) {
5122 0 my @tr = ($tr_variable,$2);
5123 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5124 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
5125 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr { } ( )
5126 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr { } { }
5127 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr { } [ ]
5128 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr { } < >
5129 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr { } * *
5130 }
5131 0 die __FILE__, ": Transliteration replacement not terminated\n";
5132 }
5133 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) {
5134 0 my @tr = ($tr_variable,$2);
5135 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5136 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
5137 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr [ ] ( )
5138 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr [ ] { }
5139 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr [ ] [ ]
5140 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr [ ] < >
5141 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr [ ] * *
5142 }
5143 0 die __FILE__, ": Transliteration replacement not terminated\n";
5144 }
5145 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) {
5146 0 my @tr = ($tr_variable,$2);
5147 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5148 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
5149 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr < > ( )
5150 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr < > { }
5151 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr < > [ ]
5152 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr < > < >
5153 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cdsrbB]*) /oxgc) { return e_tr(@tr,$e,$2,$4); } # tr < > * *
5154 }
5155 0 die __FILE__, ": Transliteration replacement not terminated\n";
5156 }
5157 # $1 $2 $3 $4 $5 $6
5158 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ((?:$qq_char)*?) (\1) ([cdsrbB]*) /oxgc) { # tr * * *
5159 12 my @tr = ($tr_variable,$2);
5160 12 return e_tr(@tr,'',$4,$6);
5161 }
5162 }
5163 0 die __FILE__, ": Transliteration pattern not terminated\n";
5164 }
5165 }
5166  
5167 # qq//
5168 elsif (/\G \b (qq) \b /oxgc) {
5169 3894 my $ope = $1;
5170  
5171 # if (/\G (\#) ((?:$qq_char)*?) (\#) /oxgc) { return e_qq($ope,$1,$3,$2); } # qq# #
5172 3894 ▶ if (/\G (\#) /oxgc) { # qq# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) /cgox) { } 40 3854 3894
5173 40 my $qq_string = '';
5174 40 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 1948 0 1948
5175 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
5176 0 elsif (/\G (\\\#) /oxgc) { $qq_string .= $1; }
5177 40 elsif (/\G (\#) /oxgc) { return e_qq($ope,'#','#',$qq_string); }
5178 1828 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5179 }
5180 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5181 }
5182  
5183 else {
5184 3854 my $e = '';
5185 3854 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 3854 0 3854
5186 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
5187  
5188 # elsif (/\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qq ( )
5189 elsif (/\G (\() /oxgc) { # qq ( )
5190 0 my $qq_string = '';
5191 0 local $nest = 1;
5192 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5193 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
5194 0 elsif (/\G (\\\)) /oxgc) { $qq_string .= $1; }
5195 0 elsif (/\G (\() /oxgc) { $qq_string .= $1; $nest++; }
5196 elsif (/\G (\)) /oxgc) {
5197 0 ▶ if (--$nest == 0) { return $e . e_qq($ope,'(',')',$qq_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 0 0 0
5198 0 else { $qq_string .= $1; }
5199 }
5200 0 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5201 }
5202 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5203 }
5204  
5205 # elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qq { }
5206 elsif (/\G (\{) /oxgc) { # qq { }
5207 3796 my $qq_string = '';
5208 3796 local $nest = 1;
5209 3796 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 156797 0 156797
5210 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
5211 0 elsif (/\G (\\\}) /oxgc) { $qq_string .= $1; }
5212 1420 elsif (/\G (\{) /oxgc) { $qq_string .= $1; $nest++; }
5213 elsif (/\G (\}) /oxgc) {
5214 5216 ▶ if (--$nest == 0) { return $e . e_qq($ope,'{','}',$qq_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 3796 1420 5216
5215 1420 else { $qq_string .= $1; }
5216 }
5217 149369 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5218 }
5219 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5220 }
5221  
5222 # elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qq [ ]
5223 elsif (/\G (\[) /oxgc) { # qq [ ]
5224 0 my $qq_string = '';
5225 0 local $nest = 1;
5226 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5227 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
5228 0 elsif (/\G (\\\]) /oxgc) { $qq_string .= $1; }
5229 0 elsif (/\G (\[) /oxgc) { $qq_string .= $1; $nest++; }
5230 elsif (/\G (\]) /oxgc) {
5231 0 ▶ if (--$nest == 0) { return $e . e_qq($ope,'[',']',$qq_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 0 0 0
5232 0 else { $qq_string .= $1; }
5233 }
5234 0 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5235 }
5236 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5237 }
5238  
5239 # elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qq < >
5240 elsif (/\G (\<) /oxgc) { # qq < >
5241 38 my $qq_string = '';
5242 38 local $nest = 1;
5243 38 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 1418 0 1418
5244 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
5245 0 elsif (/\G (\\\>) /oxgc) { $qq_string .= $1; }
5246 0 elsif (/\G (\<) /oxgc) { $qq_string .= $1; $nest++; }
5247 elsif (/\G (\>) /oxgc) {
5248 38 ▶ if (--$nest == 0) { return $e . e_qq($ope,'<','>',$qq_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 38 0 38
5249 0 else { $qq_string .= $1; }
5250 }
5251 1358 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5252 }
5253 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5254 }
5255  
5256 # elsif (/\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qq * *
5257 elsif (/\G (\S) /oxgc) { # qq * *
5258 20 my $delimiter = $1;
5259 20 my $qq_string = '';
5260 20 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 840 0 840
5261 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
5262 0 elsif (/\G (\\\Q$delimiter\E) /oxgc) { $qq_string .= $1; }
5263 20 elsif (/\G (\Q$delimiter\E) /oxgc) { return $e . e_qq($ope,$delimiter,$delimiter,$qq_string); }
5264 820 elsif (/\G ($qq_char) /oxgc) { $qq_string .= $1; }
5265 }
5266 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5267 }
5268 }
5269 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5270 }
5271 }
5272  
5273 # qr//
5274 elsif (/\G \b (qr) \b /oxgc) {
5275 36 my $ope = $1;
5276 36 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) ([imosxpadlunbB]*) /oxgc) { # qr# # #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) ([imosxpadlunbB]*) /cgox) { } 0 36 36
5277 0 return e_qr($ope,$1,$3,$2,$4);
5278 }
5279 else {
5280 36 my $e = '';
5281 36 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 36 0 36
5282 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
5283 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # qr ( )
5284 1 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # qr { }
5285 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # qr [ ]
5286 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # qr < >
5287 2 elsif (/\G (\') ((?:$qq_char)*?) (\') ([imosxpadlunbB]*) /oxgc) { return $e . e_qr_q($ope,$1, $3, $2,$4); } # qr ' '
5288 0 elsif (/\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,'{','}',$2,$4); } # qr | | --> qr { }
5289 33 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([imosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # qr * *
5290 }
5291 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5292 }
5293 }
5294  
5295 # qw//
5296 elsif (/\G \b (qw) \b /oxgc) {
5297 34 my $ope = $1;
5298 34 ▶ if (/\G (\#) (.*?) (\#) /oxmsgc) { # qw# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) (.*?) (\#) /cgmosx) { } 0 34 34
5299 0 return e_qw($ope,$1,$3,$2);
5300 }
5301 else {
5302 34 my $e = '';
5303 34 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 34 0 34
5304 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
5305  
5306 34 elsif (/\G (\() ([^(]*?) (\)) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw ( )
5307 0 elsif (/\G (\() ((?:$q_paren)*?) (\)) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw ( )
5308  
5309 0 elsif (/\G (\{) ([^{]*?) (\}) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw { }
5310 0 elsif (/\G (\{) ((?:$q_brace)*?) (\}) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw { }
5311  
5312 0 elsif (/\G (\[) ([^[]*?) (\]) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw [ ]
5313 0 elsif (/\G (\[) ((?:$q_bracket)*?) (\]) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw [ ]
5314  
5315 0 elsif (/\G (\<) ([^<]*?) (\>) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw < >
5316 0 elsif (/\G (\<) ((?:$q_angle)*?) (\>) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw < >
5317  
5318 0 elsif (/\G ([\x21-\x3F]) (.*?) (\1) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw * *
5319 0 elsif (/\G (\S) ((?:$q_char)*?) (\1) /oxmsgc) { return $e . e_qw($ope,$1,$3,$2); } # qw * *
5320 }
5321 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5322 }
5323 }
5324  
5325 # qx//
5326 elsif (/\G \b (qx) \b /oxgc) {
5327 2 my $ope = $1;
5328 2 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) /oxgc) { # qx# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) /cgox) { } 0 2 2
5329 0 return e_qq($ope,$1,$3,$2);
5330 }
5331 else {
5332 2 my $e = '';
5333 2 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 2 0 2
5334 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
5335 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qx ( )
5336 2 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qx { }
5337 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qx [ ]
5338 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qx < >
5339 0 elsif (/\G (\') ((?:$qq_char)*?) (\') /oxgc) { return $e . e_q ($ope,$1,$3,$2); } # qx ' '
5340 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { return $e . e_qq($ope,$1,$3,$2); } # qx * *
5341 }
5342 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5343 }
5344 }
5345  
5346 # q//
5347 elsif (/\G \b (q) \b /oxgc) {
5348 590 my $ope = $1;
5349  
5350 # if (/\G (\#) ((?:\\\#|\\\\|$q_char)*?) (\#) /oxgc) { return e_q($ope,$1,$3,$2); } # q# #
5351  
5352 # avoid "Error: Runtime exception" of perl version 5.005_03
5353 # (and so on)
5354  
5355 590 ▶ if (/\G (\#) /oxgc) { # q# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) /cgox) { } 0 590 590
5356 0 my $q_string = '';
5357 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5358 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
5359 0 elsif (/\G (\\\#) /oxgc) { $q_string .= $1; }
5360 0 elsif (/\G (\#) /oxgc) { return e_q($ope,'#','#',$q_string); }
5361 0 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5362 }
5363 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5364 }
5365  
5366 else {
5367 590 my $e = '';
5368 590 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 590 0 590
5369 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
5370  
5371 # elsif (/\G (\() ((?:\\\)|\\\\|$q_paren)*?) (\)) /oxgc) { return $e . e_q($ope,$1,$3,$2); } # q ( )
5372 elsif (/\G (\() /oxgc) { # q ( )
5373 0 my $q_string = '';
5374 0 local $nest = 1;
5375 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5376 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
5377 0 elsif (/\G (\\\)) /oxgc) { $q_string .= $1; }
5378 0 elsif (/\G (\\\() /oxgc) { $q_string .= $1; }
5379 0 elsif (/\G (\() /oxgc) { $q_string .= $1; $nest++; }
5380 elsif (/\G (\)) /oxgc) {
5381 0 ▶ if (--$nest == 0) { return $e . e_q($ope,'(',')',$q_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 0 0 0
5382 0 else { $q_string .= $1; }
5383 }
5384 0 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5385 }
5386 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5387 }
5388  
5389 # elsif (/\G (\{) ((?:\\\}|\\\\|$q_brace)*?) (\}) /oxgc) { return $e . e_q($ope,$1,$3,$2); } # q { }
5390 elsif (/\G (\{) /oxgc) { # q { }
5391 584 my $q_string = '';
5392 584 local $nest = 1;
5393 584 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 9554 0 9554
5394 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
5395 0 elsif (/\G (\\\}) /oxgc) { $q_string .= $1; }
5396 0 elsif (/\G (\\\{) /oxgc) { $q_string .= $1; }
5397 166 elsif (/\G (\{) /oxgc) { $q_string .= $1; $nest++; }
5398 elsif (/\G (\}) /oxgc) {
5399 750 ▶ if (--$nest == 0) { return $e . e_q($ope,'{','}',$q_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 584 166 750
5400 166 else { $q_string .= $1; }
5401 }
5402 8638 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5403 }
5404 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5405 }
5406  
5407 # elsif (/\G (\[) ((?:\\\]|\\\\|$q_bracket)*?) (\]) /oxgc) { return $e . e_q($ope,$1,$3,$2); } # q [ ]
5408 elsif (/\G (\[) /oxgc) { # q [ ]
5409 0 my $q_string = '';
5410 0 local $nest = 1;
5411 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5412 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
5413 0 elsif (/\G (\\\]) /oxgc) { $q_string .= $1; }
5414 0 elsif (/\G (\\\[) /oxgc) { $q_string .= $1; }
5415 0 elsif (/\G (\[) /oxgc) { $q_string .= $1; $nest++; }
5416 elsif (/\G (\]) /oxgc) {
5417 0 ▶ if (--$nest == 0) { return $e . e_q($ope,'[',']',$q_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 0 0 0
5418 0 else { $q_string .= $1; }
5419 }
5420 0 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5421 }
5422 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5423 }
5424  
5425 # elsif (/\G (\<) ((?:\\\>|\\\\|$q_angle)*?) (\>) /oxgc) { return $e . e_q($ope,$1,$3,$2); } # q < >
5426 elsif (/\G (\<) /oxgc) { # q < >
5427 5 my $q_string = '';
5428 5 local $nest = 1;
5429 5 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 82 0 82
5430 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
5431 0 elsif (/\G (\\\>) /oxgc) { $q_string .= $1; }
5432 0 elsif (/\G (\\\<) /oxgc) { $q_string .= $1; }
5433 0 elsif (/\G (\<) /oxgc) { $q_string .= $1; $nest++; }
5434 elsif (/\G (\>) /oxgc) {
5435 5 ▶ if (--$nest == 0) { return $e . e_q($ope,'<','>',$q_string); }
Branch: 1 branch
BranchTrueFalseTotal
if (--$Eutf2::nest == 0) { } 5 0 5
5436 0 else { $q_string .= $1; }
5437 }
5438 77 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5439 }
5440 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5441 }
5442  
5443 # elsif (/\G (\S) ((?:\\\1|\\\\|$q_char)*?) (\1) /oxgc) { return $e . e_q($ope,$1,$3,$2); } # q * *
5444 elsif (/\G (\S) /oxgc) { # q * *
5445 1 my $delimiter = $1;
5446 1 my $q_string = '';
5447 1 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 14 0 14
5448 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
5449 0 elsif (/\G (\\\Q$delimiter\E) /oxgc) { $q_string .= $1; }
5450 1 elsif (/\G (\Q$delimiter\E) /oxgc) { return $e . e_q($ope,$delimiter,$delimiter,$q_string); }
5451 13 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5452 }
5453 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5454 }
5455 }
5456 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5457 }
5458 }
5459  
5460 # m//
5461 elsif (/\G \b (m) \b /oxgc) {
5462 269 my $ope = $1;
5463 269 ▶ if (/\G (\#) ((?:$qq_char)*?) (\#) ([cgimosxpadlunbB]*) /oxgc) { # m# #
Branch: 1 branch
BranchTrueFalseTotal
if (/\G (\#) ((?:$Eutf2::qq_char)*?) (\#) ([cgimosxpadlunbB]*) /cgox) { } 0 269 269
5464 0 return e_qr($ope,$1,$3,$2,$4);
5465 }
5466 else {
5467 269 my $e = '';
5468 269 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 269 0 269
5469 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
5470 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m ( )
5471 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m { }
5472 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m [ ]
5473 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m < >
5474 18 elsif (/\G (\?) ((?:$qq_char)*?) (\?) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m ? ?
5475 13 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr_q($ope,$1, $3, $2,$4); } # m ' '
5476 0 elsif (/\G ([*\-:\\^|]) ((?:$qq_char)*?) (\1) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,'{','}',$2,$4); } # m | | --> m { }
5477 238 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cgimosxpadlunbB]*) /oxgc) { return $e . e_qr ($ope,$1, $3, $2,$4); } # m * *
5478 }
5479 0 die __FILE__, ": Search pattern not terminated\n";
5480 }
5481 }
5482  
5483 # s///
5484  
5485 # about [cegimosxpradlunbB]* (/cg modifier)
5486 #
5487 # P.67 Pattern-Matching Operators
5488 # of ISBN 0-596-00241-6 Perl in a Nutshell, Second Edition.
5489  
5490 elsif (/\G \b (s) \b /oxgc) {
5491 136 my $ope = $1;
5492  
5493 # $1 $2 $3 $4 $5 $6
5494 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
5495 1 return e_sub($sub_variable,$1,$2,$3,$3,$4,$5,$6);
5496 }
5497 else {
5498 135 my $e = '';
5499 135 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 135 0 135
5500 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
5501 elsif (/\G (\() ((?:$qq_paren)*?) (\)) /oxgc) {
5502 0 my @s = ($1,$2,$3);
5503 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5504 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
5505 # $1 $2 $3 $4
5506 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5507 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5508 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5509 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5510 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5511 0 elsif (/\G (\$) ((?:$qq_char)*?) (\$) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5512 0 elsif (/\G (\:) ((?:$qq_char)*?) (\:) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5513 0 elsif (/\G (\@) ((?:$qq_char)*?) (\@) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5514 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5515 }
5516 0 die __FILE__, ": Substitution replacement not terminated\n";
5517 }
5518 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) {
5519 0 my @s = ($1,$2,$3);
5520 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5521 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
5522 # $1 $2 $3 $4
5523 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5524 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5525 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5526 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5527 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5528 0 elsif (/\G (\$) ((?:$qq_char)*?) (\$) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5529 0 elsif (/\G (\:) ((?:$qq_char)*?) (\:) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5530 0 elsif (/\G (\@) ((?:$qq_char)*?) (\@) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5531 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5532 }
5533 0 die __FILE__, ": Substitution replacement not terminated\n";
5534 }
5535 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) {
5536 0 my @s = ($1,$2,$3);
5537 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5538 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
5539 # $1 $2 $3 $4
5540 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5541 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5542 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5543 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5544 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5545 0 elsif (/\G (\$) ((?:$qq_char)*?) (\$) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5546 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5547 }
5548 0 die __FILE__, ": Substitution replacement not terminated\n";
5549 }
5550 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) {
5551 0 my @s = ($1,$2,$3);
5552 0 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 0 0 0
5553 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
5554 # $1 $2 $3 $4
5555 0 elsif (/\G (\() ((?:$qq_paren)*?) (\)) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5556 0 elsif (/\G (\{) ((?:$qq_brace)*?) (\}) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5557 0 elsif (/\G (\[) ((?:$qq_bracket)*?) (\]) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5558 0 elsif (/\G (\<) ((?:$qq_angle)*?) (\>) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5559 0 elsif (/\G (\') ((?:$qq_char)*?) (\') ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5560 0 elsif (/\G (\$) ((?:$qq_char)*?) (\$) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5561 0 elsif (/\G (\:) ((?:$qq_char)*?) (\:) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5562 0 elsif (/\G (\@) ((?:$qq_char)*?) (\@) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5563 0 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) { return e_sub($sub_variable,@s,$1,$2,$3,$4); }
5564 }
5565 0 die __FILE__, ": Substitution replacement not terminated\n";
5566 }
5567 # $1 $2 $3 $4 $5 $6
5568 elsif (/\G (\') ((?:$qq_char)*?) (\') ((?:$qq_char)*?) (\') ([cegimosxpradlunbB]*) /oxgc) {
5569 22 return e_sub($sub_variable,$1,$2,$3,$3,$4,$5,$6);
5570 }
5571 # $1 $2 $3 $4 $5 $6
5572 elsif (/\G ([*\-:?\\^|]) ((?:$qq_char)*?) (\1) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) {
5573 2 return e_sub($sub_variable,'{',$2,'}','{',$4,'}',$6); # s | | | --> s { } { }
5574 }
5575 # $1 $2 $3 $4 $5 $6
5576 elsif (/\G (\$) ((?:$qq_char)*?) (\1) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) {
5577 0 return e_sub($sub_variable,$1,$2,$3,$3,$4,$5,$6);
5578 }
5579 # $1 $2 $3 $4 $5 $6
5580 elsif (/\G (\S) ((?:$qq_char)*?) (\1) ((?:$qq_char)*?) (\1) ([cegimosxpradlunbB]*) /oxgc) {
5581 111 return e_sub($sub_variable,$1,$2,$3,$3,$4,$5,$6);
5582 }
5583 }
5584 0 die __FILE__, ": Substitution pattern not terminated\n";
5585 }
5586 }
5587  
5588 # require ignore module
5589 0 elsif (/\G \b require ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /oxmsgc) { return "# require$1$2"; }
5590 0 elsif (/\G \b require ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /oxmsgc) { return "# require$1\n$2"; }
5591 0 elsif (/\G \b require ((?>\s+) (?:$ignore_modules)) \b /oxmsgc) { return "# require$1"; }
5592  
5593 # use strict; --> use strict; no strict qw(refs);
5594 43 elsif (/\G \b use ((?>\s+) strict .*? ;) ([ \t]* [#\n]) /oxmsgc) { return "use$1 no strict qw(refs);$2"; }
5595 0 elsif (/\G \b use ((?>\s+) strict .*? ;) ([ \t]* [^\x80-\xFF#]) /oxmsgc) { return "use$1 no strict qw(refs);\n$2"; }
5596 0 elsif (/\G \b use ((?>\s+) strict) \b /oxmsgc) { return "use$1; no strict qw(refs)"; }
5597  
5598 # use 5.12.0; --> use 5.12.0; no strict qw(refs);
5599 elsif (/\G \b use (?>\s+) ((?>([1-9][0-9_]*)(?:\.([0-9_]+))*)) (?>\s*) ; /oxmsgc) {
5600 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
5601 0 return "use $1; no strict qw(refs);";
5602 }
5603 else {
5604 3 return "use $1;";
5605 }
5606 }
5607 elsif (/\G \b use (?>\s+) ((?>v([0-9][0-9_]*)(?:\.([0-9_]+))*)) (?>\s*) ; /oxmsgc) {
5608 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
5609 0 return "use $1; no strict qw(refs);";
5610 }
5611 else {
5612 0 return "use $1;";
5613 }
5614 }
5615  
5616 # ignore use module
5617 2 elsif (/\G \b use ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /oxmsgc) { return "# use$1$2"; }
5618 0 elsif (/\G \b use ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /oxmsgc) { return "# use$1\n$2"; }
5619 0 elsif (/\G \b use ((?>\s+) (?:$ignore_modules)) \b /oxmsgc) { return "# use$1"; }
5620  
5621 # ignore no module
5622 0 elsif (/\G \b no ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [#\n]) /oxmsgc) { return "# no$1$2"; }
5623 0 elsif (/\G \b no ((?>\s+) (?:$ignore_modules) .*? ;) ([ \t]* [^\x80-\xFF#]) /oxmsgc) { return "# no$1\n$2"; }
5624 0 elsif (/\G \b no ((?>\s+) (?:$ignore_modules)) \b /oxmsgc) { return "# no$1"; }
5625  
5626 # use else
5627 0 elsif (/\G \b use \b /oxmsgc) { return "use"; }
5628  
5629 # use else
5630 2 elsif (/\G \b no \b /oxmsgc) { return "no"; }
5631  
5632 # ''
5633 elsif (/\G (?<![\w\$\@\%\&\*]) (\') /oxgc) {
5634 1885 my $q_string = '';
5635 1885 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 12447 0 12447
5636 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
5637 48 elsif (/\G (\\\') /oxgc) { $q_string .= $1; }
5638 1885 elsif (/\G \' /oxgc) { return e_q('', "'","'",$q_string); }
5639 10510 elsif (/\G ($q_char) /oxgc) { $q_string .= $1; }
5640 }
5641 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5642 }
5643  
5644 # ""
5645 elsif (/\G (\") /oxgc) {
5646 5683 my $qq_string = '';
5647 5683 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 88875 0 88875
5648 88875 ▶ if (/\G (\\\\) /oxgc) { $qq_string .= $1; }
Branch: 4 branches
BranchTrueFalseTotal
if (/\G (\\\\) /cgox) { } 109 88766 88875
elsif (/\G (\\\") /cgox) { } 12 88754 88766
elsif (/\G \" /cgox) { } 5683 83071 88754
elsif (/\G ($Eutf2::q_char) /cgox) { } 83071 0 83071
5649 12 elsif (/\G (\\\") /oxgc) { $qq_string .= $1; }
5650 5683 elsif (/\G \" /oxgc) { return e_qq('', '"','"',$qq_string); }
5651 83071 elsif (/\G ($q_char) /oxgc) { $qq_string .= $1; }
5652 }
5653 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5654 }
5655  
5656 # ``
5657 elsif (/\G (\`) /oxgc) {
5658 1 my $qx_string = '';
5659 1 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 19 0 19
5660 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
5661 0 elsif (/\G (\\\`) /oxgc) { $qx_string .= $1; }
5662 1 elsif (/\G \` /oxgc) { return e_qq('', '`','`',$qx_string); }
5663 18 elsif (/\G ($q_char) /oxgc) { $qx_string .= $1; }
5664 }
5665 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
5666 }
5667  
5668 # // --- not divide operator (num / num), not defined-or
5669 ▶ elsif (($slash eq 'm//') and /\G (\/) /oxgc) {
Condition100%3/3
$Eutf2::slash eq "m//" and m[\G (/) ]cgox
!ll&&!rl&&r
41670139971299
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
5670 1299 my $regexp = '';
5671 1299 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 11165 0 11165
5672 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
5673 0 elsif (/\G (\\\/) /oxgc) { $regexp .= $1; }
5674 1299 elsif (/\G \/ ([cgimosxpadlunbB]*) /oxgc) { return e_qr('', '/','/',$regexp,$1); }
5675 9865 elsif (/\G ($q_char) /oxgc) { $regexp .= $1; }
5676 }
5677 0 die __FILE__, ": Search pattern not terminated\n";
5678 }
5679  
5680 # ?? --- not conditional operator (condition ? then : else)
5681 ▶ elsif (($slash eq 'm//') and /\G (\?) /oxgc) {
Condition100%3/3
$Eutf2::slash eq "m//" and /\G (\?) /cgox
!ll&&!rl&&r
416701397918
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
5682 18 my $regexp = '';
5683 18 ▶ while (not /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless (/\G \z/cgox) 82 0 82
5684 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
5685 0 elsif (/\G (\\\?) /oxgc) { $regexp .= $1; }
5686 18 elsif (/\G \? ([cgimosxpadlunbB]*) /oxgc) { return e_qr('m','?','?',$regexp,$1); }
5687 64 elsif (/\G ($q_char) /oxgc) { $regexp .= $1; }
5688 }
5689 0 die __FILE__, ": Search pattern not terminated\n";
5690 }
5691  
5692 # <<>> (a safer ARGV)
5693 0 elsif (/\G ( <<>> ) /oxgc) { $slash = 'm//'; return $1; }
5694  
5695 # << (bit shift) --- not here document
5696 0 elsif (/\G ( << (?>\s*) ) (?= [0-9\$\@\&] ) /oxgc) { $slash = 'm//'; return $1; }
5697  
5698 # <<~'HEREDOC'
5699 elsif (/\G ( <<~ [\t ]* '([a-zA-Z_0-9]*)' ) /oxgc) {
5700 6 $slash = 'm//';
5701 6 my $here_quote = $1;
5702 6 my $delimiter = $2;
5703  
5704 # get here document
5705 6 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 6 0 6
5706 6 $here_script = CORE::substr $_, pos $_;
5707 6 $here_script =~ s/.*?\n//oxm;
5708 }
5709 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
5710 6 my $heredoc = $1;
5711 6 my $indent = $2;
5712 6 $heredoc =~ s{^$indent}{}msg; # no /ox
5713 6 push @heredoc, $heredoc . qq{\n$delimiter\n};
5714 6 push @heredoc_delimiter, qq{\\s*$delimiter};
5715 }
5716 else {
5717 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5718 }
5719 6 return qq{<<'$delimiter'};
5720 }
5721  
5722 # <<~\HEREDOC
5723  
5724 # P.66 2.6.6. "Here" Documents
5725 # in Chapter 2: Bits and Pieces
5726 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
5727  
5728 # P.73 "Here" Documents
5729 # in Chapter 2: Bits and Pieces
5730 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
5731  
5732 elsif (/\G ( <<~ \\([a-zA-Z_0-9]+) ) /oxgc) {
5733 3 $slash = 'm//';
5734 3 my $here_quote = $1;
5735 3 my $delimiter = $2;
5736  
5737 # get here document
5738 3 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 3 0 3
5739 3 $here_script = CORE::substr $_, pos $_;
5740 3 $here_script =~ s/.*?\n//oxm;
5741 }
5742 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
5743 3 my $heredoc = $1;
5744 3 my $indent = $2;
5745 3 $heredoc =~ s{^$indent}{}msg; # no /ox
5746 3 push @heredoc, $heredoc . qq{\n$delimiter\n};
5747 3 push @heredoc_delimiter, qq{\\s*$delimiter};
5748 }
5749 else {
5750 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5751 }
5752 3 return qq{<<\\$delimiter};
5753 }
5754  
5755 # <<~"HEREDOC"
5756 elsif (/\G ( <<~ [\t ]* "([a-zA-Z_0-9]*)" ) /oxgc) {
5757 6 $slash = 'm//';
5758 6 my $here_quote = $1;
5759 6 my $delimiter = $2;
5760  
5761 # get here document
5762 6 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 6 0 6
5763 6 $here_script = CORE::substr $_, pos $_;
5764 6 $here_script =~ s/.*?\n//oxm;
5765 }
5766 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
5767 6 my $heredoc = $1;
5768 6 my $indent = $2;
5769 6 $heredoc =~ s{^$indent}{}msg; # no /ox
5770 6 push @heredoc, e_heredoc($heredoc) . qq{\n$delimiter\n};
5771 6 push @heredoc_delimiter, qq{\\s*$delimiter};
5772 }
5773 else {
5774 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5775 }
5776 6 return qq{<<"$delimiter"};
5777 }
5778  
5779 # <<~HEREDOC
5780 elsif (/\G ( <<~ ([a-zA-Z_0-9]+) ) /oxgc) {
5781 3 $slash = 'm//';
5782 3 my $here_quote = $1;
5783 3 my $delimiter = $2;
5784  
5785 # get here document
5786 3 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 3 0 3
5787 3 $here_script = CORE::substr $_, pos $_;
5788 3 $here_script =~ s/.*?\n//oxm;
5789 }
5790 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
5791 3 my $heredoc = $1;
5792 3 my $indent = $2;
5793 3 $heredoc =~ s{^$indent}{}msg; # no /ox
5794 3 push @heredoc, e_heredoc($heredoc) . qq{\n$delimiter\n};
5795 3 push @heredoc_delimiter, qq{\\s*$delimiter};
5796 }
5797 else {
5798 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5799 }
5800 3 return qq{<<$delimiter};
5801 }
5802  
5803 # <<~`HEREDOC`
5804 elsif (/\G ( <<~ [\t ]* `([a-zA-Z_0-9]*)` ) /oxgc) {
5805 6 $slash = 'm//';
5806 6 my $here_quote = $1;
5807 6 my $delimiter = $2;
5808  
5809 # get here document
5810 6 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 6 0 6
5811 6 $here_script = CORE::substr $_, pos $_;
5812 6 $here_script =~ s/.*?\n//oxm;
5813 }
5814 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
5815 6 my $heredoc = $1;
5816 6 my $indent = $2;
5817 6 $heredoc =~ s{^$indent}{}msg; # no /ox
5818 6 push @heredoc, e_heredoc($heredoc) . qq{\n$delimiter\n};
5819 6 push @heredoc_delimiter, qq{\\s*$delimiter};
5820 }
5821 else {
5822 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5823 }
5824 6 return qq{<<`$delimiter`};
5825 }
5826  
5827 # <<'HEREDOC'
5828 elsif (/\G ( << '([a-zA-Z_0-9]*)' ) /oxgc) {
5829 80 $slash = 'm//';
5830 80 my $here_quote = $1;
5831 80 my $delimiter = $2;
5832  
5833 # get here document
5834 80 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 77 3 80
5835 77 $here_script = CORE::substr $_, pos $_;
5836 77 $here_script =~ s/.*?\n//oxm;
5837 }
5838 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
5839 80 push @heredoc, $1 . qq{\n$delimiter\n};
5840 80 push @heredoc_delimiter, $delimiter;
5841 }
5842 else {
5843 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5844 }
5845 80 return $here_quote;
5846 }
5847  
5848 # <<\HEREDOC
5849  
5850 # P.66 2.6.6. "Here" Documents
5851 # in Chapter 2: Bits and Pieces
5852 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
5853  
5854 # P.73 "Here" Documents
5855 # in Chapter 2: Bits and Pieces
5856 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
5857  
5858 elsif (/\G ( << \\([a-zA-Z_0-9]+) ) /oxgc) {
5859 2 $slash = 'm//';
5860 2 my $here_quote = $1;
5861 2 my $delimiter = $2;
5862  
5863 # get here document
5864 2 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 1 1 2
5865 1 $here_script = CORE::substr $_, pos $_;
5866 1 $here_script =~ s/.*?\n//oxm;
5867 }
5868 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
5869 2 push @heredoc, $1 . qq{\n$delimiter\n};
5870 2 push @heredoc_delimiter, $delimiter;
5871 }
5872 else {
5873 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5874 }
5875 2 return $here_quote;
5876 }
5877  
5878 # <<"HEREDOC"
5879 elsif (/\G ( << "([a-zA-Z_0-9]*)" ) /oxgc) {
5880 39 $slash = 'm//';
5881 39 my $here_quote = $1;
5882 39 my $delimiter = $2;
5883  
5884 # get here document
5885 39 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 38 1 39
5886 38 $here_script = CORE::substr $_, pos $_;
5887 38 $here_script =~ s/.*?\n//oxm;
5888 }
5889 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
5890 39 push @heredoc, e_heredoc($1) . qq{\n$delimiter\n};
5891 39 push @heredoc_delimiter, $delimiter;
5892 }
5893 else {
5894 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5895 }
5896 39 return $here_quote;
5897 }
5898  
5899 # <<HEREDOC
5900 elsif (/\G ( << ([a-zA-Z_0-9]+) ) /oxgc) {
5901 54 $slash = 'm//';
5902 54 my $here_quote = $1;
5903 54 my $delimiter = $2;
5904  
5905 # get here document
5906 54 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 51 3 54
5907 51 $here_script = CORE::substr $_, pos $_;
5908 51 $here_script =~ s/.*?\n//oxm;
5909 }
5910 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
5911 54 push @heredoc, e_heredoc($1) . qq{\n$delimiter\n};
5912 54 push @heredoc_delimiter, $delimiter;
5913 }
5914 else {
5915 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5916 }
5917 54 return $here_quote;
5918 }
5919  
5920 # <<`HEREDOC`
5921 elsif (/\G ( << `([a-zA-Z_0-9]*)` ) /oxgc) {
5922 0 $slash = 'm//';
5923 0 my $here_quote = $1;
5924 0 my $delimiter = $2;
5925  
5926 # get here document
5927 0 ▶ if ($here_script eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($here_script eq "") 0 0 0
5928 0 $here_script = CORE::substr $_, pos $_;
5929 0 $here_script =~ s/.*?\n//oxm;
5930 }
5931 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
5932 0 push @heredoc, e_heredoc($1) . qq{\n$delimiter\n};
5933 0 push @heredoc_delimiter, $delimiter;
5934 }
5935 else {
5936 0 die __FILE__, ": Can't find string terminator $delimiter anywhere before EOF\n";
5937 }
5938 0 return $here_quote;
5939 }
5940  
5941 # <<= <=> <= < operator
5942 elsif (/\G ( <<= | <=> | <= | < ) (?= (?>\s*) [A-Za-z_0-9'"`\$\@\&\*\(\+\-] )/oxgc) {
5943 12 return $1;
5944 }
5945  
5946 # <FILEHANDLE>
5947 elsif (/\G (<[\$]?[A-Za-z_][A-Za-z_0-9]*>) /oxgc) {
5948 0 return $1;
5949 }
5950  
5951 # <WILDCARD> --- glob
5952  
5953 # avoid "Error: Runtime exception" of perl version 5.005_03
5954  
5955 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) {
5956 0 return 'Eutf2::glob("' . $1 . '")';
5957 }
5958  
5959 # __DATA__
5960 0 elsif (/\G ^ ( __DATA__ \n .*) \z /oxmsgc) { return $1; }
5961  
5962 # __END__
5963 312 elsif (/\G ^ ( __END__ \n .*) \z /oxmsgc) { return $1; }
5964  
5965 # \cD Control-D
5966  
5967 # P.68 2.6.8. Other Literal Tokens
5968 # in Chapter 2: Bits and Pieces
5969 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
5970  
5971 # P.76 Other Literal Tokens
5972 # in Chapter 2: Bits and Pieces
5973 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
5974  
5975 0 elsif (/\G ( \cD .*) \z /oxmsgc) { return $1; }
5976  
5977 # \cZ Control-Z
5978 0 elsif (/\G ( \cZ .*) \z /oxmsgc) { return $1; }
5979  
5980 # any operator before div
5981 elsif (/\G (
5982 -- | \+\+ |
5983 [\)\}\]]
5984  
5985 9324 ) /oxgc) { $slash = 'div'; return $1; }
5986  
5987 # yada-yada or triple-dot operator
5988 elsif (/\G (
5989 \.\.\.
5990  
5991 7 ) /oxgc) { $slash = 'm//'; return q{die('Unimplemented')}; }
5992  
5993 # any operator before m//
5994  
5995 # //, //= (defined-or)
5996  
5997 # P.164 Logical Operators
5998 # in Chapter 10: More Control Structures
5999 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
6000  
6001 # P.119 C-Style Logical (Short-Circuit) Operators
6002 # in Chapter 3: Unary and Binary Operators
6003 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
6004  
6005 # (and so on)
6006  
6007 # ~~
6008  
6009 # P.221 The Smart Match Operator
6010 # in Chapter 15: Smart Matching and given-when
6011 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
6012  
6013 # P.112 Smartmatch Operator
6014 # in Chapter 3: Unary and Binary Operators
6015 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
6016  
6017 # (and so on)
6018  
6019 elsif (/\G ((?>
6020  
6021 !~~ | !~ | != | ! |
6022 %= | % |
6023 &&= | && | &= | &\.= | &\. | & |
6024 -= | -> | - |
6025 :(?>\s*)= |
6026 : |
6027 <<>> |
6028 <<= | <=> | <= | < |
6029 == | => | =~ | = |
6030 >>= | >> | >= | > |
6031 \*\*= | \*\* | \*= | \* |
6032 \+= | \+ |
6033 \.\. | \.= | \. |
6034 \/\/= | \/\/ |
6035 \/= | \/ |
6036 \? |
6037 \\ |
6038 \^= | \^\.= | \^\. | \^ |
6039 \b x= |
6040 \|\|= | \|\| | \|= | \|\.= | \|\. | \| |
6041 ~~ | ~\. | ~ |
6042 \b(?: and | cmp | eq | ge | gt | le | lt | ne | not | or | xor | x )\b |
6043 \b(?: print )\b |
6044  
6045 [,;\(\{\[]
6046  
6047 17287 )) /oxgc) { $slash = 'm//'; return $1; }
6048  
6049 # other any character
6050 28508 elsif (/\G ($q_char) /oxgc) { $slash = 'div'; return $1; }
6051  
6052 # system error
6053 else {
6054 0 die __FILE__, ": Oops, this shouldn't happen!\n";
6055 }
6056 }
6057  
6058 # escape UTF-8 string
6059 2609 ▶sub e_string {
Subroutine e_string: called CC=54 SCAR=71.8
Pod documented
6060 2609 my($string) = @_;
6061 2609 my $e_string = '';
6062  
6063 2609 local $slash = 'm//';
6064  
6065 # P.1024 Appendix W.10 Multibyte Processing
6066 # of ISBN 1-56592-224-7 CJKV Information Processing
6067 # (and so on)
6068  
6069 2609 my @char = $string =~ / \G (?>[^\x80-\xFF\\]|\\$q_char|$q_char) /oxmsg;
6070  
6071 # without { ... }
6072 2609 ▶ 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 51 2609
Condition66%2/3
grep /\A \{ \z/msx, @char and grep /\A \} \z/msx, @char
!ll&&!rl&&r
2558051
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
6073 2558 ▶ if ($string !~ /<</oxms) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /<</mosx) 2558 0 2558
6074 2558 return $string;
6075 }
6076 }
6077  
6078 E_STRING_LOOP:
6079 51 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 466 51 517
6080 466 ▶ if (0) {
Branch: 24 branches
BranchTrueFalseTotal
if (do { $string =~ /\G ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH \b | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) /cgmosx }) { } 0 466 466
elsif ($string =~ /\G ( \$& | \$\{&\} | \$ (?>\s*) MATCH \b | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) /cgmosx) { } 0 466 466
elsif ($string =~ /\G ( \$' | \$\{'\} ) /cgmosx) { } 0 466 466
elsif ($string =~ /\G ( \$ (?>\s*) POSTMATCH \b | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) /cgmosx) { } 0 466 466
elsif ($string =~ /\G ( \{ (?>\s*) (?: tr | index | rindex | reverse ) (?>\s*) \} ) /cgmosx) { } 0 466 466
elsif ($string =~ /\G ( \$ 0 ) /cgmosx) { } 0 466 466
elsif ($string =~ /\G ( \$ \{ (?>\s*) 0 (?>\s*) \} ) /cgmosx) { } 0 466 466
elsif ($string =~ /\G ( \$ \$ ) (?![\w\{]) /cgmosx) { } 0 466 466
elsif ($string =~ /\G \$ ((?>[1-9][0-9]*)) /cgmosx) { } 0 466 466
elsif ($string =~ /\G \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} /cgmosx) { } 0 466 466
elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ .+? \] ) /cgmosx) { } 0 466 466
elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ .+? \} ) /cgmosx) { } 0 466 466
elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) /cgmosx) { } 0 466 466
elsif ($string =~ /\G \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} /cgmosx) { } 0 466 466
elsif ($string =~ /\G \$ (?>\s*) \{ (?>\s*) ( $qq_brace ) (?>\s*) \} /cgmosx) { } 3 463 466
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 462 463
elsif ($string =~ m{\G ( \$[\$\@\#\\\'\"/\?\(\)\[\]\<\>] ) }cgmosx) { } 0 462 462
elsif ($string =~ /\G \b (qq) \b /cgox) { } 0 462 462
elsif ($string =~ /\G \b (qx) \b /cgox) { } 0 462 462
elsif ($string =~ /\G \b (q) \b /cgox) { } 0 462 462
elsif ($string =~ /\G (?<![\w\$\@\%\&\*]) (\') ((?:\\\'|\\\\|$Eutf2::q_char)*?) (\') /cgox) { } 12 450 462
elsif ($string =~ /\G (\") ((?:$Eutf2::qq_char)*?) (\") /cgox) { } 6 444 450
elsif ($string =~ /\G (\`) ((?:$Eutf2::qq_char)*?) (\`) /cgox) { } 0 444 444
elsif ($string =~ /\G ($Eutf2::q_char) /cgox) { } 444 0 444
6081 }
6082  
6083 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> @{[Eutf2::PREMATCH()]}
6084 elsif ($string =~ /\G ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH \b | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) /oxmsgc) {
6085 0 $e_string .= q{Eutf2::PREMATCH()};
6086 0 $slash = 'div';
6087 }
6088  
6089 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> @{[Eutf2::MATCH()]}
6090 elsif ($string =~ /\G ( \$& | \$\{&\} | \$ (?>\s*) MATCH \b | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) /oxmsgc) {
6091 0 $e_string .= q{Eutf2::MATCH()};
6092 0 $slash = 'div';
6093 }
6094  
6095 # $', ${'} --> $', ${'}
6096 elsif ($string =~ /\G ( \$' | \$\{'\} ) /oxmsgc) {
6097 0 $e_string .= $1;
6098 0 $slash = 'div';
6099 }
6100  
6101 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> @{[Eutf2::POSTMATCH()]}
6102 elsif ($string =~ /\G ( \$ (?>\s*) POSTMATCH \b | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) /oxmsgc) {
6103 0 $e_string .= q{Eutf2::POSTMATCH()};
6104 0 $slash = 'div';
6105 }
6106  
6107 # bareword
6108 elsif ($string =~ /\G ( \{ (?>\s*) (?: tr | index | rindex | reverse ) (?>\s*) \} ) /oxmsgc) {
6109 0 $e_string .= $1;
6110 0 $slash = 'div';
6111 }
6112  
6113 # $0 --> $0
6114 elsif ($string =~ /\G ( \$ 0 ) /oxmsgc) {
6115 0 $e_string .= $1;
6116 0 $slash = 'div';
6117 }
6118 elsif ($string =~ /\G ( \$ \{ (?>\s*) 0 (?>\s*) \} ) /oxmsgc) {
6119 0 $e_string .= $1;
6120 0 $slash = 'div';
6121 }
6122  
6123 # $$ --> $$
6124 elsif ($string =~ /\G ( \$ \$ ) (?![\w\{]) /oxmsgc) {
6125 0 $e_string .= $1;
6126 0 $slash = 'div';
6127 }
6128  
6129 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
6130 # $1, $2, $3 --> $1, $2, $3 otherwise
6131 elsif ($string =~ /\G \$ ((?>[1-9][0-9]*)) /oxmsgc) {
6132 0 $e_string .= e_capture($1);
6133 0 $slash = 'div';
6134 }
6135 elsif ($string =~ /\G \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} /oxmsgc) {
6136 0 $e_string .= e_capture($1);
6137 0 $slash = 'div';
6138 }
6139  
6140 # $$foo[ ... ] --> $ $foo->[ ... ]
6141 elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ .+? \] ) /oxmsgc) {
6142 0 $e_string .= e_capture($1.'->'.$2);
6143 0 $slash = 'div';
6144 }
6145  
6146 # $$foo{ ... } --> $ $foo->{ ... }
6147 elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ .+? \} ) /oxmsgc) {
6148 0 $e_string .= e_capture($1.'->'.$2);
6149 0 $slash = 'div';
6150 }
6151  
6152 # $$foo
6153 elsif ($string =~ /\G \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) /oxmsgc) {
6154 0 $e_string .= e_capture($1);
6155 0 $slash = 'div';
6156 }
6157  
6158 # ${ foo }
6159 elsif ($string =~ /\G \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} /oxmsgc) {
6160 0 $e_string .= '${' . $1 . '}';
6161 0 $slash = 'div';
6162 }
6163  
6164 # ${ ... }
6165 elsif ($string =~ /\G \$ (?>\s*) \{ (?>\s*) ( $qq_brace ) (?>\s*) \} /oxmsgc) {
6166 3 $e_string .= e_capture($1);
6167 3 $slash = 'div';
6168 }
6169  
6170 # variable or function
6171 # $ @ % & * $ #
6172 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) {
6173 1 $e_string .= $1;
6174 1 $slash = 'div';
6175 }
6176 # $ $ $ $ $ $ $ $ $ $ $ $ $ $
6177 # $ @ # \ ' " / ? ( ) [ ] < >
6178 elsif ($string =~ /\G ( \$[\$\@\#\\\'\"\/\?\(\)\[\]\<\>] ) /oxmsgc) {
6179 0 $e_string .= $1;
6180 0 $slash = 'div';
6181 }
6182  
6183 # qq//
6184 elsif ($string =~ /\G \b (qq) \b /oxgc) {
6185 0 my $ope = $1;
6186 0 ▶ if ($string =~ /\G (\#) ((?:$qq_char)*?) (\#) /oxgc) { # qq# #
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G (\#) ((?:$Eutf2::qq_char)*?) (\#) /cgox) { } 0 0 0
6187 0 $e_string .= e_qq($ope,$1,$3,$2);
6188 }
6189 else {
6190 0 my $e = '';
6191 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6192 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
6193 0 elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qq ( )
6194 0 elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qq { }
6195 0 elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qq [ ]
6196 0 elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qq < >
6197 0 elsif ($string =~ /\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qq * *
6198 }
6199 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6200 }
6201 }
6202  
6203 # qx//
6204 elsif ($string =~ /\G \b (qx) \b /oxgc) {
6205 0 my $ope = $1;
6206 0 ▶ if ($string =~ /\G (\#) ((?:$qq_char)*?) (\#) /oxgc) { # qx# #
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G (\#) ((?:$Eutf2::qq_char)*?) (\#) /cgox) { } 0 0 0
6207 0 $e_string .= e_qq($ope,$1,$3,$2);
6208 }
6209 else {
6210 0 my $e = '';
6211 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6212 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
6213 0 elsif ($string =~ /\G (\() ((?:$qq_paren)*?) (\)) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qx ( )
6214 0 elsif ($string =~ /\G (\{) ((?:$qq_brace)*?) (\}) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qx { }
6215 0 elsif ($string =~ /\G (\[) ((?:$qq_bracket)*?) (\]) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qx [ ]
6216 0 elsif ($string =~ /\G (\<) ((?:$qq_angle)*?) (\>) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qx < >
6217 0 elsif ($string =~ /\G (\') ((?:$qq_char)*?) (\') /oxgc) { $e_string .= $e . e_q ($ope,$1,$3,$2); next E_STRING_LOOP; } # qx ' '
6218 0 elsif ($string =~ /\G (\S) ((?:$qq_char)*?) (\1) /oxgc) { $e_string .= $e . e_qq($ope,$1,$3,$2); next E_STRING_LOOP; } # qx * *
6219 }
6220 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6221 }
6222 }
6223  
6224 # q//
6225 elsif ($string =~ /\G \b (q) \b /oxgc) {
6226 0 my $ope = $1;
6227 0 ▶ if ($string =~ /\G (\#) ((?:\\\#|\\\\|$q_char)*?) (\#) /oxgc) { # q# #
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\G (\#) ((?:\\\#|\\\\|$Eutf2::q_char)*?) (\#) /cgox) { } 0 0 0
6228 0 $e_string .= e_q($ope,$1,$3,$2);
6229 }
6230 else {
6231 0 my $e = '';
6232 0 ▶ while ($string !~ /\G \z/oxgc) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($string =~ /\G \z/cgox) 0 0 0
6233 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
6234 0 elsif ($string =~ /\G (\() ((?:\\\\|\\\)|\\\(|$q_paren)*?) (\)) /oxgc) { $e_string .= $e . e_q($ope,$1,$3,$2); next E_STRING_LOOP; } # q ( )
6235 0 elsif ($string =~ /\G (\{) ((?:\\\\|\\\}|\\\{|$q_brace)*?) (\}) /oxgc) { $e_string .= $e . e_q($ope,$1,$3,$2); next E_STRING_LOOP; } # q { }
6236 0 elsif ($string =~ /\G (\[) ((?:\\\\|\\\]|\\\[|$q_bracket)*?) (\]) /oxgc) { $e_string .= $e . e_q($ope,$1,$3,$2); next E_STRING_LOOP; } # q [ ]
6237 0 elsif ($string =~ /\G (\<) ((?:\\\\|\\\>|\\\<|$q_angle)*?) (\>) /oxgc) { $e_string .= $e . e_q($ope,$1,$3,$2); next E_STRING_LOOP; } # q < >
6238 0 elsif ($string =~ /\G (\S) ((?:\\\\|\\\1| $q_char)*?) (\1) /oxgc) { $e_string .= $e . e_q($ope,$1,$3,$2); next E_STRING_LOOP; } # q * *
6239 }
6240 0 die __FILE__, ": Can't find string terminator anywhere before EOF\n";
6241 }
6242 }
6243  
6244 # ''
6245 12 elsif ($string =~ /\G (?<![\w\$\@\%\&\*]) (\') ((?:\\\'|\\\\|$q_char)*?) (\') /oxgc) { $e_string .= e_q('',$1,$3,$2); }
6246  
6247 # ""
6248 6 elsif ($string =~ /\G (\") ((?:$qq_char)*?) (\") /oxgc) { $e_string .= e_qq('',$1,$3,$2); }
6249  
6250 # ``
6251 0 elsif ($string =~ /\G (\`) ((?:$qq_char)*?) (\`) /oxgc) { $e_string .= e_qq('',$1,$3,$2); }
6252  
6253 # other any character
6254 444 elsif ($string =~ /\G ($q_char) /oxgc) { $e_string .= $1; }
6255  
6256 # system error
6257 else {
6258 0 die __FILE__, ": Oops, this shouldn't happen!\n";
6259 }
6260 }
6261  
6262 51 return $e_string;
6263 }
6264  
6265 #
6266 # character class
6267 #
6268 2941 ▶sub character_class {
Subroutine character_class: called CC=3 SCAR=11.0
Pod undocumented
6269 2941 my($char,$modifier) = @_;
6270  
6271 2941 ▶ if ($char eq '.') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char eq '.') { } 115 2826 2941
6272 115 ▶ if ($modifier =~ /s/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /s/) { } 23 92 115
6273 23 return '${Eutf2::dot_s}';
6274 }
6275 else {
6276 92 return '${Eutf2::dot}';
6277 }
6278 }
6279 else {
6280 2826 return Eutf2::classic_character_class($char);
6281 }
6282 }
6283  
6284 #
6285 # escape capture ($1, $2, $3, ...)
6286 #
6287 469 ▶sub e_capture {
Subroutine e_capture: called CC=1 SCAR=0.0
Pod undocumented
6288  
6289 469 return join '', '${', $_[0], '}';
6290 }
6291  
6292 #
6293 # escape transliteration (tr/// or y///)
6294 #
6295 12 ▶sub e_tr {
Subroutine e_tr: called CC=5 SCAR=16.8
Pod undocumented
6296 12 my($variable,$charclass,$e,$charclass2,$modifier) = @_;
6297 12 my $e_tr = '';
6298 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
6299  
6300 12 $slash = 'div';
6301  
6302 # quote character class 1
6303 12 $charclass = q_tr($charclass);
6304  
6305 # quote character class 2
6306 12 $charclass2 = q_tr($charclass2);
6307  
6308 # /b /B modifier
6309 12 ▶ if ($modifier =~ tr/bB//d) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ tr/Bb//d) { } 0 12 12
6310 0 ▶ if ($variable eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($variable eq '') { } 0 0 0
6311 0 $e_tr = qq{tr$charclass$e$charclass2$modifier};
6312 }
6313 else {
6314 0 $e_tr = qq{$variable${bind_operator}tr$charclass$e$charclass2$modifier};
6315 }
6316 }
6317 else {
6318 12 ▶ if ($variable eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($variable eq '') { } 2 10 12
6319 2 $e_tr = qq{Eutf2::tr(\$_,' =~ ',$charclass,$e$charclass2,'$modifier')};
6320 }
6321 else {
6322 10 $e_tr = qq{Eutf2::tr($variable,'$bind_operator',$charclass,$e$charclass2,'$modifier')};
6323 }
6324 }
6325  
6326 # clear tr/// variable
6327 12 $tr_variable = '';
6328 12 $bind_operator = '';
6329  
6330 12 return $e_tr;
6331 }
6332  
6333 #
6334 # quote for escape transliteration (tr/// or y///)
6335 #
6336 24 ▶sub q_tr {
Subroutine q_tr: called CC=9 SCAR=40.6
Pod undocumented
6337 24 my($charclass) = @_;
6338  
6339 # quote character class
6340 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
6341 24 return e_q('', "'", "'", $charclass); # --> q' '
6342 }
6343 elsif ($charclass !~ /\//oxms) {
6344 0 return e_q('q', '/', '/', $charclass); # --> q/ /
6345 }
6346 elsif ($charclass !~ /\#/oxms) {
6347 0 return e_q('q', '#', '#', $charclass); # --> q# #
6348 }
6349 elsif ($charclass !~ /[\<\>]/oxms) {
6350 0 return e_q('q', '<', '>', $charclass); # --> q< >
6351 }
6352 elsif ($charclass !~ /[\(\)]/oxms) {
6353 0 return e_q('q', '(', ')', $charclass); # --> q( )
6354 }
6355 elsif ($charclass !~ /[\{\}]/oxms) {
6356 0 return e_q('q', '{', '}', $charclass); # --> q{ }
6357 }
6358 else {
6359 0 for my $char (qw( ! " $ % & * + . : = ? @ ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
6360 0 ▶ if ($charclass !~ /\Q$char\E/xms) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($charclass =~ /\Q$char\E/msx) 0 0 0
6361 0 return e_q('q', $char, $char, $charclass);
6362 }
6363 }
6364 }
6365  
6366 0 return e_q('q', '{', '}', $charclass);
6367 }
6368  
6369 #
6370 # escape q string (q//, '')
6371 #
6372 2511 ▶sub e_q {
Subroutine e_q: called CC=1 SCAR=0.0
Pod undocumented
6373 2511 my($ope,$delimiter,$end_delimiter,$string) = @_;
6374  
6375 2511 $slash = 'div';
6376  
6377 2511 return join '', $ope, $delimiter, $string, $end_delimiter;
6378 }
6379  
6380 #
6381 # escape qq string (qq//, "", qx//, ``)
6382 #
6383 9705 ▶sub e_qq {
Subroutine e_qq: called CC=37 SCAR=48.3
Pod undocumented
6384 9705 my($ope,$delimiter,$end_delimiter,$string) = @_;
6385  
6386 9705 $slash = 'div';
6387  
6388 9705 my $left_e = 0;
6389 9705 my $right_e = 0;
6390  
6391 # split regexp
6392 9705 my @char = $string =~ /\G((?>
6393 [^\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] |
6394 \\x\{ (?>[0-9A-Fa-f]+) \} |
6395 \\o\{ (?>[0-7]+) \} |
6396 \\N\{ (?>[^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} |
6397 \\ $q_char |
6398 \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} |
6399 \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} |
6400 \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} |
6401 \$ (?>\s* [0-9]+) |
6402 \$ (?>\s*) \{ (?>\s* [0-9]+ \s*) \} |
6403 \$ \$ (?![\w\{]) |
6404 \$ (?>\s*) \$ (?>\s*) $qq_variable |
6405 $q_char
6406 ))/oxmsg;
6407  
6408 9705 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 228387 9705 238092
6409  
6410 # "\L\u" --> "\u\L"
6411 228387 ▶ 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 228387 228387
elsif ($char[$i] eq '\\U' and $char[$i + 1] eq '\\l') { } 0 228387 228387
elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/mosx) { } 1 228386 228387
elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/mosx) { } 1 228385 228386
elsif ($char[$i] =~ /\A \\ ( N\{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/mosx) { } 0 228385 228385
Condition66%2/3
$char[$i] eq "\\L" and $char[$i + 1] eq "\\u"
!ll&&!rl&&r
22838160
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
6412 0 @char[$i,$i+1] = @char[$i+1,$i];
6413 }
6414  
6415 # "\U\l" --> "\l\U"
6416 ▶ 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
22838700
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
6417 0 @char[$i,$i+1] = @char[$i+1,$i];
6418 }
6419  
6420 # octal escape sequence
6421 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
6422 1 $char[$i] = Eutf2::octchr($1);
6423 }
6424  
6425 # hexadecimal escape sequence
6426 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
6427 1 $char[$i] = Eutf2::hexchr($1);
6428 }
6429  
6430 # \N{CHARNAME} --> N{CHARNAME}
6431 elsif ($char[$i] =~ /\A \\ ( N\{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
6432 0 $char[$i] = $1;
6433 }
6434  
6435 228387 ▶ if (0) {
Branch: 23 branches
BranchTrueFalseTotal
if (do { $char[$i] =~ /\A ([<>]) \z/mosx }) { } 602 227785 228387
elsif ($char[$i] eq '\\u') { } 0 227785 227785
elsif ($char[$i] eq '\\l') { } 0 227785 227785
elsif ($char[$i] eq '\\U') { } 0 227785 227785
elsif ($char[$i] eq '\\L') { } 6 227779 227785
elsif ($char[$i] eq '\\F') { } 23 227756 227779
elsif ($char[$i] eq '\\Q') { } 0 227756 227756
elsif ($char[$i] eq '\\E') { } 26 227730 227756
elsif ($char[$i] eq '\\Q') { } 0 227730 227730
elsif ($char[$i] eq '\\E') { } 0 227730 227730
elsif ($char[$i] =~ /\A \$ 0 \z/mosx) { } 18 227712 227730
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/mosx) { } 0 227712 227712
elsif ($char[$i] =~ /\A \$\$ \z/mosx) { } 0 227712 227712
elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/mosx) { } 409 227303 227712
elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/mosx) { } 0 227303 227303
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/mosx) { } 0 227303 227303
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/mosx) { } 0 227303 227303
elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/mosx) { } 0 227303 227303
elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/cgmosx) { } 44 227259 227303
elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/cgmosx) { } 45 227214 227259
elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/cgmosx) { } 33 227181 227214
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ (?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* ) \} \z/mosx) { } 0 227181 227181
elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/mosx) { } 0 227181 227181
6436 }
6437  
6438 # \F
6439 #
6440 # P.69 Table 2-6. Translation escapes
6441 # in Chapter 2: Bits and Pieces
6442 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
6443 # (and so on)
6444  
6445 # \u \l \U \L \F \Q \E
6446 elsif ($char[$i] =~ /\A ([<>]) \z/oxms) {
6447 602 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) 0 602 602
6448 0 $char[$i] = '\\' . $char[$i];
6449 }
6450 }
6451 elsif ($char[$i] eq '\u') {
6452  
6453 # "STRING @{[ LIST EXPR ]} MORE STRING"
6454  
6455 # P.257 Other Tricks You Can Do with Hard References
6456 # in Chapter 8: References
6457 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
6458  
6459 # P.353 Other Tricks You Can Do with Hard References
6460 # in Chapter 8: References
6461 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
6462  
6463 # (and so on)
6464  
6465 0 $char[$i] = '@{[Eutf2::ucfirst qq<';
6466 0 $left_e++;
6467 }
6468 elsif ($char[$i] eq '\l') {
6469 0 $char[$i] = '@{[Eutf2::lcfirst qq<';
6470 0 $left_e++;
6471 }
6472 elsif ($char[$i] eq '\U') {
6473 0 $char[$i] = '@{[Eutf2::uc qq<';
6474 0 $left_e++;
6475 }
6476 elsif ($char[$i] eq '\L') {
6477 6 $char[$i] = '@{[Eutf2::lc qq<';
6478 6 $left_e++;
6479 }
6480 elsif ($char[$i] eq '\F') {
6481 23 $char[$i] = '@{[Eutf2::fc qq<';
6482 23 $left_e++;
6483 }
6484 elsif ($char[$i] eq '\Q') {
6485 0 $char[$i] = '@{[CORE::quotemeta qq<';
6486 0 $left_e++;
6487 }
6488 elsif ($char[$i] eq '\E') {
6489 26 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) { } 26 0 26
6490 26 $char[$i] = '>]}';
6491 26 $right_e++;
6492 }
6493 else {
6494 0 $char[$i] = '';
6495 }
6496 }
6497 elsif ($char[$i] eq '\Q') {
6498 0 while (1) {
6499 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
6500 0 last;
6501 }
6502 0 ▶ if ($char[$i] eq '\E') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "\\E") 0 0 0
6503 0 last;
6504 }
6505 }
6506 }
6507 elsif ($char[$i] eq '\E') {
6508 }
6509  
6510 # $0 --> $0
6511 elsif ($char[$i] =~ /\A \$ 0 \z/oxms) {
6512 }
6513 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/oxms) {
6514 }
6515  
6516 # $$ --> $$
6517 elsif ($char[$i] =~ /\A \$\$ \z/oxms) {
6518 }
6519  
6520 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
6521 # $1, $2, $3 --> $1, $2, $3 otherwise
6522 elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/oxms) {
6523 409 $char[$i] = e_capture($1);
6524 }
6525 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
6526 0 $char[$i] = e_capture($1);
6527 }
6528  
6529 # $$foo[ ... ] --> $ $foo->[ ... ]
6530 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/oxms) {
6531 0 $char[$i] = e_capture($1.'->'.$2);
6532 }
6533  
6534 # $$foo{ ... } --> $ $foo->{ ... }
6535 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/oxms) {
6536 0 $char[$i] = e_capture($1.'->'.$2);
6537 }
6538  
6539 # $$foo
6540 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/oxms) {
6541 0 $char[$i] = e_capture($1);
6542 }
6543  
6544 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
6545 elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/oxmsgc) {
6546 44 $char[$i] = '@{[Eutf2::PREMATCH()]}';
6547 }
6548  
6549 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
6550 elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/oxmsgc) {
6551 45 $char[$i] = '@{[Eutf2::MATCH()]}';
6552 }
6553  
6554 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
6555 elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/oxmsgc) {
6556 33 $char[$i] = '@{[Eutf2::POSTMATCH()]}';
6557 }
6558  
6559 # ${ foo } --> ${ foo }
6560 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ (?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* ) \} \z/oxms) {
6561 }
6562  
6563 # ${ ... }
6564 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/oxms) {
6565 0 $char[$i] = e_capture($1);
6566 }
6567 }
6568  
6569 # return string
6570 9705 ▶ if ($left_e > $right_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($left_e > $right_e) 3 9702 9705
6571 3 return join '', $ope, $delimiter, @char, '>]}' x ($left_e - $right_e), $end_delimiter;
6572 }
6573 9702 return join '', $ope, $delimiter, @char, $end_delimiter;
6574 }
6575  
6576 #
6577 # escape qw string (qw//)
6578 #
6579 34 ▶sub e_qw {
Subroutine e_qw: called CC=11 SCAR=43.1
Pod undocumented
6580 34 my($ope,$delimiter,$end_delimiter,$string) = @_;
6581  
6582 34 $slash = 'div';
6583  
6584 # choice again delimiter
6585 34 my %octet = map {$_ => 1} ($string =~ /\G ([\x00-\xFF]) /oxmsg);
6586 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
6587 34 return join '', $ope, $delimiter, $string, $end_delimiter;
6588 }
6589 elsif (not $octet{')'}) {
6590 0 return join '', $ope, '(', $string, ')';
6591 }
6592 elsif (not $octet{'}'}) {
6593 0 return join '', $ope, '{', $string, '}';
6594 }
6595 elsif (not $octet{']'}) {
6596 0 return join '', $ope, '[', $string, ']';
6597 }
6598 elsif (not $octet{'>'}) {
6599 0 return join '', $ope, '<', $string, '>';
6600 }
6601 else {
6602 0 for my $char (qw( ! " $ % & * + - . / : = ? @ ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
6603 0 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 0 0 0
6604 0 return join '', $ope, $char, $string, $char;
6605 }
6606 }
6607 }
6608  
6609 # qw/AAA BBB C'CC/ --> ('AAA', 'BBB', 'C\'CC')
6610 0 my @string = CORE::split(/\s+/, $string);
6611 0 for my $string (@string) {
6612 0 my @octet = $string =~ /\G ([\x00-\xFF]) /oxmsg;
6613 0 for my $octet (@octet) {
6614 0 ▶ if ($octet =~ /\A (['\\]) \z/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($octet =~ /\A (['\\]) \z/mosx) 0 0 0
6615 0 $octet = '\\' . $1;
6616 }
6617 }
6618 0 $string = join '', @octet;
6619 }
6620 0 return join '', '(', (join ', ', map { "'$_'" } @string), ')';
6621 }
6622  
6623 #
6624 # escape here document (<<"HEREDOC", <<HEREDOC, <<`HEREDOC`, <<~"HEREDOC", <<~HEREDOC, <<~`HEREDOC`)
6625 #
6626 108 ▶sub e_heredoc {
Subroutine e_heredoc: called CC=37 SCAR=50.7
Pod undocumented
6627 108 my($string) = @_;
6628  
6629 108 $slash = 'm//';
6630  
6631 108 my $metachar = qr/[\@\\|]/oxms; # '|' is for <<`HEREDOC`
6632  
6633 108 my $left_e = 0;
6634 108 my $right_e = 0;
6635  
6636 # split regexp
6637 108 my @char = $string =~ /\G((?>
6638 [^\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] |
6639 \\x\{ (?>[0-9A-Fa-f]+) \} |
6640 \\o\{ (?>[0-7]+) \} |
6641 \\N\{ (?>[^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} |
6642 \\ $q_char |
6643 \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} |
6644 \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} |
6645 \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} |
6646 \$ (?>\s* [0-9]+) |
6647 \$ (?>\s*) \{ (?>\s* [0-9]+ \s*) \} |
6648 \$ \$ (?![\w\{]) |
6649 \$ (?>\s*) \$ (?>\s*) $qq_variable |
6650 $q_char
6651 ))/oxmsg;
6652  
6653 108 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 3305 108 3413
6654  
6655 # "\L\u" --> "\u\L"
6656 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
6657 0 @char[$i,$i+1] = @char[$i+1,$i];
6658 }
6659  
6660 # "\U\l" --> "\l\U"
6661 ▶ 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
6662 0 @char[$i,$i+1] = @char[$i+1,$i];
6663 }
6664  
6665 # octal escape sequence
6666 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
6667 1 $char[$i] = Eutf2::octchr($1);
6668 }
6669  
6670 # hexadecimal escape sequence
6671 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
6672 1 $char[$i] = Eutf2::hexchr($1);
6673 }
6674  
6675 # \N{CHARNAME} --> N{CHARNAME}
6676 elsif ($char[$i] =~ /\A \\ ( N\{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
6677 0 $char[$i] = $1;
6678 }
6679  
6680 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
6681 }
6682  
6683 # \u \l \U \L \F \Q \E
6684 elsif ($char[$i] =~ /\A ([<>]) \z/oxms) {
6685 72 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) 0 72 72
6686 0 $char[$i] = '\\' . $char[$i];
6687 }
6688 }
6689 elsif ($char[$i] eq '\u') {
6690 0 $char[$i] = '@{[Eutf2::ucfirst qq<';
6691 0 $left_e++;
6692 }
6693 elsif ($char[$i] eq '\l') {
6694 0 $char[$i] = '@{[Eutf2::lcfirst qq<';
6695 0 $left_e++;
6696 }
6697 elsif ($char[$i] eq '\U') {
6698 0 $char[$i] = '@{[Eutf2::uc qq<';
6699 0 $left_e++;
6700 }
6701 elsif ($char[$i] eq '\L') {
6702 6 $char[$i] = '@{[Eutf2::lc qq<';
6703 6 $left_e++;
6704 }
6705 elsif ($char[$i] eq '\F') {
6706 0 $char[$i] = '@{[Eutf2::fc qq<';
6707 0 $left_e++;
6708 }
6709 elsif ($char[$i] eq '\Q') {
6710 0 $char[$i] = '@{[CORE::quotemeta qq<';
6711 0 $left_e++;
6712 }
6713 elsif ($char[$i] eq '\E') {
6714 3 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) { } 3 0 3
6715 3 $char[$i] = '>]}';
6716 3 $right_e++;
6717 }
6718 else {
6719 0 $char[$i] = '';
6720 }
6721 }
6722 elsif ($char[$i] eq '\Q') {
6723 0 while (1) {
6724 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
6725 0 last;
6726 }
6727 0 ▶ if ($char[$i] eq '\E') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "\\E") 0 0 0
6728 0 last;
6729 }
6730 }
6731 }
6732 elsif ($char[$i] eq '\E') {
6733 }
6734  
6735 # $0 --> $0
6736 elsif ($char[$i] =~ /\A \$ 0 \z/oxms) {
6737 }
6738 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/oxms) {
6739 }
6740  
6741 # $$ --> $$
6742 elsif ($char[$i] =~ /\A \$\$ \z/oxms) {
6743 }
6744  
6745 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
6746 # $1, $2, $3 --> $1, $2, $3 otherwise
6747 elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/oxms) {
6748 0 $char[$i] = e_capture($1);
6749 }
6750 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
6751 0 $char[$i] = e_capture($1);
6752 }
6753  
6754 # $$foo[ ... ] --> $ $foo->[ ... ]
6755 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/oxms) {
6756 0 $char[$i] = e_capture($1.'->'.$2);
6757 }
6758  
6759 # $$foo{ ... } --> $ $foo->{ ... }
6760 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/oxms) {
6761 0 $char[$i] = e_capture($1.'->'.$2);
6762 }
6763  
6764 # $$foo
6765 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/oxms) {
6766 0 $char[$i] = e_capture($1);
6767 }
6768  
6769 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
6770 elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/oxmsgc) {
6771 8 $char[$i] = '@{[Eutf2::PREMATCH()]}';
6772 }
6773  
6774 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
6775 elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/oxmsgc) {
6776 8 $char[$i] = '@{[Eutf2::MATCH()]}';
6777 }
6778  
6779 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
6780 elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/oxmsgc) {
6781 6 $char[$i] = '@{[Eutf2::POSTMATCH()]}';
6782 }
6783  
6784 # ${ foo } --> ${ foo }
6785 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ (?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* ) \} \z/oxms) {
6786 }
6787  
6788 # ${ ... }
6789 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/oxms) {
6790 0 $char[$i] = e_capture($1);
6791 }
6792 }
6793  
6794 # return string
6795 108 ▶ if ($left_e > $right_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($left_e > $right_e) 3 105 108
6796 3 return join '', @char, '>]}' x ($left_e - $right_e);
6797 }
6798 105 return join '', @char;
6799 }
6800  
6801 #
6802 # escape regexp (m//, qr//)
6803 #
6804 1607 ▶sub e_qr {
Subroutine e_qr: called CC=110 SCAR=72.3
Pod undocumented
6805 1607 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
6806 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
6807  
6808 1607 $modifier =~ tr/p//d;
6809 1607 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 1607 1607
6810 0 my $line = 0;
6811 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
6812 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
6813 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
6814 0 last;
6815 }
6816 }
6817 0 die qq{Unsupported modifier "$1" used at line $line.\n};
6818 }
6819  
6820 1607 $slash = 'div';
6821  
6822 # literal null string pattern
6823 1607 ▶ if ($string eq '') {
Branch: 2 branches
BranchTrueFalseTotal
if ($string eq '') { } 8 1599 1607
elsif ($modifier =~ tr/Bb//d) { } 25 1574 1599
6824 8 $modifier =~ tr/bB//d;
6825 8 $modifier =~ tr/i//d;
6826 8 return join '', $ope, $delimiter, $end_delimiter, $modifier;
6827 }
6828  
6829 # /b /B modifier
6830 elsif ($modifier =~ tr/bB//d) {
6831  
6832 # choice again delimiter
6833 25 ▶ if ($delimiter =~ / [\@:] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($delimiter =~ / [\@:] /mosx) 0 25 25
6834 0 my @char = $string =~ /\G ([\x00-\xFF]) /oxmsg;
6835 0 my %octet = map {$_ => 1} @char;
6836 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
6837 0 $delimiter = '(';
6838 0 $end_delimiter = ')';
6839 }
6840 elsif (not $octet{'}'}) {
6841 0 $delimiter = '{';
6842 0 $end_delimiter = '}';
6843 }
6844 elsif (not $octet{']'}) {
6845 0 $delimiter = '[';
6846 0 $end_delimiter = ']';
6847 }
6848 elsif (not $octet{'>'}) {
6849 0 $delimiter = '<';
6850 0 $end_delimiter = '>';
6851 }
6852 else {
6853 0 for my $char (qw( ! " $ % & * + - . / = ? ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
6854 0 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 0 0 0
6855 0 $delimiter = $char;
6856 0 $end_delimiter = $char;
6857 0 last;
6858 }
6859 }
6860 }
6861 }
6862  
6863 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
6864 4 return join '', $ope, $delimiter, $string, $matched, $end_delimiter, $modifier;
6865 }
6866 else {
6867 21 return join '', $ope, $delimiter, '(?:', $string, ')', $matched, $end_delimiter, $modifier;
6868 }
6869 }
6870  
6871 1574 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 373 1201 1574
6872 1574 my $metachar = qr/[\@\\|[\]{^]/oxms;
6873  
6874 # split regexp
6875 1574 my @char = $string =~ /\G((?>
6876 [^\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] |
6877 \\x (?>[0-9A-Fa-f]{1,2}) |
6878 \\ (?>[0-7]{2,3}) |
6879 \\c [\x40-\x5F] |
6880 \\x\{ (?>[0-9A-Fa-f]+) \} |
6881 \\o\{ (?>[0-7]+) \} |
6882 \\[bBNpP]\{ (?>[^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} |
6883 \\ $q_char |
6884 \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} |
6885 \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} |
6886 \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} |
6887 [\$\@] $qq_variable |
6888 \$ (?>\s* [0-9]+) |
6889 \$ (?>\s*) \{ (?>\s* [0-9]+ \s*) \} |
6890 \$ \$ (?![\w\{]) |
6891 \$ (?>\s*) \$ (?>\s*) $qq_variable |
6892 \[\^ |
6893 \[\: (?>[a-z]+) :\] |
6894 \[\:\^ (?>[a-z]+) :\] |
6895 \(\? |
6896 $q_char
6897 ))/oxmsg;
6898  
6899 # choice again delimiter
6900 1574 ▶ if ($delimiter =~ / [\@:] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($delimiter =~ / [\@:] /mosx) 0 1574 1574
6901 0 my %octet = map {$_ => 1} @char;
6902 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
6903 0 $delimiter = '(';
6904 0 $end_delimiter = ')';
6905 }
6906 elsif (not $octet{'}'}) {
6907 0 $delimiter = '{';
6908 0 $end_delimiter = '}';
6909 }
6910 elsif (not $octet{']'}) {
6911 0 $delimiter = '[';
6912 0 $end_delimiter = ']';
6913 }
6914 elsif (not $octet{'>'}) {
6915 0 $delimiter = '<';
6916 0 $end_delimiter = '>';
6917 }
6918 else {
6919 0 for my $char (qw( ! " $ % & * + - . / = ? ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
6920 0 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 0 0 0
6921 0 $delimiter = $char;
6922 0 $end_delimiter = $char;
6923 0 last;
6924 }
6925 }
6926 }
6927 }
6928  
6929 1574 my $left_e = 0;
6930 1574 my $right_e = 0;
6931 1574 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 3466 1573 5039
6932  
6933 # "\L\u" --> "\u\L"
6934 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
6935 0 @char[$i,$i+1] = @char[$i+1,$i];
6936 }
6937  
6938 # "\U\l" --> "\l\U"
6939 ▶ 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
6940 0 @char[$i,$i+1] = @char[$i+1,$i];
6941 }
6942  
6943 # octal escape sequence
6944 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
6945 1 $char[$i] = Eutf2::octchr($1);
6946 }
6947  
6948 # hexadecimal escape sequence
6949 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
6950 1 $char[$i] = Eutf2::hexchr($1);
6951 }
6952  
6953 # \b{...} --> b\{...}
6954 # \B{...} --> B\{...}
6955 # \N{CHARNAME} --> N\{CHARNAME}
6956 # \p{PROPERTY} --> p\{PROPERTY}
6957 # \P{PROPERTY} --> P\{PROPERTY}
6958 elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
6959 6 $char[$i] = $1 . '\\' . $2;
6960 }
6961  
6962 # \p, \P, \X --> p, P, X
6963 elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/oxms) {
6964 4 $char[$i] = $1;
6965 }
6966  
6967 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
6968 }
6969  
6970 # join separated multiple-octet
6971 elsif ($char[$i] =~ /\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms) {
6972 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
6973 0 $char[$i] .= join '', splice @char, $i+1, 3;
6974 }
6975 ▶ 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
6976 0 $char[$i] .= join '', splice @char, $i+1, 2;
6977 }
6978 ▶ 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
6979 0 $char[$i] .= join '', splice @char, $i+1, 1;
6980 }
6981 }
6982  
6983 # open character class [...]
6984 elsif ($char[$i] eq '[') {
6985 828 my $left = $i;
6986  
6987 # [] make die "Unmatched [] in regexp ...\n"
6988 # (and so on)
6989  
6990 828 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 3 825 828
6991 3 $i++;
6992 }
6993  
6994 828 while (1) {
6995 3071 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 3071 3071
6996 0 die __FILE__, ": Unmatched [] in regexp\n";
6997 }
6998 3071 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 828 2243 3071
6999 828 my $right = $i;
7000  
7001 # [...]
7002 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
7003 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);
7004 }
7005 else {
7006 738 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
7007 }
7008  
7009 827 $i = $left;
7010 827 last;
7011 }
7012 }
7013 }
7014  
7015 # open character class [^...]
7016 elsif ($char[$i] eq '[^') {
7017 328 my $left = $i;
7018  
7019 # [^] make die "Unmatched [] in regexp ...\n"
7020 # (and so on)
7021  
7022 328 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 5 323 328
7023 5 $i++;
7024 }
7025  
7026 328 while (1) {
7027 1447 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 1447 1447
7028 0 die __FILE__, ": Unmatched [] in regexp\n";
7029 }
7030 1447 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 328 1119 1447
7031 328 my $right = $i;
7032  
7033 # [^...]
7034 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
7035 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);
7036 }
7037 else {
7038 238 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
7039 }
7040  
7041 328 $i = $left;
7042 328 last;
7043 }
7044 }
7045 }
7046  
7047 # rewrite character class or escape character
7048 elsif (my $char = character_class($char[$i],$modifier)) {
7049 215 $char[$i] = $char;
7050 }
7051  
7052 # /i modifier
7053 ▶ 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
7054 44 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 44 0 44
7055 44 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
7056 }
7057 else {
7058 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
7059 }
7060 }
7061  
7062 # \u \l \U \L \F \Q \E
7063 elsif ($char[$i] =~ /\A [<>] \z/oxms) {
7064 1 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) 0 1 1
7065 0 $char[$i] = '\\' . $char[$i];
7066 }
7067 }
7068 elsif ($char[$i] eq '\u') {
7069 0 $char[$i] = '@{[Eutf2::ucfirst qq<';
7070 0 $left_e++;
7071 }
7072 elsif ($char[$i] eq '\l') {
7073 0 $char[$i] = '@{[Eutf2::lcfirst qq<';
7074 0 $left_e++;
7075 }
7076 elsif ($char[$i] eq '\U') {
7077 1 $char[$i] = '@{[Eutf2::uc qq<';
7078 1 $left_e++;
7079 }
7080 elsif ($char[$i] eq '\L') {
7081 1 $char[$i] = '@{[Eutf2::lc qq<';
7082 1 $left_e++;
7083 }
7084 elsif ($char[$i] eq '\F') {
7085 16 $char[$i] = '@{[Eutf2::fc qq<';
7086 16 $left_e++;
7087 }
7088 elsif ($char[$i] eq '\Q') {
7089 20 $char[$i] = '@{[CORE::quotemeta qq<';
7090 20 $left_e++;
7091 }
7092 elsif ($char[$i] eq '\E') {
7093 38 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) { } 38 0 38
7094 38 $char[$i] = '>]}';
7095 38 $right_e++;
7096 }
7097 else {
7098 0 $char[$i] = '';
7099 }
7100 }
7101 elsif ($char[$i] eq '\Q') {
7102 0 while (1) {
7103 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
7104 0 last;
7105 }
7106 0 ▶ if ($char[$i] eq '\E') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "\\E") 0 0 0
7107 0 last;
7108 }
7109 }
7110 }
7111 elsif ($char[$i] eq '\E') {
7112 }
7113  
7114 # $0 --> $0
7115 elsif ($char[$i] =~ /\A \$ 0 \z/oxms) {
7116 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7117 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7118 }
7119 }
7120 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/oxms) {
7121 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7122 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7123 }
7124 }
7125  
7126 # $$ --> $$
7127 elsif ($char[$i] =~ /\A \$\$ \z/oxms) {
7128 }
7129  
7130 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
7131 # $1, $2, $3 --> $1, $2, $3 otherwise
7132 elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/oxms) {
7133 0 $char[$i] = e_capture($1);
7134 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7135 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7136 }
7137 }
7138 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
7139 0 $char[$i] = e_capture($1);
7140 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7141 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7142 }
7143 }
7144  
7145 # $$foo[ ... ] --> $ $foo->[ ... ]
7146 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/oxms) {
7147 0 $char[$i] = e_capture($1.'->'.$2);
7148 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7149 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7150 }
7151 }
7152  
7153 # $$foo{ ... } --> $ $foo->{ ... }
7154 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/oxms) {
7155 0 $char[$i] = e_capture($1.'->'.$2);
7156 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7157 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7158 }
7159 }
7160  
7161 # $$foo
7162 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/oxms) {
7163 0 $char[$i] = e_capture($1);
7164 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7165 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7166 }
7167 }
7168  
7169 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
7170 elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/oxmsgc) {
7171 8 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 8 8
7172 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::PREMATCH())]}';
7173 }
7174 else {
7175 8 $char[$i] = '@{[Eutf2::PREMATCH()]}';
7176 }
7177 }
7178  
7179 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
7180 elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/oxmsgc) {
7181 8 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 8 8
7182 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::MATCH())]}';
7183 }
7184 else {
7185 8 $char[$i] = '@{[Eutf2::MATCH()]}';
7186 }
7187 }
7188  
7189 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
7190 elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/oxmsgc) {
7191 6 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 6 6
7192 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::POSTMATCH())]}';
7193 }
7194 else {
7195 6 $char[$i] = '@{[Eutf2::POSTMATCH()]}';
7196 }
7197 }
7198  
7199 # ${ foo }
7200 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} \z/oxms) {
7201 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7202 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7203 }
7204 }
7205  
7206 # ${ ... }
7207 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/oxms) {
7208 0 $char[$i] = e_capture($1);
7209 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7210 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7211 }
7212 }
7213  
7214 # $scalar or @array
7215 elsif ($char[$i] =~ /\A [\$\@].+ /oxms) {
7216 42 $char[$i] = e_string($char[$i]);
7217 42 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 9 33 42
7218 9 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7219 }
7220 }
7221  
7222 # quote character before ? + * {
7223 ▶ 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
7224 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
7225 }
7226 ▶ 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
7227 0 my $char = $char[$i-1];
7228 0 ▶ if ($char[$i] eq '{') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq '{') { } 0 0 0
7229 0 die __FILE__, qq{: "MULTIBYTE{n}" should be "(MULTIBYTE){n}" in m?? (and shift \$1,\$2,\$3,...) ($char){n}\n};
7230 }
7231 else {
7232 0 die __FILE__, qq{: "MULTIBYTE$char[$i]" should be "(MULTIBYTE)$char[$i]" in m?? (and shift \$1,\$2,\$3,...) ($char)$char[$i]\n};
7233 }
7234 }
7235 else {
7236 187 $char[$i-1] = '(?:' . $char[$i-1] . ')';
7237 }
7238 }
7239 }
7240  
7241 # make regexp string
7242 1573 $modifier =~ tr/i//d;
7243 1573 ▶ if ($left_e > $right_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($left_e > $right_e) 0 1573 1573
7244 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
7245 0 return join '', $ope, $delimiter, $anchor, @char, '>]}' x ($left_e - $right_e), $matched, $end_delimiter, $modifier;
7246 }
7247 else {
7248 0 return join '', $ope, $delimiter, $anchor, '(?:', @char, '>]}' x ($left_e - $right_e), ')', $matched, $end_delimiter, $modifier;
7249 }
7250 }
7251 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
7252 32 return join '', $ope, $delimiter, $anchor, @char, $matched, $end_delimiter, $modifier;
7253 }
7254 else {
7255 1541 return join '', $ope, $delimiter, $anchor, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
7256 }
7257 }
7258  
7259 #
7260 # double quote stuff
7261 #
7262 540 ▶sub qq_stuff {
Subroutine qq_stuff: called CC=6 SCAR=18.5
Pod undocumented
7263 540 my($delimiter,$end_delimiter,$stuff) = @_;
7264  
7265 # scalar variable or array variable
7266 540 ▶ if ($stuff =~ /\A [\$\@] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($stuff =~ /\A [\$\@] /mosx) 300 240 540
7267 300 return $stuff;
7268 }
7269  
7270 # quote by delimiter
7271 240 my %octet = map {$_ => 1} ($stuff =~ /\G ([\x00-\xFF]) /oxmsg);
7272 240 for my $char (qw( ! " $ % & * + - . / : = ? @ ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
7273 240 ▶ next if $char eq $delimiter;
Branch: 1 branch
BranchTrueFalseTotal
if $char eq $delimiter 0 240 240
7274 240 ▶ next if $char eq $end_delimiter;
Branch: 1 branch
BranchTrueFalseTotal
if $char eq $end_delimiter 0 240 240
7275 240 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 240 0 240
7276 240 return join '', 'qq', $char, $stuff, $char;
7277 }
7278 }
7279 0 return join '', 'qq', '<', $stuff, '>';
7280 }
7281  
7282 #
7283 # escape regexp (m'', qr'', and m''b, qr''b)
7284 #
7285 15 ▶sub e_qr_q {
Subroutine e_qr_q: called CC=7 SCAR=22.7
Pod undocumented
7286 15 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7287 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
7288  
7289 15 $modifier =~ tr/p//d;
7290 15 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 15 15
7291 0 my $line = 0;
7292 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
7293 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
7294 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
7295 0 last;
7296 }
7297 }
7298 0 die qq{Unsupported modifier "$1" used at line $line.\n};
7299 }
7300  
7301 15 $slash = 'div';
7302  
7303 # literal null string pattern
7304 15 ▶ if ($string eq '') {
Branch: 2 branches
BranchTrueFalseTotal
if ($string eq '') { } 8 7 15
elsif ($modifier =~ tr/Bb//d) { } 3 4 7
7305 8 $modifier =~ tr/bB//d;
7306 8 $modifier =~ tr/i//d;
7307 8 return join '', $ope, $delimiter, $end_delimiter, $modifier;
7308 }
7309  
7310 # with /b /B modifier
7311 elsif ($modifier =~ tr/bB//d) {
7312 3 return e_qr_qb($ope,$delimiter,$end_delimiter,$string,$modifier);
7313 }
7314  
7315 # without /b /B modifier
7316 else {
7317 4 return e_qr_qt($ope,$delimiter,$end_delimiter,$string,$modifier);
7318 }
7319 }
7320  
7321 #
7322 # escape regexp (m'', qr'')
7323 #
7324 4 ▶sub e_qr_qt {
Subroutine e_qr_qt: called CC=20 SCAR=51.4
Pod undocumented
7325 4 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7326  
7327 4 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 0 4 4
7328  
7329 # split regexp
7330 4 my @char = $string =~ /\G((?>
7331 [^\x80-\xFF\\\[\$\@\/] |
7332 (?:[\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] |
7333 \[\^ |
7334 \[\: (?>[a-z]+) \:\] |
7335 \[\:\^ (?>[a-z]+) \:\] |
7336 [\$\@\/] |
7337 \\ (?:$q_char) |
7338 (?:$q_char)
7339 ))/oxmsg;
7340  
7341 # unescape character
7342 4 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 5 4 9
7343 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
7344 }
7345  
7346 # open character class [...]
7347 elsif ($char[$i] eq '[') {
7348 0 my $left = $i;
7349 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
7350 0 $i++;
7351 }
7352 0 while (1) {
7353 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
7354 0 die __FILE__, ": Unmatched [] in regexp\n";
7355 }
7356 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
7357 0 my $right = $i;
7358  
7359 # [...]
7360 0 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
7361  
7362 0 $i = $left;
7363 0 last;
7364 }
7365 }
7366 }
7367  
7368 # open character class [^...]
7369 elsif ($char[$i] eq '[^') {
7370 0 my $left = $i;
7371 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
7372 0 $i++;
7373 }
7374 0 while (1) {
7375 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
7376 0 die __FILE__, ": Unmatched [] in regexp\n";
7377 }
7378 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
7379 0 my $right = $i;
7380  
7381 # [^...]
7382 0 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
7383  
7384 0 $i = $left;
7385 0 last;
7386 }
7387 }
7388 }
7389  
7390 # escape $ @ / and \
7391 elsif ($char[$i] =~ /\A [\$\@\/\\] \z/oxms) {
7392 0 $char[$i] = '\\' . $char[$i];
7393 }
7394  
7395 # rewrite character class or escape character
7396 elsif (my $char = character_class($char[$i],$modifier)) {
7397 0 $char[$i] = $char;
7398 }
7399  
7400 # /i modifier
7401 ▶ 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
7402 0 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 0 0 0
7403 0 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
7404 }
7405 else {
7406 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
7407 }
7408 }
7409  
7410 # quote character before ? + * {
7411 ▶ 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
7412 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
7413 }
7414 else {
7415 0 $char[$i-1] = '(?:' . $char[$i-1] . ')';
7416 }
7417 }
7418 }
7419  
7420 4 $delimiter = '/';
7421 4 $end_delimiter = '/';
7422  
7423 4 $modifier =~ tr/i//d;
7424 4 return join '', $ope, $delimiter, $anchor, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
7425 }
7426  
7427 #
7428 # escape regexp (m''b, qr''b)
7429 #
7430 3 ▶sub e_qr_qb {
Subroutine e_qr_qb: called CC=4 SCAR=14.2
Pod undocumented
7431 3 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7432  
7433 # split regexp
7434 3 my @char = $string =~ /\G ((?>[^\\]|\\\\|[\x00-\xFF])) /oxmsg;
7435  
7436 # unescape character
7437 3 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 9 3 12
7438 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
7439 }
7440  
7441 # remain \\
7442 elsif ($char[$i] eq '\\\\') {
7443 }
7444  
7445 # escape $ @ / and \
7446 elsif ($char[$i] =~ /\A [\$\@\/\\] \z/oxms) {
7447 0 $char[$i] = '\\' . $char[$i];
7448 }
7449 }
7450  
7451 3 $delimiter = '/';
7452 3 $end_delimiter = '/';
7453 3 return join '', $ope, $delimiter, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
7454 }
7455  
7456 #
7457 # escape regexp (s/here//)
7458 #
7459 114 ▶sub e_s1 {
Subroutine e_s1: called CC=106 SCAR=79.2
Pod undocumented
7460 114 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7461 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
7462  
7463 114 $modifier =~ tr/p//d;
7464 114 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 114 114
7465 0 my $line = 0;
7466 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
7467 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
7468 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
7469 0 last;
7470 }
7471 }
7472 0 die qq{Unsupported modifier "$1" used at line $line.\n};
7473 }
7474  
7475 114 $slash = 'div';
7476  
7477 # literal null string pattern
7478 114 ▶ if ($string eq '') {
Branch: 2 branches
BranchTrueFalseTotal
if ($string eq '') { } 8 106 114
elsif ($modifier =~ tr/Bb//d) { } 1 105 106
7479 8 $modifier =~ tr/bB//d;
7480 8 $modifier =~ tr/i//d;
7481 8 return join '', $ope, $delimiter, $end_delimiter, $modifier;
7482 }
7483  
7484 # /b /B modifier
7485 elsif ($modifier =~ tr/bB//d) {
7486  
7487 # choice again delimiter
7488 1 ▶ if ($delimiter =~ / [\@:] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($delimiter =~ / [\@:] /mosx) 0 1 1
7489 0 my @char = $string =~ /\G ([\x00-\xFF]) /oxmsg;
7490 0 my %octet = map {$_ => 1} @char;
7491 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
7492 0 $delimiter = '(';
7493 0 $end_delimiter = ')';
7494 }
7495 elsif (not $octet{'}'}) {
7496 0 $delimiter = '{';
7497 0 $end_delimiter = '}';
7498 }
7499 elsif (not $octet{']'}) {
7500 0 $delimiter = '[';
7501 0 $end_delimiter = ']';
7502 }
7503 elsif (not $octet{'>'}) {
7504 0 $delimiter = '<';
7505 0 $end_delimiter = '>';
7506 }
7507 else {
7508 0 for my $char (qw( ! " $ % & * + - . / = ? ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
7509 0 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 0 0 0
7510 0 $delimiter = $char;
7511 0 $end_delimiter = $char;
7512 0 last;
7513 }
7514 }
7515 }
7516 }
7517  
7518 1 my $prematch = '';
7519 1 return join '', $ope, $delimiter, $prematch, '(?:', $string, ')', $matched, $end_delimiter, $modifier;
7520 }
7521  
7522 105 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 1 104 105
7523 105 my $metachar = qr/[\@\\|[\]{^]/oxms;
7524  
7525 # split regexp
7526 105 my @char = $string =~ /\G((?>
7527 [^\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] |
7528 \\ (?>[1-9][0-9]*) |
7529 \\g (?>\s*) (?>[1-9][0-9]*) |
7530 \\g (?>\s*) \{ (?>\s*) (?>[1-9][0-9]*) (?>\s*) \} |
7531 \\g (?>\s*) \{ (?>\s*) - (?>\s*) (?>[1-9][0-9]*) (?>\s*) \} |
7532 \\x (?>[0-9A-Fa-f]{1,2}) |
7533 \\ (?>[0-7]{2,3}) |
7534 \\c [\x40-\x5F] |
7535 \\x\{ (?>[0-9A-Fa-f]+) \} |
7536 \\o\{ (?>[0-7]+) \} |
7537 \\[bBNpP]\{ (?>[^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} |
7538 \\ $q_char |
7539 \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} |
7540 \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} |
7541 \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} |
7542 [\$\@] $qq_variable |
7543 \$ (?>\s* [0-9]+) |
7544 \$ (?>\s*) \{ (?>\s* [0-9]+ \s*) \} |
7545 \$ \$ (?![\w\{]) |
7546 \$ (?>\s*) \$ (?>\s*) $qq_variable |
7547 \[\^ |
7548 \[\: (?>[a-z]+) :\] |
7549 \[\:\^ (?>[a-z]+) :\] |
7550 \(\? |
7551 $q_char
7552 ))/oxmsg;
7553  
7554 # choice again delimiter
7555 105 ▶ if ($delimiter =~ / [\@:] /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($delimiter =~ / [\@:] /mosx) 0 105 105
7556 0 my %octet = map {$_ => 1} @char;
7557 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
7558 0 $delimiter = '(';
7559 0 $end_delimiter = ')';
7560 }
7561 elsif (not $octet{'}'}) {
7562 0 $delimiter = '{';
7563 0 $end_delimiter = '}';
7564 }
7565 elsif (not $octet{']'}) {
7566 0 $delimiter = '[';
7567 0 $end_delimiter = ']';
7568 }
7569 elsif (not $octet{'>'}) {
7570 0 $delimiter = '<';
7571 0 $end_delimiter = '>';
7572 }
7573 else {
7574 0 for my $char (qw( ! " $ % & * + - . / = ? ^ ` | ~ ), "\x00".."\x1F", "\x7F", "\xFF") {
7575 0 ▶ if (not $octet{$char}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($octet{$char}) 0 0 0
7576 0 $delimiter = $char;
7577 0 $end_delimiter = $char;
7578 0 last;
7579 }
7580 }
7581 }
7582 }
7583  
7584 # count '('
7585 105 my $parens = grep { $_ eq '(' } @char;
7586  
7587 105 my $left_e = 0;
7588 105 my $right_e = 0;
7589 105 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 351 105 456
7590  
7591 # "\L\u" --> "\u\L"
7592 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
7593 0 @char[$i,$i+1] = @char[$i+1,$i];
7594 }
7595  
7596 # "\U\l" --> "\l\U"
7597 ▶ 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
7598 0 @char[$i,$i+1] = @char[$i+1,$i];
7599 }
7600  
7601 # octal escape sequence
7602 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
7603 1 $char[$i] = Eutf2::octchr($1);
7604 }
7605  
7606 # hexadecimal escape sequence
7607 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
7608 1 $char[$i] = Eutf2::hexchr($1);
7609 }
7610  
7611 # \b{...} --> b\{...}
7612 # \B{...} --> B\{...}
7613 # \N{CHARNAME} --> N\{CHARNAME}
7614 # \p{PROPERTY} --> p\{PROPERTY}
7615 # \P{PROPERTY} --> P\{PROPERTY}
7616 elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
7617 0 $char[$i] = $1 . '\\' . $2;
7618 }
7619  
7620 # \p, \P, \X --> p, P, X
7621 elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/oxms) {
7622 0 $char[$i] = $1;
7623 }
7624  
7625 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
7626 }
7627  
7628 # join separated multiple-octet
7629 elsif ($char[$i] =~ /\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms) {
7630 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
7631 0 $char[$i] .= join '', splice @char, $i+1, 3;
7632 }
7633 ▶ 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
7634 0 $char[$i] .= join '', splice @char, $i+1, 2;
7635 }
7636 ▶ 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
7637 0 $char[$i] .= join '', splice @char, $i+1, 1;
7638 }
7639 }
7640  
7641 # open character class [...]
7642 elsif ($char[$i] eq '[') {
7643 24 my $left = $i;
7644 24 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 24 24
7645 0 $i++;
7646 }
7647 24 while (1) {
7648 95 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 95 95
7649 0 die __FILE__, ": Unmatched [] in regexp\n";
7650 }
7651 95 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 24 71 95
7652 24 my $right = $i;
7653  
7654 # [...]
7655 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
7656 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);
7657 }
7658 else {
7659 24 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
7660 }
7661  
7662 24 $i = $left;
7663 24 last;
7664 }
7665 }
7666 }
7667  
7668 # open character class [^...]
7669 elsif ($char[$i] eq '[^') {
7670 0 my $left = $i;
7671 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
7672 0 $i++;
7673 }
7674 0 while (1) {
7675 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
7676 0 die __FILE__, ": Unmatched [] in regexp\n";
7677 }
7678 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
7679 0 my $right = $i;
7680  
7681 # [^...]
7682 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
7683 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);
7684 }
7685 else {
7686 0 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
7687 }
7688  
7689 0 $i = $left;
7690 0 last;
7691 }
7692 }
7693 }
7694  
7695 # rewrite character class or escape character
7696 elsif (my $char = character_class($char[$i],$modifier)) {
7697 11 $char[$i] = $char;
7698 }
7699  
7700 # /i modifier
7701 ▶ 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
7702 3 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 3 0 3
7703 3 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
7704 }
7705 else {
7706 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
7707 }
7708 }
7709  
7710 # \u \l \U \L \F \Q \E
7711 elsif ($char[$i] =~ /\A [<>] \z/oxms) {
7712 8 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) 0 8 8
7713 0 $char[$i] = '\\' . $char[$i];
7714 }
7715 }
7716 elsif ($char[$i] eq '\u') {
7717 0 $char[$i] = '@{[Eutf2::ucfirst qq<';
7718 0 $left_e++;
7719 }
7720 elsif ($char[$i] eq '\l') {
7721 0 $char[$i] = '@{[Eutf2::lcfirst qq<';
7722 0 $left_e++;
7723 }
7724 elsif ($char[$i] eq '\U') {
7725 0 $char[$i] = '@{[Eutf2::uc qq<';
7726 0 $left_e++;
7727 }
7728 elsif ($char[$i] eq '\L') {
7729 0 $char[$i] = '@{[Eutf2::lc qq<';
7730 0 $left_e++;
7731 }
7732 elsif ($char[$i] eq '\F') {
7733 0 $char[$i] = '@{[Eutf2::fc qq<';
7734 0 $left_e++;
7735 }
7736 elsif ($char[$i] eq '\Q') {
7737 5 $char[$i] = '@{[CORE::quotemeta qq<';
7738 5 $left_e++;
7739 }
7740 elsif ($char[$i] eq '\E') {
7741 5 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) { } 5 0 5
7742 5 $char[$i] = '>]}';
7743 5 $right_e++;
7744 }
7745 else {
7746 0 $char[$i] = '';
7747 }
7748 }
7749 elsif ($char[$i] eq '\Q') {
7750 0 while (1) {
7751 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
7752 0 last;
7753 }
7754 0 ▶ if ($char[$i] eq '\E') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "\\E") 0 0 0
7755 0 last;
7756 }
7757 }
7758 }
7759 elsif ($char[$i] eq '\E') {
7760 }
7761  
7762 # \0 --> \0
7763 elsif ($char[$i] =~ /\A \\ (?>\s*) 0 \z/oxms) {
7764 }
7765  
7766 # \g{N}, \g{-N}
7767  
7768 # P.108 Using Simple Patterns
7769 # in Chapter 7: In the World of Regular Expressions
7770 # of ISBN 978-0-596-52010-6 Learning Perl, Fifth Edition
7771  
7772 # P.221 Capturing
7773 # in Chapter 5: Pattern Matching
7774 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
7775  
7776 # \g{-1}, \g{-2}, \g{-3} --> \g{-1}, \g{-2}, \g{-3}
7777 elsif ($char[$i] =~ /\A \\g (?>\s*) \{ (?>\s*) - (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
7778 }
7779  
7780 # \g{1}, \g{2}, \g{3} --> \g{2}, \g{3}, \g{4} (only when multibyte anchoring is enable)
7781 elsif ($char[$i] =~ /\A \\g (?>\s*) \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
7782 }
7783  
7784 # \g1, \g2, \g3 --> \g2, \g3, \g4 (only when multibyte anchoring is enable)
7785 elsif ($char[$i] =~ /\A \\g (?>\s*) ((?>[1-9][0-9]*)) \z/oxms) {
7786 }
7787  
7788 # \1, \2, \3 --> \2, \3, \4 (only when multibyte anchoring is enable)
7789 elsif ($char[$i] =~ /\A \\ (?>\s*) ((?>[1-9][0-9]*)) \z/oxms) {
7790 }
7791  
7792 # $0 --> $0
7793 elsif ($char[$i] =~ /\A \$ 0 \z/oxms) {
7794 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7795 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7796 }
7797 }
7798 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/oxms) {
7799 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7800 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7801 }
7802 }
7803  
7804 # $$ --> $$
7805 elsif ($char[$i] =~ /\A \$\$ \z/oxms) {
7806 }
7807  
7808 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
7809 # $1, $2, $3 --> $1, $2, $3 otherwise
7810 elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/oxms) {
7811 0 $char[$i] = e_capture($1);
7812 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7813 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7814 }
7815 }
7816 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
7817 0 $char[$i] = e_capture($1);
7818 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7819 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7820 }
7821 }
7822  
7823 # $$foo[ ... ] --> $ $foo->[ ... ]
7824 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/oxms) {
7825 0 $char[$i] = e_capture($1.'->'.$2);
7826 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7827 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7828 }
7829 }
7830  
7831 # $$foo{ ... } --> $ $foo->{ ... }
7832 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/oxms) {
7833 0 $char[$i] = e_capture($1.'->'.$2);
7834 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7835 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7836 }
7837 }
7838  
7839 # $$foo
7840 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/oxms) {
7841 0 $char[$i] = e_capture($1);
7842 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7843 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7844 }
7845 }
7846  
7847 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
7848 elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/oxmsgc) {
7849 4 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 4 4
7850 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::PREMATCH())]}';
7851 }
7852 else {
7853 4 $char[$i] = '@{[Eutf2::PREMATCH()]}';
7854 }
7855 }
7856  
7857 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
7858 elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/oxmsgc) {
7859 4 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 4 4
7860 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::MATCH())]}';
7861 }
7862 else {
7863 4 $char[$i] = '@{[Eutf2::MATCH()]}';
7864 }
7865 }
7866  
7867 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
7868 elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/oxmsgc) {
7869 3 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 3 3
7870 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::POSTMATCH())]}';
7871 }
7872 else {
7873 3 $char[$i] = '@{[Eutf2::POSTMATCH()]}';
7874 }
7875 }
7876  
7877 # ${ foo }
7878 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} \z/oxms) {
7879 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7880 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7881 }
7882 }
7883  
7884 # ${ ... }
7885 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/oxms) {
7886 0 $char[$i] = e_capture($1);
7887 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
7888 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7889 }
7890 }
7891  
7892 # $scalar or @array
7893 elsif ($char[$i] =~ /\A [\$\@].+ /oxms) {
7894 9 $char[$i] = e_string($char[$i]);
7895 9 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 9 9
7896 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
7897 }
7898 }
7899  
7900 # quote character before ? + * {
7901 ▶ 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
7902 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
7903 }
7904 else {
7905 24 $char[$i-1] = '(?:' . $char[$i-1] . ')';
7906 }
7907 }
7908 }
7909  
7910 # make regexp string
7911 105 my $prematch = '';
7912 105 $modifier =~ tr/i//d;
7913 105 ▶ if ($left_e > $right_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($left_e > $right_e) 0 105 105
7914 0 return join '', $ope, $delimiter, $prematch, '(?:', @char, '>]}' x ($left_e - $right_e), ')', $matched, $end_delimiter, $modifier;
7915 }
7916 105 return join '', $ope, $delimiter, $prematch, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
7917 }
7918  
7919 #
7920 # escape regexp (s'here'' or s'here''b)
7921 #
7922 22 ▶sub e_s1_q {
Subroutine e_s1_q: called CC=7 SCAR=22.7
Pod undocumented
7923 22 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7924 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
7925  
7926 22 $modifier =~ tr/p//d;
7927 22 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 22 22
7928 0 my $line = 0;
7929 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
7930 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
7931 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
7932 0 last;
7933 }
7934 }
7935 0 die qq{Unsupported modifier "$1" used at line $line.\n};
7936 }
7937  
7938 22 $slash = 'div';
7939  
7940 # literal null string pattern
7941 22 ▶ if ($string eq '') {
Branch: 2 branches
BranchTrueFalseTotal
if ($string eq '') { } 8 14 22
elsif ($modifier =~ tr/Bb//d) { } 1 13 14
7942 8 $modifier =~ tr/bB//d;
7943 8 $modifier =~ tr/i//d;
7944 8 return join '', $ope, $delimiter, $end_delimiter, $modifier;
7945 }
7946  
7947 # with /b /B modifier
7948 elsif ($modifier =~ tr/bB//d) {
7949 1 return e_s1_qb($ope,$delimiter,$end_delimiter,$string,$modifier);
7950 }
7951  
7952 # without /b /B modifier
7953 else {
7954 13 return e_s1_qt($ope,$delimiter,$end_delimiter,$string,$modifier);
7955 }
7956 }
7957  
7958 #
7959 # escape regexp (s'here'')
7960 #
7961 13 ▶sub e_s1_qt {
Subroutine e_s1_qt: called CC=20 SCAR=50.1
Pod undocumented
7962 13 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
7963  
7964 13 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 0 13 13
7965  
7966 # split regexp
7967 13 my @char = $string =~ /\G((?>
7968 [^\x80-\xFF\\\[\$\@\/] |
7969 (?:[\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] |
7970 \[\^ |
7971 \[\: (?>[a-z]+) \:\] |
7972 \[\:\^ (?>[a-z]+) \:\] |
7973 [\$\@\/] |
7974 \\ (?:$q_char) |
7975 (?:$q_char)
7976 ))/oxmsg;
7977  
7978 # unescape character
7979 13 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 25 13 38
7980 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
7981 }
7982  
7983 # open character class [...]
7984 elsif ($char[$i] eq '[') {
7985 0 my $left = $i;
7986 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
7987 0 $i++;
7988 }
7989 0 while (1) {
7990 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
7991 0 die __FILE__, ": Unmatched [] in regexp\n";
7992 }
7993 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
7994 0 my $right = $i;
7995  
7996 # [...]
7997 0 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
7998  
7999 0 $i = $left;
8000 0 last;
8001 }
8002 }
8003 }
8004  
8005 # open character class [^...]
8006 elsif ($char[$i] eq '[^') {
8007 0 my $left = $i;
8008 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
8009 0 $i++;
8010 }
8011 0 while (1) {
8012 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
8013 0 die __FILE__, ": Unmatched [] in regexp\n";
8014 }
8015 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
8016 0 my $right = $i;
8017  
8018 # [^...]
8019 0 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
8020  
8021 0 $i = $left;
8022 0 last;
8023 }
8024 }
8025 }
8026  
8027 # escape $ @ / and \
8028 elsif ($char[$i] =~ /\A [\$\@\/\\] \z/oxms) {
8029 0 $char[$i] = '\\' . $char[$i];
8030 }
8031  
8032 # rewrite character class or escape character
8033 elsif (my $char = character_class($char[$i],$modifier)) {
8034 6 $char[$i] = $char;
8035 }
8036  
8037 # /i modifier
8038 ▶ 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
8039 0 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 0 0 0
8040 0 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
8041 }
8042 else {
8043 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
8044 }
8045 }
8046  
8047 # quote character before ? + * {
8048 ▶ 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
8049 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
8050 }
8051 else {
8052 0 $char[$i-1] = '(?:' . $char[$i-1] . ')';
8053 }
8054 }
8055 }
8056  
8057 13 $modifier =~ tr/i//d;
8058 13 $delimiter = '/';
8059 13 $end_delimiter = '/';
8060 13 my $prematch = '';
8061 13 return join '', $ope, $delimiter, $prematch, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
8062 }
8063  
8064 #
8065 # escape regexp (s'here''b)
8066 #
8067 1 ▶sub e_s1_qb {
Subroutine e_s1_qb: called CC=4 SCAR=14.2
Pod undocumented
8068 1 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
8069  
8070 # split regexp
8071 1 my @char = $string =~ /\G (?>[^\\]|\\\\|[\x00-\xFF]) /oxmsg;
8072  
8073 # unescape character
8074 1 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 3 1 4
8075 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
8076 }
8077  
8078 # remain \\
8079 elsif ($char[$i] eq '\\\\') {
8080 }
8081  
8082 # escape $ @ / and \
8083 elsif ($char[$i] =~ /\A [\$\@\/\\] \z/oxms) {
8084 0 $char[$i] = '\\' . $char[$i];
8085 }
8086 }
8087  
8088 1 $delimiter = '/';
8089 1 $end_delimiter = '/';
8090 1 my $prematch = '';
8091 1 return join '', $ope, $delimiter, $prematch, '(?:', @char, ')', $matched, $end_delimiter, $modifier;
8092 }
8093  
8094 #
8095 # escape regexp (s''here')
8096 #
8097 17 ▶sub e_s2_q {
Subroutine e_s2_q: called CC=4 SCAR=13.9
Pod undocumented
8098 17 my($ope,$delimiter,$end_delimiter,$string) = @_;
8099  
8100 17 $slash = 'div';
8101  
8102 17 my @char = $string =~ / \G (?>[^\x80-\xFF\\]|\\\\|$q_char) /oxmsg;
8103 17 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 9 17 26
8104 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
8105 }
8106  
8107 # not escape \\
8108 elsif ($char[$i] =~ /\A \\\\ \z/oxms) {
8109 }
8110  
8111 # escape $ @ / and \
8112 elsif ($char[$i] =~ /\A [\$\@\/\\] \z/oxms) {
8113 5 $char[$i] = '\\' . $char[$i];
8114 }
8115 }
8116  
8117 17 return join '', $ope, $delimiter, @char, $end_delimiter;
8118 }
8119  
8120 #
8121 # escape regexp (s/here/and here/modifier)
8122 #
8123 136 ▶sub e_sub {
Subroutine e_sub: called CC=20 SCAR=32.6
Pod undocumented
8124 136 my($variable,$delimiter1,$pattern,$end_delimiter1,$delimiter2,$replacement,$end_delimiter2,$modifier) = @_;
8125 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
8126  
8127 136 $modifier =~ tr/p//d;
8128 136 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 136 136
8129 0 my $line = 0;
8130 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
8131 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
8132 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
8133 0 last;
8134 }
8135 }
8136 0 die qq{Unsupported modifier "$1" used at line $line.\n};
8137 }
8138  
8139 136 ▶ if ($variable eq '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($variable eq "") 37 99 136
8140 37 $variable = '$_';
8141 37 $bind_operator = ' =~ ';
8142 }
8143  
8144 136 $slash = 'div';
8145  
8146 # P.128 Start of match (or end of previous match): \G
8147 # P.130 Advanced Use of \G with Perl
8148 # in Chapter 3: Overview of Regular Expression Features and Flavors
8149 # P.312 Iterative Matching: Scalar Context, with /g
8150 # in Chapter 7: Perl
8151 # of ISBN 0-596-00289-0 Mastering Regular Expressions, Second edition
8152  
8153 # P.181 Where You Left Off: The \G Assertion
8154 # in Chapter 5: Pattern Matching
8155 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
8156  
8157 # P.220 Where You Left Off: The \G Assertion
8158 # in Chapter 5: Pattern Matching
8159 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
8160  
8161 136 my $e_modifier = $modifier =~ tr/e//d;
8162 136 my $r_modifier = $modifier =~ tr/r//d;
8163  
8164 136 my $my = '';
8165 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
8166 0 $my = $variable;
8167 0 $variable =~ s/ (?: local \b | my \b | our \b | state \b ) (?>\s*) //oxms;
8168 0 $variable =~ s/ = .+ \z//oxms;
8169 }
8170  
8171 136 (my $variable_basename = $variable) =~ s/ [\[\{].* \z//oxms;
8172 136 $variable_basename =~ s/ \s+ \z//oxms;
8173  
8174 # quote replacement string
8175 136 my $e_replacement = '';
8176 136 ▶ if ($e_modifier >= 1) {
Branch: 1 branch
BranchTrueFalseTotal
if ($e_modifier >= 1) { } 17 119 136
8177 17 $e_replacement = e_qq('', '', '', $replacement);
8178 17 $e_modifier--;
8179 }
8180 else {
8181 119 ▶ if ($delimiter2 eq "'") {
Branch: 1 branch
BranchTrueFalseTotal
if ($delimiter2 eq q[']) { } 17 102 119
8182 17 $e_replacement = e_s2_q('qq', '/', '/', $replacement);
8183 }
8184 else {
8185 102 $e_replacement = e_qq ('qq', $delimiter2, $end_delimiter2, $replacement);
8186 }
8187 }
8188  
8189 136 my $sub = '';
8190  
8191 # with /r
8192 136 ▶ if ($r_modifier) {
Branch: 1 branch
BranchTrueFalseTotal
if ($r_modifier) { } 10 126 136
8193 10 ▶ if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { $modifier =~ /g/mosx }) { } 5 5 10
8194 }
8195  
8196 # s///gr without multibyte anchoring
8197 elsif ($modifier =~ /g/oxms) {
8198 5 ▶ $sub = sprintf(
Branch: 1 branch
BranchTrueFalseTotal
$delimiter1 eq q['] ? : 0 5 5
8199 # 1 2 3 4 5
8200 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}>,
8201  
8202 $variable, # 1
8203 ($delimiter1 eq "'") ? # 2
8204 e_s1_q('m', $delimiter1, $end_delimiter1, $pattern, $modifier) : # :
8205 e_s1 ('m', $delimiter1, $end_delimiter1, $pattern, $modifier), # :
8206 $s_matched, # 3
8207 $e_replacement, # 4
8208 '$Eutf2::re_r=CORE::eval $Eutf2::re_r; ' x $e_modifier, # 5
8209 );
8210 }
8211  
8212 # s///r
8213 else {
8214  
8215 5 my $prematch = q{$`};
8216  
8217 5 ▶ $sub = sprintf(
Branch: 1 branch
BranchTrueFalseTotal
$delimiter1 eq q['] ? : 0 5 5
8218 # 1 2 3 4 5 6 7
8219 q<(%s =~ %s) ? CORE::eval{%s local $^W=0; local $Eutf2::re_r=%s; %s"%s$Eutf2::re_r$'" } : %s>,
8220  
8221 $variable, # 1
8222 ($delimiter1 eq "'") ? # 2
8223 e_s1_q('m', $delimiter1, $end_delimiter1, $pattern, $modifier) : # :
8224 e_s1 ('m', $delimiter1, $end_delimiter1, $pattern, $modifier), # :
8225 $s_matched, # 3
8226 $e_replacement, # 4
8227 '$Eutf2::re_r=CORE::eval $Eutf2::re_r; ' x $e_modifier, # 5
8228 $prematch, # 6
8229 $variable, # 7
8230 );
8231 }
8232  
8233 # $var !~ s///r doesn't make sense
8234 10 ▶ if ($bind_operator =~ / !~ /oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($bind_operator =~ / !~ /mosx) 0 10 10
8235 0 $sub = q{die("$0: Using !~ with s///r doesn't make sense"), } . $sub;
8236 }
8237 }
8238  
8239 # without /r
8240 else {
8241 126 ▶ if (0) {
Branch: 1 branch
BranchTrueFalseTotal
if (do { $modifier =~ /g/mosx }) { } 30 96 126
8242 }
8243  
8244 # s///g without multibyte anchoring
8245 elsif ($modifier =~ /g/oxms) {
8246 30 ▶ $sub = sprintf(
Branch: 2 branches
BranchTrueFalseTotal
$delimiter1 eq q['] ? : 3 27 30
$bind_operator =~ / !~ /mosx ? : 3 27 30
8247 # 1 2 3 4 5 6 7 8
8248 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}>,
8249  
8250 $variable, # 1
8251 ($delimiter1 eq "'") ? # 2
8252 e_s1_q('m', $delimiter1, $end_delimiter1, $pattern, $modifier) : # :
8253 e_s1 ('m', $delimiter1, $end_delimiter1, $pattern, $modifier), # :
8254 $s_matched, # 3
8255 $e_replacement, # 4
8256 '$Eutf2::re_r=CORE::eval $Eutf2::re_r; ' x $e_modifier, # 5
8257 $variable, # 6
8258 $variable, # 7
8259 ($bind_operator =~ / !~ /oxms) ? '!' : '', # 8
8260 );
8261 }
8262  
8263 # s///
8264 else {
8265  
8266 96 my $prematch = q{$`};
8267  
8268 96 ▶ $sub = sprintf(
Branch: 2 branches
BranchTrueFalseTotal
$bind_operator =~ / =~ /mosx ? : 85 11 96
$delimiter1 eq q['] ? : 19 77 96
8269  
8270 ($bind_operator =~ / =~ /oxms) ?
8271  
8272 # 1 2 3 4 5 6 7 8
8273 q<(%s%s%s) ? CORE::eval{%s local $^W=0; local $Eutf2::re_r=%s; %s%s="%s$Eutf2::re_r$'"; 1 } : undef> :
8274  
8275 # 1 2 3 4 5 6 7 8
8276 q<(%s%s%s) ? 1 : CORE::eval{%s local $^W=0; local $Eutf2::re_r=%s; %s%s="%s$Eutf2::re_r$'"; undef }>,
8277  
8278 $variable, # 1
8279 $bind_operator, # 2
8280 ($delimiter1 eq "'") ? # 3
8281 e_s1_q('m', $delimiter1, $end_delimiter1, $pattern, $modifier) : # :
8282 e_s1 ('m', $delimiter1, $end_delimiter1, $pattern, $modifier), # :
8283 $s_matched, # 4
8284 $e_replacement, # 5
8285 '$Eutf2::re_r=CORE::eval $Eutf2::re_r; ' x $e_modifier, # 6
8286 $variable, # 7
8287 $prematch, # 8
8288 );
8289 }
8290 }
8291  
8292 # (my $foo = $bar) =~ s/// --> (my $foo = $bar, CORE::eval { ... })[1]
8293 136 ▶ if ($my ne '') {
Branch: 1 branch
BranchTrueFalseTotal
if ($my ne "") 0 136 136
8294 0 $sub = "($my, $sub)[1]";
8295 }
8296  
8297 # clear s/// variable
8298 136 $sub_variable = '';
8299 136 $bind_operator = '';
8300  
8301 136 return $sub;
8302 }
8303  
8304 #
8305 # escape regexp of split qr//
8306 #
8307 101 ▶sub e_split {
Subroutine e_split: called CC=88 SCAR=73.2
Pod undocumented
8308 101 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
8309 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
8310  
8311 101 $modifier =~ tr/p//d;
8312 101 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 101 101
8313 0 my $line = 0;
8314 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
8315 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
8316 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
8317 0 last;
8318 }
8319 }
8320 0 die qq{Unsupported modifier "$1" used at line $line.\n};
8321 }
8322  
8323 101 $slash = 'div';
8324  
8325 # /b /B modifier
8326 101 ▶ if ($modifier =~ tr/bB//d) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ tr/Bb//d) 0 101 101
8327 0 return join '', 'split', $ope, $delimiter, $string, $end_delimiter, $modifier;
8328 }
8329  
8330 101 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 0 101 101
8331 101 my $metachar = qr/[\@\\|[\]{^]/oxms;
8332  
8333 # split regexp
8334 101 my @char = $string =~ /\G((?>
8335 [^\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] |
8336 \\x (?>[0-9A-Fa-f]{1,2}) |
8337 \\ (?>[0-7]{2,3}) |
8338 \\c [\x40-\x5F] |
8339 \\x\{ (?>[0-9A-Fa-f]+) \} |
8340 \\o\{ (?>[0-7]+) \} |
8341 \\[bBNpP]\{ (?>[^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} |
8342 \\ $q_char |
8343 \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} |
8344 \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} |
8345 \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} |
8346 [\$\@] $qq_variable |
8347 \$ (?>\s* [0-9]+) |
8348 \$ (?>\s*) \{ (?>\s* [0-9]+ \s*) \} |
8349 \$ \$ (?![\w\{]) |
8350 \$ (?>\s*) \$ (?>\s*) $qq_variable |
8351 \[\^ |
8352 \[\: (?>[a-z]+) :\] |
8353 \[\:\^ (?>[a-z]+) :\] |
8354 \(\? |
8355 $q_char
8356 ))/oxmsg;
8357  
8358 101 my $left_e = 0;
8359 101 my $right_e = 0;
8360 101 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 284 101 385
8361  
8362 # "\L\u" --> "\u\L"
8363 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
8364 0 @char[$i,$i+1] = @char[$i+1,$i];
8365 }
8366  
8367 # "\U\l" --> "\l\U"
8368 ▶ 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
8369 0 @char[$i,$i+1] = @char[$i+1,$i];
8370 }
8371  
8372 # octal escape sequence
8373 elsif ($char[$i] =~ /\A \\o \{ ([0-7]+) \} \z/oxms) {
8374 1 $char[$i] = Eutf2::octchr($1);
8375 }
8376  
8377 # hexadecimal escape sequence
8378 elsif ($char[$i] =~ /\A \\x \{ ([0-9A-Fa-f]+) \} \z/oxms) {
8379 1 $char[$i] = Eutf2::hexchr($1);
8380 }
8381  
8382 # \b{...} --> b\{...}
8383 # \B{...} --> B\{...}
8384 # \N{CHARNAME} --> N\{CHARNAME}
8385 # \p{PROPERTY} --> p\{PROPERTY}
8386 # \P{PROPERTY} --> P\{PROPERTY}
8387 elsif ($char[$i] =~ /\A \\ ([bBNpP]) ( \{ ([^\x80-\xFF0-9\}][^\x80-\xFF\}]*) \} ) \z/oxms) {
8388 0 $char[$i] = $1 . '\\' . $2;
8389 }
8390  
8391 # \p, \P, \X --> p, P, X
8392 elsif ($char[$i] =~ /\A \\ ( [pPX] ) \z/oxms) {
8393 0 $char[$i] = $1;
8394 }
8395  
8396 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
8397 }
8398  
8399 # join separated multiple-octet
8400 elsif ($char[$i] =~ /\A (?: \\ [0-7]{2,3} | \\x [0-9A-Fa-f]{1,2}) \z/oxms) {
8401 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
8402 0 $char[$i] .= join '', splice @char, $i+1, 3;
8403 }
8404 ▶ 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
8405 0 $char[$i] .= join '', splice @char, $i+1, 2;
8406 }
8407 ▶ 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
8408 0 $char[$i] .= join '', splice @char, $i+1, 1;
8409 }
8410 }
8411  
8412 # open character class [...]
8413 elsif ($char[$i] eq '[') {
8414 3 my $left = $i;
8415 3 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 3 3
8416 0 $i++;
8417 }
8418 3 while (1) {
8419 7 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 7 7
8420 0 die __FILE__, ": Unmatched [] in regexp\n";
8421 }
8422 7 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 3 4 7
8423 3 my $right = $i;
8424  
8425 # [...]
8426 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
8427 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);
8428 }
8429 else {
8430 3 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
8431 }
8432  
8433 3 $i = $left;
8434 3 last;
8435 }
8436 }
8437 }
8438  
8439 # open character class [^...]
8440 elsif ($char[$i] eq '[^') {
8441 1 my $left = $i;
8442 1 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 1 1
8443 0 $i++;
8444 }
8445 1 while (1) {
8446 2 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 2 2
8447 0 die __FILE__, ": Unmatched [] in regexp\n";
8448 }
8449 2 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 1 1 2
8450 1 my $right = $i;
8451  
8452 # [^...]
8453 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
8454 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);
8455 }
8456 else {
8457 1 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
8458 }
8459  
8460 1 $i = $left;
8461 1 last;
8462 }
8463 }
8464 }
8465  
8466 # rewrite character class or escape character
8467 elsif (my $char = character_class($char[$i],$modifier)) {
8468 5 $char[$i] = $char;
8469 }
8470  
8471 # P.794 29.2.161. split
8472 # in Chapter 29: Functions
8473 # of ISBN 0-596-00027-8 Programming Perl Third Edition.
8474  
8475 # P.951 split
8476 # in Chapter 27: Functions
8477 # of ISBN 978-0-596-00492-7 Programming Perl 4th Edition.
8478  
8479 # said "The //m modifier is assumed when you split on the pattern /^/",
8480 # but perl5.008 is not so. Therefore, this software adds //m.
8481 # (and so on)
8482  
8483 # split(m/^/) --> split(m/^/m)
8484 ▶ 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
8485 11 $modifier .= 'm';
8486 }
8487  
8488 # /i modifier
8489 ▶ 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
8490 0 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 0 0 0
8491 0 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
8492 }
8493 else {
8494 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
8495 }
8496 }
8497  
8498 # \u \l \U \L \F \Q \E
8499 elsif ($char[$i] =~ /\A ([<>]) \z/oxms) {
8500 2 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) 0 2 2
8501 0 $char[$i] = '\\' . $char[$i];
8502 }
8503 }
8504 elsif ($char[$i] eq '\u') {
8505 0 $char[$i] = '@{[Eutf2::ucfirst qq<';
8506 0 $left_e++;
8507 }
8508 elsif ($char[$i] eq '\l') {
8509 0 $char[$i] = '@{[Eutf2::lcfirst qq<';
8510 0 $left_e++;
8511 }
8512 elsif ($char[$i] eq '\U') {
8513 0 $char[$i] = '@{[Eutf2::uc qq<';
8514 0 $left_e++;
8515 }
8516 elsif ($char[$i] eq '\L') {
8517 0 $char[$i] = '@{[Eutf2::lc qq<';
8518 0 $left_e++;
8519 }
8520 elsif ($char[$i] eq '\F') {
8521 0 $char[$i] = '@{[Eutf2::fc qq<';
8522 0 $left_e++;
8523 }
8524 elsif ($char[$i] eq '\Q') {
8525 0 $char[$i] = '@{[CORE::quotemeta qq<';
8526 0 $left_e++;
8527 }
8528 elsif ($char[$i] eq '\E') {
8529 0 ▶ if ($right_e < $left_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($right_e < $left_e) { } 0 0 0
8530 0 $char[$i] = '>]}';
8531 0 $right_e++;
8532 }
8533 else {
8534 0 $char[$i] = '';
8535 }
8536 }
8537 elsif ($char[$i] eq '\Q') {
8538 0 while (1) {
8539 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
8540 0 last;
8541 }
8542 0 ▶ if ($char[$i] eq '\E') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "\\E") 0 0 0
8543 0 last;
8544 }
8545 }
8546 }
8547 elsif ($char[$i] eq '\E') {
8548 }
8549  
8550 # $0 --> $0
8551 elsif ($char[$i] =~ /\A \$ 0 \z/oxms) {
8552 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8553 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8554 }
8555 }
8556 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) 0 (?>\s*) \} \z/oxms) {
8557 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8558 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8559 }
8560 }
8561  
8562 # $$ --> $$
8563 elsif ($char[$i] =~ /\A \$\$ \z/oxms) {
8564 }
8565  
8566 # $1, $2, $3 --> $2, $3, $4 after s/// with multibyte anchoring
8567 # $1, $2, $3 --> $1, $2, $3 otherwise
8568 elsif ($char[$i] =~ /\A \$ ((?>[1-9][0-9]*)) \z/oxms) {
8569 0 $char[$i] = e_capture($1);
8570 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8571 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8572 }
8573 }
8574 elsif ($char[$i] =~ /\A \$ \{ (?>\s*) ((?>[1-9][0-9]*)) (?>\s*) \} \z/oxms) {
8575 0 $char[$i] = e_capture($1);
8576 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8577 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8578 }
8579 }
8580  
8581 # $$foo[ ... ] --> $ $foo->[ ... ]
8582 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \[ (?:$qq_bracket)*? \] ) \z/oxms) {
8583 0 $char[$i] = e_capture($1.'->'.$2);
8584 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8585 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8586 }
8587 }
8588  
8589 # $$foo{ ... } --> $ $foo->{ ... }
8590 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) ( \{ (?:$qq_brace)*? \} ) \z/oxms) {
8591 0 $char[$i] = e_capture($1.'->'.$2);
8592 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8593 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8594 }
8595 }
8596  
8597 # $$foo
8598 elsif ($char[$i] =~ /\A \$ ((?> \$ [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* )) \z/oxms) {
8599 0 $char[$i] = e_capture($1);
8600 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8601 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8602 }
8603 }
8604  
8605 # $`, ${`}, $PREMATCH, ${PREMATCH}, ${^PREMATCH} --> Eutf2::PREMATCH()
8606 elsif ($char[$i] =~ /\A ( \$` | \$\{`\} | \$ (?>\s*) PREMATCH | \$ (?>\s*) \{ (?>\s*) PREMATCH (?>\s*) \} | \$ (?>\s*) \{\^PREMATCH\} ) \z/oxmsgc) {
8607 12 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 12 12
8608 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::PREMATCH())]}';
8609 }
8610 else {
8611 12 $char[$i] = '@{[Eutf2::PREMATCH()]}';
8612 }
8613 }
8614  
8615 # $&, ${&}, $MATCH, ${MATCH}, ${^MATCH} --> Eutf2::MATCH()
8616 elsif ($char[$i] =~ /\A ( \$& | \$\{&\} | \$ (?>\s*) MATCH | \$ (?>\s*) \{ (?>\s*) MATCH (?>\s*) \} | \$ (?>\s*) \{\^MATCH\} ) \z/oxmsgc) {
8617 12 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 12 12
8618 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::MATCH())]}';
8619 }
8620 else {
8621 12 $char[$i] = '@{[Eutf2::MATCH()]}';
8622 }
8623 }
8624  
8625 # $POSTMATCH, ${POSTMATCH}, ${^POSTMATCH} --> Eutf2::POSTMATCH()
8626 elsif ($char[$i] =~ /\A ( \$ (?>\s*) POSTMATCH | \$ (?>\s*) \{ (?>\s*) POSTMATCH (?>\s*) \} | \$ (?>\s*) \{\^POSTMATCH\} ) \z/oxmsgc) {
8627 9 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) { } 0 9 9
8628 0 $char[$i] = '@{[Eutf2::ignorecase(Eutf2::POSTMATCH())]}';
8629 }
8630 else {
8631 9 $char[$i] = '@{[Eutf2::POSTMATCH()]}';
8632 }
8633 }
8634  
8635 # ${ foo }
8636 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ((?> \s* [A-Za-z_][A-Za-z0-9_]*(?: ::[A-Za-z_][A-Za-z0-9_]*)* \s* )) \} \z/oxms) {
8637 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8638 0 $char[$i] = '@{[Eutf2::ignorecase(' . $1 . ')]}';
8639 }
8640 }
8641  
8642 # ${ ... }
8643 elsif ($char[$i] =~ /\A \$ (?>\s*) \{ ( .+ ) \} \z/oxms) {
8644 0 $char[$i] = e_capture($1);
8645 0 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 0 0
8646 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8647 }
8648 }
8649  
8650 # $scalar or @array
8651 elsif ($char[$i] =~ /\A [\$\@].+ /oxms) {
8652 3 $char[$i] = e_string($char[$i]);
8653 3 ▶ if ($ignorecase) {
Branch: 1 branch
BranchTrueFalseTotal
if ($ignorecase) 0 3 3
8654 0 $char[$i] = '@{[Eutf2::ignorecase(' . $char[$i] . ')]}';
8655 }
8656 }
8657  
8658 # quote character before ? + * {
8659 ▶ 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
8660 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
8661 }
8662 else {
8663 4 $char[$i-1] = '(?:' . $char[$i-1] . ')';
8664 }
8665 }
8666 }
8667  
8668 # make regexp string
8669 101 $modifier =~ tr/i//d;
8670 101 ▶ if ($left_e > $right_e) {
Branch: 1 branch
BranchTrueFalseTotal
if ($left_e > $right_e) 0 101 101
8671 0 return join '', 'Eutf2::split', $ope, $delimiter, @char, '>]}' x ($left_e - $right_e), $end_delimiter, $modifier;
8672 }
8673 101 return join '', 'Eutf2::split', $ope, $delimiter, @char, $end_delimiter, $modifier;
8674 }
8675  
8676 #
8677 # escape regexp of split qr''
8678 #
8679 0 ▶sub e_split_q {
Subroutine e_split_q: not called CC=26 SCAR=65.5
Pod undocumented
8680 0 my($ope,$delimiter,$end_delimiter,$string,$modifier) = @_;
8681 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
8682  
8683 0 $modifier =~ tr/p//d;
8684 0 ▶ if ($modifier =~ /([adlu])/oxms) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ /([adlu])/mosx) 0 0 0
8685 0 my $line = 0;
8686 0 ▶ for (my $i=0; my($package,$filename,$use_line,$subroutine) = caller($i); $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
8687 0 ▶ if ($filename ne __FILE__) {
Branch: 1 branch
BranchTrueFalseTotal
if ($filename ne __FILE__) 0 0 0
8688 0 $line = $use_line + (CORE::substr($_,0,pos($_)) =~ tr/\n//) + 1;
8689 0 last;
8690 }
8691 }
8692 0 die qq{Unsupported modifier "$1" used at line $line.\n};
8693 }
8694  
8695 0 $slash = 'div';
8696  
8697 # /b /B modifier
8698 0 ▶ if ($modifier =~ tr/bB//d) {
Branch: 1 branch
BranchTrueFalseTotal
if ($modifier =~ tr/Bb//d) 0 0 0
8699 0 return join '', 'split', $ope, $delimiter, $string, $end_delimiter, $modifier;
8700 }
8701  
8702 0 ▶ my $ignorecase = ($modifier =~ /i/oxms) ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$modifier =~ /i/mosx ? : 0 0 0
8703  
8704 # split regexp
8705 0 my @char = $string =~ /\G((?>
8706 [^\x80-\xFF\\\[] |
8707 (?:[\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] |
8708 \[\^ |
8709 \[\: (?>[a-z]+) \:\] |
8710 \[\:\^ (?>[a-z]+) \:\] |
8711 \\ (?:$q_char) |
8712 (?:$q_char)
8713 ))/oxmsg;
8714  
8715 # unescape character
8716 0 ▶ for (my $i=0; $i <= $#char; $i++) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i <= $#char) 0 0 0
8717 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
8718 }
8719  
8720 # open character class [...]
8721 elsif ($char[$i] eq '[') {
8722 0 my $left = $i;
8723 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
8724 0 $i++;
8725 }
8726 0 while (1) {
8727 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
8728 0 die __FILE__, ": Unmatched [] in regexp\n";
8729 }
8730 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
8731 0 my $right = $i;
8732  
8733 # [...]
8734 0 splice @char, $left, $right-$left+1, Eutf2::charlist_qr(@char[$left+1..$right-1], $modifier);
8735  
8736 0 $i = $left;
8737 0 last;
8738 }
8739 }
8740 }
8741  
8742 # open character class [^...]
8743 elsif ($char[$i] eq '[^') {
8744 0 my $left = $i;
8745 0 ▶ if ($char[$i+1] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i + 1] eq "]") 0 0 0
8746 0 $i++;
8747 }
8748 0 while (1) {
8749 0 ▶ if (++$i > $#char) {
Branch: 1 branch
BranchTrueFalseTotal
if (++$i > $#char) 0 0 0
8750 0 die __FILE__, ": Unmatched [] in regexp\n";
8751 }
8752 0 ▶ if ($char[$i] eq ']') {
Branch: 1 branch
BranchTrueFalseTotal
if ($char[$i] eq "]") 0 0 0
8753 0 my $right = $i;
8754  
8755 # [^...]
8756 0 splice @char, $left, $right-$left+1, Eutf2::charlist_not_qr(@char[$left+1..$right-1], $modifier);
8757  
8758 0 $i = $left;
8759 0 last;
8760 }
8761 }
8762 }
8763  
8764 # rewrite character class or escape character
8765 elsif (my $char = character_class($char[$i],$modifier)) {
8766 0 $char[$i] = $char;
8767 }
8768  
8769 # split(m/^/) --> split(m/^/m)
8770 ▶ 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
8771 0 $modifier .= 'm';
8772 }
8773  
8774 # /i modifier
8775 ▶ 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
8776 0 ▶ if (CORE::length(Eutf2::fc($char[$i])) == 1) {
Branch: 1 branch
BranchTrueFalseTotal
if (length &fc($char[$i]) == 1) { } 0 0 0
8777 0 $char[$i] = '[' . Eutf2::uc($char[$i]) . Eutf2::fc($char[$i]) . ']';
8778 }
8779 else {
8780 0 $char[$i] = '(?:' . Eutf2::uc($char[$i]) . '|' . Eutf2::fc($char[$i]) . ')';
8781 }
8782 }
8783  
8784 # quote character before ? + * {
8785 ▶ 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
8786 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
8787 }
8788 else {
8789 0 $char[$i-1] = '(?:' . $char[$i-1] . ')';
8790 }
8791 }
8792 }
8793  
8794 0 $modifier =~ tr/i//d;
8795 0 return join '', 'Eutf2::split', $ope, $delimiter, @char, $end_delimiter, $modifier;
8796 }
8797  
8798 #
8799 # instead of Carp::carp
8800 #
8801 0 ▶sub carp {
Subroutine carp: not called CC=1 SCAR=6.9
Pod undocumented
8802 0 my($package,$filename,$line) = caller(1);
8803 0 print STDERR "@_ at $filename line $line.\n";
8804 }
8805  
8806 #
8807 # instead of Carp::croak
8808 #
8809 1 ▶sub croak {
Subroutine croak: called CC=1 SCAR=0.0
Pod undocumented
8810 1 my($package,$filename,$line) = caller(1);
8811 1 print STDERR "@_ at $filename line $line.\n";
8812 1 die "\n";
8813 }
8814  
8815 #
8816 # instead of Carp::cluck
8817 #
8818 0 ▶sub cluck {
Subroutine cluck: not called CC=2 SCAR=17.9
Pod undocumented
8819 0 my $i = 0;
8820 0 my @cluck = ();
8821 0 ▶ while (my($package,$filename,$line,$subroutine) = caller($i)) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
8822 0 push @cluck, "[$i] $filename($line) $package::$subroutine\n";
8823 0 $i++;
8824 }
8825 0 print STDERR CORE::reverse @cluck;
8826 0 print STDERR "\n";
8827 0 print STDERR @_;
8828 }
8829  
8830 #
8831 # instead of Carp::confess
8832 #
8833 0 ▶sub confess {
Subroutine confess: not called CC=2 SCAR=17.9
Pod undocumented
8834 0 my $i = 0;
8835 0 my @confess = ();
8836 0 ▶ while (my($package,$filename,$line,$subroutine) = caller($i)) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = caller $i) 0 0 0
8837 0 push @confess, "[$i] $filename($line) $package::$subroutine\n";
8838 0 $i++;
8839 }
8840 0 print STDERR CORE::reverse @confess;
8841 0 print STDERR "\n";
8842 0 print STDERR @_;
8843 0 die "\n";
8844 }
8845  
8846 631 1;
8847  
8848 __END__
↑ Summary UTF2.pm »