blib/lib/Regexp/ERE.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 258 | 323 | 79.8 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
326 | 5946 | 993 | 3065 | $i != @sorted and $$interval[1] + 1 >= $sorted[$i][0] |
364 | 195 | 245 | 543 | $i_0 < @$char_class_0 and $i_1 < @$char_class_1 |
367 | 81 | 0 | 829 | $i_0 < @$char_class_0 and $i_1 < @$char_class_1 |
81 | 462 | 367 | $i_0 < @$char_class_0 and $i_1 < @$char_class_1 and $$char_class_0[$i_0][1] < $$char_class_1[$i_1][0] | |
376 | 81 | 143 | 511 | $i_0 < @$char_class_0 and $i_1 < @$char_class_1 |
224 | 319 | 192 | $i_0 < @$char_class_0 and $i_1 < @$char_class_1 and $$char_class_1[$i_1][1] < $$char_class_0[$i_0][0] | |
385 | 81 | 143 | 319 | $i_0 < @$char_class_0 and $i_1 < @$char_class_1 |
224 | 28 | 291 | $i_0 < @$char_class_0 and $i_1 < @$char_class_1 and $$char_class_1[$i_1][0] <= $$char_class_0[$i_0][1] | |
478 | 40 | 524 | 0 | @$char_class and $$char_class[0][0] < 0 |
498 | 23 | 10 | 491 | @$char_class == 1 and $$char_class[0][0] == $$char_class[0][1] |
23 | 6 | 4 | @$char_class == 1 and $$char_class[0][0] == 0 | |
29 | 0 | 4 | @$char_class == 1 and $$char_class[0][0] == 0 and $$char_class[0][1] == 1114111 | |
691 | 0 | 315 | 206 | $state_ind_map && exists $$state_ind_map{$$_[1]} |
701 | 0 | 64 | 148 | $state_ind_map && exists $$state_ind_map{$$t_0[1]} |
815 | 9 | 0 | 15 | $next_has_prefix && _nfa_has_suffix($nfa) |
11 | 0 | 4 | $prev_has_suffix && _nfa_has_prefix($nfa) | |
996 | 69 | 197 | 8 | @{$$state[1];} == 1 and _transitions_is_subset($$state[1], $$nfa[0][1], {$acc_ind, $init_state_ind}) |
232 | 5 | 29 | $init_reachable == 1 and grep {$$_[1] == $init_state_ind;} @{$$nfa[0][1];} | |
237 | 15 | 14 | $init_reachable == 1 and grep {$$_[1] == $init_state_ind;} @{$$nfa[0][1];} and cc_is_subset(map({$$_[0];} grep({$$_[1] == $init_state_ind;} @{$$nfa[0][1];})), map({$$_[0];} grep({$$_[1] == $acc_ind;} @{$$state[1];}))) | |
1167 | 232 | 11 | 57 | @$nfa == 1 and @{$$nfa[0][1];} == 0 |
1182 | 995 | 102 | 164 | $$orig_state[0] and not @{$$orig_state[1];} |
1299 | 1279 | 123 | 26 | $nfa_0_accepting && $nfa_1_accepting |
1701 | 1363 | 3020 | 2792 | $j < @sorted and $sorted[$j][0] == $sorted[$i][0] |
4383 | 374 | 2418 | $j < @sorted and $sorted[$j][0] == $sorted[$i][0] and $sorted[$j][1] == $sorted[$i][1] | |
1710 | 1368 | 3389 | 1712 | $j < @sorted and $sorted[$j][0] == $sorted[$i][0] |
4757 | 0 | 1712 | $j < @sorted and $sorted[$j][0] == $sorted[$i][0] and $sorted[$j][1] < $sorted[$i][1] | |
1722 | 1440 | 3317 | 3625 | $j < @sorted and $sorted[$j][1] < $sorted[$i][1] |
1734 | 1440 | 2871 | 446 | $j < @sorted and $sorted[$j][0] <= $sorted[$i][1] |
1907 | 119839 | 7042 | 795 | @inter && @diff |
2028 | 250 | 723 | 0 | @todo and !$todo_sorted || keys %{$$path_tr{$todo[-1]};} == 1 |
2037 | 0 | 0 | 165 | $i != $first and not $todo_sorted |
0 | 96 | 69 | $i != $first and not $todo_sorted and @todo | |
2054 | 189 | 0 | 406 | keys %{$$path{$i};} == 1 and (my $j = (keys %{$$path{$i};})[0]) != $first |
2152 | 9 | 5 | 3 | keys %accepting_state_inds == 2 and exists $accepting_state_inds{0} |
2228 | 182 | 87 | 0 | ref $$tmp_path{$parent}{$branch} ne 'cc' and $$tmp_path{$parent}{$branch}[0] || @{$$tmp_path{$parent}{$branch}[1];} > 1 |
2357 | 971 | 226 | 139 | $i == $k and $k == $j |
2359 | 226 | 195 | 533 | $i != $k and $k != $j |
243 | 954 | 0 | exists $$path{$i}{$j} and ($i != $k and $k != $j) | |
2426 | 1 | 2 | 2 | $path_0_0 == $cc_none and ref $path_0_end ne 'cc' |
3 | 2 | 0 | $path_0_0 == $cc_none and ref $path_0_end ne 'cc' and $$path_0_end[0] | |
2480 | 27 | 601 | 0 | not $FULL_FACTORIZE_FIXES and @{$$tree[1];} == 1 || !grep({ref $_ ne 'cc';} map({@$_;} @{$$tree[1];})) |
2515 | 1404 | 193 | 1 | ref $_ ne 'cc' && !$$_[0] && @{$$_[1];} == 1 |
2546 | 22 | 47 | 172 | $pre_len == 0 and $suf_len == 0 |
2594 | 419 | 175 | 312 | @{$$tree[1];} == 1 and @{$$tree[1][0];} == 1 |
2678 | 2 | 2 | 1 | ref $tree_1 ne 'cc' and @{$$tree_1[1];} == 0 |
2729 | 2 | 2 | 1 | ref $tree_1 ne 'cc' and @{$$tree_1[1];} == 0 |
2984 | 0 | 39 | 4 | @non_starified_alts and @{$non_starified_alts[0];} > 1 |
3157 | 0 | 0 | 11 | @{$$input_constraints[$i];} == 1 and length $$input_constraints[$i][0] |
3267 | 6 | 20 | 59 | $i != @{$$tree[1][0];} and ref($cc = $$tree[1][0][$i]) eq 'cc' |
26 | 59 | 0 | $i != @{$$tree[1][0];} and ref($cc = $$tree[1][0][$i]) eq 'cc' and !@$cc || $$cc[-1][1] != 1114111 | |
3287 | 17 | 0 | 12 | $beg < $i and length $expanded_words[0] |
3301 | 0 | 23 | 0 | @$sub_input_constraints and $$sub_input_constraints[0] eq 'free text' || grep({length $_;} @{$$sub_input_constraints[0];}) |
3319 | 0 | 261 | 7 | @$_ and $$_[$#$_][1] == 1114111 |
3628 | 2 | 6 | 0 | length $max and $min > $max |
3770 | 263 | 0 | 8 | $min && $i != 0 && _nfa_has_suffix($all_nfas[$i - 1]) |
256 | 0 | 15 | $min && $i != $#all_nfas && _nfa_has_prefix($all_nfas[$i + 1]) | |
3793 | 19 | 0 | 0 | $$nfa[0][0] && grep({$$_[1] == 0;} map({@{$$_[1];};} @$nfa)) |
line | l | !l | condition |
---|---|---|---|
284 | 766 | 91 | $cc_cache{join ',', 1, (ord $_[0]) x 2} ||= bless([[ord $_[0], ord $_[0]]], 'cc') |
1197 | 2 | 29 | $init_reachable ||= 1 |
1235 | 30 | 0 | $inter || [[1, [[$cc_any, 0]]]] |
3510 | 205 | 10 | pos $ere || 0 |
3722 | 6 | 3 | $$has_anchor_ref ||= 1 |
3731 | 2 | 7 | $$has_anchor_ref ||= 1 |
3804 | 0 | 0 | pos $$str_ref || 0 |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
334 | 5932 | 99 | 0 | $cc_cache{join ',', 1, map({@$_;} @$char_class)} ||= $char_class |
355 | 1102 | 73 | 0 | $cc_cache{join ',', 1, map({@$_;} @$neg)} ||= $neg |
435 | 440 | 0 | 0 | $cc_cache{join ',', 1, map({@$_;} @$inter)} ||= $inter |
580 | 0 | 0 | 5 | $$_[0] == 45 or $$_[0] == 93 |
833 | 256 | 14 | 1 | length $max == 0 or $max > $min |
996 | 236 | 0 | 274 | @{$$state[1];} == 0 or @{$$state[1];} == 1 and _transitions_is_subset($$state[1], $$nfa[0][1], {$acc_ind, $init_state_ind}) |
1100 | 150 | 112 | 139 | $init_reachable || $init_equiv_reachable |
139 | 7 | 255 | not $init_reachable || $init_equiv_reachable or $init_skipped == @accepting_state_inds | |
1166 | 72 | 65 | 163 | $$union[0][0] ||= $$nfa[0][0] |
1280 | 5364 | 440 | 0 | $cached_cc_inter2{$$t_0[0]}{$$t_1[0]} ||= &cc_inter2($$t_0[0], $$t_1[0]) |
1400 | 3 | 0 | 14 | exists $begs{$_} or exists $begends{$_} |
2028 | 260 | 201 | 262 | !$todo_sorted || keys %{$$path_tr{$todo[-1]};} == 1 |
2212 | 92 | 281 | 777 | not exists $$tmp_path{$branch} or $branch == 0 |
373 | 135 | 642 | not exists $$tmp_path{$branch} or $branch == 0 or $branch == $unique_accepting_state_ind | |
416 | 373 | 269 | not exists $$tmp_path{$branch} or $branch == 0 or $branch == $unique_accepting_state_ind or keys %{$$tmp_path_tr{$branch};} != 1 | |
2228 | 0 | 35 | 52 | $$tmp_path{$parent}{$branch}[0] || @{$$tmp_path{$parent}{$branch}[1];} > 1 |
2480 | 3 | 568 | 628 | not defined $tree or ref $tree eq 'cc' |
571 | 0 | 628 | not defined $tree or ref $tree eq 'cc' or @{$$tree[1];} == 0 | |
350 | 33 | 218 | @{$$tree[1];} == 1 || !grep({ref $_ ne 'cc';} map({@$_;} @{$$tree[1];})) | |
568 | 0 | 628 | not defined $tree or ref $tree eq 'cc' or @{$$tree[1];} == 0 or not $FULL_FACTORIZE_FIXES and @{$$tree[1];} == 1 || !grep({ref $_ ne 'cc';} map({@$_;} @{$$tree[1];})) | |
2497 | 0 | 1 | 319 | ref $tmp_tree eq 'cc' or $$tmp_tree[0] |
1 | 0 | 319 | ref $tmp_tree eq 'cc' or $$tmp_tree[0] or @{$$tmp_tree[1];} > 1 | |
2534 | 1 | 213 | 499 | $i >= @$_ or ref $$_[$i] ne 'cc' |
2596 | 10 | 2 | 12 | $cc_to_regex_cache{$tree . $to_perlre} ||= cc_to_regex($tree, $to_perlre) |
2609 | 202 | 11 | 99 | $cc_to_regex_cache{$atom . $to_perlre} ||= cc_to_regex($atom, $to_perlre) |
2616 | 0 | 0 | 0 | $$tree[0] || $$atom[0] |
2625 | 419 | 0 | 175 | @{$$tree[1];} > 1 || $$tree[0] && @{$$tree[1][0];} > 1 |
2628 | 1834 | 112 | 154 | $cc_to_regex_cache{$_ . $to_perlre} ||= cc_to_regex($_, $to_perlre) |
2709 | 2 | 40 | 93 | $FULL_FACTORIZE_FIXES or grep {$$_[0] if ref $_ ne 'cc';} map({@$_;} @{$$tree_1[1];}) |
2804 | 0 | 5 | 11 | $FULL_FACTORIZE_FIXES or grep {$$_[0] if ref $_ ne 'cc';} map({@$_;} @{$$tree_1[1];}) |
2837 | 7 | 5 | 47 | $FULL_FACTORIZE_FIXES or grep {$$_[0] if ref $_ ne 'cc';} map({@$_;} @{$$tree_0[1];}) |
2868 | 2 | 0 | 9 | $FULL_FACTORIZE_FIXES or grep {$$_[0] if ref $_ ne 'cc';} map({@$_;} @{$$tree_0[1];}) |
2984 | 831 | 0 | 43 | @non_starified_alts > 1 or $has_empty |
831 | 0 | 43 | @non_starified_alts > 1 or $has_empty or @non_starified_alts and @{$non_starified_alts[0];} > 1 | |
3157 | 10 | 10 | 11 | $$input_constraints[$i] eq 'free text' or @{$$input_constraints[$i];} > 1 |
3237 | 2 | 1 | 0 | $cc_to_input_constraint_cache{$tree} ||= cc_to_input_constraint($tree) |
3267 | 0 | 56 | 3 | !@$cc || $$cc[-1][1] != 1114111 |
3272 | 53 | 3 | 0 | $cc_to_input_constraint_cache{$cc} ||= cc_to_input_constraint($cc) |
3301 | 15 | 8 | 0 | $$sub_input_constraints[0] eq 'free text' || grep({length $_;} @{$$sub_input_constraints[0];}) |
3340 | 0 | 3 | 25 | $i >= @$_ or ref $$_[$i] ne 'cc' |
3395 | 200 | 24 | 0 | $cc_to_input_constraint_cache{$_} ||= cc_to_input_constraint($_) |
3515 | 198 | 7 | 10 | $has_beg_anchor || $has_end_anchor |
3534 | 7 | 0 | 198 | not $has_beg_anchor or @alternation_nfas > 1 |
3541 | 2 | 0 | 203 | not $has_end_anchor or @alternation_nfas > 1 |
3675 | 1083 | 63 | 0 | $char_to_cc_cache{$_} ||= char_to_cc($_) |
3708 | 15 | 2 | 0 | $char_to_cc_cache{$1} ||= char_to_cc($1) |