Branch Coverage

blib/lib/Business/UDC/Parser.pm
Criterion Covered Total %
branch 90 106 84.9


line true false branch
21 3 81 unless (defined $input)
24 2 79 unless ($input =~ /\S/)
46 2 44 if ($state->{'pos'} < @{$state->{'tokens'};})
62 208 5 if ($tok->{'type'} ne "WHITESPACE")
75 190 18 if ($tok->{'type'} ne "APOS_AUX")
78 13 5 if (substr($tok->{'value'}, 0, 1) eq "'")
94 198 5 if ($tok->{'type'} ne "AUX_TIME")
99 2 3 if ($left ne "\"")
107 1 2 if ($right ne "\"")
120 120 80 if ($tok->{'type'} ne "NUMBER")
123 78 2 unless ($tok->{'value'} =~ /,/)
136 1 4 if (substr($value, 0, 2) eq "''")
146 1 2 if (substr($value, -2) eq "''")
163 0 4 unless ($tok)
166 0 4 if ($tok->{'type'} ne $type)
180 6 27 unless (is_operator_token($tok->{'type'}))
183 0 27 unless (is_valid_operator($tok->{'value'}))
188 1 26 unless my $next = _peek($state)
192 2 24 if $next->{'type'} ne "LBRACK" and not can_follow_operator($op->{'value'}, $next->{'type'})
195 4 20 if ($op->{'value'} eq "/" and $right->{'type'} eq "APOS_AUX")
197 2 2 unless ($from)
222 8 12 if ($op->{'value'} eq "/")
228 0 1 unless (can_follow_primary($next_tok->{'type'}, $next_tok->{'value'}, $current_type, $current_value))
247 1 7 if (@modifiers)
263 0 83 unless my $tok = _peek($state)
266 4 79 if ($tok->{'type'} eq "LBRACK")
270 70 9 if (is_primary_token($tok->{'type'}))
278 3 6 if ($tok->{'type'} eq "ALPHA_SPEC")
285 1 5 if ($tok->{'type'} eq "APOS_AUX")
301 0 4 unless ($end)
306 0 4 if ($end->{'type'} ne "RBRACK")
323 13 60 if ($primary->{'type'} ne "NUMBER")
325 4 9 if ($next and $next->{'type'} eq "NUMBER")
326 1 3 unless (can_precede_number($primary->{'type'}, $primary->{'value'}))
327 1 0 defined $primary->{'value'} ? :
338 0 1 if (&any(sub { $tok->{'type'} eq $_; } , 'APOS_AUX', 'AUX_DOT')) { }
0 1 elsif (not can_follow_primary($tok->{'type'}, $tok->{'value'}, $current_type, $current_value)) { }
339 0 0 unless ($has_main_number)
384 1 80 if ($tok->{'type'} eq "LBRACK")
395 4 76 if ($tok->{'type'} eq "AUX_DOT")
396 1 3 unless ($allow_dot_aux)
400 32 47 unless (can_follow_primary($tok->{'type'}, $tok->{'value'}, $current_type, $current_value))
430 0 24 unless my $tok = _peek($state)
433 2 22 if ($op eq "/" and $tok->{'type'} eq "AUX_DOT")
441 1 21 if ($op eq "/" and $tok->{'type'} eq "FORM")
449 4 17 if ($op eq "/" and $tok->{'type'} eq "APOS_AUX")
469 185 13 if ($tok->{'type'} ne "ALPHA_SPEC")
485 3 10 if ($value =~ s/^(\s+)//)
496 0 4 unless (defined $node)
499 1 3 if ($node->{'type'} ne "TERM")
502 1 2 unless ($node->{'modifiers'} and @{$node->{'modifiers'};})
508 0 2 if (not defined $last or $last->{'type'} ne "APOS_AUX")
520 0 2 if (exists $node->{'prefixes'})