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
|
|
37
|
use vars qw ( @ISA ); |
|
6
|
|
|
|
|
14
|
|
|
6
|
|
|
|
|
310
|
|
12
|
6
|
|
|
6
|
|
32
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
458
|
|
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
|
|
30
|
use strict; |
|
6
|
|
|
|
|
49
|
|
|
6
|
|
|
|
|
194
|
|
37
|
|
|
|
|
|
|
|
38
|
6
|
|
|
6
|
|
29
|
use vars qw ( $VERSION $COMPATIBLE $FILENAME ); |
|
6
|
|
|
|
|
30
|
|
|
6
|
|
|
|
|
475
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
$VERSION = '1.05'; |
41
|
|
|
|
|
|
|
$COMPATIBLE = '0.07'; |
42
|
|
|
|
|
|
|
$FILENAME=__FILE__; |
43
|
|
|
|
|
|
|
|
44
|
6
|
|
|
6
|
|
36
|
use Carp; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
7521
|
|
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
|
4
|
|
|
4
|
0
|
10
|
my($class)=shift; |
54
|
4
|
|
|
|
|
9
|
my($errst,$nberr,$token,$value,$check,$dotpos); |
55
|
4
|
|
|
|
|
49
|
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
|
4
|
|
|
|
|
30
|
_CheckParams( [], \%params, \@_, $self ); |
66
|
|
|
|
|
|
|
|
67
|
4
|
50
|
33
|
|
|
54
|
exists($$self{VERSION}) |
68
|
|
|
|
|
|
|
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
|
4
|
50
|
|
|
|
28
|
ref($class) |
74
|
|
|
|
|
|
|
and $class=ref($class); |
75
|
|
|
|
|
|
|
|
76
|
4
|
|
|
|
|
28
|
bless($self,$class); |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
sub YYParse { |
80
|
4
|
|
|
4
|
0
|
8
|
my($self)=shift; |
81
|
4
|
|
|
|
|
9
|
my($retval); |
82
|
|
|
|
|
|
|
|
83
|
4
|
|
|
|
|
18
|
_CheckParams( \@params, \%params, \@_, $self ); |
84
|
|
|
|
|
|
|
|
85
|
4
|
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
|
4
|
|
|
|
|
35
|
$retval = $self->_Parse(); |
92
|
|
|
|
|
|
|
} |
93
|
4
|
|
|
|
|
288
|
$retval |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub YYData { |
97
|
0
|
|
|
0
|
0
|
0
|
my($self)=shift; |
98
|
|
|
|
|
|
|
|
99
|
0
|
0
|
|
|
|
0
|
exists($$self{USER}) |
100
|
|
|
|
|
|
|
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
|
4
|
|
|
4
|
0
|
10
|
my($self)=shift; |
134
|
|
|
|
|
|
|
|
135
|
4
|
|
|
|
|
7
|
${$$self{CHECK}}='ACCEPT'; |
|
4
|
|
|
|
|
12
|
|
136
|
4
|
|
|
|
|
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
|
0
|
|
|
|
|
0
|
$index < 0 |
151
|
0
|
0
|
0
|
|
|
0
|
and -$index <= @{$$self{STACK}} |
152
|
|
|
|
|
|
|
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
|
8
|
|
|
8
|
|
15
|
my($mandatory,$checklist,$inarray,$outhash)=@_; |
193
|
8
|
|
|
|
|
12
|
my($prm,$value); |
194
|
8
|
|
|
|
|
14
|
my($prmlst)={}; |
195
|
|
|
|
|
|
|
|
196
|
8
|
|
|
|
|
39
|
while(($prm,$value)=splice(@$inarray,0,2)) { |
197
|
24
|
|
|
|
|
39
|
$prm=uc($prm); |
198
|
24
|
50
|
|
|
|
59
|
exists($$checklist{$prm}) |
199
|
|
|
|
|
|
|
or croak("Unknow parameter '$prm'"); |
200
|
24
|
50
|
|
|
|
60
|
ref($value) eq $$checklist{$prm} |
201
|
|
|
|
|
|
|
or croak("Invalid value for parameter '$prm'"); |
202
|
24
|
|
|
|
|
70
|
$prm=unpack('@2A*',$prm); |
203
|
24
|
|
|
|
|
116
|
$$outhash{$prm}=$value; |
204
|
|
|
|
|
|
|
} |
205
|
8
|
|
|
|
|
26
|
for (@$mandatory) { |
206
|
12
|
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
|
|
38
|
no strict 'refs'; |
|
6
|
|
|
0
|
|
12
|
|
|
6
|
|
|
|
|
20049
|
|
|
0
|
|
|
|
|
0
|
|
218
|
|
|
|
|
|
|
|
219
|
0
|
0
|
|
|
|
0
|
exists(${__PACKAGE__.'::'}{_DBParse})#Already loaded ? |
|
0
|
|
|
|
|
0
|
|
220
|
|
|
|
|
|
|
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
|
4
|
|
|
4
|
|
19
|
my($self)=shift; |
243
|
|
|
|
|
|
|
|
244
|
4
|
|
|
|
|
20
|
my($rules,$states,$lex,$error) |
245
|
|
|
|
|
|
|
= @$self{ 'RULES', 'STATES', 'LEX', 'ERROR' }; |
246
|
4
|
|
|
|
|
14
|
my($errstatus,$nberror,$token,$value,$stack,$check,$dotpos) |
247
|
|
|
|
|
|
|
= @$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
|
4
|
|
|
|
|
9
|
$$errstatus=0; |
263
|
4
|
|
|
|
|
4
|
$$nberror=0; |
264
|
4
|
|
|
|
|
11
|
($$token,$$value)=(undef,undef); |
265
|
4
|
|
|
|
|
14
|
@$stack=( [ 0, undef ] ); |
266
|
4
|
|
|
|
|
9
|
$$check=''; |
267
|
|
|
|
|
|
|
|
268
|
4
|
|
|
|
|
6
|
while(1) { |
269
|
532
|
|
|
|
|
554
|
my($actions,$act,$stateno); |
270
|
|
|
|
|
|
|
|
271
|
532
|
|
|
|
|
741
|
$stateno=$$stack[-1][0]; |
272
|
532
|
|
|
|
|
612
|
$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
|
532
|
100
|
|
|
|
991
|
if (exists($$actions{ACTIONS})) { |
284
|
|
|
|
|
|
|
|
285
|
|
|
|
|
|
|
defined($$token) |
286
|
205
|
100
|
|
|
|
381
|
or do { |
287
|
201
|
|
|
|
|
467
|
($$token,$$value)=&$lex($self); |
288
|
|
|
|
|
|
|
#DBG> $debug & 0x01 |
289
|
|
|
|
|
|
|
#DBG> and print STDERR "Need token. Got ".&$ShowCurToken."\n"; |
290
|
|
|
|
|
|
|
}; |
291
|
|
|
|
|
|
|
|
292
|
205
|
50
|
|
|
|
1714
|
$act= exists($$actions{ACTIONS}{$$token}) |
|
|
100
|
|
|
|
|
|
293
|
|
|
|
|
|
|
? $$actions{ACTIONS}{$$token} |
294
|
|
|
|
|
|
|
: exists($$actions{DEFAULT}) |
295
|
|
|
|
|
|
|
? $$actions{DEFAULT} |
296
|
|
|
|
|
|
|
: undef; |
297
|
|
|
|
|
|
|
} |
298
|
|
|
|
|
|
|
else { |
299
|
327
|
|
|
|
|
485
|
$act=$$actions{DEFAULT}; |
300
|
|
|
|
|
|
|
#DBG> $debug & 0x01 |
301
|
|
|
|
|
|
|
#DBG> and print STDERR "Don't need token.\n"; |
302
|
|
|
|
|
|
|
} |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
defined($act) |
305
|
532
|
50
|
|
|
|
964
|
and do { |
306
|
|
|
|
|
|
|
|
307
|
|
|
|
|
|
|
$act > 0 |
308
|
532
|
100
|
|
|
|
951
|
and do { #shift |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
#DBG> $debug & 0x04 |
311
|
|
|
|
|
|
|
#DBG> and print STDERR "Shift and go to state $act.\n"; |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
$$errstatus |
314
|
201
|
50
|
|
|
|
583
|
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
|
201
|
|
|
|
|
465
|
push(@$stack,[ $act, $$value ]); |
328
|
|
|
|
|
|
|
|
329
|
201
|
100
|
|
|
|
591
|
$$token ne '' #Don't eat the eof |
330
|
|
|
|
|
|
|
and $$token=$$value=undef; |
331
|
201
|
|
|
|
|
433
|
next; |
332
|
|
|
|
|
|
|
}; |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
#reduce |
335
|
331
|
|
|
|
|
327
|
my($lhs,$len,$code,@sempar,$semval); |
336
|
331
|
|
|
|
|
325
|
($lhs,$len,$code)=@{$$rules[-$act]}; |
|
331
|
|
|
|
|
732
|
|
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
#DBG> $debug & 0x04 |
339
|
|
|
|
|
|
|
#DBG> and $act |
340
|
|
|
|
|
|
|
#DBG> and print STDERR "Reduce using rule ".-$act." ($lhs,$len): "; |
341
|
|
|
|
|
|
|
|
342
|
331
|
100
|
|
|
|
676
|
$act |
343
|
|
|
|
|
|
|
or $self->YYAccept(); |
344
|
|
|
|
|
|
|
|
345
|
331
|
|
|
|
|
347
|
$$dotpos=$len; |
346
|
|
|
|
|
|
|
|
347
|
|
|
|
|
|
|
unpack('A1',$lhs) eq '@' #In line rule |
348
|
331
|
50
|
|
|
|
944
|
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
|
528
|
|
|
|
|
1148
|
@sempar = $$dotpos |
356
|
331
|
50
|
|
|
|
861
|
? map { $$_[1] } @$stack[ -$$dotpos .. -1 ] |
357
|
|
|
|
|
|
|
: (); |
358
|
|
|
|
|
|
|
|
359
|
331
|
50
|
|
|
|
1078
|
$semval = $code ? &$code( $self, @sempar ) |
|
|
100
|
|
|
|
|
|
360
|
|
|
|
|
|
|
: @sempar ? $sempar[0] : undef; |
361
|
|
|
|
|
|
|
|
362
|
331
|
|
|
|
|
606
|
splice(@$stack,-$len,$len); |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
$$check eq 'ACCEPT' |
365
|
331
|
100
|
|
|
|
785
|
and do { |
366
|
|
|
|
|
|
|
|
367
|
|
|
|
|
|
|
#DBG> $debug & 0x04 |
368
|
|
|
|
|
|
|
#DBG> and print STDERR "Accept.\n"; |
369
|
|
|
|
|
|
|
|
370
|
4
|
|
|
|
|
18
|
return($semval); |
371
|
|
|
|
|
|
|
}; |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
$$check eq 'ABORT' |
374
|
327
|
50
|
|
|
|
569
|
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
|
327
|
50
|
|
|
|
599
|
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
|
327
|
|
|
|
|
993
|
push(@$stack, |
401
|
|
|
|
|
|
|
[ $$states[$$stack[-1][0]]{GOTOS}{$lhs}, $semval ]); |
402
|
327
|
|
|
|
|
429
|
$$check=''; |
403
|
327
|
|
|
|
|
646
|
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
|
|
|
|
|
|
|
'EOL' => 9, |
511
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 3 |
512
|
|
|
|
|
|
|
}, |
513
|
|
|
|
|
|
|
GOTOS => { |
514
|
|
|
|
|
|
|
'statement' => 2, |
515
|
|
|
|
|
|
|
'block' => 10, |
516
|
|
|
|
|
|
|
'block_begin' => 5, |
517
|
|
|
|
|
|
|
'entire_file' => 4, |
518
|
|
|
|
|
|
|
'option' => 1, |
519
|
|
|
|
|
|
|
'statement_list' => 7, |
520
|
|
|
|
|
|
|
'identifier' => 6 |
521
|
|
|
|
|
|
|
} |
522
|
|
|
|
|
|
|
}, |
523
|
|
|
|
|
|
|
{#State 1 |
524
|
|
|
|
|
|
|
DEFAULT => -15 |
525
|
|
|
|
|
|
|
}, |
526
|
|
|
|
|
|
|
{#State 2 |
527
|
|
|
|
|
|
|
DEFAULT => -19 |
528
|
|
|
|
|
|
|
}, |
529
|
|
|
|
|
|
|
{#State 3 |
530
|
|
|
|
|
|
|
DEFAULT => -9 |
531
|
|
|
|
|
|
|
}, |
532
|
|
|
|
|
|
|
{#State 4 |
533
|
|
|
|
|
|
|
ACTIONS => { |
534
|
|
|
|
|
|
|
'' => 11 |
535
|
|
|
|
|
|
|
} |
536
|
|
|
|
|
|
|
}, |
537
|
|
|
|
|
|
|
{#State 5 |
538
|
|
|
|
|
|
|
ACTIONS => { |
539
|
|
|
|
|
|
|
'EOL' => 9, |
540
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 3, |
541
|
|
|
|
|
|
|
'OPENBRAC' => 8 |
542
|
|
|
|
|
|
|
}, |
543
|
|
|
|
|
|
|
GOTOS => { |
544
|
|
|
|
|
|
|
'statement_list' => 12, |
545
|
|
|
|
|
|
|
'identifier' => 6, |
546
|
|
|
|
|
|
|
'option' => 1, |
547
|
|
|
|
|
|
|
'block_begin' => 5, |
548
|
|
|
|
|
|
|
'block' => 10, |
549
|
|
|
|
|
|
|
'statement' => 2 |
550
|
|
|
|
|
|
|
} |
551
|
|
|
|
|
|
|
}, |
552
|
|
|
|
|
|
|
{#State 6 |
553
|
|
|
|
|
|
|
ACTIONS => { |
554
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 19, |
555
|
|
|
|
|
|
|
'BTRUE' => 14, |
556
|
|
|
|
|
|
|
'BFALSE' => 18, |
557
|
|
|
|
|
|
|
'NUMBER' => 13, |
558
|
|
|
|
|
|
|
'QUOTED_STRING' => 16 |
559
|
|
|
|
|
|
|
}, |
560
|
|
|
|
|
|
|
GOTOS => { |
561
|
|
|
|
|
|
|
'argument_list' => 15, |
562
|
|
|
|
|
|
|
'string' => 20, |
563
|
|
|
|
|
|
|
'argument' => 17 |
564
|
|
|
|
|
|
|
} |
565
|
|
|
|
|
|
|
}, |
566
|
|
|
|
|
|
|
{#State 7 |
567
|
|
|
|
|
|
|
ACTIONS => { |
568
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 3, |
569
|
|
|
|
|
|
|
'OPENBRAC' => 8, |
570
|
|
|
|
|
|
|
'EOL' => 9 |
571
|
|
|
|
|
|
|
}, |
572
|
|
|
|
|
|
|
DEFAULT => -20, |
573
|
|
|
|
|
|
|
GOTOS => { |
574
|
|
|
|
|
|
|
'option' => 1, |
575
|
|
|
|
|
|
|
'block_begin' => 5, |
576
|
|
|
|
|
|
|
'identifier' => 6, |
577
|
|
|
|
|
|
|
'statement' => 21, |
578
|
|
|
|
|
|
|
'block' => 10 |
579
|
|
|
|
|
|
|
} |
580
|
|
|
|
|
|
|
}, |
581
|
|
|
|
|
|
|
{#State 8 |
582
|
|
|
|
|
|
|
ACTIONS => { |
583
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 3 |
584
|
|
|
|
|
|
|
}, |
585
|
|
|
|
|
|
|
GOTOS => { |
586
|
|
|
|
|
|
|
'identifier' => 22 |
587
|
|
|
|
|
|
|
} |
588
|
|
|
|
|
|
|
}, |
589
|
|
|
|
|
|
|
{#State 9 |
590
|
|
|
|
|
|
|
DEFAULT => -17 |
591
|
|
|
|
|
|
|
}, |
592
|
|
|
|
|
|
|
{#State 10 |
593
|
|
|
|
|
|
|
DEFAULT => -16 |
594
|
|
|
|
|
|
|
}, |
595
|
|
|
|
|
|
|
{#State 11 |
596
|
|
|
|
|
|
|
DEFAULT => 0 |
597
|
|
|
|
|
|
|
}, |
598
|
|
|
|
|
|
|
{#State 12 |
599
|
|
|
|
|
|
|
ACTIONS => { |
600
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 3, |
601
|
|
|
|
|
|
|
'OPENBRAC' => 23, |
602
|
|
|
|
|
|
|
'EOL' => 9 |
603
|
|
|
|
|
|
|
}, |
604
|
|
|
|
|
|
|
GOTOS => { |
605
|
|
|
|
|
|
|
'block_begin' => 5, |
606
|
|
|
|
|
|
|
'option' => 1, |
607
|
|
|
|
|
|
|
'identifier' => 6, |
608
|
|
|
|
|
|
|
'statement' => 21, |
609
|
|
|
|
|
|
|
'block_end' => 24, |
610
|
|
|
|
|
|
|
'block' => 10 |
611
|
|
|
|
|
|
|
} |
612
|
|
|
|
|
|
|
}, |
613
|
|
|
|
|
|
|
{#State 13 |
614
|
|
|
|
|
|
|
DEFAULT => -3 |
615
|
|
|
|
|
|
|
}, |
616
|
|
|
|
|
|
|
{#State 14 |
617
|
|
|
|
|
|
|
DEFAULT => -4 |
618
|
|
|
|
|
|
|
}, |
619
|
|
|
|
|
|
|
{#State 15 |
620
|
|
|
|
|
|
|
ACTIONS => { |
621
|
|
|
|
|
|
|
'EOL' => 25, |
622
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 19, |
623
|
|
|
|
|
|
|
'BTRUE' => 14, |
624
|
|
|
|
|
|
|
'BFALSE' => 18, |
625
|
|
|
|
|
|
|
'NUMBER' => 13, |
626
|
|
|
|
|
|
|
'QUOTED_STRING' => 16 |
627
|
|
|
|
|
|
|
}, |
628
|
|
|
|
|
|
|
GOTOS => { |
629
|
|
|
|
|
|
|
'argument' => 26, |
630
|
|
|
|
|
|
|
'string' => 20 |
631
|
|
|
|
|
|
|
} |
632
|
|
|
|
|
|
|
}, |
633
|
|
|
|
|
|
|
{#State 16 |
634
|
|
|
|
|
|
|
DEFAULT => -1 |
635
|
|
|
|
|
|
|
}, |
636
|
|
|
|
|
|
|
{#State 17 |
637
|
|
|
|
|
|
|
DEFAULT => -8 |
638
|
|
|
|
|
|
|
}, |
639
|
|
|
|
|
|
|
{#State 18 |
640
|
|
|
|
|
|
|
DEFAULT => -5 |
641
|
|
|
|
|
|
|
}, |
642
|
|
|
|
|
|
|
{#State 19 |
643
|
|
|
|
|
|
|
DEFAULT => -2 |
644
|
|
|
|
|
|
|
}, |
645
|
|
|
|
|
|
|
{#State 20 |
646
|
|
|
|
|
|
|
DEFAULT => -6 |
647
|
|
|
|
|
|
|
}, |
648
|
|
|
|
|
|
|
{#State 21 |
649
|
|
|
|
|
|
|
DEFAULT => -18 |
650
|
|
|
|
|
|
|
}, |
651
|
|
|
|
|
|
|
{#State 22 |
652
|
|
|
|
|
|
|
ACTIONS => { |
653
|
|
|
|
|
|
|
'QUOTED_STRING' => 16, |
654
|
|
|
|
|
|
|
'CLOSEBRAC' => 27, |
655
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 19, |
656
|
|
|
|
|
|
|
'BTRUE' => 14, |
657
|
|
|
|
|
|
|
'BFALSE' => 18, |
658
|
|
|
|
|
|
|
'NUMBER' => 13 |
659
|
|
|
|
|
|
|
}, |
660
|
|
|
|
|
|
|
GOTOS => { |
661
|
|
|
|
|
|
|
'argument_list' => 28, |
662
|
|
|
|
|
|
|
'string' => 20, |
663
|
|
|
|
|
|
|
'argument' => 17 |
664
|
|
|
|
|
|
|
} |
665
|
|
|
|
|
|
|
}, |
666
|
|
|
|
|
|
|
{#State 23 |
667
|
|
|
|
|
|
|
ACTIONS => { |
668
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 3, |
669
|
|
|
|
|
|
|
'SLASH' => 29 |
670
|
|
|
|
|
|
|
}, |
671
|
|
|
|
|
|
|
GOTOS => { |
672
|
|
|
|
|
|
|
'identifier' => 22 |
673
|
|
|
|
|
|
|
} |
674
|
|
|
|
|
|
|
}, |
675
|
|
|
|
|
|
|
{#State 24 |
676
|
|
|
|
|
|
|
DEFAULT => -14 |
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
|
|
|
|
|
|
|
'CLOSEBRAC' => 31, |
692
|
|
|
|
|
|
|
'QUOTED_STRING' => 16, |
693
|
|
|
|
|
|
|
'NUMBER' => 13, |
694
|
|
|
|
|
|
|
'BFALSE' => 18, |
695
|
|
|
|
|
|
|
'BTRUE' => 14, |
696
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 19 |
697
|
|
|
|
|
|
|
}, |
698
|
|
|
|
|
|
|
GOTOS => { |
699
|
|
|
|
|
|
|
'string' => 20, |
700
|
|
|
|
|
|
|
'argument' => 26 |
701
|
|
|
|
|
|
|
} |
702
|
|
|
|
|
|
|
}, |
703
|
|
|
|
|
|
|
{#State 29 |
704
|
|
|
|
|
|
|
ACTIONS => { |
705
|
|
|
|
|
|
|
'UNQUOTED_STRING' => 3 |
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; |