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 Test::Collectd::Config::Parse; |
11
|
6
|
|
|
6
|
|
22
|
use vars qw ( @ISA ); |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
303
|
|
12
|
6
|
|
|
6
|
|
22
|
use strict; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
276
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
@ISA= qw ( Parse::Yapp::Driver ); |
15
|
|
|
|
|
|
|
#Included Parse/Yapp/Driver.pm file---------------------------------------- |
16
|
|
|
|
|
|
|
{ |
17
|
|
|
|
|
|
|
# |
18
|
|
|
|
|
|
|
# Module Parse::Yapp::Driver |
19
|
|
|
|
|
|
|
# |
20
|
|
|
|
|
|
|
# This module is part of the Parse::Yapp package available on your |
21
|
|
|
|
|
|
|
# nearest CPAN |
22
|
|
|
|
|
|
|
# |
23
|
|
|
|
|
|
|
# Any use of this module in a standalone parser make the included |
24
|
|
|
|
|
|
|
# text under the same copyright as the Parse::Yapp module itself. |
25
|
|
|
|
|
|
|
# |
26
|
|
|
|
|
|
|
# This notice should remain unchanged. |
27
|
|
|
|
|
|
|
# |
28
|
|
|
|
|
|
|
# (c) Copyright 1998-2001 Francois Desarmenien, all rights reserved. |
29
|
|
|
|
|
|
|
# (see the pod text in Parse::Yapp module for use and distribution rights) |
30
|
|
|
|
|
|
|
# |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
package Parse::Yapp::Driver; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
require 5.004; |
35
|
|
|
|
|
|
|
|
36
|
6
|
|
|
6
|
|
22
|
use strict; |
|
6
|
|
|
|
|
7
|
|
|
6
|
|
|
|
|
109
|
|
37
|
|
|
|
|
|
|
|
38
|
6
|
|
|
6
|
|
21
|
use vars qw ( $VERSION $COMPATIBLE $FILENAME ); |
|
6
|
|
|
|
|
37
|
|
|
6
|
|
|
|
|
347
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
$VERSION = '1.05'; |
41
|
|
|
|
|
|
|
$COMPATIBLE = '0.07'; |
42
|
|
|
|
|
|
|
$FILENAME=__FILE__; |
43
|
|
|
|
|
|
|
|
44
|
6
|
|
|
6
|
|
24
|
use Carp; |
|
6
|
|
|
|
|
4
|
|
|
6
|
|
|
|
|
4714
|
|
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
#Known parameters, all starting with YY (leading YY will be discarded) |
47
|
|
|
|
|
|
|
my(%params)=(YYLEX => 'CODE', 'YYERROR' => 'CODE', YYVERSION => '', |
48
|
|
|
|
|
|
|
YYRULES => 'ARRAY', YYSTATES => 'ARRAY', YYDEBUG => ''); |
49
|
|
|
|
|
|
|
#Mandatory parameters |
50
|
|
|
|
|
|
|
my(@params)=('LEX','RULES','STATES'); |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub new { |
53
|
7
|
|
|
7
|
0
|
12
|
my($class)=shift; |
54
|
7
|
|
|
|
|
10
|
my($errst,$nberr,$token,$value,$check,$dotpos); |
55
|
7
|
|
|
|
|
54
|
my($self)={ ERROR => \&_Error, |
56
|
|
|
|
|
|
|
ERRST => \$errst, |
57
|
|
|
|
|
|
|
NBERR => \$nberr, |
58
|
|
|
|
|
|
|
TOKEN => \$token, |
59
|
|
|
|
|
|
|
VALUE => \$value, |
60
|
|
|
|
|
|
|
DOTPOS => \$dotpos, |
61
|
|
|
|
|
|
|
STACK => [], |
62
|
|
|
|
|
|
|
DEBUG => 0, |
63
|
|
|
|
|
|
|
CHECK => \$check }; |
64
|
|
|
|
|
|
|
|
65
|
7
|
|
|
|
|
27
|
_CheckParams( [], \%params, \@_, $self ); |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
exists($$self{VERSION}) |
68
|
7
|
50
|
33
|
|
|
62
|
and $$self{VERSION} < $COMPATIBLE |
69
|
|
|
|
|
|
|
and croak "Yapp driver version $VERSION ". |
70
|
|
|
|
|
|
|
"incompatible with version $$self{VERSION}:\n". |
71
|
|
|
|
|
|
|
"Please recompile parser module."; |
72
|
|
|
|
|
|
|
|
73
|
7
|
50
|
|
|
|
14
|
ref($class) |
74
|
|
|
|
|
|
|
and $class=ref($class); |
75
|
|
|
|
|
|
|
|
76
|
7
|
|
|
|
|
19
|
bless($self,$class); |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub YYParse { |
80
|
7
|
|
|
7
|
0
|
11
|
my($self)=shift; |
81
|
7
|
|
|
|
|
4
|
my($retval); |
82
|
|
|
|
|
|
|
|
83
|
7
|
|
|
|
|
17
|
_CheckParams( \@params, \%params, \@_, $self ); |
84
|
|
|
|
|
|
|
|
85
|
7
|
50
|
|
|
|
17
|
if($$self{DEBUG}) { |
86
|
0
|
|
|
|
|
0
|
_DBLoad(); |
87
|
0
|
|
|
|
|
0
|
$retval = eval '$self->_DBParse()';#Do not create stab entry on compile |
88
|
0
|
0
|
|
|
|
0
|
$@ and die $@; |
89
|
|
|
|
|
|
|
} |
90
|
|
|
|
|
|
|
else { |
91
|
7
|
|
|
|
|
20
|
$retval = $self->_Parse(); |
92
|
|
|
|
|
|
|
} |
93
|
7
|
|
|
|
|
252
|
$retval |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub YYData { |
97
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
exists($$self{USER}) |
100
|
0
|
0
|
|
|
|
0
|
or $$self{USER}={}; |
101
|
|
|
|
|
|
|
|
102
|
0
|
|
|
|
|
0
|
$$self{USER}; |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
sub YYErrok { |
107
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
108
|
|
|
|
|
|
|
|
109
|
0
|
|
|
|
|
0
|
${$$self{ERRST}}=0; |
|
0
|
|
|
|
|
0
|
|
110
|
0
|
|
|
|
|
0
|
undef; |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
sub YYNberr { |
114
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
115
|
|
|
|
|
|
|
|
116
|
0
|
|
|
|
|
0
|
${$$self{NBERR}}; |
|
0
|
|
|
|
|
0
|
|
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
sub YYRecovering { |
120
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
121
|
|
|
|
|
|
|
|
122
|
0
|
|
|
|
|
0
|
${$$self{ERRST}} != 0; |
|
0
|
|
|
|
|
0
|
|
123
|
|
|
|
|
|
|
} |
124
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
sub YYAbort { |
126
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
127
|
|
|
|
|
|
|
|
128
|
0
|
|
|
|
|
0
|
${$$self{CHECK}}='ABORT'; |
|
0
|
|
|
|
|
0
|
|
129
|
0
|
|
|
|
|
0
|
undef; |
130
|
|
|
|
|
|
|
} |
131
|
|
|
|
|
|
|
|
132
|
|
|
|
|
|
|
sub YYAccept { |
133
|
7
|
|
|
7
|
0
|
9
|
my($self)=shift; |
134
|
|
|
|
|
|
|
|
135
|
7
|
|
|
|
|
7
|
${$$self{CHECK}}='ACCEPT'; |
|
7
|
|
|
|
|
11
|
|
136
|
7
|
|
|
|
|
8
|
undef; |
137
|
|
|
|
|
|
|
} |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
sub YYError { |
140
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
141
|
|
|
|
|
|
|
|
142
|
0
|
|
|
|
|
0
|
${$$self{CHECK}}='ERROR'; |
|
0
|
|
|
|
|
0
|
|
143
|
0
|
|
|
|
|
0
|
undef; |
144
|
|
|
|
|
|
|
} |
145
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
sub YYSemval { |
147
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
148
|
0
|
|
|
|
|
0
|
my($index)= $_[0] - ${$$self{DOTPOS}} - 1; |
|
0
|
|
|
|
|
0
|
|
149
|
|
|
|
|
|
|
|
150
|
|
|
|
|
|
|
$index < 0 |
151
|
0
|
|
|
|
|
0
|
and -$index <= @{$$self{STACK}} |
152
|
0
|
0
|
0
|
|
|
0
|
and return $$self{STACK}[$index][1]; |
153
|
|
|
|
|
|
|
|
154
|
0
|
|
|
|
|
0
|
undef; #Invalid index |
155
|
|
|
|
|
|
|
} |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
sub YYCurtok { |
158
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
@_ |
161
|
0
|
0
|
|
|
|
0
|
and ${$$self{TOKEN}}=$_[0]; |
|
0
|
|
|
|
|
0
|
|
162
|
0
|
|
|
|
|
0
|
${$$self{TOKEN}}; |
|
0
|
|
|
|
|
0
|
|
163
|
|
|
|
|
|
|
} |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
sub YYCurval { |
166
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
@_ |
169
|
0
|
0
|
|
|
|
0
|
and ${$$self{VALUE}}=$_[0]; |
|
0
|
|
|
|
|
0
|
|
170
|
0
|
|
|
|
|
0
|
${$$self{VALUE}}; |
|
0
|
|
|
|
|
0
|
|
171
|
|
|
|
|
|
|
} |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
sub YYExpect { |
174
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
175
|
|
|
|
|
|
|
|
176
|
0
|
|
|
|
|
0
|
keys %{$self->{STATES}[$self->{STACK}[-1][0]]{ACTIONS}} |
|
0
|
|
|
|
|
0
|
|
177
|
|
|
|
|
|
|
} |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
sub YYLexer { |
180
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
181
|
|
|
|
|
|
|
|
182
|
0
|
|
|
|
|
0
|
$$self{LEX}; |
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
################# |
187
|
|
|
|
|
|
|
# Private stuff # |
188
|
|
|
|
|
|
|
################# |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
sub _CheckParams { |
192
|
14
|
|
|
14
|
|
15
|
my($mandatory,$checklist,$inarray,$outhash)=@_; |
193
|
14
|
|
|
|
|
9
|
my($prm,$value); |
194
|
14
|
|
|
|
|
18
|
my($prmlst)={}; |
195
|
|
|
|
|
|
|
|
196
|
14
|
|
|
|
|
47
|
while(($prm,$value)=splice(@$inarray,0,2)) { |
197
|
42
|
|
|
|
|
38
|
$prm=uc($prm); |
198
|
42
|
50
|
|
|
|
66
|
exists($$checklist{$prm}) |
199
|
|
|
|
|
|
|
or croak("Unknow parameter '$prm'"); |
200
|
42
|
50
|
|
|
|
69
|
ref($value) eq $$checklist{$prm} |
201
|
|
|
|
|
|
|
or croak("Invalid value for parameter '$prm'"); |
202
|
42
|
|
|
|
|
70
|
$prm=unpack('@2A*',$prm); |
203
|
42
|
|
|
|
|
115
|
$$outhash{$prm}=$value; |
204
|
|
|
|
|
|
|
} |
205
|
14
|
|
|
|
|
32
|
for (@$mandatory) { |
206
|
21
|
50
|
|
|
|
41
|
exists($$outhash{$_}) |
207
|
|
|
|
|
|
|
or croak("Missing mandatory parameter '".lc($_)."'"); |
208
|
|
|
|
|
|
|
} |
209
|
|
|
|
|
|
|
} |
210
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
sub _Error { |
212
|
0
|
|
|
0
|
|
0
|
print "Parse error.\n"; |
213
|
|
|
|
|
|
|
} |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
sub _DBLoad { |
216
|
|
|
|
|
|
|
{ |
217
|
6
|
|
|
6
|
|
28
|
no strict 'refs'; |
|
6
|
|
|
0
|
|
9
|
|
|
6
|
|
|
|
|
8938
|
|
|
0
|
|
|
|
|
0
|
|
218
|
|
|
|
|
|
|
|
219
|
0
|
|
|
|
|
0
|
exists(${__PACKAGE__.'::'}{_DBParse})#Already loaded ? |
220
|
0
|
0
|
|
|
|
0
|
and return; |
221
|
|
|
|
|
|
|
} |
222
|
0
|
|
|
|
|
0
|
my($fname)=__FILE__; |
223
|
0
|
|
|
|
|
0
|
my(@drv); |
224
|
0
|
0
|
|
|
|
0
|
open(DRV,"<$fname") or die "Report this as a BUG: Cannot open $fname"; |
225
|
0
|
|
|
|
|
0
|
while() { |
226
|
|
|
|
|
|
|
/^\s*sub\s+_Parse\s*{\s*$/ .. /^\s*}\s*#\s*_Parse\s*$/ |
227
|
0
|
0
|
|
|
|
0
|
and do { |
228
|
0
|
|
|
|
|
0
|
s/^#DBG>//; |
229
|
0
|
|
|
|
|
0
|
push(@drv,$_); |
230
|
|
|
|
|
|
|
} |
231
|
|
|
|
|
|
|
} |
232
|
0
|
|
|
|
|
0
|
close(DRV); |
233
|
|
|
|
|
|
|
|
234
|
0
|
|
|
|
|
0
|
$drv[0]=~s/_P/_DBP/; |
235
|
0
|
|
|
|
|
0
|
eval join('',@drv); |
236
|
|
|
|
|
|
|
} |
237
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
#Note that for loading debugging version of the driver, |
239
|
|
|
|
|
|
|
#this file will be parsed from 'sub _Parse' up to '}#_Parse' inclusive. |
240
|
|
|
|
|
|
|
#So, DO NOT remove comment at end of sub !!! |
241
|
|
|
|
|
|
|
sub _Parse { |
242
|
7
|
|
|
7
|
|
12
|
my($self)=shift; |
243
|
|
|
|
|
|
|
|
244
|
|
|
|
|
|
|
my($rules,$states,$lex,$error) |
245
|
7
|
|
|
|
|
16
|
= @$self{ 'RULES', 'STATES', 'LEX', 'ERROR' }; |
246
|
|
|
|
|
|
|
my($errstatus,$nberror,$token,$value,$stack,$check,$dotpos) |
247
|
7
|
|
|
|
|
14
|
= @$self{ 'ERRST', 'NBERR', 'TOKEN', 'VALUE', 'STACK', 'CHECK', 'DOTPOS' }; |
248
|
|
|
|
|
|
|
|
249
|
|
|
|
|
|
|
#DBG> my($debug)=$$self{DEBUG}; |
250
|
|
|
|
|
|
|
#DBG> my($dbgerror)=0; |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
#DBG> my($ShowCurToken) = sub { |
253
|
|
|
|
|
|
|
#DBG> my($tok)='>'; |
254
|
|
|
|
|
|
|
#DBG> for (split('',$$token)) { |
255
|
|
|
|
|
|
|
#DBG> $tok.= (ord($_) < 32 or ord($_) > 126) |
256
|
|
|
|
|
|
|
#DBG> ? sprintf('<%02X>',ord($_)) |
257
|
|
|
|
|
|
|
#DBG> : $_; |
258
|
|
|
|
|
|
|
#DBG> } |
259
|
|
|
|
|
|
|
#DBG> $tok.='<'; |
260
|
|
|
|
|
|
|
#DBG> }; |
261
|
|
|
|
|
|
|
|
262
|
7
|
|
|
|
|
11
|
$$errstatus=0; |
263
|
7
|
|
|
|
|
7
|
$$nberror=0; |
264
|
7
|
|
|
|
|
10
|
($$token,$$value)=(undef,undef); |
265
|
7
|
|
|
|
|
12
|
@$stack=( [ 0, undef ] ); |
266
|
7
|
|
|
|
|
8
|
$$check=''; |
267
|
|
|
|
|
|
|
|
268
|
7
|
|
|
|
|
7
|
while(1) { |
269
|
676
|
|
|
|
|
416
|
my($actions,$act,$stateno); |
270
|
|
|
|
|
|
|
|
271
|
676
|
|
|
|
|
464
|
$stateno=$$stack[-1][0]; |
272
|
676
|
|
|
|
|
403
|
$actions=$$states[$stateno]; |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
#DBG> print STDERR ('-' x 40),"\n"; |
275
|
|
|
|
|
|
|
#DBG> $debug & 0x2 |
276
|
|
|
|
|
|
|
#DBG> and print STDERR "In state $stateno:\n"; |
277
|
|
|
|
|
|
|
#DBG> $debug & 0x08 |
278
|
|
|
|
|
|
|
#DBG> and print STDERR "Stack:[". |
279
|
|
|
|
|
|
|
#DBG> join(',',map { $$_[0] } @$stack). |
280
|
|
|
|
|
|
|
#DBG> "]\n"; |
281
|
|
|
|
|
|
|
|
282
|
|
|
|
|
|
|
|
283
|
676
|
100
|
|
|
|
689
|
if (exists($$actions{ACTIONS})) { |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
defined($$token) |
286
|
265
|
100
|
|
|
|
337
|
or do { |
287
|
258
|
|
|
|
|
384
|
($$token,$$value)=&$lex($self); |
288
|
|
|
|
|
|
|
#DBG> $debug & 0x01 |
289
|
|
|
|
|
|
|
#DBG> and print STDERR "Need token. Got ".&$ShowCurToken."\n"; |
290
|
|
|
|
|
|
|
}; |
291
|
|
|
|
|
|
|
|
292
|
|
|
|
|
|
|
$act= exists($$actions{ACTIONS}{$$token}) |
293
|
|
|
|
|
|
|
? $$actions{ACTIONS}{$$token} |
294
|
|
|
|
|
|
|
: exists($$actions{DEFAULT}) |
295
|
|
|
|
|
|
|
? $$actions{DEFAULT} |
296
|
265
|
50
|
|
|
|
1273
|
: undef; |
|
|
100
|
|
|
|
|
|
297
|
|
|
|
|
|
|
} |
298
|
|
|
|
|
|
|
else { |
299
|
411
|
|
|
|
|
311
|
$act=$$actions{DEFAULT}; |
300
|
|
|
|
|
|
|
#DBG> $debug & 0x01 |
301
|
|
|
|
|
|
|
#DBG> and print STDERR "Don't need token.\n"; |
302
|
|
|
|
|
|
|
} |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
defined($act) |
305
|
676
|
50
|
|
|
|
829
|
and do { |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
$act > 0 |
308
|
676
|
100
|
|
|
|
749
|
and do { #shift |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
#DBG> $debug & 0x04 |
311
|
|
|
|
|
|
|
#DBG> and print STDERR "Shift and go to state $act.\n"; |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
$$errstatus |
314
|
258
|
50
|
|
|
|
304
|
and do { |
315
|
0
|
|
|
|
|
0
|
--$$errstatus; |
316
|
|
|
|
|
|
|
|
317
|
|
|
|
|
|
|
#DBG> $debug & 0x10 |
318
|
|
|
|
|
|
|
#DBG> and $dbgerror |
319
|
|
|
|
|
|
|
#DBG> and $$errstatus == 0 |
320
|
|
|
|
|
|
|
#DBG> and do { |
321
|
|
|
|
|
|
|
#DBG> print STDERR "**End of Error recovery.\n"; |
322
|
|
|
|
|
|
|
#DBG> $dbgerror=0; |
323
|
|
|
|
|
|
|
#DBG> }; |
324
|
|
|
|
|
|
|
}; |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
|
327
|
258
|
|
|
|
|
348
|
push(@$stack,[ $act, $$value ]); |
328
|
|
|
|
|
|
|
|
329
|
258
|
100
|
|
|
|
412
|
$$token ne '' #Don't eat the eof |
330
|
|
|
|
|
|
|
and $$token=$$value=undef; |
331
|
258
|
|
|
|
|
210
|
next; |
332
|
|
|
|
|
|
|
}; |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
#reduce |
335
|
418
|
|
|
|
|
262
|
my($lhs,$len,$code,@sempar,$semval); |
336
|
418
|
|
|
|
|
246
|
($lhs,$len,$code)=@{$$rules[-$act]}; |
|
418
|
|
|
|
|
552
|
|
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
#DBG> $debug & 0x04 |
339
|
|
|
|
|
|
|
#DBG> and $act |
340
|
|
|
|
|
|
|
#DBG> and print STDERR "Reduce using rule ".-$act." ($lhs,$len): "; |
341
|
|
|
|
|
|
|
|
342
|
418
|
100
|
|
|
|
556
|
$act |
343
|
|
|
|
|
|
|
or $self->YYAccept(); |
344
|
|
|
|
|
|
|
|
345
|
418
|
|
|
|
|
253
|
$$dotpos=$len; |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
unpack('A1',$lhs) eq '@' #In line rule |
348
|
418
|
50
|
|
|
|
755
|
and do { |
349
|
0
|
0
|
|
|
|
0
|
$lhs =~ /^\@[0-9]+\-([0-9]+)$/ |
350
|
|
|
|
|
|
|
or die "In line rule name '$lhs' ill formed: ". |
351
|
|
|
|
|
|
|
"report it as a BUG.\n"; |
352
|
0
|
|
|
|
|
0
|
$$dotpos = $1; |
353
|
|
|
|
|
|
|
}; |
354
|
|
|
|
|
|
|
|
355
|
|
|
|
|
|
|
@sempar = $$dotpos |
356
|
418
|
50
|
|
|
|
716
|
? map { $$_[1] } @$stack[ -$$dotpos .. -1 ] |
|
669
|
|
|
|
|
853
|
|
357
|
|
|
|
|
|
|
: (); |
358
|
|
|
|
|
|
|
|
359
|
418
|
50
|
|
|
|
785
|
$semval = $code ? &$code( $self, @sempar ) |
|
|
100
|
|
|
|
|
|
360
|
|
|
|
|
|
|
: @sempar ? $sempar[0] : undef; |
361
|
|
|
|
|
|
|
|
362
|
418
|
|
|
|
|
439
|
splice(@$stack,-$len,$len); |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
$$check eq 'ACCEPT' |
365
|
418
|
100
|
|
|
|
582
|
and do { |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
#DBG> $debug & 0x04 |
368
|
|
|
|
|
|
|
#DBG> and print STDERR "Accept.\n"; |
369
|
|
|
|
|
|
|
|
370
|
7
|
|
|
|
|
16
|
return($semval); |
371
|
|
|
|
|
|
|
}; |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
$$check eq 'ABORT' |
374
|
411
|
50
|
|
|
|
452
|
and do { |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
#DBG> $debug & 0x04 |
377
|
|
|
|
|
|
|
#DBG> and print STDERR "Abort.\n"; |
378
|
|
|
|
|
|
|
|
379
|
0
|
|
|
|
|
0
|
return(undef); |
380
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
}; |
382
|
|
|
|
|
|
|
|
383
|
|
|
|
|
|
|
#DBG> $debug & 0x04 |
384
|
|
|
|
|
|
|
#DBG> and print STDERR "Back to state $$stack[-1][0], then "; |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
$$check eq 'ERROR' |
387
|
411
|
50
|
|
|
|
454
|
or do { |
388
|
|
|
|
|
|
|
#DBG> $debug & 0x04 |
389
|
|
|
|
|
|
|
#DBG> and print STDERR |
390
|
|
|
|
|
|
|
#DBG> "go to state $$states[$$stack[-1][0]]{GOTOS}{$lhs}.\n"; |
391
|
|
|
|
|
|
|
|
392
|
|
|
|
|
|
|
#DBG> $debug & 0x10 |
393
|
|
|
|
|
|
|
#DBG> and $dbgerror |
394
|
|
|
|
|
|
|
#DBG> and $$errstatus == 0 |
395
|
|
|
|
|
|
|
#DBG> and do { |
396
|
|
|
|
|
|
|
#DBG> print STDERR "**End of Error recovery.\n"; |
397
|
|
|
|
|
|
|
#DBG> $dbgerror=0; |
398
|
|
|
|
|
|
|
#DBG> }; |
399
|
|
|
|
|
|
|
|
400
|
|
|
|
|
|
|
push(@$stack, |
401
|
411
|
|
|
|
|
618
|
[ $$states[$$stack[-1][0]]{GOTOS}{$lhs}, $semval ]); |
402
|
411
|
|
|
|
|
293
|
$$check=''; |
403
|
411
|
|
|
|
|
439
|
next; |
404
|
|
|
|
|
|
|
}; |
405
|
|
|
|
|
|
|
|
406
|
|
|
|
|
|
|
#DBG> $debug & 0x04 |
407
|
|
|
|
|
|
|
#DBG> and print STDERR "Forced Error recovery.\n"; |
408
|
|
|
|
|
|
|
|
409
|
0
|
|
|
|
|
|
$$check=''; |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
}; |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
#Error |
414
|
|
|
|
|
|
|
$$errstatus |
415
|
0
|
0
|
|
|
|
|
or do { |
416
|
|
|
|
|
|
|
|
417
|
0
|
|
|
|
|
|
$$errstatus = 1; |
418
|
0
|
|
|
|
|
|
&$error($self); |
419
|
0
|
0
|
|
|
|
|
$$errstatus # if 0, then YYErrok has been called |
420
|
|
|
|
|
|
|
or next; # so continue parsing |
421
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
#DBG> $debug & 0x10 |
423
|
|
|
|
|
|
|
#DBG> and do { |
424
|
|
|
|
|
|
|
#DBG> print STDERR "**Entering Error recovery.\n"; |
425
|
|
|
|
|
|
|
#DBG> ++$dbgerror; |
426
|
|
|
|
|
|
|
#DBG> }; |
427
|
|
|
|
|
|
|
|
428
|
0
|
|
|
|
|
|
++$$nberror; |
429
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
}; |
431
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
$$errstatus == 3 #The next token is not valid: discard it |
433
|
0
|
0
|
|
|
|
|
and do { |
434
|
|
|
|
|
|
|
$$token eq '' # End of input: no hope |
435
|
0
|
0
|
|
|
|
|
and do { |
436
|
|
|
|
|
|
|
#DBG> $debug & 0x10 |
437
|
|
|
|
|
|
|
#DBG> and print STDERR "**At eof: aborting.\n"; |
438
|
0
|
|
|
|
|
|
return(undef); |
439
|
|
|
|
|
|
|
}; |
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
#DBG> $debug & 0x10 |
442
|
|
|
|
|
|
|
#DBG> and print STDERR "**Dicard invalid token ".&$ShowCurToken.".\n"; |
443
|
|
|
|
|
|
|
|
444
|
0
|
|
|
|
|
|
$$token=$$value=undef; |
445
|
|
|
|
|
|
|
}; |
446
|
|
|
|
|
|
|
|
447
|
0
|
|
|
|
|
|
$$errstatus=3; |
448
|
|
|
|
|
|
|
|
449
|
0
|
|
0
|
|
|
|
while( @$stack |
|
|
|
0
|
|
|
|
|
450
|
|
|
|
|
|
|
and ( not exists($$states[$$stack[-1][0]]{ACTIONS}) |
451
|
|
|
|
|
|
|
or not exists($$states[$$stack[-1][0]]{ACTIONS}{error}) |
452
|
|
|
|
|
|
|
or $$states[$$stack[-1][0]]{ACTIONS}{error} <= 0)) { |
453
|
|
|
|
|
|
|
|
454
|
|
|
|
|
|
|
#DBG> $debug & 0x10 |
455
|
|
|
|
|
|
|
#DBG> and print STDERR "**Pop state $$stack[-1][0].\n"; |
456
|
|
|
|
|
|
|
|
457
|
0
|
|
|
|
|
|
pop(@$stack); |
458
|
|
|
|
|
|
|
} |
459
|
|
|
|
|
|
|
|
460
|
|
|
|
|
|
|
@$stack |
461
|
0
|
0
|
|
|
|
|
or do { |
462
|
|
|
|
|
|
|
|
463
|
|
|
|
|
|
|
#DBG> $debug & 0x10 |
464
|
|
|
|
|
|
|
#DBG> and print STDERR "**No state left on stack: aborting.\n"; |
465
|
|
|
|
|
|
|
|
466
|
0
|
|
|
|
|
|
return(undef); |
467
|
|
|
|
|
|
|
}; |
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
#shift the error token |
470
|
|
|
|
|
|
|
|
471
|
|
|
|
|
|
|
#DBG> $debug & 0x10 |
472
|
|
|
|
|
|
|
#DBG> and print STDERR "**Shift \$error token and go to state ". |
473
|
|
|
|
|
|
|
#DBG> $$states[$$stack[-1][0]]{ACTIONS}{error}. |
474
|
|
|
|
|
|
|
#DBG> ".\n"; |
475
|
|
|
|
|
|
|
|
476
|
0
|
|
|
|
|
|
push(@$stack, [ $$states[$$stack[-1][0]]{ACTIONS}{error}, undef ]); |
477
|
|
|
|
|
|
|
|
478
|
|
|
|
|
|
|
} |
479
|
|
|
|
|
|
|
|
480
|
|
|
|
|
|
|
#never reached |
481
|
0
|
|
|
|
|
|
croak("Error in driver logic. Please, report it as a BUG"); |
482
|
|
|
|
|
|
|
|
483
|
|
|
|
|
|
|
}#_Parse |
484
|
|
|
|
|
|
|
#DO NOT remove comment |
485
|
|
|
|
|
|
|
|
486
|
|
|
|
|
|
|
1; |
487
|
|
|
|
|
|
|
|
488
|
|
|
|
|
|
|
} |
489
|
|
|
|
|
|
|
#End of include-------------------------------------------------- |
490
|
|
|
|
|
|
|
|
491
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
#line 19 "parser.yp" |
493
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
sub YYERROR { |
495
|
|
|
|
|
|
|
join " ", @_; |
496
|
|
|
|
|
|
|
} |
497
|
|
|
|
|
|
|
|
498
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
sub new { |
500
|
|
|
|
|
|
|
my($class)=shift; |
501
|
|
|
|
|
|
|
ref($class) |
502
|
|
|
|
|
|
|
and $class=ref($class); |
503
|
|
|
|
|
|
|
|
504
|
|
|
|
|
|
|
my($self)=$class->SUPER::new( yyversion => '1.05', |
505
|
|
|
|
|
|
|
yystates => |
506
|
|
|
|
|
|
|
[ |
507
|
|
|
|
|
|
|
{#State 0 |
508
|
|
|
|
|
|
|
ACTIONS => { |
509
|
|
|
|
|
|
|
'OPENBRAC' => 8, |
510
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 1, |
511
|
|
|
|
|
|
|
'EOL' => 4 |
512
|
|
|
|
|
|
|
}, |
513
|
|
|
|
|
|
|
GOTOS => { |
514
|
|
|
|
|
|
|
'block_begin' => 3, |
515
|
|
|
|
|
|
|
'option' => 10, |
516
|
|
|
|
|
|
|
'statement_list' => 2, |
517
|
|
|
|
|
|
|
'statement' => 9, |
518
|
|
|
|
|
|
|
'block' => 6, |
519
|
|
|
|
|
|
|
'identifier' => 7, |
520
|
|
|
|
|
|
|
'entire_file' => 5 |
521
|
|
|
|
|
|
|
} |
522
|
|
|
|
|
|
|
}, |
523
|
|
|
|
|
|
|
{#State 1 |
524
|
|
|
|
|
|
|
DEFAULT => -9 |
525
|
|
|
|
|
|
|
}, |
526
|
|
|
|
|
|
|
{#State 2 |
527
|
|
|
|
|
|
|
ACTIONS => { |
528
|
|
|
|
|
|
|
'EOL' => 4, |
529
|
|
|
|
|
|
|
'OPENBRAC' => 8, |
530
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 1 |
531
|
|
|
|
|
|
|
}, |
532
|
|
|
|
|
|
|
DEFAULT => -20, |
533
|
|
|
|
|
|
|
GOTOS => { |
534
|
|
|
|
|
|
|
'statement' => 11, |
535
|
|
|
|
|
|
|
'block_begin' => 3, |
536
|
|
|
|
|
|
|
'option' => 10, |
537
|
|
|
|
|
|
|
'block' => 6, |
538
|
|
|
|
|
|
|
'identifier' => 7 |
539
|
|
|
|
|
|
|
} |
540
|
|
|
|
|
|
|
}, |
541
|
|
|
|
|
|
|
{#State 3 |
542
|
|
|
|
|
|
|
ACTIONS => { |
543
|
|
|
|
|
|
|
'EOL' => 4, |
544
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 1, |
545
|
|
|
|
|
|
|
'OPENBRAC' => 8 |
546
|
|
|
|
|
|
|
}, |
547
|
|
|
|
|
|
|
GOTOS => { |
548
|
|
|
|
|
|
|
'block' => 6, |
549
|
|
|
|
|
|
|
'identifier' => 7, |
550
|
|
|
|
|
|
|
'block_begin' => 3, |
551
|
|
|
|
|
|
|
'option' => 10, |
552
|
|
|
|
|
|
|
'statement_list' => 12, |
553
|
|
|
|
|
|
|
'statement' => 9 |
554
|
|
|
|
|
|
|
} |
555
|
|
|
|
|
|
|
}, |
556
|
|
|
|
|
|
|
{#State 4 |
557
|
|
|
|
|
|
|
DEFAULT => -17 |
558
|
|
|
|
|
|
|
}, |
559
|
|
|
|
|
|
|
{#State 5 |
560
|
|
|
|
|
|
|
ACTIONS => { |
561
|
|
|
|
|
|
|
'' => 13 |
562
|
|
|
|
|
|
|
} |
563
|
|
|
|
|
|
|
}, |
564
|
|
|
|
|
|
|
{#State 6 |
565
|
|
|
|
|
|
|
DEFAULT => -16 |
566
|
|
|
|
|
|
|
}, |
567
|
|
|
|
|
|
|
{#State 7 |
568
|
|
|
|
|
|
|
ACTIONS => { |
569
|
|
|
|
|
|
|
'NUMBER' => 16, |
570
|
|
|
|
|
|
|
'BFALSE' => 21, |
571
|
|
|
|
|
|
|
'BTRUE' => 19, |
572
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 18, |
573
|
|
|
|
|
|
|
'QUOTED_STRING' => 15 |
574
|
|
|
|
|
|
|
}, |
575
|
|
|
|
|
|
|
GOTOS => { |
576
|
|
|
|
|
|
|
'argument' => 20, |
577
|
|
|
|
|
|
|
'string' => 17, |
578
|
|
|
|
|
|
|
'argument_list' => 14 |
579
|
|
|
|
|
|
|
} |
580
|
|
|
|
|
|
|
}, |
581
|
|
|
|
|
|
|
{#State 8 |
582
|
|
|
|
|
|
|
ACTIONS => { |
583
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 1 |
584
|
|
|
|
|
|
|
}, |
585
|
|
|
|
|
|
|
GOTOS => { |
586
|
|
|
|
|
|
|
'identifier' => 22 |
587
|
|
|
|
|
|
|
} |
588
|
|
|
|
|
|
|
}, |
589
|
|
|
|
|
|
|
{#State 9 |
590
|
|
|
|
|
|
|
DEFAULT => -19 |
591
|
|
|
|
|
|
|
}, |
592
|
|
|
|
|
|
|
{#State 10 |
593
|
|
|
|
|
|
|
DEFAULT => -15 |
594
|
|
|
|
|
|
|
}, |
595
|
|
|
|
|
|
|
{#State 11 |
596
|
|
|
|
|
|
|
DEFAULT => -18 |
597
|
|
|
|
|
|
|
}, |
598
|
|
|
|
|
|
|
{#State 12 |
599
|
|
|
|
|
|
|
ACTIONS => { |
600
|
|
|
|
|
|
|
'OPENBRAC' => 24, |
601
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 1, |
602
|
|
|
|
|
|
|
'EOL' => 4 |
603
|
|
|
|
|
|
|
}, |
604
|
|
|
|
|
|
|
GOTOS => { |
605
|
|
|
|
|
|
|
'identifier' => 7, |
606
|
|
|
|
|
|
|
'block' => 6, |
607
|
|
|
|
|
|
|
'option' => 10, |
608
|
|
|
|
|
|
|
'block_begin' => 3, |
609
|
|
|
|
|
|
|
'block_end' => 23, |
610
|
|
|
|
|
|
|
'statement' => 11 |
611
|
|
|
|
|
|
|
} |
612
|
|
|
|
|
|
|
}, |
613
|
|
|
|
|
|
|
{#State 13 |
614
|
|
|
|
|
|
|
DEFAULT => 0 |
615
|
|
|
|
|
|
|
}, |
616
|
|
|
|
|
|
|
{#State 14 |
617
|
|
|
|
|
|
|
ACTIONS => { |
618
|
|
|
|
|
|
|
'QUOTED_STRING' => 15, |
619
|
|
|
|
|
|
|
'EOL' => 25, |
620
|
|
|
|
|
|
|
'BTRUE' => 19, |
621
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 18, |
622
|
|
|
|
|
|
|
'BFALSE' => 21, |
623
|
|
|
|
|
|
|
'NUMBER' => 16 |
624
|
|
|
|
|
|
|
}, |
625
|
|
|
|
|
|
|
GOTOS => { |
626
|
|
|
|
|
|
|
'string' => 17, |
627
|
|
|
|
|
|
|
'argument' => 26 |
628
|
|
|
|
|
|
|
} |
629
|
|
|
|
|
|
|
}, |
630
|
|
|
|
|
|
|
{#State 15 |
631
|
|
|
|
|
|
|
DEFAULT => -1 |
632
|
|
|
|
|
|
|
}, |
633
|
|
|
|
|
|
|
{#State 16 |
634
|
|
|
|
|
|
|
DEFAULT => -3 |
635
|
|
|
|
|
|
|
}, |
636
|
|
|
|
|
|
|
{#State 17 |
637
|
|
|
|
|
|
|
DEFAULT => -6 |
638
|
|
|
|
|
|
|
}, |
639
|
|
|
|
|
|
|
{#State 18 |
640
|
|
|
|
|
|
|
DEFAULT => -2 |
641
|
|
|
|
|
|
|
}, |
642
|
|
|
|
|
|
|
{#State 19 |
643
|
|
|
|
|
|
|
DEFAULT => -4 |
644
|
|
|
|
|
|
|
}, |
645
|
|
|
|
|
|
|
{#State 20 |
646
|
|
|
|
|
|
|
DEFAULT => -8 |
647
|
|
|
|
|
|
|
}, |
648
|
|
|
|
|
|
|
{#State 21 |
649
|
|
|
|
|
|
|
DEFAULT => -5 |
650
|
|
|
|
|
|
|
}, |
651
|
|
|
|
|
|
|
{#State 22 |
652
|
|
|
|
|
|
|
ACTIONS => { |
653
|
|
|
|
|
|
|
'NUMBER' => 16, |
654
|
|
|
|
|
|
|
'BTRUE' => 19, |
655
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 18, |
656
|
|
|
|
|
|
|
'CLOSEBRAC' => 27, |
657
|
|
|
|
|
|
|
'BFALSE' => 21, |
658
|
|
|
|
|
|
|
'QUOTED_STRING' => 15 |
659
|
|
|
|
|
|
|
}, |
660
|
|
|
|
|
|
|
GOTOS => { |
661
|
|
|
|
|
|
|
'argument_list' => 28, |
662
|
|
|
|
|
|
|
'string' => 17, |
663
|
|
|
|
|
|
|
'argument' => 20 |
664
|
|
|
|
|
|
|
} |
665
|
|
|
|
|
|
|
}, |
666
|
|
|
|
|
|
|
{#State 23 |
667
|
|
|
|
|
|
|
DEFAULT => -14 |
668
|
|
|
|
|
|
|
}, |
669
|
|
|
|
|
|
|
{#State 24 |
670
|
|
|
|
|
|
|
ACTIONS => { |
671
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 1, |
672
|
|
|
|
|
|
|
'SLASH' => 29 |
673
|
|
|
|
|
|
|
}, |
674
|
|
|
|
|
|
|
GOTOS => { |
675
|
|
|
|
|
|
|
'identifier' => 22 |
676
|
|
|
|
|
|
|
} |
677
|
|
|
|
|
|
|
}, |
678
|
|
|
|
|
|
|
{#State 25 |
679
|
|
|
|
|
|
|
DEFAULT => -10 |
680
|
|
|
|
|
|
|
}, |
681
|
|
|
|
|
|
|
{#State 26 |
682
|
|
|
|
|
|
|
DEFAULT => -7 |
683
|
|
|
|
|
|
|
}, |
684
|
|
|
|
|
|
|
{#State 27 |
685
|
|
|
|
|
|
|
ACTIONS => { |
686
|
|
|
|
|
|
|
'EOL' => 30 |
687
|
|
|
|
|
|
|
} |
688
|
|
|
|
|
|
|
}, |
689
|
|
|
|
|
|
|
{#State 28 |
690
|
|
|
|
|
|
|
ACTIONS => { |
691
|
|
|
|
|
|
|
'QUOTED_STRING' => 15, |
692
|
|
|
|
|
|
|
'NUMBER' => 16, |
693
|
|
|
|
|
|
|
'BTRUE' => 19, |
694
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 18, |
695
|
|
|
|
|
|
|
'CLOSEBRAC' => 31, |
696
|
|
|
|
|
|
|
'BFALSE' => 21 |
697
|
|
|
|
|
|
|
}, |
698
|
|
|
|
|
|
|
GOTOS => { |
699
|
|
|
|
|
|
|
'argument' => 26, |
700
|
|
|
|
|
|
|
'string' => 17 |
701
|
|
|
|
|
|
|
} |
702
|
|
|
|
|
|
|
}, |
703
|
|
|
|
|
|
|
{#State 29 |
704
|
|
|
|
|
|
|
ACTIONS => { |
705
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 1 |
706
|
|
|
|
|
|
|
}, |
707
|
|
|
|
|
|
|
GOTOS => { |
708
|
|
|
|
|
|
|
'identifier' => 32 |
709
|
|
|
|
|
|
|
} |
710
|
|
|
|
|
|
|
}, |
711
|
|
|
|
|
|
|
{#State 30 |
712
|
|
|
|
|
|
|
DEFAULT => -11 |
713
|
|
|
|
|
|
|
}, |
714
|
|
|
|
|
|
|
{#State 31 |
715
|
|
|
|
|
|
|
ACTIONS => { |
716
|
|
|
|
|
|
|
'EOL' => 33 |
717
|
|
|
|
|
|
|
} |
718
|
|
|
|
|
|
|
}, |
719
|
|
|
|
|
|
|
{#State 32 |
720
|
|
|
|
|
|
|
ACTIONS => { |
721
|
|
|
|
|
|
|
'CLOSEBRAC' => 34 |
722
|
|
|
|
|
|
|
} |
723
|
|
|
|
|
|
|
}, |
724
|
|
|
|
|
|
|
{#State 33 |
725
|
|
|
|
|
|
|
DEFAULT => -12 |
726
|
|
|
|
|
|
|
}, |
727
|
|
|
|
|
|
|
{#State 34 |
728
|
|
|
|
|
|
|
ACTIONS => { |
729
|
|
|
|
|
|
|
'EOL' => 35 |
730
|
|
|
|
|
|
|
} |
731
|
|
|
|
|
|
|
}, |
732
|
|
|
|
|
|
|
{#State 35 |
733
|
|
|
|
|
|
|
DEFAULT => -13 |
734
|
|
|
|
|
|
|
} |
735
|
|
|
|
|
|
|
], |
736
|
|
|
|
|
|
|
yyrules => |
737
|
|
|
|
|
|
|
[ |
738
|
|
|
|
|
|
|
[#Rule 0 |
739
|
|
|
|
|
|
|
'$start', 2, undef |
740
|
|
|
|
|
|
|
], |
741
|
|
|
|
|
|
|
[#Rule 1 |
742
|
|
|
|
|
|
|
'string', 1, |
743
|
|
|
|
|
|
|
sub |
744
|
|
|
|
|
|
|
#line 62 "parser.yp" |
745
|
|
|
|
|
|
|
{ unquote ($_[1]);} |
746
|
|
|
|
|
|
|
], |
747
|
|
|
|
|
|
|
[#Rule 2 |
748
|
|
|
|
|
|
|
'string', 1, |
749
|
|
|
|
|
|
|
sub |
750
|
|
|
|
|
|
|
#line 63 "parser.yp" |
751
|
|
|
|
|
|
|
{$_[1];} |
752
|
|
|
|
|
|
|
], |
753
|
|
|
|
|
|
|
[#Rule 3 |
754
|
|
|
|
|
|
|
'argument', 1, |
755
|
|
|
|
|
|
|
sub |
756
|
|
|
|
|
|
|
#line 67 "parser.yp" |
757
|
|
|
|
|
|
|
{$_[1]} |
758
|
|
|
|
|
|
|
], |
759
|
|
|
|
|
|
|
[#Rule 4 |
760
|
|
|
|
|
|
|
'argument', 1, |
761
|
|
|
|
|
|
|
sub |
762
|
|
|
|
|
|
|
#line 68 "parser.yp" |
763
|
|
|
|
|
|
|
{1} |
764
|
|
|
|
|
|
|
], |
765
|
|
|
|
|
|
|
[#Rule 5 |
766
|
|
|
|
|
|
|
'argument', 1, |
767
|
|
|
|
|
|
|
sub |
768
|
|
|
|
|
|
|
#line 69 "parser.yp" |
769
|
|
|
|
|
|
|
{0} |
770
|
|
|
|
|
|
|
], |
771
|
|
|
|
|
|
|
[#Rule 6 |
772
|
|
|
|
|
|
|
'argument', 1, |
773
|
|
|
|
|
|
|
sub |
774
|
|
|
|
|
|
|
#line 70 "parser.yp" |
775
|
|
|
|
|
|
|
{$_[1]} |
776
|
|
|
|
|
|
|
], |
777
|
|
|
|
|
|
|
[#Rule 7 |
778
|
|
|
|
|
|
|
'argument_list', 2, |
779
|
|
|
|
|
|
|
sub |
780
|
|
|
|
|
|
|
#line 75 "parser.yp" |
781
|
|
|
|
|
|
|
{ |
782
|
|
|
|
|
|
|
my $argument_list = $_[1]; |
783
|
|
|
|
|
|
|
push @{ $argument_list->{values} }, $_[2]; |
784
|
|
|
|
|
|
|
return $argument_list; |
785
|
|
|
|
|
|
|
} |
786
|
|
|
|
|
|
|
], |
787
|
|
|
|
|
|
|
[#Rule 8 |
788
|
|
|
|
|
|
|
'argument_list', 1, |
789
|
|
|
|
|
|
|
sub |
790
|
|
|
|
|
|
|
#line 81 "parser.yp" |
791
|
|
|
|
|
|
|
{ |
792
|
|
|
|
|
|
|
{ values => [ $_[1] ] }; |
793
|
|
|
|
|
|
|
} |
794
|
|
|
|
|
|
|
], |
795
|
|
|
|
|
|
|
[#Rule 9 |
796
|
|
|
|
|
|
|
'identifier', 1, |
797
|
|
|
|
|
|
|
sub |
798
|
|
|
|
|
|
|
#line 87 "parser.yp" |
799
|
|
|
|
|
|
|
{$_[1]} |
800
|
|
|
|
|
|
|
], |
801
|
|
|
|
|
|
|
[#Rule 10 |
802
|
|
|
|
|
|
|
'option', 3, |
803
|
|
|
|
|
|
|
sub |
804
|
|
|
|
|
|
|
#line 92 "parser.yp" |
805
|
|
|
|
|
|
|
{ |
806
|
|
|
|
|
|
|
{ |
807
|
|
|
|
|
|
|
children => [], |
808
|
|
|
|
|
|
|
key => $_[1], |
809
|
|
|
|
|
|
|
%{$_[2]}, |
810
|
|
|
|
|
|
|
}; |
811
|
|
|
|
|
|
|
} |
812
|
|
|
|
|
|
|
], |
813
|
|
|
|
|
|
|
[#Rule 11 |
814
|
|
|
|
|
|
|
'block_begin', 4, |
815
|
|
|
|
|
|
|
sub |
816
|
|
|
|
|
|
|
#line 103 "parser.yp" |
817
|
|
|
|
|
|
|
{ |
818
|
|
|
|
|
|
|
{key => $_[2], values => []}; |
819
|
|
|
|
|
|
|
} |
820
|
|
|
|
|
|
|
], |
821
|
|
|
|
|
|
|
[#Rule 12 |
822
|
|
|
|
|
|
|
'block_begin', 5, |
823
|
|
|
|
|
|
|
sub |
824
|
|
|
|
|
|
|
#line 108 "parser.yp" |
825
|
|
|
|
|
|
|
{ |
826
|
|
|
|
|
|
|
{key => $_[2], %{$_[3]}}; |
827
|
|
|
|
|
|
|
} |
828
|
|
|
|
|
|
|
], |
829
|
|
|
|
|
|
|
[#Rule 13 |
830
|
|
|
|
|
|
|
'block_end', 5, |
831
|
|
|
|
|
|
|
sub |
832
|
|
|
|
|
|
|
#line 115 "parser.yp" |
833
|
|
|
|
|
|
|
{ |
834
|
|
|
|
|
|
|
$_[3]; |
835
|
|
|
|
|
|
|
} |
836
|
|
|
|
|
|
|
], |
837
|
|
|
|
|
|
|
[#Rule 14 |
838
|
|
|
|
|
|
|
'block', 3, |
839
|
|
|
|
|
|
|
sub |
840
|
|
|
|
|
|
|
#line 122 "parser.yp" |
841
|
|
|
|
|
|
|
{ |
842
|
|
|
|
|
|
|
if ($_[1]->{key} ne $_[3]) |
843
|
|
|
|
|
|
|
{ |
844
|
|
|
|
|
|
|
printf ("block_begin = %s; block_end = %s;\n", $_[1]->{key}, $_[3]); |
845
|
|
|
|
|
|
|
YYERROR ("Block not closed..\n"); |
846
|
|
|
|
|
|
|
die; |
847
|
|
|
|
|
|
|
} |
848
|
|
|
|
|
|
|
return { |
849
|
|
|
|
|
|
|
%{$_[1]}, |
850
|
|
|
|
|
|
|
children => $_[2], |
851
|
|
|
|
|
|
|
}; |
852
|
|
|
|
|
|
|
} |
853
|
|
|
|
|
|
|
], |
854
|
|
|
|
|
|
|
[#Rule 15 |
855
|
|
|
|
|
|
|
'statement', 1, |
856
|
|
|
|
|
|
|
sub |
857
|
|
|
|
|
|
|
#line 137 "parser.yp" |
858
|
|
|
|
|
|
|
{ $_[1] } |
859
|
|
|
|
|
|
|
], |
860
|
|
|
|
|
|
|
[#Rule 16 |
861
|
|
|
|
|
|
|
'statement', 1, |
862
|
|
|
|
|
|
|
sub |
863
|
|
|
|
|
|
|
#line 138 "parser.yp" |
864
|
|
|
|
|
|
|
{ $_[1] } |
865
|
|
|
|
|
|
|
], |
866
|
|
|
|
|
|
|
[#Rule 17 |
867
|
|
|
|
|
|
|
'statement', 1, |
868
|
|
|
|
|
|
|
sub |
869
|
|
|
|
|
|
|
#line 139 "parser.yp" |
870
|
|
|
|
|
|
|
{ return } |
871
|
|
|
|
|
|
|
], |
872
|
|
|
|
|
|
|
[#Rule 18 |
873
|
|
|
|
|
|
|
'statement_list', 2, |
874
|
|
|
|
|
|
|
sub |
875
|
|
|
|
|
|
|
#line 144 "parser.yp" |
876
|
|
|
|
|
|
|
{ |
877
|
|
|
|
|
|
|
my $statement_list = $_[1]; |
878
|
|
|
|
|
|
|
push @{ $statement_list }, $_[2] if defined $_[2]; |
879
|
|
|
|
|
|
|
return $statement_list; |
880
|
|
|
|
|
|
|
} |
881
|
|
|
|
|
|
|
], |
882
|
|
|
|
|
|
|
[#Rule 19 |
883
|
|
|
|
|
|
|
'statement_list', 1, |
884
|
|
|
|
|
|
|
sub |
885
|
|
|
|
|
|
|
#line 150 "parser.yp" |
886
|
|
|
|
|
|
|
{ |
887
|
|
|
|
|
|
|
if (defined $_[1]) { |
888
|
|
|
|
|
|
|
return [ $_[1] ]; |
889
|
|
|
|
|
|
|
} else { |
890
|
|
|
|
|
|
|
return; |
891
|
|
|
|
|
|
|
} |
892
|
|
|
|
|
|
|
} |
893
|
|
|
|
|
|
|
], |
894
|
|
|
|
|
|
|
[#Rule 20 |
895
|
|
|
|
|
|
|
'entire_file', 1, |
896
|
|
|
|
|
|
|
sub |
897
|
|
|
|
|
|
|
#line 161 "parser.yp" |
898
|
|
|
|
|
|
|
{ |
899
|
|
|
|
|
|
|
$_[1]->[0]; |
900
|
|
|
|
|
|
|
} |
901
|
|
|
|
|
|
|
] |
902
|
|
|
|
|
|
|
], |
903
|
|
|
|
|
|
|
@_); |
904
|
|
|
|
|
|
|
bless($self,$class); |
905
|
|
|
|
|
|
|
} |
906
|
|
|
|
|
|
|
|
907
|
|
|
|
|
|
|
#line 166 "parser.yp" |
908
|
|
|
|
|
|
|
|
909
|
|
|
|
|
|
|
sub unquote ($) { |
910
|
|
|
|
|
|
|
(my $string = shift) =~ s/(?
|
911
|
|
|
|
|
|
|
return $string; |
912
|
|
|
|
|
|
|
} |
913
|
|
|
|
|
|
|
|
914
|
|
|
|
|
|
|
|
915
|
|
|
|
|
|
|
1; |