SPOCP/SExpr/Parser.y

filter: Statementstmt 83.3% 15 / 18 Branchbran 62.5% 5 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 2 totaltotal 74.2% 26 / 35 CC 6 SCAR 14.6
CC
6
Cov
77%
yylex
7.6
__ANON__
1.0
__ANON__
1.0
CRAP 4.3
« blib/lib/Net/SPOCP/SExpr.pm ↑ Summary blib/lib/Net/SPOCP.pm »
1 %token ATOM
2  
3 %%
4  
5 6 ▶sexp: '(' list ')' { $_[2]; }
Subroutine __ANON__: called CC=1 SCAR=0.0
6 ;
7  
8 15 ▶list: list element { push(@{$_[1]}, $_[2]); $_[1] }|
Subroutine __ANON__: called CC=1 SCAR=0.0
9 6 ▶ { []; }
Subroutine __ANON__: called CC=1 SCAR=0.0
10 ;
11  
12 10 ▶element: ATOM { $_[1]; } |
Subroutine __ANON__: called CC=1 SCAR=0.0
13 5 ▶ sexp { $_[1]; }
Subroutine __ANON__: called CC=1 SCAR=0.0
14 23 ;
15  
16 %%
17 23  
18 sub yylex
19 23 ▶{
Subroutine yylex: called CC=6 SCAR=20.3
Pod undocumented
20 22 my $parser = shift;
21  
22 22 ▶ $parser->YYData->{INPUT} or return('', undef);
Branch: 1 branch
BranchTrueFalseTotal
$parser->YYData->{"INPUT"} or return "", undef 22 1 23
23  
24 23 $parser->YYData->{INPUT} =~ s/^\s+//;
25 23 $parser->YYData->{INPUT} =~ s/^#.*$//;
26  
27 10 for ($parser->YYData->{INPUT})
28 {
29 1 ▶ s/^([\(\)])// and return($1, undef);
Branch: 1 branch
BranchTrueFalseTotal
s/^([\(\)])// and return $1, undef 12 10 22
30 0 ▶ s/^([^\s\(\)]+)// and return('ATOM',$1);
Branch: 1 branch
BranchTrueFalseTotal
s/^([^\s\(\)]+)// and return "ATOM", $1 10 0 10
31 0 ▶ s/^(.)//s and return($1, $1);
Branch: 1 branch
BranchTrueFalseTotal
s/^(.)//s and return $1, $1 0 0 0
32 }
33 0 return('', undef)
34 }
35  
36 sub yyerror
37 0 ▶{
Subroutine yyerror: not called CC=1 SCAR=0.0
Pod undocumented
38 my ($msg, $s) = @_;
39 die "$msg\n";
40 }
« blib/lib/Net/SPOCP/SExpr.pm ↑ Summary blib/lib/Net/SPOCP.pm »