Branch Coverage

blib/lib/MarpaX/Languages/C/AST.pm
Criterion Covered Total %
branch 85 174 48.8


line true false branch
28 0 1 if (ref $logInfo ne 'ARRAY')
44 0 1 if ($opts{'lexemeCallback'})
45 0 0 if (ref $opts{'lexemeCallback'} ne 'ARRAY')
48 0 0 unless (@{$opts{'lexemeCallback'};})
51 0 0 if (ref $opts{'lexemeCallback'}[0] ne 'CODE')
59 0 1 if (ref $typedef ne 'ARRAY')
64 0 1 if (ref $enum ne 'ARRAY')
113 0 0 $MarpaX::Languages::C::AST::log->is_debug ? :
132 0 1 if ($@)
138 0 0 if (not $@) { }
182 0 18 if ($@)
205 0 0 unless defined $start
220 1 0 if (defined $valuep) { }
227 0 1 if (defined $valuep)
228 0 0 unless ($arrayOfValuesb)
229 0 0 if ($$self{'_lazy'}) { }
236 0 0 if (defined $valuep)
241 0 1 if ($arrayOfValuesb) { }
257 5 23 if (%events)
259 0 5 if ($MarpaX::Languages::C::AST::log->is_debug)
275 23 2 if (defined $lexeme)
288 0 16 if (exists $$lexemeHashp{'name'} and exists $$self{'_logInfo'}{$$lexemeHashp{'name'}} || exists $$self{'_logInfo'}{'__ALL__'})
289 0 0 if ($MarpaX::Languages::C::AST::log->is_info)
300 0 18 if ($$self{'_lexemeCallback'} and exists $$lexemeHashp{'name'})
325 17 2 if ($pos > $[)
339 0 0 if ($MarpaX::Languages::C::AST::log->is_debug)
345 0 0 if (length $lastChar > 0)
364 0 0 if ($directive eq 'line' or $directive =~ /^\d+$/)
388 16 2 if (exists $$lexemeHashp{'name'})
394 15 1 if (defined $$self{'_callbackEvents'}->topic_fired_data('fileScopeDeclarator'))
395 0 15 if ($$self{'_callbackEvents'}->topic_fired_data('fileScopeDeclarator')->[0] == -1) { }
1 14 elsif ($$self{'_callbackEvents'}->topic_fired_data('fileScopeDeclarator')->[0] == 1) { }
399 0 0 if ($is_debug)
408 1 0 if ($$lexemeHashp{'name'} ne 'COMMA' and $$lexemeHashp{'name'} ne 'SEMICOLON' and $$lexemeHashp{'name'} ne 'EQUAL')
411 0 1 if ($is_debug)
419 0 1 if ($is_debug)
426 1 15 if ($$lexemeHashp{'name'} eq 'LCURLY_SCOPE' or $$lexemeHashp{'name'} eq 'LPAREN_SCOPE') { }
2 13 elsif ($$lexemeHashp{'name'} eq 'RCURLY_SCOPE' or $$lexemeHashp{'name'} eq 'RPAREN_SCOPE') { }
427 0 1 if ($is_debug)
432 2 0 if ($$self{'_scope'}->parseScopeLevel == 1) { }
433 0 2 if ($is_debug)
438 0 0 if ($is_debug)
444 0 13 if ($is_debug)
447 1 12 if ($$self{'_scope'}->parseScopeLevel == 1 and $$self{'_scope'}->parseDelay)
448 1 0 if (defined $$self{'_callbackEvents'}->topic_fired_data('reenterScope') and $$self{'_callbackEvents'}->topic_fired_data('reenterScope')->[0]) { }
450 0 1 if ($is_debug)
454 0 1 if ($is_debug)
459 0 0 if ($is_debug)
477 16 2 if (exists $$lexemeHashp{'name'})
483 8 8 if ($$lexemeHashp{'name'} eq 'ANY_ASM')
484 0 8 if ($is_debug)
489 1 7 if (${$$self{'_sourcep'};} =~ /\G$WS_RE*\(/ or ${$$self{'_sourcep'};} =~ /\G$WS_RE+\w+$WS_RE*\(/) { }
2 5 elsif (${$$self{'_sourcep'};} =~ /\G$WS_RE*\{/) { }
5 0 elsif (${$$self{'_sourcep'};} =~ /\G[^\n]*/) { }
495 0 1 if ($is_debug)
503 0 2 if ($is_debug)
514 3 89 if (${$$self{'_sourcep'};} =~ /\G$ASM_COMMENT_RE/) { }
3 86 elsif (${$$self{'_sourcep'};} =~ /\GCOMMENT\s+([^\s])\s+/) { }
0 86 elsif (${$$self{'_sourcep'};} =~ /\G['"]/) { }
520 0 3 if ($is_debug)
531 3 0 if (${$$self{'_sourcep'};} =~ /\G(?:$MarpaX::Languages::C::AST::RE{'delimited'}{join $;, -'delim', $delimiter})[^\n]*/) { }
534 0 3 if ($is_debug)
549 0 0 if (${$$self{'_sourcep'};} =~ /\G(?:$MarpaX::Languages::C::AST::RE{'delimited'}{join $;, -'delim', $delimiter})/) { }
552 0 0 if ($is_debug)
563 0 86 if ($c eq '{') { }
2 84 elsif ($c eq '}') { }
570 2 84 if ($remain == 0)
575 0 2 if ($remain != 0) { }
579 0 2 if ($MarpaX::Languages::C::AST::log->is_debug)
582 0 2 unless (defined $$self{'_impl'}->lexeme_read($newlexeme, $pos, length $found, $found))
600 0 5 if ($MarpaX::Languages::C::AST::log->is_debug)
603 0 5 unless (defined $$self{'_impl'}->lexeme_read($newlexeme, $pos, length $found, $found))
628 16 2 if (exists $$lexemeHashp{'name'})
632 3 13 if ($$lexemeHashp{'name'} eq 'TYPEDEF_NAME' or $$lexemeHashp{'name'} eq 'ENUMERATION_CONSTANT' or $$lexemeHashp{'name'} eq 'IDENTIFIER')
639 0 3 if ($$self{'_lazy'}) { }
640 0 0 if ($$self{'_scope'}->parseIsTypedef($$lexemeHashp{'value'})) { }
0 0 elsif ($$self{'_scope'}->parseIsEnum($$lexemeHashp{'value'})) { }
649 0 3 if (exists $terminals_expected{'TYPEDEF_NAME'} and $$self{'_scope'}->parseIsTypedef($$lexemeHashp{'value'})) { }
0 3 elsif (exists $terminals_expected{'ENUMERATION_CONSTANT'} and $$self{'_scope'}->parseIsEnum($$lexemeHashp{'value'})) { }
3 0 elsif (exists $terminals_expected{'IDENTIFIER'}) { }
662 0 3 unless (@alternatives)
672 3 0 if (defined $$self{'_impl'}->lexeme_alternative($_, $$lexemeHashp{'value'})) { }
674 0 3 if ($is_debug)
677 3 0 if ($_ eq 'IDENTIFIER')
681 0 0 if ($is_debug)
686 0 3 unless (@alternativesOk)
690 0 3 unless (defined $$self{'_impl'}->lexeme_complete($$lexemeHashp{'start'}, $$lexemeHashp{'length'}))