line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#################################################################### |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# This file was generated using Parse::Yapp version 1.05. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Don't edit this file, use source file instead. |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
# ANY CHANGE MADE HERE WILL BE LOST ! |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
#################################################################### |
10
|
|
|
|
|
|
|
package Net::SPOCP::SExpr::Parser; |
11
|
1
|
|
|
1
|
|
6
|
use vars qw ( @ISA ); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
42
|
|
12
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
@ISA= qw ( Parse::Yapp::Driver ); |
15
|
1
|
|
|
1
|
|
870
|
use Parse::Yapp::Driver; |
|
1
|
|
|
|
|
1964
|
|
|
1
|
|
|
|
|
460
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
1
|
|
|
1
|
0
|
4
|
my($class)=shift; |
21
|
1
|
50
|
|
|
|
5
|
ref($class) |
22
|
|
|
|
|
|
|
and $class=ref($class); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
my($self)=$class->SUPER::new( yyversion => '1.05', |
25
|
|
|
|
|
|
|
yystates => |
26
|
|
|
|
|
|
|
[ |
27
|
|
|
|
|
|
|
{#State 0 |
28
|
|
|
|
|
|
|
ACTIONS => { |
29
|
|
|
|
|
|
|
"(" => 2 |
30
|
|
|
|
|
|
|
}, |
31
|
|
|
|
|
|
|
GOTOS => { |
32
|
|
|
|
|
|
|
'sexp' => 1 |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
}, |
35
|
|
|
|
|
|
|
{#State 1 |
36
|
|
|
|
|
|
|
ACTIONS => { |
37
|
|
|
|
|
|
|
'' => 3 |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
}, |
40
|
|
|
|
|
|
|
{#State 2 |
41
|
|
|
|
|
|
|
DEFAULT => -3, |
42
|
|
|
|
|
|
|
GOTOS => { |
43
|
|
|
|
|
|
|
'list' => 4 |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
}, |
46
|
|
|
|
|
|
|
{#State 3 |
47
|
|
|
|
|
|
|
DEFAULT => 0 |
48
|
|
|
|
|
|
|
}, |
49
|
|
|
|
|
|
|
{#State 4 |
50
|
|
|
|
|
|
|
ACTIONS => { |
51
|
|
|
|
|
|
|
"(" => 2, |
52
|
|
|
|
|
|
|
")" => 6, |
53
|
|
|
|
|
|
|
'ATOM' => 7 |
54
|
|
|
|
|
|
|
}, |
55
|
|
|
|
|
|
|
GOTOS => { |
56
|
|
|
|
|
|
|
'sexp' => 8, |
57
|
|
|
|
|
|
|
'element' => 5 |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
}, |
60
|
|
|
|
|
|
|
{#State 5 |
61
|
|
|
|
|
|
|
DEFAULT => -2 |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
{#State 6 |
64
|
|
|
|
|
|
|
DEFAULT => -1 |
65
|
|
|
|
|
|
|
}, |
66
|
|
|
|
|
|
|
{#State 7 |
67
|
|
|
|
|
|
|
DEFAULT => -4 |
68
|
|
|
|
|
|
|
}, |
69
|
|
|
|
|
|
|
{#State 8 |
70
|
|
|
|
|
|
|
DEFAULT => -5 |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
], |
73
|
|
|
|
|
|
|
yyrules => |
74
|
|
|
|
|
|
|
[ |
75
|
|
|
|
|
|
|
[#Rule 0 |
76
|
|
|
|
|
|
|
'$start', 2, undef |
77
|
|
|
|
|
|
|
], |
78
|
|
|
|
|
|
|
[#Rule 1 |
79
|
|
|
|
|
|
|
'sexp', 3, |
80
|
|
|
|
|
|
|
sub |
81
|
|
|
|
|
|
|
#line 5 "SPOCP/SExpr/Parser.y" |
82
|
|
|
|
|
|
|
{ $_[2]; } |
83
|
|
|
|
|
|
|
], |
84
|
|
|
|
|
|
|
[#Rule 2 |
85
|
|
|
|
|
|
|
'list', 2, |
86
|
|
|
|
|
|
|
sub |
87
|
|
|
|
|
|
|
#line 8 "SPOCP/SExpr/Parser.y" |
88
|
|
|
|
|
|
|
{ push(@{$_[1]}, $_[2]); $_[1] } |
89
|
|
|
|
|
|
|
], |
90
|
|
|
|
|
|
|
[#Rule 3 |
91
|
|
|
|
|
|
|
'list', 0, |
92
|
|
|
|
|
|
|
sub |
93
|
|
|
|
|
|
|
#line 9 "SPOCP/SExpr/Parser.y" |
94
|
|
|
|
|
|
|
{ []; } |
95
|
|
|
|
|
|
|
], |
96
|
|
|
|
|
|
|
[#Rule 4 |
97
|
|
|
|
|
|
|
'element', 1, |
98
|
|
|
|
|
|
|
sub |
99
|
|
|
|
|
|
|
#line 12 "SPOCP/SExpr/Parser.y" |
100
|
|
|
|
|
|
|
{ $_[1]; } |
101
|
|
|
|
|
|
|
], |
102
|
|
|
|
|
|
|
[#Rule 5 |
103
|
|
|
|
|
|
|
'element', 1, |
104
|
|
|
|
|
|
|
sub |
105
|
|
|
|
|
|
|
#line 13 "SPOCP/SExpr/Parser.y" |
106
|
|
|
|
|
|
|
{ $_[1]; } |
107
|
|
|
|
|
|
|
] |
108
|
|
|
|
|
|
|
], |
109
|
|
|
|
|
|
|
@_); |
110
|
|
|
|
|
|
|
bless($self,$class); |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
#line 16 "SPOCP/SExpr/Parser.y" |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
sub yylex |
117
|
|
|
|
|
|
|
{ |
118
|
|
|
|
|
|
|
my $parser = shift; |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
$parser->YYData->{INPUT} or return('', undef); |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
$parser->YYData->{INPUT} =~ s/^\s+//; |
123
|
|
|
|
|
|
|
$parser->YYData->{INPUT} =~ s/^#.*$//; |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
for ($parser->YYData->{INPUT}) |
126
|
|
|
|
|
|
|
{ |
127
|
|
|
|
|
|
|
s/^([\(\)])// and return($1, undef); |
128
|
|
|
|
|
|
|
s/^([^\s\(\)]+)// and return('ATOM',$1); |
129
|
|
|
|
|
|
|
s/^(.)//s and return($1, $1); |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
return('', undef) |
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
sub yyerror |
135
|
|
|
|
|
|
|
{ |
136
|
|
|
|
|
|
|
my ($msg, $s) = @_; |
137
|
|
|
|
|
|
|
die "$msg\n"; |
138
|
|
|
|
|
|
|
} |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
1; |