Branch Coverage

pperl/Marpa/R2/Perl.pm
Criterion Covered Total %
branch 122 198 61.6


line true false branch
861 0 5 if ref $args ne "HASH"
865 5 1 if ($named_arg eq "closures")
868 0 5 if ($closure_type ne "HASH" and $closure_type ne "CODE")
873 1 0 if ($named_arg eq "embedded")
874 1 0 $args->{$named_arg} ? :
880 0 5 unless defined $gen_closure
893 1010 1130 if $line eq ""
894 0 1130 unless $line =~ / [:][:][=] .* [;] \s* \z /msx
902 645 2110 if ($rhs_desc =~ /\A ['] ([^']*) ['] \z/msx)
904 0 645 unless defined $rhs_name
913 0 3885 if ($symbol =~ /\W/msx)
921 452 678 if ($closure_type eq "CODE")
924 452 0 if (defined $action)
929 678 452 if ($closure_type eq "HASH")
932 0 678 if (defined $action)
937 692 438 defined $rule_name ? :
938 15 1115 if (defined $rank)
951 1 4 if ($embedded)
975 1 4 $embedded ? :
989 0 27 if (not defined $token_name) { }
995 0 27 if (defined $length and $length != 1)
1000 27 0 unless $logical_filename
1009 27 0 if ($Marpa::R2::Perl::PARSER->{'embedded'})
1011 23 4 if $Marpa::R2::Perl::PARSER->{'in_prefix'}
1022 0 0 if ($Marpa::R2::Perl::PARSER->{'embedded'})
1024 0 0 if $Marpa::R2::Perl::PARSER->{'in_prefix'}
1061 0 0 if (grep {$_ eq $arg;} @RECCE_NAMED_ARGUMENTS)
1111 135 1011 if ($parser->{'in_prefix'})
1112 135 0 if (grep {$_ eq "target_start_marker";} @{$$parser{"terminals_expected"};})
1123 0 0 if $event_type eq "MARPA_EVENT_EXHAUSTED"
1124 0 0 if ($event_type eq "MARPA_EVENT_EARLEY_ITEM_THRESHOLD")
1126 0 0 unless say {$recce->[9];} "Earley item count ($value) exceeds warning threshold"
1144 498 997 if $PPI_type eq "PPI::Token::Whitespace"
1145 0 997 if $PPI_type eq "PPI::Token::Comment"
1146 0 997 if $PPI_type eq "PPI::Token::Pod"
1150 72 925 if ($PPI_type eq "PPI::Token::Symbol")
1153 0 72 unless (defined $sigil)
1159 0 72 unless (defined $symbol_name)
1164 0 72 unless defined $recce->alternative($symbol_name, \$sigil)
1167 0 72 unless defined $recce->alternative("WORD", \$word)
1173 30 895 if ($PPI_type eq "PPI::Token::Cast")
1178 0 30 unless defined $perl_type
1179 30 0 if (defined $perl_type)
1181 0 30 unless defined $recce->alternative($perl_type, \$cast)
1186 0 30 unless defined $token_found
1190 138 757 if ($PPI_type eq "PPI::Token::Word")
1193 93 45 if ($perl_type eq "WORD")
1196 284 88 if defined $recce->alternative($type, \$content, 1)
1200 4 89 unless $token_found
1204 0 45 if ($perl_type eq "PHASER")
1205 0 0 unless defined $recce->alternative("SUB")
1208 0 0 unless defined $recce->alternative("WORD", \$content)
1213 0 45 unless defined $recce->alternative($perl_type, \$content)
1219 2 755 if ($PPI_type eq "PPI::Token::Label")
1221 1 1 unless defined $recce->alternative("LABEL", \$content)
1227 171 584 if ($PPI_type eq "PPI::Token::Operator")
1230 0 171 unless (defined $perl_type)
1235 3 168 if ($perl_type eq "PLUS")
1244 3 3 unless grep {$_ eq $type;} @{$expected_tokens;}
1246 0 3 unless defined $recce->alternative($type, \$content, 1)
1249 0 3 unless defined $token_found
1254 0 168 if ($perl_type eq "MINUS")
1263 0 0 unless grep {$_ eq $type;} @{$expected_tokens;}
1265 0 0 unless defined $recce->alternative($type, \$content, 1)
1268 0 0 unless defined $token_found
1272 20 148 unless defined $recce->alternative($perl_type, \$content)
1278 351 233 if ($PPI_type eq "PPI::Token::Structure")
1282 0 351 unless (defined $perl_type)
1287 81 270 if ($perl_type eq "RCURLY")
1288 81 0 if (!defined($Marpa::R2::Perl::LAST_PERL_TYPE) || $Marpa::R2::Perl::LAST_PERL_TYPE ne 'SEMI' and grep {"SEMI" eq $_;} @{$expected_tokens;})
1294 0 81 unless defined $recce->alternative("SEMI", \";")
1298 0 81 unless defined $recce->alternative($perl_type, \$content)
1303 81 189 if ($perl_type eq "LCURLY")
1306 74 7 if (not defined $Marpa::R2::Perl::LAST_PERL_TYPE or $Marpa::R2::Perl::LAST_PERL_TYPE ne "DO")
1313 53 102 unless grep {$type eq $_;} @{$expected_tokens;}
1315 0 102 unless defined $recce->alternative($type, \$content, 1)
1318 0 81 unless defined $token_found
1322 0 189 unless defined $recce->alternative($perl_type, \$content)
1328 7 54 if ($PPI_type eq "PPI::Token::Number" or $PPI_type eq "PPI::Token::Number::Float" or $PPI_type eq "PPI::Token::Magic" or $PPI_type eq "PPI::Token::Number::Version")
1336 187 171 if defined $recce->alternative($type, \$content, 1)
1339 2 177 unless $token_found
1344 0 0 if ($PPI_type eq "PPI::Token::Quote::Single" or $PPI_type eq "PPI::Token::Quote::Double" or $PPI_type eq "PPI::Token::Quote::Literal" or $PPI_type eq "PPI::Token::Quote::Interpolate" or $PPI_type eq "PPI::Token::HereDoc" or $PPI_type eq "PPI::Token::Regexp::Match" or $PPI_type eq "PPI::Token::Regexp::Substitute" or $PPI_type eq "PPI::Token::Regexp::Transliterate" or $PPI_type eq "PPI::Token::Magic")
1355 0 54 unless defined $recce->alternative("THING", \$content)
1361 0 0 if ($PPI_type eq "PPI::Token::QuoteLike::Words")
1364 0 0 unless defined $recce->alternative("THING", \$words)
1402 0 5 unless $parser->{'embedded'}
1416 0 293 if ($recce->exhausted)
1418 0 0 unless defined $last_end_marker_ix
1426 4 289 if ($Marpa::R2::Internal::Perl::EVAL_ERROR)
1427 0 4 if $Marpa::R2::Internal::Perl::EVAL_ERROR ne "TOKEN_NOT_ACCEPTED\n"
1431 15 274 if (grep {$_ eq "non_trivial_target_end";} @{$terminals_expected;})
1437 15 274 if (defined $last_end_marker_earleme and grep {$_ eq "target_end_marker";} @{$terminals_expected;})
1450 1 4 unless defined $last_end_marker_earleme
1455 1021 179 if $dot_position >= 0
1456 175 4 if ($grammar->rule($rule_id))[0] ne "prog"
1458 0 4 if $start > $origin
1460 0 4 unless defined $start
1471 4 13 if (wantarray)
1491 0 0 $file_name ? :