XSH2/Parser.pm

filter: Statementstmt 61.7% 5694 / 9224 Branchbran 30.5% 1754 / 5734 Conditioncond 32.1% 554 / 1721 MC/DCmcdc 15.3% 163 / 1064 Subroutinesub 62.3% 297 / 476 Podpod 0.0% 0 / 1 totaltotal 46.4% 8462 / 18220 CC 3512 SCAR 87.2
CC
3512
Cov
48%
_generate
56882.0
command
17830.5
loc
11767.2
CRAP 6103.8
↑ Summary XSH2/Completion.pm »
1 #
2 # This parser was generated with
3 # Parse::RecDescent version 1.967015
4 #
5  
6 {
7 # GENERATE RECURSIVE DESCENT PARSER OBJECTS FROM A GRAMMAR
8  
9 8 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 package # this should not be indexed by CPAN
13 XML::XSH2::Parser::_Runtime;
14  
15 8 ▶use Text::Balanced qw ( extract_codeblock extract_bracketed extract_quotelike extract_delimited );
Subroutine BEGIN: called CC=1 SCAR=0.0
16  
17 8 ▶use vars qw ( $skip );
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 8 *defskip = \ '\s*'; # DEFAULT SEPARATOR IS OPTIONAL WHITESPACE
20 8 $skip = '\s*'; # UNIVERSAL SEPARATOR IS OPTIONAL WHITESPACE
21 8 my $MAXREP = 100_000_000; # REPETITIONS MATCH AT MOST 100,000,000 TIMES
22  
23  
24  
25 package # this should not be indexed by CPAN
26 XML::XSH2::Parser::_Runtime::LineCounter;
27  
28  
29 sub TIESCALAR # ($classname, \$text, $thisparser, $prevflag)
30 31925 ▶{
Subroutine TIESCALAR: called CC=2 SCAR=7.6
31 31925 ▶ bless {
Branch: 1 branch
BranchTrueFalseTotal
$_[3] ? : 0 31925 31925
32 text => $_[1],
33 parser => $_[2],
34 prev => $_[3]?1:0,
35 }, $_[0];
36 }
37  
38 sub FETCH
39 2897 ▶{
Subroutine FETCH: called CC=2 SCAR=6.9
40 2897 my $parser = $_[0]->{parser};
41 2897 my $cache = $parser->{linecounter_cache};
42 2897 my $from = $parser->{fulltextlen}-length(${$_[0]->{text}})-$_[0]->{prev}
43 2897 ;
44  
45 2897 ▶ unless (exists $cache->{$from})
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $cache->{$from}) 1817 1080 2897
46 {
47 $parser->{lastlinenum} = $parser->{offsetlinenum}
48 1817 - XML::XSH2::Parser::_Runtime::_linecount(substr($parser->{fulltext},$from))
49 + 1;
50 1817 $cache->{$from} = $parser->{lastlinenum};
51 }
52 2897 return $cache->{$from};
53 }
54  
55 sub STORE
56 0 ▶{
Subroutine STORE: not called CC=1 SCAR=6.9
57 0 my $parser = $_[0]->{parser};
58 0 $parser->{offsetlinenum} -= $parser->{lastlinenum} - $_[1];
59 0 return undef;
60 }
61  
62 sub resync # ($linecounter)
63 0 ▶{
Subroutine resync: not called CC=2 SCAR=17.9
64 0 my $self = tied($_[0]);
65 0 ▶ die "Tried to alter something other than a LineCounter\n"
Branch: 1 branch
BranchTrueFalseTotal
unless $self =~ /XML::XSH2::Parser::_Runtime::LineCounter/ 0 0 0
66 unless $self =~ /XML::XSH2::Parser::_Runtime::LineCounter/;
67  
68 0 my $parser = $self->{parser};
69 my $apparently = $parser->{offsetlinenum}
70 0 - XML::XSH2::Parser::_Runtime::_linecount(${$self->{text}})
71 + 1;
72  
73 0 $parser->{offsetlinenum} += $parser->{lastlinenum} - $apparently;
74 0 return 1;
75 }
76  
77 package # this should not be indexed by CPAN
78 XML::XSH2::Parser::_Runtime::ColCounter;
79  
80 sub TIESCALAR # ($classname, \$text, $thisparser, $prevflag)
81 31925 ▶{
Subroutine TIESCALAR: called CC=2 SCAR=7.6
82 31925 ▶ bless {
Branch: 1 branch
BranchTrueFalseTotal
$_[3] ? : 0 31925 31925
83 text => $_[1],
84 parser => $_[2],
85 prev => $_[3]?1:0,
86 }, $_[0];
87 }
88  
89 sub FETCH
90 1200 ▶{
Subroutine FETCH: called CC=1 SCAR=0.0
91 1200 my $parser = $_[0]->{parser};
92 1200 my $missing = $parser->{fulltextlen}-length(${$_[0]->{text}})-$_[0]->{prev}+1;
93 1200 substr($parser->{fulltext},0,$missing) =~ m/^(.*)\Z/m;
94 1200 return length($1);
95 }
96  
97 sub STORE
98 0 ▶{
Subroutine STORE: not called CC=1 SCAR=6.9
99 0 die "Can't set column number via \$thiscolumn\n";
100 }
101  
102  
103 package # this should not be indexed by CPAN
104 XML::XSH2::Parser::_Runtime::OffsetCounter;
105  
106 sub TIESCALAR # ($classname, \$text, $thisparser, $prev)
107 31925 ▶{
Subroutine TIESCALAR: called CC=2 SCAR=7.6
108 31925 ▶ bless {
Branch: 1 branch
BranchTrueFalseTotal
$_[3] ? : 0 31925 31925
109 text => $_[1],
110 parser => $_[2],
111 prev => $_[3]?-1:0,
112 }, $_[0];
113 }
114  
115 sub FETCH
116 1200 ▶{
Subroutine FETCH: called CC=1 SCAR=0.0
117 1200 my $parser = $_[0]->{parser};
118 1200 return $parser->{fulltextlen}-length(${$_[0]->{text}})+$_[0]->{prev};
119 }
120  
121 sub STORE
122 0 ▶{
Subroutine STORE: not called CC=1 SCAR=6.9
123 0 die "Can't set current offset via \$thisoffset or \$prevoffset\n";
124 }
125  
126  
127  
128 package # this should not be indexed by CPAN
129 XML::XSH2::Parser::_Runtime::Rule;
130  
131 sub new ($$$$$)
132 0 ▶{
Subroutine new: not called CC=5 SCAR=34.0
133 0 ▶ my $class = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
134 0 my $name = $_[1];
135 0 my $owner = $_[2];
136 0 my $line = $_[3];
137 0 my $replace = $_[4];
138  
139 0 ▶ if (defined $owner->{"rules"}{$name})
Branch: 1 branch
BranchTrueFalseTotal
if (defined $owner->{'rules'}{$name}) { } 0 0 0
140 {
141 0 my $self = $owner->{"rules"}{$name};
142 0 ▶ if ($replace && !$self->{"changed"})
Branch: 1 branch
BranchTrueFalseTotal
if ($replace and not $self->{"changed"}) 0 0 0
Condition0%0/3
$replace and not $self->{"changed"}
!ll&&!rl&&r
000
MC/DC0%0/2
$replace and not $self->{"changed"}
$replace not $self->{"changed"}
Truth table0%0/3
A and not(B)
A= $replaceB= not $self->{"changed"}
ABresult
0X0
100
111
143 {
144 0 $self->reset;
145 }
146 0 return $self;
147 }
148 else
149 {
150 0 return $owner->{"rules"}{$name} =
151 bless
152 {
153 "name" => $name,
154 "prods" => [],
155 "calls" => [],
156 "changed" => 0,
157 "line" => $line,
158 "impcount" => 0,
159 "opcount" => 0,
160 "vars" => "",
161 }, $class;
162 }
163 }
164  
165 sub reset($)
166 0 ▶{
Subroutine reset: not called CC=1 SCAR=6.9
167 0 @{$_[0]->{"prods"}} = ();
168 0 @{$_[0]->{"calls"}} = ();
169 0 $_[0]->{"changed"} = 0;
170 0 $_[0]->{"impcount"} = 0;
171 0 $_[0]->{"opcount"} = 0;
172 0 $_[0]->{"vars"} = "";
173 }
174  
175 0 ▶sub DESTROY {}
Subroutine DESTROY: not called CC=1 SCAR=0.0
176  
177 sub hasleftmost($$)
178 0 ▶{
Subroutine hasleftmost: not called CC=3 SCAR=24.8
179 0 my ($self, $ref) = @_;
180  
181 0 my $prod;
182 0 foreach $prod ( @{$self->{"prods"}} )
183 {
184 0 ▶ return 1 if $prod->hasleftmost($ref);
Branch: 1 branch
BranchTrueFalseTotal
if $prod->hasleftmost($ref) 0 0 0
185 }
186  
187 0 return 0;
188 }
189  
190 sub leftmostsubrules($)
191 0 ▶{
Subroutine leftmostsubrules: not called CC=2 SCAR=17.9
192 0 my $self = shift;
193 0 my @subrules = ();
194  
195 0 my $prod;
196 0 foreach $prod ( @{$self->{"prods"}} )
197 {
198 0 push @subrules, $prod->leftmostsubrule();
199 }
200  
201 0 return @subrules;
202 }
203  
204 sub expected($)
205 0 ▶{
Subroutine expected: not called CC=4 SCAR=30.0
206 0 my $self = shift;
207 0 my @expected = ();
208  
209 0 my $prod;
210 0 foreach $prod ( @{$self->{"prods"}} )
211 {
212 0 my $next = $prod->expected();
213 0 ▶ unless (! $next or _contains($next,@expected) )
Branch: 1 branch
BranchTrueFalseTotal
unless (not $next or &_contains($next, @expected)) 0 0 0
Condition0%0/3
not $next or &_contains($next, @expected)
l!l&&r!l&&!r
000
MC/DC0%0/2
not $next or &_contains($next, @expected)
not $next &_contains($next, @expected)
Truth table0%0/3
not(A) or B
A= not $nextB= &_contains($next, @expected)
ABresult
1X1
011
000
214 {
215 0 push @expected, $next;
216 }
217 }
218  
219 0 return join ', or ', @expected;
220 }
221  
222 sub _contains($@)
223 0 ▶{
Subroutine _contains: not called CC=3 SCAR=24.8
224 0 my $target = shift;
225 0 my $item;
226 0 ▶ foreach $item ( @_ ) { return 1 if $target eq $item; }
Branch: 1 branch
BranchTrueFalseTotal
if $target eq $item 0 0 0
227 0 return 0;
228 }
229  
230 sub addcall($$)
231 0 ▶{
Subroutine addcall: not called CC=2 SCAR=17.9
232 0 my ( $self, $subrule ) = @_;
233 0 ▶ unless ( _contains($subrule, @{$self->{"calls"}}) )
Branch: 1 branch
BranchTrueFalseTotal
unless (&_contains($subrule, @{$$self{"calls"};})) 0 0 0
234 {
235 0 push @{$self->{"calls"}}, $subrule;
236 }
237 }
238  
239 sub addprod($$)
240 0 ▶{
Subroutine addprod: not called CC=1 SCAR=6.9
241 0 my ( $self, $prod ) = @_;
242 0 push @{$self->{"prods"}}, $prod;
243 0 $self->{"changed"} = 1;
244 0 $self->{"impcount"} = 0;
245 0 $self->{"opcount"} = 0;
246 0 $prod->{"number"} = $#{$self->{"prods"}};
247 0 return $prod;
248 }
249  
250 sub addvar
251 0 ▶{
Subroutine addvar: not called CC=2 SCAR=17.9
252 0 my ( $self, $var, $parser ) = @_;
253 0 ▶ if ($var =~ /\A\s*local\s+([%@\$]\w+)/)
Branch: 1 branch
BranchTrueFalseTotal
if ($var =~ /\A\s*local\s+([%\@\$]\w+)/) { } 0 0 0
254 {
255 0 $parser->{localvars} .= " $1";
256 0 $self->{"vars"} .= "$var;\n" }
257 else
258 0 { $self->{"vars"} .= "my $var;\n" }
259 0 $self->{"changed"} = 1;
260 0 return 1;
261 }
262  
263 sub addautoscore
264 0 ▶{
Subroutine addautoscore: not called CC=1 SCAR=6.9
265 0 my ( $self, $code ) = @_;
266 0 $self->{"autoscore"} = $code;
267 0 $self->{"changed"} = 1;
268 0 return 1;
269 }
270  
271 sub nextoperator($)
272 0 ▶{
Subroutine nextoperator: not called CC=1 SCAR=6.9
273 0 my $self = shift;
274 0 my $prodcount = scalar @{$self->{"prods"}};
275 0 my $opcount = ++$self->{"opcount"};
276 0 return "_operator_${opcount}_of_production_${prodcount}_of_rule_$self->{name}";
277 }
278  
279 sub nextimplicit($)
280 0 ▶{
Subroutine nextimplicit: not called CC=1 SCAR=6.9
281 0 my $self = shift;
282 0 my $prodcount = scalar @{$self->{"prods"}};
283 0 my $impcount = ++$self->{"impcount"};
284 0 return "_alternation_${impcount}_of_production_${prodcount}_of_rule_$self->{name}";
285 }
286  
287  
288 sub code
289 0 ▶{
Subroutine code: not called CC=13 SCAR=52.0
290 0 my ($self, $namespace, $parser, $check) = @_;
291  
292 0 ▶eval 'undef &' . $namespace . '::' . $self->{"name"} unless $parser->{saving};
Branch: 1 branch
BranchTrueFalseTotal
unless $parser->{"saving"} 0 0 0
293  
294 my $code =
295 '
296 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
297 sub ' . $namespace . '::' . $self->{"name"} . '
298 {
299 my $thisparser = $_[0];
300 use vars q{$tracelevel};
301 local $tracelevel = ($tracelevel||0)+1;
302 $ERRORS = 0;
303 my $thisrule = $thisparser->{"rules"}{"' . $self->{"name"} . '"};
304  
305 XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [' . $self->{"name"} . ']},
306 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
307 q{' . $self->{"name"} . '},
308 $tracelevel)
309 if defined $::RD_TRACE;
310  
311 ' . ($parser->{deferrable}
312 ? 'my $def_at = @{$thisparser->{deferred}};'
313 : '') .
314 '
315 my $err_at = @{$thisparser->{errors}};
316  
317 my $score;
318 my $score_return;
319 my $_tok;
320 my $return = undef;
321 my $_matched=0;
322 my $commit=0;
323 my @item = ();
324 my %item = ();
325 my $repeating = $_[2];
326 my $_noactions = $_[3];
327 my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
328 my $_itempos = $_[5];
329 my %arg = ($#arg & 01) ? @arg : (@arg, undef);
330 my $text;
331 my $lastsep;
332 my $current_match;
333 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{' . $self->expected() . '});
334 $expectation->at($_[1]);
335 '. ($parser->{_check}{thisoffset}?'
336 my $thisoffset;
337 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
338 ':'') . ($parser->{_check}{prevoffset}?'
339 my $prevoffset;
340 tie $prevoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser, 1;
341 ':'') . ($parser->{_check}{thiscolumn}?'
342 my $thiscolumn;
343 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
344 ':'') . ($parser->{_check}{prevcolumn}?'
345 my $prevcolumn;
346 tie $prevcolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser, 1;
347 ':'') . ($parser->{_check}{prevline}?'
348 my $prevline;
349 tie $prevline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser, 1;
350 ':'') . '
351 my $thisline;
352 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
353  
354 0 ▶ '. $self->{vars} .'
Branch: 6 branches
BranchTrueFalseTotal
$parser->{'deferrable'} ? : 0 0 0
$parser->{'_check'}{'thisoffset'} ? : 0 0 0
$parser->{'_check'}{'prevoffset'} ? : 0 0 0
$parser->{'_check'}{'thiscolumn'} ? : 0 0 0
$parser->{'_check'}{'prevcolumn'} ? : 0 0 0
$parser->{'_check'}{'prevline'} ? : 0 0 0
355 ';
356  
357 0 my $prod;
358 0 foreach $prod ( @{$self->{"prods"}} )
359 {
360 0 ▶ $prod->addscore($self->{autoscore},0,0) if $self->{autoscore};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"autoscore"} 0 0 0
361 0 ▶ next unless $prod->checkleftmost();
Branch: 1 branch
BranchTrueFalseTotal
unless $prod->checkleftmost 0 0 0
362 0 $code .= $prod->code($namespace,$self,$parser);
363  
364 $code .= $parser->{deferrable}
365 0 ▶ ? ' splice
Branch: 1 branch
BranchTrueFalseTotal
$parser->{'deferrable'} ? : 0 0 0
366 @{$thisparser->{deferred}}, $def_at unless $_matched;
367 '
368 : '';
369 }
370  
371 $code .=
372 '
373 unless ( $_matched || defined($score) )
374 {
375 ' .($parser->{deferrable}
376 ? ' splice @{$thisparser->{deferred}}, $def_at;
377 '
378 : '') . '
379  
380 $_[1] = $text; # NOT SURE THIS IS NEEDED
381 XML::XSH2::Parser::_Runtime::_trace(q{<<'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self,1).' rule>>},
382 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
383 q{' . $self->{"name"} .'},
384 $tracelevel)
385 if defined $::RD_TRACE;
386 return undef;
387 }
388 if (!defined($return) && defined($score))
389 {
390 XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
391 q{' . $self->{"name"} .'},
392 $tracelevel)
393 if defined $::RD_TRACE;
394 $return = $score_return;
395 }
396 splice @{$thisparser->{errors}}, $err_at;
397 $return = $item[$#item] unless defined $return;
398 if (defined $::RD_TRACE)
399 {
400 XML::XSH2::Parser::_Runtime::_trace(q{>>'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self).' rule<< (return value: [} .
401 $return . q{])}, "",
402 q{' . $self->{"name"} .'},
403 $tracelevel);
404 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
405 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
406 XML::XSH2::Parser::_Runtime::_tracefirst($text),
407 0 ▶ , q{' . $self->{"name"} .'},
Branch: 1 branch
BranchTrueFalseTotal
$parser->{'deferrable'} ? : 0 0 0
408 $tracelevel)
409 }
410 $_[1] = $text;
411 return $return;
412 }
413 ';
414  
415 0 return $code;
416 }
417  
418 8 my @left;
419 sub isleftrec($$)
420 0 ▶{
Subroutine isleftrec: not called CC=6 SCAR=37.4
421 0 my ($self, $rules) = @_;
422 0 my $root = $self->{"name"};
423 0 @left = $self->leftmostsubrules();
424 0 my $next;
425 0 foreach $next ( @left )
426 {
427 0 ▶ next unless defined $rules->{$next}; # SKIP NON-EXISTENT RULES
Branch: 1 branch
BranchTrueFalseTotal
unless defined $rules->{$next} 0 0 0
428 0 ▶ return 1 if $next eq $root;
Branch: 1 branch
BranchTrueFalseTotal
if $next eq $root 0 0 0
429 0 my $child;
430 0 foreach $child ( $rules->{$next}->leftmostsubrules() )
431 {
432 0 ▶ push(@left, $child)
Branch: 1 branch
BranchTrueFalseTotal
unless &_contains($child, @left) 0 0 0
433 if ! _contains($child, @left) ;
434 }
435 }
436 0 return 0;
437 }
438  
439 package # this should not be indexed by CPAN
440 XML::XSH2::Parser::_Runtime::Production;
441  
442 sub describe ($;$)
443 0 ▶{
Subroutine describe: not called CC=2 SCAR=17.9
444 0 ▶ return join ' ', map { $_->describe($_[1]) or () } @{$_[0]->{items}};
Condition0%0/3
$_->describe($_[1]) || ()
l!l&&r!l&&!r
000
MC/DC0%0/2
$_->describe($_[1]) || ()
$_->describe($_[1]) ()
Truth table0%0/3
A || B
A= $_->describe($_[1])B= ()
ABresult
1X1
011
000
445 }
446  
447 sub new ($$;$$)
448 0 ▶{
Subroutine new: not called CC=2 SCAR=17.9
449 0 my ($self, $line, $uncommit, $error) = @_;
450 0 ▶ my $class = ref($self) || $self;
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
451  
452 0 bless
453 {
454 "items" => [],
455 "uncommit" => $uncommit,
456 "error" => $error,
457 "line" => $line,
458 strcount => 0,
459 patcount => 0,
460 dircount => 0,
461 actcount => 0,
462 }, $class;
463 }
464  
465 sub expected ($)
466 0 ▶{
Subroutine expected: not called CC=2 SCAR=17.9
467 0 my $itemcount = scalar @{$_[0]->{"items"}};
468 0 ▶ return ($itemcount) ? $_[0]->{"items"}[0]->describe(1) : '';
Branch: 1 branch
BranchTrueFalseTotal
$itemcount ? : 0 0 0
469 }
470  
471 sub hasleftmost ($$)
472 0 ▶{
Subroutine hasleftmost: not called CC=2 SCAR=17.9
473 0 my ($self, $ref) = @_;
474 0 ▶ return ${$self->{"items"}}[0] eq $ref if scalar @{$self->{"items"}};
Branch: 1 branch
BranchTrueFalseTotal
if scalar @{$self->{"items"};} 0 0 0
475 0 return 0;
476 }
477  
478 sub isempty($)
479 0 ▶{
Subroutine isempty: not called CC=1 SCAR=6.9
480 0 my $self = shift;
481 0 return 0 == @{$self->{"items"}};
482 }
483  
484 sub leftmostsubrule($)
485 0 ▶{
Subroutine leftmostsubrule: not called CC=3 SCAR=24.8
486 0 my $self = shift;
487  
488 0 ▶ if ( $#{$self->{"items"}} >= 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ($#{$$self{"items"};} >= 0) 0 0 0
489 {
490 0 my $subrule = $self->{"items"}[0]->issubrule();
491 0 ▶ return $subrule if defined $subrule;
Branch: 1 branch
BranchTrueFalseTotal
if defined $subrule 0 0 0
492 }
493  
494 0 return ();
495 }
496  
497 sub checkleftmost($)
498 0 ▶{
Subroutine checkleftmost: not called CC=15 SCAR=54.8
499 0 my @items = @{$_[0]->{"items"}};
500 0 ▶ if (@items==1 && ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::Error/
Branch: 3 branches
BranchTrueFalseTotal
if (@items == 1 and ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::Error/ and $items[0]{'commitonly'}) { } 0 0 0
elsif (@items == 1 and ($items[0]->describe || '') =~ /<rulevar|<autoscore/) { } 0 0 0
elsif (@items and ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::UncondReject/ || ($items[0]->describe || '') =~ /<autoscore/) { } 0 0 0
Condition0%0/6
@items == 1 and ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::Error/ and $items[0]{"commitonly"}
!ll&&!rl&&r
000
@items == 1 and ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::Error/
!ll&&!rl&&r
000
MC/DC0%0/3
@items == 1 and ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::Error/ and $items[0]{"commitonly"}
@items == 1 ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::Error/ $items[0]{"commitonly"}
Truth table0%0/4
A and B and C
A= @items == 1B= ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::Error/C= $items[0]{"commitonly"}
ABCresult
0XX0
10X0
1100
1111
501 && $items[0]->{commitonly} )
502 {
503 0 XML::XSH2::Parser::_Runtime::_warn(2,"Lone <error?> in production treated
504 as <error?> <reject>");
505 0 XML::XSH2::Parser::_Runtime::_hint("A production consisting of a single
506 conditional <error?> directive would
507 normally succeed (with the value zero) if the
508 rule is not 'commited' when it is
509 tried. Since you almost certainly wanted
510 '<error?> <reject>' XML::XSH2::Parser::_Runtime
511 supplied it for you.");
512 0 push @{$_[0]->{items}},
513 XML::XSH2::Parser::_Runtime::UncondReject->new(0,0,'<reject>');
514 }
515 ▶ elsif (@items==1 && ($items[0]->describe||"") =~ /<rulevar|<autoscore/)
Condition0%0/5
@items == 1 and ($items[0]->describe || "") =~ /<rulevar|<autoscore/
!ll&&!rl&&r
000
$items[0]->describe || ''
l!l
00
MC/DC0%0/2
@items == 1 and ($items[0]->describe || "") =~ /<rulevar|<autoscore/
@items == 1 $items[0]->describe
Truth table0%0/3
A and B
A= @items == 1B= $items[0]->describe
ABresult
0X0
100
111
516 {
517 # Do nothing
518 }
519 ▶ elsif (@items &&
Condition0%0/8
@items and ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::UncondReject/ || ($items[0]->describe || "") =~ /<autoscore/
!ll&&!rl&&r
000
ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::UncondReject/ or ($items[0]->describe || "") =~ /<autoscore/
l!l&&r!l&&!r
000
$items[0]->describe || ''
l!l
00
MC/DC0%0/3
@items and ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::UncondReject/ || ($items[0]->describe || "") =~ /<autoscore/
@items ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::UncondReject/ $items[0]->describe
Truth table0%0/4
A and B or C
A= @itemsB= ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::UncondReject/C= $items[0]->describe
ABCresult
0XX0
1000
11X1
1011
520 ( ref($items[0]) =~ /\AXML::XSH2::Parser::_Runtime::UncondReject/
521 || ($items[0]->describe||"") =~ /<autoscore/
522 ))
523 {
524 0 XML::XSH2::Parser::_Runtime::_warn(1,"Optimizing away production: [". $_[0]->describe ."]");
525 0 ▶ my $what = $items[0]->describe =~ /<rulevar/
Branch: 2 branches
BranchTrueFalseTotal
$items[0]->describe =~ /<rulevar/ ? : 0 0 0
$items[0]->describe =~ /<autoscore/ ? : 0 0 0
526 ? "a <rulevar> (which acts like an unconditional <reject> during parsing)"
527 : $items[0]->describe =~ /<autoscore/
528 ? "an <autoscore> (which acts like an unconditional <reject> during parsing)"
529 : "an unconditional <reject>";
530 0 ▶ my $caveat = $items[0]->describe =~ /<rulevar/
Branch: 1 branch
BranchTrueFalseTotal
$items[0]->describe =~ /<rulevar/ ? : 0 0 0
531 ? " after the specified variable was set up"
532 : "";
533 0 ▶ my $advice = @items > 1
Branch: 1 branch
BranchTrueFalseTotal
@items > 1 ? : 0 0 0
534 ? "However, there were also other (useless) items after the leading "
535 . $items[0]->describe
536 . ", so you may have been expecting some other behaviour."
537 : "You can safely ignore this message.";
538 0 XML::XSH2::Parser::_Runtime::_hint("The production starts with $what. That means that the
539 production can never successfully match, so it was
540 optimized out of the final parser$caveat. $advice");
541 0 return 0;
542 }
543 0 return 1;
544 }
545  
546 sub changesskip($)
547 0 ▶{
Subroutine changesskip: not called CC=4 SCAR=30.0
548 0 my $item;
549 0 foreach $item (@{$_[0]->{"items"}})
550 {
551 0 ▶ if (ref($item) =~ /XML::XSH2::Parser::_Runtime::(Action|Directive)/)
Branch: 1 branch
BranchTrueFalseTotal
if (ref($item) =~ /XML::XSH2::Parser::_Runtime::(Action|Directive)/) 0 0 0
552 {
553 0 ▶ return 1 if $item->{code} =~ /\$skip\s*=/;
Branch: 1 branch
BranchTrueFalseTotal
if $item->{"code"} =~ /\$skip\s*=/ 0 0 0
554 }
555 }
556 0 return 0;
557 }
558  
559 sub adddirective
560 0 ▶{
Subroutine adddirective: not called CC=1 SCAR=6.9
561 0 my ( $self, $whichop, $line, $name ) = @_;
562 0 push @{$self->{op}},
563 { type=>$whichop, line=>$line, name=>$name,
564 0 offset=> scalar(@{$self->{items}}) };
565 }
566  
567 sub addscore
568 0 ▶{
Subroutine addscore: not called CC=2 SCAR=17.9
569 0 my ( $self, $code, $lookahead, $line ) = @_;
570 $self->additem(XML::XSH2::Parser::_Runtime::Directive->new(
571 "local \$^W;
572 my \$thisscore = do { $code } + 0;
573 if (!defined(\$score) || \$thisscore>\$score)
574 { \$score=\$thisscore; \$score_return=\$item[-1]; }
575 undef;", $lookahead, $line,"<score: $code>") )
576 0 ▶ unless $self->{items}[-1]->describe =~ /<score/;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"items"}[-1]->describe =~ /<score/ 0 0 0
577 0 return 1;
578 }
579  
580 sub check_pending
581 0 ▶{
Subroutine check_pending: not called CC=3 SCAR=24.8
582 0 my ( $self, $line ) = @_;
583 0 ▶ if ($self->{op})
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"op"}) 0 0 0
584 {
585 0 ▶ while (my $next = pop @{$self->{op}})
Branch: 1 branch
BranchTrueFalseTotal
if (my $next = pop @{$$self{"op"};}) 0 0 0
586 {
587 0 XML::XSH2::Parser::_Runtime::_error("Incomplete <$next->{type}op:...>.", $line);
588 0 XML::XSH2::Parser::_Runtime::_hint(
589 "The current production ended without completing the
590 <$next->{type}op:...> directive that started near line
591 $next->{line}. Did you forget the closing '>'?");
592 }
593 }
594 0 return 1;
595 }
596  
597 sub enddirective
598 0 ▶{
Subroutine enddirective: not called CC=4 SCAR=30.0
599 0 my ( $self, $line, $minrep, $maxrep ) = @_;
600 0 ▶ unless ($self->{op})
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"op"}) 0 0 0
601 {
602 0 XML::XSH2::Parser::_Runtime::_error("Unmatched > found.", $line);
603 0 XML::XSH2::Parser::_Runtime::_hint(
604 "A '>' angle bracket was encountered, which typically
605 indicates the end of a directive. However no suitable
606 preceding directive was encountered. Typically this
607 indicates either a extra '>' in the grammar, or a
608 problem inside the previous directive.");
609 0 return;
610 }
611 0 my $op = pop @{$self->{op}};
612 0 my $span = @{$self->{items}} - $op->{offset};
613 0 ▶ if ($op->{type} =~ /left|right/)
Branch: 1 branch
BranchTrueFalseTotal
if ($op->{"type"} =~ /left|right/) 0 0 0
614 {
615 0 ▶ if ($span != 3)
Branch: 1 branch
BranchTrueFalseTotal
if ($span != 3) { } 0 0 0
616 {
617 0 XML::XSH2::Parser::_Runtime::_error(
618 "Incorrect <$op->{type}op:...> specification:
619 expected 3 args, but found $span instead", $line);
620 0 XML::XSH2::Parser::_Runtime::_hint(
621 "The <$op->{type}op:...> directive requires a
622 sequence of exactly three elements. For example:
623 <$op->{type}op:leftarg /op/ rightarg>");
624 }
625 else
626 {
627 0 push @{$self->{items}},
628 XML::XSH2::Parser::_Runtime::Operator->new(
629 0 $op->{type}, $minrep, $maxrep, splice(@{$self->{"items"}}, -3));
630 0 $self->{items}[-1]->sethashname($self);
631 0 $self->{items}[-1]{name} = $op->{name};
632 }
633 }
634 }
635  
636 sub prevwasreturn
637 0 ▶{
Subroutine prevwasreturn: not called CC=2 SCAR=17.9
638 0 my ( $self, $line ) = @_;
639 0 ▶ unless (@{$self->{items}})
Branch: 1 branch
BranchTrueFalseTotal
unless (@{$self->{"items"};}) 0 0 0
640 {
641 0 XML::XSH2::Parser::_Runtime::_error(
642 "Incorrect <return:...> specification:
643 expected item missing", $line);
644 0 XML::XSH2::Parser::_Runtime::_hint(
645 "The <return:...> directive requires a
646 sequence of at least one item. For example:
647 <return: list>");
648 0 return;
649 }
650 0 push @{$self->{items}},
651 XML::XSH2::Parser::_Runtime::Result->new();
652 }
653  
654 sub additem
655 0 ▶{
Subroutine additem: not called CC=1 SCAR=6.9
656 0 my ( $self, $item ) = @_;
657 0 $item->sethashname($self);
658 0 push @{$self->{"items"}}, $item;
659 0 return $item;
660 }
661  
662 sub _duplicate_itempos
663 0 ▶{
Subroutine _duplicate_itempos: not called CC=2 SCAR=17.9
664 0 my ($src) = @_;
665 0 my $dst = {};
666  
667 0 foreach (keys %$src)
668 {
669 0 %{$dst->{$_}} = %{$src->{$_}};
670 }
671 0 $dst;
672 }
673  
674 sub _update_itempos
675 0 ▶{
Subroutine _update_itempos: not called CC=4 SCAR=30.0
676 0 my ($dst, $src, $typekeys, $poskeys) = @_;
677  
678 0 ▶ my @typekeys = 'ARRAY' eq ref $typekeys ?
Branch: 1 branch
BranchTrueFalseTotal
'ARRAY' eq ref $typekeys ? : 0 0 0
679 @$typekeys :
680 keys %$src;
681  
682 0 foreach my $k (keys %$src)
683 {
684 0 ▶ if ('ARRAY' eq ref $poskeys)
Branch: 1 branch
BranchTrueFalseTotal
if ('ARRAY' eq ref $poskeys) { } 0 0 0
685 {
686 0 @{$dst->{$k}}{@$poskeys} = @{$src->{$k}}{@$poskeys};
687 }
688 else
689 {
690 0 %{$dst->{$k}} = %{$src->{$k}};
691 }
692 }
693 }
694  
695 sub preitempos
696 0 ▶{
Subroutine preitempos: not called CC=1 SCAR=6.9
697 return q
698 0 {
699 push @itempos, {'offset' => {'from'=>$thisoffset, 'to'=>undef},
700 'line' => {'from'=>$thisline, 'to'=>undef},
701 'column' => {'from'=>$thiscolumn, 'to'=>undef} };
702 }
703 }
704  
705 sub incitempos
706 0 ▶{
Subroutine incitempos: not called CC=1 SCAR=6.9
707 return q
708 0 {
709 $itempos[$#itempos]{'offset'}{'from'} += length($lastsep);
710 $itempos[$#itempos]{'line'}{'from'} = $thisline;
711 $itempos[$#itempos]{'column'}{'from'} = $thiscolumn;
712 }
713 }
714  
715 sub unincitempos
716 0 ▶{
Subroutine unincitempos: not called CC=1 SCAR=6.9
717 # the next incitempos will properly set these two fields, but
718 # {'offset'}{'from'} needs to be decreased by length($lastsep)
719 # $itempos[$#itempos]{'line'}{'from'}
720 # $itempos[$#itempos]{'column'}{'from'}
721 return q
722 0 {
723 $itempos[$#itempos]{'offset'}{'from'} -= length($lastsep) if defined $lastsep;
724 }
725 }
726  
727 sub postitempos
728 0 ▶{
Subroutine postitempos: not called CC=1 SCAR=6.9
729 return q
730 0 {
731 $itempos[$#itempos]{'offset'}{'to'} = $prevoffset;
732 $itempos[$#itempos]{'line'}{'to'} = $prevline;
733 $itempos[$#itempos]{'column'}{'to'} = $prevcolumn;
734 }
735 }
736  
737 sub code($$$$)
738 0 ▶{
Subroutine code: not called CC=19 SCAR=59.4
739 0 my ($self,$namespace,$rule,$parser) = @_;
740 my $code =
741 '
742 while (!$_matched'
743 . (defined $self->{"uncommit"} ? '' : ' && !$commit')
744 . ')
745 {
746 ' .
747 ($self->changesskip()
748 ? 'local $skip = defined($skip) ? $skip : $XML::XSH2::Parser::_Runtime::skip;'
749 : '') .'
750 XML::XSH2::Parser::_Runtime::_trace(q{Trying production: ['
751 . $self->describe . ']},
752 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
753 q{' . $rule ->{name}. '},
754 $tracelevel)
755 if defined $::RD_TRACE;
756 my $thisprod = $thisrule->{"prods"}[' . $self->{"number"} . '];
757 ' . (defined $self->{"error"} ? '' : '$text = $_[1];' ) . '
758 my $_savetext;
759 @item = (q{' . $rule->{"name"} . '});
760 0 ▶ %item = (__RULE__ => q{' . $rule->{"name"} . '});
Branch: 3 branches
BranchTrueFalseTotal
defined $self->{'uncommit'} ? : 0 0 0
$self->changesskip ? : 0 0 0
defined $self->{'error'} ? : 0 0 0
761 my $repcount = 0;
762  
763 ';
764 $code .=
765 ' my @itempos = ({});
766 0 ▶' if $parser->{_check}{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $parser->{"_check"}{"itempos"} 0 0 0
767  
768 0 my $item;
769 my $i;
770  
771 0 ▶ for ($i = 0; $i < @{$self->{"items"}}; $i++)
Branch: 1 branch
BranchTrueFalseTotal
if ($i < @{$self->{"items"};}) 0 0 0
772 {
773 0 $item = ${$self->{items}}[$i];
774  
775 0 ▶ $code .= preitempos() if $parser->{_check}{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $parser->{"_check"}{"itempos"} 0 0 0
776  
777 0 $code .= $item->code($namespace,$rule,$parser->{_check});
778  
779 0 ▶ $code .= postitempos() if $parser->{_check}{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $parser->{"_check"}{"itempos"} 0 0 0
780  
781 }
782  
783 0 ▶ if ($parser->{_AUTOACTION} && defined($item) && !$item->isa("XML::XSH2::Parser::_Runtime::Action"))
Branch: 2 branches
BranchTrueFalseTotal
if ($parser->{'_AUTOACTION'} and defined $item and not $item->isa('XML::XSH2::Parser::_Runtime::Action')) { } 0 0 0
elsif ($parser->{'_AUTOTREE'} and defined $item and not $item->isa('XML::XSH2::Parser::_Runtime::Action')) { } 0 0 0
Condition0%0/6
$parser->{"_AUTOACTION"} and defined $item and not $item->isa("XML::XSH2::Parser::_Runtime::Action")
!ll&&!rl&&r
000
$parser->{"_AUTOACTION"} and defined $item
!ll&&!rl&&r
000
MC/DC0%0/3
$parser->{"_AUTOACTION"} and defined $item and not $item->isa("XML::XSH2::Parser::_Runtime::Action")
$parser->{"_AUTOACTION"} defined $item not $item->isa("XML::XSH2::Parser::_Runtime::Action")
Truth table0%0/4
A and B and not(C)
A= $parser->{"_AUTOACTION"}B= defined $itemC= not $item->isa("XML::XSH2::Parser::_Runtime::Action")
ABCresult
0XX0
10X0
1100
1111
784 {
785 0 $code .= $parser->{_AUTOACTION}->code($namespace,$rule);
786 0 ▶ XML::XSH2::Parser::_Runtime::_warn(1,"Autogenerating action in rule
Branch: 1 branch
BranchTrueFalseTotal
&XML::XSH2::Parser::_Runtime::_warn(1, qq[Autogenerating action in rule\n "$rule->{"name"}":\n $parser->{"_AUTOACTION"}{"code"}]) and &XML::XSH2::Parser::_Runtime::_hint("The \$::RD_AUTOACTION was defined,\n so any production not ending in an\n explicit action has the specified\n \"auto-action\" automatically\n appended.") 0 0 0
787 \"$rule->{name}\":
788 $parser->{_AUTOACTION}{code}")
789 and
790 XML::XSH2::Parser::_Runtime::_hint("The \$::RD_AUTOACTION was defined,
791 so any production not ending in an
792 explicit action has the specified
793 \"auto-action\" automatically
794 appended.");
795 }
796 ▶ elsif ($parser->{_AUTOTREE} && defined($item) && !$item->isa("XML::XSH2::Parser::_Runtime::Action"))
Condition0%0/6
$parser->{"_AUTOTREE"} and defined $item and not $item->isa("XML::XSH2::Parser::_Runtime::Action")
!ll&&!rl&&r
000
$parser->{"_AUTOTREE"} and defined $item
!ll&&!rl&&r
000
MC/DC0%0/3
$parser->{"_AUTOTREE"} and defined $item and not $item->isa("XML::XSH2::Parser::_Runtime::Action")
$parser->{"_AUTOTREE"} defined $item not $item->isa("XML::XSH2::Parser::_Runtime::Action")
Truth table0%0/4
A and B and not(C)
A= $parser->{"_AUTOTREE"}B= defined $itemC= not $item->isa("XML::XSH2::Parser::_Runtime::Action")
ABCresult
0XX0
10X0
1100
1111
797 {
798 0 ▶ if ($i==1 && $item->isterminal)
Branch: 1 branch
BranchTrueFalseTotal
if ($i == 1 and $item->isterminal) { } 0 0 0
Condition0%0/3
$i == 1 and $item->isterminal
!ll&&!rl&&r
000
MC/DC0%0/2
$i == 1 and $item->isterminal
$i == 1 $item->isterminal
Truth table0%0/3
A and B
A= $i == 1B= $item->isterminal
ABresult
0X0
100
111
799 {
800 0 $code .= $parser->{_AUTOTREE}{TERMINAL}->code($namespace,$rule);
801 }
802 else
803 {
804 0 $code .= $parser->{_AUTOTREE}{NODE}->code($namespace,$rule);
805 }
806 0 ▶ XML::XSH2::Parser::_Runtime::_warn(1,"Autogenerating tree-building action in rule
Branch: 1 branch
BranchTrueFalseTotal
&XML::XSH2::Parser::_Runtime::_warn(1, qq[Autogenerating tree-building action in rule\n "$rule->{"name"}"]) and &XML::XSH2::Parser::_Runtime::_hint("The directive <autotree> was specified,\n so any production not ending\n in an explicit action has\n some parse-tree building code\n automatically appended.") 0 0 0
807 \"$rule->{name}\"")
808 and
809 XML::XSH2::Parser::_Runtime::_hint("The directive <autotree> was specified,
810 so any production not ending
811 in an explicit action has
812 some parse-tree building code
813 automatically appended.");
814 }
815  
816 $code .=
817 '
818 XML::XSH2::Parser::_Runtime::_trace(q{>>'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self).' production: ['
819 . $self->describe . ']<<},
820 XML::XSH2::Parser::_Runtime::_tracefirst($text),
821 q{' . $rule->{name} . '},
822 $tracelevel)
823 if defined $::RD_TRACE;
824  
825 0 ▶' . ( $parser->{_check}{itempos} ? '
Branch: 1 branch
BranchTrueFalseTotal
$parser->{'_check'}{'itempos'} ? : 0 0 0
826 if ( defined($_itempos) )
827 {
828 XML::XSH2::Parser::_Runtime::Production::_update_itempos($_itempos, $itempos[ 1], undef, [qw(from)]);
829 XML::XSH2::Parser::_Runtime::Production::_update_itempos($_itempos, $itempos[-1], undef, [qw(to)]);
830 }
831 ' : '' ) . '
832  
833 $_matched = 1;
834 last;
835 }
836  
837 ';
838 0 return $code;
839 }
840  
841 8 1;
842  
843 package # this should not be indexed by CPAN
844 XML::XSH2::Parser::_Runtime::Action;
845  
846 0 ▶sub describe { undef }
Subroutine describe: not called CC=1 SCAR=6.9
847  
848 0 ▶sub sethashname { $_[0]->{hashname} = '__ACTION' . ++$_[1]->{actcount} .'__'; }
Subroutine sethashname: not called CC=1 SCAR=6.9
849  
850 sub new
851 0 ▶{
Subroutine new: not called CC=2 SCAR=17.9
852 0 ▶ my $class = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
853 0 bless
854 {
855 "code" => $_[1],
856 "lookahead" => $_[2],
857 "line" => $_[3],
858 }, $class;
859 }
860  
861 0 ▶sub issubrule { undef }
Subroutine issubrule: not called CC=1 SCAR=6.9
862 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
863  
864 sub code($$$$)
865 0 ▶{
Subroutine code: not called CC=5 SCAR=34.0
866 0 my ($self, $namespace, $rule) = @_;
867  
868 '
869 XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
870 XML::XSH2::Parser::_Runtime::_tracefirst($text),
871 q{' . $rule->{name} . '},
872 $tracelevel)
873 if defined $::RD_TRACE;
874 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .'
875  
876 $_tok = ($_noactions) ? 0 : do ' . $self->{"code"} . ';
877 ' . ($self->{"lookahead"}<0?'if':'unless') . ' (defined $_tok)
878 {
879 XML::XSH2::Parser::_Runtime::_trace(q{<<'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self,1).' action>> (return value: [undef])})
880 if defined $::RD_TRACE;
881 last;
882 }
883 XML::XSH2::Parser::_Runtime::_trace(q{>>'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self).' action<< (return value: [}
884 . $_tok . q{])},
885 XML::XSH2::Parser::_Runtime::_tracefirst($text))
886 if defined $::RD_TRACE;
887 push @item, $_tok;
888 ' . ($self->{line}>=0 ? '$item{'. $self->{hashname} .'}=$_tok;' : '' ) .'
889 0 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 4 branches
BranchTrueFalseTotal
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} < 0 ? : 0 0 0
$self->{'line'} >= 0 ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
890 '
891 }
892  
893  
894 8 1;
895  
896 package # this should not be indexed by CPAN
897 XML::XSH2::Parser::_Runtime::Directive;
898  
899 0 ▶sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; }
Subroutine sethashname: not called CC=1 SCAR=6.9
900  
901 0 ▶sub issubrule { undef }
Subroutine issubrule: not called CC=1 SCAR=6.9
902 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
903 0 ▶sub describe { $_[1] ? '' : $_[0]->{name} }
Subroutine describe: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
$_[1] ? : 0 0 0
904  
905 sub new ($$$$$)
906 0 ▶{
Subroutine new: not called CC=2 SCAR=17.9
907 0 ▶ my $class = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
908 0 bless
909 {
910 "code" => $_[1],
911 "lookahead" => $_[2],
912 "line" => $_[3],
913 "name" => $_[4],
914 }, $class;
915 }
916  
917 sub code($$$$)
918 0 ▶{
Subroutine code: not called CC=5 SCAR=34.0
919 0 my ($self, $namespace, $rule) = @_;
920  
921 '
922 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .'
923  
924 XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: ['
925 . $self->describe . ']},
926 XML::XSH2::Parser::_Runtime::_tracefirst($text),
927 q{' . $rule->{name} . '},
928 $tracelevel)
929 if defined $::RD_TRACE; ' .'
930 $_tok = do { ' . $self->{"code"} . ' };
931 if (defined($_tok))
932 {
933 XML::XSH2::Parser::_Runtime::_trace(q{>>'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self).' directive<< (return value: [}
934 . $_tok . q{])},
935 XML::XSH2::Parser::_Runtime::_tracefirst($text))
936 if defined $::RD_TRACE;
937 }
938 else
939 {
940 XML::XSH2::Parser::_Runtime::_trace(q{<<'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self,1).' directive>>},
941 XML::XSH2::Parser::_Runtime::_tracefirst($text))
942 if defined $::RD_TRACE;
943 }
944 ' . ($self->{"lookahead"} ? '$text = $_savetext and ' : '' ) .'
945 last '
946 . ($self->{"lookahead"}<0?'if':'unless') . ' defined $_tok;
947 push @item, $item{'.$self->{hashname}.'}=$_tok;
948 0 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 4 branches
BranchTrueFalseTotal
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} < 0 ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
949 '
950 }
951  
952 8 1;
953  
954 package # this should not be indexed by CPAN
955 XML::XSH2::Parser::_Runtime::UncondReject;
956  
957 0 ▶sub issubrule { undef }
Subroutine issubrule: not called CC=1 SCAR=6.9
958 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
959 0 ▶sub describe { $_[1] ? '' : $_[0]->{name} }
Subroutine describe: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
$_[1] ? : 0 0 0
960 0 ▶sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; }
Subroutine sethashname: not called CC=1 SCAR=6.9
961  
962 sub new ($$$;$)
963 0 ▶{
Subroutine new: not called CC=2 SCAR=17.9
964 0 ▶ my $class = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
965 0 bless
966 {
967 "lookahead" => $_[1],
968 "line" => $_[2],
969 "name" => $_[3],
970 }, $class;
971 }
972  
973 # MARK, YOU MAY WANT TO OPTIMIZE THIS.
974  
975  
976 sub code($$$$)
977 0 ▶{
Subroutine code: not called CC=4 SCAR=30.0
978 0 my ($self, $namespace, $rule) = @_;
979  
980 '
981 XML::XSH2::Parser::_Runtime::_trace(q{>>Rejecting production<< (found '
982 . $self->describe . ')},
983 XML::XSH2::Parser::_Runtime::_tracefirst($text),
984 q{' . $rule->{name} . '},
985 $tracelevel)
986 if defined $::RD_TRACE;
987 undef $return;
988 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .'
989  
990 $_tok = undef;
991 ' . ($self->{"lookahead"} ? '$text = $_savetext and ' : '' ) .'
992 last '
993 0 ▶ . ($self->{"lookahead"}<0?'if':'unless') . ' defined $_tok;
Branch: 3 branches
BranchTrueFalseTotal
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} < 0 ? : 0 0 0
994 '
995 }
996  
997 8 1;
998  
999 package # this should not be indexed by CPAN
1000 XML::XSH2::Parser::_Runtime::Error;
1001  
1002 0 ▶sub issubrule { undef }
Subroutine issubrule: not called CC=1 SCAR=6.9
1003 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1004 0 ▶sub describe { $_[1] ? '' : $_[0]->{commitonly} ? '<error?:...>' : '<error...>' }
Subroutine describe: not called CC=3 SCAR=24.8
Branch: 2 branches
BranchTrueFalseTotal
$_[1] ? : 0 0 0
$_[0]{'commitonly'} ? : 0 0 0
1005 0 ▶sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; }
Subroutine sethashname: not called CC=1 SCAR=6.9
1006  
1007 sub new ($$$$$)
1008 0 ▶{
Subroutine new: not called CC=2 SCAR=17.9
1009 0 ▶ my $class = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
1010 0 bless
1011 {
1012 "msg" => $_[1],
1013 "lookahead" => $_[2],
1014 "commitonly" => $_[3],
1015 "line" => $_[4],
1016 }, $class;
1017 }
1018  
1019 sub code($$$$)
1020 0 ▶{
Subroutine code: not called CC=3 SCAR=24.8
1021 0 my ($self, $namespace, $rule) = @_;
1022  
1023 0 my $action = '';
1024  
1025 0 ▶ if ($self->{"msg"}) # ERROR MESSAGE SUPPLIED
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'msg'}) { } 0 0 0
1026 {
1027 #WAS: $action .= "XML::XSH2::Parser::_Runtime::_error(qq{$self->{msg}}" . ',$thisline);';
1028 0 $action .= 'push @{$thisparser->{errors}}, [qq{'.$self->{msg}.'},$thisline];';
1029  
1030 }
1031 else # GENERATE ERROR MESSAGE DURING PARSE
1032 {
1033 0 $action .= '
1034 my $rule = $item[0];
1035 $rule =~ s/_/ /g;
1036 #WAS: XML::XSH2::Parser::_Runtime::_error("Invalid $rule: " . $expectation->message() ,$thisline);
1037 push @{$thisparser->{errors}}, ["Invalid $rule: " . $expectation->message() ,$thisline];
1038 ';
1039 }
1040  
1041 my $dir =
1042 new XML::XSH2::Parser::_Runtime::Directive('if (' .
1043 ($self->{"commitonly"} ? '$commit' : '1') .
1044 ") { do {$action} unless ".' $_noactions; undef } else {0}',
1045 0 ▶ $self->{"lookahead"},0,$self->describe);
Branch: 1 branch
BranchTrueFalseTotal
$self->{'commitonly'} ? : 0 0 0
1046 0 $dir->{hashname} = $self->{hashname};
1047 0 return $dir->code($namespace, $rule, 0);
1048 }
1049  
1050 8 1;
1051  
1052 package # this should not be indexed by CPAN
1053 XML::XSH2::Parser::_Runtime::Token;
1054  
1055 0 ▶sub sethashname { $_[0]->{hashname} = '__PATTERN' . ++$_[1]->{patcount} . '__'; }
Subroutine sethashname: not called CC=1 SCAR=6.9
1056  
1057 0 ▶sub issubrule { undef }
Subroutine issubrule: not called CC=1 SCAR=6.9
1058 0 ▶sub isterminal { 1 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1059 0 ▶sub describe ($) { shift->{'description'}}
Subroutine describe: not called CC=1 SCAR=6.9
1060  
1061  
1062 # ARGS ARE: $self, $pattern, $left_delim, $modifiers, $lookahead, $linenum
1063 sub new ($$$$$$)
1064 0 ▶{
Subroutine new: not called CC=5 SCAR=34.0
1065 0 ▶ my $class = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
1066 0 my $pattern = $_[1];
1067 0 my $pat = $_[1];
1068 0 my $ldel = $_[2];
1069 0 my $rdel = $ldel;
1070 0 $rdel =~ tr/{[(</}])>/;
1071  
1072 0 my $mod = $_[3];
1073  
1074 0 my $desc;
1075  
1076 0 ▶ if ($ldel eq '/') { $desc = "$ldel$pattern$rdel$mod" }
Branch: 1 branch
BranchTrueFalseTotal
if ($ldel eq '/') { } 0 0 0
1077 0 else { $desc = "m$ldel$pattern$rdel$mod" }
1078 0 $desc =~ s/\\/\\\\/g;
1079 0 $desc =~ s/\$$/\\\$/g;
1080 0 $desc =~ s/}/\\}/g;
1081 0 $desc =~ s/{/\\{/g;
1082  
1083 0 ▶ if (!eval "no strict;
Branch: 1 branch
BranchTrueFalseTotal
if (not eval "no strict;\n local \$SIG{__WARN__} = sub {0};\n '' =~ m$ldel$pattern$rdel$mod" and $@) 0 0 0
Condition0%0/3
not eval "no strict;\n local \$SIG{__WARN__} = sub {0};\n '' =~ m$ldel$pattern$rdel$mod" and $@
!ll&&!rl&&r
000
MC/DC0%0/2
not eval "no strict;\n local \$SIG{__WARN__} = sub {0};\n '' =~ m$ldel$pattern$rdel$mod" and $@
not eval "no strict;\n local \$SIG{__WARN__} = sub {0};\n '' =~ m$ldel$pattern$rdel$mod" $@
Truth table0%0/3
not(A) and B
A= not eval "no strict;\n local \$SIG{__WARN__} = sub {0};\n '' =~ m$ldel$pattern$rdel$mod"B= $@
ABresult
0X0
100
111
1084 local \$SIG{__WARN__} = sub {0};
1085 '' =~ m$ldel$pattern$rdel$mod" and $@)
1086 {
1087 0 XML::XSH2::Parser::_Runtime::_warn(3, "Token pattern \"m$ldel$pattern$rdel$mod\"
1088 may not be a valid regular expression",
1089 $_[5]);
1090 0 $@ =~ s/ at \(eval.*/./;
1091 0 XML::XSH2::Parser::_Runtime::_hint($@);
1092 }
1093  
1094 # QUIETLY PREVENT (WELL-INTENTIONED) CALAMITY
1095 0 $mod =~ s/[gc]//g;
1096 0 $pattern =~ s/(\A|[^\\])\\G/$1/g;
1097  
1098 0 bless
1099 {
1100 "pattern" => $pattern,
1101 "ldelim" => $ldel,
1102 "rdelim" => $rdel,
1103 "mod" => $mod,
1104 "lookahead" => $_[4],
1105 "line" => $_[5],
1106 "description" => $desc,
1107 }, $class;
1108 }
1109  
1110  
1111 sub code($$$$$)
1112 0 ▶{
Subroutine code: not called CC=8 SCAR=42.8
1113 0 my ($self, $namespace, $rule, $check) = @_;
1114 0 my $ldel = $self->{"ldelim"};
1115 0 my $rdel = $self->{"rdelim"};
1116 0 my $sdel = $ldel;
1117 0 my $mod = $self->{"mod"};
1118  
1119 0 $sdel =~ s/[[{(<]/{}/;
1120  
1121 my $code = '
1122 XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [' . $self->describe
1123 . ']}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
1124 q{' . $rule->{name} . '},
1125 $tracelevel)
1126 if defined $::RD_TRACE;
1127 undef $lastsep;
1128 $expectation->is(q{' . ($rule->hasleftmost($self) ? ''
1129 : $self->describe ) . '})->at($text);
1130 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) . '
1131  
1132 ' . ($self->{"lookahead"}<0?'if':'unless')
1133 . ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and '
1134 . ($check->{itempos}? 'do {'.XML::XSH2::Parser::_Runtime::Production::incitempos().' 1} and ' : '')
1135 . ' $text =~ m' . $ldel . '\A(?:' . $self->{"pattern"} . ')' . $rdel . $mod . ')
1136 {
1137 '.($self->{"lookahead"} ? '$text = $_savetext;' : '$text = $lastsep . $text if defined $lastsep;') .
1138 ($check->{itempos} ? XML::XSH2::Parser::_Runtime::Production::unincitempos() : '') . '
1139 $expectation->failed();
1140 XML::XSH2::Parser::_Runtime::_trace(q{<<Didn\'t match terminal>>},
1141 XML::XSH2::Parser::_Runtime::_tracefirst($text))
1142 if defined $::RD_TRACE;
1143  
1144 last;
1145 }
1146 $current_match = substr($text, $-[0], $+[0] - $-[0]);
1147 substr($text,0,length($current_match),q{});
1148 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
1149 . $current_match . q{])},
1150 XML::XSH2::Parser::_Runtime::_tracefirst($text))
1151 if defined $::RD_TRACE;
1152 push @item, $item{'.$self->{hashname}.'}=$current_match;
1153 0 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 7 branches
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} < 0 ? : 0 0 0
$check->{'itempos'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$check->{'itempos'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
1154 ';
1155  
1156 0 return $code;
1157 }
1158  
1159 8 1;
1160  
1161 package # this should not be indexed by CPAN
1162 XML::XSH2::Parser::_Runtime::Literal;
1163  
1164 0 ▶sub sethashname { $_[0]->{hashname} = '__STRING' . ++$_[1]->{strcount} . '__'; }
Subroutine sethashname: not called CC=1 SCAR=6.9
1165  
1166 0 ▶sub issubrule { undef }
Subroutine issubrule: not called CC=1 SCAR=6.9
1167 0 ▶sub isterminal { 1 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1168 0 ▶sub describe ($) { shift->{'description'} }
Subroutine describe: not called CC=1 SCAR=6.9
1169  
1170 sub new ($$$$)
1171 0 ▶{
Subroutine new: not called CC=2 SCAR=17.9
1172 0 ▶ my $class = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
1173  
1174 0 my $pattern = $_[1];
1175  
1176 0 my $desc = $pattern;
1177 0 $desc=~s/\\/\\\\/g;
1178 0 $desc=~s/}/\\}/g;
1179 0 $desc=~s/{/\\{/g;
1180  
1181 0 bless
1182 {
1183 "pattern" => $pattern,
1184 "lookahead" => $_[2],
1185 "line" => $_[3],
1186 "description" => "'$desc'",
1187 }, $class;
1188 }
1189  
1190  
1191 sub code($$$$)
1192 0 ▶{
Subroutine code: not called CC=8 SCAR=42.8
1193 0 my ($self, $namespace, $rule, $check) = @_;
1194  
1195 my $code = '
1196 XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [' . $self->describe
1197 . ']},
1198 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1199 q{' . $rule->{name} . '},
1200 $tracelevel)
1201 if defined $::RD_TRACE;
1202 undef $lastsep;
1203 $expectation->is(q{' . ($rule->hasleftmost($self) ? ''
1204 : $self->describe ) . '})->at($text);
1205 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) . '
1206  
1207 ' . ($self->{"lookahead"}<0?'if':'unless')
1208 . ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and '
1209 . ($check->{itempos}? 'do {'.XML::XSH2::Parser::_Runtime::Production::incitempos().' 1} and ' : '')
1210 . ' $text =~ m/\A' . quotemeta($self->{"pattern"}) . '/)
1211 {
1212 '.($self->{"lookahead"} ? '$text = $_savetext;' : '$text = $lastsep . $text if defined $lastsep;').'
1213 '. ($check->{itempos} ? XML::XSH2::Parser::_Runtime::Production::unincitempos() : '') . '
1214 $expectation->failed();
1215 XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn\'t match terminal>>},
1216 XML::XSH2::Parser::_Runtime::_tracefirst($text))
1217 if defined $::RD_TRACE;
1218 last;
1219 }
1220 $current_match = substr($text, $-[0], $+[0] - $-[0]);
1221 substr($text,0,length($current_match),q{});
1222 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
1223 . $current_match . q{])},
1224 XML::XSH2::Parser::_Runtime::_tracefirst($text))
1225 if defined $::RD_TRACE;
1226 push @item, $item{'.$self->{hashname}.'}=$current_match;
1227 0 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 7 branches
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} < 0 ? : 0 0 0
$check->{'itempos'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$check->{'itempos'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
1228 ';
1229  
1230 0 return $code;
1231 }
1232  
1233 8 1;
1234  
1235 package # this should not be indexed by CPAN
1236 XML::XSH2::Parser::_Runtime::InterpLit;
1237  
1238 0 ▶sub sethashname { $_[0]->{hashname} = '__STRING' . ++$_[1]->{strcount} . '__'; }
Subroutine sethashname: not called CC=1 SCAR=6.9
1239  
1240 0 ▶sub issubrule { undef }
Subroutine issubrule: not called CC=1 SCAR=6.9
1241 0 ▶sub isterminal { 1 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1242 0 ▶sub describe ($) { shift->{'description'} }
Subroutine describe: not called CC=1 SCAR=6.9
1243  
1244 sub new ($$$$)
1245 0 ▶{
Subroutine new: not called CC=2 SCAR=17.9
1246 0 ▶ my $class = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
1247  
1248 0 my $pattern = $_[1];
1249 0 $pattern =~ s#/#\\/#g;
1250  
1251 0 my $desc = $pattern;
1252 0 $desc=~s/\\/\\\\/g;
1253 0 $desc=~s/}/\\}/g;
1254 0 $desc=~s/{/\\{/g;
1255  
1256 0 bless
1257 {
1258 "pattern" => $pattern,
1259 "lookahead" => $_[2],
1260 "line" => $_[3],
1261 "description" => "'$desc'",
1262 }, $class;
1263 }
1264  
1265 sub code($$$$)
1266 0 ▶{
Subroutine code: not called CC=8 SCAR=42.8
1267 0 my ($self, $namespace, $rule, $check) = @_;
1268  
1269 my $code = '
1270 XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [' . $self->describe
1271 . ']},
1272 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1273 q{' . $rule->{name} . '},
1274 $tracelevel)
1275 if defined $::RD_TRACE;
1276 undef $lastsep;
1277 $expectation->is(q{' . ($rule->hasleftmost($self) ? ''
1278 : $self->describe ) . '})->at($text);
1279 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) . '
1280  
1281 ' . ($self->{"lookahead"}<0?'if':'unless')
1282 . ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and '
1283 . ($check->{itempos}? 'do {'.XML::XSH2::Parser::_Runtime::Production::incitempos().' 1} and ' : '')
1284 . ' do { $_tok = "' . $self->{"pattern"} . '"; 1 } and
1285 substr($text,0,length($_tok)) eq $_tok and
1286 do { substr($text,0,length($_tok)) = ""; 1; }
1287 )
1288 {
1289 '.($self->{"lookahead"} ? '$text = $_savetext;' : '$text = $lastsep . $text if defined $lastsep;').'
1290 '. ($check->{itempos} ? XML::XSH2::Parser::_Runtime::Production::unincitempos() : '') . '
1291 $expectation->failed();
1292 XML::XSH2::Parser::_Runtime::_trace(q{<<Didn\'t match terminal>>},
1293 XML::XSH2::Parser::_Runtime::_tracefirst($text))
1294 if defined $::RD_TRACE;
1295 last;
1296 }
1297 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
1298 . $_tok . q{])},
1299 XML::XSH2::Parser::_Runtime::_tracefirst($text))
1300 if defined $::RD_TRACE;
1301 push @item, $item{'.$self->{hashname}.'}=$_tok;
1302 0 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 7 branches
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} < 0 ? : 0 0 0
$check->{'itempos'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$check->{'itempos'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
1303 ';
1304  
1305 0 return $code;
1306 }
1307  
1308 8 1;
1309  
1310 package # this should not be indexed by CPAN
1311 XML::XSH2::Parser::_Runtime::Subrule;
1312  
1313 0 ▶sub issubrule ($) { return $_[0]->{"subrule"} }
Subroutine issubrule: not called CC=1 SCAR=6.9
1314 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1315 0 ▶sub sethashname {}
Subroutine sethashname: not called CC=1 SCAR=0.0
1316  
1317 sub describe ($)
1318 0 ▶{
Subroutine describe: not called CC=3 SCAR=24.8
1319 0 ▶ my $desc = $_[0]->{"implicit"} || $_[0]->{"subrule"};
Condition0%0/3
$_[0]{'implicit'} || $_[0]{'subrule'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$_[0]{'implicit'} || $_[0]{'subrule'}
$_[0]{'implicit'} $_[0]{'subrule'}
Truth table0%0/3
A || B
A= $_[0]{'implicit'}B= $_[0]{'subrule'}
ABresult
1X1
011
000
1320 0 ▶ $desc = "<matchrule:$desc>" if $_[0]->{"matchrule"};
Branch: 1 branch
BranchTrueFalseTotal
if $_[0]{"matchrule"} 0 0 0
1321 0 return $desc;
1322 }
1323  
1324 sub callsyntax($$)
1325 0 ▶{
Subroutine callsyntax: not called CC=2 SCAR=17.9
1326 0 ▶ if ($_[0]->{"matchrule"})
Branch: 1 branch
BranchTrueFalseTotal
if ($_[0]{'matchrule'}) { } 0 0 0
1327 {
1328 0 return "&{'$_[1]'.qq{$_[0]->{subrule}}}";
1329 }
1330 else
1331 {
1332 0 return $_[1].$_[0]->{"subrule"};
1333 }
1334 }
1335  
1336 sub new ($$$$;$$$)
1337 0 ▶{
Subroutine new: not called CC=4 SCAR=30.0
1338 0 ▶ my $class = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
1339 0 ▶ bless
Condition0%0/4
$_[4] || undef
l!l
00
$_[6] || undef
l!l
00
MC/DC0%0/1
$_[4] || undef
$_[4]
MC/DC0%0/1
$_[6] || undef
$_[6]
Truth table0%0/2
A
A= $_[4]
Aresult
11
00
Truth table0%0/2
A
A= $_[6]
Aresult
11
00
1340 {
1341 "subrule" => $_[1],
1342 "lookahead" => $_[2],
1343 "line" => $_[3],
1344 "implicit" => $_[4] || undef,
1345 "matchrule" => $_[5],
1346 "argcode" => $_[6] || undef,
1347 }, $class;
1348 }
1349  
1350  
1351 sub code($$$$)
1352 0 ▶{
Subroutine code: not called CC=9 SCAR=45.0
1353 0 my ($self, $namespace, $rule, $check) = @_;
1354  
1355 '
1356 XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [' . $self->{"subrule"} . ']},
1357 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1358 q{' . $rule->{"name"} . '},
1359 $tracelevel)
1360 if defined $::RD_TRACE;
1361 if (1) { no strict qw{refs};
1362 $expectation->is(' . ($rule->hasleftmost($self) ? 'q{}'
1363 # WAS : 'qq{'.$self->describe.'}' ) . ')->at($text);
1364 : 'q{'.$self->describe.'}' ) . ')->at($text);
1365 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' )
1366 . ($self->{"lookahead"}<0?'if':'unless')
1367 . ' (defined ($_tok = '
1368 . $self->callsyntax($namespace.'::')
1369 . '($thisparser,$text,$repeating,'
1370 . ($self->{"lookahead"}?'1':'$_noactions')
1371 . ($self->{argcode} ? ",sub { return $self->{argcode} }"
1372 : ',sub { \\@arg }')
1373 . ($check->{"itempos"}?',$itempos[$#itempos]':',undef')
1374 . ')))
1375 {
1376 '.($self->{"lookahead"} ? '$text = $_savetext;' : '').'
1377 XML::XSH2::Parser::_Runtime::_trace(q{<<'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self,1).' subrule: ['
1378 . $self->{subrule} . ']>>},
1379 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1380 q{' . $rule->{"name"} .'},
1381 $tracelevel)
1382 if defined $::RD_TRACE;
1383 $expectation->failed();
1384 last;
1385 }
1386 XML::XSH2::Parser::_Runtime::_trace(q{>>'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self).' subrule: ['
1387 . $self->{subrule} . ']<< (return value: [}
1388 . $_tok . q{]},
1389  
1390 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1391 q{' . $rule->{"name"} .'},
1392 $tracelevel)
1393 if defined $::RD_TRACE;
1394 $item{q{' . $self->{subrule} . '}} = $_tok;
1395 push @item, $_tok;
1396 0 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 8 branches
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} < 0 ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$self->{'argcode'} ? : 0 0 0
$check->{'itempos'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
1397 }
1398 '
1399 }
1400  
1401 package # this should not be indexed by CPAN
1402 XML::XSH2::Parser::_Runtime::Repetition;
1403  
1404 0 ▶sub issubrule ($) { return $_[0]->{"subrule"} }
Subroutine issubrule: not called CC=1 SCAR=6.9
1405 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1406 0 ▶sub sethashname { }
Subroutine sethashname: not called CC=1 SCAR=0.0
1407  
1408 sub describe ($)
1409 0 ▶{
Subroutine describe: not called CC=3 SCAR=24.8
1410 0 ▶ my $desc = $_[0]->{"expected"} || $_[0]->{"subrule"};
Condition0%0/3
$_[0]{'expected'} || $_[0]{'subrule'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$_[0]{'expected'} || $_[0]{'subrule'}
$_[0]{'expected'} $_[0]{'subrule'}
Truth table0%0/3
A || B
A= $_[0]{'expected'}B= $_[0]{'subrule'}
ABresult
1X1
011
000
1411 0 ▶ $desc = "<matchrule:$desc>" if $_[0]->{"matchrule"};
Branch: 1 branch
BranchTrueFalseTotal
if $_[0]{"matchrule"} 0 0 0
1412 0 return $desc;
1413 }
1414  
1415 sub callsyntax($$)
1416 0 ▶{
Subroutine callsyntax: not called CC=2 SCAR=17.9
1417 0 ▶ if ($_[0]->{matchrule})
Branch: 1 branch
BranchTrueFalseTotal
if ($_[0]{'matchrule'}) { } 0 0 0
1418 0 { return "sub { goto &{''.qq{$_[1]$_[0]->{subrule}}} }"; }
1419 else
1420 0 { return "\\&$_[1]$_[0]->{subrule}"; }
1421 }
1422  
1423 sub new ($$$$$$$$$$)
1424 0 ▶{
Subroutine new: not called CC=7 SCAR=40.3
1425 0 my ($self, $subrule, $repspec, $min, $max, $lookahead, $line, $parser, $matchrule, $argcode) = @_;
1426 0 ▶ my $class = ref($self) || $self;
Condition0%0/3
ref $self || $self
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table0%0/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
1427 0 ▶ ($max, $min) = ( $min, $max) if ($max<$min);
Branch: 1 branch
BranchTrueFalseTotal
if $max < $min 0 0 0
1428  
1429 0 my $desc;
1430 0 ▶ if ($subrule=~/\A_alternation_\d+_of_production_\d+_of_rule/)
Branch: 1 branch
BranchTrueFalseTotal
if ($subrule =~ /\A_alternation_\d+_of_production_\d+_of_rule/) 0 0 0
1431 0 { $desc = $parser->{"rules"}{$subrule}->expected }
1432  
1433 0 ▶ if ($lookahead)
Branch: 1 branch
BranchTrueFalseTotal
if ($lookahead) 0 0 0
1434 {
1435 0 ▶ if ($min>0)
Branch: 1 branch
BranchTrueFalseTotal
if ($min > 0) { } 0 0 0
1436 {
1437 0 return new XML::XSH2::Parser::_Runtime::Subrule($subrule,$lookahead,$line,$desc,$matchrule,$argcode);
1438 }
1439 else
1440 {
1441 0 XML::XSH2::Parser::_Runtime::_error("Not symbol (\"!\") before
1442 \"$subrule\" doesn't make
1443 sense.",$line);
1444 0 XML::XSH2::Parser::_Runtime::_hint("Lookahead for negated optional
1445 repetitions (such as
1446 \"!$subrule($repspec)\" can never
1447 succeed, since optional items always
1448 match (zero times at worst).
1449 Did you mean a single \"!$subrule\",
1450 instead?");
1451 }
1452 }
1453 bless
1454 {
1455 0 ▶ "subrule" => $subrule,
Condition0%0/2
$argcode || undef
l!l
00
MC/DC0%0/1
$argcode || undef
$argcode
Truth table0%0/2
A
A= $argcode
Aresult
11
00
1456 "repspec" => $repspec,
1457 "min" => $min,
1458 "max" => $max,
1459 "lookahead" => $lookahead,
1460 "line" => $line,
1461 "expected" => $desc,
1462 "argcode" => $argcode || undef,
1463 "matchrule" => $matchrule,
1464 }, $class;
1465 }
1466  
1467 sub code($$$$)
1468 0 ▶{
Subroutine code: not called CC=7 SCAR=40.3
1469 0 my ($self, $namespace, $rule, $check) = @_;
1470  
1471 my ($subrule, $repspec, $min, $max, $lookahead) =
1472 0 @{$self}{ qw{subrule repspec min max lookahead} };
1473  
1474 '
1475 XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [' . $self->describe . ']},
1476 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1477 q{' . $rule->{"name"} . '},
1478 $tracelevel)
1479 if defined $::RD_TRACE;
1480 $expectation->is(' . ($rule->hasleftmost($self) ? 'q{}'
1481 # WAS : 'qq{'.$self->describe.'}' ) . ')->at($text);
1482 : 'q{'.$self->describe.'}' ) . ')->at($text);
1483 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .'
1484 unless (defined ($_tok = $thisparser->_parserepeat($text, '
1485 . $self->callsyntax($namespace.'::')
1486 . ', ' . $min . ', ' . $max . ', '
1487 . ($self->{"lookahead"}?'1':'$_noactions')
1488 . ',$expectation,'
1489 . ($self->{argcode} ? "sub { return $self->{argcode} }"
1490 : 'sub { \\@arg }')
1491 . ($check->{"itempos"}?',$itempos[$#itempos]':',undef')
1492 . ')))
1493 {
1494 XML::XSH2::Parser::_Runtime::_trace(q{<<'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self,1).' repeated subrule: ['
1495 . $self->describe . ']>>},
1496 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1497 q{' . $rule->{"name"} .'},
1498 $tracelevel)
1499 if defined $::RD_TRACE;
1500 last;
1501 }
1502 XML::XSH2::Parser::_Runtime::_trace(q{>>'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self).' repeated subrule: ['
1503 . $self->{subrule} . ']<< (}
1504 . @$_tok . q{ times)},
1505  
1506 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1507 q{' . $rule->{"name"} .'},
1508 $tracelevel)
1509 if defined $::RD_TRACE;
1510 $item{q{' . "$self->{subrule}($self->{repspec})" . '}} = $_tok;
1511 push @item, $_tok;
1512 0 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 6 branches
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
$self->{'argcode'} ? : 0 0 0
$check->{'itempos'} ? : 0 0 0
$self->{'lookahead'} ? : 0 0 0
1513  
1514 '
1515 }
1516  
1517 package # this should not be indexed by CPAN
1518 XML::XSH2::Parser::_Runtime::Result;
1519  
1520 0 ▶sub issubrule { 0 }
Subroutine issubrule: not called CC=1 SCAR=6.9
1521 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1522 0 ▶sub describe { '' }
Subroutine describe: not called CC=1 SCAR=6.9
1523  
1524 sub new
1525 0 ▶{
Subroutine new: not called CC=1 SCAR=6.9
1526 0 my ($class, $pos) = @_;
1527  
1528 0 bless {}, $class;
1529 }
1530  
1531 sub code($$$$)
1532 0 ▶{
Subroutine code: not called CC=1 SCAR=6.9
1533 0 my ($self, $namespace, $rule) = @_;
1534  
1535 0 '
1536 $return = $item[-1];
1537 ';
1538 }
1539  
1540 package # this should not be indexed by CPAN
1541 XML::XSH2::Parser::_Runtime::Operator;
1542  
1543 8 my @opertype = ( " non-optional", "n optional" );
1544  
1545 0 ▶sub issubrule { 0 }
Subroutine issubrule: not called CC=1 SCAR=6.9
1546 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1547  
1548 0 ▶sub describe { $_[0]->{"expected"} }
Subroutine describe: not called CC=1 SCAR=6.9
1549 0 ▶sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; }
Subroutine sethashname: not called CC=1 SCAR=6.9
1550  
1551  
1552 sub new
1553 0 ▶{
Subroutine new: not called CC=1 SCAR=6.9
1554 0 my ($class, $type, $minrep, $maxrep, $leftarg, $op, $rightarg) = @_;
1555  
1556 0 bless
1557 {
1558 "type" => "${type}op",
1559 "leftarg" => $leftarg,
1560 "op" => $op,
1561 "min" => $minrep,
1562 "max" => $maxrep,
1563 "rightarg" => $rightarg,
1564 "expected" => "<${type}op: ".$leftarg->describe." ".$op->describe." ".$rightarg->describe.">",
1565 }, $class;
1566 }
1567  
1568 sub code($$$$)
1569 0 ▶{
Subroutine code: not called CC=15 SCAR=54.8
1570 0 my ($self, $namespace, $rule, $check) = @_;
1571  
1572 0 my @codeargs = @_[1..$#_];
1573  
1574 my ($leftarg, $op, $rightarg) =
1575 0 @{$self}{ qw{leftarg op rightarg} };
1576  
1577 my $code = '
1578 XML::XSH2::Parser::_Runtime::_trace(q{Trying operator: [' . $self->describe . ']},
1579 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1580 0 ▶ q{' . $rule->{"name"} . '},
Branch: 1 branch
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 0 0 0
1581 $tracelevel)
1582 if defined $::RD_TRACE;
1583 $expectation->is(' . ($rule->hasleftmost($self) ? 'q{}'
1584 # WAS : 'qq{'.$self->describe.'}' ) . ')->at($text);
1585 : 'q{'.$self->describe.'}' ) . ')->at($text);
1586  
1587 $_tok = undef;
1588 OPLOOP: while (1)
1589 {
1590 $repcount = 0;
1591 my @item;
1592 my %item;
1593 ';
1594  
1595 $code .= '
1596 my $_itempos = $itempos[-1];
1597 my $itemposfirst;
1598 0 ▶' if $check->{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $check->{"itempos"} 0 0 0
1599  
1600 0 ▶ if ($self->{type} eq "leftop" )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'type'} eq 'leftop') { } 0 0 0
1601 {
1602 0 $code .= '
1603 # MATCH LEFTARG
1604 ' . $leftarg->code(@codeargs) . '
1605  
1606 ';
1607  
1608 $code .= '
1609 if (defined($_itempos) and !defined($itemposfirst))
1610 {
1611 $itemposfirst = XML::XSH2::Parser::_Runtime::Production::_duplicate_itempos($_itempos);
1612 }
1613 0 ▶' if $check->{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $check->{"itempos"} 0 0 0
1614  
1615 $code .= '
1616 $repcount++;
1617  
1618 my $savetext = $text;
1619 my $backtrack;
1620  
1621 # MATCH (OP RIGHTARG)(s)
1622 while ($repcount < ' . $self->{max} . ')
1623 {
1624 $backtrack = 0;
1625 ' . $op->code(@codeargs) . '
1626 ' . ($op->isterminal() ? 'pop @item;' : '$backtrack=1;' ) . '
1627 ' . (ref($op) eq 'XML::XSH2::Parser::_Runtime::Token'
1628 0 ▶ ? 'if (defined $1) {push @item, $item{'.($self->{name}||$self->{hashname}).'}=$1; $backtrack=1;}'
Branch: 2 branches
BranchTrueFalseTotal
$op->isterminal ? : 0 0 0
ref $op eq 'XML::XSH2::Parser::_Runtime::Token' ? : 0 0 0
Condition0%0/3
$self->{'name'} || $self->{'hashname'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{'name'} || $self->{'hashname'}
$self->{'name'} $self->{'hashname'}
Truth table0%0/3
A || B
A= $self->{'name'}B= $self->{'hashname'}
ABresult
1X1
011
000
1629 : "" ) . '
1630 ' . $rightarg->code(@codeargs) . '
1631 $savetext = $text;
1632 $repcount++;
1633 }
1634 $text = $savetext;
1635 pop @item if $backtrack;
1636  
1637 ';
1638 }
1639 else
1640 {
1641 $code .= '
1642 my $savetext = $text;
1643 my $backtrack;
1644 # MATCH (LEFTARG OP)(s)
1645 0 while ($repcount < ' . $self->{max} . ')
1646 {
1647 $backtrack = 0;
1648 ' . $leftarg->code(@codeargs) . '
1649 ';
1650 $code .= '
1651 if (defined($_itempos) and !defined($itemposfirst))
1652 {
1653 $itemposfirst = XML::XSH2::Parser::_Runtime::Production::_duplicate_itempos($_itempos);
1654 }
1655 0 ▶' if $check->{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $check->{"itempos"} 0 0 0
1656  
1657 $code .= '
1658 $repcount++;
1659 $backtrack = 1;
1660 ' . $op->code(@codeargs) . '
1661 $savetext = $text;
1662 ' . ($op->isterminal() ? 'pop @item;' : "" ) . '
1663 0 ▶ ' . (ref($op) eq 'XML::XSH2::Parser::_Runtime::Token' ? 'do { push @item, $item{'.($self->{name}||$self->{hashname}).'}=$1; } if defined $1;' : "" ) . '
Branch: 2 branches
BranchTrueFalseTotal
$op->isterminal ? : 0 0 0
ref $op eq 'XML::XSH2::Parser::_Runtime::Token' ? : 0 0 0
Condition0%0/3
$self->{'name'} || $self->{'hashname'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{'name'} || $self->{'hashname'}
$self->{'name'} $self->{'hashname'}
Truth table0%0/3
A || B
A= $self->{'name'}B= $self->{'hashname'}
ABresult
1X1
011
000
1664 }
1665 $text = $savetext;
1666 pop @item if $backtrack;
1667  
1668 # MATCH RIGHTARG
1669 ' . $rightarg->code(@codeargs) . '
1670 $repcount++;
1671 ';
1672 }
1673  
1674 0 ▶ $code .= 'unless (@item) { undef $_tok; last }' unless $self->{min}==0;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"min"} == 0 0 0 0
1675  
1676 0 $code .= '
1677 $_tok = [ @item ];
1678 ';
1679  
1680  
1681 $code .= '
1682 if (defined $itemposfirst)
1683 {
1684 XML::XSH2::Parser::_Runtime::Production::_update_itempos(
1685 $_itempos, $itemposfirst, undef, [qw(from)]);
1686 }
1687 0 ▶' if $check->{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $check->{"itempos"} 0 0 0
1688  
1689 0 $code .= '
1690 last;
1691 } # end of OPLOOP
1692 ';
1693  
1694 $code .= '
1695 unless ($repcount>='.$self->{min}.')
1696 {
1697 XML::XSH2::Parser::_Runtime::_trace(q{<<'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self,1).' operator: ['
1698 . $self->describe
1699 . ']>>},
1700 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1701 q{' . $rule->{"name"} .'},
1702 $tracelevel)
1703 if defined $::RD_TRACE;
1704 $expectation->failed();
1705 last;
1706 }
1707 XML::XSH2::Parser::_Runtime::_trace(q{>>'.XML::XSH2::Parser::_Runtime::_matchtracemessage($self).' operator: ['
1708 . $self->describe
1709 . ']<< (return value: [}
1710 . qq{@{$_tok||[]}} . q{]},
1711 XML::XSH2::Parser::_Runtime::_tracefirst($text),
1712 q{' . $rule->{"name"} .'},
1713 $tracelevel)
1714 if defined $::RD_TRACE;
1715  
1716 0 ▶ push @item, $item{'.($self->{name}||$self->{hashname}).'}=$_tok||[];
Condition0%0/3
$self->{'name'} || $self->{'hashname'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$self->{'name'} || $self->{'hashname'}
$self->{'name'} $self->{'hashname'}
Truth table0%0/3
A || B
A= $self->{'name'}B= $self->{'hashname'}
ABresult
1X1
011
000
1717 ';
1718  
1719 0 return $code;
1720 }
1721  
1722  
1723 package # this should not be indexed by CPAN
1724 XML::XSH2::Parser::_Runtime::Expectation;
1725  
1726 sub new ($)
1727 31925 ▶{
Subroutine new: called CC=1 SCAR=0.0
1728 31925 bless {
1729 "failed" => 0,
1730 "expected" => "",
1731 "unexpected" => "",
1732 "lastexpected" => "",
1733 "lastunexpected" => "",
1734 "defexpected" => $_[1],
1735 };
1736 }
1737  
1738 sub is ($$)
1739 72858 ▶{
Subroutine is: called CC=1 SCAR=0.0
1740 72858 $_[0]->{lastexpected} = $_[1]; return $_[0];
1741 }
1742  
1743 sub at ($$)
1744 113475 ▶{
Subroutine at: called CC=1 SCAR=0.0
1745 113475 $_[0]->{lastunexpected} = $_[1]; return $_[0];
1746 }
1747  
1748 sub failed ($)
1749 40669 ▶{
Subroutine failed: called CC=4 SCAR=14.2
1750 40669 ▶ return unless $_[0]->{lastexpected};
Branch: 1 branch
BranchTrueFalseTotal
unless $_[0]{"lastexpected"} 40209 460 40669
1751 460 ▶ $_[0]->{expected} = $_[0]->{lastexpected} unless $_[0]->{failed};
Branch: 1 branch
BranchTrueFalseTotal
unless $_[0]{"failed"} 460 0 460
1752 460 ▶ $_[0]->{unexpected} = $_[0]->{lastunexpected} unless $_[0]->{failed};
Branch: 1 branch
BranchTrueFalseTotal
unless $_[0]{"failed"} 460 0 460
1753 460 $_[0]->{failed} = 1;
1754 }
1755  
1756 sub message ($)
1757 0 ▶{
Subroutine message: not called CC=4 SCAR=30.0
1758 0 my ($self) = @_;
1759 0 ▶ $self->{expected} = $self->{defexpected} unless $self->{expected};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"expected"} 0 0 0
1760 0 $self->{expected} =~ s/_/ /g;
1761 0 ▶ if (!$self->{unexpected} || $self->{unexpected} =~ /\A\s*\Z/s)
Branch: 1 branch
BranchTrueFalseTotal
if (not $self->{'unexpected'} or $self->{'unexpected'} =~ /\A\s*\Z/s) { } 0 0 0
Condition0%0/3
not $self->{"unexpected"} or $self->{"unexpected"} =~ /\A\s*\Z/s
l!l&&r!l&&!r
000
MC/DC0%0/2
not $self->{"unexpected"} or $self->{"unexpected"} =~ /\A\s*\Z/s
not $self->{"unexpected"} $self->{"unexpected"} =~ /\A\s*\Z/s
Truth table0%0/3
not(A) or B
A= not $self->{"unexpected"}B= $self->{"unexpected"} =~ /\A\s*\Z/s
ABresult
1X1
011
000
1762 {
1763 0 return "Was expecting $self->{expected}";
1764 }
1765 else
1766 {
1767 0 $self->{unexpected} =~ /\s*(.*)/;
1768 0 return "Was expecting $self->{expected} but found \"$1\" instead";
1769 }
1770 }
1771  
1772 8 1;
1773  
1774 package # this should not be indexed by CPAN
1775 XML::XSH2::Parser::_Runtime;
1776  
1777 8 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
1778 8 ▶use vars qw ( $AUTOLOAD $VERSION $_FILENAME);
Subroutine BEGIN: called CC=1 SCAR=0.0
1779  
1780 8 my $ERRORS = 0;
1781  
1782 8 our $VERSION = # Hide from PAUSE
1783 '1.967015';
1784 8 $VERSION = eval $VERSION;
1785 8 $_FILENAME=__FILE__;
1786  
1787 # BUILDING A PARSER
1788  
1789 8 my $nextnamespace = "namespace000001";
1790  
1791 sub _nextnamespace()
1792 0 ▶{
Subroutine _nextnamespace: not called CC=1 SCAR=6.9
1793 0 return "XML::XSH2::Parser::_Runtime::" . $nextnamespace++;
1794 }
1795  
1796 # ARGS ARE: $class, $grammar, $compiling, $namespace
1797 sub new ($$$$)
1798 0 ▶{
Subroutine new: not called CC=5 SCAR=34.0
1799 0 ▶ my $class = ref($_[0]) || $_[0];
Condition0%0/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
000
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
1800 0 local $XML::XSH2::Parser::_Runtime::compiling = $_[2];
1801 0 ▶ my $name_space_name = defined $_[3]
Branch: 1 branch
BranchTrueFalseTotal
defined $_[3] ? : 0 0 0
1802 ? "XML::XSH2::Parser::_Runtime::".$_[3]
1803 : _nextnamespace();
1804 0 my $self =
1805 {
1806 "rules" => {},
1807 "namespace" => $name_space_name,
1808 "startcode" => '',
1809 "localvars" => '',
1810 "_AUTOACTION" => undef,
1811 "_AUTOTREE" => undef,
1812  
1813 # Precompiled parsers used to set _precompiled, but that
1814 # wasn't present in some versions of XML::XSH2::Parser::_Runtime used to
1815 # build precompiled parsers. Instead, set a new
1816 # _not_precompiled flag, which is remove from future
1817 # Precompiled parsers at build time.
1818 "_not_precompiled" => 1,
1819 };
1820  
1821  
1822 0 ▶ if ($::RD_AUTOACTION) {
Branch: 1 branch
BranchTrueFalseTotal
if ($main::RD_AUTOACTION) 0 0 0
1823 0 my $sourcecode = $::RD_AUTOACTION;
1824 0 ▶ $sourcecode = "{ $sourcecode }"
Branch: 1 branch
BranchTrueFalseTotal
unless $sourcecode =~ /\A\s*\{.*\}\s*\Z/ 0 0 0
1825 unless $sourcecode =~ /\A\s*\{.*\}\s*\Z/;
1826 $self->{_check}{itempos} =
1827 0 $sourcecode =~ /\@itempos\b|\$itempos\s*\[/;
1828 $self->{_AUTOACTION}
1829 0 = new XML::XSH2::Parser::_Runtime::Action($sourcecode,0,-1)
1830 }
1831  
1832 0 bless $self, $class;
1833 0 return $self->Replace($_[1])
1834 }
1835  
1836 0 ▶sub Compile($$$$) {
Subroutine Compile: not called CC=1 SCAR=6.9
1837 0 die "Compilation of XML::XSH2::Parser::_Runtime grammars not yet implemented\n";
1838 }
1839  
1840 0 ▶sub DESTROY {
Subroutine DESTROY: not called CC=4 SCAR=26.6
1841 0 my ($self) = @_;
1842 0 my $namespace = $self->{namespace};
1843 0 $namespace =~ s/XML::XSH2::Parser::_Runtime:://;
1844 0 ▶ if ($self->{_not_precompiled}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"_not_precompiled"}) 0 0 0
1845 # BEGIN WORKAROUND
1846 # Perl has a bug that creates a circular reference between
1847 # @ISA and that variable's stash:
1848 # https://rt.perl.org/rt3/Ticket/Display.html?id=92708
1849 # Emptying the array before deleting the stash seems to
1850 # prevent the leak. Once the ticket above has been resolved,
1851 # these two lines can be removed.
1852 8 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
1853 0 @{$self->{namespace} . '::ISA'} = ();
1854 # END WORKAROUND
1855  
1856 # Some grammars may contain circular references between rules,
1857 # such as:
1858 # a: 'ID' | b
1859 # b: '(' a ')'
1860 # Unless these references are broken, the subs stay around on
1861 # stash deletion below. Iterate through the stash entries and
1862 # for each defined code reference, set it to reference sub {}
1863 # instead.
1864 {
1865 0 local $^W; # avoid 'sub redefined' warnings.
1866 0 ▶ my $blank_sub = sub {};
Subroutine __ANON__: not called CC=1 SCAR=6.9
1867 0 ▶ while (my ($name, $glob) = each %{"XML::XSH2::Parser::_Runtime::$namespace\::"}) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %{"XML::XSH2::Parser::_Runtime::${namespace}::";}) 0 0 0
1868 0 ▶ *$glob = $blank_sub if defined &$glob;
Branch: 1 branch
BranchTrueFalseTotal
if defined &$glob 0 0 0
1869 }
1870 }
1871  
1872 # Delete the namespace's stash
1873 0 delete $XML::XSH2::Parser::_Runtime::{$namespace.'::'};
1874 }
1875 }
1876  
1877 # BUILDING A GRAMMAR....
1878  
1879 # ARGS ARE: $self, $grammar, $isimplicit, $isleftop
1880 sub Replace ($$)
1881 0 ▶{
Subroutine Replace: not called CC=1 SCAR=6.9
1882 # set $replace = 1 for _generate
1883 0 splice(@_, 2, 0, 1);
1884  
1885 0 return _generate(@_);
1886 }
1887  
1888 # ARGS ARE: $self, $grammar, $isimplicit, $isleftop
1889 sub Extend ($$)
1890 0 ▶{
Subroutine Extend: not called CC=1 SCAR=6.9
1891 # set $replace = 0 for _generate
1892 0 splice(@_, 2, 0, 0);
1893  
1894 0 return _generate(@_);
1895 }
1896  
1897 sub _no_rule ($$;$)
1898 0 ▶{
Subroutine _no_rule: not called CC=2 SCAR=17.9
1899 0 _error("Ruleless $_[0] at start of grammar.",$_[1]);
1900 0 ▶ my $desc = $_[2] ? "\"$_[2]\"" : "";
Branch: 1 branch
BranchTrueFalseTotal
$_[2] ? : 0 0 0
1901 0 _hint("You need to define a rule for the $_[0] $desc
1902 to be part of.");
1903 }
1904  
1905 8 my $NEGLOOKAHEAD = '\G(\s*\.\.\.\!)';
1906 8 my $POSLOOKAHEAD = '\G(\s*\.\.\.)';
1907 8 my $RULE = '\G\s*(\w+)[ \t]*:';
1908 8 my $PROD = '\G\s*([|])';
1909 8 my $TOKEN = q{\G\s*/((\\\\/|\\\\\\\\|[^/])*)/([cgimsox]*)};
1910 8 my $MTOKEN = q{\G\s*(m\s*[^\w\s])};
1911 8 my $LITERAL = q{\G\s*'((\\\\['\\\\]|[^'])*)'};
1912 8 my $INTERPLIT = q{\G\s*"((\\\\["\\\\]|[^"])*)"};
1913 8 my $SUBRULE = '\G\s*(\w+)';
1914 8 my $MATCHRULE = '\G(\s*<matchrule:)';
1915 8 my $SIMPLEPAT = '((\\s+/[^/\\\\]*(?:\\\\.[^/\\\\]*)*/)?)';
1916 8 my $OPTIONAL = '\G\((\?)'.$SIMPLEPAT.'\)';
1917 8 my $ANY = '\G\((s\?)'.$SIMPLEPAT.'\)';
1918 8 my $MANY = '\G\((s|\.\.)'.$SIMPLEPAT.'\)';
1919 8 my $EXACTLY = '\G\(([1-9]\d*)'.$SIMPLEPAT.'\)';
1920 8 my $BETWEEN = '\G\((\d+)\.\.([1-9]\d*)'.$SIMPLEPAT.'\)';
1921 8 my $ATLEAST = '\G\((\d+)\.\.'.$SIMPLEPAT.'\)';
1922 8 my $ATMOST = '\G\(\.\.([1-9]\d*)'.$SIMPLEPAT.'\)';
1923 8 my $BADREP = '\G\((-?\d+)?\.\.(-?\d+)?'.$SIMPLEPAT.'\)';
1924 8 my $ACTION = '\G\s*\{';
1925 8 my $IMPLICITSUBRULE = '\G\s*\(';
1926 8 my $COMMENT = '\G\s*(#.*)';
1927 8 my $COMMITMK = '\G\s*<commit>';
1928 8 my $UNCOMMITMK = '\G\s*<uncommit>';
1929 8 my $QUOTELIKEMK = '\G\s*<perl_quotelike>';
1930 8 my $CODEBLOCKMK = '\G\s*<perl_codeblock(?:\s+([][()<>{}]+))?>';
1931 8 my $VARIABLEMK = '\G\s*<perl_variable>';
1932 8 my $NOCHECKMK = '\G\s*<nocheck>';
1933 8 my $AUTOACTIONPATMK = '\G\s*<autoaction:';
1934 8 my $AUTOTREEMK = '\G\s*<autotree(?::\s*([\w:]+)\s*)?>';
1935 8 my $AUTOSTUBMK = '\G\s*<autostub>';
1936 8 my $AUTORULEMK = '\G\s*<autorule:(.*?)>';
1937 8 my $REJECTMK = '\G\s*<reject>';
1938 8 my $CONDREJECTMK = '\G\s*<reject:';
1939 8 my $SCOREMK = '\G\s*<score:';
1940 8 my $AUTOSCOREMK = '\G\s*<autoscore:';
1941 8 my $SKIPMK = '\G\s*<skip:';
1942 8 my $OPMK = '\G\s*<(left|right)op(?:=(\'.*?\'))?:';
1943 8 my $ENDDIRECTIVEMK = '\G\s*>';
1944 8 my $RESYNCMK = '\G\s*<resync>';
1945 8 my $RESYNCPATMK = '\G\s*<resync:';
1946 8 my $RULEVARPATMK = '\G\s*<rulevar:';
1947 8 my $DEFERPATMK = '\G\s*<defer:';
1948 8 my $TOKENPATMK = '\G\s*<token:';
1949 8 my $AUTOERRORMK = '\G\s*<error(\??)>';
1950 8 my $MSGERRORMK = '\G\s*<error(\??):';
1951 8 my $NOCHECK = '\G\s*<nocheck>';
1952 8 my $WARNMK = '\G\s*<warn((?::\s*(\d+)\s*)?)>';
1953 8 my $HINTMK = '\G\s*<hint>';
1954 8 my $TRACEBUILDMK = '\G\s*<trace_build((?::\s*(\d+)\s*)?)>';
1955 8 my $TRACEPARSEMK = '\G\s*<trace_parse((?::\s*(\d+)\s*)?)>';
1956 8 my $UNCOMMITPROD = $PROD.'\s*<uncommit';
1957 8 my $ERRORPROD = $PROD.'\s*<error';
1958 8 my $LONECOLON = '\G\s*:';
1959 8 my $OTHER = '\G\s*([^\s]+)';
1960  
1961 8 my @lines = 0;
1962  
1963 sub _generate
1964 0 ▶{
Subroutine _generate: not called CC=238 SCAR=109.5
1965 0 my ($self, $grammar, $replace, $isimplicit, $isleftop) = (@_, 0);
1966  
1967 0 my $aftererror = 0;
1968 0 my $lookahead = 0;
1969 0 my $lookaheadspec = "";
1970 0 my $must_pop_lines;
1971 0 ▶ if (! $lines[-1]) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($lines[-1]) 0 0 0
1972 0 push @lines, _linecount($grammar) ;
1973 0 $must_pop_lines = 1;
1974 }
1975 $self->{_check}{itempos} = ($grammar =~ /\@itempos\b|\$itempos\s*\[/)
1976 0 ▶ unless $self->{_check}{itempos};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"_check"}{"itempos"} 0 0 0
1977 0 for (qw(thisoffset thiscolumn prevline prevoffset prevcolumn))
1978 {
1979 $self->{_check}{$_} =
1980 ($grammar =~ /\$$_/) || $self->{_check}{itempos}
1981 0 ▶ unless $self->{_check}{$_};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"_check"}{$_} 0 0 0
Condition0%0/3
$grammar =~ /\$$_/ || $self->{'_check'}{'itempos'}
l!l&&r!l&&!r
000
MC/DC0%0/2
$grammar =~ /\$$_/ || $self->{'_check'}{'itempos'}
$grammar =~ /\$$_/ $self->{'_check'}{'itempos'}
Truth table0%0/3
A || B
A= $grammar =~ /\$$_/B= $self->{'_check'}{'itempos'}
ABresult
1X1
011
000
1982 }
1983 0 my $line;
1984  
1985 0 my $rule = undef;
1986 0 my $prod = undef;
1987 0 my $item = undef;
1988 0 my $lastgreedy = '';
1989 0 pos $grammar = 0;
1990 0 study $grammar;
1991  
1992 0 local $::RD_HINT = $::RD_HINT;
1993 0 local $::RD_WARN = $::RD_WARN;
1994 0 local $::RD_TRACE = $::RD_TRACE;
1995 0 local $::RD_CHECK = $::RD_CHECK;
1996  
1997 0 ▶ while (pos $grammar < length $grammar)
Branch: 1 branch
BranchTrueFalseTotal
if (pos $grammar < length $grammar) 0 0 0
1998 {
1999 0 $line = $lines[-1] - _linecount($grammar) + 1;
2000 0 my $commitonly;
2001 0 my $code = "";
2002 0 my @components = ();
2003 0 ▶ if ($grammar =~ m/$COMMENT/gco)
Branch: 19 branches
BranchTrueFalseTotal
if ($grammar =~ /$COMMENT/cog) { } 0 0 0
elsif ($grammar =~ /$NEGLOOKAHEAD/cog) { } 0 0 0
elsif ($grammar =~ /$POSLOOKAHEAD/cog) { } 0 0 0
elsif ($grammar =~ /(?=$ACTION)/cog and do { ($code) = &extract_codeblock($grammar); $code }) { } 0 0 0
elsif ($grammar =~ /(?=$IMPLICITSUBRULE)/cog and do { ($code) = &extract_codeblock($grammar, '{([', undef, '(', 1); $code }) { } 0 0 0
elsif ($grammar =~ /$ENDDIRECTIVEMK/cog) { } 0 0 0
elsif ($grammar =~ /\G\s*<[^m]/cg) { } 0 0 0
elsif ($grammar =~ /$RULE/cog) { } 0 0 0
elsif ($grammar =~ /$UNCOMMITPROD/cog) { } 0 0 0
elsif ($grammar =~ /$ERRORPROD/cog) { } 0 0 0
elsif ($grammar =~ /$PROD/cog) { } 0 0 0
elsif ($grammar =~ /$LITERAL/cog) { } 0 0 0
elsif ($grammar =~ /$INTERPLIT/cog) { } 0 0 0
elsif ($grammar =~ /$TOKEN/cog) { } 0 0 0
elsif ($grammar =~ /(?=$MTOKEN)/cog and do { ($code, undef, @components) = &extract_quotelike($grammar); $code }) { } 0 0 0
elsif ($grammar =~ /(?=$MATCHRULE)/cog and do { ($code) = &extract_bracketed($grammar, '<'); $code } or $grammar =~ /$SUBRULE/cog and $code = $1) { } 0 0 0
elsif ($grammar =~ /$LONECOLON/cog) { } 0 0 0
elsif ($grammar =~ /$ACTION/cog) { } 0 0 0
elsif ($grammar =~ /$OTHER/cog) { } 0 0 0
2004 {
2005 0 _parse("a comment",0,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2006 0 next;
2007 }
2008 elsif ($grammar =~ m/$NEGLOOKAHEAD/gco)
2009 {
2010 0 _parse("a negative lookahead",$aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2011 0 ▶ $lookahead = $lookahead ? -$lookahead : -1;
Branch: 1 branch
BranchTrueFalseTotal
$lookahead ? : 0 0 0
2012 0 $lookaheadspec .= $1;
2013 0 next; # SKIP LOOKAHEAD RESET AT END OF while LOOP
2014 }
2015 elsif ($grammar =~ m/$POSLOOKAHEAD/gco)
2016 {
2017 0 _parse("a positive lookahead",$aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2018 0 ▶ $lookahead = $lookahead ? $lookahead : 1;
Branch: 1 branch
BranchTrueFalseTotal
$lookahead ? : 0 0 0
2019 0 $lookaheadspec .= $1;
2020 0 next; # SKIP LOOKAHEAD RESET AT END OF while LOOP
2021 }
2022 ▶ elsif ($grammar =~ m/(?=$ACTION)/gco
Condition0%0/3
$grammar =~ /(?=$ACTION)/cog and do { ($code) = &extract_codeblock($grammar); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$ACTION)/cog and do { ($code) = &extract_codeblock($grammar); $code }
$grammar =~ /(?=$ACTION)/cog do { ($code) = &extract_codeblock($grammar); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$ACTION)/cogB= do { ($code) = &extract_codeblock($grammar); $code }
ABresult
0X0
100
111
2023 0 and do { ($code) = extract_codeblock($grammar); $code })
2024 {
2025 0 _parse("an action", $aftererror, $line, $code);
2026 0 $item = new XML::XSH2::Parser::_Runtime::Action($code,$lookahead,$line);
2027 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or $self->_addstartcode($code) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2028 or $self->_addstartcode($code);
2029 }
2030 ▶ elsif ($grammar =~ m/(?=$IMPLICITSUBRULE)/gco
Condition0%0/3
$grammar =~ /(?=$IMPLICITSUBRULE)/cog and do { ($code) = &extract_codeblock($grammar, "{([", undef, "(", 1); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$IMPLICITSUBRULE)/cog and do { ($code) = &extract_codeblock($grammar, "{([", undef, "(", 1); $code }
$grammar =~ /(?=$IMPLICITSUBRULE)/cog do { ($code) = &extract_codeblock($grammar, "{([", undef, "(", 1); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$IMPLICITSUBRULE)/cogB= do { ($code) = &extract_codeblock($grammar, "{([", undef, "(", 1); $code }
ABresult
0X0
100
111
2031 0 and do { ($code) = extract_codeblock($grammar,'{([',undef,'(',1);
2032 0 $code })
2033 {
2034 0 $code =~ s/\A\s*\(|\)\Z//g;
2035 0 _parse("an implicit subrule", $aftererror, $line,
2036 "( $code )");
2037 0 my $implicit = $rule->nextimplicit;
2038 return undef
2039 0 ▶ if !$self->_generate("$implicit : $code",$replace,1);
Branch: 1 branch
BranchTrueFalseTotal
unless $self->_generate("$implicit : $code", $replace, 1) 0 0 0
2040 0 my $pos = pos $grammar;
2041 0 substr($grammar,$pos,0,$implicit);
2042 0 pos $grammar = $pos;;
2043 }
2044 elsif ($grammar =~ m/$ENDDIRECTIVEMK/gco)
2045 {
2046  
2047 # EXTRACT TRAILING REPETITION SPECIFIER (IF ANY)
2048  
2049 0 my ($minrep,$maxrep) = (1,$MAXREP);
2050 0 ▶ if ($grammar =~ m/\G[(]/gc)
Branch: 1 branch
BranchTrueFalseTotal
if ($grammar =~ /\G[(]/cg) 0 0 0
2051 {
2052 0 pos($grammar)--;
2053  
2054 0 ▶ if ($grammar =~ m/$OPTIONAL/gco)
Branch: 8 branches
BranchTrueFalseTotal
if ($grammar =~ /$OPTIONAL/cog) { } 0 0 0
elsif ($grammar =~ /$ANY/cog) { } 0 0 0
elsif ($grammar =~ /$EXACTLY/cog) { } 0 0 0
elsif ($grammar =~ /$BETWEEN/cog) { } 0 0 0
elsif ($grammar =~ /$ATLEAST/cog) { } 0 0 0
elsif ($grammar =~ /$ATMOST/cog) { } 0 0 0
elsif ($grammar =~ /$MANY/cog) { } 0 0 0
elsif ($grammar =~ /$BADREP/cog) { } 0 0 0
2055 0 { ($minrep, $maxrep) = (0,1) }
2056 elsif ($grammar =~ m/$ANY/gco)
2057 0 { $minrep = 0 }
2058 elsif ($grammar =~ m/$EXACTLY/gco)
2059 0 { ($minrep, $maxrep) = ($1,$1) }
2060 elsif ($grammar =~ m/$BETWEEN/gco)
2061 0 { ($minrep, $maxrep) = ($1,$2) }
2062 elsif ($grammar =~ m/$ATLEAST/gco)
2063 0 { $minrep = $1 }
2064 elsif ($grammar =~ m/$ATMOST/gco)
2065 0 { $maxrep = $1 }
2066 elsif ($grammar =~ m/$MANY/gco)
2067 { }
2068 elsif ($grammar =~ m/$BADREP/gco)
2069 {
2070 0 _parse("an invalid repetition specifier", 0,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2071 0 _error("Incorrect specification of a repeated directive",
2072 $line);
2073 0 _hint("Repeated directives cannot have
2074 a maximum repetition of zero, nor can they have
2075 negative components in their ranges.");
2076 }
2077 }
2078  
2079 0 ▶ $prod && $prod->enddirective($line,$minrep,$maxrep);
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->enddirective($line, $minrep, $maxrep) 0 0 0
2080 }
2081 elsif ($grammar =~ m/\G\s*<[^m]/gc)
2082 {
2083 0 pos($grammar)-=2;
2084  
2085 0 ▶ if ($grammar =~ m/$OPMK/gco)
Branch: 29 branches
BranchTrueFalseTotal
if ($grammar =~ /$OPMK/cog) { } 0 0 0
elsif ($grammar =~ /$UNCOMMITMK/cog) { } 0 0 0
elsif ($grammar =~ /$QUOTELIKEMK/cog) { } 0 0 0
elsif ($grammar =~ /$CODEBLOCKMK/cog) { } 0 0 0
elsif ($grammar =~ /$VARIABLEMK/cog) { } 0 0 0
elsif ($grammar =~ /$NOCHECKMK/cog) { } 0 0 0
elsif ($grammar =~ /$AUTOSTUBMK/cog) { } 0 0 0
elsif ($grammar =~ /$AUTORULEMK/cog) { } 0 0 0
elsif ($grammar =~ /$AUTOTREEMK/cog) { } 0 0 0
elsif ($grammar =~ /$REJECTMK/cog) { } 0 0 0
elsif ($grammar =~ /(?=$CONDREJECTMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 0 0
elsif ($grammar =~ /(?=$SCOREMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 0 0
elsif ($grammar =~ /(?=$AUTOSCOREMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 0 0
elsif ($grammar =~ /$RESYNCMK/cog) { } 0 0 0
elsif ($grammar =~ /(?=$RESYNCPATMK)/cog and do { ($code) = &extract_bracketed($grammar, '<'); $code }) { } 0 0 0
elsif ($grammar =~ /(?=$SKIPMK)/cog and do { ($code) = &extract_codeblock($grammar, '<'); $code }) { } 0 0 0
elsif ($grammar =~ /(?=$RULEVARPATMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 0 0
elsif ($grammar =~ /(?=$AUTOACTIONPATMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 0 0
elsif ($grammar =~ /(?=$DEFERPATMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 0 0
elsif ($grammar =~ /(?=$TOKENPATMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 0 0
elsif ($grammar =~ /$COMMITMK/cog) { } 0 0 0
elsif ($grammar =~ /$NOCHECKMK/cog) { } 0 0 0
elsif ($grammar =~ /$HINTMK/cog) { } 0 0 0
elsif ($grammar =~ /$WARNMK/cog) { } 0 0 0
elsif ($grammar =~ /$TRACEBUILDMK/cog) { } 0 0 0
elsif ($grammar =~ /$TRACEPARSEMK/cog) { } 0 0 0
elsif ($grammar =~ /$AUTOERRORMK/cog) { } 0 0 0
elsif ($grammar =~ /(?=$MSGERRORMK)/cog and do { $commitonly = $1; ($code) = &extract_bracketed($grammar, '<'); $code }) { } 0 0 0
elsif (do { $commitonly = $1; ($code) = &extract_bracketed($grammar, '<'); $code }) { } 0 0 0
2086 {
2087 # $DB::single=1;
2088 0 _parse("a $1-associative operator directive", $aftererror, $line, "<$1op:...>");
2089 0 ▶ $prod->adddirective($1, $line,$2||'');
Condition0%0/2
$2 || ''
l!l
00
MC/DC0%0/1
$2 || ''
$2
Truth table0%0/2
A
A= $2
Aresult
11
00
2090 }
2091 elsif ($grammar =~ m/$UNCOMMITMK/gco)
2092 {
2093 0 _parse("an uncommit marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2094 0 $item = new XML::XSH2::Parser::_Runtime::Directive('$commit=0;1',
2095 $lookahead,$line,"<uncommit>");
2096 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<uncommit>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2097 or _no_rule("<uncommit>",$line);
2098 }
2099 elsif ($grammar =~ m/$QUOTELIKEMK/gco)
2100 {
2101 0 _parse("an perl quotelike marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2102 0 $item = new XML::XSH2::Parser::_Runtime::Directive(
2103 'my ($match,@res);
2104 ($match,$text,undef,@res) =
2105 Text::Balanced::extract_quotelike($text,$skip);
2106 $match ? \@res : undef;
2107 ', $lookahead,$line,"<perl_quotelike>");
2108 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<perl_quotelike>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2109 or _no_rule("<perl_quotelike>",$line);
2110 }
2111 elsif ($grammar =~ m/$CODEBLOCKMK/gco)
2112 {
2113 0 ▶ my $outer = $1||"{}";
Condition0%0/2
$1 || '{}'
l!l
00
MC/DC0%0/1
$1 || '{}'
$1
Truth table0%0/2
A
A= $1
Aresult
11
00
2114 0 _parse("an perl codeblock marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2115 0 $item = new XML::XSH2::Parser::_Runtime::Directive(
2116 'Text::Balanced::extract_codeblock($text,undef,$skip,\''.$outer.'\');
2117 ', $lookahead,$line,"<perl_codeblock>");
2118 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<perl_codeblock>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2119 or _no_rule("<perl_codeblock>",$line);
2120 }
2121 elsif ($grammar =~ m/$VARIABLEMK/gco)
2122 {
2123 0 _parse("an perl variable marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2124 0 $item = new XML::XSH2::Parser::_Runtime::Directive(
2125 'Text::Balanced::extract_variable($text,$skip);
2126 ', $lookahead,$line,"<perl_variable>");
2127 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<perl_variable>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2128 or _no_rule("<perl_variable>",$line);
2129 }
2130 elsif ($grammar =~ m/$NOCHECKMK/gco)
2131 {
2132 0 _parse("a disable checking marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2133 0 ▶ if ($rule)
Branch: 1 branch
BranchTrueFalseTotal
if ($rule) { } 0 0 0
2134 {
2135 0 _error("<nocheck> directive not at start of grammar", $line);
2136 0 _hint("The <nocheck> directive can only
2137 be specified at the start of a
2138 grammar (before the first rule
2139 is defined.");
2140 }
2141 else
2142 {
2143 0 local $::RD_CHECK = 1;
2144 }
2145 }
2146 elsif ($grammar =~ m/$AUTOSTUBMK/gco)
2147 {
2148 0 _parse("an autostub marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2149 0 $::RD_AUTOSTUB = "";
2150 }
2151 elsif ($grammar =~ m/$AUTORULEMK/gco)
2152 {
2153 0 _parse("an autorule marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2154 0 $::RD_AUTOSTUB = $1;
2155 }
2156 elsif ($grammar =~ m/$AUTOTREEMK/gco)
2157 {
2158 0 ▶ my $base = defined($1) ? $1 : "";
Branch: 1 branch
BranchTrueFalseTotal
defined $1 ? : 0 0 0
2159 0 my $current_match = substr($grammar, $-[0], $+[0] - $-[0]);
2160 0 ▶ $base .= "::" if $base && $base !~ /::$/;
Branch: 1 branch
BranchTrueFalseTotal
if $base and not $base =~ /::$/ 0 0 0
Condition0%0/3
$base and not $base =~ /::$/
!ll&&!rl&&r
000
MC/DC0%0/2
$base and not $base =~ /::$/
$base not $base =~ /::$/
Truth table0%0/3
A and not(B)
A= $baseB= not $base =~ /::$/
ABresult
0X0
100
111
2161 0 _parse("an autotree marker", $aftererror,$line, $current_match);
2162 0 ▶ if ($rule)
Branch: 1 branch
BranchTrueFalseTotal
if ($rule) { } 0 0 0
2163 {
2164 0 _error("<autotree> directive not at start of grammar", $line);
2165 0 _hint("The <autotree> directive can only
2166 be specified at the start of a
2167 grammar (before the first rule
2168 is defined.");
2169 }
2170 else
2171 {
2172 0 undef $self->{_AUTOACTION};
2173 $self->{_AUTOTREE}{NODE}
2174 0 = new XML::XSH2::Parser::_Runtime::Action(q({bless \%item, ').$base.q('.$item[0]}),0,-1);
2175 $self->{_AUTOTREE}{TERMINAL}
2176 0 = new XML::XSH2::Parser::_Runtime::Action(q({bless {__VALUE__=>$item[1]}, ').$base.q('.$item[0]}),0,-1);
2177 }
2178 }
2179  
2180 elsif ($grammar =~ m/$REJECTMK/gco)
2181 {
2182 0 _parse("an reject marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2183 0 $item = new XML::XSH2::Parser::_Runtime::UncondReject($lookahead,$line,"<reject>");
2184 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<reject>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2185 or _no_rule("<reject>",$line);
2186 }
2187 ▶ elsif ($grammar =~ m/(?=$CONDREJECTMK)/gco
Condition0%0/3
$grammar =~ /(?=$CONDREJECTMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$CONDREJECTMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
$grammar =~ /(?=$CONDREJECTMK)/cog do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$CONDREJECTMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2188 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2189 0 $code })
2190 {
2191 0 _parse("a (conditional) reject marker", $aftererror,$line, $code );
2192 0 $code =~ /\A\s*<reject:(.*)>\Z/s;
2193 0 my $cond = $1;
2194 0 $item = new XML::XSH2::Parser::_Runtime::Directive(
2195 "($1) ? undef : 1", $lookahead,$line,"<reject:$cond>");
2196 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<reject:$cond>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2197 or _no_rule("<reject:$cond>",$line);
2198 }
2199 ▶ elsif ($grammar =~ m/(?=$SCOREMK)/gco
Condition0%0/3
$grammar =~ /(?=$SCOREMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$SCOREMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
$grammar =~ /(?=$SCOREMK)/cog do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$SCOREMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2200 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2201 0 $code })
2202 {
2203 0 _parse("a score marker", $aftererror,$line, $code );
2204 0 $code =~ /\A\s*<score:(.*)>\Z/s;
2205 0 ▶ $prod and $prod->addscore($1, $lookahead, $line)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->addscore($1, $lookahead, $line) or &_no_rule($code, $line) 0 0 0
Condition0%0/3
$prod and $prod->addscore($1, $lookahead, $line)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->addscore($1, $lookahead, $line)
$prod $prod->addscore($1, $lookahead, $line)
Truth table0%0/3
A and B
A= $prodB= $prod->addscore($1, $lookahead, $line)
ABresult
0X0
100
111
2206 or _no_rule($code,$line);
2207 }
2208 ▶ elsif ($grammar =~ m/(?=$AUTOSCOREMK)/gco
Condition0%0/3
$grammar =~ /(?=$AUTOSCOREMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$AUTOSCOREMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
$grammar =~ /(?=$AUTOSCOREMK)/cog do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$AUTOSCOREMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2209 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2210 0 $code;
2211 } )
2212 {
2213 0 _parse("an autoscore specifier", $aftererror,$line,$code);
2214 0 $code =~ /\A\s*<autoscore:(.*)>\Z/s;
2215  
2216 0 ▶ $rule and $rule->addautoscore($1,$self)
Branch: 1 branch
BranchTrueFalseTotal
$rule and $rule->addautoscore($1, $self) or &_no_rule($code, $line) 0 0 0
Condition0%0/3
$rule and $rule->addautoscore($1, $self)
!ll&&!rl&&r
000
MC/DC0%0/2
$rule and $rule->addautoscore($1, $self)
$rule $rule->addautoscore($1, $self)
Truth table0%0/3
A and B
A= $ruleB= $rule->addautoscore($1, $self)
ABresult
0X0
100
111
2217 or _no_rule($code,$line);
2218  
2219 0 $item = new XML::XSH2::Parser::_Runtime::UncondReject($lookahead,$line,$code);
2220 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule($code, $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2221 or _no_rule($code,$line);
2222 }
2223 elsif ($grammar =~ m/$RESYNCMK/gco)
2224 {
2225 0 _parse("a resync to newline marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2226 0 $item = new XML::XSH2::Parser::_Runtime::Directive(
2227 'if ($text =~ s/(\A[^\n]*\n)//) { $return = 0; $1; } else { undef }',
2228 $lookahead,$line,"<resync>");
2229 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<resync>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2230 or _no_rule("<resync>",$line);
2231 }
2232 ▶ elsif ($grammar =~ m/(?=$RESYNCPATMK)/gco
Condition0%0/3
$grammar =~ /(?=$RESYNCPATMK)/cog and do { ($code) = &extract_bracketed($grammar, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$RESYNCPATMK)/cog and do { ($code) = &extract_bracketed($grammar, "<"); $code }
$grammar =~ /(?=$RESYNCPATMK)/cog do { ($code) = &extract_bracketed($grammar, "<"); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$RESYNCPATMK)/cogB= do { ($code) = &extract_bracketed($grammar, "<"); $code }
ABresult
0X0
100
111
2233 0 and do { ($code) = extract_bracketed($grammar,'<');
2234 0 $code })
2235 {
2236 0 _parse("a resync with pattern marker", $aftererror,$line, $code );
2237 0 $code =~ /\A\s*<resync:(.*)>\Z/s;
2238 0 $item = new XML::XSH2::Parser::_Runtime::Directive(
2239 'if ($text =~ s/(\A'.$1.')//) { $return = 0; $1; } else { undef }',
2240 $lookahead,$line,$code);
2241 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule($code, $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2242 or _no_rule($code,$line);
2243 }
2244 ▶ elsif ($grammar =~ m/(?=$SKIPMK)/gco
Condition0%0/3
$grammar =~ /(?=$SKIPMK)/cog and do { ($code) = &extract_codeblock($grammar, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$SKIPMK)/cog and do { ($code) = &extract_codeblock($grammar, "<"); $code }
$grammar =~ /(?=$SKIPMK)/cog do { ($code) = &extract_codeblock($grammar, "<"); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$SKIPMK)/cogB= do { ($code) = &extract_codeblock($grammar, "<"); $code }
ABresult
0X0
100
111
2245 0 and do { ($code) = extract_codeblock($grammar,'<');
2246 0 $code })
2247 {
2248 0 _parse("a skip marker", $aftererror,$line, $code );
2249 0 $code =~ /\A\s*<skip:(.*)>\Z/s;
2250 0 ▶ if ($rule) {
Branch: 1 branch
BranchTrueFalseTotal
if ($rule) { } 0 0 0
2251 0 $item = new XML::XSH2::Parser::_Runtime::Directive(
2252 'my $oldskip = $skip; $skip='.$1.'; $oldskip',
2253 $lookahead,$line,$code);
2254 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule($code, $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2255 or _no_rule($code,$line);
2256 } else {
2257 #global <skip> directive
2258 0 $self->{skip} = $1;
2259 }
2260 }
2261 ▶ elsif ($grammar =~ m/(?=$RULEVARPATMK)/gco
Condition0%0/3
$grammar =~ /(?=$RULEVARPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$RULEVARPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
$grammar =~ /(?=$RULEVARPATMK)/cog do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$RULEVARPATMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2262 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2263 0 $code;
2264 } )
2265 {
2266 0 _parse("a rule variable specifier", $aftererror,$line,$code);
2267 0 $code =~ /\A\s*<rulevar:(.*)>\Z/s;
2268  
2269 0 ▶ $rule and $rule->addvar($1,$self)
Branch: 1 branch
BranchTrueFalseTotal
$rule and $rule->addvar($1, $self) or &_no_rule($code, $line) 0 0 0
Condition0%0/3
$rule and $rule->addvar($1, $self)
!ll&&!rl&&r
000
MC/DC0%0/2
$rule and $rule->addvar($1, $self)
$rule $rule->addvar($1, $self)
Truth table0%0/3
A and B
A= $ruleB= $rule->addvar($1, $self)
ABresult
0X0
100
111
2270 or _no_rule($code,$line);
2271  
2272 0 $item = new XML::XSH2::Parser::_Runtime::UncondReject($lookahead,$line,$code);
2273 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule($code, $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2274 or _no_rule($code,$line);
2275 }
2276 ▶ elsif ($grammar =~ m/(?=$AUTOACTIONPATMK)/gco
Condition0%0/3
$grammar =~ /(?=$AUTOACTIONPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$AUTOACTIONPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
$grammar =~ /(?=$AUTOACTIONPATMK)/cog do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$AUTOACTIONPATMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2277 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2278 0 $code;
2279 } )
2280 {
2281 0 _parse("an autoaction specifier", $aftererror,$line,$code);
2282 0 $code =~ s/\A\s*<autoaction:(.*)>\Z/$1/s;
2283 0 ▶ if ($code =~ /\A\s*[^{]|[^}]\s*\Z/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($code =~ /\A\s*[^{]|[^}]\s*\Z/) 0 0 0
2284 0 $code = "{ $code }"
2285 }
2286 $self->{_check}{itempos} =
2287 0 $code =~ /\@itempos\b|\$itempos\s*\[/;
2288 $self->{_AUTOACTION}
2289 0 = new XML::XSH2::Parser::_Runtime::Action($code,0,-$line)
2290 }
2291 ▶ elsif ($grammar =~ m/(?=$DEFERPATMK)/gco
Condition0%0/3
$grammar =~ /(?=$DEFERPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$DEFERPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
$grammar =~ /(?=$DEFERPATMK)/cog do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$DEFERPATMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2292 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2293 0 $code;
2294 } )
2295 {
2296 0 _parse("a deferred action specifier", $aftererror,$line,$code);
2297 0 $code =~ s/\A\s*<defer:(.*)>\Z/$1/s;
2298 0 ▶ if ($code =~ /\A\s*[^{]|[^}]\s*\Z/)
Branch: 1 branch
BranchTrueFalseTotal
if ($code =~ /\A\s*[^{]|[^}]\s*\Z/) 0 0 0
2299 {
2300 0 $code = "{ $code }"
2301 }
2302  
2303 0 $item = new XML::XSH2::Parser::_Runtime::Directive(
2304 "push \@{\$thisparser->{deferred}}, sub $code;",
2305 $lookahead,$line,"<defer:$code>");
2306 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<defer:$code>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2307 or _no_rule("<defer:$code>",$line);
2308  
2309 0 $self->{deferrable} = 1;
2310 }
2311 ▶ elsif ($grammar =~ m/(?=$TOKENPATMK)/gco
Condition0%0/3
$grammar =~ /(?=$TOKENPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$TOKENPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
$grammar =~ /(?=$TOKENPATMK)/cog do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$TOKENPATMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2312 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2313 0 $code;
2314 } )
2315 {
2316 0 _parse("a token constructor", $aftererror,$line,$code);
2317 0 $code =~ s/\A\s*<token:(.*)>\Z/$1/s;
2318  
2319 0 ▶ my $types = eval 'no strict; local $SIG{__WARN__} = sub {0}; my @arr=('.$code.'); @arr' || ();
Condition0%0/3
eval 'no strict; local $SIG{__WARN__} = sub {0}; my @arr=(' . $code . '); @arr' || ()
l!l&&r!l&&!r
000
MC/DC0%0/2
eval 'no strict; local $SIG{__WARN__} = sub {0}; my @arr=(' . $code . '); @arr' || ()
eval 'no strict; local $SIG{__WARN__} = sub {0}; my @arr=(' . $code . '); @arr' ()
Truth table0%0/3
A || B
A= eval 'no strict; local $SIG{__WARN__} = sub {0}; my @arr=(' . $code . '); @arr'B= ()
ABresult
1X1
011
000
2320 0 ▶ if (!$types)
Branch: 1 branch
BranchTrueFalseTotal
if (not $types) { } 0 0 0
2321 {
2322 0 _error("Incorrect token specification: \"$@\"", $line);
2323 0 _hint("The <token:...> directive requires a list
2324 of one or more strings representing possible
2325 types of the specified token. For example:
2326 <token:NOUN,VERB>");
2327 }
2328 else
2329 {
2330 0 $item = new XML::XSH2::Parser::_Runtime::Directive(
2331 'no strict;
2332 $return = { text => $item[-1] };
2333 @{$return->{type}}{'.$code.'} = (1..'.$types.');',
2334 $lookahead,$line,"<token:$code>");
2335 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<token:$code>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2336 or _no_rule("<token:$code>",$line);
2337 }
2338 }
2339 elsif ($grammar =~ m/$COMMITMK/gco)
2340 {
2341 0 _parse("an commit marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2342 0 $item = new XML::XSH2::Parser::_Runtime::Directive('$commit = 1',
2343 $lookahead,$line,"<commit>");
2344 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<commit>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2345 or _no_rule("<commit>",$line);
2346 }
2347 elsif ($grammar =~ m/$NOCHECKMK/gco) {
2348 0 _parse("an hint request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2349 0 $::RD_CHECK = 0;
2350 }
2351 elsif ($grammar =~ m/$HINTMK/gco) {
2352 0 _parse("an hint request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2353 0 $::RD_HINT = $self->{__HINT__} = 1;
2354 }
2355 elsif ($grammar =~ m/$WARNMK/gco) {
2356 0 _parse("an warning request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2357 0 ▶ $::RD_WARN = $self->{__WARN__} = $1 ? $2+0 : 1;
Branch: 1 branch
BranchTrueFalseTotal
$1 ? : 0 0 0
2358 }
2359 elsif ($grammar =~ m/$TRACEBUILDMK/gco) {
2360 0 _parse("an grammar build trace request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2361 0 ▶ $::RD_TRACE = $1 ? $2+0 : 1;
Branch: 1 branch
BranchTrueFalseTotal
$1 ? : 0 0 0
2362 }
2363 elsif ($grammar =~ m/$TRACEPARSEMK/gco) {
2364 0 _parse("an parse trace request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2365 0 ▶ $self->{__TRACE__} = $1 ? $2+0 : 1;
Branch: 1 branch
BranchTrueFalseTotal
$1 ? : 0 0 0
2366 }
2367 elsif ($grammar =~ m/$AUTOERRORMK/gco)
2368 {
2369 0 $commitonly = $1;
2370 0 _parse("an error marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2371 0 $item = new XML::XSH2::Parser::_Runtime::Error('',$lookahead,$1,$line);
2372 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<error>", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2373 or _no_rule("<error>",$line);
2374 0 $aftererror = !$commitonly;
2375 }
2376 ▶ elsif ($grammar =~ m/(?=$MSGERRORMK)/gco
Condition0%0/3
$grammar =~ /(?=$MSGERRORMK)/cog and do { $commitonly = $1; ($code) = &extract_bracketed($grammar, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$MSGERRORMK)/cog and do { $commitonly = $1; ($code) = &extract_bracketed($grammar, "<"); $code }
$grammar =~ /(?=$MSGERRORMK)/cog do { $commitonly = $1; ($code) = &extract_bracketed($grammar, "<"); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$MSGERRORMK)/cogB= do { $commitonly = $1; ($code) = &extract_bracketed($grammar, "<"); $code }
ABresult
0X0
100
111
2377 0 and do { $commitonly = $1;
2378 0 ($code) = extract_bracketed($grammar,'<');
2379 0 $code })
2380 {
2381 0 _parse("an error marker", $aftererror,$line,$code);
2382 0 $code =~ /\A\s*<error\??:(.*)>\Z/s;
2383 0 $item = new XML::XSH2::Parser::_Runtime::Error($1,$lookahead,$commitonly,$line);
2384 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("$code", $line) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2385 or _no_rule("$code",$line);
2386 0 $aftererror = !$commitonly;
2387 }
2388 0 elsif (do { $commitonly = $1;
2389 0 ($code) = extract_bracketed($grammar,'<');
2390 0 $code })
2391 {
2392 0 ▶ if ($code =~ /^<[A-Z_]+>$/)
Branch: 1 branch
BranchTrueFalseTotal
if ($code =~ /^<[A-Z_]+>$/) { } 0 0 0
2393 {
2394 0 _error("Token items are not yet
2395 supported: \"$code\"",
2396 $line);
2397 0 _hint("Items like $code that consist of angle
2398 brackets enclosing a sequence of
2399 uppercase characters will eventually
2400 be used to specify pre-lexed tokens
2401 in a grammar. That functionality is not
2402 yet implemented. Or did you misspell
2403 \"$code\"?");
2404 }
2405 else
2406 {
2407 0 _error("Untranslatable item encountered: \"$code\"",
2408 $line);
2409 0 _hint("Did you misspell \"$code\"
2410 or forget to comment it out?");
2411 }
2412 }
2413 }
2414 elsif ($grammar =~ m/$RULE/gco)
2415 {
2416 0 ▶ _parseunneg("a rule declaration", 0,
Branch: 1 branch
BranchTrueFalseTotal
&_parseunneg("a rule declaration", 0, $lookahead, $line, substr($grammar, $-[0], $+[0] - $-[0])) or next 0 0 0
2417 $lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next;
2418 0 my $rulename = $1;
2419 0 ▶ if ($rulename =~ /Replace|Extend|Precompile|PrecompiledRuntime|Save/ )
Branch: 1 branch
BranchTrueFalseTotal
if ($rulename =~ /Replace|Extend|Precompile|PrecompiledRuntime|Save/) 0 0 0
2420 {
2421 0 ▶ _warn(2,"Rule \"$rulename\" hidden by method
Branch: 1 branch
BranchTrueFalseTotal
&_warn(2, qq[Rule "$rulename" hidden by method\n XML::XSH2::Parser::_Runtime::$rulename], $line) and &_hint(qq[The rule named "$rulename" cannot be directly\n called through the XML::XSH2::Parser::_Runtime object\n for this grammar (although it may still\n be used as a subrule of other rules).\n It can't be directly called because\n XML::XSH2::Parser::_Runtime::$rulename is already defined (it\n is the standard method of all\n parsers).]) 0 0 0
2422 XML::XSH2::Parser::_Runtime::$rulename",$line)
2423 and
2424 _hint("The rule named \"$rulename\" cannot be directly
2425 called through the XML::XSH2::Parser::_Runtime object
2426 for this grammar (although it may still
2427 be used as a subrule of other rules).
2428 It can't be directly called because
2429 XML::XSH2::Parser::_Runtime::$rulename is already defined (it
2430 is the standard method of all
2431 parsers).");
2432 }
2433 0 $rule = new XML::XSH2::Parser::_Runtime::Rule($rulename,$self,$line,$replace);
2434 0 ▶ $prod->check_pending($line) if $prod;
Branch: 1 branch
BranchTrueFalseTotal
if $prod 0 0 0
2435 0 $prod = $rule->addprod( new XML::XSH2::Parser::_Runtime::Production );
2436 0 $aftererror = 0;
2437 }
2438 elsif ($grammar =~ m/$UNCOMMITPROD/gco)
2439 {
2440 0 pos($grammar)-=9;
2441 0 ▶ _parseunneg("a new (uncommitted) production",
Branch: 1 branch
BranchTrueFalseTotal
&_parseunneg("a new (uncommitted) production", 0, $lookahead, $line, substr($grammar, $-[0], $+[0] - $-[0])) or next 0 0 0
2442 0, $lookahead, $line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next;
2443  
2444 0 ▶ $prod->check_pending($line) if $prod;
Branch: 1 branch
BranchTrueFalseTotal
if $prod 0 0 0
2445 0 $prod = new XML::XSH2::Parser::_Runtime::Production($line,1);
2446 0 ▶ $rule and $rule->addprod($prod)
Branch: 1 branch
BranchTrueFalseTotal
$rule and $rule->addprod($prod) or &_no_rule("<uncommit>", $line) 0 0 0
Condition0%0/3
$rule and $rule->addprod($prod)
!ll&&!rl&&r
000
MC/DC0%0/2
$rule and $rule->addprod($prod)
$rule $rule->addprod($prod)
Truth table0%0/3
A and B
A= $ruleB= $rule->addprod($prod)
ABresult
0X0
100
111
2447 or _no_rule("<uncommit>",$line);
2448 0 $aftererror = 0;
2449 }
2450 elsif ($grammar =~ m/$ERRORPROD/gco)
2451 {
2452 0 pos($grammar)-=6;
2453 0 ▶ _parseunneg("a new (error) production", $aftererror,
Branch: 1 branch
BranchTrueFalseTotal
&_parseunneg("a new (error) production", $aftererror, $lookahead, $line, substr($grammar, $-[0], $+[0] - $-[0])) or next 0 0 0
2454 $lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next;
2455 0 ▶ $prod->check_pending($line) if $prod;
Branch: 1 branch
BranchTrueFalseTotal
if $prod 0 0 0
2456 0 $prod = new XML::XSH2::Parser::_Runtime::Production($line,0,1);
2457 0 ▶ $rule and $rule->addprod($prod)
Branch: 1 branch
BranchTrueFalseTotal
$rule and $rule->addprod($prod) or &_no_rule("<error>", $line) 0 0 0
Condition0%0/3
$rule and $rule->addprod($prod)
!ll&&!rl&&r
000
MC/DC0%0/2
$rule and $rule->addprod($prod)
$rule $rule->addprod($prod)
Truth table0%0/3
A and B
A= $ruleB= $rule->addprod($prod)
ABresult
0X0
100
111
2458 or _no_rule("<error>",$line);
2459 0 $aftererror = 0;
2460 }
2461 elsif ($grammar =~ m/$PROD/gco)
2462 {
2463 0 ▶ _parseunneg("a new production", 0,
Branch: 1 branch
BranchTrueFalseTotal
&_parseunneg("a new production", 0, $lookahead, $line, substr($grammar, $-[0], $+[0] - $-[0])) or next 0 0 0
2464 $lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next;
2465 0 ▶ $rule
Branch: 1 branch
BranchTrueFalseTotal
$rule and !$prod || $prod->check_pending($line) and $prod = $rule->addprod("XML::XSH2::Parser::_Runtime::Production"->new($line)) or &_no_rule("production", $line) 0 0 0
Condition0%0/9
$rule and !$prod || $prod->check_pending($line) and $prod = $rule->addprod("XML::XSH2::Parser::_Runtime::Production"->new($line))
!ll&&!rl&&r
000
$rule and !$prod || $prod->check_pending($line)
!ll&&!rl&&r
000
not $prod or $prod->check_pending($line)
l!l&&r!l&&!r
000
MC/DC0%0/4
$rule and !$prod || $prod->check_pending($line) and $prod = $rule->addprod("XML::XSH2::Parser::_Runtime::Production"->new($line))
$rule not $prod $prod->check_pending($line) $prod = $rule->addprod("XML::XSH2::Parser::_Runtime::Production"->new($line))
Truth table0%0/6
A and not(B) or C and D
A= $ruleB= not $prodC= $prod->check_pending($line)D= $prod = $rule->addprod("XML::XSH2::Parser::_Runtime::Production"->new($line))
ABCDresult
0XXX0
100X0
11X00
10100
11X11
10111
2466 and (!$prod || $prod->check_pending($line))
2467 and $prod = $rule->addprod(new XML::XSH2::Parser::_Runtime::Production($line))
2468 or _no_rule("production",$line);
2469 0 $aftererror = 0;
2470 }
2471 elsif ($grammar =~ m/$LITERAL/gco)
2472 {
2473 0 my $literal = $1;
2474 0 ($code = $literal) =~ s/\\\\/\\/g;
2475 0 _parse("a literal terminal", $aftererror,$line,$literal);
2476 0 $item = new XML::XSH2::Parser::_Runtime::Literal($code,$lookahead,$line);
2477 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("literal terminal", $line, "'${literal}'") 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2478 or _no_rule("literal terminal",$line,"'$literal'");
2479 }
2480 elsif ($grammar =~ m/$INTERPLIT/gco)
2481 {
2482 0 _parse("an interpolated literal terminal", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2483 0 $item = new XML::XSH2::Parser::_Runtime::InterpLit($1,$lookahead,$line);
2484 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("interpolated literal terminal", $line, "'$1'") 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2485 or _no_rule("interpolated literal terminal",$line,"'$1'");
2486 }
2487 elsif ($grammar =~ m/$TOKEN/gco)
2488 {
2489 0 _parse("a /../ pattern terminal", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2490 0 ▶ $item = new XML::XSH2::Parser::_Runtime::Token($1,'/',$3?$3:'',$lookahead,$line);
Branch: 1 branch
BranchTrueFalseTotal
$3 ? : 0 0 0
2491 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("pattern terminal", $line, "/$1/") 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2492 or _no_rule("pattern terminal",$line,"/$1/");
2493 }
2494 ▶ elsif ($grammar =~ m/(?=$MTOKEN)/gco
Condition0%0/3
$grammar =~ /(?=$MTOKEN)/cog and do { ($code, undef, @components) = &extract_quotelike($grammar); $code }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /(?=$MTOKEN)/cog and do { ($code, undef, @components) = &extract_quotelike($grammar); $code }
$grammar =~ /(?=$MTOKEN)/cog do { ($code, undef, @components) = &extract_quotelike($grammar); $code }
Truth table0%0/3
A and B
A= $grammar =~ /(?=$MTOKEN)/cogB= do { ($code, undef, @components) = &extract_quotelike($grammar); $code }
ABresult
0X0
100
111
2495 0 and do { ($code, undef, @components)
2496 = extract_quotelike($grammar);
2497 0 $code }
2498 )
2499  
2500 {
2501 0 _parse("an m/../ pattern terminal", $aftererror,$line,$code);
2502 0 $item = new XML::XSH2::Parser::_Runtime::Token(@components[3,2,8],
2503 $lookahead,$line);
2504 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("pattern terminal", $line, $code) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2505 or _no_rule("pattern terminal",$line,$code);
2506 }
2507 ▶ elsif ($grammar =~ m/(?=$MATCHRULE)/gco
Condition0%0/6
$grammar =~ /(?=$MATCHRULE)/cog and do { ($code) = &extract_bracketed($grammar, "<"); $code } or $grammar =~ /$SUBRULE/cog and $code = $1
l!l&&r!l&&!r
000
$grammar =~ /(?=$MATCHRULE)/cog and do { ($code) = &extract_bracketed($grammar, "<"); $code }
!ll&&!rl&&r
000
MC/DC0%0/3
$grammar =~ /(?=$MATCHRULE)/cog and do { ($code) = &extract_bracketed($grammar, "<"); $code } or $grammar =~ /$SUBRULE/cog and $code = $1
$grammar =~ /(?=$MATCHRULE)/cog do { ($code) = &extract_bracketed($grammar, "<"); $code } $grammar =~ /$SUBRULE/cog and $code = $1
Truth table0%0/5
A and B or C
A= $grammar =~ /(?=$MATCHRULE)/cogB= do { ($code) = &extract_bracketed($grammar, "<"); $code }C= $grammar =~ /$SUBRULE/cog and $code = $1
ABCresult
11X1
0X11
1011
0X00
1000
2508 0 and do { ($code) = extract_bracketed($grammar,'<');
2509 0 ▶ $code
Condition0%0/3
$grammar =~ /$SUBRULE/cog and $code = $1
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /$SUBRULE/cog and $code = $1
$grammar =~ /$SUBRULE/cog $code = $1
Truth table0%0/3
A and B
A= $grammar =~ /$SUBRULE/cogB= $code = $1
ABresult
0X0
100
111
2510 }
2511 or $grammar =~ m/$SUBRULE/gco
2512 and $code = $1)
2513 {
2514 0 my $name = $code;
2515 0 my $matchrule = 0;
2516 0 ▶ if (substr($name,0,1) eq '<')
Branch: 1 branch
BranchTrueFalseTotal
if (substr($name, 0, 1) eq "<") 0 0 0
2517 {
2518 0 $name =~ s/$MATCHRULE\s*//;
2519 0 $name =~ s/\s*>\Z//;
2520 0 $matchrule = 1;
2521 }
2522  
2523 # EXTRACT TRAILING ARG LIST (IF ANY)
2524  
2525 0 ▶ my ($argcode) = extract_codeblock($grammar, "[]",'') || '';
Condition0%0/2
&extract_codeblock($grammar, '[]', '') || ''
l!l
00
MC/DC0%0/1
&extract_codeblock($grammar, '[]', '') || ''
&extract_codeblock($grammar, '[]', '')
Truth table0%0/2
A
A= &extract_codeblock($grammar, '[]', '')
Aresult
11
00
2526  
2527 # EXTRACT TRAILING REPETITION SPECIFIER (IF ANY)
2528  
2529 0 ▶ if ($grammar =~ m/\G[(]/gc)
Branch: 1 branch
BranchTrueFalseTotal
if ($grammar =~ /\G[(]/cg) { } 0 0 0
2530 {
2531 0 pos($grammar)--;
2532  
2533 0 ▶ if ($grammar =~ m/$OPTIONAL/gco)
Branch: 8 branches
BranchTrueFalseTotal
if ($grammar =~ /$OPTIONAL/cog) { } 0 0 0
elsif ($grammar =~ /$ANY/cog) { } 0 0 0
elsif ($grammar =~ /$MANY/cog) { } 0 0 0
elsif ($grammar =~ /$EXACTLY/cog) { } 0 0 0
elsif ($grammar =~ /$BETWEEN/cog) { } 0 0 0
elsif ($grammar =~ /$ATLEAST/cog) { } 0 0 0
elsif ($grammar =~ /$ATMOST/cog) { } 0 0 0
elsif ($grammar =~ /$BADREP/cog) { } 0 0 0
2534 {
2535 0 _parse("an zero-or-one subrule match", $aftererror,$line,"$code$argcode($1)");
2536 0 $item = new XML::XSH2::Parser::_Runtime::Repetition($name,$1,0,1,
2537 $lookahead,$line,
2538 $self,
2539 $matchrule,
2540 $argcode);
2541 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("repetition", $line, "$code$argcode($1)") 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2542 or _no_rule("repetition",$line,"$code$argcode($1)");
2543  
2544 0 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 0 0 0
Condition0%0/3
not $matchrule and $rule
!ll&&!rl&&r
000
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table0%0/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2545 }
2546 elsif ($grammar =~ m/$ANY/gco)
2547 {
2548 0 _parse("a zero-or-more subrule match", $aftererror,$line,"$code$argcode($1)");
2549 0 ▶ if ($2)
Branch: 1 branch
BranchTrueFalseTotal
if ($2) { } 0 0 0
2550 {
2551 0 my $pos = pos $grammar;
2552 0 substr($grammar,$pos,0,
2553 "<leftop='$name(s?)': $name $2 $name>(s?) ");
2554  
2555 0 pos $grammar = $pos;
2556 }
2557 else
2558 {
2559 0 $item = new XML::XSH2::Parser::_Runtime::Repetition($name,$1,0,$MAXREP,
2560 $lookahead,$line,
2561 $self,
2562 $matchrule,
2563 $argcode);
2564 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("repetition", $line, "$code$argcode($1)") 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2565 or _no_rule("repetition",$line,"$code$argcode($1)");
2566  
2567 0 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 0 0 0
Condition0%0/3
not $matchrule and $rule
!ll&&!rl&&r
000
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table0%0/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2568  
2569 0 ▶ _check_insatiable($name,$1,$grammar,$line) if $::RD_CHECK;
Branch: 1 branch
BranchTrueFalseTotal
if $main::RD_CHECK 0 0 0
2570 }
2571 }
2572 elsif ($grammar =~ m/$MANY/gco)
2573 {
2574 0 _parse("a one-or-more subrule match", $aftererror,$line,"$code$argcode($1)");
2575 0 ▶ if ($2)
Branch: 1 branch
BranchTrueFalseTotal
if ($2) { } 0 0 0
2576 {
2577 # $DB::single=1;
2578 0 my $pos = pos $grammar;
2579 0 substr($grammar,$pos,0,
2580 "<leftop='$name(s)': $name $2 $name> ");
2581  
2582 0 pos $grammar = $pos;
2583 }
2584 else
2585 {
2586 0 $item = new XML::XSH2::Parser::_Runtime::Repetition($name,$1,1,$MAXREP,
2587 $lookahead,$line,
2588 $self,
2589 $matchrule,
2590 $argcode);
2591  
2592 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("repetition", $line, "$code$argcode($1)") 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2593 or _no_rule("repetition",$line,"$code$argcode($1)");
2594  
2595 0 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 0 0 0
Condition0%0/3
not $matchrule and $rule
!ll&&!rl&&r
000
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table0%0/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2596  
2597 0 ▶ _check_insatiable($name,$1,$grammar,$line) if $::RD_CHECK;
Branch: 1 branch
BranchTrueFalseTotal
if $main::RD_CHECK 0 0 0
2598 }
2599 }
2600 elsif ($grammar =~ m/$EXACTLY/gco)
2601 {
2602 0 _parse("an exactly-$1-times subrule match", $aftererror,$line,"$code$argcode($1)");
2603 0 ▶ if ($2)
Branch: 1 branch
BranchTrueFalseTotal
if ($2) { } 0 0 0
2604 {
2605 0 my $pos = pos $grammar;
2606 0 substr($grammar,$pos,0,
2607 "<leftop='$name($1)': $name $2 $name>($1) ");
2608  
2609 0 pos $grammar = $pos;
2610 }
2611 else
2612 {
2613 0 $item = new XML::XSH2::Parser::_Runtime::Repetition($name,$1,$1,$1,
2614 $lookahead,$line,
2615 $self,
2616 $matchrule,
2617 $argcode);
2618 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("repetition", $line, "$code$argcode($1)") 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2619 or _no_rule("repetition",$line,"$code$argcode($1)");
2620  
2621 0 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 0 0 0
Condition0%0/3
not $matchrule and $rule
!ll&&!rl&&r
000
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table0%0/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2622 }
2623 }
2624 elsif ($grammar =~ m/$BETWEEN/gco)
2625 {
2626 0 _parse("a $1-to-$2 subrule match", $aftererror,$line,"$code$argcode($1..$2)");
2627 0 ▶ if ($3)
Branch: 1 branch
BranchTrueFalseTotal
if ($3) { } 0 0 0
2628 {
2629 0 my $pos = pos $grammar;
2630 0 substr($grammar,$pos,0,
2631 "<leftop='$name($1..$2)': $name $3 $name>($1..$2) ");
2632  
2633 0 pos $grammar = $pos;
2634 }
2635 else
2636 {
2637 0 $item = new XML::XSH2::Parser::_Runtime::Repetition($name,"$1..$2",$1,$2,
2638 $lookahead,$line,
2639 $self,
2640 $matchrule,
2641 $argcode);
2642 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("repetition", $line, "$code$argcode($1..$2)") 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2643 or _no_rule("repetition",$line,"$code$argcode($1..$2)");
2644  
2645 0 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 0 0 0
Condition0%0/3
not $matchrule and $rule
!ll&&!rl&&r
000
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table0%0/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2646 }
2647 }
2648 elsif ($grammar =~ m/$ATLEAST/gco)
2649 {
2650 0 _parse("a $1-or-more subrule match", $aftererror,$line,"$code$argcode($1..)");
2651 0 ▶ if ($2)
Branch: 1 branch
BranchTrueFalseTotal
if ($2) { } 0 0 0
2652 {
2653 0 my $pos = pos $grammar;
2654 0 substr($grammar,$pos,0,
2655 "<leftop='$name($1..)': $name $2 $name>($1..) ");
2656  
2657 0 pos $grammar = $pos;
2658 }
2659 else
2660 {
2661 0 $item = new XML::XSH2::Parser::_Runtime::Repetition($name,"$1..",$1,$MAXREP,
2662 $lookahead,$line,
2663 $self,
2664 $matchrule,
2665 $argcode);
2666 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("repetition", $line, "$code$argcode($1..)") 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2667 or _no_rule("repetition",$line,"$code$argcode($1..)");
2668  
2669 0 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 0 0 0
Condition0%0/3
not $matchrule and $rule
!ll&&!rl&&r
000
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table0%0/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2670 0 ▶ _check_insatiable($name,"$1..",$grammar,$line) if $::RD_CHECK;
Branch: 1 branch
BranchTrueFalseTotal
if $main::RD_CHECK 0 0 0
2671 }
2672 }
2673 elsif ($grammar =~ m/$ATMOST/gco)
2674 {
2675 0 _parse("a one-to-$1 subrule match", $aftererror,$line,"$code$argcode(..$1)");
2676 0 ▶ if ($2)
Branch: 1 branch
BranchTrueFalseTotal
if ($2) { } 0 0 0
2677 {
2678 0 my $pos = pos $grammar;
2679 0 substr($grammar,$pos,0,
2680 "<leftop='$name(..$1)': $name $2 $name>(..$1) ");
2681  
2682 0 pos $grammar = $pos;
2683 }
2684 else
2685 {
2686 0 $item = new XML::XSH2::Parser::_Runtime::Repetition($name,"..$1",1,$1,
2687 $lookahead,$line,
2688 $self,
2689 $matchrule,
2690 $argcode);
2691 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("repetition", $line, "$code$argcode(..$1)") 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2692 or _no_rule("repetition",$line,"$code$argcode(..$1)");
2693  
2694 0 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 0 0 0
Condition0%0/3
not $matchrule and $rule
!ll&&!rl&&r
000
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table0%0/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2695 }
2696 }
2697 elsif ($grammar =~ m/$BADREP/gco)
2698 {
2699 0 my $current_match = substr($grammar, $-[0], $+[0] - $-[0]);
2700 0 _parse("an subrule match with invalid repetition specifier", 0,$line, $current_match);
2701 0 _error("Incorrect specification of a repeated subrule",
2702 $line);
2703 0 _hint("Repeated subrules like \"$code$argcode$current_match\" cannot have
2704 a maximum repetition of zero, nor can they have
2705 negative components in their ranges.");
2706 }
2707 }
2708 else
2709 {
2710 0 _parse("a subrule match", $aftererror,$line,$code);
2711 0 my $desc;
2712 0 ▶ if ($name=~/\A_alternation_\d+_of_production_\d+_of_rule/)
Branch: 1 branch
BranchTrueFalseTotal
if ($name =~ /\A_alternation_\d+_of_production_\d+_of_rule/) 0 0 0
2713 0 { $desc = $self->{"rules"}{$name}->expected }
2714 0 $item = new XML::XSH2::Parser::_Runtime::Subrule($name,
2715 $lookahead,
2716 $line,
2717 $desc,
2718 $matchrule,
2719 $argcode);
2720  
2721 0 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("(sub)rule", $line, $name) 0 0 0
Condition0%0/3
$prod and $prod->additem($item)
!ll&&!rl&&r
000
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table0%0/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2722 or _no_rule("(sub)rule",$line,$name);
2723  
2724 0 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 0 0 0
Condition0%0/3
not $matchrule and $rule
!ll&&!rl&&r
000
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table0%0/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2725 }
2726 }
2727 elsif ($grammar =~ m/$LONECOLON/gco )
2728 {
2729 0 _error("Unexpected colon encountered", $line);
2730 0 _hint("Did you mean \"|\" (to start a new production)?
2731 Or perhaps you forgot that the colon
2732 in a rule definition must be
2733 on the same line as the rule name?");
2734 }
2735 elsif ($grammar =~ m/$ACTION/gco ) # BAD ACTION, ALREADY FAILED
2736 {
2737 0 _error("Malformed action encountered",
2738 $line);
2739 0 _hint("Did you forget the closing curly bracket
2740 or is there a syntax error in the action?");
2741 }
2742 elsif ($grammar =~ m/$OTHER/gco )
2743 {
2744 0 _error("Untranslatable item encountered: \"$1\"",
2745 $line);
2746 0 _hint("Did you misspell \"$1\"
2747 or forget to comment it out?");
2748 }
2749  
2750 0 ▶ if ($lookaheadspec =~ tr /././ > 3)
Branch: 1 branch
BranchTrueFalseTotal
if ($lookaheadspec =~ tr/.// > 3) 0 0 0
2751 {
2752 0 $lookaheadspec =~ s/\A\s+//;
2753 0 ▶ $lookahead = $lookahead<0
Branch: 1 branch
BranchTrueFalseTotal
$lookahead < 0 ? : 0 0 0
2754 ? 'a negative lookahead ("...!")'
2755 : 'a positive lookahead ("...")' ;
2756 0 ▶ _warn(1,"Found two or more lookahead specifiers in a
Branch: 1 branch
BranchTrueFalseTotal
&_warn(1, "Found two or more lookahead specifiers in a\n row.", $line) and &_hint(qq[Multiple positive and/or negative lookaheads\n are simply multiplied together to produce a\n single positive or negative lookahead\n specification. In this case the sequence\n "$lookaheadspec" was reduced to $lookahead.\n Was this your intention?]) 0 0 0
2757 row.",$line)
2758 and
2759 _hint("Multiple positive and/or negative lookaheads
2760 are simply multiplied together to produce a
2761 single positive or negative lookahead
2762 specification. In this case the sequence
2763 \"$lookaheadspec\" was reduced to $lookahead.
2764 Was this your intention?");
2765 }
2766 0 $lookahead = 0;
2767 0 $lookaheadspec = "";
2768  
2769 0 $grammar =~ m/\G\s+/gc;
2770 }
2771  
2772 0 ▶ if ($must_pop_lines) {
Branch: 1 branch
BranchTrueFalseTotal
if ($must_pop_lines) 0 0 0
2773 0 pop @lines;
2774 }
2775  
2776 0 ▶ unless ($ERRORS or $isimplicit or !$::RD_CHECK)
Branch: 1 branch
BranchTrueFalseTotal
unless ($ERRORS or $isimplicit or not $main::RD_CHECK) 0 0 0
Condition0%0/6
$ERRORS or $isimplicit or not $main::RD_CHECK
l!l&&r!l&&!r
000
$ERRORS or $isimplicit
l!l&&r!l&&!r
000
MC/DC0%0/3
$ERRORS or $isimplicit or not $main::RD_CHECK
$ERRORS $isimplicit not $main::RD_CHECK
Truth table0%0/4
A or B or not(C)
A= $ERRORSB= $isimplicitC= not $main::RD_CHECK
ABCresult
1XX1
01X1
0011
0000
2777 {
2778 0 $self->_check_grammar();
2779 }
2780  
2781 0 ▶ unless ($ERRORS or $isimplicit or $XML::XSH2::Parser::_Runtime::compiling)
Branch: 1 branch
BranchTrueFalseTotal
unless ($ERRORS or $isimplicit or $XML::XSH2::Parser::_Runtime::compiling) 0 0 0
Condition0%0/6
$ERRORS or $isimplicit or $XML::XSH2::Parser::_Runtime::compiling
l!l&&r!l&&!r
000
$ERRORS or $isimplicit
l!l&&r!l&&!r
000
MC/DC0%0/3
$ERRORS or $isimplicit or $XML::XSH2::Parser::_Runtime::compiling
$ERRORS $isimplicit $XML::XSH2::Parser::_Runtime::compiling
Truth table0%0/4
A or B or C
A= $ERRORSB= $isimplicitC= $XML::XSH2::Parser::_Runtime::compiling
ABCresult
1XX1
01X1
0011
0000
2782 {
2783 0 my $code = $self->_code();
2784 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
2785 {
2786 0 ▶ my $mode = ($nextnamespace eq "namespace000002") ? '>' : '>>';
Branch: 1 branch
BranchTrueFalseTotal
$nextnamespace eq 'namespace000002' ? : 0 0 0
2787 0 print STDERR "printing code (", length($code),") to RD_TRACE\n";
2788 0 local *TRACE_FILE;
2789 0 ▶ open TRACE_FILE, $mode, "RD_TRACE"
Branch: 1 branch
BranchTrueFalseTotal
open TRACE_FILE, $mode, "RD_TRACE" and print TRACE_FILE "my \$ERRORS;\n$code" and close TRACE_FILE 0 0 0
Condition0%0/3
open TRACE_FILE, $mode, "RD_TRACE" and print TRACE_FILE "my \$ERRORS;\n$code"
!ll&&!rl&&r
000
MC/DC0%0/2
open TRACE_FILE, $mode, "RD_TRACE" and print TRACE_FILE "my \$ERRORS;\n$code"
open TRACE_FILE, $mode, "RD_TRACE" print TRACE_FILE "my \$ERRORS;\n$code"
Truth table0%0/3
A and B
A= open TRACE_FILE, $mode, "RD_TRACE"B= print TRACE_FILE "my \$ERRORS;\n$code"
ABresult
0X0
100
111
2790 and print TRACE_FILE "my \$ERRORS;\n$code"
2791 and close TRACE_FILE;
2792 }
2793  
2794 0 ▶ unless ( eval "$code 1" )
Branch: 1 branch
BranchTrueFalseTotal
unless (eval "$code 1") 0 0 0
2795 {
2796 0 _error("Internal error in generated parser code!");
2797 0 $@ =~ s/at grammar/in grammar at/;
2798 0 _hint($@);
2799 }
2800 }
2801  
2802 0 ▶ if ($ERRORS and !_verbosity("HINT"))
Branch: 1 branch
BranchTrueFalseTotal
if ($ERRORS and not &_verbosity("HINT")) 0 0 0
Condition0%0/3
$ERRORS and not &_verbosity("HINT")
!ll&&!rl&&r
000
MC/DC0%0/2
$ERRORS and not &_verbosity("HINT")
$ERRORS not &_verbosity("HINT")
Truth table0%0/3
A and not(B)
A= $ERRORSB= not &_verbosity("HINT")
ABresult
0X0
100
111
2803 {
2804 0 ▶ local $::RD_HINT = defined $::RD_HINT ? $::RD_HINT : 1;
Branch: 1 branch
BranchTrueFalseTotal
defined $main::RD_HINT ? : 0 0 0
2805 0 _hint('Set $::RD_HINT (or -RD_HINT if you\'re using "perl -s")
2806 for hints on fixing these problems. Use $::RD_HINT = 0
2807 to disable this message.');
2808 }
2809 0 ▶ if ($ERRORS) { $ERRORS=0; return }
Branch: 1 branch
BranchTrueFalseTotal
if ($ERRORS) 0 0 0
2810 0 return $self;
2811 }
2812  
2813  
2814 sub _addstartcode($$)
2815 0 ▶{
Subroutine _addstartcode: not called CC=1 SCAR=6.9
2816 0 my ($self, $code) = @_;
2817 0 $code =~ s/\A\s*\{(.*)\}\Z/$1/s;
2818  
2819 0 $self->{"startcode"} .= "$code;\n";
2820 }
2821  
2822 # CHECK FOR GRAMMAR PROBLEMS....
2823  
2824 sub _check_insatiable($$$$)
2825 0 ▶{
Subroutine _check_insatiable: not called CC=14 SCAR=53.5
2826 0 my ($subrule,$repspec,$grammar,$line) = @_;
2827 0 pos($grammar)=pos($_[2]);
2828 0 ▶ return if $grammar =~ m/$OPTIONAL/gco || $grammar =~ m/$ANY/gco;
Branch: 1 branch
BranchTrueFalseTotal
if $grammar =~ /$OPTIONAL/cog or $grammar =~ /$ANY/cog 0 0 0
Condition0%0/3
$grammar =~ /$OPTIONAL/cog or $grammar =~ /$ANY/cog
l!l&&r!l&&!r
000
MC/DC0%0/2
$grammar =~ /$OPTIONAL/cog or $grammar =~ /$ANY/cog
$grammar =~ /$OPTIONAL/cog $grammar =~ /$ANY/cog
Truth table0%0/3
A or B
A= $grammar =~ /$OPTIONAL/cogB= $grammar =~ /$ANY/cog
ABresult
1X1
011
000
2829 0 my $min = 1;
2830 0 ▶ if ( $grammar =~ m/$MANY/gco
Branch: 1 branch
BranchTrueFalseTotal
if ($grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog or $grammar =~ /$BETWEEN/cog and do { $min = $2; 1 } or $grammar =~ /$ATLEAST/cog and do { $min = $2; 1 } or $grammar =~ /$SUBRULE(?!\s*:)/cog) 0 0 0
Condition0%0/18
$grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog or $grammar =~ /$BETWEEN/cog and do { $min = $2; 1 } or $grammar =~ /$ATLEAST/cog and do { $min = $2; 1 } or $grammar =~ /$SUBRULE(?!\s*:)/cog
l!l&&r!l&&!r
000
$grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog or $grammar =~ /$BETWEEN/cog and do { $min = $2; 1 } or $grammar =~ /$ATLEAST/cog and do { $min = $2; 1 }
l!l&&r!l&&!r
000
$grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog or $grammar =~ /$BETWEEN/cog and do { $min = $2; 1 }
l!l&&r!l&&!r
000
$grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog
l!l&&r!l&&!r
000
$grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog
l!l&&r!l&&!r
000
$grammar =~ /$BETWEEN/cog and do { $min = $2; 1 }
!ll&&!rl&&r
000
MC/DC0%0/7
$grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog or $grammar =~ /$BETWEEN/cog and do { $min = $2; 1 } or $grammar =~ /$ATLEAST/cog and do { $min = $2; 1 } or $grammar =~ /$SUBRULE(?!\s*:)/cog
$grammar =~ /$MANY/cog $grammar =~ /$EXACTLY/cog $grammar =~ /$ATMOST/cog $grammar =~ /$BETWEEN/cog do { $min = $2; 1 } $grammar =~ /$ATLEAST/cog and do { $min = $2; 1 } $grammar =~ /$SUBRULE(?!\s*:)/cog
Truth table0%0/10
A or B or C or D and E or F or G
A= $grammar =~ /$MANY/cogB= $grammar =~ /$EXACTLY/cogC= $grammar =~ /$ATMOST/cogD= $grammar =~ /$BETWEEN/cogE= do { $min = $2; 1 }F= $grammar =~ /$ATLEAST/cog and do { $min = $2; 1 }G= $grammar =~ /$SUBRULE(?!\s*:)/cog
ABCDEFGresult
1XXXXXX1
01XXXXX1
001XXXX1
00011XX1
0000X1X1
000101X1
0000X011
00010011
0000X000
00010000
2831 || $grammar =~ m/$EXACTLY/gco
2832 || $grammar =~ m/$ATMOST/gco
2833 0 ▶ || $grammar =~ m/$BETWEEN/gco && do { $min=$2; 1 }
Condition0%0/3
$grammar =~ /$ATLEAST/cog and do { $min = $2; 1 }
!ll&&!rl&&r
000
MC/DC0%0/2
$grammar =~ /$ATLEAST/cog and do { $min = $2; 1 }
$grammar =~ /$ATLEAST/cog do { $min = $2; 1 }
Truth table0%0/3
A and B
A= $grammar =~ /$ATLEAST/cogB= do { $min = $2; 1 }
ABresult
0X0
100
111
2834 0 || $grammar =~ m/$ATLEAST/gco && do { $min=$2; 1 }
2835 || $grammar =~ m/$SUBRULE(?!\s*:)/gco
2836 )
2837 {
2838 0 ▶ return unless $1 eq $subrule && $min > 0;
Branch: 1 branch
BranchTrueFalseTotal
unless $1 eq $subrule and $min > 0 0 0 0
Condition0%0/3
$1 eq $subrule and $min > 0
!ll&&!rl&&r
000
MC/DC0%0/2
$1 eq $subrule and $min > 0
$1 eq $subrule $min > 0
Truth table0%0/3
A and B
A= $1 eq $subruleB= $min > 0
ABresult
0X0
100
111
2839 0 my $current_match = substr($grammar, $-[0], $+[0] - $-[0]);
2840 0 ▶ _warn(3,"Subrule sequence \"$subrule($repspec) $current_match\" will
Branch: 1 branch
BranchTrueFalseTotal
&_warn(3, qq[Subrule sequence "$subrule($repspec) $current_match" will\n (almost certainly) fail.], $line) and &_hint(qq[Unless subrule "$subrule" performs some cunning\n lookahead, the repetition "$subrule($repspec)" will\n insatiably consume as many matches of "$subrule" as it\n can, leaving none to match the "$current_match" that follows.]) 0 0 0
2841 (almost certainly) fail.",$line)
2842 and
2843 _hint("Unless subrule \"$subrule\" performs some cunning
2844 lookahead, the repetition \"$subrule($repspec)\" will
2845 insatiably consume as many matches of \"$subrule\" as it
2846 can, leaving none to match the \"$current_match\" that follows.");
2847 }
2848 }
2849  
2850 sub _check_grammar ($)
2851 0 ▶{
Subroutine _check_grammar: not called CC=15 SCAR=54.8
2852 0 my $self = shift;
2853 0 my $rules = $self->{"rules"};
2854 0 my $rule;
2855 0 foreach $rule ( values %$rules )
2856 {
2857 0 ▶ next if ! $rule->{"changed"};
Branch: 1 branch
BranchTrueFalseTotal
unless $rule->{"changed"} 0 0 0
2858  
2859 # CHECK FOR UNDEFINED RULES
2860  
2861 0 my $call;
2862 0 foreach $call ( @{$rule->{"calls"}} )
2863 {
2864 0 ▶ if (!defined ${$rules}{$call}
Branch: 1 branch
BranchTrueFalseTotal
unless (defined do { $rules }->{$call} or defined &{"XML::XSH2::Parser::_Runtime::$call";}) 0 0 0
Condition0%0/3
defined do { $rules }->{$call} or defined &{"XML::XSH2::Parser::_Runtime::$call";}
l!l&&r!l&&!r
000
MC/DC0%0/2
defined do { $rules }->{$call} or defined &{"XML::XSH2::Parser::_Runtime::$call";}
defined do { $rules }->{$call} defined &{"XML::XSH2::Parser::_Runtime::$call";}
Truth table0%0/3
A or B
A= defined do { $rules }->{$call}B= defined &{"XML::XSH2::Parser::_Runtime::$call";}
ABresult
1X1
011
000
2865 0 &&!defined &{"XML::XSH2::Parser::_Runtime::$call"})
2866 {
2867 0 ▶ if (!defined $::RD_AUTOSTUB)
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $main::RD_AUTOSTUB) { } 0 0 0
2868 {
2869 0 ▶ _warn(3,"Undefined (sub)rule \"$call\"
Branch: 1 branch
BranchTrueFalseTotal
&_warn(3, qq[Undefined (sub)rule "$call"\n used in a production.]) and &_hint(qq[Will you be providing this rule\n later, or did you perhaps\n misspell "$call"? Otherwise\n it will be treated as an\n immediate <reject>.]) 0 0 0
2870 used in a production.")
2871 and
2872 _hint("Will you be providing this rule
2873 later, or did you perhaps
2874 misspell \"$call\"? Otherwise
2875 it will be treated as an
2876 immediate <reject>.");
2877 0 eval "sub $self->{namespace}::$call {undef}";
2878 }
2879 else # EXPERIMENTAL
2880 {
2881 0 my $rule = qq{'$call'};
2882 0 ▶ if ($::RD_AUTOSTUB and $::RD_AUTOSTUB ne "1") {
Branch: 1 branch
BranchTrueFalseTotal
if ($main::RD_AUTOSTUB and $main::RD_AUTOSTUB ne 1) 0 0 0
Condition0%0/3
$main::RD_AUTOSTUB and $main::RD_AUTOSTUB ne 1
!ll&&!rl&&r
000
MC/DC0%0/2
$main::RD_AUTOSTUB and $main::RD_AUTOSTUB ne 1
$main::RD_AUTOSTUB $main::RD_AUTOSTUB ne 1
Truth table0%0/3
A and B
A= $main::RD_AUTOSTUBB= $main::RD_AUTOSTUB ne 1
ABresult
0X0
100
111
2883 0 $rule = $::RD_AUTOSTUB;
2884 }
2885 0 ▶ _warn(1,"Autogenerating rule: $call")
Branch: 1 branch
BranchTrueFalseTotal
&_warn(1, "Autogenerating rule: $call") and &_hint(qq[A call was made to a subrule\n named "$call", but no such\n rule was specified. However,\n since \$::RD_AUTOSTUB\n was defined, a rule stub\n ($call : $rule) was\n automatically created.]) 0 0 0
2886 and
2887 _hint("A call was made to a subrule
2888 named \"$call\", but no such
2889 rule was specified. However,
2890 since \$::RD_AUTOSTUB
2891 was defined, a rule stub
2892 ($call : $rule) was
2893 automatically created.");
2894  
2895 0 $self->_generate("$call: $rule",0,1);
2896 }
2897 }
2898 }
2899  
2900 # CHECK FOR LEFT RECURSION
2901  
2902 0 ▶ if ($rule->isleftrec($rules))
Branch: 1 branch
BranchTrueFalseTotal
if ($rule->isleftrec($rules)) 0 0 0
2903 {
2904 0 _error("Rule \"$rule->{name}\" is left-recursive.");
2905 0 _hint("Redesign the grammar so it's not left-recursive.
2906 That will probably mean you need to re-implement
2907 repetitions using the '(s)' notation.
2908 For example: \"$rule->{name}(s)\".");
2909 0 next;
2910 }
2911  
2912 # CHECK FOR PRODUCTIONS FOLLOWING EMPTY PRODUCTIONS
2913 {
2914 0 my $hasempty;
2915 my $prod;
2916 0 foreach $prod ( @{$rule->{"prods"}} ) {
2917 0 ▶ if ($hasempty) {
Branch: 1 branch
BranchTrueFalseTotal
if ($hasempty) 0 0 0
2918 0 _error("Production " . $prod->describe . " for \"$rule->{name}\"
2919 will never be reached (preceding empty production will
2920 always match first).");
2921 0 _hint("Reorder the grammar so that the empty production
2922 is last in the list or productions.");
2923 0 last;
2924 }
2925 0 ▶ $hasempty ||= $prod->isempty();
Condition0%0/3
$hasempty ||= $prod->isempty
l!l&&r!l&&!r
000
MC/DC0%0/2
$hasempty ||= $prod->isempty
$hasempty $prod->isempty
Truth table0%0/3
A ||= B
A= $hasemptyB= $prod->isempty
ABresult
1X1
011
000
2926 }
2927 }
2928 }
2929 }
2930  
2931 # GENERATE ACTUAL PARSER CODE
2932  
2933 sub _code($)
2934 0 ▶{
Subroutine _code: not called CC=4 SCAR=30.0
2935 0 my $self = shift;
2936 my $initial_skip = defined($self->{skip}) ?
2937 0 ▶ '$skip = ' . $self->{skip} . ';' :
Branch: 1 branch
BranchTrueFalseTotal
defined $self->{'skip'} ? : 0 0 0
2938 $self->_dump([$skip],[qw(skip)]);
2939  
2940 0 my $code = qq!
2941 package # this should not be indexed by CPAN
2942 $self->{namespace};
2943 use strict;
2944 use vars qw(\$skip \$AUTOLOAD $self->{localvars} );
2945 \@$self->{namespace}\::ISA = ();
2946 $initial_skip
2947 $self->{startcode}
2948  
2949 {
2950 local \$SIG{__WARN__} = sub {0};
2951 # PRETEND TO BE IN XML::XSH2::Parser::_Runtime NAMESPACE
2952 *$self->{namespace}::AUTOLOAD = sub
2953 {
2954 no strict 'refs';
2955 !
2956 # This generated code uses ${"AUTOLOAD"} rather than $AUTOLOAD in
2957 # order to avoid the circular reference documented here:
2958 # https://rt.perl.org/rt3/Public/Bug/Display.html?id=110248
2959 # As a result of the investigation of
2960 # https://rt.cpan.org/Ticket/Display.html?id=53710
2961 . qq!
2962 \${"AUTOLOAD"} =~ s/^$self->{namespace}/XML::XSH2::Parser::_Runtime/;
2963 goto &{\${"AUTOLOAD"}};
2964 }
2965 }
2966  
2967 !;
2968 0 $code .= "push \@$self->{namespace}\::ISA, 'XML::XSH2::Parser::_Runtime';";
2969 0 $self->{"startcode"} = '';
2970  
2971 0 my $rule;
2972 # sort the rules to ensure the output is reproducible
2973 0 foreach $rule ( sort { $a->{name} cmp $b->{name} }
2974 0 values %{$self->{"rules"}} )
2975 {
2976 0 ▶ if ($rule->{"changed"})
Branch: 1 branch
BranchTrueFalseTotal
if ($rule->{"changed"}) 0 0 0
2977 {
2978 0 $code .= $rule->code($self->{"namespace"},$self);
2979 0 $rule->{"changed"} = 0;
2980 }
2981 }
2982  
2983 0 return $code;
2984 }
2985  
2986 # A wrapper for Data::Dumper->Dump, which localizes some variables to
2987 # keep the output in a form suitable for XML::XSH2::Parser::_Runtime.
2988 #
2989 # List of variables and their defaults taken from
2990 # $Data::Dumper::VERSION == 2.158
2991  
2992 0 ▶sub _dump {
Subroutine _dump: not called CC=1 SCAR=6.9
2993 0 require Data::Dumper;
2994  
2995 #
2996 # Allow the user's settings to persist for some features in case
2997 # RD_TRACE is set. These shouldn't affect the eval()-ability of
2998 # the resulting parser.
2999 #
3000  
3001 #local $Data::Dumper::Indent = 2;
3002 #local $Data::Dumper::Useqq = 0;
3003 #local $Data::Dumper::Quotekeys = 1;
3004 #local $Data::Dumper::Useperl = 0;
3005  
3006 #
3007 # These may affect whether the output is valid perl code for
3008 # eval(), and must be controlled. Set them to their default
3009 # values.
3010 #
3011  
3012 0 local $Data::Dumper::Purity = 0;
3013 0 local $Data::Dumper::Pad = "";
3014 0 local $Data::Dumper::Varname = "VAR";
3015 0 local $Data::Dumper::Terse = 0;
3016 0 local $Data::Dumper::Freezer = "";
3017 0 local $Data::Dumper::Toaster = "";
3018 0 local $Data::Dumper::Deepcopy = 0;
3019 0 local $Data::Dumper::Bless = "bless";
3020 0 local $Data::Dumper::Maxdepth = 0;
3021 0 local $Data::Dumper::Pair = ' => ';
3022 0 local $Data::Dumper::Deparse = 0;
3023 0 local $Data::Dumper::Sparseseen = 0;
3024  
3025 #
3026 # Modify the below options from their defaults.
3027 #
3028  
3029 # Sort the keys to ensure the output is reproducible
3030 0 local $Data::Dumper::Sortkeys = 1;
3031  
3032 # Don't stop recursing
3033 0 local $Data::Dumper::Maxrecurse = 0;
3034  
3035 0 return Data::Dumper->Dump(@_[1..$#_]);
3036 }
3037  
3038 # EXECUTING A PARSE....
3039  
3040 sub AUTOLOAD # ($parser, $text; $linenum, @args)
3041 574 ▶{
Subroutine AUTOLOAD: called CC=14 SCAR=31.1
3042 574 ▶ croak "Could not find method: $AUTOLOAD\n" unless ref $_[0];
Branch: 1 branch
BranchTrueFalseTotal
unless ref $_[0] 0 574 574
3043 574 ▶ my $class = ref($_[0]) || $_[0];
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
57400
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0] $_[0]
Truth table33%1/3
A || B
A= ref $_[0]B= $_[0]
ABresult
1X1
011
000
3044 0 ▶ my $text = ref($_[1]) eq 'SCALAR' ? ${$_[1]} : "$_[1]";
Branch: 1 branch
BranchTrueFalseTotal
ref $_[1] eq 'SCALAR' ? : 0 574 574
3045 574 $_[0]->{lastlinenum} = _linecount($text);
3046 574 ▶ $_[0]->{lastlinenum} += ($_[2]||0) if @_ > 2;
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 2 0 574 574
Condition0%0/2
$_[2] || 0
l!l
00
MC/DC0%0/1
$_[2] || 0
$_[2]
Truth table0%0/2
A
A= $_[2]
Aresult
11
00
3047 574 $_[0]->{offsetlinenum} = $_[0]->{lastlinenum};
3048 574 $_[0]->{fulltext} = $text;
3049 574 $_[0]->{fulltextlen} = length $text;
3050 574 $_[0]->{linecounter_cache} = {};
3051 574 $_[0]->{deferred} = [];
3052 574 $_[0]->{errors} = [];
3053 574 my @args = @_[3..$#_];
3054 574 ▶ my $args = sub { [ @args ] };
Subroutine __ANON__: called CC=1 SCAR=0.0
3055  
3056 574 $AUTOLOAD =~ s/$class/$_[0]->{namespace}/;
3057 8 ▶ no strict "refs";
Subroutine BEGIN: called CC=1 SCAR=0.0
3058  
3059 574 ▶ local $::RD_WARN = $::RD_WARN || $_[0]->{__WARN__};
Condition33%1/3
$main::RD_WARN || $_[0]{'__WARN__'}
l!l&&r!l&&!r
57400
MC/DC0%0/2
$main::RD_WARN || $_[0]{'__WARN__'}
$main::RD_WARN $_[0]{'__WARN__'}
Truth table33%1/3
A || B
A= $main::RD_WARNB= $_[0]{'__WARN__'}
ABresult
1X1
011
000
3060 574 ▶ local $::RD_HINT = $::RD_HINT || $_[0]->{__HINT__};
Condition66%2/3
$main::RD_HINT || $_[0]{'__HINT__'}
l!l&&r!l&&!r
57004
MC/DC50%1/2
$main::RD_HINT || $_[0]{'__HINT__'}
$main::RD_HINT $_[0]{'__HINT__'}
Truth table66%2/3
A || B
A= $main::RD_HINTB= $_[0]{'__HINT__'}
ABresult
1X1
011
000
3061 574 ▶ local $::RD_TRACE = $::RD_TRACE || $_[0]->{__TRACE__};
Condition33%1/3
$main::RD_TRACE || $_[0]{'__TRACE__'}
l!l&&r!l&&!r
00574
MC/DC0%0/2
$main::RD_TRACE || $_[0]{'__TRACE__'}
$main::RD_TRACE $_[0]{'__TRACE__'}
Truth table33%1/3
A || B
A= $main::RD_TRACEB= $_[0]{'__TRACE__'}
ABresult
1X1
011
000
3062  
3063 574 ▶ croak "Unknown starting rule ($AUTOLOAD) called\n"
Branch: 1 branch
BranchTrueFalseTotal
unless defined &$XML::XSH2::Parser::_Runtime::AUTOLOAD 0 574 574
3064 unless defined &$AUTOLOAD;
3065 574 my $retval = &{$AUTOLOAD}(
3066 $_[0], # $parser
3067 $text, # $text
3068 undef, # $repeating
3069 undef, # $_noactions
3070 $args, # \@args
3071 undef, # $_itempos
3072 );
3073  
3074  
3075 574 ▶ if (defined $retval)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $retval) { } 574 0 574
3076 {
3077 0 foreach ( @{$_[0]->{deferred}} ) { &$_; }
3078 }
3079 else
3080 {
3081 0 foreach ( @{$_[0]->{errors}} ) { _error(@$_); }
3082 }
3083  
3084 0 ▶ if (ref $_[1] eq 'SCALAR') { ${$_[1]} = $text }
Branch: 1 branch
BranchTrueFalseTotal
if (ref $_[1] eq "SCALAR") 0 574 574
3085  
3086 574 $ERRORS = 0;
3087 574 return $retval;
3088 }
3089  
3090 sub _parserepeat($$$$$$$$$) # RETURNS A REF TO AN ARRAY OF MATCHES
3091 6638 ▶{
Subroutine _parserepeat: called CC=10 SCAR=24.7
3092 6638 my ($parser, $text, $prod, $min, $max, $_noactions, $expectation, $argcode, $_itempos) = @_;
3093 6638 my @tokens = ();
3094  
3095 6638 my $itemposfirst;
3096 my $reps;
3097 6638 ▶ for ($reps=0; $reps<$max;)
Branch: 1 branch
BranchTrueFalseTotal
if ($reps < $max) 8692 1208 9900
3098 {
3099 8692 $expectation->at($text);
3100 8692 my $_savetext = $text;
3101 8692 my $prevtextlen = length $text;
3102 8692 my $_tok;
3103 8692 ▶ if (! defined ($_tok = &$prod($parser,$text,1,$_noactions,$argcode,$_itempos)))
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = &$prod($parser, $text, 1, $_noactions, $argcode, $_itempos))) 5145 3547 8692
3104 {
3105 5145 $text = $_savetext;
3106 5145 last;
3107 }
3108  
3109 3547 ▶ if (defined($_itempos) and !defined($itemposfirst))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_itempos and not defined $itemposfirst) 0 3547 3547
Condition33%1/3
defined $_itempos and not defined $itemposfirst
!ll&&!rl&&r
354700
MC/DC0%0/2
defined $_itempos and not defined $itemposfirst
defined $_itempos not defined $itemposfirst
Truth table33%1/3
A and not(B)
A= defined $_itemposB= not defined $itemposfirst
ABresult
0X0
100
111
3110 {
3111 0 $itemposfirst = XML::XSH2::Parser::_Runtime::Production::_duplicate_itempos($_itempos);
3112 }
3113  
3114 3547 ▶ push @tokens, $_tok if defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
if defined $_tok 3547 0 3547
3115 3547 ▶ last if ++$reps >= $min and $prevtextlen == length $text;
Branch: 1 branch
BranchTrueFalseTotal
if ++$reps >= $min and $prevtextlen == length $text 285 3262 3547
Condition66%2/3
++$reps >= $min and $prevtextlen == length $text
!ll&&!rl&&r
03262285
MC/DC50%1/2
++$reps >= $min and $prevtextlen == length $text
++$reps >= $min $prevtextlen == length $text
Truth table66%2/3
A and B
A= ++$reps >= $minB= $prevtextlen == length $text
ABresult
0X0
100
111
3116 }
3117  
3118 0 ▶ do { $expectation->failed(); return undef} if $reps<$min;
Branch: 1 branch
BranchTrueFalseTotal
if ($reps < $min) 0 6638 6638
3119  
3120 6638 ▶ if (defined $itemposfirst)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $itemposfirst) 0 6638 6638
3121 {
3122 0 XML::XSH2::Parser::_Runtime::Production::_update_itempos($_itempos, $itemposfirst, undef, [qw(from)]);
3123 }
3124  
3125 6638 $_[1] = $text;
3126 6638 return [@tokens];
3127 }
3128  
3129 0 ▶sub set_autoflush {
Subroutine set_autoflush: not called CC=1 SCAR=6.9
3130 0 my $orig_selected = select $_[0];
3131 0 $| = 1;
3132 0 select $orig_selected;
3133 0 return;
3134 }
3135  
3136 # ERROR REPORTING....
3137  
3138 0 ▶sub _write_ERROR {
Subroutine _write_ERROR: not called CC=2 SCAR=17.9
3139 0 my ($errorprefix, $errortext) = @_;
3140 0 ▶ return if $errortext !~ /\S/;
Branch: 1 branch
BranchTrueFalseTotal
unless $errortext =~ /\S/ 0 0 0
3141 0 $errorprefix =~ s/\s+\Z//;
3142 0 local $^A = q{};
3143  
3144 0 formline(<<'END_FORMAT', $errorprefix, $errortext);
3145 @>>>>>>>>>>>>>>>>>>>>: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
3146 END_FORMAT
3147 0 formline(<<'END_FORMAT', $errortext);
3148 ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
3149 END_FORMAT
3150 0 print {*STDERR} $^A;
3151 }
3152  
3153 # TRACING
3154  
3155 8 my $TRACE_FORMAT = <<'END_FORMAT';
3156 @>|@|||||||||@^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<|
3157 | ~~ |^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<|
3158 END_FORMAT
3159  
3160 8 my $TRACECONTEXT_FORMAT = <<'END_FORMAT';
3161 @>|@|||||||||@ |^<<<<<<<<<<<<<<<<<<<<<<<<<<<
3162 | ~~ | |^<<<<<<<<<<<<<<<<<<<<<<<<<<<
3163 END_FORMAT
3164  
3165 0 ▶sub _write_TRACE {
Subroutine _write_TRACE: not called CC=2 SCAR=17.9
3166 0 my ($tracelevel, $tracerulename, $tracemsg) = @_;
3167 0 ▶ return if $tracemsg !~ /\S/;
Branch: 1 branch
BranchTrueFalseTotal
unless $tracemsg =~ /\S/ 0 0 0
3168 0 $tracemsg =~ s/\s*\Z//;
3169 0 local $^A = q{};
3170 0 my $bar = '|';
3171 0 formline($TRACE_FORMAT, $tracelevel, $tracerulename, $bar, $tracemsg, $tracemsg);
3172 0 print {*STDERR} $^A;
3173 }
3174  
3175 0 ▶sub _write_TRACECONTEXT {
Subroutine _write_TRACECONTEXT: not called CC=2 SCAR=17.9
3176 0 my ($tracelevel, $tracerulename, $tracecontext) = @_;
3177 0 ▶ return if $tracecontext !~ /\S/;
Branch: 1 branch
BranchTrueFalseTotal
unless $tracecontext =~ /\S/ 0 0 0
3178 0 $tracecontext =~ s/\s*\Z//;
3179 0 local $^A = q{};
3180 0 my $bar = '|';
3181 0 formline($TRACECONTEXT_FORMAT, $tracelevel, $tracerulename, $bar, $tracecontext, $tracecontext);
3182 0 print {*STDERR} $^A;
3183 }
3184  
3185 sub _verbosity($)
3186 0 ▶{
Subroutine _verbosity: not called CC=10 SCAR=47.0
3187 0 ▶ defined $::RD_TRACE
Branch: 1 branch
BranchTrueFalseTotal
defined $main::RD_TRACE or defined $main::RD_HINT and $main::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/ or defined $main::RD_WARN and $main::RD_WARN and $_[0] =~ /ERRORS|WARN/ or defined $main::RD_ERRORS and $main::RD_ERRORS and $_[0] =~ /ERRORS/ 0 0 0
Condition0%0/27
defined $main::RD_TRACE || defined $main::RD_HINT && $main::RD_HINT && $_[0] =~ /ERRORS|WARN|HINT/ || defined $main::RD_WARN && $main::RD_WARN && $_[0] =~ /ERRORS|WARN/ || defined $main::RD_ERRORS && $main::RD_ERRORS && $_[0] =~ /ERRORS/
l!l&&r!l&&!r
000
defined $main::RD_TRACE or defined $main::RD_HINT and $main::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/ or defined $main::RD_WARN and $main::RD_WARN and $_[0] =~ /ERRORS|WARN/
l!l&&r!l&&!r
000
defined $main::RD_TRACE or defined $main::RD_HINT and $main::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/
l!l&&r!l&&!r
000
defined $main::RD_HINT and $main::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/
!ll&&!rl&&r
000
defined $main::RD_HINT and $main::RD_HINT
!ll&&!rl&&r
000
defined $main::RD_WARN and $main::RD_WARN and $_[0] =~ /ERRORS|WARN/
!ll&&!rl&&r
000
defined $main::RD_WARN and $main::RD_WARN
!ll&&!rl&&r
000
defined $main::RD_ERRORS and $main::RD_ERRORS and $_[0] =~ /ERRORS/
!ll&&!rl&&r
000
defined $main::RD_ERRORS and $main::RD_ERRORS
!ll&&!rl&&r
000
MC/DC0%0/10
defined $main::RD_TRACE || defined $main::RD_HINT && $main::RD_HINT && $_[0] =~ /ERRORS|WARN|HINT/ || defined $main::RD_WARN && $main::RD_WARN && $_[0] =~ /ERRORS|WARN/ || defined $main::RD_ERRORS && $main::RD_ERRORS && $_[0] =~ /ERRORS/
defined $main::RD_TRACE defined $main::RD_HINT $main::RD_HINT $_[0] =~ /ERRORS|WARN|HINT/ defined $main::RD_WARN $main::RD_WARN $_[0] =~ /ERRORS|WARN/ defined $main::RD_ERRORS $main::RD_ERRORS $_[0] =~ /ERRORS/
Truth table0%0/41
A or B and C and D or E and F and G || H and I and J
A= defined $main::RD_TRACEB= defined $main::RD_HINTC= $main::RD_HINTD= $_[0] =~ /ERRORS|WARN|HINT/E= defined $main::RD_WARNF= $main::RD_WARNG= $_[0] =~ /ERRORS|WARN/H= defined $main::RD_ERRORSI= $main::RD_ERRORSJ= $_[0] =~ /ERRORS/
ABCDEFGHIJresult
1XXXXXXXXX1
0111XXXXXX1
00XX111XXX1
010X111XXX1
0110111XXX1
00XX0XX1111
00XX10X1111
00XX1101111
010X0XX1111
010X10X1111
010X1101111
01100XX1111
011010X1111
01101101111
00XX0XX0XX0
00XX0XX10X0
00XX0XX1100
00XX10X0XX0
00XX10X10X0
00XX10X1100
00XX1100XX0
00XX11010X0
00XX1101100
010X0XX0XX0
010X0XX10X0
010X0XX1100
010X10X0XX0
010X10X10X0
010X10X1100
010X1100XX0
010X11010X0
010X1101100
01100XX0XX0
01100XX10X0
01100XX1100
011010X0XX0
011010X10X0
011010X1100
01101100XX0
011011010X0
01101101100
3188 or defined $::RD_HINT and $::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/
3189 or defined $::RD_WARN and $::RD_WARN and $_[0] =~ /ERRORS|WARN/
3190 or defined $::RD_ERRORS and $::RD_ERRORS and $_[0] =~ /ERRORS/
3191 }
3192  
3193 sub _error($;$)
3194 0 ▶{
Subroutine _error: not called CC=4 SCAR=30.0
3195 0 $ERRORS++;
3196 0 ▶ return 0 if ! _verbosity("ERRORS");
Branch: 1 branch
BranchTrueFalseTotal
unless &_verbosity("ERRORS") 0 0 0
3197 0 my $errortext = $_[0];
3198 0 ▶ my $errorprefix = "ERROR" . ($_[1] ? " (line $_[1])" : "");
Branch: 1 branch
BranchTrueFalseTotal
$_[1] ? : 0 0 0
3199 0 $errortext =~ s/\s+/ /g;
3200 0 ▶ print {*STDERR} "\n" if _verbosity("WARN");
Branch: 1 branch
BranchTrueFalseTotal
if &_verbosity("WARN") 0 0 0
3201 0 _write_ERROR($errorprefix, $errortext);
3202 0 return 1;
3203 }
3204  
3205 sub _warn($$;$)
3206 0 ▶{
Subroutine _warn: not called CC=7 SCAR=40.3
3207 0 ▶ return 0 unless _verbosity("WARN") && ($::RD_HINT || $_[0] >= ($::RD_WARN||1));
Branch: 1 branch
BranchTrueFalseTotal
unless &_verbosity("WARN") and $main::RD_HINT || $_[0] >= ($main::RD_WARN || 1) 0 0 0
Condition0%0/8
&_verbosity("WARN") and $main::RD_HINT || $_[0] >= ($main::RD_WARN || 1)
!ll&&!rl&&r
000
$main::RD_HINT or $_[0] >= ($main::RD_WARN || 1)
l!l&&r!l&&!r
000
$main::RD_WARN || 1
l!l
00
MC/DC0%0/3
&_verbosity("WARN") and $main::RD_HINT || $_[0] >= ($main::RD_WARN || 1)
&_verbosity("WARN") $main::RD_HINT $_[0] >= ($main::RD_WARN || 1)
MC/DC0%0/1
$main::RD_WARN || 1
$main::RD_WARN
Truth table0%0/4
A and B or C
A= &_verbosity("WARN")B= $main::RD_HINTC= $_[0] >= ($main::RD_WARN || 1)
ABCresult
0XX0
1000
11X1
1011
Truth table0%0/2
A
A= $main::RD_WARN
Aresult
11
00
3208 0 my $errortext = $_[1];
3209 0 ▶ my $errorprefix = "Warning" . ($_[2] ? " (line $_[2])" : "");
Branch: 1 branch
BranchTrueFalseTotal
$_[2] ? : 0 0 0
3210 0 ▶ print {*STDERR} "\n" if _verbosity("HINT");
Branch: 1 branch
BranchTrueFalseTotal
if &_verbosity("HINT") 0 0 0
3211 0 $errortext =~ s/\s+/ /g;
3212 0 _write_ERROR($errorprefix, $errortext);
3213 0 return 1;
3214 }
3215  
3216 sub _hint($)
3217 0 ▶{
Subroutine _hint: not called CC=3 SCAR=24.8
3218 0 ▶ return 0 unless $::RD_HINT;
Branch: 1 branch
BranchTrueFalseTotal
unless $main::RD_HINT 0 0 0
3219 0 my $errortext = $_[0];
3220 0 ▶ my $errorprefix = "Hint" . ($_[1] ? " (line $_[1])" : "");
Branch: 1 branch
BranchTrueFalseTotal
$_[1] ? : 0 0 0
3221 0 $errortext =~ s/\s+/ /g;
3222 0 _write_ERROR($errorprefix, $errortext);
3223 0 return 1;
3224 }
3225  
3226 sub _tracemax($)
3227 0 ▶{
Subroutine _tracemax: not called CC=5 SCAR=34.0
3228 0 ▶ if (defined $::RD_TRACE
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1 and $main::RD_TRACE + 10 < length $_[0]) { } 0 0 0
Condition0%0/9
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1 and $main::RD_TRACE + 10 < length $_[0]
!ll&&!rl&&r
000
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1
!ll&&!rl&&r
000
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/
!ll&&!rl&&r
000
MC/DC0%0/4
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1 and $main::RD_TRACE + 10 < length $_[0]
defined $main::RD_TRACE $main::RD_TRACE =~ /\d+/ $main::RD_TRACE > 1 $main::RD_TRACE + 10 < length $_[0]
Truth table0%0/5
A and B and C and D
A= defined $main::RD_TRACEB= $main::RD_TRACE =~ /\d+/C= $main::RD_TRACE > 1D= $main::RD_TRACE + 10 < length $_[0]
ABCDresult
0XXX0
10XX0
110X0
11100
11111
3229 && $::RD_TRACE =~ /\d+/
3230 && $::RD_TRACE>1
3231 && $::RD_TRACE+10<length($_[0]))
3232 {
3233 0 my $count = length($_[0]) - $::RD_TRACE;
3234 0 return substr($_[0],0,$::RD_TRACE/2)
3235 . "...<$count>..."
3236 . substr($_[0],-$::RD_TRACE/2);
3237 }
3238 else
3239 {
3240 0 return substr($_[0],0,500);
3241 }
3242 }
3243  
3244 sub _tracefirst($)
3245 0 ▶{
Subroutine _tracefirst: not called CC=5 SCAR=34.0
3246 0 ▶ if (defined $::RD_TRACE
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1 and $main::RD_TRACE + 10 < length $_[0]) { } 0 0 0
Condition0%0/9
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1 and $main::RD_TRACE + 10 < length $_[0]
!ll&&!rl&&r
000
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1
!ll&&!rl&&r
000
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/
!ll&&!rl&&r
000
MC/DC0%0/4
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1 and $main::RD_TRACE + 10 < length $_[0]
defined $main::RD_TRACE $main::RD_TRACE =~ /\d+/ $main::RD_TRACE > 1 $main::RD_TRACE + 10 < length $_[0]
Truth table0%0/5
A and B and C and D
A= defined $main::RD_TRACEB= $main::RD_TRACE =~ /\d+/C= $main::RD_TRACE > 1D= $main::RD_TRACE + 10 < length $_[0]
ABCDresult
0XXX0
10XX0
110X0
11100
11111
3247 && $::RD_TRACE =~ /\d+/
3248 && $::RD_TRACE>1
3249 && $::RD_TRACE+10<length($_[0]))
3250 {
3251 0 my $count = length($_[0]) - $::RD_TRACE;
3252 0 return substr($_[0],0,$::RD_TRACE) . "...<+$count>";
3253 }
3254 else
3255 {
3256 0 return substr($_[0],0,500);
3257 }
3258 }
3259  
3260 8 my $lastcontext = '';
3261 8 my $lastrulename = '';
3262 8 my $lastlevel = '';
3263  
3264 sub _trace($;$$$)
3265 0 ▶{
Subroutine _trace: not called CC=8 SCAR=42.8
3266 0 my $tracemsg = $_[0];
3267 0 ▶ my $tracecontext = $_[1]||$lastcontext;
Condition0%0/3
$_[1] || $lastcontext
l!l&&r!l&&!r
000
MC/DC0%0/2
$_[1] || $lastcontext
$_[1] $lastcontext
Truth table0%0/3
A || B
A= $_[1]B= $lastcontext
ABresult
1X1
011
000
3268 0 ▶ my $tracerulename = $_[2]||$lastrulename;
Condition0%0/3
$_[2] || $lastrulename
l!l&&r!l&&!r
000
MC/DC0%0/2
$_[2] || $lastrulename
$_[2] $lastrulename
Truth table0%0/3
A || B
A= $_[2]B= $lastrulename
ABresult
1X1
011
000
3269 0 ▶ my $tracelevel = $_[3]||$lastlevel;
Condition0%0/3
$_[3] || $lastlevel
l!l&&r!l&&!r
000
MC/DC0%0/2
$_[3] || $lastlevel
$_[3] $lastlevel
Truth table0%0/3
A || B
A= $_[3]B= $lastlevel
ABresult
1X1
011
000
3270 0 ▶ if ($tracerulename) { $lastrulename = $tracerulename }
Branch: 1 branch
BranchTrueFalseTotal
if ($tracerulename) 0 0 0
3271 0 ▶ if ($tracelevel) { $lastlevel = $tracelevel }
Branch: 1 branch
BranchTrueFalseTotal
if ($tracelevel) 0 0 0
3272  
3273 0 $tracecontext =~ s/\n/\\n/g;
3274 0 $tracecontext =~ s/\s+/ /g;
3275 0 $tracerulename = qq{$tracerulename};
3276 0 _write_TRACE($tracelevel, $tracerulename, $tracemsg);
3277 0 ▶ if ($tracecontext ne $lastcontext)
Branch: 1 branch
BranchTrueFalseTotal
if ($tracecontext ne $lastcontext) 0 0 0
3278 {
3279 0 ▶ if ($tracecontext)
Branch: 1 branch
BranchTrueFalseTotal
if ($tracecontext) { } 0 0 0
3280 {
3281 0 $lastcontext = _tracefirst($tracecontext);
3282 0 $tracecontext = qq{"$tracecontext"};
3283 }
3284 else
3285 {
3286 0 $tracecontext = qq{<NO TEXT LEFT>};
3287 }
3288 0 _write_TRACECONTEXT($tracelevel, $tracerulename, $tracecontext);
3289 }
3290 }
3291  
3292 sub _matchtracemessage
3293 0 ▶{
Subroutine _matchtracemessage: not called CC=6 SCAR=37.4
3294 0 my ($self, $reject) = @_;
3295  
3296 0 my $prefix = '';
3297 0 my $postfix = '';
3298 0 my $matched = not $reject;
3299 0 my @t = ("Matched", "Didn't match");
3300 0 ▶ if (exists $self->{lookahead} and $self->{lookahead})
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"lookahead"} and $self->{"lookahead"}) 0 0 0
Condition0%0/3
exists $self->{"lookahead"} and $self->{"lookahead"}
!ll&&!rl&&r
000
MC/DC0%0/2
exists $self->{"lookahead"} and $self->{"lookahead"}
exists $self->{"lookahead"} $self->{"lookahead"}
Truth table0%0/3
A and B
A= exists $self->{"lookahead"}B= $self->{"lookahead"}
ABresult
0X0
100
111
3301 {
3302 0 ▶ $postfix = $reject ? "(reject)" : "(keep)";
Branch: 1 branch
BranchTrueFalseTotal
$reject ? : 0 0 0
3303 0 $prefix = "...";
3304 0 ▶ if ($self->{lookahead} < 0)
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"lookahead"} < 0) 0 0 0
3305 {
3306 0 $prefix .= '!';
3307 0 $matched = not $matched;
3308 }
3309 }
3310 0 ▶ $prefix . ($matched ? $t[0] : $t[1]) . $postfix;
Branch: 1 branch
BranchTrueFalseTotal
$matched ? : 0 0 0
3311 }
3312  
3313 sub _parseunneg($$$$$)
3314 0 ▶{
Subroutine _parseunneg: not called CC=2 SCAR=17.9
3315 0 _parse($_[0],$_[1],$_[3],$_[4]);
3316 0 ▶ if ($_[2]<0)
Branch: 1 branch
BranchTrueFalseTotal
if ($_[2] < 0) 0 0 0
3317 {
3318 0 _error("Can't negate \"$_[4]\".",$_[3]);
3319 0 _hint("You can't negate $_[0]. Remove the \"...!\" before
3320 \"$_[4]\".");
3321 0 return 0;
3322 }
3323 0 return 1;
3324 }
3325  
3326 sub _parse($$$$)
3327 0 ▶{
Subroutine _parse: not called CC=4 SCAR=30.0
3328 0 my $what = $_[3];
3329 0 $what =~ s/^\s+//;
3330 0 ▶ if ($_[1])
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) 0 0 0
3331 {
3332 0 ▶ _warn(3,"Found $_[0] ($what) after an unconditional <error>",$_[2])
Branch: 1 branch
BranchTrueFalseTotal
&_warn(3, "Found $_[0] ($what) after an unconditional <error>", $_[2]) and &_hint("An unconditional <error> always causes the\n production containing it to immediately fail.\n \u$_[0] that follows an <error>\n will never be reached. Did you mean to use\n <error?> instead?") 0 0 0
3333 and
3334 _hint("An unconditional <error> always causes the
3335 production containing it to immediately fail.
3336 \u$_[0] that follows an <error>
3337 will never be reached. Did you mean to use
3338 <error?> instead?");
3339 }
3340  
3341 0 ▶ return if ! _verbosity("TRACE");
Branch: 1 branch
BranchTrueFalseTotal
unless &_verbosity("TRACE") 0 0 0
3342 0 my $errortext = "Treating \"$what\" as $_[0]";
3343 0 my $errorprefix = "XML::XSH2::Parser::_Runtime";
3344 0 $errortext =~ s/\s+/ /g;
3345 0 _write_ERROR($errorprefix, $errortext);
3346 }
3347  
3348 2391 ▶sub _linecount($) {
Subroutine _linecount: called CC=2 SCAR=7.6
3349 2391 ▶ scalar substr($_[0], pos $_[0]||0) =~ tr/\n//
Condition50%1/2
pos $_[0] || 0
l!l
02391
MC/DC0%0/1
pos $_[0] || 0
pos $_[0]
Truth table50%1/2
A
A= pos $_[0]
Aresult
11
00
3350 }
3351  
3352  
3353 package # this should not be indexed by CPAN
3354 main;
3355  
3356 8 ▶use vars qw ( $RD_ERRORS $RD_WARN $RD_HINT $RD_TRACE $RD_CHECK );
Subroutine BEGIN: called CC=1 SCAR=0.0
3357 8 $::RD_CHECK = 1;
3358 8 $::RD_ERRORS = 1;
3359 8 $::RD_WARN = 3;
3360  
3361 8 1;
3362  
3363 }
3364 package XML::XSH2::Parser;
3365 8 { my $ERRORS;
3366  
3367  
3368 package XML::XSH2::Parser::_Runtime::XML::XSH2::Parser;
3369 8 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3370 8 ▶use vars qw($skip $AUTOLOAD );
Subroutine BEGIN: called CC=1 SCAR=0.0
3371 8 @XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::ISA = ();
3372 8 $skip = '(\\s|\\n|#[^\\n]*)*';
3373  
3374  
3375  
3376 {
3377 0 ▶local $SIG{__WARN__} = sub {0};
Subroutine __ANON__: not called CC=1 SCAR=0.4
3378 # PRETEND TO BE IN XML::XSH2::Parser::_Runtime NAMESPACE
3379 *XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::AUTOLOAD = sub
3380 0 ▶{
Subroutine __ANON__: not called CC=1 SCAR=2.2
3381 8 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
3382  
3383 0 ${"AUTOLOAD"} =~ s/^XML::XSH2::Parser::_Runtime::XML::XSH2::Parser/XML::XSH2::Parser::_Runtime/;
3384 0 goto &{${"AUTOLOAD"}};
3385 }
3386 8 }
3387  
3388 8 push @XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::ISA, 'XML::XSH2::Parser::_Runtime';
3389 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
3390 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::ID
3391 10 ▶{
Subroutine ID: called CC=24 SCAR=38.5
3392 10 my $thisparser = $_[0];
3393 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
3394 10 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
100
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
3395 10 $ERRORS = 0;
3396 10 my $thisrule = $thisparser->{"rules"}{"ID"};
3397  
3398 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [ID]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
3399 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
3400 q{ID},
3401 $tracelevel)
3402 if defined $::RD_TRACE;
3403  
3404
3405 10 my $err_at = @{$thisparser->{errors}};
3406  
3407 10 my $score;
3408 my $score_return;
3409 10 my $_tok;
3410 10 my $return = undef;
3411 10 my $_matched=0;
3412 10 my $commit=0;
3413 10 my @item = ();
3414 10 my %item = ();
3415 10 my $repeating = $_[2];
3416 10 my $_noactions = $_[3];
3417 10 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 10 0 10
3418 10 my $_itempos = $_[5];
3419 10 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 10 0 10
3420 10 my $text;
3421 my $lastsep;
3422 10 my $current_match;
3423 10 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/[a-zA-Z_][a-zA-Z0-9_]*/});
3424 10 $expectation->at($_[1]);
3425
3426 10 my $thisoffset;
3427 10 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
3428
3429 10 my $thiscolumn;
3430 10 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
3431
3432 10 my $thisline;
3433 10 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
3434  
3435
3436  
3437 10 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 10 0 10
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0010
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
3438 {
3439
3440 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/[a-zA-Z_][a-zA-Z0-9_]*/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
3441 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
3442 q{ID},
3443 $tracelevel)
3444 if defined $::RD_TRACE;
3445 10 my $thisprod = $thisrule->{"prods"}[0];
3446 10 $text = $_[1];
3447 10 my $_savetext;
3448 10 @item = (q{ID});
3449 10 %item = (__RULE__ => q{ID});
3450 10 my $repcount = 0;
3451  
3452  
3453 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/[a-zA-Z_][a-zA-Z0-9_]*/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
3454 q{ID},
3455 $tracelevel)
3456 if defined $::RD_TRACE;
3457 10 undef $lastsep;
3458 10 $expectation->is(q{})->at($text);
3459
3460  
3461 10 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[a-zA-Z_][a-zA-Z0-9_]*)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[a-zA-Z_][a-zA-Z0-9_]*)/) 0 10 10
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[a-zA-Z_][a-zA-Z0-9_]*)/
!ll&&!rl&&r
0010
($lastsep = $1) && ''
!ll
010
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[a-zA-Z_][a-zA-Z0-9_]*)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:[a-zA-Z_][a-zA-Z0-9_]*)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:[a-zA-Z_][a-zA-Z0-9_]*)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
3462 {
3463 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
3464 0 $expectation->failed();
3465 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3466 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3467 if defined $::RD_TRACE;
3468  
3469 0 last;
3470 }
3471 10 $current_match = substr($text, $-[0], $+[0] - $-[0]);
3472 10 substr($text,0,length($current_match),q{});
3473 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
3474 . $current_match . q{])},
3475 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3476 if defined $::RD_TRACE;
3477 10 push @item, $item{__PATTERN1__}=$current_match;
3478
3479  
3480 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/[a-zA-Z_][a-zA-Z0-9_]*/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
3481 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3482 q{ID},
3483 $tracelevel)
3484 if defined $::RD_TRACE;
3485  
3486  
3487  
3488 10 $_matched = 1;
3489 10 last;
3490 }
3491  
3492  
3493 10 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 10 10
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
1000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
3494 {
3495
3496  
3497 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
3498 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3499 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
3500 q{ID},
3501 $tracelevel)
3502 if defined $::RD_TRACE;
3503 0 return undef;
3504 }
3505 10 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 10 10
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
0100
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
3506 {
3507 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3508 q{ID},
3509 $tracelevel)
3510 if defined $::RD_TRACE;
3511 0 $return = $score_return;
3512 }
3513 10 splice @{$thisparser->{errors}}, $err_at;
3514 10 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 10 0 10
3515 10 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 10 10
3516 {
3517 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
3518 $return . q{])}, "",
3519 q{ID},
3520 $tracelevel);
3521 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
3522 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
3523 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3524 , q{ID},
3525 $tracelevel)
3526 }
3527 10 $_[1] = $text;
3528 10 return $return;
3529 }
3530  
3531 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
3532 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_10_of_rule_command
3533 2 ▶{
Subroutine _alternation_1_of_production_10_of_rule_command: called CC=26 SCAR=38.9
3534 2 my $thisparser = $_[0];
3535 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
3536 2 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
20
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
3537 2 $ERRORS = 0;
3538 2 my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_10_of_rule_command"};
3539  
3540 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [_alternation_1_of_production_10_of_rule_command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
3541 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
3542 q{_alternation_1_of_production_10_of_rule_command},
3543 $tracelevel)
3544 if defined $::RD_TRACE;
3545  
3546
3547 2 my $err_at = @{$thisparser->{errors}};
3548  
3549 2 my $score;
3550 my $score_return;
3551 2 my $_tok;
3552 2 my $return = undef;
3553 2 my $_matched=0;
3554 2 my $commit=0;
3555 2 my @item = ();
3556 2 my %item = ();
3557 2 my $repeating = $_[2];
3558 2 my $_noactions = $_[3];
3559 2 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 2 0 2
3560 2 my $_itempos = $_[5];
3561 2 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 2 0 2
3562 2 my $text;
3563 my $lastsep;
3564 2 my $current_match;
3565 2 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/});
3566 2 $expectation->at($_[1]);
3567
3568 2 my $thisoffset;
3569 2 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
3570
3571 2 my $thiscolumn;
3572 2 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
3573
3574 2 my $thisline;
3575 2 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
3576  
3577
3578  
3579 2 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 2 0 2
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
002
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
3580 {
3581
3582 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
3583 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
3584 q{_alternation_1_of_production_10_of_rule_command},
3585 $tracelevel)
3586 if defined $::RD_TRACE;
3587 2 my $thisprod = $thisrule->{"prods"}[0];
3588 2 $text = $_[1];
3589 2 my $_savetext;
3590 2 @item = (q{_alternation_1_of_production_10_of_rule_command});
3591 2 %item = (__RULE__ => q{_alternation_1_of_production_10_of_rule_command});
3592 2 my $repcount = 0;
3593  
3594  
3595 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
3596 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3597 q{_alternation_1_of_production_10_of_rule_command},
3598 $tracelevel)
3599 if defined $::RD_TRACE;
3600 2 $expectation->is(q{})->at($text);
3601
3602 2 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command, 0, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command, 0, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 2 2
3603 {
3604 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3605 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3606 q{_alternation_1_of_production_10_of_rule_command},
3607 $tracelevel)
3608 if defined $::RD_TRACE;
3609 0 last;
3610 }
3611 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
3612 . @$_tok . q{ times)},
3613  
3614 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3615 q{_alternation_1_of_production_10_of_rule_command},
3616 $tracelevel)
3617 if defined $::RD_TRACE;
3618 2 $item{q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command(s?)}} = $_tok;
3619 2 push @item, $_tok;
3620
3621  
3622  
3623 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
3624 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3625 q{_alternation_1_of_production_10_of_rule_command},
3626 $tracelevel)
3627 if defined $::RD_TRACE;
3628
3629  
3630 2 ▶ $_tok = ($_noactions) ? 0 : do { [ map { @$_ } @{$item[1]} ] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 2 2
3631 2 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 2 2
3632 {
3633 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3634 if defined $::RD_TRACE;
3635 0 last;
3636 }
3637 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
3638 . $_tok . q{])},
3639 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3640 if defined $::RD_TRACE;
3641 2 push @item, $_tok;
3642 2 $item{__ACTION1__}=$_tok;
3643
3644  
3645 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
3646 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3647 q{_alternation_1_of_production_10_of_rule_command},
3648 $tracelevel)
3649 if defined $::RD_TRACE;
3650  
3651  
3652  
3653 2 $_matched = 1;
3654 2 last;
3655 }
3656  
3657  
3658 2 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 2 2
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
200
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
3659 {
3660
3661  
3662 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
3663 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3664 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
3665 q{_alternation_1_of_production_10_of_rule_command},
3666 $tracelevel)
3667 if defined $::RD_TRACE;
3668 0 return undef;
3669 }
3670 2 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 2 2
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
020
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
3671 {
3672 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3673 q{_alternation_1_of_production_10_of_rule_command},
3674 $tracelevel)
3675 if defined $::RD_TRACE;
3676 0 $return = $score_return;
3677 }
3678 2 splice @{$thisparser->{errors}}, $err_at;
3679 2 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 2 0 2
3680 2 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 2 2
3681 {
3682 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
3683 $return . q{])}, "",
3684 q{_alternation_1_of_production_10_of_rule_command},
3685 $tracelevel);
3686 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
3687 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
3688 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3689 , q{_alternation_1_of_production_10_of_rule_command},
3690 $tracelevel)
3691 }
3692 2 $_[1] = $text;
3693 2 return $return;
3694 }
3695  
3696 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
3697 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command
3698 6 ▶{
Subroutine _alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command: called CC=169 SCAR=81.9
3699 6 my $thisparser = $_[0];
3700 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
3701 6 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
60
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
3702 6 $ERRORS = 0;
3703 6 my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command"};
3704  
3705 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
3706 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
3707 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3708 $tracelevel)
3709 if defined $::RD_TRACE;
3710  
3711
3712 6 my $err_at = @{$thisparser->{errors}};
3713  
3714 6 my $score;
3715 my $score_return;
3716 6 my $_tok;
3717 6 my $return = undef;
3718 6 my $_matched=0;
3719 6 my $commit=0;
3720 6 my @item = ();
3721 6 my %item = ();
3722 6 my $repeating = $_[2];
3723 6 my $_noactions = $_[3];
3724 6 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 6 0 6
3725 6 my $_itempos = $_[5];
3726 6 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 6 0 6
3727 6 my $text;
3728 my $lastsep;
3729 6 my $current_match;
3730 6 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/});
3731 6 $expectation->at($_[1]);
3732
3733 6 my $thisoffset;
3734 6 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
3735
3736 6 my $thiscolumn;
3737 6 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
3738
3739 6 my $thisline;
3740 6 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
3741  
3742
3743  
3744 6 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 6 0 6
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
006
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
3745 {
3746
3747 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/--input-file|:f/ filename]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
3748 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
3749 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3750 $tracelevel)
3751 if defined $::RD_TRACE;
3752 6 my $thisprod = $thisrule->{"prods"}[0];
3753 6 $text = $_[1];
3754 6 my $_savetext;
3755 6 @item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
3756 6 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
3757 6 my $repcount = 0;
3758  
3759  
3760 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/--input-file|:f/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
3761 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3762 $tracelevel)
3763 if defined $::RD_TRACE;
3764 6 undef $lastsep;
3765 6 $expectation->is(q{})->at($text);
3766
3767  
3768 6 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--input-file|:f)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--input-file|:f)/) 6 0 6
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--input-file|:f)/
!ll&&!rl&&r
060
($lastsep = $1) && ''
!ll
06
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--input-file|:f)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:--input-file|:f)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:--input-file|:f)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
3769 {
3770 6 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 6 0 6
3771 6 $expectation->failed();
3772 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
3773 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3774 if defined $::RD_TRACE;
3775  
3776 6 last;
3777 }
3778 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
3779 0 substr($text,0,length($current_match),q{});
3780 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3781 . $current_match . q{])},
3782 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3783 if defined $::RD_TRACE;
3784 0 push @item, $item{__PATTERN1__}=$current_match;
3785
3786  
3787 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [filename]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3788 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3789 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3790 $tracelevel)
3791 if defined $::RD_TRACE;
3792 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
3793 0 $expectation->is(q{filename})->at($text);
3794 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::filename($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = filename($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
3795 {
3796
3797 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [filename]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3798 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3799 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3800 $tracelevel)
3801 if defined $::RD_TRACE;
3802 0 $expectation->failed();
3803 0 last;
3804 }
3805 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [filename]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3806 . $_tok . q{]},
3807  
3808 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3809 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3810 $tracelevel)
3811 if defined $::RD_TRACE;
3812 0 $item{q{filename}} = $_tok;
3813 0 push @item, $_tok;
3814
3815 }
3816  
3817 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3818 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3819 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3820 $tracelevel)
3821 if defined $::RD_TRACE;
3822
3823  
3824 0 ▶ $_tok = ($_noactions) ? 0 : do { [ 'string/input-file' => $item[2] ] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
3825 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
3826 {
3827 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3828 if defined $::RD_TRACE;
3829 0 last;
3830 }
3831 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3832 . $_tok . q{])},
3833 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3834 if defined $::RD_TRACE;
3835 0 push @item, $_tok;
3836 0 $item{__ACTION1__}=$_tok;
3837
3838  
3839 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/--input-file|:f/ filename]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3840 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3841 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3842 $tracelevel)
3843 if defined $::RD_TRACE;
3844  
3845  
3846  
3847 0 $_matched = 1;
3848 0 last;
3849 }
3850  
3851  
3852 6 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 6 0 6
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
006
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
3853 {
3854
3855 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/--input-pipe|:p/ filename]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
3856 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
3857 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3858 $tracelevel)
3859 if defined $::RD_TRACE;
3860 6 my $thisprod = $thisrule->{"prods"}[1];
3861 6 $text = $_[1];
3862 6 my $_savetext;
3863 6 @item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
3864 6 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
3865 6 my $repcount = 0;
3866  
3867  
3868 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/--input-pipe|:p/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
3869 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3870 $tracelevel)
3871 if defined $::RD_TRACE;
3872 6 undef $lastsep;
3873 6 $expectation->is(q{})->at($text);
3874
3875  
3876 6 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--input-pipe|:p)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--input-pipe|:p)/) 5 1 6
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--input-pipe|:p)/
!ll&&!rl&&r
051
($lastsep = $1) && ''
!ll
06
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--input-pipe|:p)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:--input-pipe|:p)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:--input-pipe|:p)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
3877 {
3878 5 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 5 0 5
3879 5 $expectation->failed();
3880 5 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 5 5
3881 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3882 if defined $::RD_TRACE;
3883  
3884 5 last;
3885 }
3886 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
3887 1 substr($text,0,length($current_match),q{});
3888 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
3889 . $current_match . q{])},
3890 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3891 if defined $::RD_TRACE;
3892 1 push @item, $item{__PATTERN1__}=$current_match;
3893
3894  
3895 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [filename]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
3896 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3897 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3898 $tracelevel)
3899 if defined $::RD_TRACE;
3900 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
3901 1 $expectation->is(q{filename})->at($text);
3902 1 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::filename($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = filename($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 1 1
3903 {
3904
3905 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [filename]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3906 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3907 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3908 $tracelevel)
3909 if defined $::RD_TRACE;
3910 0 $expectation->failed();
3911 0 last;
3912 }
3913 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [filename]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
3914 . $_tok . q{]},
3915  
3916 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3917 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3918 $tracelevel)
3919 if defined $::RD_TRACE;
3920 1 $item{q{filename}} = $_tok;
3921 1 push @item, $_tok;
3922
3923 }
3924  
3925 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
3926 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3927 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3928 $tracelevel)
3929 if defined $::RD_TRACE;
3930
3931  
3932 1 ▶ $_tok = ($_noactions) ? 0 : do { [ 'string/input-pipe' => $item[2] ] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
3933 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
3934 {
3935 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
3936 if defined $::RD_TRACE;
3937 0 last;
3938 }
3939 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
3940 . $_tok . q{])},
3941 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3942 if defined $::RD_TRACE;
3943 1 push @item, $_tok;
3944 1 $item{__ACTION1__}=$_tok;
3945
3946  
3947 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/--input-pipe|:p/ filename]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
3948 XML::XSH2::Parser::_Runtime::_tracefirst($text),
3949 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3950 $tracelevel)
3951 if defined $::RD_TRACE;
3952  
3953  
3954  
3955 1 $_matched = 1;
3956 1 last;
3957 }
3958  
3959  
3960 6 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 5 1 6
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
105
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
3961 {
3962
3963 5 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/--input-string|:s/ exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 5 5
3964 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
3965 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3966 $tracelevel)
3967 if defined $::RD_TRACE;
3968 5 my $thisprod = $thisrule->{"prods"}[2];
3969 5 $text = $_[1];
3970 5 my $_savetext;
3971 5 @item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
3972 5 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
3973 5 my $repcount = 0;
3974  
3975  
3976 5 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/--input-string|:s/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 5 5
3977 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
3978 $tracelevel)
3979 if defined $::RD_TRACE;
3980 5 undef $lastsep;
3981 5 $expectation->is(q{})->at($text);
3982
3983  
3984 5 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--input-string|:s)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--input-string|:s)/) 4 1 5
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--input-string|:s)/
!ll&&!rl&&r
041
($lastsep = $1) && ''
!ll
05
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--input-string|:s)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:--input-string|:s)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:--input-string|:s)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
3985 {
3986 4 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 4 0 4
3987 4 $expectation->failed();
3988 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
3989 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3990 if defined $::RD_TRACE;
3991  
3992 4 last;
3993 }
3994 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
3995 1 substr($text,0,length($current_match),q{});
3996 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
3997 . $current_match . q{])},
3998 XML::XSH2::Parser::_Runtime::_tracefirst($text))
3999 if defined $::RD_TRACE;
4000 1 push @item, $item{__PATTERN1__}=$current_match;
4001
4002  
4003 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
4004 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4005 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4006 $tracelevel)
4007 if defined $::RD_TRACE;
4008 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
4009 1 $expectation->is(q{exp})->at($text);
4010 1 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 1 1
4011 {
4012
4013 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4014 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4015 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4016 $tracelevel)
4017 if defined $::RD_TRACE;
4018 0 $expectation->failed();
4019 0 last;
4020 }
4021 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
4022 . $_tok . q{]},
4023  
4024 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4025 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4026 $tracelevel)
4027 if defined $::RD_TRACE;
4028 1 $item{q{exp}} = $_tok;
4029 1 push @item, $_tok;
4030
4031 }
4032  
4033 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
4034 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4035 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4036 $tracelevel)
4037 if defined $::RD_TRACE;
4038
4039  
4040 1 ▶ $_tok = ($_noactions) ? 0 : do { [ 'exp/input-string' => $item[2] ] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
4041 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
4042 {
4043 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4044 if defined $::RD_TRACE;
4045 0 last;
4046 }
4047 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
4048 . $_tok . q{])},
4049 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4050 if defined $::RD_TRACE;
4051 1 push @item, $_tok;
4052 1 $item{__ACTION1__}=$_tok;
4053
4054  
4055 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/--input-string|:s/ exp]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
4056 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4057 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4058 $tracelevel)
4059 if defined $::RD_TRACE;
4060  
4061  
4062  
4063 1 $_matched = 1;
4064 1 last;
4065 }
4066  
4067  
4068 6 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 4 2 6
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
204
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
4069 {
4070
4071 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/--output-file|:F/ filename]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4072 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4073 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4074 $tracelevel)
4075 if defined $::RD_TRACE;
4076 4 my $thisprod = $thisrule->{"prods"}[3];
4077 4 $text = $_[1];
4078 4 my $_savetext;
4079 4 @item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
4080 4 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
4081 4 my $repcount = 0;
4082  
4083  
4084 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/--output-file|:F/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4085 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4086 $tracelevel)
4087 if defined $::RD_TRACE;
4088 4 undef $lastsep;
4089 4 $expectation->is(q{})->at($text);
4090
4091  
4092 4 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--output-file|:F)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-file|:F)/) 4 0 4
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-file|:F)/
!ll&&!rl&&r
040
($lastsep = $1) && ''
!ll
04
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-file|:F)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:--output-file|:F)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:--output-file|:F)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
4093 {
4094 4 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 4 0 4
4095 4 $expectation->failed();
4096 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4097 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4098 if defined $::RD_TRACE;
4099  
4100 4 last;
4101 }
4102 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
4103 0 substr($text,0,length($current_match),q{});
4104 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4105 . $current_match . q{])},
4106 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4107 if defined $::RD_TRACE;
4108 0 push @item, $item{__PATTERN1__}=$current_match;
4109
4110  
4111 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [filename]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4112 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4113 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4114 $tracelevel)
4115 if defined $::RD_TRACE;
4116 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
4117 0 $expectation->is(q{filename})->at($text);
4118 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::filename($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = filename($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
4119 {
4120
4121 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [filename]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4122 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4123 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4124 $tracelevel)
4125 if defined $::RD_TRACE;
4126 0 $expectation->failed();
4127 0 last;
4128 }
4129 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [filename]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4130 . $_tok . q{]},
4131  
4132 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4133 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4134 $tracelevel)
4135 if defined $::RD_TRACE;
4136 0 $item{q{filename}} = $_tok;
4137 0 push @item, $_tok;
4138
4139 }
4140  
4141 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4142 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4143 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4144 $tracelevel)
4145 if defined $::RD_TRACE;
4146
4147  
4148 0 ▶ $_tok = ($_noactions) ? 0 : do { [ 'string/output-file' => $item[2] ] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
4149 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
4150 {
4151 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4152 if defined $::RD_TRACE;
4153 0 last;
4154 }
4155 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4156 . $_tok . q{])},
4157 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4158 if defined $::RD_TRACE;
4159 0 push @item, $_tok;
4160 0 $item{__ACTION1__}=$_tok;
4161
4162  
4163 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/--output-file|:F/ filename]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4164 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4165 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4166 $tracelevel)
4167 if defined $::RD_TRACE;
4168  
4169  
4170  
4171 0 $_matched = 1;
4172 0 last;
4173 }
4174  
4175  
4176 6 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 4 2 6
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
204
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
4177 {
4178
4179 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/--output-encoding|:E/ enc_string]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4180 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4181 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4182 $tracelevel)
4183 if defined $::RD_TRACE;
4184 4 my $thisprod = $thisrule->{"prods"}[4];
4185 4 $text = $_[1];
4186 4 my $_savetext;
4187 4 @item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
4188 4 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
4189 4 my $repcount = 0;
4190  
4191  
4192 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/--output-encoding|:E/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4193 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4194 $tracelevel)
4195 if defined $::RD_TRACE;
4196 4 undef $lastsep;
4197 4 $expectation->is(q{})->at($text);
4198
4199  
4200 4 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--output-encoding|:E)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-encoding|:E)/) 4 0 4
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-encoding|:E)/
!ll&&!rl&&r
040
($lastsep = $1) && ''
!ll
04
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-encoding|:E)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:--output-encoding|:E)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:--output-encoding|:E)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
4201 {
4202 4 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 4 0 4
4203 4 $expectation->failed();
4204 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4205 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4206 if defined $::RD_TRACE;
4207  
4208 4 last;
4209 }
4210 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
4211 0 substr($text,0,length($current_match),q{});
4212 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4213 . $current_match . q{])},
4214 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4215 if defined $::RD_TRACE;
4216 0 push @item, $item{__PATTERN1__}=$current_match;
4217
4218  
4219 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [enc_string]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4220 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4221 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4222 $tracelevel)
4223 if defined $::RD_TRACE;
4224 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
4225 0 $expectation->is(q{enc_string})->at($text);
4226 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::enc_string($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = enc_string($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
4227 {
4228
4229 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [enc_string]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4230 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4231 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4232 $tracelevel)
4233 if defined $::RD_TRACE;
4234 0 $expectation->failed();
4235 0 last;
4236 }
4237 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [enc_string]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4238 . $_tok . q{]},
4239  
4240 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4241 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4242 $tracelevel)
4243 if defined $::RD_TRACE;
4244 0 $item{q{enc_string}} = $_tok;
4245 0 push @item, $_tok;
4246
4247 }
4248  
4249 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4250 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4251 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4252 $tracelevel)
4253 if defined $::RD_TRACE;
4254
4255  
4256 0 ▶ $_tok = ($_noactions) ? 0 : do { [ 'string/output-encoding' => $item[2] ] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
4257 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
4258 {
4259 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4260 if defined $::RD_TRACE;
4261 0 last;
4262 }
4263 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4264 . $_tok . q{])},
4265 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4266 if defined $::RD_TRACE;
4267 0 push @item, $_tok;
4268 0 $item{__ACTION1__}=$_tok;
4269
4270  
4271 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/--output-encoding|:E/ enc_string]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4272 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4273 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4274 $tracelevel)
4275 if defined $::RD_TRACE;
4276  
4277  
4278  
4279 0 $_matched = 1;
4280 0 last;
4281 }
4282  
4283  
4284 6 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 4 2 6
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
204
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
4285 {
4286
4287 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/--output-pipe|:P/ filename]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4288 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4289 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4290 $tracelevel)
4291 if defined $::RD_TRACE;
4292 4 my $thisprod = $thisrule->{"prods"}[5];
4293 4 $text = $_[1];
4294 4 my $_savetext;
4295 4 @item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
4296 4 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
4297 4 my $repcount = 0;
4298  
4299  
4300 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/--output-pipe|:P/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4301 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4302 $tracelevel)
4303 if defined $::RD_TRACE;
4304 4 undef $lastsep;
4305 4 $expectation->is(q{})->at($text);
4306
4307  
4308 4 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--output-pipe|:P)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-pipe|:P)/) 4 0 4
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-pipe|:P)/
!ll&&!rl&&r
040
($lastsep = $1) && ''
!ll
04
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-pipe|:P)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:--output-pipe|:P)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:--output-pipe|:P)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
4309 {
4310 4 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 4 0 4
4311 4 $expectation->failed();
4312 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4313 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4314 if defined $::RD_TRACE;
4315  
4316 4 last;
4317 }
4318 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
4319 0 substr($text,0,length($current_match),q{});
4320 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4321 . $current_match . q{])},
4322 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4323 if defined $::RD_TRACE;
4324 0 push @item, $item{__PATTERN1__}=$current_match;
4325
4326  
4327 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [filename]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4328 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4329 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4330 $tracelevel)
4331 if defined $::RD_TRACE;
4332 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
4333 0 $expectation->is(q{filename})->at($text);
4334 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::filename($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = filename($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
4335 {
4336
4337 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [filename]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4338 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4339 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4340 $tracelevel)
4341 if defined $::RD_TRACE;
4342 0 $expectation->failed();
4343 0 last;
4344 }
4345 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [filename]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4346 . $_tok . q{]},
4347  
4348 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4349 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4350 $tracelevel)
4351 if defined $::RD_TRACE;
4352 0 $item{q{filename}} = $_tok;
4353 0 push @item, $_tok;
4354
4355 }
4356  
4357 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4358 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4359 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4360 $tracelevel)
4361 if defined $::RD_TRACE;
4362
4363  
4364 0 ▶ $_tok = ($_noactions) ? 0 : do { [ 'string/output-pipe' => $item[2] ] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
4365 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
4366 {
4367 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4368 if defined $::RD_TRACE;
4369 0 last;
4370 }
4371 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4372 . $_tok . q{])},
4373 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4374 if defined $::RD_TRACE;
4375 0 push @item, $_tok;
4376 0 $item{__ACTION1__}=$_tok;
4377
4378  
4379 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/--output-pipe|:P/ filename]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4380 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4381 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4382 $tracelevel)
4383 if defined $::RD_TRACE;
4384  
4385  
4386  
4387 0 $_matched = 1;
4388 0 last;
4389 }
4390  
4391  
4392 6 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 4 2 6
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
204
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
4393 {
4394
4395 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/--output-string|:S/ exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4396 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4397 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4398 $tracelevel)
4399 if defined $::RD_TRACE;
4400 4 my $thisprod = $thisrule->{"prods"}[6];
4401 4 $text = $_[1];
4402 4 my $_savetext;
4403 4 @item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
4404 4 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
4405 4 my $repcount = 0;
4406  
4407  
4408 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/--output-string|:S/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4409 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4410 $tracelevel)
4411 if defined $::RD_TRACE;
4412 4 undef $lastsep;
4413 4 $expectation->is(q{})->at($text);
4414
4415  
4416 4 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--output-string|:S)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-string|:S)/) 4 0 4
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-string|:S)/
!ll&&!rl&&r
040
($lastsep = $1) && ''
!ll
04
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--output-string|:S)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:--output-string|:S)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:--output-string|:S)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
4417 {
4418 4 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 4 0 4
4419 4 $expectation->failed();
4420 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4421 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4422 if defined $::RD_TRACE;
4423  
4424 4 last;
4425 }
4426 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
4427 0 substr($text,0,length($current_match),q{});
4428 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4429 . $current_match . q{])},
4430 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4431 if defined $::RD_TRACE;
4432 0 push @item, $item{__PATTERN1__}=$current_match;
4433
4434  
4435 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4436 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4437 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4438 $tracelevel)
4439 if defined $::RD_TRACE;
4440 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
4441 0 $expectation->is(q{exp})->at($text);
4442 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
4443 {
4444
4445 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4446 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4447 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4448 $tracelevel)
4449 if defined $::RD_TRACE;
4450 0 $expectation->failed();
4451 0 last;
4452 }
4453 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4454 . $_tok . q{]},
4455  
4456 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4457 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4458 $tracelevel)
4459 if defined $::RD_TRACE;
4460 0 $item{q{exp}} = $_tok;
4461 0 push @item, $_tok;
4462
4463 }
4464  
4465 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4466 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4467 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4468 $tracelevel)
4469 if defined $::RD_TRACE;
4470
4471  
4472 0 ▶ $_tok = ($_noactions) ? 0 : do { [ 'varname/output-string' => $item[2] ] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
4473 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
4474 {
4475 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4476 if defined $::RD_TRACE;
4477 0 last;
4478 }
4479 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4480 . $_tok . q{])},
4481 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4482 if defined $::RD_TRACE;
4483 0 push @item, $_tok;
4484 0 $item{__ACTION1__}=$_tok;
4485
4486  
4487 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/--output-string|:S/ exp]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4488 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4489 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4490 $tracelevel)
4491 if defined $::RD_TRACE;
4492  
4493  
4494  
4495 0 $_matched = 1;
4496 0 last;
4497 }
4498  
4499  
4500 6 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 4 2 6
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
204
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
4501 {
4502
4503 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/--no-output|:N/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4504 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4505 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4506 $tracelevel)
4507 if defined $::RD_TRACE;
4508 4 my $thisprod = $thisrule->{"prods"}[7];
4509 4 $text = $_[1];
4510 4 my $_savetext;
4511 4 @item = (q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
4512 4 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command});
4513 4 my $repcount = 0;
4514  
4515  
4516 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/--no-output|:N/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
4517 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4518 $tracelevel)
4519 if defined $::RD_TRACE;
4520 4 undef $lastsep;
4521 4 $expectation->is(q{})->at($text);
4522
4523  
4524 4 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:--no-output|:N)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--no-output|:N)/) 2 2 4
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--no-output|:N)/
!ll&&!rl&&r
022
($lastsep = $1) && ''
!ll
04
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:--no-output|:N)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:--no-output|:N)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:--no-output|:N)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
4525 {
4526 2 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 2 0 2
4527 2 $expectation->failed();
4528 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
4529 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4530 if defined $::RD_TRACE;
4531  
4532 2 last;
4533 }
4534 2 $current_match = substr($text, $-[0], $+[0] - $-[0]);
4535 2 substr($text,0,length($current_match),q{});
4536 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
4537 . $current_match . q{])},
4538 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4539 if defined $::RD_TRACE;
4540 2 push @item, $item{__PATTERN1__}=$current_match;
4541
4542  
4543 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
4544 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4545 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4546 $tracelevel)
4547 if defined $::RD_TRACE;
4548
4549  
4550 2 ▶ $_tok = ($_noactions) ? 0 : do { [ '/no-output' => 1 ] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 2 2
4551 2 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 2 2
4552 {
4553 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4554 if defined $::RD_TRACE;
4555 0 last;
4556 }
4557 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
4558 . $_tok . q{])},
4559 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4560 if defined $::RD_TRACE;
4561 2 push @item, $_tok;
4562 2 $item{__ACTION1__}=$_tok;
4563
4564  
4565 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/--no-output|:N/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
4566 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4567 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4568 $tracelevel)
4569 if defined $::RD_TRACE;
4570  
4571  
4572  
4573 2 $_matched = 1;
4574 2 last;
4575 }
4576  
4577  
4578 6 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 2 4 6
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
402
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
4579 {
4580
4581  
4582 2 $_[1] = $text; # NOT SURE THIS IS NEEDED
4583 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
4584 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4585 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4586 $tracelevel)
4587 if defined $::RD_TRACE;
4588 2 return undef;
4589 }
4590 4 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 4 4
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
040
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
4591 {
4592 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4593 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4594 $tracelevel)
4595 if defined $::RD_TRACE;
4596 0 $return = $score_return;
4597 }
4598 4 splice @{$thisparser->{errors}}, $err_at;
4599 4 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 4 0 4
4600 4 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 4 4
4601 {
4602 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
4603 $return . q{])}, "",
4604 q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4605 $tracelevel);
4606 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
4607 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
4608 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4609 , q{_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command},
4610 $tracelevel)
4611 }
4612 4 $_[1] = $text;
4613 4 return $return;
4614 }
4615  
4616 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
4617 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_local_var
4618 23 ▶{
Subroutine _alternation_1_of_production_1_of_rule_local_var: called CC=24 SCAR=34.3
4619 23 my $thisparser = $_[0];
4620 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
4621 23 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
230
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
4622 23 $ERRORS = 0;
4623 23 my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_1_of_rule_local_var"};
4624  
4625 23 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [_alternation_1_of_production_1_of_rule_local_var]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 23 23
4626 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4627 q{_alternation_1_of_production_1_of_rule_local_var},
4628 $tracelevel)
4629 if defined $::RD_TRACE;
4630  
4631
4632 23 my $err_at = @{$thisparser->{errors}};
4633  
4634 23 my $score;
4635 my $score_return;
4636 23 my $_tok;
4637 23 my $return = undef;
4638 23 my $_matched=0;
4639 23 my $commit=0;
4640 23 my @item = ();
4641 23 my %item = ();
4642 23 my $repeating = $_[2];
4643 23 my $_noactions = $_[3];
4644 23 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 23 0 23
4645 23 my $_itempos = $_[5];
4646 23 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 23 0 23
4647 23 my $text;
4648 my $lastsep;
4649 23 my $current_match;
4650 23 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(local|my)\\s/});
4651 23 $expectation->at($_[1]);
4652
4653 23 my $thisoffset;
4654 23 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
4655
4656 23 my $thiscolumn;
4657 23 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
4658
4659 23 my $thisline;
4660 23 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
4661  
4662
4663  
4664 23 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 23 0 23
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0023
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
4665 {
4666
4667 23 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(local|my)\\s/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 23 23
4668 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4669 q{_alternation_1_of_production_1_of_rule_local_var},
4670 $tracelevel)
4671 if defined $::RD_TRACE;
4672 23 my $thisprod = $thisrule->{"prods"}[0];
4673 23 $text = $_[1];
4674 23 my $_savetext;
4675 23 @item = (q{_alternation_1_of_production_1_of_rule_local_var});
4676 23 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_local_var});
4677 23 my $repcount = 0;
4678  
4679  
4680 23 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(local|my)\\s/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 23 23
4681 q{_alternation_1_of_production_1_of_rule_local_var},
4682 $tracelevel)
4683 if defined $::RD_TRACE;
4684 23 undef $lastsep;
4685 23 $expectation->is(q{})->at($text);
4686
4687  
4688 23 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(local|my)\s)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(local|my)\s)/) 16 7 23
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(local|my)\s)/
!ll&&!rl&&r
0167
($lastsep = $1) && ''
!ll
023
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(local|my)\s)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(local|my)\s)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(local|my)\s)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
4689 {
4690 16 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 16 0 16
4691 16 $expectation->failed();
4692 16 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 16 16
4693 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4694 if defined $::RD_TRACE;
4695  
4696 16 last;
4697 }
4698 7 $current_match = substr($text, $-[0], $+[0] - $-[0]);
4699 7 substr($text,0,length($current_match),q{});
4700 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
4701 . $current_match . q{])},
4702 XML::XSH2::Parser::_Runtime::_tracefirst($text))
4703 if defined $::RD_TRACE;
4704 7 push @item, $item{__PATTERN1__}=$current_match;
4705
4706  
4707 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(local|my)\\s/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
4708 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4709 q{_alternation_1_of_production_1_of_rule_local_var},
4710 $tracelevel)
4711 if defined $::RD_TRACE;
4712  
4713  
4714  
4715 7 $_matched = 1;
4716 7 last;
4717 }
4718  
4719  
4720 23 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 16 7 23
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
7016
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
4721 {
4722
4723  
4724 16 $_[1] = $text; # NOT SURE THIS IS NEEDED
4725 16 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 16 16
4726 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4727 q{_alternation_1_of_production_1_of_rule_local_var},
4728 $tracelevel)
4729 if defined $::RD_TRACE;
4730 16 return undef;
4731 }
4732 7 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 7 7
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
070
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
4733 {
4734 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4735 q{_alternation_1_of_production_1_of_rule_local_var},
4736 $tracelevel)
4737 if defined $::RD_TRACE;
4738 0 $return = $score_return;
4739 }
4740 7 splice @{$thisparser->{errors}}, $err_at;
4741 7 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 7 0 7
4742 7 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 7 7
4743 {
4744 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
4745 $return . q{])}, "",
4746 q{_alternation_1_of_production_1_of_rule_local_var},
4747 $tracelevel);
4748 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
4749 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
4750 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4751 , q{_alternation_1_of_production_1_of_rule_local_var},
4752 $tracelevel)
4753 }
4754 7 $_[1] = $text;
4755 7 return $return;
4756 }
4757  
4758 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
4759 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_xpcont
4760 931 ▶{
Subroutine _alternation_1_of_production_1_of_rule_xpcont: called CC=29 SCAR=35.6
4761 931 my $thisparser = $_[0];
4762 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
4763 931 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
9310
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
4764 931 $ERRORS = 0;
4765 931 my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_1_of_rule_xpcont"};
4766  
4767 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [_alternation_1_of_production_1_of_rule_xpcont]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
4768 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4769 q{_alternation_1_of_production_1_of_rule_xpcont},
4770 $tracelevel)
4771 if defined $::RD_TRACE;
4772  
4773
4774 931 my $err_at = @{$thisparser->{errors}};
4775  
4776 931 my $score;
4777 my $score_return;
4778 931 my $_tok;
4779 931 my $return = undef;
4780 931 my $_matched=0;
4781 931 my $commit=0;
4782 931 my @item = ();
4783 931 my %item = ();
4784 931 my $repeating = $_[2];
4785 931 my $_noactions = $_[3];
4786 931 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 931 0 931
4787 931 my $_itempos = $_[5];
4788 931 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 931 0 931
4789 931 my $text;
4790 my $lastsep;
4791 931 my $current_match;
4792 931 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{xpfilters, or xpbrackets});
4793 931 $expectation->at($_[1]);
4794
4795 931 my $thisoffset;
4796 931 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
4797
4798 931 my $thiscolumn;
4799 931 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
4800
4801 931 my $thisline;
4802 931 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
4803  
4804
4805  
4806 931 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 931 0 931
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00931
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
4807 {
4808
4809 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpfilters]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
4810 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4811 q{_alternation_1_of_production_1_of_rule_xpcont},
4812 $tracelevel)
4813 if defined $::RD_TRACE;
4814 931 my $thisprod = $thisrule->{"prods"}[0];
4815 931 $text = $_[1];
4816 931 my $_savetext;
4817 931 @item = (q{_alternation_1_of_production_1_of_rule_xpcont});
4818 931 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_xpcont});
4819 931 my $repcount = 0;
4820  
4821  
4822 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpfilters]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
4823 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4824 q{_alternation_1_of_production_1_of_rule_xpcont},
4825 $tracelevel)
4826 if defined $::RD_TRACE;
4827 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
4828 931 $expectation->is(q{})->at($text);
4829 931 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpfilters($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpfilters($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 920 11 931
4830 {
4831
4832 920 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpfilters]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 920 920
4833 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4834 q{_alternation_1_of_production_1_of_rule_xpcont},
4835 $tracelevel)
4836 if defined $::RD_TRACE;
4837 920 $expectation->failed();
4838 920 last;
4839 }
4840 11 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpfilters]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 11 11
4841 . $_tok . q{]},
4842  
4843 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4844 q{_alternation_1_of_production_1_of_rule_xpcont},
4845 $tracelevel)
4846 if defined $::RD_TRACE;
4847 11 $item{q{xpfilters}} = $_tok;
4848 11 push @item, $_tok;
4849
4850 }
4851  
4852 11 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpfilters]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 11 11
4853 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4854 q{_alternation_1_of_production_1_of_rule_xpcont},
4855 $tracelevel)
4856 if defined $::RD_TRACE;
4857  
4858  
4859  
4860 11 $_matched = 1;
4861 11 last;
4862 }
4863  
4864  
4865 931 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 920 11 931
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
110920
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
4866 {
4867
4868 920 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpbrackets]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 920 920
4869 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4870 q{_alternation_1_of_production_1_of_rule_xpcont},
4871 $tracelevel)
4872 if defined $::RD_TRACE;
4873 920 my $thisprod = $thisrule->{"prods"}[1];
4874 920 $text = $_[1];
4875 920 my $_savetext;
4876 920 @item = (q{_alternation_1_of_production_1_of_rule_xpcont});
4877 920 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_xpcont});
4878 920 my $repcount = 0;
4879  
4880  
4881 920 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpbrackets]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 920 920
4882 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4883 q{_alternation_1_of_production_1_of_rule_xpcont},
4884 $tracelevel)
4885 if defined $::RD_TRACE;
4886 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
4887 920 $expectation->is(q{})->at($text);
4888 920 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpbrackets($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpbrackets($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 618 302 920
4889 {
4890
4891 618 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpbrackets]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 618 618
4892 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4893 q{_alternation_1_of_production_1_of_rule_xpcont},
4894 $tracelevel)
4895 if defined $::RD_TRACE;
4896 618 $expectation->failed();
4897 618 last;
4898 }
4899 302 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpbrackets]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 302 302
4900 . $_tok . q{]},
4901  
4902 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4903 q{_alternation_1_of_production_1_of_rule_xpcont},
4904 $tracelevel)
4905 if defined $::RD_TRACE;
4906 302 $item{q{xpbrackets}} = $_tok;
4907 302 push @item, $_tok;
4908
4909 }
4910  
4911 302 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpbrackets]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 302 302
4912 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4913 q{_alternation_1_of_production_1_of_rule_xpcont},
4914 $tracelevel)
4915 if defined $::RD_TRACE;
4916  
4917  
4918  
4919 302 $_matched = 1;
4920 302 last;
4921 }
4922  
4923  
4924 931 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 618 313 931
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
3130618
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
4925 {
4926
4927  
4928 618 $_[1] = $text; # NOT SURE THIS IS NEEDED
4929 618 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 618 618
4930 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4931 q{_alternation_1_of_production_1_of_rule_xpcont},
4932 $tracelevel)
4933 if defined $::RD_TRACE;
4934 618 return undef;
4935 }
4936 313 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 313 313
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
03130
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
4937 {
4938 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
4939 q{_alternation_1_of_production_1_of_rule_xpcont},
4940 $tracelevel)
4941 if defined $::RD_TRACE;
4942 0 $return = $score_return;
4943 }
4944 313 splice @{$thisparser->{errors}}, $err_at;
4945 313 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 313 0 313
4946 313 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 313 313
4947 {
4948 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
4949 $return . q{])}, "",
4950 q{_alternation_1_of_production_1_of_rule_xpcont},
4951 $tracelevel);
4952 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
4953 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
4954 XML::XSH2::Parser::_Runtime::_tracefirst($text),
4955 , q{_alternation_1_of_production_1_of_rule_xpcont},
4956 $tracelevel)
4957 }
4958 313 $_[1] = $text;
4959 313 return $return;
4960 }
4961  
4962 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
4963 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_xpintercont
4964 1647 ▶{
Subroutine _alternation_1_of_production_1_of_rule_xpintercont: called CC=29 SCAR=35.6
4965 1647 my $thisparser = $_[0];
4966 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
4967 1647 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
16470
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
4968 1647 $ERRORS = 0;
4969 1647 my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_1_of_rule_xpintercont"};
4970  
4971 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [_alternation_1_of_production_1_of_rule_xpintercont]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
4972 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
4973 q{_alternation_1_of_production_1_of_rule_xpintercont},
4974 $tracelevel)
4975 if defined $::RD_TRACE;
4976  
4977
4978 1647 my $err_at = @{$thisparser->{errors}};
4979  
4980 1647 my $score;
4981 my $score_return;
4982 1647 my $_tok;
4983 1647 my $return = undef;
4984 1647 my $_matched=0;
4985 1647 my $commit=0;
4986 1647 my @item = ();
4987 1647 my %item = ();
4988 1647 my $repeating = $_[2];
4989 1647 my $_noactions = $_[3];
4990 1647 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1647 0 1647
4991 1647 my $_itempos = $_[5];
4992 1647 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1647 0 1647
4993 1647 my $text;
4994 my $lastsep;
4995 1647 my $current_match;
4996 1647 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{xpfilters, or xpbrackets});
4997 1647 $expectation->at($_[1]);
4998
4999 1647 my $thisoffset;
5000 1647 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
5001
5002 1647 my $thiscolumn;
5003 1647 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
5004
5005 1647 my $thisline;
5006 1647 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
5007  
5008
5009  
5010 1647 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1647 0 1647
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001647
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
5011 {
5012
5013 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpfilters]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
5014 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5015 q{_alternation_1_of_production_1_of_rule_xpintercont},
5016 $tracelevel)
5017 if defined $::RD_TRACE;
5018 1647 my $thisprod = $thisrule->{"prods"}[0];
5019 1647 $text = $_[1];
5020 1647 my $_savetext;
5021 1647 @item = (q{_alternation_1_of_production_1_of_rule_xpintercont});
5022 1647 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_xpintercont});
5023 1647 my $repcount = 0;
5024  
5025  
5026 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpfilters]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
5027 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5028 q{_alternation_1_of_production_1_of_rule_xpintercont},
5029 $tracelevel)
5030 if defined $::RD_TRACE;
5031 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
5032 1647 $expectation->is(q{})->at($text);
5033 1647 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpfilters($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpfilters($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 1565 82 1647
5034 {
5035
5036 1565 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpfilters]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1565 1565
5037 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5038 q{_alternation_1_of_production_1_of_rule_xpintercont},
5039 $tracelevel)
5040 if defined $::RD_TRACE;
5041 1565 $expectation->failed();
5042 1565 last;
5043 }
5044 82 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpfilters]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 82 82
5045 . $_tok . q{]},
5046  
5047 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5048 q{_alternation_1_of_production_1_of_rule_xpintercont},
5049 $tracelevel)
5050 if defined $::RD_TRACE;
5051 82 $item{q{xpfilters}} = $_tok;
5052 82 push @item, $_tok;
5053
5054 }
5055  
5056 82 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpfilters]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 82 82
5057 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5058 q{_alternation_1_of_production_1_of_rule_xpintercont},
5059 $tracelevel)
5060 if defined $::RD_TRACE;
5061  
5062  
5063  
5064 82 $_matched = 1;
5065 82 last;
5066 }
5067  
5068  
5069 1647 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1565 82 1647
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
8201565
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
5070 {
5071
5072 1565 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpbrackets]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1565 1565
5073 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5074 q{_alternation_1_of_production_1_of_rule_xpintercont},
5075 $tracelevel)
5076 if defined $::RD_TRACE;
5077 1565 my $thisprod = $thisrule->{"prods"}[1];
5078 1565 $text = $_[1];
5079 1565 my $_savetext;
5080 1565 @item = (q{_alternation_1_of_production_1_of_rule_xpintercont});
5081 1565 %item = (__RULE__ => q{_alternation_1_of_production_1_of_rule_xpintercont});
5082 1565 my $repcount = 0;
5083  
5084  
5085 1565 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpbrackets]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1565 1565
5086 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5087 q{_alternation_1_of_production_1_of_rule_xpintercont},
5088 $tracelevel)
5089 if defined $::RD_TRACE;
5090 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
5091 1565 $expectation->is(q{})->at($text);
5092 1565 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpbrackets($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpbrackets($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 1150 415 1565
5093 {
5094
5095 1150 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpbrackets]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1150 1150
5096 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5097 q{_alternation_1_of_production_1_of_rule_xpintercont},
5098 $tracelevel)
5099 if defined $::RD_TRACE;
5100 1150 $expectation->failed();
5101 1150 last;
5102 }
5103 415 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpbrackets]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 415 415
5104 . $_tok . q{]},
5105  
5106 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5107 q{_alternation_1_of_production_1_of_rule_xpintercont},
5108 $tracelevel)
5109 if defined $::RD_TRACE;
5110 415 $item{q{xpbrackets}} = $_tok;
5111 415 push @item, $_tok;
5112
5113 }
5114  
5115 415 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpbrackets]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 415 415
5116 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5117 q{_alternation_1_of_production_1_of_rule_xpintercont},
5118 $tracelevel)
5119 if defined $::RD_TRACE;
5120  
5121  
5122  
5123 415 $_matched = 1;
5124 415 last;
5125 }
5126  
5127  
5128 1647 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 1150 497 1647
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
49701150
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
5129 {
5130
5131  
5132 1150 $_[1] = $text; # NOT SURE THIS IS NEEDED
5133 1150 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1150 1150
5134 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5135 q{_alternation_1_of_production_1_of_rule_xpintercont},
5136 $tracelevel)
5137 if defined $::RD_TRACE;
5138 1150 return undef;
5139 }
5140 497 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 497 497
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
04970
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
5141 {
5142 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5143 q{_alternation_1_of_production_1_of_rule_xpintercont},
5144 $tracelevel)
5145 if defined $::RD_TRACE;
5146 0 $return = $score_return;
5147 }
5148 497 splice @{$thisparser->{errors}}, $err_at;
5149 497 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 497 0 497
5150 497 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 497 497
5151 {
5152 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
5153 $return . q{])}, "",
5154 q{_alternation_1_of_production_1_of_rule_xpintercont},
5155 $tracelevel);
5156 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
5157 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
5158 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5159 , q{_alternation_1_of_production_1_of_rule_xpintercont},
5160 $tracelevel)
5161 }
5162 497 $_[1] = $text;
5163 497 return $return;
5164 }
5165  
5166 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
5167 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_2_of_rule_command
5168 240 ▶{
Subroutine _alternation_1_of_production_2_of_rule_command: called CC=58 SCAR=51.8
5169 240 my $thisparser = $_[0];
5170 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
5171 240 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
2400
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
5172 240 $ERRORS = 0;
5173 240 my $thisrule = $thisparser->{"rules"}{"_alternation_1_of_production_2_of_rule_command"};
5174  
5175 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [_alternation_1_of_production_2_of_rule_command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
5176 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5177 q{_alternation_1_of_production_2_of_rule_command},
5178 $tracelevel)
5179 if defined $::RD_TRACE;
5180  
5181
5182 240 my $err_at = @{$thisparser->{errors}};
5183  
5184 240 my $score;
5185 my $score_return;
5186 240 my $_tok;
5187 240 my $return = undef;
5188 240 my $_matched=0;
5189 240 my $commit=0;
5190 240 my @item = ();
5191 240 my %item = ();
5192 240 my $repeating = $_[2];
5193 240 my $_noactions = $_[3];
5194 240 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 240 0 240
5195 240 my $_itempos = $_[5];
5196 240 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 240 0 240
5197 240 my $text;
5198 my $lastsep;
5199 240 my $current_match;
5200 240 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/, or /\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/});
5201 240 $expectation->at($_[1]);
5202
5203 240 my $thisoffset;
5204 240 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
5205
5206 240 my $thiscolumn;
5207 240 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
5208
5209 240 my $thisline;
5210 240 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
5211  
5212
5213  
5214 240 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 240 0 240
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00240
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
5215 {
5216
5217 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/ <commit> loose_exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
5218 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5219 q{_alternation_1_of_production_2_of_rule_command},
5220 $tracelevel)
5221 if defined $::RD_TRACE;
5222 240 my $thisprod = $thisrule->{"prods"}[0];
5223 240 $text = $_[1];
5224 240 my $_savetext;
5225 240 @item = (q{_alternation_1_of_production_2_of_rule_command});
5226 240 %item = (__RULE__ => q{_alternation_1_of_production_2_of_rule_command});
5227 240 my $repcount = 0;
5228  
5229  
5230 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
5231 q{_alternation_1_of_production_2_of_rule_command},
5232 $tracelevel)
5233 if defined $::RD_TRACE;
5234 240 undef $lastsep;
5235 240 $expectation->is(q{})->at($text);
5236
5237  
5238 240 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?:[\-\+\*\/%x.]|\|\||\&\&)?=)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:(?:[\-\+\*/%x.]|\|\||\&\&)?=)]) 48 192 240
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:(?:[\-\+\*/%x.]|\|\||\&\&)?=)]
!ll&&!rl&&r
048192
($lastsep = $1) && ''
!ll
34206
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:(?:[\-\+\*/%x.]|\|\||\&\&)?=)]
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ m[\A(?:(?:[\-\+\*/%x.]|\|\||\&\&)?=)]
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ m[\A(?:(?:[\-\+\*/%x.]|\|\||\&\&)?=)]
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
5239 {
5240 48 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 48 0 48
5241 48 $expectation->failed();
5242 48 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 48 48
5243 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5244 if defined $::RD_TRACE;
5245  
5246 48 last;
5247 }
5248 192 $current_match = substr($text, $-[0], $+[0] - $-[0]);
5249 192 substr($text,0,length($current_match),q{});
5250 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
5251 . $current_match . q{])},
5252 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5253 if defined $::RD_TRACE;
5254 192 push @item, $item{__PATTERN1__}=$current_match;
5255
5256  
5257
5258  
5259 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
5260 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5261 q{_alternation_1_of_production_2_of_rule_command},
5262 $tracelevel)
5263 if defined $::RD_TRACE;
5264 192 $_tok = do { $commit = 1 };
5265 192 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 192 0 192
5266 {
5267 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
5268 . $_tok . q{])},
5269 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5270 if defined $::RD_TRACE;
5271 }
5272 else
5273 {
5274 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5275 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5276 if defined $::RD_TRACE;
5277 }
5278
5279 192 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 192 192
5280 192 push @item, $item{__DIRECTIVE1__}=$_tok;
5281
5282  
5283 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [loose_exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
5284 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5285 q{_alternation_1_of_production_2_of_rule_command},
5286 $tracelevel)
5287 if defined $::RD_TRACE;
5288 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
5289 192 $expectation->is(q{loose_exp})->at($text);
5290 192 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::loose_exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = loose_exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 192 192
5291 {
5292
5293 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [loose_exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5294 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5295 q{_alternation_1_of_production_2_of_rule_command},
5296 $tracelevel)
5297 if defined $::RD_TRACE;
5298 0 $expectation->failed();
5299 0 last;
5300 }
5301 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [loose_exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
5302 . $_tok . q{]},
5303  
5304 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5305 q{_alternation_1_of_production_2_of_rule_command},
5306 $tracelevel)
5307 if defined $::RD_TRACE;
5308 192 $item{q{loose_exp}} = $_tok;
5309 192 push @item, $_tok;
5310
5311 }
5312  
5313 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
5314 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5315 q{_alternation_1_of_production_2_of_rule_command},
5316 $tracelevel)
5317 if defined $::RD_TRACE;
5318
5319  
5320 192 ▶ $_tok = ($_noactions) ? 0 : do { ['xpath_assign',$item[3],$item[1]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 192 192
5321 192 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 192 192
5322 {
5323 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5324 if defined $::RD_TRACE;
5325 0 last;
5326 }
5327 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
5328 . $_tok . q{])},
5329 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5330 if defined $::RD_TRACE;
5331 192 push @item, $_tok;
5332 192 $item{__ACTION1__}=$_tok;
5333
5334  
5335 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/ <commit> loose_exp]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
5336 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5337 q{_alternation_1_of_production_2_of_rule_command},
5338 $tracelevel)
5339 if defined $::RD_TRACE;
5340  
5341  
5342  
5343 192 $_matched = 1;
5344 192 last;
5345 }
5346  
5347  
5348 240 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 48 192 240
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
192048
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
5349 {
5350
5351 48 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/ command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 48 48
5352 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5353 q{_alternation_1_of_production_2_of_rule_command},
5354 $tracelevel)
5355 if defined $::RD_TRACE;
5356 48 my $thisprod = $thisrule->{"prods"}[1];
5357 48 $text = $_[1];
5358 48 my $_savetext;
5359 48 @item = (q{_alternation_1_of_production_2_of_rule_command});
5360 48 %item = (__RULE__ => q{_alternation_1_of_production_2_of_rule_command});
5361 48 my $repcount = 0;
5362  
5363  
5364 48 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 48 48
5365 q{_alternation_1_of_production_2_of_rule_command},
5366 $tracelevel)
5367 if defined $::RD_TRACE;
5368 48 undef $lastsep;
5369 48 $expectation->is(q{})->at($text);
5370
5371  
5372 48 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\s*(?:[\-\+\*\/%x.]|\|\||\&\&)?:=)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:\s*(?:[\-\+\*/%x.]|\|\||\&\&)?:=)]) 0 48 48
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:\s*(?:[\-\+\*/%x.]|\|\||\&\&)?:=)]
!ll&&!rl&&r
0048
($lastsep = $1) && ''
!ll
048
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:\s*(?:[\-\+\*/%x.]|\|\||\&\&)?:=)]
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ m[\A(?:\s*(?:[\-\+\*/%x.]|\|\||\&\&)?:=)]
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ m[\A(?:\s*(?:[\-\+\*/%x.]|\|\||\&\&)?:=)]
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
5373 {
5374 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
5375 0 $expectation->failed();
5376 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5377 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5378 if defined $::RD_TRACE;
5379  
5380 0 last;
5381 }
5382 48 $current_match = substr($text, $-[0], $+[0] - $-[0]);
5383 48 substr($text,0,length($current_match),q{});
5384 48 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 48 48
5385 . $current_match . q{])},
5386 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5387 if defined $::RD_TRACE;
5388 48 push @item, $item{__PATTERN1__}=$current_match;
5389
5390  
5391 48 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 48 48
5392 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5393 q{_alternation_1_of_production_2_of_rule_command},
5394 $tracelevel)
5395 if defined $::RD_TRACE;
5396 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
5397 48 $expectation->is(q{command})->at($text);
5398 48 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = command($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 48 48
5399 {
5400
5401 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [command]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5402 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5403 q{_alternation_1_of_production_2_of_rule_command},
5404 $tracelevel)
5405 if defined $::RD_TRACE;
5406 0 $expectation->failed();
5407 0 last;
5408 }
5409 48 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [command]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 48 48
5410 . $_tok . q{]},
5411  
5412 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5413 q{_alternation_1_of_production_2_of_rule_command},
5414 $tracelevel)
5415 if defined $::RD_TRACE;
5416 48 $item{q{command}} = $_tok;
5417 48 push @item, $_tok;
5418
5419 }
5420  
5421 48 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 48 48
5422 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5423 q{_alternation_1_of_production_2_of_rule_command},
5424 $tracelevel)
5425 if defined $::RD_TRACE;
5426
5427  
5428 48 ▶ $_tok = ($_noactions) ? 0 : do { ['command_assign',$item[2],$item[1]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 48 48
5429 48 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 48 48
5430 {
5431 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5432 if defined $::RD_TRACE;
5433 0 last;
5434 }
5435 48 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 48 48
5436 . $_tok . q{])},
5437 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5438 if defined $::RD_TRACE;
5439 48 push @item, $_tok;
5440 48 $item{__ACTION1__}=$_tok;
5441
5442  
5443 48 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/ command]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 48 48
5444 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5445 q{_alternation_1_of_production_2_of_rule_command},
5446 $tracelevel)
5447 if defined $::RD_TRACE;
5448  
5449  
5450  
5451 48 $_matched = 1;
5452 48 last;
5453 }
5454  
5455  
5456 240 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 240 240
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
24000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
5457 {
5458
5459  
5460 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
5461 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5462 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5463 q{_alternation_1_of_production_2_of_rule_command},
5464 $tracelevel)
5465 if defined $::RD_TRACE;
5466 0 return undef;
5467 }
5468 240 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 240 240
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
02400
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
5469 {
5470 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5471 q{_alternation_1_of_production_2_of_rule_command},
5472 $tracelevel)
5473 if defined $::RD_TRACE;
5474 0 $return = $score_return;
5475 }
5476 240 splice @{$thisparser->{errors}}, $err_at;
5477 240 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 240 0 240
5478 240 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 240 240
5479 {
5480 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
5481 $return . q{])}, "",
5482 q{_alternation_1_of_production_2_of_rule_command},
5483 $tracelevel);
5484 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
5485 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
5486 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5487 , q{_alternation_1_of_production_2_of_rule_command},
5488 $tracelevel)
5489 }
5490 240 $_[1] = $text;
5491 240 return $return;
5492 }
5493  
5494 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
5495 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block
5496 278 ▶{
Subroutine block: called CC=45 SCAR=46.1
5497 278 my $thisparser = $_[0];
5498 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
5499 278 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
2780
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
5500 278 $ERRORS = 0;
5501 278 my $thisrule = $thisparser->{"rules"}{"block"};
5502  
5503 278 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 278 278
5504 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5505 q{block},
5506 $tracelevel)
5507 if defined $::RD_TRACE;
5508  
5509
5510 278 my $err_at = @{$thisparser->{errors}};
5511  
5512 278 my $score;
5513 my $score_return;
5514 278 my $_tok;
5515 278 my $return = undef;
5516 278 my $_matched=0;
5517 278 my $commit=0;
5518 278 my @item = ();
5519 278 my %item = ();
5520 278 my $repeating = $_[2];
5521 278 my $_noactions = $_[3];
5522 278 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 278 0 278
5523 278 my $_itempos = $_[5];
5524 278 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 278 0 278
5525 278 my $text;
5526 my $lastsep;
5527 278 my $current_match;
5528 278 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{'\{'});
5529 278 $expectation->at($_[1]);
5530
5531 278 my $thisoffset;
5532 278 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
5533
5534 278 my $thiscolumn;
5535 278 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
5536
5537 278 my $thisline;
5538 278 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
5539  
5540
5541  
5542 278 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 278 0 278
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00278
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
5543 {
5544
5545 278 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: ['\{' <commit> complex_command '\}']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 278 278
5546 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5547 q{block},
5548 $tracelevel)
5549 if defined $::RD_TRACE;
5550 278 my $thisprod = $thisrule->{"prods"}[0];
5551 278 $text = $_[1];
5552 278 my $_savetext;
5553 278 @item = (q{block});
5554 278 %item = (__RULE__ => q{block});
5555 278 my $repcount = 0;
5556  
5557  
5558 278 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['\{']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 278 278
5559 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5560 q{block},
5561 $tracelevel)
5562 if defined $::RD_TRACE;
5563 278 undef $lastsep;
5564 278 $expectation->is(q{})->at($text);
5565
5566  
5567 278 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\{/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\{/) 222 56 278
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\{/
!ll&&!rl&&r
022256
($lastsep = $1) && ''
!ll
2276
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\{/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\{/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\{/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
5568 {
5569 222 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 222 0 222
5570
5571 222 $expectation->failed();
5572 222 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 222 222
5573 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5574 if defined $::RD_TRACE;
5575 222 last;
5576 }
5577 56 $current_match = substr($text, $-[0], $+[0] - $-[0]);
5578 56 substr($text,0,length($current_match),q{});
5579 56 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 56 56
5580 . $current_match . q{])},
5581 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5582 if defined $::RD_TRACE;
5583 56 push @item, $item{__STRING1__}=$current_match;
5584
5585  
5586
5587  
5588 56 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 56 56
5589 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5590 q{block},
5591 $tracelevel)
5592 if defined $::RD_TRACE;
5593 56 $_tok = do { $commit = 1 };
5594 56 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 56 0 56
5595 {
5596 56 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 56 56
5597 . $_tok . q{])},
5598 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5599 if defined $::RD_TRACE;
5600 }
5601 else
5602 {
5603 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5604 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5605 if defined $::RD_TRACE;
5606 }
5607
5608 56 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 56 56
5609 56 push @item, $item{__DIRECTIVE1__}=$_tok;
5610
5611  
5612 56 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [complex_command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 56 56
5613 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5614 q{block},
5615 $tracelevel)
5616 if defined $::RD_TRACE;
5617 56 $expectation->is(q{complex_command})->at($text);
5618
5619 56 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::complex_command, 1, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::complex_command, 1, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 56 56
5620 {
5621 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [complex_command]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5622 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5623 q{block},
5624 $tracelevel)
5625 if defined $::RD_TRACE;
5626 0 last;
5627 }
5628 56 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [complex_command]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 56 56
5629 . @$_tok . q{ times)},
5630  
5631 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5632 q{block},
5633 $tracelevel)
5634 if defined $::RD_TRACE;
5635 56 $item{q{complex_command(s)}} = $_tok;
5636 56 push @item, $_tok;
5637
5638  
5639  
5640 56 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['\}']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 56 56
5641 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5642 q{block},
5643 $tracelevel)
5644 if defined $::RD_TRACE;
5645 56 undef $lastsep;
5646 56 $expectation->is(q{'\}'})->at($text);
5647
5648  
5649 56 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\}/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\}/) 0 56 56
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\}/
!ll&&!rl&&r
0056
($lastsep = $1) && ''
!ll
2333
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\}/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\}/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\}/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
5650 {
5651 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
5652
5653 0 $expectation->failed();
5654 0 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5655 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5656 if defined $::RD_TRACE;
5657 0 last;
5658 }
5659 56 $current_match = substr($text, $-[0], $+[0] - $-[0]);
5660 56 substr($text,0,length($current_match),q{});
5661 56 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 56 56
5662 . $current_match . q{])},
5663 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5664 if defined $::RD_TRACE;
5665 56 push @item, $item{__STRING2__}=$current_match;
5666
5667  
5668 56 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 56 56
5669 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5670 q{block},
5671 $tracelevel)
5672 if defined $::RD_TRACE;
5673
5674  
5675 56 ▶ $_tok = ($_noactions) ? 0 : do { [grep ref,@{$item[3]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 56 56
5676 56 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 56 56
5677 {
5678 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5679 if defined $::RD_TRACE;
5680 0 last;
5681 }
5682 56 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 56 56
5683 . $_tok . q{])},
5684 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5685 if defined $::RD_TRACE;
5686 56 push @item, $_tok;
5687 56 $item{__ACTION1__}=$_tok;
5688
5689  
5690 56 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: ['\{' <commit> complex_command '\}']<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 56 56
5691 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5692 q{block},
5693 $tracelevel)
5694 if defined $::RD_TRACE;
5695  
5696  
5697  
5698 56 $_matched = 1;
5699 56 last;
5700 }
5701  
5702  
5703 278 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 222 56 278
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
560222
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
5704 {
5705
5706  
5707 222 $_[1] = $text; # NOT SURE THIS IS NEEDED
5708 222 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 222 222
5709 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5710 q{block},
5711 $tracelevel)
5712 if defined $::RD_TRACE;
5713 222 return undef;
5714 }
5715 56 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 56 56
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
0560
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
5716 {
5717 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5718 q{block},
5719 $tracelevel)
5720 if defined $::RD_TRACE;
5721 0 $return = $score_return;
5722 }
5723 56 splice @{$thisparser->{errors}}, $err_at;
5724 56 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 56 0 56
5725 56 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 56 56
5726 {
5727 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
5728 $return . q{])}, "",
5729 q{block},
5730 $tracelevel);
5731 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
5732 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
5733 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5734 , q{block},
5735 $tracelevel)
5736 }
5737 56 $_[1] = $text;
5738 56 return $return;
5739 }
5740  
5741 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
5742 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::command
5743 1136 ▶{
Subroutine command: called CC=389 SCAR=97.9
5744 1136 my $thisparser = $_[0];
5745 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
5746 1136 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
11360
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
5747 1136 $ERRORS = 0;
5748 1136 my $thisrule = $thisparser->{"rules"}{"command"};
5749  
5750 1136 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1136 1136
5751 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5752 q{command},
5753 $tracelevel)
5754 if defined $::RD_TRACE;
5755  
5756
5757 1136 my $err_at = @{$thisparser->{errors}};
5758  
5759 1136 my $score;
5760 my $score_return;
5761 1136 my $_tok;
5762 1136 my $return = undef;
5763 1136 my $_matched=0;
5764 1136 my $commit=0;
5765 1136 my @item = ();
5766 1136 my %item = ();
5767 1136 my $repeating = $_[2];
5768 1136 my $_noactions = $_[3];
5769 1136 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1136 0 1136
5770 1136 my $_itempos = $_[5];
5771 1136 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1136 0 1136
5772 1136 my $text;
5773 my $lastsep;
5774 1136 my $current_match;
5775 1136 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?=\\s*[\}\{;]|\\s*\\Z)/, or /assign\\b|(?:local\\b|my\\b)?(?=\\s*\\$[a-zA-Z_][a-zA-Z0-9_]*\\s*\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:?=)/, or /(my)\\b/, or /(local)\\b/, or /(do)\\b/, or /(if)\\b/, or /(unless)\\b/, or /(while)\\b/, or /(foreach|for)\\b/, or /(stream)\\b/, or /(undef|undefine)\\b/, or /(use)\\b/, or /(test-mode|test_mode)/, or /(run-mode|run_mode)/, or /(?!(?:iterate|try|def|define)\\b)/});
5776 1136 $expectation->at($_[1]);
5777
5778 1136 my $thisoffset;
5779 1136 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
5780
5781 1136 my $thiscolumn;
5782 1136 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
5783
5784 1136 my $thisline;
5785 1136 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
5786  
5787
5788  
5789 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1136 0 1136
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001136
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
5790 {
5791
5792 1136 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?=\\s*[\}\{;]|\\s*\\Z)/ <commit> <reject>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1136 1136
5793 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5794 q{command},
5795 $tracelevel)
5796 if defined $::RD_TRACE;
5797 1136 my $thisprod = $thisrule->{"prods"}[0];
5798 1136 $text = $_[1];
5799 1136 my $_savetext;
5800 1136 @item = (q{command});
5801 1136 %item = (__RULE__ => q{command});
5802 1136 my $repcount = 0;
5803  
5804  
5805 1136 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?=\\s*[\}\{;]|\\s*\\Z)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1136 1136
5806 q{command},
5807 $tracelevel)
5808 if defined $::RD_TRACE;
5809 1136 undef $lastsep;
5810 1136 $expectation->is(q{})->at($text);
5811
5812  
5813 1136 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\s*[}{;]|\s*\Z))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[}{;]|\s*\Z))/) 1136 0 1136
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[}{;]|\s*\Z))/
!ll&&!rl&&r
011360
($lastsep = $1) && ''
!ll
522614
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[}{;]|\s*\Z))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?=\s*[}{;]|\s*\Z))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?=\s*[}{;]|\s*\Z))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
5814 {
5815 1136 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 1136 0 1136
5816 1136 $expectation->failed();
5817 1136 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1136 1136
5818 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5819 if defined $::RD_TRACE;
5820  
5821 1136 last;
5822 }
5823 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
5824 0 substr($text,0,length($current_match),q{});
5825 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5826 . $current_match . q{])},
5827 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5828 if defined $::RD_TRACE;
5829 0 push @item, $item{__PATTERN1__}=$current_match;
5830
5831  
5832
5833  
5834 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5835 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5836 q{command},
5837 $tracelevel)
5838 if defined $::RD_TRACE;
5839 0 $_tok = do { $commit = 1 };
5840 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
5841 {
5842 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5843 . $_tok . q{])},
5844 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5845 if defined $::RD_TRACE;
5846 }
5847 else
5848 {
5849 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5850 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5851 if defined $::RD_TRACE;
5852 }
5853
5854 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
5855 0 push @item, $item{__DIRECTIVE1__}=$_tok;
5856
5857  
5858 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Rejecting production<< (found <reject>)},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5859 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5860 q{command},
5861 $tracelevel)
5862 if defined $::RD_TRACE;
5863 0 undef $return;
5864
5865  
5866 0 $_tok = undef;
5867
5868 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
5869  
5870 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?=\\s*[\}\{;]|\\s*\\Z)/ <commit> <reject>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5871 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5872 q{command},
5873 $tracelevel)
5874 if defined $::RD_TRACE;
5875  
5876  
5877  
5878 0 $_matched = 1;
5879 0 last;
5880 }
5881  
5882  
5883 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1136 0 1136
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001136
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
5884 {
5885
5886 1136 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/assign\\b|(?:local\\b|my\\b)?(?=\\s*\\$[a-zA-Z_][a-zA-Z0-9_]*\\s*\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:?=)/ <commit> variable /(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/, or /\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1136 1136
5887 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
5888 q{command},
5889 $tracelevel)
5890 if defined $::RD_TRACE;
5891 1136 my $thisprod = $thisrule->{"prods"}[1];
5892 1136 $text = $_[1];
5893 1136 my $_savetext;
5894 1136 @item = (q{command});
5895 1136 %item = (__RULE__ => q{command});
5896 1136 my $repcount = 0;
5897  
5898  
5899 1136 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/assign\\b|(?:local\\b|my\\b)?(?=\\s*\\$[a-zA-Z_][a-zA-Z0-9_]*\\s*\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:?=)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1136 1136
5900 q{command},
5901 $tracelevel)
5902 if defined $::RD_TRACE;
5903 1136 undef $lastsep;
5904 1136 $expectation->is(q{})->at($text);
5905
5906  
5907 1136 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:assign\b|(?:local\b|my\b)?(?=\s*\$[a-zA-Z_][a-zA-Z0-9_]*\s*\s*(?:[\-\+\*\/%x.]|\|\||\&\&)?:?=))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:assign\b|(?:local\b|my\b)?(?=\s*\$[a-zA-Z_][a-zA-Z0-9_]*\s*\s*(?:[\-\+\*/%x.]|\|\||\&\&)?:?=))]) 896 240 1136
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:assign\b|(?:local\b|my\b)?(?=\s*\$[a-zA-Z_][a-zA-Z0-9_]*\s*\s*(?:[\-\+\*/%x.]|\|\||\&\&)?:?=))]
!ll&&!rl&&r
0896240
($lastsep = $1) && ''
!ll
522614
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m[\A(?:assign\b|(?:local\b|my\b)?(?=\s*\$[a-zA-Z_][a-zA-Z0-9_]*\s*\s*(?:[\-\+\*/%x.]|\|\||\&\&)?:?=))]
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ m[\A(?:assign\b|(?:local\b|my\b)?(?=\s*\$[a-zA-Z_][a-zA-Z0-9_]*\s*\s*(?:[\-\+\*/%x.]|\|\||\&\&)?:?=))]
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ m[\A(?:assign\b|(?:local\b|my\b)?(?=\s*\$[a-zA-Z_][a-zA-Z0-9_]*\s*\s*(?:[\-\+\*/%x.]|\|\||\&\&)?:?=))]
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
5908 {
5909 896 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 896 0 896
5910 896 $expectation->failed();
5911 896 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 896 896
5912 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5913 if defined $::RD_TRACE;
5914  
5915 896 last;
5916 }
5917 240 $current_match = substr($text, $-[0], $+[0] - $-[0]);
5918 240 substr($text,0,length($current_match),q{});
5919 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
5920 . $current_match . q{])},
5921 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5922 if defined $::RD_TRACE;
5923 240 push @item, $item{__PATTERN1__}=$current_match;
5924
5925  
5926
5927  
5928 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
5929 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5930 q{command},
5931 $tracelevel)
5932 if defined $::RD_TRACE;
5933 240 $_tok = do { $commit = 1 };
5934 240 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 240 0 240
5935 {
5936 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
5937 . $_tok . q{])},
5938 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5939 if defined $::RD_TRACE;
5940 }
5941 else
5942 {
5943 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5944 XML::XSH2::Parser::_Runtime::_tracefirst($text))
5945 if defined $::RD_TRACE;
5946 }
5947
5948 240 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 240 240
5949 240 push @item, $item{__DIRECTIVE1__}=$_tok;
5950
5951  
5952 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
5953 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5954 q{command},
5955 $tracelevel)
5956 if defined $::RD_TRACE;
5957 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
5958 240 $expectation->is(q{variable})->at($text);
5959 240 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::variable($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = variable($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 240 240
5960 {
5961
5962 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [variable]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5963 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5964 q{command},
5965 $tracelevel)
5966 if defined $::RD_TRACE;
5967 0 $expectation->failed();
5968 0 last;
5969 }
5970 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [variable]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
5971 . $_tok . q{]},
5972  
5973 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5974 q{command},
5975 $tracelevel)
5976 if defined $::RD_TRACE;
5977 240 $item{q{variable}} = $_tok;
5978 240 push @item, $_tok;
5979
5980 }
5981  
5982 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [_alternation_1_of_production_2_of_rule_command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
5983 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5984 q{command},
5985 $tracelevel)
5986 if defined $::RD_TRACE;
5987 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
5988 240 $expectation->is(q{/(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/, or /\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/})->at($text);
5989 240 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_2_of_rule_command($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = _alternation_1_of_production_2_of_rule_command($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 240 240
5990 {
5991
5992 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [_alternation_1_of_production_2_of_rule_command]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
5993 XML::XSH2::Parser::_Runtime::_tracefirst($text),
5994 q{command},
5995 $tracelevel)
5996 if defined $::RD_TRACE;
5997 0 $expectation->failed();
5998 0 last;
5999 }
6000 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [_alternation_1_of_production_2_of_rule_command]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
6001 . $_tok . q{]},
6002  
6003 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6004 q{command},
6005 $tracelevel)
6006 if defined $::RD_TRACE;
6007 240 $item{q{_alternation_1_of_production_2_of_rule_command}} = $_tok;
6008 240 push @item, $_tok;
6009
6010 }
6011  
6012 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
6013 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6014 q{command},
6015 $tracelevel)
6016 if defined $::RD_TRACE;
6017
6018  
6019 240 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,@{$item[4]},$item[1],$item[3]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 240 240
6020 240 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 240 240
6021 {
6022 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6023 if defined $::RD_TRACE;
6024 0 last;
6025 }
6026 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
6027 . $_tok . q{])},
6028 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6029 if defined $::RD_TRACE;
6030 240 push @item, $_tok;
6031 240 $item{__ACTION1__}=$_tok;
6032
6033  
6034 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/assign\\b|(?:local\\b|my\\b)?(?=\\s*\\$[a-zA-Z_][a-zA-Z0-9_]*\\s*\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:?=)/ <commit> variable /(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=/, or /\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
6035 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6036 q{command},
6037 $tracelevel)
6038 if defined $::RD_TRACE;
6039  
6040  
6041  
6042 240 $_matched = 1;
6043 240 last;
6044 }
6045  
6046  
6047 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 896 240 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
2400896
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
6048 {
6049
6050 896 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(my)\\b/ variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 896 896
6051 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
6052 q{command},
6053 $tracelevel)
6054 if defined $::RD_TRACE;
6055 896 my $thisprod = $thisrule->{"prods"}[2];
6056 896 $text = $_[1];
6057 896 my $_savetext;
6058 896 @item = (q{command});
6059 896 %item = (__RULE__ => q{command});
6060 896 my $repcount = 0;
6061  
6062  
6063 896 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(my)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 896 896
6064 q{command},
6065 $tracelevel)
6066 if defined $::RD_TRACE;
6067 896 undef $lastsep;
6068 896 $expectation->is(q{})->at($text);
6069
6070  
6071 896 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(my)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(my)\b)/) 896 0 896
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(my)\b)/
!ll&&!rl&&r
08960
($lastsep = $1) && ''
!ll
349547
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(my)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(my)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(my)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
6072 {
6073 896 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 896 0 896
6074 896 $expectation->failed();
6075 896 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 896 896
6076 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6077 if defined $::RD_TRACE;
6078  
6079 896 last;
6080 }
6081 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
6082 0 substr($text,0,length($current_match),q{});
6083 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6084 . $current_match . q{])},
6085 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6086 if defined $::RD_TRACE;
6087 0 push @item, $item{__PATTERN1__}=$current_match;
6088
6089  
6090 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6091 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6092 q{command},
6093 $tracelevel)
6094 if defined $::RD_TRACE;
6095 0 $expectation->is(q{variable})->at($text);
6096
6097 0 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::variable, 1, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::variable, 1, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 0 0
6098 {
6099 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [variable]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6100 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6101 q{command},
6102 $tracelevel)
6103 if defined $::RD_TRACE;
6104 0 last;
6105 }
6106 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [variable]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6107 . @$_tok . q{ times)},
6108  
6109 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6110 q{command},
6111 $tracelevel)
6112 if defined $::RD_TRACE;
6113 0 $item{q{variable(s)}} = $_tok;
6114 0 push @item, $_tok;
6115
6116  
6117  
6118 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6119 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6120 q{command},
6121 $tracelevel)
6122 if defined $::RD_TRACE;
6123
6124  
6125 0 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'store_lex_variables',0,@{$item[2]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
6126 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
6127 {
6128 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6129 if defined $::RD_TRACE;
6130 0 last;
6131 }
6132 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6133 . $_tok . q{])},
6134 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6135 if defined $::RD_TRACE;
6136 0 push @item, $_tok;
6137 0 $item{__ACTION1__}=$_tok;
6138
6139  
6140 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(my)\\b/ variable]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6141 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6142 q{command},
6143 $tracelevel)
6144 if defined $::RD_TRACE;
6145  
6146  
6147  
6148 0 $_matched = 1;
6149 0 last;
6150 }
6151  
6152  
6153 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 896 240 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
2400896
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
6154 {
6155
6156 896 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(local)\\b/ variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 896 896
6157 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
6158 q{command},
6159 $tracelevel)
6160 if defined $::RD_TRACE;
6161 896 my $thisprod = $thisrule->{"prods"}[3];
6162 896 $text = $_[1];
6163 896 my $_savetext;
6164 896 @item = (q{command});
6165 896 %item = (__RULE__ => q{command});
6166 896 my $repcount = 0;
6167  
6168  
6169 896 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(local)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 896 896
6170 q{command},
6171 $tracelevel)
6172 if defined $::RD_TRACE;
6173 896 undef $lastsep;
6174 896 $expectation->is(q{})->at($text);
6175
6176  
6177 896 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(local)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(local)\b)/) 895 1 896
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(local)\b)/
!ll&&!rl&&r
08951
($lastsep = $1) && ''
!ll
349547
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(local)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(local)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(local)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
6178 {
6179 895 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 895 0 895
6180 895 $expectation->failed();
6181 895 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 895 895
6182 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6183 if defined $::RD_TRACE;
6184  
6185 895 last;
6186 }
6187 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
6188 1 substr($text,0,length($current_match),q{});
6189 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
6190 . $current_match . q{])},
6191 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6192 if defined $::RD_TRACE;
6193 1 push @item, $item{__PATTERN1__}=$current_match;
6194
6195  
6196 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
6197 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6198 q{command},
6199 $tracelevel)
6200 if defined $::RD_TRACE;
6201 1 $expectation->is(q{variable})->at($text);
6202
6203 1 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::variable, 1, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::variable, 1, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 1 1
6204 {
6205 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [variable]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6206 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6207 q{command},
6208 $tracelevel)
6209 if defined $::RD_TRACE;
6210 0 last;
6211 }
6212 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [variable]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
6213 . @$_tok . q{ times)},
6214  
6215 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6216 q{command},
6217 $tracelevel)
6218 if defined $::RD_TRACE;
6219 1 $item{q{variable(s)}} = $_tok;
6220 1 push @item, $_tok;
6221
6222  
6223  
6224 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
6225 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6226 q{command},
6227 $tracelevel)
6228 if defined $::RD_TRACE;
6229
6230  
6231 1 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'make_local',@{$item[2]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
6232 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
6233 {
6234 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6235 if defined $::RD_TRACE;
6236 0 last;
6237 }
6238 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
6239 . $_tok . q{])},
6240 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6241 if defined $::RD_TRACE;
6242 1 push @item, $_tok;
6243 1 $item{__ACTION1__}=$_tok;
6244
6245  
6246 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(local)\\b/ variable]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
6247 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6248 q{command},
6249 $tracelevel)
6250 if defined $::RD_TRACE;
6251  
6252  
6253  
6254 1 $_matched = 1;
6255 1 last;
6256 }
6257  
6258  
6259 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 895 241 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
2410895
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
6260 {
6261
6262 895 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(do)\\b/ <commit> block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 895 895
6263 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
6264 q{command},
6265 $tracelevel)
6266 if defined $::RD_TRACE;
6267 895 my $thisprod = $thisrule->{"prods"}[4];
6268 895 $text = $_[1];
6269 895 my $_savetext;
6270 895 @item = (q{command});
6271 895 %item = (__RULE__ => q{command});
6272 895 my $repcount = 0;
6273  
6274  
6275 895 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(do)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 895 895
6276 q{command},
6277 $tracelevel)
6278 if defined $::RD_TRACE;
6279 895 undef $lastsep;
6280 895 $expectation->is(q{})->at($text);
6281
6282  
6283 895 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(do)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(do)\b)/) 895 0 895
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(do)\b)/
!ll&&!rl&&r
08950
($lastsep = $1) && ''
!ll
348547
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(do)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(do)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(do)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
6284 {
6285 895 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 895 0 895
6286 895 $expectation->failed();
6287 895 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 895 895
6288 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6289 if defined $::RD_TRACE;
6290  
6291 895 last;
6292 }
6293 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
6294 0 substr($text,0,length($current_match),q{});
6295 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6296 . $current_match . q{])},
6297 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6298 if defined $::RD_TRACE;
6299 0 push @item, $item{__PATTERN1__}=$current_match;
6300
6301  
6302
6303  
6304 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6305 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6306 q{command},
6307 $tracelevel)
6308 if defined $::RD_TRACE;
6309 0 $_tok = do { $commit = 1 };
6310 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
6311 {
6312 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6313 . $_tok . q{])},
6314 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6315 if defined $::RD_TRACE;
6316 }
6317 else
6318 {
6319 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6320 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6321 if defined $::RD_TRACE;
6322 }
6323
6324 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
6325 0 push @item, $item{__DIRECTIVE1__}=$_tok;
6326
6327  
6328 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6329 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6330 q{command},
6331 $tracelevel)
6332 if defined $::RD_TRACE;
6333 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
6334 0 $expectation->is(q{block})->at($text);
6335 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
6336 {
6337
6338 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6339 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6340 q{command},
6341 $tracelevel)
6342 if defined $::RD_TRACE;
6343 0 $expectation->failed();
6344 0 last;
6345 }
6346 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6347 . $_tok . q{]},
6348  
6349 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6350 q{command},
6351 $tracelevel)
6352 if defined $::RD_TRACE;
6353 0 $item{q{block}} = $_tok;
6354 0 push @item, $_tok;
6355
6356 }
6357  
6358 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6359 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6360 q{command},
6361 $tracelevel)
6362 if defined $::RD_TRACE;
6363
6364  
6365 0 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'run_commands',$item[3],0] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
6366 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
6367 {
6368 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6369 if defined $::RD_TRACE;
6370 0 last;
6371 }
6372 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6373 . $_tok . q{])},
6374 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6375 if defined $::RD_TRACE;
6376 0 push @item, $_tok;
6377 0 $item{__ACTION1__}=$_tok;
6378
6379  
6380 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(do)\\b/ <commit> block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6381 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6382 q{command},
6383 $tracelevel)
6384 if defined $::RD_TRACE;
6385  
6386  
6387  
6388 0 $_matched = 1;
6389 0 last;
6390 }
6391  
6392  
6393 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 895 241 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
2410895
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
6394 {
6395
6396 895 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(if)\\b/ <commit> exp command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 895 895
6397 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
6398 q{command},
6399 $tracelevel)
6400 if defined $::RD_TRACE;
6401 895 my $thisprod = $thisrule->{"prods"}[5];
6402 895 $text = $_[1];
6403 895 my $_savetext;
6404 895 @item = (q{command});
6405 895 %item = (__RULE__ => q{command});
6406 895 my $repcount = 0;
6407  
6408  
6409 895 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(if)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 895 895
6410 q{command},
6411 $tracelevel)
6412 if defined $::RD_TRACE;
6413 895 undef $lastsep;
6414 895 $expectation->is(q{})->at($text);
6415
6416  
6417 895 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(if)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(if)\b)/) 895 0 895
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(if)\b)/
!ll&&!rl&&r
08950
($lastsep = $1) && ''
!ll
348547
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(if)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(if)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(if)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
6418 {
6419 895 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 895 0 895
6420 895 $expectation->failed();
6421 895 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 895 895
6422 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6423 if defined $::RD_TRACE;
6424  
6425 895 last;
6426 }
6427 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
6428 0 substr($text,0,length($current_match),q{});
6429 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6430 . $current_match . q{])},
6431 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6432 if defined $::RD_TRACE;
6433 0 push @item, $item{__PATTERN1__}=$current_match;
6434
6435  
6436
6437  
6438 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6439 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6440 q{command},
6441 $tracelevel)
6442 if defined $::RD_TRACE;
6443 0 $_tok = do { $commit = 1 };
6444 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
6445 {
6446 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6447 . $_tok . q{])},
6448 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6449 if defined $::RD_TRACE;
6450 }
6451 else
6452 {
6453 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6454 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6455 if defined $::RD_TRACE;
6456 }
6457
6458 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
6459 0 push @item, $item{__DIRECTIVE1__}=$_tok;
6460
6461  
6462 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6463 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6464 q{command},
6465 $tracelevel)
6466 if defined $::RD_TRACE;
6467 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
6468 0 $expectation->is(q{exp})->at($text);
6469 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
6470 {
6471
6472 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6473 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6474 q{command},
6475 $tracelevel)
6476 if defined $::RD_TRACE;
6477 0 $expectation->failed();
6478 0 last;
6479 }
6480 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6481 . $_tok . q{]},
6482  
6483 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6484 q{command},
6485 $tracelevel)
6486 if defined $::RD_TRACE;
6487 0 $item{q{exp}} = $_tok;
6488 0 push @item, $_tok;
6489
6490 }
6491  
6492 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6493 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6494 q{command},
6495 $tracelevel)
6496 if defined $::RD_TRACE;
6497 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
6498 0 $expectation->is(q{command})->at($text);
6499 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = command($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
6500 {
6501
6502 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [command]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6503 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6504 q{command},
6505 $tracelevel)
6506 if defined $::RD_TRACE;
6507 0 $expectation->failed();
6508 0 last;
6509 }
6510 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [command]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6511 . $_tok . q{]},
6512  
6513 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6514 q{command},
6515 $tracelevel)
6516 if defined $::RD_TRACE;
6517 0 $item{q{command}} = $_tok;
6518 0 push @item, $_tok;
6519
6520 }
6521  
6522 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6523 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6524 q{command},
6525 $tracelevel)
6526 if defined $::RD_TRACE;
6527
6528  
6529 0 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'if_statement',[$item[3],[$item[4]]]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
6530 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
6531 {
6532 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6533 if defined $::RD_TRACE;
6534 0 last;
6535 }
6536 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6537 . $_tok . q{])},
6538 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6539 if defined $::RD_TRACE;
6540 0 push @item, $_tok;
6541 0 $item{__ACTION1__}=$_tok;
6542
6543  
6544 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(if)\\b/ <commit> exp command]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6545 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6546 q{command},
6547 $tracelevel)
6548 if defined $::RD_TRACE;
6549  
6550  
6551  
6552 0 $_matched = 1;
6553 0 last;
6554 }
6555  
6556  
6557 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 895 241 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
2410895
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
6558 {
6559
6560 895 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(unless)\\b/ <commit> exp command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 895 895
6561 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
6562 q{command},
6563 $tracelevel)
6564 if defined $::RD_TRACE;
6565 895 my $thisprod = $thisrule->{"prods"}[6];
6566 895 $text = $_[1];
6567 895 my $_savetext;
6568 895 @item = (q{command});
6569 895 %item = (__RULE__ => q{command});
6570 895 my $repcount = 0;
6571  
6572  
6573 895 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(unless)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 895 895
6574 q{command},
6575 $tracelevel)
6576 if defined $::RD_TRACE;
6577 895 undef $lastsep;
6578 895 $expectation->is(q{})->at($text);
6579
6580  
6581 895 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(unless)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(unless)\b)/) 676 219 895
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(unless)\b)/
!ll&&!rl&&r
0676219
($lastsep = $1) && ''
!ll
348547
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(unless)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(unless)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(unless)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
6582 {
6583 676 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 676 0 676
6584 676 $expectation->failed();
6585 676 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 676 676
6586 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6587 if defined $::RD_TRACE;
6588  
6589 676 last;
6590 }
6591 219 $current_match = substr($text, $-[0], $+[0] - $-[0]);
6592 219 substr($text,0,length($current_match),q{});
6593 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
6594 . $current_match . q{])},
6595 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6596 if defined $::RD_TRACE;
6597 219 push @item, $item{__PATTERN1__}=$current_match;
6598
6599  
6600
6601  
6602 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
6603 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6604 q{command},
6605 $tracelevel)
6606 if defined $::RD_TRACE;
6607 219 $_tok = do { $commit = 1 };
6608 219 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 219 0 219
6609 {
6610 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
6611 . $_tok . q{])},
6612 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6613 if defined $::RD_TRACE;
6614 }
6615 else
6616 {
6617 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6618 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6619 if defined $::RD_TRACE;
6620 }
6621
6622 219 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 219 219
6623 219 push @item, $item{__DIRECTIVE1__}=$_tok;
6624
6625  
6626 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
6627 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6628 q{command},
6629 $tracelevel)
6630 if defined $::RD_TRACE;
6631 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
6632 219 $expectation->is(q{exp})->at($text);
6633 219 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 219 219
6634 {
6635
6636 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6637 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6638 q{command},
6639 $tracelevel)
6640 if defined $::RD_TRACE;
6641 0 $expectation->failed();
6642 0 last;
6643 }
6644 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
6645 . $_tok . q{]},
6646  
6647 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6648 q{command},
6649 $tracelevel)
6650 if defined $::RD_TRACE;
6651 219 $item{q{exp}} = $_tok;
6652 219 push @item, $_tok;
6653
6654 }
6655  
6656 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
6657 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6658 q{command},
6659 $tracelevel)
6660 if defined $::RD_TRACE;
6661 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
6662 219 $expectation->is(q{command})->at($text);
6663 219 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = command($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 219 219
6664 {
6665
6666 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [command]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6667 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6668 q{command},
6669 $tracelevel)
6670 if defined $::RD_TRACE;
6671 0 $expectation->failed();
6672 0 last;
6673 }
6674 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [command]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
6675 . $_tok . q{]},
6676  
6677 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6678 q{command},
6679 $tracelevel)
6680 if defined $::RD_TRACE;
6681 219 $item{q{command}} = $_tok;
6682 219 push @item, $_tok;
6683
6684 }
6685  
6686 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
6687 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6688 q{command},
6689 $tracelevel)
6690 if defined $::RD_TRACE;
6691
6692  
6693 219 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'unless_statement',$item[3],[$item[4]]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 219 219
6694 219 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 219 219
6695 {
6696 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6697 if defined $::RD_TRACE;
6698 0 last;
6699 }
6700 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
6701 . $_tok . q{])},
6702 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6703 if defined $::RD_TRACE;
6704 219 push @item, $_tok;
6705 219 $item{__ACTION1__}=$_tok;
6706
6707  
6708 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(unless)\\b/ <commit> exp command]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
6709 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6710 q{command},
6711 $tracelevel)
6712 if defined $::RD_TRACE;
6713  
6714  
6715  
6716 219 $_matched = 1;
6717 219 last;
6718 }
6719  
6720  
6721 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 676 460 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
4600676
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
6722 {
6723
6724 676 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(while)\\b/ <commit> exp command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 676 676
6725 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
6726 q{command},
6727 $tracelevel)
6728 if defined $::RD_TRACE;
6729 676 my $thisprod = $thisrule->{"prods"}[7];
6730 676 $text = $_[1];
6731 676 my $_savetext;
6732 676 @item = (q{command});
6733 676 %item = (__RULE__ => q{command});
6734 676 my $repcount = 0;
6735  
6736  
6737 676 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(while)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 676 676
6738 q{command},
6739 $tracelevel)
6740 if defined $::RD_TRACE;
6741 676 undef $lastsep;
6742 676 $expectation->is(q{})->at($text);
6743
6744  
6745 676 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(while)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(while)\b)/) 676 0 676
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(while)\b)/
!ll&&!rl&&r
06760
($lastsep = $1) && ''
!ll
260416
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(while)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(while)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(while)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
6746 {
6747 676 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 676 0 676
6748 676 $expectation->failed();
6749 676 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 676 676
6750 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6751 if defined $::RD_TRACE;
6752  
6753 676 last;
6754 }
6755 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
6756 0 substr($text,0,length($current_match),q{});
6757 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6758 . $current_match . q{])},
6759 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6760 if defined $::RD_TRACE;
6761 0 push @item, $item{__PATTERN1__}=$current_match;
6762
6763  
6764
6765  
6766 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6767 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6768 q{command},
6769 $tracelevel)
6770 if defined $::RD_TRACE;
6771 0 $_tok = do { $commit = 1 };
6772 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
6773 {
6774 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6775 . $_tok . q{])},
6776 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6777 if defined $::RD_TRACE;
6778 }
6779 else
6780 {
6781 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6782 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6783 if defined $::RD_TRACE;
6784 }
6785
6786 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
6787 0 push @item, $item{__DIRECTIVE1__}=$_tok;
6788
6789  
6790 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6791 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6792 q{command},
6793 $tracelevel)
6794 if defined $::RD_TRACE;
6795 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
6796 0 $expectation->is(q{exp})->at($text);
6797 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
6798 {
6799
6800 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6801 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6802 q{command},
6803 $tracelevel)
6804 if defined $::RD_TRACE;
6805 0 $expectation->failed();
6806 0 last;
6807 }
6808 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6809 . $_tok . q{]},
6810  
6811 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6812 q{command},
6813 $tracelevel)
6814 if defined $::RD_TRACE;
6815 0 $item{q{exp}} = $_tok;
6816 0 push @item, $_tok;
6817
6818 }
6819  
6820 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6821 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6822 q{command},
6823 $tracelevel)
6824 if defined $::RD_TRACE;
6825 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
6826 0 $expectation->is(q{command})->at($text);
6827 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = command($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
6828 {
6829
6830 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [command]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6831 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6832 q{command},
6833 $tracelevel)
6834 if defined $::RD_TRACE;
6835 0 $expectation->failed();
6836 0 last;
6837 }
6838 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [command]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6839 . $_tok . q{]},
6840  
6841 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6842 q{command},
6843 $tracelevel)
6844 if defined $::RD_TRACE;
6845 0 $item{q{command}} = $_tok;
6846 0 push @item, $_tok;
6847
6848 }
6849  
6850 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6851 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6852 q{command},
6853 $tracelevel)
6854 if defined $::RD_TRACE;
6855
6856  
6857 0 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'while_statement',$item[3],[$item[4]]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
6858 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
6859 {
6860 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6861 if defined $::RD_TRACE;
6862 0 last;
6863 }
6864 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6865 . $_tok . q{])},
6866 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6867 if defined $::RD_TRACE;
6868 0 push @item, $_tok;
6869 0 $item{__ACTION1__}=$_tok;
6870
6871  
6872 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(while)\\b/ <commit> exp command]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6873 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6874 q{command},
6875 $tracelevel)
6876 if defined $::RD_TRACE;
6877  
6878  
6879  
6880 0 $_matched = 1;
6881 0 last;
6882 }
6883  
6884  
6885 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 676 460 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
4600676
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
6886 {
6887
6888 676 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(foreach|for)\\b/ <commit> local_var_in exp command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 676 676
6889 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
6890 q{command},
6891 $tracelevel)
6892 if defined $::RD_TRACE;
6893 676 my $thisprod = $thisrule->{"prods"}[8];
6894 676 $text = $_[1];
6895 676 my $_savetext;
6896 676 @item = (q{command});
6897 676 %item = (__RULE__ => q{command});
6898 676 my $repcount = 0;
6899  
6900  
6901 676 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(foreach|for)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 676 676
6902 q{command},
6903 $tracelevel)
6904 if defined $::RD_TRACE;
6905 676 undef $lastsep;
6906 676 $expectation->is(q{})->at($text);
6907
6908  
6909 676 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(foreach|for)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(foreach|for)\b)/) 673 3 676
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(foreach|for)\b)/
!ll&&!rl&&r
06733
($lastsep = $1) && ''
!ll
260416
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(foreach|for)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(foreach|for)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(foreach|for)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
6910 {
6911 673 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 673 0 673
6912 673 $expectation->failed();
6913 673 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 673 673
6914 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6915 if defined $::RD_TRACE;
6916  
6917 673 last;
6918 }
6919 3 $current_match = substr($text, $-[0], $+[0] - $-[0]);
6920 3 substr($text,0,length($current_match),q{});
6921 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
6922 . $current_match . q{])},
6923 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6924 if defined $::RD_TRACE;
6925 3 push @item, $item{__PATTERN1__}=$current_match;
6926
6927  
6928
6929  
6930 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
6931 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6932 q{command},
6933 $tracelevel)
6934 if defined $::RD_TRACE;
6935 3 $_tok = do { $commit = 1 };
6936 3 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 3 0 3
6937 {
6938 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
6939 . $_tok . q{])},
6940 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6941 if defined $::RD_TRACE;
6942 }
6943 else
6944 {
6945 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6946 XML::XSH2::Parser::_Runtime::_tracefirst($text))
6947 if defined $::RD_TRACE;
6948 }
6949
6950 3 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 3 3
6951 3 push @item, $item{__DIRECTIVE1__}=$_tok;
6952
6953  
6954 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [local_var_in]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
6955 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6956 q{command},
6957 $tracelevel)
6958 if defined $::RD_TRACE;
6959 3 $expectation->is(q{local_var_in})->at($text);
6960
6961 3 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::local_var_in, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::local_var_in, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 3 3
6962 {
6963 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [local_var_in]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6964 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6965 q{command},
6966 $tracelevel)
6967 if defined $::RD_TRACE;
6968 0 last;
6969 }
6970 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [local_var_in]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
6971 . @$_tok . q{ times)},
6972  
6973 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6974 q{command},
6975 $tracelevel)
6976 if defined $::RD_TRACE;
6977 3 $item{q{local_var_in(?)}} = $_tok;
6978 3 push @item, $_tok;
6979
6980  
6981  
6982 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
6983 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6984 q{command},
6985 $tracelevel)
6986 if defined $::RD_TRACE;
6987 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
6988 3 $expectation->is(q{exp})->at($text);
6989 3 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 3 3
6990 {
6991
6992 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
6993 XML::XSH2::Parser::_Runtime::_tracefirst($text),
6994 q{command},
6995 $tracelevel)
6996 if defined $::RD_TRACE;
6997 0 $expectation->failed();
6998 0 last;
6999 }
7000 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
7001 . $_tok . q{]},
7002  
7003 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7004 q{command},
7005 $tracelevel)
7006 if defined $::RD_TRACE;
7007 3 $item{q{exp}} = $_tok;
7008 3 push @item, $_tok;
7009
7010 }
7011  
7012 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
7013 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7014 q{command},
7015 $tracelevel)
7016 if defined $::RD_TRACE;
7017 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
7018 3 $expectation->is(q{command})->at($text);
7019 3 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = command($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 3 3
7020 {
7021
7022 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [command]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7023 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7024 q{command},
7025 $tracelevel)
7026 if defined $::RD_TRACE;
7027 0 $expectation->failed();
7028 0 last;
7029 }
7030 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [command]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
7031 . $_tok . q{]},
7032  
7033 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7034 q{command},
7035 $tracelevel)
7036 if defined $::RD_TRACE;
7037 3 $item{q{command}} = $_tok;
7038 3 push @item, $_tok;
7039
7040 }
7041  
7042 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
7043 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7044 q{command},
7045 $tracelevel)
7046 if defined $::RD_TRACE;
7047
7048  
7049 3 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'foreach_statement',$item[4],[$item[5]],@{$item[3]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 3 3
7050 3 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 3 3
7051 {
7052 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7053 if defined $::RD_TRACE;
7054 0 last;
7055 }
7056 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
7057 . $_tok . q{])},
7058 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7059 if defined $::RD_TRACE;
7060 3 push @item, $_tok;
7061 3 $item{__ACTION1__}=$_tok;
7062
7063  
7064 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(foreach|for)\\b/ <commit> local_var_in exp command]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
7065 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7066 q{command},
7067 $tracelevel)
7068 if defined $::RD_TRACE;
7069  
7070  
7071  
7072 3 $_matched = 1;
7073 3 last;
7074 }
7075  
7076  
7077 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 673 463 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
4630673
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
7078 {
7079
7080 673 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(stream)\\b/ <commit> /--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/ stream_select]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 673 673
7081 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
7082 q{command},
7083 $tracelevel)
7084 if defined $::RD_TRACE;
7085 673 my $thisprod = $thisrule->{"prods"}[9];
7086 673 $text = $_[1];
7087 673 my $_savetext;
7088 673 @item = (q{command});
7089 673 %item = (__RULE__ => q{command});
7090 673 my $repcount = 0;
7091  
7092  
7093 673 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(stream)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 673 673
7094 q{command},
7095 $tracelevel)
7096 if defined $::RD_TRACE;
7097 673 undef $lastsep;
7098 673 $expectation->is(q{})->at($text);
7099
7100  
7101 673 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(stream)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(stream)\b)/) 671 2 673
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(stream)\b)/
!ll&&!rl&&r
06712
($lastsep = $1) && ''
!ll
260413
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(stream)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(stream)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(stream)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
7102 {
7103 671 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 671 0 671
7104 671 $expectation->failed();
7105 671 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 671 671
7106 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7107 if defined $::RD_TRACE;
7108  
7109 671 last;
7110 }
7111 2 $current_match = substr($text, $-[0], $+[0] - $-[0]);
7112 2 substr($text,0,length($current_match),q{});
7113 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
7114 . $current_match . q{])},
7115 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7116 if defined $::RD_TRACE;
7117 2 push @item, $item{__PATTERN1__}=$current_match;
7118
7119  
7120
7121  
7122 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
7123 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7124 q{command},
7125 $tracelevel)
7126 if defined $::RD_TRACE;
7127 2 $_tok = do { $commit = 1 };
7128 2 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 2 0 2
7129 {
7130 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
7131 . $_tok . q{])},
7132 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7133 if defined $::RD_TRACE;
7134 }
7135 else
7136 {
7137 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7138 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7139 if defined $::RD_TRACE;
7140 }
7141
7142 2 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 2 2
7143 2 push @item, $item{__DIRECTIVE1__}=$_tok;
7144
7145  
7146 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [_alternation_1_of_production_10_of_rule_command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
7147 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7148 q{command},
7149 $tracelevel)
7150 if defined $::RD_TRACE;
7151 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
7152 2 $expectation->is(q{/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/})->at($text);
7153 2 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_10_of_rule_command($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = _alternation_1_of_production_10_of_rule_command($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 2 2
7154 {
7155
7156 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [_alternation_1_of_production_10_of_rule_command]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7157 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7158 q{command},
7159 $tracelevel)
7160 if defined $::RD_TRACE;
7161 0 $expectation->failed();
7162 0 last;
7163 }
7164 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [_alternation_1_of_production_10_of_rule_command]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
7165 . $_tok . q{]},
7166  
7167 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7168 q{command},
7169 $tracelevel)
7170 if defined $::RD_TRACE;
7171 2 $item{q{_alternation_1_of_production_10_of_rule_command}} = $_tok;
7172 2 push @item, $_tok;
7173
7174 }
7175  
7176 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [stream_select]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
7177 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7178 q{command},
7179 $tracelevel)
7180 if defined $::RD_TRACE;
7181 2 $expectation->is(q{stream_select})->at($text);
7182
7183 2 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::stream_select, 1, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::stream_select, 1, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 2 2
7184 {
7185 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [stream_select]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7186 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7187 q{command},
7188 $tracelevel)
7189 if defined $::RD_TRACE;
7190 0 last;
7191 }
7192 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [stream_select]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
7193 . @$_tok . q{ times)},
7194  
7195 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7196 q{command},
7197 $tracelevel)
7198 if defined $::RD_TRACE;
7199 2 $item{q{stream_select(s)}} = $_tok;
7200 2 push @item, $_tok;
7201
7202  
7203  
7204 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
7205 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7206 q{command},
7207 $tracelevel)
7208 if defined $::RD_TRACE;
7209
7210  
7211 2 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'stream_process',$item[3],$item[4]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 2 2
7212 2 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 2 2
7213 {
7214 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7215 if defined $::RD_TRACE;
7216 0 last;
7217 }
7218 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
7219 . $_tok . q{])},
7220 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7221 if defined $::RD_TRACE;
7222 2 push @item, $_tok;
7223 2 $item{__ACTION1__}=$_tok;
7224
7225  
7226 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(stream)\\b/ <commit> /--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/ stream_select]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
7227 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7228 q{command},
7229 $tracelevel)
7230 if defined $::RD_TRACE;
7231  
7232  
7233  
7234 2 $_matched = 1;
7235 2 last;
7236 }
7237  
7238  
7239 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 671 465 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
4650671
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
7240 {
7241
7242 671 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(undef|undefine)\\b/ <commit> /\\$?[a-zA-Z_][a-zA-Z0-9_]*/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 671 671
7243 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
7244 q{command},
7245 $tracelevel)
7246 if defined $::RD_TRACE;
7247 671 my $thisprod = $thisrule->{"prods"}[10];
7248 671 $text = $_[1];
7249 671 my $_savetext;
7250 671 @item = (q{command});
7251 671 %item = (__RULE__ => q{command});
7252 671 my $repcount = 0;
7253  
7254  
7255 671 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(undef|undefine)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 671 671
7256 q{command},
7257 $tracelevel)
7258 if defined $::RD_TRACE;
7259 671 undef $lastsep;
7260 671 $expectation->is(q{})->at($text);
7261
7262  
7263 671 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(undef|undefine)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(undef|undefine)\b)/) 671 0 671
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(undef|undefine)\b)/
!ll&&!rl&&r
06710
($lastsep = $1) && ''
!ll
260411
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(undef|undefine)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(undef|undefine)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(undef|undefine)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
7264 {
7265 671 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 671 0 671
7266 671 $expectation->failed();
7267 671 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 671 671
7268 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7269 if defined $::RD_TRACE;
7270  
7271 671 last;
7272 }
7273 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
7274 0 substr($text,0,length($current_match),q{});
7275 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7276 . $current_match . q{])},
7277 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7278 if defined $::RD_TRACE;
7279 0 push @item, $item{__PATTERN1__}=$current_match;
7280
7281  
7282
7283  
7284 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7285 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7286 q{command},
7287 $tracelevel)
7288 if defined $::RD_TRACE;
7289 0 $_tok = do { $commit = 1 };
7290 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
7291 {
7292 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7293 . $_tok . q{])},
7294 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7295 if defined $::RD_TRACE;
7296 }
7297 else
7298 {
7299 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7300 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7301 if defined $::RD_TRACE;
7302 }
7303
7304 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
7305 0 push @item, $item{__DIRECTIVE1__}=$_tok;
7306
7307  
7308 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/\\$?[a-zA-Z_][a-zA-Z0-9_]*/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7309 q{command},
7310 $tracelevel)
7311 if defined $::RD_TRACE;
7312 0 undef $lastsep;
7313 0 $expectation->is(q{/\\$?[a-zA-Z_][a-zA-Z0-9_]*/})->at($text);
7314
7315  
7316 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
7317 {
7318 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
7319 0 $expectation->failed();
7320 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7321 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7322 if defined $::RD_TRACE;
7323  
7324 0 last;
7325 }
7326 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
7327 0 substr($text,0,length($current_match),q{});
7328 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7329 . $current_match . q{])},
7330 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7331 if defined $::RD_TRACE;
7332 0 push @item, $item{__PATTERN2__}=$current_match;
7333
7334  
7335 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7336 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7337 q{command},
7338 $tracelevel)
7339 if defined $::RD_TRACE;
7340
7341  
7342 0 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
7343 0 [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'undefine',$item[3]];
7344 };
7345 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
7346 {
7347 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7348 if defined $::RD_TRACE;
7349 0 last;
7350 }
7351 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7352 . $_tok . q{])},
7353 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7354 if defined $::RD_TRACE;
7355 0 push @item, $_tok;
7356 0 $item{__ACTION1__}=$_tok;
7357
7358  
7359 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(undef|undefine)\\b/ <commit> /\\$?[a-zA-Z_][a-zA-Z0-9_]*/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7360 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7361 q{command},
7362 $tracelevel)
7363 if defined $::RD_TRACE;
7364  
7365  
7366  
7367 0 $_matched = 1;
7368 0 last;
7369 }
7370  
7371  
7372 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 671 465 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
4650671
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
7373 {
7374
7375 671 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(use)\\b/ <commit> /XML::XSH2::(?:Inline|Compile)/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 671 671
7376 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
7377 q{command},
7378 $tracelevel)
7379 if defined $::RD_TRACE;
7380 671 my $thisprod = $thisrule->{"prods"}[11];
7381 671 $text = $_[1];
7382 671 my $_savetext;
7383 671 @item = (q{command});
7384 671 %item = (__RULE__ => q{command});
7385 671 my $repcount = 0;
7386  
7387  
7388 671 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(use)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 671 671
7389 q{command},
7390 $tracelevel)
7391 if defined $::RD_TRACE;
7392 671 undef $lastsep;
7393 671 $expectation->is(q{})->at($text);
7394
7395  
7396 671 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(use)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(use)\b)/) 671 0 671
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(use)\b)/
!ll&&!rl&&r
06710
($lastsep = $1) && ''
!ll
260411
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(use)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(use)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(use)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
7397 {
7398 671 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 671 0 671
7399 671 $expectation->failed();
7400 671 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 671 671
7401 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7402 if defined $::RD_TRACE;
7403  
7404 671 last;
7405 }
7406 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
7407 0 substr($text,0,length($current_match),q{});
7408 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7409 . $current_match . q{])},
7410 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7411 if defined $::RD_TRACE;
7412 0 push @item, $item{__PATTERN1__}=$current_match;
7413
7414  
7415
7416  
7417 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7418 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7419 q{command},
7420 $tracelevel)
7421 if defined $::RD_TRACE;
7422 0 $_tok = do { $commit = 1 };
7423 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
7424 {
7425 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7426 . $_tok . q{])},
7427 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7428 if defined $::RD_TRACE;
7429 }
7430 else
7431 {
7432 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7433 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7434 if defined $::RD_TRACE;
7435 }
7436
7437 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
7438 0 push @item, $item{__DIRECTIVE1__}=$_tok;
7439
7440  
7441 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/XML::XSH2::(?:Inline|Compile)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7442 q{command},
7443 $tracelevel)
7444 if defined $::RD_TRACE;
7445 0 undef $lastsep;
7446 0 $expectation->is(q{/XML::XSH2::(?:Inline|Compile)/})->at($text);
7447
7448  
7449 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:XML::XSH2::(?:Inline|Compile))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:XML::XSH2::(?:Inline|Compile))/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:XML::XSH2::(?:Inline|Compile))/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:XML::XSH2::(?:Inline|Compile))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:XML::XSH2::(?:Inline|Compile))/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:XML::XSH2::(?:Inline|Compile))/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
7450 {
7451 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
7452 0 $expectation->failed();
7453 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7454 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7455 if defined $::RD_TRACE;
7456  
7457 0 last;
7458 }
7459 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
7460 0 substr($text,0,length($current_match),q{});
7461 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7462 . $current_match . q{])},
7463 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7464 if defined $::RD_TRACE;
7465 0 push @item, $item{__PATTERN2__}=$current_match;
7466
7467  
7468 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7469 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7470 q{command},
7471 $tracelevel)
7472 if defined $::RD_TRACE;
7473
7474  
7475 0 ▶ $_tok = ($_noactions) ? 0 : do { 1 };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
7476 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
7477 {
7478 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7479 if defined $::RD_TRACE;
7480 0 last;
7481 }
7482 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7483 . $_tok . q{])},
7484 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7485 if defined $::RD_TRACE;
7486 0 push @item, $_tok;
7487 0 $item{__ACTION1__}=$_tok;
7488
7489  
7490 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(use)\\b/ <commit> /XML::XSH2::(?:Inline|Compile)/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7491 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7492 q{command},
7493 $tracelevel)
7494 if defined $::RD_TRACE;
7495  
7496  
7497  
7498 0 $_matched = 1;
7499 0 last;
7500 }
7501  
7502  
7503 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 671 465 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
4650671
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
7504 {
7505
7506 671 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(test-mode|test_mode)/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 671 671
7507 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
7508 q{command},
7509 $tracelevel)
7510 if defined $::RD_TRACE;
7511 671 my $thisprod = $thisrule->{"prods"}[12];
7512 671 $text = $_[1];
7513 671 my $_savetext;
7514 671 @item = (q{command});
7515 671 %item = (__RULE__ => q{command});
7516 671 my $repcount = 0;
7517  
7518  
7519 671 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(test-mode|test_mode)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 671 671
7520 q{command},
7521 $tracelevel)
7522 if defined $::RD_TRACE;
7523 671 undef $lastsep;
7524 671 $expectation->is(q{})->at($text);
7525
7526  
7527 671 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(test-mode|test_mode))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(test-mode|test_mode))/) 670 1 671
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(test-mode|test_mode))/
!ll&&!rl&&r
06701
($lastsep = $1) && ''
!ll
260411
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(test-mode|test_mode))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(test-mode|test_mode))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(test-mode|test_mode))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
7528 {
7529 670 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 670 0 670
7530 670 $expectation->failed();
7531 670 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 670 670
7532 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7533 if defined $::RD_TRACE;
7534  
7535 670 last;
7536 }
7537 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
7538 1 substr($text,0,length($current_match),q{});
7539 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
7540 . $current_match . q{])},
7541 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7542 if defined $::RD_TRACE;
7543 1 push @item, $item{__PATTERN1__}=$current_match;
7544
7545  
7546 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
7547 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7548 q{command},
7549 $tracelevel)
7550 if defined $::RD_TRACE;
7551
7552  
7553 1 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,"test-mode"] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
7554 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
7555 {
7556 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7557 if defined $::RD_TRACE;
7558 0 last;
7559 }
7560 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
7561 . $_tok . q{])},
7562 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7563 if defined $::RD_TRACE;
7564 1 push @item, $_tok;
7565 1 $item{__ACTION1__}=$_tok;
7566
7567  
7568 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(test-mode|test_mode)/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
7569 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7570 q{command},
7571 $tracelevel)
7572 if defined $::RD_TRACE;
7573  
7574  
7575  
7576 1 $_matched = 1;
7577 1 last;
7578 }
7579  
7580  
7581 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 670 466 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
4660670
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
7582 {
7583
7584 670 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(run-mode|run_mode)/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 670 670
7585 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
7586 q{command},
7587 $tracelevel)
7588 if defined $::RD_TRACE;
7589 670 my $thisprod = $thisrule->{"prods"}[13];
7590 670 $text = $_[1];
7591 670 my $_savetext;
7592 670 @item = (q{command});
7593 670 %item = (__RULE__ => q{command});
7594 670 my $repcount = 0;
7595  
7596  
7597 670 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(run-mode|run_mode)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 670 670
7598 q{command},
7599 $tracelevel)
7600 if defined $::RD_TRACE;
7601 670 undef $lastsep;
7602 670 $expectation->is(q{})->at($text);
7603
7604  
7605 670 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(run-mode|run_mode))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(run-mode|run_mode))/) 669 1 670
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(run-mode|run_mode))/
!ll&&!rl&&r
06691
($lastsep = $1) && ''
!ll
259411
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(run-mode|run_mode))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(run-mode|run_mode))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(run-mode|run_mode))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
7606 {
7607 669 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 669 0 669
7608 669 $expectation->failed();
7609 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7610 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7611 if defined $::RD_TRACE;
7612  
7613 669 last;
7614 }
7615 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
7616 1 substr($text,0,length($current_match),q{});
7617 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
7618 . $current_match . q{])},
7619 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7620 if defined $::RD_TRACE;
7621 1 push @item, $item{__PATTERN1__}=$current_match;
7622
7623  
7624 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
7625 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7626 q{command},
7627 $tracelevel)
7628 if defined $::RD_TRACE;
7629
7630  
7631 1 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,"run-mode"] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
7632 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
7633 {
7634 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7635 if defined $::RD_TRACE;
7636 0 last;
7637 }
7638 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
7639 . $_tok . q{])},
7640 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7641 if defined $::RD_TRACE;
7642 1 push @item, $_tok;
7643 1 $item{__ACTION1__}=$_tok;
7644
7645  
7646 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(run-mode|run_mode)/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
7647 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7648 q{command},
7649 $tracelevel)
7650 if defined $::RD_TRACE;
7651  
7652  
7653  
7654 1 $_matched = 1;
7655 1 last;
7656 }
7657  
7658  
7659 1136 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 669 467 1136
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
4670669
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
7660 {
7661
7662 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?!(?:iterate|try|def|define)\\b)/ /\\.|[a-zA-Z_][-a-zA-Z0-9_]*/ exp_or_opt]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7663 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
7664 q{command},
7665 $tracelevel)
7666 if defined $::RD_TRACE;
7667 669 my $thisprod = $thisrule->{"prods"}[14];
7668 669 $text = $_[1];
7669 669 my $_savetext;
7670 669 @item = (q{command});
7671 669 %item = (__RULE__ => q{command});
7672 669 my $repcount = 0;
7673  
7674  
7675 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?!(?:iterate|try|def|define)\\b)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7676 q{command},
7677 $tracelevel)
7678 if defined $::RD_TRACE;
7679 669 undef $lastsep;
7680 669 $expectation->is(q{})->at($text);
7681
7682  
7683 669 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?!(?:iterate|try|def|define)\b))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?!(?:iterate|try|def|define)\b))/) 0 669 669
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?!(?:iterate|try|def|define)\b))/
!ll&&!rl&&r
00669
($lastsep = $1) && ''
!ll
258411
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?!(?:iterate|try|def|define)\b))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?!(?:iterate|try|def|define)\b))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?!(?:iterate|try|def|define)\b))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
7684 {
7685 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
7686 0 $expectation->failed();
7687 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7688 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7689 if defined $::RD_TRACE;
7690  
7691 0 last;
7692 }
7693 669 $current_match = substr($text, $-[0], $+[0] - $-[0]);
7694 669 substr($text,0,length($current_match),q{});
7695 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7696 . $current_match . q{])},
7697 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7698 if defined $::RD_TRACE;
7699 669 push @item, $item{__PATTERN1__}=$current_match;
7700
7701  
7702 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/\\.|[a-zA-Z_][-a-zA-Z0-9_]*/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7703 q{command},
7704 $tracelevel)
7705 if defined $::RD_TRACE;
7706 669 undef $lastsep;
7707 669 $expectation->is(q{/\\.|[a-zA-Z_][-a-zA-Z0-9_]*/})->at($text);
7708
7709  
7710 669 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\.|[a-zA-Z_][-a-zA-Z0-9_]*)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\.|[a-zA-Z_][-a-zA-Z0-9_]*)/) 0 669 669
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\.|[a-zA-Z_][-a-zA-Z0-9_]*)/
!ll&&!rl&&r
00669
($lastsep = $1) && ''
!ll
6690
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\.|[a-zA-Z_][-a-zA-Z0-9_]*)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:\.|[a-zA-Z_][-a-zA-Z0-9_]*)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:\.|[a-zA-Z_][-a-zA-Z0-9_]*)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
7711 {
7712 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
7713 0 $expectation->failed();
7714 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7715 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7716 if defined $::RD_TRACE;
7717  
7718 0 last;
7719 }
7720 669 $current_match = substr($text, $-[0], $+[0] - $-[0]);
7721 669 substr($text,0,length($current_match),q{});
7722 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7723 . $current_match . q{])},
7724 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7725 if defined $::RD_TRACE;
7726 669 push @item, $item{__PATTERN2__}=$current_match;
7727
7728  
7729 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [exp_or_opt]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7730 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7731 q{command},
7732 $tracelevel)
7733 if defined $::RD_TRACE;
7734 669 $expectation->is(q{exp_or_opt})->at($text);
7735
7736 669 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp_or_opt, 0, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp_or_opt, 0, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 669 669
7737 {
7738 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [exp_or_opt]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7739 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7740 q{command},
7741 $tracelevel)
7742 if defined $::RD_TRACE;
7743 0 last;
7744 }
7745 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [exp_or_opt]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7746 . @$_tok . q{ times)},
7747  
7748 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7749 q{command},
7750 $tracelevel)
7751 if defined $::RD_TRACE;
7752 669 $item{q{exp_or_opt(s?)}} = $_tok;
7753 669 push @item, $_tok;
7754
7755  
7756  
7757 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7758 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7759 q{command},
7760 $tracelevel)
7761 if defined $::RD_TRACE;
7762
7763  
7764 669 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 669 669
7765 bless
7766 669 [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,$item[2],@{$item[3]}],
7767 'XML::XSH2::Command'
7768 };
7769 669 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 669 669
7770 {
7771 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7772 if defined $::RD_TRACE;
7773 0 last;
7774 }
7775 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7776 . $_tok . q{])},
7777 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7778 if defined $::RD_TRACE;
7779 669 push @item, $_tok;
7780 669 $item{__ACTION1__}=$_tok;
7781
7782  
7783 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?!(?:iterate|try|def|define)\\b)/ /\\.|[a-zA-Z_][-a-zA-Z0-9_]*/ exp_or_opt]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
7784 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7785 q{command},
7786 $tracelevel)
7787 if defined $::RD_TRACE;
7788  
7789  
7790  
7791 669 $_matched = 1;
7792 669 last;
7793 }
7794  
7795  
7796 1136 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 1136 1136
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
113600
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
7797 {
7798
7799  
7800 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
7801 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7802 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
7803 q{command},
7804 $tracelevel)
7805 if defined $::RD_TRACE;
7806 0 return undef;
7807 }
7808 1136 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 1136 1136
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
011360
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
7809 {
7810 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7811 q{command},
7812 $tracelevel)
7813 if defined $::RD_TRACE;
7814 0 $return = $score_return;
7815 }
7816 1136 splice @{$thisparser->{errors}}, $err_at;
7817 1136 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 1136 0 1136
7818 1136 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 1136 1136
7819 {
7820 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
7821 $return . q{])}, "",
7822 q{command},
7823 $tracelevel);
7824 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
7825 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
7826 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7827 , q{command},
7828 $tracelevel)
7829 }
7830 1136 $_[1] = $text;
7831 1136 return $return;
7832 }
7833  
7834 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
7835 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::complex_command
7836 1549 ▶{
Subroutine complex_command: called CC=118 SCAR=61.2
7837 1549 my $thisparser = $_[0];
7838 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
7839 1549 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
15490
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
7840 1549 $ERRORS = 0;
7841 1549 my $thisrule = $thisparser->{"rules"}{"complex_command"};
7842  
7843 1549 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [complex_command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1549 1549
7844 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
7845 q{complex_command},
7846 $tracelevel)
7847 if defined $::RD_TRACE;
7848  
7849
7850 1549 my $err_at = @{$thisparser->{errors}};
7851  
7852 1549 my $score;
7853 my $score_return;
7854 1549 my $_tok;
7855 1549 my $return = undef;
7856 1549 my $_matched=0;
7857 1549 my $commit=0;
7858 1549 my @item = ();
7859 1549 my %item = ();
7860 1549 my $repeating = $_[2];
7861 1549 my $_noactions = $_[3];
7862 1549 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1549 0 1549
7863 1549 my $_itempos = $_[5];
7864 1549 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1549 0 1549
7865 1549 my $text;
7866 my $lastsep;
7867 1549 my $current_match;
7868 1549 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?=\\s*[\{\}]|\\s*\\Z)/, or /\\s*;/, or /(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\\b)/, or command});
7869 1549 $expectation->at($_[1]);
7870
7871 1549 my $thisoffset;
7872 1549 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
7873
7874 1549 my $thiscolumn;
7875 1549 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
7876
7877 1549 my $thisline;
7878 1549 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
7879  
7880
7881  
7882 1549 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1549 0 1549
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001549
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
7883 {
7884
7885 1549 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?=\\s*[\{\}]|\\s*\\Z)/ <commit> <reject>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1549 1549
7886 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
7887 q{complex_command},
7888 $tracelevel)
7889 if defined $::RD_TRACE;
7890 1549 my $thisprod = $thisrule->{"prods"}[0];
7891 1549 $text = $_[1];
7892 1549 my $_savetext;
7893 1549 @item = (q{complex_command});
7894 1549 %item = (__RULE__ => q{complex_command});
7895 1549 my $repcount = 0;
7896  
7897  
7898 1549 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?=\\s*[\{\}]|\\s*\\Z)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1549 1549
7899 q{complex_command},
7900 $tracelevel)
7901 if defined $::RD_TRACE;
7902 1549 undef $lastsep;
7903 1549 $expectation->is(q{})->at($text);
7904
7905  
7906 1549 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\s*[{}]|\s*\Z))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[{}]|\s*\Z))/) 920 629 1549
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[{}]|\s*\Z))/
!ll&&!rl&&r
0920629
($lastsep = $1) && ''
!ll
1142407
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[{}]|\s*\Z))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?=\s*[{}]|\s*\Z))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?=\s*[{}]|\s*\Z))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
7907 {
7908 920 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 920 0 920
7909 920 $expectation->failed();
7910 920 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 920 920
7911 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7912 if defined $::RD_TRACE;
7913  
7914 920 last;
7915 }
7916 629 $current_match = substr($text, $-[0], $+[0] - $-[0]);
7917 629 substr($text,0,length($current_match),q{});
7918 629 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 629 629
7919 . $current_match . q{])},
7920 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7921 if defined $::RD_TRACE;
7922 629 push @item, $item{__PATTERN1__}=$current_match;
7923
7924  
7925
7926  
7927 629 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 629 629
7928 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7929 q{complex_command},
7930 $tracelevel)
7931 if defined $::RD_TRACE;
7932 629 $_tok = do { $commit = 1 };
7933 629 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 629 0 629
7934 {
7935 629 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 629 629
7936 . $_tok . q{])},
7937 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7938 if defined $::RD_TRACE;
7939 }
7940 else
7941 {
7942 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7943 XML::XSH2::Parser::_Runtime::_tracefirst($text))
7944 if defined $::RD_TRACE;
7945 }
7946
7947 629 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 629 629
7948 629 push @item, $item{__DIRECTIVE1__}=$_tok;
7949
7950  
7951 629 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Rejecting production<< (found <reject>)},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 629 629
7952 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7953 q{complex_command},
7954 $tracelevel)
7955 if defined $::RD_TRACE;
7956 629 undef $return;
7957
7958  
7959 629 $_tok = undef;
7960
7961 629 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 629 0 629
7962  
7963 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?=\\s*[\{\}]|\\s*\\Z)/ <commit> <reject>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
7964 XML::XSH2::Parser::_Runtime::_tracefirst($text),
7965 q{complex_command},
7966 $tracelevel)
7967 if defined $::RD_TRACE;
7968  
7969  
7970  
7971 0 $_matched = 1;
7972 0 last;
7973 }
7974  
7975  
7976 1549 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 920 629 1549
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
0629920
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
7977 {
7978
7979 920 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/\\s*;/ <commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 920 920
7980 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
7981 q{complex_command},
7982 $tracelevel)
7983 if defined $::RD_TRACE;
7984 920 my $thisprod = $thisrule->{"prods"}[1];
7985 920 $text = $_[1];
7986 920 my $_savetext;
7987 920 @item = (q{complex_command});
7988 920 %item = (__RULE__ => q{complex_command});
7989 920 my $repcount = 0;
7990  
7991  
7992 920 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/\\s*;/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 920 920
7993 q{complex_command},
7994 $tracelevel)
7995 if defined $::RD_TRACE;
7996 920 undef $lastsep;
7997 920 $expectation->is(q{})->at($text);
7998
7999  
8000 920 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\s*;)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\s*;)/) 908 12 920
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\s*;)/
!ll&&!rl&&r
090812
($lastsep = $1) && ''
!ll
553367
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\s*;)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:\s*;)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:\s*;)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
8001 {
8002 908 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 908 0 908
8003 908 $expectation->failed();
8004 908 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 908 908
8005 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8006 if defined $::RD_TRACE;
8007  
8008 908 last;
8009 }
8010 12 $current_match = substr($text, $-[0], $+[0] - $-[0]);
8011 12 substr($text,0,length($current_match),q{});
8012 12 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 12 12
8013 . $current_match . q{])},
8014 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8015 if defined $::RD_TRACE;
8016 12 push @item, $item{__PATTERN1__}=$current_match;
8017
8018  
8019
8020  
8021 12 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 12 12
8022 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8023 q{complex_command},
8024 $tracelevel)
8025 if defined $::RD_TRACE;
8026 12 $_tok = do { $commit = 1 };
8027 12 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 12 0 12
8028 {
8029 12 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 12 12
8030 . $_tok . q{])},
8031 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8032 if defined $::RD_TRACE;
8033 }
8034 else
8035 {
8036 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8037 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8038 if defined $::RD_TRACE;
8039 }
8040
8041 12 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 12 12
8042 12 push @item, $item{__DIRECTIVE1__}=$_tok;
8043
8044  
8045 12 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/\\s*;/ <commit>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 12 12
8046 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8047 q{complex_command},
8048 $tracelevel)
8049 if defined $::RD_TRACE;
8050  
8051  
8052  
8053 12 $_matched = 1;
8054 12 last;
8055 }
8056  
8057  
8058 1549 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 908 641 1549
Condition100%3/3
$_matched or $commit
l!l&&r!l&&!r
12629908
MC/DC100%2/2
$_matched or $commit
$_matched $commit
Truth table100%3/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
8059 {
8060
8061 908 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\\b)/ statement <commit> trail]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 908 908
8062 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8063 q{complex_command},
8064 $tracelevel)
8065 if defined $::RD_TRACE;
8066 908 my $thisprod = $thisrule->{"prods"}[2];
8067 908 $text = $_[1];
8068 908 my $_savetext;
8069 908 @item = (q{complex_command});
8070 908 %item = (__RULE__ => q{complex_command});
8071 908 my $repcount = 0;
8072  
8073  
8074 908 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\\b)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 908 908
8075 q{complex_command},
8076 $tracelevel)
8077 if defined $::RD_TRACE;
8078 908 undef $lastsep;
8079 908 $expectation->is(q{})->at($text);
8080
8081  
8082 908 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\b))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\b))/) 644 264 908
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\b))/
!ll&&!rl&&r
0644264
($lastsep = $1) && ''
!ll
541367
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\b))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\b))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\b))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
8083 {
8084 644 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 644 0 644
8085 644 $expectation->failed();
8086 644 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 644 644
8087 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8088 if defined $::RD_TRACE;
8089  
8090 644 last;
8091 }
8092 264 $current_match = substr($text, $-[0], $+[0] - $-[0]);
8093 264 substr($text,0,length($current_match),q{});
8094 264 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 264 264
8095 . $current_match . q{])},
8096 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8097 if defined $::RD_TRACE;
8098 264 push @item, $item{__PATTERN1__}=$current_match;
8099
8100  
8101 264 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [statement]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 264 264
8102 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8103 q{complex_command},
8104 $tracelevel)
8105 if defined $::RD_TRACE;
8106 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
8107 264 $expectation->is(q{statement})->at($text);
8108 264 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::statement($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = statement($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 222 42 264
8109 {
8110
8111 222 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [statement]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 222 222
8112 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8113 q{complex_command},
8114 $tracelevel)
8115 if defined $::RD_TRACE;
8116 222 $expectation->failed();
8117 222 last;
8118 }
8119 42 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [statement]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
8120 . $_tok . q{]},
8121  
8122 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8123 q{complex_command},
8124 $tracelevel)
8125 if defined $::RD_TRACE;
8126 42 $item{q{statement}} = $_tok;
8127 42 push @item, $_tok;
8128
8129 }
8130  
8131
8132  
8133 42 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
8134 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8135 q{complex_command},
8136 $tracelevel)
8137 if defined $::RD_TRACE;
8138 42 $_tok = do { $commit = 1 };
8139 42 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 42 0 42
8140 {
8141 42 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
8142 . $_tok . q{])},
8143 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8144 if defined $::RD_TRACE;
8145 }
8146 else
8147 {
8148 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8149 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8150 if defined $::RD_TRACE;
8151 }
8152
8153 42 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 42 42
8154 42 push @item, $item{__DIRECTIVE1__}=$_tok;
8155
8156  
8157 42 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [trail]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
8158 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8159 q{complex_command},
8160 $tracelevel)
8161 if defined $::RD_TRACE;
8162 42 $expectation->is(q{trail})->at($text);
8163
8164 42 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::trail, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::trail, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 42 42
8165 {
8166 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [trail]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8167 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8168 q{complex_command},
8169 $tracelevel)
8170 if defined $::RD_TRACE;
8171 0 last;
8172 }
8173 42 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [trail]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
8174 . @$_tok . q{ times)},
8175  
8176 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8177 q{complex_command},
8178 $tracelevel)
8179 if defined $::RD_TRACE;
8180 42 $item{q{trail(?)}} = $_tok;
8181 42 push @item, $_tok;
8182
8183  
8184  
8185 42 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
8186 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8187 q{complex_command},
8188 $tracelevel)
8189 if defined $::RD_TRACE;
8190
8191  
8192 42 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 42 42
8193 42 ▶ if (scalar(@{$item[4]})) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @{$item[4];}) { } 0 42 42
8194 0 ▶ if ($item[4][0][0] eq 'pipe') {
Branch: 1 branch
BranchTrueFalseTotal
if ($item[4][0][0] eq 'pipe') { } 0 0 0
8195 0 $return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'pipe_command',[$item[2]],$item[4][0][1]]
8196 } else {
8197 0 $return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'string_pipe_command',[$item[2]],$item[4][0][1]]
8198 }
8199 } else {
8200 42 $return=$item[2]
8201 }
8202 };
8203 42 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 42 42
8204 {
8205 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8206 if defined $::RD_TRACE;
8207 0 last;
8208 }
8209 42 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
8210 . $_tok . q{])},
8211 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8212 if defined $::RD_TRACE;
8213 42 push @item, $_tok;
8214 42 $item{__ACTION1__}=$_tok;
8215
8216  
8217 42 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\\b)/ statement <commit> trail]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 42 42
8218 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8219 q{complex_command},
8220 $tracelevel)
8221 if defined $::RD_TRACE;
8222  
8223  
8224  
8225 42 $_matched = 1;
8226 42 last;
8227 }
8228  
8229  
8230 1549 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 866 683 1549
Condition100%3/3
$_matched or $commit
l!l&&r!l&&!r
54629866
MC/DC100%2/2
$_matched or $commit
$_matched $commit
Truth table100%3/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
8231 {
8232
8233 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [command <commit> trail /\\s*;|(?=\\s*\}|\\s*\\Z)/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8234 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8235 q{complex_command},
8236 $tracelevel)
8237 if defined $::RD_TRACE;
8238 866 my $thisprod = $thisrule->{"prods"}[3];
8239 866 $text = $_[1];
8240 866 my $_savetext;
8241 866 @item = (q{complex_command});
8242 866 %item = (__RULE__ => q{complex_command});
8243 866 my $repcount = 0;
8244  
8245  
8246 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8247 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8248 q{complex_command},
8249 $tracelevel)
8250 if defined $::RD_TRACE;
8251 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
8252 866 $expectation->is(q{})->at($text);
8253 866 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::command($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = command($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 866 866
8254 {
8255
8256 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [command]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8257 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8258 q{complex_command},
8259 $tracelevel)
8260 if defined $::RD_TRACE;
8261 0 $expectation->failed();
8262 0 last;
8263 }
8264 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [command]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8265 . $_tok . q{]},
8266  
8267 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8268 q{complex_command},
8269 $tracelevel)
8270 if defined $::RD_TRACE;
8271 866 $item{q{command}} = $_tok;
8272 866 push @item, $_tok;
8273
8274 }
8275  
8276
8277  
8278 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8279 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8280 q{complex_command},
8281 $tracelevel)
8282 if defined $::RD_TRACE;
8283 866 $_tok = do { $commit = 1 };
8284 866 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 866 0 866
8285 {
8286 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8287 . $_tok . q{])},
8288 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8289 if defined $::RD_TRACE;
8290 }
8291 else
8292 {
8293 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8294 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8295 if defined $::RD_TRACE;
8296 }
8297
8298 866 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 866 866
8299 866 push @item, $item{__DIRECTIVE1__}=$_tok;
8300
8301  
8302 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [trail]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8303 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8304 q{complex_command},
8305 $tracelevel)
8306 if defined $::RD_TRACE;
8307 866 $expectation->is(q{trail})->at($text);
8308
8309 866 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::trail, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::trail, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 866 866
8310 {
8311 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [trail]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8312 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8313 q{complex_command},
8314 $tracelevel)
8315 if defined $::RD_TRACE;
8316 0 last;
8317 }
8318 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [trail]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8319 . @$_tok . q{ times)},
8320  
8321 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8322 q{complex_command},
8323 $tracelevel)
8324 if defined $::RD_TRACE;
8325 866 $item{q{trail(?)}} = $_tok;
8326 866 push @item, $_tok;
8327
8328  
8329  
8330 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/\\s*;|(?=\\s*\}|\\s*\\Z)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8331 q{complex_command},
8332 $tracelevel)
8333 if defined $::RD_TRACE;
8334 866 undef $lastsep;
8335 866 $expectation->is(q{/\\s*;|(?=\\s*\}|\\s*\\Z)/})->at($text);
8336
8337  
8338 866 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\s*;|(?=\s*}|\s*\Z))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\s*;|(?=\s*}|\s*\Z))/) 0 866 866
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\s*;|(?=\s*}|\s*\Z))/
!ll&&!rl&&r
00866
($lastsep = $1) && ''
!ll
719147
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\s*;|(?=\s*}|\s*\Z))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:\s*;|(?=\s*}|\s*\Z))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:\s*;|(?=\s*}|\s*\Z))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
8339 {
8340 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
8341 0 $expectation->failed();
8342 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8343 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8344 if defined $::RD_TRACE;
8345  
8346 0 last;
8347 }
8348 866 $current_match = substr($text, $-[0], $+[0] - $-[0]);
8349 866 substr($text,0,length($current_match),q{});
8350 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8351 . $current_match . q{])},
8352 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8353 if defined $::RD_TRACE;
8354 866 push @item, $item{__PATTERN1__}=$current_match;
8355
8356  
8357 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8358 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8359 q{complex_command},
8360 $tracelevel)
8361 if defined $::RD_TRACE;
8362
8363  
8364 866 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 866 866
8365 866 ▶ if (scalar(@{$item[3]})) {
Branch: 1 branch
BranchTrueFalseTotal
if (scalar @{$item[3];}) { } 21 845 866
8366 21 ▶ if ($item[3][0][0] eq 'pipe') {
Branch: 1 branch
BranchTrueFalseTotal
if ($item[3][0][0] eq 'pipe') { } 20 1 21
8367 20 $return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'pipe_command',[$item[1]],$item[3][0][1]]
8368 } else {
8369 1 $return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'string_pipe_command',[$item[1]],$item[3][0][1]]
8370 }
8371 } else {
8372 845 $return=$item[1]
8373 }
8374 };
8375 866 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 866 866
8376 {
8377 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8378 if defined $::RD_TRACE;
8379 0 last;
8380 }
8381 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8382 . $_tok . q{])},
8383 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8384 if defined $::RD_TRACE;
8385 866 push @item, $_tok;
8386 866 $item{__ACTION1__}=$_tok;
8387
8388  
8389 866 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [command <commit> trail /\\s*;|(?=\\s*\}|\\s*\\Z)/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 866 866
8390 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8391 q{complex_command},
8392 $tracelevel)
8393 if defined $::RD_TRACE;
8394  
8395  
8396  
8397 866 $_matched = 1;
8398 866 last;
8399 }
8400  
8401  
8402 1549 ▶ while (!$_matched)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched) 629 920 1549
8403 {
8404
8405 629 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [<error...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 629 629
8406 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8407 q{complex_command},
8408 $tracelevel)
8409 if defined $::RD_TRACE;
8410 629 my $thisprod = $thisrule->{"prods"}[4];
8411
8412 629 my $_savetext;
8413 629 @item = (q{complex_command});
8414 629 %item = (__RULE__ => q{complex_command});
8415 629 my $repcount = 0;
8416  
8417  
8418
8419  
8420 629 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<error...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 629 629
8421 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8422 q{complex_command},
8423 $tracelevel)
8424 if defined $::RD_TRACE;
8425 629 ▶ $_tok = do { if (1) { do {push @{$thisparser->{errors}}, [qq{Parse error near: "}.substr($text,0,40).qq{ ..."},$thisline];} unless $_noactions; undef } else {0} };
Branch: 1 branch
BranchTrueFalseTotal
unless ($_noactions) 629 0 629
8426 629 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 629 629
8427 {
8428 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8429 . $_tok . q{])},
8430 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8431 if defined $::RD_TRACE;
8432 }
8433 else
8434 {
8435 629 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 629 629
8436 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8437 if defined $::RD_TRACE;
8438 }
8439
8440 629 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 629 0 629
8441 0 push @item, $item{__DIRECTIVE1__}=$_tok;
8442
8443  
8444 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [<error...>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8445 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8446 q{complex_command},
8447 $tracelevel)
8448 if defined $::RD_TRACE;
8449  
8450  
8451  
8452 0 $_matched = 1;
8453 0 last;
8454 }
8455  
8456  
8457 1549 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 629 920 1549
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
9200629
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
8458 {
8459
8460  
8461 629 $_[1] = $text; # NOT SURE THIS IS NEEDED
8462 629 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 629 629
8463 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8464 q{complex_command},
8465 $tracelevel)
8466 if defined $::RD_TRACE;
8467 629 return undef;
8468 }
8469 920 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 920 920
Condition66%2/3
not defined $return and defined $score
!ll&&!rl&&r
908120
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table66%2/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
8470 {
8471 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8472 q{complex_command},
8473 $tracelevel)
8474 if defined $::RD_TRACE;
8475 0 $return = $score_return;
8476 }
8477 920 splice @{$thisparser->{errors}}, $err_at;
8478 920 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 12 908 920
8479 920 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 920 920
8480 {
8481 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
8482 $return . q{])}, "",
8483 q{complex_command},
8484 $tracelevel);
8485 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
8486 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
8487 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8488 , q{complex_command},
8489 $tracelevel)
8490 }
8491 920 $_[1] = $text;
8492 920 return $return;
8493 }
8494  
8495 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
8496 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::else_block
8497 8 ▶{
Subroutine else_block: called CC=68 SCAR=61.9
8498 8 my $thisparser = $_[0];
8499 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
8500 8 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
80
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
8501 8 $ERRORS = 0;
8502 8 my $thisrule = $thisparser->{"rules"}{"else_block"};
8503  
8504 8 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [else_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
8505 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8506 q{else_block},
8507 $tracelevel)
8508 if defined $::RD_TRACE;
8509  
8510
8511 8 my $err_at = @{$thisparser->{errors}};
8512  
8513 8 my $score;
8514 my $score_return;
8515 8 my $_tok;
8516 8 my $return = undef;
8517 8 my $_matched=0;
8518 8 my $commit=0;
8519 8 my @item = ();
8520 8 my %item = ();
8521 8 my $repeating = $_[2];
8522 8 my $_noactions = $_[3];
8523 8 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 8 0 8
8524 8 my $_itempos = $_[5];
8525 8 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 8 0 8
8526 8 my $text;
8527 my $lastsep;
8528 8 my $current_match;
8529 8 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(else)\\b/, or /(?!else)/});
8530 8 $expectation->at($_[1]);
8531
8532 8 my $thisoffset;
8533 8 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
8534
8535 8 my $thiscolumn;
8536 8 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
8537
8538 8 my $thisline;
8539 8 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
8540  
8541
8542  
8543 8 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 8 0 8
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
008
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
8544 {
8545
8546 8 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(else)\\b/ <commit> block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
8547 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8548 q{else_block},
8549 $tracelevel)
8550 if defined $::RD_TRACE;
8551 8 my $thisprod = $thisrule->{"prods"}[0];
8552 8 $text = $_[1];
8553 8 my $_savetext;
8554 8 @item = (q{else_block});
8555 8 %item = (__RULE__ => q{else_block});
8556 8 my $repcount = 0;
8557  
8558  
8559 8 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(else)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
8560 q{else_block},
8561 $tracelevel)
8562 if defined $::RD_TRACE;
8563 8 undef $lastsep;
8564 8 $expectation->is(q{})->at($text);
8565
8566  
8567 8 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(else)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(else)\b)/) 4 4 8
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(else)\b)/
!ll&&!rl&&r
044
($lastsep = $1) && ''
!ll
62
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(else)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(else)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(else)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
8568 {
8569 4 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 4 0 4
8570 4 $expectation->failed();
8571 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8572 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8573 if defined $::RD_TRACE;
8574  
8575 4 last;
8576 }
8577 4 $current_match = substr($text, $-[0], $+[0] - $-[0]);
8578 4 substr($text,0,length($current_match),q{});
8579 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8580 . $current_match . q{])},
8581 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8582 if defined $::RD_TRACE;
8583 4 push @item, $item{__PATTERN1__}=$current_match;
8584
8585  
8586
8587  
8588 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8589 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8590 q{else_block},
8591 $tracelevel)
8592 if defined $::RD_TRACE;
8593 4 $_tok = do { $commit = 1 };
8594 4 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 4 0 4
8595 {
8596 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8597 . $_tok . q{])},
8598 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8599 if defined $::RD_TRACE;
8600 }
8601 else
8602 {
8603 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8604 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8605 if defined $::RD_TRACE;
8606 }
8607
8608 4 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 4 4
8609 4 push @item, $item{__DIRECTIVE1__}=$_tok;
8610
8611  
8612 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8613 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8614 q{else_block},
8615 $tracelevel)
8616 if defined $::RD_TRACE;
8617 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
8618 4 $expectation->is(q{block})->at($text);
8619 4 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 4 4
8620 {
8621
8622 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8623 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8624 q{else_block},
8625 $tracelevel)
8626 if defined $::RD_TRACE;
8627 0 $expectation->failed();
8628 0 last;
8629 }
8630 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8631 . $_tok . q{]},
8632  
8633 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8634 q{else_block},
8635 $tracelevel)
8636 if defined $::RD_TRACE;
8637 4 $item{q{block}} = $_tok;
8638 4 push @item, $_tok;
8639
8640 }
8641  
8642 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8643 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8644 q{else_block},
8645 $tracelevel)
8646 if defined $::RD_TRACE;
8647
8648  
8649 4 ▶ $_tok = ($_noactions) ? 0 : do { [[undef,$item[3]]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 4 4
8650 4 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 4 4
8651 {
8652 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8653 if defined $::RD_TRACE;
8654 0 last;
8655 }
8656 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8657 . $_tok . q{])},
8658 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8659 if defined $::RD_TRACE;
8660 4 push @item, $_tok;
8661 4 $item{__ACTION1__}=$_tok;
8662
8663  
8664 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(else)\\b/ <commit> block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8665 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8666 q{else_block},
8667 $tracelevel)
8668 if defined $::RD_TRACE;
8669  
8670  
8671  
8672 4 $_matched = 1;
8673 4 last;
8674 }
8675  
8676  
8677 8 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 4 4 8
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
404
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
8678 {
8679
8680 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?!else)/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8681 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8682 q{else_block},
8683 $tracelevel)
8684 if defined $::RD_TRACE;
8685 4 my $thisprod = $thisrule->{"prods"}[1];
8686 4 $text = $_[1];
8687 4 my $_savetext;
8688 4 @item = (q{else_block});
8689 4 %item = (__RULE__ => q{else_block});
8690 4 my $repcount = 0;
8691  
8692  
8693 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?!else)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8694 q{else_block},
8695 $tracelevel)
8696 if defined $::RD_TRACE;
8697 4 undef $lastsep;
8698 4 $expectation->is(q{})->at($text);
8699
8700  
8701 4 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?!else))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?!else))/) 0 4 4
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?!else))/
!ll&&!rl&&r
004
($lastsep = $1) && ''
!ll
40
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?!else))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?!else))/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?!else))/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
8702 {
8703 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
8704 0 $expectation->failed();
8705 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8706 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8707 if defined $::RD_TRACE;
8708  
8709 0 last;
8710 }
8711 4 $current_match = substr($text, $-[0], $+[0] - $-[0]);
8712 4 substr($text,0,length($current_match),q{});
8713 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8714 . $current_match . q{])},
8715 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8716 if defined $::RD_TRACE;
8717 4 push @item, $item{__PATTERN1__}=$current_match;
8718
8719  
8720 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8721 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8722 q{else_block},
8723 $tracelevel)
8724 if defined $::RD_TRACE;
8725
8726  
8727 4 ▶ $_tok = ($_noactions) ? 0 : do { [] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 4 4
8728 4 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 4 4
8729 {
8730 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8731 if defined $::RD_TRACE;
8732 0 last;
8733 }
8734 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8735 . $_tok . q{])},
8736 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8737 if defined $::RD_TRACE;
8738 4 push @item, $_tok;
8739 4 $item{__ACTION1__}=$_tok;
8740
8741  
8742 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?!else)/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8743 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8744 q{else_block},
8745 $tracelevel)
8746 if defined $::RD_TRACE;
8747  
8748  
8749  
8750 4 $_matched = 1;
8751 4 last;
8752 }
8753  
8754  
8755 8 ▶ while (!$_matched)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched) 0 8 8
8756 {
8757
8758 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [<uncommit> <error...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8759 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8760 q{else_block},
8761 $tracelevel)
8762 if defined $::RD_TRACE;
8763 0 my $thisprod = $thisrule->{"prods"}[2];
8764 0 $text = $_[1];
8765 0 my $_savetext;
8766 0 @item = (q{else_block});
8767 0 %item = (__RULE__ => q{else_block});
8768 0 my $repcount = 0;
8769  
8770  
8771
8772  
8773 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<uncommit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8774 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8775 q{else_block},
8776 $tracelevel)
8777 if defined $::RD_TRACE;
8778 0 $_tok = do { $commit=0;1 };
8779 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
8780 {
8781 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8782 . $_tok . q{])},
8783 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8784 if defined $::RD_TRACE;
8785 }
8786 else
8787 {
8788 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8789 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8790 if defined $::RD_TRACE;
8791 }
8792
8793 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
8794 0 push @item, $item{__DIRECTIVE1__}=$_tok;
8795
8796  
8797
8798  
8799 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<error...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8800 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8801 q{else_block},
8802 $tracelevel)
8803 if defined $::RD_TRACE;
8804 0 ▶ $_tok = do { if (1) { do {push @{$thisparser->{errors}}, [qq{Parse error near keyword else: "}.substr($text,0,40).qq{ ..."},$thisline];} unless $_noactions; undef } else {0} };
Branch: 1 branch
BranchTrueFalseTotal
unless ($_noactions) 0 0 0
8805 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
8806 {
8807 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8808 . $_tok . q{])},
8809 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8810 if defined $::RD_TRACE;
8811 }
8812 else
8813 {
8814 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8815 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8816 if defined $::RD_TRACE;
8817 }
8818
8819 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
8820 0 push @item, $item{__DIRECTIVE2__}=$_tok;
8821
8822  
8823 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [<uncommit> <error...>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8824 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8825 q{else_block},
8826 $tracelevel)
8827 if defined $::RD_TRACE;
8828  
8829  
8830  
8831 0 $_matched = 1;
8832 0 last;
8833 }
8834  
8835  
8836 8 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 8 8
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
800
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
8837 {
8838
8839  
8840 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
8841 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8842 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8843 q{else_block},
8844 $tracelevel)
8845 if defined $::RD_TRACE;
8846 0 return undef;
8847 }
8848 8 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 8 8
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
080
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
8849 {
8850 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8851 q{else_block},
8852 $tracelevel)
8853 if defined $::RD_TRACE;
8854 0 $return = $score_return;
8855 }
8856 8 splice @{$thisparser->{errors}}, $err_at;
8857 8 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 8 0 8
8858 8 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 8 8
8859 {
8860 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
8861 $return . q{])}, "",
8862 q{else_block},
8863 $tracelevel);
8864 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
8865 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
8866 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8867 , q{else_block},
8868 $tracelevel)
8869 }
8870 8 $_[1] = $text;
8871 8 return $return;
8872 }
8873  
8874 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
8875 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::elsif_block
8876 4 ▶{
Subroutine elsif_block: called CC=76 SCAR=73.3
8877 4 my $thisparser = $_[0];
8878 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
8879 4 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
40
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
8880 4 $ERRORS = 0;
8881 4 my $thisrule = $thisparser->{"rules"}{"elsif_block"};
8882  
8883 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [elsif_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8884 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8885 q{elsif_block},
8886 $tracelevel)
8887 if defined $::RD_TRACE;
8888  
8889
8890 4 my $err_at = @{$thisparser->{errors}};
8891  
8892 4 my $score;
8893 my $score_return;
8894 4 my $_tok;
8895 4 my $return = undef;
8896 4 my $_matched=0;
8897 4 my $commit=0;
8898 4 my @item = ();
8899 4 my %item = ();
8900 4 my $repeating = $_[2];
8901 4 my $_noactions = $_[3];
8902 4 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 4 0 4
8903 4 my $_itempos = $_[5];
8904 4 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 4 0 4
8905 4 my $text;
8906 my $lastsep;
8907 4 my $current_match;
8908 4 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(elsif)\\b/, or /(?!elsif)/});
8909 4 $expectation->at($_[1]);
8910
8911 4 my $thisoffset;
8912 4 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
8913
8914 4 my $thiscolumn;
8915 4 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
8916
8917 4 my $thisline;
8918 4 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
8919  
8920
8921  
8922 4 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 4 0 4
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
004
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
8923 {
8924
8925 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(elsif)\\b/ <commit> exp block elsif_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8926 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
8927 q{elsif_block},
8928 $tracelevel)
8929 if defined $::RD_TRACE;
8930 4 my $thisprod = $thisrule->{"prods"}[0];
8931 4 $text = $_[1];
8932 4 my $_savetext;
8933 4 @item = (q{elsif_block});
8934 4 %item = (__RULE__ => q{elsif_block});
8935 4 my $repcount = 0;
8936  
8937  
8938 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(elsif)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8939 q{elsif_block},
8940 $tracelevel)
8941 if defined $::RD_TRACE;
8942 4 undef $lastsep;
8943 4 $expectation->is(q{})->at($text);
8944
8945  
8946 4 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(elsif)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(elsif)\b)/) 4 0 4
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(elsif)\b)/
!ll&&!rl&&r
040
($lastsep = $1) && ''
!ll
22
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(elsif)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(elsif)\b)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(elsif)\b)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
8947 {
8948 4 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 4 0 4
8949 4 $expectation->failed();
8950 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
8951 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8952 if defined $::RD_TRACE;
8953  
8954 4 last;
8955 }
8956 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
8957 0 substr($text,0,length($current_match),q{});
8958 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8959 . $current_match . q{])},
8960 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8961 if defined $::RD_TRACE;
8962 0 push @item, $item{__PATTERN1__}=$current_match;
8963
8964  
8965
8966  
8967 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8968 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8969 q{elsif_block},
8970 $tracelevel)
8971 if defined $::RD_TRACE;
8972 0 $_tok = do { $commit = 1 };
8973 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
8974 {
8975 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8976 . $_tok . q{])},
8977 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8978 if defined $::RD_TRACE;
8979 }
8980 else
8981 {
8982 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8983 XML::XSH2::Parser::_Runtime::_tracefirst($text))
8984 if defined $::RD_TRACE;
8985 }
8986
8987 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
8988 0 push @item, $item{__DIRECTIVE1__}=$_tok;
8989
8990  
8991 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
8992 XML::XSH2::Parser::_Runtime::_tracefirst($text),
8993 q{elsif_block},
8994 $tracelevel)
8995 if defined $::RD_TRACE;
8996 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
8997 0 $expectation->is(q{exp})->at($text);
8998 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
8999 {
9000
9001 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9002 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9003 q{elsif_block},
9004 $tracelevel)
9005 if defined $::RD_TRACE;
9006 0 $expectation->failed();
9007 0 last;
9008 }
9009 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9010 . $_tok . q{]},
9011  
9012 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9013 q{elsif_block},
9014 $tracelevel)
9015 if defined $::RD_TRACE;
9016 0 $item{q{exp}} = $_tok;
9017 0 push @item, $_tok;
9018
9019 }
9020  
9021 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9022 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9023 q{elsif_block},
9024 $tracelevel)
9025 if defined $::RD_TRACE;
9026 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
9027 0 $expectation->is(q{block})->at($text);
9028 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
9029 {
9030
9031 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9032 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9033 q{elsif_block},
9034 $tracelevel)
9035 if defined $::RD_TRACE;
9036 0 $expectation->failed();
9037 0 last;
9038 }
9039 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9040 . $_tok . q{]},
9041  
9042 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9043 q{elsif_block},
9044 $tracelevel)
9045 if defined $::RD_TRACE;
9046 0 $item{q{block}} = $_tok;
9047 0 push @item, $_tok;
9048
9049 }
9050  
9051 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [elsif_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9052 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9053 q{elsif_block},
9054 $tracelevel)
9055 if defined $::RD_TRACE;
9056 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
9057 0 $expectation->is(q{elsif_block})->at($text);
9058 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::elsif_block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = elsif_block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
9059 {
9060
9061 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [elsif_block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9062 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9063 q{elsif_block},
9064 $tracelevel)
9065 if defined $::RD_TRACE;
9066 0 $expectation->failed();
9067 0 last;
9068 }
9069 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [elsif_block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9070 . $_tok . q{]},
9071  
9072 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9073 q{elsif_block},
9074 $tracelevel)
9075 if defined $::RD_TRACE;
9076 0 $item{q{elsif_block}} = $_tok;
9077 0 push @item, $_tok;
9078
9079 }
9080  
9081 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9082 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9083 q{elsif_block},
9084 $tracelevel)
9085 if defined $::RD_TRACE;
9086
9087  
9088 0 ▶ $_tok = ($_noactions) ? 0 : do { [[$item[3],$item[4]],@{$item[5]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
9089 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
9090 {
9091 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9092 if defined $::RD_TRACE;
9093 0 last;
9094 }
9095 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9096 . $_tok . q{])},
9097 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9098 if defined $::RD_TRACE;
9099 0 push @item, $_tok;
9100 0 $item{__ACTION1__}=$_tok;
9101
9102  
9103 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(elsif)\\b/ <commit> exp block elsif_block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9104 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9105 q{elsif_block},
9106 $tracelevel)
9107 if defined $::RD_TRACE;
9108  
9109  
9110  
9111 0 $_matched = 1;
9112 0 last;
9113 }
9114  
9115  
9116 4 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 4 0 4
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
004
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
9117 {
9118
9119 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?!elsif)/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
9120 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9121 q{elsif_block},
9122 $tracelevel)
9123 if defined $::RD_TRACE;
9124 4 my $thisprod = $thisrule->{"prods"}[1];
9125 4 $text = $_[1];
9126 4 my $_savetext;
9127 4 @item = (q{elsif_block});
9128 4 %item = (__RULE__ => q{elsif_block});
9129 4 my $repcount = 0;
9130  
9131  
9132 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?!elsif)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
9133 q{elsif_block},
9134 $tracelevel)
9135 if defined $::RD_TRACE;
9136 4 undef $lastsep;
9137 4 $expectation->is(q{})->at($text);
9138
9139  
9140 4 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?!elsif))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?!elsif))/) 0 4 4
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?!elsif))/
!ll&&!rl&&r
004
($lastsep = $1) && ''
!ll
22
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?!elsif))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?!elsif))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?!elsif))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
9141 {
9142 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
9143 0 $expectation->failed();
9144 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9145 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9146 if defined $::RD_TRACE;
9147  
9148 0 last;
9149 }
9150 4 $current_match = substr($text, $-[0], $+[0] - $-[0]);
9151 4 substr($text,0,length($current_match),q{});
9152 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
9153 . $current_match . q{])},
9154 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9155 if defined $::RD_TRACE;
9156 4 push @item, $item{__PATTERN1__}=$current_match;
9157
9158  
9159 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
9160 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9161 q{elsif_block},
9162 $tracelevel)
9163 if defined $::RD_TRACE;
9164
9165  
9166 4 ▶ $_tok = ($_noactions) ? 0 : do { [] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 4 4
9167 4 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 4 4
9168 {
9169 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9170 if defined $::RD_TRACE;
9171 0 last;
9172 }
9173 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
9174 . $_tok . q{])},
9175 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9176 if defined $::RD_TRACE;
9177 4 push @item, $_tok;
9178 4 $item{__ACTION1__}=$_tok;
9179
9180  
9181 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?!elsif)/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
9182 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9183 q{elsif_block},
9184 $tracelevel)
9185 if defined $::RD_TRACE;
9186  
9187  
9188  
9189 4 $_matched = 1;
9190 4 last;
9191 }
9192  
9193  
9194 4 ▶ while (!$_matched)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched) 0 4 4
9195 {
9196
9197 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [<uncommit> <error...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9198 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9199 q{elsif_block},
9200 $tracelevel)
9201 if defined $::RD_TRACE;
9202 0 my $thisprod = $thisrule->{"prods"}[2];
9203 0 $text = $_[1];
9204 0 my $_savetext;
9205 0 @item = (q{elsif_block});
9206 0 %item = (__RULE__ => q{elsif_block});
9207 0 my $repcount = 0;
9208  
9209  
9210
9211  
9212 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<uncommit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9213 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9214 q{elsif_block},
9215 $tracelevel)
9216 if defined $::RD_TRACE;
9217 0 $_tok = do { $commit=0;1 };
9218 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
9219 {
9220 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9221 . $_tok . q{])},
9222 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9223 if defined $::RD_TRACE;
9224 }
9225 else
9226 {
9227 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9228 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9229 if defined $::RD_TRACE;
9230 }
9231
9232 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
9233 0 push @item, $item{__DIRECTIVE1__}=$_tok;
9234
9235  
9236
9237  
9238 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<error...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9239 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9240 q{elsif_block},
9241 $tracelevel)
9242 if defined $::RD_TRACE;
9243 0 ▶ $_tok = do { if (1) { do {push @{$thisparser->{errors}}, [qq{Parse error near keyword elsif: "}.substr($text,0,40).qq{ ..."},$thisline];} unless $_noactions; undef } else {0} };
Branch: 1 branch
BranchTrueFalseTotal
unless ($_noactions) 0 0 0
9244 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
9245 {
9246 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9247 . $_tok . q{])},
9248 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9249 if defined $::RD_TRACE;
9250 }
9251 else
9252 {
9253 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9254 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9255 if defined $::RD_TRACE;
9256 }
9257
9258 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
9259 0 push @item, $item{__DIRECTIVE2__}=$_tok;
9260
9261  
9262 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [<uncommit> <error...>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9263 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9264 q{elsif_block},
9265 $tracelevel)
9266 if defined $::RD_TRACE;
9267  
9268  
9269  
9270 0 $_matched = 1;
9271 0 last;
9272 }
9273  
9274  
9275 4 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 4 4
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
400
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
9276 {
9277
9278  
9279 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
9280 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9281 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9282 q{elsif_block},
9283 $tracelevel)
9284 if defined $::RD_TRACE;
9285 0 return undef;
9286 }
9287 4 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 4 4
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
040
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
9288 {
9289 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9290 q{elsif_block},
9291 $tracelevel)
9292 if defined $::RD_TRACE;
9293 0 $return = $score_return;
9294 }
9295 4 splice @{$thisparser->{errors}}, $err_at;
9296 4 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 4 0 4
9297 4 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 4 4
9298 {
9299 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
9300 $return . q{])}, "",
9301 q{elsif_block},
9302 $tracelevel);
9303 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
9304 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
9305 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9306 , q{elsif_block},
9307 $tracelevel)
9308 }
9309 4 $_[1] = $text;
9310 4 return $return;
9311 }
9312  
9313 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
9314 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::enc_string
9315 0 ▶{
Subroutine enc_string: not called CC=21 SCAR=59.9
9316 0 my $thisparser = $_[0];
9317 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
9318 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
9319 0 $ERRORS = 0;
9320 0 my $thisrule = $thisparser->{"rules"}{"enc_string"};
9321  
9322 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [enc_string]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9323 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9324 q{enc_string},
9325 $tracelevel)
9326 if defined $::RD_TRACE;
9327  
9328
9329 0 my $err_at = @{$thisparser->{errors}};
9330  
9331 0 my $score;
9332 my $score_return;
9333 0 my $_tok;
9334 0 my $return = undef;
9335 0 my $_matched=0;
9336 0 my $commit=0;
9337 0 my @item = ();
9338 0 my %item = ();
9339 0 my $repeating = $_[2];
9340 0 my $_noactions = $_[3];
9341 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
9342 0 my $_itempos = $_[5];
9343 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
9344 0 my $text;
9345 my $lastsep;
9346 0 my $current_match;
9347 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{exp});
9348 0 $expectation->at($_[1]);
9349
9350 0 my $thisoffset;
9351 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
9352
9353 0 my $thiscolumn;
9354 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
9355
9356 0 my $thisline;
9357 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
9358  
9359
9360  
9361 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
9362 {
9363
9364 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9365 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9366 q{enc_string},
9367 $tracelevel)
9368 if defined $::RD_TRACE;
9369 0 my $thisprod = $thisrule->{"prods"}[0];
9370 0 $text = $_[1];
9371 0 my $_savetext;
9372 0 @item = (q{enc_string});
9373 0 %item = (__RULE__ => q{enc_string});
9374 0 my $repcount = 0;
9375  
9376  
9377 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9378 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9379 q{enc_string},
9380 $tracelevel)
9381 if defined $::RD_TRACE;
9382 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
9383 0 $expectation->is(q{})->at($text);
9384 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
9385 {
9386
9387 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9388 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9389 q{enc_string},
9390 $tracelevel)
9391 if defined $::RD_TRACE;
9392 0 $expectation->failed();
9393 0 last;
9394 }
9395 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9396 . $_tok . q{]},
9397  
9398 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9399 q{enc_string},
9400 $tracelevel)
9401 if defined $::RD_TRACE;
9402 0 $item{q{exp}} = $_tok;
9403 0 push @item, $_tok;
9404
9405 }
9406  
9407 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [exp]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9408 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9409 q{enc_string},
9410 $tracelevel)
9411 if defined $::RD_TRACE;
9412  
9413  
9414  
9415 0 $_matched = 1;
9416 0 last;
9417 }
9418  
9419  
9420 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
9421 {
9422
9423  
9424 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
9425 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9426 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9427 q{enc_string},
9428 $tracelevel)
9429 if defined $::RD_TRACE;
9430 0 return undef;
9431 }
9432 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
9433 {
9434 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9435 q{enc_string},
9436 $tracelevel)
9437 if defined $::RD_TRACE;
9438 0 $return = $score_return;
9439 }
9440 0 splice @{$thisparser->{errors}}, $err_at;
9441 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
9442 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
9443 {
9444 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
9445 $return . q{])}, "",
9446 q{enc_string},
9447 $tracelevel);
9448 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
9449 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
9450 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9451 , q{enc_string},
9452 $tracelevel)
9453 }
9454 0 $_[1] = $text;
9455 0 return $return;
9456 }
9457  
9458 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
9459 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::eof
9460 574 ▶{
Subroutine eof: called CC=29 SCAR=41.5
9461 574 my $thisparser = $_[0];
9462 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
9463 574 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
5740
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
9464 574 $ERRORS = 0;
9465 574 my $thisrule = $thisparser->{"rules"}{"eof"};
9466  
9467 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [eof]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
9468 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9469 q{eof},
9470 $tracelevel)
9471 if defined $::RD_TRACE;
9472  
9473
9474 574 my $err_at = @{$thisparser->{errors}};
9475  
9476 574 my $score;
9477 my $score_return;
9478 574 my $_tok;
9479 574 my $return = undef;
9480 574 my $_matched=0;
9481 574 my $commit=0;
9482 574 my @item = ();
9483 574 my %item = ();
9484 574 my $repeating = $_[2];
9485 574 my $_noactions = $_[3];
9486 574 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 574 0 574
9487 574 my $_itempos = $_[5];
9488 574 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 574 0 574
9489 574 my $text;
9490 my $lastsep;
9491 574 my $current_match;
9492 574 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/\\Z/});
9493 574 $expectation->at($_[1]);
9494
9495 574 my $thisoffset;
9496 574 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
9497
9498 574 my $thiscolumn;
9499 574 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
9500
9501 574 my $thisline;
9502 574 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
9503  
9504
9505  
9506 574 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 574 0 574
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00574
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
9507 {
9508
9509 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/\\Z/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
9510 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9511 q{eof},
9512 $tracelevel)
9513 if defined $::RD_TRACE;
9514 574 my $thisprod = $thisrule->{"prods"}[0];
9515 574 $text = $_[1];
9516 574 my $_savetext;
9517 574 @item = (q{eof});
9518 574 %item = (__RULE__ => q{eof});
9519 574 my $repcount = 0;
9520  
9521  
9522 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/\\Z/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
9523 q{eof},
9524 $tracelevel)
9525 if defined $::RD_TRACE;
9526 574 undef $lastsep;
9527 574 $expectation->is(q{})->at($text);
9528
9529  
9530 574 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\Z)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\Z)/) 0 574 574
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\Z)/
!ll&&!rl&&r
00574
($lastsep = $1) && ''
!ll
5677
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\Z)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:\Z)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:\Z)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
9531 {
9532 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
9533 0 $expectation->failed();
9534 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9535 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9536 if defined $::RD_TRACE;
9537  
9538 0 last;
9539 }
9540 574 $current_match = substr($text, $-[0], $+[0] - $-[0]);
9541 574 substr($text,0,length($current_match),q{});
9542 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
9543 . $current_match . q{])},
9544 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9545 if defined $::RD_TRACE;
9546 574 push @item, $item{__PATTERN1__}=$current_match;
9547
9548  
9549 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
9550 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9551 q{eof},
9552 $tracelevel)
9553 if defined $::RD_TRACE;
9554
9555  
9556 574 ▶ $_tok = ($_noactions) ? 0 : do { 1; };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 574 574
9557 574 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 574 574
9558 {
9559 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9560 if defined $::RD_TRACE;
9561 0 last;
9562 }
9563 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
9564 . $_tok . q{])},
9565 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9566 if defined $::RD_TRACE;
9567 574 push @item, $_tok;
9568 574 $item{__ACTION1__}=$_tok;
9569
9570  
9571 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/\\Z/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
9572 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9573 q{eof},
9574 $tracelevel)
9575 if defined $::RD_TRACE;
9576  
9577  
9578  
9579 574 $_matched = 1;
9580 574 last;
9581 }
9582  
9583  
9584 574 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 574 574
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
57400
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
9585 {
9586
9587  
9588 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
9589 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9590 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9591 q{eof},
9592 $tracelevel)
9593 if defined $::RD_TRACE;
9594 0 return undef;
9595 }
9596 574 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 574 574
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
05740
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
9597 {
9598 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9599 q{eof},
9600 $tracelevel)
9601 if defined $::RD_TRACE;
9602 0 $return = $score_return;
9603 }
9604 574 splice @{$thisparser->{errors}}, $err_at;
9605 574 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 574 0 574
9606 574 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 574 574
9607 {
9608 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
9609 $return . q{])}, "",
9610 q{eof},
9611 $tracelevel);
9612 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
9613 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
9614 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9615 , q{eof},
9616 $tracelevel)
9617 }
9618 574 $_[1] = $text;
9619 574 return $return;
9620 }
9621  
9622 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
9623 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp
9624 1453 ▶{
Subroutine exp: called CC=81 SCAR=52.3
9625 1453 my $thisparser = $_[0];
9626 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
9627 1453 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
14530
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
9628 1453 $ERRORS = 0;
9629 1453 my $thisrule = $thisparser->{"rules"}{"exp"};
9630  
9631 1453 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1453 1453
9632 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9633 q{exp},
9634 $tracelevel)
9635 if defined $::RD_TRACE;
9636  
9637
9638 1453 my $err_at = @{$thisparser->{errors}};
9639  
9640 1453 my $score;
9641 my $score_return;
9642 1453 my $_tok;
9643 1453 my $return = undef;
9644 1453 my $_matched=0;
9645 1453 my $commit=0;
9646 1453 my @item = ();
9647 1453 my %item = ();
9648 1453 my $repeating = $_[2];
9649 1453 my $_noactions = $_[3];
9650 1453 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1453 0 1453
9651 1453 my $_itempos = $_[5];
9652 1453 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1453 0 1453
9653 1453 my $text;
9654 my $lastsep;
9655 1453 my $current_match;
9656 1453 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/^(?=\{)/, or '&', or /^(?=<<)/, or xpath});
9657 1453 $expectation->at($_[1]);
9658
9659 1453 my $thisoffset;
9660 1453 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
9661
9662 1453 my $thiscolumn;
9663 1453 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
9664
9665 1453 my $thisline;
9666 1453 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
9667  
9668
9669  
9670 1453 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1453 0 1453
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001453
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
9671 {
9672
9673 1453 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/^(?=\{)/ perl_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1453 1453
9674 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9675 q{exp},
9676 $tracelevel)
9677 if defined $::RD_TRACE;
9678 1453 my $thisprod = $thisrule->{"prods"}[0];
9679 1453 $text = $_[1];
9680 1453 my $_savetext;
9681 1453 @item = (q{exp});
9682 1453 %item = (__RULE__ => q{exp});
9683 1453 my $repcount = 0;
9684  
9685  
9686 1453 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/^(?=\{)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1453 1453
9687 q{exp},
9688 $tracelevel)
9689 if defined $::RD_TRACE;
9690 1453 undef $lastsep;
9691 1453 $expectation->is(q{})->at($text);
9692
9693  
9694 1453 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^(?={))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?={))/) 1336 117 1453
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?={))/
!ll&&!rl&&r
01336117
($lastsep = $1) && ''
!ll
21451
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?={))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:^(?={))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:^(?={))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
9695 {
9696 1336 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 1336 0 1336
9697 1336 $expectation->failed();
9698 1336 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1336 1336
9699 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9700 if defined $::RD_TRACE;
9701  
9702 1336 last;
9703 }
9704 117 $current_match = substr($text, $-[0], $+[0] - $-[0]);
9705 117 substr($text,0,length($current_match),q{});
9706 117 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 117 117
9707 . $current_match . q{])},
9708 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9709 if defined $::RD_TRACE;
9710 117 push @item, $item{__PATTERN1__}=$current_match;
9711
9712  
9713 117 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [perl_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 117 117
9714 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9715 q{exp},
9716 $tracelevel)
9717 if defined $::RD_TRACE;
9718 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
9719 117 $expectation->is(q{perl_block})->at($text);
9720 117 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::perl_block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = perl_block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 117 117
9721 {
9722
9723 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [perl_block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9724 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9725 q{exp},
9726 $tracelevel)
9727 if defined $::RD_TRACE;
9728 0 $expectation->failed();
9729 0 last;
9730 }
9731 117 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [perl_block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 117 117
9732 . $_tok . q{]},
9733  
9734 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9735 q{exp},
9736 $tracelevel)
9737 if defined $::RD_TRACE;
9738 117 $item{q{perl_block}} = $_tok;
9739 117 push @item, $_tok;
9740
9741 }
9742  
9743 117 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 117 117
9744 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9745 q{exp},
9746 $tracelevel)
9747 if defined $::RD_TRACE;
9748
9749  
9750 117 ▶ $_tok = ($_noactions) ? 0 : do { $item[2] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 117 117
9751 117 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 117 117
9752 {
9753 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9754 if defined $::RD_TRACE;
9755 0 last;
9756 }
9757 117 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 117 117
9758 . $_tok . q{])},
9759 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9760 if defined $::RD_TRACE;
9761 117 push @item, $_tok;
9762 117 $item{__ACTION1__}=$_tok;
9763
9764  
9765 117 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/^(?=\{)/ perl_block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 117 117
9766 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9767 q{exp},
9768 $tracelevel)
9769 if defined $::RD_TRACE;
9770  
9771  
9772  
9773 117 $_matched = 1;
9774 117 last;
9775 }
9776  
9777  
9778 1453 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1336 117 1453
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
11701336
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
9779 {
9780
9781 1336 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: ['&' block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1336 1336
9782 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9783 q{exp},
9784 $tracelevel)
9785 if defined $::RD_TRACE;
9786 1336 my $thisprod = $thisrule->{"prods"}[1];
9787 1336 $text = $_[1];
9788 1336 my $_savetext;
9789 1336 @item = (q{exp});
9790 1336 %item = (__RULE__ => q{exp});
9791 1336 my $repcount = 0;
9792  
9793  
9794 1336 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['&']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1336 1336
9795 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9796 q{exp},
9797 $tracelevel)
9798 if defined $::RD_TRACE;
9799 1336 undef $lastsep;
9800 1336 $expectation->is(q{})->at($text);
9801
9802  
9803 1336 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\&/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\&/) 1334 2 1336
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\&/
!ll&&!rl&&r
013342
($lastsep = $1) && ''
!ll
11335
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\&/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\&/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\&/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
9804 {
9805 1334 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 1334 0 1334
9806
9807 1334 $expectation->failed();
9808 1334 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1334 1334
9809 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9810 if defined $::RD_TRACE;
9811 1334 last;
9812 }
9813 2 $current_match = substr($text, $-[0], $+[0] - $-[0]);
9814 2 substr($text,0,length($current_match),q{});
9815 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
9816 . $current_match . q{])},
9817 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9818 if defined $::RD_TRACE;
9819 2 push @item, $item{__STRING1__}=$current_match;
9820
9821  
9822 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
9823 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9824 q{exp},
9825 $tracelevel)
9826 if defined $::RD_TRACE;
9827 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
9828 2 $expectation->is(q{block})->at($text);
9829 2 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 2 2
9830 {
9831
9832 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9833 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9834 q{exp},
9835 $tracelevel)
9836 if defined $::RD_TRACE;
9837 0 $expectation->failed();
9838 0 last;
9839 }
9840 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
9841 . $_tok . q{]},
9842  
9843 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9844 q{exp},
9845 $tracelevel)
9846 if defined $::RD_TRACE;
9847 2 $item{q{block}} = $_tok;
9848 2 push @item, $_tok;
9849
9850 }
9851  
9852 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
9853 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9854 q{exp},
9855 $tracelevel)
9856 if defined $::RD_TRACE;
9857
9858  
9859 2 ▶ $_tok = ($_noactions) ? 0 : do { $item[2] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 2 2
9860 2 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 2 2
9861 {
9862 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9863 if defined $::RD_TRACE;
9864 0 last;
9865 }
9866 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
9867 . $_tok . q{])},
9868 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9869 if defined $::RD_TRACE;
9870 2 push @item, $_tok;
9871 2 $item{__ACTION1__}=$_tok;
9872
9873  
9874 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: ['&' block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
9875 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9876 q{exp},
9877 $tracelevel)
9878 if defined $::RD_TRACE;
9879  
9880  
9881  
9882 2 $_matched = 1;
9883 2 last;
9884 }
9885  
9886  
9887 1453 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1334 119 1453
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
11901334
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
9888 {
9889
9890 1334 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/^(?=<<)/ inline_doc]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1334 1334
9891 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
9892 q{exp},
9893 $tracelevel)
9894 if defined $::RD_TRACE;
9895 1334 my $thisprod = $thisrule->{"prods"}[2];
9896 1334 $text = $_[1];
9897 1334 my $_savetext;
9898 1334 @item = (q{exp});
9899 1334 %item = (__RULE__ => q{exp});
9900 1334 my $repcount = 0;
9901  
9902  
9903 1334 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/^(?=<<)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1334 1334
9904 q{exp},
9905 $tracelevel)
9906 if defined $::RD_TRACE;
9907 1334 undef $lastsep;
9908 1334 $expectation->is(q{})->at($text);
9909
9910  
9911 1334 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^(?=<<))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?=<<))/) 1333 1 1334
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?=<<))/
!ll&&!rl&&r
013331
($lastsep = $1) && ''
!ll
11333
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?=<<))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:^(?=<<))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:^(?=<<))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
9912 {
9913 1333 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 1333 0 1333
9914 1333 $expectation->failed();
9915 1333 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1333 1333
9916 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9917 if defined $::RD_TRACE;
9918  
9919 1333 last;
9920 }
9921 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
9922 1 substr($text,0,length($current_match),q{});
9923 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
9924 . $current_match . q{])},
9925 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9926 if defined $::RD_TRACE;
9927 1 push @item, $item{__PATTERN1__}=$current_match;
9928
9929  
9930 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [inline_doc]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
9931 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9932 q{exp},
9933 $tracelevel)
9934 if defined $::RD_TRACE;
9935 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
9936 1 $expectation->is(q{inline_doc})->at($text);
9937 1 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::inline_doc($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = inline_doc($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 1 1
9938 {
9939
9940 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [inline_doc]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9941 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9942 q{exp},
9943 $tracelevel)
9944 if defined $::RD_TRACE;
9945 0 $expectation->failed();
9946 0 last;
9947 }
9948 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [inline_doc]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
9949 . $_tok . q{]},
9950  
9951 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9952 q{exp},
9953 $tracelevel)
9954 if defined $::RD_TRACE;
9955 1 $item{q{inline_doc}} = $_tok;
9956 1 push @item, $_tok;
9957
9958 }
9959  
9960 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
9961 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9962 q{exp},
9963 $tracelevel)
9964 if defined $::RD_TRACE;
9965
9966  
9967 1 ▶ $_tok = ($_noactions) ? 0 : do { $item[2] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
9968 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
9969 {
9970 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
9971 if defined $::RD_TRACE;
9972 0 last;
9973 }
9974 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
9975 . $_tok . q{])},
9976 XML::XSH2::Parser::_Runtime::_tracefirst($text))
9977 if defined $::RD_TRACE;
9978 1 push @item, $_tok;
9979 1 $item{__ACTION1__}=$_tok;
9980
9981  
9982 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/^(?=<<)/ inline_doc]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
9983 XML::XSH2::Parser::_Runtime::_tracefirst($text),
9984 q{exp},
9985 $tracelevel)
9986 if defined $::RD_TRACE;
9987  
9988  
9989  
9990 1 $_matched = 1;
9991 1 last;
9992 }
9993  
9994  
9995 1453 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1333 120 1453
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
12001333
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
9996 {
9997
9998 1333 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpath]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1333 1333
9999 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10000 q{exp},
10001 $tracelevel)
10002 if defined $::RD_TRACE;
10003 1333 my $thisprod = $thisrule->{"prods"}[3];
10004 1333 $text = $_[1];
10005 1333 my $_savetext;
10006 1333 @item = (q{exp});
10007 1333 %item = (__RULE__ => q{exp});
10008 1333 my $repcount = 0;
10009  
10010  
10011 1333 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpath]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1333 1333
10012 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10013 q{exp},
10014 $tracelevel)
10015 if defined $::RD_TRACE;
10016 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
10017 1333 $expectation->is(q{})->at($text);
10018 1333 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpath($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpath($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 21 1312 1333
10019 {
10020
10021 21 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpath]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 21 21
10022 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10023 q{exp},
10024 $tracelevel)
10025 if defined $::RD_TRACE;
10026 21 $expectation->failed();
10027 21 last;
10028 }
10029 1312 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpath]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1312 1312
10030 . $_tok . q{]},
10031  
10032 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10033 q{exp},
10034 $tracelevel)
10035 if defined $::RD_TRACE;
10036 1312 $item{q{xpath}} = $_tok;
10037 1312 push @item, $_tok;
10038
10039 }
10040  
10041 1312 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpath]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1312 1312
10042 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10043 q{exp},
10044 $tracelevel)
10045 if defined $::RD_TRACE;
10046  
10047  
10048  
10049 1312 $_matched = 1;
10050 1312 last;
10051 }
10052  
10053  
10054 1453 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 21 1432 1453
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
1432021
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
10055 {
10056
10057  
10058 21 $_[1] = $text; # NOT SURE THIS IS NEEDED
10059 21 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 21 21
10060 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10061 q{exp},
10062 $tracelevel)
10063 if defined $::RD_TRACE;
10064 21 return undef;
10065 }
10066 1432 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 1432 1432
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
014320
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
10067 {
10068 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10069 q{exp},
10070 $tracelevel)
10071 if defined $::RD_TRACE;
10072 0 $return = $score_return;
10073 }
10074 1432 splice @{$thisparser->{errors}}, $err_at;
10075 1432 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 1432 0 1432
10076 1432 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 1432 1432
10077 {
10078 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
10079 $return . q{])}, "",
10080 q{exp},
10081 $tracelevel);
10082 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
10083 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
10084 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10085 , q{exp},
10086 $tracelevel)
10087 }
10088 1432 $_[1] = $text;
10089 1432 return $return;
10090 }
10091  
10092 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
10093 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp_or_opt
10094 1664 ▶{
Subroutine exp_or_opt: called CC=47 SCAR=42.5
10095 1664 my $thisparser = $_[0];
10096 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
10097 1664 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
16640
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
10098 1664 $ERRORS = 0;
10099 1664 my $thisrule = $thisparser->{"rules"}{"exp_or_opt"};
10100  
10101 1664 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [exp_or_opt]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1664 1664
10102 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10103 q{exp_or_opt},
10104 $tracelevel)
10105 if defined $::RD_TRACE;
10106  
10107
10108 1664 my $err_at = @{$thisparser->{errors}};
10109  
10110 1664 my $score;
10111 my $score_return;
10112 1664 my $_tok;
10113 1664 my $return = undef;
10114 1664 my $_matched=0;
10115 1664 my $commit=0;
10116 1664 my @item = ();
10117 1664 my %item = ();
10118 1664 my $repeating = $_[2];
10119 1664 my $_noactions = $_[3];
10120 1664 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1664 0 1664
10121 1664 my $_itempos = $_[5];
10122 1664 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1664 0 1664
10123 1664 my $text;
10124 my $lastsep;
10125 1664 my $current_match;
10126 1664 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?=\\s*[\};]|\\s*\\Z)/, or option, or exp});
10127 1664 $expectation->at($_[1]);
10128
10129 1664 my $thisoffset;
10130 1664 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
10131
10132 1664 my $thiscolumn;
10133 1664 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
10134
10135 1664 my $thisline;
10136 1664 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
10137  
10138
10139  
10140 1664 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1664 0 1664
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001664
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
10141 {
10142
10143 1664 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?=\\s*[\};]|\\s*\\Z)/ <commit> <reject>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1664 1664
10144 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10145 q{exp_or_opt},
10146 $tracelevel)
10147 if defined $::RD_TRACE;
10148 1664 my $thisprod = $thisrule->{"prods"}[0];
10149 1664 $text = $_[1];
10150 1664 my $_savetext;
10151 1664 @item = (q{exp_or_opt});
10152 1664 %item = (__RULE__ => q{exp_or_opt});
10153 1664 my $repcount = 0;
10154  
10155  
10156 1664 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?=\\s*[\};]|\\s*\\Z)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1664 1664
10157 q{exp_or_opt},
10158 $tracelevel)
10159 if defined $::RD_TRACE;
10160 1664 undef $lastsep;
10161 1664 $expectation->is(q{})->at($text);
10162
10163  
10164 1664 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\s*[};]|\s*\Z))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[};]|\s*\Z))/) 1016 648 1664
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[};]|\s*\Z))/
!ll&&!rl&&r
01016648
($lastsep = $1) && ''
!ll
5051159
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[};]|\s*\Z))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?=\s*[};]|\s*\Z))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?=\s*[};]|\s*\Z))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
10165 {
10166 1016 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 1016 0 1016
10167 1016 $expectation->failed();
10168 1016 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1016 1016
10169 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10170 if defined $::RD_TRACE;
10171  
10172 1016 last;
10173 }
10174 648 $current_match = substr($text, $-[0], $+[0] - $-[0]);
10175 648 substr($text,0,length($current_match),q{});
10176 648 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 648 648
10177 . $current_match . q{])},
10178 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10179 if defined $::RD_TRACE;
10180 648 push @item, $item{__PATTERN1__}=$current_match;
10181
10182  
10183
10184  
10185 648 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 648 648
10186 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10187 q{exp_or_opt},
10188 $tracelevel)
10189 if defined $::RD_TRACE;
10190 648 $_tok = do { $commit = 1 };
10191 648 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 648 0 648
10192 {
10193 648 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 648 648
10194 . $_tok . q{])},
10195 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10196 if defined $::RD_TRACE;
10197 }
10198 else
10199 {
10200 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10201 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10202 if defined $::RD_TRACE;
10203 }
10204
10205 648 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 648 648
10206 648 push @item, $item{__DIRECTIVE1__}=$_tok;
10207
10208  
10209 648 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Rejecting production<< (found <reject>)},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 648 648
10210 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10211 q{exp_or_opt},
10212 $tracelevel)
10213 if defined $::RD_TRACE;
10214 648 undef $return;
10215
10216  
10217 648 $_tok = undef;
10218
10219 648 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 648 0 648
10220  
10221 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?=\\s*[\};]|\\s*\\Z)/ <commit> <reject>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10222 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10223 q{exp_or_opt},
10224 $tracelevel)
10225 if defined $::RD_TRACE;
10226  
10227  
10228  
10229 0 $_matched = 1;
10230 0 last;
10231 }
10232  
10233  
10234 1664 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1016 648 1664
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
06481016
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
10235 {
10236
10237 1016 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [option]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1016 1016
10238 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10239 q{exp_or_opt},
10240 $tracelevel)
10241 if defined $::RD_TRACE;
10242 1016 my $thisprod = $thisrule->{"prods"}[1];
10243 1016 $text = $_[1];
10244 1016 my $_savetext;
10245 1016 @item = (q{exp_or_opt});
10246 1016 %item = (__RULE__ => q{exp_or_opt});
10247 1016 my $repcount = 0;
10248  
10249  
10250 1016 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [option]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1016 1016
10251 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10252 q{exp_or_opt},
10253 $tracelevel)
10254 if defined $::RD_TRACE;
10255 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
10256 1016 $expectation->is(q{})->at($text);
10257 1016 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::option($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = option($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 981 35 1016
10258 {
10259
10260 981 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [option]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 981 981
10261 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10262 q{exp_or_opt},
10263 $tracelevel)
10264 if defined $::RD_TRACE;
10265 981 $expectation->failed();
10266 981 last;
10267 }
10268 35 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [option]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 35 35
10269 . $_tok . q{]},
10270  
10271 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10272 q{exp_or_opt},
10273 $tracelevel)
10274 if defined $::RD_TRACE;
10275 35 $item{q{option}} = $_tok;
10276 35 push @item, $_tok;
10277
10278 }
10279  
10280 35 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [option]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 35 35
10281 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10282 q{exp_or_opt},
10283 $tracelevel)
10284 if defined $::RD_TRACE;
10285  
10286  
10287  
10288 35 $_matched = 1;
10289 35 last;
10290 }
10291  
10292  
10293 1664 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 981 683 1664
Condition100%3/3
$_matched or $commit
l!l&&r!l&&!r
35648981
MC/DC100%2/2
$_matched or $commit
$_matched $commit
Truth table100%3/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
10294 {
10295
10296 981 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 981 981
10297 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10298 q{exp_or_opt},
10299 $tracelevel)
10300 if defined $::RD_TRACE;
10301 981 my $thisprod = $thisrule->{"prods"}[2];
10302 981 $text = $_[1];
10303 981 my $_savetext;
10304 981 @item = (q{exp_or_opt});
10305 981 %item = (__RULE__ => q{exp_or_opt});
10306 981 my $repcount = 0;
10307  
10308  
10309 981 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 981 981
10310 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10311 q{exp_or_opt},
10312 $tracelevel)
10313 if defined $::RD_TRACE;
10314 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
10315 981 $expectation->is(q{})->at($text);
10316 981 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 21 960 981
10317 {
10318
10319 21 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 21 21
10320 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10321 q{exp_or_opt},
10322 $tracelevel)
10323 if defined $::RD_TRACE;
10324 21 $expectation->failed();
10325 21 last;
10326 }
10327 960 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 960 960
10328 . $_tok . q{]},
10329  
10330 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10331 q{exp_or_opt},
10332 $tracelevel)
10333 if defined $::RD_TRACE;
10334 960 $item{q{exp}} = $_tok;
10335 960 push @item, $_tok;
10336
10337 }
10338  
10339 960 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [exp]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 960 960
10340 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10341 q{exp_or_opt},
10342 $tracelevel)
10343 if defined $::RD_TRACE;
10344  
10345  
10346  
10347 960 $_matched = 1;
10348 960 last;
10349 }
10350  
10351  
10352 1664 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 669 995 1664
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
9950669
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
10353 {
10354
10355  
10356 669 $_[1] = $text; # NOT SURE THIS IS NEEDED
10357 669 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 669 669
10358 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10359 q{exp_or_opt},
10360 $tracelevel)
10361 if defined $::RD_TRACE;
10362 669 return undef;
10363 }
10364 995 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 995 995
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
09950
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
10365 {
10366 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10367 q{exp_or_opt},
10368 $tracelevel)
10369 if defined $::RD_TRACE;
10370 0 $return = $score_return;
10371 }
10372 995 splice @{$thisparser->{errors}}, $err_at;
10373 995 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 995 0 995
10374 995 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 995 995
10375 {
10376 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
10377 $return . q{])}, "",
10378 q{exp_or_opt},
10379 $tracelevel);
10380 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
10381 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
10382 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10383 , q{exp_or_opt},
10384 $tracelevel)
10385 }
10386 995 $_[1] = $text;
10387 995 return $return;
10388 }
10389  
10390 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
10391 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::filename
10392 1 ▶{
Subroutine filename: called CC=21 SCAR=35.2
10393 1 my $thisparser = $_[0];
10394 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
10395 1 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
10
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
10396 1 $ERRORS = 0;
10397 1 my $thisrule = $thisparser->{"rules"}{"filename"};
10398  
10399 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [filename]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10400 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10401 q{filename},
10402 $tracelevel)
10403 if defined $::RD_TRACE;
10404  
10405
10406 1 my $err_at = @{$thisparser->{errors}};
10407  
10408 1 my $score;
10409 my $score_return;
10410 1 my $_tok;
10411 1 my $return = undef;
10412 1 my $_matched=0;
10413 1 my $commit=0;
10414 1 my @item = ();
10415 1 my %item = ();
10416 1 my $repeating = $_[2];
10417 1 my $_noactions = $_[3];
10418 1 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1 0 1
10419 1 my $_itempos = $_[5];
10420 1 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1 0 1
10421 1 my $text;
10422 my $lastsep;
10423 1 my $current_match;
10424 1 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{exp});
10425 1 $expectation->at($_[1]);
10426
10427 1 my $thisoffset;
10428 1 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
10429
10430 1 my $thiscolumn;
10431 1 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
10432
10433 1 my $thisline;
10434 1 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
10435  
10436
10437  
10438 1 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1 0 1
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
10439 {
10440
10441 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10442 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10443 q{filename},
10444 $tracelevel)
10445 if defined $::RD_TRACE;
10446 1 my $thisprod = $thisrule->{"prods"}[0];
10447 1 $text = $_[1];
10448 1 my $_savetext;
10449 1 @item = (q{filename});
10450 1 %item = (__RULE__ => q{filename});
10451 1 my $repcount = 0;
10452  
10453  
10454 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10455 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10456 q{filename},
10457 $tracelevel)
10458 if defined $::RD_TRACE;
10459 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
10460 1 $expectation->is(q{})->at($text);
10461 1 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 1 1
10462 {
10463
10464 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10465 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10466 q{filename},
10467 $tracelevel)
10468 if defined $::RD_TRACE;
10469 0 $expectation->failed();
10470 0 last;
10471 }
10472 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10473 . $_tok . q{]},
10474  
10475 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10476 q{filename},
10477 $tracelevel)
10478 if defined $::RD_TRACE;
10479 1 $item{q{exp}} = $_tok;
10480 1 push @item, $_tok;
10481
10482 }
10483  
10484 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [exp]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10485 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10486 q{filename},
10487 $tracelevel)
10488 if defined $::RD_TRACE;
10489  
10490  
10491  
10492 1 $_matched = 1;
10493 1 last;
10494 }
10495  
10496  
10497 1 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 1 1
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
100
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
10498 {
10499
10500  
10501 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
10502 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10503 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10504 q{filename},
10505 $tracelevel)
10506 if defined $::RD_TRACE;
10507 0 return undef;
10508 }
10509 1 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 1 1
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
010
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
10510 {
10511 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10512 q{filename},
10513 $tracelevel)
10514 if defined $::RD_TRACE;
10515 0 $return = $score_return;
10516 }
10517 1 splice @{$thisparser->{errors}}, $err_at;
10518 1 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 1 0 1
10519 1 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 1 1
10520 {
10521 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
10522 $return . q{])}, "",
10523 q{filename},
10524 $tracelevel);
10525 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
10526 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
10527 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10528 , q{filename},
10529 $tracelevel)
10530 }
10531 1 $_[1] = $text;
10532 1 return $return;
10533 }
10534  
10535 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
10536 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::inline_doc
10537 1 ▶{
Subroutine inline_doc: called CC=63 SCAR=59.0
10538 1 my $thisparser = $_[0];
10539 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
10540 1 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
10
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
10541 1 $ERRORS = 0;
10542 1 my $thisrule = $thisparser->{"rules"}{"inline_doc"};
10543  
10544 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [inline_doc]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10545 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10546 q{inline_doc},
10547 $tracelevel)
10548 if defined $::RD_TRACE;
10549  
10550
10551 1 my $err_at = @{$thisparser->{errors}};
10552  
10553 1 my $score;
10554 my $score_return;
10555 1 my $_tok;
10556 1 my $return = undef;
10557 1 my $_matched=0;
10558 1 my $commit=0;
10559 1 my @item = ();
10560 1 my %item = ();
10561 1 my $repeating = $_[2];
10562 1 my $_noactions = $_[3];
10563 1 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1 0 1
10564 1 my $_itempos = $_[5];
10565 1 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1 0 1
10566 1 my $text;
10567 my $lastsep;
10568 1 my $current_match;
10569 1 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/<</});
10570 1 $expectation->at($_[1]);
10571
10572 1 my $thisoffset;
10573 1 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
10574
10575 1 my $thiscolumn;
10576 1 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
10577
10578 1 my $thisline;
10579 1 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
10580  
10581
10582  
10583 1 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1 0 1
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
10584 {
10585 1 ▶ local $skip = defined($skip) ? $skip : $XML::XSH2::Parser::_Runtime::skip;
Branch: 1 branch
BranchTrueFalseTotal
defined $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip ? : 1 0 1
10586 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/<</ inline_doc_string <skip:""> /.*\\n/ /(.|\\n)*?\\n$item[2][1]\\s*(\\n|$)/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10587 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10588 q{inline_doc},
10589 $tracelevel)
10590 if defined $::RD_TRACE;
10591 1 my $thisprod = $thisrule->{"prods"}[0];
10592 1 $text = $_[1];
10593 1 my $_savetext;
10594 1 @item = (q{inline_doc});
10595 1 %item = (__RULE__ => q{inline_doc});
10596 1 my $repcount = 0;
10597  
10598  
10599 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/<</]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10600 q{inline_doc},
10601 $tracelevel)
10602 if defined $::RD_TRACE;
10603 1 undef $lastsep;
10604 1 $expectation->is(q{})->at($text);
10605
10606  
10607 1 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:<<)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:<<)/) 0 1 1
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:<<)/
!ll&&!rl&&r
001
($lastsep = $1) && ''
!ll
10
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:<<)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:<<)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:<<)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
10608 {
10609 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
10610 0 $expectation->failed();
10611 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10612 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10613 if defined $::RD_TRACE;
10614  
10615 0 last;
10616 }
10617 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
10618 1 substr($text,0,length($current_match),q{});
10619 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10620 . $current_match . q{])},
10621 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10622 if defined $::RD_TRACE;
10623 1 push @item, $item{__PATTERN1__}=$current_match;
10624
10625  
10626 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [inline_doc_string]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10627 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10628 q{inline_doc},
10629 $tracelevel)
10630 if defined $::RD_TRACE;
10631 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
10632 1 $expectation->is(q{inline_doc_string})->at($text);
10633 1 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::inline_doc_string($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = inline_doc_string($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 1 1
10634 {
10635
10636 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [inline_doc_string]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10637 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10638 q{inline_doc},
10639 $tracelevel)
10640 if defined $::RD_TRACE;
10641 0 $expectation->failed();
10642 0 last;
10643 }
10644 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [inline_doc_string]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10645 . $_tok . q{]},
10646  
10647 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10648 q{inline_doc},
10649 $tracelevel)
10650 if defined $::RD_TRACE;
10651 1 $item{q{inline_doc_string}} = $_tok;
10652 1 push @item, $_tok;
10653
10654 }
10655  
10656
10657  
10658 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<skip:"">]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10659 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10660 q{inline_doc},
10661 $tracelevel)
10662 if defined $::RD_TRACE;
10663 1 $_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
10664 1 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 1 0 1
10665 {
10666 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10667 . $_tok . q{])},
10668 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10669 if defined $::RD_TRACE;
10670 }
10671 else
10672 {
10673 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10674 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10675 if defined $::RD_TRACE;
10676 }
10677
10678 1 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 1 1
10679 1 push @item, $item{__DIRECTIVE1__}=$_tok;
10680
10681  
10682 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/.*\\n/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10683 q{inline_doc},
10684 $tracelevel)
10685 if defined $::RD_TRACE;
10686 1 undef $lastsep;
10687 1 $expectation->is(q{/.*\\n/})->at($text);
10688
10689  
10690 1 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:.*\n)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:.*\n)/) 0 1 1
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:.*\n)/
!ll&&!rl&&r
001
($lastsep = $1) && ''
!ll
10
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:.*\n)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:.*\n)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:.*\n)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
10691 {
10692 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
10693 0 $expectation->failed();
10694 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10695 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10696 if defined $::RD_TRACE;
10697  
10698 0 last;
10699 }
10700 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
10701 1 substr($text,0,length($current_match),q{});
10702 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10703 . $current_match . q{])},
10704 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10705 if defined $::RD_TRACE;
10706 1 push @item, $item{__PATTERN2__}=$current_match;
10707
10708  
10709 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(.|\\n)*?\\n$item[2][1]\\s*(\\n|$)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10710 q{inline_doc},
10711 $tracelevel)
10712 if defined $::RD_TRACE;
10713 1 undef $lastsep;
10714 1 $expectation->is(q{/(.|\\n)*?\\n$item[2][1]\\s*(\\n|$)/})->at($text);
10715
10716  
10717 1 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(.|\n)*?\n$item[2][1]\s*(\n|$))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(.|\n)*?\n$item[2][1]\s*(\n|$))/) 0 1 1
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(.|\n)*?\n$item[2][1]\s*(\n|$))/
!ll&&!rl&&r
001
($lastsep = $1) && ''
!ll
10
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(.|\n)*?\n$item[2][1]\s*(\n|$))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(.|\n)*?\n$item[2][1]\s*(\n|$))/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(.|\n)*?\n$item[2][1]\s*(\n|$))/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
10718 {
10719 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
10720 0 $expectation->failed();
10721 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10722 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10723 if defined $::RD_TRACE;
10724  
10725 0 last;
10726 }
10727 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
10728 1 substr($text,0,length($current_match),q{});
10729 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10730 . $current_match . q{])},
10731 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10732 if defined $::RD_TRACE;
10733 1 push @item, $item{__PATTERN3__}=$current_match;
10734
10735  
10736 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10737 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10738 q{inline_doc},
10739 $tracelevel)
10740 if defined $::RD_TRACE;
10741
10742  
10743 1 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
10744 1 $text=$item[4].$text;
10745 1 local $_=$item[5]; s/\n$item[2][1]\s*$//;
10746 1 my $paren = $item[2][0];
10747 1 ▶ $paren = '"' if $paren eq "";
Branch: 1 branch
BranchTrueFalseTotal
if $paren eq "" 0 1 1
10748 1 ▶ if ($paren eq "'") {
Branch: 1 branch
BranchTrueFalseTotal
if ($paren eq "'") 1 0 1
10749 1 $paren = '"';
10750 0 ▶ s{(\\)(.|\n)|(\$)}{ (defined($3) and $3 eq '$') ? "\\\$"
Branch: 4 branches
BranchTrueFalseTotal
defined $3 && $3 eq '$' ? : 0 0 0
defined $2 && $2 eq '\\' ? : 0 0 0
defined $2 && $2 eq q['] ? : 0 0 0
defined $2 && $2 eq '$' ? : 0 0 0
Condition0%0/12
defined $3 and $3 eq "\$"
!ll&&!rl&&r
000
defined $2 and $2 eq "\\"
!ll&&!rl&&r
000
defined $2 and $2 eq "'"
!ll&&!rl&&r
000
defined $2 and $2 eq "\$"
!ll&&!rl&&r
000
MC/DC0%0/2
defined $3 and $3 eq "\$"
defined $3 $3 eq "\$"
MC/DC0%0/2
defined $2 and $2 eq "\\"
defined $2 $2 eq "\\"
MC/DC0%0/2
defined $2 and $2 eq "'"
defined $2 $2 eq "'"
MC/DC0%0/2
defined $2 and $2 eq "\$"
defined $2 $2 eq "\$"
Truth table0%0/3
A and B
A= defined $3B= $3 eq "\$"
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= defined $2B= $2 eq "\\"
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= defined $2B= $2 eq "'"
ABresult
0X0
100
111
Truth table0%0/3
A and B
A= defined $2B= $2 eq "\$"
ABresult
0X0
100
111
10751 : ((defined($2) and $2 eq "\\")
10752 ? "\\\\" : ((defined($2) and $2 eq "'") ? "'" : (
10753 (defined($2) and $2 eq '$') ? "\\\\\\$2" :
10754 "\\\\$2"))) }eg;
10755 1 } "<<".$paren.$_;
10756 };
10757 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
10758 {
10759 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10760 if defined $::RD_TRACE;
10761 0 last;
10762 }
10763 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10764 . $_tok . q{])},
10765 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10766 if defined $::RD_TRACE;
10767 1 push @item, $_tok;
10768 1 $item{__ACTION1__}=$_tok;
10769
10770  
10771 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/<</ inline_doc_string <skip:""> /.*\\n/ /(.|\\n)*?\\n$item[2][1]\\s*(\\n|$)/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10772 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10773 q{inline_doc},
10774 $tracelevel)
10775 if defined $::RD_TRACE;
10776  
10777  
10778  
10779 1 $_matched = 1;
10780 1 last;
10781 }
10782  
10783  
10784 1 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 1 1
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
100
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
10785 {
10786
10787  
10788 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
10789 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10790 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10791 q{inline_doc},
10792 $tracelevel)
10793 if defined $::RD_TRACE;
10794 0 return undef;
10795 }
10796 1 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 1 1
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
010
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
10797 {
10798 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10799 q{inline_doc},
10800 $tracelevel)
10801 if defined $::RD_TRACE;
10802 0 $return = $score_return;
10803 }
10804 1 splice @{$thisparser->{errors}}, $err_at;
10805 1 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 1 0 1
10806 1 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 1 1
10807 {
10808 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
10809 $return . q{])}, "",
10810 q{inline_doc},
10811 $tracelevel);
10812 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
10813 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
10814 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10815 , q{inline_doc},
10816 $tracelevel)
10817 }
10818 1 $_[1] = $text;
10819 1 return $return;
10820 }
10821  
10822 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
10823 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::inline_doc_string
10824 1 ▶{
Subroutine inline_doc_string: called CC=29 SCAR=41.9
10825 1 my $thisparser = $_[0];
10826 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
10827 1 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
10
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
10828 1 $ERRORS = 0;
10829 1 my $thisrule = $thisparser->{"rules"}{"inline_doc_string"};
10830  
10831 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [inline_doc_string]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10832 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10833 q{inline_doc_string},
10834 $tracelevel)
10835 if defined $::RD_TRACE;
10836  
10837
10838 1 my $err_at = @{$thisparser->{errors}};
10839  
10840 1 my $score;
10841 my $score_return;
10842 1 my $_tok;
10843 1 my $return = undef;
10844 1 my $_matched=0;
10845 1 my $commit=0;
10846 1 my @item = ();
10847 1 my %item = ();
10848 1 my $repeating = $_[2];
10849 1 my $_noactions = $_[3];
10850 1 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1 0 1
10851 1 my $_itempos = $_[5];
10852 1 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1 0 1
10853 1 my $text;
10854 my $lastsep;
10855 1 my $current_match;
10856 1 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\\([a-zA-Z_][a-zA-Z0-9_]*\\)|\\\{[a-zA-Z_][a-zA-Z0-9_]*\\\}|[a-zA-Z_][a-zA-Z0-9_]*/});
10857 1 $expectation->at($_[1]);
10858
10859 1 my $thisoffset;
10860 1 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
10861
10862 1 my $thiscolumn;
10863 1 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
10864
10865 1 my $thisline;
10866 1 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
10867  
10868
10869  
10870 1 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1 0 1
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
10871 {
10872
10873 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\\([a-zA-Z_][a-zA-Z0-9_]*\\)|\\\{[a-zA-Z_][a-zA-Z0-9_]*\\\}|[a-zA-Z_][a-zA-Z0-9_]*/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10874 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10875 q{inline_doc_string},
10876 $tracelevel)
10877 if defined $::RD_TRACE;
10878 1 my $thisprod = $thisrule->{"prods"}[0];
10879 1 $text = $_[1];
10880 1 my $_savetext;
10881 1 @item = (q{inline_doc_string});
10882 1 %item = (__RULE__ => q{inline_doc_string});
10883 1 my $repcount = 0;
10884  
10885  
10886 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\\([a-zA-Z_][a-zA-Z0-9_]*\\)|\\\{[a-zA-Z_][a-zA-Z0-9_]*\\\}|[a-zA-Z_][a-zA-Z0-9_]*/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10887 q{inline_doc_string},
10888 $tracelevel)
10889 if defined $::RD_TRACE;
10890 1 undef $lastsep;
10891 1 $expectation->is(q{})->at($text);
10892
10893  
10894 1 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\([a-zA-Z_][a-zA-Z0-9_]*\)|\{[a-zA-Z_][a-zA-Z0-9_]*\}|[a-zA-Z_][a-zA-Z0-9_]*)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\([a-zA-Z_][a-zA-Z0-9_]*\)|\{[a-zA-Z_][a-zA-Z0-9_]*\}|[a-zA-Z_][a-zA-Z0-9_]*)/) 0 1 1
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\([a-zA-Z_][a-zA-Z0-9_]*\)|\{[a-zA-Z_][a-zA-Z0-9_]*\}|[a-zA-Z_][a-zA-Z0-9_]*)/
!ll&&!rl&&r
001
($lastsep = $1) && ''
!ll
10
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\([a-zA-Z_][a-zA-Z0-9_]*\)|\{[a-zA-Z_][a-zA-Z0-9_]*\}|[a-zA-Z_][a-zA-Z0-9_]*)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\([a-zA-Z_][a-zA-Z0-9_]*\)|\{[a-zA-Z_][a-zA-Z0-9_]*\}|[a-zA-Z_][a-zA-Z0-9_]*)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\([a-zA-Z_][a-zA-Z0-9_]*\)|\{[a-zA-Z_][a-zA-Z0-9_]*\}|[a-zA-Z_][a-zA-Z0-9_]*)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
10895 {
10896 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
10897 0 $expectation->failed();
10898 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10899 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10900 if defined $::RD_TRACE;
10901  
10902 0 last;
10903 }
10904 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
10905 1 substr($text,0,length($current_match),q{});
10906 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10907 . $current_match . q{])},
10908 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10909 if defined $::RD_TRACE;
10910 1 push @item, $item{__PATTERN1__}=$current_match;
10911
10912  
10913 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10914 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10915 q{inline_doc_string},
10916 $tracelevel)
10917 if defined $::RD_TRACE;
10918
10919  
10920 1 ▶ $_tok = ($_noactions) ? 0 : do { [($item[1]=~/^(['"({])?(.*?)(['")}])?$/)] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
10921 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
10922 {
10923 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10924 if defined $::RD_TRACE;
10925 0 last;
10926 }
10927 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10928 . $_tok . q{])},
10929 XML::XSH2::Parser::_Runtime::_tracefirst($text))
10930 if defined $::RD_TRACE;
10931 1 push @item, $_tok;
10932 1 $item{__ACTION1__}=$_tok;
10933
10934  
10935 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/'[a-zA-Z_][a-zA-Z0-9_]*'|"[a-zA-Z_][a-zA-Z0-9_]*"|\\([a-zA-Z_][a-zA-Z0-9_]*\\)|\\\{[a-zA-Z_][a-zA-Z0-9_]*\\\}|[a-zA-Z_][a-zA-Z0-9_]*/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
10936 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10937 q{inline_doc_string},
10938 $tracelevel)
10939 if defined $::RD_TRACE;
10940  
10941  
10942  
10943 1 $_matched = 1;
10944 1 last;
10945 }
10946  
10947  
10948 1 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 1 1
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
100
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
10949 {
10950
10951  
10952 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
10953 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10954 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10955 q{inline_doc_string},
10956 $tracelevel)
10957 if defined $::RD_TRACE;
10958 0 return undef;
10959 }
10960 1 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 1 1
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
010
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
10961 {
10962 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10963 q{inline_doc_string},
10964 $tracelevel)
10965 if defined $::RD_TRACE;
10966 0 $return = $score_return;
10967 }
10968 1 splice @{$thisparser->{errors}}, $err_at;
10969 1 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 1 0 1
10970 1 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 1 1
10971 {
10972 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
10973 $return . q{])}, "",
10974 q{inline_doc_string},
10975 $tracelevel);
10976 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
10977 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
10978 XML::XSH2::Parser::_Runtime::_tracefirst($text),
10979 , q{inline_doc_string},
10980 $tracelevel)
10981 }
10982 1 $_[1] = $text;
10983 1 return $return;
10984 }
10985  
10986 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
10987 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::loc
10988 0 ▶{
Subroutine loc: not called CC=109 SCAR=93.7
10989 0 my $thisparser = $_[0];
10990 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
10991 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
10992 0 $ERRORS = 0;
10993 0 my $thisrule = $thisparser->{"rules"}{"loc"};
10994  
10995 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [loc]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
10996 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
10997 q{loc},
10998 $tracelevel)
10999 if defined $::RD_TRACE;
11000  
11001
11002 0 my $err_at = @{$thisparser->{errors}};
11003  
11004 0 my $score;
11005 my $score_return;
11006 0 my $_tok;
11007 0 my $return = undef;
11008 0 my $_matched=0;
11009 0 my $commit=0;
11010 0 my @item = ();
11011 0 my %item = ();
11012 0 my $repeating = $_[2];
11013 0 my $_noactions = $_[3];
11014 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
11015 0 my $_itempos = $_[5];
11016 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
11017 0 my $text;
11018 my $lastsep;
11019 0 my $current_match;
11020 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/after\\s/, or /before\\s/, or /(in)?to\\s/, or /(append(ing)?|as\\s+(a\\s+)child(\\s+of)?)\\s/, or /(prepend(ing)?|(as\\s+)(the\\s+)first(\\s+child(\\s+of)?)?)\\s/, or /(replace|instead( of)?)\\s/});
11021 0 $expectation->at($_[1]);
11022
11023 0 my $thisoffset;
11024 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
11025
11026 0 my $thiscolumn;
11027 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
11028
11029 0 my $thisline;
11030 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
11031  
11032
11033  
11034 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
11035 {
11036
11037 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/after\\s/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11038 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11039 q{loc},
11040 $tracelevel)
11041 if defined $::RD_TRACE;
11042 0 my $thisprod = $thisrule->{"prods"}[0];
11043 0 $text = $_[1];
11044 0 my $_savetext;
11045 0 @item = (q{loc});
11046 0 %item = (__RULE__ => q{loc});
11047 0 my $repcount = 0;
11048  
11049  
11050 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/after\\s/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11051 q{loc},
11052 $tracelevel)
11053 if defined $::RD_TRACE;
11054 0 undef $lastsep;
11055 0 $expectation->is(q{})->at($text);
11056
11057  
11058 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:after\s)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:after\s)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:after\s)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:after\s)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:after\s)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:after\s)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
11059 {
11060 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
11061 0 $expectation->failed();
11062 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11063 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11064 if defined $::RD_TRACE;
11065  
11066 0 last;
11067 }
11068 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
11069 0 substr($text,0,length($current_match),q{});
11070 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11071 . $current_match . q{])},
11072 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11073 if defined $::RD_TRACE;
11074 0 push @item, $item{__PATTERN1__}=$current_match;
11075
11076  
11077 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11078 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11079 q{loc},
11080 $tracelevel)
11081 if defined $::RD_TRACE;
11082
11083  
11084 0 ▶ $_tok = ($_noactions) ? 0 : do { "after" };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
11085 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
11086 {
11087 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11088 if defined $::RD_TRACE;
11089 0 last;
11090 }
11091 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11092 . $_tok . q{])},
11093 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11094 if defined $::RD_TRACE;
11095 0 push @item, $_tok;
11096 0 $item{__ACTION1__}=$_tok;
11097
11098  
11099 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/after\\s/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11100 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11101 q{loc},
11102 $tracelevel)
11103 if defined $::RD_TRACE;
11104  
11105  
11106  
11107 0 $_matched = 1;
11108 0 last;
11109 }
11110  
11111  
11112 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
11113 {
11114
11115 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/before\\s/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11116 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11117 q{loc},
11118 $tracelevel)
11119 if defined $::RD_TRACE;
11120 0 my $thisprod = $thisrule->{"prods"}[1];
11121 0 $text = $_[1];
11122 0 my $_savetext;
11123 0 @item = (q{loc});
11124 0 %item = (__RULE__ => q{loc});
11125 0 my $repcount = 0;
11126  
11127  
11128 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/before\\s/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11129 q{loc},
11130 $tracelevel)
11131 if defined $::RD_TRACE;
11132 0 undef $lastsep;
11133 0 $expectation->is(q{})->at($text);
11134
11135  
11136 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:before\s)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:before\s)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:before\s)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:before\s)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:before\s)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:before\s)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
11137 {
11138 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
11139 0 $expectation->failed();
11140 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11141 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11142 if defined $::RD_TRACE;
11143  
11144 0 last;
11145 }
11146 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
11147 0 substr($text,0,length($current_match),q{});
11148 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11149 . $current_match . q{])},
11150 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11151 if defined $::RD_TRACE;
11152 0 push @item, $item{__PATTERN1__}=$current_match;
11153
11154  
11155 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11156 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11157 q{loc},
11158 $tracelevel)
11159 if defined $::RD_TRACE;
11160
11161  
11162 0 ▶ $_tok = ($_noactions) ? 0 : do { "before" };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
11163 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
11164 {
11165 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11166 if defined $::RD_TRACE;
11167 0 last;
11168 }
11169 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11170 . $_tok . q{])},
11171 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11172 if defined $::RD_TRACE;
11173 0 push @item, $_tok;
11174 0 $item{__ACTION1__}=$_tok;
11175
11176  
11177 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/before\\s/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11178 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11179 q{loc},
11180 $tracelevel)
11181 if defined $::RD_TRACE;
11182  
11183  
11184  
11185 0 $_matched = 1;
11186 0 last;
11187 }
11188  
11189  
11190 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
11191 {
11192
11193 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(in)?to\\s/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11194 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11195 q{loc},
11196 $tracelevel)
11197 if defined $::RD_TRACE;
11198 0 my $thisprod = $thisrule->{"prods"}[2];
11199 0 $text = $_[1];
11200 0 my $_savetext;
11201 0 @item = (q{loc});
11202 0 %item = (__RULE__ => q{loc});
11203 0 my $repcount = 0;
11204  
11205  
11206 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(in)?to\\s/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11207 q{loc},
11208 $tracelevel)
11209 if defined $::RD_TRACE;
11210 0 undef $lastsep;
11211 0 $expectation->is(q{})->at($text);
11212
11213  
11214 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(in)?to\s)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(in)?to\s)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(in)?to\s)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(in)?to\s)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(in)?to\s)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(in)?to\s)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
11215 {
11216 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
11217 0 $expectation->failed();
11218 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11219 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11220 if defined $::RD_TRACE;
11221  
11222 0 last;
11223 }
11224 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
11225 0 substr($text,0,length($current_match),q{});
11226 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11227 . $current_match . q{])},
11228 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11229 if defined $::RD_TRACE;
11230 0 push @item, $item{__PATTERN1__}=$current_match;
11231
11232  
11233 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11234 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11235 q{loc},
11236 $tracelevel)
11237 if defined $::RD_TRACE;
11238
11239  
11240 0 ▶ $_tok = ($_noactions) ? 0 : do { "into" };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
11241 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
11242 {
11243 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11244 if defined $::RD_TRACE;
11245 0 last;
11246 }
11247 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11248 . $_tok . q{])},
11249 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11250 if defined $::RD_TRACE;
11251 0 push @item, $_tok;
11252 0 $item{__ACTION1__}=$_tok;
11253
11254  
11255 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(in)?to\\s/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11256 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11257 q{loc},
11258 $tracelevel)
11259 if defined $::RD_TRACE;
11260  
11261  
11262  
11263 0 $_matched = 1;
11264 0 last;
11265 }
11266  
11267  
11268 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
11269 {
11270
11271 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(append(ing)?|as\\s+(a\\s+)child(\\s+of)?)\\s/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11272 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11273 q{loc},
11274 $tracelevel)
11275 if defined $::RD_TRACE;
11276 0 my $thisprod = $thisrule->{"prods"}[3];
11277 0 $text = $_[1];
11278 0 my $_savetext;
11279 0 @item = (q{loc});
11280 0 %item = (__RULE__ => q{loc});
11281 0 my $repcount = 0;
11282  
11283  
11284 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(append(ing)?|as\\s+(a\\s+)child(\\s+of)?)\\s/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11285 q{loc},
11286 $tracelevel)
11287 if defined $::RD_TRACE;
11288 0 undef $lastsep;
11289 0 $expectation->is(q{})->at($text);
11290
11291  
11292 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(append(ing)?|as\s+(a\s+)child(\s+of)?)\s)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(append(ing)?|as\s+(a\s+)child(\s+of)?)\s)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(append(ing)?|as\s+(a\s+)child(\s+of)?)\s)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(append(ing)?|as\s+(a\s+)child(\s+of)?)\s)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(append(ing)?|as\s+(a\s+)child(\s+of)?)\s)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(append(ing)?|as\s+(a\s+)child(\s+of)?)\s)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
11293 {
11294 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
11295 0 $expectation->failed();
11296 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11297 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11298 if defined $::RD_TRACE;
11299  
11300 0 last;
11301 }
11302 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
11303 0 substr($text,0,length($current_match),q{});
11304 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11305 . $current_match . q{])},
11306 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11307 if defined $::RD_TRACE;
11308 0 push @item, $item{__PATTERN1__}=$current_match;
11309
11310  
11311 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11312 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11313 q{loc},
11314 $tracelevel)
11315 if defined $::RD_TRACE;
11316
11317  
11318 0 ▶ $_tok = ($_noactions) ? 0 : do { "append" };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
11319 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
11320 {
11321 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11322 if defined $::RD_TRACE;
11323 0 last;
11324 }
11325 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11326 . $_tok . q{])},
11327 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11328 if defined $::RD_TRACE;
11329 0 push @item, $_tok;
11330 0 $item{__ACTION1__}=$_tok;
11331
11332  
11333 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(append(ing)?|as\\s+(a\\s+)child(\\s+of)?)\\s/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11334 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11335 q{loc},
11336 $tracelevel)
11337 if defined $::RD_TRACE;
11338  
11339  
11340  
11341 0 $_matched = 1;
11342 0 last;
11343 }
11344  
11345  
11346 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
11347 {
11348
11349 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(prepend(ing)?|(as\\s+)(the\\s+)first(\\s+child(\\s+of)?)?)\\s/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11350 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11351 q{loc},
11352 $tracelevel)
11353 if defined $::RD_TRACE;
11354 0 my $thisprod = $thisrule->{"prods"}[4];
11355 0 $text = $_[1];
11356 0 my $_savetext;
11357 0 @item = (q{loc});
11358 0 %item = (__RULE__ => q{loc});
11359 0 my $repcount = 0;
11360  
11361  
11362 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(prepend(ing)?|(as\\s+)(the\\s+)first(\\s+child(\\s+of)?)?)\\s/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11363 q{loc},
11364 $tracelevel)
11365 if defined $::RD_TRACE;
11366 0 undef $lastsep;
11367 0 $expectation->is(q{})->at($text);
11368
11369  
11370 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(prepend(ing)?|(as\s+)(the\s+)first(\s+child(\s+of)?)?)\s)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(prepend(ing)?|(as\s+)(the\s+)first(\s+child(\s+of)?)?)\s)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(prepend(ing)?|(as\s+)(the\s+)first(\s+child(\s+of)?)?)\s)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(prepend(ing)?|(as\s+)(the\s+)first(\s+child(\s+of)?)?)\s)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(prepend(ing)?|(as\s+)(the\s+)first(\s+child(\s+of)?)?)\s)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(prepend(ing)?|(as\s+)(the\s+)first(\s+child(\s+of)?)?)\s)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
11371 {
11372 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
11373 0 $expectation->failed();
11374 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11375 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11376 if defined $::RD_TRACE;
11377  
11378 0 last;
11379 }
11380 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
11381 0 substr($text,0,length($current_match),q{});
11382 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11383 . $current_match . q{])},
11384 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11385 if defined $::RD_TRACE;
11386 0 push @item, $item{__PATTERN1__}=$current_match;
11387
11388  
11389 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11390 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11391 q{loc},
11392 $tracelevel)
11393 if defined $::RD_TRACE;
11394
11395  
11396 0 ▶ $_tok = ($_noactions) ? 0 : do { "prepend" };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
11397 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
11398 {
11399 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11400 if defined $::RD_TRACE;
11401 0 last;
11402 }
11403 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11404 . $_tok . q{])},
11405 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11406 if defined $::RD_TRACE;
11407 0 push @item, $_tok;
11408 0 $item{__ACTION1__}=$_tok;
11409
11410  
11411 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(prepend(ing)?|(as\\s+)(the\\s+)first(\\s+child(\\s+of)?)?)\\s/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11412 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11413 q{loc},
11414 $tracelevel)
11415 if defined $::RD_TRACE;
11416  
11417  
11418  
11419 0 $_matched = 1;
11420 0 last;
11421 }
11422  
11423  
11424 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
11425 {
11426
11427 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(replace|instead( of)?)\\s/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11428 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11429 q{loc},
11430 $tracelevel)
11431 if defined $::RD_TRACE;
11432 0 my $thisprod = $thisrule->{"prods"}[5];
11433 0 $text = $_[1];
11434 0 my $_savetext;
11435 0 @item = (q{loc});
11436 0 %item = (__RULE__ => q{loc});
11437 0 my $repcount = 0;
11438  
11439  
11440 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(replace|instead( of)?)\\s/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11441 q{loc},
11442 $tracelevel)
11443 if defined $::RD_TRACE;
11444 0 undef $lastsep;
11445 0 $expectation->is(q{})->at($text);
11446
11447  
11448 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(replace|instead( of)?)\s)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(replace|instead( of)?)\s)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(replace|instead( of)?)\s)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(replace|instead( of)?)\s)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(replace|instead( of)?)\s)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(replace|instead( of)?)\s)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
11449 {
11450 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
11451 0 $expectation->failed();
11452 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11453 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11454 if defined $::RD_TRACE;
11455  
11456 0 last;
11457 }
11458 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
11459 0 substr($text,0,length($current_match),q{});
11460 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11461 . $current_match . q{])},
11462 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11463 if defined $::RD_TRACE;
11464 0 push @item, $item{__PATTERN1__}=$current_match;
11465
11466  
11467 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11468 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11469 q{loc},
11470 $tracelevel)
11471 if defined $::RD_TRACE;
11472
11473  
11474 0 ▶ $_tok = ($_noactions) ? 0 : do { "replace" };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
11475 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
11476 {
11477 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11478 if defined $::RD_TRACE;
11479 0 last;
11480 }
11481 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11482 . $_tok . q{])},
11483 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11484 if defined $::RD_TRACE;
11485 0 push @item, $_tok;
11486 0 $item{__ACTION1__}=$_tok;
11487
11488  
11489 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(replace|instead( of)?)\\s/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11490 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11491 q{loc},
11492 $tracelevel)
11493 if defined $::RD_TRACE;
11494  
11495  
11496  
11497 0 $_matched = 1;
11498 0 last;
11499 }
11500  
11501  
11502 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
11503 {
11504
11505  
11506 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
11507 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11508 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11509 q{loc},
11510 $tracelevel)
11511 if defined $::RD_TRACE;
11512 0 return undef;
11513 }
11514 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
11515 {
11516 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11517 q{loc},
11518 $tracelevel)
11519 if defined $::RD_TRACE;
11520 0 $return = $score_return;
11521 }
11522 0 splice @{$thisparser->{errors}}, $err_at;
11523 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
11524 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
11525 {
11526 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
11527 $return . q{])}, "",
11528 q{loc},
11529 $tracelevel);
11530 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
11531 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
11532 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11533 , q{loc},
11534 $tracelevel)
11535 }
11536 0 $_[1] = $text;
11537 0 return $return;
11538 }
11539  
11540 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
11541 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::local_var
11542 23 ▶{
Subroutine local_var: called CC=30 SCAR=38.2
11543 23 my $thisparser = $_[0];
11544 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
11545 23 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
230
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
11546 23 $ERRORS = 0;
11547 23 my $thisrule = $thisparser->{"rules"}{"local_var"};
11548  
11549 23 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [local_var]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 23 23
11550 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11551 q{local_var},
11552 $tracelevel)
11553 if defined $::RD_TRACE;
11554  
11555
11556 23 my $err_at = @{$thisparser->{errors}};
11557  
11558 23 my $score;
11559 my $score_return;
11560 23 my $_tok;
11561 23 my $return = undef;
11562 23 my $_matched=0;
11563 23 my $commit=0;
11564 23 my @item = ();
11565 23 my %item = ();
11566 23 my $repeating = $_[2];
11567 23 my $_noactions = $_[3];
11568 23 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 23 0 23
11569 23 my $_itempos = $_[5];
11570 23 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 23 0 23
11571 23 my $text;
11572 my $lastsep;
11573 23 my $current_match;
11574 23 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(local|my)\\s/});
11575 23 $expectation->at($_[1]);
11576
11577 23 my $thisoffset;
11578 23 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
11579
11580 23 my $thiscolumn;
11581 23 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
11582
11583 23 my $thisline;
11584 23 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
11585  
11586
11587  
11588 23 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 23 0 23
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0023
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
11589 {
11590
11591 23 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(local|my)\\s/ variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 23 23
11592 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11593 q{local_var},
11594 $tracelevel)
11595 if defined $::RD_TRACE;
11596 23 my $thisprod = $thisrule->{"prods"}[0];
11597 23 $text = $_[1];
11598 23 my $_savetext;
11599 23 @item = (q{local_var});
11600 23 %item = (__RULE__ => q{local_var});
11601 23 my $repcount = 0;
11602  
11603  
11604 23 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [/(local|my)\\s/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 23 23
11605 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11606 q{local_var},
11607 $tracelevel)
11608 if defined $::RD_TRACE;
11609 23 $expectation->is(q{})->at($text);
11610
11611 23 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_local_var, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_local_var, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 23 23
11612 {
11613 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [/(local|my)\\s/]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11614 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11615 q{local_var},
11616 $tracelevel)
11617 if defined $::RD_TRACE;
11618 0 last;
11619 }
11620 23 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [_alternation_1_of_production_1_of_rule_local_var]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 23 23
11621 . @$_tok . q{ times)},
11622  
11623 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11624 q{local_var},
11625 $tracelevel)
11626 if defined $::RD_TRACE;
11627 23 $item{q{_alternation_1_of_production_1_of_rule_local_var(?)}} = $_tok;
11628 23 push @item, $_tok;
11629
11630  
11631  
11632 23 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 23 23
11633 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11634 q{local_var},
11635 $tracelevel)
11636 if defined $::RD_TRACE;
11637 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
11638 23 $expectation->is(q{variable})->at($text);
11639 23 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::variable($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = variable($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 15 8 23
11640 {
11641
11642 15 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [variable]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 15 15
11643 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11644 q{local_var},
11645 $tracelevel)
11646 if defined $::RD_TRACE;
11647 15 $expectation->failed();
11648 15 last;
11649 }
11650 8 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [variable]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
11651 . $_tok . q{]},
11652  
11653 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11654 q{local_var},
11655 $tracelevel)
11656 if defined $::RD_TRACE;
11657 8 $item{q{variable}} = $_tok;
11658 8 push @item, $_tok;
11659
11660 }
11661  
11662 8 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
11663 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11664 q{local_var},
11665 $tracelevel)
11666 if defined $::RD_TRACE;
11667
11668  
11669 8 ▶ $_tok = ($_noactions) ? 0 : do { [$item[2],@{$item[1]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 8 8
11670 8 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 8 8
11671 {
11672 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11673 if defined $::RD_TRACE;
11674 0 last;
11675 }
11676 8 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
11677 . $_tok . q{])},
11678 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11679 if defined $::RD_TRACE;
11680 8 push @item, $_tok;
11681 8 $item{__ACTION1__}=$_tok;
11682
11683  
11684 8 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(local|my)\\s/ variable]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 8 8
11685 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11686 q{local_var},
11687 $tracelevel)
11688 if defined $::RD_TRACE;
11689  
11690  
11691  
11692 8 $_matched = 1;
11693 8 last;
11694 }
11695  
11696  
11697 23 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 15 8 23
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
8015
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
11698 {
11699
11700  
11701 15 $_[1] = $text; # NOT SURE THIS IS NEEDED
11702 15 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 15 15
11703 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11704 q{local_var},
11705 $tracelevel)
11706 if defined $::RD_TRACE;
11707 15 return undef;
11708 }
11709 8 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 8 8
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
080
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
11710 {
11711 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11712 q{local_var},
11713 $tracelevel)
11714 if defined $::RD_TRACE;
11715 0 $return = $score_return;
11716 }
11717 8 splice @{$thisparser->{errors}}, $err_at;
11718 8 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 8 0 8
11719 8 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 8 8
11720 {
11721 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
11722 $return . q{])}, "",
11723 q{local_var},
11724 $tracelevel);
11725 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
11726 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
11727 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11728 , q{local_var},
11729 $tracelevel)
11730 }
11731 8 $_[1] = $text;
11732 8 return $return;
11733 }
11734  
11735 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
11736 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::local_var_in
11737 17 ▶{
Subroutine local_var_in: called CC=33 SCAR=38.4
11738 17 my $thisparser = $_[0];
11739 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
11740 17 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
170
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
11741 17 $ERRORS = 0;
11742 17 my $thisrule = $thisparser->{"rules"}{"local_var_in"};
11743  
11744 17 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [local_var_in]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 17 17
11745 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11746 q{local_var_in},
11747 $tracelevel)
11748 if defined $::RD_TRACE;
11749  
11750
11751 17 my $err_at = @{$thisparser->{errors}};
11752  
11753 17 my $score;
11754 my $score_return;
11755 17 my $_tok;
11756 17 my $return = undef;
11757 17 my $_matched=0;
11758 17 my $commit=0;
11759 17 my @item = ();
11760 17 my %item = ();
11761 17 my $repeating = $_[2];
11762 17 my $_noactions = $_[3];
11763 17 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 17 0 17
11764 17 my $_itempos = $_[5];
11765 17 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 17 0 17
11766 17 my $text;
11767 my $lastsep;
11768 17 my $current_match;
11769 17 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{local_var});
11770 17 $expectation->at($_[1]);
11771
11772 17 my $thisoffset;
11773 17 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
11774
11775 17 my $thiscolumn;
11776 17 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
11777
11778 17 my $thisline;
11779 17 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
11780  
11781
11782  
11783 17 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 17 0 17
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0017
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
11784 {
11785
11786 17 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [local_var 'in']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 17 17
11787 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11788 q{local_var_in},
11789 $tracelevel)
11790 if defined $::RD_TRACE;
11791 17 my $thisprod = $thisrule->{"prods"}[0];
11792 17 $text = $_[1];
11793 17 my $_savetext;
11794 17 @item = (q{local_var_in});
11795 17 %item = (__RULE__ => q{local_var_in});
11796 17 my $repcount = 0;
11797  
11798  
11799 17 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [local_var]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 17 17
11800 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11801 q{local_var_in},
11802 $tracelevel)
11803 if defined $::RD_TRACE;
11804 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
11805 17 $expectation->is(q{})->at($text);
11806 17 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::local_var($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = local_var($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 15 2 17
11807 {
11808
11809 15 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [local_var]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 15 15
11810 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11811 q{local_var_in},
11812 $tracelevel)
11813 if defined $::RD_TRACE;
11814 15 $expectation->failed();
11815 15 last;
11816 }
11817 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [local_var]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
11818 . $_tok . q{]},
11819  
11820 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11821 q{local_var_in},
11822 $tracelevel)
11823 if defined $::RD_TRACE;
11824 2 $item{q{local_var}} = $_tok;
11825 2 push @item, $_tok;
11826
11827 }
11828  
11829 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['in']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
11830 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11831 q{local_var_in},
11832 $tracelevel)
11833 if defined $::RD_TRACE;
11834 2 undef $lastsep;
11835 2 $expectation->is(q{'in'})->at($text);
11836
11837  
11838 2 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\Ain/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\Ain/) 1 1 2
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\Ain/
!ll&&!rl&&r
011
($lastsep = $1) && ''
!ll
11
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\Ain/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\Ain/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\Ain/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
11839 {
11840 1 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 1 0 1
11841
11842 1 $expectation->failed();
11843 1 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
11844 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11845 if defined $::RD_TRACE;
11846 1 last;
11847 }
11848 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
11849 1 substr($text,0,length($current_match),q{});
11850 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
11851 . $current_match . q{])},
11852 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11853 if defined $::RD_TRACE;
11854 1 push @item, $item{__STRING1__}=$current_match;
11855
11856  
11857 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
11858 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11859 q{local_var_in},
11860 $tracelevel)
11861 if defined $::RD_TRACE;
11862
11863  
11864 1 ▶ $_tok = ($_noactions) ? 0 : do { $item[1] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
11865 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
11866 {
11867 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11868 if defined $::RD_TRACE;
11869 0 last;
11870 }
11871 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
11872 . $_tok . q{])},
11873 XML::XSH2::Parser::_Runtime::_tracefirst($text))
11874 if defined $::RD_TRACE;
11875 1 push @item, $_tok;
11876 1 $item{__ACTION1__}=$_tok;
11877
11878  
11879 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [local_var 'in']<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
11880 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11881 q{local_var_in},
11882 $tracelevel)
11883 if defined $::RD_TRACE;
11884  
11885  
11886  
11887 1 $_matched = 1;
11888 1 last;
11889 }
11890  
11891  
11892 17 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 16 1 17
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
1016
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
11893 {
11894
11895  
11896 16 $_[1] = $text; # NOT SURE THIS IS NEEDED
11897 16 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 16 16
11898 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11899 q{local_var_in},
11900 $tracelevel)
11901 if defined $::RD_TRACE;
11902 16 return undef;
11903 }
11904 1 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 1 1
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
010
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
11905 {
11906 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
11907 q{local_var_in},
11908 $tracelevel)
11909 if defined $::RD_TRACE;
11910 0 $return = $score_return;
11911 }
11912 1 splice @{$thisparser->{errors}}, $err_at;
11913 1 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 1 0 1
11914 1 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 1 1
11915 {
11916 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
11917 $return . q{])}, "",
11918 q{local_var_in},
11919 $tracelevel);
11920 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
11921 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
11922 XML::XSH2::Parser::_Runtime::_tracefirst($text),
11923 , q{local_var_in},
11924 $tracelevel)
11925 }
11926 1 $_[1] = $text;
11927 1 return $return;
11928 }
11929  
11930 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
11931 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::loose_exp
11932 192 ▶{
Subroutine loose_exp: called CC=81 SCAR=65.4
11933 192 my $thisparser = $_[0];
11934 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
11935 192 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
1920
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
11936 192 $ERRORS = 0;
11937 192 my $thisrule = $thisparser->{"rules"}{"loose_exp"};
11938  
11939 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [loose_exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
11940 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11941 q{loose_exp},
11942 $tracelevel)
11943 if defined $::RD_TRACE;
11944  
11945
11946 192 my $err_at = @{$thisparser->{errors}};
11947  
11948 192 my $score;
11949 my $score_return;
11950 192 my $_tok;
11951 192 my $return = undef;
11952 192 my $_matched=0;
11953 192 my $commit=0;
11954 192 my @item = ();
11955 192 my %item = ();
11956 192 my $repeating = $_[2];
11957 192 my $_noactions = $_[3];
11958 192 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 192 0 192
11959 192 my $_itempos = $_[5];
11960 192 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 192 0 192
11961 192 my $text;
11962 my $lastsep;
11963 192 my $current_match;
11964 192 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/^(?=\{)/, or '&', or /^(?=<<)/, or xpinter});
11965 192 $expectation->at($_[1]);
11966
11967 192 my $thisoffset;
11968 192 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
11969
11970 192 my $thiscolumn;
11971 192 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
11972
11973 192 my $thisline;
11974 192 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
11975  
11976
11977  
11978 192 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 192 0 192
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00192
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
11979 {
11980
11981 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/^(?=\{)/ perl_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
11982 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
11983 q{loose_exp},
11984 $tracelevel)
11985 if defined $::RD_TRACE;
11986 192 my $thisprod = $thisrule->{"prods"}[0];
11987 192 $text = $_[1];
11988 192 my $_savetext;
11989 192 @item = (q{loose_exp});
11990 192 %item = (__RULE__ => q{loose_exp});
11991 192 my $repcount = 0;
11992  
11993  
11994 192 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/^(?=\{)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 192 192
11995 q{loose_exp},
11996 $tracelevel)
11997 if defined $::RD_TRACE;
11998 192 undef $lastsep;
11999 192 $expectation->is(q{})->at($text);
12000
12001  
12002 192 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^(?={))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?={))/) 191 1 192
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?={))/
!ll&&!rl&&r
01911
($lastsep = $1) && ''
!ll
34158
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?={))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:^(?={))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:^(?={))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
12003 {
12004 191 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 191 0 191
12005 191 $expectation->failed();
12006 191 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12007 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12008 if defined $::RD_TRACE;
12009  
12010 191 last;
12011 }
12012 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
12013 1 substr($text,0,length($current_match),q{});
12014 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
12015 . $current_match . q{])},
12016 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12017 if defined $::RD_TRACE;
12018 1 push @item, $item{__PATTERN1__}=$current_match;
12019
12020  
12021 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [perl_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
12022 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12023 q{loose_exp},
12024 $tracelevel)
12025 if defined $::RD_TRACE;
12026 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
12027 1 $expectation->is(q{perl_block})->at($text);
12028 1 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::perl_block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = perl_block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 1 1
12029 {
12030
12031 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [perl_block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12032 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12033 q{loose_exp},
12034 $tracelevel)
12035 if defined $::RD_TRACE;
12036 0 $expectation->failed();
12037 0 last;
12038 }
12039 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [perl_block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
12040 . $_tok . q{]},
12041  
12042 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12043 q{loose_exp},
12044 $tracelevel)
12045 if defined $::RD_TRACE;
12046 1 $item{q{perl_block}} = $_tok;
12047 1 push @item, $_tok;
12048
12049 }
12050  
12051 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
12052 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12053 q{loose_exp},
12054 $tracelevel)
12055 if defined $::RD_TRACE;
12056
12057  
12058 1 ▶ $_tok = ($_noactions) ? 0 : do { $item[2] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
12059 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
12060 {
12061 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12062 if defined $::RD_TRACE;
12063 0 last;
12064 }
12065 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
12066 . $_tok . q{])},
12067 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12068 if defined $::RD_TRACE;
12069 1 push @item, $_tok;
12070 1 $item{__ACTION1__}=$_tok;
12071
12072  
12073 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/^(?=\{)/ perl_block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
12074 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12075 q{loose_exp},
12076 $tracelevel)
12077 if defined $::RD_TRACE;
12078  
12079  
12080  
12081 1 $_matched = 1;
12082 1 last;
12083 }
12084  
12085  
12086 192 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 191 1 192
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
10191
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
12087 {
12088
12089 191 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: ['&' block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12090 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12091 q{loose_exp},
12092 $tracelevel)
12093 if defined $::RD_TRACE;
12094 191 my $thisprod = $thisrule->{"prods"}[1];
12095 191 $text = $_[1];
12096 191 my $_savetext;
12097 191 @item = (q{loose_exp});
12098 191 %item = (__RULE__ => q{loose_exp});
12099 191 my $repcount = 0;
12100  
12101  
12102 191 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['&']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12103 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12104 q{loose_exp},
12105 $tracelevel)
12106 if defined $::RD_TRACE;
12107 191 undef $lastsep;
12108 191 $expectation->is(q{})->at($text);
12109
12110  
12111 191 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\&/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\&/) 191 0 191
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\&/
!ll&&!rl&&r
01910
($lastsep = $1) && ''
!ll
33158
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\&/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\&/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\&/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
12112 {
12113 191 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 191 0 191
12114
12115 191 $expectation->failed();
12116 191 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12117 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12118 if defined $::RD_TRACE;
12119 191 last;
12120 }
12121 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
12122 0 substr($text,0,length($current_match),q{});
12123 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12124 . $current_match . q{])},
12125 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12126 if defined $::RD_TRACE;
12127 0 push @item, $item{__STRING1__}=$current_match;
12128
12129  
12130 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12131 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12132 q{loose_exp},
12133 $tracelevel)
12134 if defined $::RD_TRACE;
12135 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
12136 0 $expectation->is(q{block})->at($text);
12137 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
12138 {
12139
12140 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12141 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12142 q{loose_exp},
12143 $tracelevel)
12144 if defined $::RD_TRACE;
12145 0 $expectation->failed();
12146 0 last;
12147 }
12148 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12149 . $_tok . q{]},
12150  
12151 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12152 q{loose_exp},
12153 $tracelevel)
12154 if defined $::RD_TRACE;
12155 0 $item{q{block}} = $_tok;
12156 0 push @item, $_tok;
12157
12158 }
12159  
12160 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12161 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12162 q{loose_exp},
12163 $tracelevel)
12164 if defined $::RD_TRACE;
12165
12166  
12167 0 ▶ $_tok = ($_noactions) ? 0 : do { $item[2] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
12168 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
12169 {
12170 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12171 if defined $::RD_TRACE;
12172 0 last;
12173 }
12174 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12175 . $_tok . q{])},
12176 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12177 if defined $::RD_TRACE;
12178 0 push @item, $_tok;
12179 0 $item{__ACTION1__}=$_tok;
12180
12181  
12182 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: ['&' block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12183 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12184 q{loose_exp},
12185 $tracelevel)
12186 if defined $::RD_TRACE;
12187  
12188  
12189  
12190 0 $_matched = 1;
12191 0 last;
12192 }
12193  
12194  
12195 192 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 191 1 192
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
10191
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
12196 {
12197
12198 191 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/^(?=<<)/ inline_doc]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12199 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12200 q{loose_exp},
12201 $tracelevel)
12202 if defined $::RD_TRACE;
12203 191 my $thisprod = $thisrule->{"prods"}[2];
12204 191 $text = $_[1];
12205 191 my $_savetext;
12206 191 @item = (q{loose_exp});
12207 191 %item = (__RULE__ => q{loose_exp});
12208 191 my $repcount = 0;
12209  
12210  
12211 191 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/^(?=<<)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12212 q{loose_exp},
12213 $tracelevel)
12214 if defined $::RD_TRACE;
12215 191 undef $lastsep;
12216 191 $expectation->is(q{})->at($text);
12217
12218  
12219 191 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:^(?=<<))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?=<<))/) 191 0 191
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?=<<))/
!ll&&!rl&&r
01910
($lastsep = $1) && ''
!ll
33158
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:^(?=<<))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:^(?=<<))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:^(?=<<))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
12220 {
12221 191 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 191 0 191
12222 191 $expectation->failed();
12223 191 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12224 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12225 if defined $::RD_TRACE;
12226  
12227 191 last;
12228 }
12229 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
12230 0 substr($text,0,length($current_match),q{});
12231 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12232 . $current_match . q{])},
12233 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12234 if defined $::RD_TRACE;
12235 0 push @item, $item{__PATTERN1__}=$current_match;
12236
12237  
12238 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [inline_doc]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12239 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12240 q{loose_exp},
12241 $tracelevel)
12242 if defined $::RD_TRACE;
12243 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
12244 0 $expectation->is(q{inline_doc})->at($text);
12245 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::inline_doc($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = inline_doc($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
12246 {
12247
12248 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [inline_doc]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12249 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12250 q{loose_exp},
12251 $tracelevel)
12252 if defined $::RD_TRACE;
12253 0 $expectation->failed();
12254 0 last;
12255 }
12256 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [inline_doc]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12257 . $_tok . q{]},
12258  
12259 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12260 q{loose_exp},
12261 $tracelevel)
12262 if defined $::RD_TRACE;
12263 0 $item{q{inline_doc}} = $_tok;
12264 0 push @item, $_tok;
12265
12266 }
12267  
12268 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12269 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12270 q{loose_exp},
12271 $tracelevel)
12272 if defined $::RD_TRACE;
12273
12274  
12275 0 ▶ $_tok = ($_noactions) ? 0 : do { $item[2] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
12276 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
12277 {
12278 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12279 if defined $::RD_TRACE;
12280 0 last;
12281 }
12282 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12283 . $_tok . q{])},
12284 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12285 if defined $::RD_TRACE;
12286 0 push @item, $_tok;
12287 0 $item{__ACTION1__}=$_tok;
12288
12289  
12290 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/^(?=<<)/ inline_doc]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12291 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12292 q{loose_exp},
12293 $tracelevel)
12294 if defined $::RD_TRACE;
12295  
12296  
12297  
12298 0 $_matched = 1;
12299 0 last;
12300 }
12301  
12302  
12303 192 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 191 1 192
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
10191
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
12304 {
12305
12306 191 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpinter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12307 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12308 q{loose_exp},
12309 $tracelevel)
12310 if defined $::RD_TRACE;
12311 191 my $thisprod = $thisrule->{"prods"}[3];
12312 191 $text = $_[1];
12313 191 my $_savetext;
12314 191 @item = (q{loose_exp});
12315 191 %item = (__RULE__ => q{loose_exp});
12316 191 my $repcount = 0;
12317  
12318  
12319 191 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpinter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12320 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12321 q{loose_exp},
12322 $tracelevel)
12323 if defined $::RD_TRACE;
12324 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
12325 191 $expectation->is(q{})->at($text);
12326 191 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpinter($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpinter($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 191 191
12327 {
12328
12329 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpinter]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12330 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12331 q{loose_exp},
12332 $tracelevel)
12333 if defined $::RD_TRACE;
12334 0 $expectation->failed();
12335 0 last;
12336 }
12337 191 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpinter]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12338 . $_tok . q{]},
12339  
12340 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12341 q{loose_exp},
12342 $tracelevel)
12343 if defined $::RD_TRACE;
12344 191 $item{q{xpinter}} = $_tok;
12345 191 push @item, $_tok;
12346
12347 }
12348  
12349 191 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpinter]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 191 191
12350 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12351 q{loose_exp},
12352 $tracelevel)
12353 if defined $::RD_TRACE;
12354  
12355  
12356  
12357 191 $_matched = 1;
12358 191 last;
12359 }
12360  
12361  
12362 192 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 192 192
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
19200
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
12363 {
12364
12365  
12366 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
12367 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12368 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12369 q{loose_exp},
12370 $tracelevel)
12371 if defined $::RD_TRACE;
12372 0 return undef;
12373 }
12374 192 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 192 192
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
01920
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
12375 {
12376 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12377 q{loose_exp},
12378 $tracelevel)
12379 if defined $::RD_TRACE;
12380 0 $return = $score_return;
12381 }
12382 192 splice @{$thisparser->{errors}}, $err_at;
12383 192 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 192 0 192
12384 192 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 192 192
12385 {
12386 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
12387 $return . q{])}, "",
12388 q{loose_exp},
12389 $tracelevel);
12390 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
12391 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
12392 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12393 , q{loose_exp},
12394 $tracelevel)
12395 }
12396 192 $_[1] = $text;
12397 192 return $return;
12398 }
12399  
12400 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
12401 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::nodename
12402 0 ▶{
Subroutine nodename: not called CC=21 SCAR=59.9
12403 0 my $thisparser = $_[0];
12404 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
12405 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
12406 0 $ERRORS = 0;
12407 0 my $thisrule = $thisparser->{"rules"}{"nodename"};
12408  
12409 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [nodename]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12410 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12411 q{nodename},
12412 $tracelevel)
12413 if defined $::RD_TRACE;
12414  
12415
12416 0 my $err_at = @{$thisparser->{errors}};
12417  
12418 0 my $score;
12419 my $score_return;
12420 0 my $_tok;
12421 0 my $return = undef;
12422 0 my $_matched=0;
12423 0 my $commit=0;
12424 0 my @item = ();
12425 0 my %item = ();
12426 0 my $repeating = $_[2];
12427 0 my $_noactions = $_[3];
12428 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
12429 0 my $_itempos = $_[5];
12430 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
12431 0 my $text;
12432 my $lastsep;
12433 0 my $current_match;
12434 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{exp});
12435 0 $expectation->at($_[1]);
12436
12437 0 my $thisoffset;
12438 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
12439
12440 0 my $thiscolumn;
12441 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
12442
12443 0 my $thisline;
12444 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
12445  
12446
12447  
12448 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
12449 {
12450
12451 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12452 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12453 q{nodename},
12454 $tracelevel)
12455 if defined $::RD_TRACE;
12456 0 my $thisprod = $thisrule->{"prods"}[0];
12457 0 $text = $_[1];
12458 0 my $_savetext;
12459 0 @item = (q{nodename});
12460 0 %item = (__RULE__ => q{nodename});
12461 0 my $repcount = 0;
12462  
12463  
12464 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12465 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12466 q{nodename},
12467 $tracelevel)
12468 if defined $::RD_TRACE;
12469 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
12470 0 $expectation->is(q{})->at($text);
12471 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
12472 {
12473
12474 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12475 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12476 q{nodename},
12477 $tracelevel)
12478 if defined $::RD_TRACE;
12479 0 $expectation->failed();
12480 0 last;
12481 }
12482 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12483 . $_tok . q{]},
12484  
12485 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12486 q{nodename},
12487 $tracelevel)
12488 if defined $::RD_TRACE;
12489 0 $item{q{exp}} = $_tok;
12490 0 push @item, $_tok;
12491
12492 }
12493  
12494 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [exp]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12495 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12496 q{nodename},
12497 $tracelevel)
12498 if defined $::RD_TRACE;
12499  
12500  
12501  
12502 0 $_matched = 1;
12503 0 last;
12504 }
12505  
12506  
12507 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
12508 {
12509
12510  
12511 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
12512 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12513 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12514 q{nodename},
12515 $tracelevel)
12516 if defined $::RD_TRACE;
12517 0 return undef;
12518 }
12519 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
12520 {
12521 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12522 q{nodename},
12523 $tracelevel)
12524 if defined $::RD_TRACE;
12525 0 $return = $score_return;
12526 }
12527 0 splice @{$thisparser->{errors}}, $err_at;
12528 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
12529 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
12530 {
12531 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
12532 $return . q{])}, "",
12533 q{nodename},
12534 $tracelevel);
12535 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
12536 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
12537 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12538 , q{nodename},
12539 $tracelevel)
12540 }
12541 0 $_[1] = $text;
12542 0 return $return;
12543 }
12544  
12545 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
12546 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::nodetype
12547 0 ▶{
Subroutine nodetype: not called CC=24 SCAR=63.3
12548 0 my $thisparser = $_[0];
12549 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
12550 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
12551 0 $ERRORS = 0;
12552 0 my $thisrule = $thisparser->{"rules"}{"nodetype"};
12553  
12554 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [nodetype]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12555 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12556 q{nodetype},
12557 $tracelevel)
12558 if defined $::RD_TRACE;
12559  
12560
12561 0 my $err_at = @{$thisparser->{errors}};
12562  
12563 0 my $score;
12564 my $score_return;
12565 0 my $_tok;
12566 0 my $return = undef;
12567 0 my $_matched=0;
12568 0 my $commit=0;
12569 0 my @item = ();
12570 0 my %item = ();
12571 0 my $repeating = $_[2];
12572 0 my $_noactions = $_[3];
12573 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
12574 0 my $_itempos = $_[5];
12575 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
12576 0 my $text;
12577 my $lastsep;
12578 0 my $current_match;
12579 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference/});
12580 0 $expectation->at($_[1]);
12581
12582 0 my $thisoffset;
12583 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
12584
12585 0 my $thiscolumn;
12586 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
12587
12588 0 my $thisline;
12589 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
12590  
12591
12592  
12593 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
12594 {
12595
12596 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12597 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12598 q{nodetype},
12599 $tracelevel)
12600 if defined $::RD_TRACE;
12601 0 my $thisprod = $thisrule->{"prods"}[0];
12602 0 $text = $_[1];
12603 0 my $_savetext;
12604 0 @item = (q{nodetype});
12605 0 %item = (__RULE__ => q{nodetype});
12606 0 my $repcount = 0;
12607  
12608  
12609 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12610 q{nodetype},
12611 $tracelevel)
12612 if defined $::RD_TRACE;
12613 0 undef $lastsep;
12614 0 $expectation->is(q{})->at($text);
12615
12616  
12617 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
12618 {
12619 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
12620 0 $expectation->failed();
12621 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12622 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12623 if defined $::RD_TRACE;
12624  
12625 0 last;
12626 }
12627 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
12628 0 substr($text,0,length($current_match),q{});
12629 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12630 . $current_match . q{])},
12631 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12632 if defined $::RD_TRACE;
12633 0 push @item, $item{__PATTERN1__}=$current_match;
12634
12635  
12636 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12637 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12638 q{nodetype},
12639 $tracelevel)
12640 if defined $::RD_TRACE;
12641  
12642  
12643  
12644 0 $_matched = 1;
12645 0 last;
12646 }
12647  
12648  
12649 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
12650 {
12651
12652  
12653 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
12654 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12655 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12656 q{nodetype},
12657 $tracelevel)
12658 if defined $::RD_TRACE;
12659 0 return undef;
12660 }
12661 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
12662 {
12663 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12664 q{nodetype},
12665 $tracelevel)
12666 if defined $::RD_TRACE;
12667 0 $return = $score_return;
12668 }
12669 0 splice @{$thisparser->{errors}}, $err_at;
12670 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
12671 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
12672 {
12673 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
12674 $return . q{])}, "",
12675 q{nodetype},
12676 $tracelevel);
12677 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
12678 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
12679 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12680 , q{nodetype},
12681 $tracelevel)
12682 }
12683 0 $_[1] = $text;
12684 0 return $return;
12685 }
12686  
12687 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
12688 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::option
12689 1016 ▶{
Subroutine option: called CC=24 SCAR=34.0
12690 1016 my $thisparser = $_[0];
12691 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
12692 1016 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
10160
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
12693 1016 $ERRORS = 0;
12694 1016 my $thisrule = $thisparser->{"rules"}{"option"};
12695  
12696 1016 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [option]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1016 1016
12697 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12698 q{option},
12699 $tracelevel)
12700 if defined $::RD_TRACE;
12701  
12702
12703 1016 my $err_at = @{$thisparser->{errors}};
12704  
12705 1016 my $score;
12706 my $score_return;
12707 1016 my $_tok;
12708 1016 my $return = undef;
12709 1016 my $_matched=0;
12710 1016 my $commit=0;
12711 1016 my @item = ();
12712 1016 my %item = ();
12713 1016 my $repeating = $_[2];
12714 1016 my $_noactions = $_[3];
12715 1016 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1016 0 1016
12716 1016 my $_itempos = $_[5];
12717 1016 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1016 0 1016
12718 1016 my $text;
12719 my $lastsep;
12720 1016 my $current_match;
12721 1016 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/:[[:alnum:]]|--[-_[:alnum:]]+/});
12722 1016 $expectation->at($_[1]);
12723
12724 1016 my $thisoffset;
12725 1016 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
12726
12727 1016 my $thiscolumn;
12728 1016 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
12729
12730 1016 my $thisline;
12731 1016 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
12732  
12733
12734  
12735 1016 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1016 0 1016
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001016
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
12736 {
12737
12738 1016 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/:[[:alnum:]]|--[-_[:alnum:]]+/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1016 1016
12739 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12740 q{option},
12741 $tracelevel)
12742 if defined $::RD_TRACE;
12743 1016 my $thisprod = $thisrule->{"prods"}[0];
12744 1016 $text = $_[1];
12745 1016 my $_savetext;
12746 1016 @item = (q{option});
12747 1016 %item = (__RULE__ => q{option});
12748 1016 my $repcount = 0;
12749  
12750  
12751 1016 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/:[[:alnum:]]|--[-_[:alnum:]]+/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1016 1016
12752 q{option},
12753 $tracelevel)
12754 if defined $::RD_TRACE;
12755 1016 undef $lastsep;
12756 1016 $expectation->is(q{})->at($text);
12757
12758  
12759 1016 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?::[[:alnum:]]|--[-_[:alnum:]]+)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?::[[:alnum:]]|--[-_[:alnum:]]+)/) 981 35 1016
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?::[[:alnum:]]|--[-_[:alnum:]]+)/
!ll&&!rl&&r
098135
($lastsep = $1) && ''
!ll
21014
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?::[[:alnum:]]|--[-_[:alnum:]]+)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?::[[:alnum:]]|--[-_[:alnum:]]+)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?::[[:alnum:]]|--[-_[:alnum:]]+)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
12760 {
12761 981 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 981 0 981
12762 981 $expectation->failed();
12763 981 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 981 981
12764 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12765 if defined $::RD_TRACE;
12766  
12767 981 last;
12768 }
12769 35 $current_match = substr($text, $-[0], $+[0] - $-[0]);
12770 35 substr($text,0,length($current_match),q{});
12771 35 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 35 35
12772 . $current_match . q{])},
12773 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12774 if defined $::RD_TRACE;
12775 35 push @item, $item{__PATTERN1__}=$current_match;
12776
12777  
12778 35 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/:[[:alnum:]]|--[-_[:alnum:]]+/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 35 35
12779 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12780 q{option},
12781 $tracelevel)
12782 if defined $::RD_TRACE;
12783  
12784  
12785  
12786 35 $_matched = 1;
12787 35 last;
12788 }
12789  
12790  
12791 1016 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 981 35 1016
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
350981
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
12792 {
12793
12794  
12795 981 $_[1] = $text; # NOT SURE THIS IS NEEDED
12796 981 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 981 981
12797 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12798 q{option},
12799 $tracelevel)
12800 if defined $::RD_TRACE;
12801 981 return undef;
12802 }
12803 35 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 35 35
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
0350
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
12804 {
12805 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12806 q{option},
12807 $tracelevel)
12808 if defined $::RD_TRACE;
12809 0 $return = $score_return;
12810 }
12811 35 splice @{$thisparser->{errors}}, $err_at;
12812 35 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 35 0 35
12813 35 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 35 35
12814 {
12815 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
12816 $return . q{])}, "",
12817 q{option},
12818 $tracelevel);
12819 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
12820 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
12821 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12822 , q{option},
12823 $tracelevel)
12824 }
12825 35 $_[1] = $text;
12826 35 return $return;
12827 }
12828  
12829 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
12830 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::param
12831 0 ▶{
Subroutine param: not called CC=40 SCAR=73.1
12832 0 my $thisparser = $_[0];
12833 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
12834 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
12835 0 $ERRORS = 0;
12836 0 my $thisrule = $thisparser->{"rules"}{"param"};
12837  
12838 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [param]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12839 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12840 q{param},
12841 $tracelevel)
12842 if defined $::RD_TRACE;
12843  
12844
12845 0 my $err_at = @{$thisparser->{errors}};
12846  
12847 0 my $score;
12848 my $score_return;
12849 0 my $_tok;
12850 0 my $return = undef;
12851 0 my $_matched=0;
12852 0 my $commit=0;
12853 0 my @item = ();
12854 0 my %item = ();
12855 0 my $repeating = $_[2];
12856 0 my $_noactions = $_[3];
12857 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
12858 0 my $_itempos = $_[5];
12859 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
12860 0 my $text;
12861 my $lastsep;
12862 0 my $current_match;
12863 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/[^=\\s]+/});
12864 0 $expectation->at($_[1]);
12865
12866 0 my $thisoffset;
12867 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
12868
12869 0 my $thiscolumn;
12870 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
12871
12872 0 my $thisline;
12873 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
12874  
12875
12876  
12877 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
12878 {
12879
12880 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/[^=\\s]+/ '=' exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12881 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
12882 q{param},
12883 $tracelevel)
12884 if defined $::RD_TRACE;
12885 0 my $thisprod = $thisrule->{"prods"}[0];
12886 0 $text = $_[1];
12887 0 my $_savetext;
12888 0 @item = (q{param});
12889 0 %item = (__RULE__ => q{param});
12890 0 my $repcount = 0;
12891  
12892  
12893 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/[^=\\s]+/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12894 q{param},
12895 $tracelevel)
12896 if defined $::RD_TRACE;
12897 0 undef $lastsep;
12898 0 $expectation->is(q{})->at($text);
12899
12900  
12901 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[^=\s]+)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[^=\s]+)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[^=\s]+)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[^=\s]+)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:[^=\s]+)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:[^=\s]+)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
12902 {
12903 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
12904 0 $expectation->failed();
12905 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12906 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12907 if defined $::RD_TRACE;
12908  
12909 0 last;
12910 }
12911 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
12912 0 substr($text,0,length($current_match),q{});
12913 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12914 . $current_match . q{])},
12915 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12916 if defined $::RD_TRACE;
12917 0 push @item, $item{__PATTERN1__}=$current_match;
12918
12919  
12920 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['=']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12921 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12922 q{param},
12923 $tracelevel)
12924 if defined $::RD_TRACE;
12925 0 undef $lastsep;
12926 0 $expectation->is(q{'='})->at($text);
12927
12928  
12929 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\=/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\=/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\=/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\=/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\=/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\=/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
12930 {
12931 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
12932
12933 0 $expectation->failed();
12934 0 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12935 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12936 if defined $::RD_TRACE;
12937 0 last;
12938 }
12939 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
12940 0 substr($text,0,length($current_match),q{});
12941 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12942 . $current_match . q{])},
12943 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12944 if defined $::RD_TRACE;
12945 0 push @item, $item{__STRING1__}=$current_match;
12946
12947  
12948 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12949 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12950 q{param},
12951 $tracelevel)
12952 if defined $::RD_TRACE;
12953 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
12954 0 $expectation->is(q{exp})->at($text);
12955 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
12956 {
12957
12958 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12959 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12960 q{param},
12961 $tracelevel)
12962 if defined $::RD_TRACE;
12963 0 $expectation->failed();
12964 0 last;
12965 }
12966 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12967 . $_tok . q{]},
12968  
12969 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12970 q{param},
12971 $tracelevel)
12972 if defined $::RD_TRACE;
12973 0 $item{q{exp}} = $_tok;
12974 0 push @item, $_tok;
12975
12976 }
12977  
12978 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12979 XML::XSH2::Parser::_Runtime::_tracefirst($text),
12980 q{param},
12981 $tracelevel)
12982 if defined $::RD_TRACE;
12983
12984  
12985 0 ▶ $_tok = ($_noactions) ? 0 : do { [$item[1],$item[3]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
12986 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
12987 {
12988 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12989 if defined $::RD_TRACE;
12990 0 last;
12991 }
12992 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
12993 . $_tok . q{])},
12994 XML::XSH2::Parser::_Runtime::_tracefirst($text))
12995 if defined $::RD_TRACE;
12996 0 push @item, $_tok;
12997 0 $item{__ACTION1__}=$_tok;
12998
12999  
13000 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/[^=\\s]+/ '=' exp]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13001 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13002 q{param},
13003 $tracelevel)
13004 if defined $::RD_TRACE;
13005  
13006  
13007  
13008 0 $_matched = 1;
13009 0 last;
13010 }
13011  
13012  
13013 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
13014 {
13015
13016  
13017 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
13018 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13019 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13020 q{param},
13021 $tracelevel)
13022 if defined $::RD_TRACE;
13023 0 return undef;
13024 }
13025 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
13026 {
13027 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13028 q{param},
13029 $tracelevel)
13030 if defined $::RD_TRACE;
13031 0 $return = $score_return;
13032 }
13033 0 splice @{$thisparser->{errors}}, $err_at;
13034 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
13035 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
13036 {
13037 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
13038 $return . q{])}, "",
13039 q{param},
13040 $tracelevel);
13041 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
13042 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
13043 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13044 , q{param},
13045 $tracelevel)
13046 }
13047 0 $_[1] = $text;
13048 0 return $return;
13049 }
13050  
13051 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
13052 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::perl_block
13053 118 ▶{
Subroutine perl_block: called CC=49 SCAR=50.3
13054 118 my $thisparser = $_[0];
13055 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
13056 118 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
1180
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
13057 118 $ERRORS = 0;
13058 118 my $thisrule = $thisparser->{"rules"}{"perl_block"};
13059  
13060 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [perl_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13061 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13062 q{perl_block},
13063 $tracelevel)
13064 if defined $::RD_TRACE;
13065  
13066
13067 118 my $err_at = @{$thisparser->{errors}};
13068  
13069 118 my $score;
13070 my $score_return;
13071 118 my $_tok;
13072 118 my $return = undef;
13073 118 my $_matched=0;
13074 118 my $commit=0;
13075 118 my @item = ();
13076 118 my %item = ();
13077 118 my $repeating = $_[2];
13078 118 my $_noactions = $_[3];
13079 118 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 118 0 118
13080 118 my $_itempos = $_[5];
13081 118 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 118 0 118
13082 118 my $text;
13083 my $lastsep;
13084 118 my $current_match;
13085 118 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{});
13086 118 $expectation->at($_[1]);
13087
13088 118 my $thisoffset;
13089 118 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
13090
13091 118 my $thiscolumn;
13092 118 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
13093
13094 118 my $thisline;
13095 118 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
13096  
13097
13098  
13099 118 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 118 0 118
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00118
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
13100 {
13101
13102 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [<reject>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13103 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13104 q{perl_block},
13105 $tracelevel)
13106 if defined $::RD_TRACE;
13107 118 my $thisprod = $thisrule->{"prods"}[0];
13108 118 $text = $_[1];
13109 118 my $_savetext;
13110 118 @item = (q{perl_block});
13111 118 %item = (__RULE__ => q{perl_block});
13112 118 my $repcount = 0;
13113  
13114  
13115 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13116 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13117 q{perl_block},
13118 $tracelevel)
13119 if defined $::RD_TRACE;
13120
13121  
13122 118 ▶ $_tok = ($_noactions) ? 0 : do { $main::myline = $thisline; };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 118 118
13123 118 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 118 118
13124 {
13125 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13126 if defined $::RD_TRACE;
13127 0 last;
13128 }
13129 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13130 . $_tok . q{])},
13131 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13132 if defined $::RD_TRACE;
13133 118 push @item, $_tok;
13134 118 $item{__ACTION1__}=$_tok;
13135
13136  
13137 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Rejecting production<< (found <reject>)},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13138 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13139 q{perl_block},
13140 $tracelevel)
13141 if defined $::RD_TRACE;
13142 118 undef $return;
13143
13144  
13145 118 $_tok = undef;
13146
13147 118 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 118 0 118
13148  
13149 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [<reject>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13150 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13151 q{perl_block},
13152 $tracelevel)
13153 if defined $::RD_TRACE;
13154  
13155  
13156  
13157 0 $_matched = 1;
13158 0 last;
13159 }
13160  
13161  
13162 118 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 118 0 118
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00118
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
13163 {
13164
13165 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [<reject>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13166 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13167 q{perl_block},
13168 $tracelevel)
13169 if defined $::RD_TRACE;
13170 118 my $thisprod = $thisrule->{"prods"}[1];
13171 118 $text = $_[1];
13172 118 my $_savetext;
13173 118 @item = (q{perl_block});
13174 118 %item = (__RULE__ => q{perl_block});
13175 118 my $repcount = 0;
13176  
13177  
13178 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13179 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13180 q{perl_block},
13181 $tracelevel)
13182 if defined $::RD_TRACE;
13183
13184  
13185 118 ▶ $_tok = ($_noactions) ? 0 : do { $main::myline = $thisline; };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 118 118
13186 118 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 118 118
13187 {
13188 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13189 if defined $::RD_TRACE;
13190 0 last;
13191 }
13192 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13193 . $_tok . q{])},
13194 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13195 if defined $::RD_TRACE;
13196 118 push @item, $_tok;
13197 118 $item{__ACTION1__}=$_tok;
13198
13199  
13200 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Rejecting production<< (found <reject>)},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13201 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13202 q{perl_block},
13203 $tracelevel)
13204 if defined $::RD_TRACE;
13205 118 undef $return;
13206
13207  
13208 118 $_tok = undef;
13209
13210 118 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 118 0 118
13211  
13212 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [<reject>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13213 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13214 q{perl_block},
13215 $tracelevel)
13216 if defined $::RD_TRACE;
13217  
13218  
13219  
13220 0 $_matched = 1;
13221 0 last;
13222 }
13223  
13224  
13225 118 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 118 0 118
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00118
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
13226 {
13227
13228 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [<perl_codeblock>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13229 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13230 q{perl_block},
13231 $tracelevel)
13232 if defined $::RD_TRACE;
13233 118 my $thisprod = $thisrule->{"prods"}[2];
13234 118 $text = $_[1];
13235 118 my $_savetext;
13236 118 @item = (q{perl_block});
13237 118 %item = (__RULE__ => q{perl_block});
13238 118 my $repcount = 0;
13239  
13240  
13241
13242  
13243 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<perl_codeblock>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13244 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13245 q{perl_block},
13246 $tracelevel)
13247 if defined $::RD_TRACE;
13248 118 $_tok = do { Text::Balanced::extract_codeblock($text,undef,$skip,'{}');
13249 };
13250 118 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 118 0 118
13251 {
13252 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13253 . $_tok . q{])},
13254 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13255 if defined $::RD_TRACE;
13256 }
13257 else
13258 {
13259 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13260 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13261 if defined $::RD_TRACE;
13262 }
13263
13264 118 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 118 118
13265 118 push @item, $item{__DIRECTIVE1__}=$_tok;
13266
13267  
13268 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13269 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13270 q{perl_block},
13271 $tracelevel)
13272 if defined $::RD_TRACE;
13273
13274  
13275 118 ▶ $_tok = ($_noactions) ? 0 : do { {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 118 118
13276 118 $return=$item[1];
13277 {
13278 118 local $^W = 0; # don't warn about undefined contants
13279 118 my $pos="# line $main::myline \"$XML::XSH2::Functions::SCRIPT\"\n";
13280 118 $return=~s/^\{/\{\n$pos/;
13281 }
13282 } };
13283 118 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 118 118
13284 {
13285 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13286 if defined $::RD_TRACE;
13287 0 last;
13288 }
13289 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13290 . $_tok . q{])},
13291 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13292 if defined $::RD_TRACE;
13293 118 push @item, $_tok;
13294 118 $item{__ACTION1__}=$_tok;
13295
13296  
13297 118 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [<perl_codeblock>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 118 118
13298 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13299 q{perl_block},
13300 $tracelevel)
13301 if defined $::RD_TRACE;
13302  
13303  
13304  
13305 118 $_matched = 1;
13306 118 last;
13307 }
13308  
13309  
13310 118 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 118 118
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
11800
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
13311 {
13312
13313  
13314 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
13315 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13316 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13317 q{perl_block},
13318 $tracelevel)
13319 if defined $::RD_TRACE;
13320 0 return undef;
13321 }
13322 118 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 118 118
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
11800
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
13323 {
13324 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13325 q{perl_block},
13326 $tracelevel)
13327 if defined $::RD_TRACE;
13328 0 $return = $score_return;
13329 }
13330 118 splice @{$thisparser->{errors}}, $err_at;
13331 118 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 118 118
13332 118 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 118 118
13333 {
13334 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
13335 $return . q{])}, "",
13336 q{perl_block},
13337 $tracelevel);
13338 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
13339 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
13340 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13341 , q{perl_block},
13342 $tracelevel)
13343 }
13344 118 $_[1] = $text;
13345 118 return $return;
13346 }
13347  
13348 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
13349 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::perl_expression
13350 0 ▶{
Subroutine perl_expression: not called CC=37 SCAR=71.5
13351 0 my $thisparser = $_[0];
13352 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
13353 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
13354 0 $ERRORS = 0;
13355 0 my $thisrule = $thisparser->{"rules"}{"perl_expression"};
13356  
13357 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [perl_expression]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13358 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13359 q{perl_expression},
13360 $tracelevel)
13361 if defined $::RD_TRACE;
13362  
13363
13364 0 my $err_at = @{$thisparser->{errors}};
13365  
13366 0 my $score;
13367 my $score_return;
13368 0 my $_tok;
13369 0 my $return = undef;
13370 0 my $_matched=0;
13371 0 my $commit=0;
13372 0 my @item = ();
13373 0 my %item = ();
13374 0 my $repeating = $_[2];
13375 0 my $_noactions = $_[3];
13376 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
13377 0 my $_itempos = $_[5];
13378 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
13379 0 my $text;
13380 my $lastsep;
13381 0 my $current_match;
13382 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{exp});
13383 0 $expectation->at($_[1]);
13384
13385 0 my $thisoffset;
13386 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
13387
13388 0 my $thiscolumn;
13389 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
13390
13391 0 my $thisline;
13392 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
13393  
13394
13395  
13396 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
13397 {
13398
13399 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [<reject>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13400 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13401 q{perl_expression},
13402 $tracelevel)
13403 if defined $::RD_TRACE;
13404 0 my $thisprod = $thisrule->{"prods"}[0];
13405 0 $text = $_[1];
13406 0 my $_savetext;
13407 0 @item = (q{perl_expression});
13408 0 %item = (__RULE__ => q{perl_expression});
13409 0 my $repcount = 0;
13410  
13411  
13412 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13413 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13414 q{perl_expression},
13415 $tracelevel)
13416 if defined $::RD_TRACE;
13417
13418  
13419 0 ▶ $_tok = ($_noactions) ? 0 : do { $main::myline = $thisline; };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
13420 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
13421 {
13422 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13423 if defined $::RD_TRACE;
13424 0 last;
13425 }
13426 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13427 . $_tok . q{])},
13428 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13429 if defined $::RD_TRACE;
13430 0 push @item, $_tok;
13431 0 $item{__ACTION1__}=$_tok;
13432
13433  
13434 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Rejecting production<< (found <reject>)},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13435 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13436 q{perl_expression},
13437 $tracelevel)
13438 if defined $::RD_TRACE;
13439 0 undef $return;
13440
13441  
13442 0 $_tok = undef;
13443
13444 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
13445  
13446 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [<reject>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13447 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13448 q{perl_expression},
13449 $tracelevel)
13450 if defined $::RD_TRACE;
13451  
13452  
13453  
13454 0 $_matched = 1;
13455 0 last;
13456 }
13457  
13458  
13459 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
13460 {
13461
13462 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13463 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13464 q{perl_expression},
13465 $tracelevel)
13466 if defined $::RD_TRACE;
13467 0 my $thisprod = $thisrule->{"prods"}[1];
13468 0 $text = $_[1];
13469 0 my $_savetext;
13470 0 @item = (q{perl_expression});
13471 0 %item = (__RULE__ => q{perl_expression});
13472 0 my $repcount = 0;
13473  
13474  
13475 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13476 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13477 q{perl_expression},
13478 $tracelevel)
13479 if defined $::RD_TRACE;
13480 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
13481 0 $expectation->is(q{})->at($text);
13482 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
13483 {
13484
13485 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13486 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13487 q{perl_expression},
13488 $tracelevel)
13489 if defined $::RD_TRACE;
13490 0 $expectation->failed();
13491 0 last;
13492 }
13493 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13494 . $_tok . q{]},
13495  
13496 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13497 q{perl_expression},
13498 $tracelevel)
13499 if defined $::RD_TRACE;
13500 0 $item{q{exp}} = $_tok;
13501 0 push @item, $_tok;
13502
13503 }
13504  
13505 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13506 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13507 q{perl_expression},
13508 $tracelevel)
13509 if defined $::RD_TRACE;
13510
13511  
13512 0 ▶ $_tok = ($_noactions) ? 0 : do { {local $^W=0; "\n# line $main::myline \"$XML::XSH2::Functions::SCRIPT\"\n".$item[1]} };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
13513 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
13514 {
13515 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13516 if defined $::RD_TRACE;
13517 0 last;
13518 }
13519 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13520 . $_tok . q{])},
13521 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13522 if defined $::RD_TRACE;
13523 0 push @item, $_tok;
13524 0 $item{__ACTION1__}=$_tok;
13525
13526  
13527 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [exp]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13528 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13529 q{perl_expression},
13530 $tracelevel)
13531 if defined $::RD_TRACE;
13532  
13533  
13534  
13535 0 $_matched = 1;
13536 0 last;
13537 }
13538  
13539  
13540 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
13541 {
13542
13543  
13544 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
13545 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13546 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13547 q{perl_expression},
13548 $tracelevel)
13549 if defined $::RD_TRACE;
13550 0 return undef;
13551 }
13552 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
13553 {
13554 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13555 q{perl_expression},
13556 $tracelevel)
13557 if defined $::RD_TRACE;
13558 0 $return = $score_return;
13559 }
13560 0 splice @{$thisparser->{errors}}, $err_at;
13561 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
13562 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
13563 {
13564 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
13565 $return . q{])}, "",
13566 q{perl_expression},
13567 $tracelevel);
13568 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
13569 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
13570 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13571 , q{perl_expression},
13572 $tracelevel)
13573 }
13574 0 $_[1] = $text;
13575 0 return $return;
13576 }
13577  
13578 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
13579 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shell
13580 574 ▶{
Subroutine shell: called CC=53 SCAR=50.1
13581 574 my $thisparser = $_[0];
13582 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
13583 574 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
5740
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
13584 574 $ERRORS = 0;
13585 574 my $thisrule = $thisparser->{"rules"}{"shell"};
13586  
13587 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [shell]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
13588 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13589 q{shell},
13590 $tracelevel)
13591 if defined $::RD_TRACE;
13592  
13593
13594 574 my $err_at = @{$thisparser->{errors}};
13595  
13596 574 my $score;
13597 my $score_return;
13598 574 my $_tok;
13599 574 my $return = undef;
13600 574 my $_matched=0;
13601 574 my $commit=0;
13602 574 my @item = ();
13603 574 my %item = ();
13604 574 my $repeating = $_[2];
13605 574 my $_noactions = $_[3];
13606 574 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 574 0 574
13607 574 my $_itempos = $_[5];
13608 574 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 574 0 574
13609 574 my $text;
13610 my $lastsep;
13611 574 my $current_match;
13612 574 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/!\\s*/});
13613 574 $expectation->at($_[1]);
13614
13615 574 my $thisoffset;
13616 574 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
13617
13618 574 my $thiscolumn;
13619 574 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
13620
13621 574 my $thisline;
13622 574 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
13623  
13624
13625  
13626 574 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 574 0 574
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00574
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
13627 {
13628
13629 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/!\\s*/ <commit> /.*/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
13630 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13631 q{shell},
13632 $tracelevel)
13633 if defined $::RD_TRACE;
13634 574 my $thisprod = $thisrule->{"prods"}[0];
13635 574 $text = $_[1];
13636 574 my $_savetext;
13637 574 @item = (q{shell});
13638 574 %item = (__RULE__ => q{shell});
13639 574 my $repcount = 0;
13640  
13641  
13642 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/!\\s*/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
13643 q{shell},
13644 $tracelevel)
13645 if defined $::RD_TRACE;
13646 574 undef $lastsep;
13647 574 $expectation->is(q{})->at($text);
13648
13649  
13650 574 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:!\s*)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:!\s*)/) 573 1 574
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:!\s*)/
!ll&&!rl&&r
05731
($lastsep = $1) && ''
!ll
54232
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:!\s*)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:!\s*)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:!\s*)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
13651 {
13652 573 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 573 0 573
13653 573 $expectation->failed();
13654 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
13655 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13656 if defined $::RD_TRACE;
13657  
13658 573 last;
13659 }
13660 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
13661 1 substr($text,0,length($current_match),q{});
13662 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
13663 . $current_match . q{])},
13664 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13665 if defined $::RD_TRACE;
13666 1 push @item, $item{__PATTERN1__}=$current_match;
13667
13668  
13669
13670  
13671 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
13672 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13673 q{shell},
13674 $tracelevel)
13675 if defined $::RD_TRACE;
13676 1 $_tok = do { $commit = 1 };
13677 1 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 1 0 1
13678 {
13679 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
13680 . $_tok . q{])},
13681 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13682 if defined $::RD_TRACE;
13683 }
13684 else
13685 {
13686 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13687 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13688 if defined $::RD_TRACE;
13689 }
13690
13691 1 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 1 1
13692 1 push @item, $item{__DIRECTIVE1__}=$_tok;
13693
13694  
13695 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/.*/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
13696 q{shell},
13697 $tracelevel)
13698 if defined $::RD_TRACE;
13699 1 undef $lastsep;
13700 1 $expectation->is(q{/.*/})->at($text);
13701
13702  
13703 1 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:.*)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:.*)/) 0 1 1
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:.*)/
!ll&&!rl&&r
001
($lastsep = $1) && ''
!ll
10
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:.*)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:.*)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:.*)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
13704 {
13705 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
13706 0 $expectation->failed();
13707 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13708 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13709 if defined $::RD_TRACE;
13710  
13711 0 last;
13712 }
13713 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
13714 1 substr($text,0,length($current_match),q{});
13715 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
13716 . $current_match . q{])},
13717 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13718 if defined $::RD_TRACE;
13719 1 push @item, $item{__PATTERN2__}=$current_match;
13720
13721  
13722 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
13723 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13724 q{shell},
13725 $tracelevel)
13726 if defined $::RD_TRACE;
13727
13728  
13729 1 ▶ $_tok = ($_noactions) ? 0 : do { [[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'sh_noev',$item[3]]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
13730 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
13731 {
13732 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13733 if defined $::RD_TRACE;
13734 0 last;
13735 }
13736 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
13737 . $_tok . q{])},
13738 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13739 if defined $::RD_TRACE;
13740 1 push @item, $_tok;
13741 1 $item{__ACTION1__}=$_tok;
13742
13743  
13744 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/!\\s*/ <commit> /.*/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
13745 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13746 q{shell},
13747 $tracelevel)
13748 if defined $::RD_TRACE;
13749  
13750  
13751  
13752 1 $_matched = 1;
13753 1 last;
13754 }
13755  
13756  
13757 574 ▶ while (!$_matched)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched) 573 1 574
13758 {
13759
13760 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [<error?:...> <reject>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
13761 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13762 q{shell},
13763 $tracelevel)
13764 if defined $::RD_TRACE;
13765 573 my $thisprod = $thisrule->{"prods"}[1];
13766
13767 573 my $_savetext;
13768 573 @item = (q{shell});
13769 573 %item = (__RULE__ => q{shell});
13770 573 my $repcount = 0;
13771  
13772  
13773
13774  
13775 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<error?:...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
13776 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13777 q{shell},
13778 $tracelevel)
13779 if defined $::RD_TRACE;
13780 0 ▶ $_tok = do { if ($commit) { do {push @{$thisparser->{errors}}, [qq{Parse error near: "! }.substr($text,0,40).qq{ ..."},$thisline];} unless $_noactions; undef } else {0} };
Branch: 2 branches
BranchTrueFalseTotal
if ($commit) { } 0 573 573
unless ($_noactions) 0 0 0
13781 573 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 573 0 573
13782 {
13783 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
13784 . $_tok . q{])},
13785 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13786 if defined $::RD_TRACE;
13787 }
13788 else
13789 {
13790 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13791 XML::XSH2::Parser::_Runtime::_tracefirst($text))
13792 if defined $::RD_TRACE;
13793 }
13794
13795 573 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 573 573
13796 573 push @item, $item{__DIRECTIVE1__}=$_tok;
13797
13798  
13799 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Rejecting production<< (found <reject>)},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
13800 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13801 q{shell},
13802 $tracelevel)
13803 if defined $::RD_TRACE;
13804 573 undef $return;
13805
13806  
13807 573 $_tok = undef;
13808
13809 573 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 573 0 573
13810  
13811 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [<error?:...> <reject>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13812 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13813 q{shell},
13814 $tracelevel)
13815 if defined $::RD_TRACE;
13816  
13817  
13818  
13819 0 $_matched = 1;
13820 0 last;
13821 }
13822  
13823  
13824 574 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 573 1 574
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
10573
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
13825 {
13826
13827  
13828 573 $_[1] = $text; # NOT SURE THIS IS NEEDED
13829 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
13830 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13831 q{shell},
13832 $tracelevel)
13833 if defined $::RD_TRACE;
13834 573 return undef;
13835 }
13836 1 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 1 1
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
010
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
13837 {
13838 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13839 q{shell},
13840 $tracelevel)
13841 if defined $::RD_TRACE;
13842 0 $return = $score_return;
13843 }
13844 1 splice @{$thisparser->{errors}}, $err_at;
13845 1 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 1 0 1
13846 1 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 1 1
13847 {
13848 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
13849 $return . q{])}, "",
13850 q{shell},
13851 $tracelevel);
13852 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
13853 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
13854 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13855 , q{shell},
13856 $tracelevel)
13857 }
13858 1 $_[1] = $text;
13859 1 return $return;
13860 }
13861  
13862 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
13863 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline
13864 20 ▶{
Subroutine shline: called CC=34 SCAR=43.5
13865 20 my $thisparser = $_[0];
13866 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
13867 20 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
200
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
13868 20 $ERRORS = 0;
13869 20 my $thisrule = $thisparser->{"rules"}{"shline"};
13870  
13871 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [shline]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
13872 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13873 q{shline},
13874 $tracelevel)
13875 if defined $::RD_TRACE;
13876  
13877
13878 20 my $err_at = @{$thisparser->{errors}};
13879  
13880 20 my $score;
13881 my $score_return;
13882 20 my $_tok;
13883 20 my $return = undef;
13884 20 my $_matched=0;
13885 20 my $commit=0;
13886 20 my @item = ();
13887 20 my %item = ();
13888 20 my $repeating = $_[2];
13889 20 my $_noactions = $_[3];
13890 20 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 20 0 20
13891 20 my $_itempos = $_[5];
13892 20 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 20 0 20
13893 20 my $text;
13894 my $lastsep;
13895 20 my $current_match;
13896 20 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{shline_nosc});
13897 20 $expectation->at($_[1]);
13898
13899 20 my $thisoffset;
13900 20 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
13901
13902 20 my $thiscolumn;
13903 20 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
13904
13905 20 my $thisline;
13906 20 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
13907  
13908
13909  
13910 20 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 20 0 20
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0020
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
13911 {
13912
13913 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [shline_nosc shline_bracket shline_nosc]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
13914 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
13915 q{shline},
13916 $tracelevel)
13917 if defined $::RD_TRACE;
13918 20 my $thisprod = $thisrule->{"prods"}[0];
13919 20 $text = $_[1];
13920 20 my $_savetext;
13921 20 @item = (q{shline});
13922 20 %item = (__RULE__ => q{shline});
13923 20 my $repcount = 0;
13924  
13925  
13926 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [shline_nosc]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
13927 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13928 q{shline},
13929 $tracelevel)
13930 if defined $::RD_TRACE;
13931 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
13932 20 $expectation->is(q{})->at($text);
13933 20 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_nosc($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = shline_nosc($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 20 20
13934 {
13935
13936 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [shline_nosc]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13937 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13938 q{shline},
13939 $tracelevel)
13940 if defined $::RD_TRACE;
13941 0 $expectation->failed();
13942 0 last;
13943 }
13944 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [shline_nosc]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
13945 . $_tok . q{]},
13946  
13947 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13948 q{shline},
13949 $tracelevel)
13950 if defined $::RD_TRACE;
13951 20 $item{q{shline_nosc}} = $_tok;
13952 20 push @item, $_tok;
13953
13954 }
13955  
13956 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [shline_bracket]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
13957 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13958 q{shline},
13959 $tracelevel)
13960 if defined $::RD_TRACE;
13961 20 $expectation->is(q{shline_bracket})->at($text);
13962
13963 20 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_bracket, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_bracket, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 20 20
13964 {
13965 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [shline_bracket]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13966 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13967 q{shline},
13968 $tracelevel)
13969 if defined $::RD_TRACE;
13970 0 last;
13971 }
13972 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [shline_bracket]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
13973 . @$_tok . q{ times)},
13974  
13975 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13976 q{shline},
13977 $tracelevel)
13978 if defined $::RD_TRACE;
13979 20 $item{q{shline_bracket(?)}} = $_tok;
13980 20 push @item, $_tok;
13981
13982  
13983  
13984 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [shline_nosc]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
13985 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13986 q{shline},
13987 $tracelevel)
13988 if defined $::RD_TRACE;
13989 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
13990 20 $expectation->is(q{shline_nosc})->at($text);
13991 20 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_nosc($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = shline_nosc($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 20 20
13992 {
13993
13994 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [shline_nosc]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
13995 XML::XSH2::Parser::_Runtime::_tracefirst($text),
13996 q{shline},
13997 $tracelevel)
13998 if defined $::RD_TRACE;
13999 0 $expectation->failed();
14000 0 last;
14001 }
14002 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [shline_nosc]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
14003 . $_tok . q{]},
14004  
14005 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14006 q{shline},
14007 $tracelevel)
14008 if defined $::RD_TRACE;
14009 20 $item{q{shline_nosc}} = $_tok;
14010 20 push @item, $_tok;
14011
14012 }
14013  
14014 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
14015 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14016 q{shline},
14017 $tracelevel)
14018 if defined $::RD_TRACE;
14019
14020  
14021 20 ▶ $_tok = ($_noactions) ? 0 : do { join("",$item[1],@{$item[2]},$item[3]) };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 20 20
14022 20 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 20 20
14023 {
14024 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14025 if defined $::RD_TRACE;
14026 0 last;
14027 }
14028 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
14029 . $_tok . q{])},
14030 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14031 if defined $::RD_TRACE;
14032 20 push @item, $_tok;
14033 20 $item{__ACTION1__}=$_tok;
14034
14035  
14036 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [shline_nosc shline_bracket shline_nosc]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
14037 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14038 q{shline},
14039 $tracelevel)
14040 if defined $::RD_TRACE;
14041  
14042  
14043  
14044 20 $_matched = 1;
14045 20 last;
14046 }
14047  
14048  
14049 20 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 20 20
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
2000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
14050 {
14051
14052  
14053 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
14054 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14055 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14056 q{shline},
14057 $tracelevel)
14058 if defined $::RD_TRACE;
14059 0 return undef;
14060 }
14061 20 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 20 20
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
0200
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
14062 {
14063 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14064 q{shline},
14065 $tracelevel)
14066 if defined $::RD_TRACE;
14067 0 $return = $score_return;
14068 }
14069 20 splice @{$thisparser->{errors}}, $err_at;
14070 20 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 20 0 20
14071 20 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 20 20
14072 {
14073 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
14074 $return . q{])}, "",
14075 q{shline},
14076 $tracelevel);
14077 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
14078 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
14079 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14080 , q{shline},
14081 $tracelevel)
14082 }
14083 20 $_[1] = $text;
14084 20 return $return;
14085 }
14086  
14087 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
14088 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_bracket
14089 20 ▶{
Subroutine shline_bracket: called CC=48 SCAR=66.0
14090 20 my $thisparser = $_[0];
14091 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
14092 20 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
200
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
14093 20 $ERRORS = 0;
14094 20 my $thisrule = $thisparser->{"rules"}{"shline_bracket"};
14095  
14096 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [shline_bracket]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
14097 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14098 q{shline_bracket},
14099 $tracelevel)
14100 if defined $::RD_TRACE;
14101  
14102
14103 20 my $err_at = @{$thisparser->{errors}};
14104  
14105 20 my $score;
14106 my $score_return;
14107 20 my $_tok;
14108 20 my $return = undef;
14109 20 my $_matched=0;
14110 20 my $commit=0;
14111 20 my @item = ();
14112 20 my %item = ();
14113 20 my $repeating = $_[2];
14114 20 my $_noactions = $_[3];
14115 20 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 20 0 20
14116 20 my $_itempos = $_[5];
14117 20 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 20 0 20
14118 20 my $text;
14119 my $lastsep;
14120 20 my $current_match;
14121 20 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{'('});
14122 20 $expectation->at($_[1]);
14123
14124 20 my $thisoffset;
14125 20 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
14126
14127 20 my $thiscolumn;
14128 20 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
14129
14130 20 my $thisline;
14131 20 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
14132  
14133
14134  
14135 20 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 20 0 20
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0020
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
14136 {
14137
14138 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: ['(' shline_inter shline_bracket shline_inter ')']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
14139 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14140 q{shline_bracket},
14141 $tracelevel)
14142 if defined $::RD_TRACE;
14143 20 my $thisprod = $thisrule->{"prods"}[0];
14144 20 $text = $_[1];
14145 20 my $_savetext;
14146 20 @item = (q{shline_bracket});
14147 20 %item = (__RULE__ => q{shline_bracket});
14148 20 my $repcount = 0;
14149  
14150  
14151 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['(']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
14152 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14153 q{shline_bracket},
14154 $tracelevel)
14155 if defined $::RD_TRACE;
14156 20 undef $lastsep;
14157 20 $expectation->is(q{})->at($text);
14158
14159  
14160 20 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\(/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\(/) 20 0 20
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\(/
!ll&&!rl&&r
0200
($lastsep = $1) && ''
!ll
200
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\(/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\(/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\(/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
14161 {
14162 20 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 20 0 20
14163
14164 20 $expectation->failed();
14165 20 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
14166 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14167 if defined $::RD_TRACE;
14168 20 last;
14169 }
14170 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
14171 0 substr($text,0,length($current_match),q{});
14172 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14173 . $current_match . q{])},
14174 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14175 if defined $::RD_TRACE;
14176 0 push @item, $item{__STRING1__}=$current_match;
14177
14178  
14179 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [shline_inter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14180 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14181 q{shline_bracket},
14182 $tracelevel)
14183 if defined $::RD_TRACE;
14184 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
14185 0 $expectation->is(q{shline_inter})->at($text);
14186 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_inter($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = shline_inter($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
14187 {
14188
14189 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [shline_inter]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14190 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14191 q{shline_bracket},
14192 $tracelevel)
14193 if defined $::RD_TRACE;
14194 0 $expectation->failed();
14195 0 last;
14196 }
14197 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [shline_inter]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14198 . $_tok . q{]},
14199  
14200 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14201 q{shline_bracket},
14202 $tracelevel)
14203 if defined $::RD_TRACE;
14204 0 $item{q{shline_inter}} = $_tok;
14205 0 push @item, $_tok;
14206
14207 }
14208  
14209 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [shline_bracket]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14210 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14211 q{shline_bracket},
14212 $tracelevel)
14213 if defined $::RD_TRACE;
14214 0 $expectation->is(q{shline_bracket})->at($text);
14215
14216 0 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_bracket, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_bracket, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 0 0
14217 {
14218 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [shline_bracket]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14219 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14220 q{shline_bracket},
14221 $tracelevel)
14222 if defined $::RD_TRACE;
14223 0 last;
14224 }
14225 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [shline_bracket]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14226 . @$_tok . q{ times)},
14227  
14228 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14229 q{shline_bracket},
14230 $tracelevel)
14231 if defined $::RD_TRACE;
14232 0 $item{q{shline_bracket(?)}} = $_tok;
14233 0 push @item, $_tok;
14234
14235  
14236  
14237 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [shline_inter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14238 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14239 q{shline_bracket},
14240 $tracelevel)
14241 if defined $::RD_TRACE;
14242 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
14243 0 $expectation->is(q{shline_inter})->at($text);
14244 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_inter($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = shline_inter($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
14245 {
14246
14247 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [shline_inter]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14248 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14249 q{shline_bracket},
14250 $tracelevel)
14251 if defined $::RD_TRACE;
14252 0 $expectation->failed();
14253 0 last;
14254 }
14255 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [shline_inter]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14256 . $_tok . q{]},
14257  
14258 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14259 q{shline_bracket},
14260 $tracelevel)
14261 if defined $::RD_TRACE;
14262 0 $item{q{shline_inter}} = $_tok;
14263 0 push @item, $_tok;
14264
14265 }
14266  
14267 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [')']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14268 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14269 q{shline_bracket},
14270 $tracelevel)
14271 if defined $::RD_TRACE;
14272 0 undef $lastsep;
14273 0 $expectation->is(q{')'})->at($text);
14274
14275  
14276 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
14277 {
14278 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
14279
14280 0 $expectation->failed();
14281 0 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14282 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14283 if defined $::RD_TRACE;
14284 0 last;
14285 }
14286 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
14287 0 substr($text,0,length($current_match),q{});
14288 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14289 . $current_match . q{])},
14290 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14291 if defined $::RD_TRACE;
14292 0 push @item, $item{__STRING2__}=$current_match;
14293
14294  
14295 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14296 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14297 q{shline_bracket},
14298 $tracelevel)
14299 if defined $::RD_TRACE;
14300
14301  
14302 0 ▶ $_tok = ($_noactions) ? 0 : do { join("",'(',$item[2],@{$item[3]},$item[4],')') };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
14303 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
14304 {
14305 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14306 if defined $::RD_TRACE;
14307 0 last;
14308 }
14309 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14310 . $_tok . q{])},
14311 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14312 if defined $::RD_TRACE;
14313 0 push @item, $_tok;
14314 0 $item{__ACTION1__}=$_tok;
14315
14316  
14317 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: ['(' shline_inter shline_bracket shline_inter ')']<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14318 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14319 q{shline_bracket},
14320 $tracelevel)
14321 if defined $::RD_TRACE;
14322  
14323  
14324  
14325 0 $_matched = 1;
14326 0 last;
14327 }
14328  
14329  
14330 20 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 20 0 20
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
0020
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
14331 {
14332
14333  
14334 20 $_[1] = $text; # NOT SURE THIS IS NEEDED
14335 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
14336 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14337 q{shline_bracket},
14338 $tracelevel)
14339 if defined $::RD_TRACE;
14340 20 return undef;
14341 }
14342 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
14343 {
14344 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14345 q{shline_bracket},
14346 $tracelevel)
14347 if defined $::RD_TRACE;
14348 0 $return = $score_return;
14349 }
14350 0 splice @{$thisparser->{errors}}, $err_at;
14351 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
14352 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
14353 {
14354 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
14355 $return . q{])}, "",
14356 q{shline_bracket},
14357 $tracelevel);
14358 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
14359 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
14360 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14361 , q{shline_bracket},
14362 $tracelevel)
14363 }
14364 0 $_[1] = $text;
14365 0 return $return;
14366 }
14367  
14368 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
14369 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_inter
14370 0 ▶{
Subroutine shline_inter: not called CC=24 SCAR=63.3
14371 0 my $thisparser = $_[0];
14372 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
14373 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
14374 0 $ERRORS = 0;
14375 0 my $thisrule = $thisparser->{"rules"}{"shline_inter"};
14376  
14377 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [shline_inter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14378 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14379 q{shline_inter},
14380 $tracelevel)
14381 if defined $::RD_TRACE;
14382  
14383
14384 0 my $err_at = @{$thisparser->{errors}};
14385  
14386 0 my $score;
14387 my $score_return;
14388 0 my $_tok;
14389 0 my $return = undef;
14390 0 my $_matched=0;
14391 0 my $commit=0;
14392 0 my @item = ();
14393 0 my %item = ();
14394 0 my $repeating = $_[2];
14395 0 my $_noactions = $_[3];
14396 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
14397 0 my $_itempos = $_[5];
14398 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
14399 0 my $text;
14400 my $lastsep;
14401 0 my $current_match;
14402 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/([^()\\\\"']|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/});
14403 0 $expectation->at($_[1]);
14404
14405 0 my $thisoffset;
14406 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
14407
14408 0 my $thiscolumn;
14409 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
14410
14411 0 my $thisline;
14412 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
14413  
14414
14415  
14416 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
14417 {
14418
14419 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/([^()\\\\"']|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14420 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14421 q{shline_inter},
14422 $tracelevel)
14423 if defined $::RD_TRACE;
14424 0 my $thisprod = $thisrule->{"prods"}[0];
14425 0 $text = $_[1];
14426 0 my $_savetext;
14427 0 @item = (q{shline_inter});
14428 0 %item = (__RULE__ => q{shline_inter});
14429 0 my $repcount = 0;
14430  
14431  
14432 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/([^()\\\\"']|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14433 q{shline_inter},
14434 $tracelevel)
14435 if defined $::RD_TRACE;
14436 0 undef $lastsep;
14437 0 $expectation->is(q{})->at($text);
14438
14439  
14440 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:([^()\\"']|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:([^()\\"']|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:([^()\\"']|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:([^()\\"']|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:([^()\\"']|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:([^()\\"']|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
14441 {
14442 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
14443 0 $expectation->failed();
14444 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14445 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14446 if defined $::RD_TRACE;
14447  
14448 0 last;
14449 }
14450 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
14451 0 substr($text,0,length($current_match),q{});
14452 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14453 . $current_match . q{])},
14454 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14455 if defined $::RD_TRACE;
14456 0 push @item, $item{__PATTERN1__}=$current_match;
14457
14458  
14459 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/([^()\\\\"']|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14460 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14461 q{shline_inter},
14462 $tracelevel)
14463 if defined $::RD_TRACE;
14464  
14465  
14466  
14467 0 $_matched = 1;
14468 0 last;
14469 }
14470  
14471  
14472 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
14473 {
14474
14475  
14476 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
14477 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14478 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14479 q{shline_inter},
14480 $tracelevel)
14481 if defined $::RD_TRACE;
14482 0 return undef;
14483 }
14484 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
14485 {
14486 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14487 q{shline_inter},
14488 $tracelevel)
14489 if defined $::RD_TRACE;
14490 0 $return = $score_return;
14491 }
14492 0 splice @{$thisparser->{errors}}, $err_at;
14493 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
14494 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
14495 {
14496 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
14497 $return . q{])}, "",
14498 q{shline_inter},
14499 $tracelevel);
14500 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
14501 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
14502 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14503 , q{shline_inter},
14504 $tracelevel)
14505 }
14506 0 $_[1] = $text;
14507 0 return $return;
14508 }
14509  
14510 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
14511 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline_nosc
14512 40 ▶{
Subroutine shline_nosc: called CC=24 SCAR=38.1
14513 40 my $thisparser = $_[0];
14514 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
14515 40 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
400
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
14516 40 $ERRORS = 0;
14517 40 my $thisrule = $thisparser->{"rules"}{"shline_nosc"};
14518  
14519 40 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [shline_nosc]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 40 40
14520 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14521 q{shline_nosc},
14522 $tracelevel)
14523 if defined $::RD_TRACE;
14524  
14525
14526 40 my $err_at = @{$thisparser->{errors}};
14527  
14528 40 my $score;
14529 my $score_return;
14530 40 my $_tok;
14531 40 my $return = undef;
14532 40 my $_matched=0;
14533 40 my $commit=0;
14534 40 my @item = ();
14535 40 my %item = ();
14536 40 my $repeating = $_[2];
14537 40 my $_noactions = $_[3];
14538 40 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 40 0 40
14539 40 my $_itempos = $_[5];
14540 40 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 40 0 40
14541 40 my $text;
14542 my $lastsep;
14543 40 my $current_match;
14544 40 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/([^;()\\\\"'\\|]|\\|[^>]|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/});
14545 40 $expectation->at($_[1]);
14546
14547 40 my $thisoffset;
14548 40 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
14549
14550 40 my $thiscolumn;
14551 40 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
14552
14553 40 my $thisline;
14554 40 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
14555  
14556
14557  
14558 40 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 40 0 40
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
0040
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
14559 {
14560
14561 40 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/([^;()\\\\"'\\|]|\\|[^>]|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 40 40
14562 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14563 q{shline_nosc},
14564 $tracelevel)
14565 if defined $::RD_TRACE;
14566 40 my $thisprod = $thisrule->{"prods"}[0];
14567 40 $text = $_[1];
14568 40 my $_savetext;
14569 40 @item = (q{shline_nosc});
14570 40 %item = (__RULE__ => q{shline_nosc});
14571 40 my $repcount = 0;
14572  
14573  
14574 40 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/([^;()\\\\"'\\|]|\\|[^>]|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 40 40
14575 q{shline_nosc},
14576 $tracelevel)
14577 if defined $::RD_TRACE;
14578 40 undef $lastsep;
14579 40 $expectation->is(q{})->at($text);
14580
14581  
14582 40 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:([^;()\\"'\|]|\|[^>]|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:([^;()\\"'\|]|\|[^>]|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/) 0 40 40
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:([^;()\\"'\|]|\|[^>]|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/
!ll&&!rl&&r
0040
($lastsep = $1) && ''
!ll
2119
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:([^;()\\"'\|]|\|[^>]|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:([^;()\\"'\|]|\|[^>]|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:([^;()\\"'\|]|\|[^>]|\\.|\"([^\"\\]|\\.)*\"|\'([^\'\\]|\\\'|\\\\|\\[^\'\\])*\')*)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
14583 {
14584 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
14585 0 $expectation->failed();
14586 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14587 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14588 if defined $::RD_TRACE;
14589  
14590 0 last;
14591 }
14592 40 $current_match = substr($text, $-[0], $+[0] - $-[0]);
14593 40 substr($text,0,length($current_match),q{});
14594 40 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 40 40
14595 . $current_match . q{])},
14596 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14597 if defined $::RD_TRACE;
14598 40 push @item, $item{__PATTERN1__}=$current_match;
14599
14600  
14601 40 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/([^;()\\\\"'\\|]|\\|[^>]|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\'([^\\'\\\\]|\\\\\\'|\\\\\\\\|\\\\[^\\'\\\\])*\\')*/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 40 40
14602 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14603 q{shline_nosc},
14604 $tracelevel)
14605 if defined $::RD_TRACE;
14606  
14607  
14608  
14609 40 $_matched = 1;
14610 40 last;
14611 }
14612  
14613  
14614 40 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 40 40
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
4000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
14615 {
14616
14617  
14618 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
14619 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14620 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14621 q{shline_nosc},
14622 $tracelevel)
14623 if defined $::RD_TRACE;
14624 0 return undef;
14625 }
14626 40 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 40 40
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
0400
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
14627 {
14628 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14629 q{shline_nosc},
14630 $tracelevel)
14631 if defined $::RD_TRACE;
14632 0 $return = $score_return;
14633 }
14634 40 splice @{$thisparser->{errors}}, $err_at;
14635 40 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 40 0 40
14636 40 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 40 40
14637 {
14638 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
14639 $return . q{])}, "",
14640 q{shline_nosc},
14641 $tracelevel);
14642 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
14643 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
14644 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14645 , q{shline_nosc},
14646 $tracelevel)
14647 }
14648 40 $_[1] = $text;
14649 40 return $return;
14650 }
14651  
14652 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
14653 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::startrule
14654 574 ▶{
Subroutine startrule: called CC=57 SCAR=51.0
14655 574 my $thisparser = $_[0];
14656 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
14657 574 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
0574
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
14658 574 $ERRORS = 0;
14659 574 my $thisrule = $thisparser->{"rules"}{"startrule"};
14660  
14661 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [startrule]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
14662 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14663 q{startrule},
14664 $tracelevel)
14665 if defined $::RD_TRACE;
14666  
14667
14668 574 my $err_at = @{$thisparser->{errors}};
14669  
14670 574 my $score;
14671 my $score_return;
14672 574 my $_tok;
14673 574 my $return = undef;
14674 574 my $_matched=0;
14675 574 my $commit=0;
14676 574 my @item = ();
14677 574 my %item = ();
14678 574 my $repeating = $_[2];
14679 574 my $_noactions = $_[3];
14680 574 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 574 0 574
14681 574 my $_itempos = $_[5];
14682 574 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 574 0 574
14683 574 my $text;
14684 my $lastsep;
14685 574 my $current_match;
14686 574 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{shell, or complex_command});
14687 574 $expectation->at($_[1]);
14688
14689 574 my $thisoffset;
14690 574 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
14691
14692 574 my $thiscolumn;
14693 574 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
14694
14695 574 my $thisline;
14696 574 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
14697  
14698
14699  
14700 574 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 574 0 574
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00574
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
14701 {
14702
14703 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [shell <commit> eof]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
14704 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14705 q{startrule},
14706 $tracelevel)
14707 if defined $::RD_TRACE;
14708 574 my $thisprod = $thisrule->{"prods"}[0];
14709 574 $text = $_[1];
14710 574 my $_savetext;
14711 574 @item = (q{startrule});
14712 574 %item = (__RULE__ => q{startrule});
14713 574 my $repcount = 0;
14714  
14715  
14716 574 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [shell]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 574 574
14717 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14718 q{startrule},
14719 $tracelevel)
14720 if defined $::RD_TRACE;
14721 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
14722 574 $expectation->is(q{})->at($text);
14723 574 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shell($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = shell($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 573 1 574
14724 {
14725
14726 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [shell]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14727 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14728 q{startrule},
14729 $tracelevel)
14730 if defined $::RD_TRACE;
14731 573 $expectation->failed();
14732 573 last;
14733 }
14734 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [shell]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
14735 . $_tok . q{]},
14736  
14737 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14738 q{startrule},
14739 $tracelevel)
14740 if defined $::RD_TRACE;
14741 1 $item{q{shell}} = $_tok;
14742 1 push @item, $_tok;
14743
14744 }
14745  
14746
14747  
14748 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
14749 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14750 q{startrule},
14751 $tracelevel)
14752 if defined $::RD_TRACE;
14753 1 $_tok = do { $commit = 1 };
14754 1 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 1 0 1
14755 {
14756 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
14757 . $_tok . q{])},
14758 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14759 if defined $::RD_TRACE;
14760 }
14761 else
14762 {
14763 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14764 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14765 if defined $::RD_TRACE;
14766 }
14767
14768 1 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 1 1
14769 1 push @item, $item{__DIRECTIVE1__}=$_tok;
14770
14771  
14772 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [eof]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
14773 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14774 q{startrule},
14775 $tracelevel)
14776 if defined $::RD_TRACE;
14777 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
14778 1 $expectation->is(q{eof})->at($text);
14779 1 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::eof($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::eof($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 1 1
14780 {
14781
14782 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [eof]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14783 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14784 q{startrule},
14785 $tracelevel)
14786 if defined $::RD_TRACE;
14787 0 $expectation->failed();
14788 0 last;
14789 }
14790 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [eof]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
14791 . $_tok . q{]},
14792  
14793 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14794 q{startrule},
14795 $tracelevel)
14796 if defined $::RD_TRACE;
14797 1 $item{q{eof}} = $_tok;
14798 1 push @item, $_tok;
14799
14800 }
14801  
14802 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
14803 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14804 q{startrule},
14805 $tracelevel)
14806 if defined $::RD_TRACE;
14807
14808  
14809 1 ▶ $_tok = ($_noactions) ? 0 : do { $item[1] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
14810 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
14811 {
14812 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14813 if defined $::RD_TRACE;
14814 0 last;
14815 }
14816 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
14817 . $_tok . q{])},
14818 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14819 if defined $::RD_TRACE;
14820 1 push @item, $_tok;
14821 1 $item{__ACTION1__}=$_tok;
14822
14823  
14824 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [shell <commit> eof]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
14825 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14826 q{startrule},
14827 $tracelevel)
14828 if defined $::RD_TRACE;
14829  
14830  
14831  
14832 1 $_matched = 1;
14833 1 last;
14834 }
14835  
14836  
14837 574 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 573 1 574
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
10573
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
14838 {
14839
14840 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [complex_command <commit> eof]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14841 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14842 q{startrule},
14843 $tracelevel)
14844 if defined $::RD_TRACE;
14845 573 my $thisprod = $thisrule->{"prods"}[1];
14846 573 $text = $_[1];
14847 573 my $_savetext;
14848 573 @item = (q{startrule});
14849 573 %item = (__RULE__ => q{startrule});
14850 573 my $repcount = 0;
14851  
14852  
14853 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [complex_command]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14854 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14855 q{startrule},
14856 $tracelevel)
14857 if defined $::RD_TRACE;
14858 573 $expectation->is(q{})->at($text);
14859
14860 573 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::complex_command, 1, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::complex_command, 1, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 573 573
14861 {
14862 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [complex_command]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14863 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14864 q{startrule},
14865 $tracelevel)
14866 if defined $::RD_TRACE;
14867 0 last;
14868 }
14869 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [complex_command]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14870 . @$_tok . q{ times)},
14871  
14872 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14873 q{startrule},
14874 $tracelevel)
14875 if defined $::RD_TRACE;
14876 573 $item{q{complex_command(s)}} = $_tok;
14877 573 push @item, $_tok;
14878
14879  
14880  
14881
14882  
14883 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14884 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14885 q{startrule},
14886 $tracelevel)
14887 if defined $::RD_TRACE;
14888 573 $_tok = do { $commit = 1 };
14889 573 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 573 0 573
14890 {
14891 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14892 . $_tok . q{])},
14893 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14894 if defined $::RD_TRACE;
14895 }
14896 else
14897 {
14898 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14899 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14900 if defined $::RD_TRACE;
14901 }
14902
14903 573 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 573 573
14904 573 push @item, $item{__DIRECTIVE1__}=$_tok;
14905
14906  
14907 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [eof]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14908 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14909 q{startrule},
14910 $tracelevel)
14911 if defined $::RD_TRACE;
14912 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
14913 573 $expectation->is(q{eof})->at($text);
14914 573 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::eof($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::eof($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 573 573
14915 {
14916
14917 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [eof]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14918 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14919 q{startrule},
14920 $tracelevel)
14921 if defined $::RD_TRACE;
14922 0 $expectation->failed();
14923 0 last;
14924 }
14925 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [eof]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14926 . $_tok . q{]},
14927  
14928 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14929 q{startrule},
14930 $tracelevel)
14931 if defined $::RD_TRACE;
14932 573 $item{q{eof}} = $_tok;
14933 573 push @item, $_tok;
14934
14935 }
14936  
14937 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14938 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14939 q{startrule},
14940 $tracelevel)
14941 if defined $::RD_TRACE;
14942
14943  
14944 573 ▶ $_tok = ($_noactions) ? 0 : do { $item[1] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 573 573
14945 573 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 573 573
14946 {
14947 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14948 if defined $::RD_TRACE;
14949 0 last;
14950 }
14951 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14952 . $_tok . q{])},
14953 XML::XSH2::Parser::_Runtime::_tracefirst($text))
14954 if defined $::RD_TRACE;
14955 573 push @item, $_tok;
14956 573 $item{__ACTION1__}=$_tok;
14957
14958  
14959 573 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [complex_command <commit> eof]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 573 573
14960 XML::XSH2::Parser::_Runtime::_tracefirst($text),
14961 q{startrule},
14962 $tracelevel)
14963 if defined $::RD_TRACE;
14964  
14965  
14966  
14967 573 $_matched = 1;
14968 573 last;
14969 }
14970  
14971  
14972 574 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 574 574
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
57400
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
14973 {
14974
14975  
14976 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
14977 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14978 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
14979 q{startrule},
14980 $tracelevel)
14981 if defined $::RD_TRACE;
14982 0 return undef;
14983 }
14984 574 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 574 574
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
05740
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
14985 {
14986 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
14987 q{startrule},
14988 $tracelevel)
14989 if defined $::RD_TRACE;
14990 0 $return = $score_return;
14991 }
14992 574 splice @{$thisparser->{errors}}, $err_at;
14993 574 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 574 0 574
14994 574 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 574 574
14995 {
14996 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
14997 $return . q{])}, "",
14998 q{startrule},
14999 $tracelevel);
15000 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
15001 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
15002 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15003 , q{startrule},
15004 $tracelevel)
15005 }
15006 574 $_[1] = $text;
15007 574 return $return;
15008 }
15009  
15010 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
15011 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::statement
15012 264 ▶{
Subroutine statement: called CC=271 SCAR=83.7
15013 264 my $thisparser = $_[0];
15014 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
15015 264 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
2640
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
15016 264 $ERRORS = 0;
15017 264 my $thisrule = $thisparser->{"rules"}{"statement"};
15018  
15019 264 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [statement]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 264 264
15020 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
15021 q{statement},
15022 $tracelevel)
15023 if defined $::RD_TRACE;
15024  
15025
15026 264 my $err_at = @{$thisparser->{errors}};
15027  
15028 264 my $score;
15029 my $score_return;
15030 264 my $_tok;
15031 264 my $return = undef;
15032 264 my $_matched=0;
15033 264 my $commit=0;
15034 264 my @item = ();
15035 264 my %item = ();
15036 264 my $repeating = $_[2];
15037 264 my $_noactions = $_[3];
15038 264 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 264 0 264
15039 264 my $_itempos = $_[5];
15040 264 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 264 0 264
15041 264 my $text;
15042 my $lastsep;
15043 264 my $current_match;
15044 264 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?=\\s*[\}\{;])/, or /(if)\\b/, or /(unless)\\b/, or /(while)\\b/, or /(foreach|for)\\b/, or /(try)\\b/, or /(iterate)\\b/, or /(def|define)\\b/});
15045 264 $expectation->at($_[1]);
15046
15047 264 my $thisoffset;
15048 264 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
15049
15050 264 my $thiscolumn;
15051 264 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
15052
15053 264 my $thisline;
15054 264 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
15055  
15056
15057  
15058 264 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 264 0 264
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00264
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
15059 {
15060
15061 264 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?=\\s*[\}\{;])/ <commit> <reject>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 264 264
15062 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
15063 q{statement},
15064 $tracelevel)
15065 if defined $::RD_TRACE;
15066 264 my $thisprod = $thisrule->{"prods"}[0];
15067 264 $text = $_[1];
15068 264 my $_savetext;
15069 264 @item = (q{statement});
15070 264 %item = (__RULE__ => q{statement});
15071 264 my $repcount = 0;
15072  
15073  
15074 264 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?=\\s*[\}\{;])/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 264 264
15075 q{statement},
15076 $tracelevel)
15077 if defined $::RD_TRACE;
15078 264 undef $lastsep;
15079 264 $expectation->is(q{})->at($text);
15080
15081  
15082 264 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\s*[}{;]))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[}{;]))/) 264 0 264
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[}{;]))/
!ll&&!rl&&r
02640
($lastsep = $1) && ''
!ll
2640
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[}{;]))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?=\s*[}{;]))/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?=\s*[}{;]))/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
15083 {
15084 264 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 264 0 264
15085 264 $expectation->failed();
15086 264 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 264 264
15087 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15088 if defined $::RD_TRACE;
15089  
15090 264 last;
15091 }
15092 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
15093 0 substr($text,0,length($current_match),q{});
15094 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15095 . $current_match . q{])},
15096 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15097 if defined $::RD_TRACE;
15098 0 push @item, $item{__PATTERN1__}=$current_match;
15099
15100  
15101
15102  
15103 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15104 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15105 q{statement},
15106 $tracelevel)
15107 if defined $::RD_TRACE;
15108 0 $_tok = do { $commit = 1 };
15109 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
15110 {
15111 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15112 . $_tok . q{])},
15113 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15114 if defined $::RD_TRACE;
15115 }
15116 else
15117 {
15118 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15119 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15120 if defined $::RD_TRACE;
15121 }
15122
15123 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
15124 0 push @item, $item{__DIRECTIVE1__}=$_tok;
15125
15126  
15127 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Rejecting production<< (found <reject>)},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15128 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15129 q{statement},
15130 $tracelevel)
15131 if defined $::RD_TRACE;
15132 0 undef $return;
15133
15134  
15135 0 $_tok = undef;
15136
15137 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
15138  
15139 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?=\\s*[\}\{;])/ <commit> <reject>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15140 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15141 q{statement},
15142 $tracelevel)
15143 if defined $::RD_TRACE;
15144  
15145  
15146  
15147 0 $_matched = 1;
15148 0 last;
15149 }
15150  
15151  
15152 264 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 264 0 264
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00264
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
15153 {
15154
15155 264 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(if)\\b/ <commit> exp block elsif_block else_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 264 264
15156 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
15157 q{statement},
15158 $tracelevel)
15159 if defined $::RD_TRACE;
15160 264 my $thisprod = $thisrule->{"prods"}[1];
15161 264 $text = $_[1];
15162 264 my $_savetext;
15163 264 @item = (q{statement});
15164 264 %item = (__RULE__ => q{statement});
15165 264 my $repcount = 0;
15166  
15167  
15168 264 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(if)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 264 264
15169 q{statement},
15170 $tracelevel)
15171 if defined $::RD_TRACE;
15172 264 undef $lastsep;
15173 264 $expectation->is(q{})->at($text);
15174
15175  
15176 264 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(if)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(if)\b)/) 260 4 264
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(if)\b)/
!ll&&!rl&&r
02604
($lastsep = $1) && ''
!ll
2640
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(if)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(if)\b)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(if)\b)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
15177 {
15178 260 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 260 0 260
15179 260 $expectation->failed();
15180 260 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 260 260
15181 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15182 if defined $::RD_TRACE;
15183  
15184 260 last;
15185 }
15186 4 $current_match = substr($text, $-[0], $+[0] - $-[0]);
15187 4 substr($text,0,length($current_match),q{});
15188 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15189 . $current_match . q{])},
15190 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15191 if defined $::RD_TRACE;
15192 4 push @item, $item{__PATTERN1__}=$current_match;
15193
15194  
15195
15196  
15197 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15198 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15199 q{statement},
15200 $tracelevel)
15201 if defined $::RD_TRACE;
15202 4 $_tok = do { $commit = 1 };
15203 4 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 4 0 4
15204 {
15205 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15206 . $_tok . q{])},
15207 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15208 if defined $::RD_TRACE;
15209 }
15210 else
15211 {
15212 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15213 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15214 if defined $::RD_TRACE;
15215 }
15216
15217 4 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 4 4
15218 4 push @item, $item{__DIRECTIVE1__}=$_tok;
15219
15220  
15221 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15222 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15223 q{statement},
15224 $tracelevel)
15225 if defined $::RD_TRACE;
15226 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15227 4 $expectation->is(q{exp})->at($text);
15228 4 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 4 4
15229 {
15230
15231 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15232 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15233 q{statement},
15234 $tracelevel)
15235 if defined $::RD_TRACE;
15236 0 $expectation->failed();
15237 0 last;
15238 }
15239 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15240 . $_tok . q{]},
15241  
15242 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15243 q{statement},
15244 $tracelevel)
15245 if defined $::RD_TRACE;
15246 4 $item{q{exp}} = $_tok;
15247 4 push @item, $_tok;
15248
15249 }
15250  
15251 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15252 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15253 q{statement},
15254 $tracelevel)
15255 if defined $::RD_TRACE;
15256 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15257 4 $expectation->is(q{block})->at($text);
15258 4 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 4 4
15259 {
15260
15261 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15262 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15263 q{statement},
15264 $tracelevel)
15265 if defined $::RD_TRACE;
15266 0 $expectation->failed();
15267 0 last;
15268 }
15269 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15270 . $_tok . q{]},
15271  
15272 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15273 q{statement},
15274 $tracelevel)
15275 if defined $::RD_TRACE;
15276 4 $item{q{block}} = $_tok;
15277 4 push @item, $_tok;
15278
15279 }
15280  
15281 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [elsif_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15282 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15283 q{statement},
15284 $tracelevel)
15285 if defined $::RD_TRACE;
15286 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15287 4 $expectation->is(q{elsif_block})->at($text);
15288 4 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::elsif_block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = elsif_block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 4 4
15289 {
15290
15291 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [elsif_block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15292 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15293 q{statement},
15294 $tracelevel)
15295 if defined $::RD_TRACE;
15296 0 $expectation->failed();
15297 0 last;
15298 }
15299 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [elsif_block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15300 . $_tok . q{]},
15301  
15302 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15303 q{statement},
15304 $tracelevel)
15305 if defined $::RD_TRACE;
15306 4 $item{q{elsif_block}} = $_tok;
15307 4 push @item, $_tok;
15308
15309 }
15310  
15311 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [else_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15312 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15313 q{statement},
15314 $tracelevel)
15315 if defined $::RD_TRACE;
15316 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15317 4 $expectation->is(q{else_block})->at($text);
15318 4 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::else_block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = else_block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 4 4
15319 {
15320
15321 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [else_block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15322 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15323 q{statement},
15324 $tracelevel)
15325 if defined $::RD_TRACE;
15326 0 $expectation->failed();
15327 0 last;
15328 }
15329 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [else_block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15330 . $_tok . q{]},
15331  
15332 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15333 q{statement},
15334 $tracelevel)
15335 if defined $::RD_TRACE;
15336 4 $item{q{else_block}} = $_tok;
15337 4 push @item, $_tok;
15338
15339 }
15340  
15341 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15342 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15343 q{statement},
15344 $tracelevel)
15345 if defined $::RD_TRACE;
15346
15347  
15348 4 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'if_statement',[$item[3],$item[4]],@{$item[5]},@{$item[6]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 4 4
15349 4 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 4 4
15350 {
15351 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15352 if defined $::RD_TRACE;
15353 0 last;
15354 }
15355 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15356 . $_tok . q{])},
15357 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15358 if defined $::RD_TRACE;
15359 4 push @item, $_tok;
15360 4 $item{__ACTION1__}=$_tok;
15361
15362  
15363 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(if)\\b/ <commit> exp block elsif_block else_block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15364 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15365 q{statement},
15366 $tracelevel)
15367 if defined $::RD_TRACE;
15368  
15369  
15370  
15371 4 $_matched = 1;
15372 4 last;
15373 }
15374  
15375  
15376 264 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 260 4 264
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
40260
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
15377 {
15378
15379 260 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(unless)\\b/ <commit> exp block else_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 260 260
15380 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
15381 q{statement},
15382 $tracelevel)
15383 if defined $::RD_TRACE;
15384 260 my $thisprod = $thisrule->{"prods"}[2];
15385 260 $text = $_[1];
15386 260 my $_savetext;
15387 260 @item = (q{statement});
15388 260 %item = (__RULE__ => q{statement});
15389 260 my $repcount = 0;
15390  
15391  
15392 260 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(unless)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 260 260
15393 q{statement},
15394 $tracelevel)
15395 if defined $::RD_TRACE;
15396 260 undef $lastsep;
15397 260 $expectation->is(q{})->at($text);
15398
15399  
15400 260 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(unless)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(unless)\b)/) 37 223 260
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(unless)\b)/
!ll&&!rl&&r
037223
($lastsep = $1) && ''
!ll
2600
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(unless)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(unless)\b)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(unless)\b)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
15401 {
15402 37 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 37 0 37
15403 37 $expectation->failed();
15404 37 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 37 37
15405 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15406 if defined $::RD_TRACE;
15407  
15408 37 last;
15409 }
15410 223 $current_match = substr($text, $-[0], $+[0] - $-[0]);
15411 223 substr($text,0,length($current_match),q{});
15412 223 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 223 223
15413 . $current_match . q{])},
15414 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15415 if defined $::RD_TRACE;
15416 223 push @item, $item{__PATTERN1__}=$current_match;
15417
15418  
15419
15420  
15421 223 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 223 223
15422 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15423 q{statement},
15424 $tracelevel)
15425 if defined $::RD_TRACE;
15426 223 $_tok = do { $commit = 1 };
15427 223 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 223 0 223
15428 {
15429 223 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 223 223
15430 . $_tok . q{])},
15431 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15432 if defined $::RD_TRACE;
15433 }
15434 else
15435 {
15436 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15437 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15438 if defined $::RD_TRACE;
15439 }
15440
15441 223 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 223 223
15442 223 push @item, $item{__DIRECTIVE1__}=$_tok;
15443
15444  
15445 223 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 223 223
15446 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15447 q{statement},
15448 $tracelevel)
15449 if defined $::RD_TRACE;
15450 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15451 223 $expectation->is(q{exp})->at($text);
15452 223 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 223 223
15453 {
15454
15455 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15456 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15457 q{statement},
15458 $tracelevel)
15459 if defined $::RD_TRACE;
15460 0 $expectation->failed();
15461 0 last;
15462 }
15463 223 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 223 223
15464 . $_tok . q{]},
15465  
15466 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15467 q{statement},
15468 $tracelevel)
15469 if defined $::RD_TRACE;
15470 223 $item{q{exp}} = $_tok;
15471 223 push @item, $_tok;
15472
15473 }
15474  
15475 223 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 223 223
15476 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15477 q{statement},
15478 $tracelevel)
15479 if defined $::RD_TRACE;
15480 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15481 223 $expectation->is(q{block})->at($text);
15482 223 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 219 4 223
15483 {
15484
15485 219 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 219 219
15486 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15487 q{statement},
15488 $tracelevel)
15489 if defined $::RD_TRACE;
15490 219 $expectation->failed();
15491 219 last;
15492 }
15493 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15494 . $_tok . q{]},
15495  
15496 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15497 q{statement},
15498 $tracelevel)
15499 if defined $::RD_TRACE;
15500 4 $item{q{block}} = $_tok;
15501 4 push @item, $_tok;
15502
15503 }
15504  
15505 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [else_block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15506 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15507 q{statement},
15508 $tracelevel)
15509 if defined $::RD_TRACE;
15510 4 $expectation->is(q{else_block})->at($text);
15511
15512 4 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::else_block, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::else_block, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 4 4
15513 {
15514 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [else_block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15515 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15516 q{statement},
15517 $tracelevel)
15518 if defined $::RD_TRACE;
15519 0 last;
15520 }
15521 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [else_block]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15522 . @$_tok . q{ times)},
15523  
15524 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15525 q{statement},
15526 $tracelevel)
15527 if defined $::RD_TRACE;
15528 4 $item{q{else_block(?)}} = $_tok;
15529 4 push @item, $_tok;
15530
15531  
15532  
15533 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15534 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15535 q{statement},
15536 $tracelevel)
15537 if defined $::RD_TRACE;
15538
15539  
15540 4 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'unless_statement',$item[3],$item[4],@{$item[5]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 4 4
15541 4 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 4 4
15542 {
15543 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15544 if defined $::RD_TRACE;
15545 0 last;
15546 }
15547 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15548 . $_tok . q{])},
15549 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15550 if defined $::RD_TRACE;
15551 4 push @item, $_tok;
15552 4 $item{__ACTION1__}=$_tok;
15553
15554  
15555 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(unless)\\b/ <commit> exp block else_block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
15556 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15557 q{statement},
15558 $tracelevel)
15559 if defined $::RD_TRACE;
15560  
15561  
15562  
15563 4 $_matched = 1;
15564 4 last;
15565 }
15566  
15567  
15568 264 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 37 227 264
Condition100%3/3
$_matched or $commit
l!l&&r!l&&!r
821937
MC/DC100%2/2
$_matched or $commit
$_matched $commit
Truth table100%3/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
15569 {
15570
15571 37 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(while)\\b/ <commit> exp block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 37 37
15572 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
15573 q{statement},
15574 $tracelevel)
15575 if defined $::RD_TRACE;
15576 37 my $thisprod = $thisrule->{"prods"}[3];
15577 37 $text = $_[1];
15578 37 my $_savetext;
15579 37 @item = (q{statement});
15580 37 %item = (__RULE__ => q{statement});
15581 37 my $repcount = 0;
15582  
15583  
15584 37 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(while)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 37 37
15585 q{statement},
15586 $tracelevel)
15587 if defined $::RD_TRACE;
15588 37 undef $lastsep;
15589 37 $expectation->is(q{})->at($text);
15590
15591  
15592 37 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(while)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(while)\b)/) 30 7 37
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(while)\b)/
!ll&&!rl&&r
0307
($lastsep = $1) && ''
!ll
370
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(while)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(while)\b)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(while)\b)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
15593 {
15594 30 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 30 0 30
15595 30 $expectation->failed();
15596 30 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 30 30
15597 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15598 if defined $::RD_TRACE;
15599  
15600 30 last;
15601 }
15602 7 $current_match = substr($text, $-[0], $+[0] - $-[0]);
15603 7 substr($text,0,length($current_match),q{});
15604 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
15605 . $current_match . q{])},
15606 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15607 if defined $::RD_TRACE;
15608 7 push @item, $item{__PATTERN1__}=$current_match;
15609
15610  
15611
15612  
15613 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
15614 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15615 q{statement},
15616 $tracelevel)
15617 if defined $::RD_TRACE;
15618 7 $_tok = do { $commit = 1 };
15619 7 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 7 0 7
15620 {
15621 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
15622 . $_tok . q{])},
15623 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15624 if defined $::RD_TRACE;
15625 }
15626 else
15627 {
15628 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15629 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15630 if defined $::RD_TRACE;
15631 }
15632
15633 7 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 7 7
15634 7 push @item, $item{__DIRECTIVE1__}=$_tok;
15635
15636  
15637 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
15638 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15639 q{statement},
15640 $tracelevel)
15641 if defined $::RD_TRACE;
15642 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15643 7 $expectation->is(q{exp})->at($text);
15644 7 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 7 7
15645 {
15646
15647 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15648 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15649 q{statement},
15650 $tracelevel)
15651 if defined $::RD_TRACE;
15652 0 $expectation->failed();
15653 0 last;
15654 }
15655 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
15656 . $_tok . q{]},
15657  
15658 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15659 q{statement},
15660 $tracelevel)
15661 if defined $::RD_TRACE;
15662 7 $item{q{exp}} = $_tok;
15663 7 push @item, $_tok;
15664
15665 }
15666  
15667 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
15668 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15669 q{statement},
15670 $tracelevel)
15671 if defined $::RD_TRACE;
15672 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15673 7 $expectation->is(q{block})->at($text);
15674 7 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 7 7
15675 {
15676
15677 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15678 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15679 q{statement},
15680 $tracelevel)
15681 if defined $::RD_TRACE;
15682 0 $expectation->failed();
15683 0 last;
15684 }
15685 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
15686 . $_tok . q{]},
15687  
15688 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15689 q{statement},
15690 $tracelevel)
15691 if defined $::RD_TRACE;
15692 7 $item{q{block}} = $_tok;
15693 7 push @item, $_tok;
15694
15695 }
15696  
15697 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
15698 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15699 q{statement},
15700 $tracelevel)
15701 if defined $::RD_TRACE;
15702
15703  
15704 7 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'while_statement',$item[3],$item[4]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 7 7
15705 7 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 7 7
15706 {
15707 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15708 if defined $::RD_TRACE;
15709 0 last;
15710 }
15711 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
15712 . $_tok . q{])},
15713 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15714 if defined $::RD_TRACE;
15715 7 push @item, $_tok;
15716 7 $item{__ACTION1__}=$_tok;
15717
15718  
15719 7 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(while)\\b/ <commit> exp block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 7 7
15720 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15721 q{statement},
15722 $tracelevel)
15723 if defined $::RD_TRACE;
15724  
15725  
15726  
15727 7 $_matched = 1;
15728 7 last;
15729 }
15730  
15731  
15732 264 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 30 234 264
Condition100%3/3
$_matched or $commit
l!l&&r!l&&!r
1521930
MC/DC100%2/2
$_matched or $commit
$_matched $commit
Truth table100%3/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
15733 {
15734
15735 30 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(foreach|for)\\b/ <commit> local_var_in exp block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 30 30
15736 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
15737 q{statement},
15738 $tracelevel)
15739 if defined $::RD_TRACE;
15740 30 my $thisprod = $thisrule->{"prods"}[4];
15741 30 $text = $_[1];
15742 30 my $_savetext;
15743 30 @item = (q{statement});
15744 30 %item = (__RULE__ => q{statement});
15745 30 my $repcount = 0;
15746  
15747  
15748 30 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(foreach|for)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 30 30
15749 q{statement},
15750 $tracelevel)
15751 if defined $::RD_TRACE;
15752 30 undef $lastsep;
15753 30 $expectation->is(q{})->at($text);
15754
15755  
15756 30 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(foreach|for)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(foreach|for)\b)/) 16 14 30
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(foreach|for)\b)/
!ll&&!rl&&r
01614
($lastsep = $1) && ''
!ll
300
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(foreach|for)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(foreach|for)\b)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(foreach|for)\b)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
15757 {
15758 16 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 16 0 16
15759 16 $expectation->failed();
15760 16 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 16 16
15761 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15762 if defined $::RD_TRACE;
15763  
15764 16 last;
15765 }
15766 14 $current_match = substr($text, $-[0], $+[0] - $-[0]);
15767 14 substr($text,0,length($current_match),q{});
15768 14 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 14 14
15769 . $current_match . q{])},
15770 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15771 if defined $::RD_TRACE;
15772 14 push @item, $item{__PATTERN1__}=$current_match;
15773
15774  
15775
15776  
15777 14 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 14 14
15778 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15779 q{statement},
15780 $tracelevel)
15781 if defined $::RD_TRACE;
15782 14 $_tok = do { $commit = 1 };
15783 14 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 14 0 14
15784 {
15785 14 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 14 14
15786 . $_tok . q{])},
15787 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15788 if defined $::RD_TRACE;
15789 }
15790 else
15791 {
15792 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15793 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15794 if defined $::RD_TRACE;
15795 }
15796
15797 14 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 14 14
15798 14 push @item, $item{__DIRECTIVE1__}=$_tok;
15799
15800  
15801 14 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [local_var_in]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 14 14
15802 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15803 q{statement},
15804 $tracelevel)
15805 if defined $::RD_TRACE;
15806 14 $expectation->is(q{local_var_in})->at($text);
15807
15808 14 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::local_var_in, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::local_var_in, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 14 14
15809 {
15810 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [local_var_in]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15811 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15812 q{statement},
15813 $tracelevel)
15814 if defined $::RD_TRACE;
15815 0 last;
15816 }
15817 14 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [local_var_in]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 14 14
15818 . @$_tok . q{ times)},
15819  
15820 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15821 q{statement},
15822 $tracelevel)
15823 if defined $::RD_TRACE;
15824 14 $item{q{local_var_in(?)}} = $_tok;
15825 14 push @item, $_tok;
15826
15827  
15828  
15829 14 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [exp]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 14 14
15830 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15831 q{statement},
15832 $tracelevel)
15833 if defined $::RD_TRACE;
15834 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15835 14 $expectation->is(q{exp})->at($text);
15836 14 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::exp($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 14 14
15837 {
15838
15839 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [exp]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15840 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15841 q{statement},
15842 $tracelevel)
15843 if defined $::RD_TRACE;
15844 0 $expectation->failed();
15845 0 last;
15846 }
15847 14 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [exp]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 14 14
15848 . $_tok . q{]},
15849  
15850 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15851 q{statement},
15852 $tracelevel)
15853 if defined $::RD_TRACE;
15854 14 $item{q{exp}} = $_tok;
15855 14 push @item, $_tok;
15856
15857 }
15858  
15859 14 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 14 14
15860 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15861 q{statement},
15862 $tracelevel)
15863 if defined $::RD_TRACE;
15864 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15865 14 $expectation->is(q{block})->at($text);
15866 14 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 3 11 14
15867 {
15868
15869 3 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3 3
15870 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15871 q{statement},
15872 $tracelevel)
15873 if defined $::RD_TRACE;
15874 3 $expectation->failed();
15875 3 last;
15876 }
15877 11 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 11 11
15878 . $_tok . q{]},
15879  
15880 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15881 q{statement},
15882 $tracelevel)
15883 if defined $::RD_TRACE;
15884 11 $item{q{block}} = $_tok;
15885 11 push @item, $_tok;
15886
15887 }
15888  
15889 11 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 11 11
15890 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15891 q{statement},
15892 $tracelevel)
15893 if defined $::RD_TRACE;
15894
15895  
15896 11 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'foreach_statement',@item[4,5],@{$item[3]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 11 11
15897 11 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 11 11
15898 {
15899 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15900 if defined $::RD_TRACE;
15901 0 last;
15902 }
15903 11 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 11 11
15904 . $_tok . q{])},
15905 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15906 if defined $::RD_TRACE;
15907 11 push @item, $_tok;
15908 11 $item{__ACTION1__}=$_tok;
15909
15910  
15911 11 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(foreach|for)\\b/ <commit> local_var_in exp block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 11 11
15912 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15913 q{statement},
15914 $tracelevel)
15915 if defined $::RD_TRACE;
15916  
15917  
15918  
15919 11 $_matched = 1;
15920 11 last;
15921 }
15922  
15923  
15924 264 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 16 248 264
Condition100%3/3
$_matched or $commit
l!l&&r!l&&!r
2622216
MC/DC100%2/2
$_matched or $commit
$_matched $commit
Truth table100%3/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
15925 {
15926
15927 16 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(try)\\b/ <commit> block 'catch' local_var block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 16 16
15928 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
15929 q{statement},
15930 $tracelevel)
15931 if defined $::RD_TRACE;
15932 16 my $thisprod = $thisrule->{"prods"}[5];
15933 16 $text = $_[1];
15934 16 my $_savetext;
15935 16 @item = (q{statement});
15936 16 %item = (__RULE__ => q{statement});
15937 16 my $repcount = 0;
15938  
15939  
15940 16 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(try)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 16 16
15941 q{statement},
15942 $tracelevel)
15943 if defined $::RD_TRACE;
15944 16 undef $lastsep;
15945 16 $expectation->is(q{})->at($text);
15946
15947  
15948 16 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(try)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(try)\b)/) 10 6 16
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(try)\b)/
!ll&&!rl&&r
0106
($lastsep = $1) && ''
!ll
160
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(try)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(try)\b)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(try)\b)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
15949 {
15950 10 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 10 0 10
15951 10 $expectation->failed();
15952 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
15953 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15954 if defined $::RD_TRACE;
15955  
15956 10 last;
15957 }
15958 6 $current_match = substr($text, $-[0], $+[0] - $-[0]);
15959 6 substr($text,0,length($current_match),q{});
15960 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
15961 . $current_match . q{])},
15962 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15963 if defined $::RD_TRACE;
15964 6 push @item, $item{__PATTERN1__}=$current_match;
15965
15966  
15967
15968  
15969 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
15970 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15971 q{statement},
15972 $tracelevel)
15973 if defined $::RD_TRACE;
15974 6 $_tok = do { $commit = 1 };
15975 6 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 6 0 6
15976 {
15977 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
15978 . $_tok . q{])},
15979 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15980 if defined $::RD_TRACE;
15981 }
15982 else
15983 {
15984 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
15985 XML::XSH2::Parser::_Runtime::_tracefirst($text))
15986 if defined $::RD_TRACE;
15987 }
15988
15989 6 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 6 6
15990 6 push @item, $item{__DIRECTIVE1__}=$_tok;
15991
15992  
15993 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
15994 XML::XSH2::Parser::_Runtime::_tracefirst($text),
15995 q{statement},
15996 $tracelevel)
15997 if defined $::RD_TRACE;
15998 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
15999 6 $expectation->is(q{block})->at($text);
16000 6 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 6 6
16001 {
16002
16003 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16004 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16005 q{statement},
16006 $tracelevel)
16007 if defined $::RD_TRACE;
16008 0 $expectation->failed();
16009 0 last;
16010 }
16011 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
16012 . $_tok . q{]},
16013  
16014 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16015 q{statement},
16016 $tracelevel)
16017 if defined $::RD_TRACE;
16018 6 $item{q{block}} = $_tok;
16019 6 push @item, $_tok;
16020
16021 }
16022  
16023 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['catch']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
16024 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16025 q{statement},
16026 $tracelevel)
16027 if defined $::RD_TRACE;
16028 6 undef $lastsep;
16029 6 $expectation->is(q{'catch'})->at($text);
16030
16031  
16032 6 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\Acatch/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\Acatch/) 0 6 6
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\Acatch/
!ll&&!rl&&r
006
($lastsep = $1) && ''
!ll
06
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\Acatch/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\Acatch/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\Acatch/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
16033 {
16034 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
16035
16036 0 $expectation->failed();
16037 0 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16038 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16039 if defined $::RD_TRACE;
16040 0 last;
16041 }
16042 6 $current_match = substr($text, $-[0], $+[0] - $-[0]);
16043 6 substr($text,0,length($current_match),q{});
16044 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
16045 . $current_match . q{])},
16046 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16047 if defined $::RD_TRACE;
16048 6 push @item, $item{__STRING1__}=$current_match;
16049
16050  
16051 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [local_var]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
16052 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16053 q{statement},
16054 $tracelevel)
16055 if defined $::RD_TRACE;
16056 6 $expectation->is(q{local_var})->at($text);
16057
16058 6 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::local_var, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::local_var, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 6 6
16059 {
16060 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [local_var]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16061 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16062 q{statement},
16063 $tracelevel)
16064 if defined $::RD_TRACE;
16065 0 last;
16066 }
16067 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [local_var]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
16068 . @$_tok . q{ times)},
16069  
16070 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16071 q{statement},
16072 $tracelevel)
16073 if defined $::RD_TRACE;
16074 6 $item{q{local_var(?)}} = $_tok;
16075 6 push @item, $_tok;
16076
16077  
16078  
16079 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
16080 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16081 q{statement},
16082 $tracelevel)
16083 if defined $::RD_TRACE;
16084 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
16085 6 $expectation->is(q{block})->at($text);
16086 6 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 6 6
16087 {
16088
16089 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16090 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16091 q{statement},
16092 $tracelevel)
16093 if defined $::RD_TRACE;
16094 0 $expectation->failed();
16095 0 last;
16096 }
16097 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
16098 . $_tok . q{]},
16099  
16100 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16101 q{statement},
16102 $tracelevel)
16103 if defined $::RD_TRACE;
16104 6 $item{q{block}} = $_tok;
16105 6 push @item, $_tok;
16106
16107 }
16108  
16109 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
16110 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16111 q{statement},
16112 $tracelevel)
16113 if defined $::RD_TRACE;
16114
16115  
16116 6 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'try_catch',$item[3],$item[6],@{$item[5]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 6 6
16117 6 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 6 6
16118 {
16119 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16120 if defined $::RD_TRACE;
16121 0 last;
16122 }
16123 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
16124 . $_tok . q{])},
16125 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16126 if defined $::RD_TRACE;
16127 6 push @item, $_tok;
16128 6 $item{__ACTION1__}=$_tok;
16129
16130  
16131 6 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(try)\\b/ <commit> block 'catch' local_var block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 6 6
16132 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16133 q{statement},
16134 $tracelevel)
16135 if defined $::RD_TRACE;
16136  
16137  
16138  
16139 6 $_matched = 1;
16140 6 last;
16141 }
16142  
16143  
16144 264 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 10 254 264
Condition100%3/3
$_matched or $commit
l!l&&r!l&&!r
3222210
MC/DC100%2/2
$_matched or $commit
$_matched $commit
Truth table100%3/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
16145 {
16146
16147 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(iterate)\\b/ <commit> xpstep block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16148 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
16149 q{statement},
16150 $tracelevel)
16151 if defined $::RD_TRACE;
16152 10 my $thisprod = $thisrule->{"prods"}[6];
16153 10 $text = $_[1];
16154 10 my $_savetext;
16155 10 @item = (q{statement});
16156 10 %item = (__RULE__ => q{statement});
16157 10 my $repcount = 0;
16158  
16159  
16160 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(iterate)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16161 q{statement},
16162 $tracelevel)
16163 if defined $::RD_TRACE;
16164 10 undef $lastsep;
16165 10 $expectation->is(q{})->at($text);
16166
16167  
16168 10 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(iterate)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(iterate)\b)/) 10 0 10
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(iterate)\b)/
!ll&&!rl&&r
0100
($lastsep = $1) && ''
!ll
100
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(iterate)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(iterate)\b)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(iterate)\b)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
16169 {
16170 10 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 10 0 10
16171 10 $expectation->failed();
16172 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16173 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16174 if defined $::RD_TRACE;
16175  
16176 10 last;
16177 }
16178 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
16179 0 substr($text,0,length($current_match),q{});
16180 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16181 . $current_match . q{])},
16182 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16183 if defined $::RD_TRACE;
16184 0 push @item, $item{__PATTERN1__}=$current_match;
16185
16186  
16187
16188  
16189 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16190 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16191 q{statement},
16192 $tracelevel)
16193 if defined $::RD_TRACE;
16194 0 $_tok = do { $commit = 1 };
16195 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
16196 {
16197 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16198 . $_tok . q{])},
16199 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16200 if defined $::RD_TRACE;
16201 }
16202 else
16203 {
16204 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16205 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16206 if defined $::RD_TRACE;
16207 }
16208
16209 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
16210 0 push @item, $item{__DIRECTIVE1__}=$_tok;
16211
16212  
16213 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpstep]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16214 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16215 q{statement},
16216 $tracelevel)
16217 if defined $::RD_TRACE;
16218 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
16219 0 $expectation->is(q{xpstep})->at($text);
16220 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpstep($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpstep($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
16221 {
16222
16223 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpstep]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16224 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16225 q{statement},
16226 $tracelevel)
16227 if defined $::RD_TRACE;
16228 0 $expectation->failed();
16229 0 last;
16230 }
16231 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpstep]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16232 . $_tok . q{]},
16233  
16234 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16235 q{statement},
16236 $tracelevel)
16237 if defined $::RD_TRACE;
16238 0 $item{q{xpstep}} = $_tok;
16239 0 push @item, $_tok;
16240
16241 }
16242  
16243 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16244 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16245 q{statement},
16246 $tracelevel)
16247 if defined $::RD_TRACE;
16248 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
16249 0 $expectation->is(q{block})->at($text);
16250 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
16251 {
16252
16253 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16254 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16255 q{statement},
16256 $tracelevel)
16257 if defined $::RD_TRACE;
16258 0 $expectation->failed();
16259 0 last;
16260 }
16261 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16262 . $_tok . q{]},
16263  
16264 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16265 q{statement},
16266 $tracelevel)
16267 if defined $::RD_TRACE;
16268 0 $item{q{block}} = $_tok;
16269 0 push @item, $_tok;
16270
16271 }
16272  
16273 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16274 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16275 q{statement},
16276 $tracelevel)
16277 if defined $::RD_TRACE;
16278
16279  
16280 0 ▶ $_tok = ($_noactions) ? 0 : do { [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'iterate',$item[4],@{$item[3]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
16281 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
16282 {
16283 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16284 if defined $::RD_TRACE;
16285 0 last;
16286 }
16287 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16288 . $_tok . q{])},
16289 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16290 if defined $::RD_TRACE;
16291 0 push @item, $_tok;
16292 0 $item{__ACTION1__}=$_tok;
16293
16294  
16295 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(iterate)\\b/ <commit> xpstep block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16296 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16297 q{statement},
16298 $tracelevel)
16299 if defined $::RD_TRACE;
16300  
16301  
16302  
16303 0 $_matched = 1;
16304 0 last;
16305 }
16306  
16307  
16308 264 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 10 254 264
Condition100%3/3
$_matched or $commit
l!l&&r!l&&!r
3222210
MC/DC100%2/2
$_matched or $commit
$_matched $commit
Truth table100%3/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
16309 {
16310
16311 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(def|define)\\b/ <commit> ID variable block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16312 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
16313 q{statement},
16314 $tracelevel)
16315 if defined $::RD_TRACE;
16316 10 my $thisprod = $thisrule->{"prods"}[7];
16317 10 $text = $_[1];
16318 10 my $_savetext;
16319 10 @item = (q{statement});
16320 10 %item = (__RULE__ => q{statement});
16321 10 my $repcount = 0;
16322  
16323  
16324 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(def|define)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16325 q{statement},
16326 $tracelevel)
16327 if defined $::RD_TRACE;
16328 10 undef $lastsep;
16329 10 $expectation->is(q{})->at($text);
16330
16331  
16332 10 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(def|define)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(def|define)\b)/) 0 10 10
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(def|define)\b)/
!ll&&!rl&&r
0010
($lastsep = $1) && ''
!ll
100
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(def|define)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(def|define)\b)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(def|define)\b)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
16333 {
16334 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
16335 0 $expectation->failed();
16336 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16337 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16338 if defined $::RD_TRACE;
16339  
16340 0 last;
16341 }
16342 10 $current_match = substr($text, $-[0], $+[0] - $-[0]);
16343 10 substr($text,0,length($current_match),q{});
16344 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16345 . $current_match . q{])},
16346 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16347 if defined $::RD_TRACE;
16348 10 push @item, $item{__PATTERN1__}=$current_match;
16349
16350  
16351
16352  
16353 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16354 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16355 q{statement},
16356 $tracelevel)
16357 if defined $::RD_TRACE;
16358 10 $_tok = do { $commit = 1 };
16359 10 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 10 0 10
16360 {
16361 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16362 . $_tok . q{])},
16363 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16364 if defined $::RD_TRACE;
16365 }
16366 else
16367 {
16368 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16369 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16370 if defined $::RD_TRACE;
16371 }
16372
16373 10 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 10 10
16374 10 push @item, $item{__DIRECTIVE1__}=$_tok;
16375
16376  
16377 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [ID]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16378 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16379 q{statement},
16380 $tracelevel)
16381 if defined $::RD_TRACE;
16382 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
16383 10 $expectation->is(q{ID})->at($text);
16384 10 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::ID($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = ID($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 10 10
16385 {
16386
16387 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [ID]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16388 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16389 q{statement},
16390 $tracelevel)
16391 if defined $::RD_TRACE;
16392 0 $expectation->failed();
16393 0 last;
16394 }
16395 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [ID]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16396 . $_tok . q{]},
16397  
16398 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16399 q{statement},
16400 $tracelevel)
16401 if defined $::RD_TRACE;
16402 10 $item{q{ID}} = $_tok;
16403 10 push @item, $_tok;
16404
16405 }
16406  
16407 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16408 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16409 q{statement},
16410 $tracelevel)
16411 if defined $::RD_TRACE;
16412
16413  
16414 10 ▶ $_tok = ($_noactions) ? 0 : do { XML::XSH2::Functions::is_command($item[3])?undef:1 };
Branch: 2 branches
BranchTrueFalseTotal
$_noactions ? : 0 10 10
XML::XSH2::Functions::is_command($item[3]) ? : 0 10 10
16415 10 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 10 10
16416 {
16417 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16418 if defined $::RD_TRACE;
16419 0 last;
16420 }
16421 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16422 . $_tok . q{])},
16423 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16424 if defined $::RD_TRACE;
16425 10 push @item, $_tok;
16426 10 $item{__ACTION1__}=$_tok;
16427
16428  
16429 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16430 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16431 q{statement},
16432 $tracelevel)
16433 if defined $::RD_TRACE;
16434 10 $expectation->is(q{variable})->at($text);
16435
16436 10 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::variable, 0, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::variable, 0, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 10 10
16437 {
16438 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [variable]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16439 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16440 q{statement},
16441 $tracelevel)
16442 if defined $::RD_TRACE;
16443 0 last;
16444 }
16445 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [variable]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16446 . @$_tok . q{ times)},
16447  
16448 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16449 q{statement},
16450 $tracelevel)
16451 if defined $::RD_TRACE;
16452 10 $item{q{variable(s?)}} = $_tok;
16453 10 push @item, $_tok;
16454
16455  
16456  
16457 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16458 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16459 q{statement},
16460 $tracelevel)
16461 if defined $::RD_TRACE;
16462 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
16463 10 $expectation->is(q{block})->at($text);
16464 10 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 10 10
16465 {
16466
16467 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16468 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16469 q{statement},
16470 $tracelevel)
16471 if defined $::RD_TRACE;
16472 0 $expectation->failed();
16473 0 last;
16474 }
16475 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16476 . $_tok . q{]},
16477  
16478 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16479 q{statement},
16480 $tracelevel)
16481 if defined $::RD_TRACE;
16482 10 $item{q{block}} = $_tok;
16483 10 push @item, $_tok;
16484
16485 }
16486  
16487 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16488 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16489 q{statement},
16490 $tracelevel)
16491 if defined $::RD_TRACE;
16492
16493  
16494 10 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 10 10
16495 10 [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'def',$item[3],$item[6],$item[5]]
16496 };
16497 10 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 10 10
16498 {
16499 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16500 if defined $::RD_TRACE;
16501 0 last;
16502 }
16503 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16504 . $_tok . q{])},
16505 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16506 if defined $::RD_TRACE;
16507 10 push @item, $_tok;
16508 10 $item{__ACTION2__}=$_tok;
16509
16510  
16511 10 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(def|define)\\b/ <commit> ID variable block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 10 10
16512 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16513 q{statement},
16514 $tracelevel)
16515 if defined $::RD_TRACE;
16516  
16517  
16518  
16519 10 $_matched = 1;
16520 10 last;
16521 }
16522  
16523  
16524 264 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 222 42 264
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
420222
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
16525 {
16526
16527  
16528 222 $_[1] = $text; # NOT SURE THIS IS NEEDED
16529 222 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 222 222
16530 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
16531 q{statement},
16532 $tracelevel)
16533 if defined $::RD_TRACE;
16534 222 return undef;
16535 }
16536 42 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 42 42
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
0420
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
16537 {
16538 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16539 q{statement},
16540 $tracelevel)
16541 if defined $::RD_TRACE;
16542 0 $return = $score_return;
16543 }
16544 42 splice @{$thisparser->{errors}}, $err_at;
16545 42 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 42 0 42
16546 42 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 42 42
16547 {
16548 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
16549 $return . q{])}, "",
16550 q{statement},
16551 $tracelevel);
16552 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
16553 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
16554 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16555 , q{statement},
16556 $tracelevel)
16557 }
16558 42 $_[1] = $text;
16559 42 return $return;
16560 }
16561  
16562 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
16563 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::stream_select
16564 4 ▶{
Subroutine stream_select: called CC=37 SCAR=42.0
16565 4 my $thisparser = $_[0];
16566 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
16567 4 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
40
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
16568 4 $ERRORS = 0;
16569 4 my $thisrule = $thisparser->{"rules"}{"stream_select"};
16570  
16571 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [stream_select]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
16572 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
16573 q{stream_select},
16574 $tracelevel)
16575 if defined $::RD_TRACE;
16576  
16577
16578 4 my $err_at = @{$thisparser->{errors}};
16579  
16580 4 my $score;
16581 my $score_return;
16582 4 my $_tok;
16583 4 my $return = undef;
16584 4 my $_matched=0;
16585 4 my $commit=0;
16586 4 my @item = ();
16587 4 my %item = ();
16588 4 my $repeating = $_[2];
16589 4 my $_noactions = $_[3];
16590 4 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 4 0 4
16591 4 my $_itempos = $_[5];
16592 4 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 4 0 4
16593 4 my $text;
16594 my $lastsep;
16595 4 my $current_match;
16596 4 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/select\\s/});
16597 4 $expectation->at($_[1]);
16598
16599 4 my $thisoffset;
16600 4 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
16601
16602 4 my $thiscolumn;
16603 4 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
16604
16605 4 my $thisline;
16606 4 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
16607  
16608
16609  
16610 4 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 4 0 4
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
004
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
16611 {
16612
16613 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/select\\s/ xpath block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
16614 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
16615 q{stream_select},
16616 $tracelevel)
16617 if defined $::RD_TRACE;
16618 4 my $thisprod = $thisrule->{"prods"}[0];
16619 4 $text = $_[1];
16620 4 my $_savetext;
16621 4 @item = (q{stream_select});
16622 4 %item = (__RULE__ => q{stream_select});
16623 4 my $repcount = 0;
16624  
16625  
16626 4 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/select\\s/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
16627 q{stream_select},
16628 $tracelevel)
16629 if defined $::RD_TRACE;
16630 4 undef $lastsep;
16631 4 $expectation->is(q{})->at($text);
16632
16633  
16634 4 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:select\s)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:select\s)/) 2 2 4
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:select\s)/
!ll&&!rl&&r
022
($lastsep = $1) && ''
!ll
04
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:select\s)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:select\s)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:select\s)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
16635 {
16636 2 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 2 0 2
16637 2 $expectation->failed();
16638 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
16639 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16640 if defined $::RD_TRACE;
16641  
16642 2 last;
16643 }
16644 2 $current_match = substr($text, $-[0], $+[0] - $-[0]);
16645 2 substr($text,0,length($current_match),q{});
16646 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
16647 . $current_match . q{])},
16648 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16649 if defined $::RD_TRACE;
16650 2 push @item, $item{__PATTERN1__}=$current_match;
16651
16652  
16653 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpath]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
16654 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16655 q{stream_select},
16656 $tracelevel)
16657 if defined $::RD_TRACE;
16658 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
16659 2 $expectation->is(q{xpath})->at($text);
16660 2 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpath($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpath($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 2 2
16661 {
16662
16663 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpath]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16664 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16665 q{stream_select},
16666 $tracelevel)
16667 if defined $::RD_TRACE;
16668 0 $expectation->failed();
16669 0 last;
16670 }
16671 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpath]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
16672 . $_tok . q{]},
16673  
16674 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16675 q{stream_select},
16676 $tracelevel)
16677 if defined $::RD_TRACE;
16678 2 $item{q{xpath}} = $_tok;
16679 2 push @item, $_tok;
16680
16681 }
16682  
16683 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [block]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
16684 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16685 q{stream_select},
16686 $tracelevel)
16687 if defined $::RD_TRACE;
16688 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
16689 2 $expectation->is(q{block})->at($text);
16690 2 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::block($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = block($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 2 2
16691 {
16692
16693 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [block]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16694 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16695 q{stream_select},
16696 $tracelevel)
16697 if defined $::RD_TRACE;
16698 0 $expectation->failed();
16699 0 last;
16700 }
16701 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [block]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
16702 . $_tok . q{]},
16703  
16704 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16705 q{stream_select},
16706 $tracelevel)
16707 if defined $::RD_TRACE;
16708 2 $item{q{block}} = $_tok;
16709 2 push @item, $_tok;
16710
16711 }
16712  
16713 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
16714 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16715 q{stream_select},
16716 $tracelevel)
16717 if defined $::RD_TRACE;
16718
16719  
16720 2 ▶ $_tok = ($_noactions) ? 0 : do { [$item[2],$item[3]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 2 2
16721 2 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 2 2
16722 {
16723 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16724 if defined $::RD_TRACE;
16725 0 last;
16726 }
16727 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
16728 . $_tok . q{])},
16729 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16730 if defined $::RD_TRACE;
16731 2 push @item, $_tok;
16732 2 $item{__ACTION1__}=$_tok;
16733
16734  
16735 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/select\\s/ xpath block]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
16736 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16737 q{stream_select},
16738 $tracelevel)
16739 if defined $::RD_TRACE;
16740  
16741  
16742  
16743 2 $_matched = 1;
16744 2 last;
16745 }
16746  
16747  
16748 4 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 2 2 4
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
202
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
16749 {
16750
16751  
16752 2 $_[1] = $text; # NOT SURE THIS IS NEEDED
16753 2 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2 2
16754 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
16755 q{stream_select},
16756 $tracelevel)
16757 if defined $::RD_TRACE;
16758 2 return undef;
16759 }
16760 2 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 2 2
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
020
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
16761 {
16762 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16763 q{stream_select},
16764 $tracelevel)
16765 if defined $::RD_TRACE;
16766 0 $return = $score_return;
16767 }
16768 2 splice @{$thisparser->{errors}}, $err_at;
16769 2 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 2 0 2
16770 2 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 2 2
16771 {
16772 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
16773 $return . q{])}, "",
16774 q{stream_select},
16775 $tracelevel);
16776 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
16777 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
16778 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16779 , q{stream_select},
16780 $tracelevel)
16781 }
16782 2 $_[1] = $text;
16783 2 return $return;
16784 }
16785  
16786 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
16787 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::trail
16788 908 ▶{
Subroutine trail: called CC=81 SCAR=54.4
16789 908 my $thisparser = $_[0];
16790 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
16791 908 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
9080
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
16792 908 $ERRORS = 0;
16793 908 my $thisrule = $thisparser->{"rules"}{"trail"};
16794  
16795 908 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [trail]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 908 908
16796 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
16797 q{trail},
16798 $tracelevel)
16799 if defined $::RD_TRACE;
16800  
16801
16802 908 my $err_at = @{$thisparser->{errors}};
16803  
16804 908 my $score;
16805 my $score_return;
16806 908 my $_tok;
16807 908 my $return = undef;
16808 908 my $_matched=0;
16809 908 my $commit=0;
16810 908 my @item = ();
16811 908 my %item = ();
16812 908 my $repeating = $_[2];
16813 908 my $_noactions = $_[3];
16814 908 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 908 0 908
16815 908 my $_itempos = $_[5];
16816 908 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 908 0 908
16817 908 my $text;
16818 my $lastsep;
16819 908 my $current_match;
16820 908 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?=\\s*[\};]|\\s*\\Z)/, or '|>', or '|'});
16821 908 $expectation->at($_[1]);
16822
16823 908 my $thisoffset;
16824 908 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
16825
16826 908 my $thiscolumn;
16827 908 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
16828
16829 908 my $thisline;
16830 908 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
16831  
16832
16833  
16834 908 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 908 0 908
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00908
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
16835 {
16836
16837 908 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?=\\s*[\};]|\\s*\\Z)/ <commit> <reject>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 908 908
16838 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
16839 q{trail},
16840 $tracelevel)
16841 if defined $::RD_TRACE;
16842 908 my $thisprod = $thisrule->{"prods"}[0];
16843 908 $text = $_[1];
16844 908 my $_savetext;
16845 908 @item = (q{trail});
16846 908 %item = (__RULE__ => q{trail});
16847 908 my $repcount = 0;
16848  
16849  
16850 908 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?=\\s*[\};]|\\s*\\Z)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 908 908
16851 q{trail},
16852 $tracelevel)
16853 if defined $::RD_TRACE;
16854 908 undef $lastsep;
16855 908 $expectation->is(q{})->at($text);
16856
16857  
16858 908 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\s*[};]|\s*\Z))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[};]|\s*\Z))/) 25 883 908
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[};]|\s*\Z))/
!ll&&!rl&&r
025883
($lastsep = $1) && ''
!ll
733175
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\s*[};]|\s*\Z))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?=\s*[};]|\s*\Z))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?=\s*[};]|\s*\Z))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
16859 {
16860 25 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 25 0 25
16861 25 $expectation->failed();
16862 25 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 25 25
16863 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16864 if defined $::RD_TRACE;
16865  
16866 25 last;
16867 }
16868 883 $current_match = substr($text, $-[0], $+[0] - $-[0]);
16869 883 substr($text,0,length($current_match),q{});
16870 883 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 883 883
16871 . $current_match . q{])},
16872 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16873 if defined $::RD_TRACE;
16874 883 push @item, $item{__PATTERN1__}=$current_match;
16875
16876  
16877
16878  
16879 883 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 883 883
16880 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16881 q{trail},
16882 $tracelevel)
16883 if defined $::RD_TRACE;
16884 883 $_tok = do { $commit = 1 };
16885 883 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 883 0 883
16886 {
16887 883 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 883 883
16888 . $_tok . q{])},
16889 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16890 if defined $::RD_TRACE;
16891 }
16892 else
16893 {
16894 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16895 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16896 if defined $::RD_TRACE;
16897 }
16898
16899 883 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 883 883
16900 883 push @item, $item{__DIRECTIVE1__}=$_tok;
16901
16902  
16903 883 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Rejecting production<< (found <reject>)},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 883 883
16904 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16905 q{trail},
16906 $tracelevel)
16907 if defined $::RD_TRACE;
16908 883 undef $return;
16909
16910  
16911 883 $_tok = undef;
16912
16913 883 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 883 0 883
16914  
16915 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?=\\s*[\};]|\\s*\\Z)/ <commit> <reject>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16916 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16917 q{trail},
16918 $tracelevel)
16919 if defined $::RD_TRACE;
16920  
16921  
16922  
16923 0 $_matched = 1;
16924 0 last;
16925 }
16926  
16927  
16928 908 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 25 883 908
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
088325
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
16929 {
16930
16931 25 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: ['|>' <commit> variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 25 25
16932 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
16933 q{trail},
16934 $tracelevel)
16935 if defined $::RD_TRACE;
16936 25 my $thisprod = $thisrule->{"prods"}[1];
16937 25 $text = $_[1];
16938 25 my $_savetext;
16939 25 @item = (q{trail});
16940 25 %item = (__RULE__ => q{trail});
16941 25 my $repcount = 0;
16942  
16943  
16944 25 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['|>']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 25 25
16945 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16946 q{trail},
16947 $tracelevel)
16948 if defined $::RD_TRACE;
16949 25 undef $lastsep;
16950 25 $expectation->is(q{})->at($text);
16951
16952  
16953 25 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\|\>/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\|\>/) 24 1 25
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\|\>/
!ll&&!rl&&r
0241
($lastsep = $1) && ''
!ll
025
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\|\>/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\|\>/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\|\>/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
16954 {
16955 24 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 24 0 24
16956
16957 24 $expectation->failed();
16958 24 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 24 24
16959 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16960 if defined $::RD_TRACE;
16961 24 last;
16962 }
16963 1 $current_match = substr($text, $-[0], $+[0] - $-[0]);
16964 1 substr($text,0,length($current_match),q{});
16965 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
16966 . $current_match . q{])},
16967 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16968 if defined $::RD_TRACE;
16969 1 push @item, $item{__STRING1__}=$current_match;
16970
16971  
16972
16973  
16974 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
16975 XML::XSH2::Parser::_Runtime::_tracefirst($text),
16976 q{trail},
16977 $tracelevel)
16978 if defined $::RD_TRACE;
16979 1 $_tok = do { $commit = 1 };
16980 1 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 1 0 1
16981 {
16982 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
16983 . $_tok . q{])},
16984 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16985 if defined $::RD_TRACE;
16986 }
16987 else
16988 {
16989 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
16990 XML::XSH2::Parser::_Runtime::_tracefirst($text))
16991 if defined $::RD_TRACE;
16992 }
16993
16994 1 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 1 1
16995 1 push @item, $item{__DIRECTIVE1__}=$_tok;
16996
16997  
16998 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
16999 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17000 q{trail},
17001 $tracelevel)
17002 if defined $::RD_TRACE;
17003 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
17004 1 $expectation->is(q{variable})->at($text);
17005 1 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::variable($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = variable($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 1 1
17006 {
17007
17008 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [variable]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17009 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17010 q{trail},
17011 $tracelevel)
17012 if defined $::RD_TRACE;
17013 0 $expectation->failed();
17014 0 last;
17015 }
17016 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [variable]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
17017 . $_tok . q{]},
17018  
17019 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17020 q{trail},
17021 $tracelevel)
17022 if defined $::RD_TRACE;
17023 1 $item{q{variable}} = $_tok;
17024 1 push @item, $_tok;
17025
17026 }
17027  
17028 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
17029 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17030 q{trail},
17031 $tracelevel)
17032 if defined $::RD_TRACE;
17033
17034  
17035 1 ▶ $_tok = ($_noactions) ? 0 : do { ['var',$item[3]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1 1
17036 1 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1 1
17037 {
17038 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17039 if defined $::RD_TRACE;
17040 0 last;
17041 }
17042 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
17043 . $_tok . q{])},
17044 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17045 if defined $::RD_TRACE;
17046 1 push @item, $_tok;
17047 1 $item{__ACTION1__}=$_tok;
17048
17049  
17050 1 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: ['|>' <commit> variable]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1 1
17051 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17052 q{trail},
17053 $tracelevel)
17054 if defined $::RD_TRACE;
17055  
17056  
17057  
17058 1 $_matched = 1;
17059 1 last;
17060 }
17061  
17062  
17063 908 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 24 884 908
Condition100%3/3
$_matched or $commit
l!l&&r!l&&!r
188324
MC/DC100%2/2
$_matched or $commit
$_matched $commit
Truth table100%3/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
17064 {
17065
17066 24 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: ['|' <commit> shline]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 24 24
17067 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17068 q{trail},
17069 $tracelevel)
17070 if defined $::RD_TRACE;
17071 24 my $thisprod = $thisrule->{"prods"}[2];
17072 24 $text = $_[1];
17073 24 my $_savetext;
17074 24 @item = (q{trail});
17075 24 %item = (__RULE__ => q{trail});
17076 24 my $repcount = 0;
17077  
17078  
17079 24 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['|']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 24 24
17080 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17081 q{trail},
17082 $tracelevel)
17083 if defined $::RD_TRACE;
17084 24 undef $lastsep;
17085 24 $expectation->is(q{})->at($text);
17086
17087  
17088 24 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\|/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\|/) 4 20 24
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\|/
!ll&&!rl&&r
0420
($lastsep = $1) && ''
!ll
024
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\|/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\|/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\|/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
17089 {
17090 4 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 4 0 4
17091
17092 4 $expectation->failed();
17093 4 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 4 4
17094 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17095 if defined $::RD_TRACE;
17096 4 last;
17097 }
17098 20 $current_match = substr($text, $-[0], $+[0] - $-[0]);
17099 20 substr($text,0,length($current_match),q{});
17100 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
17101 . $current_match . q{])},
17102 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17103 if defined $::RD_TRACE;
17104 20 push @item, $item{__STRING1__}=$current_match;
17105
17106  
17107
17108  
17109 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
17110 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17111 q{trail},
17112 $tracelevel)
17113 if defined $::RD_TRACE;
17114 20 $_tok = do { $commit = 1 };
17115 20 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 20 0 20
17116 {
17117 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
17118 . $_tok . q{])},
17119 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17120 if defined $::RD_TRACE;
17121 }
17122 else
17123 {
17124 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17125 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17126 if defined $::RD_TRACE;
17127 }
17128
17129 20 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 20 20
17130 20 push @item, $item{__DIRECTIVE1__}=$_tok;
17131
17132  
17133 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [shline]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
17134 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17135 q{trail},
17136 $tracelevel)
17137 if defined $::RD_TRACE;
17138 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
17139 20 $expectation->is(q{shline})->at($text);
17140 20 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::shline($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = shline($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 20 20
17141 {
17142
17143 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [shline]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17144 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17145 q{trail},
17146 $tracelevel)
17147 if defined $::RD_TRACE;
17148 0 $expectation->failed();
17149 0 last;
17150 }
17151 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [shline]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
17152 . $_tok . q{]},
17153  
17154 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17155 q{trail},
17156 $tracelevel)
17157 if defined $::RD_TRACE;
17158 20 $item{q{shline}} = $_tok;
17159 20 push @item, $_tok;
17160
17161 }
17162  
17163 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
17164 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17165 q{trail},
17166 $tracelevel)
17167 if defined $::RD_TRACE;
17168
17169  
17170 20 ▶ $_tok = ($_noactions) ? 0 : do { ['pipe',$item[3]] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 20 20
17171 20 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 20 20
17172 {
17173 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17174 if defined $::RD_TRACE;
17175 0 last;
17176 }
17177 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
17178 . $_tok . q{])},
17179 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17180 if defined $::RD_TRACE;
17181 20 push @item, $_tok;
17182 20 $item{__ACTION1__}=$_tok;
17183
17184  
17185 20 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: ['|' <commit> shline]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 20 20
17186 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17187 q{trail},
17188 $tracelevel)
17189 if defined $::RD_TRACE;
17190  
17191  
17192  
17193 20 $_matched = 1;
17194 20 last;
17195 }
17196  
17197  
17198 908 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 887 21 908
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
210887
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
17199 {
17200
17201  
17202 887 $_[1] = $text; # NOT SURE THIS IS NEEDED
17203 887 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 887 887
17204 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17205 q{trail},
17206 $tracelevel)
17207 if defined $::RD_TRACE;
17208 887 return undef;
17209 }
17210 21 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 21 21
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
0210
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
17211 {
17212 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17213 q{trail},
17214 $tracelevel)
17215 if defined $::RD_TRACE;
17216 0 $return = $score_return;
17217 }
17218 21 splice @{$thisparser->{errors}}, $err_at;
17219 21 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 21 0 21
17220 21 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 21 21
17221 {
17222 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
17223 $return . q{])}, "",
17224 q{trail},
17225 $tracelevel);
17226 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
17227 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
17228 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17229 , q{trail},
17230 $tracelevel)
17231 }
17232 21 $_[1] = $text;
17233 21 return $return;
17234 }
17235  
17236 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
17237 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::undef
17238 0 ▶{
Subroutine undef: not called CC=41 SCAR=74.0
17239 0 my $thisparser = $_[0];
17240 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
17241 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
17242 0 $ERRORS = 0;
17243 0 my $thisrule = $thisparser->{"rules"}{"undef"};
17244  
17245 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [undef]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17246 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17247 q{undef},
17248 $tracelevel)
17249 if defined $::RD_TRACE;
17250  
17251
17252 0 my $err_at = @{$thisparser->{errors}};
17253  
17254 0 my $score;
17255 my $score_return;
17256 0 my $_tok;
17257 0 my $return = undef;
17258 0 my $_matched=0;
17259 0 my $commit=0;
17260 0 my @item = ();
17261 0 my %item = ();
17262 0 my $repeating = $_[2];
17263 0 my $_noactions = $_[3];
17264 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
17265 0 my $_itempos = $_[5];
17266 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
17267 0 my $text;
17268 my $lastsep;
17269 0 my $current_match;
17270 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(undef|undefine)\\b/});
17271 0 $expectation->at($_[1]);
17272
17273 0 my $thisoffset;
17274 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
17275
17276 0 my $thiscolumn;
17277 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
17278
17279 0 my $thisline;
17280 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
17281  
17282
17283  
17284 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
17285 {
17286
17287 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(undef|undefine)\\b/ <commit> /\\$?[a-zA-Z_][a-zA-Z0-9_]*/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17288 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17289 q{undef},
17290 $tracelevel)
17291 if defined $::RD_TRACE;
17292 0 my $thisprod = $thisrule->{"prods"}[0];
17293 0 $text = $_[1];
17294 0 my $_savetext;
17295 0 @item = (q{undef});
17296 0 %item = (__RULE__ => q{undef});
17297 0 my $repcount = 0;
17298  
17299  
17300 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(undef|undefine)\\b/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17301 q{undef},
17302 $tracelevel)
17303 if defined $::RD_TRACE;
17304 0 undef $lastsep;
17305 0 $expectation->is(q{})->at($text);
17306
17307  
17308 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(undef|undefine)\b)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(undef|undefine)\b)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(undef|undefine)\b)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(undef|undefine)\b)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(undef|undefine)\b)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(undef|undefine)\b)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
17309 {
17310 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
17311 0 $expectation->failed();
17312 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17313 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17314 if defined $::RD_TRACE;
17315  
17316 0 last;
17317 }
17318 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
17319 0 substr($text,0,length($current_match),q{});
17320 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17321 . $current_match . q{])},
17322 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17323 if defined $::RD_TRACE;
17324 0 push @item, $item{__PATTERN1__}=$current_match;
17325
17326  
17327
17328  
17329 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17330 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17331 q{undef},
17332 $tracelevel)
17333 if defined $::RD_TRACE;
17334 0 $_tok = do { $commit = 1 };
17335 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
17336 {
17337 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17338 . $_tok . q{])},
17339 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17340 if defined $::RD_TRACE;
17341 }
17342 else
17343 {
17344 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17345 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17346 if defined $::RD_TRACE;
17347 }
17348
17349 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
17350 0 push @item, $item{__DIRECTIVE1__}=$_tok;
17351
17352  
17353 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/\\$?[a-zA-Z_][a-zA-Z0-9_]*/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17354 q{undef},
17355 $tracelevel)
17356 if defined $::RD_TRACE;
17357 0 undef $lastsep;
17358 0 $expectation->is(q{/\\$?[a-zA-Z_][a-zA-Z0-9_]*/})->at($text);
17359
17360  
17361 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:\$?[a-zA-Z_][a-zA-Z0-9_]*)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
17362 {
17363 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
17364 0 $expectation->failed();
17365 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17366 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17367 if defined $::RD_TRACE;
17368  
17369 0 last;
17370 }
17371 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
17372 0 substr($text,0,length($current_match),q{});
17373 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17374 . $current_match . q{])},
17375 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17376 if defined $::RD_TRACE;
17377 0 push @item, $item{__PATTERN2__}=$current_match;
17378
17379  
17380 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17381 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17382 q{undef},
17383 $tracelevel)
17384 if defined $::RD_TRACE;
17385
17386  
17387 0 ▶ $_tok = ($_noactions) ? 0 : do {
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
17388 0 [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,'undefine',$item[3]];
17389 };
17390 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
17391 {
17392 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17393 if defined $::RD_TRACE;
17394 0 last;
17395 }
17396 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17397 . $_tok . q{])},
17398 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17399 if defined $::RD_TRACE;
17400 0 push @item, $_tok;
17401 0 $item{__ACTION1__}=$_tok;
17402
17403  
17404 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(undef|undefine)\\b/ <commit> /\\$?[a-zA-Z_][a-zA-Z0-9_]*/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17405 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17406 q{undef},
17407 $tracelevel)
17408 if defined $::RD_TRACE;
17409  
17410  
17411  
17412 0 $_matched = 1;
17413 0 last;
17414 }
17415  
17416  
17417 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
17418 {
17419
17420  
17421 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
17422 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17423 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17424 q{undef},
17425 $tracelevel)
17426 if defined $::RD_TRACE;
17427 0 return undef;
17428 }
17429 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
17430 {
17431 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17432 q{undef},
17433 $tracelevel)
17434 if defined $::RD_TRACE;
17435 0 $return = $score_return;
17436 }
17437 0 splice @{$thisparser->{errors}}, $err_at;
17438 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
17439 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
17440 {
17441 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
17442 $return . q{])}, "",
17443 q{undef},
17444 $tracelevel);
17445 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
17446 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
17447 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17448 , q{undef},
17449 $tracelevel)
17450 }
17451 0 $_[1] = $text;
17452 0 return $return;
17453 }
17454  
17455 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
17456 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::variable
17457 288 ▶{
Subroutine variable: called CC=24 SCAR=34.0
17458 288 my $thisparser = $_[0];
17459 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
17460 288 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
2880
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
17461 288 $ERRORS = 0;
17462 288 my $thisrule = $thisparser->{"rules"}{"variable"};
17463  
17464 288 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [variable]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 288 288
17465 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17466 q{variable},
17467 $tracelevel)
17468 if defined $::RD_TRACE;
17469  
17470
17471 288 my $err_at = @{$thisparser->{errors}};
17472  
17473 288 my $score;
17474 my $score_return;
17475 288 my $_tok;
17476 288 my $return = undef;
17477 288 my $_matched=0;
17478 288 my $commit=0;
17479 288 my @item = ();
17480 288 my %item = ();
17481 288 my $repeating = $_[2];
17482 288 my $_noactions = $_[3];
17483 288 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 288 0 288
17484 288 my $_itempos = $_[5];
17485 288 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 288 0 288
17486 288 my $text;
17487 my $lastsep;
17488 288 my $current_match;
17489 288 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/\\$[a-zA-Z_][a-zA-Z0-9_]*/});
17490 288 $expectation->at($_[1]);
17491
17492 288 my $thisoffset;
17493 288 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
17494
17495 288 my $thiscolumn;
17496 288 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
17497
17498 288 my $thisline;
17499 288 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
17500  
17501
17502  
17503 288 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 288 0 288
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00288
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
17504 {
17505
17506 288 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/\\$[a-zA-Z_][a-zA-Z0-9_]*/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 288 288
17507 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17508 q{variable},
17509 $tracelevel)
17510 if defined $::RD_TRACE;
17511 288 my $thisprod = $thisrule->{"prods"}[0];
17512 288 $text = $_[1];
17513 288 my $_savetext;
17514 288 @item = (q{variable});
17515 288 %item = (__RULE__ => q{variable});
17516 288 my $repcount = 0;
17517  
17518  
17519 288 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/\\$[a-zA-Z_][a-zA-Z0-9_]*/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 288 288
17520 q{variable},
17521 $tracelevel)
17522 if defined $::RD_TRACE;
17523 288 undef $lastsep;
17524 288 $expectation->is(q{})->at($text);
17525
17526  
17527 288 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:\$[a-zA-Z_][a-zA-Z0-9_]*)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\$[a-zA-Z_][a-zA-Z0-9_]*)/) 26 262 288
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\$[a-zA-Z_][a-zA-Z0-9_]*)/
!ll&&!rl&&r
026262
($lastsep = $1) && ''
!ll
24543
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:\$[a-zA-Z_][a-zA-Z0-9_]*)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:\$[a-zA-Z_][a-zA-Z0-9_]*)/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:\$[a-zA-Z_][a-zA-Z0-9_]*)/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
17528 {
17529 26 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 26 0 26
17530 26 $expectation->failed();
17531 26 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 26 26
17532 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17533 if defined $::RD_TRACE;
17534  
17535 26 last;
17536 }
17537 262 $current_match = substr($text, $-[0], $+[0] - $-[0]);
17538 262 substr($text,0,length($current_match),q{});
17539 262 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 262 262
17540 . $current_match . q{])},
17541 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17542 if defined $::RD_TRACE;
17543 262 push @item, $item{__PATTERN1__}=$current_match;
17544
17545  
17546 262 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/\\$[a-zA-Z_][a-zA-Z0-9_]*/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 262 262
17547 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17548 q{variable},
17549 $tracelevel)
17550 if defined $::RD_TRACE;
17551  
17552  
17553  
17554 262 $_matched = 1;
17555 262 last;
17556 }
17557  
17558  
17559 288 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 26 262 288
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
262026
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
17560 {
17561
17562  
17563 26 $_[1] = $text; # NOT SURE THIS IS NEEDED
17564 26 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 26 26
17565 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17566 q{variable},
17567 $tracelevel)
17568 if defined $::RD_TRACE;
17569 26 return undef;
17570 }
17571 262 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 262 262
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
02620
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
17572 {
17573 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17574 q{variable},
17575 $tracelevel)
17576 if defined $::RD_TRACE;
17577 0 $return = $score_return;
17578 }
17579 262 splice @{$thisparser->{errors}}, $err_at;
17580 262 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 262 0 262
17581 262 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 262 262
17582 {
17583 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
17584 $return . q{])}, "",
17585 q{variable},
17586 $tracelevel);
17587 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
17588 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
17589 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17590 , q{variable},
17591 $tracelevel)
17592 }
17593 262 $_[1] = $text;
17594 262 return $return;
17595 }
17596  
17597 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
17598 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpath
17599 2266 ▶{
Subroutine xpath: called CC=70 SCAR=52.5
17600 2266 my $thisparser = $_[0];
17601 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
17602 2266 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
22660
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
17603 2266 $ERRORS = 0;
17604 2266 my $thisrule = $thisparser->{"rules"}{"xpath"};
17605  
17606 2266 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpath]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2266 2266
17607 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17608 q{xpath},
17609 $tracelevel)
17610 if defined $::RD_TRACE;
17611  
17612
17613 2266 my $err_at = @{$thisparser->{errors}};
17614  
17615 2266 my $score;
17616 my $score_return;
17617 2266 my $_tok;
17618 2266 my $return = undef;
17619 2266 my $_matched=0;
17620 2266 my $commit=0;
17621 2266 my @item = ();
17622 2266 my %item = ();
17623 2266 my $repeating = $_[2];
17624 2266 my $_noactions = $_[3];
17625 2266 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 2266 0 2266
17626 2266 my $_itempos = $_[5];
17627 2266 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 2266 0 2266
17628 2266 my $text;
17629 my $lastsep;
17630 2266 my $current_match;
17631 2266 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?=['"])/, or xpsimple});
17632 2266 $expectation->at($_[1]);
17633
17634 2266 my $thisoffset;
17635 2266 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
17636
17637 2266 my $thiscolumn;
17638 2266 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
17639
17640 2266 my $thisline;
17641 2266 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
17642  
17643
17644  
17645 2266 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 2266 0 2266
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
002266
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
17646 {
17647
17648 2266 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?=['"])/ <commit> xpstring]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2266 2266
17649 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17650 q{xpath},
17651 $tracelevel)
17652 if defined $::RD_TRACE;
17653 2266 my $thisprod = $thisrule->{"prods"}[0];
17654 2266 $text = $_[1];
17655 2266 my $_savetext;
17656 2266 @item = (q{xpath});
17657 2266 %item = (__RULE__ => q{xpath});
17658 2266 my $repcount = 0;
17659  
17660  
17661 2266 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?=['"])/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2266 2266
17662 q{xpath},
17663 $tracelevel)
17664 if defined $::RD_TRACE;
17665 2266 undef $lastsep;
17666 2266 $expectation->is(q{})->at($text);
17667
17668  
17669 2266 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=['"]))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=['"]))/) 1763 503 2266
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=['"]))/
!ll&&!rl&&r
01763503
($lastsep = $1) && ''
!ll
9341332
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=['"]))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?=['"]))/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?=['"]))/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
17670 {
17671 1763 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 1763 0 1763
17672 1763 $expectation->failed();
17673 1763 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1763 1763
17674 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17675 if defined $::RD_TRACE;
17676  
17677 1763 last;
17678 }
17679 503 $current_match = substr($text, $-[0], $+[0] - $-[0]);
17680 503 substr($text,0,length($current_match),q{});
17681 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
17682 . $current_match . q{])},
17683 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17684 if defined $::RD_TRACE;
17685 503 push @item, $item{__PATTERN1__}=$current_match;
17686
17687  
17688
17689  
17690 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<commit>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
17691 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17692 q{xpath},
17693 $tracelevel)
17694 if defined $::RD_TRACE;
17695 503 $_tok = do { $commit = 1 };
17696 503 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 503 0 503
17697 {
17698 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
17699 . $_tok . q{])},
17700 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17701 if defined $::RD_TRACE;
17702 }
17703 else
17704 {
17705 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17706 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17707 if defined $::RD_TRACE;
17708 }
17709
17710 503 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 503 503
17711 503 push @item, $item{__DIRECTIVE1__}=$_tok;
17712
17713  
17714 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpstring]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
17715 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17716 q{xpath},
17717 $tracelevel)
17718 if defined $::RD_TRACE;
17719 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
17720 503 $expectation->is(q{xpstring})->at($text);
17721 503 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpstring($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpstring($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 503 503
17722 {
17723
17724 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpstring]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17725 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17726 q{xpath},
17727 $tracelevel)
17728 if defined $::RD_TRACE;
17729 0 $expectation->failed();
17730 0 last;
17731 }
17732 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpstring]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
17733 . $_tok . q{]},
17734  
17735 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17736 q{xpath},
17737 $tracelevel)
17738 if defined $::RD_TRACE;
17739 503 $item{q{xpstring}} = $_tok;
17740 503 push @item, $_tok;
17741
17742 }
17743  
17744 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
17745 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17746 q{xpath},
17747 $tracelevel)
17748 if defined $::RD_TRACE;
17749
17750  
17751 503 ▶ $_tok = ($_noactions) ? 0 : do { $item[3] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 503 503
17752 503 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 503 503
17753 {
17754 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17755 if defined $::RD_TRACE;
17756 0 last;
17757 }
17758 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
17759 . $_tok . q{])},
17760 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17761 if defined $::RD_TRACE;
17762 503 push @item, $_tok;
17763 503 $item{__ACTION1__}=$_tok;
17764
17765  
17766 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?=['"])/ <commit> xpstring]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
17767 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17768 q{xpath},
17769 $tracelevel)
17770 if defined $::RD_TRACE;
17771  
17772  
17773  
17774 503 $_matched = 1;
17775 503 last;
17776 }
17777  
17778  
17779 2266 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1763 503 2266
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
50301763
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
17780 {
17781 1763 ▶ local $skip = defined($skip) ? $skip : $XML::XSH2::Parser::_Runtime::skip;
Branch: 1 branch
BranchTrueFalseTotal
defined $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip ? : 1763 0 1763
17782 1763 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpsimple <skip:""> xpcont]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1763 1763
17783 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17784 q{xpath},
17785 $tracelevel)
17786 if defined $::RD_TRACE;
17787 1763 my $thisprod = $thisrule->{"prods"}[1];
17788 1763 $text = $_[1];
17789 1763 my $_savetext;
17790 1763 @item = (q{xpath});
17791 1763 %item = (__RULE__ => q{xpath});
17792 1763 my $repcount = 0;
17793  
17794  
17795 1763 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpsimple]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1763 1763
17796 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17797 q{xpath},
17798 $tracelevel)
17799 if defined $::RD_TRACE;
17800 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
17801 1763 $expectation->is(q{})->at($text);
17802 1763 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpsimple($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpsimple($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 832 931 1763
17803 {
17804
17805 832 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpsimple]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 832 832
17806 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17807 q{xpath},
17808 $tracelevel)
17809 if defined $::RD_TRACE;
17810 832 $expectation->failed();
17811 832 last;
17812 }
17813 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpsimple]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
17814 . $_tok . q{]},
17815  
17816 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17817 q{xpath},
17818 $tracelevel)
17819 if defined $::RD_TRACE;
17820 931 $item{q{xpsimple}} = $_tok;
17821 931 push @item, $_tok;
17822
17823 }
17824  
17825
17826  
17827 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<skip:"">]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
17828 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17829 q{xpath},
17830 $tracelevel)
17831 if defined $::RD_TRACE;
17832 931 $_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
17833 931 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 931 0 931
17834 {
17835 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
17836 . $_tok . q{])},
17837 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17838 if defined $::RD_TRACE;
17839 }
17840 else
17841 {
17842 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17843 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17844 if defined $::RD_TRACE;
17845 }
17846
17847 931 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 931 931
17848 931 push @item, $item{__DIRECTIVE1__}=$_tok;
17849
17850  
17851 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [xpcont]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
17852 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17853 q{xpath},
17854 $tracelevel)
17855 if defined $::RD_TRACE;
17856 931 $expectation->is(q{xpcont})->at($text);
17857
17858 931 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpcont, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpcont, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 931 931
17859 {
17860 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [xpcont]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17861 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17862 q{xpath},
17863 $tracelevel)
17864 if defined $::RD_TRACE;
17865 0 last;
17866 }
17867 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [xpcont]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
17868 . @$_tok . q{ times)},
17869  
17870 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17871 q{xpath},
17872 $tracelevel)
17873 if defined $::RD_TRACE;
17874 931 $item{q{xpcont(?)}} = $_tok;
17875 931 push @item, $_tok;
17876
17877  
17878  
17879 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
17880 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17881 q{xpath},
17882 $tracelevel)
17883 if defined $::RD_TRACE;
17884
17885  
17886 931 ▶ $_tok = ($_noactions) ? 0 : do { $item[1].join("",@{$item[3]}) };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 931 931
17887 931 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 931 931
17888 {
17889 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17890 if defined $::RD_TRACE;
17891 0 last;
17892 }
17893 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
17894 . $_tok . q{])},
17895 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17896 if defined $::RD_TRACE;
17897 931 push @item, $_tok;
17898 931 $item{__ACTION1__}=$_tok;
17899
17900  
17901 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpsimple <skip:""> xpcont]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
17902 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17903 q{xpath},
17904 $tracelevel)
17905 if defined $::RD_TRACE;
17906  
17907  
17908  
17909 931 $_matched = 1;
17910 931 last;
17911 }
17912  
17913  
17914 2266 ▶ while (!$_matched)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched) 832 1434 2266
17915 {
17916
17917 832 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [<error...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 832 832
17918 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17919 q{xpath},
17920 $tracelevel)
17921 if defined $::RD_TRACE;
17922 832 my $thisprod = $thisrule->{"prods"}[2];
17923
17924 832 my $_savetext;
17925 832 @item = (q{xpath});
17926 832 %item = (__RULE__ => q{xpath});
17927 832 my $repcount = 0;
17928  
17929  
17930
17931  
17932 832 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<error...>]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 832 832
17933 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17934 q{xpath},
17935 $tracelevel)
17936 if defined $::RD_TRACE;
17937 832 ▶ $_tok = do { if (1) { do {push @{$thisparser->{errors}}, [qq{expected XPath, but got "}.substr($text,0,40).qq{ ..."},$thisline];} unless $_noactions; undef } else {0} };
Branch: 1 branch
BranchTrueFalseTotal
unless ($_noactions) 832 0 832
17938 832 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 832 832
17939 {
17940 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17941 . $_tok . q{])},
17942 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17943 if defined $::RD_TRACE;
17944 }
17945 else
17946 {
17947 832 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 832 832
17948 XML::XSH2::Parser::_Runtime::_tracefirst($text))
17949 if defined $::RD_TRACE;
17950 }
17951
17952 832 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 832 0 832
17953 0 push @item, $item{__DIRECTIVE1__}=$_tok;
17954
17955  
17956 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [<error...>]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17957 XML::XSH2::Parser::_Runtime::_tracefirst($text),
17958 q{xpath},
17959 $tracelevel)
17960 if defined $::RD_TRACE;
17961  
17962  
17963  
17964 0 $_matched = 1;
17965 0 last;
17966 }
17967  
17968  
17969 2266 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 832 1434 2266
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
14340832
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
17970 {
17971
17972  
17973 832 $_[1] = $text; # NOT SURE THIS IS NEEDED
17974 832 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 832 832
17975 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
17976 q{xpath},
17977 $tracelevel)
17978 if defined $::RD_TRACE;
17979 832 return undef;
17980 }
17981 1434 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 1434 1434
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
014340
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
17982 {
17983 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
17984 q{xpath},
17985 $tracelevel)
17986 if defined $::RD_TRACE;
17987 0 $return = $score_return;
17988 }
17989 1434 splice @{$thisparser->{errors}}, $err_at;
17990 1434 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 1434 0 1434
17991 1434 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 1434 1434
17992 {
17993 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
17994 $return . q{])}, "",
17995 q{xpath},
17996 $tracelevel);
17997 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
17998 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
17999 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18000 , q{xpath},
18001 $tracelevel)
18002 }
18003 1434 $_[1] = $text;
18004 1434 return $return;
18005 }
18006  
18007 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
18008 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpaxis
18009 0 ▶{
Subroutine xpaxis: not called CC=24 SCAR=63.3
18010 0 my $thisparser = $_[0];
18011 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
18012 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
18013 0 $ERRORS = 0;
18014 0 my $thisrule = $thisparser->{"rules"}{"xpaxis"};
18015  
18016 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpaxis]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18017 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18018 q{xpaxis},
18019 $tracelevel)
18020 if defined $::RD_TRACE;
18021  
18022
18023 0 my $err_at = @{$thisparser->{errors}};
18024  
18025 0 my $score;
18026 my $score_return;
18027 0 my $_tok;
18028 0 my $return = undef;
18029 0 my $_matched=0;
18030 0 my $commit=0;
18031 0 my @item = ();
18032 0 my %item = ();
18033 0 my $repeating = $_[2];
18034 0 my $_noactions = $_[3];
18035 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
18036 0 my $_itempos = $_[5];
18037 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
18038 0 my $text;
18039 my $lastsep;
18040 0 my $current_match;
18041 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/[-a-z]+::/});
18042 0 $expectation->at($_[1]);
18043
18044 0 my $thisoffset;
18045 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
18046
18047 0 my $thiscolumn;
18048 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
18049
18050 0 my $thisline;
18051 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
18052  
18053
18054  
18055 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
18056 {
18057
18058 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/[-a-z]+::/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18059 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18060 q{xpaxis},
18061 $tracelevel)
18062 if defined $::RD_TRACE;
18063 0 my $thisprod = $thisrule->{"prods"}[0];
18064 0 $text = $_[1];
18065 0 my $_savetext;
18066 0 @item = (q{xpaxis});
18067 0 %item = (__RULE__ => q{xpaxis});
18068 0 my $repcount = 0;
18069  
18070  
18071 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/[-a-z]+::/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18072 q{xpaxis},
18073 $tracelevel)
18074 if defined $::RD_TRACE;
18075 0 undef $lastsep;
18076 0 $expectation->is(q{})->at($text);
18077
18078  
18079 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:[-a-z]+::)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[-a-z]+::)/) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[-a-z]+::)/
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[-a-z]+::)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:[-a-z]+::)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:[-a-z]+::)/
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
18080 {
18081 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
18082 0 $expectation->failed();
18083 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18084 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18085 if defined $::RD_TRACE;
18086  
18087 0 last;
18088 }
18089 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
18090 0 substr($text,0,length($current_match),q{});
18091 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18092 . $current_match . q{])},
18093 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18094 if defined $::RD_TRACE;
18095 0 push @item, $item{__PATTERN1__}=$current_match;
18096
18097  
18098 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/[-a-z]+::/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18099 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18100 q{xpaxis},
18101 $tracelevel)
18102 if defined $::RD_TRACE;
18103  
18104  
18105  
18106 0 $_matched = 1;
18107 0 last;
18108 }
18109  
18110  
18111 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
18112 {
18113
18114  
18115 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
18116 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18117 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18118 q{xpaxis},
18119 $tracelevel)
18120 if defined $::RD_TRACE;
18121 0 return undef;
18122 }
18123 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
18124 {
18125 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18126 q{xpaxis},
18127 $tracelevel)
18128 if defined $::RD_TRACE;
18129 0 $return = $score_return;
18130 }
18131 0 splice @{$thisparser->{errors}}, $err_at;
18132 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
18133 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
18134 {
18135 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
18136 $return . q{])}, "",
18137 q{xpaxis},
18138 $tracelevel);
18139 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
18140 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
18141 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18142 , q{xpaxis},
18143 $tracelevel)
18144 }
18145 0 $_[1] = $text;
18146 0 return $return;
18147 }
18148  
18149 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
18150 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpbracket
18151 839 ▶{
Subroutine xpbracket: called CC=46 SCAR=50.4
18152 839 my $thisparser = $_[0];
18153 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
18154 839 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
8390
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
18155 839 $ERRORS = 0;
18156 839 my $thisrule = $thisparser->{"rules"}{"xpbracket"};
18157  
18158 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpbracket]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18159 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18160 q{xpbracket},
18161 $tracelevel)
18162 if defined $::RD_TRACE;
18163  
18164
18165 839 my $err_at = @{$thisparser->{errors}};
18166  
18167 839 my $score;
18168 my $score_return;
18169 839 my $_tok;
18170 839 my $return = undef;
18171 839 my $_matched=0;
18172 839 my $commit=0;
18173 839 my @item = ();
18174 839 my %item = ();
18175 839 my $repeating = $_[2];
18176 839 my $_noactions = $_[3];
18177 839 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 839 0 839
18178 839 my $_itempos = $_[5];
18179 839 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 839 0 839
18180 839 my $text;
18181 my $lastsep;
18182 839 my $current_match;
18183 839 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{'('});
18184 839 $expectation->at($_[1]);
18185
18186 839 my $thisoffset;
18187 839 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
18188
18189 839 my $thiscolumn;
18190 839 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
18191
18192 839 my $thisline;
18193 839 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
18194  
18195
18196  
18197 839 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 839 0 839
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00839
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
18198 {
18199 839 ▶ local $skip = defined($skip) ? $skip : $XML::XSH2::Parser::_Runtime::skip;
Branch: 1 branch
BranchTrueFalseTotal
defined $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip ? : 839 0 839
18200 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: ['(' <skip:""> xpinter ')']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18201 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18202 q{xpbracket},
18203 $tracelevel)
18204 if defined $::RD_TRACE;
18205 839 my $thisprod = $thisrule->{"prods"}[0];
18206 839 $text = $_[1];
18207 839 my $_savetext;
18208 839 @item = (q{xpbracket});
18209 839 %item = (__RULE__ => q{xpbracket});
18210 839 my $repcount = 0;
18211  
18212  
18213 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['(']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18214 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18215 q{xpbracket},
18216 $tracelevel)
18217 if defined $::RD_TRACE;
18218 839 undef $lastsep;
18219 839 $expectation->is(q{})->at($text);
18220
18221  
18222 839 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\(/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\(/) 0 839 839
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\(/
!ll&&!rl&&r
00839
($lastsep = $1) && ''
!ll
8390
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\(/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\(/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\(/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
18223 {
18224 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
18225
18226 0 $expectation->failed();
18227 0 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18228 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18229 if defined $::RD_TRACE;
18230 0 last;
18231 }
18232 839 $current_match = substr($text, $-[0], $+[0] - $-[0]);
18233 839 substr($text,0,length($current_match),q{});
18234 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18235 . $current_match . q{])},
18236 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18237 if defined $::RD_TRACE;
18238 839 push @item, $item{__STRING1__}=$current_match;
18239
18240  
18241
18242  
18243 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<skip:"">]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18244 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18245 q{xpbracket},
18246 $tracelevel)
18247 if defined $::RD_TRACE;
18248 839 $_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
18249 839 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 839 0 839
18250 {
18251 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18252 . $_tok . q{])},
18253 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18254 if defined $::RD_TRACE;
18255 }
18256 else
18257 {
18258 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18259 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18260 if defined $::RD_TRACE;
18261 }
18262
18263 839 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 839 839
18264 839 push @item, $item{__DIRECTIVE1__}=$_tok;
18265
18266  
18267 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpinter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18268 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18269 q{xpbracket},
18270 $tracelevel)
18271 if defined $::RD_TRACE;
18272 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
18273 839 $expectation->is(q{xpinter})->at($text);
18274 839 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpinter($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpinter($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 839 839
18275 {
18276
18277 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpinter]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18278 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18279 q{xpbracket},
18280 $tracelevel)
18281 if defined $::RD_TRACE;
18282 0 $expectation->failed();
18283 0 last;
18284 }
18285 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpinter]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18286 . $_tok . q{]},
18287  
18288 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18289 q{xpbracket},
18290 $tracelevel)
18291 if defined $::RD_TRACE;
18292 839 $item{q{xpinter}} = $_tok;
18293 839 push @item, $_tok;
18294
18295 }
18296  
18297 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [')']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18298 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18299 q{xpbracket},
18300 $tracelevel)
18301 if defined $::RD_TRACE;
18302 839 undef $lastsep;
18303 839 $expectation->is(q{')'})->at($text);
18304
18305  
18306 839 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\)/) 0 839 839
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\)/
!ll&&!rl&&r
00839
($lastsep = $1) && ''
!ll
8390
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\)/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\)/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\)/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
18307 {
18308 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
18309
18310 0 $expectation->failed();
18311 0 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18312 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18313 if defined $::RD_TRACE;
18314 0 last;
18315 }
18316 839 $current_match = substr($text, $-[0], $+[0] - $-[0]);
18317 839 substr($text,0,length($current_match),q{});
18318 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18319 . $current_match . q{])},
18320 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18321 if defined $::RD_TRACE;
18322 839 push @item, $item{__STRING2__}=$current_match;
18323
18324  
18325 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18326 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18327 q{xpbracket},
18328 $tracelevel)
18329 if defined $::RD_TRACE;
18330
18331  
18332 839 ▶ $_tok = ($_noactions) ? 0 : do { "($item[3])" };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 839 839
18333 839 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 839 839
18334 {
18335 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18336 if defined $::RD_TRACE;
18337 0 last;
18338 }
18339 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18340 . $_tok . q{])},
18341 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18342 if defined $::RD_TRACE;
18343 839 push @item, $_tok;
18344 839 $item{__ACTION1__}=$_tok;
18345
18346  
18347 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: ['(' <skip:""> xpinter ')']<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18348 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18349 q{xpbracket},
18350 $tracelevel)
18351 if defined $::RD_TRACE;
18352  
18353  
18354  
18355 839 $_matched = 1;
18356 839 last;
18357 }
18358  
18359  
18360 839 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 839 839
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
83900
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
18361 {
18362
18363  
18364 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
18365 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18366 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18367 q{xpbracket},
18368 $tracelevel)
18369 if defined $::RD_TRACE;
18370 0 return undef;
18371 }
18372 839 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 839 839
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
08390
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
18373 {
18374 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18375 q{xpbracket},
18376 $tracelevel)
18377 if defined $::RD_TRACE;
18378 0 $return = $score_return;
18379 }
18380 839 splice @{$thisparser->{errors}}, $err_at;
18381 839 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 839 0 839
18382 839 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 839 839
18383 {
18384 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
18385 $return . q{])}, "",
18386 q{xpbracket},
18387 $tracelevel);
18388 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
18389 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
18390 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18391 , q{xpbracket},
18392 $tracelevel)
18393 }
18394 839 $_[1] = $text;
18395 839 return $return;
18396 }
18397  
18398 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
18399 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpbrackets
18400 3439 ▶{
Subroutine xpbrackets: called CC=43 SCAR=44.4
18401 3439 my $thisparser = $_[0];
18402 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
18403 3439 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
34390
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
18404 3439 $ERRORS = 0;
18405 3439 my $thisrule = $thisparser->{"rules"}{"xpbrackets"};
18406  
18407 3439 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpbrackets]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3439 3439
18408 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18409 q{xpbrackets},
18410 $tracelevel)
18411 if defined $::RD_TRACE;
18412  
18413
18414 3439 my $err_at = @{$thisparser->{errors}};
18415  
18416 3439 my $score;
18417 my $score_return;
18418 3439 my $_tok;
18419 3439 my $return = undef;
18420 3439 my $_matched=0;
18421 3439 my $commit=0;
18422 3439 my @item = ();
18423 3439 my %item = ();
18424 3439 my $repeating = $_[2];
18425 3439 my $_noactions = $_[3];
18426 3439 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 3439 0 3439
18427 3439 my $_itempos = $_[5];
18428 3439 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 3439 0 3439
18429 3439 my $text;
18430 my $lastsep;
18431 3439 my $current_match;
18432 3439 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?=\\()/});
18433 3439 $expectation->at($_[1]);
18434
18435 3439 my $thisoffset;
18436 3439 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
18437
18438 3439 my $thiscolumn;
18439 3439 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
18440
18441 3439 my $thisline;
18442 3439 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
18443  
18444
18445  
18446 3439 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 3439 0 3439
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
003439
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
18447 {
18448 3439 ▶ local $skip = defined($skip) ? $skip : $XML::XSH2::Parser::_Runtime::skip;
Branch: 1 branch
BranchTrueFalseTotal
defined $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip ? : 3439 0 3439
18449 3439 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?=\\()/ xpbracket <skip:""> xpfilters]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3439 3439
18450 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18451 q{xpbrackets},
18452 $tracelevel)
18453 if defined $::RD_TRACE;
18454 3439 my $thisprod = $thisrule->{"prods"}[0];
18455 3439 $text = $_[1];
18456 3439 my $_savetext;
18457 3439 @item = (q{xpbrackets});
18458 3439 %item = (__RULE__ => q{xpbrackets});
18459 3439 my $repcount = 0;
18460  
18461  
18462 3439 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?=\\()/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3439 3439
18463 q{xpbrackets},
18464 $tracelevel)
18465 if defined $::RD_TRACE;
18466 3439 undef $lastsep;
18467 3439 $expectation->is(q{})->at($text);
18468
18469  
18470 3439 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\())/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\())/) 2600 839 3439
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\())/
!ll&&!rl&&r
02600839
($lastsep = $1) && ''
!ll
3296143
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\())/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?=\())/
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?=\())/
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
18471 {
18472 2600 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 2600 0 2600
18473 2600 $expectation->failed();
18474 2600 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2600 2600
18475 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18476 if defined $::RD_TRACE;
18477  
18478 2600 last;
18479 }
18480 839 $current_match = substr($text, $-[0], $+[0] - $-[0]);
18481 839 substr($text,0,length($current_match),q{});
18482 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18483 . $current_match . q{])},
18484 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18485 if defined $::RD_TRACE;
18486 839 push @item, $item{__PATTERN1__}=$current_match;
18487
18488  
18489 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpbracket]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18490 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18491 q{xpbrackets},
18492 $tracelevel)
18493 if defined $::RD_TRACE;
18494 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
18495 839 $expectation->is(q{xpbracket})->at($text);
18496 839 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpbracket($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpbracket($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 839 839
18497 {
18498
18499 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpbracket]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18500 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18501 q{xpbrackets},
18502 $tracelevel)
18503 if defined $::RD_TRACE;
18504 0 $expectation->failed();
18505 0 last;
18506 }
18507 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpbracket]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18508 . $_tok . q{]},
18509  
18510 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18511 q{xpbrackets},
18512 $tracelevel)
18513 if defined $::RD_TRACE;
18514 839 $item{q{xpbracket}} = $_tok;
18515 839 push @item, $_tok;
18516
18517 }
18518  
18519
18520  
18521 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<skip:"">]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18522 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18523 q{xpbrackets},
18524 $tracelevel)
18525 if defined $::RD_TRACE;
18526 839 $_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
18527 839 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 839 0 839
18528 {
18529 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18530 . $_tok . q{])},
18531 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18532 if defined $::RD_TRACE;
18533 }
18534 else
18535 {
18536 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18537 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18538 if defined $::RD_TRACE;
18539 }
18540
18541 839 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 839 839
18542 839 push @item, $item{__DIRECTIVE1__}=$_tok;
18543
18544  
18545 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [xpfilters]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18546 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18547 q{xpbrackets},
18548 $tracelevel)
18549 if defined $::RD_TRACE;
18550 839 $expectation->is(q{xpfilters})->at($text);
18551
18552 839 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpfilters, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpfilters, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 839 839
18553 {
18554 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [xpfilters]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18555 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18556 q{xpbrackets},
18557 $tracelevel)
18558 if defined $::RD_TRACE;
18559 0 last;
18560 }
18561 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [xpfilters]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18562 . @$_tok . q{ times)},
18563  
18564 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18565 q{xpbrackets},
18566 $tracelevel)
18567 if defined $::RD_TRACE;
18568 839 $item{q{xpfilters(?)}} = $_tok;
18569 839 push @item, $_tok;
18570
18571  
18572  
18573 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18574 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18575 q{xpbrackets},
18576 $tracelevel)
18577 if defined $::RD_TRACE;
18578
18579  
18580 839 ▶ $_tok = ($_noactions) ? 0 : do { join "",$item[2],@{$item[4]} };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 839 839
18581 839 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 839 839
18582 {
18583 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18584 if defined $::RD_TRACE;
18585 0 last;
18586 }
18587 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18588 . $_tok . q{])},
18589 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18590 if defined $::RD_TRACE;
18591 839 push @item, $_tok;
18592 839 $item{__ACTION1__}=$_tok;
18593
18594  
18595 839 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?=\\()/ xpbracket <skip:""> xpfilters]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 839 839
18596 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18597 q{xpbrackets},
18598 $tracelevel)
18599 if defined $::RD_TRACE;
18600  
18601  
18602  
18603 839 $_matched = 1;
18604 839 last;
18605 }
18606  
18607  
18608 3439 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 2600 839 3439
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
83902600
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
18609 {
18610
18611  
18612 2600 $_[1] = $text; # NOT SURE THIS IS NEEDED
18613 2600 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 2600 2600
18614 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18615 q{xpbrackets},
18616 $tracelevel)
18617 if defined $::RD_TRACE;
18618 2600 return undef;
18619 }
18620 839 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 839 839
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
08390
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
18621 {
18622 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18623 q{xpbrackets},
18624 $tracelevel)
18625 if defined $::RD_TRACE;
18626 0 $return = $score_return;
18627 }
18628 839 splice @{$thisparser->{errors}}, $err_at;
18629 839 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 839 0 839
18630 839 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 839 839
18631 {
18632 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
18633 $return . q{])}, "",
18634 q{xpbrackets},
18635 $tracelevel);
18636 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
18637 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
18638 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18639 , q{xpbrackets},
18640 $tracelevel)
18641 }
18642 839 $_[1] = $text;
18643 839 return $return;
18644 }
18645  
18646 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
18647 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpcont
18648 931 ▶{
Subroutine xpcont: called CC=49 SCAR=45.2
18649 931 my $thisparser = $_[0];
18650 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
18651 931 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
9310
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
18652 931 $ERRORS = 0;
18653 931 my $thisrule = $thisparser->{"rules"}{"xpcont"};
18654  
18655 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpcont]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
18656 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18657 q{xpcont},
18658 $tracelevel)
18659 if defined $::RD_TRACE;
18660  
18661
18662 931 my $err_at = @{$thisparser->{errors}};
18663  
18664 931 my $score;
18665 my $score_return;
18666 931 my $_tok;
18667 931 my $return = undef;
18668 931 my $_matched=0;
18669 931 my $commit=0;
18670 931 my @item = ();
18671 931 my %item = ();
18672 931 my $repeating = $_[2];
18673 931 my $_noactions = $_[3];
18674 931 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 931 0 931
18675 931 my $_itempos = $_[5];
18676 931 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 931 0 931
18677 931 my $text;
18678 my $lastsep;
18679 931 my $current_match;
18680 931 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{xpfilters, or xpbrackets, or xpath});
18681 931 $expectation->at($_[1]);
18682
18683 931 my $thisoffset;
18684 931 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
18685
18686 931 my $thiscolumn;
18687 931 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
18688
18689 931 my $thisline;
18690 931 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
18691  
18692
18693  
18694 931 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 931 0 931
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00931
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
18695 {
18696 931 ▶ local $skip = defined($skip) ? $skip : $XML::XSH2::Parser::_Runtime::skip;
Branch: 1 branch
BranchTrueFalseTotal
defined $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip ? : 931 0 931
18697 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpfilters, or xpbrackets <skip:""> xpath]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
18698 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18699 q{xpcont},
18700 $tracelevel)
18701 if defined $::RD_TRACE;
18702 931 my $thisprod = $thisrule->{"prods"}[0];
18703 931 $text = $_[1];
18704 931 my $_savetext;
18705 931 @item = (q{xpcont});
18706 931 %item = (__RULE__ => q{xpcont});
18707 931 my $repcount = 0;
18708  
18709  
18710 931 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [_alternation_1_of_production_1_of_rule_xpcont]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 931 931
18711 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18712 q{xpcont},
18713 $tracelevel)
18714 if defined $::RD_TRACE;
18715 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
18716 931 $expectation->is(q{})->at($text);
18717 931 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_xpcont($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = _alternation_1_of_production_1_of_rule_xpcont($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 618 313 931
18718 {
18719
18720 618 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [_alternation_1_of_production_1_of_rule_xpcont]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 618 618
18721 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18722 q{xpcont},
18723 $tracelevel)
18724 if defined $::RD_TRACE;
18725 618 $expectation->failed();
18726 618 last;
18727 }
18728 313 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [_alternation_1_of_production_1_of_rule_xpcont]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 313 313
18729 . $_tok . q{]},
18730  
18731 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18732 q{xpcont},
18733 $tracelevel)
18734 if defined $::RD_TRACE;
18735 313 $item{q{_alternation_1_of_production_1_of_rule_xpcont}} = $_tok;
18736 313 push @item, $_tok;
18737
18738 }
18739  
18740
18741  
18742 313 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<skip:"">]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 313 313
18743 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18744 q{xpcont},
18745 $tracelevel)
18746 if defined $::RD_TRACE;
18747 313 $_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
18748 313 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 313 0 313
18749 {
18750 313 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 313 313
18751 . $_tok . q{])},
18752 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18753 if defined $::RD_TRACE;
18754 }
18755 else
18756 {
18757 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18758 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18759 if defined $::RD_TRACE;
18760 }
18761
18762 313 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 313 313
18763 313 push @item, $item{__DIRECTIVE1__}=$_tok;
18764
18765  
18766 313 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [xpath]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 313 313
18767 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18768 q{xpcont},
18769 $tracelevel)
18770 if defined $::RD_TRACE;
18771 313 $expectation->is(q{xpath})->at($text);
18772
18773 313 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpath, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpath, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 313 313
18774 {
18775 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [xpath]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18776 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18777 q{xpcont},
18778 $tracelevel)
18779 if defined $::RD_TRACE;
18780 0 last;
18781 }
18782 313 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [xpath]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 313 313
18783 . @$_tok . q{ times)},
18784  
18785 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18786 q{xpcont},
18787 $tracelevel)
18788 if defined $::RD_TRACE;
18789 313 $item{q{xpath(?)}} = $_tok;
18790 313 push @item, $_tok;
18791
18792  
18793  
18794 313 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 313 313
18795 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18796 q{xpcont},
18797 $tracelevel)
18798 if defined $::RD_TRACE;
18799
18800  
18801 313 ▶ $_tok = ($_noactions) ? 0 : do { $item[1].join("",@{$item[3]}) };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 313 313
18802 313 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 313 313
18803 {
18804 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18805 if defined $::RD_TRACE;
18806 0 last;
18807 }
18808 313 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 313 313
18809 . $_tok . q{])},
18810 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18811 if defined $::RD_TRACE;
18812 313 push @item, $_tok;
18813 313 $item{__ACTION1__}=$_tok;
18814
18815  
18816 313 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpfilters, or xpbrackets <skip:""> xpath]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 313 313
18817 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18818 q{xpcont},
18819 $tracelevel)
18820 if defined $::RD_TRACE;
18821  
18822  
18823  
18824 313 $_matched = 1;
18825 313 last;
18826 }
18827  
18828  
18829 931 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 618 313 931
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
3130618
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
18830 {
18831
18832 618 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpath]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 618 618
18833 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18834 q{xpcont},
18835 $tracelevel)
18836 if defined $::RD_TRACE;
18837 618 my $thisprod = $thisrule->{"prods"}[1];
18838 618 $text = $_[1];
18839 618 my $_savetext;
18840 618 @item = (q{xpcont});
18841 618 %item = (__RULE__ => q{xpcont});
18842 618 my $repcount = 0;
18843  
18844  
18845 618 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpath]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 618 618
18846 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18847 q{xpcont},
18848 $tracelevel)
18849 if defined $::RD_TRACE;
18850 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
18851 618 $expectation->is(q{})->at($text);
18852 618 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpath($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpath($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 516 102 618
18853 {
18854
18855 516 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpath]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 516 516
18856 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18857 q{xpcont},
18858 $tracelevel)
18859 if defined $::RD_TRACE;
18860 516 $expectation->failed();
18861 516 last;
18862 }
18863 102 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpath]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 102 102
18864 . $_tok . q{]},
18865  
18866 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18867 q{xpcont},
18868 $tracelevel)
18869 if defined $::RD_TRACE;
18870 102 $item{q{xpath}} = $_tok;
18871 102 push @item, $_tok;
18872
18873 }
18874  
18875 102 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 102 102
18876 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18877 q{xpcont},
18878 $tracelevel)
18879 if defined $::RD_TRACE;
18880
18881  
18882 102 ▶ $_tok = ($_noactions) ? 0 : do { $item[1] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 102 102
18883 102 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 102 102
18884 {
18885 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18886 if defined $::RD_TRACE;
18887 0 last;
18888 }
18889 102 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 102 102
18890 . $_tok . q{])},
18891 XML::XSH2::Parser::_Runtime::_tracefirst($text))
18892 if defined $::RD_TRACE;
18893 102 push @item, $_tok;
18894 102 $item{__ACTION1__}=$_tok;
18895
18896  
18897 102 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpath]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 102 102
18898 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18899 q{xpcont},
18900 $tracelevel)
18901 if defined $::RD_TRACE;
18902  
18903  
18904  
18905 102 $_matched = 1;
18906 102 last;
18907 }
18908  
18909  
18910 931 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 516 415 931
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
4150516
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
18911 {
18912
18913  
18914 516 $_[1] = $text; # NOT SURE THIS IS NEEDED
18915 516 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 516 516
18916 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18917 q{xpcont},
18918 $tracelevel)
18919 if defined $::RD_TRACE;
18920 516 return undef;
18921 }
18922 415 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 415 415
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
04150
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
18923 {
18924 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
18925 q{xpcont},
18926 $tracelevel)
18927 if defined $::RD_TRACE;
18928 0 $return = $score_return;
18929 }
18930 415 splice @{$thisparser->{errors}}, $err_at;
18931 415 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 415 0 415
18932 415 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 415 415
18933 {
18934 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
18935 $return . q{])}, "",
18936 q{xpcont},
18937 $tracelevel);
18938 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
18939 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
18940 XML::XSH2::Parser::_Runtime::_tracefirst($text),
18941 , q{xpcont},
18942 $tracelevel)
18943 }
18944 415 $_[1] = $text;
18945 415 return $return;
18946 }
18947  
18948 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
18949 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpfilter
18950 240 ▶{
Subroutine xpfilter: called CC=40 SCAR=44.3
18951 240 my $thisparser = $_[0];
18952 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
18953 240 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
2400
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
18954 240 $ERRORS = 0;
18955 240 my $thisrule = $thisparser->{"rules"}{"xpfilter"};
18956  
18957 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpfilter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
18958 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
18959 q{xpfilter},
18960 $tracelevel)
18961 if defined $::RD_TRACE;
18962  
18963
18964 240 my $err_at = @{$thisparser->{errors}};
18965  
18966 240 my $score;
18967 my $score_return;
18968 240 my $_tok;
18969 240 my $return = undef;
18970 240 my $_matched=0;
18971 240 my $commit=0;
18972 240 my @item = ();
18973 240 my %item = ();
18974 240 my $repeating = $_[2];
18975 240 my $_noactions = $_[3];
18976 240 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 240 0 240
18977 240 my $_itempos = $_[5];
18978 240 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 240 0 240
18979 240 my $text;
18980 my $lastsep;
18981 240 my $current_match;
18982 240 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{'['});
18983 240 $expectation->at($_[1]);
18984
18985 240 my $thisoffset;
18986 240 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
18987
18988 240 my $thiscolumn;
18989 240 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
18990
18991 240 my $thisline;
18992 240 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
18993  
18994
18995  
18996 240 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 240 0 240
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00240
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
18997 {
18998
18999 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: ['[' xpinter ']']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
19000 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19001 q{xpfilter},
19002 $tracelevel)
19003 if defined $::RD_TRACE;
19004 240 my $thisprod = $thisrule->{"prods"}[0];
19005 240 $text = $_[1];
19006 240 my $_savetext;
19007 240 @item = (q{xpfilter});
19008 240 %item = (__RULE__ => q{xpfilter});
19009 240 my $repcount = 0;
19010  
19011  
19012 240 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: ['[']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 240 240
19013 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19014 q{xpfilter},
19015 $tracelevel)
19016 if defined $::RD_TRACE;
19017 240 undef $lastsep;
19018 240 $expectation->is(q{})->at($text);
19019
19020  
19021 240 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\[/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\[/) 120 120 240
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\[/
!ll&&!rl&&r
0120120
($lastsep = $1) && ''
!ll
2400
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\[/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\[/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\[/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
19022 {
19023 120 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 120 0 120
19024
19025 120 $expectation->failed();
19026 120 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19027 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19028 if defined $::RD_TRACE;
19029 120 last;
19030 }
19031 120 $current_match = substr($text, $-[0], $+[0] - $-[0]);
19032 120 substr($text,0,length($current_match),q{});
19033 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19034 . $current_match . q{])},
19035 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19036 if defined $::RD_TRACE;
19037 120 push @item, $item{__STRING1__}=$current_match;
19038
19039  
19040 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpinter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19041 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19042 q{xpfilter},
19043 $tracelevel)
19044 if defined $::RD_TRACE;
19045 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
19046 120 $expectation->is(q{xpinter})->at($text);
19047 120 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpinter($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpinter($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 120 120
19048 {
19049
19050 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpinter]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19051 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19052 q{xpfilter},
19053 $tracelevel)
19054 if defined $::RD_TRACE;
19055 0 $expectation->failed();
19056 0 last;
19057 }
19058 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpinter]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19059 . $_tok . q{]},
19060  
19061 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19062 q{xpfilter},
19063 $tracelevel)
19064 if defined $::RD_TRACE;
19065 120 $item{q{xpinter}} = $_tok;
19066 120 push @item, $_tok;
19067
19068 }
19069  
19070 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [']']},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19071 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19072 q{xpfilter},
19073 $tracelevel)
19074 if defined $::RD_TRACE;
19075 120 undef $lastsep;
19076 120 $expectation->is(q{']'})->at($text);
19077
19078  
19079 120 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A\]/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\]/) 0 120 120
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\]/
!ll&&!rl&&r
00120
($lastsep = $1) && ''
!ll
1200
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A\]/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A\]/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A\]/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
19080 {
19081 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
19082
19083 0 $expectation->failed();
19084 0 ▶ XML::XSH2::Parser::_Runtime::_trace(qq{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19085 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19086 if defined $::RD_TRACE;
19087 0 last;
19088 }
19089 120 $current_match = substr($text, $-[0], $+[0] - $-[0]);
19090 120 substr($text,0,length($current_match),q{});
19091 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19092 . $current_match . q{])},
19093 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19094 if defined $::RD_TRACE;
19095 120 push @item, $item{__STRING2__}=$current_match;
19096
19097  
19098 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19099 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19100 q{xpfilter},
19101 $tracelevel)
19102 if defined $::RD_TRACE;
19103
19104  
19105 120 ▶ $_tok = ($_noactions) ? 0 : do { "[$item[2]]" };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 120 120
19106 120 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 120 120
19107 {
19108 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19109 if defined $::RD_TRACE;
19110 0 last;
19111 }
19112 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19113 . $_tok . q{])},
19114 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19115 if defined $::RD_TRACE;
19116 120 push @item, $_tok;
19117 120 $item{__ACTION1__}=$_tok;
19118
19119  
19120 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: ['[' xpinter ']']<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19121 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19122 q{xpfilter},
19123 $tracelevel)
19124 if defined $::RD_TRACE;
19125  
19126  
19127  
19128 120 $_matched = 1;
19129 120 last;
19130 }
19131  
19132  
19133 240 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 120 120 240
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
1200120
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
19134 {
19135
19136  
19137 120 $_[1] = $text; # NOT SURE THIS IS NEEDED
19138 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19139 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19140 q{xpfilter},
19141 $tracelevel)
19142 if defined $::RD_TRACE;
19143 120 return undef;
19144 }
19145 120 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 120 120
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
01200
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
19146 {
19147 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19148 q{xpfilter},
19149 $tracelevel)
19150 if defined $::RD_TRACE;
19151 0 $return = $score_return;
19152 }
19153 120 splice @{$thisparser->{errors}}, $err_at;
19154 120 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 120 0 120
19155 120 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 120 120
19156 {
19157 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
19158 $return . q{])}, "",
19159 q{xpfilter},
19160 $tracelevel);
19161 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
19162 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
19163 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19164 , q{xpfilter},
19165 $tracelevel)
19166 }
19167 120 $_[1] = $text;
19168 120 return $return;
19169 }
19170  
19171 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
19172 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpfilters
19173 3417 ▶{
Subroutine xpfilters: called CC=33 SCAR=39.9
19174 3417 my $thisparser = $_[0];
19175 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
19176 3417 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
34170
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
19177 3417 $ERRORS = 0;
19178 3417 my $thisrule = $thisparser->{"rules"}{"xpfilters"};
19179  
19180 3417 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpfilters]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3417 3417
19181 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19182 q{xpfilters},
19183 $tracelevel)
19184 if defined $::RD_TRACE;
19185  
19186
19187 3417 my $err_at = @{$thisparser->{errors}};
19188  
19189 3417 my $score;
19190 my $score_return;
19191 3417 my $_tok;
19192 3417 my $return = undef;
19193 3417 my $_matched=0;
19194 3417 my $commit=0;
19195 3417 my @item = ();
19196 3417 my %item = ();
19197 3417 my $repeating = $_[2];
19198 3417 my $_noactions = $_[3];
19199 3417 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 3417 0 3417
19200 3417 my $_itempos = $_[5];
19201 3417 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 3417 0 3417
19202 3417 my $text;
19203 my $lastsep;
19204 3417 my $current_match;
19205 3417 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?=\\[)/});
19206 3417 $expectation->at($_[1]);
19207
19208 3417 my $thisoffset;
19209 3417 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
19210
19211 3417 my $thiscolumn;
19212 3417 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
19213
19214 3417 my $thisline;
19215 3417 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
19216  
19217
19218  
19219 3417 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 3417 0 3417
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
003417
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
19220 {
19221
19222 3417 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?=\\[)/ xpfilter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3417 3417
19223 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19224 q{xpfilters},
19225 $tracelevel)
19226 if defined $::RD_TRACE;
19227 3417 my $thisprod = $thisrule->{"prods"}[0];
19228 3417 $text = $_[1];
19229 3417 my $_savetext;
19230 3417 @item = (q{xpfilters});
19231 3417 %item = (__RULE__ => q{xpfilters});
19232 3417 my $repcount = 0;
19233  
19234  
19235 3417 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?=\\[)/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3417 3417
19236 q{xpfilters},
19237 $tracelevel)
19238 if defined $::RD_TRACE;
19239 3417 undef $lastsep;
19240 3417 $expectation->is(q{})->at($text);
19241
19242  
19243 3417 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?=\[))/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\[))/) 3297 120 3417
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\[))/
!ll&&!rl&&r
03297120
($lastsep = $1) && ''
!ll
34170
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?=\[))/
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?=\[))/
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?=\[))/
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
19244 {
19245 3297 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 3297 0 3297
19246 3297 $expectation->failed();
19247 3297 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3297 3297
19248 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19249 if defined $::RD_TRACE;
19250  
19251 3297 last;
19252 }
19253 120 $current_match = substr($text, $-[0], $+[0] - $-[0]);
19254 120 substr($text,0,length($current_match),q{});
19255 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19256 . $current_match . q{])},
19257 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19258 if defined $::RD_TRACE;
19259 120 push @item, $item{__PATTERN1__}=$current_match;
19260
19261  
19262 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [xpfilter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19263 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19264 q{xpfilters},
19265 $tracelevel)
19266 if defined $::RD_TRACE;
19267 120 $expectation->is(q{xpfilter})->at($text);
19268
19269 120 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpfilter, 1, 100000000, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpfilter, 1, 100000000, $_noactions, $expectation, sub { \@arg; } , undef))) 0 120 120
19270 {
19271 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [xpfilter]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19272 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19273 q{xpfilters},
19274 $tracelevel)
19275 if defined $::RD_TRACE;
19276 0 last;
19277 }
19278 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [xpfilter]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19279 . @$_tok . q{ times)},
19280  
19281 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19282 q{xpfilters},
19283 $tracelevel)
19284 if defined $::RD_TRACE;
19285 120 $item{q{xpfilter(s)}} = $_tok;
19286 120 push @item, $_tok;
19287
19288  
19289  
19290 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19291 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19292 q{xpfilters},
19293 $tracelevel)
19294 if defined $::RD_TRACE;
19295
19296  
19297 120 ▶ $_tok = ($_noactions) ? 0 : do { join("",@{$item[2]}) };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 120 120
19298 120 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 120 120
19299 {
19300 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19301 if defined $::RD_TRACE;
19302 0 last;
19303 }
19304 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19305 . $_tok . q{])},
19306 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19307 if defined $::RD_TRACE;
19308 120 push @item, $_tok;
19309 120 $item{__ACTION1__}=$_tok;
19310
19311  
19312 120 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?=\\[)/ xpfilter]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 120 120
19313 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19314 q{xpfilters},
19315 $tracelevel)
19316 if defined $::RD_TRACE;
19317  
19318  
19319  
19320 120 $_matched = 1;
19321 120 last;
19322 }
19323  
19324  
19325 3417 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 3297 120 3417
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
12003297
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
19326 {
19327
19328  
19329 3297 $_[1] = $text; # NOT SURE THIS IS NEEDED
19330 3297 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 3297 3297
19331 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19332 q{xpfilters},
19333 $tracelevel)
19334 if defined $::RD_TRACE;
19335 3297 return undef;
19336 }
19337 120 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 120 120
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
01200
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
19338 {
19339 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19340 q{xpfilters},
19341 $tracelevel)
19342 if defined $::RD_TRACE;
19343 0 $return = $score_return;
19344 }
19345 120 splice @{$thisparser->{errors}}, $err_at;
19346 120 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 120 0 120
19347 120 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 120 120
19348 {
19349 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
19350 $return . q{])}, "",
19351 q{xpfilters},
19352 $tracelevel);
19353 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
19354 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
19355 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19356 , q{xpfilters},
19357 $tracelevel)
19358 }
19359 120 $_[1] = $text;
19360 120 return $return;
19361 }
19362  
19363 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
19364 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpinter
19365 1647 ▶{
Subroutine xpinter: called CC=36 SCAR=44.3
19366 1647 my $thisparser = $_[0];
19367 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
19368 1647 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
16470
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
19369 1647 $ERRORS = 0;
19370 1647 my $thisrule = $thisparser->{"rules"}{"xpinter"};
19371  
19372 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpinter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19373 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19374 q{xpinter},
19375 $tracelevel)
19376 if defined $::RD_TRACE;
19377  
19378
19379 1647 my $err_at = @{$thisparser->{errors}};
19380  
19381 1647 my $score;
19382 my $score_return;
19383 1647 my $_tok;
19384 1647 my $return = undef;
19385 1647 my $_matched=0;
19386 1647 my $commit=0;
19387 1647 my @item = ();
19388 1647 my %item = ();
19389 1647 my $repeating = $_[2];
19390 1647 my $_noactions = $_[3];
19391 1647 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1647 0 1647
19392 1647 my $_itempos = $_[5];
19393 1647 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1647 0 1647
19394 1647 my $text;
19395 my $lastsep;
19396 1647 my $current_match;
19397 1647 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{xps});
19398 1647 $expectation->at($_[1]);
19399
19400 1647 my $thisoffset;
19401 1647 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
19402
19403 1647 my $thiscolumn;
19404 1647 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
19405
19406 1647 my $thisline;
19407 1647 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
19408  
19409
19410  
19411 1647 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1647 0 1647
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001647
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
19412 {
19413 1647 ▶ local $skip = defined($skip) ? $skip : $XML::XSH2::Parser::_Runtime::skip;
Branch: 1 branch
BranchTrueFalseTotal
defined $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip ? : 1647 0 1647
19414 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xps <skip:""> xpintercont]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19415 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19416 q{xpinter},
19417 $tracelevel)
19418 if defined $::RD_TRACE;
19419 1647 my $thisprod = $thisrule->{"prods"}[0];
19420 1647 $text = $_[1];
19421 1647 my $_savetext;
19422 1647 @item = (q{xpinter});
19423 1647 %item = (__RULE__ => q{xpinter});
19424 1647 my $repcount = 0;
19425  
19426  
19427 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xps]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19428 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19429 q{xpinter},
19430 $tracelevel)
19431 if defined $::RD_TRACE;
19432 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
19433 1647 $expectation->is(q{})->at($text);
19434 1647 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xps($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xps($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 1647 1647
19435 {
19436
19437 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xps]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19438 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19439 q{xpinter},
19440 $tracelevel)
19441 if defined $::RD_TRACE;
19442 0 $expectation->failed();
19443 0 last;
19444 }
19445 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xps]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19446 . $_tok . q{]},
19447  
19448 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19449 q{xpinter},
19450 $tracelevel)
19451 if defined $::RD_TRACE;
19452 1647 $item{q{xps}} = $_tok;
19453 1647 push @item, $_tok;
19454
19455 }
19456  
19457
19458  
19459 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<skip:"">]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19460 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19461 q{xpinter},
19462 $tracelevel)
19463 if defined $::RD_TRACE;
19464 1647 $_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
19465 1647 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 1647 0 1647
19466 {
19467 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19468 . $_tok . q{])},
19469 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19470 if defined $::RD_TRACE;
19471 }
19472 else
19473 {
19474 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19475 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19476 if defined $::RD_TRACE;
19477 }
19478
19479 1647 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 1647 1647
19480 1647 push @item, $item{__DIRECTIVE1__}=$_tok;
19481
19482  
19483 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [xpintercont]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19484 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19485 q{xpinter},
19486 $tracelevel)
19487 if defined $::RD_TRACE;
19488 1647 $expectation->is(q{xpintercont})->at($text);
19489
19490 1647 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpintercont, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpintercont, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 1647 1647
19491 {
19492 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [xpintercont]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19493 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19494 q{xpinter},
19495 $tracelevel)
19496 if defined $::RD_TRACE;
19497 0 last;
19498 }
19499 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [xpintercont]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19500 . @$_tok . q{ times)},
19501  
19502 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19503 q{xpinter},
19504 $tracelevel)
19505 if defined $::RD_TRACE;
19506 1647 $item{q{xpintercont(?)}} = $_tok;
19507 1647 push @item, $_tok;
19508
19509  
19510  
19511 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19512 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19513 q{xpinter},
19514 $tracelevel)
19515 if defined $::RD_TRACE;
19516
19517  
19518 1647 ▶ $_tok = ($_noactions) ? 0 : do { join("",$item[1],@{$item[3]}) };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 1647 1647
19519 1647 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 1647 1647
19520 {
19521 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19522 if defined $::RD_TRACE;
19523 0 last;
19524 }
19525 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19526 . $_tok . q{])},
19527 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19528 if defined $::RD_TRACE;
19529 1647 push @item, $_tok;
19530 1647 $item{__ACTION1__}=$_tok;
19531
19532  
19533 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xps <skip:""> xpintercont]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19534 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19535 q{xpinter},
19536 $tracelevel)
19537 if defined $::RD_TRACE;
19538  
19539  
19540  
19541 1647 $_matched = 1;
19542 1647 last;
19543 }
19544  
19545  
19546 1647 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 1647 1647
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
164700
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
19547 {
19548
19549  
19550 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
19551 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19552 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19553 q{xpinter},
19554 $tracelevel)
19555 if defined $::RD_TRACE;
19556 0 return undef;
19557 }
19558 1647 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 1647 1647
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
016470
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
19559 {
19560 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19561 q{xpinter},
19562 $tracelevel)
19563 if defined $::RD_TRACE;
19564 0 $return = $score_return;
19565 }
19566 1647 splice @{$thisparser->{errors}}, $err_at;
19567 1647 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 1647 0 1647
19568 1647 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 1647 1647
19569 {
19570 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
19571 $return . q{])}, "",
19572 q{xpinter},
19573 $tracelevel);
19574 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
19575 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
19576 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19577 , q{xpinter},
19578 $tracelevel)
19579 }
19580 1647 $_[1] = $text;
19581 1647 return $return;
19582 }
19583  
19584 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
19585 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpintercont
19586 1647 ▶{
Subroutine xpintercont: called CC=36 SCAR=41.2
19587 1647 my $thisparser = $_[0];
19588 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
19589 1647 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
16470
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
19590 1647 $ERRORS = 0;
19591 1647 my $thisrule = $thisparser->{"rules"}{"xpintercont"};
19592  
19593 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpintercont]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19594 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19595 q{xpintercont},
19596 $tracelevel)
19597 if defined $::RD_TRACE;
19598  
19599
19600 1647 my $err_at = @{$thisparser->{errors}};
19601  
19602 1647 my $score;
19603 my $score_return;
19604 1647 my $_tok;
19605 1647 my $return = undef;
19606 1647 my $_matched=0;
19607 1647 my $commit=0;
19608 1647 my @item = ();
19609 1647 my %item = ();
19610 1647 my $repeating = $_[2];
19611 1647 my $_noactions = $_[3];
19612 1647 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1647 0 1647
19613 1647 my $_itempos = $_[5];
19614 1647 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1647 0 1647
19615 1647 my $text;
19616 my $lastsep;
19617 1647 my $current_match;
19618 1647 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{xpfilters, or xpbrackets});
19619 1647 $expectation->at($_[1]);
19620
19621 1647 my $thisoffset;
19622 1647 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
19623
19624 1647 my $thiscolumn;
19625 1647 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
19626
19627 1647 my $thisline;
19628 1647 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
19629  
19630
19631  
19632 1647 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1647 0 1647
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001647
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
19633 {
19634 1647 ▶ local $skip = defined($skip) ? $skip : $XML::XSH2::Parser::_Runtime::skip;
Branch: 1 branch
BranchTrueFalseTotal
defined $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip ? : 1647 0 1647
19635 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpfilters, or xpbrackets <skip:""> xpinter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19636 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19637 q{xpintercont},
19638 $tracelevel)
19639 if defined $::RD_TRACE;
19640 1647 my $thisprod = $thisrule->{"prods"}[0];
19641 1647 $text = $_[1];
19642 1647 my $_savetext;
19643 1647 @item = (q{xpintercont});
19644 1647 %item = (__RULE__ => q{xpintercont});
19645 1647 my $repcount = 0;
19646  
19647  
19648 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [_alternation_1_of_production_1_of_rule_xpintercont]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
19649 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19650 q{xpintercont},
19651 $tracelevel)
19652 if defined $::RD_TRACE;
19653 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
19654 1647 $expectation->is(q{})->at($text);
19655 1647 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::_alternation_1_of_production_1_of_rule_xpintercont($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = _alternation_1_of_production_1_of_rule_xpintercont($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 1150 497 1647
19656 {
19657
19658 1150 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [_alternation_1_of_production_1_of_rule_xpintercont]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1150 1150
19659 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19660 q{xpintercont},
19661 $tracelevel)
19662 if defined $::RD_TRACE;
19663 1150 $expectation->failed();
19664 1150 last;
19665 }
19666 497 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [_alternation_1_of_production_1_of_rule_xpintercont]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 497 497
19667 . $_tok . q{]},
19668  
19669 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19670 q{xpintercont},
19671 $tracelevel)
19672 if defined $::RD_TRACE;
19673 497 $item{q{_alternation_1_of_production_1_of_rule_xpintercont}} = $_tok;
19674 497 push @item, $_tok;
19675
19676 }
19677  
19678
19679  
19680 497 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<skip:"">]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 497 497
19681 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19682 q{xpintercont},
19683 $tracelevel)
19684 if defined $::RD_TRACE;
19685 497 $_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
19686 497 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 497 0 497
19687 {
19688 497 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 497 497
19689 . $_tok . q{])},
19690 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19691 if defined $::RD_TRACE;
19692 }
19693 else
19694 {
19695 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19696 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19697 if defined $::RD_TRACE;
19698 }
19699
19700 497 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 497 497
19701 497 push @item, $item{__DIRECTIVE1__}=$_tok;
19702
19703  
19704 497 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [xpinter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 497 497
19705 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19706 q{xpintercont},
19707 $tracelevel)
19708 if defined $::RD_TRACE;
19709 497 $expectation->is(q{xpinter})->at($text);
19710
19711 497 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpinter, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.2
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpinter, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 497 497
19712 {
19713 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [xpinter]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19714 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19715 q{xpintercont},
19716 $tracelevel)
19717 if defined $::RD_TRACE;
19718 0 last;
19719 }
19720 497 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [xpinter]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 497 497
19721 . @$_tok . q{ times)},
19722  
19723 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19724 q{xpintercont},
19725 $tracelevel)
19726 if defined $::RD_TRACE;
19727 497 $item{q{xpinter(?)}} = $_tok;
19728 497 push @item, $_tok;
19729
19730  
19731  
19732 497 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 497 497
19733 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19734 q{xpintercont},
19735 $tracelevel)
19736 if defined $::RD_TRACE;
19737
19738  
19739 497 ▶ $_tok = ($_noactions) ? 0 : do { join("",$item[1],@{$item[3]}) };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 497 497
19740 497 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 497 497
19741 {
19742 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19743 if defined $::RD_TRACE;
19744 0 last;
19745 }
19746 497 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 497 497
19747 . $_tok . q{])},
19748 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19749 if defined $::RD_TRACE;
19750 497 push @item, $_tok;
19751 497 $item{__ACTION1__}=$_tok;
19752
19753  
19754 497 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpfilters, or xpbrackets <skip:""> xpinter]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 497 497
19755 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19756 q{xpintercont},
19757 $tracelevel)
19758 if defined $::RD_TRACE;
19759  
19760  
19761  
19762 497 $_matched = 1;
19763 497 last;
19764 }
19765  
19766  
19767 1647 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 1150 497 1647
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
49701150
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
19768 {
19769
19770  
19771 1150 $_[1] = $text; # NOT SURE THIS IS NEEDED
19772 1150 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1150 1150
19773 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19774 q{xpintercont},
19775 $tracelevel)
19776 if defined $::RD_TRACE;
19777 1150 return undef;
19778 }
19779 497 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 497 497
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
04970
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
19780 {
19781 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19782 q{xpintercont},
19783 $tracelevel)
19784 if defined $::RD_TRACE;
19785 0 $return = $score_return;
19786 }
19787 497 splice @{$thisparser->{errors}}, $err_at;
19788 497 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 497 0 497
19789 497 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 497 497
19790 {
19791 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
19792 $return . q{])}, "",
19793 q{xpintercont},
19794 $tracelevel);
19795 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
19796 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
19797 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19798 , q{xpintercont},
19799 $tracelevel)
19800 }
19801 497 $_[1] = $text;
19802 497 return $return;
19803 }
19804  
19805 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
19806 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xplocationstep
19807 0 ▶{
Subroutine xplocationstep: not called CC=31 SCAR=67.9
19808 0 my $thisparser = $_[0];
19809 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
19810 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
19811 0 $ERRORS = 0;
19812 0 my $thisrule = $thisparser->{"rules"}{"xplocationstep"};
19813  
19814 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xplocationstep]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19815 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19816 q{xplocationstep},
19817 $tracelevel)
19818 if defined $::RD_TRACE;
19819  
19820
19821 0 my $err_at = @{$thisparser->{errors}};
19822  
19823 0 my $score;
19824 my $score_return;
19825 0 my $_tok;
19826 0 my $return = undef;
19827 0 my $_matched=0;
19828 0 my $commit=0;
19829 0 my @item = ();
19830 0 my %item = ();
19831 0 my $repeating = $_[2];
19832 0 my $_noactions = $_[3];
19833 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
19834 0 my $_itempos = $_[5];
19835 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
19836 0 my $text;
19837 my $lastsep;
19838 0 my $current_match;
19839 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{xpaxis});
19840 0 $expectation->at($_[1]);
19841
19842 0 my $thisoffset;
19843 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
19844
19845 0 my $thiscolumn;
19846 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
19847
19848 0 my $thisline;
19849 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
19850  
19851
19852  
19853 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
19854 {
19855
19856 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpaxis xpnodetest]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19857 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19858 q{xplocationstep},
19859 $tracelevel)
19860 if defined $::RD_TRACE;
19861 0 my $thisprod = $thisrule->{"prods"}[0];
19862 0 $text = $_[1];
19863 0 my $_savetext;
19864 0 @item = (q{xplocationstep});
19865 0 %item = (__RULE__ => q{xplocationstep});
19866 0 my $repcount = 0;
19867  
19868  
19869 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [xpaxis]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19870 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19871 q{xplocationstep},
19872 $tracelevel)
19873 if defined $::RD_TRACE;
19874 0 $expectation->is(q{})->at($text);
19875
19876 0 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpaxis, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpaxis, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 0 0
19877 {
19878 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [xpaxis]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19879 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19880 q{xplocationstep},
19881 $tracelevel)
19882 if defined $::RD_TRACE;
19883 0 last;
19884 }
19885 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [xpaxis]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19886 . @$_tok . q{ times)},
19887  
19888 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19889 q{xplocationstep},
19890 $tracelevel)
19891 if defined $::RD_TRACE;
19892 0 $item{q{xpaxis(?)}} = $_tok;
19893 0 push @item, $_tok;
19894
19895  
19896  
19897 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpnodetest]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19898 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19899 q{xplocationstep},
19900 $tracelevel)
19901 if defined $::RD_TRACE;
19902 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
19903 0 $expectation->is(q{xpnodetest})->at($text);
19904 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpnodetest($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpnodetest($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
19905 {
19906
19907 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpnodetest]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19908 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19909 q{xplocationstep},
19910 $tracelevel)
19911 if defined $::RD_TRACE;
19912 0 $expectation->failed();
19913 0 last;
19914 }
19915 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpnodetest]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19916 . $_tok . q{]},
19917  
19918 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19919 q{xplocationstep},
19920 $tracelevel)
19921 if defined $::RD_TRACE;
19922 0 $item{q{xpnodetest}} = $_tok;
19923 0 push @item, $_tok;
19924
19925 }
19926  
19927 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19928 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19929 q{xplocationstep},
19930 $tracelevel)
19931 if defined $::RD_TRACE;
19932
19933  
19934 0 ▶ $_tok = ($_noactions) ? 0 : do { [ (@{$item[1]} ? $item[1][0] : 'child::'),$item[3] ] };
Branch: 2 branches
BranchTrueFalseTotal
$_noactions ? : 0 0 0
@{$item[1];} ? : 0 0 0
19935 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
19936 {
19937 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19938 if defined $::RD_TRACE;
19939 0 last;
19940 }
19941 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19942 . $_tok . q{])},
19943 XML::XSH2::Parser::_Runtime::_tracefirst($text))
19944 if defined $::RD_TRACE;
19945 0 push @item, $_tok;
19946 0 $item{__ACTION1__}=$_tok;
19947
19948  
19949 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpaxis xpnodetest]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19950 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19951 q{xplocationstep},
19952 $tracelevel)
19953 if defined $::RD_TRACE;
19954  
19955  
19956  
19957 0 $_matched = 1;
19958 0 last;
19959 }
19960  
19961  
19962 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
19963 {
19964
19965  
19966 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
19967 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19968 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
19969 q{xplocationstep},
19970 $tracelevel)
19971 if defined $::RD_TRACE;
19972 0 return undef;
19973 }
19974 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
19975 {
19976 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
19977 q{xplocationstep},
19978 $tracelevel)
19979 if defined $::RD_TRACE;
19980 0 $return = $score_return;
19981 }
19982 0 splice @{$thisparser->{errors}}, $err_at;
19983 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
19984 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
19985 {
19986 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
19987 $return . q{])}, "",
19988 q{xplocationstep},
19989 $tracelevel);
19990 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
19991 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
19992 XML::XSH2::Parser::_Runtime::_tracefirst($text),
19993 , q{xplocationstep},
19994 $tracelevel)
19995 }
19996 0 $_[1] = $text;
19997 0 return $return;
19998 }
19999  
20000 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
20001 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpnodetest
20002 0 ▶{
Subroutine xpnodetest: not called CC=24 SCAR=63.3
20003 0 my $thisparser = $_[0];
20004 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
20005 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
20006 0 $ERRORS = 0;
20007 0 my $thisrule = $thisparser->{"rules"}{"xpnodetest"};
20008  
20009 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpnodetest]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20010 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20011 q{xpnodetest},
20012 $tracelevel)
20013 if defined $::RD_TRACE;
20014  
20015
20016 0 my $err_at = @{$thisparser->{errors}};
20017  
20018 0 my $score;
20019 my $score_return;
20020 0 my $_tok;
20021 0 my $return = undef;
20022 0 my $_matched=0;
20023 0 my $commit=0;
20024 0 my @item = ();
20025 0 my %item = ();
20026 0 my $repeating = $_[2];
20027 0 my $_noactions = $_[3];
20028 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
20029 0 my $_itempos = $_[5];
20030 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
20031 0 my $text;
20032 my $lastsep;
20033 0 my $current_match;
20034 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/node\\(\\)|text\\(\\)|comment\\(\\)|processing-instruction\\(\\s*(?:"[^"]*"\\s*|'[^'*]'\\s*)?\\)|[^\\(\\[\\/\\"\\'\\&\\;\\s]+/});
20035 0 $expectation->at($_[1]);
20036
20037 0 my $thisoffset;
20038 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
20039
20040 0 my $thiscolumn;
20041 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
20042
20043 0 my $thisline;
20044 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
20045  
20046
20047  
20048 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
20049 {
20050
20051 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/node\\(\\)|text\\(\\)|comment\\(\\)|processing-instruction\\(\\s*(?:"[^"]*"\\s*|'[^'*]'\\s*)?\\)|[^\\(\\[\\/\\"\\'\\&\\;\\s]+/]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20052 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20053 q{xpnodetest},
20054 $tracelevel)
20055 if defined $::RD_TRACE;
20056 0 my $thisprod = $thisrule->{"prods"}[0];
20057 0 $text = $_[1];
20058 0 my $_savetext;
20059 0 @item = (q{xpnodetest});
20060 0 %item = (__RULE__ => q{xpnodetest});
20061 0 my $repcount = 0;
20062  
20063  
20064 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/node\\(\\)|text\\(\\)|comment\\(\\)|processing-instruction\\(\\s*(?:"[^"]*"\\s*|'[^'*]'\\s*)?\\)|[^\\(\\[\\/\\"\\'\\&\\;\\s]+/]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20065 q{xpnodetest},
20066 $tracelevel)
20067 if defined $::RD_TRACE;
20068 0 undef $lastsep;
20069 0 $expectation->is(q{})->at($text);
20070
20071  
20072 0 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:node\(\)|text\(\)|comment\(\)|processing-instruction\(\s*(?:"[^"]*"\s*|'[^'*]'\s*)?\)|[^\(\[\/\"\'\&\;\s]+)/)
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m<\A(?:node\(\)|text\(\)|comment\(\)|processing-instruction\(\s*(?:"[^"]*"\s*|'[^'*]'\s*)?\)|[^\(\[/\"\'\&\;\s]+)>) 0 0 0
Condition0%0/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m<\A(?:node\(\)|text\(\)|comment\(\)|processing-instruction\(\s*(?:"[^"]*"\s*|'[^'*]'\s*)?\)|[^\(\[/\"\'\&\;\s]+)>
!ll&&!rl&&r
000
($lastsep = $1) && ''
!ll
00
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ m<\A(?:node\(\)|text\(\)|comment\(\)|processing-instruction\(\s*(?:"[^"]*"\s*|'[^'*]'\s*)?\)|[^\(\[/\"\'\&\;\s]+)>
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ m<\A(?:node\(\)|text\(\)|comment\(\)|processing-instruction\(\s*(?:"[^"]*"\s*|'[^'*]'\s*)?\)|[^\(\[/\"\'\&\;\s]+)>
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table0%0/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ m<\A(?:node\(\)|text\(\)|comment\(\)|processing-instruction\(\s*(?:"[^"]*"\s*|'[^'*]'\s*)?\)|[^\(\[/\"\'\&\;\s]+)>
ABresult
0X0
100
111
Truth table0%0/2
A
A= ($lastsep = $1)
Aresult
00
11
20073 {
20074 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
20075 0 $expectation->failed();
20076 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20077 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20078 if defined $::RD_TRACE;
20079  
20080 0 last;
20081 }
20082 0 $current_match = substr($text, $-[0], $+[0] - $-[0]);
20083 0 substr($text,0,length($current_match),q{});
20084 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20085 . $current_match . q{])},
20086 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20087 if defined $::RD_TRACE;
20088 0 push @item, $item{__PATTERN1__}=$current_match;
20089
20090  
20091 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/node\\(\\)|text\\(\\)|comment\\(\\)|processing-instruction\\(\\s*(?:"[^"]*"\\s*|'[^'*]'\\s*)?\\)|[^\\(\\[\\/\\"\\'\\&\\;\\s]+/]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20092 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20093 q{xpnodetest},
20094 $tracelevel)
20095 if defined $::RD_TRACE;
20096  
20097  
20098  
20099 0 $_matched = 1;
20100 0 last;
20101 }
20102  
20103  
20104 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
20105 {
20106
20107  
20108 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
20109 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20110 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20111 q{xpnodetest},
20112 $tracelevel)
20113 if defined $::RD_TRACE;
20114 0 return undef;
20115 }
20116 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
20117 {
20118 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20119 q{xpnodetest},
20120 $tracelevel)
20121 if defined $::RD_TRACE;
20122 0 $return = $score_return;
20123 }
20124 0 splice @{$thisparser->{errors}}, $err_at;
20125 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
20126 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
20127 {
20128 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
20129 $return . q{])}, "",
20130 q{xpnodetest},
20131 $tracelevel);
20132 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
20133 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
20134 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20135 , q{xpnodetest},
20136 $tracelevel)
20137 }
20138 0 $_[1] = $text;
20139 0 return $return;
20140 }
20141  
20142 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
20143 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xps
20144 1647 ▶{
Subroutine xps: called CC=24 SCAR=38.1
20145 1647 my $thisparser = $_[0];
20146 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
20147 1647 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
16470
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
20148 1647 $ERRORS = 0;
20149 1647 my $thisrule = $thisparser->{"rules"}{"xps"};
20150  
20151 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xps]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
20152 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20153 q{xps},
20154 $tracelevel)
20155 if defined $::RD_TRACE;
20156  
20157
20158 1647 my $err_at = @{$thisparser->{errors}};
20159  
20160 1647 my $score;
20161 my $score_return;
20162 1647 my $_tok;
20163 1647 my $return = undef;
20164 1647 my $_matched=0;
20165 1647 my $commit=0;
20166 1647 my @item = ();
20167 1647 my %item = ();
20168 1647 my $repeating = $_[2];
20169 1647 my $_noactions = $_[3];
20170 1647 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1647 0 1647
20171 1647 my $_itempos = $_[5];
20172 1647 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1647 0 1647
20173 1647 my $text;
20174 my $lastsep;
20175 1647 my $current_match;
20176 1647 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?: [^\\$\\[\\]()'"\};]+ |
20177 \\$(?!\\\{) |
20178 \\$\\\{ (?:\\$?[a-zA-Z_][a-zA-Z0-9_]* |
20179 \\\{.*?\\\} |
20180 \\(.+?\\)
20181 )
20182 \\\} |
20183 '(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
20184 \\$(?!\\\{) | [^\\$'] | \\\\\\$
20185 )*' |
20186 "(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
20187 \\$(?!\\\{) | [^\\$"] | \\\\\\$
20188 )*"
20189 )*/x});
20190 1647 $expectation->at($_[1]);
20191
20192 1647 my $thisoffset;
20193 1647 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
20194
20195 1647 my $thiscolumn;
20196 1647 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
20197
20198 1647 my $thisline;
20199 1647 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
20200  
20201
20202  
20203 1647 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1647 0 1647
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001647
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
20204 {
20205
20206 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?: [^\\$\\[\\]()'"\};]+ |
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
20207 \\$(?!\\\{) |
20208 \\$\\\{ (?:\\$?[a-zA-Z_][a-zA-Z0-9_]* |
20209 \\\{.*?\\\} |
20210 \\(.+?\\)
20211 )
20212 \\\} |
20213 '(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
20214 \\$(?!\\\{) | [^\\$'] | \\\\\\$
20215 )*' |
20216 "(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
20217 \\$(?!\\\{) | [^\\$"] | \\\\\\$
20218 )*"
20219 )*/x]},
20220 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20221 q{xps},
20222 $tracelevel)
20223 if defined $::RD_TRACE;
20224 1647 my $thisprod = $thisrule->{"prods"}[0];
20225 1647 $text = $_[1];
20226 1647 my $_savetext;
20227 1647 @item = (q{xps});
20228 1647 %item = (__RULE__ => q{xps});
20229 1647 my $repcount = 0;
20230  
20231  
20232 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?: [^\\$\\[\\]()'"\};]+ |
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
20233 \\$(?!\\\{) |
20234 \\$\\\{ (?:\\$?[a-zA-Z_][a-zA-Z0-9_]* |
20235 \\\{.*?\\\} |
20236 \\(.+?\\)
20237 )
20238 \\\} |
20239 '(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
20240 \\$(?!\\\{) | [^\\$'] | \\\\\\$
20241 )*' |
20242 "(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
20243 \\$(?!\\\{) | [^\\$"] | \\\\\\$
20244 )*"
20245 )*/x]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
20246 q{xps},
20247 $tracelevel)
20248 if defined $::RD_TRACE;
20249 1647 undef $lastsep;
20250 1647 $expectation->is(q{})->at($text);
20251
20252  
20253 1647 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?: [^\$\[\]()'"};]+ |
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?: [^\$\[\]()'"};]+ | \$(?!\{) | \$\{ (?:\$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | '(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} | \$(?!\{) | [^\$'] | \\\$ )*' | "(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} | \$(?!\{) | [^\$"] | \\\$ )*" )*)/x) 0 1647 1647
Condition60%3/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?: [^\$\[\]()'"};]+ | \$(?!\{) | \$\{ (?:\$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | '(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} | \$(?!\{) | [^\$'] | \\\$ )*' | "(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} | \$(?!\{) | [^\$"] | \\\$ )*" )*)/x
!ll&&!rl&&r
001647
($lastsep = $1) && ''
!ll
1489158
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?: [^\$\[\]()'"};]+ | \$(?!\{) | \$\{ (?:\$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | '(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} | \$(?!\{) | [^\$'] | \\\$ )*' | "(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} | \$(?!\{) | [^\$"] | \\\$ )*" )*)/x
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?: [^\$\[\]()'"};]+ | \$(?!\{) | \$\{ (?:\$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | '(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} | \$(?!\{) | [^\$'] | \\\$ )*' | "(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} | \$(?!\{) | [^\$"] | \\\$ )*" )*)/x
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?: [^\$\[\]()'"};]+ | \$(?!\{) | \$\{ (?:\$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | '(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} | \$(?!\{) | [^\$'] | \\\$ )*' | "(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} | \$(?!\{) | [^\$"] | \\\$ )*" )*)/x
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
20254 \$(?!\{) |
20255 \$\{ (?:\$?[a-zA-Z_][a-zA-Z0-9_]* |
20256 \{.*?\} |
20257 \(.+?\)
20258 )
20259 \} |
20260 '(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} |
20261 \$(?!\{) | [^\$'] | \\\$
20262 )*' |
20263 "(?:\$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\)) \} |
20264 \$(?!\{) | [^\$"] | \\\$
20265 )*"
20266 )*)/x)
20267 {
20268 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
20269 0 $expectation->failed();
20270 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20271 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20272 if defined $::RD_TRACE;
20273  
20274 0 last;
20275 }
20276 1647 $current_match = substr($text, $-[0], $+[0] - $-[0]);
20277 1647 substr($text,0,length($current_match),q{});
20278 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
20279 . $current_match . q{])},
20280 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20281 if defined $::RD_TRACE;
20282 1647 push @item, $item{__PATTERN1__}=$current_match;
20283
20284  
20285 1647 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?: [^\\$\\[\\]()'"\};]+ |
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1647 1647
20286 \\$(?!\\\{) |
20287 \\$\\\{ (?:\\$?[a-zA-Z_][a-zA-Z0-9_]* |
20288 \\\{.*?\\\} |
20289 \\(.+?\\)
20290 )
20291 \\\} |
20292 '(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
20293 \\$(?!\\\{) | [^\\$'] | \\\\\\$
20294 )*' |
20295 "(?:\\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\)) \\\} |
20296 \\$(?!\\\{) | [^\\$"] | \\\\\\$
20297 )*"
20298 )*/x]<<},
20299 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20300 q{xps},
20301 $tracelevel)
20302 if defined $::RD_TRACE;
20303  
20304  
20305  
20306 1647 $_matched = 1;
20307 1647 last;
20308 }
20309  
20310  
20311 1647 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 1647 1647
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
164700
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
20312 {
20313
20314  
20315 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
20316 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20317 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20318 q{xps},
20319 $tracelevel)
20320 if defined $::RD_TRACE;
20321 0 return undef;
20322 }
20323 1647 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 1647 1647
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
016470
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
20324 {
20325 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20326 q{xps},
20327 $tracelevel)
20328 if defined $::RD_TRACE;
20329 0 $return = $score_return;
20330 }
20331 1647 splice @{$thisparser->{errors}}, $err_at;
20332 1647 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 1647 0 1647
20333 1647 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 1647 1647
20334 {
20335 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
20336 $return . q{])}, "",
20337 q{xps},
20338 $tracelevel);
20339 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
20340 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
20341 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20342 , q{xps},
20343 $tracelevel)
20344 }
20345 1647 $_[1] = $text;
20346 1647 return $return;
20347 }
20348  
20349 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
20350 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpsimple
20351 1763 ▶{
Subroutine xpsimple: called CC=32 SCAR=36.9
20352 1763 my $thisparser = $_[0];
20353 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
20354 1763 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
17630
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
20355 1763 $ERRORS = 0;
20356 1763 my $thisrule = $thisparser->{"rules"}{"xpsimple"};
20357  
20358 1763 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpsimple]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1763 1763
20359 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20360 q{xpsimple},
20361 $tracelevel)
20362 if defined $::RD_TRACE;
20363  
20364
20365 1763 my $err_at = @{$thisparser->{errors}};
20366  
20367 1763 my $score;
20368 my $score_return;
20369 1763 my $_tok;
20370 1763 my $return = undef;
20371 1763 my $_matched=0;
20372 1763 my $commit=0;
20373 1763 my @item = ();
20374 1763 my %item = ();
20375 1763 my $repeating = $_[2];
20376 1763 my $_noactions = $_[3];
20377 1763 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 1763 0 1763
20378 1763 my $_itempos = $_[5];
20379 1763 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 1763 0 1763
20380 1763 my $text;
20381 my $lastsep;
20382 1763 my $current_match;
20383 1763 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/(?:
20384 \\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
20385 \\$(?!\\\{) |
20386 [^-:\\$\\[\\]\{\}|"'\\ \\s();] |
20387 -[^-\\[\\]\{\}|"'\\ \\s();]
20388 )
20389 (?:
20390 \\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
20391 \\$(?!\\\{) |
20392 [^\\[\\]\\$\{\}|"'\\ \\s();]
20393 )*/x, or xpbrackets});
20394 1763 $expectation->at($_[1]);
20395
20396 1763 my $thisoffset;
20397 1763 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
20398
20399 1763 my $thiscolumn;
20400 1763 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
20401
20402 1763 my $thisline;
20403 1763 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
20404  
20405
20406  
20407 1763 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 1763 0 1763
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
001763
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
20408 {
20409
20410 1763 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/(?:
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1763 1763
20411 \\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
20412 \\$(?!\\\{) |
20413 [^-:\\$\\[\\]\{\}|"'\\ \\s();] |
20414 -[^-\\[\\]\{\}|"'\\ \\s();]
20415 )
20416 (?:
20417 \\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
20418 \\$(?!\\\{) |
20419 [^\\[\\]\\$\{\}|"'\\ \\s();]
20420 )*/x]},
20421 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20422 q{xpsimple},
20423 $tracelevel)
20424 if defined $::RD_TRACE;
20425 1763 my $thisprod = $thisrule->{"prods"}[0];
20426 1763 $text = $_[1];
20427 1763 my $_savetext;
20428 1763 @item = (q{xpsimple});
20429 1763 %item = (__RULE__ => q{xpsimple});
20430 1763 my $repcount = 0;
20431  
20432  
20433 1763 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/(?:
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 1763 1763
20434 \\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
20435 \\$(?!\\\{) |
20436 [^-:\\$\\[\\]\{\}|"'\\ \\s();] |
20437 -[^-\\[\\]\{\}|"'\\ \\s();]
20438 )
20439 (?:
20440 \\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
20441 \\$(?!\\\{) |
20442 [^\\[\\]\\$\{\}|"'\\ \\s();]
20443 )*/x]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
20444 q{xpsimple},
20445 $tracelevel)
20446 if defined $::RD_TRACE;
20447 1763 undef $lastsep;
20448 1763 $expectation->is(q{})->at($text);
20449
20450  
20451 1763 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:(?:
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?: \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | \$(?!\{) | [^-:\$\[\]{}|"'\ \s();] | -[^-\[\]{}|"'\ \s();] ) (?: \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | \$(?!\{) | [^\[\]\${}|"'\ \s();] )*)/x) 954 809 1763
Condition80%4/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?: \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | \$(?!\{) | [^-:\$\[\]{}|"'\ \s();] | -[^-\[\]{}|"'\ \s();] ) (?: \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | \$(?!\{) | [^\[\]\${}|"'\ \s();] )*)/x
!ll&&!rl&&r
0954809
($lastsep = $1) && ''
!ll
832931
MC/DC50%1/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:(?: \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | \$(?!\{) | [^-:\$\[\]{}|"'\ \s();] | -[^-\[\]{}|"'\ \s();] ) (?: \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | \$(?!\{) | [^\[\]\${}|"'\ \s();] )*)/x
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:(?: \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | \$(?!\{) | [^-:\$\[\]{}|"'\ \s();] | -[^-\[\]{}|"'\ \s();] ) (?: \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | \$(?!\{) | [^\[\]\${}|"'\ \s();] )*)/x
MC/DC100%1/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table66%2/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:(?: \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | \$(?!\{) | [^-:\$\[\]{}|"'\ \s();] | -[^-\[\]{}|"'\ \s();] ) (?: \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} | \$(?!\{) | [^\[\]\${}|"'\ \s();] )*)/x
ABresult
0X0
100
111
Truth table100%2/2
A
A= ($lastsep = $1)
Aresult
00
11
20452 \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} |
20453 \$(?!\{) |
20454 [^-:\$\[\]{}|"'\ \s();] |
20455 -[^-\[\]{}|"'\ \s();]
20456 )
20457 (?:
20458 \$\{ (?: \$?[a-zA-Z_][a-zA-Z0-9_]* | \{.*?\} | \(.+?\) ) \} |
20459 \$(?!\{) |
20460 [^\[\]\${}|"'\ \s();]
20461 )*)/x)
20462 {
20463 954 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 954 0 954
20464 954 $expectation->failed();
20465 954 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 954 954
20466 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20467 if defined $::RD_TRACE;
20468  
20469 954 last;
20470 }
20471 809 $current_match = substr($text, $-[0], $+[0] - $-[0]);
20472 809 substr($text,0,length($current_match),q{});
20473 809 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 809 809
20474 . $current_match . q{])},
20475 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20476 if defined $::RD_TRACE;
20477 809 push @item, $item{__PATTERN1__}=$current_match;
20478
20479  
20480 809 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/(?:
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 809 809
20481 \\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
20482 \\$(?!\\\{) |
20483 [^-:\\$\\[\\]\{\}|"'\\ \\s();] |
20484 -[^-\\[\\]\{\}|"'\\ \\s();]
20485 )
20486 (?:
20487 \\$\\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\{.*?\\\} | \\(.+?\\) ) \\\} |
20488 \\$(?!\\\{) |
20489 [^\\[\\]\\$\{\}|"'\\ \\s();]
20490 )*/x]<<},
20491 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20492 q{xpsimple},
20493 $tracelevel)
20494 if defined $::RD_TRACE;
20495  
20496  
20497  
20498 809 $_matched = 1;
20499 809 last;
20500 }
20501  
20502  
20503 1763 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 954 809 1763
Condition66%2/3
$_matched or $commit
l!l&&r!l&&!r
8090954
MC/DC50%1/2
$_matched or $commit
$_matched $commit
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
20504 {
20505
20506 954 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xpbrackets]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 954 954
20507 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20508 q{xpsimple},
20509 $tracelevel)
20510 if defined $::RD_TRACE;
20511 954 my $thisprod = $thisrule->{"prods"}[1];
20512 954 $text = $_[1];
20513 954 my $_savetext;
20514 954 @item = (q{xpsimple});
20515 954 %item = (__RULE__ => q{xpsimple});
20516 954 my $repcount = 0;
20517  
20518  
20519 954 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xpbrackets]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 954 954
20520 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20521 q{xpsimple},
20522 $tracelevel)
20523 if defined $::RD_TRACE;
20524 8 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.0
20525 954 $expectation->is(q{})->at($text);
20526 954 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpbrackets($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xpbrackets($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 832 122 954
20527 {
20528
20529 832 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xpbrackets]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 832 832
20530 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20531 q{xpsimple},
20532 $tracelevel)
20533 if defined $::RD_TRACE;
20534 832 $expectation->failed();
20535 832 last;
20536 }
20537 122 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xpbrackets]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 122 122
20538 . $_tok . q{]},
20539  
20540 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20541 q{xpsimple},
20542 $tracelevel)
20543 if defined $::RD_TRACE;
20544 122 $item{q{xpbrackets}} = $_tok;
20545 122 push @item, $_tok;
20546
20547 }
20548  
20549 122 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xpbrackets]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 122 122
20550 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20551 q{xpsimple},
20552 $tracelevel)
20553 if defined $::RD_TRACE;
20554  
20555  
20556  
20557 122 $_matched = 1;
20558 122 last;
20559 }
20560  
20561  
20562 1763 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 832 931 1763
Condition66%2/3
$_matched or defined $score
l!l&&r!l&&!r
9310832
MC/DC50%1/2
$_matched or defined $score
$_matched defined $score
Truth table66%2/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
20563 {
20564
20565  
20566 832 $_[1] = $text; # NOT SURE THIS IS NEEDED
20567 832 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 832 832
20568 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20569 q{xpsimple},
20570 $tracelevel)
20571 if defined $::RD_TRACE;
20572 832 return undef;
20573 }
20574 931 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 931 931
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
09310
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
20575 {
20576 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20577 q{xpsimple},
20578 $tracelevel)
20579 if defined $::RD_TRACE;
20580 0 $return = $score_return;
20581 }
20582 931 splice @{$thisparser->{errors}}, $err_at;
20583 931 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 931 0 931
20584 931 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 931 931
20585 {
20586 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
20587 $return . q{])}, "",
20588 q{xpsimple},
20589 $tracelevel);
20590 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
20591 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
20592 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20593 , q{xpsimple},
20594 $tracelevel)
20595 }
20596 931 $_[1] = $text;
20597 931 return $return;
20598 }
20599  
20600 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
20601 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpstep
20602 0 ▶{
Subroutine xpstep: not called CC=36 SCAR=70.9
20603 0 my $thisparser = $_[0];
20604 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
20605 0 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition0%0/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
00
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table0%0/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
20606 0 $ERRORS = 0;
20607 0 my $thisrule = $thisparser->{"rules"}{"xpstep"};
20608  
20609 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpstep]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20610 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20611 q{xpstep},
20612 $tracelevel)
20613 if defined $::RD_TRACE;
20614  
20615
20616 0 my $err_at = @{$thisparser->{errors}};
20617  
20618 0 my $score;
20619 my $score_return;
20620 0 my $_tok;
20621 0 my $return = undef;
20622 0 my $_matched=0;
20623 0 my $commit=0;
20624 0 my @item = ();
20625 0 my %item = ();
20626 0 my $repeating = $_[2];
20627 0 my $_noactions = $_[3];
20628 0 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 0 0 0
20629 0 my $_itempos = $_[5];
20630 0 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 0 0 0
20631 0 my $text;
20632 my $lastsep;
20633 0 my $current_match;
20634 0 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{xplocationstep});
20635 0 $expectation->at($_[1]);
20636
20637 0 my $thisoffset;
20638 0 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
20639
20640 0 my $thiscolumn;
20641 0 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
20642
20643 0 my $thisline;
20644 0 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
20645  
20646
20647  
20648 0 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 0 0 0
Condition0%0/3
$_matched or $commit
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
20649 {
20650 0 ▶ local $skip = defined($skip) ? $skip : $XML::XSH2::Parser::_Runtime::skip;
Branch: 1 branch
BranchTrueFalseTotal
defined $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip ? : 0 0 0
20651 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [xplocationstep <skip:""> xpfilter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20652 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20653 q{xpstep},
20654 $tracelevel)
20655 if defined $::RD_TRACE;
20656 0 my $thisprod = $thisrule->{"prods"}[0];
20657 0 $text = $_[1];
20658 0 my $_savetext;
20659 0 @item = (q{xpstep});
20660 0 %item = (__RULE__ => q{xpstep});
20661 0 my $repcount = 0;
20662  
20663  
20664 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying subrule: [xplocationstep]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20665 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20666 q{xpstep},
20667 $tracelevel)
20668 if defined $::RD_TRACE;
20669 0 ▶ if (1) { no strict qw{refs};
Subroutine BEGIN: called CC=1 SCAR=0.2
20670 0 $expectation->is(q{})->at($text);
20671 0 ▶ unless (defined ($_tok = XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xplocationstep($thisparser,$text,$repeating,$_noactions,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = xplocationstep($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , undef))) 0 0 0
20672 {
20673
20674 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match subrule: [xplocationstep]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20675 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20676 q{xpstep},
20677 $tracelevel)
20678 if defined $::RD_TRACE;
20679 0 $expectation->failed();
20680 0 last;
20681 }
20682 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched subrule: [xplocationstep]<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20683 . $_tok . q{]},
20684  
20685 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20686 q{xpstep},
20687 $tracelevel)
20688 if defined $::RD_TRACE;
20689 0 $item{q{xplocationstep}} = $_tok;
20690 0 push @item, $_tok;
20691
20692 }
20693  
20694
20695  
20696 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying directive: [<skip:"">]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20697 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20698 q{xpstep},
20699 $tracelevel)
20700 if defined $::RD_TRACE;
20701 0 $_tok = do { my $oldskip = $skip; $skip=""; $oldskip };
20702 0 ▶ if (defined($_tok))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_tok) { } 0 0 0
20703 {
20704 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched directive<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20705 . $_tok . q{])},
20706 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20707 if defined $::RD_TRACE;
20708 }
20709 else
20710 {
20711 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match directive>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20712 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20713 if defined $::RD_TRACE;
20714 }
20715
20716 0 ▶ last unless defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $_tok 0 0 0
20717 0 push @item, $item{__DIRECTIVE1__}=$_tok;
20718
20719  
20720 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying repeated subrule: [xpfilter]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20721 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20722 q{xpstep},
20723 $tracelevel)
20724 if defined $::RD_TRACE;
20725 0 $expectation->is(q{xpfilter})->at($text);
20726
20727 0 ▶ unless (defined ($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpfilter, 0, 1, $_noactions,$expectation,sub { \@arg },undef)))
Subroutine __ANON__: not called CC=1 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = $thisparser->_parserepeat($text, \&XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpfilter, 0, 1, $_noactions, $expectation, sub { \@arg; } , undef))) 0 0 0
20728 {
20729 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match repeated subrule: [xpfilter]>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20730 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20731 q{xpstep},
20732 $tracelevel)
20733 if defined $::RD_TRACE;
20734 0 last;
20735 }
20736 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched repeated subrule: [xpfilter]<< (}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20737 . @$_tok . q{ times)},
20738  
20739 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20740 q{xpstep},
20741 $tracelevel)
20742 if defined $::RD_TRACE;
20743 0 $item{q{xpfilter(?)}} = $_tok;
20744 0 push @item, $_tok;
20745
20746  
20747  
20748 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying action},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20749 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20750 q{xpstep},
20751 $tracelevel)
20752 if defined $::RD_TRACE;
20753
20754  
20755 0 ▶ $_tok = ($_noactions) ? 0 : do { [ @{$item[1]}, @{$item[3]}] };
Branch: 1 branch
BranchTrueFalseTotal
$_noactions ? : 0 0 0
20756 0 ▶ unless (defined $_tok)
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $_tok) 0 0 0
20757 {
20758 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match action>> (return value: [undef])})
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20759 if defined $::RD_TRACE;
20760 0 last;
20761 }
20762 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched action<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20763 . $_tok . q{])},
20764 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20765 if defined $::RD_TRACE;
20766 0 push @item, $_tok;
20767 0 $item{__ACTION1__}=$_tok;
20768
20769  
20770 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [xplocationstep <skip:""> xpfilter]<<},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20771 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20772 q{xpstep},
20773 $tracelevel)
20774 if defined $::RD_TRACE;
20775  
20776  
20777  
20778 0 $_matched = 1;
20779 0 last;
20780 }
20781  
20782  
20783 0 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 0 0
Condition0%0/3
$_matched or defined $score
l!l&&r!l&&!r
000
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
20784 {
20785
20786  
20787 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
20788 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20789 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20790 q{xpstep},
20791 $tracelevel)
20792 if defined $::RD_TRACE;
20793 0 return undef;
20794 }
20795 0 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 0 0
Condition0%0/3
not defined $return and defined $score
!ll&&!rl&&r
000
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
20796 {
20797 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20798 q{xpstep},
20799 $tracelevel)
20800 if defined $::RD_TRACE;
20801 0 $return = $score_return;
20802 }
20803 0 splice @{$thisparser->{errors}}, $err_at;
20804 0 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 0 0 0
20805 0 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 0 0
20806 {
20807 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
20808 $return . q{])}, "",
20809 q{xpstep},
20810 $tracelevel);
20811 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
20812 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
20813 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20814 , q{xpstep},
20815 $tracelevel)
20816 }
20817 0 $_[1] = $text;
20818 0 return $return;
20819 }
20820  
20821 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
20822 sub XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::xpstring
20823 503 ▶{
Subroutine xpstring: called CC=24 SCAR=38.5
20824 503 my $thisparser = $_[0];
20825 8 ▶ use vars q{$tracelevel};
Subroutine BEGIN: called CC=1 SCAR=0.0
20826 503 ▶ local $tracelevel = ($tracelevel||0)+1;
Condition50%1/2
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
l!l
5030
MC/DC0%0/1
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel || 0
$XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Truth table50%1/2
A
A= $XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::tracelevel
Aresult
11
00
20827 503 $ERRORS = 0;
20828 503 my $thisrule = $thisparser->{"rules"}{"xpstring"};
20829  
20830 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying rule: [xpstring]},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
20831 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20832 q{xpstring},
20833 $tracelevel)
20834 if defined $::RD_TRACE;
20835  
20836
20837 503 my $err_at = @{$thisparser->{errors}};
20838  
20839 503 my $score;
20840 my $score_return;
20841 503 my $_tok;
20842 503 my $return = undef;
20843 503 my $_matched=0;
20844 503 my $commit=0;
20845 503 my @item = ();
20846 503 my %item = ();
20847 503 my $repeating = $_[2];
20848 503 my $_noactions = $_[3];
20849 503 ▶ my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
Branch: 1 branch
BranchTrueFalseTotal
defined $_[4] ? : 503 0 503
20850 503 my $_itempos = $_[5];
20851 503 ▶ my %arg = ($#arg & 01) ? @arg : (@arg, undef);
Branch: 1 branch
BranchTrueFalseTotal
$#arg & 1 ? : 503 0 503
20852 503 my $text;
20853 my $lastsep;
20854 503 my $current_match;
20855 503 my $expectation = new XML::XSH2::Parser::_Runtime::Expectation(q{/'(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$']|\\\\\\$)*' |
20856 "(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$"]|\\\\\\$)*"/x});
20857 503 $expectation->at($_[1]);
20858
20859 503 my $thisoffset;
20860 503 tie $thisoffset, q{XML::XSH2::Parser::_Runtime::OffsetCounter}, \$text, $thisparser;
20861
20862 503 my $thiscolumn;
20863 503 tie $thiscolumn, q{XML::XSH2::Parser::_Runtime::ColCounter}, \$text, $thisparser;
20864
20865 503 my $thisline;
20866 503 tie $thisline, q{XML::XSH2::Parser::_Runtime::LineCounter}, \$text, $thisparser;
20867  
20868
20869  
20870 503 ▶ while (!$_matched && !$commit)
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or $commit) 503 0 503
Condition33%1/3
$_matched or $commit
l!l&&r!l&&!r
00503
MC/DC0%0/2
$_matched or $commit
$_matched $commit
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
20871 {
20872
20873 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying production: [/'(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$']|\\\\\\$)*' |
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
20874 "(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$"]|\\\\\\$)*"/x]},
20875 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20876 q{xpstring},
20877 $tracelevel)
20878 if defined $::RD_TRACE;
20879 503 my $thisprod = $thisrule->{"prods"}[0];
20880 503 $text = $_[1];
20881 503 my $_savetext;
20882 503 @item = (q{xpstring});
20883 503 %item = (__RULE__ => q{xpstring});
20884 503 my $repcount = 0;
20885  
20886  
20887 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{Trying terminal: [/'(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$']|\\\\\\$)*' |
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
20888 "(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$"]|\\\\\\$)*"/x]}, XML::XSH2::Parser::_Runtime::_tracefirst($text),
20889 q{xpstring},
20890 $tracelevel)
20891 if defined $::RD_TRACE;
20892 503 undef $lastsep;
20893 503 $expectation->is(q{})->at($text);
20894
20895  
20896 503 ▶ unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ m/\A(?:'(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$']|\\\$)*' |
Branch: 1 branch
BranchTrueFalseTotal
unless ($text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:'(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$']|\\\$)*' | "(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$"]|\\\$)*")/x) 0 503 503
Condition40%2/5
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:'(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$']|\\\$)*' | "(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$"]|\\\$)*")/x
!ll&&!rl&&r
00503
($lastsep = $1) && ''
!ll
5030
MC/DC0%0/2
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:'(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$']|\\\$)*' | "(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$"]|\\\$)*")/x
$text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:'(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$']|\\\$)*' | "(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$"]|\\\$)*")/x
MC/DC0%0/1
($lastsep = $1) && ''
($lastsep = $1)
Truth table33%1/3
A and B
A= $text =~ s/\A($XML::XSH2::Parser::_Runtime::XML::XSH2::Parser::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:'(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$']|\\\$)*' | "(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$"]|\\\$)*")/x
ABresult
0X0
100
111
Truth table50%1/2
A
A= ($lastsep = $1)
Aresult
00
11
20897 "(?:\$\{(?:\$?[a-zA-Z_][a-zA-Z0-9_]*|\{.*?\}|\(.+?\))\}|\$(?!\{)|[^\$"]|\\\$)*")/x)
20898 {
20899 0 ▶ $text = $lastsep . $text if defined $lastsep;
Branch: 1 branch
BranchTrueFalseTotal
if defined $lastsep 0 0 0
20900 0 $expectation->failed();
20901 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match terminal>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20902 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20903 if defined $::RD_TRACE;
20904  
20905 0 last;
20906 }
20907 503 $current_match = substr($text, $-[0], $+[0] - $-[0]);
20908 503 substr($text,0,length($current_match),q{});
20909 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched terminal<< (return value: [}
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
20910 . $current_match . q{])},
20911 XML::XSH2::Parser::_Runtime::_tracefirst($text))
20912 if defined $::RD_TRACE;
20913 503 push @item, $item{__PATTERN1__}=$current_match;
20914
20915  
20916 503 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Matched production: [/'(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$']|\\\\\\$)*' |
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 503 503
20917 "(?:\\$\\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\{.*?\\\}|\\(.+?\\))\\\}|\\$(?!\\\{)|[^\\$"]|\\\\\\$)*"/x]<<},
20918 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20919 q{xpstring},
20920 $tracelevel)
20921 if defined $::RD_TRACE;
20922  
20923  
20924  
20925 503 $_matched = 1;
20926 503 last;
20927 }
20928  
20929  
20930 503 ▶ unless ( $_matched || defined($score) )
Branch: 1 branch
BranchTrueFalseTotal
unless ($_matched or defined $score) 0 503 503
Condition33%1/3
$_matched or defined $score
l!l&&r!l&&!r
50300
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
20931 {
20932
20933  
20934 0 $_[1] = $text; # NOT SURE THIS IS NEEDED
20935 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{<<Didn't match rule>>},
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20936 XML::XSH2::Parser::_Runtime::_tracefirst($_[1]),
20937 q{xpstring},
20938 $tracelevel)
20939 if defined $::RD_TRACE;
20940 0 return undef;
20941 }
20942 503 ▶ if (!defined($return) && defined($score))
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $return and defined $score) 0 503 503
Condition33%1/3
not defined $return and defined $score
!ll&&!rl&&r
05030
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
20943 {
20944 0 ▶ XML::XSH2::Parser::_Runtime::_trace(q{>>Accepted scored production<<}, "",
Branch: 1 branch
BranchTrueFalseTotal
if defined $main::RD_TRACE 0 0 0
20945 q{xpstring},
20946 $tracelevel)
20947 if defined $::RD_TRACE;
20948 0 $return = $score_return;
20949 }
20950 503 splice @{$thisparser->{errors}}, $err_at;
20951 503 ▶ $return = $item[$#item] unless defined $return;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $return 503 0 503
20952 503 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 503 503
20953 {
20954 0 XML::XSH2::Parser::_Runtime::_trace(q{>>Matched rule<< (return value: [} .
20955 $return . q{])}, "",
20956 q{xpstring},
20957 $tracelevel);
20958 0 XML::XSH2::Parser::_Runtime::_trace(q{(consumed: [} .
20959 XML::XSH2::Parser::_Runtime::_tracemax(substr($_[1],0,-length($text))) . q{])},
20960 XML::XSH2::Parser::_Runtime::_tracefirst($text),
20961 , q{xpstring},
20962 $tracelevel)
20963 }
20964 503 $_[1] = $text;
20965 503 return $return;
20966 }
20967 }
20968 8 ▶package XML::XSH2::Parser; sub new { my $self = bless( {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
20969 '_AUTOACTION' => undef,
20970 '_AUTOTREE' => undef,
20971 '_check' => {
20972 'itempos' => !!0,
20973 'prevcolumn' => !!0,
20974 'prevline' => !!0,
20975 'prevoffset' => !!0,
20976 'thiscolumn' => !!1,
20977 'thisoffset' => !!1
20978 },
20979 'localvars' => '',
20980 'namespace' => 'XML::XSH2::Parser::_Runtime::XML::XSH2::Parser',
20981 'rules' => {
20982 'ID' => bless( {
20983 'calls' => [],
20984 'changed' => 0,
20985 'impcount' => 0,
20986 'line' => 170,
20987 'name' => 'ID',
20988 'opcount' => 0,
20989 'prods' => [
20990 bless( {
20991 'actcount' => 0,
20992 'dircount' => 0,
20993 'error' => undef,
20994 'items' => [
20995 bless( {
20996 'description' => '/[a-zA-Z_][a-zA-Z0-9_]*/',
20997 'hashname' => '__PATTERN1__',
20998 'ldelim' => '/',
20999 'line' => 171,
21000 'lookahead' => 0,
21001 'mod' => '',
21002 'pattern' => '[a-zA-Z_][a-zA-Z0-9_]*',
21003 'rdelim' => '/'
21004 }, 'XML::XSH2::Parser::_Runtime::Token' )
21005 ],
21006 'line' => undef,
21007 'number' => 0,
21008 'patcount' => 1,
21009 'strcount' => 0,
21010 'uncommit' => undef
21011 }, 'XML::XSH2::Parser::_Runtime::Production' )
21012 ],
21013 'vars' => ''
21014 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
21015 '_alternation_1_of_production_10_of_rule_command' => bless( {
21016 'calls' => [
21017 '_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command'
21018 ],
21019 'changed' => 0,
21020 'impcount' => 1,
21021 'line' => 439,
21022 'name' => '_alternation_1_of_production_10_of_rule_command',
21023 'opcount' => 0,
21024 'prods' => [
21025 bless( {
21026 'actcount' => 1,
21027 'dircount' => 0,
21028 'error' => undef,
21029 'items' => [
21030 bless( {
21031 'argcode' => undef,
21032 'expected' => '/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/',
21033 'line' => 447,
21034 'lookahead' => 0,
21035 'matchrule' => 0,
21036 'max' => 100000000,
21037 'min' => 0,
21038 'repspec' => 's?',
21039 'subrule' => '_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command'
21040 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
21041 bless( {
21042 'code' => '{ [ map { @$_ } @{$item[1]} ] }',
21043 'hashname' => '__ACTION1__',
21044 'line' => 447,
21045 'lookahead' => 0
21046 }, 'XML::XSH2::Parser::_Runtime::Action' )
21047 ],
21048 'line' => undef,
21049 'number' => 0,
21050 'patcount' => 0,
21051 'strcount' => 0,
21052 'uncommit' => undef
21053 }, 'XML::XSH2::Parser::_Runtime::Production' )
21054 ],
21055 'vars' => ''
21056 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
21057 '_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command' => bless( {
21058 'calls' => [
21059 'filename',
21060 'exp',
21061 'enc_string'
21062 ],
21063 'changed' => 0,
21064 'impcount' => 0,
21065 'line' => 440,
21066 'name' => '_alternation_1_of_production_1_of_rule__alternation_1_of_production_10_of_rule_command',
21067 'opcount' => 0,
21068 'prods' => [
21069 bless( {
21070 'actcount' => 1,
21071 'dircount' => 0,
21072 'error' => undef,
21073 'items' => [
21074 bless( {
21075 'description' => '/--input-file|:f/',
21076 'hashname' => '__PATTERN1__',
21077 'ldelim' => '/',
21078 'line' => 440,
21079 'lookahead' => 0,
21080 'mod' => '',
21081 'pattern' => '--input-file|:f',
21082 'rdelim' => '/'
21083 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21084 bless( {
21085 'argcode' => undef,
21086 'implicit' => undef,
21087 'line' => 440,
21088 'lookahead' => 0,
21089 'matchrule' => 0,
21090 'subrule' => 'filename'
21091 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21092 bless( {
21093 'code' => '{ [ \'string/input-file\' => $item[2] ] }',
21094 'hashname' => '__ACTION1__',
21095 'line' => 440,
21096 'lookahead' => 0
21097 }, 'XML::XSH2::Parser::_Runtime::Action' )
21098 ],
21099 'line' => undef,
21100 'number' => 0,
21101 'patcount' => 1,
21102 'strcount' => 0,
21103 'uncommit' => undef
21104 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21105 bless( {
21106 'actcount' => 1,
21107 'dircount' => 0,
21108 'error' => undef,
21109 'items' => [
21110 bless( {
21111 'description' => '/--input-pipe|:p/',
21112 'hashname' => '__PATTERN1__',
21113 'ldelim' => '/',
21114 'line' => 441,
21115 'lookahead' => 0,
21116 'mod' => '',
21117 'pattern' => '--input-pipe|:p',
21118 'rdelim' => '/'
21119 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21120 bless( {
21121 'argcode' => undef,
21122 'implicit' => undef,
21123 'line' => 441,
21124 'lookahead' => 0,
21125 'matchrule' => 0,
21126 'subrule' => 'filename'
21127 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21128 bless( {
21129 'code' => '{ [ \'string/input-pipe\' => $item[2] ] }',
21130 'hashname' => '__ACTION1__',
21131 'line' => 441,
21132 'lookahead' => 0
21133 }, 'XML::XSH2::Parser::_Runtime::Action' )
21134 ],
21135 'line' => 441,
21136 'number' => 1,
21137 'patcount' => 1,
21138 'strcount' => 0,
21139 'uncommit' => undef
21140 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21141 bless( {
21142 'actcount' => 1,
21143 'dircount' => 0,
21144 'error' => undef,
21145 'items' => [
21146 bless( {
21147 'description' => '/--input-string|:s/',
21148 'hashname' => '__PATTERN1__',
21149 'ldelim' => '/',
21150 'line' => 442,
21151 'lookahead' => 0,
21152 'mod' => '',
21153 'pattern' => '--input-string|:s',
21154 'rdelim' => '/'
21155 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21156 bless( {
21157 'argcode' => undef,
21158 'implicit' => undef,
21159 'line' => 442,
21160 'lookahead' => 0,
21161 'matchrule' => 0,
21162 'subrule' => 'exp'
21163 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21164 bless( {
21165 'code' => '{ [ \'exp/input-string\' => $item[2] ] }',
21166 'hashname' => '__ACTION1__',
21167 'line' => 442,
21168 'lookahead' => 0
21169 }, 'XML::XSH2::Parser::_Runtime::Action' )
21170 ],
21171 'line' => 442,
21172 'number' => 2,
21173 'patcount' => 1,
21174 'strcount' => 0,
21175 'uncommit' => undef
21176 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21177 bless( {
21178 'actcount' => 1,
21179 'dircount' => 0,
21180 'error' => undef,
21181 'items' => [
21182 bless( {
21183 'description' => '/--output-file|:F/',
21184 'hashname' => '__PATTERN1__',
21185 'ldelim' => '/',
21186 'line' => 443,
21187 'lookahead' => 0,
21188 'mod' => '',
21189 'pattern' => '--output-file|:F',
21190 'rdelim' => '/'
21191 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21192 bless( {
21193 'argcode' => undef,
21194 'implicit' => undef,
21195 'line' => 443,
21196 'lookahead' => 0,
21197 'matchrule' => 0,
21198 'subrule' => 'filename'
21199 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21200 bless( {
21201 'code' => '{ [ \'string/output-file\' => $item[2] ] }',
21202 'hashname' => '__ACTION1__',
21203 'line' => 443,
21204 'lookahead' => 0
21205 }, 'XML::XSH2::Parser::_Runtime::Action' )
21206 ],
21207 'line' => 443,
21208 'number' => 3,
21209 'patcount' => 1,
21210 'strcount' => 0,
21211 'uncommit' => undef
21212 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21213 bless( {
21214 'actcount' => 1,
21215 'dircount' => 0,
21216 'error' => undef,
21217 'items' => [
21218 bless( {
21219 'description' => '/--output-encoding|:E/',
21220 'hashname' => '__PATTERN1__',
21221 'ldelim' => '/',
21222 'line' => 444,
21223 'lookahead' => 0,
21224 'mod' => '',
21225 'pattern' => '--output-encoding|:E',
21226 'rdelim' => '/'
21227 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21228 bless( {
21229 'argcode' => undef,
21230 'implicit' => undef,
21231 'line' => 444,
21232 'lookahead' => 0,
21233 'matchrule' => 0,
21234 'subrule' => 'enc_string'
21235 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21236 bless( {
21237 'code' => '{ [ \'string/output-encoding\' => $item[2] ] }',
21238 'hashname' => '__ACTION1__',
21239 'line' => 444,
21240 'lookahead' => 0
21241 }, 'XML::XSH2::Parser::_Runtime::Action' )
21242 ],
21243 'line' => 444,
21244 'number' => 4,
21245 'patcount' => 1,
21246 'strcount' => 0,
21247 'uncommit' => undef
21248 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21249 bless( {
21250 'actcount' => 1,
21251 'dircount' => 0,
21252 'error' => undef,
21253 'items' => [
21254 bless( {
21255 'description' => '/--output-pipe|:P/',
21256 'hashname' => '__PATTERN1__',
21257 'ldelim' => '/',
21258 'line' => 445,
21259 'lookahead' => 0,
21260 'mod' => '',
21261 'pattern' => '--output-pipe|:P',
21262 'rdelim' => '/'
21263 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21264 bless( {
21265 'argcode' => undef,
21266 'implicit' => undef,
21267 'line' => 445,
21268 'lookahead' => 0,
21269 'matchrule' => 0,
21270 'subrule' => 'filename'
21271 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21272 bless( {
21273 'code' => '{ [ \'string/output-pipe\' => $item[2] ] }',
21274 'hashname' => '__ACTION1__',
21275 'line' => 445,
21276 'lookahead' => 0
21277 }, 'XML::XSH2::Parser::_Runtime::Action' )
21278 ],
21279 'line' => 445,
21280 'number' => 5,
21281 'patcount' => 1,
21282 'strcount' => 0,
21283 'uncommit' => undef
21284 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21285 bless( {
21286 'actcount' => 1,
21287 'dircount' => 0,
21288 'error' => undef,
21289 'items' => [
21290 bless( {
21291 'description' => '/--output-string|:S/',
21292 'hashname' => '__PATTERN1__',
21293 'ldelim' => '/',
21294 'line' => 446,
21295 'lookahead' => 0,
21296 'mod' => '',
21297 'pattern' => '--output-string|:S',
21298 'rdelim' => '/'
21299 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21300 bless( {
21301 'argcode' => undef,
21302 'implicit' => undef,
21303 'line' => 446,
21304 'lookahead' => 0,
21305 'matchrule' => 0,
21306 'subrule' => 'exp'
21307 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21308 bless( {
21309 'code' => '{ [ \'varname/output-string\' => $item[2] ] }',
21310 'hashname' => '__ACTION1__',
21311 'line' => 446,
21312 'lookahead' => 0
21313 }, 'XML::XSH2::Parser::_Runtime::Action' )
21314 ],
21315 'line' => 446,
21316 'number' => 6,
21317 'patcount' => 1,
21318 'strcount' => 0,
21319 'uncommit' => undef
21320 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21321 bless( {
21322 'actcount' => 1,
21323 'dircount' => 0,
21324 'error' => undef,
21325 'items' => [
21326 bless( {
21327 'description' => '/--no-output|:N/',
21328 'hashname' => '__PATTERN1__',
21329 'ldelim' => '/',
21330 'line' => 447,
21331 'lookahead' => 0,
21332 'mod' => '',
21333 'pattern' => '--no-output|:N',
21334 'rdelim' => '/'
21335 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21336 bless( {
21337 'code' => '{ [ \'/no-output\' => 1 ] }',
21338 'hashname' => '__ACTION1__',
21339 'line' => 447,
21340 'lookahead' => 0
21341 }, 'XML::XSH2::Parser::_Runtime::Action' )
21342 ],
21343 'line' => 447,
21344 'number' => 7,
21345 'patcount' => 1,
21346 'strcount' => 0,
21347 'uncommit' => undef
21348 }, 'XML::XSH2::Parser::_Runtime::Production' )
21349 ],
21350 'vars' => ''
21351 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
21352 '_alternation_1_of_production_1_of_rule_local_var' => bless( {
21353 'calls' => [],
21354 'changed' => 0,
21355 'impcount' => 0,
21356 'line' => 447,
21357 'name' => '_alternation_1_of_production_1_of_rule_local_var',
21358 'opcount' => 0,
21359 'prods' => [
21360 bless( {
21361 'actcount' => 0,
21362 'dircount' => 0,
21363 'error' => undef,
21364 'items' => [
21365 bless( {
21366 'description' => '/(local|my)\\\\s/',
21367 'hashname' => '__PATTERN1__',
21368 'ldelim' => '/',
21369 'line' => 447,
21370 'lookahead' => 0,
21371 'mod' => '',
21372 'pattern' => '(local|my)\\s',
21373 'rdelim' => '/'
21374 }, 'XML::XSH2::Parser::_Runtime::Token' )
21375 ],
21376 'line' => undef,
21377 'number' => 0,
21378 'patcount' => 1,
21379 'strcount' => 0,
21380 'uncommit' => undef
21381 }, 'XML::XSH2::Parser::_Runtime::Production' )
21382 ],
21383 'vars' => ''
21384 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
21385 '_alternation_1_of_production_1_of_rule_xpcont' => bless( {
21386 'calls' => [
21387 'xpfilters',
21388 'xpbrackets'
21389 ],
21390 'changed' => 0,
21391 'impcount' => 0,
21392 'line' => 446,
21393 'name' => '_alternation_1_of_production_1_of_rule_xpcont',
21394 'opcount' => 0,
21395 'prods' => [
21396 bless( {
21397 'actcount' => 0,
21398 'dircount' => 0,
21399 'error' => undef,
21400 'items' => [
21401 bless( {
21402 'argcode' => undef,
21403 'implicit' => undef,
21404 'line' => 446,
21405 'lookahead' => 0,
21406 'matchrule' => 0,
21407 'subrule' => 'xpfilters'
21408 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
21409 ],
21410 'line' => undef,
21411 'number' => 0,
21412 'patcount' => 0,
21413 'strcount' => 0,
21414 'uncommit' => undef
21415 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21416 bless( {
21417 'actcount' => 0,
21418 'dircount' => 0,
21419 'error' => undef,
21420 'items' => [
21421 bless( {
21422 'argcode' => undef,
21423 'implicit' => undef,
21424 'line' => 447,
21425 'lookahead' => 0,
21426 'matchrule' => 0,
21427 'subrule' => 'xpbrackets'
21428 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
21429 ],
21430 'line' => 447,
21431 'number' => 1,
21432 'patcount' => 0,
21433 'strcount' => 0,
21434 'uncommit' => undef
21435 }, 'XML::XSH2::Parser::_Runtime::Production' )
21436 ],
21437 'vars' => ''
21438 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
21439 '_alternation_1_of_production_1_of_rule_xpintercont' => bless( {
21440 'calls' => [
21441 'xpfilters',
21442 'xpbrackets'
21443 ],
21444 'changed' => 0,
21445 'impcount' => 0,
21446 'line' => 446,
21447 'name' => '_alternation_1_of_production_1_of_rule_xpintercont',
21448 'opcount' => 0,
21449 'prods' => [
21450 bless( {
21451 'actcount' => 0,
21452 'dircount' => 0,
21453 'error' => undef,
21454 'items' => [
21455 bless( {
21456 'argcode' => undef,
21457 'implicit' => undef,
21458 'line' => 446,
21459 'lookahead' => 0,
21460 'matchrule' => 0,
21461 'subrule' => 'xpfilters'
21462 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
21463 ],
21464 'line' => undef,
21465 'number' => 0,
21466 'patcount' => 0,
21467 'strcount' => 0,
21468 'uncommit' => undef
21469 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21470 bless( {
21471 'actcount' => 0,
21472 'dircount' => 0,
21473 'error' => undef,
21474 'items' => [
21475 bless( {
21476 'argcode' => undef,
21477 'implicit' => undef,
21478 'line' => 447,
21479 'lookahead' => 0,
21480 'matchrule' => 0,
21481 'subrule' => 'xpbrackets'
21482 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
21483 ],
21484 'line' => 447,
21485 'number' => 1,
21486 'patcount' => 0,
21487 'strcount' => 0,
21488 'uncommit' => undef
21489 }, 'XML::XSH2::Parser::_Runtime::Production' )
21490 ],
21491 'vars' => ''
21492 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
21493 '_alternation_1_of_production_2_of_rule_command' => bless( {
21494 'calls' => [
21495 'loose_exp',
21496 'command'
21497 ],
21498 'changed' => 0,
21499 'impcount' => 0,
21500 'line' => 442,
21501 'name' => '_alternation_1_of_production_2_of_rule_command',
21502 'opcount' => 0,
21503 'prods' => [
21504 bless( {
21505 'actcount' => 1,
21506 'dircount' => 1,
21507 'error' => undef,
21508 'items' => [
21509 bless( {
21510 'description' => '/(?:[\\\\-\\\\+\\\\*\\\\/%x.]|\\\\|\\\\||\\\\&\\\\&)?=/',
21511 'hashname' => '__PATTERN1__',
21512 'ldelim' => '/',
21513 'line' => 442,
21514 'lookahead' => 0,
21515 'mod' => '',
21516 'pattern' => '(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?=',
21517 'rdelim' => '/'
21518 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21519 bless( {
21520 'code' => '$commit = 1',
21521 'hashname' => '__DIRECTIVE1__',
21522 'line' => 442,
21523 'lookahead' => 0,
21524 'name' => '<commit>'
21525 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
21526 bless( {
21527 'argcode' => undef,
21528 'implicit' => undef,
21529 'line' => 442,
21530 'lookahead' => 0,
21531 'matchrule' => 0,
21532 'subrule' => 'loose_exp'
21533 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21534 bless( {
21535 'code' => '{ [\'xpath_assign\',$item[3],$item[1]] }',
21536 'hashname' => '__ACTION1__',
21537 'line' => 443,
21538 'lookahead' => 0
21539 }, 'XML::XSH2::Parser::_Runtime::Action' )
21540 ],
21541 'line' => undef,
21542 'number' => 0,
21543 'patcount' => 1,
21544 'strcount' => 0,
21545 'uncommit' => undef
21546 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21547 bless( {
21548 'actcount' => 1,
21549 'dircount' => 0,
21550 'error' => undef,
21551 'items' => [
21552 bless( {
21553 'description' => '/\\\\s*(?:[\\\\-\\\\+\\\\*\\\\/%x.]|\\\\|\\\\||\\\\&\\\\&)?:=/',
21554 'hashname' => '__PATTERN1__',
21555 'ldelim' => '/',
21556 'line' => 445,
21557 'lookahead' => 0,
21558 'mod' => '',
21559 'pattern' => '\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:=',
21560 'rdelim' => '/'
21561 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21562 bless( {
21563 'argcode' => undef,
21564 'implicit' => undef,
21565 'line' => 445,
21566 'lookahead' => 0,
21567 'matchrule' => 0,
21568 'subrule' => 'command'
21569 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21570 bless( {
21571 'code' => '{ [\'command_assign\',$item[2],$item[1]] }',
21572 'hashname' => '__ACTION1__',
21573 'line' => 446,
21574 'lookahead' => 0
21575 }, 'XML::XSH2::Parser::_Runtime::Action' )
21576 ],
21577 'line' => 445,
21578 'number' => 1,
21579 'patcount' => 1,
21580 'strcount' => 0,
21581 'uncommit' => undef
21582 }, 'XML::XSH2::Parser::_Runtime::Production' )
21583 ],
21584 'vars' => ''
21585 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
21586 'block' => bless( {
21587 'calls' => [
21588 'complex_command'
21589 ],
21590 'changed' => 0,
21591 'impcount' => 0,
21592 'line' => 131,
21593 'name' => 'block',
21594 'opcount' => 0,
21595 'prods' => [
21596 bless( {
21597 'actcount' => 1,
21598 'dircount' => 1,
21599 'error' => undef,
21600 'items' => [
21601 bless( {
21602 'description' => '\'\\{\'',
21603 'hashname' => '__STRING1__',
21604 'line' => 132,
21605 'lookahead' => 0,
21606 'pattern' => '{'
21607 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
21608 bless( {
21609 'code' => '$commit = 1',
21610 'hashname' => '__DIRECTIVE1__',
21611 'line' => 132,
21612 'lookahead' => 0,
21613 'name' => '<commit>'
21614 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
21615 bless( {
21616 'argcode' => undef,
21617 'expected' => undef,
21618 'line' => 132,
21619 'lookahead' => 0,
21620 'matchrule' => 0,
21621 'max' => 100000000,
21622 'min' => 1,
21623 'repspec' => 's',
21624 'subrule' => 'complex_command'
21625 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
21626 bless( {
21627 'description' => '\'\\}\'',
21628 'hashname' => '__STRING2__',
21629 'line' => 132,
21630 'lookahead' => 0,
21631 'pattern' => '}'
21632 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
21633 bless( {
21634 'code' => '{ [grep ref,@{$item[3]}] }',
21635 'hashname' => '__ACTION1__',
21636 'line' => 133,
21637 'lookahead' => 0
21638 }, 'XML::XSH2::Parser::_Runtime::Action' )
21639 ],
21640 'line' => undef,
21641 'number' => 0,
21642 'patcount' => 0,
21643 'strcount' => 2,
21644 'uncommit' => undef
21645 }, 'XML::XSH2::Parser::_Runtime::Production' )
21646 ],
21647 'vars' => ''
21648 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
21649 'command' => bless( {
21650 'calls' => [
21651 'variable',
21652 '_alternation_1_of_production_2_of_rule_command',
21653 'block',
21654 'exp',
21655 'command',
21656 'local_var_in',
21657 '_alternation_1_of_production_10_of_rule_command',
21658 'stream_select',
21659 'exp_or_opt'
21660 ],
21661 'changed' => 0,
21662 'impcount' => 0,
21663 'line' => 1,
21664 'name' => 'command',
21665 'opcount' => 0,
21666 'prods' => [
21667 bless( {
21668 'actcount' => 0,
21669 'dircount' => 2,
21670 'error' => undef,
21671 'items' => [
21672 bless( {
21673 'description' => '/(?=\\\\s*[\\}\\{;]|\\\\s*\\\\Z)/',
21674 'hashname' => '__PATTERN1__',
21675 'ldelim' => '/',
21676 'line' => 4,
21677 'lookahead' => 0,
21678 'mod' => '',
21679 'pattern' => '(?=\\s*[}{;]|\\s*\\Z)',
21680 'rdelim' => '/'
21681 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21682 bless( {
21683 'code' => '$commit = 1',
21684 'hashname' => '__DIRECTIVE1__',
21685 'line' => 4,
21686 'lookahead' => 0,
21687 'name' => '<commit>'
21688 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
21689 bless( {
21690 'hashname' => '__DIRECTIVE2__',
21691 'line' => 4,
21692 'lookahead' => 0,
21693 'name' => '<reject>'
21694 }, 'XML::XSH2::Parser::_Runtime::UncondReject' )
21695 ],
21696 'line' => undef,
21697 'number' => 0,
21698 'patcount' => 1,
21699 'strcount' => 0,
21700 'uncommit' => undef
21701 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21702 bless( {
21703 'actcount' => 1,
21704 'dircount' => 1,
21705 'error' => undef,
21706 'items' => [
21707 bless( {
21708 'description' => '/assign\\\\b|(?:local\\\\b|my\\\\b)?(?=\\\\s*\\\\$[a-zA-Z_][a-zA-Z0-9_]*\\\\s*\\\\s*(?:[\\\\-\\\\+\\\\*\\\\/%x.]|\\\\|\\\\||\\\\&\\\\&)?:?=)/',
21709 'hashname' => '__PATTERN1__',
21710 'ldelim' => '/',
21711 'line' => 5,
21712 'lookahead' => 0,
21713 'mod' => '',
21714 'pattern' => 'assign\\b|(?:local\\b|my\\b)?(?=\\s*\\$[a-zA-Z_][a-zA-Z0-9_]*\\s*\\s*(?:[\\-\\+\\*\\/%x.]|\\|\\||\\&\\&)?:?=)',
21715 'rdelim' => '/'
21716 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21717 bless( {
21718 'code' => '$commit = 1',
21719 'hashname' => '__DIRECTIVE1__',
21720 'line' => 5,
21721 'lookahead' => 0,
21722 'name' => '<commit>'
21723 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
21724 bless( {
21725 'argcode' => undef,
21726 'implicit' => undef,
21727 'line' => 5,
21728 'lookahead' => 0,
21729 'matchrule' => 0,
21730 'subrule' => 'variable'
21731 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21732 bless( {
21733 'argcode' => undef,
21734 'implicit' => '/(?:[\\\\-\\\\+\\\\*\\\\/%x.]|\\\\|\\\\||\\\\&\\\\&)?=/, or /\\\\s*(?:[\\\\-\\\\+\\\\*\\\\/%x.]|\\\\|\\\\||\\\\&\\\\&)?:=/',
21735 'line' => 12,
21736 'lookahead' => 0,
21737 'matchrule' => 0,
21738 'subrule' => '_alternation_1_of_production_2_of_rule_command'
21739 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21740 bless( {
21741 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,@{$item[4]},$item[1],$item[3]] }',
21742 'hashname' => '__ACTION1__',
21743 'line' => 13,
21744 'lookahead' => 0
21745 }, 'XML::XSH2::Parser::_Runtime::Action' )
21746 ],
21747 'line' => 5,
21748 'number' => 1,
21749 'patcount' => 1,
21750 'strcount' => 0,
21751 'uncommit' => undef
21752 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21753 bless( {
21754 'actcount' => 1,
21755 'dircount' => 0,
21756 'error' => undef,
21757 'items' => [
21758 bless( {
21759 'description' => '/(my)\\\\b/',
21760 'hashname' => '__PATTERN1__',
21761 'ldelim' => '/',
21762 'line' => 15,
21763 'lookahead' => 0,
21764 'mod' => '',
21765 'pattern' => '(my)\\b',
21766 'rdelim' => '/'
21767 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21768 bless( {
21769 'argcode' => undef,
21770 'expected' => undef,
21771 'line' => 15,
21772 'lookahead' => 0,
21773 'matchrule' => 0,
21774 'max' => 100000000,
21775 'min' => 1,
21776 'repspec' => 's',
21777 'subrule' => 'variable'
21778 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
21779 bless( {
21780 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'store_lex_variables\',0,@{$item[2]}] }',
21781 'hashname' => '__ACTION1__',
21782 'line' => 16,
21783 'lookahead' => 0
21784 }, 'XML::XSH2::Parser::_Runtime::Action' )
21785 ],
21786 'line' => 15,
21787 'number' => 2,
21788 'patcount' => 1,
21789 'strcount' => 0,
21790 'uncommit' => undef
21791 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21792 bless( {
21793 'actcount' => 1,
21794 'dircount' => 0,
21795 'error' => undef,
21796 'items' => [
21797 bless( {
21798 'description' => '/(local)\\\\b/',
21799 'hashname' => '__PATTERN1__',
21800 'ldelim' => '/',
21801 'line' => 18,
21802 'lookahead' => 0,
21803 'mod' => '',
21804 'pattern' => '(local)\\b',
21805 'rdelim' => '/'
21806 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21807 bless( {
21808 'argcode' => undef,
21809 'expected' => undef,
21810 'line' => 18,
21811 'lookahead' => 0,
21812 'matchrule' => 0,
21813 'max' => 100000000,
21814 'min' => 1,
21815 'repspec' => 's',
21816 'subrule' => 'variable'
21817 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
21818 bless( {
21819 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'make_local\',@{$item[2]}] }',
21820 'hashname' => '__ACTION1__',
21821 'line' => 19,
21822 'lookahead' => 0
21823 }, 'XML::XSH2::Parser::_Runtime::Action' )
21824 ],
21825 'line' => 18,
21826 'number' => 3,
21827 'patcount' => 1,
21828 'strcount' => 0,
21829 'uncommit' => undef
21830 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21831 bless( {
21832 'actcount' => 1,
21833 'dircount' => 1,
21834 'error' => undef,
21835 'items' => [
21836 bless( {
21837 'description' => '/(do)\\\\b/',
21838 'hashname' => '__PATTERN1__',
21839 'ldelim' => '/',
21840 'line' => 21,
21841 'lookahead' => 0,
21842 'mod' => '',
21843 'pattern' => '(do)\\b',
21844 'rdelim' => '/'
21845 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21846 bless( {
21847 'code' => '$commit = 1',
21848 'hashname' => '__DIRECTIVE1__',
21849 'line' => 21,
21850 'lookahead' => 0,
21851 'name' => '<commit>'
21852 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
21853 bless( {
21854 'argcode' => undef,
21855 'implicit' => undef,
21856 'line' => 21,
21857 'lookahead' => 0,
21858 'matchrule' => 0,
21859 'subrule' => 'block'
21860 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21861 bless( {
21862 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'run_commands\',$item[3],0] }',
21863 'hashname' => '__ACTION1__',
21864 'line' => 22,
21865 'lookahead' => 0
21866 }, 'XML::XSH2::Parser::_Runtime::Action' )
21867 ],
21868 'line' => 21,
21869 'number' => 4,
21870 'patcount' => 1,
21871 'strcount' => 0,
21872 'uncommit' => undef
21873 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21874 bless( {
21875 'actcount' => 1,
21876 'dircount' => 1,
21877 'error' => undef,
21878 'items' => [
21879 bless( {
21880 'description' => '/(if)\\\\b/',
21881 'hashname' => '__PATTERN1__',
21882 'ldelim' => '/',
21883 'line' => 24,
21884 'lookahead' => 0,
21885 'mod' => '',
21886 'pattern' => '(if)\\b',
21887 'rdelim' => '/'
21888 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21889 bless( {
21890 'code' => '$commit = 1',
21891 'hashname' => '__DIRECTIVE1__',
21892 'line' => 24,
21893 'lookahead' => 0,
21894 'name' => '<commit>'
21895 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
21896 bless( {
21897 'argcode' => undef,
21898 'implicit' => undef,
21899 'line' => 24,
21900 'lookahead' => 0,
21901 'matchrule' => 0,
21902 'subrule' => 'exp'
21903 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21904 bless( {
21905 'argcode' => undef,
21906 'implicit' => undef,
21907 'line' => 24,
21908 'lookahead' => 0,
21909 'matchrule' => 0,
21910 'subrule' => 'command'
21911 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21912 bless( {
21913 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'if_statement\',[$item[3],[$item[4]]]] }',
21914 'hashname' => '__ACTION1__',
21915 'line' => 25,
21916 'lookahead' => 0
21917 }, 'XML::XSH2::Parser::_Runtime::Action' )
21918 ],
21919 'line' => 24,
21920 'number' => 5,
21921 'patcount' => 1,
21922 'strcount' => 0,
21923 'uncommit' => undef
21924 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21925 bless( {
21926 'actcount' => 1,
21927 'dircount' => 1,
21928 'error' => undef,
21929 'items' => [
21930 bless( {
21931 'description' => '/(unless)\\\\b/',
21932 'hashname' => '__PATTERN1__',
21933 'ldelim' => '/',
21934 'line' => 27,
21935 'lookahead' => 0,
21936 'mod' => '',
21937 'pattern' => '(unless)\\b',
21938 'rdelim' => '/'
21939 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21940 bless( {
21941 'code' => '$commit = 1',
21942 'hashname' => '__DIRECTIVE1__',
21943 'line' => 27,
21944 'lookahead' => 0,
21945 'name' => '<commit>'
21946 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
21947 bless( {
21948 'argcode' => undef,
21949 'implicit' => undef,
21950 'line' => 27,
21951 'lookahead' => 0,
21952 'matchrule' => 0,
21953 'subrule' => 'exp'
21954 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21955 bless( {
21956 'argcode' => undef,
21957 'implicit' => undef,
21958 'line' => 27,
21959 'lookahead' => 0,
21960 'matchrule' => 0,
21961 'subrule' => 'command'
21962 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
21963 bless( {
21964 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'unless_statement\',$item[3],[$item[4]]] }',
21965 'hashname' => '__ACTION1__',
21966 'line' => 28,
21967 'lookahead' => 0
21968 }, 'XML::XSH2::Parser::_Runtime::Action' )
21969 ],
21970 'line' => 27,
21971 'number' => 6,
21972 'patcount' => 1,
21973 'strcount' => 0,
21974 'uncommit' => undef
21975 }, 'XML::XSH2::Parser::_Runtime::Production' ),
21976 bless( {
21977 'actcount' => 1,
21978 'dircount' => 1,
21979 'error' => undef,
21980 'items' => [
21981 bless( {
21982 'description' => '/(while)\\\\b/',
21983 'hashname' => '__PATTERN1__',
21984 'ldelim' => '/',
21985 'line' => 30,
21986 'lookahead' => 0,
21987 'mod' => '',
21988 'pattern' => '(while)\\b',
21989 'rdelim' => '/'
21990 }, 'XML::XSH2::Parser::_Runtime::Token' ),
21991 bless( {
21992 'code' => '$commit = 1',
21993 'hashname' => '__DIRECTIVE1__',
21994 'line' => 30,
21995 'lookahead' => 0,
21996 'name' => '<commit>'
21997 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
21998 bless( {
21999 'argcode' => undef,
22000 'implicit' => undef,
22001 'line' => 30,
22002 'lookahead' => 0,
22003 'matchrule' => 0,
22004 'subrule' => 'exp'
22005 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22006 bless( {
22007 'argcode' => undef,
22008 'implicit' => undef,
22009 'line' => 30,
22010 'lookahead' => 0,
22011 'matchrule' => 0,
22012 'subrule' => 'command'
22013 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22014 bless( {
22015 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'while_statement\',$item[3],[$item[4]]] }',
22016 'hashname' => '__ACTION1__',
22017 'line' => 31,
22018 'lookahead' => 0
22019 }, 'XML::XSH2::Parser::_Runtime::Action' )
22020 ],
22021 'line' => 30,
22022 'number' => 7,
22023 'patcount' => 1,
22024 'strcount' => 0,
22025 'uncommit' => undef
22026 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22027 bless( {
22028 'actcount' => 1,
22029 'dircount' => 1,
22030 'error' => undef,
22031 'items' => [
22032 bless( {
22033 'description' => '/(foreach|for)\\\\b/',
22034 'hashname' => '__PATTERN1__',
22035 'ldelim' => '/',
22036 'line' => 33,
22037 'lookahead' => 0,
22038 'mod' => '',
22039 'pattern' => '(foreach|for)\\b',
22040 'rdelim' => '/'
22041 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22042 bless( {
22043 'code' => '$commit = 1',
22044 'hashname' => '__DIRECTIVE1__',
22045 'line' => 33,
22046 'lookahead' => 0,
22047 'name' => '<commit>'
22048 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22049 bless( {
22050 'argcode' => undef,
22051 'expected' => undef,
22052 'line' => 33,
22053 'lookahead' => 0,
22054 'matchrule' => 0,
22055 'max' => 1,
22056 'min' => 0,
22057 'repspec' => '?',
22058 'subrule' => 'local_var_in'
22059 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
22060 bless( {
22061 'argcode' => undef,
22062 'implicit' => undef,
22063 'line' => 33,
22064 'lookahead' => 0,
22065 'matchrule' => 0,
22066 'subrule' => 'exp'
22067 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22068 bless( {
22069 'argcode' => undef,
22070 'implicit' => undef,
22071 'line' => 33,
22072 'lookahead' => 0,
22073 'matchrule' => 0,
22074 'subrule' => 'command'
22075 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22076 bless( {
22077 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'foreach_statement\',$item[4],[$item[5]],@{$item[3]}] }',
22078 'hashname' => '__ACTION1__',
22079 'line' => 34,
22080 'lookahead' => 0
22081 }, 'XML::XSH2::Parser::_Runtime::Action' )
22082 ],
22083 'line' => 33,
22084 'number' => 8,
22085 'patcount' => 1,
22086 'strcount' => 0,
22087 'uncommit' => undef
22088 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22089 bless( {
22090 'actcount' => 1,
22091 'dircount' => 1,
22092 'error' => undef,
22093 'items' => [
22094 bless( {
22095 'description' => '/(stream)\\\\b/',
22096 'hashname' => '__PATTERN1__',
22097 'ldelim' => '/',
22098 'line' => 36,
22099 'lookahead' => 0,
22100 'mod' => '',
22101 'pattern' => '(stream)\\b',
22102 'rdelim' => '/'
22103 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22104 bless( {
22105 'code' => '$commit = 1',
22106 'hashname' => '__DIRECTIVE1__',
22107 'line' => 36,
22108 'lookahead' => 0,
22109 'name' => '<commit>'
22110 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22111 bless( {
22112 'argcode' => undef,
22113 'implicit' => '/--input-file|:f/, or /--input-pipe|:p/, or /--input-string|:s/, or /--output-file|:F/, or /--output-encoding|:E/, or /--output-pipe|:P/, or /--output-string|:S/, or /--no-output|:N/',
22114 'line' => 46,
22115 'lookahead' => 0,
22116 'matchrule' => 0,
22117 'subrule' => '_alternation_1_of_production_10_of_rule_command'
22118 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22119 bless( {
22120 'argcode' => undef,
22121 'expected' => undef,
22122 'line' => 47,
22123 'lookahead' => 0,
22124 'matchrule' => 0,
22125 'max' => 100000000,
22126 'min' => 1,
22127 'repspec' => 's',
22128 'subrule' => 'stream_select'
22129 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
22130 bless( {
22131 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'stream_process\',$item[3],$item[4]] }',
22132 'hashname' => '__ACTION1__',
22133 'line' => 48,
22134 'lookahead' => 0
22135 }, 'XML::XSH2::Parser::_Runtime::Action' )
22136 ],
22137 'line' => 36,
22138 'number' => 9,
22139 'patcount' => 1,
22140 'strcount' => 0,
22141 'uncommit' => undef
22142 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22143 bless( {
22144 'actcount' => 1,
22145 'dircount' => 1,
22146 'error' => undef,
22147 'items' => [
22148 bless( {
22149 'description' => '/(undef|undefine)\\\\b/',
22150 'hashname' => '__PATTERN1__',
22151 'ldelim' => '/',
22152 'line' => 50,
22153 'lookahead' => 0,
22154 'mod' => '',
22155 'pattern' => '(undef|undefine)\\b',
22156 'rdelim' => '/'
22157 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22158 bless( {
22159 'code' => '$commit = 1',
22160 'hashname' => '__DIRECTIVE1__',
22161 'line' => 50,
22162 'lookahead' => 0,
22163 'name' => '<commit>'
22164 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22165 bless( {
22166 'description' => '/\\\\$?[a-zA-Z_][a-zA-Z0-9_]*/',
22167 'hashname' => '__PATTERN2__',
22168 'ldelim' => '/',
22169 'line' => 50,
22170 'lookahead' => 0,
22171 'mod' => '',
22172 'pattern' => '\\$?[a-zA-Z_][a-zA-Z0-9_]*',
22173 'rdelim' => '/'
22174 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22175 bless( {
22176 'code' => '{
22177 [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'undefine\',$item[3]];
22178 }',
22179 'hashname' => '__ACTION1__',
22180 'line' => 51,
22181 'lookahead' => 0
22182 }, 'XML::XSH2::Parser::_Runtime::Action' )
22183 ],
22184 'line' => 50,
22185 'number' => 10,
22186 'patcount' => 2,
22187 'strcount' => 0,
22188 'uncommit' => undef
22189 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22190 bless( {
22191 'actcount' => 1,
22192 'dircount' => 1,
22193 'error' => undef,
22194 'items' => [
22195 bless( {
22196 'description' => '/(use)\\\\b/',
22197 'hashname' => '__PATTERN1__',
22198 'ldelim' => '/',
22199 'line' => 55,
22200 'lookahead' => 0,
22201 'mod' => '',
22202 'pattern' => '(use)\\b',
22203 'rdelim' => '/'
22204 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22205 bless( {
22206 'code' => '$commit = 1',
22207 'hashname' => '__DIRECTIVE1__',
22208 'line' => 55,
22209 'lookahead' => 0,
22210 'name' => '<commit>'
22211 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22212 bless( {
22213 'description' => '/XML::XSH2::(?:Inline|Compile)/',
22214 'hashname' => '__PATTERN2__',
22215 'ldelim' => '/',
22216 'line' => 55,
22217 'lookahead' => 0,
22218 'mod' => '',
22219 'pattern' => 'XML::XSH2::(?:Inline|Compile)',
22220 'rdelim' => '/'
22221 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22222 bless( {
22223 'code' => '{ 1 }',
22224 'hashname' => '__ACTION1__',
22225 'line' => 56,
22226 'lookahead' => 0
22227 }, 'XML::XSH2::Parser::_Runtime::Action' )
22228 ],
22229 'line' => 55,
22230 'number' => 11,
22231 'patcount' => 2,
22232 'strcount' => 0,
22233 'uncommit' => undef
22234 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22235 bless( {
22236 'actcount' => 1,
22237 'dircount' => 0,
22238 'error' => undef,
22239 'items' => [
22240 bless( {
22241 'description' => '/(test-mode|test_mode)/',
22242 'hashname' => '__PATTERN1__',
22243 'ldelim' => '/',
22244 'line' => 58,
22245 'lookahead' => 0,
22246 'mod' => '',
22247 'pattern' => '(test-mode|test_mode)',
22248 'rdelim' => '/'
22249 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22250 bless( {
22251 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,"test-mode"] }',
22252 'hashname' => '__ACTION1__',
22253 'line' => 59,
22254 'lookahead' => 0
22255 }, 'XML::XSH2::Parser::_Runtime::Action' )
22256 ],
22257 'line' => 58,
22258 'number' => 12,
22259 'patcount' => 1,
22260 'strcount' => 0,
22261 'uncommit' => undef
22262 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22263 bless( {
22264 'actcount' => 1,
22265 'dircount' => 0,
22266 'error' => undef,
22267 'items' => [
22268 bless( {
22269 'description' => '/(run-mode|run_mode)/',
22270 'hashname' => '__PATTERN1__',
22271 'ldelim' => '/',
22272 'line' => 61,
22273 'lookahead' => 0,
22274 'mod' => '',
22275 'pattern' => '(run-mode|run_mode)',
22276 'rdelim' => '/'
22277 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22278 bless( {
22279 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,"run-mode"] }',
22280 'hashname' => '__ACTION1__',
22281 'line' => 62,
22282 'lookahead' => 0
22283 }, 'XML::XSH2::Parser::_Runtime::Action' )
22284 ],
22285 'line' => 61,
22286 'number' => 13,
22287 'patcount' => 1,
22288 'strcount' => 0,
22289 'uncommit' => undef
22290 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22291 bless( {
22292 'actcount' => 1,
22293 'dircount' => 0,
22294 'error' => undef,
22295 'items' => [
22296 bless( {
22297 'description' => '/(?!(?:iterate|try|def|define)\\\\b)/',
22298 'hashname' => '__PATTERN1__',
22299 'ldelim' => '/',
22300 'line' => 64,
22301 'lookahead' => 0,
22302 'mod' => '',
22303 'pattern' => '(?!(?:iterate|try|def|define)\\b)',
22304 'rdelim' => '/'
22305 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22306 bless( {
22307 'description' => '/\\\\.|[a-zA-Z_][-a-zA-Z0-9_]*/',
22308 'hashname' => '__PATTERN2__',
22309 'ldelim' => '/',
22310 'line' => 64,
22311 'lookahead' => 0,
22312 'mod' => '',
22313 'pattern' => '\\.|[a-zA-Z_][-a-zA-Z0-9_]*',
22314 'rdelim' => '/'
22315 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22316 bless( {
22317 'argcode' => undef,
22318 'expected' => undef,
22319 'line' => 64,
22320 'lookahead' => 0,
22321 'matchrule' => 0,
22322 'max' => 100000000,
22323 'min' => 0,
22324 'repspec' => 's?',
22325 'subrule' => 'exp_or_opt'
22326 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
22327 bless( {
22328 'code' => '{
22329 bless
22330 [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,$item[2],@{$item[3]}],
22331 \'XML::XSH2::Command\'
22332 }',
22333 'hashname' => '__ACTION1__',
22334 'line' => 65,
22335 'lookahead' => 0
22336 }, 'XML::XSH2::Parser::_Runtime::Action' )
22337 ],
22338 'line' => 64,
22339 'number' => 14,
22340 'patcount' => 2,
22341 'strcount' => 0,
22342 'uncommit' => undef
22343 }, 'XML::XSH2::Parser::_Runtime::Production' )
22344 ],
22345 'vars' => ''
22346 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
22347 'complex_command' => bless( {
22348 'calls' => [
22349 'statement',
22350 'trail',
22351 'command'
22352 ],
22353 'changed' => 0,
22354 'impcount' => 0,
22355 'line' => 100,
22356 'name' => 'complex_command',
22357 'opcount' => 0,
22358 'prods' => [
22359 bless( {
22360 'actcount' => 0,
22361 'dircount' => 2,
22362 'error' => undef,
22363 'items' => [
22364 bless( {
22365 'description' => '/(?=\\\\s*[\\{\\}]|\\\\s*\\\\Z)/',
22366 'hashname' => '__PATTERN1__',
22367 'ldelim' => '/',
22368 'line' => 101,
22369 'lookahead' => 0,
22370 'mod' => '',
22371 'pattern' => '(?=\\s*[{}]|\\s*\\Z)',
22372 'rdelim' => '/'
22373 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22374 bless( {
22375 'code' => '$commit = 1',
22376 'hashname' => '__DIRECTIVE1__',
22377 'line' => 101,
22378 'lookahead' => 0,
22379 'name' => '<commit>'
22380 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22381 bless( {
22382 'hashname' => '__DIRECTIVE2__',
22383 'line' => 101,
22384 'lookahead' => 0,
22385 'name' => '<reject>'
22386 }, 'XML::XSH2::Parser::_Runtime::UncondReject' )
22387 ],
22388 'line' => undef,
22389 'number' => 0,
22390 'patcount' => 1,
22391 'strcount' => 0,
22392 'uncommit' => undef
22393 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22394 bless( {
22395 'actcount' => 0,
22396 'dircount' => 1,
22397 'error' => undef,
22398 'items' => [
22399 bless( {
22400 'description' => '/\\\\s*;/',
22401 'hashname' => '__PATTERN1__',
22402 'ldelim' => '/',
22403 'line' => 102,
22404 'lookahead' => 0,
22405 'mod' => '',
22406 'pattern' => '\\s*;',
22407 'rdelim' => '/'
22408 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22409 bless( {
22410 'code' => '$commit = 1',
22411 'hashname' => '__DIRECTIVE1__',
22412 'line' => 102,
22413 'lookahead' => 0,
22414 'name' => '<commit>'
22415 }, 'XML::XSH2::Parser::_Runtime::Directive' )
22416 ],
22417 'line' => 102,
22418 'number' => 1,
22419 'patcount' => 1,
22420 'strcount' => 0,
22421 'uncommit' => undef
22422 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22423 bless( {
22424 'actcount' => 1,
22425 'dircount' => 1,
22426 'error' => undef,
22427 'items' => [
22428 bless( {
22429 'description' => '/(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\\\\b)/',
22430 'hashname' => '__PATTERN1__',
22431 'ldelim' => '/',
22432 'line' => 103,
22433 'lookahead' => 0,
22434 'mod' => '',
22435 'pattern' => '(?=(?:foreach|for|if|unless|iterate|while|try|def|define)\\b)',
22436 'rdelim' => '/'
22437 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22438 bless( {
22439 'argcode' => undef,
22440 'implicit' => undef,
22441 'line' => 103,
22442 'lookahead' => 0,
22443 'matchrule' => 0,
22444 'subrule' => 'statement'
22445 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22446 bless( {
22447 'code' => '$commit = 1',
22448 'hashname' => '__DIRECTIVE1__',
22449 'line' => 103,
22450 'lookahead' => 0,
22451 'name' => '<commit>'
22452 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22453 bless( {
22454 'argcode' => undef,
22455 'expected' => undef,
22456 'line' => 103,
22457 'lookahead' => 0,
22458 'matchrule' => 0,
22459 'max' => 1,
22460 'min' => 0,
22461 'repspec' => '?',
22462 'subrule' => 'trail'
22463 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
22464 bless( {
22465 'code' => '{
22466 if (scalar(@{$item[4]})) {
22467 if ($item[4][0][0] eq \'pipe\') {
22468 $return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'pipe_command\',[$item[2]],$item[4][0][1]]
22469 } else {
22470 $return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'string_pipe_command\',[$item[2]],$item[4][0][1]]
22471 }
22472 } else {
22473 $return=$item[2]
22474 }
22475 }',
22476 'hashname' => '__ACTION1__',
22477 'line' => 104,
22478 'lookahead' => 0
22479 }, 'XML::XSH2::Parser::_Runtime::Action' )
22480 ],
22481 'line' => 103,
22482 'number' => 2,
22483 'patcount' => 1,
22484 'strcount' => 0,
22485 'uncommit' => undef
22486 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22487 bless( {
22488 'actcount' => 1,
22489 'dircount' => 1,
22490 'error' => undef,
22491 'items' => [
22492 bless( {
22493 'argcode' => undef,
22494 'implicit' => undef,
22495 'line' => 116,
22496 'lookahead' => 0,
22497 'matchrule' => 0,
22498 'subrule' => 'command'
22499 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22500 bless( {
22501 'code' => '$commit = 1',
22502 'hashname' => '__DIRECTIVE1__',
22503 'line' => 116,
22504 'lookahead' => 0,
22505 'name' => '<commit>'
22506 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22507 bless( {
22508 'argcode' => undef,
22509 'expected' => undef,
22510 'line' => 116,
22511 'lookahead' => 0,
22512 'matchrule' => 0,
22513 'max' => 1,
22514 'min' => 0,
22515 'repspec' => '?',
22516 'subrule' => 'trail'
22517 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
22518 bless( {
22519 'description' => '/\\\\s*;|(?=\\\\s*\\}|\\\\s*\\\\Z)/',
22520 'hashname' => '__PATTERN1__',
22521 'ldelim' => '/',
22522 'line' => 116,
22523 'lookahead' => 0,
22524 'mod' => '',
22525 'pattern' => '\\s*;|(?=\\s*}|\\s*\\Z)',
22526 'rdelim' => '/'
22527 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22528 bless( {
22529 'code' => '{
22530 if (scalar(@{$item[3]})) {
22531 if ($item[3][0][0] eq \'pipe\') {
22532 $return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'pipe_command\',[$item[1]],$item[3][0][1]]
22533 } else {
22534 $return=[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'string_pipe_command\',[$item[1]],$item[3][0][1]]
22535 }
22536 } else {
22537 $return=$item[1]
22538 }
22539 }',
22540 'hashname' => '__ACTION1__',
22541 'line' => 117,
22542 'lookahead' => 0
22543 }, 'XML::XSH2::Parser::_Runtime::Action' )
22544 ],
22545 'line' => 116,
22546 'number' => 3,
22547 'patcount' => 1,
22548 'strcount' => 0,
22549 'uncommit' => undef
22550 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22551 bless( {
22552 'actcount' => 0,
22553 'dircount' => 1,
22554 'error' => 1,
22555 'items' => [
22556 bless( {
22557 'commitonly' => '',
22558 'hashname' => '__DIRECTIVE1__',
22559 'line' => 129,
22560 'lookahead' => 0,
22561 'msg' => 'Parse error near: "}.substr($text,0,40).qq{ ..."'
22562 }, 'XML::XSH2::Parser::_Runtime::Error' )
22563 ],
22564 'line' => 129,
22565 'number' => 4,
22566 'patcount' => 0,
22567 'strcount' => 0,
22568 'uncommit' => 0
22569 }, 'XML::XSH2::Parser::_Runtime::Production' )
22570 ],
22571 'vars' => ''
22572 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
22573 'else_block' => bless( {
22574 'calls' => [
22575 'block'
22576 ],
22577 'changed' => 0,
22578 'impcount' => 0,
22579 'line' => 370,
22580 'name' => 'else_block',
22581 'opcount' => 0,
22582 'prods' => [
22583 bless( {
22584 'actcount' => 1,
22585 'dircount' => 1,
22586 'error' => undef,
22587 'items' => [
22588 bless( {
22589 'description' => '/(else)\\\\b/',
22590 'hashname' => '__PATTERN1__',
22591 'ldelim' => '/',
22592 'line' => 371,
22593 'lookahead' => 0,
22594 'mod' => '',
22595 'pattern' => '(else)\\b',
22596 'rdelim' => '/'
22597 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22598 bless( {
22599 'code' => '$commit = 1',
22600 'hashname' => '__DIRECTIVE1__',
22601 'line' => 371,
22602 'lookahead' => 0,
22603 'name' => '<commit>'
22604 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22605 bless( {
22606 'argcode' => undef,
22607 'implicit' => undef,
22608 'line' => 371,
22609 'lookahead' => 0,
22610 'matchrule' => 0,
22611 'subrule' => 'block'
22612 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22613 bless( {
22614 'code' => '{ [[undef,$item[3]]] }',
22615 'hashname' => '__ACTION1__',
22616 'line' => 372,
22617 'lookahead' => 0
22618 }, 'XML::XSH2::Parser::_Runtime::Action' )
22619 ],
22620 'line' => undef,
22621 'number' => 0,
22622 'patcount' => 1,
22623 'strcount' => 0,
22624 'uncommit' => undef
22625 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22626 bless( {
22627 'actcount' => 1,
22628 'dircount' => 0,
22629 'error' => undef,
22630 'items' => [
22631 bless( {
22632 'description' => '/(?!else)/',
22633 'hashname' => '__PATTERN1__',
22634 'ldelim' => '/',
22635 'line' => 374,
22636 'lookahead' => 0,
22637 'mod' => '',
22638 'pattern' => '(?!else)',
22639 'rdelim' => '/'
22640 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22641 bless( {
22642 'code' => '{ [] }',
22643 'hashname' => '__ACTION1__',
22644 'line' => 375,
22645 'lookahead' => 0
22646 }, 'XML::XSH2::Parser::_Runtime::Action' )
22647 ],
22648 'line' => 374,
22649 'number' => 1,
22650 'patcount' => 1,
22651 'strcount' => 0,
22652 'uncommit' => undef
22653 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22654 bless( {
22655 'actcount' => 0,
22656 'dircount' => 2,
22657 'error' => undef,
22658 'items' => [
22659 bless( {
22660 'code' => '$commit=0;1',
22661 'hashname' => '__DIRECTIVE1__',
22662 'line' => 377,
22663 'lookahead' => 0,
22664 'name' => '<uncommit>'
22665 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22666 bless( {
22667 'commitonly' => '',
22668 'hashname' => '__DIRECTIVE2__',
22669 'line' => 377,
22670 'lookahead' => 0,
22671 'msg' => 'Parse error near keyword else: "}.substr($text,0,40).qq{ ..."'
22672 }, 'XML::XSH2::Parser::_Runtime::Error' )
22673 ],
22674 'line' => 377,
22675 'number' => 2,
22676 'patcount' => 0,
22677 'strcount' => 0,
22678 'uncommit' => 1
22679 }, 'XML::XSH2::Parser::_Runtime::Production' )
22680 ],
22681 'vars' => ''
22682 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
22683 'elsif_block' => bless( {
22684 'calls' => [
22685 'exp',
22686 'block',
22687 'elsif_block'
22688 ],
22689 'changed' => 0,
22690 'impcount' => 0,
22691 'line' => 361,
22692 'name' => 'elsif_block',
22693 'opcount' => 0,
22694 'prods' => [
22695 bless( {
22696 'actcount' => 1,
22697 'dircount' => 1,
22698 'error' => undef,
22699 'items' => [
22700 bless( {
22701 'description' => '/(elsif)\\\\b/',
22702 'hashname' => '__PATTERN1__',
22703 'ldelim' => '/',
22704 'line' => 362,
22705 'lookahead' => 0,
22706 'mod' => '',
22707 'pattern' => '(elsif)\\b',
22708 'rdelim' => '/'
22709 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22710 bless( {
22711 'code' => '$commit = 1',
22712 'hashname' => '__DIRECTIVE1__',
22713 'line' => 362,
22714 'lookahead' => 0,
22715 'name' => '<commit>'
22716 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22717 bless( {
22718 'argcode' => undef,
22719 'implicit' => undef,
22720 'line' => 362,
22721 'lookahead' => 0,
22722 'matchrule' => 0,
22723 'subrule' => 'exp'
22724 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22725 bless( {
22726 'argcode' => undef,
22727 'implicit' => undef,
22728 'line' => 362,
22729 'lookahead' => 0,
22730 'matchrule' => 0,
22731 'subrule' => 'block'
22732 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22733 bless( {
22734 'argcode' => undef,
22735 'implicit' => undef,
22736 'line' => 362,
22737 'lookahead' => 0,
22738 'matchrule' => 0,
22739 'subrule' => 'elsif_block'
22740 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22741 bless( {
22742 'code' => '{ [[$item[3],$item[4]],@{$item[5]}] }',
22743 'hashname' => '__ACTION1__',
22744 'line' => 363,
22745 'lookahead' => 0
22746 }, 'XML::XSH2::Parser::_Runtime::Action' )
22747 ],
22748 'line' => undef,
22749 'number' => 0,
22750 'patcount' => 1,
22751 'strcount' => 0,
22752 'uncommit' => undef
22753 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22754 bless( {
22755 'actcount' => 1,
22756 'dircount' => 0,
22757 'error' => undef,
22758 'items' => [
22759 bless( {
22760 'description' => '/(?!elsif)/',
22761 'hashname' => '__PATTERN1__',
22762 'ldelim' => '/',
22763 'line' => 365,
22764 'lookahead' => 0,
22765 'mod' => '',
22766 'pattern' => '(?!elsif)',
22767 'rdelim' => '/'
22768 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22769 bless( {
22770 'code' => '{ [] }',
22771 'hashname' => '__ACTION1__',
22772 'line' => 366,
22773 'lookahead' => 0
22774 }, 'XML::XSH2::Parser::_Runtime::Action' )
22775 ],
22776 'line' => 365,
22777 'number' => 1,
22778 'patcount' => 1,
22779 'strcount' => 0,
22780 'uncommit' => undef
22781 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22782 bless( {
22783 'actcount' => 0,
22784 'dircount' => 2,
22785 'error' => undef,
22786 'items' => [
22787 bless( {
22788 'code' => '$commit=0;1',
22789 'hashname' => '__DIRECTIVE1__',
22790 'line' => 368,
22791 'lookahead' => 0,
22792 'name' => '<uncommit>'
22793 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
22794 bless( {
22795 'commitonly' => '',
22796 'hashname' => '__DIRECTIVE2__',
22797 'line' => 368,
22798 'lookahead' => 0,
22799 'msg' => 'Parse error near keyword elsif: "}.substr($text,0,40).qq{ ..."'
22800 }, 'XML::XSH2::Parser::_Runtime::Error' )
22801 ],
22802 'line' => 368,
22803 'number' => 2,
22804 'patcount' => 0,
22805 'strcount' => 0,
22806 'uncommit' => 1
22807 }, 'XML::XSH2::Parser::_Runtime::Production' )
22808 ],
22809 'vars' => ''
22810 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
22811 'enc_string' => bless( {
22812 'calls' => [
22813 'exp'
22814 ],
22815 'changed' => 0,
22816 'impcount' => 0,
22817 'line' => 167,
22818 'name' => 'enc_string',
22819 'opcount' => 0,
22820 'prods' => [
22821 bless( {
22822 'actcount' => 0,
22823 'dircount' => 0,
22824 'error' => undef,
22825 'items' => [
22826 bless( {
22827 'argcode' => undef,
22828 'implicit' => undef,
22829 'line' => 168,
22830 'lookahead' => 0,
22831 'matchrule' => 0,
22832 'subrule' => 'exp'
22833 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
22834 ],
22835 'line' => undef,
22836 'number' => 0,
22837 'patcount' => 0,
22838 'strcount' => 0,
22839 'uncommit' => undef
22840 }, 'XML::XSH2::Parser::_Runtime::Production' )
22841 ],
22842 'vars' => ''
22843 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
22844 'eof' => bless( {
22845 'calls' => [],
22846 'changed' => 0,
22847 'impcount' => 0,
22848 'line' => 317,
22849 'name' => 'eof',
22850 'opcount' => 0,
22851 'prods' => [
22852 bless( {
22853 'actcount' => 1,
22854 'dircount' => 0,
22855 'error' => undef,
22856 'items' => [
22857 bless( {
22858 'description' => '/\\\\Z/',
22859 'hashname' => '__PATTERN1__',
22860 'ldelim' => '/',
22861 'line' => 318,
22862 'lookahead' => 0,
22863 'mod' => '',
22864 'pattern' => '\\Z',
22865 'rdelim' => '/'
22866 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22867 bless( {
22868 'code' => '{ 1; }',
22869 'hashname' => '__ACTION1__',
22870 'line' => 319,
22871 'lookahead' => 0
22872 }, 'XML::XSH2::Parser::_Runtime::Action' )
22873 ],
22874 'line' => undef,
22875 'number' => 0,
22876 'patcount' => 1,
22877 'strcount' => 0,
22878 'uncommit' => undef
22879 }, 'XML::XSH2::Parser::_Runtime::Production' )
22880 ],
22881 'vars' => ''
22882 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
22883 'exp' => bless( {
22884 'calls' => [
22885 'perl_block',
22886 'block',
22887 'inline_doc',
22888 'xpath'
22889 ],
22890 'changed' => 0,
22891 'impcount' => 0,
22892 'line' => 302,
22893 'name' => 'exp',
22894 'opcount' => 0,
22895 'prods' => [
22896 bless( {
22897 'actcount' => 1,
22898 'dircount' => 0,
22899 'error' => undef,
22900 'items' => [
22901 bless( {
22902 'description' => '/^(?=\\{)/',
22903 'hashname' => '__PATTERN1__',
22904 'ldelim' => '/',
22905 'line' => 303,
22906 'lookahead' => 0,
22907 'mod' => '',
22908 'pattern' => '^(?={)',
22909 'rdelim' => '/'
22910 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22911 bless( {
22912 'argcode' => undef,
22913 'implicit' => undef,
22914 'line' => 303,
22915 'lookahead' => 0,
22916 'matchrule' => 0,
22917 'subrule' => 'perl_block'
22918 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22919 bless( {
22920 'code' => '{ $item[2] }',
22921 'hashname' => '__ACTION1__',
22922 'line' => 304,
22923 'lookahead' => 0
22924 }, 'XML::XSH2::Parser::_Runtime::Action' )
22925 ],
22926 'line' => undef,
22927 'number' => 0,
22928 'patcount' => 1,
22929 'strcount' => 0,
22930 'uncommit' => undef
22931 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22932 bless( {
22933 'actcount' => 1,
22934 'dircount' => 0,
22935 'error' => undef,
22936 'items' => [
22937 bless( {
22938 'description' => '\'&\'',
22939 'hashname' => '__STRING1__',
22940 'line' => 306,
22941 'lookahead' => 0,
22942 'pattern' => '&'
22943 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
22944 bless( {
22945 'argcode' => undef,
22946 'implicit' => undef,
22947 'line' => 306,
22948 'lookahead' => 0,
22949 'matchrule' => 0,
22950 'subrule' => 'block'
22951 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22952 bless( {
22953 'code' => '{ $item[2] }',
22954 'hashname' => '__ACTION1__',
22955 'line' => 307,
22956 'lookahead' => 0
22957 }, 'XML::XSH2::Parser::_Runtime::Action' )
22958 ],
22959 'line' => 306,
22960 'number' => 1,
22961 'patcount' => 0,
22962 'strcount' => 1,
22963 'uncommit' => undef
22964 }, 'XML::XSH2::Parser::_Runtime::Production' ),
22965 bless( {
22966 'actcount' => 1,
22967 'dircount' => 0,
22968 'error' => undef,
22969 'items' => [
22970 bless( {
22971 'description' => '/^(?=<<)/',
22972 'hashname' => '__PATTERN1__',
22973 'ldelim' => '/',
22974 'line' => 309,
22975 'lookahead' => 0,
22976 'mod' => '',
22977 'pattern' => '^(?=<<)',
22978 'rdelim' => '/'
22979 }, 'XML::XSH2::Parser::_Runtime::Token' ),
22980 bless( {
22981 'argcode' => undef,
22982 'implicit' => undef,
22983 'line' => 309,
22984 'lookahead' => 0,
22985 'matchrule' => 0,
22986 'subrule' => 'inline_doc'
22987 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
22988 bless( {
22989 'code' => '{ $item[2] }',
22990 'hashname' => '__ACTION1__',
22991 'line' => 310,
22992 'lookahead' => 0
22993 }, 'XML::XSH2::Parser::_Runtime::Action' )
22994 ],
22995 'line' => 309,
22996 'number' => 2,
22997 'patcount' => 1,
22998 'strcount' => 0,
22999 'uncommit' => undef
23000 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23001 bless( {
23002 'actcount' => 0,
23003 'dircount' => 0,
23004 'error' => undef,
23005 'items' => [
23006 bless( {
23007 'argcode' => undef,
23008 'implicit' => undef,
23009 'line' => 312,
23010 'lookahead' => 0,
23011 'matchrule' => 0,
23012 'subrule' => 'xpath'
23013 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
23014 ],
23015 'line' => 312,
23016 'number' => 3,
23017 'patcount' => 0,
23018 'strcount' => 0,
23019 'uncommit' => undef
23020 }, 'XML::XSH2::Parser::_Runtime::Production' )
23021 ],
23022 'vars' => ''
23023 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23024 'exp_or_opt' => bless( {
23025 'calls' => [
23026 'option',
23027 'exp'
23028 ],
23029 'changed' => 0,
23030 'impcount' => 0,
23031 'line' => 136,
23032 'name' => 'exp_or_opt',
23033 'opcount' => 0,
23034 'prods' => [
23035 bless( {
23036 'actcount' => 0,
23037 'dircount' => 2,
23038 'error' => undef,
23039 'items' => [
23040 bless( {
23041 'description' => '/(?=\\\\s*[\\};]|\\\\s*\\\\Z)/',
23042 'hashname' => '__PATTERN1__',
23043 'ldelim' => '/',
23044 'line' => 137,
23045 'lookahead' => 0,
23046 'mod' => '',
23047 'pattern' => '(?=\\s*[};]|\\s*\\Z)',
23048 'rdelim' => '/'
23049 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23050 bless( {
23051 'code' => '$commit = 1',
23052 'hashname' => '__DIRECTIVE1__',
23053 'line' => 137,
23054 'lookahead' => 0,
23055 'name' => '<commit>'
23056 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
23057 bless( {
23058 'hashname' => '__DIRECTIVE2__',
23059 'line' => 137,
23060 'lookahead' => 0,
23061 'name' => '<reject>'
23062 }, 'XML::XSH2::Parser::_Runtime::UncondReject' )
23063 ],
23064 'line' => undef,
23065 'number' => 0,
23066 'patcount' => 1,
23067 'strcount' => 0,
23068 'uncommit' => undef
23069 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23070 bless( {
23071 'actcount' => 0,
23072 'dircount' => 0,
23073 'error' => undef,
23074 'items' => [
23075 bless( {
23076 'argcode' => undef,
23077 'implicit' => undef,
23078 'line' => 138,
23079 'lookahead' => 0,
23080 'matchrule' => 0,
23081 'subrule' => 'option'
23082 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
23083 ],
23084 'line' => 138,
23085 'number' => 1,
23086 'patcount' => 0,
23087 'strcount' => 0,
23088 'uncommit' => undef
23089 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23090 bless( {
23091 'actcount' => 0,
23092 'dircount' => 0,
23093 'error' => undef,
23094 'items' => [
23095 bless( {
23096 'argcode' => undef,
23097 'implicit' => undef,
23098 'line' => 139,
23099 'lookahead' => 0,
23100 'matchrule' => 0,
23101 'subrule' => 'exp'
23102 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
23103 ],
23104 'line' => 139,
23105 'number' => 2,
23106 'patcount' => 0,
23107 'strcount' => 0,
23108 'uncommit' => undef
23109 }, 'XML::XSH2::Parser::_Runtime::Production' )
23110 ],
23111 'vars' => ''
23112 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23113 'filename' => bless( {
23114 'calls' => [
23115 'exp'
23116 ],
23117 'changed' => 0,
23118 'impcount' => 0,
23119 'line' => 173,
23120 'name' => 'filename',
23121 'opcount' => 0,
23122 'prods' => [
23123 bless( {
23124 'actcount' => 0,
23125 'dircount' => 0,
23126 'error' => undef,
23127 'items' => [
23128 bless( {
23129 'argcode' => undef,
23130 'implicit' => undef,
23131 'line' => 174,
23132 'lookahead' => 0,
23133 'matchrule' => 0,
23134 'subrule' => 'exp'
23135 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
23136 ],
23137 'line' => undef,
23138 'number' => 0,
23139 'patcount' => 0,
23140 'strcount' => 0,
23141 'uncommit' => undef
23142 }, 'XML::XSH2::Parser::_Runtime::Production' )
23143 ],
23144 'vars' => ''
23145 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23146 'inline_doc' => bless( {
23147 'calls' => [
23148 'inline_doc_string'
23149 ],
23150 'changed' => 0,
23151 'impcount' => 0,
23152 'line' => 149,
23153 'name' => 'inline_doc',
23154 'opcount' => 0,
23155 'prods' => [
23156 bless( {
23157 'actcount' => 1,
23158 'dircount' => 1,
23159 'error' => undef,
23160 'items' => [
23161 bless( {
23162 'description' => '/<</',
23163 'hashname' => '__PATTERN1__',
23164 'ldelim' => '/',
23165 'line' => 150,
23166 'lookahead' => 0,
23167 'mod' => '',
23168 'pattern' => '<<',
23169 'rdelim' => '/'
23170 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23171 bless( {
23172 'argcode' => undef,
23173 'implicit' => undef,
23174 'line' => 150,
23175 'lookahead' => 0,
23176 'matchrule' => 0,
23177 'subrule' => 'inline_doc_string'
23178 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
23179 bless( {
23180 'code' => 'my $oldskip = $skip; $skip=""; $oldskip',
23181 'hashname' => '__DIRECTIVE1__',
23182 'line' => 150,
23183 'lookahead' => 0,
23184 'name' => '<skip:"">'
23185 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
23186 bless( {
23187 'description' => '/.*\\\\n/',
23188 'hashname' => '__PATTERN2__',
23189 'ldelim' => '/',
23190 'line' => 150,
23191 'lookahead' => 0,
23192 'mod' => '',
23193 'pattern' => '.*\\n',
23194 'rdelim' => '/'
23195 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23196 bless( {
23197 'description' => '/(.|\\\\n)*?\\\\n$item[2][1]\\\\s*(\\\\n|$)/',
23198 'hashname' => '__PATTERN3__',
23199 'ldelim' => '/',
23200 'line' => 150,
23201 'lookahead' => 0,
23202 'mod' => '',
23203 'pattern' => '(.|\\n)*?\\n$item[2][1]\\s*(\\n|$)',
23204 'rdelim' => '/'
23205 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23206 bless( {
23207 'code' => '{
23208 $text=$item[4].$text;
23209 local $_=$item[5]; s/\\n$item[2][1]\\s*$//;
23210 my $paren = $item[2][0];
23211 $paren = \'"\' if $paren eq "";
23212 if ($paren eq "\'") {
23213 $paren = \'"\';
23214 s{(\\\\)(.|\\n)|(\\$)}{ (defined($3) and $3 eq \'$\') ? "\\\\\\$"
23215 : ((defined($2) and $2 eq "\\\\")
23216 ? "\\\\\\\\" : ((defined($2) and $2 eq "\'") ? "\'" : (
23217 (defined($2) and $2 eq \'$\') ? "\\\\\\\\\\\\$2" :
23218 "\\\\\\\\$2"))) }eg;
23219 } "<<".$paren.$_;
23220 }',
23221 'hashname' => '__ACTION1__',
23222 'line' => 151,
23223 'lookahead' => 0
23224 }, 'XML::XSH2::Parser::_Runtime::Action' )
23225 ],
23226 'line' => undef,
23227 'number' => 0,
23228 'patcount' => 3,
23229 'strcount' => 0,
23230 'uncommit' => undef
23231 }, 'XML::XSH2::Parser::_Runtime::Production' )
23232 ],
23233 'vars' => ''
23234 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23235 'inline_doc_string' => bless( {
23236 'calls' => [],
23237 'changed' => 0,
23238 'impcount' => 0,
23239 'line' => 144,
23240 'name' => 'inline_doc_string',
23241 'opcount' => 0,
23242 'prods' => [
23243 bless( {
23244 'actcount' => 1,
23245 'dircount' => 0,
23246 'error' => undef,
23247 'items' => [
23248 bless( {
23249 'description' => '/\'[a-zA-Z_][a-zA-Z0-9_]*\'|"[a-zA-Z_][a-zA-Z0-9_]*"|\\\\([a-zA-Z_][a-zA-Z0-9_]*\\\\)|\\\\\\{[a-zA-Z_][a-zA-Z0-9_]*\\\\\\}|[a-zA-Z_][a-zA-Z0-9_]*/',
23250 'hashname' => '__PATTERN1__',
23251 'ldelim' => '/',
23252 'line' => 145,
23253 'lookahead' => 0,
23254 'mod' => '',
23255 'pattern' => '\'[a-zA-Z_][a-zA-Z0-9_]*\'|"[a-zA-Z_][a-zA-Z0-9_]*"|\\([a-zA-Z_][a-zA-Z0-9_]*\\)|\\{[a-zA-Z_][a-zA-Z0-9_]*\\}|[a-zA-Z_][a-zA-Z0-9_]*',
23256 'rdelim' => '/'
23257 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23258 bless( {
23259 'code' => '{ [($item[1]=~/^([\'"({])?(.*?)([\'")}])?$/)] }',
23260 'hashname' => '__ACTION1__',
23261 'line' => 146,
23262 'lookahead' => 0
23263 }, 'XML::XSH2::Parser::_Runtime::Action' )
23264 ],
23265 'line' => undef,
23266 'number' => 0,
23267 'patcount' => 1,
23268 'strcount' => 0,
23269 'uncommit' => undef
23270 }, 'XML::XSH2::Parser::_Runtime::Production' )
23271 ],
23272 'vars' => ''
23273 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23274 'loc' => bless( {
23275 'calls' => [],
23276 'changed' => 0,
23277 'impcount' => 0,
23278 'line' => 405,
23279 'name' => 'loc',
23280 'opcount' => 0,
23281 'prods' => [
23282 bless( {
23283 'actcount' => 1,
23284 'dircount' => 0,
23285 'error' => undef,
23286 'items' => [
23287 bless( {
23288 'description' => '/after\\\\s/',
23289 'hashname' => '__PATTERN1__',
23290 'ldelim' => '/',
23291 'line' => 406,
23292 'lookahead' => 0,
23293 'mod' => '',
23294 'pattern' => 'after\\s',
23295 'rdelim' => '/'
23296 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23297 bless( {
23298 'code' => '{ "after" }',
23299 'hashname' => '__ACTION1__',
23300 'line' => 407,
23301 'lookahead' => 0
23302 }, 'XML::XSH2::Parser::_Runtime::Action' )
23303 ],
23304 'line' => undef,
23305 'number' => 0,
23306 'patcount' => 1,
23307 'strcount' => 0,
23308 'uncommit' => undef
23309 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23310 bless( {
23311 'actcount' => 1,
23312 'dircount' => 0,
23313 'error' => undef,
23314 'items' => [
23315 bless( {
23316 'description' => '/before\\\\s/',
23317 'hashname' => '__PATTERN1__',
23318 'ldelim' => '/',
23319 'line' => 409,
23320 'lookahead' => 0,
23321 'mod' => '',
23322 'pattern' => 'before\\s',
23323 'rdelim' => '/'
23324 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23325 bless( {
23326 'code' => '{ "before" }',
23327 'hashname' => '__ACTION1__',
23328 'line' => 410,
23329 'lookahead' => 0
23330 }, 'XML::XSH2::Parser::_Runtime::Action' )
23331 ],
23332 'line' => 409,
23333 'number' => 1,
23334 'patcount' => 1,
23335 'strcount' => 0,
23336 'uncommit' => undef
23337 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23338 bless( {
23339 'actcount' => 1,
23340 'dircount' => 0,
23341 'error' => undef,
23342 'items' => [
23343 bless( {
23344 'description' => '/(in)?to\\\\s/',
23345 'hashname' => '__PATTERN1__',
23346 'ldelim' => '/',
23347 'line' => 412,
23348 'lookahead' => 0,
23349 'mod' => '',
23350 'pattern' => '(in)?to\\s',
23351 'rdelim' => '/'
23352 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23353 bless( {
23354 'code' => '{ "into" }',
23355 'hashname' => '__ACTION1__',
23356 'line' => 413,
23357 'lookahead' => 0
23358 }, 'XML::XSH2::Parser::_Runtime::Action' )
23359 ],
23360 'line' => 412,
23361 'number' => 2,
23362 'patcount' => 1,
23363 'strcount' => 0,
23364 'uncommit' => undef
23365 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23366 bless( {
23367 'actcount' => 1,
23368 'dircount' => 0,
23369 'error' => undef,
23370 'items' => [
23371 bless( {
23372 'description' => '/(append(ing)?|as\\\\s+(a\\\\s+)child(\\\\s+of)?)\\\\s/',
23373 'hashname' => '__PATTERN1__',
23374 'ldelim' => '/',
23375 'line' => 415,
23376 'lookahead' => 0,
23377 'mod' => '',
23378 'pattern' => '(append(ing)?|as\\s+(a\\s+)child(\\s+of)?)\\s',
23379 'rdelim' => '/'
23380 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23381 bless( {
23382 'code' => '{ "append" }',
23383 'hashname' => '__ACTION1__',
23384 'line' => 416,
23385 'lookahead' => 0
23386 }, 'XML::XSH2::Parser::_Runtime::Action' )
23387 ],
23388 'line' => 415,
23389 'number' => 3,
23390 'patcount' => 1,
23391 'strcount' => 0,
23392 'uncommit' => undef
23393 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23394 bless( {
23395 'actcount' => 1,
23396 'dircount' => 0,
23397 'error' => undef,
23398 'items' => [
23399 bless( {
23400 'description' => '/(prepend(ing)?|(as\\\\s+)(the\\\\s+)first(\\\\s+child(\\\\s+of)?)?)\\\\s/',
23401 'hashname' => '__PATTERN1__',
23402 'ldelim' => '/',
23403 'line' => 418,
23404 'lookahead' => 0,
23405 'mod' => '',
23406 'pattern' => '(prepend(ing)?|(as\\s+)(the\\s+)first(\\s+child(\\s+of)?)?)\\s',
23407 'rdelim' => '/'
23408 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23409 bless( {
23410 'code' => '{ "prepend" }',
23411 'hashname' => '__ACTION1__',
23412 'line' => 419,
23413 'lookahead' => 0
23414 }, 'XML::XSH2::Parser::_Runtime::Action' )
23415 ],
23416 'line' => 418,
23417 'number' => 4,
23418 'patcount' => 1,
23419 'strcount' => 0,
23420 'uncommit' => undef
23421 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23422 bless( {
23423 'actcount' => 1,
23424 'dircount' => 0,
23425 'error' => undef,
23426 'items' => [
23427 bless( {
23428 'description' => '/(replace|instead( of)?)\\\\s/',
23429 'hashname' => '__PATTERN1__',
23430 'ldelim' => '/',
23431 'line' => 421,
23432 'lookahead' => 0,
23433 'mod' => '',
23434 'pattern' => '(replace|instead( of)?)\\s',
23435 'rdelim' => '/'
23436 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23437 bless( {
23438 'code' => '{ "replace" }',
23439 'hashname' => '__ACTION1__',
23440 'line' => 422,
23441 'lookahead' => 0
23442 }, 'XML::XSH2::Parser::_Runtime::Action' )
23443 ],
23444 'line' => 421,
23445 'number' => 5,
23446 'patcount' => 1,
23447 'strcount' => 0,
23448 'uncommit' => undef
23449 }, 'XML::XSH2::Parser::_Runtime::Production' )
23450 ],
23451 'vars' => ''
23452 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23453 'local_var' => bless( {
23454 'calls' => [
23455 '_alternation_1_of_production_1_of_rule_local_var',
23456 'variable'
23457 ],
23458 'changed' => 0,
23459 'impcount' => 1,
23460 'line' => 379,
23461 'name' => 'local_var',
23462 'opcount' => 0,
23463 'prods' => [
23464 bless( {
23465 'actcount' => 1,
23466 'dircount' => 0,
23467 'error' => undef,
23468 'items' => [
23469 bless( {
23470 'argcode' => undef,
23471 'expected' => '/(local|my)\\\\s/',
23472 'line' => 381,
23473 'lookahead' => 0,
23474 'matchrule' => 0,
23475 'max' => 1,
23476 'min' => 0,
23477 'repspec' => '?',
23478 'subrule' => '_alternation_1_of_production_1_of_rule_local_var'
23479 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
23480 bless( {
23481 'argcode' => undef,
23482 'implicit' => undef,
23483 'line' => 381,
23484 'lookahead' => 0,
23485 'matchrule' => 0,
23486 'subrule' => 'variable'
23487 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
23488 bless( {
23489 'code' => '{ [$item[2],@{$item[1]}] }',
23490 'hashname' => '__ACTION1__',
23491 'line' => 382,
23492 'lookahead' => 0
23493 }, 'XML::XSH2::Parser::_Runtime::Action' )
23494 ],
23495 'line' => undef,
23496 'number' => 0,
23497 'patcount' => 0,
23498 'strcount' => 0,
23499 'uncommit' => undef
23500 }, 'XML::XSH2::Parser::_Runtime::Production' )
23501 ],
23502 'vars' => ''
23503 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23504 'local_var_in' => bless( {
23505 'calls' => [
23506 'local_var'
23507 ],
23508 'changed' => 0,
23509 'impcount' => 0,
23510 'line' => 385,
23511 'name' => 'local_var_in',
23512 'opcount' => 0,
23513 'prods' => [
23514 bless( {
23515 'actcount' => 1,
23516 'dircount' => 0,
23517 'error' => undef,
23518 'items' => [
23519 bless( {
23520 'argcode' => undef,
23521 'implicit' => undef,
23522 'line' => 386,
23523 'lookahead' => 0,
23524 'matchrule' => 0,
23525 'subrule' => 'local_var'
23526 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
23527 bless( {
23528 'description' => '\'in\'',
23529 'hashname' => '__STRING1__',
23530 'line' => 386,
23531 'lookahead' => 0,
23532 'pattern' => 'in'
23533 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
23534 bless( {
23535 'code' => '{ $item[1] }',
23536 'hashname' => '__ACTION1__',
23537 'line' => 387,
23538 'lookahead' => 0
23539 }, 'XML::XSH2::Parser::_Runtime::Action' )
23540 ],
23541 'line' => undef,
23542 'number' => 0,
23543 'patcount' => 0,
23544 'strcount' => 1,
23545 'uncommit' => undef
23546 }, 'XML::XSH2::Parser::_Runtime::Production' )
23547 ],
23548 'vars' => ''
23549 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23550 'loose_exp' => bless( {
23551 'calls' => [
23552 'perl_block',
23553 'block',
23554 'inline_doc',
23555 'xpinter'
23556 ],
23557 'changed' => 0,
23558 'impcount' => 0,
23559 'line' => 290,
23560 'name' => 'loose_exp',
23561 'opcount' => 0,
23562 'prods' => [
23563 bless( {
23564 'actcount' => 1,
23565 'dircount' => 0,
23566 'error' => undef,
23567 'items' => [
23568 bless( {
23569 'description' => '/^(?=\\{)/',
23570 'hashname' => '__PATTERN1__',
23571 'ldelim' => '/',
23572 'line' => 291,
23573 'lookahead' => 0,
23574 'mod' => '',
23575 'pattern' => '^(?={)',
23576 'rdelim' => '/'
23577 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23578 bless( {
23579 'argcode' => undef,
23580 'implicit' => undef,
23581 'line' => 291,
23582 'lookahead' => 0,
23583 'matchrule' => 0,
23584 'subrule' => 'perl_block'
23585 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
23586 bless( {
23587 'code' => '{ $item[2] }',
23588 'hashname' => '__ACTION1__',
23589 'line' => 292,
23590 'lookahead' => 0
23591 }, 'XML::XSH2::Parser::_Runtime::Action' )
23592 ],
23593 'line' => undef,
23594 'number' => 0,
23595 'patcount' => 1,
23596 'strcount' => 0,
23597 'uncommit' => undef
23598 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23599 bless( {
23600 'actcount' => 1,
23601 'dircount' => 0,
23602 'error' => undef,
23603 'items' => [
23604 bless( {
23605 'description' => '\'&\'',
23606 'hashname' => '__STRING1__',
23607 'line' => 294,
23608 'lookahead' => 0,
23609 'pattern' => '&'
23610 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
23611 bless( {
23612 'argcode' => undef,
23613 'implicit' => undef,
23614 'line' => 294,
23615 'lookahead' => 0,
23616 'matchrule' => 0,
23617 'subrule' => 'block'
23618 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
23619 bless( {
23620 'code' => '{ $item[2] }',
23621 'hashname' => '__ACTION1__',
23622 'line' => 295,
23623 'lookahead' => 0
23624 }, 'XML::XSH2::Parser::_Runtime::Action' )
23625 ],
23626 'line' => 294,
23627 'number' => 1,
23628 'patcount' => 0,
23629 'strcount' => 1,
23630 'uncommit' => undef
23631 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23632 bless( {
23633 'actcount' => 1,
23634 'dircount' => 0,
23635 'error' => undef,
23636 'items' => [
23637 bless( {
23638 'description' => '/^(?=<<)/',
23639 'hashname' => '__PATTERN1__',
23640 'ldelim' => '/',
23641 'line' => 297,
23642 'lookahead' => 0,
23643 'mod' => '',
23644 'pattern' => '^(?=<<)',
23645 'rdelim' => '/'
23646 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23647 bless( {
23648 'argcode' => undef,
23649 'implicit' => undef,
23650 'line' => 297,
23651 'lookahead' => 0,
23652 'matchrule' => 0,
23653 'subrule' => 'inline_doc'
23654 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
23655 bless( {
23656 'code' => '{ $item[2] }',
23657 'hashname' => '__ACTION1__',
23658 'line' => 298,
23659 'lookahead' => 0
23660 }, 'XML::XSH2::Parser::_Runtime::Action' )
23661 ],
23662 'line' => 297,
23663 'number' => 2,
23664 'patcount' => 1,
23665 'strcount' => 0,
23666 'uncommit' => undef
23667 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23668 bless( {
23669 'actcount' => 0,
23670 'dircount' => 0,
23671 'error' => undef,
23672 'items' => [
23673 bless( {
23674 'argcode' => undef,
23675 'implicit' => undef,
23676 'line' => 300,
23677 'lookahead' => 0,
23678 'matchrule' => 0,
23679 'subrule' => 'xpinter'
23680 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
23681 ],
23682 'line' => 300,
23683 'number' => 3,
23684 'patcount' => 0,
23685 'strcount' => 0,
23686 'uncommit' => undef
23687 }, 'XML::XSH2::Parser::_Runtime::Production' )
23688 ],
23689 'vars' => ''
23690 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23691 'nodename' => bless( {
23692 'calls' => [
23693 'exp'
23694 ],
23695 'changed' => 0,
23696 'impcount' => 0,
23697 'line' => 176,
23698 'name' => 'nodename',
23699 'opcount' => 0,
23700 'prods' => [
23701 bless( {
23702 'actcount' => 0,
23703 'dircount' => 0,
23704 'error' => undef,
23705 'items' => [
23706 bless( {
23707 'argcode' => undef,
23708 'implicit' => undef,
23709 'line' => 177,
23710 'lookahead' => 0,
23711 'matchrule' => 0,
23712 'subrule' => 'exp'
23713 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
23714 ],
23715 'line' => undef,
23716 'number' => 0,
23717 'patcount' => 0,
23718 'strcount' => 0,
23719 'uncommit' => undef
23720 }, 'XML::XSH2::Parser::_Runtime::Production' )
23721 ],
23722 'vars' => ''
23723 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23724 'nodetype' => bless( {
23725 'calls' => [],
23726 'changed' => 0,
23727 'impcount' => 0,
23728 'line' => 402,
23729 'name' => 'nodetype',
23730 'opcount' => 0,
23731 'prods' => [
23732 bless( {
23733 'actcount' => 0,
23734 'dircount' => 0,
23735 'error' => undef,
23736 'items' => [
23737 bless( {
23738 'description' => '/element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference/',
23739 'hashname' => '__PATTERN1__',
23740 'ldelim' => '/',
23741 'line' => 403,
23742 'lookahead' => 0,
23743 'mod' => '',
23744 'pattern' => 'element|attribute|attributes|text|cdata|pi|comment|chunk|entity_reference',
23745 'rdelim' => '/'
23746 }, 'XML::XSH2::Parser::_Runtime::Token' )
23747 ],
23748 'line' => undef,
23749 'number' => 0,
23750 'patcount' => 1,
23751 'strcount' => 0,
23752 'uncommit' => undef
23753 }, 'XML::XSH2::Parser::_Runtime::Production' )
23754 ],
23755 'vars' => ''
23756 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23757 'option' => bless( {
23758 'calls' => [],
23759 'changed' => 0,
23760 'impcount' => 0,
23761 'line' => 141,
23762 'name' => 'option',
23763 'opcount' => 0,
23764 'prods' => [
23765 bless( {
23766 'actcount' => 0,
23767 'dircount' => 0,
23768 'error' => undef,
23769 'items' => [
23770 bless( {
23771 'description' => '/:[[:alnum:]]|--[-_[:alnum:]]+/',
23772 'hashname' => '__PATTERN1__',
23773 'ldelim' => '/',
23774 'line' => 142,
23775 'lookahead' => 0,
23776 'mod' => '',
23777 'pattern' => ':[[:alnum:]]|--[-_[:alnum:]]+',
23778 'rdelim' => '/'
23779 }, 'XML::XSH2::Parser::_Runtime::Token' )
23780 ],
23781 'line' => undef,
23782 'number' => 0,
23783 'patcount' => 1,
23784 'strcount' => 0,
23785 'uncommit' => undef
23786 }, 'XML::XSH2::Parser::_Runtime::Production' )
23787 ],
23788 'vars' => ''
23789 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23790 'param' => bless( {
23791 'calls' => [
23792 'exp'
23793 ],
23794 'changed' => 0,
23795 'impcount' => 0,
23796 'line' => 397,
23797 'name' => 'param',
23798 'opcount' => 0,
23799 'prods' => [
23800 bless( {
23801 'actcount' => 1,
23802 'dircount' => 0,
23803 'error' => undef,
23804 'items' => [
23805 bless( {
23806 'description' => '/[^=\\\\s]+/',
23807 'hashname' => '__PATTERN1__',
23808 'ldelim' => '/',
23809 'line' => 398,
23810 'lookahead' => 0,
23811 'mod' => '',
23812 'pattern' => '[^=\\s]+',
23813 'rdelim' => '/'
23814 }, 'XML::XSH2::Parser::_Runtime::Token' ),
23815 bless( {
23816 'description' => '\'=\'',
23817 'hashname' => '__STRING1__',
23818 'line' => 398,
23819 'lookahead' => 0,
23820 'pattern' => '='
23821 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
23822 bless( {
23823 'argcode' => undef,
23824 'implicit' => undef,
23825 'line' => 398,
23826 'lookahead' => 0,
23827 'matchrule' => 0,
23828 'subrule' => 'exp'
23829 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
23830 bless( {
23831 'code' => '{ [$item[1],$item[3]] }',
23832 'hashname' => '__ACTION1__',
23833 'line' => 399,
23834 'lookahead' => 0
23835 }, 'XML::XSH2::Parser::_Runtime::Action' )
23836 ],
23837 'line' => undef,
23838 'number' => 0,
23839 'patcount' => 1,
23840 'strcount' => 1,
23841 'uncommit' => undef
23842 }, 'XML::XSH2::Parser::_Runtime::Production' )
23843 ],
23844 'vars' => ''
23845 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23846 'perl_block' => bless( {
23847 'calls' => [],
23848 'changed' => 0,
23849 'impcount' => 0,
23850 'line' => 272,
23851 'name' => 'perl_block',
23852 'opcount' => 0,
23853 'prods' => [
23854 bless( {
23855 'actcount' => 1,
23856 'dircount' => 1,
23857 'error' => undef,
23858 'items' => [
23859 bless( {
23860 'code' => '{ $main::myline = $thisline; }',
23861 'hashname' => '__ACTION1__',
23862 'line' => 274,
23863 'lookahead' => 0
23864 }, 'XML::XSH2::Parser::_Runtime::Action' ),
23865 bless( {
23866 'hashname' => '__DIRECTIVE1__',
23867 'line' => 275,
23868 'lookahead' => 0,
23869 'name' => '<reject>'
23870 }, 'XML::XSH2::Parser::_Runtime::UncondReject' )
23871 ],
23872 'line' => undef,
23873 'number' => 0,
23874 'patcount' => 0,
23875 'strcount' => 0,
23876 'uncommit' => undef
23877 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23878 bless( {
23879 'actcount' => 1,
23880 'dircount' => 1,
23881 'error' => undef,
23882 'items' => [
23883 bless( {
23884 'code' => '{ $main::myline = $thisline; }',
23885 'hashname' => '__ACTION1__',
23886 'line' => 277,
23887 'lookahead' => 0
23888 }, 'XML::XSH2::Parser::_Runtime::Action' ),
23889 bless( {
23890 'hashname' => '__DIRECTIVE1__',
23891 'line' => 278,
23892 'lookahead' => 0,
23893 'name' => '<reject>'
23894 }, 'XML::XSH2::Parser::_Runtime::UncondReject' )
23895 ],
23896 'line' => 276,
23897 'number' => 1,
23898 'patcount' => 0,
23899 'strcount' => 0,
23900 'uncommit' => undef
23901 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23902 bless( {
23903 'actcount' => 1,
23904 'dircount' => 1,
23905 'error' => undef,
23906 'items' => [
23907 bless( {
23908 'code' => 'Text::Balanced::extract_codeblock($text,undef,$skip,\'{}\');
23909 ',
23910 'hashname' => '__DIRECTIVE1__',
23911 'line' => 279,
23912 'lookahead' => 0,
23913 'name' => '<perl_codeblock>'
23914 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
23915 bless( {
23916 'code' => '{ {
23917 $return=$item[1];
23918 {
23919 local $^W = 0; # don\'t warn about undefined contants
23920 my $pos="# line $main::myline \\"$XML::XSH2::Functions::SCRIPT\\"\\n";
23921 $return=~s/^\\{/\\{\\n$pos/;
23922 }
23923 } }',
23924 'hashname' => '__ACTION1__',
23925 'line' => 280,
23926 'lookahead' => 0
23927 }, 'XML::XSH2::Parser::_Runtime::Action' )
23928 ],
23929 'line' => 279,
23930 'number' => 2,
23931 'patcount' => 0,
23932 'strcount' => 0,
23933 'uncommit' => undef
23934 }, 'XML::XSH2::Parser::_Runtime::Production' )
23935 ],
23936 'vars' => ''
23937 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
23938 'perl_expression' => bless( {
23939 'calls' => [
23940 'exp'
23941 ],
23942 'changed' => 0,
23943 'impcount' => 0,
23944 'line' => 264,
23945 'name' => 'perl_expression',
23946 'opcount' => 0,
23947 'prods' => [
23948 bless( {
23949 'actcount' => 1,
23950 'dircount' => 1,
23951 'error' => undef,
23952 'items' => [
23953 bless( {
23954 'code' => '{ $main::myline = $thisline; }',
23955 'hashname' => '__ACTION1__',
23956 'line' => 266,
23957 'lookahead' => 0
23958 }, 'XML::XSH2::Parser::_Runtime::Action' ),
23959 bless( {
23960 'hashname' => '__DIRECTIVE1__',
23961 'line' => 267,
23962 'lookahead' => 0,
23963 'name' => '<reject>'
23964 }, 'XML::XSH2::Parser::_Runtime::UncondReject' )
23965 ],
23966 'line' => undef,
23967 'number' => 0,
23968 'patcount' => 0,
23969 'strcount' => 0,
23970 'uncommit' => undef
23971 }, 'XML::XSH2::Parser::_Runtime::Production' ),
23972 bless( {
23973 'actcount' => 1,
23974 'dircount' => 0,
23975 'error' => undef,
23976 'items' => [
23977 bless( {
23978 'argcode' => undef,
23979 'implicit' => undef,
23980 'line' => 268,
23981 'lookahead' => 0,
23982 'matchrule' => 0,
23983 'subrule' => 'exp'
23984 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
23985 bless( {
23986 'code' => '{ {local $^W=0; "\\n# line $main::myline \\"$XML::XSH2::Functions::SCRIPT\\"\\n".$item[1]} }',
23987 'hashname' => '__ACTION1__',
23988 'line' => 269,
23989 'lookahead' => 0
23990 }, 'XML::XSH2::Parser::_Runtime::Action' )
23991 ],
23992 'line' => 268,
23993 'number' => 1,
23994 'patcount' => 0,
23995 'strcount' => 0,
23996 'uncommit' => undef
23997 }, 'XML::XSH2::Parser::_Runtime::Production' )
23998 ],
23999 'vars' => ''
24000 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
24001 'shell' => bless( {
24002 'calls' => [],
24003 'changed' => 0,
24004 'impcount' => 0,
24005 'line' => 355,
24006 'name' => 'shell',
24007 'opcount' => 0,
24008 'prods' => [
24009 bless( {
24010 'actcount' => 1,
24011 'dircount' => 1,
24012 'error' => undef,
24013 'items' => [
24014 bless( {
24015 'description' => '/!\\\\s*/',
24016 'hashname' => '__PATTERN1__',
24017 'ldelim' => '/',
24018 'line' => 356,
24019 'lookahead' => 0,
24020 'mod' => '',
24021 'pattern' => '!\\s*',
24022 'rdelim' => '/'
24023 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24024 bless( {
24025 'code' => '$commit = 1',
24026 'hashname' => '__DIRECTIVE1__',
24027 'line' => 356,
24028 'lookahead' => 0,
24029 'name' => '<commit>'
24030 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24031 bless( {
24032 'description' => '/.*/',
24033 'hashname' => '__PATTERN2__',
24034 'ldelim' => '/',
24035 'line' => 356,
24036 'lookahead' => 0,
24037 'mod' => '',
24038 'pattern' => '.*',
24039 'rdelim' => '/'
24040 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24041 bless( {
24042 'code' => '{ [[$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'sh_noev\',$item[3]]] }',
24043 'hashname' => '__ACTION1__',
24044 'line' => 357,
24045 'lookahead' => 0
24046 }, 'XML::XSH2::Parser::_Runtime::Action' )
24047 ],
24048 'line' => undef,
24049 'number' => 0,
24050 'patcount' => 2,
24051 'strcount' => 0,
24052 'uncommit' => undef
24053 }, 'XML::XSH2::Parser::_Runtime::Production' ),
24054 bless( {
24055 'actcount' => 0,
24056 'dircount' => 2,
24057 'error' => 1,
24058 'items' => [
24059 bless( {
24060 'commitonly' => '?',
24061 'hashname' => '__DIRECTIVE1__',
24062 'line' => 359,
24063 'lookahead' => 0,
24064 'msg' => 'Parse error near: "! }.substr($text,0,40).qq{ ..."'
24065 }, 'XML::XSH2::Parser::_Runtime::Error' ),
24066 bless( {
24067 'hashname' => '__DIRECTIVE2__',
24068 'line' => 359,
24069 'lookahead' => 0,
24070 'name' => '<reject>'
24071 }, 'XML::XSH2::Parser::_Runtime::UncondReject' )
24072 ],
24073 'line' => 359,
24074 'number' => 1,
24075 'patcount' => 0,
24076 'strcount' => 0,
24077 'uncommit' => 0
24078 }, 'XML::XSH2::Parser::_Runtime::Production' )
24079 ],
24080 'vars' => ''
24081 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
24082 'shline' => bless( {
24083 'calls' => [
24084 'shline_nosc',
24085 'shline_bracket'
24086 ],
24087 'changed' => 0,
24088 'impcount' => 0,
24089 'line' => 350,
24090 'name' => 'shline',
24091 'opcount' => 0,
24092 'prods' => [
24093 bless( {
24094 'actcount' => 1,
24095 'dircount' => 0,
24096 'error' => undef,
24097 'items' => [
24098 bless( {
24099 'argcode' => undef,
24100 'implicit' => undef,
24101 'line' => 351,
24102 'lookahead' => 0,
24103 'matchrule' => 0,
24104 'subrule' => 'shline_nosc'
24105 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24106 bless( {
24107 'argcode' => undef,
24108 'expected' => undef,
24109 'line' => 351,
24110 'lookahead' => 0,
24111 'matchrule' => 0,
24112 'max' => 1,
24113 'min' => 0,
24114 'repspec' => '?',
24115 'subrule' => 'shline_bracket'
24116 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
24117 bless( {
24118 'argcode' => undef,
24119 'implicit' => undef,
24120 'line' => 351,
24121 'lookahead' => 0,
24122 'matchrule' => 0,
24123 'subrule' => 'shline_nosc'
24124 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24125 bless( {
24126 'code' => '{ join("",$item[1],@{$item[2]},$item[3]) }',
24127 'hashname' => '__ACTION1__',
24128 'line' => 352,
24129 'lookahead' => 0
24130 }, 'XML::XSH2::Parser::_Runtime::Action' )
24131 ],
24132 'line' => undef,
24133 'number' => 0,
24134 'patcount' => 0,
24135 'strcount' => 0,
24136 'uncommit' => undef
24137 }, 'XML::XSH2::Parser::_Runtime::Production' )
24138 ],
24139 'vars' => ''
24140 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
24141 'shline_bracket' => bless( {
24142 'calls' => [
24143 'shline_inter',
24144 'shline_bracket'
24145 ],
24146 'changed' => 0,
24147 'impcount' => 0,
24148 'line' => 345,
24149 'name' => 'shline_bracket',
24150 'opcount' => 0,
24151 'prods' => [
24152 bless( {
24153 'actcount' => 1,
24154 'dircount' => 0,
24155 'error' => undef,
24156 'items' => [
24157 bless( {
24158 'description' => '\'(\'',
24159 'hashname' => '__STRING1__',
24160 'line' => 346,
24161 'lookahead' => 0,
24162 'pattern' => '('
24163 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
24164 bless( {
24165 'argcode' => undef,
24166 'implicit' => undef,
24167 'line' => 346,
24168 'lookahead' => 0,
24169 'matchrule' => 0,
24170 'subrule' => 'shline_inter'
24171 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24172 bless( {
24173 'argcode' => undef,
24174 'expected' => undef,
24175 'line' => 346,
24176 'lookahead' => 0,
24177 'matchrule' => 0,
24178 'max' => 1,
24179 'min' => 0,
24180 'repspec' => '?',
24181 'subrule' => 'shline_bracket'
24182 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
24183 bless( {
24184 'argcode' => undef,
24185 'implicit' => undef,
24186 'line' => 346,
24187 'lookahead' => 0,
24188 'matchrule' => 0,
24189 'subrule' => 'shline_inter'
24190 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24191 bless( {
24192 'description' => '\')\'',
24193 'hashname' => '__STRING2__',
24194 'line' => 346,
24195 'lookahead' => 0,
24196 'pattern' => ')'
24197 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
24198 bless( {
24199 'code' => '{ join("",\'(\',$item[2],@{$item[3]},$item[4],\')\') }',
24200 'hashname' => '__ACTION1__',
24201 'line' => 347,
24202 'lookahead' => 0
24203 }, 'XML::XSH2::Parser::_Runtime::Action' )
24204 ],
24205 'line' => undef,
24206 'number' => 0,
24207 'patcount' => 0,
24208 'strcount' => 2,
24209 'uncommit' => undef
24210 }, 'XML::XSH2::Parser::_Runtime::Production' )
24211 ],
24212 'vars' => ''
24213 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
24214 'shline_inter' => bless( {
24215 'calls' => [],
24216 'changed' => 0,
24217 'impcount' => 0,
24218 'line' => 342,
24219 'name' => 'shline_inter',
24220 'opcount' => 0,
24221 'prods' => [
24222 bless( {
24223 'actcount' => 0,
24224 'dircount' => 0,
24225 'error' => undef,
24226 'items' => [
24227 bless( {
24228 'description' => '/([^()\\\\\\\\"\']|\\\\\\\\.|\\\\"([^\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\"|\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\\\\\\'|\\\\\\\\\\\\\\\\|\\\\\\\\[^\\\\\'\\\\\\\\])*\\\\\')*/',
24229 'hashname' => '__PATTERN1__',
24230 'ldelim' => '/',
24231 'line' => 343,
24232 'lookahead' => 0,
24233 'mod' => '',
24234 'pattern' => '([^()\\\\"\']|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\\'([^\\\'\\\\]|\\\\\\\'|\\\\\\\\|\\\\[^\\\'\\\\])*\\\')*',
24235 'rdelim' => '/'
24236 }, 'XML::XSH2::Parser::_Runtime::Token' )
24237 ],
24238 'line' => undef,
24239 'number' => 0,
24240 'patcount' => 1,
24241 'strcount' => 0,
24242 'uncommit' => undef
24243 }, 'XML::XSH2::Parser::_Runtime::Production' )
24244 ],
24245 'vars' => ''
24246 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
24247 'shline_nosc' => bless( {
24248 'calls' => [],
24249 'changed' => 0,
24250 'impcount' => 0,
24251 'line' => 339,
24252 'name' => 'shline_nosc',
24253 'opcount' => 0,
24254 'prods' => [
24255 bless( {
24256 'actcount' => 0,
24257 'dircount' => 0,
24258 'error' => undef,
24259 'items' => [
24260 bless( {
24261 'description' => '/([^;()\\\\\\\\"\'\\\\|]|\\\\|[^>]|\\\\\\\\.|\\\\"([^\\\\"\\\\\\\\]|\\\\\\\\.)*\\\\"|\\\\\'([^\\\\\'\\\\\\\\]|\\\\\\\\\\\\\'|\\\\\\\\\\\\\\\\|\\\\\\\\[^\\\\\'\\\\\\\\])*\\\\\')*/',
24262 'hashname' => '__PATTERN1__',
24263 'ldelim' => '/',
24264 'line' => 340,
24265 'lookahead' => 0,
24266 'mod' => '',
24267 'pattern' => '([^;()\\\\"\'\\|]|\\|[^>]|\\\\.|\\"([^\\"\\\\]|\\\\.)*\\"|\\\'([^\\\'\\\\]|\\\\\\\'|\\\\\\\\|\\\\[^\\\'\\\\])*\\\')*',
24268 'rdelim' => '/'
24269 }, 'XML::XSH2::Parser::_Runtime::Token' )
24270 ],
24271 'line' => undef,
24272 'number' => 0,
24273 'patcount' => 1,
24274 'strcount' => 0,
24275 'uncommit' => undef
24276 }, 'XML::XSH2::Parser::_Runtime::Production' )
24277 ],
24278 'vars' => ''
24279 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
24280 'startrule' => bless( {
24281 'calls' => [
24282 'shell',
24283 'eof',
24284 'complex_command'
24285 ],
24286 'changed' => 0,
24287 'impcount' => 0,
24288 'line' => 322,
24289 'name' => 'startrule',
24290 'opcount' => 0,
24291 'prods' => [
24292 bless( {
24293 'actcount' => 1,
24294 'dircount' => 1,
24295 'error' => undef,
24296 'items' => [
24297 bless( {
24298 'argcode' => undef,
24299 'implicit' => undef,
24300 'line' => 323,
24301 'lookahead' => 0,
24302 'matchrule' => 0,
24303 'subrule' => 'shell'
24304 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24305 bless( {
24306 'code' => '$commit = 1',
24307 'hashname' => '__DIRECTIVE1__',
24308 'line' => 323,
24309 'lookahead' => 0,
24310 'name' => '<commit>'
24311 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24312 bless( {
24313 'argcode' => undef,
24314 'implicit' => undef,
24315 'line' => 323,
24316 'lookahead' => 0,
24317 'matchrule' => 0,
24318 'subrule' => 'eof'
24319 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24320 bless( {
24321 'code' => '{ $item[1] }',
24322 'hashname' => '__ACTION1__',
24323 'line' => 324,
24324 'lookahead' => 0
24325 }, 'XML::XSH2::Parser::_Runtime::Action' )
24326 ],
24327 'line' => undef,
24328 'number' => 0,
24329 'patcount' => 0,
24330 'strcount' => 0,
24331 'uncommit' => undef
24332 }, 'XML::XSH2::Parser::_Runtime::Production' ),
24333 bless( {
24334 'actcount' => 1,
24335 'dircount' => 1,
24336 'error' => undef,
24337 'items' => [
24338 bless( {
24339 'argcode' => undef,
24340 'expected' => undef,
24341 'line' => 326,
24342 'lookahead' => 0,
24343 'matchrule' => 0,
24344 'max' => 100000000,
24345 'min' => 1,
24346 'repspec' => 's',
24347 'subrule' => 'complex_command'
24348 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
24349 bless( {
24350 'code' => '$commit = 1',
24351 'hashname' => '__DIRECTIVE1__',
24352 'line' => 326,
24353 'lookahead' => 0,
24354 'name' => '<commit>'
24355 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24356 bless( {
24357 'argcode' => undef,
24358 'implicit' => undef,
24359 'line' => 326,
24360 'lookahead' => 0,
24361 'matchrule' => 0,
24362 'subrule' => 'eof'
24363 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24364 bless( {
24365 'code' => '{ $item[1] }',
24366 'hashname' => '__ACTION1__',
24367 'line' => 327,
24368 'lookahead' => 0
24369 }, 'XML::XSH2::Parser::_Runtime::Action' )
24370 ],
24371 'line' => 326,
24372 'number' => 1,
24373 'patcount' => 0,
24374 'strcount' => 0,
24375 'uncommit' => undef
24376 }, 'XML::XSH2::Parser::_Runtime::Production' )
24377 ],
24378 'vars' => ''
24379 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
24380 'statement' => bless( {
24381 'calls' => [
24382 'exp',
24383 'block',
24384 'elsif_block',
24385 'else_block',
24386 'local_var_in',
24387 'local_var',
24388 'xpstep',
24389 'ID',
24390 'variable'
24391 ],
24392 'changed' => 0,
24393 'impcount' => 0,
24394 'line' => 72,
24395 'name' => 'statement',
24396 'opcount' => 0,
24397 'prods' => [
24398 bless( {
24399 'actcount' => 0,
24400 'dircount' => 2,
24401 'error' => undef,
24402 'items' => [
24403 bless( {
24404 'description' => '/(?=\\\\s*[\\}\\{;])/',
24405 'hashname' => '__PATTERN1__',
24406 'ldelim' => '/',
24407 'line' => 73,
24408 'lookahead' => 0,
24409 'mod' => '',
24410 'pattern' => '(?=\\s*[}{;])',
24411 'rdelim' => '/'
24412 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24413 bless( {
24414 'code' => '$commit = 1',
24415 'hashname' => '__DIRECTIVE1__',
24416 'line' => 73,
24417 'lookahead' => 0,
24418 'name' => '<commit>'
24419 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24420 bless( {
24421 'hashname' => '__DIRECTIVE2__',
24422 'line' => 73,
24423 'lookahead' => 0,
24424 'name' => '<reject>'
24425 }, 'XML::XSH2::Parser::_Runtime::UncondReject' )
24426 ],
24427 'line' => undef,
24428 'number' => 0,
24429 'patcount' => 1,
24430 'strcount' => 0,
24431 'uncommit' => undef
24432 }, 'XML::XSH2::Parser::_Runtime::Production' ),
24433 bless( {
24434 'actcount' => 1,
24435 'dircount' => 1,
24436 'error' => undef,
24437 'items' => [
24438 bless( {
24439 'description' => '/(if)\\\\b/',
24440 'hashname' => '__PATTERN1__',
24441 'ldelim' => '/',
24442 'line' => 74,
24443 'lookahead' => 0,
24444 'mod' => '',
24445 'pattern' => '(if)\\b',
24446 'rdelim' => '/'
24447 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24448 bless( {
24449 'code' => '$commit = 1',
24450 'hashname' => '__DIRECTIVE1__',
24451 'line' => 74,
24452 'lookahead' => 0,
24453 'name' => '<commit>'
24454 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24455 bless( {
24456 'argcode' => undef,
24457 'implicit' => undef,
24458 'line' => 74,
24459 'lookahead' => 0,
24460 'matchrule' => 0,
24461 'subrule' => 'exp'
24462 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24463 bless( {
24464 'argcode' => undef,
24465 'implicit' => undef,
24466 'line' => 74,
24467 'lookahead' => 0,
24468 'matchrule' => 0,
24469 'subrule' => 'block'
24470 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24471 bless( {
24472 'argcode' => undef,
24473 'implicit' => undef,
24474 'line' => 74,
24475 'lookahead' => 0,
24476 'matchrule' => 0,
24477 'subrule' => 'elsif_block'
24478 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24479 bless( {
24480 'argcode' => undef,
24481 'implicit' => undef,
24482 'line' => 74,
24483 'lookahead' => 0,
24484 'matchrule' => 0,
24485 'subrule' => 'else_block'
24486 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24487 bless( {
24488 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'if_statement\',[$item[3],$item[4]],@{$item[5]},@{$item[6]}] }',
24489 'hashname' => '__ACTION1__',
24490 'line' => 75,
24491 'lookahead' => 0
24492 }, 'XML::XSH2::Parser::_Runtime::Action' )
24493 ],
24494 'line' => 74,
24495 'number' => 1,
24496 'patcount' => 1,
24497 'strcount' => 0,
24498 'uncommit' => undef
24499 }, 'XML::XSH2::Parser::_Runtime::Production' ),
24500 bless( {
24501 'actcount' => 1,
24502 'dircount' => 1,
24503 'error' => undef,
24504 'items' => [
24505 bless( {
24506 'description' => '/(unless)\\\\b/',
24507 'hashname' => '__PATTERN1__',
24508 'ldelim' => '/',
24509 'line' => 77,
24510 'lookahead' => 0,
24511 'mod' => '',
24512 'pattern' => '(unless)\\b',
24513 'rdelim' => '/'
24514 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24515 bless( {
24516 'code' => '$commit = 1',
24517 'hashname' => '__DIRECTIVE1__',
24518 'line' => 77,
24519 'lookahead' => 0,
24520 'name' => '<commit>'
24521 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24522 bless( {
24523 'argcode' => undef,
24524 'implicit' => undef,
24525 'line' => 77,
24526 'lookahead' => 0,
24527 'matchrule' => 0,
24528 'subrule' => 'exp'
24529 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24530 bless( {
24531 'argcode' => undef,
24532 'implicit' => undef,
24533 'line' => 77,
24534 'lookahead' => 0,
24535 'matchrule' => 0,
24536 'subrule' => 'block'
24537 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24538 bless( {
24539 'argcode' => undef,
24540 'expected' => undef,
24541 'line' => 77,
24542 'lookahead' => 0,
24543 'matchrule' => 0,
24544 'max' => 1,
24545 'min' => 0,
24546 'repspec' => '?',
24547 'subrule' => 'else_block'
24548 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
24549 bless( {
24550 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'unless_statement\',$item[3],$item[4],@{$item[5]}] }',
24551 'hashname' => '__ACTION1__',
24552 'line' => 78,
24553 'lookahead' => 0
24554 }, 'XML::XSH2::Parser::_Runtime::Action' )
24555 ],
24556 'line' => 77,
24557 'number' => 2,
24558 'patcount' => 1,
24559 'strcount' => 0,
24560 'uncommit' => undef
24561 }, 'XML::XSH2::Parser::_Runtime::Production' ),
24562 bless( {
24563 'actcount' => 1,
24564 'dircount' => 1,
24565 'error' => undef,
24566 'items' => [
24567 bless( {
24568 'description' => '/(while)\\\\b/',
24569 'hashname' => '__PATTERN1__',
24570 'ldelim' => '/',
24571 'line' => 80,
24572 'lookahead' => 0,
24573 'mod' => '',
24574 'pattern' => '(while)\\b',
24575 'rdelim' => '/'
24576 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24577 bless( {
24578 'code' => '$commit = 1',
24579 'hashname' => '__DIRECTIVE1__',
24580 'line' => 80,
24581 'lookahead' => 0,
24582 'name' => '<commit>'
24583 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24584 bless( {
24585 'argcode' => undef,
24586 'implicit' => undef,
24587 'line' => 80,
24588 'lookahead' => 0,
24589 'matchrule' => 0,
24590 'subrule' => 'exp'
24591 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24592 bless( {
24593 'argcode' => undef,
24594 'implicit' => undef,
24595 'line' => 80,
24596 'lookahead' => 0,
24597 'matchrule' => 0,
24598 'subrule' => 'block'
24599 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24600 bless( {
24601 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'while_statement\',$item[3],$item[4]] }',
24602 'hashname' => '__ACTION1__',
24603 'line' => 81,
24604 'lookahead' => 0
24605 }, 'XML::XSH2::Parser::_Runtime::Action' )
24606 ],
24607 'line' => 80,
24608 'number' => 3,
24609 'patcount' => 1,
24610 'strcount' => 0,
24611 'uncommit' => undef
24612 }, 'XML::XSH2::Parser::_Runtime::Production' ),
24613 bless( {
24614 'actcount' => 1,
24615 'dircount' => 1,
24616 'error' => undef,
24617 'items' => [
24618 bless( {
24619 'description' => '/(foreach|for)\\\\b/',
24620 'hashname' => '__PATTERN1__',
24621 'ldelim' => '/',
24622 'line' => 83,
24623 'lookahead' => 0,
24624 'mod' => '',
24625 'pattern' => '(foreach|for)\\b',
24626 'rdelim' => '/'
24627 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24628 bless( {
24629 'code' => '$commit = 1',
24630 'hashname' => '__DIRECTIVE1__',
24631 'line' => 83,
24632 'lookahead' => 0,
24633 'name' => '<commit>'
24634 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24635 bless( {
24636 'argcode' => undef,
24637 'expected' => undef,
24638 'line' => 83,
24639 'lookahead' => 0,
24640 'matchrule' => 0,
24641 'max' => 1,
24642 'min' => 0,
24643 'repspec' => '?',
24644 'subrule' => 'local_var_in'
24645 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
24646 bless( {
24647 'argcode' => undef,
24648 'implicit' => undef,
24649 'line' => 83,
24650 'lookahead' => 0,
24651 'matchrule' => 0,
24652 'subrule' => 'exp'
24653 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24654 bless( {
24655 'argcode' => undef,
24656 'implicit' => undef,
24657 'line' => 83,
24658 'lookahead' => 0,
24659 'matchrule' => 0,
24660 'subrule' => 'block'
24661 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24662 bless( {
24663 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'foreach_statement\',@item[4,5],@{$item[3]}] }',
24664 'hashname' => '__ACTION1__',
24665 'line' => 84,
24666 'lookahead' => 0
24667 }, 'XML::XSH2::Parser::_Runtime::Action' )
24668 ],
24669 'line' => 83,
24670 'number' => 4,
24671 'patcount' => 1,
24672 'strcount' => 0,
24673 'uncommit' => undef
24674 }, 'XML::XSH2::Parser::_Runtime::Production' ),
24675 bless( {
24676 'actcount' => 1,
24677 'dircount' => 1,
24678 'error' => undef,
24679 'items' => [
24680 bless( {
24681 'description' => '/(try)\\\\b/',
24682 'hashname' => '__PATTERN1__',
24683 'ldelim' => '/',
24684 'line' => 86,
24685 'lookahead' => 0,
24686 'mod' => '',
24687 'pattern' => '(try)\\b',
24688 'rdelim' => '/'
24689 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24690 bless( {
24691 'code' => '$commit = 1',
24692 'hashname' => '__DIRECTIVE1__',
24693 'line' => 86,
24694 'lookahead' => 0,
24695 'name' => '<commit>'
24696 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24697 bless( {
24698 'argcode' => undef,
24699 'implicit' => undef,
24700 'line' => 86,
24701 'lookahead' => 0,
24702 'matchrule' => 0,
24703 'subrule' => 'block'
24704 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24705 bless( {
24706 'description' => '\'catch\'',
24707 'hashname' => '__STRING1__',
24708 'line' => 86,
24709 'lookahead' => 0,
24710 'pattern' => 'catch'
24711 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
24712 bless( {
24713 'argcode' => undef,
24714 'expected' => undef,
24715 'line' => 86,
24716 'lookahead' => 0,
24717 'matchrule' => 0,
24718 'max' => 1,
24719 'min' => 0,
24720 'repspec' => '?',
24721 'subrule' => 'local_var'
24722 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
24723 bless( {
24724 'argcode' => undef,
24725 'implicit' => undef,
24726 'line' => 86,
24727 'lookahead' => 0,
24728 'matchrule' => 0,
24729 'subrule' => 'block'
24730 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24731 bless( {
24732 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'try_catch\',$item[3],$item[6],@{$item[5]}] }',
24733 'hashname' => '__ACTION1__',
24734 'line' => 87,
24735 'lookahead' => 0
24736 }, 'XML::XSH2::Parser::_Runtime::Action' )
24737 ],
24738 'line' => 86,
24739 'number' => 5,
24740 'patcount' => 1,
24741 'strcount' => 1,
24742 'uncommit' => undef
24743 }, 'XML::XSH2::Parser::_Runtime::Production' ),
24744 bless( {
24745 'actcount' => 1,
24746 'dircount' => 1,
24747 'error' => undef,
24748 'items' => [
24749 bless( {
24750 'description' => '/(iterate)\\\\b/',
24751 'hashname' => '__PATTERN1__',
24752 'ldelim' => '/',
24753 'line' => 89,
24754 'lookahead' => 0,
24755 'mod' => '',
24756 'pattern' => '(iterate)\\b',
24757 'rdelim' => '/'
24758 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24759 bless( {
24760 'code' => '$commit = 1',
24761 'hashname' => '__DIRECTIVE1__',
24762 'line' => 89,
24763 'lookahead' => 0,
24764 'name' => '<commit>'
24765 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24766 bless( {
24767 'argcode' => undef,
24768 'implicit' => undef,
24769 'line' => 89,
24770 'lookahead' => 0,
24771 'matchrule' => 0,
24772 'subrule' => 'xpstep'
24773 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24774 bless( {
24775 'argcode' => undef,
24776 'implicit' => undef,
24777 'line' => 89,
24778 'lookahead' => 0,
24779 'matchrule' => 0,
24780 'subrule' => 'block'
24781 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24782 bless( {
24783 'code' => '{ [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'iterate\',$item[4],@{$item[3]}] }',
24784 'hashname' => '__ACTION1__',
24785 'line' => 90,
24786 'lookahead' => 0
24787 }, 'XML::XSH2::Parser::_Runtime::Action' )
24788 ],
24789 'line' => 89,
24790 'number' => 6,
24791 'patcount' => 1,
24792 'strcount' => 0,
24793 'uncommit' => undef
24794 }, 'XML::XSH2::Parser::_Runtime::Production' ),
24795 bless( {
24796 'actcount' => 2,
24797 'dircount' => 1,
24798 'error' => undef,
24799 'items' => [
24800 bless( {
24801 'description' => '/(def|define)\\\\b/',
24802 'hashname' => '__PATTERN1__',
24803 'ldelim' => '/',
24804 'line' => 92,
24805 'lookahead' => 0,
24806 'mod' => '',
24807 'pattern' => '(def|define)\\b',
24808 'rdelim' => '/'
24809 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24810 bless( {
24811 'code' => '$commit = 1',
24812 'hashname' => '__DIRECTIVE1__',
24813 'line' => 92,
24814 'lookahead' => 0,
24815 'name' => '<commit>'
24816 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24817 bless( {
24818 'argcode' => undef,
24819 'implicit' => undef,
24820 'line' => 92,
24821 'lookahead' => 0,
24822 'matchrule' => 0,
24823 'subrule' => 'ID'
24824 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24825 bless( {
24826 'code' => '{ XML::XSH2::Functions::is_command($item[3])?undef:1 }',
24827 'hashname' => '__ACTION1__',
24828 'line' => 93,
24829 'lookahead' => 0
24830 }, 'XML::XSH2::Parser::_Runtime::Action' ),
24831 bless( {
24832 'argcode' => undef,
24833 'expected' => undef,
24834 'line' => 94,
24835 'lookahead' => 0,
24836 'matchrule' => 0,
24837 'max' => 100000000,
24838 'min' => 0,
24839 'repspec' => 's?',
24840 'subrule' => 'variable'
24841 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
24842 bless( {
24843 'argcode' => undef,
24844 'implicit' => undef,
24845 'line' => 94,
24846 'lookahead' => 0,
24847 'matchrule' => 0,
24848 'subrule' => 'block'
24849 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24850 bless( {
24851 'code' => '{
24852 [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'def\',$item[3],$item[6],$item[5]]
24853 }',
24854 'hashname' => '__ACTION2__',
24855 'line' => 95,
24856 'lookahead' => 0
24857 }, 'XML::XSH2::Parser::_Runtime::Action' )
24858 ],
24859 'line' => 92,
24860 'number' => 7,
24861 'patcount' => 1,
24862 'strcount' => 0,
24863 'uncommit' => undef
24864 }, 'XML::XSH2::Parser::_Runtime::Production' )
24865 ],
24866 'vars' => ''
24867 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
24868 'stream_select' => bless( {
24869 'calls' => [
24870 'xpath',
24871 'block'
24872 ],
24873 'changed' => 0,
24874 'impcount' => 0,
24875 'line' => 441,
24876 'name' => 'stream_select',
24877 'opcount' => 0,
24878 'prods' => [
24879 bless( {
24880 'actcount' => 1,
24881 'dircount' => 0,
24882 'error' => undef,
24883 'items' => [
24884 bless( {
24885 'description' => '/select\\\\s/',
24886 'hashname' => '__PATTERN1__',
24887 'ldelim' => '/',
24888 'line' => 442,
24889 'lookahead' => 0,
24890 'mod' => '',
24891 'pattern' => 'select\\s',
24892 'rdelim' => '/'
24893 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24894 bless( {
24895 'argcode' => undef,
24896 'implicit' => undef,
24897 'line' => 442,
24898 'lookahead' => 0,
24899 'matchrule' => 0,
24900 'subrule' => 'xpath'
24901 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24902 bless( {
24903 'argcode' => undef,
24904 'implicit' => undef,
24905 'line' => 442,
24906 'lookahead' => 0,
24907 'matchrule' => 0,
24908 'subrule' => 'block'
24909 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24910 bless( {
24911 'code' => '{ [$item[2],$item[3]] }',
24912 'hashname' => '__ACTION1__',
24913 'line' => 443,
24914 'lookahead' => 0
24915 }, 'XML::XSH2::Parser::_Runtime::Action' )
24916 ],
24917 'line' => undef,
24918 'number' => 0,
24919 'patcount' => 1,
24920 'strcount' => 0,
24921 'uncommit' => undef
24922 }, 'XML::XSH2::Parser::_Runtime::Production' )
24923 ],
24924 'vars' => ''
24925 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
24926 'trail' => bless( {
24927 'calls' => [
24928 'variable',
24929 'shline'
24930 ],
24931 'changed' => 0,
24932 'impcount' => 0,
24933 'line' => 330,
24934 'name' => 'trail',
24935 'opcount' => 0,
24936 'prods' => [
24937 bless( {
24938 'actcount' => 0,
24939 'dircount' => 2,
24940 'error' => undef,
24941 'items' => [
24942 bless( {
24943 'description' => '/(?=\\\\s*[\\};]|\\\\s*\\\\Z)/',
24944 'hashname' => '__PATTERN1__',
24945 'ldelim' => '/',
24946 'line' => 331,
24947 'lookahead' => 0,
24948 'mod' => '',
24949 'pattern' => '(?=\\s*[};]|\\s*\\Z)',
24950 'rdelim' => '/'
24951 }, 'XML::XSH2::Parser::_Runtime::Token' ),
24952 bless( {
24953 'code' => '$commit = 1',
24954 'hashname' => '__DIRECTIVE1__',
24955 'line' => 331,
24956 'lookahead' => 0,
24957 'name' => '<commit>'
24958 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24959 bless( {
24960 'hashname' => '__DIRECTIVE2__',
24961 'line' => 331,
24962 'lookahead' => 0,
24963 'name' => '<reject>'
24964 }, 'XML::XSH2::Parser::_Runtime::UncondReject' )
24965 ],
24966 'line' => undef,
24967 'number' => 0,
24968 'patcount' => 1,
24969 'strcount' => 0,
24970 'uncommit' => undef
24971 }, 'XML::XSH2::Parser::_Runtime::Production' ),
24972 bless( {
24973 'actcount' => 1,
24974 'dircount' => 1,
24975 'error' => undef,
24976 'items' => [
24977 bless( {
24978 'description' => '\'|>\'',
24979 'hashname' => '__STRING1__',
24980 'line' => 332,
24981 'lookahead' => 0,
24982 'pattern' => '|>'
24983 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
24984 bless( {
24985 'code' => '$commit = 1',
24986 'hashname' => '__DIRECTIVE1__',
24987 'line' => 332,
24988 'lookahead' => 0,
24989 'name' => '<commit>'
24990 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
24991 bless( {
24992 'argcode' => undef,
24993 'implicit' => undef,
24994 'line' => 332,
24995 'lookahead' => 0,
24996 'matchrule' => 0,
24997 'subrule' => 'variable'
24998 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
24999 bless( {
25000 'code' => '{ [\'var\',$item[3]] }',
25001 'hashname' => '__ACTION1__',
25002 'line' => 333,
25003 'lookahead' => 0
25004 }, 'XML::XSH2::Parser::_Runtime::Action' )
25005 ],
25006 'line' => 332,
25007 'number' => 1,
25008 'patcount' => 0,
25009 'strcount' => 1,
25010 'uncommit' => undef
25011 }, 'XML::XSH2::Parser::_Runtime::Production' ),
25012 bless( {
25013 'actcount' => 1,
25014 'dircount' => 1,
25015 'error' => undef,
25016 'items' => [
25017 bless( {
25018 'description' => '\'|\'',
25019 'hashname' => '__STRING1__',
25020 'line' => 335,
25021 'lookahead' => 0,
25022 'pattern' => '|'
25023 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
25024 bless( {
25025 'code' => '$commit = 1',
25026 'hashname' => '__DIRECTIVE1__',
25027 'line' => 335,
25028 'lookahead' => 0,
25029 'name' => '<commit>'
25030 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
25031 bless( {
25032 'argcode' => undef,
25033 'implicit' => undef,
25034 'line' => 335,
25035 'lookahead' => 0,
25036 'matchrule' => 0,
25037 'subrule' => 'shline'
25038 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25039 bless( {
25040 'code' => '{ [\'pipe\',$item[3]] }',
25041 'hashname' => '__ACTION1__',
25042 'line' => 336,
25043 'lookahead' => 0
25044 }, 'XML::XSH2::Parser::_Runtime::Action' )
25045 ],
25046 'line' => 335,
25047 'number' => 2,
25048 'patcount' => 0,
25049 'strcount' => 1,
25050 'uncommit' => undef
25051 }, 'XML::XSH2::Parser::_Runtime::Production' )
25052 ],
25053 'vars' => ''
25054 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25055 'undef' => bless( {
25056 'calls' => [],
25057 'changed' => 0,
25058 'impcount' => 0,
25059 'line' => 390,
25060 'name' => 'undef',
25061 'opcount' => 0,
25062 'prods' => [
25063 bless( {
25064 'actcount' => 1,
25065 'dircount' => 1,
25066 'error' => undef,
25067 'items' => [
25068 bless( {
25069 'description' => '/(undef|undefine)\\\\b/',
25070 'hashname' => '__PATTERN1__',
25071 'ldelim' => '/',
25072 'line' => 391,
25073 'lookahead' => 0,
25074 'mod' => '',
25075 'pattern' => '(undef|undefine)\\b',
25076 'rdelim' => '/'
25077 }, 'XML::XSH2::Parser::_Runtime::Token' ),
25078 bless( {
25079 'code' => '$commit = 1',
25080 'hashname' => '__DIRECTIVE1__',
25081 'line' => 391,
25082 'lookahead' => 0,
25083 'name' => '<commit>'
25084 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
25085 bless( {
25086 'description' => '/\\\\$?[a-zA-Z_][a-zA-Z0-9_]*/',
25087 'hashname' => '__PATTERN2__',
25088 'ldelim' => '/',
25089 'line' => 391,
25090 'lookahead' => 0,
25091 'mod' => '',
25092 'pattern' => '\\$?[a-zA-Z_][a-zA-Z0-9_]*',
25093 'rdelim' => '/'
25094 }, 'XML::XSH2::Parser::_Runtime::Token' ),
25095 bless( {
25096 'code' => '{
25097 [$thisline,$thiscolumn,$thisoffset,$XML::XSH2::Functions::SCRIPT,\'undefine\',$item[3]];
25098 }',
25099 'hashname' => '__ACTION1__',
25100 'line' => 392,
25101 'lookahead' => 0
25102 }, 'XML::XSH2::Parser::_Runtime::Action' )
25103 ],
25104 'line' => undef,
25105 'number' => 0,
25106 'patcount' => 2,
25107 'strcount' => 0,
25108 'uncommit' => undef
25109 }, 'XML::XSH2::Parser::_Runtime::Production' )
25110 ],
25111 'vars' => ''
25112 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25113 'variable' => bless( {
25114 'calls' => [],
25115 'changed' => 0,
25116 'impcount' => 0,
25117 'line' => 314,
25118 'name' => 'variable',
25119 'opcount' => 0,
25120 'prods' => [
25121 bless( {
25122 'actcount' => 0,
25123 'dircount' => 0,
25124 'error' => undef,
25125 'items' => [
25126 bless( {
25127 'description' => '/\\\\$[a-zA-Z_][a-zA-Z0-9_]*/',
25128 'hashname' => '__PATTERN1__',
25129 'ldelim' => '/',
25130 'line' => 315,
25131 'lookahead' => 0,
25132 'mod' => '',
25133 'pattern' => '\\$[a-zA-Z_][a-zA-Z0-9_]*',
25134 'rdelim' => '/'
25135 }, 'XML::XSH2::Parser::_Runtime::Token' )
25136 ],
25137 'line' => undef,
25138 'number' => 0,
25139 'patcount' => 1,
25140 'strcount' => 0,
25141 'uncommit' => undef
25142 }, 'XML::XSH2::Parser::_Runtime::Production' )
25143 ],
25144 'vars' => ''
25145 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25146 'xpath' => bless( {
25147 'calls' => [
25148 'xpstring',
25149 'xpsimple',
25150 'xpcont'
25151 ],
25152 'changed' => 0,
25153 'impcount' => 0,
25154 'line' => 179,
25155 'name' => 'xpath',
25156 'opcount' => 0,
25157 'prods' => [
25158 bless( {
25159 'actcount' => 1,
25160 'dircount' => 1,
25161 'error' => undef,
25162 'items' => [
25163 bless( {
25164 'description' => '/(?=[\'"])/',
25165 'hashname' => '__PATTERN1__',
25166 'ldelim' => '/',
25167 'line' => 180,
25168 'lookahead' => 0,
25169 'mod' => '',
25170 'pattern' => '(?=[\'"])',
25171 'rdelim' => '/'
25172 }, 'XML::XSH2::Parser::_Runtime::Token' ),
25173 bless( {
25174 'code' => '$commit = 1',
25175 'hashname' => '__DIRECTIVE1__',
25176 'line' => 180,
25177 'lookahead' => 0,
25178 'name' => '<commit>'
25179 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
25180 bless( {
25181 'argcode' => undef,
25182 'implicit' => undef,
25183 'line' => 180,
25184 'lookahead' => 0,
25185 'matchrule' => 0,
25186 'subrule' => 'xpstring'
25187 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25188 bless( {
25189 'code' => '{ $item[3] }',
25190 'hashname' => '__ACTION1__',
25191 'line' => 181,
25192 'lookahead' => 0
25193 }, 'XML::XSH2::Parser::_Runtime::Action' )
25194 ],
25195 'line' => undef,
25196 'number' => 0,
25197 'patcount' => 1,
25198 'strcount' => 0,
25199 'uncommit' => undef
25200 }, 'XML::XSH2::Parser::_Runtime::Production' ),
25201 bless( {
25202 'actcount' => 1,
25203 'dircount' => 1,
25204 'error' => undef,
25205 'items' => [
25206 bless( {
25207 'argcode' => undef,
25208 'implicit' => undef,
25209 'line' => 183,
25210 'lookahead' => 0,
25211 'matchrule' => 0,
25212 'subrule' => 'xpsimple'
25213 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25214 bless( {
25215 'code' => 'my $oldskip = $skip; $skip=""; $oldskip',
25216 'hashname' => '__DIRECTIVE1__',
25217 'line' => 183,
25218 'lookahead' => 0,
25219 'name' => '<skip:"">'
25220 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
25221 bless( {
25222 'argcode' => undef,
25223 'expected' => undef,
25224 'line' => 183,
25225 'lookahead' => 0,
25226 'matchrule' => 0,
25227 'max' => 1,
25228 'min' => 0,
25229 'repspec' => '?',
25230 'subrule' => 'xpcont'
25231 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
25232 bless( {
25233 'code' => '{ $item[1].join("",@{$item[3]}) }',
25234 'hashname' => '__ACTION1__',
25235 'line' => 184,
25236 'lookahead' => 0
25237 }, 'XML::XSH2::Parser::_Runtime::Action' )
25238 ],
25239 'line' => 183,
25240 'number' => 1,
25241 'patcount' => 0,
25242 'strcount' => 0,
25243 'uncommit' => undef
25244 }, 'XML::XSH2::Parser::_Runtime::Production' ),
25245 bless( {
25246 'actcount' => 0,
25247 'dircount' => 1,
25248 'error' => 1,
25249 'items' => [
25250 bless( {
25251 'commitonly' => '',
25252 'hashname' => '__DIRECTIVE1__',
25253 'line' => 186,
25254 'lookahead' => 0,
25255 'msg' => 'expected XPath, but got "}.substr($text,0,40).qq{ ..."'
25256 }, 'XML::XSH2::Parser::_Runtime::Error' )
25257 ],
25258 'line' => 186,
25259 'number' => 2,
25260 'patcount' => 0,
25261 'strcount' => 0,
25262 'uncommit' => 0
25263 }, 'XML::XSH2::Parser::_Runtime::Production' )
25264 ],
25265 'vars' => ''
25266 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25267 'xpaxis' => bless( {
25268 'calls' => [],
25269 'changed' => 0,
25270 'impcount' => 0,
25271 'line' => 425,
25272 'name' => 'xpaxis',
25273 'opcount' => 0,
25274 'prods' => [
25275 bless( {
25276 'actcount' => 0,
25277 'dircount' => 0,
25278 'error' => undef,
25279 'items' => [
25280 bless( {
25281 'description' => '/[-a-z]+::/',
25282 'hashname' => '__PATTERN1__',
25283 'ldelim' => '/',
25284 'line' => 426,
25285 'lookahead' => 0,
25286 'mod' => '',
25287 'pattern' => '[-a-z]+::',
25288 'rdelim' => '/'
25289 }, 'XML::XSH2::Parser::_Runtime::Token' )
25290 ],
25291 'line' => undef,
25292 'number' => 0,
25293 'patcount' => 1,
25294 'strcount' => 0,
25295 'uncommit' => undef
25296 }, 'XML::XSH2::Parser::_Runtime::Production' )
25297 ],
25298 'vars' => ''
25299 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25300 'xpbracket' => bless( {
25301 'calls' => [
25302 'xpinter'
25303 ],
25304 'changed' => 0,
25305 'impcount' => 0,
25306 'line' => 222,
25307 'name' => 'xpbracket',
25308 'opcount' => 0,
25309 'prods' => [
25310 bless( {
25311 'actcount' => 1,
25312 'dircount' => 1,
25313 'error' => undef,
25314 'items' => [
25315 bless( {
25316 'description' => '\'(\'',
25317 'hashname' => '__STRING1__',
25318 'line' => 223,
25319 'lookahead' => 0,
25320 'pattern' => '('
25321 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
25322 bless( {
25323 'code' => 'my $oldskip = $skip; $skip=""; $oldskip',
25324 'hashname' => '__DIRECTIVE1__',
25325 'line' => 223,
25326 'lookahead' => 0,
25327 'name' => '<skip:"">'
25328 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
25329 bless( {
25330 'argcode' => undef,
25331 'implicit' => undef,
25332 'line' => 223,
25333 'lookahead' => 0,
25334 'matchrule' => 0,
25335 'subrule' => 'xpinter'
25336 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25337 bless( {
25338 'description' => '\')\'',
25339 'hashname' => '__STRING2__',
25340 'line' => 223,
25341 'lookahead' => 0,
25342 'pattern' => ')'
25343 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
25344 bless( {
25345 'code' => '{ "($item[3])" }',
25346 'hashname' => '__ACTION1__',
25347 'line' => 224,
25348 'lookahead' => 0
25349 }, 'XML::XSH2::Parser::_Runtime::Action' )
25350 ],
25351 'line' => undef,
25352 'number' => 0,
25353 'patcount' => 0,
25354 'strcount' => 2,
25355 'uncommit' => undef
25356 }, 'XML::XSH2::Parser::_Runtime::Production' )
25357 ],
25358 'vars' => ''
25359 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25360 'xpbrackets' => bless( {
25361 'calls' => [
25362 'xpbracket',
25363 'xpfilters'
25364 ],
25365 'changed' => 0,
25366 'impcount' => 0,
25367 'line' => 227,
25368 'name' => 'xpbrackets',
25369 'opcount' => 0,
25370 'prods' => [
25371 bless( {
25372 'actcount' => 1,
25373 'dircount' => 1,
25374 'error' => undef,
25375 'items' => [
25376 bless( {
25377 'description' => '/(?=\\\\()/',
25378 'hashname' => '__PATTERN1__',
25379 'ldelim' => '/',
25380 'line' => 228,
25381 'lookahead' => 0,
25382 'mod' => '',
25383 'pattern' => '(?=\\()',
25384 'rdelim' => '/'
25385 }, 'XML::XSH2::Parser::_Runtime::Token' ),
25386 bless( {
25387 'argcode' => undef,
25388 'implicit' => undef,
25389 'line' => 228,
25390 'lookahead' => 0,
25391 'matchrule' => 0,
25392 'subrule' => 'xpbracket'
25393 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25394 bless( {
25395 'code' => 'my $oldskip = $skip; $skip=""; $oldskip',
25396 'hashname' => '__DIRECTIVE1__',
25397 'line' => 228,
25398 'lookahead' => 0,
25399 'name' => '<skip:"">'
25400 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
25401 bless( {
25402 'argcode' => undef,
25403 'expected' => undef,
25404 'line' => 228,
25405 'lookahead' => 0,
25406 'matchrule' => 0,
25407 'max' => 1,
25408 'min' => 0,
25409 'repspec' => '?',
25410 'subrule' => 'xpfilters'
25411 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
25412 bless( {
25413 'code' => '{ join "",$item[2],@{$item[4]} }',
25414 'hashname' => '__ACTION1__',
25415 'line' => 229,
25416 'lookahead' => 0
25417 }, 'XML::XSH2::Parser::_Runtime::Action' )
25418 ],
25419 'line' => undef,
25420 'number' => 0,
25421 'patcount' => 1,
25422 'strcount' => 0,
25423 'uncommit' => undef
25424 }, 'XML::XSH2::Parser::_Runtime::Production' )
25425 ],
25426 'vars' => ''
25427 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25428 'xpcont' => bless( {
25429 'calls' => [
25430 '_alternation_1_of_production_1_of_rule_xpcont',
25431 'xpath'
25432 ],
25433 'changed' => 0,
25434 'impcount' => 0,
25435 'line' => 202,
25436 'name' => 'xpcont',
25437 'opcount' => 0,
25438 'prods' => [
25439 bless( {
25440 'actcount' => 1,
25441 'dircount' => 1,
25442 'error' => undef,
25443 'items' => [
25444 bless( {
25445 'argcode' => undef,
25446 'implicit' => 'xpfilters, or xpbrackets',
25447 'line' => 205,
25448 'lookahead' => 0,
25449 'matchrule' => 0,
25450 'subrule' => '_alternation_1_of_production_1_of_rule_xpcont'
25451 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25452 bless( {
25453 'code' => 'my $oldskip = $skip; $skip=""; $oldskip',
25454 'hashname' => '__DIRECTIVE1__',
25455 'line' => 205,
25456 'lookahead' => 0,
25457 'name' => '<skip:"">'
25458 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
25459 bless( {
25460 'argcode' => undef,
25461 'expected' => undef,
25462 'line' => 205,
25463 'lookahead' => 0,
25464 'matchrule' => 0,
25465 'max' => 1,
25466 'min' => 0,
25467 'repspec' => '?',
25468 'subrule' => 'xpath'
25469 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
25470 bless( {
25471 'code' => '{ $item[1].join("",@{$item[3]}) }',
25472 'hashname' => '__ACTION1__',
25473 'line' => 206,
25474 'lookahead' => 0
25475 }, 'XML::XSH2::Parser::_Runtime::Action' )
25476 ],
25477 'line' => undef,
25478 'number' => 0,
25479 'patcount' => 0,
25480 'strcount' => 0,
25481 'uncommit' => undef
25482 }, 'XML::XSH2::Parser::_Runtime::Production' ),
25483 bless( {
25484 'actcount' => 1,
25485 'dircount' => 0,
25486 'error' => undef,
25487 'items' => [
25488 bless( {
25489 'argcode' => undef,
25490 'implicit' => undef,
25491 'line' => 208,
25492 'lookahead' => 0,
25493 'matchrule' => 0,
25494 'subrule' => 'xpath'
25495 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25496 bless( {
25497 'code' => '{ $item[1] }',
25498 'hashname' => '__ACTION1__',
25499 'line' => 209,
25500 'lookahead' => 0
25501 }, 'XML::XSH2::Parser::_Runtime::Action' )
25502 ],
25503 'line' => 208,
25504 'number' => 1,
25505 'patcount' => 0,
25506 'strcount' => 0,
25507 'uncommit' => undef
25508 }, 'XML::XSH2::Parser::_Runtime::Production' )
25509 ],
25510 'vars' => ''
25511 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25512 'xpfilter' => bless( {
25513 'calls' => [
25514 'xpinter'
25515 ],
25516 'changed' => 0,
25517 'impcount' => 0,
25518 'line' => 217,
25519 'name' => 'xpfilter',
25520 'opcount' => 0,
25521 'prods' => [
25522 bless( {
25523 'actcount' => 1,
25524 'dircount' => 0,
25525 'error' => undef,
25526 'items' => [
25527 bless( {
25528 'description' => '\'[\'',
25529 'hashname' => '__STRING1__',
25530 'line' => 218,
25531 'lookahead' => 0,
25532 'pattern' => '['
25533 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
25534 bless( {
25535 'argcode' => undef,
25536 'implicit' => undef,
25537 'line' => 218,
25538 'lookahead' => 0,
25539 'matchrule' => 0,
25540 'subrule' => 'xpinter'
25541 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25542 bless( {
25543 'description' => '\']\'',
25544 'hashname' => '__STRING2__',
25545 'line' => 218,
25546 'lookahead' => 0,
25547 'pattern' => ']'
25548 }, 'XML::XSH2::Parser::_Runtime::Literal' ),
25549 bless( {
25550 'code' => '{ "[$item[2]]" }',
25551 'hashname' => '__ACTION1__',
25552 'line' => 219,
25553 'lookahead' => 0
25554 }, 'XML::XSH2::Parser::_Runtime::Action' )
25555 ],
25556 'line' => undef,
25557 'number' => 0,
25558 'patcount' => 0,
25559 'strcount' => 2,
25560 'uncommit' => undef
25561 }, 'XML::XSH2::Parser::_Runtime::Production' )
25562 ],
25563 'vars' => ''
25564 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25565 'xpfilters' => bless( {
25566 'calls' => [
25567 'xpfilter'
25568 ],
25569 'changed' => 0,
25570 'impcount' => 0,
25571 'line' => 212,
25572 'name' => 'xpfilters',
25573 'opcount' => 0,
25574 'prods' => [
25575 bless( {
25576 'actcount' => 1,
25577 'dircount' => 0,
25578 'error' => undef,
25579 'items' => [
25580 bless( {
25581 'description' => '/(?=\\\\[)/',
25582 'hashname' => '__PATTERN1__',
25583 'ldelim' => '/',
25584 'line' => 213,
25585 'lookahead' => 0,
25586 'mod' => '',
25587 'pattern' => '(?=\\[)',
25588 'rdelim' => '/'
25589 }, 'XML::XSH2::Parser::_Runtime::Token' ),
25590 bless( {
25591 'argcode' => undef,
25592 'expected' => undef,
25593 'line' => 213,
25594 'lookahead' => 0,
25595 'matchrule' => 0,
25596 'max' => 100000000,
25597 'min' => 1,
25598 'repspec' => 's',
25599 'subrule' => 'xpfilter'
25600 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
25601 bless( {
25602 'code' => '{ join("",@{$item[2]}) }',
25603 'hashname' => '__ACTION1__',
25604 'line' => 214,
25605 'lookahead' => 0
25606 }, 'XML::XSH2::Parser::_Runtime::Action' )
25607 ],
25608 'line' => undef,
25609 'number' => 0,
25610 'patcount' => 1,
25611 'strcount' => 0,
25612 'uncommit' => undef
25613 }, 'XML::XSH2::Parser::_Runtime::Production' )
25614 ],
25615 'vars' => ''
25616 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25617 'xpinter' => bless( {
25618 'calls' => [
25619 'xps',
25620 'xpintercont'
25621 ],
25622 'changed' => 0,
25623 'impcount' => 0,
25624 'line' => 232,
25625 'name' => 'xpinter',
25626 'opcount' => 0,
25627 'prods' => [
25628 bless( {
25629 'actcount' => 1,
25630 'dircount' => 1,
25631 'error' => undef,
25632 'items' => [
25633 bless( {
25634 'argcode' => undef,
25635 'implicit' => undef,
25636 'line' => 233,
25637 'lookahead' => 0,
25638 'matchrule' => 0,
25639 'subrule' => 'xps'
25640 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25641 bless( {
25642 'code' => 'my $oldskip = $skip; $skip=""; $oldskip',
25643 'hashname' => '__DIRECTIVE1__',
25644 'line' => 233,
25645 'lookahead' => 0,
25646 'name' => '<skip:"">'
25647 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
25648 bless( {
25649 'argcode' => undef,
25650 'expected' => undef,
25651 'line' => 233,
25652 'lookahead' => 0,
25653 'matchrule' => 0,
25654 'max' => 1,
25655 'min' => 0,
25656 'repspec' => '?',
25657 'subrule' => 'xpintercont'
25658 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
25659 bless( {
25660 'code' => '{ join("",$item[1],@{$item[3]}) }',
25661 'hashname' => '__ACTION1__',
25662 'line' => 234,
25663 'lookahead' => 0
25664 }, 'XML::XSH2::Parser::_Runtime::Action' )
25665 ],
25666 'line' => undef,
25667 'number' => 0,
25668 'patcount' => 0,
25669 'strcount' => 0,
25670 'uncommit' => undef
25671 }, 'XML::XSH2::Parser::_Runtime::Production' )
25672 ],
25673 'vars' => ''
25674 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25675 'xpintercont' => bless( {
25676 'calls' => [
25677 '_alternation_1_of_production_1_of_rule_xpintercont',
25678 'xpinter'
25679 ],
25680 'changed' => 0,
25681 'impcount' => 1,
25682 'line' => 237,
25683 'name' => 'xpintercont',
25684 'opcount' => 0,
25685 'prods' => [
25686 bless( {
25687 'actcount' => 1,
25688 'dircount' => 1,
25689 'error' => undef,
25690 'items' => [
25691 bless( {
25692 'argcode' => undef,
25693 'implicit' => 'xpfilters, or xpbrackets',
25694 'line' => 240,
25695 'lookahead' => 0,
25696 'matchrule' => 0,
25697 'subrule' => '_alternation_1_of_production_1_of_rule_xpintercont'
25698 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25699 bless( {
25700 'code' => 'my $oldskip = $skip; $skip=""; $oldskip',
25701 'hashname' => '__DIRECTIVE1__',
25702 'line' => 240,
25703 'lookahead' => 0,
25704 'name' => '<skip:"">'
25705 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
25706 bless( {
25707 'argcode' => undef,
25708 'expected' => undef,
25709 'line' => 240,
25710 'lookahead' => 0,
25711 'matchrule' => 0,
25712 'max' => 1,
25713 'min' => 0,
25714 'repspec' => '?',
25715 'subrule' => 'xpinter'
25716 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
25717 bless( {
25718 'code' => '{ join("",$item[1],@{$item[3]}) }',
25719 'hashname' => '__ACTION1__',
25720 'line' => 241,
25721 'lookahead' => 0
25722 }, 'XML::XSH2::Parser::_Runtime::Action' )
25723 ],
25724 'line' => undef,
25725 'number' => 0,
25726 'patcount' => 0,
25727 'strcount' => 0,
25728 'uncommit' => undef
25729 }, 'XML::XSH2::Parser::_Runtime::Production' )
25730 ],
25731 'vars' => ''
25732 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25733 'xplocationstep' => bless( {
25734 'calls' => [
25735 'xpaxis',
25736 'xpnodetest'
25737 ],
25738 'changed' => 0,
25739 'impcount' => 0,
25740 'line' => 431,
25741 'name' => 'xplocationstep',
25742 'opcount' => 0,
25743 'prods' => [
25744 bless( {
25745 'actcount' => 1,
25746 'dircount' => 0,
25747 'error' => undef,
25748 'items' => [
25749 bless( {
25750 'argcode' => undef,
25751 'expected' => undef,
25752 'line' => 432,
25753 'lookahead' => 0,
25754 'matchrule' => 0,
25755 'max' => 1,
25756 'min' => 0,
25757 'repspec' => '?',
25758 'subrule' => 'xpaxis'
25759 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
25760 bless( {
25761 'argcode' => undef,
25762 'implicit' => undef,
25763 'line' => 432,
25764 'lookahead' => 0,
25765 'matchrule' => 0,
25766 'subrule' => 'xpnodetest'
25767 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25768 bless( {
25769 'code' => '{ [ (@{$item[1]} ? $item[1][0] : \'child::\'),$item[3] ] }',
25770 'hashname' => '__ACTION1__',
25771 'line' => 433,
25772 'lookahead' => 0
25773 }, 'XML::XSH2::Parser::_Runtime::Action' )
25774 ],
25775 'line' => undef,
25776 'number' => 0,
25777 'patcount' => 0,
25778 'strcount' => 0,
25779 'uncommit' => undef
25780 }, 'XML::XSH2::Parser::_Runtime::Production' )
25781 ],
25782 'vars' => ''
25783 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25784 'xpnodetest' => bless( {
25785 'calls' => [],
25786 'changed' => 0,
25787 'impcount' => 0,
25788 'line' => 428,
25789 'name' => 'xpnodetest',
25790 'opcount' => 0,
25791 'prods' => [
25792 bless( {
25793 'actcount' => 0,
25794 'dircount' => 0,
25795 'error' => undef,
25796 'items' => [
25797 bless( {
25798 'description' => '/node\\\\(\\\\)|text\\\\(\\\\)|comment\\\\(\\\\)|processing-instruction\\\\(\\\\s*(?:"[^"]*"\\\\s*|\'[^\'*]\'\\\\s*)?\\\\)|[^\\\\(\\\\[\\\\/\\\\"\\\\\'\\\\&\\\\;\\\\s]+/',
25799 'hashname' => '__PATTERN1__',
25800 'ldelim' => '/',
25801 'line' => 429,
25802 'lookahead' => 0,
25803 'mod' => '',
25804 'pattern' => 'node\\(\\)|text\\(\\)|comment\\(\\)|processing-instruction\\(\\s*(?:"[^"]*"\\s*|\'[^\'*]\'\\s*)?\\)|[^\\(\\[\\/\\"\\\'\\&\\;\\s]+',
25805 'rdelim' => '/'
25806 }, 'XML::XSH2::Parser::_Runtime::Token' )
25807 ],
25808 'line' => undef,
25809 'number' => 0,
25810 'patcount' => 1,
25811 'strcount' => 0,
25812 'uncommit' => undef
25813 }, 'XML::XSH2::Parser::_Runtime::Production' )
25814 ],
25815 'vars' => ''
25816 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25817 'xps' => bless( {
25818 'calls' => [],
25819 'changed' => 0,
25820 'impcount' => 0,
25821 'line' => 244,
25822 'name' => 'xps',
25823 'opcount' => 0,
25824 'prods' => [
25825 bless( {
25826 'actcount' => 0,
25827 'dircount' => 0,
25828 'error' => undef,
25829 'items' => [
25830 bless( {
25831 'description' => '/(?: [^\\\\$\\\\[\\\\]()\'"\\};]+ |
25832 \\\\$(?!\\\\\\{) |
25833 \\\\$\\\\\\{ (?:\\\\$?[a-zA-Z_][a-zA-Z0-9_]* |
25834 \\\\\\{.*?\\\\\\} |
25835 \\\\(.+?\\\\)
25836 )
25837 \\\\\\} |
25838 \'(?:\\\\$\\\\\\{ (?: \\\\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\\\\{.*?\\\\\\} | \\\\(.+?\\\\)) \\\\\\} |
25839 \\\\$(?!\\\\\\{) | [^\\\\$\'] | \\\\\\\\\\\\$
25840 )*\' |
25841 "(?:\\\\$\\\\\\{ (?: \\\\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\\\\{.*?\\\\\\} | \\\\(.+?\\\\)) \\\\\\} |
25842 \\\\$(?!\\\\\\{) | [^\\\\$"] | \\\\\\\\\\\\$
25843 )*"
25844 )*/x',
25845 'hashname' => '__PATTERN1__',
25846 'ldelim' => '/',
25847 'line' => 245,
25848 'lookahead' => 0,
25849 'mod' => 'x',
25850 'pattern' => '(?: [^\\$\\[\\]()\'"};]+ |
25851 \\$(?!\\{) |
25852 \\$\\{ (?:\\$?[a-zA-Z_][a-zA-Z0-9_]* |
25853 \\{.*?\\} |
25854 \\(.+?\\)
25855 )
25856 \\} |
25857 \'(?:\\$\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\{.*?\\} | \\(.+?\\)) \\} |
25858 \\$(?!\\{) | [^\\$\'] | \\\\\\$
25859 )*\' |
25860 "(?:\\$\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\{.*?\\} | \\(.+?\\)) \\} |
25861 \\$(?!\\{) | [^\\$"] | \\\\\\$
25862 )*"
25863 )*',
25864 'rdelim' => '/'
25865 }, 'XML::XSH2::Parser::_Runtime::Token' )
25866 ],
25867 'line' => undef,
25868 'number' => 0,
25869 'patcount' => 1,
25870 'strcount' => 0,
25871 'uncommit' => undef
25872 }, 'XML::XSH2::Parser::_Runtime::Production' )
25873 ],
25874 'vars' => ''
25875 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25876 'xpsimple' => bless( {
25877 'calls' => [
25878 'xpbrackets'
25879 ],
25880 'changed' => 0,
25881 'impcount' => 0,
25882 'line' => 188,
25883 'name' => 'xpsimple',
25884 'opcount' => 0,
25885 'prods' => [
25886 bless( {
25887 'actcount' => 0,
25888 'dircount' => 0,
25889 'error' => undef,
25890 'items' => [
25891 bless( {
25892 'description' => '/(?:
25893 \\\\$\\\\\\{ (?: \\\\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\\\\{.*?\\\\\\} | \\\\(.+?\\\\) ) \\\\\\} |
25894 \\\\$(?!\\\\\\{) |
25895 [^-:\\\\$\\\\[\\\\]\\{\\}|"\'\\\\ \\\\s();] |
25896 -[^-\\\\[\\\\]\\{\\}|"\'\\\\ \\\\s();]
25897 )
25898 (?:
25899 \\\\$\\\\\\{ (?: \\\\$?[a-zA-Z_][a-zA-Z0-9_]* | \\\\\\{.*?\\\\\\} | \\\\(.+?\\\\) ) \\\\\\} |
25900 \\\\$(?!\\\\\\{) |
25901 [^\\\\[\\\\]\\\\$\\{\\}|"\'\\\\ \\\\s();]
25902 )*/x',
25903 'hashname' => '__PATTERN1__',
25904 'ldelim' => '/',
25905 'line' => 189,
25906 'lookahead' => 0,
25907 'mod' => 'x',
25908 'pattern' => '(?:
25909 \\$\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\{.*?\\} | \\(.+?\\) ) \\} |
25910 \\$(?!\\{) |
25911 [^-:\\$\\[\\]{}|"\'\\ \\s();] |
25912 -[^-\\[\\]{}|"\'\\ \\s();]
25913 )
25914 (?:
25915 \\$\\{ (?: \\$?[a-zA-Z_][a-zA-Z0-9_]* | \\{.*?\\} | \\(.+?\\) ) \\} |
25916 \\$(?!\\{) |
25917 [^\\[\\]\\${}|"\'\\ \\s();]
25918 )*',
25919 'rdelim' => '/'
25920 }, 'XML::XSH2::Parser::_Runtime::Token' )
25921 ],
25922 'line' => undef,
25923 'number' => 0,
25924 'patcount' => 1,
25925 'strcount' => 0,
25926 'uncommit' => undef
25927 }, 'XML::XSH2::Parser::_Runtime::Production' ),
25928 bless( {
25929 'actcount' => 0,
25930 'dircount' => 0,
25931 'error' => undef,
25932 'items' => [
25933 bless( {
25934 'argcode' => undef,
25935 'implicit' => undef,
25936 'line' => 200,
25937 'lookahead' => 0,
25938 'matchrule' => 0,
25939 'subrule' => 'xpbrackets'
25940 }, 'XML::XSH2::Parser::_Runtime::Subrule' )
25941 ],
25942 'line' => 200,
25943 'number' => 1,
25944 'patcount' => 0,
25945 'strcount' => 0,
25946 'uncommit' => undef
25947 }, 'XML::XSH2::Parser::_Runtime::Production' )
25948 ],
25949 'vars' => ''
25950 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
25951 'xpstep' => bless( {
25952 'calls' => [
25953 'xplocationstep',
25954 'xpfilter'
25955 ],
25956 'changed' => 0,
25957 'impcount' => 0,
25958 'line' => 436,
25959 'name' => 'xpstep',
25960 'opcount' => 0,
25961 'prods' => [
25962 bless( {
25963 'actcount' => 1,
25964 'dircount' => 1,
25965 'error' => undef,
25966 'items' => [
25967 bless( {
25968 'argcode' => undef,
25969 'implicit' => undef,
25970 'line' => 437,
25971 'lookahead' => 0,
25972 'matchrule' => 0,
25973 'subrule' => 'xplocationstep'
25974 }, 'XML::XSH2::Parser::_Runtime::Subrule' ),
25975 bless( {
25976 'code' => 'my $oldskip = $skip; $skip=""; $oldskip',
25977 'hashname' => '__DIRECTIVE1__',
25978 'line' => 437,
25979 'lookahead' => 0,
25980 'name' => '<skip:"">'
25981 }, 'XML::XSH2::Parser::_Runtime::Directive' ),
25982 bless( {
25983 'argcode' => undef,
25984 'expected' => undef,
25985 'line' => 437,
25986 'lookahead' => 0,
25987 'matchrule' => 0,
25988 'max' => 1,
25989 'min' => 0,
25990 'repspec' => '?',
25991 'subrule' => 'xpfilter'
25992 }, 'XML::XSH2::Parser::_Runtime::Repetition' ),
25993 bless( {
25994 'code' => '{ [ @{$item[1]}, @{$item[3]}] }',
25995 'hashname' => '__ACTION1__',
25996 'line' => 438,
25997 'lookahead' => 0
25998 }, 'XML::XSH2::Parser::_Runtime::Action' )
25999 ],
26000 'line' => undef,
26001 'number' => 0,
26002 'patcount' => 0,
26003 'strcount' => 0,
26004 'uncommit' => undef
26005 }, 'XML::XSH2::Parser::_Runtime::Production' )
26006 ],
26007 'vars' => ''
26008 }, 'XML::XSH2::Parser::_Runtime::Rule' ),
26009 'xpstring' => bless( {
26010 'calls' => [],
26011 'changed' => 0,
26012 'impcount' => 0,
26013 'line' => 260,
26014 'name' => 'xpstring',
26015 'opcount' => 0,
26016 'prods' => [
26017 bless( {
26018 'actcount' => 0,
26019 'dircount' => 0,
26020 'error' => undef,
26021 'items' => [
26022 bless( {
26023 'description' => '/\'(?:\\\\$\\\\\\{(?:\\\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\\\\{.*?\\\\\\}|\\\\(.+?\\\\))\\\\\\}|\\\\$(?!\\\\\\{)|[^\\\\$\']|\\\\\\\\\\\\$)*\' |
26024 "(?:\\\\$\\\\\\{(?:\\\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\\\\\{.*?\\\\\\}|\\\\(.+?\\\\))\\\\\\}|\\\\$(?!\\\\\\{)|[^\\\\$"]|\\\\\\\\\\\\$)*"/x',
26025 'hashname' => '__PATTERN1__',
26026 'ldelim' => '/',
26027 'line' => 261,
26028 'lookahead' => 0,
26029 'mod' => 'x',
26030 'pattern' => '\'(?:\\$\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\{.*?\\}|\\(.+?\\))\\}|\\$(?!\\{)|[^\\$\']|\\\\\\$)*\' |
26031 "(?:\\$\\{(?:\\$?[a-zA-Z_][a-zA-Z0-9_]*|\\{.*?\\}|\\(.+?\\))\\}|\\$(?!\\{)|[^\\$"]|\\\\\\$)*"',
26032 'rdelim' => '/'
26033 }, 'XML::XSH2::Parser::_Runtime::Token' )
26034 ],
26035 'line' => undef,
26036 'number' => 0,
26037 'patcount' => 1,
26038 'strcount' => 0,
26039 'uncommit' => undef
26040 }, 'XML::XSH2::Parser::_Runtime::Production' )
26041 ],
26042 'vars' => ''
26043 }, 'XML::XSH2::Parser::_Runtime::Rule' )
26044 },
26045 'startcode' => ''
26046 }, 'XML::XSH2::Parser::_Runtime' );
26047 }
↑ Summary XSH2/Completion.pm »