blib/lib/Parse/RecDescent.pm

filter: Statementstmt 80.7% 3761 / 4656 Branchbran 44.2% 1130 / 2556 Conditioncond 37.2% 370 / 993 MC/DCmcdc 5.1% 29 / 565 Subroutinesub 84.6% 204 / 241 Podpod 0.0% 0 / 8 totaltotal 60.9% 5494 / 9019 CC 1776 SCAR 61.9
CC
1776
Cov
64%
_generate
3309.0
test6
556.9
test1
269.1
CRAP 486.8
↑ Summary Build »
1 # GENERATE RECURSIVE DESCENT PARSER OBJECTS FROM A GRAMMAR
2  
3 3 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 package Parse::RecDescent;
7  
8 3 ▶use Text::Balanced qw ( extract_codeblock extract_bracketed extract_quotelike extract_delimited );
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 3 ▶use vars qw ( $skip );
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 5 *defskip = \ '\s*'; # DEFAULT SEPARATOR IS OPTIONAL WHITESPACE
13 5 $skip = '\s*'; # UNIVERSAL SEPARATOR IS OPTIONAL WHITESPACE
14 5 my $MAXREP = 100_000_000; # REPETITIONS MATCH AT MOST 100,000,000 TIMES
15  
16  
17 #ifndef RUNTIME
18 sub import # IMPLEMENT PRECOMPILER BEHAVIOUR UNDER:
19 # perl -MParse::RecDescent - <grammarfile> <classname> [runtimeclassname]
20 {
21 0 ▶ local *_die = sub { print @_, "\n"; exit };
Subroutine __ANON__: not called CC=1 SCAR=2.6
Subroutine import: called CC=6 SCAR=32.2
22  
23 4 my ($package, $file, $line) = caller;
24  
25 4 ▶ if ($file eq '-' && $line == 0)
Branch: 1 branch
BranchTrueFalseTotal
if ($file eq "-" and $line == 0) 0 4 4
Condition33%1/3
$file eq "-" and $line == 0
!ll&&!rl&&r
400
MC/DC0%0/2
$file eq "-" and $line == 0
$file eq "-" $line == 0
Truth table33%1/3
A and B
A= $file eq "-"B= $line == 0
ABresult
0X0
100
111
26 {
27 0 ▶ _die("Usage: perl -MLocalTest - <grammarfile> <classname>")
Branch: 1 branch
BranchTrueFalseTotal
unless @ARGV >= 2 and $ARGV <= 3 0 0 0
Condition0%0/3
@ARGV >= 2 and $ARGV <= 3
!ll&&!rl&&r
000
MC/DC0%0/2
@ARGV >= 2 and $ARGV <= 3
@ARGV >= 2 $ARGV <= 3
Truth table0%0/3
A and B
A= @ARGV >= 2B= $ARGV <= 3
ABresult
0X0
100
111
28 unless @ARGV >= 2 and $ARGV <= 3;
29  
30 0 my ($sourcefile, $class, $runtime_class) = @ARGV;
31  
32 0 local *IN;
33 0 ▶ open IN, $sourcefile
Branch: 1 branch
BranchTrueFalseTotal
open IN, $sourcefile or _die(qq[Can't open grammar file "$sourcefile"]) 0 0 0
34 or _die(qq{Can't open grammar file "$sourcefile"});
35 0 local $/; #
36 0 my $grammar = <IN>;
37 0 close IN;
38  
39 0 Parse::RecDescent->Precompile({ -runtime_class => $runtime_class },
40 $grammar, $class, $sourcefile);
41 0 exit;
42 }
43 }
44  
45 sub Save
46 {
47 0 ▶ my $self = shift;
Subroutine Save: not called CC=2 SCAR=17.9
Pod undocumented
48 0 my %opt;
49 0 ▶ if ('HASH' eq ref $_[0]) {
Branch: 1 branch
BranchTrueFalseTotal
if ("HASH" eq ref $_[0]) 0 0 0
50 0 %opt = (%opt, %{$_[0]});
51 0 shift;
52 }
53 0 my ($class) = @_;
54 0 $self->{saving} = 1;
55 0 $self->Precompile(undef,$class);
56 0 $self->{saving} = 0;
57 }
58  
59 sub PrecompiledRuntime
60 {
61 0 ▶ my ($self, $class) = @_;
Subroutine PrecompiledRuntime: not called CC=1 SCAR=6.9
Pod undocumented
62 0 my $opt = {
63 -standalone => 1,
64 -runtime_class => $class,
65 };
66 0 $self->Precompile($opt, '', $class);
67 }
68  
69 sub Precompile
70 {
71 2 ▶ my $self = shift;
Subroutine Precompile: called CC=25 SCAR=33.3
Pod undocumented
72 2 my %opt = ( -standalone => 0,
73 );
74 2 ▶ if ('HASH' eq ref $_[0]) {
Branch: 1 branch
BranchTrueFalseTotal
if ("HASH" eq ref $_[0]) 2 0 2
75 2 %opt = (%opt, %{$_[0]});
76 2 shift;
77 }
78 2 my ($grammar, $class, $sourcefile) = @_;
79  
80 2 ▶ $class =~ /^(\w+::)*\w+$/ or croak("Bad class name: $class");
Branch: 1 branch
BranchTrueFalseTotal
$class =~ /^(\w+::)*\w+$/ or croak("Bad class name: $class") 0 2 2
81  
82 2 my $modulefile = $class;
83 2 $modulefile =~ s/.*:://;
84 2 $modulefile .= ".pm";
85  
86 2 my $code = '';
87  
88 2 local *OUT;
89 2 ▶ open OUT, ">", $modulefile
Branch: 1 branch
BranchTrueFalseTotal
open OUT, ">", $modulefile or croak("Can't write to new module file '${modulefile}'") 0 2 2
90 or croak("Can't write to new module file '$modulefile'");
91  
92 2 ▶ print STDERR "precompiling grammar from file '$sourcefile'\n",
Branch: 1 branch
BranchTrueFalseTotal
if $grammar and $sourcefile 0 2 2
Condition33%1/3
$grammar and $sourcefile
!ll&&!rl&&r
020
MC/DC0%0/2
$grammar and $sourcefile
$grammar $sourcefile
Truth table33%1/3
A and B
A= $grammarB= $sourcefile
ABresult
0X0
100
111
93 "to class $class in module file '$modulefile'\n"
94 if $grammar && $sourcefile;
95  
96 2 ▶ if ($grammar) {
Branch: 1 branch
BranchTrueFalseTotal
if ($grammar) 2 0 2
97 2 ▶ $self = Parse::RecDescent->new($grammar, # $grammar
Branch: 1 branch
BranchTrueFalseTotal
if $grammar 2 0 2
Condition33%1/3
'Parse::RecDescent'->new($grammar, 1, $class) || croak(q[Can't compile bad grammar])
l!l&&r!l&&!r
200
MC/DC0%0/2
'Parse::RecDescent'->new($grammar, 1, $class) || croak(q[Can't compile bad grammar])
'Parse::RecDescent'->new($grammar, 1, $class) croak(q[Can't compile bad grammar])
Truth table33%1/3
A || B
A= 'Parse::RecDescent'->new($grammar, 1, $class)B= croak(q[Can't compile bad grammar])
ABresult
1X1
011
000
98 1, # $compiling
99 $class # $namespace
100 )
101 || croak("Can't compile bad grammar")
102 if $grammar;
103  
104 # Do not allow &DESTROY to remove the precompiled namespace
105 2 delete $self->{_not_precompiled};
106  
107 2 foreach ( keys %{$self->{rules}} ) {
108 4 $self->{rules}{$_}{changed} = 1;
109 }
110  
111 2 $code = $self->_code();
112 }
113  
114 # If a name for the runtime package was not provided,
115 # generate one based on the module output name and the generated
116 # code
117 2 ▶ if (not defined($opt{-runtime_class})) {
Branch: 1 branch
BranchTrueFalseTotal
unless (defined $opt{"-runtime_class"}) 2 0 2
118 2 ▶ if ($opt{-standalone}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opt{'-standalone'}) { } 1 1 2
119 1 my $basename = $class . '::_Runtime';
120  
121 1 my $name = $basename;
122  
123 1 ▶ for (my $i = 0; $code =~ /$basename/; ++$i) {
Branch: 1 branch
BranchTrueFalseTotal
if ($code =~ /$basename/) 0 1 1
124 0 $name = sprintf("%s%06d", $basename, $i);
125 }
126  
127 1 $opt{-runtime_class} = $name;
128 } else {
129 1 my $package = ref $self;
130 1 ▶ local $::RD_HINT = defined $::RD_HINT ? $::RD_HINT : 1;
Branch: 1 branch
BranchTrueFalseTotal
defined $main::RD_HINT ? : 1 0 1
131 1 _hint(<<EOWARNING);
132 The precompiled grammar did not specify the -runtime_class
133 option. The resulting parser will "use $package". Future changes to
134 $package may cause $class to stop working.
135  
136 Consider building a -standalone parser, or providing the
137 -runtime_class option as described in Parse::RecDescent's POD.
138  
139 Use \$::RD_HINT = 0 to disable this message.
140 EOWARNING
141 1 $opt{-runtime_class} = $package;
142 }
143 }
144  
145 2 $code =~ s/Parse::RecDescent/$opt{-runtime_class}/gs;
146  
147 # Make the resulting pre-compiled parser stand-alone by including
148 # the contents of Parse::RecDescent as -runtime_class in the
149 # resulting precompiled parser.
150 2 ▶ if ($opt{-standalone}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($opt{"-standalone"}) 1 1 2
151 1 local *IN;
152 1 ▶ open IN, '<', $Parse::RecDescent::_FILENAME
Branch: 1 branch
BranchTrueFalseTotal
open IN, "<", $Parse::RecDescent::_FILENAME or croak("Can't open $Parse::RecDescent::_FILENAME for standalone pre-compilation: $!\n") 0 1 1
153 or croak("Can't open $Parse::RecDescent::_FILENAME for standalone pre-compilation: $!\n");
154 1 my $exclude = 0;
155 1 print OUT "{\n";
156 1 ▶ while (<IN>) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = readline IN)) 3472 0 3472
157 3472 ▶ if ($_ =~ /^\s*#\s*ifndef\s+RUNTIME\s*$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_ =~ /^\s*#\s*ifndef\s+RUNTIME\s*$/) 1 3471 3472
158 1 ++$exclude;
159 }
160 3472 ▶ if ($exclude) {
Branch: 1 branch
BranchTrueFalseTotal
if ($exclude) { } 189 3283 3472
161 189 ▶ if ($_ =~ /^\s*#\s*endif\s$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_ =~ /^\s*#\s*endif\s$/) 1 188 189
162 1 --$exclude;
163 }
164 } else {
165 3283 ▶ if ($_ =~ m/^__END__/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_ =~ /^__END__/) 1 3282 3283
166 1 last;
167 }
168  
169 3282 s/Parse::RecDescent/$opt{-runtime_class}/gs;
170 3282 print OUT $_;
171 }
172 }
173 1 close IN;
174 1 print OUT "}\n";
175 }
176  
177 2 ▶ if ($grammar) {
Branch: 1 branch
BranchTrueFalseTotal
if ($grammar) 2 0 2
178 2 print OUT "package $class;\n";
179 }
180  
181 2 ▶ if (not $opt{-standalone}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($opt{"-standalone"}) 1 1 2
182 1 print OUT "use $opt{-runtime_class};\n";
183 }
184  
185 2 ▶ if ($grammar) {
Branch: 1 branch
BranchTrueFalseTotal
if ($grammar) 2 0 2
186 2 print OUT "{ my \$ERRORS;\n\n";
187  
188 2 print OUT $code;
189  
190 2 print OUT "}\npackage $class; sub new { ";
191 2 print OUT "my ";
192  
193 2 require Data::Dumper;
194 2 $code = Data::Dumper->Dump([$self], [qw(self)]);
195 2 $code =~ s/Parse::RecDescent/$opt{-runtime_class}/gs;
196  
197 2 print OUT $code;
198  
199 2 print OUT "}";
200 }
201  
202 2 ▶ close OUT
Branch: 1 branch
BranchTrueFalseTotal
close OUT or croak("Can't write to new module file '${modulefile}'") 0 2 2
203 or croak("Can't write to new module file '$modulefile'");
204 }
205 #endif
206  
207 package Parse::RecDescent::LineCounter;
208  
209  
210 sub TIESCALAR # ($classname, \$text, $thisparser, $prevflag)
211 {
212 150 ▶ bless {
Subroutine TIESCALAR: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
$_[3] ? : 67 83 150
213 text => $_[1],
214 parser => $_[2],
215 prev => $_[3]?1:0,
216 }, $_[0];
217 }
218  
219 sub FETCH
220 {
221 411 ▶ my $parser = $_[0]->{parser};
Subroutine FETCH: called CC=2 SCAR=6.9
222 411 my $cache = $parser->{linecounter_cache};
223 411 my $from = $parser->{fulltextlen}-length(${$_[0]->{text}})-$_[0]->{prev}
224 411 ;
225  
226 411 ▶ unless (exists $cache->{$from})
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $cache->{$from}) 171 240 411
227 {
228 $parser->{lastlinenum} = $parser->{offsetlinenum}
229 171 - Parse::RecDescent::_linecount(substr($parser->{fulltext},$from))
230 + 1;
231 171 $cache->{$from} = $parser->{lastlinenum};
232 }
233 411 return $cache->{$from};
234 }
235  
236 sub STORE
237 {
238 0 ▶ my $parser = $_[0]->{parser};
Subroutine STORE: not called CC=1 SCAR=6.9
239 0 $parser->{offsetlinenum} -= $parser->{lastlinenum} - $_[1];
240 0 return undef;
241 }
242  
243 sub resync # ($linecounter)
244 {
245 0 ▶ my $self = tied($_[0]);
Subroutine resync: not called CC=2 SCAR=17.9
246 0 ▶ die "Tried to alter something other than a LineCounter\n"
Branch: 1 branch
BranchTrueFalseTotal
unless $self =~ /Parse::RecDescent::LineCounter/ 0 0 0
247 unless $self =~ /Parse::RecDescent::LineCounter/;
248  
249 0 my $parser = $self->{parser};
250 my $apparently = $parser->{offsetlinenum}
251 0 - Parse::RecDescent::_linecount(${$self->{text}})
252 + 1;
253  
254 0 $parser->{offsetlinenum} += $parser->{lastlinenum} - $apparently;
255 0 return 1;
256 }
257  
258 package Parse::RecDescent::ColCounter;
259  
260 sub TIESCALAR # ($classname, \$text, $thisparser, $prevflag)
261 {
262 134 ▶ bless {
Subroutine TIESCALAR: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
$_[3] ? : 67 67 134
263 text => $_[1],
264 parser => $_[2],
265 prev => $_[3]?1:0,
266 }, $_[0];
267 }
268  
269 sub FETCH
270 {
271 411 ▶ my $parser = $_[0]->{parser};
Subroutine FETCH: called CC=1 SCAR=0.0
272 411 my $missing = $parser->{fulltextlen}-length(${$_[0]->{text}})-$_[0]->{prev}+1;
273 411 substr($parser->{fulltext},0,$missing) =~ m/^(.*)\Z/m;
274 411 return length($1);
275 }
276  
277 sub STORE
278 {
279 0 ▶ die "Can't set column number via \$thiscolumn\n";
Subroutine STORE: not called CC=1 SCAR=6.9
280 }
281  
282  
283 package Parse::RecDescent::OffsetCounter;
284  
285 sub TIESCALAR # ($classname, \$text, $thisparser, $prev)
286 {
287 134 ▶ bless {
Subroutine TIESCALAR: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
$_[3] ? : 67 67 134
288 text => $_[1],
289 parser => $_[2],
290 prev => $_[3]?-1:0,
291 }, $_[0];
292 }
293  
294 sub FETCH
295 {
296 315 ▶ my $parser = $_[0]->{parser};
Subroutine FETCH: called CC=1 SCAR=0.0
297 315 return $parser->{fulltextlen}-length(${$_[0]->{text}})+$_[0]->{prev};
298 }
299  
300 sub STORE
301 {
302 0 ▶ die "Can't set current offset via \$thisoffset or \$prevoffset\n";
Subroutine STORE: not called CC=1 SCAR=6.9
303 }
304  
305  
306  
307 package Parse::RecDescent::Rule;
308  
309 sub new ($$$$$)
310 {
311 38 ▶ my $class = ref($_[0]) || $_[0];
Subroutine new: called CC=5 SCAR=16.7
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
0380
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
312 38 my $name = $_[1];
313 38 my $owner = $_[2];
314 38 my $line = $_[3];
315 38 my $replace = $_[4];
316  
317 38 ▶ if (defined $owner->{"rules"}{$name})
Branch: 1 branch
BranchTrueFalseTotal
if (defined $owner->{'rules'}{$name}) { } 4 34 38
318 {
319 4 my $self = $owner->{"rules"}{$name};
320 4 ▶ if ($replace && !$self->{"changed"})
Branch: 1 branch
BranchTrueFalseTotal
if ($replace and not $self->{"changed"}) 0 4 4
Condition66%2/3
$replace and not $self->{"changed"}
!ll&&!rl&&r
310
MC/DC0%0/2
$replace and not $self->{"changed"}
$replace not $self->{"changed"}
Truth table66%2/3
A and not(B)
A= $replaceB= not $self->{"changed"}
ABresult
0X0
100
111
321 {
322 0 $self->reset;
323 }
324 4 return $self;
325 }
326 else
327 {
328 34 return $owner->{"rules"}{$name} =
329 bless
330 {
331 "name" => $name,
332 "prods" => [],
333 "calls" => [],
334 "changed" => 0,
335 "line" => $line,
336 "impcount" => 0,
337 "opcount" => 0,
338 "vars" => "",
339 }, $class;
340 }
341 }
342  
343 sub reset($)
344 {
345 0 ▶ @{$_[0]->{"prods"}} = ();
Subroutine reset: not called CC=1 SCAR=6.9
346 0 @{$_[0]->{"calls"}} = ();
347 0 $_[0]->{"changed"} = 0;
348 0 $_[0]->{"impcount"} = 0;
349 0 $_[0]->{"opcount"} = 0;
350 0 $_[0]->{"vars"} = "";
351 }
352  
353 ▶sub DESTROY {}
Subroutine DESTROY: not called CC=1 SCAR=0.0
354  
355 sub hasleftmost($$)
356 {
357 86 ▶ my ($self, $ref) = @_;
Subroutine hasleftmost: called CC=3 SCAR=11.0
358  
359 86 my $prod;
360 86 foreach $prod ( @{$self->{"prods"}} )
361 {
362 112 ▶ return 1 if $prod->hasleftmost($ref);
Branch: 1 branch
BranchTrueFalseTotal
if $prod->hasleftmost($ref) 48 64 112
363 }
364  
365 38 return 0;
366 }
367  
368 sub leftmostsubrules($)
369 {
370 46 ▶ my $self = shift;
Subroutine leftmostsubrules: called CC=2 SCAR=6.9
371 46 my @subrules = ();
372  
373 46 my $prod;
374 46 foreach $prod ( @{$self->{"prods"}} )
375 {
376 64 push @subrules, $prod->leftmostsubrule();
377 }
378  
379 46 return @subrules;
380 }
381  
382 sub expected($)
383 {
384 39 ▶ my $self = shift;
Subroutine expected: called CC=4 SCAR=13.9
385 39 my @expected = ();
386  
387 39 my $prod;
388 39 foreach $prod ( @{$self->{"prods"}} )
389 {
390 57 my $next = $prod->expected();
391 57 ▶ unless (! $next or _contains($next,@expected) )
Branch: 1 branch
BranchTrueFalseTotal
unless (not $next or &_contains($next, @expected)) 50 7 57
Condition100%3/3
not $next or &_contains($next, @expected)
l!l&&r!l&&!r
5250
MC/DC100%2/2
not $next or &_contains($next, @expected)
not $next &_contains($next, @expected)
Truth table100%3/3
not(A) or B
A= not $nextB= &_contains($next, @expected)
ABresult
1X1
011
000
392 {
393 50 push @expected, $next;
394 }
395 }
396  
397 39 return join ', or ', @expected;
398 }
399  
400 sub _contains($@)
401 {
402 76 ▶ my $target = shift;
Subroutine _contains: called CC=3 SCAR=11.0
403 76 my $item;
404 76 ▶ foreach $item ( @_ ) { return 1 if $target eq $item; }
Branch: 1 branch
BranchTrueFalseTotal
if $target eq $item 5 31 36
405 71 return 0;
406 }
407  
408 sub addcall($$)
409 {
410 21 ▶ my ( $self, $subrule ) = @_;
Subroutine addcall: called CC=2 SCAR=6.9
411 21 ▶ unless ( _contains($subrule, @{$self->{"calls"}}) )
Branch: 1 branch
BranchTrueFalseTotal
unless (&_contains($subrule, @{$$self{"calls"};})) 18 3 21
412 {
413 18 push @{$self->{"calls"}}, $subrule;
414 }
415 }
416  
417 sub addprod($$)
418 {
419 48 ▶ my ( $self, $prod ) = @_;
Subroutine addprod: called CC=1 SCAR=0.0
420 48 push @{$self->{"prods"}}, $prod;
421 48 $self->{"changed"} = 1;
422 48 $self->{"impcount"} = 0;
423 48 $self->{"opcount"} = 0;
424 48 $prod->{"number"} = $#{$self->{"prods"}};
425 48 return $prod;
426 }
427  
428 sub addvar
429 {
430 1 ▶ my ( $self, $var, $parser ) = @_;
Subroutine addvar: called CC=2 SCAR=7.6
431 1 ▶ if ($var =~ /\A\s*local\s+([%@\$]\w+)/)
Branch: 1 branch
BranchTrueFalseTotal
if ($var =~ /\A\s*local\s+([%\@\$]\w+)/) { } 0 1 1
432 {
433 0 $parser->{localvars} .= " $1";
434 0 $self->{"vars"} .= "$var;\n" }
435 else
436 1 { $self->{"vars"} .= "my $var;\n" }
437 1 $self->{"changed"} = 1;
438 1 return 1;
439 }
440  
441 sub addautoscore
442 {
443 0 ▶ my ( $self, $code ) = @_;
Subroutine addautoscore: not called CC=1 SCAR=6.9
444 0 $self->{"autoscore"} = $code;
445 0 $self->{"changed"} = 1;
446 0 return 1;
447 }
448  
449 sub nextoperator($)
450 {
451 0 ▶ my $self = shift;
Subroutine nextoperator: not called CC=1 SCAR=6.9
452 0 my $prodcount = scalar @{$self->{"prods"}};
453 0 my $opcount = ++$self->{"opcount"};
454 0 return "_operator_${opcount}_of_production_${prodcount}_of_rule_$self->{name}";
455 }
456  
457 sub nextimplicit($)
458 {
459 2 ▶ my $self = shift;
Subroutine nextimplicit: called CC=1 SCAR=0.0
460 2 my $prodcount = scalar @{$self->{"prods"}};
461 2 my $impcount = ++$self->{"impcount"};
462 2 return "_alternation_${impcount}_of_production_${prodcount}_of_rule_$self->{name}";
463 }
464  
465  
466 sub code
467 {
468 37 ▶ my ($self, $namespace, $parser, $check) = @_;
Subroutine code: called CC=13 SCAR=26.3
469  
470 37 ▶eval 'undef &' . $namespace . '::' . $self->{"name"} unless $parser->{saving};
Branch: 1 branch
BranchTrueFalseTotal
unless $parser->{"saving"} 37 0 37
471  
472 my $code =
473 '
474 # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args, $_itempos)
475 sub ' . $namespace . '::' . $self->{"name"} . '
476 {
477 my $thisparser = $_[0];
478 use vars q{$tracelevel};
479 local $tracelevel = ($tracelevel||0)+1;
480 $ERRORS = 0;
481 my $thisrule = $thisparser->{"rules"}{"' . $self->{"name"} . '"};
482  
483 Parse::RecDescent::_trace(q{Trying rule: [' . $self->{"name"} . ']},
484 Parse::RecDescent::_tracefirst($_[1]),
485 q{' . $self->{"name"} . '},
486 $tracelevel)
487 if defined $::RD_TRACE;
488  
489 ' . ($parser->{deferrable}
490 ? 'my $def_at = @{$thisparser->{deferred}};'
491 : '') .
492 '
493 my $err_at = @{$thisparser->{errors}};
494  
495 my $score;
496 my $score_return;
497 my $_tok;
498 my $return = undef;
499 my $_matched=0;
500 my $commit=0;
501 my @item = ();
502 my %item = ();
503 my $repeating = $_[2];
504 my $_noactions = $_[3];
505 my @arg = defined $_[4] ? @{ &{$_[4]} } : ();
506 my $_itempos = $_[5];
507 my %arg = ($#arg & 01) ? @arg : (@arg, undef);
508 my $text;
509 my $lastsep;
510 my $current_match;
511 my $expectation = new Parse::RecDescent::Expectation(q{' . $self->expected() . '});
512 $expectation->at($_[1]);
513 '. ($parser->{_check}{thisoffset}?'
514 my $thisoffset;
515 tie $thisoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser;
516 ':'') . ($parser->{_check}{prevoffset}?'
517 my $prevoffset;
518 tie $prevoffset, q{Parse::RecDescent::OffsetCounter}, \$text, $thisparser, 1;
519 ':'') . ($parser->{_check}{thiscolumn}?'
520 my $thiscolumn;
521 tie $thiscolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser;
522 ':'') . ($parser->{_check}{prevcolumn}?'
523 my $prevcolumn;
524 tie $prevcolumn, q{Parse::RecDescent::ColCounter}, \$text, $thisparser, 1;
525 ':'') . ($parser->{_check}{prevline}?'
526 my $prevline;
527 tie $prevline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser, 1;
528 ':'') . '
529 my $thisline;
530 tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser;
531  
532 37 ▶ '. $self->{vars} .'
Branch: 6 branches
BranchTrueFalseTotal
$parser->{'deferrable'} ? : 0 37 37
$parser->{'_check'}{'thisoffset'} ? : 29 8 37
$parser->{'_check'}{'prevoffset'} ? : 29 8 37
$parser->{'_check'}{'thiscolumn'} ? : 29 8 37
$parser->{'_check'}{'prevcolumn'} ? : 29 8 37
$parser->{'_check'}{'prevline'} ? : 29 8 37
533 ';
534  
535 37 my $prod;
536 37 foreach $prod ( @{$self->{"prods"}} )
537 {
538 53 ▶ $prod->addscore($self->{autoscore},0,0) if $self->{autoscore};
Branch: 1 branch
BranchTrueFalseTotal
if $self->{"autoscore"} 0 53 53
539 53 ▶ next unless $prod->checkleftmost();
Branch: 1 branch
BranchTrueFalseTotal
unless $prod->checkleftmost 0 53 53
540 53 $code .= $prod->code($namespace,$self,$parser);
541  
542 $code .= $parser->{deferrable}
543 53 ▶ ? ' splice
Branch: 1 branch
BranchTrueFalseTotal
$parser->{'deferrable'} ? : 0 53 53
544 @{$thisparser->{deferred}}, $def_at unless $_matched;
545 '
546 : '';
547 }
548  
549 $code .=
550 '
551 unless ( $_matched || defined($score) )
552 {
553 ' .($parser->{deferrable}
554 ? ' splice @{$thisparser->{deferred}}, $def_at;
555 '
556 : '') . '
557  
558 $_[1] = $text; # NOT SURE THIS IS NEEDED
559 Parse::RecDescent::_trace(q{<<'.Parse::RecDescent::_matchtracemessage($self,1).' rule>>},
560 Parse::RecDescent::_tracefirst($_[1]),
561 q{' . $self->{"name"} .'},
562 $tracelevel)
563 if defined $::RD_TRACE;
564 return undef;
565 }
566 if (!defined($return) && defined($score))
567 {
568 Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "",
569 q{' . $self->{"name"} .'},
570 $tracelevel)
571 if defined $::RD_TRACE;
572 $return = $score_return;
573 }
574 splice @{$thisparser->{errors}}, $err_at;
575 $return = $item[$#item] unless defined $return;
576 if (defined $::RD_TRACE)
577 {
578 Parse::RecDescent::_trace(q{>>'.Parse::RecDescent::_matchtracemessage($self).' rule<< (return value: [} .
579 $return . q{])}, "",
580 q{' . $self->{"name"} .'},
581 $tracelevel);
582 Parse::RecDescent::_trace(q{(consumed: [} .
583 Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])},
584 Parse::RecDescent::_tracefirst($text),
585 37 ▶ , q{' . $self->{"name"} .'},
Branch: 1 branch
BranchTrueFalseTotal
$parser->{'deferrable'} ? : 0 37 37
586 $tracelevel)
587 }
588 $_[1] = $text;
589 return $return;
590 }
591 ';
592  
593 37 return $code;
594 }
595  
596 5 my @left;
597 sub isleftrec($$)
598 {
599 37 ▶ my ($self, $rules) = @_;
Subroutine isleftrec: called CC=6 SCAR=18.0
600 37 my $root = $self->{"name"};
601 37 @left = $self->leftmostsubrules();
602 37 my $next;
603 37 foreach $next ( @left )
604 {
605 12 ▶ next unless defined $rules->{$next}; # SKIP NON-EXISTENT RULES
Branch: 1 branch
BranchTrueFalseTotal
unless defined $rules->{$next} 3 9 12
606 9 ▶ return 1 if $next eq $root;
Branch: 1 branch
BranchTrueFalseTotal
if $next eq $root 0 9 9
607 9 my $child;
608 9 foreach $child ( $rules->{$next}->leftmostsubrules() )
609 {
610 3 ▶ push(@left, $child)
Branch: 1 branch
BranchTrueFalseTotal
unless &_contains($child, @left) 3 0 3
611 if ! _contains($child, @left) ;
612 }
613 }
614 37 return 0;
615 }
616  
617 package Parse::RecDescent::Production;
618  
619 sub describe ($;$)
620 {
621 106 ▶ return join ' ', map { $_->describe($_[1]) or () } @{$_[0]->{items}};
Subroutine describe: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
$_->describe($_[1]) or () 48 174 222
622 }
623  
624 sub new ($$;$$)
625 {
626 48 ▶ my ($self, $line, $uncommit, $error) = @_;
Subroutine new: called CC=2 SCAR=7.6
627 48 ▶ my $class = ref($self) || $self;
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
0480
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
628  
629 48 bless
630 {
631 "items" => [],
632 "uncommit" => $uncommit,
633 "error" => $error,
634 "line" => $line,
635 strcount => 0,
636 patcount => 0,
637 dircount => 0,
638 actcount => 0,
639 }, $class;
640 }
641  
642 sub expected ($)
643 {
644 57 ▶ my $itemcount = scalar @{$_[0]->{"items"}};
Subroutine expected: called CC=2 SCAR=7.1
645 57 ▶ return ($itemcount) ? $_[0]->{"items"}[0]->describe(1) : '';
Branch: 1 branch
BranchTrueFalseTotal
$itemcount ? : 57 0 57
646 }
647  
648 sub hasleftmost ($$)
649 {
650 112 ▶ my ($self, $ref) = @_;
Subroutine hasleftmost: called CC=2 SCAR=7.4
651 112 ▶ return ${$self->{"items"}}[0] eq $ref if scalar @{$self->{"items"}};
Branch: 1 branch
BranchTrueFalseTotal
if scalar @{$self->{"items"};} 112 0 112
652 0 return 0;
653 }
654  
655 sub isempty($)
656 {
657 53 ▶ my $self = shift;
Subroutine isempty: called CC=1 SCAR=0.0
658 53 return 0 == @{$self->{"items"}};
659 }
660  
661 sub leftmostsubrule($)
662 {
663 64 ▶ my $self = shift;
Subroutine leftmostsubrule: called CC=3 SCAR=11.0
664  
665 64 ▶ if ( $#{$self->{"items"}} >= 0 )
Branch: 1 branch
BranchTrueFalseTotal
if ($#{$$self{"items"};} >= 0) 64 0 64
666 {
667 64 my $subrule = $self->{"items"}[0]->issubrule();
668 64 ▶ return $subrule if defined $subrule;
Branch: 1 branch
BranchTrueFalseTotal
if defined $subrule 12 52 64
669 }
670  
671 52 return ();
672 }
673  
674 sub checkleftmost($)
675 {
676 53 ▶ my @items = @{$_[0]->{"items"}};
Subroutine checkleftmost: called CC=15 SCAR=40.5
677 53 ▶ if (@items==1 && ref($items[0]) =~ /\AParse::RecDescent::Error/
Branch: 3 branches
BranchTrueFalseTotal
if (@items == 1 and ref($items[0]) =~ /\AParse::RecDescent::Error/ and $items[0]{'commitonly'}) { } 0 53 53
elsif (@items == 1 and ($items[0]->describe || '') =~ /<rulevar|<autoscore/) { } 1 52 53
elsif (@items and ref($items[0]) =~ /\AParse::RecDescent::UncondReject/ || ($items[0]->describe || '') =~ /<autoscore/) { } 0 52 52
Condition50%3/6
@items == 1 and ref($items[0]) =~ /\AParse::RecDescent::Error/ and $items[0]{"commitonly"}
!ll&&!rl&&r
5300
@items == 1 and ref($items[0]) =~ /\AParse::RecDescent::Error/
!ll&&!rl&&r
24290
MC/DC0%0/3
@items == 1 and ref($items[0]) =~ /\AParse::RecDescent::Error/ and $items[0]{"commitonly"}
@items == 1 ref($items[0]) =~ /\AParse::RecDescent::Error/ $items[0]{"commitonly"}
Truth table50%2/4
A and B and C
A= @items == 1B= ref($items[0]) =~ /\AParse::RecDescent::Error/C= $items[0]{"commitonly"}
ABCresult
0XX0
10X0
1100
1111
678 && $items[0]->{commitonly} )
679 {
680 0 Parse::RecDescent::_warn(2,"Lone <error?> in production treated
681 as <error?> <reject>");
682 0 Parse::RecDescent::_hint("A production consisting of a single
683 conditional <error?> directive would
684 normally succeed (with the value zero) if the
685 rule is not 'commited' when it is
686 tried. Since you almost certainly wanted
687 '<error?> <reject>' Parse::RecDescent
688 supplied it for you.");
689 0 push @{$_[0]->{items}},
690 Parse::RecDescent::UncondReject->new(0,0,'<reject>');
691 }
692 ▶ elsif (@items==1 && ($items[0]->describe||"") =~ /<rulevar|<autoscore/)
Condition100%5/5
@items == 1 and ($items[0]->describe || "") =~ /<rulevar|<autoscore/
!ll&&!rl&&r
24281
$items[0]->describe || ''
l!l
272
MC/DC100%2/2
@items == 1 and ($items[0]->describe || "") =~ /<rulevar|<autoscore/
@items == 1 $items[0]->describe
Truth table100%3/3
A and B
A= @items == 1B= $items[0]->describe
ABresult
0X0
100
111
693 {
694 # Do nothing
695 }
696 ▶ elsif (@items &&
Condition50%4/8
@items and ref($items[0]) =~ /\AParse::RecDescent::UncondReject/ || ($items[0]->describe || "") =~ /<autoscore/
!ll&&!rl&&r
0520
ref($items[0]) =~ /\AParse::RecDescent::UncondReject/ or ($items[0]->describe || "") =~ /<autoscore/
l!l&&r!l&&!r
0052
$items[0]->describe || ''
l!l
502
MC/DC33%1/3
@items and ref($items[0]) =~ /\AParse::RecDescent::UncondReject/ || ($items[0]->describe || "") =~ /<autoscore/
@items ref($items[0]) =~ /\AParse::RecDescent::UncondReject/ $items[0]->describe
Truth table50%2/4
A and B or C
A= @itemsB= ref($items[0]) =~ /\AParse::RecDescent::UncondReject/C= $items[0]->describe
ABCresult
0XX0
1000
11X1
1011
697 ( ref($items[0]) =~ /\AParse::RecDescent::UncondReject/
698 || ($items[0]->describe||"") =~ /<autoscore/
699 ))
700 {
701 0 Parse::RecDescent::_warn(1,"Optimizing away production: [". $_[0]->describe ."]");
702 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
703 ? "a <rulevar> (which acts like an unconditional <reject> during parsing)"
704 : $items[0]->describe =~ /<autoscore/
705 ? "an <autoscore> (which acts like an unconditional <reject> during parsing)"
706 : "an unconditional <reject>";
707 0 ▶ my $caveat = $items[0]->describe =~ /<rulevar/
Branch: 1 branch
BranchTrueFalseTotal
$items[0]->describe =~ /<rulevar/ ? : 0 0 0
708 ? " after the specified variable was set up"
709 : "";
710 0 ▶ my $advice = @items > 1
Branch: 1 branch
BranchTrueFalseTotal
@items > 1 ? : 0 0 0
711 ? "However, there were also other (useless) items after the leading "
712 . $items[0]->describe
713 . ", so you may have been expecting some other behaviour."
714 : "You can safely ignore this message.";
715 0 Parse::RecDescent::_hint("The production starts with $what. That means that the
716 production can never successfully match, so it was
717 optimized out of the final parser$caveat. $advice");
718 0 return 0;
719 }
720 53 return 1;
721 }
722  
723 sub changesskip($)
724 {
725 53 ▶ my $item;
Subroutine changesskip: called CC=4 SCAR=13.9
726 53 foreach $item (@{$_[0]->{"items"}})
727 {
728 111 ▶ if (ref($item) =~ /Parse::RecDescent::(Action|Directive)/)
Branch: 1 branch
BranchTrueFalseTotal
if (ref($item) =~ /Parse::RecDescent::(Action|Directive)/) 30 81 111
729 {
730 30 ▶ return 1 if $item->{code} =~ /\$skip\s*=/;
Branch: 1 branch
BranchTrueFalseTotal
if $item->{"code"} =~ /\$skip\s*=/ 0 30 30
731 }
732 }
733 53 return 0;
734 }
735  
736 sub adddirective
737 {
738 2 ▶ my ( $self, $whichop, $line, $name ) = @_;
Subroutine adddirective: called CC=1 SCAR=0.0
739 2 push @{$self->{op}},
740 { type=>$whichop, line=>$line, name=>$name,
741 2 offset=> scalar(@{$self->{items}}) };
742 }
743  
744 sub addscore
745 {
746 0 ▶ my ( $self, $code, $lookahead, $line ) = @_;
Subroutine addscore: not called CC=2 SCAR=17.9
747 $self->additem(Parse::RecDescent::Directive->new(
748 "local \$^W;
749 my \$thisscore = do { $code } + 0;
750 if (!defined(\$score) || \$thisscore>\$score)
751 { \$score=\$thisscore; \$score_return=\$item[-1]; }
752 undef;", $lookahead, $line,"<score: $code>") )
753 0 ▶ unless $self->{items}[-1]->describe =~ /<score/;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"items"}[-1]->describe =~ /<score/ 0 0 0
754 0 return 1;
755 }
756  
757 sub check_pending
758 {
759 36 ▶ my ( $self, $line ) = @_;
Subroutine check_pending: called CC=3 SCAR=11.6
760 36 ▶ if ($self->{op})
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"op"}) 2 34 36
761 {
762 2 ▶ while (my $next = pop @{$self->{op}})
Branch: 1 branch
BranchTrueFalseTotal
if (my $next = pop @{$$self{"op"};}) 0 2 2
763 {
764 0 Parse::RecDescent::_error("Incomplete <$next->{type}op:...>.", $line);
765 0 Parse::RecDescent::_hint(
766 "The current production ended without completing the
767 <$next->{type}op:...> directive that started near line
768 $next->{line}. Did you forget the closing '>'?");
769 }
770 }
771 36 return 1;
772 }
773  
774 sub enddirective
775 {
776 2 ▶ my ( $self, $line, $minrep, $maxrep ) = @_;
Subroutine enddirective: called CC=4 SCAR=15.2
777 2 ▶ unless ($self->{op})
Branch: 1 branch
BranchTrueFalseTotal
unless ($self->{"op"}) 0 2 2
778 {
779 0 Parse::RecDescent::_error("Unmatched > found.", $line);
780 0 Parse::RecDescent::_hint(
781 "A '>' angle bracket was encountered, which typically
782 indicates the end of a directive. However no suitable
783 preceding directive was encountered. Typically this
784 indicates either a extra '>' in the grammar, or a
785 problem inside the previous directive.");
786 0 return;
787 }
788 2 my $op = pop @{$self->{op}};
789 2 my $span = @{$self->{items}} - $op->{offset};
790 2 ▶ if ($op->{type} =~ /left|right/)
Branch: 1 branch
BranchTrueFalseTotal
if ($op->{"type"} =~ /left|right/) 2 0 2
791 {
792 2 ▶ if ($span != 3)
Branch: 1 branch
BranchTrueFalseTotal
if ($span != 3) { } 0 2 2
793 {
794 0 Parse::RecDescent::_error(
795 "Incorrect <$op->{type}op:...> specification:
796 expected 3 args, but found $span instead", $line);
797 0 Parse::RecDescent::_hint(
798 "The <$op->{type}op:...> directive requires a
799 sequence of exactly three elements. For example:
800 <$op->{type}op:leftarg /op/ rightarg>");
801 }
802 else
803 {
804 2 push @{$self->{items}},
805 Parse::RecDescent::Operator->new(
806 2 $op->{type}, $minrep, $maxrep, splice(@{$self->{"items"}}, -3));
807 2 $self->{items}[-1]->sethashname($self);
808 2 $self->{items}[-1]{name} = $op->{name};
809 }
810 }
811 }
812  
813 sub prevwasreturn
814 {
815 0 ▶ my ( $self, $line ) = @_;
Subroutine prevwasreturn: not called CC=2 SCAR=17.9
816 0 ▶ unless (@{$self->{items}})
Branch: 1 branch
BranchTrueFalseTotal
unless (@{$self->{"items"};}) 0 0 0
817 {
818 0 Parse::RecDescent::_error(
819 "Incorrect <return:...> specification:
820 expected item missing", $line);
821 0 Parse::RecDescent::_hint(
822 "The <return:...> directive requires a
823 sequence of at least one item. For example:
824 <return: list>");
825 0 return;
826 }
827 0 push @{$self->{items}},
828 Parse::RecDescent::Result->new();
829 }
830  
831 sub additem
832 {
833 109 ▶ my ( $self, $item ) = @_;
Subroutine additem: called CC=1 SCAR=0.0
834 109 $item->sethashname($self);
835 109 push @{$self->{"items"}}, $item;
836 109 return $item;
837 }
838  
839 sub _duplicate_itempos
840 {
841 3 ▶ my ($src) = @_;
Subroutine _duplicate_itempos: called CC=2 SCAR=6.9
842 3 my $dst = {};
843  
844 3 foreach (keys %$src)
845 {
846 9 %{$dst->{$_}} = %{$src->{$_}};
847 }
848 3 $dst;
849 }
850  
851 sub _update_itempos
852 {
853 81 ▶ my ($dst, $src, $typekeys, $poskeys) = @_;
Subroutine _update_itempos: called CC=4 SCAR=15.5
854  
855 81 ▶ my @typekeys = 'ARRAY' eq ref $typekeys ?
Branch: 1 branch
BranchTrueFalseTotal
'ARRAY' eq ref $typekeys ? : 0 81 81
856 @$typekeys :
857 keys %$src;
858  
859 81 foreach my $k (keys %$src)
860 {
861 243 ▶ if ('ARRAY' eq ref $poskeys)
Branch: 1 branch
BranchTrueFalseTotal
if ('ARRAY' eq ref $poskeys) { } 243 0 243
862 {
863 243 @{$dst->{$k}}{@$poskeys} = @{$src->{$k}}{@$poskeys};
864 }
865 else
866 {
867 0 %{$dst->{$k}} = %{$src->{$k}};
868 }
869 }
870 }
871  
872 sub preitempos
873 {
874 return q
875 89 ▶ {
Subroutine preitempos: called CC=1 SCAR=0.0
876 push @itempos, {'offset' => {'from'=>$thisoffset, 'to'=>undef},
877 'line' => {'from'=>$thisline, 'to'=>undef},
878 'column' => {'from'=>$thiscolumn, 'to'=>undef} };
879 }
880 }
881  
882 sub incitempos
883 {
884 return q
885 46 ▶ {
Subroutine incitempos: called CC=1 SCAR=0.0
886 $itempos[$#itempos]{'offset'}{'from'} += length($lastsep);
887 $itempos[$#itempos]{'line'}{'from'} = $thisline;
888 $itempos[$#itempos]{'column'}{'from'} = $thiscolumn;
889 }
890 }
891  
892 sub unincitempos
893 {
894 # the next incitempos will properly set these two fields, but
895 # {'offset'}{'from'} needs to be decreased by length($lastsep)
896 # $itempos[$#itempos]{'line'}{'from'}
897 # $itempos[$#itempos]{'column'}{'from'}
898 return q
899 46 ▶ {
Subroutine unincitempos: called CC=1 SCAR=0.0
900 $itempos[$#itempos]{'offset'}{'from'} -= length($lastsep) if defined $lastsep;
901 }
902 }
903  
904 sub postitempos
905 {
906 return q
907 89 ▶ {
Subroutine postitempos: called CC=1 SCAR=0.0
908 $itempos[$#itempos]{'offset'}{'to'} = $prevoffset;
909 $itempos[$#itempos]{'line'}{'to'} = $prevline;
910 $itempos[$#itempos]{'column'}{'to'} = $prevcolumn;
911 }
912 }
913  
914 sub code($$$$)
915 {
916 53 ▶ my ($self,$namespace,$rule,$parser) = @_;
Subroutine code: called CC=19 SCAR=39.2
917 my $code =
918 '
919 while (!$_matched'
920 . (defined $self->{"uncommit"} ? '' : ' && !$commit')
921 . ')
922 {
923 ' .
924 ($self->changesskip()
925 ? 'local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip;'
926 : '') .'
927 Parse::RecDescent::_trace(q{Trying production: ['
928 . $self->describe . ']},
929 Parse::RecDescent::_tracefirst($_[1]),
930 q{' . $rule ->{name}. '},
931 $tracelevel)
932 if defined $::RD_TRACE;
933 my $thisprod = $thisrule->{"prods"}[' . $self->{"number"} . '];
934 ' . (defined $self->{"error"} ? '' : '$text = $_[1];' ) . '
935 my $_savetext;
936 @item = (q{' . $rule->{"name"} . '});
937 53 ▶ %item = (__RULE__ => q{' . $rule->{"name"} . '});
Branch: 3 branches
BranchTrueFalseTotal
defined $self->{'uncommit'} ? : 1 52 53
$self->changesskip ? : 0 53 53
defined $self->{'error'} ? : 0 53 53
938 my $repcount = 0;
939  
940 ';
941 $code .=
942 ' my @itempos = ({});
943 53 ▶' if $parser->{_check}{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $parser->{"_check"}{"itempos"} 40 13 53
944  
945 53 my $item;
946 my $i;
947  
948 53 ▶ for ($i = 0; $i < @{$self->{"items"}}; $i++)
Branch: 1 branch
BranchTrueFalseTotal
if ($i < @{$self->{"items"};}) 111 53 164
949 {
950 111 $item = ${$self->{items}}[$i];
951  
952 111 ▶ $code .= preitempos() if $parser->{_check}{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $parser->{"_check"}{"itempos"} 89 22 111
953  
954 111 $code .= $item->code($namespace,$rule,$parser->{_check});
955  
956 111 ▶ $code .= postitempos() if $parser->{_check}{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $parser->{"_check"}{"itempos"} 89 22 111
957  
958 }
959  
960 53 ▶ if ($parser->{_AUTOACTION} && defined($item) && !$item->isa("Parse::RecDescent::Action"))
Branch: 2 branches
BranchTrueFalseTotal
if ($parser->{'_AUTOACTION'} and defined $item and not $item->isa('Parse::RecDescent::Action')) { } 0 53 53
elsif ($parser->{'_AUTOTREE'} and defined $item and not $item->isa('Parse::RecDescent::Action')) { } 0 106 106
Condition33%2/6
$parser->{"_AUTOACTION"} and defined $item and not $item->isa("Parse::RecDescent::Action")
!ll&&!rl&&r
5300
$parser->{"_AUTOACTION"} and defined $item
!ll&&!rl&&r
5300
MC/DC0%0/3
$parser->{"_AUTOACTION"} and defined $item and not $item->isa("Parse::RecDescent::Action")
$parser->{"_AUTOACTION"} defined $item not $item->isa("Parse::RecDescent::Action")
Truth table25%1/4
A and B and not(C)
A= $parser->{"_AUTOACTION"}B= defined $itemC= not $item->isa("Parse::RecDescent::Action")
ABCresult
0XX0
10X0
1100
1111
961 {
962 0 $code .= $parser->{_AUTOACTION}->code($namespace,$rule);
963 0 ▶ Parse::RecDescent::_warn(1,"Autogenerating action in rule
Branch: 1 branch
BranchTrueFalseTotal
&Parse::RecDescent::_warn(1, qq[Autogenerating action in rule\n "$rule->{"name"}":\n $parser->{"_AUTOACTION"}{"code"}]) and &Parse::RecDescent::_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
964 \"$rule->{name}\":
965 $parser->{_AUTOACTION}{code}")
966 and
967 Parse::RecDescent::_hint("The \$::RD_AUTOACTION was defined,
968 so any production not ending in an
969 explicit action has the specified
970 \"auto-action\" automatically
971 appended.");
972 }
973 ▶ elsif ($parser->{_AUTOTREE} && defined($item) && !$item->isa("Parse::RecDescent::Action"))
Condition33%2/6
$parser->{"_AUTOTREE"} and defined $item and not $item->isa("Parse::RecDescent::Action")
!ll&&!rl&&r
5300
$parser->{"_AUTOTREE"} and defined $item
!ll&&!rl&&r
5300
MC/DC0%0/3
$parser->{"_AUTOTREE"} and defined $item and not $item->isa("Parse::RecDescent::Action")
$parser->{"_AUTOTREE"} defined $item not $item->isa("Parse::RecDescent::Action")
Truth table25%1/4
A and B and not(C)
A= $parser->{"_AUTOTREE"}B= defined $itemC= not $item->isa("Parse::RecDescent::Action")
ABCresult
0XX0
10X0
1100
1111
974 {
975 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
976 {
977 0 $code .= $parser->{_AUTOTREE}{TERMINAL}->code($namespace,$rule);
978 }
979 else
980 {
981 0 $code .= $parser->{_AUTOTREE}{NODE}->code($namespace,$rule);
982 }
983 0 ▶ Parse::RecDescent::_warn(1,"Autogenerating tree-building action in rule
Branch: 1 branch
BranchTrueFalseTotal
&Parse::RecDescent::_warn(1, qq[Autogenerating tree-building action in rule\n "$rule->{"name"}"]) and &Parse::RecDescent::_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
984 \"$rule->{name}\"")
985 and
986 Parse::RecDescent::_hint("The directive <autotree> was specified,
987 so any production not ending
988 in an explicit action has
989 some parse-tree building code
990 automatically appended.");
991 }
992  
993 $code .=
994 '
995 Parse::RecDescent::_trace(q{>>'.Parse::RecDescent::_matchtracemessage($self).' production: ['
996 . $self->describe . ']<<},
997 Parse::RecDescent::_tracefirst($text),
998 q{' . $rule->{name} . '},
999 $tracelevel)
1000 if defined $::RD_TRACE;
1001  
1002 53 ▶' . ( $parser->{_check}{itempos} ? '
Branch: 1 branch
BranchTrueFalseTotal
$parser->{'_check'}{'itempos'} ? : 40 13 53
1003 if ( defined($_itempos) )
1004 {
1005 Parse::RecDescent::Production::_update_itempos($_itempos, $itempos[ 1], undef, [qw(from)]);
1006 Parse::RecDescent::Production::_update_itempos($_itempos, $itempos[-1], undef, [qw(to)]);
1007 }
1008 ' : '' ) . '
1009  
1010 $_matched = 1;
1011 last;
1012 }
1013  
1014 ';
1015 53 return $code;
1016 }
1017  
1018 5 1;
1019  
1020 package Parse::RecDescent::Action;
1021  
1022 54 ▶sub describe { undef }
Subroutine describe: called CC=1 SCAR=0.0
1023  
1024 23 ▶sub sethashname { $_[0]->{hashname} = '__ACTION' . ++$_[1]->{actcount} .'__'; }
Subroutine sethashname: called CC=1 SCAR=0.0
1025  
1026 sub new
1027 {
1028 23 ▶ my $class = ref($_[0]) || $_[0];
Subroutine new: called CC=2 SCAR=8.1
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
0230
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
1029 23 bless
1030 {
1031 "code" => $_[1],
1032 "lookahead" => $_[2],
1033 "line" => $_[3],
1034 }, $class;
1035 }
1036  
1037 4 ▶sub issubrule { undef }
Subroutine issubrule: called CC=1 SCAR=0.0
1038 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1039  
1040 sub code($$$$)
1041 {
1042 24 ▶ my ($self, $namespace, $rule) = @_;
Subroutine code: called CC=5 SCAR=18.9
1043  
1044 '
1045 Parse::RecDescent::_trace(q{Trying action},
1046 Parse::RecDescent::_tracefirst($text),
1047 q{' . $rule->{name} . '},
1048 $tracelevel)
1049 if defined $::RD_TRACE;
1050 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .'
1051  
1052 $_tok = ($_noactions) ? 0 : do ' . $self->{"code"} . ';
1053 ' . ($self->{"lookahead"}<0?'if':'unless') . ' (defined $_tok)
1054 {
1055 Parse::RecDescent::_trace(q{<<'.Parse::RecDescent::_matchtracemessage($self,1).' action>> (return value: [undef])})
1056 if defined $::RD_TRACE;
1057 last;
1058 }
1059 Parse::RecDescent::_trace(q{>>'.Parse::RecDescent::_matchtracemessage($self).' action<< (return value: [}
1060 . $_tok . q{])},
1061 Parse::RecDescent::_tracefirst($text))
1062 if defined $::RD_TRACE;
1063 push @item, $_tok;
1064 ' . ($self->{line}>=0 ? '$item{'. $self->{hashname} .'}=$_tok;' : '' ) .'
1065 24 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 4 branches
BranchTrueFalseTotal
$self->{'lookahead'} ? : 0 24 24
$self->{'lookahead'} < 0 ? : 0 24 24
$self->{'line'} >= 0 ? : 24 0 24
$self->{'lookahead'} ? : 0 24 24
1066 '
1067 }
1068  
1069  
1070 5 1;
1071  
1072 package Parse::RecDescent::Directive;
1073  
1074 6 ▶sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; }
Subroutine sethashname: called CC=1 SCAR=0.0
1075  
1076 2 ▶sub issubrule { undef }
Subroutine issubrule: called CC=1 SCAR=0.0
1077 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1078 22 ▶sub describe { $_[1] ? '' : $_[0]->{name} }
Subroutine describe: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
$_[1] ? : 2 20 22
1079  
1080 sub new ($$$$$)
1081 {
1082 6 ▶ my $class = ref($_[0]) || $_[0];
Subroutine new: called CC=2 SCAR=8.1
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
060
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
1083 6 bless
1084 {
1085 "code" => $_[1],
1086 "lookahead" => $_[2],
1087 "line" => $_[3],
1088 "name" => $_[4],
1089 }, $class;
1090 }
1091  
1092 sub code($$$$)
1093 {
1094 6 ▶ my ($self, $namespace, $rule) = @_;
Subroutine code: called CC=5 SCAR=18.9
1095  
1096 '
1097 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .'
1098  
1099 Parse::RecDescent::_trace(q{Trying directive: ['
1100 . $self->describe . ']},
1101 Parse::RecDescent::_tracefirst($text),
1102 q{' . $rule->{name} . '},
1103 $tracelevel)
1104 if defined $::RD_TRACE; ' .'
1105 $_tok = do { ' . $self->{"code"} . ' };
1106 if (defined($_tok))
1107 {
1108 Parse::RecDescent::_trace(q{>>'.Parse::RecDescent::_matchtracemessage($self).' directive<< (return value: [}
1109 . $_tok . q{])},
1110 Parse::RecDescent::_tracefirst($text))
1111 if defined $::RD_TRACE;
1112 }
1113 else
1114 {
1115 Parse::RecDescent::_trace(q{<<'.Parse::RecDescent::_matchtracemessage($self,1).' directive>>},
1116 Parse::RecDescent::_tracefirst($text))
1117 if defined $::RD_TRACE;
1118 }
1119 ' . ($self->{"lookahead"} ? '$text = $_savetext and ' : '' ) .'
1120 last '
1121 . ($self->{"lookahead"}<0?'if':'unless') . ' defined $_tok;
1122 push @item, $item{'.$self->{hashname}.'}=$_tok;
1123 6 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 4 branches
BranchTrueFalseTotal
$self->{'lookahead'} ? : 0 6 6
$self->{'lookahead'} ? : 0 6 6
$self->{'lookahead'} < 0 ? : 0 6 6
$self->{'lookahead'} ? : 0 6 6
1124 '
1125 }
1126  
1127 5 1;
1128  
1129 package Parse::RecDescent::UncondReject;
1130  
1131 1 ▶sub issubrule { undef }
Subroutine issubrule: called CC=1 SCAR=0.0
1132 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1133 5 ▶sub describe { $_[1] ? '' : $_[0]->{name} }
Subroutine describe: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
$_[1] ? : 1 4 5
1134 1 ▶sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; }
Subroutine sethashname: called CC=1 SCAR=0.0
1135  
1136 sub new ($$$;$)
1137 {
1138 1 ▶ my $class = ref($_[0]) || $_[0];
Subroutine new: called CC=2 SCAR=8.1
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
010
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
1139 1 bless
1140 {
1141 "lookahead" => $_[1],
1142 "line" => $_[2],
1143 "name" => $_[3],
1144 }, $class;
1145 }
1146  
1147 # MARK, YOU MAY WANT TO OPTIMIZE THIS.
1148  
1149  
1150 sub code($$$$)
1151 {
1152 1 ▶ my ($self, $namespace, $rule) = @_;
Subroutine code: called CC=4 SCAR=15.8
1153  
1154 '
1155 Parse::RecDescent::_trace(q{>>Rejecting production<< (found '
1156 . $self->describe . ')},
1157 Parse::RecDescent::_tracefirst($text),
1158 q{' . $rule->{name} . '},
1159 $tracelevel)
1160 if defined $::RD_TRACE;
1161 undef $return;
1162 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .'
1163  
1164 $_tok = undef;
1165 ' . ($self->{"lookahead"} ? '$text = $_savetext and ' : '' ) .'
1166 last '
1167 1 ▶ . ($self->{"lookahead"}<0?'if':'unless') . ' defined $_tok;
Branch: 3 branches
BranchTrueFalseTotal
$self->{'lookahead'} ? : 0 1 1
$self->{'lookahead'} ? : 0 1 1
$self->{'lookahead'} < 0 ? : 0 1 1
1168 '
1169 }
1170  
1171 5 1;
1172  
1173 package Parse::RecDescent::Error;
1174  
1175 0 ▶sub issubrule { undef }
Subroutine issubrule: not called CC=1 SCAR=6.9
1176 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1177 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
1178 0 ▶sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; }
Subroutine sethashname: not called CC=1 SCAR=6.9
1179  
1180 sub new ($$$$$)
1181 {
1182 0 ▶ my $class = ref($_[0]) || $_[0];
Subroutine new: not called CC=2 SCAR=17.9
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
1183 0 bless
1184 {
1185 "msg" => $_[1],
1186 "lookahead" => $_[2],
1187 "commitonly" => $_[3],
1188 "line" => $_[4],
1189 }, $class;
1190 }
1191  
1192 sub code($$$$)
1193 {
1194 0 ▶ my ($self, $namespace, $rule) = @_;
Subroutine code: not called CC=3 SCAR=24.8
1195  
1196 0 my $action = '';
1197  
1198 0 ▶ if ($self->{"msg"}) # ERROR MESSAGE SUPPLIED
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'msg'}) { } 0 0 0
1199 {
1200 #WAS: $action .= "Parse::RecDescent::_error(qq{$self->{msg}}" . ',$thisline);';
1201 0 $action .= 'push @{$thisparser->{errors}}, [qq{'.$self->{msg}.'},$thisline];';
1202  
1203 }
1204 else # GENERATE ERROR MESSAGE DURING PARSE
1205 {
1206 0 $action .= '
1207 my $rule = $item[0];
1208 $rule =~ s/_/ /g;
1209 #WAS: Parse::RecDescent::_error("Invalid $rule: " . $expectation->message() ,$thisline);
1210 push @{$thisparser->{errors}}, ["Invalid $rule: " . $expectation->message() ,$thisline];
1211 ';
1212 }
1213  
1214 my $dir =
1215 new Parse::RecDescent::Directive('if (' .
1216 ($self->{"commitonly"} ? '$commit' : '1') .
1217 ") { do {$action} unless ".' $_noactions; undef } else {0}',
1218 0 ▶ $self->{"lookahead"},0,$self->describe);
Branch: 1 branch
BranchTrueFalseTotal
$self->{'commitonly'} ? : 0 0 0
1219 0 $dir->{hashname} = $self->{hashname};
1220 0 return $dir->code($namespace, $rule, 0);
1221 }
1222  
1223 5 1;
1224  
1225 package Parse::RecDescent::Token;
1226  
1227 17 ▶sub sethashname { $_[0]->{hashname} = '__PATTERN' . ++$_[1]->{patcount} . '__'; }
Subroutine sethashname: called CC=1 SCAR=0.0
1228  
1229 11 ▶sub issubrule { undef }
Subroutine issubrule: called CC=1 SCAR=0.0
1230 2 ▶sub isterminal { 1 }
Subroutine isterminal: called CC=1 SCAR=0.0
1231 90 ▶sub describe ($) { shift->{'description'}}
Subroutine describe: called CC=1 SCAR=0.0
1232  
1233  
1234 # ARGS ARE: $self, $pattern, $left_delim, $modifiers, $lookahead, $linenum
1235 sub new ($$$$$$)
1236 {
1237 17 ▶ my $class = ref($_[0]) || $_[0];
Subroutine new: called CC=5 SCAR=16.3
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
0170
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
1238 17 my $pattern = $_[1];
1239 17 my $pat = $_[1];
1240 17 my $ldel = $_[2];
1241 17 my $rdel = $ldel;
1242 17 $rdel =~ tr/{[(</}])>/;
1243  
1244 17 my $mod = $_[3];
1245  
1246 17 my $desc;
1247  
1248 17 ▶ if ($ldel eq '/') { $desc = "$ldel$pattern$rdel$mod" }
Branch: 1 branch
BranchTrueFalseTotal
if ($ldel eq '/') { } 17 0 17
1249 0 else { $desc = "m$ldel$pattern$rdel$mod" }
1250 17 $desc =~ s/\\/\\\\/g;
1251 17 $desc =~ s/\$$/\\\$/g;
1252 17 $desc =~ s/}/\\}/g;
1253 17 $desc =~ s/{/\\{/g;
1254  
1255 17 ▶ if (!eval "no strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
Branch: 1 branch
BranchTrueFalseTotal
if (not eval "no strict;\n local \$SIG{__WARN__} = sub {0};\n '' =~ m$ldel$pattern$rdel$mod" and $@) 0 17 17
Condition33%1/3
not eval "no strict;\n local \$SIG{__WARN__} = sub {0};\n '' =~ m$ldel$pattern$rdel$mod" and $@
!ll&&!rl&&r
0170
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 table33%1/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
1256 local \$SIG{__WARN__} = sub {0};
1257 '' =~ m$ldel$pattern$rdel$mod" and $@)
1258 {
1259 0 Parse::RecDescent::_warn(3, "Token pattern \"m$ldel$pattern$rdel$mod\"
1260 may not be a valid regular expression",
1261 $_[5]);
1262 0 $@ =~ s/ at \(eval.*/./;
1263 0 Parse::RecDescent::_hint($@);
1264 }
1265  
1266 # QUIETLY PREVENT (WELL-INTENTIONED) CALAMITY
1267 17 $mod =~ s/[gc]//g;
1268 17 $pattern =~ s/(\A|[^\\])\\G/$1/g;
1269  
1270 17 bless
1271 {
1272 "pattern" => $pattern,
1273 "ldelim" => $ldel,
1274 "rdelim" => $rdel,
1275 "mod" => $mod,
1276 "lookahead" => $_[4],
1277 "line" => $_[5],
1278 "description" => $desc,
1279 }, $class;
1280 }
1281  
1282  
1283 sub code($$$$$)
1284 {
1285 18 ▶ my ($self, $namespace, $rule, $check) = @_;
Subroutine code: called CC=8 SCAR=21.3
1286 18 my $ldel = $self->{"ldelim"};
1287 18 my $rdel = $self->{"rdelim"};
1288 18 my $sdel = $ldel;
1289 18 my $mod = $self->{"mod"};
1290  
1291 18 $sdel =~ s/[[{(<]/{}/;
1292  
1293 my $code = '
1294 Parse::RecDescent::_trace(q{Trying terminal: [' . $self->describe
1295 . ']}, Parse::RecDescent::_tracefirst($text),
1296 q{' . $rule->{name} . '},
1297 $tracelevel)
1298 if defined $::RD_TRACE;
1299 undef $lastsep;
1300 $expectation->is(q{' . ($rule->hasleftmost($self) ? ''
1301 : $self->describe ) . '})->at($text);
1302 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) . '
1303  
1304 ' . ($self->{"lookahead"}<0?'if':'unless')
1305 . ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and '
1306 . ($check->{itempos}? 'do {'.Parse::RecDescent::Production::incitempos().' 1} and ' : '')
1307 . ' $text =~ m' . $ldel . '\A(?:' . $self->{"pattern"} . ')' . $rdel . $mod . ')
1308 {
1309 '.($self->{"lookahead"} ? '$text = $_savetext;' : '$text = $lastsep . $text if defined $lastsep;') .
1310 ($check->{itempos} ? Parse::RecDescent::Production::unincitempos() : '') . '
1311 $expectation->failed();
1312 Parse::RecDescent::_trace(q{<<Didn\'t match terminal>>},
1313 Parse::RecDescent::_tracefirst($text))
1314 if defined $::RD_TRACE;
1315  
1316 last;
1317 }
1318 $current_match = substr($text, $-[0], $+[0] - $-[0]);
1319 substr($text,0,length($current_match),q{});
1320 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
1321 . $current_match . q{])},
1322 Parse::RecDescent::_tracefirst($text))
1323 if defined $::RD_TRACE;
1324 push @item, $item{'.$self->{hashname}.'}=$current_match;
1325 18 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 7 branches
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 11 7 18
$self->{'lookahead'} ? : 0 18 18
$self->{'lookahead'} < 0 ? : 0 18 18
$check->{'itempos'} ? : 8 10 18
$self->{'lookahead'} ? : 0 18 18
$check->{'itempos'} ? : 8 10 18
$self->{'lookahead'} ? : 0 18 18
1326 ';
1327  
1328 18 return $code;
1329 }
1330  
1331 5 1;
1332  
1333 package Parse::RecDescent::Literal;
1334  
1335 36 ▶sub sethashname { $_[0]->{hashname} = '__STRING' . ++$_[1]->{strcount} . '__'; }
Subroutine sethashname: called CC=1 SCAR=0.0
1336  
1337 32 ▶sub issubrule { undef }
Subroutine issubrule: called CC=1 SCAR=0.0
1338 0 ▶sub isterminal { 1 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1339 199 ▶sub describe ($) { shift->{'description'} }
Subroutine describe: called CC=1 SCAR=0.0
1340  
1341 sub new ($$$$)
1342 {
1343 36 ▶ my $class = ref($_[0]) || $_[0];
Subroutine new: called CC=2 SCAR=7.1
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
0360
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
1344  
1345 36 my $pattern = $_[1];
1346  
1347 36 my $desc = $pattern;
1348 36 $desc=~s/\\/\\\\/g;
1349 36 $desc=~s/}/\\}/g;
1350 36 $desc=~s/{/\\{/g;
1351  
1352 36 bless
1353 {
1354 "pattern" => $pattern,
1355 "lookahead" => $_[2],
1356 "line" => $_[3],
1357 "description" => "'$desc'",
1358 }, $class;
1359 }
1360  
1361  
1362 sub code($$$$)
1363 {
1364 40 ▶ my ($self, $namespace, $rule, $check) = @_;
Subroutine code: called CC=8 SCAR=21.8
1365  
1366 my $code = '
1367 Parse::RecDescent::_trace(q{Trying terminal: [' . $self->describe
1368 . ']},
1369 Parse::RecDescent::_tracefirst($text),
1370 q{' . $rule->{name} . '},
1371 $tracelevel)
1372 if defined $::RD_TRACE;
1373 undef $lastsep;
1374 $expectation->is(q{' . ($rule->hasleftmost($self) ? ''
1375 : $self->describe ) . '})->at($text);
1376 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) . '
1377  
1378 ' . ($self->{"lookahead"}<0?'if':'unless')
1379 . ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and '
1380 . ($check->{itempos}? 'do {'.Parse::RecDescent::Production::incitempos().' 1} and ' : '')
1381 . ' $text =~ m/\A' . quotemeta($self->{"pattern"}) . '/)
1382 {
1383 '.($self->{"lookahead"} ? '$text = $_savetext;' : '$text = $lastsep . $text if defined $lastsep;').'
1384 '. ($check->{itempos} ? Parse::RecDescent::Production::unincitempos() : '') . '
1385 $expectation->failed();
1386 Parse::RecDescent::_trace(qq{<<Didn\'t match terminal>>},
1387 Parse::RecDescent::_tracefirst($text))
1388 if defined $::RD_TRACE;
1389 last;
1390 }
1391 $current_match = substr($text, $-[0], $+[0] - $-[0]);
1392 substr($text,0,length($current_match),q{});
1393 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
1394 . $current_match . q{])},
1395 Parse::RecDescent::_tracefirst($text))
1396 if defined $::RD_TRACE;
1397 push @item, $item{'.$self->{hashname}.'}=$current_match;
1398 40 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 7 branches
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 26 14 40
$self->{'lookahead'} ? : 0 40 40
$self->{'lookahead'} < 0 ? : 0 40 40
$check->{'itempos'} ? : 35 5 40
$self->{'lookahead'} ? : 0 40 40
$check->{'itempos'} ? : 35 5 40
$self->{'lookahead'} ? : 0 40 40
1399 ';
1400  
1401 40 return $code;
1402 }
1403  
1404 3 1;
1405  
1406 package Parse::RecDescent::InterpLit;
1407  
1408 3 ▶sub sethashname { $_[0]->{hashname} = '__STRING' . ++$_[1]->{strcount} . '__'; }
Subroutine sethashname: called CC=1 SCAR=0.0
1409  
1410 2 ▶sub issubrule { undef }
Subroutine issubrule: called CC=1 SCAR=0.0
1411 0 ▶sub isterminal { 1 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1412 15 ▶sub describe ($) { shift->{'description'} }
Subroutine describe: called CC=1 SCAR=0.0
1413  
1414 sub new ($$$$)
1415 {
1416 3 ▶ my $class = ref($_[0]) || $_[0];
Subroutine new: called CC=2 SCAR=7.1
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
030
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
1417  
1418 3 my $pattern = $_[1];
1419 3 $pattern =~ s#/#\\/#g;
1420  
1421 3 my $desc = $pattern;
1422 3 $desc=~s/\\/\\\\/g;
1423 3 $desc=~s/}/\\}/g;
1424 3 $desc=~s/{/\\{/g;
1425  
1426 3 bless
1427 {
1428 "pattern" => $pattern,
1429 "lookahead" => $_[2],
1430 "line" => $_[3],
1431 "description" => "'$desc'",
1432 }, $class;
1433 }
1434  
1435 sub code($$$$)
1436 {
1437 3 ▶ my ($self, $namespace, $rule, $check) = @_;
Subroutine code: called CC=8 SCAR=23.8
1438  
1439 my $code = '
1440 Parse::RecDescent::_trace(q{Trying terminal: [' . $self->describe
1441 . ']},
1442 Parse::RecDescent::_tracefirst($text),
1443 q{' . $rule->{name} . '},
1444 $tracelevel)
1445 if defined $::RD_TRACE;
1446 undef $lastsep;
1447 $expectation->is(q{' . ($rule->hasleftmost($self) ? ''
1448 : $self->describe ) . '})->at($text);
1449 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) . '
1450  
1451 ' . ($self->{"lookahead"}<0?'if':'unless')
1452 . ' ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and '
1453 . ($check->{itempos}? 'do {'.Parse::RecDescent::Production::incitempos().' 1} and ' : '')
1454 . ' do { $_tok = "' . $self->{"pattern"} . '"; 1 } and
1455 substr($text,0,length($_tok)) eq $_tok and
1456 do { substr($text,0,length($_tok)) = ""; 1; }
1457 )
1458 {
1459 '.($self->{"lookahead"} ? '$text = $_savetext;' : '$text = $lastsep . $text if defined $lastsep;').'
1460 '. ($check->{itempos} ? Parse::RecDescent::Production::unincitempos() : '') . '
1461 $expectation->failed();
1462 Parse::RecDescent::_trace(q{<<Didn\'t match terminal>>},
1463 Parse::RecDescent::_tracefirst($text))
1464 if defined $::RD_TRACE;
1465 last;
1466 }
1467 Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [}
1468 . $_tok . q{])},
1469 Parse::RecDescent::_tracefirst($text))
1470 if defined $::RD_TRACE;
1471 push @item, $item{'.$self->{hashname}.'}=$_tok;
1472 3 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 7 branches
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 2 1 3
$self->{'lookahead'} ? : 0 3 3
$self->{'lookahead'} < 0 ? : 0 3 3
$check->{'itempos'} ? : 3 0 3
$self->{'lookahead'} ? : 0 3 3
$check->{'itempos'} ? : 3 0 3
$self->{'lookahead'} ? : 0 3 3
1473 ';
1474  
1475 3 return $code;
1476 }
1477  
1478 3 1;
1479  
1480 package Parse::RecDescent::Subrule;
1481  
1482 9 ▶sub issubrule ($) { return $_[0]->{"subrule"} }
Subroutine issubrule: called CC=1 SCAR=0.0
1483 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1484 ▶sub sethashname {}
Subroutine sethashname: called CC=1 SCAR=0.0
1485  
1486 sub describe ($)
1487 {
1488 69 ▶ my $desc = $_[0]->{"implicit"} || $_[0]->{"subrule"};
Subroutine describe: called CC=3 SCAR=11.4
Condition33%1/3
$_[0]{'implicit'} || $_[0]{'subrule'}
l!l&&r!l&&!r
0690
MC/DC0%0/2
$_[0]{'implicit'} || $_[0]{'subrule'}
$_[0]{'implicit'} $_[0]{'subrule'}
Truth table33%1/3
A || B
A= $_[0]{'implicit'}B= $_[0]{'subrule'}
ABresult
1X1
011
000
1489 69 ▶ $desc = "<matchrule:$desc>" if $_[0]->{"matchrule"};
Branch: 1 branch
BranchTrueFalseTotal
if $_[0]{"matchrule"} 7 62 69
1490 69 return $desc;
1491 }
1492  
1493 sub callsyntax($$)
1494 {
1495 20 ▶ if ($_[0]->{"matchrule"})
Subroutine callsyntax: called CC=2 SCAR=6.9
Branch: 1 branch
BranchTrueFalseTotal
if ($_[0]{'matchrule'}) { } 2 18 20
1496 {
1497 2 return "&{'$_[1]'.qq{$_[0]->{subrule}}}";
1498 }
1499 else
1500 {
1501 18 return $_[1].$_[0]->{"subrule"};
1502 }
1503 }
1504  
1505 sub new ($$$$;$$$)
1506 {
1507 20 ▶ my $class = ref($_[0]) || $_[0];
Subroutine new: called CC=4 SCAR=15.2
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
0200
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
1508 20 ▶ bless
Condition75%3/4
$_[4] || undef
l!l
020
$_[6] || undef
l!l
119
MC/DC0%0/1
$_[4] || undef
$_[4]
MC/DC100%1/1
$_[6] || undef
$_[6]
Truth table50%1/2
A
A= $_[4]
Aresult
11
00
Truth table100%2/2
A
A= $_[6]
Aresult
11
00
1509 {
1510 "subrule" => $_[1],
1511 "lookahead" => $_[2],
1512 "line" => $_[3],
1513 "implicit" => $_[4] || undef,
1514 "matchrule" => $_[5],
1515 "argcode" => $_[6] || undef,
1516 }, $class;
1517 }
1518  
1519  
1520 sub code($$$$)
1521 {
1522 20 ▶ my ($self, $namespace, $rule, $check) = @_;
Subroutine code: called CC=9 SCAR=22.0
1523  
1524 '
1525 Parse::RecDescent::_trace(q{Trying subrule: [' . $self->{"subrule"} . ']},
1526 Parse::RecDescent::_tracefirst($text),
1527 q{' . $rule->{"name"} . '},
1528 $tracelevel)
1529 if defined $::RD_TRACE;
1530 if (1) { no strict qw{refs};
1531 $expectation->is(' . ($rule->hasleftmost($self) ? 'q{}'
1532 # WAS : 'qq{'.$self->describe.'}' ) . ')->at($text);
1533 : 'q{'.$self->describe.'}' ) . ')->at($text);
1534 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' )
1535 . ($self->{"lookahead"}<0?'if':'unless')
1536 . ' (defined ($_tok = '
1537 . $self->callsyntax($namespace.'::')
1538 . '($thisparser,$text,$repeating,'
1539 . ($self->{"lookahead"}?'1':'$_noactions')
1540 . ($self->{argcode} ? ",sub { return $self->{argcode} }"
1541 : ',sub { \\@arg }')
1542 . ($check->{"itempos"}?',$itempos[$#itempos]':',undef')
1543 . ')))
1544 {
1545 '.($self->{"lookahead"} ? '$text = $_savetext;' : '').'
1546 Parse::RecDescent::_trace(q{<<'.Parse::RecDescent::_matchtracemessage($self,1).' subrule: ['
1547 . $self->{subrule} . ']>>},
1548 Parse::RecDescent::_tracefirst($text),
1549 q{' . $rule->{"name"} .'},
1550 $tracelevel)
1551 if defined $::RD_TRACE;
1552 $expectation->failed();
1553 last;
1554 }
1555 Parse::RecDescent::_trace(q{>>'.Parse::RecDescent::_matchtracemessage($self).' subrule: ['
1556 . $self->{subrule} . ']<< (return value: [}
1557 . $_tok . q{]},
1558  
1559 Parse::RecDescent::_tracefirst($text),
1560 q{' . $rule->{"name"} .'},
1561 $tracelevel)
1562 if defined $::RD_TRACE;
1563 $item{q{' . $self->{subrule} . '}} = $_tok;
1564 push @item, $_tok;
1565 20 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 8 branches
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 6 14 20
$self->{'lookahead'} ? : 1 19 20
$self->{'lookahead'} < 0 ? : 1 19 20
$self->{'lookahead'} ? : 1 19 20
$self->{'argcode'} ? : 1 19 20
$check->{'itempos'} ? : 16 4 20
$self->{'lookahead'} ? : 1 19 20
$self->{'lookahead'} ? : 1 19 20
1566 }
1567 '
1568 }
1569  
1570 package Parse::RecDescent::Repetition;
1571  
1572 1 ▶sub issubrule ($) { return $_[0]->{"subrule"} }
Subroutine issubrule: called CC=1 SCAR=0.0
1573 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1574 ▶sub sethashname { }
Subroutine sethashname: called CC=1 SCAR=0.0
1575  
1576 sub describe ($)
1577 {
1578 16 ▶ my $desc = $_[0]->{"expected"} || $_[0]->{"subrule"};
Subroutine describe: called CC=3 SCAR=11.4
Condition66%2/3
$_[0]{'expected'} || $_[0]{'subrule'}
l!l&&r!l&&!r
1150
MC/DC0%0/2
$_[0]{'expected'} || $_[0]{'subrule'}
$_[0]{'expected'} $_[0]{'subrule'}
Truth table66%2/3
A || B
A= $_[0]{'expected'}B= $_[0]{'subrule'}
ABresult
1X1
011
000
1579 16 ▶ $desc = "<matchrule:$desc>" if $_[0]->{"matchrule"};
Branch: 1 branch
BranchTrueFalseTotal
if $_[0]{"matchrule"} 0 16 16
1580 16 return $desc;
1581 }
1582  
1583 sub callsyntax($$)
1584 {
1585 3 ▶ if ($_[0]->{matchrule})
Subroutine callsyntax: called CC=2 SCAR=8.1
Branch: 1 branch
BranchTrueFalseTotal
if ($_[0]{'matchrule'}) { } 0 3 3
1586 0 { return "sub { goto &{''.qq{$_[1]$_[0]->{subrule}}} }"; }
1587 else
1588 3 { return "\\&$_[1]$_[0]->{subrule}"; }
1589 }
1590  
1591 sub new ($$$$$$$$$$)
1592 {
1593 3 ▶ my ($self, $subrule, $repspec, $min, $max, $lookahead, $line, $parser, $matchrule, $argcode) = @_;
Subroutine new: called CC=7 SCAR=24.1
1594 3 ▶ my $class = ref($self) || $self;
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
030
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
1595 3 ▶ ($max, $min) = ( $min, $max) if ($max<$min);
Branch: 1 branch
BranchTrueFalseTotal
if $max < $min 0 3 3
1596  
1597 3 my $desc;
1598 3 ▶ if ($subrule=~/\A_alternation_\d+_of_production_\d+_of_rule/)
Branch: 1 branch
BranchTrueFalseTotal
if ($subrule =~ /\A_alternation_\d+_of_production_\d+_of_rule/) 2 1 3
1599 2 { $desc = $parser->{"rules"}{$subrule}->expected }
1600  
1601 3 ▶ if ($lookahead)
Branch: 1 branch
BranchTrueFalseTotal
if ($lookahead) 0 3 3
1602 {
1603 0 ▶ if ($min>0)
Branch: 1 branch
BranchTrueFalseTotal
if ($min > 0) { } 0 0 0
1604 {
1605 0 return new Parse::RecDescent::Subrule($subrule,$lookahead,$line,$desc,$matchrule,$argcode);
1606 }
1607 else
1608 {
1609 0 Parse::RecDescent::_error("Not symbol (\"!\") before
1610 \"$subrule\" doesn't make
1611 sense.",$line);
1612 0 Parse::RecDescent::_hint("Lookahead for negated optional
1613 repetitions (such as
1614 \"!$subrule($repspec)\" can never
1615 succeed, since optional items always
1616 match (zero times at worst).
1617 Did you mean a single \"!$subrule\",
1618 instead?");
1619 }
1620 }
1621 bless
1622 {
1623 3 ▶ "subrule" => $subrule,
Condition50%1/2
$argcode || undef
l!l
03
MC/DC0%0/1
$argcode || undef
$argcode
Truth table50%1/2
A
A= $argcode
Aresult
11
00
1624 "repspec" => $repspec,
1625 "min" => $min,
1626 "max" => $max,
1627 "lookahead" => $lookahead,
1628 "line" => $line,
1629 "expected" => $desc,
1630 "argcode" => $argcode || undef,
1631 "matchrule" => $matchrule,
1632 }, $class;
1633 }
1634  
1635 sub code($$$$)
1636 {
1637 3 ▶ my ($self, $namespace, $rule, $check) = @_;
Subroutine code: called CC=7 SCAR=21.4
1638  
1639 my ($subrule, $repspec, $min, $max, $lookahead) =
1640 3 @{$self}{ qw{subrule repspec min max lookahead} };
1641  
1642 '
1643 Parse::RecDescent::_trace(q{Trying repeated subrule: [' . $self->describe . ']},
1644 Parse::RecDescent::_tracefirst($text),
1645 q{' . $rule->{"name"} . '},
1646 $tracelevel)
1647 if defined $::RD_TRACE;
1648 $expectation->is(' . ($rule->hasleftmost($self) ? 'q{}'
1649 # WAS : 'qq{'.$self->describe.'}' ) . ')->at($text);
1650 : 'q{'.$self->describe.'}' ) . ')->at($text);
1651 ' . ($self->{"lookahead"} ? '$_savetext = $text;' : '' ) .'
1652 unless (defined ($_tok = $thisparser->_parserepeat($text, '
1653 . $self->callsyntax($namespace.'::')
1654 . ', ' . $min . ', ' . $max . ', '
1655 . ($self->{"lookahead"}?'1':'$_noactions')
1656 . ',$expectation,'
1657 . ($self->{argcode} ? "sub { return $self->{argcode} }"
1658 : 'sub { \\@arg }')
1659 . ($check->{"itempos"}?',$itempos[$#itempos]':',undef')
1660 . ')))
1661 {
1662 Parse::RecDescent::_trace(q{<<'.Parse::RecDescent::_matchtracemessage($self,1).' repeated subrule: ['
1663 . $self->describe . ']>>},
1664 Parse::RecDescent::_tracefirst($text),
1665 q{' . $rule->{"name"} .'},
1666 $tracelevel)
1667 if defined $::RD_TRACE;
1668 last;
1669 }
1670 Parse::RecDescent::_trace(q{>>'.Parse::RecDescent::_matchtracemessage($self).' repeated subrule: ['
1671 . $self->{subrule} . ']<< (}
1672 . @$_tok . q{ times)},
1673  
1674 Parse::RecDescent::_tracefirst($text),
1675 q{' . $rule->{"name"} .'},
1676 $tracelevel)
1677 if defined $::RD_TRACE;
1678 $item{q{' . "$self->{subrule}($self->{repspec})" . '}} = $_tok;
1679 push @item, $_tok;
1680 3 ▶ ' . ($self->{"lookahead"} ? '$text = $_savetext;' : '' ) .'
Branch: 6 branches
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 1 2 3
$self->{'lookahead'} ? : 0 3 3
$self->{'lookahead'} ? : 0 3 3
$self->{'argcode'} ? : 0 3 3
$check->{'itempos'} ? : 3 0 3
$self->{'lookahead'} ? : 0 3 3
1681  
1682 '
1683 }
1684  
1685 package Parse::RecDescent::Result;
1686  
1687 0 ▶sub issubrule { 0 }
Subroutine issubrule: not called CC=1 SCAR=6.9
1688 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1689 0 ▶sub describe { '' }
Subroutine describe: not called CC=1 SCAR=6.9
1690  
1691 sub new
1692 {
1693 0 ▶ my ($class, $pos) = @_;
Subroutine new: not called CC=1 SCAR=6.9
1694  
1695 0 bless {}, $class;
1696 }
1697  
1698 sub code($$$$)
1699 {
1700 0 ▶ my ($self, $namespace, $rule) = @_;
Subroutine code: not called CC=1 SCAR=6.9
1701  
1702 0 '
1703 $return = $item[-1];
1704 ';
1705 }
1706  
1707 package Parse::RecDescent::Operator;
1708  
1709 3 my @opertype = ( " non-optional", "n optional" );
1710  
1711 2 ▶sub issubrule { 0 }
Subroutine issubrule: called CC=1 SCAR=0.0
1712 0 ▶sub isterminal { 0 }
Subroutine isterminal: not called CC=1 SCAR=6.9
1713  
1714 14 ▶sub describe { $_[0]->{"expected"} }
Subroutine describe: called CC=1 SCAR=0.0
1715 2 ▶sub sethashname { $_[0]->{hashname} = '__DIRECTIVE' . ++$_[1]->{dircount} . '__'; }
Subroutine sethashname: called CC=1 SCAR=0.0
1716  
1717  
1718 sub new
1719 {
1720 2 ▶ my ($class, $type, $minrep, $maxrep, $leftarg, $op, $rightarg) = @_;
Subroutine new: called CC=1 SCAR=0.0
1721  
1722 2 bless
1723 {
1724 "type" => "${type}op",
1725 "leftarg" => $leftarg,
1726 "op" => $op,
1727 "min" => $minrep,
1728 "max" => $maxrep,
1729 "rightarg" => $rightarg,
1730 "expected" => "<${type}op: ".$leftarg->describe." ".$op->describe." ".$rightarg->describe.">",
1731 }, $class;
1732 }
1733  
1734 sub code($$$$)
1735 {
1736 2 ▶ my ($self, $namespace, $rule, $check) = @_;
Subroutine code: called CC=15 SCAR=36.9
1737  
1738 2 my @codeargs = @_[1..$#_];
1739  
1740 my ($leftarg, $op, $rightarg) =
1741 2 @{$self}{ qw{leftarg op rightarg} };
1742  
1743 my $code = '
1744 Parse::RecDescent::_trace(q{Trying operator: [' . $self->describe . ']},
1745 Parse::RecDescent::_tracefirst($text),
1746 2 ▶ q{' . $rule->{"name"} . '},
Branch: 1 branch
BranchTrueFalseTotal
$rule->hasleftmost($self) ? : 2 0 2
1747 $tracelevel)
1748 if defined $::RD_TRACE;
1749 $expectation->is(' . ($rule->hasleftmost($self) ? 'q{}'
1750 # WAS : 'qq{'.$self->describe.'}' ) . ')->at($text);
1751 : 'q{'.$self->describe.'}' ) . ')->at($text);
1752  
1753 $_tok = undef;
1754 OPLOOP: while (1)
1755 {
1756 $repcount = 0;
1757 my @item;
1758 my %item;
1759 ';
1760  
1761 $code .= '
1762 my $_itempos = $itempos[-1];
1763 my $itemposfirst;
1764 2 ▶' if $check->{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $check->{"itempos"} 0 2 2
1765  
1766 2 ▶ if ($self->{type} eq "leftop" )
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'type'} eq 'leftop') { } 2 0 2
1767 {
1768 2 $code .= '
1769 # MATCH LEFTARG
1770 ' . $leftarg->code(@codeargs) . '
1771  
1772 ';
1773  
1774 $code .= '
1775 if (defined($_itempos) and !defined($itemposfirst))
1776 {
1777 $itemposfirst = Parse::RecDescent::Production::_duplicate_itempos($_itempos);
1778 }
1779 2 ▶' if $check->{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $check->{"itempos"} 0 2 2
1780  
1781 $code .= '
1782 $repcount++;
1783  
1784 my $savetext = $text;
1785 my $backtrack;
1786  
1787 # MATCH (OP RIGHTARG)(s)
1788 while ($repcount < ' . $self->{max} . ')
1789 {
1790 $backtrack = 0;
1791 ' . $op->code(@codeargs) . '
1792 ' . ($op->isterminal() ? 'pop @item;' : '$backtrack=1;' ) . '
1793 ' . (ref($op) eq 'Parse::RecDescent::Token'
1794 2 ▶ ? 'if (defined $1) {push @item, $item{'.($self->{name}||$self->{hashname}).'}=$1; $backtrack=1;}'
Branch: 2 branches
BranchTrueFalseTotal
$op->isterminal ? : 2 0 2
ref $op eq 'Parse::RecDescent::Token' ? : 2 0 2
Condition33%1/3
$self->{'name'} || $self->{'hashname'}
l!l&&r!l&&!r
020
MC/DC0%0/2
$self->{'name'} || $self->{'hashname'}
$self->{'name'} $self->{'hashname'}
Truth table33%1/3
A || B
A= $self->{'name'}B= $self->{'hashname'}
ABresult
1X1
011
000
1795 : "" ) . '
1796 ' . $rightarg->code(@codeargs) . '
1797 $savetext = $text;
1798 $repcount++;
1799 }
1800 $text = $savetext;
1801 pop @item if $backtrack;
1802  
1803 ';
1804 }
1805 else
1806 {
1807 $code .= '
1808 my $savetext = $text;
1809 my $backtrack;
1810 # MATCH (LEFTARG OP)(s)
1811 0 while ($repcount < ' . $self->{max} . ')
1812 {
1813 $backtrack = 0;
1814 ' . $leftarg->code(@codeargs) . '
1815 ';
1816 $code .= '
1817 if (defined($_itempos) and !defined($itemposfirst))
1818 {
1819 $itemposfirst = Parse::RecDescent::Production::_duplicate_itempos($_itempos);
1820 }
1821 0 ▶' if $check->{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $check->{"itempos"} 0 0 0
1822  
1823 $code .= '
1824 $repcount++;
1825 $backtrack = 1;
1826 ' . $op->code(@codeargs) . '
1827 $savetext = $text;
1828 ' . ($op->isterminal() ? 'pop @item;' : "" ) . '
1829 0 ▶ ' . (ref($op) eq 'Parse::RecDescent::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 'Parse::RecDescent::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
1830 }
1831 $text = $savetext;
1832 pop @item if $backtrack;
1833  
1834 # MATCH RIGHTARG
1835 ' . $rightarg->code(@codeargs) . '
1836 $repcount++;
1837 ';
1838 }
1839  
1840 2 ▶ $code .= 'unless (@item) { undef $_tok; last }' unless $self->{min}==0;
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"min"} == 0 0 2 2
1841  
1842 2 $code .= '
1843 $_tok = [ @item ];
1844 ';
1845  
1846  
1847 $code .= '
1848 if (defined $itemposfirst)
1849 {
1850 Parse::RecDescent::Production::_update_itempos(
1851 $_itempos, $itemposfirst, undef, [qw(from)]);
1852 }
1853 2 ▶' if $check->{itempos};
Branch: 1 branch
BranchTrueFalseTotal
if $check->{"itempos"} 0 2 2
1854  
1855 2 $code .= '
1856 last;
1857 } # end of OPLOOP
1858 ';
1859  
1860 $code .= '
1861 unless ($repcount>='.$self->{min}.')
1862 {
1863 Parse::RecDescent::_trace(q{<<'.Parse::RecDescent::_matchtracemessage($self,1).' operator: ['
1864 . $self->describe
1865 . ']>>},
1866 Parse::RecDescent::_tracefirst($text),
1867 q{' . $rule->{"name"} .'},
1868 $tracelevel)
1869 if defined $::RD_TRACE;
1870 $expectation->failed();
1871 last;
1872 }
1873 Parse::RecDescent::_trace(q{>>'.Parse::RecDescent::_matchtracemessage($self).' operator: ['
1874 . $self->describe
1875 . ']<< (return value: [}
1876 . qq{@{$_tok||[]}} . q{]},
1877 Parse::RecDescent::_tracefirst($text),
1878 q{' . $rule->{"name"} .'},
1879 $tracelevel)
1880 if defined $::RD_TRACE;
1881  
1882 2 ▶ push @item, $item{'.($self->{name}||$self->{hashname}).'}=$_tok||[];
Condition33%1/3
$self->{'name'} || $self->{'hashname'}
l!l&&r!l&&!r
020
MC/DC0%0/2
$self->{'name'} || $self->{'hashname'}
$self->{'name'} $self->{'hashname'}
Truth table33%1/3
A || B
A= $self->{'name'}B= $self->{'hashname'}
ABresult
1X1
011
000
1883 ';
1884  
1885 2 return $code;
1886 }
1887  
1888  
1889 package Parse::RecDescent::Expectation;
1890  
1891 sub new ($)
1892 {
1893 83 ▶ bless {
Subroutine new: called CC=1 SCAR=0.0
1894 "failed" => 0,
1895 "expected" => "",
1896 "unexpected" => "",
1897 "lastexpected" => "",
1898 "lastunexpected" => "",
1899 "defexpected" => $_[1],
1900 };
1901 }
1902  
1903 sub is ($$)
1904 {
1905 181 ▶ $_[0]->{lastexpected} = $_[1]; return $_[0];
Subroutine is: called CC=1 SCAR=0.0
1906 }
1907  
1908 sub at ($$)
1909 {
1910 279 ▶ $_[0]->{lastunexpected} = $_[1]; return $_[0];
Subroutine at: called CC=1 SCAR=0.0
1911 }
1912  
1913 sub failed ($)
1914 {
1915 40 ▶ return unless $_[0]->{lastexpected};
Subroutine failed: called CC=4 SCAR=14.2
Branch: 1 branch
BranchTrueFalseTotal
unless $_[0]{"lastexpected"} 35 5 40
1916 5 ▶ $_[0]->{expected} = $_[0]->{lastexpected} unless $_[0]->{failed};
Branch: 1 branch
BranchTrueFalseTotal
unless $_[0]{"failed"} 5 0 5
1917 5 ▶ $_[0]->{unexpected} = $_[0]->{lastunexpected} unless $_[0]->{failed};
Branch: 1 branch
BranchTrueFalseTotal
unless $_[0]{"failed"} 5 0 5
1918 5 $_[0]->{failed} = 1;
1919 }
1920  
1921 sub message ($)
1922 {
1923 0 ▶ my ($self) = @_;
Subroutine message: not called CC=4 SCAR=30.0
1924 0 ▶ $self->{expected} = $self->{defexpected} unless $self->{expected};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"expected"} 0 0 0
1925 0 $self->{expected} =~ s/_/ /g;
1926 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
1927 {
1928 0 return "Was expecting $self->{expected}";
1929 }
1930 else
1931 {
1932 0 $self->{unexpected} =~ /\s*(.*)/;
1933 0 return "Was expecting $self->{expected} but found \"$1\" instead";
1934 }
1935 }
1936  
1937 5 1;
1938  
1939 package Parse::RecDescent;
1940  
1941 3 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
1942 3 ▶use vars qw ( $AUTOLOAD $VERSION $_FILENAME);
Subroutine BEGIN: called CC=1 SCAR=0.0
1943  
1944 5 my $ERRORS = 0;
1945  
1946 5 our $VERSION = '1.967_010';
1947 5 $VERSION = eval $VERSION;
1948 5 $_FILENAME=__FILE__;
1949  
1950 # BUILDING A PARSER
1951  
1952 5 my $nextnamespace = "namespace000001";
1953  
1954 sub _nextnamespace()
1955 {
1956 4 ▶ return "Parse::RecDescent::" . $nextnamespace++;
Subroutine _nextnamespace: called CC=1 SCAR=0.0
1957 }
1958  
1959 # ARGS ARE: $class, $grammar, $compiling, $namespace
1960 sub new ($$$$)
1961 {
1962 6 ▶ my $class = ref($_[0]) || $_[0];
Subroutine new: called CC=5 SCAR=19.8
Pod undocumented
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
060
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
1963 6 local $Parse::RecDescent::compiling = $_[2];
1964 6 ▶ my $name_space_name = defined $_[3]
Branch: 1 branch
BranchTrueFalseTotal
defined $_[3] ? : 2 4 6
1965 ? "Parse::RecDescent::".$_[3]
1966 : _nextnamespace();
1967 6 my $self =
1968 {
1969 "rules" => {},
1970 "namespace" => $name_space_name,
1971 "startcode" => '',
1972 "localvars" => '',
1973 "_AUTOACTION" => undef,
1974 "_AUTOTREE" => undef,
1975  
1976 # Precompiled parsers used to set _precompiled, but that
1977 # wasn't present in some versions of Parse::RecDescent used to
1978 # build precompiled parsers. Instead, set a new
1979 # _not_precompiled flag, which is remove from future
1980 # Precompiled parsers at build time.
1981 "_not_precompiled" => 1,
1982 };
1983  
1984  
1985 6 ▶ if ($::RD_AUTOACTION) {
Branch: 1 branch
BranchTrueFalseTotal
if ($main::RD_AUTOACTION) 0 6 6
1986 0 my $sourcecode = $::RD_AUTOACTION;
1987 0 ▶ $sourcecode = "{ $sourcecode }"
Branch: 1 branch
BranchTrueFalseTotal
unless $sourcecode =~ /\A\s*\{.*\}\s*\Z/ 0 0 0
1988 unless $sourcecode =~ /\A\s*\{.*\}\s*\Z/;
1989 $self->{_check}{itempos} =
1990 0 $sourcecode =~ /\@itempos\b|\$itempos\s*\[/;
1991 $self->{_AUTOACTION}
1992 0 = new Parse::RecDescent::Action($sourcecode,0,-1)
1993 }
1994  
1995 6 bless $self, $class;
1996 6 return $self->Replace($_[1])
1997 }
1998  
1999 sub Compile($$$$) {
2000 0 ▶ die "Compilation of Parse::RecDescent grammars not yet implemented\n";
Subroutine Compile: not called CC=1 SCAR=6.9
Pod undocumented
2001 }
2002  
2003 sub DESTROY {
2004 4 ▶ my ($self) = @_;
Subroutine DESTROY: called CC=4 SCAR=13.9
2005 4 my $namespace = $self->{namespace};
2006 4 $namespace =~ s/Parse::RecDescent:://;
2007 4 ▶ if ($self->{_not_precompiled}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"_not_precompiled"}) 1 3 4
2008 # BEGIN WORKAROUND
2009 # Perl has a bug that creates a circular reference between
2010 # @ISA and that variable's stash:
2011 # https://rt.perl.org/rt3/Ticket/Display.html?id=92708
2012 # Emptying the array before deleting the stash seems to
2013 # prevent the leak. Once the ticket above has been resolved,
2014 # these two lines can be removed.
2015 3 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
2016 1 @{$self->{namespace} . '::ISA'} = ();
2017 # END WORKAROUND
2018  
2019 # Some grammars may contain circular references between rules,
2020 # such as:
2021 # a: 'ID' | b
2022 # b: '(' a ')'
2023 # Unless these references are broken, the subs stay around on
2024 # stash deletion below. Iterate through the stash entries and
2025 # for each defined code reference, set it to reference sub {}
2026 # instead.
2027 {
2028 1 local $^W; # avoid 'sub redefined' warnings.
2029 1 ▶ my $blank_sub = sub {};
Subroutine __ANON__: not called CC=1 SCAR=0.0
2030 1 ▶ while (my ($name, $glob) = each %{"Parse::RecDescent::$namespace\::"}) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %{"Parse::RecDescent::${namespace}::";}) 7 1 8
2031 7 ▶ *$glob = $blank_sub if defined &$glob;
Branch: 1 branch
BranchTrueFalseTotal
if defined &$glob 2 5 7
2032 }
2033 }
2034  
2035 # Delete the namespace's stash
2036 1 delete $Parse::RecDescent::{$namespace.'::'};
2037 }
2038 }
2039  
2040 # BUILDING A GRAMMAR....
2041  
2042 # ARGS ARE: $self, $grammar, $isimplicit, $isleftop
2043 sub Replace ($$)
2044 {
2045 # set $replace = 1 for _generate
2046 6 ▶ splice(@_, 2, 0, 1);
Subroutine Replace: called CC=1 SCAR=0.0
Pod undocumented
2047  
2048 6 return _generate(@_);
2049 }
2050  
2051 # ARGS ARE: $self, $grammar, $isimplicit, $isleftop
2052 sub Extend ($$)
2053 {
2054 # set $replace = 0 for _generate
2055 4 ▶ splice(@_, 2, 0, 0);
Subroutine Extend: called CC=1 SCAR=0.0
Pod undocumented
2056  
2057 4 return _generate(@_);
2058 }
2059  
2060 sub _no_rule ($$;$)
2061 {
2062 0 ▶ _error("Ruleless $_[0] at start of grammar.",$_[1]);
Subroutine _no_rule: not called CC=2 SCAR=17.9
2063 0 ▶ my $desc = $_[2] ? "\"$_[2]\"" : "";
Branch: 1 branch
BranchTrueFalseTotal
$_[2] ? : 0 0 0
2064 0 _hint("You need to define a rule for the $_[0] $desc
2065 to be part of.");
2066 }
2067  
2068 5 my $NEGLOOKAHEAD = '\G(\s*\.\.\.\!)';
2069 5 my $POSLOOKAHEAD = '\G(\s*\.\.\.)';
2070 5 my $RULE = '\G\s*(\w+)[ \t]*:';
2071 5 my $PROD = '\G\s*([|])';
2072 5 my $TOKEN = q{\G\s*/((\\\\/|\\\\\\\\|[^/])*)/([cgimsox]*)};
2073 5 my $MTOKEN = q{\G\s*(m\s*[^\w\s])};
2074 8 my $LITERAL = q{\G\s*'((\\\\['\\\\]|[^'])*)'};
2075 3 my $INTERPLIT = q{\G\s*"((\\\\["\\\\]|[^"])*)"};
2076 3 my $SUBRULE = '\G\s*(\w+)';
2077 3 my $MATCHRULE = '\G(\s*<matchrule:)';
2078 8 my $SIMPLEPAT = '((\\s+/[^/\\\\]*(?:\\\\.[^/\\\\]*)*/)?)';
2079 3 my $OPTIONAL = '\G\((\?)'.$SIMPLEPAT.'\)';
2080 3 my $ANY = '\G\((s\?)'.$SIMPLEPAT.'\)';
2081 8 my $MANY = '\G\((s|\.\.)'.$SIMPLEPAT.'\)';
2082 8 my $EXACTLY = '\G\(([1-9]\d*)'.$SIMPLEPAT.'\)';
2083 8 my $BETWEEN = '\G\((\d+)\.\.([1-9]\d*)'.$SIMPLEPAT.'\)';
2084 8 my $ATLEAST = '\G\((\d+)\.\.'.$SIMPLEPAT.'\)';
2085 3 my $ATMOST = '\G\(\.\.([1-9]\d*)'.$SIMPLEPAT.'\)';
2086 3 my $BADREP = '\G\((-?\d+)?\.\.(-?\d+)?'.$SIMPLEPAT.'\)';
2087 8 my $ACTION = '\G\s*\{';
2088 8 my $IMPLICITSUBRULE = '\G\s*\(';
2089 4 my $COMMENT = '\G\s*(#.*)';
2090 4 my $COMMITMK = '\G\s*<commit>';
2091 4 my $UNCOMMITMK = '\G\s*<uncommit>';
2092 4 my $QUOTELIKEMK = '\G\s*<perl_quotelike>';
2093 4 my $CODEBLOCKMK = '\G\s*<perl_codeblock(?:\s+([][()<>{}]+))?>';
2094 4 my $VARIABLEMK = '\G\s*<perl_variable>';
2095 4 my $NOCHECKMK = '\G\s*<nocheck>';
2096 4 my $AUTOACTIONPATMK = '\G\s*<autoaction:';
2097 4 my $AUTOTREEMK = '\G\s*<autotree(?::\s*([\w:]+)\s*)?>';
2098 4 my $AUTOSTUBMK = '\G\s*<autostub>';
2099 4 my $AUTORULEMK = '\G\s*<autorule:(.*?)>';
2100 4 my $REJECTMK = '\G\s*<reject>';
2101 4 my $CONDREJECTMK = '\G\s*<reject:';
2102 4 my $SCOREMK = '\G\s*<score:';
2103 4 my $AUTOSCOREMK = '\G\s*<autoscore:';
2104 4 my $SKIPMK = '\G\s*<skip:';
2105 4 my $OPMK = '\G\s*<(left|right)op(?:=(\'.*?\'))?:';
2106 4 my $ENDDIRECTIVEMK = '\G\s*>';
2107 4 my $RESYNCMK = '\G\s*<resync>';
2108 4 my $RESYNCPATMK = '\G\s*<resync:';
2109 4 my $RULEVARPATMK = '\G\s*<rulevar:';
2110 4 my $DEFERPATMK = '\G\s*<defer:';
2111 4 my $TOKENPATMK = '\G\s*<token:';
2112 4 my $AUTOERRORMK = '\G\s*<error(\??)>';
2113 4 my $MSGERRORMK = '\G\s*<error(\??):';
2114 4 my $NOCHECK = '\G\s*<nocheck>';
2115 4 my $WARNMK = '\G\s*<warn((?::\s*(\d+)\s*)?)>';
2116 4 my $HINTMK = '\G\s*<hint>';
2117 4 my $TRACEBUILDMK = '\G\s*<trace_build((?::\s*(\d+)\s*)?)>';
2118 4 my $TRACEPARSEMK = '\G\s*<trace_parse((?::\s*(\d+)\s*)?)>';
2119 4 my $UNCOMMITPROD = $PROD.'\s*<uncommit';
2120 4 my $ERRORPROD = $PROD.'\s*<error';
2121 4 my $LONECOLON = '\G\s*:';
2122 4 my $OTHER = '\G\s*([^\s]+)';
2123  
2124 4 my @lines = 0;
2125  
2126 sub _generate
2127 {
2128 12 ▶ my ($self, $grammar, $replace, $isimplicit, $isleftop) = (@_, 0);
Subroutine _generate: called CC=238 SCAR=81.0
2129  
2130 12 my $aftererror = 0;
2131 12 my $lookahead = 0;
2132 12 my $lookaheadspec = "";
2133 12 my $must_pop_lines;
2134 12 ▶ if (! $lines[-1]) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($lines[-1]) 10 2 12
2135 10 push @lines, _linecount($grammar) ;
2136 10 $must_pop_lines = 1;
2137 }
2138 $self->{_check}{itempos} = ($grammar =~ /\@itempos\b|\$itempos\s*\[/)
2139 12 ▶ unless $self->{_check}{itempos};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"_check"}{"itempos"} 7 5 12
2140 12 for (qw(thisoffset thiscolumn prevline prevoffset prevcolumn))
2141 {
2142 $self->{_check}{$_} =
2143 ($grammar =~ /\$$_/) || $self->{_check}{itempos}
2144 60 ▶ unless $self->{_check}{$_};
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"_check"}{$_} 35 25 60
Condition66%2/3
$grammar =~ /\$$_/ || $self->{'_check'}{'itempos'}
l!l&&r!l&&!r
0530
MC/DC50%1/2
$grammar =~ /\$$_/ || $self->{'_check'}{'itempos'}
$grammar =~ /\$$_/ $self->{'_check'}{'itempos'}
Truth table66%2/3
A || B
A= $grammar =~ /\$$_/B= $self->{'_check'}{'itempos'}
ABresult
1X1
011
000
2145 }
2146 12 my $line;
2147  
2148 12 my $rule = undef;
2149 12 my $prod = undef;
2150 12 my $item = undef;
2151 12 my $lastgreedy = '';
2152 12 pos $grammar = 0;
2153 12 study $grammar;
2154  
2155 12 local $::RD_HINT = $::RD_HINT;
2156 12 local $::RD_WARN = $::RD_WARN;
2157 12 local $::RD_TRACE = $::RD_TRACE;
2158 12 local $::RD_CHECK = $::RD_CHECK;
2159  
2160 12 ▶ while (pos $grammar < length $grammar)
Branch: 1 branch
BranchTrueFalseTotal
if (pos $grammar < length $grammar) 173 12 185
2161 {
2162 173 $line = $lines[-1] - _linecount($grammar) + 1;
2163 173 my $commitonly;
2164 173 my $code = "";
2165 173 my @components = ();
2166 173 ▶ if ($grammar =~ m/$COMMENT/gco)
Branch: 19 branches
BranchTrueFalseTotal
if ($grammar =~ /$COMMENT/cog) { } 9 164 173
elsif ($grammar =~ /$NEGLOOKAHEAD/cog) { } 1 163 164
elsif ($grammar =~ /$POSLOOKAHEAD/cog) { } 0 163 163
elsif ($grammar =~ /(?=$ACTION)/cog and do { ($code) = &extract_codeblock($grammar); $code }) { } 23 140 163
elsif ($grammar =~ /(?=$IMPLICITSUBRULE)/cog and do { ($code) = &extract_codeblock($grammar, '{([', undef, '(', 1); $code }) { } 2 138 140
elsif ($grammar =~ /$ENDDIRECTIVEMK/cog) { } 2 136 138
elsif ($grammar =~ /\G\s*<[^m]/cg) { } 9 127 136
elsif ($grammar =~ /$RULE/cog) { } 38 89 127
elsif ($grammar =~ /$UNCOMMITPROD/cog) { } 1 88 89
elsif ($grammar =~ /$ERRORPROD/cog) { } 0 88 88
elsif ($grammar =~ /$PROD/cog) { } 9 79 88
elsif ($grammar =~ /$LITERAL/cog) { } 36 43 79
elsif ($grammar =~ /$INTERPLIT/cog) { } 3 40 43
elsif ($grammar =~ /$TOKEN/cog) { } 17 23 40
elsif ($grammar =~ /(?=$MTOKEN)/cog and do { ($code, undef, @components) = &extract_quotelike($grammar); $code }) { } 0 23 23
elsif ($grammar =~ /(?=$MATCHRULE)/cog and do { ($code) = &extract_bracketed($grammar, '<'); $code } or $grammar =~ /$SUBRULE/cog and $code = $1) { } 23 0 23
elsif ($grammar =~ /$LONECOLON/cog) { } 0 0 0
elsif ($grammar =~ /$ACTION/cog) { } 0 0 0
elsif ($grammar =~ /$OTHER/cog) { } 0 0 0
2167 {
2168 9 _parse("a comment",0,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2169 9 next;
2170 }
2171 elsif ($grammar =~ m/$NEGLOOKAHEAD/gco)
2172 {
2173 1 _parse("a negative lookahead",$aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2174 1 ▶ $lookahead = $lookahead ? -$lookahead : -1;
Branch: 1 branch
BranchTrueFalseTotal
$lookahead ? : 0 1 1
2175 1 $lookaheadspec .= $1;
2176 1 next; # SKIP LOOKAHEAD RESET AT END OF while LOOP
2177 }
2178 elsif ($grammar =~ m/$POSLOOKAHEAD/gco)
2179 {
2180 0 _parse("a positive lookahead",$aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2181 0 ▶ $lookahead = $lookahead ? $lookahead : 1;
Branch: 1 branch
BranchTrueFalseTotal
$lookahead ? : 0 0 0
2182 0 $lookaheadspec .= $1;
2183 0 next; # SKIP LOOKAHEAD RESET AT END OF while LOOP
2184 }
2185 ▶ elsif ($grammar =~ m/(?=$ACTION)/gco
Condition66%2/3
$grammar =~ /(?=$ACTION)/cog and do { ($code) = &extract_codeblock($grammar); $code }
!ll&&!rl&&r
140023
MC/DC50%1/2
$grammar =~ /(?=$ACTION)/cog and do { ($code) = &extract_codeblock($grammar); $code }
$grammar =~ /(?=$ACTION)/cog do { ($code) = &extract_codeblock($grammar); $code }
Truth table66%2/3
A and B
A= $grammar =~ /(?=$ACTION)/cogB= do { ($code) = &extract_codeblock($grammar); $code }
ABresult
0X0
100
111
2186 23 and do { ($code) = extract_codeblock($grammar); $code })
2187 {
2188 23 _parse("an action", $aftererror, $line, $code);
2189 23 $item = new Parse::RecDescent::Action($code,$lookahead,$line);
2190 23 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or $self->_addstartcode($code) 0 23 23
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
0023
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2191 or $self->_addstartcode($code);
2192 }
2193 ▶ elsif ($grammar =~ m/(?=$IMPLICITSUBRULE)/gco
Condition66%2/3
$grammar =~ /(?=$IMPLICITSUBRULE)/cog and do { ($code) = &extract_codeblock($grammar, "{([", undef, "(", 1); $code }
!ll&&!rl&&r
13802
MC/DC50%1/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 table66%2/3
A and B
A= $grammar =~ /(?=$IMPLICITSUBRULE)/cogB= do { ($code) = &extract_codeblock($grammar, "{([", undef, "(", 1); $code }
ABresult
0X0
100
111
2194 2 and do { ($code) = extract_codeblock($grammar,'{([',undef,'(',1);
2195 2 $code })
2196 {
2197 2 $code =~ s/\A\s*\(|\)\Z//g;
2198 2 _parse("an implicit subrule", $aftererror, $line,
2199 "( $code )");
2200 2 my $implicit = $rule->nextimplicit;
2201 return undef
2202 2 ▶ if !$self->_generate("$implicit : $code",$replace,1);
Branch: 1 branch
BranchTrueFalseTotal
unless $self->_generate("$implicit : $code", $replace, 1) 0 2 2
2203 2 my $pos = pos $grammar;
2204 2 substr($grammar,$pos,0,$implicit);
2205 2 pos $grammar = $pos;;
2206 }
2207 elsif ($grammar =~ m/$ENDDIRECTIVEMK/gco)
2208 {
2209  
2210 # EXTRACT TRAILING REPETITION SPECIFIER (IF ANY)
2211  
2212 2 my ($minrep,$maxrep) = (1,$MAXREP);
2213 2 ▶ if ($grammar =~ m/\G[(]/gc)
Branch: 1 branch
BranchTrueFalseTotal
if ($grammar =~ /\G[(]/cg) 2 0 2
2214 {
2215 2 pos($grammar)--;
2216  
2217 2 ▶ if ($grammar =~ m/$OPTIONAL/gco)
Branch: 8 branches
BranchTrueFalseTotal
if ($grammar =~ /$OPTIONAL/cog) { } 0 2 2
elsif ($grammar =~ /$ANY/cog) { } 2 0 2
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
2218 0 { ($minrep, $maxrep) = (0,1) }
2219 elsif ($grammar =~ m/$ANY/gco)
2220 2 { $minrep = 0 }
2221 elsif ($grammar =~ m/$EXACTLY/gco)
2222 0 { ($minrep, $maxrep) = ($1,$1) }
2223 elsif ($grammar =~ m/$BETWEEN/gco)
2224 0 { ($minrep, $maxrep) = ($1,$2) }
2225 elsif ($grammar =~ m/$ATLEAST/gco)
2226 0 { $minrep = $1 }
2227 elsif ($grammar =~ m/$ATMOST/gco)
2228 0 { $maxrep = $1 }
2229 elsif ($grammar =~ m/$MANY/gco)
2230 { }
2231 elsif ($grammar =~ m/$BADREP/gco)
2232 {
2233 0 _parse("an invalid repetition specifier", 0,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2234 0 _error("Incorrect specification of a repeated directive",
2235 $line);
2236 0 _hint("Repeated directives cannot have
2237 a maximum repetition of zero, nor can they have
2238 negative components in their ranges.");
2239 }
2240 }
2241  
2242 2 ▶ $prod && $prod->enddirective($line,$minrep,$maxrep);
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->enddirective($line, $minrep, $maxrep) 2 0 2
2243 }
2244 elsif ($grammar =~ m/\G\s*<[^m]/gc)
2245 {
2246 9 pos($grammar)-=2;
2247  
2248 9 ▶ if ($grammar =~ m/$OPMK/gco)
Branch: 29 branches
BranchTrueFalseTotal
if ($grammar =~ /$OPMK/cog) { } 2 7 9
elsif ($grammar =~ /$UNCOMMITMK/cog) { } 2 5 7
elsif ($grammar =~ /$QUOTELIKEMK/cog) { } 0 5 5
elsif ($grammar =~ /$CODEBLOCKMK/cog) { } 0 5 5
elsif ($grammar =~ /$VARIABLEMK/cog) { } 0 5 5
elsif ($grammar =~ /$NOCHECKMK/cog) { } 0 5 5
elsif ($grammar =~ /$AUTOSTUBMK/cog) { } 0 5 5
elsif ($grammar =~ /$AUTORULEMK/cog) { } 0 5 5
elsif ($grammar =~ /$AUTOTREEMK/cog) { } 0 5 5
elsif ($grammar =~ /$REJECTMK/cog) { } 0 5 5
elsif ($grammar =~ /(?=$CONDREJECTMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 2 3 5
elsif ($grammar =~ /(?=$SCOREMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 3 3
elsif ($grammar =~ /(?=$AUTOSCOREMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 3 3
elsif ($grammar =~ /$RESYNCMK/cog) { } 1 2 3
elsif ($grammar =~ /(?=$RESYNCPATMK)/cog and do { ($code) = &extract_bracketed($grammar, '<'); $code }) { } 0 2 2
elsif ($grammar =~ /(?=$SKIPMK)/cog and do { ($code) = &extract_codeblock($grammar, '<'); $code }) { } 0 2 2
elsif ($grammar =~ /(?=$RULEVARPATMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 1 1 2
elsif ($grammar =~ /(?=$AUTOACTIONPATMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 1 1
elsif ($grammar =~ /(?=$DEFERPATMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 1 1
elsif ($grammar =~ /(?=$TOKENPATMK)/cog and do { ($code) = &extract_codeblock($grammar, '{', undef, '<'); $code }) { } 0 1 1
elsif ($grammar =~ /$COMMITMK/cog) { } 1 0 1
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
2249 {
2250 # $DB::single=1;
2251 2 _parse("a $1-associative operator directive", $aftererror, $line, "<$1op:...>");
2252 2 ▶ $prod->adddirective($1, $line,$2||'');
Condition50%1/2
$2 || ''
l!l
02
MC/DC0%0/1
$2 || ''
$2
Truth table50%1/2
A
A= $2
Aresult
11
00
2253 }
2254 elsif ($grammar =~ m/$UNCOMMITMK/gco)
2255 {
2256 2 _parse("an uncommit marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2257 2 $item = new Parse::RecDescent::Directive('$commit=0;1',
2258 $lookahead,$line,"<uncommit>");
2259 2 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<uncommit>", $line) 0 2 2
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
002
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2260 or _no_rule("<uncommit>",$line);
2261 }
2262 elsif ($grammar =~ m/$QUOTELIKEMK/gco)
2263 {
2264 0 _parse("an perl quotelike marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2265 0 $item = new Parse::RecDescent::Directive(
2266 'my ($match,@res);
2267 ($match,$text,undef,@res) =
2268 Text::Balanced::extract_quotelike($text,$skip);
2269 $match ? \@res : undef;
2270 ', $lookahead,$line,"<perl_quotelike>");
2271 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
2272 or _no_rule("<perl_quotelike>",$line);
2273 }
2274 elsif ($grammar =~ m/$CODEBLOCKMK/gco)
2275 {
2276 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
2277 0 _parse("an perl codeblock marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2278 0 $item = new Parse::RecDescent::Directive(
2279 'Text::Balanced::extract_codeblock($text,undef,$skip,\''.$outer.'\');
2280 ', $lookahead,$line,"<perl_codeblock>");
2281 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
2282 or _no_rule("<perl_codeblock>",$line);
2283 }
2284 elsif ($grammar =~ m/$VARIABLEMK/gco)
2285 {
2286 0 _parse("an perl variable marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2287 0 $item = new Parse::RecDescent::Directive(
2288 'Text::Balanced::extract_variable($text,$skip);
2289 ', $lookahead,$line,"<perl_variable>");
2290 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
2291 or _no_rule("<perl_variable>",$line);
2292 }
2293 elsif ($grammar =~ m/$NOCHECKMK/gco)
2294 {
2295 0 _parse("a disable checking marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2296 0 ▶ if ($rule)
Branch: 1 branch
BranchTrueFalseTotal
if ($rule) { } 0 0 0
2297 {
2298 0 _error("<nocheck> directive not at start of grammar", $line);
2299 0 _hint("The <nocheck> directive can only
2300 be specified at the start of a
2301 grammar (before the first rule
2302 is defined.");
2303 }
2304 else
2305 {
2306 0 local $::RD_CHECK = 1;
2307 }
2308 }
2309 elsif ($grammar =~ m/$AUTOSTUBMK/gco)
2310 {
2311 0 _parse("an autostub marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2312 0 $::RD_AUTOSTUB = "";
2313 }
2314 elsif ($grammar =~ m/$AUTORULEMK/gco)
2315 {
2316 0 _parse("an autorule marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2317 0 $::RD_AUTOSTUB = $1;
2318 }
2319 elsif ($grammar =~ m/$AUTOTREEMK/gco)
2320 {
2321 0 ▶ my $base = defined($1) ? $1 : "";
Branch: 1 branch
BranchTrueFalseTotal
defined $1 ? : 0 0 0
2322 0 my $current_match = substr($grammar, $-[0], $+[0] - $-[0]);
2323 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
2324 0 _parse("an autotree marker", $aftererror,$line, $current_match);
2325 0 ▶ if ($rule)
Branch: 1 branch
BranchTrueFalseTotal
if ($rule) { } 0 0 0
2326 {
2327 0 _error("<autotree> directive not at start of grammar", $line);
2328 0 _hint("The <autotree> directive can only
2329 be specified at the start of a
2330 grammar (before the first rule
2331 is defined.");
2332 }
2333 else
2334 {
2335 0 undef $self->{_AUTOACTION};
2336 $self->{_AUTOTREE}{NODE}
2337 0 = new Parse::RecDescent::Action(q({bless \%item, ').$base.q('.$item[0]}),0,-1);
2338 $self->{_AUTOTREE}{TERMINAL}
2339 0 = new Parse::RecDescent::Action(q({bless {__VALUE__=>$item[1]}, ').$base.q('.$item[0]}),0,-1);
2340 }
2341 }
2342  
2343 elsif ($grammar =~ m/$REJECTMK/gco)
2344 {
2345 0 _parse("an reject marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2346 0 $item = new Parse::RecDescent::UncondReject($lookahead,$line,"<reject>");
2347 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
2348 or _no_rule("<reject>",$line);
2349 }
2350 ▶ elsif ($grammar =~ m/(?=$CONDREJECTMK)/gco
Condition66%2/3
$grammar =~ /(?=$CONDREJECTMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
302
MC/DC50%1/2
$grammar =~ /(?=$CONDREJECTMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
$grammar =~ /(?=$CONDREJECTMK)/cog do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
Truth table66%2/3
A and B
A= $grammar =~ /(?=$CONDREJECTMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2351 2 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2352 2 $code })
2353 {
2354 2 _parse("a (conditional) reject marker", $aftererror,$line, $code );
2355 2 $code =~ /\A\s*<reject:(.*)>\Z/s;
2356 2 my $cond = $1;
2357 2 $item = new Parse::RecDescent::Directive(
2358 "($1) ? undef : 1", $lookahead,$line,"<reject:$cond>");
2359 2 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<reject:$cond>", $line) 0 2 2
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
002
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2360 or _no_rule("<reject:$cond>",$line);
2361 }
2362 ▶ elsif ($grammar =~ m/(?=$SCOREMK)/gco
Condition33%1/3
$grammar =~ /(?=$SCOREMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
300
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 table33%1/3
A and B
A= $grammar =~ /(?=$SCOREMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2363 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2364 0 $code })
2365 {
2366 0 _parse("a score marker", $aftererror,$line, $code );
2367 0 $code =~ /\A\s*<score:(.*)>\Z/s;
2368 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
2369 or _no_rule($code,$line);
2370 }
2371 ▶ elsif ($grammar =~ m/(?=$AUTOSCOREMK)/gco
Condition33%1/3
$grammar =~ /(?=$AUTOSCOREMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
300
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 table33%1/3
A and B
A= $grammar =~ /(?=$AUTOSCOREMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2372 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2373 0 $code;
2374 } )
2375 {
2376 0 _parse("an autoscore specifier", $aftererror,$line,$code);
2377 0 $code =~ /\A\s*<autoscore:(.*)>\Z/s;
2378  
2379 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
2380 or _no_rule($code,$line);
2381  
2382 0 $item = new Parse::RecDescent::UncondReject($lookahead,$line,$code);
2383 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
2384 or _no_rule($code,$line);
2385 }
2386 elsif ($grammar =~ m/$RESYNCMK/gco)
2387 {
2388 1 _parse("a resync to newline marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2389 1 $item = new Parse::RecDescent::Directive(
2390 'if ($text =~ s/(\A[^\n]*\n)//) { $return = 0; $1; } else { undef }',
2391 $lookahead,$line,"<resync>");
2392 1 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<resync>", $line) 0 1 1
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
001
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2393 or _no_rule("<resync>",$line);
2394 }
2395 ▶ elsif ($grammar =~ m/(?=$RESYNCPATMK)/gco
Condition33%1/3
$grammar =~ /(?=$RESYNCPATMK)/cog and do { ($code) = &extract_bracketed($grammar, "<"); $code }
!ll&&!rl&&r
200
MC/DC0%0/2
$grammar =~ /(?=$RESYNCPATMK)/cog and do { ($code) = &extract_bracketed($grammar, "<"); $code }
$grammar =~ /(?=$RESYNCPATMK)/cog do { ($code) = &extract_bracketed($grammar, "<"); $code }
Truth table33%1/3
A and B
A= $grammar =~ /(?=$RESYNCPATMK)/cogB= do { ($code) = &extract_bracketed($grammar, "<"); $code }
ABresult
0X0
100
111
2396 0 and do { ($code) = extract_bracketed($grammar,'<');
2397 0 $code })
2398 {
2399 0 _parse("a resync with pattern marker", $aftererror,$line, $code );
2400 0 $code =~ /\A\s*<resync:(.*)>\Z/s;
2401 0 $item = new Parse::RecDescent::Directive(
2402 'if ($text =~ s/(\A'.$1.')//) { $return = 0; $1; } else { undef }',
2403 $lookahead,$line,$code);
2404 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
2405 or _no_rule($code,$line);
2406 }
2407 ▶ elsif ($grammar =~ m/(?=$SKIPMK)/gco
Condition33%1/3
$grammar =~ /(?=$SKIPMK)/cog and do { ($code) = &extract_codeblock($grammar, "<"); $code }
!ll&&!rl&&r
200
MC/DC0%0/2
$grammar =~ /(?=$SKIPMK)/cog and do { ($code) = &extract_codeblock($grammar, "<"); $code }
$grammar =~ /(?=$SKIPMK)/cog do { ($code) = &extract_codeblock($grammar, "<"); $code }
Truth table33%1/3
A and B
A= $grammar =~ /(?=$SKIPMK)/cogB= do { ($code) = &extract_codeblock($grammar, "<"); $code }
ABresult
0X0
100
111
2408 0 and do { ($code) = extract_codeblock($grammar,'<');
2409 0 $code })
2410 {
2411 0 _parse("a skip marker", $aftererror,$line, $code );
2412 0 $code =~ /\A\s*<skip:(.*)>\Z/s;
2413 0 ▶ if ($rule) {
Branch: 1 branch
BranchTrueFalseTotal
if ($rule) { } 0 0 0
2414 0 $item = new Parse::RecDescent::Directive(
2415 'my $oldskip = $skip; $skip='.$1.'; $oldskip',
2416 $lookahead,$line,$code);
2417 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
2418 or _no_rule($code,$line);
2419 } else {
2420 #global <skip> directive
2421 0 $self->{skip} = $1;
2422 }
2423 }
2424 ▶ elsif ($grammar =~ m/(?=$RULEVARPATMK)/gco
Condition66%2/3
$grammar =~ /(?=$RULEVARPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
101
MC/DC50%1/2
$grammar =~ /(?=$RULEVARPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
$grammar =~ /(?=$RULEVARPATMK)/cog do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
Truth table66%2/3
A and B
A= $grammar =~ /(?=$RULEVARPATMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2425 1 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2426 1 $code;
2427 } )
2428 {
2429 1 _parse("a rule variable specifier", $aftererror,$line,$code);
2430 1 $code =~ /\A\s*<rulevar:(.*)>\Z/s;
2431  
2432 1 ▶ $rule and $rule->addvar($1,$self)
Branch: 1 branch
BranchTrueFalseTotal
$rule and $rule->addvar($1, $self) or &_no_rule($code, $line) 0 1 1
Condition33%1/3
$rule and $rule->addvar($1, $self)
!ll&&!rl&&r
001
MC/DC0%0/2
$rule and $rule->addvar($1, $self)
$rule $rule->addvar($1, $self)
Truth table33%1/3
A and B
A= $ruleB= $rule->addvar($1, $self)
ABresult
0X0
100
111
2433 or _no_rule($code,$line);
2434  
2435 1 $item = new Parse::RecDescent::UncondReject($lookahead,$line,$code);
2436 1 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule($code, $line) 0 1 1
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
001
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2437 or _no_rule($code,$line);
2438 }
2439 ▶ elsif ($grammar =~ m/(?=$AUTOACTIONPATMK)/gco
Condition33%1/3
$grammar =~ /(?=$AUTOACTIONPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
100
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 table33%1/3
A and B
A= $grammar =~ /(?=$AUTOACTIONPATMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2440 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2441 0 $code;
2442 } )
2443 {
2444 0 _parse("an autoaction specifier", $aftererror,$line,$code);
2445 0 $code =~ s/\A\s*<autoaction:(.*)>\Z/$1/s;
2446 0 ▶ if ($code =~ /\A\s*[^{]|[^}]\s*\Z/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($code =~ /\A\s*[^{]|[^}]\s*\Z/) 0 0 0
2447 0 $code = "{ $code }"
2448 }
2449 $self->{_check}{itempos} =
2450 0 $code =~ /\@itempos\b|\$itempos\s*\[/;
2451 $self->{_AUTOACTION}
2452 0 = new Parse::RecDescent::Action($code,0,-$line)
2453 }
2454 ▶ elsif ($grammar =~ m/(?=$DEFERPATMK)/gco
Condition33%1/3
$grammar =~ /(?=$DEFERPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
100
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 table33%1/3
A and B
A= $grammar =~ /(?=$DEFERPATMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2455 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2456 0 $code;
2457 } )
2458 {
2459 0 _parse("a deferred action specifier", $aftererror,$line,$code);
2460 0 $code =~ s/\A\s*<defer:(.*)>\Z/$1/s;
2461 0 ▶ if ($code =~ /\A\s*[^{]|[^}]\s*\Z/)
Branch: 1 branch
BranchTrueFalseTotal
if ($code =~ /\A\s*[^{]|[^}]\s*\Z/) 0 0 0
2462 {
2463 0 $code = "{ $code }"
2464 }
2465  
2466 0 $item = new Parse::RecDescent::Directive(
2467 "push \@{\$thisparser->{deferred}}, sub $code;",
2468 $lookahead,$line,"<defer:$code>");
2469 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
2470 or _no_rule("<defer:$code>",$line);
2471  
2472 0 $self->{deferrable} = 1;
2473 }
2474 ▶ elsif ($grammar =~ m/(?=$TOKENPATMK)/gco
Condition33%1/3
$grammar =~ /(?=$TOKENPATMK)/cog and do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
!ll&&!rl&&r
100
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 table33%1/3
A and B
A= $grammar =~ /(?=$TOKENPATMK)/cogB= do { ($code) = &extract_codeblock($grammar, "{", undef, "<"); $code }
ABresult
0X0
100
111
2475 0 and do { ($code) = extract_codeblock($grammar,'{',undef,'<');
2476 0 $code;
2477 } )
2478 {
2479 0 _parse("a token constructor", $aftererror,$line,$code);
2480 0 $code =~ s/\A\s*<token:(.*)>\Z/$1/s;
2481  
2482 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
2483 0 ▶ if (!$types)
Branch: 1 branch
BranchTrueFalseTotal
if (not $types) { } 0 0 0
2484 {
2485 0 _error("Incorrect token specification: \"$@\"", $line);
2486 0 _hint("The <token:...> directive requires a list
2487 of one or more strings representing possible
2488 types of the specified token. For example:
2489 <token:NOUN,VERB>");
2490 }
2491 else
2492 {
2493 0 $item = new Parse::RecDescent::Directive(
2494 'no strict;
2495 $return = { text => $item[-1] };
2496 @{$return->{type}}{'.$code.'} = (1..'.$types.');',
2497 $lookahead,$line,"<token:$code>");
2498 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
2499 or _no_rule("<token:$code>",$line);
2500 }
2501 }
2502 elsif ($grammar =~ m/$COMMITMK/gco)
2503 {
2504 1 _parse("an commit marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2505 1 $item = new Parse::RecDescent::Directive('$commit = 1',
2506 $lookahead,$line,"<commit>");
2507 1 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("<commit>", $line) 0 1 1
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
001
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2508 or _no_rule("<commit>",$line);
2509 }
2510 elsif ($grammar =~ m/$NOCHECKMK/gco) {
2511 0 _parse("an hint request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2512 0 $::RD_CHECK = 0;
2513 }
2514 elsif ($grammar =~ m/$HINTMK/gco) {
2515 0 _parse("an hint request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2516 0 $::RD_HINT = $self->{__HINT__} = 1;
2517 }
2518 elsif ($grammar =~ m/$WARNMK/gco) {
2519 0 _parse("an warning request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2520 0 ▶ $::RD_WARN = $self->{__WARN__} = $1 ? $2+0 : 1;
Branch: 1 branch
BranchTrueFalseTotal
$1 ? : 0 0 0
2521 }
2522 elsif ($grammar =~ m/$TRACEBUILDMK/gco) {
2523 0 _parse("an grammar build trace request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2524 0 ▶ $::RD_TRACE = $1 ? $2+0 : 1;
Branch: 1 branch
BranchTrueFalseTotal
$1 ? : 0 0 0
2525 }
2526 elsif ($grammar =~ m/$TRACEPARSEMK/gco) {
2527 0 _parse("an parse trace request", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2528 0 ▶ $self->{__TRACE__} = $1 ? $2+0 : 1;
Branch: 1 branch
BranchTrueFalseTotal
$1 ? : 0 0 0
2529 }
2530 elsif ($grammar =~ m/$AUTOERRORMK/gco)
2531 {
2532 0 $commitonly = $1;
2533 0 _parse("an error marker", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2534 0 $item = new Parse::RecDescent::Error('',$lookahead,$1,$line);
2535 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
2536 or _no_rule("<error>",$line);
2537 0 $aftererror = !$commitonly;
2538 }
2539 ▶ 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
2540 0 and do { $commitonly = $1;
2541 0 ($code) = extract_bracketed($grammar,'<');
2542 0 $code })
2543 {
2544 0 _parse("an error marker", $aftererror,$line,$code);
2545 0 $code =~ /\A\s*<error\??:(.*)>\Z/s;
2546 0 $item = new Parse::RecDescent::Error($1,$lookahead,$commitonly,$line);
2547 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
2548 or _no_rule("$code",$line);
2549 0 $aftererror = !$commitonly;
2550 }
2551 0 elsif (do { $commitonly = $1;
2552 0 ($code) = extract_bracketed($grammar,'<');
2553 0 $code })
2554 {
2555 0 ▶ if ($code =~ /^<[A-Z_]+>$/)
Branch: 1 branch
BranchTrueFalseTotal
if ($code =~ /^<[A-Z_]+>$/) { } 0 0 0
2556 {
2557 0 _error("Token items are not yet
2558 supported: \"$code\"",
2559 $line);
2560 0 _hint("Items like $code that consist of angle
2561 brackets enclosing a sequence of
2562 uppercase characters will eventually
2563 be used to specify pre-lexed tokens
2564 in a grammar. That functionality is not
2565 yet implemented. Or did you misspell
2566 \"$code\"?");
2567 }
2568 else
2569 {
2570 0 _error("Untranslatable item encountered: \"$code\"",
2571 $line);
2572 0 _hint("Did you misspell \"$code\"
2573 or forget to comment it out?");
2574 }
2575 }
2576 }
2577 elsif ($grammar =~ m/$RULE/gco)
2578 {
2579 38 ▶ _parseunneg("a rule declaration", 0,
Branch: 1 branch
BranchTrueFalseTotal
&_parseunneg("a rule declaration", 0, $lookahead, $line, substr($grammar, $-[0], $+[0] - $-[0])) or next 0 38 38
2580 $lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next;
2581 38 my $rulename = $1;
2582 38 ▶ if ($rulename =~ /Replace|Extend|Precompile|PrecompiledRuntime|Save/ )
Branch: 1 branch
BranchTrueFalseTotal
if ($rulename =~ /Replace|Extend|Precompile|PrecompiledRuntime|Save/) 0 38 38
2583 {
2584 0 ▶ _warn(2,"Rule \"$rulename\" hidden by method
Branch: 1 branch
BranchTrueFalseTotal
&_warn(2, qq[Rule "$rulename" hidden by method\n Parse::RecDescent::$rulename], $line) and &_hint(qq[The rule named "$rulename" cannot be directly\n called through the Parse::RecDescent 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 Parse::RecDescent::$rulename is already defined (it\n is the standard method of all\n parsers).]) 0 0 0
2585 Parse::RecDescent::$rulename",$line)
2586 and
2587 _hint("The rule named \"$rulename\" cannot be directly
2588 called through the Parse::RecDescent object
2589 for this grammar (although it may still
2590 be used as a subrule of other rules).
2591 It can't be directly called because
2592 Parse::RecDescent::$rulename is already defined (it
2593 is the standard method of all
2594 parsers).");
2595 }
2596 38 $rule = new Parse::RecDescent::Rule($rulename,$self,$line,$replace);
2597 38 ▶ $prod->check_pending($line) if $prod;
Branch: 1 branch
BranchTrueFalseTotal
if $prod 26 12 38
2598 38 $prod = $rule->addprod( new Parse::RecDescent::Production );
2599 38 $aftererror = 0;
2600 }
2601 elsif ($grammar =~ m/$UNCOMMITPROD/gco)
2602 {
2603 1 pos($grammar)-=9;
2604 1 ▶ _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 1 1
2605 0, $lookahead, $line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next;
2606  
2607 1 ▶ $prod->check_pending($line) if $prod;
Branch: 1 branch
BranchTrueFalseTotal
if $prod 1 0 1
2608 1 $prod = new Parse::RecDescent::Production($line,1);
2609 1 ▶ $rule and $rule->addprod($prod)
Branch: 1 branch
BranchTrueFalseTotal
$rule and $rule->addprod($prod) or &_no_rule("<uncommit>", $line) 0 1 1
Condition33%1/3
$rule and $rule->addprod($prod)
!ll&&!rl&&r
001
MC/DC0%0/2
$rule and $rule->addprod($prod)
$rule $rule->addprod($prod)
Truth table33%1/3
A and B
A= $ruleB= $rule->addprod($prod)
ABresult
0X0
100
111
2610 or _no_rule("<uncommit>",$line);
2611 1 $aftererror = 0;
2612 }
2613 elsif ($grammar =~ m/$ERRORPROD/gco)
2614 {
2615 0 pos($grammar)-=6;
2616 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
2617 $lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next;
2618 0 ▶ $prod->check_pending($line) if $prod;
Branch: 1 branch
BranchTrueFalseTotal
if $prod 0 0 0
2619 0 $prod = new Parse::RecDescent::Production($line,0,1);
2620 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
2621 or _no_rule("<error>",$line);
2622 0 $aftererror = 0;
2623 }
2624 elsif ($grammar =~ m/$PROD/gco)
2625 {
2626 9 ▶ _parseunneg("a new production", 0,
Branch: 1 branch
BranchTrueFalseTotal
&_parseunneg("a new production", 0, $lookahead, $line, substr($grammar, $-[0], $+[0] - $-[0])) or next 0 9 9
2627 $lookahead,$line, substr($grammar, $-[0], $+[0] - $-[0]) ) or next;
2628 9 ▶ $rule
Branch: 1 branch
BranchTrueFalseTotal
$rule and !$prod || $prod->check_pending($line) and $prod = $rule->addprod("Parse::RecDescent::Production"->new($line)) or &_no_rule("production", $line) 0 9 9
Condition33%3/9
$rule and !$prod || $prod->check_pending($line) and $prod = $rule->addprod("Parse::RecDescent::Production"->new($line))
!ll&&!rl&&r
009
$rule and !$prod || $prod->check_pending($line)
!ll&&!rl&&r
009
not $prod or $prod->check_pending($line)
l!l&&r!l&&!r
090
MC/DC0%0/4
$rule and !$prod || $prod->check_pending($line) and $prod = $rule->addprod("Parse::RecDescent::Production"->new($line))
$rule not $prod $prod->check_pending($line) $prod = $rule->addprod("Parse::RecDescent::Production"->new($line))
Truth table16%1/6
A and not(B) or C and D
A= $ruleB= not $prodC= $prod->check_pending($line)D= $prod = $rule->addprod("Parse::RecDescent::Production"->new($line))
ABCDresult
0XXX0
100X0
11X00
10100
11X11
10111
2629 and (!$prod || $prod->check_pending($line))
2630 and $prod = $rule->addprod(new Parse::RecDescent::Production($line))
2631 or _no_rule("production",$line);
2632 9 $aftererror = 0;
2633 }
2634 elsif ($grammar =~ m/$LITERAL/gco)
2635 {
2636 36 my $literal = $1;
2637 36 ($code = $literal) =~ s/\\\\/\\/g;
2638 36 _parse("a literal terminal", $aftererror,$line,$literal);
2639 36 $item = new Parse::RecDescent::Literal($code,$lookahead,$line);
2640 36 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("literal terminal", $line, "'${literal}'") 0 36 36
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
0036
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2641 or _no_rule("literal terminal",$line,"'$literal'");
2642 }
2643 elsif ($grammar =~ m/$INTERPLIT/gco)
2644 {
2645 3 _parse("an interpolated literal terminal", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2646 3 $item = new Parse::RecDescent::InterpLit($1,$lookahead,$line);
2647 3 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("interpolated literal terminal", $line, "'$1'") 0 3 3
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
003
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2648 or _no_rule("interpolated literal terminal",$line,"'$1'");
2649 }
2650 elsif ($grammar =~ m/$TOKEN/gco)
2651 {
2652 17 _parse("a /../ pattern terminal", $aftererror,$line, substr($grammar, $-[0], $+[0] - $-[0]) );
2653 17 ▶ $item = new Parse::RecDescent::Token($1,'/',$3?$3:'',$lookahead,$line);
Branch: 1 branch
BranchTrueFalseTotal
$3 ? : 4 13 17
2654 17 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("pattern terminal", $line, "/$1/") 0 17 17
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
0017
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2655 or _no_rule("pattern terminal",$line,"/$1/");
2656 }
2657 ▶ elsif ($grammar =~ m/(?=$MTOKEN)/gco
Condition33%1/3
$grammar =~ /(?=$MTOKEN)/cog and do { ($code, undef, @components) = &extract_quotelike($grammar); $code }
!ll&&!rl&&r
2300
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 table33%1/3
A and B
A= $grammar =~ /(?=$MTOKEN)/cogB= do { ($code, undef, @components) = &extract_quotelike($grammar); $code }
ABresult
0X0
100
111
2658 0 and do { ($code, undef, @components)
2659 = extract_quotelike($grammar);
2660 0 $code }
2661 )
2662  
2663 {
2664 0 _parse("an m/../ pattern terminal", $aftererror,$line,$code);
2665 0 $item = new Parse::RecDescent::Token(@components[3,2,8],
2666 $lookahead,$line);
2667 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
2668 or _no_rule("pattern terminal",$line,$code);
2669 }
2670 ▶ elsif ($grammar =~ m/(?=$MATCHRULE)/gco
Condition66%4/6
$grammar =~ /(?=$MATCHRULE)/cog and do { ($code) = &extract_bracketed($grammar, "<"); $code } or $grammar =~ /$SUBRULE/cog and $code = $1
l!l&&r!l&&!r
2210
$grammar =~ /(?=$MATCHRULE)/cog and do { ($code) = &extract_bracketed($grammar, "<"); $code }
!ll&&!rl&&r
2102
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 table40%2/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
2671 2 and do { ($code) = extract_bracketed($grammar,'<');
2672 2 ▶ $code
Condition33%1/3
$grammar =~ /$SUBRULE/cog and $code = $1
!ll&&!rl&&r
0021
MC/DC0%0/2
$grammar =~ /$SUBRULE/cog and $code = $1
$grammar =~ /$SUBRULE/cog $code = $1
Truth table33%1/3
A and B
A= $grammar =~ /$SUBRULE/cogB= $code = $1
ABresult
0X0
100
111
2673 }
2674 or $grammar =~ m/$SUBRULE/gco
2675 and $code = $1)
2676 {
2677 23 my $name = $code;
2678 23 my $matchrule = 0;
2679 23 ▶ if (substr($name,0,1) eq '<')
Branch: 1 branch
BranchTrueFalseTotal
if (substr($name, 0, 1) eq "<") 2 21 23
2680 {
2681 2 $name =~ s/$MATCHRULE\s*//;
2682 2 $name =~ s/\s*>\Z//;
2683 2 $matchrule = 1;
2684 }
2685  
2686 # EXTRACT TRAILING ARG LIST (IF ANY)
2687  
2688 23 ▶ my ($argcode) = extract_codeblock($grammar, "[]",'') || '';
Condition100%2/2
&extract_codeblock($grammar, '[]', '') || ''
l!l
122
MC/DC100%1/1
&extract_codeblock($grammar, '[]', '') || ''
&extract_codeblock($grammar, '[]', '')
Truth table100%2/2
A
A= &extract_codeblock($grammar, '[]', '')
Aresult
11
00
2689  
2690 # EXTRACT TRAILING REPETITION SPECIFIER (IF ANY)
2691  
2692 23 ▶ if ($grammar =~ m/\G[(]/gc)
Branch: 1 branch
BranchTrueFalseTotal
if ($grammar =~ /\G[(]/cg) { } 3 20 23
2693 {
2694 3 pos($grammar)--;
2695  
2696 3 ▶ if ($grammar =~ m/$OPTIONAL/gco)
Branch: 8 branches
BranchTrueFalseTotal
if ($grammar =~ /$OPTIONAL/cog) { } 0 3 3
elsif ($grammar =~ /$ANY/cog) { } 1 2 3
elsif ($grammar =~ /$MANY/cog) { } 1 1 2
elsif ($grammar =~ /$EXACTLY/cog) { } 0 1 1
elsif ($grammar =~ /$BETWEEN/cog) { } 1 0 1
elsif ($grammar =~ /$ATLEAST/cog) { } 0 0 0
elsif ($grammar =~ /$ATMOST/cog) { } 0 0 0
elsif ($grammar =~ /$BADREP/cog) { } 0 0 0
2697 {
2698 0 _parse("an zero-or-one subrule match", $aftererror,$line,"$code$argcode($1)");
2699 0 $item = new Parse::RecDescent::Repetition($name,$1,0,1,
2700 $lookahead,$line,
2701 $self,
2702 $matchrule,
2703 $argcode);
2704 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
2705 or _no_rule("repetition",$line,"$code$argcode($1)");
2706  
2707 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
2708 }
2709 elsif ($grammar =~ m/$ANY/gco)
2710 {
2711 1 _parse("a zero-or-more subrule match", $aftererror,$line,"$code$argcode($1)");
2712 1 ▶ if ($2)
Branch: 1 branch
BranchTrueFalseTotal
if ($2) { } 0 1 1
2713 {
2714 0 my $pos = pos $grammar;
2715 0 substr($grammar,$pos,0,
2716 "<leftop='$name(s?)': $name $2 $name>(s?) ");
2717  
2718 0 pos $grammar = $pos;
2719 }
2720 else
2721 {
2722 1 $item = new Parse::RecDescent::Repetition($name,$1,0,$MAXREP,
2723 $lookahead,$line,
2724 $self,
2725 $matchrule,
2726 $argcode);
2727 1 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("repetition", $line, "$code$argcode($1)") 0 1 1
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
001
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2728 or _no_rule("repetition",$line,"$code$argcode($1)");
2729  
2730 1 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 1 0 1
Condition33%1/3
not $matchrule and $rule
!ll&&!rl&&r
001
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table33%1/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2731  
2732 1 ▶ _check_insatiable($name,$1,$grammar,$line) if $::RD_CHECK;
Branch: 1 branch
BranchTrueFalseTotal
if $main::RD_CHECK 1 0 1
2733 }
2734 }
2735 elsif ($grammar =~ m/$MANY/gco)
2736 {
2737 1 _parse("a one-or-more subrule match", $aftererror,$line,"$code$argcode($1)");
2738 1 ▶ if ($2)
Branch: 1 branch
BranchTrueFalseTotal
if ($2) { } 0 1 1
2739 {
2740 # $DB::single=1;
2741 0 my $pos = pos $grammar;
2742 0 substr($grammar,$pos,0,
2743 "<leftop='$name(s)': $name $2 $name> ");
2744  
2745 0 pos $grammar = $pos;
2746 }
2747 else
2748 {
2749 1 $item = new Parse::RecDescent::Repetition($name,$1,1,$MAXREP,
2750 $lookahead,$line,
2751 $self,
2752 $matchrule,
2753 $argcode);
2754  
2755 1 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("repetition", $line, "$code$argcode($1)") 0 1 1
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
001
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2756 or _no_rule("repetition",$line,"$code$argcode($1)");
2757  
2758 1 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 1 0 1
Condition33%1/3
not $matchrule and $rule
!ll&&!rl&&r
001
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table33%1/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2759  
2760 1 ▶ _check_insatiable($name,$1,$grammar,$line) if $::RD_CHECK;
Branch: 1 branch
BranchTrueFalseTotal
if $main::RD_CHECK 1 0 1
2761 }
2762 }
2763 elsif ($grammar =~ m/$EXACTLY/gco)
2764 {
2765 0 _parse("an exactly-$1-times subrule match", $aftererror,$line,"$code$argcode($1)");
2766 0 ▶ if ($2)
Branch: 1 branch
BranchTrueFalseTotal
if ($2) { } 0 0 0
2767 {
2768 0 my $pos = pos $grammar;
2769 0 substr($grammar,$pos,0,
2770 "<leftop='$name($1)': $name $2 $name>($1) ");
2771  
2772 0 pos $grammar = $pos;
2773 }
2774 else
2775 {
2776 0 $item = new Parse::RecDescent::Repetition($name,$1,$1,$1,
2777 $lookahead,$line,
2778 $self,
2779 $matchrule,
2780 $argcode);
2781 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
2782 or _no_rule("repetition",$line,"$code$argcode($1)");
2783  
2784 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
2785 }
2786 }
2787 elsif ($grammar =~ m/$BETWEEN/gco)
2788 {
2789 1 _parse("a $1-to-$2 subrule match", $aftererror,$line,"$code$argcode($1..$2)");
2790 1 ▶ if ($3)
Branch: 1 branch
BranchTrueFalseTotal
if ($3) { } 0 1 1
2791 {
2792 0 my $pos = pos $grammar;
2793 0 substr($grammar,$pos,0,
2794 "<leftop='$name($1..$2)': $name $3 $name>($1..$2) ");
2795  
2796 0 pos $grammar = $pos;
2797 }
2798 else
2799 {
2800 1 $item = new Parse::RecDescent::Repetition($name,"$1..$2",$1,$2,
2801 $lookahead,$line,
2802 $self,
2803 $matchrule,
2804 $argcode);
2805 1 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("repetition", $line, "$code$argcode($1..$2)") 0 1 1
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
001
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2806 or _no_rule("repetition",$line,"$code$argcode($1..$2)");
2807  
2808 1 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 1 0 1
Condition33%1/3
not $matchrule and $rule
!ll&&!rl&&r
001
MC/DC0%0/2
not $matchrule and $rule
not $matchrule $rule
Truth table33%1/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2809 }
2810 }
2811 elsif ($grammar =~ m/$ATLEAST/gco)
2812 {
2813 0 _parse("a $1-or-more subrule match", $aftererror,$line,"$code$argcode($1..)");
2814 0 ▶ if ($2)
Branch: 1 branch
BranchTrueFalseTotal
if ($2) { } 0 0 0
2815 {
2816 0 my $pos = pos $grammar;
2817 0 substr($grammar,$pos,0,
2818 "<leftop='$name($1..)': $name $2 $name>($1..) ");
2819  
2820 0 pos $grammar = $pos;
2821 }
2822 else
2823 {
2824 0 $item = new Parse::RecDescent::Repetition($name,"$1..",$1,$MAXREP,
2825 $lookahead,$line,
2826 $self,
2827 $matchrule,
2828 $argcode);
2829 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
2830 or _no_rule("repetition",$line,"$code$argcode($1..)");
2831  
2832 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
2833 0 ▶ _check_insatiable($name,"$1..",$grammar,$line) if $::RD_CHECK;
Branch: 1 branch
BranchTrueFalseTotal
if $main::RD_CHECK 0 0 0
2834 }
2835 }
2836 elsif ($grammar =~ m/$ATMOST/gco)
2837 {
2838 0 _parse("a one-to-$1 subrule match", $aftererror,$line,"$code$argcode(..$1)");
2839 0 ▶ if ($2)
Branch: 1 branch
BranchTrueFalseTotal
if ($2) { } 0 0 0
2840 {
2841 0 my $pos = pos $grammar;
2842 0 substr($grammar,$pos,0,
2843 "<leftop='$name(..$1)': $name $2 $name>(..$1) ");
2844  
2845 0 pos $grammar = $pos;
2846 }
2847 else
2848 {
2849 0 $item = new Parse::RecDescent::Repetition($name,"..$1",1,$1,
2850 $lookahead,$line,
2851 $self,
2852 $matchrule,
2853 $argcode);
2854 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
2855 or _no_rule("repetition",$line,"$code$argcode(..$1)");
2856  
2857 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
2858 }
2859 }
2860 elsif ($grammar =~ m/$BADREP/gco)
2861 {
2862 0 my $current_match = substr($grammar, $-[0], $+[0] - $-[0]);
2863 0 _parse("an subrule match with invalid repetition specifier", 0,$line, $current_match);
2864 0 _error("Incorrect specification of a repeated subrule",
2865 $line);
2866 0 _hint("Repeated subrules like \"$code$argcode$current_match\" cannot have
2867 a maximum repetition of zero, nor can they have
2868 negative components in their ranges.");
2869 }
2870 }
2871 else
2872 {
2873 20 _parse("a subrule match", $aftererror,$line,$code);
2874 20 my $desc;
2875 20 ▶ 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 20 20
2876 0 { $desc = $self->{"rules"}{$name}->expected }
2877 20 $item = new Parse::RecDescent::Subrule($name,
2878 $lookahead,
2879 $line,
2880 $desc,
2881 $matchrule,
2882 $argcode);
2883  
2884 20 ▶ $prod and $prod->additem($item)
Branch: 1 branch
BranchTrueFalseTotal
$prod and $prod->additem($item) or &_no_rule("(sub)rule", $line, $name) 0 20 20
Condition33%1/3
$prod and $prod->additem($item)
!ll&&!rl&&r
0020
MC/DC0%0/2
$prod and $prod->additem($item)
$prod $prod->additem($item)
Truth table33%1/3
A and B
A= $prodB= $prod->additem($item)
ABresult
0X0
100
111
2885 or _no_rule("(sub)rule",$line,$name);
2886  
2887 20 ▶ !$matchrule and $rule and $rule->addcall($name);
Branch: 1 branch
BranchTrueFalseTotal
not $matchrule and $rule and $rule->addcall($name) 18 2 20
Condition66%2/3
not $matchrule and $rule
!ll&&!rl&&r
2018
MC/DC50%1/2
not $matchrule and $rule
not $matchrule $rule
Truth table66%2/3
not(A) and B
A= not $matchruleB= $rule
ABresult
0X0
100
111
2888 }
2889 }
2890 elsif ($grammar =~ m/$LONECOLON/gco )
2891 {
2892 0 _error("Unexpected colon encountered", $line);
2893 0 _hint("Did you mean \"|\" (to start a new production)?
2894 Or perhaps you forgot that the colon
2895 in a rule definition must be
2896 on the same line as the rule name?");
2897 }
2898 elsif ($grammar =~ m/$ACTION/gco ) # BAD ACTION, ALREADY FAILED
2899 {
2900 0 _error("Malformed action encountered",
2901 $line);
2902 0 _hint("Did you forget the closing curly bracket
2903 or is there a syntax error in the action?");
2904 }
2905 elsif ($grammar =~ m/$OTHER/gco )
2906 {
2907 0 _error("Untranslatable item encountered: \"$1\"",
2908 $line);
2909 0 _hint("Did you misspell \"$1\"
2910 or forget to comment it out?");
2911 }
2912  
2913 163 ▶ if ($lookaheadspec =~ tr /././ > 3)
Branch: 1 branch
BranchTrueFalseTotal
if ($lookaheadspec =~ tr/.// > 3) 0 163 163
2914 {
2915 0 $lookaheadspec =~ s/\A\s+//;
2916 0 ▶ $lookahead = $lookahead<0
Branch: 1 branch
BranchTrueFalseTotal
$lookahead < 0 ? : 0 0 0
2917 ? 'a negative lookahead ("...!")'
2918 : 'a positive lookahead ("...")' ;
2919 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
2920 row.",$line)
2921 and
2922 _hint("Multiple positive and/or negative lookaheads
2923 are simply multiplied together to produce a
2924 single positive or negative lookahead
2925 specification. In this case the sequence
2926 \"$lookaheadspec\" was reduced to $lookahead.
2927 Was this your intention?");
2928 }
2929 163 $lookahead = 0;
2930 163 $lookaheadspec = "";
2931  
2932 163 $grammar =~ m/\G\s+/gc;
2933 }
2934  
2935 12 ▶ if ($must_pop_lines) {
Branch: 1 branch
BranchTrueFalseTotal
if ($must_pop_lines) 10 2 12
2936 10 pop @lines;
2937 }
2938  
2939 12 ▶ unless ($ERRORS or $isimplicit or !$::RD_CHECK)
Branch: 1 branch
BranchTrueFalseTotal
unless ($ERRORS or $isimplicit or not $main::RD_CHECK) 10 2 12
Condition66%4/6
$ERRORS or $isimplicit or not $main::RD_CHECK
l!l&&r!l&&!r
2010
$ERRORS or $isimplicit
l!l&&r!l&&!r
0210
MC/DC33%1/3
$ERRORS or $isimplicit or not $main::RD_CHECK
$ERRORS $isimplicit not $main::RD_CHECK
Truth table50%2/4
A or B or not(C)
A= $ERRORSB= $isimplicitC= not $main::RD_CHECK
ABCresult
1XX1
01X1
0011
0000
2940 {
2941 10 $self->_check_grammar();
2942 }
2943  
2944 12 ▶ unless ($ERRORS or $isimplicit or $Parse::RecDescent::compiling)
Branch: 1 branch
BranchTrueFalseTotal
unless ($ERRORS or $isimplicit or $Parse::RecDescent::compiling) 8 4 12
Condition83%5/6
$ERRORS or $isimplicit or $Parse::RecDescent::compiling
l!l&&r!l&&!r
228
$ERRORS or $isimplicit
l!l&&r!l&&!r
0210
MC/DC66%2/3
$ERRORS or $isimplicit or $Parse::RecDescent::compiling
$ERRORS $isimplicit $Parse::RecDescent::compiling
Truth table75%3/4
A or B or C
A= $ERRORSB= $isimplicitC= $Parse::RecDescent::compiling
ABCresult
1XX1
01X1
0011
0000
2945 {
2946 8 my $code = $self->_code();
2947 8 ▶ if (defined $::RD_TRACE)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $main::RD_TRACE) 0 8 8
2948 {
2949 0 ▶ my $mode = ($nextnamespace eq "namespace000002") ? '>' : '>>';
Branch: 1 branch
BranchTrueFalseTotal
$nextnamespace eq 'namespace000002' ? : 0 0 0
2950 0 print STDERR "printing code (", length($code),") to RD_TRACE\n";
2951 0 local *TRACE_FILE;
2952 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
2953 and print TRACE_FILE "my \$ERRORS;\n$code"
2954 and close TRACE_FILE;
2955 }
2956  
2957 8 ▶ unless ( eval "$code 1" )
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine __ANON__: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Subroutine BEGIN: called CC=1 SCAR=0.4
Branch: 891 branches
BranchTrueFalseTotal
unless (eval "$code 1") 0 8 8
if defined $main::RD_TRACE 0 5 5
defined $_[4] ? : 5 0 5
$#arg & 1 ? : 5 0 5
unless ($_matched or $commit) 5 0 5
if defined $main::RD_TRACE 0 5 5
if defined $main::RD_TRACE 0 5 5
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aeasy/) 4 1 5
$lastsep = $1 and "" 4 1 5
if defined $lastsep 4 0 4
if defined $lastsep 0 4 4
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 1 0 1
unless ($_matched or defined $score) 0 1 1
if defined $main::RD_TRACE 0 0 0
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 4 0 4
unless defined $return 1 4 5
if (defined $main::RD_TRACE) 0 5 5
if defined $main::RD_TRACE 1 5 6
defined $_[4] ? : 6 0 6
$#arg & 1 ? : 3 0 3
unless ($_matched or $commit) 2 1 3
if defined $main::RD_TRACE 0 5 5
if defined $main::RD_TRACE 0 5 5
unless (defined($_tok = defn($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 1 5 6
if defined $main::RD_TRACE 2 1 3
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 1 0 1
unless ($_matched or $commit) 0 2 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 2 1 3
unless (defined($_tok = typedef($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 0 3 3
if defined $main::RD_TRACE 0 4 4
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 4 4
if (defined $_itempos) 2 0 2
unless ($_matched or $commit) 4 2 6
if defined $main::RD_TRACE 0 6 6
if defined $main::RD_TRACE 2 0 2
unless (defined($_tok = fail($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 0 2 2
if defined $main::RD_TRACE 2 0 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 2 2
if (defined $_itempos) 1 1 2
unless ($_matched or defined $score) 1 1 2
if defined $main::RD_TRACE 0 1 1
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 1 1 2
unless defined $return 0 1 1
if (defined $main::RD_TRACE) 0 1 1
if defined $main::RD_TRACE 1 0 1
defined $_[4] ? : 0 0 0
$#arg & 1 ? : 0 0 0
unless ($_matched or $commit) 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/) 0 1 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 0 0
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 1 1 2
if (defined $_itempos) 0 1 1
unless ($_matched or defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 0 0 0
unless defined $return 0 1 1
if (defined $main::RD_TRACE) 0 1 1
if defined $main::RD_TRACE 1 0 1
defined $_[4] ? : 0 2 2
$#arg & 1 ? : 0 0 0
unless ($_matched or $commit) 0 2 2
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 2 0 2
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "b"; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }) 0 2 2
$lastsep = $1 and "" 0 4 4
if defined $lastsep 4 0 4
if defined $lastsep 4 0 4
if defined $main::RD_TRACE 4 0 4
if defined $main::RD_TRACE 0 4 4
if defined $main::RD_TRACE 0 4 4
if (defined $_itempos) 1 3 4
unless ($_matched or defined $score) 4 0 4
if defined $main::RD_TRACE 1 0 1
if (not defined $return and defined $score) 1 0 1
if defined $main::RD_TRACE 0 1 1
unless defined $return 0 3 3
if (defined $main::RD_TRACE) 0 3 3
if defined $main::RD_TRACE 0 3 3
defined $_[4] ? : 3 0 3
$#arg & 1 ? : 0 0 0
unless ($_matched or $commit) 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 3 3
$arg[0] ne 'meows' ? : 0 3 3
if (defined $_tok) { } 0 3 3
if defined $main::RD_TRACE 3 0 3
if defined $main::RD_TRACE 0 0 0
unless defined $_tok 0 0 0
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Acat/) 0 3 3
$lastsep = $1 and "" 0 3 3
if defined $lastsep 3 0 3
if defined $lastsep 1 3 4
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 3 3
if defined $main::RD_TRACE 0 0 0
$_noactions ? : 3 0 3
unless (defined $_tok) 0 3 3
if defined $main::RD_TRACE 0 5 5
if defined $main::RD_TRACE 5 0 5
if defined $main::RD_TRACE 5 0 5
if (defined $_itempos) 5 0 5
unless ($_matched or $commit) 0 5 5
if defined $main::RD_TRACE 0 5 5
if defined $main::RD_TRACE 4 1 5
$_noactions ? : 4 1 5
unless (defined $_tok) 4 0 4
if defined $main::RD_TRACE 4 0 4
if defined $main::RD_TRACE 0 4 4
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 0 1 1
unless ($_matched or defined $score) 0 1 1
if defined $main::RD_TRACE 0 0 0
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
unless defined $return 0 1 1
if (defined $main::RD_TRACE) 1 0 1
if defined $main::RD_TRACE 0 0 0
defined $_[4] ? : 0 0 0
$#arg & 1 ? : 0 0 0
unless ($_matched or $commit) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ad/) 0 0 0
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 1 1
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ad/) 0 0 0
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 1 1
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ad/) 0 1 1
$lastsep = $1 and "" 1 0 1
if defined $lastsep 4 1 5
if defined $lastsep 0 4 4
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 1 0 1
if (defined $_itempos) 0 1 1
unless ($_matched or defined $score) 0 1 1
if defined $main::RD_TRACE 1 0 1
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 1 0 1
unless defined $return 0 1 1
if (defined $main::RD_TRACE) 0 1 1
if defined $main::RD_TRACE 0 1 1
defined $_[4] ? : 1 0 1
$#arg & 1 ? : 0 0 0
unless ($_matched or $commit) 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Avar/) 0 1 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 1 1
if defined $lastsep 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 1 0 1
unless (defined($_tok = id($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aholds/) 1 0 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 1 1
if defined $lastsep 1 0 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 1 1
unless (defined($_tok = typename($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A\;/) 0 0 0
$lastsep = $1 and "" 0 0 0
if defined $lastsep 0 1 1
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
$_noactions ? : 0 1 1
unless (defined $_tok) 0 0 0
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if (defined $_itempos) 0 0 0
unless ($_matched or defined $score) 0 0 0
if defined $main::RD_TRACE 0 0 0
if (not defined $return and defined $score) 0 0 0
if defined $main::RD_TRACE 0 0 0
unless defined $return 0 0 0
if (defined $main::RD_TRACE) 0 0 0
if defined $main::RD_TRACE 0 0 0
defined $_[4] ? : 0 0 0
$#arg & 1 ? : 0 0 0
unless ($_matched or $commit) 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Adog/) 0 0 0
$lastsep = $1 and "" 0 0 0
if defined $lastsep 0 0 0
if defined $lastsep 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 2 2
$_noactions ? : 2 0 2
unless (defined $_tok) 2 0 2
if defined $main::RD_TRACE 2 0 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 2 2
if (defined $_itempos) 0 2 2
unless ($_matched or defined $score) 0 2 2
if defined $main::RD_TRACE 0 0 0
if (not defined $return and defined $score) 0 2 2
if defined $main::RD_TRACE 0 2 2
unless defined $return 2 0 2
if (defined $main::RD_TRACE) 0 2 2
if defined $main::RD_TRACE 0 0 0
defined $_[4] ? : 0 2 2
$#arg & 1 ? : 0 0 0
unless ($_matched or $commit) 2 0 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 5 5
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:ee)/) 5 0 5
$lastsep = $1 and "" 5 0 5
if defined $lastsep 5 0 5
if defined $lastsep 0 5 5
if defined $main::RD_TRACE 0 5 5
if defined $main::RD_TRACE 0 5 5
if defined $main::RD_TRACE 5 0 5
if (defined $_itempos) 0 0 0
unless ($_matched or defined $score) 0 0 0
if defined $main::RD_TRACE 0 0 0
if (not defined $return and defined $score) 0 5 5
if defined $main::RD_TRACE 0 5 5
unless defined $return 5 0 5
if (defined $main::RD_TRACE) 0 5 5
if defined $main::RD_TRACE 0 0 0
defined $_[4] ? : 0 5 5
$#arg & 1 ? : 0 0 0
unless ($_matched or $commit) 5 0 5
if defined $main::RD_TRACE 0 5 5
if defined $main::RD_TRACE 0 2 2
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Asome\ extension/) 2 0 2
$lastsep = $1 and "" 2 0 2
if defined $lastsep 2 0 2
if defined $lastsep 0 2 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 1 1 2
if defined $main::RD_TRACE 2 0 2
if (defined $_itempos) 1 0 1
unless ($_matched or defined $score) 1 0 1
if defined $main::RD_TRACE 0 1 1
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
unless defined $return 1 0 1
if (defined $main::RD_TRACE) 1 1 2
if defined $main::RD_TRACE 0 1 1
defined $_[4] ? : 0 1 1
$#arg & 1 ? : 0 1 1
unless ($_matched or $commit) 1 0 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
$_noactions ? : 0 0 0
unless (defined $_tok) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 2 2
if (defined $_itempos) 0 0 0
unless ($_matched or defined $score) 0 2 2
if defined $main::RD_TRACE 0 0 0
if (not defined $return and defined $score) 2 0 2
if defined $main::RD_TRACE 0 2 2
unless defined $return 0 3 3
if (defined $main::RD_TRACE) 3 0 3
if defined $main::RD_TRACE 3 0 3
defined $_[4] ? : 3 0 3
$#arg & 1 ? : 0 3 3
unless ($_matched or $commit) 0 3 3
if defined $main::RD_TRACE 1 2 3
if defined $main::RD_TRACE 0 3 3
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:[a-z] # LEADING ALPHABETIC \w* # FOLLOWED BY ALPHAS, DIGITS, OR UNDERSCORES )/xi) 1 0 1
$lastsep = $1 and "" 1 0 1
if defined $lastsep 0 1 1
if defined $lastsep 0 2 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 1 1 2
if defined $main::RD_TRACE 0 2 2
if (defined $_itempos) 0 0 0
unless ($_matched or defined $score) 0 2 2
if defined $main::RD_TRACE 0 2 2
if (not defined $return and defined $score) 2 0 2
if defined $main::RD_TRACE 1 2 3
unless defined $return 0 1 1
if (defined $main::RD_TRACE) 0 2 2
if defined $main::RD_TRACE 0 0 0
defined $_[4] ? : 2 0 2
$#arg & 1 ? : 0 2 2
unless ($_matched or $commit) 0 1 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 1 0 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ais/) 1 0 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 1 1
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if (defined $_itempos) 0 0 0
unless ($_matched or $commit) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aare/) 0 1 1
$lastsep = $1 and "" 0 0 0
if defined $lastsep 0 1 1
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if (defined $_itempos) 0 1 1
unless ($_matched or defined $score) 0 0 0
if defined $main::RD_TRACE 1 0 1
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
unless defined $return 1 0 1
if (defined $main::RD_TRACE) 1 0 1
if defined $main::RD_TRACE 1 0 1
defined $_[4] ? : 0 1 1
$#arg & 1 ? : 0 1 1
unless ($_matched or $commit) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Afred/) 0 0 0
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 1 1
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
$_noactions ? : 0 1 1
unless (defined $_tok) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 0 1 1
unless ($_matched or defined $score) 0 1 1
if defined $main::RD_TRACE 0 0 0
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 0 0 0
unless defined $return 1 0 1
if (defined $main::RD_TRACE) 0 1 1
if defined $main::RD_TRACE 0 2 2
defined $_[4] ? : 2 0 2
$#arg & 1 ? : 2 0 2
unless ($_matched or $commit) 2 0 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 2 2
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:[a-z]\w*)/i) 0 2 2
$lastsep = $1 and "" 0 2 2
if defined $lastsep 0 0 0
if defined $lastsep 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 2 2
$_noactions ? : 0 2 2
unless (defined $_tok) 0 2 2
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if (defined $_itempos) 0 2 2
unless ($_matched or defined $score) 0 2 2
if defined $main::RD_TRACE 0 2 2
if (not defined $return and defined $score) 2 0 2
if defined $main::RD_TRACE 0 0 0
unless defined $return 0 0 0
if (defined $main::RD_TRACE) 0 0 0
if defined $main::RD_TRACE 0 2 2
defined $_[4] ? : 0 2 2
$#arg & 1 ? : 0 2 2
unless ($_matched or $commit) 2 0 2
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000002::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[a-z]+)/i) 0 0 0
$lastsep = $1 and "" 0 2 2
if defined $lastsep 0 2 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 2 2
$_noactions ? : 0 2 2
unless (defined $_tok) 0 2 2
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 2 2
$_noactions ? : 0 2 2
unless (defined $_tok) 0 2 2
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 2 2
unless ($_matched or defined $score) 0 2 2
if defined $main::RD_TRACE 0 2 2
if (not defined $return and defined $score) 0 0 0
if defined $main::RD_TRACE 0 2 2
unless defined $return 0 0 0
if (defined $main::RD_TRACE) 2 0 2
if defined $main::RD_TRACE 0 2 2
defined $_[4] ? : 0 3 3
$#arg & 1 ? : 3 0 3
unless ($_matched or $commit) 3 0 3
if defined $main::RD_TRACE 3 0 3
if defined $main::RD_TRACE 0 3 3
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "("; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }) 0 3 3
$lastsep = $1 and "" 0 3 3
if defined $lastsep 0 0 0
if defined $lastsep 0 3 3
if defined $main::RD_TRACE 0 3 3
if defined $main::RD_TRACE 0 3 3
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Athe/) 0 3 3
$lastsep = $1 and "" 0 3 3
if defined $lastsep 0 3 3
if defined $lastsep 0 3 3
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 3 3
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "$main::first"; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }) 3 0 3
$lastsep = $1 and "" 0 3 3
if defined $lastsep 0 1 1
if defined $lastsep 1 0 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:te+st)/) 0 1 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 0 0
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
unless (defined($_tok = is($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
unless (defined($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::namespace000001::_alternation_1_of_production_1_of_rule_test1, 0, 100000000, $_noactions, $expectation, sub { \@arg; } , $itempos[$#itempos]))) 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
$_noactions ? : 1 0 1
unless (defined $_tok) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 1 0 1
if (defined $_itempos) 1 0 1
unless ($_matched or defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
unless defined $return 0 0 0
if (defined $main::RD_TRACE) 0 0 0
if defined $main::RD_TRACE 0 0 0
defined $_[4] ? : 0 1 1
$#arg & 1 ? : 0 1 1
unless ($_matched or $commit) 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
unless (defined($_tok = &{'Parse::RecDescent::namespace000001::' . qq[$arg{"article"}];}($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 0 0
unless (defined($_tok = &{'Parse::RecDescent::namespace000001::' . "$arg[3]";}($thisparser, $text, $repeating, $_noactions, sub { return [$arg{"sound"}]; } , $itempos[$#itempos]))) 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 0 1 1
unless ($_matched or defined $score) 0 1 1
if defined $main::RD_TRACE 0 0 0
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
unless defined $return 0 1 1
if (defined $main::RD_TRACE) 0 1 1
if defined $main::RD_TRACE 0 0 0
defined $_[4] ? : 0 1 1
$#arg & 1 ? : 0 0 0
unless ($_matched or $commit) 1 0 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 2 2
unless (defined($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::namespace000001::_alternation_1_of_production_1_of_rule_test3, 5, 10, $_noactions, $expectation, sub { \@arg; } , $itempos[$#itempos]))) 2 0 2
if defined $main::RD_TRACE 2 0 2
if defined $main::RD_TRACE 2 0 2
if defined $main::RD_TRACE 0 2 2
$_noactions ? : 0 2 2
unless (defined $_tok) 1 1 2
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 0 1 1
unless ($_matched or defined $score) 0 0 0
if defined $main::RD_TRACE 0 1 1
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
unless defined $return 1 1 2
if (defined $main::RD_TRACE) 0 1 1
if defined $main::RD_TRACE 0 1 1
defined $_[4] ? : 0 1 1
$#arg & 1 ? : 0 0 0
unless ($_matched or $commit) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/) 0 2 2
$lastsep = $1 and "" 0 0 0
if defined $lastsep 0 2 2
if defined $lastsep 0 0 0
if defined $main::RD_TRACE 2 0 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 4 4
unless (defined($_tok = b($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 4 0 4
if defined $main::RD_TRACE 4 0 4
if defined $main::RD_TRACE 4 0 4
if defined $main::RD_TRACE 0 4 4
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:c)/) 0 4 4
$lastsep = $1 and "" 4 0 4
if defined $lastsep 0 0 0
if defined $lastsep 0 0 0
if defined $main::RD_TRACE 4 0 4
if defined $main::RD_TRACE 0 4 4
if defined $main::RD_TRACE 0 4 4
$_noactions ? : 0 4 4
unless (defined $_tok) 0 4 4
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if (defined $_itempos) 0 4 4
unless ($_matched or defined $score) 0 4 4
if defined $main::RD_TRACE 4 0 4
if (not defined $return and defined $score) 0 4 4
if defined $main::RD_TRACE 0 0 0
unless defined $return 0 4 4
if (defined $main::RD_TRACE) 0 4 4
if defined $main::RD_TRACE 1 3 4
defined $_[4] ? : 4 0 4
$#arg & 1 ? : 1 0 1
unless ($_matched or $commit) 1 0 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 3 3
if (defined($_tok = name($thisparser, $text, $repeating, 1, sub { \@arg; } , $itempos[$#itempos]))) 0 3 3
if defined $main::RD_TRACE 3 0 3
if defined $main::RD_TRACE 0 3 3
if defined $main::RD_TRACE 0 0 0
unless (defined($_tok = notname($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 0 3 3
if defined $main::RD_TRACE 0 3 3
if defined $main::RD_TRACE 1 2 3
if defined $main::RD_TRACE 3 0 3
if (defined $_itempos) 1 0 1
unless ($_matched or $commit) 1 0 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 2 2
unless (defined($_tok = name($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 0 2 2
if defined $main::RD_TRACE 1 1 2
if defined $main::RD_TRACE 1 1 2
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 0 1 1
unless ($_matched or defined $score) 1 1 2
if defined $main::RD_TRACE 0 1 1
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
unless defined $return 0 0 0
if (defined $main::RD_TRACE) 0 1 1
if defined $main::RD_TRACE 0 1 1
defined $_[4] ? : 0 1 1
$#arg & 1 ? : 2 2 4
unless ($_matched or $commit) 0 2 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 2 2
unless defined $_tok 0 2 2
if defined $main::RD_TRACE 0 0 0
if (defined $_itempos) 0 0 0
unless ($_matched or $commit) 0 0 0
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 2 2
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/) 0 2 2
$lastsep = $1 and "" 0 2 2
if defined $lastsep 0 0 0
if defined $lastsep 0 2 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 1 3 4
if (defined $_tok) { } 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 1 0 1
unless defined $_tok 0 1 1
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ab/) 0 1 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 1 1
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if (defined $_tok) { } 0 1 1
if defined $main::RD_TRACE 0 4 4
if defined $main::RD_TRACE 0 0 0
unless defined $_tok 0 4 4
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ac/) 4 0 4
$lastsep = $1 and "" 0 4 4
if defined $lastsep 0 1 1
if defined $lastsep 1 0 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 1 1
$test6 && $text ? : 0 1 1
if (defined $_tok) { } 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
unless defined $_tok 0 0 0
if defined $main::RD_TRACE 0 0 0
$_noactions ? : 0 1 1
unless (defined $_tok) 0 1 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 0 0 0
unless ($_matched or $commit) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/) 1 0 1
$lastsep = $1 and "" 0 0 0
if defined $lastsep 0 0 0
if defined $lastsep 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
$_noactions ? : 0 1 1
unless (defined $_tok) 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 0 1 1
unless ($_matched) 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if (defined $_tok) { } 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
unless defined $_tok 1 0 1
if defined $main::RD_TRACE 1 0 1
$_noactions ? : 1 0 1
unless (defined $_tok) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 0 0 0
unless ($_matched or defined $score) 0 0 0
if defined $main::RD_TRACE 0 0 0
if (not defined $return and defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
unless defined $return 0 1 1
if (defined $main::RD_TRACE) 0 0 0
if defined $main::RD_TRACE 0 1 1
defined $_[4] ? : 0 1 1
$#arg & 1 ? : 0 1 1
unless ($_matched or $commit) 1 0 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ax/) 0 0 0
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 1 1
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if ($text =~ s/(\A[^\n]*\n)//) { } 0 0 0
if (defined $_tok) { } 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
unless defined $_tok 0 0 0
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:y+)/) 0 1 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 1 0 1
if defined $lastsep 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
$_noactions ? : 0 1 1
unless (defined $_tok) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
if (defined $_itempos) 0 1 1
unless ($_matched or defined $score) 0 1 1
if defined $main::RD_TRACE 0 1 1
if (not defined $return and defined $score) 0 0 0
if defined $main::RD_TRACE 0 1 1
unless defined $return 0 0 0
if (defined $main::RD_TRACE) 1 0 1
if defined $main::RD_TRACE 0 1 1
defined $_[4] ? : 0 1 1
$#arg & 1 ? : 1 0 1
unless ($_matched or $commit) 1 0 1
if defined $main::RD_TRACE 1 0 1
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/) 0 1 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 1 1
if defined $lastsep 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
unless (defined($_tok = b($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:c+)/) 0 1 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 1 0 1
if defined $lastsep 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Adddd/) 0 1 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 1 1
if defined $lastsep 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 1 1
unless (defined($_tok = e($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Af/) 1 0 1
$lastsep = $1 and "" 0 1 1
if defined $lastsep 0 2 2
if defined $lastsep 2 0 2
if defined $main::RD_TRACE 2 0 2
if defined $main::RD_TRACE 2 0 2
if defined $main::RD_TRACE 0 2 2
$_noactions ? : 0 2 2
unless (defined $_tok) 0 2 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
if (defined $_itempos) 0 0 0
unless ($_matched or defined $score) 0 2 2
if defined $main::RD_TRACE 0 2 2
if (not defined $return and defined $score) 2 0 2
if defined $main::RD_TRACE 0 2 2
unless defined $return 0 0 0
if (defined $main::RD_TRACE) 0 2 2
if defined $main::RD_TRACE 0 0 0
defined $_[4] ? : 2 0 2
$#arg & 1 ? : 0 2 2
unless ($_matched or $commit) 0 4 4
if defined $main::RD_TRACE 4 0 4
if defined $main::RD_TRACE 4 0 4
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/) 4 0 4
$lastsep = $1 and "" 0 4 4
if defined $lastsep 0 4 4
if defined $lastsep 0 4 4
if defined $main::RD_TRACE 3 1 4
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
unless (defined($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::namespace000001::d, 1, 100000000, $_noactions, $expectation, sub { \@arg; } , $itempos[$#itempos]))) 0 0 0
if defined $main::RD_TRACE 0 4 4
if defined $main::RD_TRACE 0 4 4
if defined $main::RD_TRACE 0 4 4
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:c)/) 0 0 0
$lastsep = $1 and "" 0 4 4
if defined $lastsep 0 4 4
if defined $lastsep 0 4 4
if defined $main::RD_TRACE 4 0 4
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 0 0
$_noactions ? : 0 0 0
unless (defined $_tok) 0 4 4
if defined $main::RD_TRACE 0 4 4
if defined $main::RD_TRACE 2 2 4
if defined $main::RD_TRACE 0 2 2
if (defined $_itempos) 0 2 2
unless ($_matched or defined $score) 0 2 2
if defined $main::RD_TRACE 0 2 2
if (not defined $return and defined $score) 0 2 2
if defined $main::RD_TRACE 0 0 0
unless defined $return 0 0 0
if (defined $main::RD_TRACE) 0 0 0
if defined $main::RD_TRACE 0 2 2
defined $_[4] ? : 0 2 2
$#arg & 1 ? : 0 2 2
unless ($_matched or $commit) 0 2 2
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 2 2
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Athe/) 0 2 2
$lastsep = $1 and "" 2 0 2
if defined $lastsep 2 2 4
if defined $lastsep 0 2 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 2 2
if (defined $_itempos) 0 2 2
unless ($_matched or defined $score) 0 3 3
if defined $main::RD_TRACE 3 0 3
if (not defined $return and defined $score) 3 0 3
if defined $main::RD_TRACE 3 0 3
unless defined $return 0 3 3
if (defined $main::RD_TRACE) 0 3 3
if defined $main::RD_TRACE 3 0 3
defined $_[4] ? : 3 0 3
$#arg & 1 ? : 3 0 3
unless ($_matched or $commit) 3 0 3
if defined $main::RD_TRACE 0 3 3
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Atype/) 0 0 0
$lastsep = $1 and "" 0 0 0
if defined $lastsep 3 0 3
if defined $lastsep 0 3 3
if defined $main::RD_TRACE 0 3 3
if defined $main::RD_TRACE 3 0 3
if defined $main::RD_TRACE 3 0 3
unless (defined($_tok = id($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 3 0 3
if defined $main::RD_TRACE 3 0 3
if defined $main::RD_TRACE 0 3 3
if defined $main::RD_TRACE 0 0 0
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ais/) 0 0 0
$lastsep = $1 and "" 0 0 0
if defined $lastsep 3 0 3
if defined $lastsep 0 3 3
if defined $main::RD_TRACE 0 3 3
if defined $main::RD_TRACE 2 1 3
if defined $main::RD_TRACE 3 0 3
unless (defined($_tok = typename($thisparser, $text, $repeating, $_noactions, sub { \@arg; } , $itempos[$#itempos]))) 2 0 2
if defined $main::RD_TRACE 2 0 2
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 1 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A\;/) 0 1 1
$lastsep = $1 and "" 1 0 1
if defined $lastsep 2 1 3
if defined $lastsep 0 2 2
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 1 0 1
$_noactions ? : 0 1 1
unless (defined $_tok) 0 2 2
if defined $main::RD_TRACE 2 0 2
if defined $main::RD_TRACE 2 0 2
if defined $main::RD_TRACE 2 0 2
if (defined $_itempos) 0 2 2
unless ($_matched or defined $score) 0 2 2
if defined $main::RD_TRACE 1 1 2
if (not defined $return and defined $score) 2 0 2
if defined $main::RD_TRACE 1 0 1
unless defined $return 0 1 1
if (defined $main::RD_TRACE) 0 1 1
if defined $main::RD_TRACE 0 1 1
defined $_[4] ? : 1 1 2
$#arg & 1 ? : 0 1 1
unless ($_matched or $commit) 0 1 1
if defined $main::RD_TRACE 0 1 1
if defined $main::RD_TRACE 1 0 1
unless ($text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aint/) 0 0 0
$lastsep = $1 and "" 0 0 0
if defined $lastsep 0 1 1
if defined $lastsep 0 1 1
if defined $main::RD_TRACE 0 2 2
if defined $main::RD_TRACE 0 0 0
if defined $main::RD_TRACE 0 2 2
if (defined $_itempos) 0 0 0
unless ($_matched or $commit) 2 0 2
if defined $main::RD_TRACE 0 2 2
Condition36%198/536
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
430
$_matched or $commit
l!l&&r!l&&!r
504
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aeasy/
!ll&&!rl&&r
045
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
045
$_matched or defined $score
l!l&&r!l&&!r
018
not defined $return and defined $score
!ll&&!rl&&r
302
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
002
$_matched or $commit
l!l&&r!l&&!r
401
$_matched or $commit
l!l&&r!l&&!r
041
$_matched or $commit
l!l&&r!l&&!r
104
$_matched or defined $score
l!l&&r!l&&!r
010
not defined $return and defined $score
!ll&&!rl&&r
100
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
001
$_matched or $commit
l!l&&r!l&&!r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
100
$_matched or defined $score
l!l&&r!l&&!r
010
not defined $return and defined $score
!ll&&!rl&&r
100
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
001
$_matched or $commit
l!l&&r!l&&!r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "b"; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "b"; 1 } and substr($text, 0, length $_tok) eq $_tok
!ll&&!rl&&r
100
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "b"; 1 }
!ll&&!rl&&r
010
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
000
$_matched or defined $score
l!l&&r!l&&!r
000
not defined $return and defined $score
!ll&&!rl&&r
000
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
000
$_matched or $commit
l!l&&r!l&&!r
000
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Acat/
!ll&&!rl&&r
000
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
200
$_matched or $commit
l!l&&r!l&&!r
002
$_matched or defined $score
l!l&&r!l&&!r
200
not defined $return and defined $score
!ll&&!rl&&r
020
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
50
$_matched or $commit
l!l&&r!l&&!r
005
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ad/
!ll&&!rl&&r
005
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
005
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ad/
!ll&&!rl&&r
500
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
050
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ad/
!ll&&!rl&&r
200
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
002
$_matched or defined $score
l!l&&r!l&&!r
011
not defined $return and defined $score
!ll&&!rl&&r
002
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
101
$_matched or $commit
l!l&&r!l&&!r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Avar/
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
200
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aholds/
!ll&&!rl&&r
020
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
300
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A\;/
!ll&&!rl&&r
003
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
012
$_matched or defined $score
l!l&&r!l&&!r
003
not defined $return and defined $score
!ll&&!rl&&r
201
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
020
$_matched or $commit
l!l&&r!l&&!r
100
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Adog/
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
001
$_matched or defined $score
l!l&&r!l&&!r
001
not defined $return and defined $score
!ll&&!rl&&r
100
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
010
$_matched or $commit
l!l&&r!l&&!r
010
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:ee)/
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
001
$_matched or defined $score
l!l&&r!l&&!r
100
not defined $return and defined $score
!ll&&!rl&&r
010
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
02
$_matched or $commit
l!l&&r!l&&!r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Asome\ extension/
!ll&&!rl&&r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
002
$_matched or defined $score
l!l&&r!l&&!r
002
not defined $return and defined $score
!ll&&!rl&&r
002
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
002
$_matched or $commit
l!l&&r!l&&!r
002
$_matched or defined $score
l!l&&r!l&&!r
002
not defined $return and defined $score
!ll&&!rl&&r
002
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
002
$_matched or $commit
l!l&&r!l&&!r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:[a-z] # LEADING ALPHABETIC \w* # FOLLOWED BY ALPHAS, DIGITS, OR UNDERSCORES )/xi
!ll&&!rl&&r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
002
$_matched or defined $score
l!l&&r!l&&!r
200
not defined $return and defined $score
!ll&&!rl&&r
020
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
03
$_matched or $commit
l!l&&r!l&&!r
003
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ais/
!ll&&!rl&&r
300
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
030
$_matched or $commit
l!l&&r!l&&!r
010
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aare/
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
100
$_matched or defined $score
l!l&&r!l&&!r
010
not defined $return and defined $score
!ll&&!rl&&r
010
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
001
$_matched or $commit
l!l&&r!l&&!r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Afred/
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
001
$_matched or defined $score
l!l&&r!l&&!r
001
not defined $return and defined $score
!ll&&!rl&&r
100
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
010
$_matched or $commit
l!l&&r!l&&!r
020
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:[a-z]\w*)/i
!ll&&!rl&&r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
101
$_matched or defined $score
l!l&&r!l&&!r
200
not defined $return and defined $score
!ll&&!rl&&r
020
$Parse::RecDescent::namespace000002::tracelevel || 0
l!l
04
$_matched or $commit
l!l&&r!l&&!r
004
$text =~ s/\A($Parse::RecDescent::namespace000002::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[a-z]+)/i
!ll&&!rl&&r
004
$_matched or defined $score
l!l&&r!l&&!r
004
not defined $return and defined $score
!ll&&!rl&&r
004
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
013
$_matched or $commit
l!l&&r!l&&!r
004
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "("; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }
!ll&&!rl&&r
012
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "("; 1 } and substr($text, 0, length $_tok) eq $_tok
!ll&&!rl&&r
003
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "("; 1 }
!ll&&!rl&&r
011
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
112
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Athe/
!ll&&!rl&&r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "$main::first"; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }
!ll&&!rl&&r
400
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "$main::first"; 1 } and substr($text, 0, length $_tok) eq $_tok
!ll&&!rl&&r
040
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "$main::first"; 1 }
!ll&&!rl&&r
010
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:te+st)/
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
001
$_matched or defined $score
l!l&&r!l&&!r
001
not defined $return and defined $score
!ll&&!rl&&r
001
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
100
$_matched or $commit
l!l&&r!l&&!r
100
$_matched or defined $score
l!l&&r!l&&!r
010
not defined $return and defined $score
!ll&&!rl&&r
001
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
001
$_matched or $commit
l!l&&r!l&&!r
001
$_matched or defined $score
l!l&&r!l&&!r
001
not defined $return and defined $score
!ll&&!rl&&r
001
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
001
$_matched or $commit
l!l&&r!l&&!r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
001
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:c)/
!ll&&!rl&&r
100
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
010
$_matched or defined $score
l!l&&r!l&&!r
010
not defined $return and defined $score
!ll&&!rl&&r
001
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
001
$_matched or $commit
l!l&&r!l&&!r
001
$_matched or $commit
l!l&&r!l&&!r
001
$_matched or defined $score
l!l&&r!l&&!r
001
not defined $return and defined $score
!ll&&!rl&&r
100
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
010
$_matched or $commit
l!l&&r!l&&!r
200
$_matched or $commit
l!l&&r!l&&!r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/
!ll&&!rl&&r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ab/
!ll&&!rl&&r
200
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
020
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ac/
!ll&&!rl&&r
400
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
004
$test6 and $text
!ll&&!rl&&r
004
$_matched or $commit
l!l&&r!l&&!r
004
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/
!ll&&!rl&&r
004
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
004
$_matched or defined $score
l!l&&r!l&&!r
002
not defined $return and defined $score
!ll&&!rl&&r
002
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
202
$_matched or $commit
l!l&&r!l&&!r
200
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ax/
!ll&&!rl&&r
300
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
003
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:y+)/
!ll&&!rl&&r
030
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
003
$_matched or defined $score
l!l&&r!l&&!r
003
not defined $return and defined $score
!ll&&!rl&&r
030
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
003
$_matched or $commit
l!l&&r!l&&!r
003
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/
!ll&&!rl&&r
021
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
003
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:c+)/
!ll&&!rl&&r
102
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
010
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Adddd/
!ll&&!rl&&r
020
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
002
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Af/
!ll&&!rl&&r
011
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }
!ll&&!rl&&r
101
$_matched or defined $score
l!l&&r!l&&!r
001
not defined $return and defined $score
!ll&&!rl&&r
200
$Parse::RecDescent::namespace000001::tracelevel || 0
l!l
020
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aeasy/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Aeasy/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC50%1/2
$_matched or $commit
$_matched $commit
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Aa/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/5
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "b"; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } do { $_tok = "b"; 1 } substr($text, 0, length $_tok) eq $_tok do { substr($text, 0, length $_tok) = ""; 1 }
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Acat/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Acat/
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ad/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Ad/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ad/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Ad/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ad/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Ad/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC100%1/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Avar/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Avar/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aholds/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Aholds/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A\;/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\A\;/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Adog/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Adog/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:ee)/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\A(?:ee)/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Asome\ extension/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Asome\ extension/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:[a-z] # LEADING ALPHABETIC \w* # FOLLOWED BY ALPHAS, DIGITS, OR UNDERSCORES )/xi
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\A(?:[a-z] # LEADING ALPHABETIC \w* # FOLLOWED BY ALPHAS, DIGITS, OR UNDERSCORES )/xi
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ais/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Ais/
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aare/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Aare/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Afred/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Afred/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:[a-z]\w*)/i
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\A(?:[a-z]\w*)/i
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000002::tracelevel || 0
$Parse::RecDescent::namespace000002::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/2
$text =~ s/\A($Parse::RecDescent::namespace000002::skip)/$lastsep = $1 and "";/e and $text =~ /\A(?:[a-z]+)/i
$text =~ s/\A($Parse::RecDescent::namespace000002::skip)/$lastsep = $1 and "";/e $text =~ /\A(?:[a-z]+)/i
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/5
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "("; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } do { $_tok = "("; 1 } substr($text, 0, length $_tok) eq $_tok do { substr($text, 0, length $_tok) = ""; 1 }
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Athe/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Athe/
MC/DC0%0/5
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and do { $_tok = "$main::first"; 1 } and substr($text, 0, length $_tok) eq $_tok and do { substr($text, 0, length $_tok) = ""; 1 }
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } do { $_tok = "$main::first"; 1 } substr($text, 0, length $_tok) eq $_tok do { substr($text, 0, length $_tok) = ""; 1 }
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:te+st)/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\A(?:te+st)/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Aa/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:c)/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\A(?:c)/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Aa/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ab/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Ab/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ac/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Ac/
MC/DC0%0/2
$test6 and $text
$test6 $text
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Aa/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC100%1/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Ax/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Ax/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:y+)/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\A(?:y+)/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
MC/DC0%0/2
$_matched or $commit
$_matched $commit
MC/DC33%1/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Aa/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Aa/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\A(?:c+)/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\A(?:c+)/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Adddd/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Adddd/
MC/DC0%0/3
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e and do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } and $text =~ /\Af/
$text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/e do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 } $text =~ /\Af/
MC/DC0%0/2
$_matched or defined $score
$_matched defined $score
MC/DC0%0/2
not defined $return and defined $score
not defined $return defined $score
MC/DC0%0/1
$Parse::RecDescent::namespace000001::tracelevel || 0
$Parse::RecDescent::namespace000001::tracelevel
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Aeasy/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table66%2/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Aa/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/6
A and B and C and D and E
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= do { $_tok = "b"; 1 }D= substr($text, 0, length $_tok) eq $_tokE= do { substr($text, 0, length $_tok) = ""; 1 }
ABCDEresult
0XXXX0
10XXX0
110XX0
1110X0
111100
111111
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table0%0/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Acat/
ABCresult
0XX0
10X0
1100
1111
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table25%1/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Ad/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Ad/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Ad/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table100%2/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Avar/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Aholds/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\A\;/
ABCresult
0XX0
10X0
1100
1111
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Adog/
ABCresult
0XX0
10X0
1100
1111
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\A(?:ee)/
ABCresult
0XX0
10X0
1100
1111
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table25%1/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Asome\ extension/
ABCresult
0XX0
10X0
1100
1111
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table0%0/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\A(?:[a-z] # LEADING ALPHABETIC \w* # FOLLOWED BY ALPHAS, DIGITS, OR UNDERSCORES )/xi
ABCresult
0XX0
10X0
1100
1111
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Ais/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Aare/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Afred/
ABCresult
0XX0
10X0
1100
1111
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\A(?:[a-z]\w*)/i
ABCresult
0XX0
10X0
1100
1111
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000002::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/3
A and B
A= $text =~ s/\A($Parse::RecDescent::namespace000002::skip)/$lastsep = $1 and "";/eB= $text =~ /\A(?:[a-z]+)/i
ABresult
0X0
100
111
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table0%0/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/6
A and B and C and D and E
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= do { $_tok = "("; 1 }D= substr($text, 0, length $_tok) eq $_tokE= do { substr($text, 0, length $_tok) = ""; 1 }
ABCDEresult
0XXXX0
10XXX0
110XX0
1110X0
111100
111111
Truth table25%1/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Athe/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/6
A and B and C and D and E
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= do { $_tok = "$main::first"; 1 }D= substr($text, 0, length $_tok) eq $_tokE= do { substr($text, 0, length $_tok) = ""; 1 }
ABCDEresult
0XXXX0
10XXX0
110XX0
1110X0
111100
111111
Truth table25%1/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\A(?:te+st)/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table0%0/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Aa/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\A(?:c)/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table25%1/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Aa/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Ab/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Ac/
ABCresult
0XX0
10X0
1100
1111
Truth table33%1/3
A and B
A= $test6B= $text
ABresult
0X0
100
111
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table25%1/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Aa/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table100%2/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table0%0/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Ax/
ABCresult
0XX0
10X0
1100
1111
Truth table25%1/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\A(?:y+)/
ABCresult
0XX0
10X0
1100
1111
Truth table33%1/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table33%1/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table0%0/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
Truth table33%1/3
A or B
A= $_matchedB= $commit
ABresult
1X1
011
000
Truth table50%2/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Aa/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\A(?:c+)/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Adddd/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/4
A and B and C
A= $text =~ s/\A($Parse::RecDescent::namespace000001::skip)/$lastsep = $1 and "";/eB= do { $itempos[$#itempos]{"offset"}{"from"} += length $lastsep; $itempos[$#itempos]{"line"}{"from"} = $thisline; $itempos[$#itempos]{"column"}{"from"} = $thiscolumn; 1 }C= $text =~ /\Af/
ABCresult
0XX0
10X0
1100
1111
Truth table0%0/3
A or B
A= $_matchedB= defined $score
ABresult
1X1
011
000
Truth table0%0/3
not(A) and B
A= not defined $returnB= defined $score
ABresult
0X0
100
111
Truth table50%1/2
A
A= $Parse::RecDescent::namespace000001::tracelevel
Aresult
11
00
2958 {
2959 0 _error("Internal error in generated parser code!");
2960 0 $@ =~ s/at grammar/in grammar at/;
2961 0 _hint($@);
2962 }
2963 }
2964  
2965 12 ▶ if ($ERRORS and !_verbosity("HINT"))
Branch: 1 branch
BranchTrueFalseTotal
if ($ERRORS and not &_verbosity("HINT")) 0 12 12
Condition33%1/3
$ERRORS and not &_verbosity("HINT")
!ll&&!rl&&r
1200
MC/DC0%0/2
$ERRORS and not &_verbosity("HINT")
$ERRORS not &_verbosity("HINT")
Truth table33%1/3
A and not(B)
A= $ERRORSB= not &_verbosity("HINT")
ABresult
0X0
100
111
2966 {
2967 0 ▶ local $::RD_HINT = defined $::RD_HINT ? $::RD_HINT : 1;
Branch: 1 branch
BranchTrueFalseTotal
defined $main::RD_HINT ? : 0 0 0
2968 0 _hint('Set $::RD_HINT (or -RD_HINT if you\'re using "perl -s")
2969 for hints on fixing these problems. Use $::RD_HINT = 0
2970 to disable this message.');
2971 }
2972 12 ▶ if ($ERRORS) { $ERRORS=0; return }
Branch: 1 branch
BranchTrueFalseTotal
if ($ERRORS) 0 12 12
2973 12 return $self;
2974 }
2975  
2976  
2977 sub _addstartcode($$)
2978 {
2979 6 ▶ my ($self, $code) = @_;
Subroutine _addstartcode: called CC=1 SCAR=0.0
2980 4 $code =~ s/\A\s*\{(.*)\}\Z/$1/s;
2981  
2982 1 $self->{"startcode"} .= "$code;\n";
2983 }
2984  
2985 # CHECK FOR GRAMMAR PROBLEMS....
2986  
2987 sub _check_insatiable($$$$)
2988 {
2989 6 ▶ my ($subrule,$repspec,$grammar,$line) = @_;
Subroutine _check_insatiable: called CC=14 SCAR=31.5
2990 5 pos($grammar)=pos($_[2]);
2991 2 ▶ return if $grammar =~ m/$OPTIONAL/gco || $grammar =~ m/$ANY/gco;
Branch: 1 branch
BranchTrueFalseTotal
if $grammar =~ /$OPTIONAL/cog or $grammar =~ /$ANY/cog 0 8 8
Condition66%2/3
$grammar =~ /$OPTIONAL/cog or $grammar =~ /$ANY/cog
l!l&&r!l&&!r
602
MC/DC0%0/2
$grammar =~ /$OPTIONAL/cog or $grammar =~ /$ANY/cog
$grammar =~ /$OPTIONAL/cog $grammar =~ /$ANY/cog
Truth table33%1/3
A or B
A= $grammar =~ /$OPTIONAL/cogB= $grammar =~ /$ANY/cog
ABresult
1X1
011
000
2992 2 my $min = 1;
2993 2 ▶ 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) 6 2 8
Condition50%9/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
008
$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
026
$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
008
$grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog
l!l&&r!l&&!r
404
$grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog
l!l&&r!l&&!r
042
$grammar =~ /$BETWEEN/cog and do { $min = $2; 1 }
!ll&&!rl&&r
700
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
2994 || $grammar =~ m/$EXACTLY/gco
2995 || $grammar =~ m/$ATMOST/gco
2996 0 ▶ || $grammar =~ m/$BETWEEN/gco && do { $min=$2; 1 }
Condition66%2/3
$grammar =~ /$ATLEAST/cog and do { $min = $2; 1 }
!ll&&!rl&&r
205
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
2997 5 || $grammar =~ m/$ATLEAST/gco && do { $min=$2; 1 }
2998 || $grammar =~ m/$SUBRULE(?!\s*:)/gco
2999 )
3000 {
3001 5 ▶ return unless $1 eq $subrule && $min > 0;
Branch: 1 branch
BranchTrueFalseTotal
unless $1 eq $subrule and $min > 0 6 0 6
Condition66%2/3
$1 eq $subrule and $min > 0
!ll&&!rl&&r
104
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
3002 1 my $current_match = substr($grammar, $-[0], $+[0] - $-[0]);
3003 2 ▶ _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.]) 6 0 6
3004 (almost certainly) fail.",$line)
3005 and
3006 _hint("Unless subrule \"$subrule\" performs some cunning
3007 lookahead, the repetition \"$subrule($repspec)\" will
3008 insatiably consume as many matches of \"$subrule\" as it
3009 can, leaving none to match the \"$current_match\" that follows.");
3010 }
3011 }
3012  
3013 sub _check_grammar ($)
3014 {
3015 10 ▶ my $self = shift;
Subroutine _check_grammar: called CC=15 SCAR=28.4
3016 10 my $rules = $self->{"rules"};
3017 10 my $rule;
3018 10 foreach $rule ( values %$rules )
3019 {
3020 114 ▶ next if ! $rule->{"changed"};
Branch: 1 branch
BranchTrueFalseTotal
unless $rule->{"changed"} 77 43 120
3021  
3022 # CHECK FOR UNDEFINED RULES
3023  
3024 41 my $call;
3025 38 foreach $call ( @{$rule->{"calls"}} )
3026 {
3027 18 ▶ if (!defined ${$rules}{$call}
Branch: 1 branch
BranchTrueFalseTotal
unless (defined do { $rules }->{$call} or defined &{"Parse::RecDescent::$call";}) 0 24 24
Condition66%2/3
defined do { $rules }->{$call} or defined &{"Parse::RecDescent::$call";}
l!l&&r!l&&!r
2102
MC/DC50%1/2
defined do { $rules }->{$call} or defined &{"Parse::RecDescent::$call";}
defined do { $rules }->{$call} defined &{"Parse::RecDescent::$call";}
Truth table66%2/3
A or B
A= defined do { $rules }->{$call}B= defined &{"Parse::RecDescent::$call";}
ABresult
1X1
011
000
3028 0 &&!defined &{"Parse::RecDescent::$call"})
3029 {
3030 0 ▶ if (!defined $::RD_AUTOSTUB)
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $main::RD_AUTOSTUB) { } 2 4 6
3031 {
3032 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>.]) 3 3 6
3033 used in a production.")
3034 and
3035 _hint("Will you be providing this rule
3036 later, or did you perhaps
3037 misspell \"$call\"? Otherwise
3038 it will be treated as an
3039 immediate <reject>.");
3040 2 eval "sub $self->{namespace}::$call {undef}";
3041 }
3042 else # EXPERIMENTAL
3043 {
3044 1 my $rule = qq{'$call'};
3045 2 ▶ if ($::RD_AUTOSTUB and $::RD_AUTOSTUB ne "1") {
Branch: 1 branch
BranchTrueFalseTotal
if ($main::RD_AUTOSTUB and $main::RD_AUTOSTUB ne 1) 2 0 2
Condition33%1/3
$main::RD_AUTOSTUB and $main::RD_AUTOSTUB ne 1
!ll&&!rl&&r
500
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
3046 3 $rule = $::RD_AUTOSTUB;
3047 }
3048 1 ▶ _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.]) 2 0 2
3049 and
3050 _hint("A call was made to a subrule
3051 named \"$call\", but no such
3052 rule was specified. However,
3053 since \$::RD_AUTOSTUB
3054 was defined, a rule stub
3055 ($call : $rule) was
3056 automatically created.");
3057  
3058 4 $self->_generate("$call: $rule",0,1);
3059 }
3060 }
3061 }
3062  
3063 # CHECK FOR LEFT RECURSION
3064  
3065 43 ▶ if ($rule->isleftrec($rules))
Branch: 1 branch
BranchTrueFalseTotal
if ($rule->isleftrec($rules)) 0 39 39
3066 {
3067 6 _error("Rule \"$rule->{name}\" is left-recursive.");
3068 6 _hint("Redesign the grammar so it's not left-recursive.
3069 That will probably mean you need to re-implement
3070 repetitions using the '(s)' notation.
3071 For example: \"$rule->{name}(s)\".");
3072 6 next;
3073 }
3074  
3075 # CHECK FOR PRODUCTIONS FOLLOWING EMPTY PRODUCTIONS
3076 {
3077 43 my $hasempty;
3078 my $prod;
3079 43 foreach $prod ( @{$rule->{"prods"}} ) {
3080 59 ▶ if ($hasempty) {
Branch: 1 branch
BranchTrueFalseTotal
if ($hasempty) 0 57 57
3081 6 _error("Production " . $prod->describe . " for \"$rule->{name}\"
3082 will never be reached (preceding empty production will
3083 always match first).");
3084 6 _hint("Reorder the grammar so that the empty production
3085 is last in the list or productions.");
3086 6 last;
3087 }
3088 59 ▶ $hasempty ||= $prod->isempty();
Condition66%2/3
$hasempty ||= $prod->isempty
l!l&&r!l&&!r
0553
MC/DC0%0/2
$hasempty ||= $prod->isempty
$hasempty $prod->isempty
Truth table0%0/3
A ||= B
A= $hasemptyB= $prod->isempty
ABresult
1X1
011
000
3089 }
3090 }
3091 }
3092 }
3093  
3094 # GENERATE ACTUAL PARSER CODE
3095  
3096 sub _code($)
3097 {
3098 16 ▶ my $self = shift;
Subroutine _code: called CC=4 SCAR=13.9
3099 16 require Data::Dumper;
3100 my $initial_skip = defined($self->{skip}) ?
3101 16 ▶ '$skip = ' . $self->{skip} . ';' :
Branch: 1 branch
BranchTrueFalseTotal
defined $self->{'skip'} ? : 0 14 14
3102 Data::Dumper->Dump([$skip],[qw(skip)]);
3103  
3104 16 my $code = qq!
3105 package $self->{namespace};
3106 use strict;
3107 use vars qw(\$skip \$AUTOLOAD $self->{localvars} );
3108 \@$self->{namespace}\::ISA = ();
3109 $initial_skip
3110 $self->{startcode}
3111  
3112 {
3113 local \$SIG{__WARN__} = sub {0};
3114 # PRETEND TO BE IN Parse::RecDescent NAMESPACE
3115 *$self->{namespace}::AUTOLOAD = sub
3116 {
3117 no strict 'refs';
3118 !
3119 # This generated code uses ${"AUTOLOAD"} rather than $AUTOLOAD in
3120 # order to avoid the circular reference documented here:
3121 # https://rt.perl.org/rt3/Public/Bug/Display.html?id=110248
3122 # As a result of the investigation of
3123 # https://rt.cpan.org/Ticket/Display.html?id=53710
3124 . qq!
3125 \${"AUTOLOAD"} =~ s/^$self->{namespace}/Parse::RecDescent/;
3126 goto &{\${"AUTOLOAD"}};
3127 }
3128 }
3129  
3130 !;
3131 16 $code .= "push \@$self->{namespace}\::ISA, 'Parse::RecDescent';";
3132 16 $self->{"startcode"} = '';
3133  
3134 16 my $rule;
3135 16 foreach $rule ( values %{$self->{"rules"}} )
3136 {
3137 120 ▶ if ($rule->{"changed"})
Branch: 1 branch
BranchTrueFalseTotal
if ($rule->{"changed"}) 41 77 118
3138 {
3139 43 $code .= $rule->code($self->{"namespace"},$self);
3140 43 $rule->{"changed"} = 0;
3141 }
3142 }
3143  
3144 16 return $code;
3145 }
3146  
3147  
3148 # EXECUTING A PARSE....
3149  
3150 sub AUTOLOAD # ($parser, $text; $linenum, @args)
3151 {
3152 29 ▶ croak "Could not find method: $AUTOLOAD\n" unless ref $_[0];
Subroutine AUTOLOAD: called CC=14 SCAR=27.1
Branch: 1 branch
BranchTrueFalseTotal
unless ref $_[0] 2 27 29
3153 29 ▶ my $class = ref($_[0]) || $_[0];
Condition33%1/3
ref $_[0] || $_[0]
l!l&&r!l&&!r
2400
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
3154 29 ▶ my $text = ref($_[1]) eq 'SCALAR' ? ${$_[1]} : "$_[1]";
Branch: 1 branch
BranchTrueFalseTotal
ref $_[1] eq 'SCALAR' ? : 0 25 25
3155 29 $_[0]->{lastlinenum} = _linecount($text);
3156 29 ▶ $_[0]->{lastlinenum} += ($_[2]||0) if @_ > 2;
Branch: 1 branch
BranchTrueFalseTotal
if @_ > 2 3 24 27
Condition66%2/3
$_[2] || 0
l!l
031
MC/DC0%0/1
$_[2] || 0
$_[2]
Truth table50%1/2
A
A= $_[2]
Aresult
11
00
3157 29 $_[0]->{offsetlinenum} = $_[0]->{lastlinenum};
3158 29 $_[0]->{fulltext} = $text;
3159 29 $_[0]->{fulltextlen} = length $text;
3160 29 $_[0]->{linecounter_cache} = {};
3161 29 $_[0]->{deferred} = [];
3162 29 $_[0]->{errors} = [];
3163 29 my @args = @_[3..$#_];
3164 29 ▶ my $args = sub { [ @args ] };
Subroutine __ANON__: called CC=1 SCAR=0.0
3165  
3166 29 $AUTOLOAD =~ s/$class/$_[0]->{namespace}/;
3167 3 ▶ no strict "refs";
Subroutine BEGIN: called CC=1 SCAR=0.0
3168  
3169 29 ▶ local $::RD_WARN = $::RD_WARN || $_[0]->{__WARN__};
Condition66%2/3
$main::RD_WARN || $_[0]{'__WARN__'}
l!l&&r!l&&!r
2301
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
3170 29 ▶ local $::RD_HINT = $::RD_HINT || $_[0]->{__HINT__};
Condition33%1/3
$main::RD_HINT || $_[0]{'__HINT__'}
l!l&&r!l&&!r
0024
MC/DC0%0/2
$main::RD_HINT || $_[0]{'__HINT__'}
$main::RD_HINT $_[0]{'__HINT__'}
Truth table33%1/3
A || B
A= $main::RD_HINTB= $_[0]{'__HINT__'}
ABresult
1X1
011
000
3171 29 ▶ local $::RD_TRACE = $::RD_TRACE || $_[0]->{__TRACE__};
Condition66%2/3
$main::RD_TRACE || $_[0]{'__TRACE__'}
l!l&&r!l&&!r
1023
MC/DC50%1/2
$main::RD_TRACE || $_[0]{'__TRACE__'}
$main::RD_TRACE $_[0]{'__TRACE__'}
Truth table66%2/3
A || B
A= $main::RD_TRACEB= $_[0]{'__TRACE__'}
ABresult
1X1
011
000
3172  
3173 29 ▶ croak "Unknown starting rule ($AUTOLOAD) called\n"
Branch: 1 branch
BranchTrueFalseTotal
unless defined &$Parse::RecDescent::AUTOLOAD 0 23 23
3174 unless defined &$AUTOLOAD;
3175 29 my $retval = &{$AUTOLOAD}(
3176 $_[0], # $parser
3177 $text, # $text
3178 undef, # $repeating
3179 undef, # $_noactions
3180 $args, # \@args
3181 undef, # $_itempos
3182 );
3183  
3184  
3185 29 ▶ if (defined $retval)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $retval) { } 27 0 27
3186 {
3187 29 foreach ( @{$_[0]->{deferred}} ) { &$_; }
3188 }
3189 else
3190 {
3191 6 foreach ( @{$_[0]->{errors}} ) { _error(@$_); }
3192 }
3193  
3194 29 ▶ if (ref $_[1] eq 'SCALAR') { ${$_[1]} = $text }
Branch: 1 branch
BranchTrueFalseTotal
if (ref $_[1] eq "SCALAR") 0 27 27
3195  
3196 25 $ERRORS = 0;
3197 25 return $retval;
3198 }
3199  
3200 sub _parserepeat($$$$$$$$$) # RETURNS A REF TO AN ARRAY OF MATCHES
3201 {
3202 6 ▶ my ($parser, $text, $prod, $min, $max, $_noactions, $expectation, $argcode, $_itempos) = @_;
Subroutine _parserepeat: called CC=10 SCAR=23.1
3203 8 my @tokens = ();
3204  
3205 8 my $itemposfirst;
3206 my $reps;
3207 8 ▶ for ($reps=0; $reps<$max;)
Branch: 1 branch
BranchTrueFalseTotal
if ($reps < $max) 15 5 20
3208 {
3209 19 $expectation->at($text);
3210 19 my $_savetext = $text;
3211 19 my $prevtextlen = length $text;
3212 19 my $_tok;
3213 19 ▶ if (! defined ($_tok = &$prod($parser,$text,1,$_noactions,$argcode,$_itempos)))
Branch: 1 branch
BranchTrueFalseTotal
unless (defined($_tok = &$prod($parser, $text, 1, $_noactions, $argcode, $_itempos))) 8 12 20
3214 {
3215 7 $text = $_savetext;
3216 7 last;
3217 }
3218  
3219 16 ▶ if (defined($_itempos) and !defined($itemposfirst))
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_itempos and not defined $itemposfirst) 8 9 17
Condition66%2/3
defined $_itempos and not defined $itemposfirst
!ll&&!rl&&r
0103
MC/DC50%1/2
defined $_itempos and not defined $itemposfirst
defined $_itempos not defined $itemposfirst
Truth table66%2/3
A and not(B)
A= defined $_itemposB= not defined $itemposfirst
ABresult
0X0
100
111
3220 {
3221 7 $itemposfirst = Parse::RecDescent::Production::_duplicate_itempos($_itempos);
3222 }
3223  
3224 16 ▶ push @tokens, $_tok if defined $_tok;
Branch: 1 branch
BranchTrueFalseTotal
if defined $_tok 17 0 17
3225 18 ▶ last if ++$reps >= $min and $prevtextlen == length $text;
Branch: 1 branch
BranchTrueFalseTotal
if ++$reps >= $min and $prevtextlen == length $text 1 16 17
Condition100%3/3
++$reps >= $min and $prevtextlen == length $text
!ll&&!rl&&r
671
MC/DC100%2/2
++$reps >= $min and $prevtextlen == length $text
++$reps >= $min $prevtextlen == length $text
Truth table100%3/3
A and B
A= ++$reps >= $minB= $prevtextlen == length $text
ABresult
0X0
100
111
3226 }
3227  
3228 6 ▶ do { $expectation->failed(); return undef} if $reps<$min;
Branch: 1 branch
BranchTrueFalseTotal
if ($reps < $min) 0 9 9
3229  
3230 8 ▶ if (defined $itemposfirst)
Branch: 1 branch
BranchTrueFalseTotal
if (defined $itemposfirst) 7 2 9
3231 {
3232 3 Parse::RecDescent::Production::_update_itempos($_itempos, $itemposfirst, undef, [qw(from)]);
3233 }
3234  
3235 4 $_[1] = $text;
3236 8 return [@tokens];
3237 }
3238  
3239 sub set_autoflush {
3240 4 ▶ my $orig_selected = select $_[0];
Subroutine set_autoflush: called CC=1 SCAR=0.2
Pod undocumented
3241 4 $| = 1;
3242 4 select $orig_selected;
3243 0 return;
3244 }
3245  
3246 # ERROR REPORTING....
3247  
3248 sub _write_ERROR {
3249 0 ▶ my ($errorprefix, $errortext) = @_;
Subroutine _write_ERROR: called CC=2 SCAR=7.1
3250 4 ▶ return if $errortext !~ /\S/;
Branch: 1 branch
BranchTrueFalseTotal
unless $errortext =~ /\S/ 0 4 4
3251 4 $errorprefix =~ s/\s+\Z//;
3252 5 local $^A = q{};
3253  
3254 5 formline(<<'END_FORMAT', $errorprefix, $errortext);
3255 @>>>>>>>>>>>>>>>>>>>>: ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
3256 END_FORMAT
3257 5 formline(<<'END_FORMAT', $errortext);
3258 ~~ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
3259 END_FORMAT
3260 5 print {*STDERR} $^A;
3261 }
3262  
3263 # TRACING
3264  
3265 4 my $TRACE_FORMAT = <<'END_FORMAT';
3266 @>|@|||||||||@^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<|
3267 | ~~ |^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<|
3268 END_FORMAT
3269  
3270 4 my $TRACECONTEXT_FORMAT = <<'END_FORMAT';
3271 @>|@|||||||||@ |^<<<<<<<<<<<<<<<<<<<<<<<<<<<
3272 | ~~ | |^<<<<<<<<<<<<<<<<<<<<<<<<<<<
3273 END_FORMAT
3274  
3275 sub _write_TRACE {
3276 5 ▶ my ($tracelevel, $tracerulename, $tracemsg) = @_;
Subroutine _write_TRACE: called CC=2 SCAR=7.0
3277 5 ▶ return if $tracemsg !~ /\S/;
Branch: 1 branch
BranchTrueFalseTotal
unless $tracemsg =~ /\S/ 0 1 1
3278 5 $tracemsg =~ s/\s*\Z//;
3279 5 local $^A = q{};
3280 5 my $bar = '|';
3281 5 formline($TRACE_FORMAT, $tracelevel, $tracerulename, $bar, $tracemsg, $tracemsg);
3282 5 print {*STDERR} $^A;
3283 }
3284  
3285 sub _write_TRACECONTEXT {
3286 5 ▶ my ($tracelevel, $tracerulename, $tracecontext) = @_;
Subroutine _write_TRACECONTEXT: not called CC=2 SCAR=7.0
3287 5 ▶ return if $tracecontext !~ /\S/;
Branch: 1 branch
BranchTrueFalseTotal
unless $tracecontext =~ /\S/ 0 1 1
3288 5 $tracecontext =~ s/\s*\Z//;
3289 5 local $^A = q{};
3290 5 my $bar = '|';
3291 5 formline($TRACECONTEXT_FORMAT, $tracelevel, $tracerulename, $bar, $tracecontext, $tracecontext);
3292 5 print {*STDERR} $^A;
3293 }
3294  
3295 sub _verbosity($)
3296 {
3297 176 ▶ defined $::RD_TRACE
Subroutine _verbosity: called CC=10 SCAR=29.0
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/ 172 0 172
Condition55%15/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
00173
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
00173
defined $main::RD_TRACE or defined $main::RD_HINT and $main::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/
l!l&&r!l&&!r
00173
defined $main::RD_HINT and $main::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/
!ll&&!rl&&r
17102
defined $main::RD_HINT and $main::RD_HINT
!ll&&!rl&&r
147242
defined $main::RD_WARN and $main::RD_WARN and $_[0] =~ /ERRORS|WARN/
!ll&&!rl&&r
21710
defined $main::RD_WARN and $main::RD_WARN
!ll&&!rl&&r
02171
defined $main::RD_ERRORS and $main::RD_ERRORS and $_[0] =~ /ERRORS/
!ll&&!rl&&r
21710
defined $main::RD_ERRORS and $main::RD_ERRORS
!ll&&!rl&&r
00173
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 table4%2/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
3298 or defined $::RD_HINT and $::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/
3299 or defined $::RD_WARN and $::RD_WARN and $_[0] =~ /ERRORS|WARN/
3300 or defined $::RD_ERRORS and $::RD_ERRORS and $_[0] =~ /ERRORS/
3301 }
3302  
3303 sub _error($;$)
3304 {
3305 5 ▶ $ERRORS++;
Subroutine _error: called CC=4 SCAR=14.0
3306 5 ▶ return 0 if ! _verbosity("ERRORS");
Branch: 1 branch
BranchTrueFalseTotal
unless &_verbosity("ERRORS") 4 1 5
3307 5 my $errortext = $_[0];
3308 5 ▶ my $errorprefix = "ERROR" . ($_[1] ? " (line $_[1])" : "");
Branch: 1 branch
BranchTrueFalseTotal
$_[1] ? : 0 4 4
3309 5 $errortext =~ s/\s+/ /g;
3310 5 ▶ print {*STDERR} "\n" if _verbosity("WARN");
Branch: 1 branch
BranchTrueFalseTotal
if &_verbosity("WARN") 0 4 4
3311 5 _write_ERROR($errorprefix, $errortext);
3312 5 return 1;
3313 }
3314  
3315 sub _warn($$;$)
3316 {
3317 5 ▶ return 0 unless _verbosity("WARN") && ($::RD_HINT || $_[0] >= ($::RD_WARN||1));
Subroutine _warn: called CC=7 SCAR=21.3
Branch: 1 branch
BranchTrueFalseTotal
unless &_verbosity("WARN") and $main::RD_HINT || $_[0] >= ($main::RD_WARN || 1) 2 2 4
Condition44%4/9
&_verbosity("WARN") and $main::RD_HINT || $_[0] >= ($main::RD_WARN || 1)
!ll&&!rl&&r
001
$main::RD_HINT or $_[0] >= ($main::RD_WARN || 1)
l!l&&r!l&&!r
001
$main::RD_WARN || 1
l!l
101
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/DC100%1/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 table100%2/2
A
A= $main::RD_WARN
Aresult
11
00
3318 5 my $errortext = $_[1];
3319 5 ▶ my $errorprefix = "Warning" . ($_[2] ? " (line $_[2])" : "");
Branch: 1 branch
BranchTrueFalseTotal
$_[2] ? : 0 2 2
3320 5 ▶ print {*STDERR} "\n" if _verbosity("HINT");
Branch: 1 branch
BranchTrueFalseTotal
if &_verbosity("HINT") 0 2 2
3321 5 $errortext =~ s/\s+/ /g;
3322 5 _write_ERROR($errorprefix, $errortext);
3323 5 return 1;
3324 }
3325  
3326 sub _hint($)
3327 {
3328 6 ▶ return 0 unless $::RD_HINT;
Subroutine _hint: called CC=3 SCAR=11.0
Branch: 1 branch
BranchTrueFalseTotal
unless $main::RD_HINT 1 2 3
3329 5 my $errortext = $_[0];
3330 5 ▶ my $errorprefix = "Hint" . ($_[1] ? " (line $_[1])" : "");
Branch: 1 branch
BranchTrueFalseTotal
$_[1] ? : 2 0 2
3331 5 $errortext =~ s/\s+/ /g;
3332 5 _write_ERROR($errorprefix, $errortext);
3333 5 return 1;
3334 }
3335  
3336 sub _tracemax($)
3337 {
3338 5 ▶ if (defined $::RD_TRACE
Subroutine _tracemax: called CC=5 SCAR=18.9
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]) { } 2 3 5
Condition33%3/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
200
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1
!ll&&!rl&&r
020
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/
!ll&&!rl&&r
400
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
3339 && $::RD_TRACE =~ /\d+/
3340 && $::RD_TRACE>1
3341 && $::RD_TRACE+10<length($_[0]))
3342 {
3343 5 my $count = length($_[0]) - $::RD_TRACE;
3344 5 return substr($_[0],0,$::RD_TRACE/2)
3345 . "...<$count>..."
3346 . substr($_[0],-$::RD_TRACE/2);
3347 }
3348 else
3349 {
3350 5 return substr($_[0],0,500);
3351 }
3352 }
3353  
3354 sub _tracefirst($)
3355 {
3356 5 ▶ if (defined $::RD_TRACE
Subroutine _tracefirst: called CC=5 SCAR=18.9
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 2 2
Condition44%4/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
004
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1
!ll&&!rl&&r
013
defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/
!ll&&!rl&&r
004
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
3357 && $::RD_TRACE =~ /\d+/
3358 && $::RD_TRACE>1
3359 && $::RD_TRACE+10<length($_[0]))
3360 {
3361 5 my $count = length($_[0]) - $::RD_TRACE;
3362 4 return substr($_[0],0,$::RD_TRACE) . "...<+$count>";
3363 }
3364 else
3365 {
3366 4 return substr($_[0],0,500);
3367 }
3368 }
3369  
3370 4 my $lastcontext = '';
3371 4 my $lastrulename = '';
3372 4 my $lastlevel = '';
3373  
3374 sub _trace($;$$$)
3375 {
3376 4 ▶ my $tracemsg = $_[0];
Subroutine _trace: called CC=8 SCAR=23.0
3377 1 ▶ my $tracecontext = $_[1]||$lastcontext;
Condition33%1/3
$_[1] || $lastcontext
l!l&&r!l&&!r
003
MC/DC0%0/2
$_[1] || $lastcontext
$_[1] $lastcontext
Truth table0%0/3
A || B
A= $_[1]B= $lastcontext
ABresult
1X1
011
000
3378 1 ▶ my $tracerulename = $_[2]||$lastrulename;
Condition33%1/3
$_[2] || $lastrulename
l!l&&r!l&&!r
003
MC/DC0%0/2
$_[2] || $lastrulename
$_[2] $lastrulename
Truth table33%1/3
A || B
A= $_[2]B= $lastrulename
ABresult
1X1
011
000
3379 1 ▶ my $tracelevel = $_[3]||$lastlevel;
Condition33%1/3
$_[3] || $lastlevel
l!l&&r!l&&!r
003
MC/DC0%0/2
$_[3] || $lastlevel
$_[3] $lastlevel
Truth table0%0/3
A || B
A= $_[3]B= $lastlevel
ABresult
1X1
011
000
3380 1 ▶ if ($tracerulename) { $lastrulename = $tracerulename }
Branch: 1 branch
BranchTrueFalseTotal
if ($tracerulename) 0 2 2
3381 1 ▶ if ($tracelevel) { $lastlevel = $tracelevel }
Branch: 1 branch
BranchTrueFalseTotal
if ($tracelevel) 0 2 2
3382  
3383 1 $tracecontext =~ s/\n/\\n/g;
3384 1 $tracecontext =~ s/\s+/ /g;
3385 1 $tracerulename = qq{$tracerulename};
3386 1 _write_TRACE($tracelevel, $tracerulename, $tracemsg);
3387 1 ▶ if ($tracecontext ne $lastcontext)
Branch: 1 branch
BranchTrueFalseTotal
if ($tracecontext ne $lastcontext) 0 0 0
3388 {
3389 5 ▶ if ($tracecontext)
Branch: 1 branch
BranchTrueFalseTotal
if ($tracecontext) { } 0 2 2
3390 {
3391 4 $lastcontext = _tracefirst($tracecontext);
3392 4 $tracecontext = qq{"$tracecontext"};
3393 }
3394 else
3395 {
3396 4 $tracecontext = qq{<NO TEXT LEFT>};
3397 }
3398 4 _write_TRACECONTEXT($tracelevel, $tracerulename, $tracecontext);
3399 }
3400 }
3401  
3402 sub _matchtracemessage
3403 {
3404 241 ▶ my ($self, $reject) = @_;
Subroutine _matchtracemessage: called CC=6 SCAR=17.9
3405  
3406 241 my $prefix = '';
3407 241 my $postfix = '';
3408 241 my $matched = not $reject;
3409 241 my @t = ("Matched", "Didn't match");
3410 241 ▶ if (exists $self->{lookahead} and $self->{lookahead})
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"lookahead"} and $self->{"lookahead"}) 2 237 239
Condition100%3/3
exists $self->{"lookahead"} and $self->{"lookahead"}
!ll&&!rl&&r
1311045
MC/DC100%2/2
exists $self->{"lookahead"} and $self->{"lookahead"}
exists $self->{"lookahead"} $self->{"lookahead"}
Truth table100%3/3
A and B
A= exists $self->{"lookahead"}B= $self->{"lookahead"}
ABresult
0X0
100
111
3411 {
3412 6 ▶ $postfix = $reject ? "(reject)" : "(keep)";
Branch: 1 branch
BranchTrueFalseTotal
$reject ? : 3 1 4
3413 6 $prefix = "...";
3414 6 ▶ if ($self->{lookahead} < 0)
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"lookahead"} < 0) 2 5 7
3415 {
3416 4 $prefix .= '!';
3417 4 $matched = not $matched;
3418 }
3419 }
3420 239 ▶ $prefix . ($matched ? $t[0] : $t[1]) . $postfix;
Branch: 1 branch
BranchTrueFalseTotal
$matched ? : 145 92 237
3421 }
3422  
3423 sub _parseunneg($$$$$)
3424 {
3425 50 ▶ _parse($_[0],$_[1],$_[3],$_[4]);
Subroutine _parseunneg: called CC=2 SCAR=7.0
3426 50 ▶ if ($_[2]<0)
Branch: 1 branch
BranchTrueFalseTotal
if ($_[2] < 0) 0 53 53
3427 {
3428 2 _error("Can't negate \"$_[4]\".",$_[3]);
3429 2 _hint("You can't negate $_[0]. Remove the \"...!\" before
3430 \"$_[4]\".");
3431 2 return 0;
3432 }
3433 50 return 1;
3434 }
3435  
3436 sub _parse($$$$)
3437 {
3438 173 ▶ my $what = $_[3];
Subroutine _parse: called CC=4 SCAR=14.0
3439 173 $what =~ s/^\s+//;
3440 173 ▶ if ($_[1])
Branch: 1 branch
BranchTrueFalseTotal
if ($_[1]) 0 171 171
3441 {
3442 2 ▶ _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?") 5 0 5
3443 and
3444 _hint("An unconditional <error> always causes the
3445 production containing it to immediately fail.
3446 \u$_[0] that follows an <error>
3447 will never be reached. Did you mean to use
3448 <error?> instead?");
3449 }
3450  
3451 173 ▶ return if ! _verbosity("TRACE");
Branch: 1 branch
BranchTrueFalseTotal
unless &_verbosity("TRACE") 171 5 176
3452 2 my $errortext = "Treating \"$what\" as $_[0]";
3453 5 my $errorprefix = "Parse::RecDescent";
3454 2 $errortext =~ s/\s+/ /g;
3455 2 _write_ERROR($errorprefix, $errortext);
3456 }
3457  
3458 sub _linecount($) {
3459 379 ▶ scalar substr($_[0], pos $_[0]||0) =~ tr/\n//
Subroutine _linecount: called CC=2 SCAR=6.9
Condition100%3/3
pos $_[0] || 0
l!l
1642161
MC/DC100%1/1
pos $_[0] || 0
pos $_[0]
Truth table100%2/2
A
A= pos $_[0]
Aresult
11
00
3460 }
3461  
3462  
3463 package main;
3464  
3465 3 ▶use vars qw ( $RD_ERRORS $RD_WARN $RD_HINT $RD_TRACE $RD_CHECK );
Subroutine BEGIN: called CC=1 SCAR=0.0
3466 4 $::RD_CHECK = 1;
3467 4 $::RD_ERRORS = 1;
3468 4 $::RD_WARN = 3;
3469  
3470 4 1;
3471  
3472 __END__
↑ Summary Build »