Branch Coverage

blib/lib/MarpaX/Languages/M4/Impl/Parser.pm
Criterion Covered Total %
branch 96 140 68.5


line true false branch
122 2022 2 if (@_)
124 0 2022 if (not defined $hash or ref $hash ne 'HASH' or grep {not exists $hash->{$_};} 'NULL_VALUES', 'REGISTRATIONS', 'CLOSURE_BY_SYMBOL_ID', 'CLOSURE_BY_RULE_ID', 'RESOLVE_PACKAGE', 'RESOLVE_PACKAGE_SOURCE', 'PER_PARSE_CONSTRUCTOR')
138 0 0 ref $hash eq 'HASH' ? :
178 0 0 @_ ? :
0 0 if @_ < 1
0 0 $#_ >= 0 ? :
0 0 Type::Tiny::XS::PositiveOrZeroInt($parse_level) ? :
0 0 if ($#_ >= 0)
0 0 $#_ >= 1 ? :
185 0 0 if ($nesting_limit > 0 and $parse_level > $nesting_limit)
191 164 0 @_ ? :
0 164 if @_ != 1
164 0 $#_ >= 0 ? :
164 0 Type::Tiny::XS::Str($input) ? :
164 0 if ($#_ >= 0)
206 2018 0 @_ ? :
0 2018 if @_ < 3
0 2018 if @_ > 4
2018 0 $#_ >= 0 ? :
2018 0 ref $inputRef && &Scalar::Util::reftype($inputRef) eq 'SCALAR' ? :
2018 0 if ($#_ >= 0)
2018 0 $#_ >= 1 ? :
2018 0 Type::Tiny::XS::PositiveOrZeroInt($pos) ? :
2018 0 if ($#_ >= 1)
2018 0 $#_ >= 2 ? :
2018 0 Type::Tiny::XS::AUTO::TC2($g) ? :
2018 0 if ($#_ >= 2)
1854 164 $#_ >= 3 ? :
1854 0 !defined($macro) || do { if (&Scalar::Util::blessed($macro)) { my $method = $macro->can('DOES') || $macro->can('isa'); $macro->$method('MarpaX::Languages::M4::Role::Macro'); } } ? :
1854 164 if ($#_ >= 3)
213 1 2017 if ($pos > $maxPos)
225 1854 163 if ($g == $BYMACROARGUMENTS_G)
274 1823 21586 if ($r->exhausted)
295 16948 4638 if ($g == $BYMACROARGUMENTS_G)
308 0 16948 unless ($blockOk)
314 16948 95081 if ($_ eq 'NOPARAM') { }
16933 78148 elsif ($_ eq 'LPAREN') { }
15063 63085 elsif ($_ eq 'RPAREN') { }
13194 49891 elsif ($_ eq 'COMMA') { }
315 1854 15094 if (exists $expected{'NOPARAM'} and $canCollectArguments)
319 15 1839 if (${$inputRef;} =~ /\G\(\s*\)/su)
329 1870 10990 if (exists $expected{'LPAREN'} and $canCollectArguments and do { pos ${$inputRef;} = $rc{'pos'}; 1 } and ${$inputRef;} =~ /\G\(\s*/u)
343 1869 13194 if (exists $expected{'RPAREN'} and $canCollectArguments and substr(${$inputRef;}, $rc{'pos'}, 1) eq ')')
354 9025 4169 if (exists $expected{'COMMA'} and $canCollectArguments)
357 2666 6359 if (${$inputRef;} =~ /\G,\s*/su)
367 9654 40237 if ($g == $BYMACROARGUMENTS_G and $_ eq 'QUOTEDSTRING') { }
10528 29709 elsif ($g == $BYMACROARGUMENTS_G and $_ eq 'COMMENT') { }
371 4068 5586 if ($isQuotedString)
382 5 10523 if ($isComment)
403 4 29705 unless ($blockOk)
406 11089 18616 if ($isToken)
416 0 21582 if (&Undef()->check($lexeme))
422 3089 18493 if ($lexeme eq 'WORD')
425 2441 648 if ($self->parser_isMacro(${$inputRef;}, $rc{'pos'}, $maxPos, $lexemeValue, $lexemeLength, \$thisMacro, \$lparenPos)) { }
441 1854 587 if ($lparenPos >= 0)
449 0 1853 if (&Undef()->check($dict))
471 15 2423 if (&M4Macro()->check($lexemeValue)) { }
513 16277 2879 if ($self->_parse_level > 0) { }
554 1856 154 if ($self->_parse_level > 0) { }
565 1855 1 if (defined $registrations)
569 1 1855 unless (defined $registrations)
572 1 1855 if (&Undef()->check($valueRef) or &Undef()->check(${$valueRef;}))
594 1 4 if ($self->_parse_level > 0) { }
595 1 0 if ($self->_parse_level == 1 and $self->impl_eoi)
612 164 0 @_ ? :
0 164 if @_ != 1
164 0 $#_ >= 0 ? :
164 0 ref $inputRef && &Scalar::Util::reftype($inputRef) eq 'SCALAR' ? :
164 0 if ($#_ >= 0)
615 160 1 unless (&Undef()->check($rc))