Branch Coverage

blib/lib/Parse/Eyapp/Driver.pm
Criterion Covered Total %
branch 125 446 28.0


line true false branch
76 0 133 if exists $self->{'VERSION'} and $self->{'VERSION'} < $COMPATIBLE
81 0 133 if ref $class
84 132 1 unless ($self->{'ERROR'})
86 0 132 unless $self->{'ERROR'}
89 132 1 unless ($self->{'LEX'})
105 0 158 unless ($self->{'ERROR'})
107 0 0 unless $self->{'ERROR'}
110 0 158 unless ($self->{'LEX'})
112 0 0 unless $self->{'LEX'} and &reftype($self->{'LEX'}) eq 'CODE'
115 0 158 if ($self->{'DEBUG'}) { }
118 0 0 if $@
130 34 1993 unless exists $self->{'USER'}
183 0 0 if $index < 0 and -$index <= @{$self->{'STACK'};}
196 0 0 if ($index)
197 0 0 unless &looks_like_number($index)
198 0 0 wantarray ? :
202 0 0 wantarray ? :
221 0 0 if ($index)
223 0 0 if 'ARRAY' eq &reftype($index)
224 0 0 unless &looks_like_number($index)
245 0 0 unless &looks_like_number($index)
247 0 0 unless &looks_like_number($index)
251 0 0 if &reftype($currentprod)
261 0 0 if ($lhs) { }
281 0 0 if ($index)
282 0 0 unless &looks_like_number($index)
283 0 0 wantarray ? :
286 0 0 wantarray ? :
294 0 0 wantarray ? :
303 0 0 if (@_)
305 0 0 wantarray ? :
307 0 0 wantarray ? :
315 0 0 unless $length <= 0
318 0 0 if $_[1]
334 0 0 unless defined $state
337 0 0 unless &looks_like_number($action)
338 0 0 unless ref $token
380 0 0 if (&looks_like_number($spec)) { }
384 0 0 if $t eq ''
428 0 0 wantarray ? :
436 0 0 unless $conflictName
464 0 0 if @_
476 0 0 if @_
501 0 0 unless defined $action
512 0 0 $cS ? :
517 0 0 unless $cs
520 0 0 unless (&looks_like_number($action))
522 0 0 unless (&looks_like_number($actionnum))
528 0 0 unless defined $token
529 0 0 unless ref $token
532 0 0 if (exists $self->{'STATES'}[$conflictstate]{'ACTIONS'} and $self->{'STATES'}[$conflictstate]{'ACTIONS'}{$_} >= 0)
545 0 0 unless defined $action
553 0 0 $cS ? :
555 0 0 unless @conflictStates
564 0 0 unless (&looks_like_number($action))
566 0 0 unless (&looks_like_number($actionnum))
572 0 0 unless defined $token
573 0 0 unless ref $token
576 0 0 if (exists $self->{'STATES'}[$conflictstate]{'ACTIONS'} and $self->{'STATES'}[$conflictstate]{'ACTIONS'}{$_} >= 0)
593 0 0 $cS ? :
595 0 0 unless @conflictStates
601 0 0 unless defined $token
602 0 0 unless ref $token
605 0 0 if (defined $self->{'CONFLICT'}{$conflictName}{$_}) { }
637 0 0 if ($self->YYIs($syntaxVariable)) { }
638 0 0 if ($_[0] eq 'shift') { }
646 0 0 if ($_[1] eq 'shift') { }
659 0 0 if &reftype($state) and &reftype($state) eq 'ARRAY'
662 0 0 if (defined $token)
663 0 0 if exists $stateentry->{'ACTIONS'}{$token}
666 0 0 if exists $stateentry->{'DEFAULT'}
677 0 0 unless $index
680 0 0 unless &looks_like_number($index)
682 0 0 if $newaction and &reftype($newaction) eq 'CODE'
692 0 0 &looks_like_number($n) ? :
694 0 0 if $newaction{$n} and &reftype($newaction{$n}) eq 'CODE'
746 0 1257 unless &looks_like_number($index)
769 555 871 unless exists $self->{'TERMS'}{$symbol}
770 0 871 if @_
778 0 1262 if @_
785 0 1717 if @_
800 0 0 if @_
807 0 0 if @_
814 0 499 if @_
821 0 0 if @_
846 0 1075 if @_
854 7032 1589 unless $class->isa('Parse::Eyapp::Node')
866 0 2 if @_ > 1
926 723 269 unless (UNIVERSAL::isa($ch, 'Parse::Eyapp::Node'))
927 417 306 if ($self->YYIssemantic($_))
934 304 2 if ($self->YYIsterm($_))
935 0 304 if UNIVERSAL::can($PREFIX . 'TERMINAL', 'save_attributes')
940 0 271 if (UNIVERSAL::isa($ch, $PREFIX . '_PAREN'))
946 0 271 if $_ =~ qr/@/
947 2 269 unless ref $ch
952 8 491 if ($bypass and @children == 1)
957 8 0 unless $name =~ /${lhs}_\d+$/
962 2 6 if ($childisterminal and not $finalclass->isa($PREFIX . 'TERMINAL'))
987 175 156 if ($self->YYIsterm($_))
993 0 156 if (UNIVERSAL::isa($ch, $PREFIX . '_PAREN'))
999 10 146 if (UNIVERSAL::isa($ch, $PREFIX . '_CODE'))
1004 0 146 unless ref $ch
1008 10 177 if (unpack('A1', $lhs) eq '@') { }
1009 0 10 unless $lhs =~ /^\@[0-9]+\-([0-9]+)$/
1013 0 10 unless exists $_[$dotpos] and UNIVERSAL::isa($_[$dotpos], 'CODE')
1019 169 8 if (UNIVERSAL::isa($code, 'CODE')) { }
1023 0 8 if defined $code
1042 5 459 if ($self->YYIssemantic($_))
1048 142 317 if $self->YYIsterm($_)
1049 77 240 if (ref $ch eq $PREFIX . '_PAREN')
1053 3 237 unless ref $ch
1064 322 0 if $_[0]->YYBuildingTree
1074 177 0 if $_[0]->YYBuildingTree
1095 337 0 if $_[0]->YYBuildingTree
1112 3 236 if ($self->YYIssemantic($_))
1118 0 236 if $self->YYIsterm($_)
1119 100 136 if (ref $ch eq $PREFIX . '_PAREN')
1123 8 128 unless ref $ch
1133 239 0 if $_[0]->YYBuildingTree
1145 0 0 if @_
1153 0 0 if @_
1166 0 0 if (@$stack > $length)
1168 0 0 if $length
1172 0 0 if (defined $nextstate)
1191 0 0 if exists $state->{'ACTIONS'}
1197 0 0 if ($actions{$_} > 0)
1203 0 0 if exists $state->{'DEFAULT'}
1205 0 0 if (keys %reduce)
1236 21029 264 if ref $class
1243 0 21293 if (@_)
1247 21028 265 if defined $$classlexer
1256 265 0 if (defined $$classlexer)
1286 0 2075 unless exists $checklist->{$prm}
1288 0 2075 unless ref $value eq $checklist->{$prm}
1294 0 316 unless exists $outhash->{$_}
1303 0 0 if (ref $self) { }
1304 0 0 if @_
1306 0 0 unless defined $self->{'TOKENLINE'}
1318 0 0 if (ref $self) { }
1319 0 0 if @_
1321 0 0 unless defined $self->{'TOKENLINE'}
1333 0 132 if (ref $self) { }
1334 0 0 if @_
1336 0 0 unless defined $self->{'ERROR'}
1355 0 0 if ($fn and -r $fn) { }
1356 0 0 unless open $f, $fn
1362 0 0 if $msg
1369 0 0 if (ref $self) { }
1383 0 21029 if @_
1384 21029 0 if (ref $self) { }
1385 0 21029 if (@_)
1386 0 0 if (ref $_[0]) { }
1395 21029 0 unless defined $self->{'INPUT'}
1410 0 0 if (ref $self) { }
1412 0 0 if ($file)
1416 0 0 unless defined $self->{'INPUTFILE'}
1429 0 0 if (ref $self) { }
1431 0 0 if ($prompt)
1435 0 0 unless defined $self->{'PROMPT'}
1448 0 0 if (defined $_[0])
1449 0 0 if (ref $_[0]) { }
1457 0 0 unless $self->input and defined ${$self->input;}
1499 0 0 if $help
1501 0 0 if $debug
1502 0 0 if not $file and @ARGV
1503 0 0 if defined $slurp
1506 0 0 if defined $prompt
1508 0 0 if ($commandinput) { }
0 0 elsif ($inputfromfile) { }
1515 0 0 unless defined $_[0]
1516 0 0 if (ref $_[0]) { }
1525 0 0 if (defined $TERMINALinfo)
1529 0 0 ref $_[0]->attr eq 'ARRAY' ? :
1535 0 0 if (my $ne = $parser->YYNberr > 0) { }
1540 0 0 if ($showtree)
1541 0 0 if ($tree and &blessed($tree) and $tree->isa('Parse::Eyapp::Node')) { }
0 0 elsif ($tree and ref $tree) { }
0 0 elsif (defined $tree) { }
1553 0 0 if ($yaml and ref $tree)
1557 0 0 if ($@) { }
1565 0 0 if ($dot and &blessed($tree))
1567 0 0 unless defined $extension and $tree->can($extension)
1568 0 0 if not defined $sfile and defined $file
1598 0 0 if $package & $package->can('help')
1614 0 0 if (exists $yydata->{'ERRMSG'})
1624 0 0 if (&blessed($attr) and $attr->can('str')) { }
0 0 elsif (ref $attr eq 'ARRAY') { }
1631 0 0 if ($attr) { }
1639 0 0 $_ ne '' ? :
1641 0 0 if (@expected)
1642 0 0 @expected > 1 ? :
1647 0 0 if (&blessed($attr) and $attr->can('line')) { }
0 0 elsif (ref $attr eq 'ARRAY') { }
1656 0 0 if $lineno > 1
1672 0 0 if 'Parse::Eyapp::Driver'->can('_DBParse')
1677 0 0 if (open DRV, "<$fname") { }
1681 0 0 if (/^my\s+\$lex;##!!##$/ .. /^\s*}\s*#\s*_Parse\s*$/)
1784 0 21029 if (exists $conflictiveStates{$stateno})
1805 10796 10233 if (exists $actions->{'ACTIONS'}) { }
1808 6807 3989 unless (defined $$token)
1822 3609 12 exists $actions->{'DEFAULT'} ? :
7175 3621 exists $actions->{'ACTIONS'}{$$token} ? :
1831 21017 12 if (defined $act)
1834 6797 14220 if ($act > 0)
1840 2 6795 if ($$errstatus)
1856 6639 158 if defined $$token and $$token ne ''
1875 158 14062 unless $act
1881 104 14116 if (unpack('A1', $lhs) eq '@')
1882 0 104 unless $lhs =~ /^\@[0-9]+\-([0-9]+)$/
1889 13463 757 $$dotpos ? :
1894 2586 387 @sempar ? :
11247 2973 $code ? :
1900 158 14062 if ($$check eq 'ACCEPT')
1909 0 14062 if ($$check eq 'ABORT')
1922 14062 0 unless ($$check eq 'ERROR')
1953 2 10 unless ($$errstatus)
1957 0 2 unless $$errstatus
1976 10 2 if ($$errstatus == 3)
1978 0 10 if ($$token eq '')
2004 0 12 unless (@$stack)
2033 0 132 if (ref $self) { }
2035 0 0 if @_
2037 0 0 unless defined $self->{'LEX'}