Branch Coverage

blib/lib/DBIx/MyParsePP/Lexer.pm
Criterion Covered Total %
branch 125 284 44.0


line true false branch
104 66 0 if (exists $args{$_[$i * 2]}) { }
117 11 0 unless defined $$lexer[5]
118 11 0 unless defined $$lexer[6]
119 10 1 unless defined $$lexer[3]
121 9 2 unless defined $$lexer[2]
122 11 0 unless defined $$lexer[1]
130 0 11 if ($@)
178 9 723 if ($res[0] eq '0' and $res[1] eq '0') { }
208 530 255 if ($state eq 'MY_LEX_OPERATOR_OR_IDENT' or $state eq 'MY_LEX_START')
213 105 810 if $c == 10
219 0 785 if ($state eq 'MY_LEX_ESCAPE')
220 0 0 if $lexer->yyGet == 78
223 106 679 if ($state eq 'MY_LEX_ESCAPE' or $state eq 'MY_LEX_CHAR' or $state eq 'MY_LEX_SKIP') { }
4 675 elsif ($state eq 'MY_LEX_IDENT_OR_NCHAR') { }
0 675 elsif ($state eq 'MY_LEX_IDENT_OR_HEX') { }
4 671 elsif ($state eq 'MY_LEX_IDENT_OR_BIN') { }
228 0 0 if ($c == 45 and $lexer->yyPeek == 45 and $lexer->my_isspace($lexer->yyPeek2) || $lexer->my_iscntrl($lexer->yyPeek2))
243 78 28 if $c != 41
245 38 68 if ($c == 44) { }
0 136 elsif ($c == 63 and not $$ident_map[$lexer->yyPeek]) { }
252 4 0 if ($lexer->yyPeek != 39)
259 0 0 unless (defined($lex_str = $lexer->get_text))
265 0 0 if ($lexer->yyPeek == 39)
270 0 4 if ($lexer->yyPeek == 39)
276 298 377 if ($state eq 'MY_LEX_IDENT_OR_HEX' or $state eq 'MY_LEX_IDENT_OR_BIN' or $state eq 'MY_LEX_IDENT') { }
107 270 elsif ($state eq 'MY_LEX_IDENT_SEP') { }
27 243 elsif ($state eq 'MY_LEX_NUMBER_IDENT') { }
286 0 298 $result_state & 128 ? :
291 0 298 if ($$lexer[3] & 8)
295 103 195 if ($start == $$lexer[7] and $c == 46 and $$ident_map[$lexer->yyPeek]) { }
303 138 57 if (@token = $lexer->find_keyword($length, $c == 40))
311 0 160 if (substr($lex_str, 0, 1) eq '_' and exists $$DBIx::MyParsePP::Charsets::charsets{substr $lex_str, 1})
323 2 105 unless ($$ident_map[$lexer->yyPeek])
329 27 0 unless ($$ident_map[$c])
333 0 0 if ($c == 101 or $c == 69) { }
0 0 elsif ($c == 120 and $$lexer[7] - $$lexer[8] == 2 and substr($string, $$lexer[8], 1) eq '0') { }
0 0 elsif ($c == 98 and $$lexer[7] - $$lexer[8] == 2 and substr($string, $$lexer[8], 1) eq '0') { }
334 0 0 if ($lexer->my_isdigit($lexer->yyPeek) or $c = $lexer->yyGet == 43 or $c == 45)
339 0 0 if ($lexer->my_isdigit($lexer->yyPeek))
353 0 0 if ($$lexer[7] - $$lexer[8] >= 4 and not $$ident_map[$c])
365 0 0 if ($$lexer[7] - $$lexer[8] >= 4 and not $$ident_map[$c])
374 105 138 if ($state eq 'MY_LEX_IDENT_START') { }
0 138 elsif ($state eq 'MY_LEX_USER_VARIABLE_DELIMITER') { }
27 111 elsif ($state eq 'MY_LEX_INT_OR_REAL') { }
378 0 105 $result_state & 128 ? :
380 2 103 if ($c == 46 and $$ident_map[$lexer->yyPeek])
392 0 0 if ($var_length == 1)
393 0 0 if $c == 92
394 0 0 if ($c == $quote_char)
395 0 0 if $lexer->yyPeek != $quote_char
406 0 0 if ($double_quotes) { }
412 0 0 if $c == $quote_char
416 27 0 if ($c != 46)
422 0 111 if ($state eq 'MY_LEX_INT_OR_REAL' or $state eq 'MY_LEX_REAL') { }
0 111 elsif ($state eq 'MY_LEX_HEX_NUMBER') { }
0 111 elsif ($state eq 'MY_LEX_BIN_NUMBER') { }
48 63 elsif ($state eq 'MY_LEX_CMP_OP') { }
0 63 elsif ($state eq 'MY_LEX_LONG_CMP_OP') { }
2 61 elsif ($state eq 'MY_LEX_BOOL') { }
4 57 elsif ($state eq 'MY_LEX_STRING_OR_DELIMITER') { }
427 0 0 if ($c == 101 or $c == 69)
432 0 0 if ($c == 43 or $c == 45)
439 0 0 unless ($lexer->my_isdigit($c))
456 0 0 if (not $length & 1 or $c != 39)
467 0 0 if ($c != 39)
475 1 47 if ($$state_map[$lexer->yyPeek] eq 'MY_LEX_CMP_OP' or $$state_map[$lexer->yyPeek] eq 'MY_LEX_LONG_CMP_OP')
481 48 0 if (@token = $lexer->find_keyword($$lexer[7] - $$lexer[8], 0))
488 0 0 if ($$state_map[$lexer->yyPeek] eq 'MY_LEX_CMP_OP' or $$state_map[$lexer->yyPeek] eq 'MY_LEX_LONG_CMP_OP')
493 0 0 if ($$state_map[$lexer->yyPeek] eq 'MY_LEX_CMP_OP')
497 0 0 if (@token = $lexer->find_keyword($$lexer[7] - $$lexer[8], 0))
504 0 2 if ($c != $lexer->yyPeek)
513 0 4 if ($$lexer[3] & 4)
519 19 42 if ($state eq 'MY_LEX_STRING_OR_DELIMITER' or $state eq 'MY_LEX_STRING') { }
0 42 elsif ($state eq 'MY_LEX_COMMENT') { }
17 25 elsif ($state eq 'MY_LEX_LONG_COMMENT') { }
3 22 elsif ($state eq 'MY_LEX_END_LONG_COMMENT') { }
0 22 elsif ($state eq 'MY_LEX_SET_VAR') { }
1 21 elsif ($state eq 'MY_LEX_SEMICOLON') { }
524 0 19 unless (defined($lex_str = $lexer->get_text))
536 1 16 if ($lexer->yyPeek != 42)
542 2 14 if ($lexer->yyPeek == 33)
546 2 0 if ($lexer->my_isdigit($lexer->yyPeek))
551 1 1 if ($version <= $$lexer[2])
564 0 447 if $c == 10
567 15 0 if $$lexer[7] != length($string) - 1
572 1 2 if ($$lexer[12] and $lexer->yyPeek == 47) { }
581 0 0 if ($lexer->yyPeek != 61)
588 1 0 if ($lexer->yyPeek)
589 1 0 if ($$lexer[5] & 65536 and not $$lexer[6])
604 10 11 if ($state eq 'MY_LEX_SEMICOLON' or $state eq 'MY_LEX_EOL') { }
9 2 elsif ($state eq 'MY_LEX_END') { }
2 0 elsif ($state eq 'MY_LEX_REAL_OR_POINT') { }
0 0 elsif ($state eq 'MY_LEX_USER_END') { }
0 0 elsif ($state eq 'MY_LEX_HOSTNAME') { }
0 0 elsif ($state eq 'MY_LEX_SYSTEM_VAR') { }
0 0 elsif ($state eq 'MY_LEX_IDENT_OR_KEYWORD') { }
608 10 0 if ($$lexer[7] >= length($string) - 1)
618 0 2 if ($lexer->my_isdigit($lexer->yyPeek)) { }
626 0 0 if ($$state_map[$lexer->yyPeek] eq 'MY_LEX_STRING' or $$state_map[$lexer->yyPeek] eq 'MY_LEX_USER_VARIABLE_DELIMITER' or $$state_map[$lexer->yyPeek] eq 'MY_LEX_STRING_OR_DELIMITER') { }
0 0 elsif ($$state_map[$lexer->yyPeek] eq 'MY_LEX_USER_END') { }
646 0 0 $$state_map[$lexer->yyPeek] eq 'MY_LEX_USER_VARIABLE_DELIMITER' ? :
650 0 0 $result_state & 128 ? :
652 0 0 if $c == 46
655 0 0 if $length == 0
656 0 0 if (@token = $lexer->find_keyword($length, 0))
670 5 6 if exists $state_maps{$$lexer[1]}
676 312 1224 if ($lexer->my_isalpha($i)) { }
60 1164 elsif ($lexer->my_isdigit($i)) { }
36 1128 elsif ($lexer->my_isspace($i)) { }
740 0 90 if ($c == 92 and not $$lexer[3] & 1048576) { }
19 71 elsif ($c == $sep) { }
745 0 0 if $$lexer[7] == length $$lexer[0]
748 0 19 if ($c == $lexer->yyGet) { }
762 19 0 if (not $found_escape) { }
764 19 0 if ($yytoklen > 0) { }
772 0 0 if (not $$lexer[3] & 1048576 and substr($string, $str, 1) eq '\\' and $str + 1 != $end) { }
0 0 elsif (substr($string, $str, 1) eq $sep) { }
778 0 0 if ($prev_str eq 'n') { }
0 0 elsif ($prev_str eq 't') { }
0 0 elsif ($prev_str eq 'r') { }
0 0 elsif ($prev_str eq 'b') { }
0 0 elsif ($prev_str eq '0') { }
0 0 elsif ($prev_str eq 'Z') { }
0 0 elsif ($prev_str eq '_' or $prev_str eq '%') { }
838 27 0 if (length $token < 10)
844 0 0 if (substr($token, 0, 1) eq '+') { }
0 0 elsif (substr($token, 0, 1) eq '-') { }
858 0 0 if (length $token < 10)
865 0 0 if ($neg) { }
866 0 0 if (length $token == 10) { }
0 0 elsif (length $token < 19) { }
0 0 elsif (length $token > 19) { }
880 0 0 if (length $token == 19) { }
0 0 elsif (length $token < 19) { }
0 0 elsif (length $token > 19) { }
887 0 0 if (length $token > 20)
900 0 0 $token > $cmp ? :
908 8 237 if ($function) { }
910 1 7 unless defined $symbol
915 57 188 unless defined $symbol
917 0 188 if ($symbol eq 'NOT_SYM' and $$lexer[3] & 536870912)
924 1 187 if ($symbol eq 'OR_OR_SYM' and $$lexer[3] & 2)