Branch Coverage

inc/Pegex/Parser.pm
Criterion Covered Total %
branch 41 86 47.6


line true false branch
33 2 0 if $start
38 2 0 !ref($input) ? :
42 2 0 unless $$self{'input'}{'_is_open'}
46 0 2 unless $$self{'grammar'}
51 0 2 unless my $start_rule_ref = $start || $$self{'grammar'}{'tree'}{'+toprule'} || $$self{'grammar'}{'tree'}{'TOP'} & 'TOP'
56 0 2 unless $$self{'receiver'}
71 0 2 if ($$self{'receiver'}->can('initial'))
77 0 2 $self->debug ? :
84 0 2 if (not $match or $$self{'position'} < length ${$$self{'buffer'};})
89 2 0 if ($$self{'receiver'}->can('final'))
108 303 0 unless $assertion
111 279 24 if $max == 1
113 0 289 if (not $count and $min == 0 and $kind eq 'all')
116 20 559 if ($max != 1)
117 0 20 if ($$next{-'flat'}) { }
118 0 0 ref $_ eq 'ARRAY' ? :
123 0 20 if ($$self{'position'} = $position) > $$self{'farthest'}
128 269 310 if (not $result or $assertion)
129 0 269 if ($$self{'position'} = $position) > $$self{'farthest'}
133 7 310 $$next{'-skip'} ? :
317 262 $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 293 unless my $rule = $$self{'grammar'}{'tree'}{$ref}
153 145 148 unless my $match = $self->match_next($rule)
154 0 148 unless $$rule{'action'}
167 89 85 unless $$buffer =~ /$regexp/g
171 85 0 if $$self{'position'} > $$self{'farthest'}
176 0 85 if $#+ > 1
187 139 44 if (my $match = $self->match_next($elem)) { }
188 125 14 unless ($$elem{'+asr'} or $$elem{'-skip'})
194 0 44 if ($$self{'position'} = $position) > $$self{'farthest'}
199 42 0 if $len > 1
206 30 73 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 ? :