Branch Coverage

inc/Pegex/Parser.pm
Criterion Covered Total %
branch 43 86 50.0


line true false branch
33 8 0 if $start
38 8 0 !ref($input) ? :
42 8 0 unless $$self{'input'}{'_is_open'}
46 0 8 unless $$self{'grammar'}
51 0 8 unless my $start_rule_ref = $start || $$self{'grammar'}{'tree'}{'+toprule'} || $$self{'grammar'}{'tree'}{'TOP'} & 'TOP'
56 0 8 unless $$self{'receiver'}
71 0 8 if ($$self{'receiver'}->can('initial'))
77 0 8 $self->debug ? :
84 0 8 if (not $match or $$self{'position'} < length ${$$self{'buffer'};})
89 8 0 if ($$self{'receiver'}->can('final'))
108 502 0 unless $assertion
111 462 40 if $max == 1
113 1 658 if (not $count and $min == 0 and $kind eq 'all')
116 32 1107 if ($max != 1)
117 0 32 if ($$next{-'flat'}) { }
118 0 0 ref $_ eq 'ARRAY' ? :
123 0 32 if ($$self{'position'} = $position) > $$self{'farthest'}
128 617 522 if (not $result or $assertion)
129 0 617 if ($$self{'position'} = $position) > $$self{'farthest'}
133 6 533 $$next{'-skip'} ? :
539 600 $result ? :
139 0 0 if $position > $$self{'farthest'}
141 0 0 if @$match > 1
143 0 0 unless my $rule = $$self{'grammar'}{'tree'}{$ref}
151 0 572 unless my $rule = $$self{'grammar'}{'tree'}{$ref}
153 333 239 unless my $match = $self->match_next($rule)
154 0 239 unless $$rule{'action'}
167 196 140 unless $$buffer =~ /$regexp/g
171 128 12 if $$self{'position'} > $$self{'farthest'}
176 0 140 if $#+ > 1
187 232 107 if (my $match = $self->match_next($elem)) { }
188 209 23 unless ($$elem{'+asr'} or $$elem{'-skip'})
194 0 107 if ($$self{'position'} = $position) > $$self{'farthest'}
199 63 0 if $len > 1
206 68 160 if (my $match = $self->match_next($elem))
220 0 0 $action =~ /^try_/ ? :
222 0 0 unless $indent
224 0 0 if $indent
226 0 0 if length $snippet > 30
229 0 0 $indent ? :
236 0 0 unless $$self{'throw_on_error'}
250 0 0 $position < 50 ? :
0 0 $position < 50 ? :