Condition Coverage

blib/lib/CodeGen/Cpppp/CParser.pm
Criterion Covered Total %
condition 20 33 60.6


and 3 conditions

line !l l&&!r l&&r condition
15 0 0 0 @_ == 1 && ref $_[0] eq 'HASH'
62 0 20 88 !defined($tok_lim) || --$tok_lim >= 0 and $$textref =~ / \G (?> \s* ) \K # ignore whitespace (?| # single-line comment \/\/ ( [^\r\n]* ) (?{ $_type = "comment"; }) # block comment | \/\* ( (?: [^*]+ | \* (?=[^\/]) )* ) ( \*\/ | \Z ) (?{ $_type = "comment"; $_error = "Reached end of input looking for '*\/'" unless $2; }) # Preprocessor directive | \# \s* ( (?: [^\r\n\\]+ | \\ \r? \n | \\ (?=[^\r\n]) )* ) (?{ $_type = "directive"; }) # string literal | " (?{ ""; }) (?| ([^"\\]+) (?{ $^R . $1; }) | \\x ([0-9A-Fa-f]+) (?{ $^R . chr(hex $1); }) | \\ ([0-9]{1,3}) (?{ $^R . chr(oct $1); }) | \\ \r?\n | \\ (.) (?{ $^R . ($named_escape{$1} \/\/ $1); }) )* ( " | \Z ) (?{ $_type = "string"; $_value = $^R; $_error = "Reached end of input looking for '\"'" unless $2; }) # character constant | ' (?| ([^'\\]) (?{ $1; }) | \\x ([0-9A-Fa-f]+) (?{ chr hex $1; }) | \\ ([0-9]{1,3}) (?{ chr oct $1; }) | \\ (.) (?{ $named_escape{$1} \/\/ $1; }) ) ( '? ) (?{ $_type = "char"; $_value = $^R; $_error = "Unterminated character constant" unless $2; }) # identifier | ( [A-Za-z_] \w* ) (?{ $_type = $keywords{$1} ? "keyword" : "ident"; }) # real number | ( (?: [0-9]+ \. [0-9]* | \. [0-9]+ ) (?: e -? [0-9]+ )? [lLfF]? ) (?{ $_type = "real"; }) | # integer (?| 0x([A-Fa-f0-9]+) (?{ $_value = hex $1; }) | 0([0-7]+) (?{ $_value = oct $1; }) | ([0-9]+) ) [uU]?[lL]* (?{ $_type = "integer"; }) | # punctuation and operators ( \+\+ | -- | -> | \+=? | -=? | \*=? | \/=? | %=? | >>=? | >=? | <<=? | <=? | \&\&=? | \&=? | \|\|=? | \|=? | \^=? | ==? | !=? | \? | ~ | [\[\]\(\)\{\};,.:] ) (?{ $_type = $1; }) | # all other characters (.) (?{ $_type = "unknown"; $_error = "parse error"; }) ) /cgux
132 74 0 14 $_type eq 'integer' || $_type eq 'real' and @tokens
74 10 4 $_type eq 'integer' || $_type eq 'real' and @tokens and $tokens[-1][0] eq "-"
10 2 2 $_type eq 'integer' || $_type eq 'real' and @tokens and $tokens[-1][0] eq "-" and @tokens == 1 || !$tokens_before_infix_minus{$tokens[-2]->type}

or 3 conditions

line l !l&&r !l&&!r condition
62 108 0 0 !defined($tok_lim) || --$tok_lim >= 0
86 1 1 0 $named_escape{$1} // $1
96 0 0 0 $named_escape{$1} // $1
130 8 75 5 $_value // $1
132 14 0 74 $_type eq 'integer' || $_type eq 'real'
0 2 2 @tokens == 1 || !$tokens_before_infix_minus{$tokens[-2]->type}