Condition Coverage

blib/lib/Treex/Core/ScenarioParser.pm
Criterion Covered Total %
condition 169 831 20.3


and 3 conditions

line !l l&&!r l&&r condition
134 0 0 0 $replace and not $self->{'changed'}
491 0 0 0 @items == 1 and ref($items[0]) =~ /\AParse::RecDescent::_Runtime::Error/
0 0 0 @items == 1 and ref($items[0]) =~ /\AParse::RecDescent::_Runtime::Error/ and $items[0]{'commitonly'}
0 0 0 @items == 1 and ($items[0]->describe || '') =~ /<rulevar|<autoscore/
0 0 0 @items and ref($items[0]) =~ /\AParse::RecDescent::_Runtime::UncondReject/ || ($items[0]->describe || '') =~ /<autoscore/
774 0 0 0 $parser->{'_AUTOACTION'} and defined $item
0 0 0 $parser->{'_AUTOACTION'} and defined $item and not $item->isa('Parse::RecDescent::_Runtime::Action')
0 0 0 $parser->{'_AUTOTREE'} and defined $item
0 0 0 $parser->{'_AUTOTREE'} and defined $item and not $item->isa('Parse::RecDescent::_Runtime::Action')
789 0 0 0 $i == 1 and $item->isterminal
1069 0 0 0 not eval "no strict;\n local \$SIG{__WARN__} = sub {0};\n '' =~ m$ldel$pattern$rdel$mod" and $@
1980 0 0 0 $grammar =~ /(?=$ACTION)/cog and do {
0 0 0 $grammar =~ /(?=$IMPLICITSUBRULE)/cog and do {
0 0 0 $grammar =~ /(?=$MTOKEN)/cog and do {
0 0 0 $grammar =~ /(?=$MATCHRULE)/cog and do {
0 0 0 $grammar =~ /$SUBRULE/cog and $code = $1
2004 0 0 0 $prod and $prod->additem($item)
2062 0 0 0 $grammar =~ /(?=$CONDREJECTMK)/cog and do {
0 0 0 $grammar =~ /(?=$SCOREMK)/cog and do {
0 0 0 $grammar =~ /(?=$AUTOSCOREMK)/cog and do {
0 0 0 $grammar =~ /(?=$RESYNCPATMK)/cog and do {
0 0 0 $grammar =~ /(?=$SKIPMK)/cog and do {
0 0 0 $grammar =~ /(?=$RULEVARPATMK)/cog and do {
0 0 0 $grammar =~ /(?=$AUTOACTIONPATMK)/cog and do {
0 0 0 $grammar =~ /(?=$DEFERPATMK)/cog and do {
0 0 0 $grammar =~ /(?=$TOKENPATMK)/cog and do {
0 0 0 $grammar =~ /(?=$MSGERRORMK)/cog and do {
2073 0 0 0 $prod and $prod->additem($item)
2085 0 0 0 $prod and $prod->additem($item)
2095 0 0 0 $prod and $prod->additem($item)
2104 0 0 0 $prod and $prod->additem($item)
2137 0 0 0 $base and not $base =~ /::$/
2161 0 0 0 $prod and $prod->additem($item)
2173 0 0 0 $prod and $prod->additem($item)
2182 0 0 0 $prod and $prod->addscore($1, $lookahead, $line)
2193 0 0 0 $rule and $rule->addautoscore($1, $self)
2197 0 0 0 $prod and $prod->additem($item)
2206 0 0 0 $prod and $prod->additem($item)
2218 0 0 0 $prod and $prod->additem($item)
2231 0 0 0 $prod and $prod->additem($item)
2246 0 0 0 $rule and $rule->addvar($1, $self)
2250 0 0 0 $prod and $prod->additem($item)
2283 0 0 0 $prod and $prod->additem($item)
2312 0 0 0 $prod and $prod->additem($item)
2321 0 0 0 $prod and $prod->additem($item)
2349 0 0 0 $prod and $prod->additem($item)
2361 0 0 0 $prod and $prod->additem($item)
2423 0 0 0 $rule and $rule->addprod($prod)
2434 0 0 0 $rule and $rule->addprod($prod)
2442 0 0 0 $rule and !$prod || $prod->check_pending($line)
0 0 0 $rule and !$prod || $prod->check_pending($line) and $prod = $rule->addprod('Parse::RecDescent::_Runtime::Production'->new($line))
2454 0 0 0 $prod and $prod->additem($item)
2461 0 0 0 $prod and $prod->additem($item)
2468 0 0 0 $prod and $prod->additem($item)
2481 0 0 0 $prod and $prod->additem($item)
2518 0 0 0 $prod and $prod->additem($item)
2521 0 0 0 not $matchrule and $rule
2541 0 0 0 $prod and $prod->additem($item)
2544 0 0 0 not $matchrule and $rule
2569 0 0 0 $prod and $prod->additem($item)
2572 0 0 0 not $matchrule and $rule
2595 0 0 0 $prod and $prod->additem($item)
2598 0 0 0 not $matchrule and $rule
2619 0 0 0 $prod and $prod->additem($item)
2622 0 0 0 not $matchrule and $rule
2643 0 0 0 $prod and $prod->additem($item)
2646 0 0 0 not $matchrule and $rule
2668 0 0 0 $prod and $prod->additem($item)
2671 0 0 0 not $matchrule and $rule
2698 0 0 0 $prod and $prod->additem($item)
2701 0 0 0 not $matchrule and $rule
2766 0 0 0 open TRACE_FILE, $mode, 'RD_TRACE' and print TRACE_FILE "my \$ERRORS;\n$code"
2779 0 0 0 $ERRORS and not &_verbosity('HINT')
2807 0 0 0 $grammar =~ /$BETWEEN/cog and do {
0 0 0 $grammar =~ /$ATLEAST/cog and do {
2815 0 0 0 $1 eq $subrule and $min > 0
2859 0 0 0 $main::RD_AUTOSTUB and $main::RD_AUTOSTUB ne '1'
3030 0 0 0 defined $_itempos and not defined $itemposfirst
3036 0 0 0 ++$reps >= $min and $prevtextlen == length $text
3108 0 0 0 defined $main::RD_ERRORS and $main::RD_ERRORS
0 0 0 defined $main::RD_ERRORS and $main::RD_ERRORS and $_[0] =~ /ERRORS/
0 0 0 defined $main::RD_HINT and $main::RD_HINT
0 0 0 defined $main::RD_HINT and $main::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/
0 0 0 defined $main::RD_WARN and $main::RD_WARN
0 0 0 defined $main::RD_WARN and $main::RD_WARN and $_[0] =~ /ERRORS|WARN/
3128 0 0 0 &_verbosity('WARN') and $main::RD_HINT || $_[0] >= ($main::RD_WARN || 1)
3149 0 0 0 defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/
0 0 0 defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1
0 0 0 defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1 and $main::RD_TRACE + 10 < length $_[0]
3167 0 0 0 defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/
0 0 0 defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1
0 0 0 defined $main::RD_TRACE and $main::RD_TRACE =~ /\d+/ and $main::RD_TRACE > 1 and $main::RD_TRACE + 10 < length $_[0]
3221 0 0 0 exists $self->{'lookahead'} and $self->{'lookahead'}
3384 0 0 46 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:\S+)/
3531 46 0 0 not defined $return and defined $score
3803 64 0 0 not defined $return and defined $score
3926 0 96 126 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A\=/
4048 126 0 0 not defined $return and defined $score
4401 82 0 0 not defined $return and defined $score
4493 0 0 0 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:)/
4537 0 0 0 not defined $return and defined $score
4629 0 444 180 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:[A-Z]\w*::)/
4737 0 252 192 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:[A-Z]\w*)/
4803 372 0 0 not defined $return and defined $score
4895 0 8 8 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:\\")/
4961 8 0 0 not defined $return and defined $score
5053 0 0 24 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:[^"]*[^"\\])/
5097 0 24 0 not defined $return and defined $score
5189 0 0 152 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:[^']*[^'\\])/
5233 0 152 0 not defined $return and defined $score
5325 0 258 0 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ m[\A(?:/\S+\.scen)]
5403 0 253 5 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ m[\A(?:[^/#]\S+\.scen)]
5475 5 0 0 not defined $return and defined $score
5567 0 0 24 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:^\Z)/
5611 0 24 0 not defined $return and defined $score
5703 0 0 0 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:[^`]+)/
5769 0 0 0 not defined $return and defined $score
5861 0 0 0 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:\s+)/
5927 0 0 0 not defined $return and defined $score
6019 0 440 4 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:::)/
6196 192 0 0 not defined $return and defined $score
6320 0 0 5 defined $result and ref $result eq 'ARRAY'
6443 0 0 0 defined $result and ref $result eq 'ARRAY'
6535 0 0 0 defined $result and ref $result eq 'ARRAY'
6780 132 0 0 not defined $return and defined $score
6872 0 113 21 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:#[^\n]*)/
6938 21 0 0 not defined $return and defined $score
7129 24 0 0 not defined $return and defined $score
7401 58 0 0 not defined $return and defined $score
7493 0 506 0 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:Scen::)/
7589 0 0 0 not defined $return and defined $score
7681 0 54 72 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:')/
7738 0 0 72 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:')/
7816 0 46 8 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:")/
7873 0 0 8 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:")/
7951 0 46 0 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:`)/
8008 0 0 0 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:`)/
8155 126 0 0 not defined $return and defined $score
8435 8 72 0 not defined $return and defined $score
8527 0 72 8 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:\\')/
8593 8 0 0 not defined $return and defined $score
8685 0 158 222 $text =~ s/\A($Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::skip)/'' if $lastsep = $1;/e and $text =~ /\A(?:\w+)/
8751 222 0 0 not defined $return and defined $score
9031 8 8 0 not defined $return and defined $score

or 2 conditions

line l !l condition
491 0 0 $items[0]->describe || ''
1322 0 0 $_[4] || undef
0 0 $_[6] || undef
1437 0 0 $argcode || undef
2066 0 0 $2 || ''
2090 0 0 $1 || '{}'
2502 0 0 &extract_codeblock($grammar, '[]', '') || ''
2967 19 0 $_[2] || 0
3270 0 26 pos $_[0] || 0
3323 46 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
3562 191 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
3834 380 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
4079 134 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
4432 0 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
4568 624 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
4834 16 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
4992 24 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
5128 152 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
5264 258 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
5506 24 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
5642 0 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
5800 0 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
5958 444 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
6227 258 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
6811 134 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
6969 5 21 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
7160 84 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
7432 506 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
7620 126 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
8186 80 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
8466 80 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
8624 380 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0
8782 16 0 $Parse::RecDescent::_Runtime::Treex::Core::ScenarioParser::tracelevel || 0

or 3 conditions

line l !l&&r !l&&!r condition
125 0 0 0 ref $_[0] || $_[0]
205 0 0 0 not $next or &_contains($next, @expected)
441 0 0 0 ref $self || $self
491 0 0 0 ref($items[0]) =~ /\AParse::RecDescent::_Runtime::UncondReject/ || ($items[0]->describe || '') =~ /<autoscore/
842 0 0 0 ref $_[0] || $_[0]
896 0 0 0 ref $_[0] || $_[0]
952 0 0 0 ref $_[0] || $_[0]
996 0 0 0 ref $_[0] || $_[0]
1051 0 0 0 ref $_[0] || $_[0]
1157 0 0 0 ref $_[0] || $_[0]
1230 0 0 0 ref $_[0] || $_[0]
1302 0 0 0 $_[0]{'implicit'} || $_[0]{'subrule'}
1321 0 0 0 ref $_[0] || $_[0]
1392 0 0 0 $_[0]{'expected'} || $_[0]{'subrule'}
1408 0 0 0 ref $self || $self
1608 0 0 0 $self->{'name'} || $self->{'hashname'}
1643 0 0 0 $self->{'name'} || $self->{'hashname'}
1696 0 0 0 $self->{'name'} || $self->{'hashname'}
1740 0 0 0 not $self->{'unexpected'} or $self->{'unexpected'} =~ /\A\s*\Z/s
1776 0 0 0 ref $_[0] || $_[0]
1958 0 0 0 $grammar =~ /\$$_/ || $self->{'_check'}{'itempos'}
1980 0 0 0 $grammar =~ /(?=$MATCHRULE)/cog and do {
2296 0 0 0 eval 'no strict; local $SIG{__WARN__} = sub {0}; my @arr=(' . $code . '); @arr' || ()
2442 0 0 0 !$prod || $prod->check_pending($line)
2753 0 0 0 $ERRORS or $isimplicit
0 0 0 $ERRORS or $isimplicit or not $main::RD_CHECK
2758 0 0 0 $ERRORS or $isimplicit
0 0 0 $ERRORS or $isimplicit or $Parse::RecDescent::_Runtime::compiling
2805 0 0 0 $grammar =~ /$OPTIONAL/cog or $grammar =~ /$ANY/cog
2807 0 0 0 $grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog
0 0 0 $grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog
0 0 0 $grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog or $grammar =~ /$BETWEEN/cog and do {
0 0 0 $grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog or $grammar =~ /$BETWEEN/cog and do {
0 0 0 $grammar =~ /$MANY/cog or $grammar =~ /$EXACTLY/cog or $grammar =~ /$ATMOST/cog or $grammar =~ /$BETWEEN/cog and do {
2841 0 0 0 defined do {
2902 0 0 0 $hasempty ||= $prod->isempty
2964 26 0 0 ref $_[0] || $_[0]
2980 26 0 0 $main::RD_WARN || $_[0]{'__WARN__'}
2981 0 0 26 $main::RD_HINT || $_[0]{'__HINT__'}
2982 0 0 26 $main::RD_TRACE || $_[0]{'__TRACE__'}
3108 0 0 0 defined $main::RD_TRACE or defined $main::RD_HINT and $main::RD_HINT and $_[0] =~ /ERRORS|WARN|HINT/
0 0 0 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/
3128 0 0 0 $main::RD_HINT || $_[0] >= ($main::RD_WARN || 1)
3188 0 0 0 $_[1] || $lastcontext
3189 0 0 0 $_[2] || $lastrulename
3190 0 0 0 $_[3] || $lastlevel
3360 0 0 46 $_matched or $commit
3438 46 0 0 $_matched or $commit
3519 46 0 0 $_matched or defined $score
3599 0 0 191 $_matched or $commit
3710 2 0 189 $_matched or $commit
3791 64 0 127 $_matched or defined $score
3871 0 0 380 $_matched or $commit
4036 126 0 254 $_matched or defined $score
4116 0 0 134 $_matched or $commit
4227 10 0 124 $_matched or $commit
4308 71 0 63 $_matched or $commit
4389 82 0 52 $_matched or defined $score
4469 0 0 0 $_matched or $commit
4525 0 0 0 $_matched or defined $score
4605 0 0 624 $_matched or $commit
4713 180 0 444 $_matched or $commit
4791 372 0 252 $_matched or defined $score
4871 0 0 16 $_matched or $commit
4949 8 0 8 $_matched or defined $score
5029 0 0 24 $_matched or $commit
5085 24 0 0 $_matched or defined $score
5165 0 0 152 $_matched or $commit
5221 152 0 0 $_matched or defined $score
5301 0 0 258 $_matched or $commit
5379 0 0 258 $_matched or $commit
5463 5 0 253 $_matched or defined $score
5543 0 0 24 $_matched or $commit
5599 24 0 0 $_matched or defined $score
5679 0 0 0 $_matched or $commit
5757 0 0 0 $_matched or defined $score
5837 0 0 0 $_matched or $commit
5915 0 0 0 $_matched or defined $score
5995 0 0 444 $_matched or $commit
6103 4 0 440 $_matched or $commit
6184 192 0 252 $_matched or defined $score
6264 0 0 258 $_matched or $commit
6353 5 0 253 $_matched or $commit
6476 5 0 253 $_matched or $commit
6568 5 0 253 $_matched or $commit
6683 67 0 191 $_matched or $commit
6768 132 0 126 $_matched or defined $score
6848 0 0 134 $_matched or $commit
6926 21 0 113 $_matched or defined $score
7006 0 0 26 $_matched or $commit
7117 24 0 2 $_matched or defined $score
7197 0 0 84 $_matched or $commit
7308 34 0 50 $_matched or $commit
7389 58 0 26 $_matched or defined $score
7469 0 0 506 $_matched or $commit
7577 0 0 506 $_matched or defined $score
7657 0 0 126 $_matched or $commit
7792 72 0 54 $_matched or $commit
7927 80 0 46 $_matched or $commit
8062 80 0 46 $_matched or $commit
8143 126 0 0 $_matched or defined $score
8223 0 0 80 $_matched or $commit
8364 8 0 72 $_matched or $commit
8423 80 0 0 $_matched or defined $score
8503 0 0 80 $_matched or $commit
8581 8 0 72 $_matched or defined $score
8661 0 0 380 $_matched or $commit
8739 222 0 158 $_matched or defined $score
8819 0 0 16 $_matched or $commit
8960 8 0 8 $_matched or $commit
9019 16 0 0 $_matched or defined $score