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