Branch Coverage

blib/lib/MarpaX/G4/Parser.pm
Criterion Covered Total %
branch 65 156 41.6


line true false branch
274 6 230 unless defined $value
275 217 13 if ref $value eq "ARRAY" and scalar @$value == 0
276 0 13 if ref $value eq "HASH" and scalar keys %$value == 0
293 0 0 if defined $structure
300 519 0 unless $MarpaX::G4::Actions::trace
308 0 11 if (ref $value eq "ARRAY")
310 0 0 if scalar @$value != 1
321 60 218 if scalar @items == 1
336 0 0 if ref $value eq "ARRAY"
363 0 0 if (ref $comment[0] eq 'HASH') { }
368 0 0 unless exists $entry->{'comment'}
376 0 0 if (scalar @comment > 1)
396 1 1 if (isNotNull($items[0]))
421 0 1 if $MarpaX::G4::Actions::ignoreredirect and not $items[0] =~ /skip|hidden/i
426 1 0 if (scalar @redirlist > 0)
429 0 1 if scalar @$_ > 0
440 6 0 if ref $tokenlist eq "HASH" and exists $tokenlist->{'rightsides'}
442 0 6 if ref $tokenlist ne "ARRAY"
449 2 4 if (scalar @$tokenlist <= 1) { }
466 0 6 if (isNotNull($comment1) or isNotNull($comment2))
469 0 0 if ref $comment1 eq ""
470 0 0 if ref $comment1 eq "HASH"
471 0 0 if (ref $comment2 eq "ARRAY")
475 0 0 if ref $cl eq "HASH"
478 0 0 if scalar @$commentlines > 0
481 6 0 if exists $self->{'grammarstate'}
495 1 7 if ref $rightsides eq "HASH" and exists $rightsides->{'redirect'}
498 8 0 if ref $rightsides eq "HASH" and exists $rightsides->{'rightsides'}
502 0 8 if (isNotNull($comment))
504 0 0 if (ref $comment eq 'HASH' and exists $comment->{'comment'}) { }
0 0 elsif (ref $comment eq 'ARRAY') { }
513 0 0 if (ref $cl eq 'HASH' and exists $cl->{'comment'}) { }
530 0 8 if isNotNull($retclause)
531 3 5 if exists $self->{'grammarstate'}
547 13 9 if (ref $rhs eq 'ARRAY' and scalar @$rhs > 0) { }
558 0 22 if (isNotNull($comment1) or isNotNull($comment2))
561 0 0 if ref $comment1 eq ""
562 0 0 if ref $comment1 eq "HASH"
563 0 0 if (ref $comment2 eq "ARRAY")
567 0 0 if ref $cl eq "HASH"
570 0 0 if scalar @$commentlines > 0
573 1 21 if ref $endrhs eq "HASH" and exists $endrhs->{'redirect'}
575 0 22 if (ref $endrhs eq "ARRAY" and isNotNull($endrhs))
583 8 14 if (ref $endrhs eq "HASH" and exists $endrhs->{'rightsides'})
587 0 8 if ref $rightsides ne "ARRAY"
588 0 8 if ref $rhs ne "HASH" or not exists $rhs->{'rightsides'}
589 0 8 if ref $rhs->{'rightsides'} ne "ARRAY"
595 1 21 if defined $redirect
605 1 13 if isNotNull($opt_redir)
618 0 8 if (ref $rhs eq "ARRAY" and scalar @$rhs == 0)
624 0 8 if ref $rhs ne "HASH"
626 0 8 if exists $rhs->{'redirect'} and not exists $rhs->{'rightsides'}
628 0 8 unless (exists $rhs->{'rightsides'})
635 0 8 if ref $rightsides ne "ARRAY"
638 0 8 if ref $firstrhs ne "HASH"
639 0 8 unless exists $firstrhs->{'rhs'}
651 7 15 if scalar @items > 1
661 0 31 if ref $rulecomponent eq "ARRAY" and scalar @$rulecomponent == 1
663 7 24 if (isNotNull($opt_card))
665 0 7 if (ref $rulecomponent ne "HASH")
667 0 0 if (ref $rulecomponent eq '') { }
679 0 31 if (isNotNull($opt_assoc))
681 0 0 if (ref $rulecomponent ne "HASH")
683 0 0 if (ref $rulecomponent eq '') { }
715 0 0 if ref $rhs eq "ARRAY" and scalar @$rhs == 1
718 0 0 if ref $grouplist eq "HASH"
719 0 0 if ref $grouplist eq "ARRAY"
722 0 0 if isNotNull($opt_colon)
723 0 0 if isNotNull($opt_bar)
742 0 0 if ref $element eq "HASH" and scalar keys %$element == 1
754 0 0 if (ref $element eq "HASH" and scalar keys %$element == 1)
768 0 5 if isNotNull($items[0])
783 21 0 if ref $token eq "HASH" and scalar keys %$token == 1 and exists $token->{'token'}
785 3 19 if isNotNull($opt_card)
793 3 0 if ref $token eq "HASH" and scalar keys %$token == 1 and exists $token->{'token'}
795 0 3 if isNotNull($opt_card)
804 1 34 if isNotNull($opt_neg)
822 0 21 if isNotNull($items[0])