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 HOI::typeparser; |
11
|
2
|
|
|
2
|
|
10
|
use vars qw ( @ISA ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
93
|
|
12
|
2
|
|
|
2
|
|
14
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
82
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
@ISA= qw ( Parse::Yapp::Driver ); |
15
|
2
|
|
|
2
|
|
1123
|
use Parse::Yapp::Driver; |
|
2
|
|
|
|
|
3854
|
|
|
2
|
|
|
|
|
1073
|
|
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub new { |
20
|
2
|
|
|
2
|
0
|
3
|
my($class)=shift; |
21
|
2
|
50
|
|
|
|
8
|
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
|
|
|
|
|
|
|
'CONST' => 4, |
30
|
|
|
|
|
|
|
'NIL' => 5, |
31
|
|
|
|
|
|
|
'IDENT' => 3 |
32
|
|
|
|
|
|
|
}, |
33
|
|
|
|
|
|
|
GOTOS => { |
34
|
|
|
|
|
|
|
'Type' => 2, |
35
|
|
|
|
|
|
|
'Types' => 1 |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
}, |
38
|
|
|
|
|
|
|
{#State 1 |
39
|
|
|
|
|
|
|
ACTIONS => { |
40
|
|
|
|
|
|
|
'' => 6 |
41
|
|
|
|
|
|
|
} |
42
|
|
|
|
|
|
|
}, |
43
|
|
|
|
|
|
|
{#State 2 |
44
|
|
|
|
|
|
|
ACTIONS => { |
45
|
|
|
|
|
|
|
'COMMA' => 7, |
46
|
|
|
|
|
|
|
'CONCAT' => 8 |
47
|
|
|
|
|
|
|
}, |
48
|
|
|
|
|
|
|
DEFAULT => -1 |
49
|
|
|
|
|
|
|
}, |
50
|
|
|
|
|
|
|
{#State 3 |
51
|
|
|
|
|
|
|
ACTIONS => { |
52
|
|
|
|
|
|
|
'STRCONCAT' => 10, |
53
|
|
|
|
|
|
|
'LPAREN' => 9 |
54
|
|
|
|
|
|
|
}, |
55
|
|
|
|
|
|
|
DEFAULT => -4 |
56
|
|
|
|
|
|
|
}, |
57
|
|
|
|
|
|
|
{#State 4 |
58
|
|
|
|
|
|
|
DEFAULT => -3 |
59
|
|
|
|
|
|
|
}, |
60
|
|
|
|
|
|
|
{#State 5 |
61
|
|
|
|
|
|
|
DEFAULT => -6 |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
{#State 6 |
64
|
|
|
|
|
|
|
DEFAULT => 0 |
65
|
|
|
|
|
|
|
}, |
66
|
|
|
|
|
|
|
{#State 7 |
67
|
|
|
|
|
|
|
ACTIONS => { |
68
|
|
|
|
|
|
|
'IDENT' => 3, |
69
|
|
|
|
|
|
|
'CONST' => 4, |
70
|
|
|
|
|
|
|
'NIL' => 5 |
71
|
|
|
|
|
|
|
}, |
72
|
|
|
|
|
|
|
GOTOS => { |
73
|
|
|
|
|
|
|
'Types' => 11, |
74
|
|
|
|
|
|
|
'Type' => 2 |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
}, |
77
|
|
|
|
|
|
|
{#State 8 |
78
|
|
|
|
|
|
|
ACTIONS => { |
79
|
|
|
|
|
|
|
'IDENT' => 3, |
80
|
|
|
|
|
|
|
'CONST' => 4, |
81
|
|
|
|
|
|
|
'NIL' => 5 |
82
|
|
|
|
|
|
|
}, |
83
|
|
|
|
|
|
|
GOTOS => { |
84
|
|
|
|
|
|
|
'Type' => 12 |
85
|
|
|
|
|
|
|
} |
86
|
|
|
|
|
|
|
}, |
87
|
|
|
|
|
|
|
{#State 9 |
88
|
|
|
|
|
|
|
ACTIONS => { |
89
|
|
|
|
|
|
|
'IDENT' => 3, |
90
|
|
|
|
|
|
|
'CONST' => 4, |
91
|
|
|
|
|
|
|
'NIL' => 5 |
92
|
|
|
|
|
|
|
}, |
93
|
|
|
|
|
|
|
DEFAULT => -9, |
94
|
|
|
|
|
|
|
GOTOS => { |
95
|
|
|
|
|
|
|
'Type' => 14, |
96
|
|
|
|
|
|
|
'Typelist' => 13 |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
}, |
99
|
|
|
|
|
|
|
{#State 10 |
100
|
|
|
|
|
|
|
ACTIONS => { |
101
|
|
|
|
|
|
|
'IDENT' => 15 |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
}, |
104
|
|
|
|
|
|
|
{#State 11 |
105
|
|
|
|
|
|
|
DEFAULT => -2 |
106
|
|
|
|
|
|
|
}, |
107
|
|
|
|
|
|
|
{#State 12 |
108
|
|
|
|
|
|
|
ACTIONS => { |
109
|
|
|
|
|
|
|
'CONCAT' => 8 |
110
|
|
|
|
|
|
|
}, |
111
|
|
|
|
|
|
|
DEFAULT => -5 |
112
|
|
|
|
|
|
|
}, |
113
|
|
|
|
|
|
|
{#State 13 |
114
|
|
|
|
|
|
|
ACTIONS => { |
115
|
|
|
|
|
|
|
'RPAREN' => 16 |
116
|
|
|
|
|
|
|
} |
117
|
|
|
|
|
|
|
}, |
118
|
|
|
|
|
|
|
{#State 14 |
119
|
|
|
|
|
|
|
ACTIONS => { |
120
|
|
|
|
|
|
|
'CONST' => 4, |
121
|
|
|
|
|
|
|
'NIL' => 5, |
122
|
|
|
|
|
|
|
'CONCAT' => 8, |
123
|
|
|
|
|
|
|
'IDENT' => 3 |
124
|
|
|
|
|
|
|
}, |
125
|
|
|
|
|
|
|
DEFAULT => -9, |
126
|
|
|
|
|
|
|
GOTOS => { |
127
|
|
|
|
|
|
|
'Type' => 14, |
128
|
|
|
|
|
|
|
'Typelist' => 17 |
129
|
|
|
|
|
|
|
} |
130
|
|
|
|
|
|
|
}, |
131
|
|
|
|
|
|
|
{#State 15 |
132
|
|
|
|
|
|
|
DEFAULT => -8 |
133
|
|
|
|
|
|
|
}, |
134
|
|
|
|
|
|
|
{#State 16 |
135
|
|
|
|
|
|
|
DEFAULT => -7 |
136
|
|
|
|
|
|
|
}, |
137
|
|
|
|
|
|
|
{#State 17 |
138
|
|
|
|
|
|
|
DEFAULT => -10 |
139
|
|
|
|
|
|
|
} |
140
|
|
|
|
|
|
|
], |
141
|
|
|
|
|
|
|
yyrules => |
142
|
|
|
|
|
|
|
[ |
143
|
|
|
|
|
|
|
[#Rule 0 |
144
|
|
|
|
|
|
|
'$start', 2, undef |
145
|
|
|
|
|
|
|
], |
146
|
|
|
|
|
|
|
[#Rule 1 |
147
|
|
|
|
|
|
|
'Types', 1, |
148
|
|
|
|
|
|
|
sub |
149
|
|
|
|
|
|
|
#line 12 "typeparser.yp" |
150
|
|
|
|
|
|
|
{ [ $_[1] ] } |
151
|
|
|
|
|
|
|
], |
152
|
|
|
|
|
|
|
[#Rule 2 |
153
|
|
|
|
|
|
|
'Types', 3, |
154
|
|
|
|
|
|
|
sub |
155
|
|
|
|
|
|
|
#line 13 "typeparser.yp" |
156
|
|
|
|
|
|
|
{ my $sublist = $_[3]; my @list= ($_[1], @$sublist); \@list } |
157
|
|
|
|
|
|
|
], |
158
|
|
|
|
|
|
|
[#Rule 3 |
159
|
|
|
|
|
|
|
'Type', 1, |
160
|
|
|
|
|
|
|
sub |
161
|
|
|
|
|
|
|
#line 16 "typeparser.yp" |
162
|
|
|
|
|
|
|
{ { "kind" => "const", "val" => $_[1] } } |
163
|
|
|
|
|
|
|
], |
164
|
|
|
|
|
|
|
[#Rule 4 |
165
|
|
|
|
|
|
|
'Type', 1, |
166
|
|
|
|
|
|
|
sub |
167
|
|
|
|
|
|
|
#line 17 "typeparser.yp" |
168
|
|
|
|
|
|
|
{ { "kind" => "any", "val" => $_[1] } } |
169
|
|
|
|
|
|
|
], |
170
|
|
|
|
|
|
|
[#Rule 5 |
171
|
|
|
|
|
|
|
'Type', 3, |
172
|
|
|
|
|
|
|
sub |
173
|
|
|
|
|
|
|
#line 18 "typeparser.yp" |
174
|
|
|
|
|
|
|
{ { "kind" => "list", "val" => [ $_[1], $_[3] ] } } |
175
|
|
|
|
|
|
|
], |
176
|
|
|
|
|
|
|
[#Rule 6 |
177
|
|
|
|
|
|
|
'Type', 1, |
178
|
|
|
|
|
|
|
sub |
179
|
|
|
|
|
|
|
#line 19 "typeparser.yp" |
180
|
|
|
|
|
|
|
{ { "kind" => "list", "val" => [] } } |
181
|
|
|
|
|
|
|
], |
182
|
|
|
|
|
|
|
[#Rule 7 |
183
|
|
|
|
|
|
|
'Type', 4, |
184
|
|
|
|
|
|
|
sub |
185
|
|
|
|
|
|
|
#line 20 "typeparser.yp" |
186
|
|
|
|
|
|
|
{ { "kind" => "adt", "val" => [ $_[1], $_[3] ] } } |
187
|
|
|
|
|
|
|
], |
188
|
|
|
|
|
|
|
[#Rule 8 |
189
|
|
|
|
|
|
|
'Type', 3, |
190
|
|
|
|
|
|
|
sub |
191
|
|
|
|
|
|
|
#line 21 "typeparser.yp" |
192
|
|
|
|
|
|
|
{ { "kind" => "strspl", "val" => [ $_[1], $_[3] ] } } |
193
|
|
|
|
|
|
|
], |
194
|
|
|
|
|
|
|
[#Rule 9 |
195
|
|
|
|
|
|
|
'Typelist', 0, |
196
|
|
|
|
|
|
|
sub |
197
|
|
|
|
|
|
|
#line 24 "typeparser.yp" |
198
|
|
|
|
|
|
|
{ [] } |
199
|
|
|
|
|
|
|
], |
200
|
|
|
|
|
|
|
[#Rule 10 |
201
|
|
|
|
|
|
|
'Typelist', 2, |
202
|
|
|
|
|
|
|
sub |
203
|
|
|
|
|
|
|
#line 25 "typeparser.yp" |
204
|
|
|
|
|
|
|
{ my $sublist = $_[2]; my @list= ($_[1], @$sublist); \@list } |
205
|
|
|
|
|
|
|
] |
206
|
|
|
|
|
|
|
], |
207
|
|
|
|
|
|
|
@_); |
208
|
|
|
|
|
|
|
bless($self,$class); |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
#line 28 "typeparser.yp" |
212
|
|
|
|
|
|
|
|
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
1; |