line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
######################################################################################## |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# This file was generated using Parse::Eyapp version 1.21. |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# Copyright © 2006, 2007, 2008, 2009, 2010, 2011, 2012 Casiano Rodriguez-Leon. |
6
|
|
|
|
|
|
|
# Copyright © 2017 William N. Braswell, Jr. |
7
|
|
|
|
|
|
|
# All Rights Reserved. |
8
|
|
|
|
|
|
|
# |
9
|
|
|
|
|
|
|
# Parse::Yapp is Copyright © 1998, 1999, 2000, 2001, Francois Desarmenien. |
10
|
|
|
|
|
|
|
# Parse::Yapp is Copyright © 2017 William N. Braswell, Jr. |
11
|
|
|
|
|
|
|
# All Rights Reserved. |
12
|
|
|
|
|
|
|
# |
13
|
|
|
|
|
|
|
# Don't edit this file, use source file 'lib/Parse/Eyapp/Parse.yp' instead. |
14
|
|
|
|
|
|
|
# |
15
|
|
|
|
|
|
|
# ANY CHANGE MADE HERE WILL BE LOST ! |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
######################################################################################## |
18
|
|
|
|
|
|
|
package Parse::Eyapp::Parse; |
19
|
61
|
|
|
61
|
|
349
|
use strict; |
|
61
|
|
|
|
|
120
|
|
|
61
|
|
|
|
|
3755
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
push @Parse::Eyapp::Parse::ISA, 'Parse::Eyapp::Driver'; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
BEGIN { |
27
|
|
|
|
|
|
|
# This strange way to load the modules is to guarantee compatibility when |
28
|
|
|
|
|
|
|
# using several standalone and non-standalone Eyapp parsers |
29
|
|
|
|
|
|
|
|
30
|
61
|
50
|
|
61
|
|
28459
|
require Parse::Eyapp::Driver unless Parse::Eyapp::Driver->can('YYParse'); |
31
|
61
|
50
|
|
|
|
31651
|
require Parse::Eyapp::Node unless Parse::Eyapp::Node->can('hnew'); |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
0
|
0
|
|
0
|
0
|
0
|
sub unexpendedInput { defined($_) ? substr($_, (defined(pos $_) ? pos $_ : 0)) : '' } |
|
|
0
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
# Copyright © 2006, 2007, 2008, 2009, 2010, 2011, 2012 Casiano Rodriguez-Leon. |
39
|
|
|
|
|
|
|
# Copyright © 2017 William N. Braswell, Jr. |
40
|
|
|
|
|
|
|
# All Rights Reserved. |
41
|
|
|
|
|
|
|
# |
42
|
|
|
|
|
|
|
# Based on Parse::Yapp. |
43
|
|
|
|
|
|
|
# |
44
|
|
|
|
|
|
|
# Parse::Yapp is Copyright © 1998, 1999, 2000, 2001, Francois Desarmenien. |
45
|
|
|
|
|
|
|
# Parse::Yapp is Copyright © 2017 William N. Braswell, Jr. |
46
|
|
|
|
|
|
|
# All Rights Reserved. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
require 5.004; |
49
|
|
|
|
|
|
|
|
50
|
61
|
|
|
61
|
|
481
|
use Carp; |
|
61
|
|
|
|
|
129
|
|
|
61
|
|
|
|
|
617807
|
|
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
my ( |
53
|
|
|
|
|
|
|
$input, |
54
|
|
|
|
|
|
|
$lexlevel, # Used by the lexical analyzer. Controls in which section we are: |
55
|
|
|
|
|
|
|
# head (0), body(1) or tail (2) |
56
|
|
|
|
|
|
|
@lineno, # Used by the lexical analyzer. $lineno[0] is the lione number for |
57
|
|
|
|
|
|
|
# the beginning of the token, $lineno[1] the end |
58
|
|
|
|
|
|
|
$nberr, # Number of errors up to now |
59
|
|
|
|
|
|
|
$prec, |
60
|
|
|
|
|
|
|
$labelno); |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
my $syms; |
63
|
|
|
|
|
|
|
my $head; # list of texts inside header sections |
64
|
|
|
|
|
|
|
my $tail; |
65
|
|
|
|
|
|
|
my $token; |
66
|
|
|
|
|
|
|
my $term; # hash ref. key: token, value: an array describing the assoc and priority { '-' => [ 'LEFT' 1 ], '*' => [ 'LEFT' 2 ], } |
67
|
|
|
|
|
|
|
my $termdef; # token definitions. key is token, value is regexp |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
my $whites; # string with the code for white spaces (when automatic generated lexer) |
70
|
|
|
|
|
|
|
my $lexer; # boolean: true if %lexer was used |
71
|
|
|
|
|
|
|
my $incremental; # build an incremental lexer: one that reads in chunks from $self->YYInputFile |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
my $nterm; |
74
|
|
|
|
|
|
|
my $rules; |
75
|
|
|
|
|
|
|
my $precterm; # hash ref. key token used in %prec. value: priority |
76
|
|
|
|
|
|
|
my $start; |
77
|
|
|
|
|
|
|
my $nullable; |
78
|
|
|
|
|
|
|
my $semantic; # hash ref. Keys are the tokens. Value: 0 = syntactic 1 = semantic |
79
|
|
|
|
|
|
|
my $dummy = []; # array ref. the dummy tokens |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
my ($expect); |
82
|
|
|
|
|
|
|
my $namingscheme; |
83
|
|
|
|
|
|
|
my $defaultaction; |
84
|
|
|
|
|
|
|
my $filename; |
85
|
|
|
|
|
|
|
my $tree = 0; # true if %tree or %metatree |
86
|
|
|
|
|
|
|
my $metatree = 0; |
87
|
|
|
|
|
|
|
my $flatlists = 0; # true if flat list semantic for * + and ? operators |
88
|
|
|
|
|
|
|
my $bypass = 0; |
89
|
|
|
|
|
|
|
my $prefix = ''; # yyprefix |
90
|
|
|
|
|
|
|
my $buildingtree = 0; |
91
|
|
|
|
|
|
|
my $alias = 0; |
92
|
|
|
|
|
|
|
my $accessors = {}; # Hash for named accessors when %tree or %metatree is active { exp::left => 0 } |
93
|
|
|
|
|
|
|
my $strict = 0; # When true, all tokens must be declared or a warning will be issued |
94
|
|
|
|
|
|
|
my $nocompact; # Do not compact action tables. No DEFAULT field for "STATES" |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
my %nondeclared; # Potential non declared token identifiers appearing in the program |
97
|
|
|
|
|
|
|
my %conflict; # Hash of conflict name => { codeh => 'code handler', line => #line, #prodnumber1 => [pos1, pos2], #prodnumber2 => [pos1,pos2,pos3], ... } |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
sub not_an_id { |
100
|
71
|
|
|
71
|
0
|
152
|
my $id = shift; |
101
|
|
|
|
|
|
|
|
102
|
71
|
|
33
|
|
|
693
|
!defined($id) or $id !~ m/^[a-zA-Z_][[a-zA-Z_0-9]*$/; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
# When using %metatree, i.e. generating a Translation Scheme |
106
|
|
|
|
|
|
|
# returns true if $code was preceded by a %begin directive |
107
|
|
|
|
|
|
|
sub is_begin_code { |
108
|
150
|
|
|
150
|
0
|
244
|
my $code = shift; |
109
|
|
|
|
|
|
|
|
110
|
150
|
|
66
|
|
|
1089
|
return (UNIVERSAL::isa($code, 'ARRAY') and exists($code->[2]) and $code->[2] eq 'BEGINCODE'); |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
# Produces the text containing the declarations |
114
|
|
|
|
|
|
|
# and initializations of the associated variables |
115
|
|
|
|
|
|
|
sub prefixcode { |
116
|
554
|
|
|
554
|
0
|
1268
|
my %index = @_; |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
# When TS var $lhs refers to the father node |
119
|
554
|
100
|
|
|
|
1391
|
my $text = ($metatree)? 'my $lhs = $_[0]; ' : ''; |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
# No identifiers were associated with the attributes if %index is empty |
122
|
554
|
100
|
|
|
|
2252
|
return $text unless %index; |
123
|
|
|
|
|
|
|
|
124
|
122
|
|
|
|
|
304
|
$text .= join "", (map { "my \$$_ = \$_[$index{$_}]; " } (keys(%index))); |
|
195
|
|
|
|
|
817
|
|
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
# The former line produces the code for initialization of the attribute |
127
|
|
|
|
|
|
|
# variables so that a production like: |
128
|
|
|
|
|
|
|
# exp: VAR.left '='.op exp.right { ... semantic action } |
129
|
|
|
|
|
|
|
# will produce s.t. like: |
130
|
|
|
|
|
|
|
# sub { |
131
|
|
|
|
|
|
|
# my $left = $_[1]; my $right = $_[3]; my $op = $_[2]; |
132
|
|
|
|
|
|
|
# ... semantic action |
133
|
|
|
|
|
|
|
# } |
134
|
|
|
|
|
|
|
|
135
|
122
|
|
|
|
|
456
|
return $text; |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
# Computes the hash %index used in sub 'prefixcode' |
139
|
|
|
|
|
|
|
# $index{a} is the index of the symbol associated with 'a' in the right hand side |
140
|
|
|
|
|
|
|
# of the production. For example in |
141
|
|
|
|
|
|
|
# R: B.b A.a |
142
|
|
|
|
|
|
|
# $index{a} will be 2. |
143
|
|
|
|
|
|
|
sub symbol_index { |
144
|
561
|
|
100
|
561
|
0
|
1566
|
my $rhs = shift || []; |
145
|
561
|
|
100
|
|
|
2453
|
my $position = shift || @$rhs; |
146
|
561
|
|
|
|
|
945
|
my %index; |
147
|
|
|
|
|
|
|
|
148
|
561
|
|
|
|
|
981
|
local $_ = 0; |
149
|
561
|
|
|
|
|
886
|
for my $value (@{$rhs}) { |
|
561
|
|
|
|
|
1376
|
|
150
|
1284
|
100
|
100
|
|
|
6270
|
$_++ unless (($value->[0] eq 'CODE') and $metatree) or ($value->[0] eq 'CONFLICTHANDLER'); |
|
|
|
66
|
|
|
|
|
151
|
1284
|
|
|
|
|
2171
|
my $id = $value->[1][2]; |
152
|
1284
|
100
|
|
|
|
2729
|
if (defined($id)) { |
153
|
|
|
|
|
|
|
_SyntaxError( |
154
|
|
|
|
|
|
|
2, |
155
|
|
|
|
|
|
|
"Error: attribute variable '\$$id' appears more than once", |
156
|
|
|
|
|
|
|
$value->[1][1]) |
157
|
200
|
50
|
|
|
|
491
|
if exists($index{$id}); |
158
|
200
|
|
|
|
|
430
|
$index{$id} = $_; |
159
|
|
|
|
|
|
|
} |
160
|
1284
|
100
|
|
|
|
3295
|
last if $_ >= $position; |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
|
163
|
561
|
|
|
|
|
2152
|
return %index; |
164
|
|
|
|
|
|
|
} |
165
|
|
|
|
|
|
|
|
166
|
|
|
|
|
|
|
# Computes the hash %index holding the position in the generated |
167
|
|
|
|
|
|
|
# AST (as it is build by YYBuildAST) of the node associated with |
168
|
|
|
|
|
|
|
# the identifier. For ex. in "E: E.left '+' E.right" |
169
|
|
|
|
|
|
|
# $index{right} will be 1 (remember that '+' is a syntactic token) |
170
|
|
|
|
|
|
|
sub child_index_in_AST { |
171
|
36
|
|
100
|
36
|
0
|
99
|
my $rhs = shift || []; |
172
|
36
|
|
|
|
|
60
|
my %index; |
173
|
|
|
|
|
|
|
|
174
|
36
|
|
|
|
|
58
|
local $_ = 0; |
175
|
36
|
|
|
|
|
54
|
for my $value (@{$rhs}) { |
|
36
|
|
|
|
|
75
|
|
176
|
84
|
|
|
|
|
118
|
my ($symb, $line, $id) = @{$value->[1]}; |
|
84
|
|
|
|
|
179
|
|
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
# Accessors will be build only for explictly named attributes |
179
|
|
|
|
|
|
|
# Hal Finkel's patch |
180
|
84
|
100
|
|
|
|
213
|
next unless $$semantic{$symb}; |
181
|
58
|
100
|
|
|
|
144
|
$index{$id} = $_ if defined($id); |
182
|
58
|
|
|
|
|
109
|
$_++ ; |
183
|
|
|
|
|
|
|
} |
184
|
|
|
|
|
|
|
|
185
|
36
|
|
|
|
|
112
|
return %index; |
186
|
|
|
|
|
|
|
} |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
# This sub gives support to the "%tree alias" directive. |
189
|
|
|
|
|
|
|
# Expands the 'accessors' hash relation |
190
|
|
|
|
|
|
|
# for the current production. Uses 'child_index_in_AST' |
191
|
|
|
|
|
|
|
# to build the mapping between names and indices |
192
|
|
|
|
|
|
|
sub make_accessors { |
193
|
545
|
|
|
545
|
0
|
940
|
my $name = shift; |
194
|
545
|
100
|
100
|
|
|
2982
|
return unless ($tree and $alias and defined($name) and $name->[0] =~m{^[a-zA-Z_]\w*$}); |
|
|
|
100
|
|
|
|
|
|
|
|
66
|
|
|
|
|
195
|
|
|
|
|
|
|
|
196
|
36
|
|
|
|
|
64
|
my $rhs = shift; |
197
|
|
|
|
|
|
|
|
198
|
36
|
|
|
|
|
92
|
my %index = child_index_in_AST($rhs); |
199
|
36
|
|
|
|
|
99
|
for (keys(%index)) { |
200
|
52
|
|
|
|
|
182
|
$accessors->{"$name->[0]::$_"} = $index{$_}; |
201
|
|
|
|
|
|
|
} |
202
|
|
|
|
|
|
|
} |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
# Gives support to %metatree |
205
|
|
|
|
|
|
|
sub insert_delaying_code { |
206
|
150
|
|
|
150
|
0
|
250
|
my $code = shift; |
207
|
|
|
|
|
|
|
|
208
|
|
|
|
|
|
|
# If %begin the code will be executed at "tree time construction" |
209
|
150
|
100
|
|
|
|
353
|
return if is_begin_code($$code); |
210
|
135
|
100
|
|
|
|
351
|
if ($$code) { |
211
|
130
|
|
|
|
|
550
|
$$code = [ |
212
|
|
|
|
|
|
|
# The user code is substituted by a builder of a node referencing the |
213
|
|
|
|
|
|
|
# actual sub |
214
|
|
|
|
|
|
|
"push \@_, sub { $$code->[0] }; goto &Parse::Eyapp::Driver::YYBuildTS; ", |
215
|
|
|
|
|
|
|
$$code->[1] |
216
|
|
|
|
|
|
|
]; |
217
|
|
|
|
|
|
|
} |
218
|
|
|
|
|
|
|
else { |
219
|
5
|
|
|
|
|
13
|
$$code = [ ' goto &Parse::Eyapp::Driver::YYBuildTS ', $lineno[0]] |
220
|
|
|
|
|
|
|
} |
221
|
|
|
|
|
|
|
} |
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
# Called only from _AddRules |
224
|
|
|
|
|
|
|
sub process_production { |
225
|
629
|
|
|
629
|
0
|
1123
|
my ($rhs) = @_; |
226
|
|
|
|
|
|
|
|
227
|
629
|
|
|
|
|
1000
|
my $position = $#$rules; |
228
|
629
|
|
|
|
|
1095
|
my @newrhs = (); |
229
|
|
|
|
|
|
|
|
230
|
629
|
|
|
|
|
928
|
my $m = 0; |
231
|
629
|
|
|
|
|
1484
|
for my $s (0..$#$rhs) { |
232
|
1375
|
|
|
|
|
1921
|
my($what,$value)=@{$$rhs[$s]}; |
|
1375
|
|
|
|
|
2767
|
|
233
|
|
|
|
|
|
|
|
234
|
1375
|
100
|
|
|
|
3764
|
if ($what eq 'CODE') { # TODO: modify name scheme: RULE_POSITION |
|
|
50
|
|
|
|
|
|
235
|
8
|
|
|
|
|
31
|
my($tmplhs)='@'.$position."-$s"; |
236
|
|
|
|
|
|
|
|
237
|
8
|
50
|
|
|
|
26
|
if ($value) { |
238
|
|
|
|
|
|
|
|
239
|
|
|
|
|
|
|
# The auxiliary production generated for |
240
|
|
|
|
|
|
|
# intermediate actions has access to the |
241
|
|
|
|
|
|
|
# attributes of the symbols to its left |
242
|
|
|
|
|
|
|
# Not needed if generating a TS |
243
|
8
|
100
|
|
|
|
26
|
my @optarg = $metatree? () : ($s+1); |
244
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
# Variable declarations |
246
|
8
|
|
|
|
|
25
|
my %index = symbol_index($rhs, @optarg); |
247
|
8
|
|
|
|
|
33
|
$value->[0] = prefixcode(%index).$value->[0]; |
248
|
|
|
|
|
|
|
} |
249
|
|
|
|
|
|
|
|
250
|
8
|
100
|
|
|
|
36
|
insert_delaying_code(\$value) if $metatree; |
251
|
|
|
|
|
|
|
|
252
|
|
|
|
|
|
|
# rhs prec name code |
253
|
8
|
|
|
|
|
28
|
push(@$rules,[ $tmplhs, [], undef, undef, $value ]); |
254
|
8
|
|
|
|
|
20
|
push(@newrhs, $tmplhs); |
255
|
8
|
|
|
|
|
16
|
next; |
256
|
|
|
|
|
|
|
} |
257
|
|
|
|
|
|
|
elsif ($what eq 'CONFLICTHANDLER') { |
258
|
0
|
|
|
|
|
0
|
my $ch = $value->[0]; |
259
|
0
|
|
|
|
|
0
|
push @{$conflict{$ch}{production}{-$position}}, $m; |
|
0
|
|
|
|
|
0
|
|
260
|
0
|
|
|
|
|
0
|
next; |
261
|
|
|
|
|
|
|
} |
262
|
|
|
|
|
|
|
# elsif ($what eq 'CONFLICTVIEWPOINT') { |
263
|
|
|
|
|
|
|
# } |
264
|
|
|
|
|
|
|
|
265
|
1367
|
|
|
|
|
2597
|
push(@newrhs, $$value[0]); |
266
|
1367
|
|
|
|
|
2347
|
$m++; |
267
|
|
|
|
|
|
|
} |
268
|
629
|
|
|
|
|
1417
|
return \@newrhs; |
269
|
|
|
|
|
|
|
} |
270
|
|
|
|
|
|
|
|
271
|
|
|
|
|
|
|
# Receives a specification of the RHS of a production like in: |
272
|
|
|
|
|
|
|
# rhs([ $A, $val], name => $_[2], code => $code_rec, prec => $prec) |
273
|
|
|
|
|
|
|
# Returns the data structure used to represent the RHS: |
274
|
|
|
|
|
|
|
# [ @rhs, $arg{prec}, $arg{name}, $arg{code}] |
275
|
|
|
|
|
|
|
sub rhs { |
276
|
76
|
|
|
76
|
0
|
151
|
my @rhs = @{shift()}; |
|
76
|
|
|
|
|
185
|
|
277
|
|
|
|
|
|
|
|
278
|
76
|
|
|
|
|
302
|
my %arg = @_; |
279
|
76
|
50
|
|
|
|
271
|
$arg{prec} = exists($arg{prec})? token($arg{prec}): undef; |
280
|
76
|
50
|
|
|
|
224
|
$arg{name} = undef unless exists($arg{name}); |
281
|
76
|
50
|
|
|
|
273
|
$arg{code} = exists($arg{code})? token($arg{code}): undef; |
282
|
|
|
|
|
|
|
|
283
|
76
|
|
|
|
|
179
|
@rhs = map { ['SYMB', $_] } @rhs; |
|
118
|
|
|
|
|
368
|
|
284
|
|
|
|
|
|
|
|
285
|
76
|
|
|
|
|
420
|
return [ @rhs, $arg{prec}, $arg{name}, $arg{code}]; |
286
|
|
|
|
|
|
|
} |
287
|
|
|
|
|
|
|
|
288
|
|
|
|
|
|
|
sub token { |
289
|
122
|
|
|
122
|
0
|
230
|
my $value = shift; |
290
|
|
|
|
|
|
|
|
291
|
122
|
|
|
|
|
404
|
return [ $value, $lineno[0]]; |
292
|
|
|
|
|
|
|
} |
293
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
sub symbol { |
295
|
0
|
|
|
0
|
0
|
0
|
my $id = shift; |
296
|
|
|
|
|
|
|
|
297
|
0
|
|
|
|
|
0
|
return ['SYMB', $id]; |
298
|
|
|
|
|
|
|
} |
299
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
# To be used with the %lexer directive |
301
|
|
|
|
|
|
|
sub make_lexer { |
302
|
0
|
|
|
0
|
0
|
0
|
my ($code, $line) = @_; |
303
|
|
|
|
|
|
|
|
304
|
0
|
|
|
|
|
0
|
my $errline = $line + ($code =~ tr/\n//); |
305
|
|
|
|
|
|
|
|
306
|
0
|
|
|
|
|
0
|
my $lexertemplate = << 'ENDOFLEXER'; |
307
|
|
|
|
|
|
|
__PACKAGE__->YYLexer( |
308
|
|
|
|
|
|
|
sub { # lexical analyzer |
309
|
|
|
|
|
|
|
my $self = $_[0]; |
310
|
|
|
|
|
|
|
for (${$self->input()}) { # contextualize |
311
|
|
|
|
|
|
|
#line <> "<>" |
312
|
|
|
|
|
|
|
<> |
313
|
|
|
|
|
|
|
<> |
314
|
|
|
|
|
|
|
return ('', undef) if ($_ eq '') || (defined(pos($_)) && (pos($_) >= length($_))); |
315
|
|
|
|
|
|
|
die("Error inside the lexical analyzer. Line: <>. File: <>. No regexp matched.\n"); |
316
|
|
|
|
|
|
|
} |
317
|
|
|
|
|
|
|
} # end lexical analyzer |
318
|
|
|
|
|
|
|
); |
319
|
|
|
|
|
|
|
ENDOFLEXER |
320
|
|
|
|
|
|
|
|
321
|
0
|
|
|
|
|
0
|
$lexertemplate =~ s/<>/$code/g; |
322
|
0
|
|
|
|
|
0
|
$lexertemplate =~ s/<>/$line/g; |
323
|
0
|
|
|
|
|
0
|
$lexertemplate =~ s/<>/$errline/g; |
324
|
0
|
|
|
|
|
0
|
$lexertemplate =~ s/<>/$filename/g; |
325
|
0
|
|
|
|
|
0
|
$lexertemplate =~ s/<>/################ @@@@@@@@@ End of User Code @@@@@@@@@ ###################/g; |
326
|
|
|
|
|
|
|
|
327
|
0
|
|
|
|
|
0
|
return $lexertemplate; |
328
|
|
|
|
|
|
|
} |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
sub explorer_handler { |
331
|
0
|
|
|
0
|
0
|
0
|
my ($name, $code) = @_; |
332
|
0
|
|
|
|
|
0
|
my ($cn, $line) = @$name; |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
|
335
|
0
|
|
|
|
|
0
|
my ($c, $li) = @$code; |
336
|
|
|
|
|
|
|
|
337
|
|
|
|
|
|
|
# TODO: this must be in Output |
338
|
0
|
|
|
|
|
0
|
my $conflict_header = <<"CONFLICT_EXPLORER"; |
339
|
|
|
|
|
|
|
my \$self = \$_[0]; |
340
|
|
|
|
|
|
|
for (\${\$self->input()}) { |
341
|
|
|
|
|
|
|
#line $li "$filename" |
342
|
|
|
|
|
|
|
CONFLICT_EXPLORER |
343
|
0
|
|
|
|
|
0
|
$c =~ s/^/$conflict_header/; # } |
344
|
|
|
|
|
|
|
|
345
|
|
|
|
|
|
|
# { |
346
|
|
|
|
|
|
|
# follows the closing curly bracket of the for .. to contextualize!!!!!! v |
347
|
0
|
|
|
|
|
0
|
$c =~ s/$/\n################ @@@@@@@@@ End of User Code @@@@@@@@@ ###################\n }\n/; |
348
|
|
|
|
|
|
|
#$code->[0] = $c; |
349
|
0
|
|
|
|
|
0
|
$conflict{$cn}{explorer} = $c; |
350
|
0
|
|
|
|
|
0
|
$conflict{$cn}{explorerline} = $line; |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
# TODO: error control. Factorize!!!!! |
353
|
0
|
|
|
|
|
0
|
$$syms{$cn} = $line; |
354
|
0
|
|
|
|
|
0
|
$$nterm{$cn} = undef; |
355
|
|
|
|
|
|
|
|
356
|
0
|
|
|
|
|
0
|
undef; |
357
|
|
|
|
|
|
|
} |
358
|
|
|
|
|
|
|
|
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
# Default lexical analyzer |
362
|
|
|
|
|
|
|
our $LEX = sub { |
363
|
|
|
|
|
|
|
my $self = shift; |
364
|
|
|
|
|
|
|
my $pos; |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
for (${$self->input}) { |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
|
369
|
|
|
|
|
|
|
m{\G(\s+)}gc and $self->tokenline($1 =~ tr{\n}{}); |
370
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
m{\G(INCREMENTAL|VIEWPOINT|EXPECTRR|EXPLORER|REGEXP|WHITES|LEXER|DPREC|DUMMY|\%\%|\:\:|\n|\||\=|\$|\>|\?|\<|\;|\)|\.|\:|\(|\%|\!)}gc and return ($1, $1); |
372
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
/\G(ASSOC)/gc and return ($1, $1); |
374
|
|
|
|
|
|
|
/\G(BEGINCODE)/gc and return ($1, $1); |
375
|
|
|
|
|
|
|
/\G(CODE)/gc and return ($1, $1); |
376
|
|
|
|
|
|
|
/\G(CONFLICT)/gc and return ($1, $1); |
377
|
|
|
|
|
|
|
/\G(DEFAULTACTION)/gc and return ($1, $1); |
378
|
|
|
|
|
|
|
/\G(EXPECT)/gc and return ($1, $1); |
379
|
|
|
|
|
|
|
/\G(HEADCODE)/gc and return ($1, $1); |
380
|
|
|
|
|
|
|
/\G(IDENT)/gc and return ($1, $1); |
381
|
|
|
|
|
|
|
/\G(LABEL)/gc and return ($1, $1); |
382
|
|
|
|
|
|
|
/\G(LITERAL)/gc and return ($1, $1); |
383
|
|
|
|
|
|
|
/\G(METATREE)/gc and return ($1, $1); |
384
|
|
|
|
|
|
|
/\G(NAME)/gc and return ($1, $1); |
385
|
|
|
|
|
|
|
/\G(NAMINGSCHEME)/gc and return ($1, $1); |
386
|
|
|
|
|
|
|
/\G(NOCOMPACT)/gc and return ($1, $1); |
387
|
|
|
|
|
|
|
/\G(NUMBER)/gc and return ($1, $1); |
388
|
|
|
|
|
|
|
/\G(OPTION)/gc and return ($1, $1); |
389
|
|
|
|
|
|
|
/\G(PLUS)/gc and return ($1, $1); |
390
|
|
|
|
|
|
|
/\G(PREC)/gc and return ($1, $1); |
391
|
|
|
|
|
|
|
/\G(PREFIX)/gc and return ($1, $1); |
392
|
|
|
|
|
|
|
/\G(SEMANTIC)/gc and return ($1, $1); |
393
|
|
|
|
|
|
|
/\G(STAR)/gc and return ($1, $1); |
394
|
|
|
|
|
|
|
/\G(START)/gc and return ($1, $1); |
395
|
|
|
|
|
|
|
/\G(STRICT)/gc and return ($1, $1); |
396
|
|
|
|
|
|
|
/\G(SYNTACTIC)/gc and return ($1, $1); |
397
|
|
|
|
|
|
|
/\G(TAILCODE)/gc and return ($1, $1); |
398
|
|
|
|
|
|
|
/\G(TOKEN)/gc and return ($1, $1); |
399
|
|
|
|
|
|
|
/\G(TREE)/gc and return ($1, $1); |
400
|
|
|
|
|
|
|
/\G(TYPE)/gc and return ($1, $1); |
401
|
|
|
|
|
|
|
/\G(UNION)/gc and return ($1, $1); |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
|
404
|
|
|
|
|
|
|
return ('', undef) if ($_ eq '') || (defined(pos($_)) && (pos($_) >= length($_))); |
405
|
|
|
|
|
|
|
/\G\s*(\S+)/; |
406
|
|
|
|
|
|
|
my $near = substr($1,0,10); |
407
|
|
|
|
|
|
|
|
408
|
|
|
|
|
|
|
return($near, $near); |
409
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
# die( "Error inside the lexical analyzer near '". $near |
411
|
|
|
|
|
|
|
# ."'. Line: ".$self->line() |
412
|
|
|
|
|
|
|
# .". File: '".$self->YYFilename()."'. No match found.\n"); |
413
|
|
|
|
|
|
|
} |
414
|
|
|
|
|
|
|
} |
415
|
|
|
|
|
|
|
; |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
|
418
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
419
|
|
|
|
|
|
|
|
420
|
|
|
|
|
|
|
my $warnmessage =<< "EOFWARN"; |
421
|
|
|
|
|
|
|
Warning!: Did you changed the \@Parse::Eyapp::Parse::ISA variable inside the header section of the eyapp program? |
422
|
|
|
|
|
|
|
EOFWARN |
423
|
|
|
|
|
|
|
|
424
|
|
|
|
|
|
|
sub new { |
425
|
54
|
|
|
54
|
0
|
171
|
my($class)=shift; |
426
|
54
|
50
|
|
|
|
252
|
ref($class) and $class=ref($class); |
427
|
|
|
|
|
|
|
|
428
|
54
|
50
|
|
|
|
634
|
warn $warnmessage unless __PACKAGE__->isa('Parse::Eyapp::Driver'); |
429
|
|
|
|
|
|
|
my($self)=$class->SUPER::new( |
430
|
|
|
|
|
|
|
yyversion => '1.21', |
431
|
|
|
|
|
|
|
yyGRAMMAR => |
432
|
|
|
|
|
|
|
[#[productionNameAndLabel => lhs, [ rhs], bypass]] |
433
|
|
|
|
|
|
|
[ '_SUPERSTART' => '$start', [ 'eyapp', '$end' ], 0 ], |
434
|
|
|
|
|
|
|
[ 'eyapp_1' => 'eyapp', [ 'head', 'body', 'tail' ], 0 ], |
435
|
|
|
|
|
|
|
[ 'symbol_2' => 'symbol', [ 'LITERAL' ], 0 ], |
436
|
|
|
|
|
|
|
[ 'symbol_3' => 'symbol', [ 'ident' ], 0 ], |
437
|
|
|
|
|
|
|
[ 'ident_4' => 'ident', [ 'IDENT' ], 0 ], |
438
|
|
|
|
|
|
|
[ 'prodname_5' => 'prodname', [ 'IDENT' ], 0 ], |
439
|
|
|
|
|
|
|
[ 'prodname_6' => 'prodname', [ 'LABEL' ], 0 ], |
440
|
|
|
|
|
|
|
[ 'prodname_7' => 'prodname', [ 'IDENT', 'LABEL' ], 0 ], |
441
|
|
|
|
|
|
|
[ 'head_8' => 'head', [ 'headsec', '%%' ], 0 ], |
442
|
|
|
|
|
|
|
[ 'perlident_9' => 'perlident', [ 'IDENT' ], 0 ], |
443
|
|
|
|
|
|
|
[ 'perlident_10' => 'perlident', [ 'perlident', '::', 'IDENT' ], 0 ], |
444
|
|
|
|
|
|
|
[ 'headsec_11' => 'headsec', [ ], 0 ], |
445
|
|
|
|
|
|
|
[ 'headsec_12' => 'headsec', [ 'decls' ], 0 ], |
446
|
|
|
|
|
|
|
[ 'decls_13' => 'decls', [ 'decls', 'decl' ], 0 ], |
447
|
|
|
|
|
|
|
[ 'decls_14' => 'decls', [ 'decl' ], 0 ], |
448
|
|
|
|
|
|
|
[ 'decl_15' => 'decl', [ '\n' ], 0 ], |
449
|
|
|
|
|
|
|
[ 'decl_16' => 'decl', [ 'SEMANTIC', 'typedecl', 'toklist', '\n' ], 0 ], |
450
|
|
|
|
|
|
|
[ 'decl_17' => 'decl', [ 'SYNTACTIC', 'typedecl', 'toklist', '\n' ], 0 ], |
451
|
|
|
|
|
|
|
[ 'decl_18' => 'decl', [ 'DUMMY', 'typedecl', 'toklist', '\n' ], 0 ], |
452
|
|
|
|
|
|
|
[ 'decl_19' => 'decl', [ 'TOKEN', 'typedecl', 'toklist', '\n' ], 0 ], |
453
|
|
|
|
|
|
|
[ 'decl_20' => 'decl', [ 'ASSOC', 'typedecl', 'symlist', '\n' ], 0 ], |
454
|
|
|
|
|
|
|
[ 'decl_21' => 'decl', [ 'START', 'ident', '\n' ], 0 ], |
455
|
|
|
|
|
|
|
[ 'decl_22' => 'decl', [ 'PREFIX', '\n' ], 0 ], |
456
|
|
|
|
|
|
|
[ 'decl_23' => 'decl', [ 'WHITES', 'CODE', '\n' ], 0 ], |
457
|
|
|
|
|
|
|
[ 'decl_24' => 'decl', [ 'WHITES', 'REGEXP', '\n' ], 0 ], |
458
|
|
|
|
|
|
|
[ 'decl_25' => 'decl', [ 'WHITES', '=', 'CODE', '\n' ], 0 ], |
459
|
|
|
|
|
|
|
[ 'decl_26' => 'decl', [ 'WHITES', '=', 'REGEXP', '\n' ], 0 ], |
460
|
|
|
|
|
|
|
[ 'decl_27' => 'decl', [ 'NAMINGSCHEME', 'CODE', '\n' ], 0 ], |
461
|
|
|
|
|
|
|
[ 'decl_28' => 'decl', [ 'HEADCODE', '\n' ], 0 ], |
462
|
|
|
|
|
|
|
[ 'decl_29' => 'decl', [ 'UNION', 'CODE', '\n' ], 0 ], |
463
|
|
|
|
|
|
|
[ 'decl_30' => 'decl', [ 'DEFAULTACTION', 'CODE', '\n' ], 0 ], |
464
|
|
|
|
|
|
|
[ 'decl_31' => 'decl', [ 'INCREMENTAL', '\n' ], 0 ], |
465
|
|
|
|
|
|
|
[ 'decl_32' => 'decl', [ 'INCREMENTAL', 'LITERAL', '\n' ], 0 ], |
466
|
|
|
|
|
|
|
[ 'decl_33' => 'decl', [ 'LEXER', 'CODE', '\n' ], 0 ], |
467
|
|
|
|
|
|
|
[ 'decl_34' => 'decl', [ 'TREE', '\n' ], 0 ], |
468
|
|
|
|
|
|
|
[ 'decl_35' => 'decl', [ 'METATREE', '\n' ], 0 ], |
469
|
|
|
|
|
|
|
[ 'decl_36' => 'decl', [ 'STRICT', '\n' ], 0 ], |
470
|
|
|
|
|
|
|
[ 'decl_37' => 'decl', [ 'NOCOMPACT', '\n' ], 0 ], |
471
|
|
|
|
|
|
|
[ 'decl_38' => 'decl', [ 'TYPE', 'typedecl', 'identlist', '\n' ], 0 ], |
472
|
|
|
|
|
|
|
[ 'decl_39' => 'decl', [ 'CONFLICT', 'ident', 'CODE', '\n' ], 0 ], |
473
|
|
|
|
|
|
|
[ 'decl_40' => 'decl', [ 'CONFLICT', 'ident', 'perlident', '?', 'prodname', ':', 'prodname', '\n' ], 0 ], |
474
|
|
|
|
|
|
|
[ 'decl_41' => 'decl', [ 'CONFLICT', 'ident', 'neg', 'REGEXP', '?', 'prodname', ':', 'prodname', '\n' ], 0 ], |
475
|
|
|
|
|
|
|
[ 'decl_42' => 'decl', [ 'EXPLORER', 'ident', 'CODE', '\n' ], 0 ], |
476
|
|
|
|
|
|
|
[ 'decl_43' => 'decl', [ 'EXPLORER', 'ident', 'LITERAL', '\n' ], 0 ], |
477
|
|
|
|
|
|
|
[ 'decl_44' => 'decl', [ 'EXPLORER', 'ident', 'perlident', '\n' ], 0 ], |
478
|
|
|
|
|
|
|
[ 'decl_45' => 'decl', [ 'EXPLORER', 'ident', 'perlident', 'LITERAL', '\n' ], 0 ], |
479
|
|
|
|
|
|
|
[ 'decl_46' => 'decl', [ 'EXPECT', 'NUMBER', '\n' ], 0 ], |
480
|
|
|
|
|
|
|
[ 'decl_47' => 'decl', [ 'EXPECT', 'NUMBER', 'NUMBER', '\n' ], 0 ], |
481
|
|
|
|
|
|
|
[ 'decl_48' => 'decl', [ 'EXPECTRR', 'NUMBER', '\n' ], 0 ], |
482
|
|
|
|
|
|
|
[ 'decl_49' => 'decl', [ 'error', '\n' ], 0 ], |
483
|
|
|
|
|
|
|
[ 'neg_50' => 'neg', [ ], 0 ], |
484
|
|
|
|
|
|
|
[ 'neg_51' => 'neg', [ '!' ], 0 ], |
485
|
|
|
|
|
|
|
[ 'typedecl_52' => 'typedecl', [ ], 0 ], |
486
|
|
|
|
|
|
|
[ 'typedecl_53' => 'typedecl', [ '<', 'IDENT', '>' ], 0 ], |
487
|
|
|
|
|
|
|
[ 'symlist_54' => 'symlist', [ 'symlist', 'symbol' ], 0 ], |
488
|
|
|
|
|
|
|
[ 'symlist_55' => 'symlist', [ 'symbol' ], 0 ], |
489
|
|
|
|
|
|
|
[ 'toklist_56' => 'toklist', [ 'toklist', 'tokendef' ], 0 ], |
490
|
|
|
|
|
|
|
[ 'toklist_57' => 'toklist', [ 'tokendef' ], 0 ], |
491
|
|
|
|
|
|
|
[ 'tokendef_58' => 'tokendef', [ 'ident', '=', 'REGEXP' ], 0 ], |
492
|
|
|
|
|
|
|
[ 'tokendef_59' => 'tokendef', [ 'ident', '=', '%', 'REGEXP' ], 0 ], |
493
|
|
|
|
|
|
|
[ 'tokendef_60' => 'tokendef', [ 'ident', '=', '%', 'REGEXP', '=', 'IDENT' ], 0 ], |
494
|
|
|
|
|
|
|
[ 'tokendef_61' => 'tokendef', [ 'ident', '=', '%', 'REGEXP', '!', 'IDENT' ], 0 ], |
495
|
|
|
|
|
|
|
[ 'tokendef_62' => 'tokendef', [ 'ident', '=', 'CODE' ], 0 ], |
496
|
|
|
|
|
|
|
[ 'tokendef_63' => 'tokendef', [ 'symbol' ], 0 ], |
497
|
|
|
|
|
|
|
[ 'identlist_64' => 'identlist', [ 'identlist', 'ident' ], 0 ], |
498
|
|
|
|
|
|
|
[ 'identlist_65' => 'identlist', [ 'ident' ], 0 ], |
499
|
|
|
|
|
|
|
[ 'body_66' => 'body', [ 'rulesec', '%%' ], 0 ], |
500
|
|
|
|
|
|
|
[ 'body_67' => 'body', [ '%%' ], 0 ], |
501
|
|
|
|
|
|
|
[ 'rulesec_68' => 'rulesec', [ 'rulesec', 'rules' ], 0 ], |
502
|
|
|
|
|
|
|
[ 'rulesec_69' => 'rulesec', [ 'startrules' ], 0 ], |
503
|
|
|
|
|
|
|
[ 'startrules_70' => 'startrules', [ 'IDENT', ':', '@70-2', 'rhss', ';' ], 0 ], |
504
|
|
|
|
|
|
|
[ '_CODE' => '@70-2', [ ], 0 ], |
505
|
|
|
|
|
|
|
[ 'startrules_72' => 'startrules', [ 'error', ';' ], 0 ], |
506
|
|
|
|
|
|
|
[ 'rules_73' => 'rules', [ 'IDENT', ':', 'rhss', ';' ], 0 ], |
507
|
|
|
|
|
|
|
[ 'rules_74' => 'rules', [ 'error', ';' ], 0 ], |
508
|
|
|
|
|
|
|
[ 'rhss_75' => 'rhss', [ 'rhss', '|', 'rule' ], 0 ], |
509
|
|
|
|
|
|
|
[ 'rhss_76' => 'rhss', [ 'rule' ], 0 ], |
510
|
|
|
|
|
|
|
[ 'rule_77' => 'rule', [ 'optname', 'rhs', 'prec', 'epscode' ], 0 ], |
511
|
|
|
|
|
|
|
[ 'rule_78' => 'rule', [ 'optname', 'rhs' ], 0 ], |
512
|
|
|
|
|
|
|
[ 'rhs_79' => 'rhs', [ ], 0 ], |
513
|
|
|
|
|
|
|
[ 'rhs_80' => 'rhs', [ 'rhselts' ], 0 ], |
514
|
|
|
|
|
|
|
[ 'rhselts_81' => 'rhselts', [ 'rhselts', 'rhseltwithid' ], 0 ], |
515
|
|
|
|
|
|
|
[ 'rhselts_82' => 'rhselts', [ 'rhseltwithid' ], 0 ], |
516
|
|
|
|
|
|
|
[ 'rhseltwithid_83' => 'rhseltwithid', [ 'rhselt', '.', 'IDENT' ], 0 ], |
517
|
|
|
|
|
|
|
[ 'rhseltwithid_84' => 'rhseltwithid', [ '$', 'rhselt' ], 0 ], |
518
|
|
|
|
|
|
|
[ 'rhseltwithid_85' => 'rhseltwithid', [ '$', 'error' ], 0 ], |
519
|
|
|
|
|
|
|
[ 'rhseltwithid_86' => 'rhseltwithid', [ 'rhselt' ], 0 ], |
520
|
|
|
|
|
|
|
[ 'rhselt_87' => 'rhselt', [ 'symbol' ], 0 ], |
521
|
|
|
|
|
|
|
[ 'rhselt_88' => 'rhselt', [ 'code' ], 0 ], |
522
|
|
|
|
|
|
|
[ 'rhselt_89' => 'rhselt', [ 'DPREC', 'ident' ], 0 ], |
523
|
|
|
|
|
|
|
[ 'rhselt_90' => 'rhselt', [ 'VIEWPOINT' ], 0 ], |
524
|
|
|
|
|
|
|
[ 'rhselt_91' => 'rhselt', [ '(', 'optname', 'rhs', ')' ], 0 ], |
525
|
|
|
|
|
|
|
[ 'rhselt_92' => 'rhselt', [ 'rhselt', 'STAR' ], 0 ], |
526
|
|
|
|
|
|
|
[ 'rhselt_93' => 'rhselt', [ 'rhselt', '<', 'STAR', 'symbol', '>' ], 0 ], |
527
|
|
|
|
|
|
|
[ 'rhselt_94' => 'rhselt', [ 'rhselt', 'OPTION' ], 0 ], |
528
|
|
|
|
|
|
|
[ 'rhselt_95' => 'rhselt', [ 'rhselt', '<', 'PLUS', 'symbol', '>' ], 0 ], |
529
|
|
|
|
|
|
|
[ 'rhselt_96' => 'rhselt', [ 'rhselt', 'PLUS' ], 0 ], |
530
|
|
|
|
|
|
|
[ 'optname_97' => 'optname', [ ], 0 ], |
531
|
|
|
|
|
|
|
[ 'optname_98' => 'optname', [ 'NAME', 'IDENT' ], 0 ], |
532
|
|
|
|
|
|
|
[ 'optname_99' => 'optname', [ 'NAME', 'IDENT', 'LABEL' ], 0 ], |
533
|
|
|
|
|
|
|
[ 'optname_100' => 'optname', [ 'NAME', 'LABEL' ], 0 ], |
534
|
|
|
|
|
|
|
[ 'prec_101' => 'prec', [ 'PREC', 'symbol' ], 0 ], |
535
|
|
|
|
|
|
|
[ 'epscode_102' => 'epscode', [ ], 0 ], |
536
|
|
|
|
|
|
|
[ 'epscode_103' => 'epscode', [ 'code' ], 0 ], |
537
|
|
|
|
|
|
|
[ 'code_104' => 'code', [ 'CODE' ], 0 ], |
538
|
|
|
|
|
|
|
[ 'code_105' => 'code', [ 'BEGINCODE' ], 0 ], |
539
|
|
|
|
|
|
|
[ 'tail_106' => 'tail', [ ], 0 ], |
540
|
|
|
|
|
|
|
[ 'tail_107' => 'tail', [ 'TAILCODE' ], 0 ], |
541
|
|
|
|
|
|
|
], |
542
|
|
|
|
|
|
|
yyLABELS => |
543
|
|
|
|
|
|
|
{ |
544
|
|
|
|
|
|
|
'_SUPERSTART' => 0, |
545
|
|
|
|
|
|
|
'eyapp_1' => 1, |
546
|
|
|
|
|
|
|
'symbol_2' => 2, |
547
|
|
|
|
|
|
|
'symbol_3' => 3, |
548
|
|
|
|
|
|
|
'ident_4' => 4, |
549
|
|
|
|
|
|
|
'prodname_5' => 5, |
550
|
|
|
|
|
|
|
'prodname_6' => 6, |
551
|
|
|
|
|
|
|
'prodname_7' => 7, |
552
|
|
|
|
|
|
|
'head_8' => 8, |
553
|
|
|
|
|
|
|
'perlident_9' => 9, |
554
|
|
|
|
|
|
|
'perlident_10' => 10, |
555
|
|
|
|
|
|
|
'headsec_11' => 11, |
556
|
|
|
|
|
|
|
'headsec_12' => 12, |
557
|
|
|
|
|
|
|
'decls_13' => 13, |
558
|
|
|
|
|
|
|
'decls_14' => 14, |
559
|
|
|
|
|
|
|
'decl_15' => 15, |
560
|
|
|
|
|
|
|
'decl_16' => 16, |
561
|
|
|
|
|
|
|
'decl_17' => 17, |
562
|
|
|
|
|
|
|
'decl_18' => 18, |
563
|
|
|
|
|
|
|
'decl_19' => 19, |
564
|
|
|
|
|
|
|
'decl_20' => 20, |
565
|
|
|
|
|
|
|
'decl_21' => 21, |
566
|
|
|
|
|
|
|
'decl_22' => 22, |
567
|
|
|
|
|
|
|
'decl_23' => 23, |
568
|
|
|
|
|
|
|
'decl_24' => 24, |
569
|
|
|
|
|
|
|
'decl_25' => 25, |
570
|
|
|
|
|
|
|
'decl_26' => 26, |
571
|
|
|
|
|
|
|
'decl_27' => 27, |
572
|
|
|
|
|
|
|
'decl_28' => 28, |
573
|
|
|
|
|
|
|
'decl_29' => 29, |
574
|
|
|
|
|
|
|
'decl_30' => 30, |
575
|
|
|
|
|
|
|
'decl_31' => 31, |
576
|
|
|
|
|
|
|
'decl_32' => 32, |
577
|
|
|
|
|
|
|
'decl_33' => 33, |
578
|
|
|
|
|
|
|
'decl_34' => 34, |
579
|
|
|
|
|
|
|
'decl_35' => 35, |
580
|
|
|
|
|
|
|
'decl_36' => 36, |
581
|
|
|
|
|
|
|
'decl_37' => 37, |
582
|
|
|
|
|
|
|
'decl_38' => 38, |
583
|
|
|
|
|
|
|
'decl_39' => 39, |
584
|
|
|
|
|
|
|
'decl_40' => 40, |
585
|
|
|
|
|
|
|
'decl_41' => 41, |
586
|
|
|
|
|
|
|
'decl_42' => 42, |
587
|
|
|
|
|
|
|
'decl_43' => 43, |
588
|
|
|
|
|
|
|
'decl_44' => 44, |
589
|
|
|
|
|
|
|
'decl_45' => 45, |
590
|
|
|
|
|
|
|
'decl_46' => 46, |
591
|
|
|
|
|
|
|
'decl_47' => 47, |
592
|
|
|
|
|
|
|
'decl_48' => 48, |
593
|
|
|
|
|
|
|
'decl_49' => 49, |
594
|
|
|
|
|
|
|
'neg_50' => 50, |
595
|
|
|
|
|
|
|
'neg_51' => 51, |
596
|
|
|
|
|
|
|
'typedecl_52' => 52, |
597
|
|
|
|
|
|
|
'typedecl_53' => 53, |
598
|
|
|
|
|
|
|
'symlist_54' => 54, |
599
|
|
|
|
|
|
|
'symlist_55' => 55, |
600
|
|
|
|
|
|
|
'toklist_56' => 56, |
601
|
|
|
|
|
|
|
'toklist_57' => 57, |
602
|
|
|
|
|
|
|
'tokendef_58' => 58, |
603
|
|
|
|
|
|
|
'tokendef_59' => 59, |
604
|
|
|
|
|
|
|
'tokendef_60' => 60, |
605
|
|
|
|
|
|
|
'tokendef_61' => 61, |
606
|
|
|
|
|
|
|
'tokendef_62' => 62, |
607
|
|
|
|
|
|
|
'tokendef_63' => 63, |
608
|
|
|
|
|
|
|
'identlist_64' => 64, |
609
|
|
|
|
|
|
|
'identlist_65' => 65, |
610
|
|
|
|
|
|
|
'body_66' => 66, |
611
|
|
|
|
|
|
|
'body_67' => 67, |
612
|
|
|
|
|
|
|
'rulesec_68' => 68, |
613
|
|
|
|
|
|
|
'rulesec_69' => 69, |
614
|
|
|
|
|
|
|
'startrules_70' => 70, |
615
|
|
|
|
|
|
|
'_CODE' => 71, |
616
|
|
|
|
|
|
|
'startrules_72' => 72, |
617
|
|
|
|
|
|
|
'rules_73' => 73, |
618
|
|
|
|
|
|
|
'rules_74' => 74, |
619
|
|
|
|
|
|
|
'rhss_75' => 75, |
620
|
|
|
|
|
|
|
'rhss_76' => 76, |
621
|
|
|
|
|
|
|
'rule_77' => 77, |
622
|
|
|
|
|
|
|
'rule_78' => 78, |
623
|
|
|
|
|
|
|
'rhs_79' => 79, |
624
|
|
|
|
|
|
|
'rhs_80' => 80, |
625
|
|
|
|
|
|
|
'rhselts_81' => 81, |
626
|
|
|
|
|
|
|
'rhselts_82' => 82, |
627
|
|
|
|
|
|
|
'rhseltwithid_83' => 83, |
628
|
|
|
|
|
|
|
'rhseltwithid_84' => 84, |
629
|
|
|
|
|
|
|
'rhseltwithid_85' => 85, |
630
|
|
|
|
|
|
|
'rhseltwithid_86' => 86, |
631
|
|
|
|
|
|
|
'rhselt_87' => 87, |
632
|
|
|
|
|
|
|
'rhselt_88' => 88, |
633
|
|
|
|
|
|
|
'rhselt_89' => 89, |
634
|
|
|
|
|
|
|
'rhselt_90' => 90, |
635
|
|
|
|
|
|
|
'rhselt_91' => 91, |
636
|
|
|
|
|
|
|
'rhselt_92' => 92, |
637
|
|
|
|
|
|
|
'rhselt_93' => 93, |
638
|
|
|
|
|
|
|
'rhselt_94' => 94, |
639
|
|
|
|
|
|
|
'rhselt_95' => 95, |
640
|
|
|
|
|
|
|
'rhselt_96' => 96, |
641
|
|
|
|
|
|
|
'optname_97' => 97, |
642
|
|
|
|
|
|
|
'optname_98' => 98, |
643
|
|
|
|
|
|
|
'optname_99' => 99, |
644
|
|
|
|
|
|
|
'optname_100' => 100, |
645
|
|
|
|
|
|
|
'prec_101' => 101, |
646
|
|
|
|
|
|
|
'epscode_102' => 102, |
647
|
|
|
|
|
|
|
'epscode_103' => 103, |
648
|
|
|
|
|
|
|
'code_104' => 104, |
649
|
|
|
|
|
|
|
'code_105' => 105, |
650
|
|
|
|
|
|
|
'tail_106' => 106, |
651
|
|
|
|
|
|
|
'tail_107' => 107, |
652
|
|
|
|
|
|
|
}, |
653
|
|
|
|
|
|
|
yyTERMS => |
654
|
|
|
|
|
|
|
{ '' => { ISSEMANTIC => 0 }, |
655
|
|
|
|
|
|
|
'!' => { ISSEMANTIC => 0 }, |
656
|
|
|
|
|
|
|
'$' => { ISSEMANTIC => 0 }, |
657
|
|
|
|
|
|
|
'%%' => { ISSEMANTIC => 0 }, |
658
|
|
|
|
|
|
|
'%' => { ISSEMANTIC => 0 }, |
659
|
|
|
|
|
|
|
'(' => { ISSEMANTIC => 0 }, |
660
|
|
|
|
|
|
|
')' => { ISSEMANTIC => 0 }, |
661
|
|
|
|
|
|
|
'.' => { ISSEMANTIC => 0 }, |
662
|
|
|
|
|
|
|
':' => { ISSEMANTIC => 0 }, |
663
|
|
|
|
|
|
|
'::' => { ISSEMANTIC => 0 }, |
664
|
|
|
|
|
|
|
';' => { ISSEMANTIC => 0 }, |
665
|
|
|
|
|
|
|
'<' => { ISSEMANTIC => 0 }, |
666
|
|
|
|
|
|
|
'=' => { ISSEMANTIC => 0 }, |
667
|
|
|
|
|
|
|
'>' => { ISSEMANTIC => 0 }, |
668
|
|
|
|
|
|
|
'?' => { ISSEMANTIC => 0 }, |
669
|
|
|
|
|
|
|
'\n' => { ISSEMANTIC => 0 }, |
670
|
|
|
|
|
|
|
'|' => { ISSEMANTIC => 0 }, |
671
|
|
|
|
|
|
|
ASSOC => { ISSEMANTIC => 1 }, |
672
|
|
|
|
|
|
|
BEGINCODE => { ISSEMANTIC => 1 }, |
673
|
|
|
|
|
|
|
CODE => { ISSEMANTIC => 1 }, |
674
|
|
|
|
|
|
|
CONFLICT => { ISSEMANTIC => 1 }, |
675
|
|
|
|
|
|
|
DEFAULTACTION => { ISSEMANTIC => 1 }, |
676
|
|
|
|
|
|
|
DPREC => { ISSEMANTIC => 1 }, |
677
|
|
|
|
|
|
|
DUMMY => { ISSEMANTIC => 1 }, |
678
|
|
|
|
|
|
|
EXPECT => { ISSEMANTIC => 1 }, |
679
|
|
|
|
|
|
|
EXPECTRR => { ISSEMANTIC => 1 }, |
680
|
|
|
|
|
|
|
EXPLORER => { ISSEMANTIC => 1 }, |
681
|
|
|
|
|
|
|
HEADCODE => { ISSEMANTIC => 1 }, |
682
|
|
|
|
|
|
|
IDENT => { ISSEMANTIC => 1 }, |
683
|
|
|
|
|
|
|
INCREMENTAL => { ISSEMANTIC => 1 }, |
684
|
|
|
|
|
|
|
LABEL => { ISSEMANTIC => 1 }, |
685
|
|
|
|
|
|
|
LEXER => { ISSEMANTIC => 1 }, |
686
|
|
|
|
|
|
|
LITERAL => { ISSEMANTIC => 1 }, |
687
|
|
|
|
|
|
|
METATREE => { ISSEMANTIC => 1 }, |
688
|
|
|
|
|
|
|
NAME => { ISSEMANTIC => 1 }, |
689
|
|
|
|
|
|
|
NAMINGSCHEME => { ISSEMANTIC => 1 }, |
690
|
|
|
|
|
|
|
NOCOMPACT => { ISSEMANTIC => 1 }, |
691
|
|
|
|
|
|
|
NUMBER => { ISSEMANTIC => 1 }, |
692
|
|
|
|
|
|
|
OPTION => { ISSEMANTIC => 1 }, |
693
|
|
|
|
|
|
|
PLUS => { ISSEMANTIC => 1 }, |
694
|
|
|
|
|
|
|
PREC => { ISSEMANTIC => 1 }, |
695
|
|
|
|
|
|
|
PREFIX => { ISSEMANTIC => 1 }, |
696
|
|
|
|
|
|
|
REGEXP => { ISSEMANTIC => 1 }, |
697
|
|
|
|
|
|
|
SEMANTIC => { ISSEMANTIC => 1 }, |
698
|
|
|
|
|
|
|
STAR => { ISSEMANTIC => 1 }, |
699
|
|
|
|
|
|
|
START => { ISSEMANTIC => 1 }, |
700
|
|
|
|
|
|
|
STRICT => { ISSEMANTIC => 1 }, |
701
|
|
|
|
|
|
|
SYNTACTIC => { ISSEMANTIC => 1 }, |
702
|
|
|
|
|
|
|
TAILCODE => { ISSEMANTIC => 1 }, |
703
|
|
|
|
|
|
|
TOKEN => { ISSEMANTIC => 1 }, |
704
|
|
|
|
|
|
|
TREE => { ISSEMANTIC => 1 }, |
705
|
|
|
|
|
|
|
TYPE => { ISSEMANTIC => 1 }, |
706
|
|
|
|
|
|
|
UNION => { ISSEMANTIC => 1 }, |
707
|
|
|
|
|
|
|
VIEWPOINT => { ISSEMANTIC => 1 }, |
708
|
|
|
|
|
|
|
WHITES => { ISSEMANTIC => 1 }, |
709
|
|
|
|
|
|
|
error => { ISSEMANTIC => 1 }, |
710
|
|
|
|
|
|
|
error => { ISSEMANTIC => 0 }, |
711
|
|
|
|
|
|
|
}, |
712
|
|
|
|
|
|
|
yyFILENAME => 'lib/Parse/Eyapp/Parse.yp', |
713
|
|
|
|
|
|
|
yystates => |
714
|
|
|
|
|
|
|
[ |
715
|
|
|
|
|
|
|
{#State 0 |
716
|
|
|
|
|
|
|
ACTIONS => { |
717
|
|
|
|
|
|
|
'SEMANTIC' => 20, |
718
|
|
|
|
|
|
|
'LEXER' => 19, |
719
|
|
|
|
|
|
|
'WHITES' => 23, |
720
|
|
|
|
|
|
|
'error' => 21, |
721
|
|
|
|
|
|
|
'NAMINGSCHEME' => 16, |
722
|
|
|
|
|
|
|
'INCREMENTAL' => 15, |
723
|
|
|
|
|
|
|
'DEFAULTACTION' => 18, |
724
|
|
|
|
|
|
|
'CONFLICT' => 17, |
725
|
|
|
|
|
|
|
'SYNTACTIC' => 30, |
726
|
|
|
|
|
|
|
'TREE' => 29, |
727
|
|
|
|
|
|
|
'METATREE' => 24, |
728
|
|
|
|
|
|
|
'HEADCODE' => 28, |
729
|
|
|
|
|
|
|
'PREFIX' => 27, |
730
|
|
|
|
|
|
|
'EXPECTRR' => 25, |
731
|
|
|
|
|
|
|
'NOCOMPACT' => 26, |
732
|
|
|
|
|
|
|
"%%" => -11, |
733
|
|
|
|
|
|
|
'START' => 6, |
734
|
|
|
|
|
|
|
'DUMMY' => 2, |
735
|
|
|
|
|
|
|
'TOKEN' => 1, |
736
|
|
|
|
|
|
|
'UNION' => 10, |
737
|
|
|
|
|
|
|
'ASSOC' => 8, |
738
|
|
|
|
|
|
|
'EXPLORER' => 9, |
739
|
|
|
|
|
|
|
'EXPECT' => 13, |
740
|
|
|
|
|
|
|
"\n" => 12, |
741
|
|
|
|
|
|
|
'STRICT' => 14, |
742
|
|
|
|
|
|
|
'TYPE' => 7 |
743
|
|
|
|
|
|
|
}, |
744
|
|
|
|
|
|
|
GOTOS => { |
745
|
|
|
|
|
|
|
'decl' => 5, |
746
|
|
|
|
|
|
|
'eyapp' => 3, |
747
|
|
|
|
|
|
|
'decls' => 4, |
748
|
|
|
|
|
|
|
'head' => 11, |
749
|
|
|
|
|
|
|
'headsec' => 22 |
750
|
|
|
|
|
|
|
} |
751
|
|
|
|
|
|
|
}, |
752
|
|
|
|
|
|
|
{#State 1 |
753
|
|
|
|
|
|
|
ACTIONS => { |
754
|
|
|
|
|
|
|
"<" => 32 |
755
|
|
|
|
|
|
|
}, |
756
|
|
|
|
|
|
|
DEFAULT => -52, |
757
|
|
|
|
|
|
|
GOTOS => { |
758
|
|
|
|
|
|
|
'typedecl' => 31 |
759
|
|
|
|
|
|
|
} |
760
|
|
|
|
|
|
|
}, |
761
|
|
|
|
|
|
|
{#State 2 |
762
|
|
|
|
|
|
|
ACTIONS => { |
763
|
|
|
|
|
|
|
"<" => 32 |
764
|
|
|
|
|
|
|
}, |
765
|
|
|
|
|
|
|
DEFAULT => -52, |
766
|
|
|
|
|
|
|
GOTOS => { |
767
|
|
|
|
|
|
|
'typedecl' => 33 |
768
|
|
|
|
|
|
|
} |
769
|
|
|
|
|
|
|
}, |
770
|
|
|
|
|
|
|
{#State 3 |
771
|
|
|
|
|
|
|
ACTIONS => { |
772
|
|
|
|
|
|
|
'' => 34 |
773
|
|
|
|
|
|
|
} |
774
|
|
|
|
|
|
|
}, |
775
|
|
|
|
|
|
|
{#State 4 |
776
|
|
|
|
|
|
|
ACTIONS => { |
777
|
|
|
|
|
|
|
'TYPE' => 7, |
778
|
|
|
|
|
|
|
"\n" => 12, |
779
|
|
|
|
|
|
|
'EXPECT' => 13, |
780
|
|
|
|
|
|
|
'STRICT' => 14, |
781
|
|
|
|
|
|
|
'EXPLORER' => 9, |
782
|
|
|
|
|
|
|
'ASSOC' => 8, |
783
|
|
|
|
|
|
|
'UNION' => 10, |
784
|
|
|
|
|
|
|
'TOKEN' => 1, |
785
|
|
|
|
|
|
|
'DUMMY' => 2, |
786
|
|
|
|
|
|
|
'START' => 6, |
787
|
|
|
|
|
|
|
"%%" => -12, |
788
|
|
|
|
|
|
|
'NOCOMPACT' => 26, |
789
|
|
|
|
|
|
|
'EXPECTRR' => 25, |
790
|
|
|
|
|
|
|
'PREFIX' => 27, |
791
|
|
|
|
|
|
|
'HEADCODE' => 28, |
792
|
|
|
|
|
|
|
'METATREE' => 24, |
793
|
|
|
|
|
|
|
'TREE' => 29, |
794
|
|
|
|
|
|
|
'SYNTACTIC' => 30, |
795
|
|
|
|
|
|
|
'DEFAULTACTION' => 18, |
796
|
|
|
|
|
|
|
'CONFLICT' => 17, |
797
|
|
|
|
|
|
|
'NAMINGSCHEME' => 16, |
798
|
|
|
|
|
|
|
'INCREMENTAL' => 15, |
799
|
|
|
|
|
|
|
'error' => 21, |
800
|
|
|
|
|
|
|
'WHITES' => 23, |
801
|
|
|
|
|
|
|
'SEMANTIC' => 20, |
802
|
|
|
|
|
|
|
'LEXER' => 19 |
803
|
|
|
|
|
|
|
}, |
804
|
|
|
|
|
|
|
GOTOS => { |
805
|
|
|
|
|
|
|
'decl' => 35 |
806
|
|
|
|
|
|
|
} |
807
|
|
|
|
|
|
|
}, |
808
|
|
|
|
|
|
|
{#State 5 |
809
|
|
|
|
|
|
|
DEFAULT => -14 |
810
|
|
|
|
|
|
|
}, |
811
|
|
|
|
|
|
|
{#State 6 |
812
|
|
|
|
|
|
|
ACTIONS => { |
813
|
|
|
|
|
|
|
'IDENT' => 37 |
814
|
|
|
|
|
|
|
}, |
815
|
|
|
|
|
|
|
GOTOS => { |
816
|
|
|
|
|
|
|
'ident' => 36 |
817
|
|
|
|
|
|
|
} |
818
|
|
|
|
|
|
|
}, |
819
|
|
|
|
|
|
|
{#State 7 |
820
|
|
|
|
|
|
|
ACTIONS => { |
821
|
|
|
|
|
|
|
"<" => 32 |
822
|
|
|
|
|
|
|
}, |
823
|
|
|
|
|
|
|
DEFAULT => -52, |
824
|
|
|
|
|
|
|
GOTOS => { |
825
|
|
|
|
|
|
|
'typedecl' => 38 |
826
|
|
|
|
|
|
|
} |
827
|
|
|
|
|
|
|
}, |
828
|
|
|
|
|
|
|
{#State 8 |
829
|
|
|
|
|
|
|
ACTIONS => { |
830
|
|
|
|
|
|
|
"<" => 32 |
831
|
|
|
|
|
|
|
}, |
832
|
|
|
|
|
|
|
DEFAULT => -52, |
833
|
|
|
|
|
|
|
GOTOS => { |
834
|
|
|
|
|
|
|
'typedecl' => 39 |
835
|
|
|
|
|
|
|
} |
836
|
|
|
|
|
|
|
}, |
837
|
|
|
|
|
|
|
{#State 9 |
838
|
|
|
|
|
|
|
ACTIONS => { |
839
|
|
|
|
|
|
|
'IDENT' => 37 |
840
|
|
|
|
|
|
|
}, |
841
|
|
|
|
|
|
|
GOTOS => { |
842
|
|
|
|
|
|
|
'ident' => 40 |
843
|
|
|
|
|
|
|
} |
844
|
|
|
|
|
|
|
}, |
845
|
|
|
|
|
|
|
{#State 10 |
846
|
|
|
|
|
|
|
ACTIONS => { |
847
|
|
|
|
|
|
|
'CODE' => 41 |
848
|
|
|
|
|
|
|
} |
849
|
|
|
|
|
|
|
}, |
850
|
|
|
|
|
|
|
{#State 11 |
851
|
|
|
|
|
|
|
ACTIONS => { |
852
|
|
|
|
|
|
|
'IDENT' => 45, |
853
|
|
|
|
|
|
|
'error' => 46, |
854
|
|
|
|
|
|
|
"%%" => 42 |
855
|
|
|
|
|
|
|
}, |
856
|
|
|
|
|
|
|
GOTOS => { |
857
|
|
|
|
|
|
|
'rulesec' => 47, |
858
|
|
|
|
|
|
|
'startrules' => 43, |
859
|
|
|
|
|
|
|
'body' => 44 |
860
|
|
|
|
|
|
|
} |
861
|
|
|
|
|
|
|
}, |
862
|
|
|
|
|
|
|
{#State 12 |
863
|
|
|
|
|
|
|
DEFAULT => -15 |
864
|
|
|
|
|
|
|
}, |
865
|
|
|
|
|
|
|
{#State 13 |
866
|
|
|
|
|
|
|
ACTIONS => { |
867
|
|
|
|
|
|
|
'NUMBER' => 48 |
868
|
|
|
|
|
|
|
} |
869
|
|
|
|
|
|
|
}, |
870
|
|
|
|
|
|
|
{#State 14 |
871
|
|
|
|
|
|
|
ACTIONS => { |
872
|
|
|
|
|
|
|
"\n" => 49 |
873
|
|
|
|
|
|
|
} |
874
|
|
|
|
|
|
|
}, |
875
|
|
|
|
|
|
|
{#State 15 |
876
|
|
|
|
|
|
|
ACTIONS => { |
877
|
|
|
|
|
|
|
"\n" => 50, |
878
|
|
|
|
|
|
|
'LITERAL' => 51 |
879
|
|
|
|
|
|
|
} |
880
|
|
|
|
|
|
|
}, |
881
|
|
|
|
|
|
|
{#State 16 |
882
|
|
|
|
|
|
|
ACTIONS => { |
883
|
|
|
|
|
|
|
'CODE' => 52 |
884
|
|
|
|
|
|
|
} |
885
|
|
|
|
|
|
|
}, |
886
|
|
|
|
|
|
|
{#State 17 |
887
|
|
|
|
|
|
|
ACTIONS => { |
888
|
|
|
|
|
|
|
'IDENT' => 37 |
889
|
|
|
|
|
|
|
}, |
890
|
|
|
|
|
|
|
GOTOS => { |
891
|
|
|
|
|
|
|
'ident' => 53 |
892
|
|
|
|
|
|
|
} |
893
|
|
|
|
|
|
|
}, |
894
|
|
|
|
|
|
|
{#State 18 |
895
|
|
|
|
|
|
|
ACTIONS => { |
896
|
|
|
|
|
|
|
'CODE' => 54 |
897
|
|
|
|
|
|
|
} |
898
|
|
|
|
|
|
|
}, |
899
|
|
|
|
|
|
|
{#State 19 |
900
|
|
|
|
|
|
|
ACTIONS => { |
901
|
|
|
|
|
|
|
'CODE' => 55 |
902
|
|
|
|
|
|
|
} |
903
|
|
|
|
|
|
|
}, |
904
|
|
|
|
|
|
|
{#State 20 |
905
|
|
|
|
|
|
|
ACTIONS => { |
906
|
|
|
|
|
|
|
"<" => 32 |
907
|
|
|
|
|
|
|
}, |
908
|
|
|
|
|
|
|
DEFAULT => -52, |
909
|
|
|
|
|
|
|
GOTOS => { |
910
|
|
|
|
|
|
|
'typedecl' => 56 |
911
|
|
|
|
|
|
|
} |
912
|
|
|
|
|
|
|
}, |
913
|
|
|
|
|
|
|
{#State 21 |
914
|
|
|
|
|
|
|
ACTIONS => { |
915
|
|
|
|
|
|
|
"\n" => 57 |
916
|
|
|
|
|
|
|
} |
917
|
|
|
|
|
|
|
}, |
918
|
|
|
|
|
|
|
{#State 22 |
919
|
|
|
|
|
|
|
ACTIONS => { |
920
|
|
|
|
|
|
|
"%%" => 58 |
921
|
|
|
|
|
|
|
} |
922
|
|
|
|
|
|
|
}, |
923
|
|
|
|
|
|
|
{#State 23 |
924
|
|
|
|
|
|
|
ACTIONS => { |
925
|
|
|
|
|
|
|
'REGEXP' => 61, |
926
|
|
|
|
|
|
|
"=" => 60, |
927
|
|
|
|
|
|
|
'CODE' => 59 |
928
|
|
|
|
|
|
|
} |
929
|
|
|
|
|
|
|
}, |
930
|
|
|
|
|
|
|
{#State 24 |
931
|
|
|
|
|
|
|
ACTIONS => { |
932
|
|
|
|
|
|
|
"\n" => 62 |
933
|
|
|
|
|
|
|
} |
934
|
|
|
|
|
|
|
}, |
935
|
|
|
|
|
|
|
{#State 25 |
936
|
|
|
|
|
|
|
ACTIONS => { |
937
|
|
|
|
|
|
|
'NUMBER' => 63 |
938
|
|
|
|
|
|
|
} |
939
|
|
|
|
|
|
|
}, |
940
|
|
|
|
|
|
|
{#State 26 |
941
|
|
|
|
|
|
|
ACTIONS => { |
942
|
|
|
|
|
|
|
"\n" => 64 |
943
|
|
|
|
|
|
|
} |
944
|
|
|
|
|
|
|
}, |
945
|
|
|
|
|
|
|
{#State 27 |
946
|
|
|
|
|
|
|
ACTIONS => { |
947
|
|
|
|
|
|
|
"\n" => 65 |
948
|
|
|
|
|
|
|
} |
949
|
|
|
|
|
|
|
}, |
950
|
|
|
|
|
|
|
{#State 28 |
951
|
|
|
|
|
|
|
ACTIONS => { |
952
|
|
|
|
|
|
|
"\n" => 66 |
953
|
|
|
|
|
|
|
} |
954
|
|
|
|
|
|
|
}, |
955
|
|
|
|
|
|
|
{#State 29 |
956
|
|
|
|
|
|
|
ACTIONS => { |
957
|
|
|
|
|
|
|
"\n" => 67 |
958
|
|
|
|
|
|
|
} |
959
|
|
|
|
|
|
|
}, |
960
|
|
|
|
|
|
|
{#State 30 |
961
|
|
|
|
|
|
|
ACTIONS => { |
962
|
|
|
|
|
|
|
"<" => 32 |
963
|
|
|
|
|
|
|
}, |
964
|
|
|
|
|
|
|
DEFAULT => -52, |
965
|
|
|
|
|
|
|
GOTOS => { |
966
|
|
|
|
|
|
|
'typedecl' => 68 |
967
|
|
|
|
|
|
|
} |
968
|
|
|
|
|
|
|
}, |
969
|
|
|
|
|
|
|
{#State 31 |
970
|
|
|
|
|
|
|
ACTIONS => { |
971
|
|
|
|
|
|
|
'LITERAL' => 70, |
972
|
|
|
|
|
|
|
'IDENT' => 37 |
973
|
|
|
|
|
|
|
}, |
974
|
|
|
|
|
|
|
GOTOS => { |
975
|
|
|
|
|
|
|
'symbol' => 72, |
976
|
|
|
|
|
|
|
'tokendef' => 69, |
977
|
|
|
|
|
|
|
'toklist' => 71, |
978
|
|
|
|
|
|
|
'ident' => 73 |
979
|
|
|
|
|
|
|
} |
980
|
|
|
|
|
|
|
}, |
981
|
|
|
|
|
|
|
{#State 32 |
982
|
|
|
|
|
|
|
ACTIONS => { |
983
|
|
|
|
|
|
|
'IDENT' => 74 |
984
|
|
|
|
|
|
|
} |
985
|
|
|
|
|
|
|
}, |
986
|
|
|
|
|
|
|
{#State 33 |
987
|
|
|
|
|
|
|
ACTIONS => { |
988
|
|
|
|
|
|
|
'LITERAL' => 70, |
989
|
|
|
|
|
|
|
'IDENT' => 37 |
990
|
|
|
|
|
|
|
}, |
991
|
|
|
|
|
|
|
GOTOS => { |
992
|
|
|
|
|
|
|
'toklist' => 75, |
993
|
|
|
|
|
|
|
'ident' => 73, |
994
|
|
|
|
|
|
|
'tokendef' => 69, |
995
|
|
|
|
|
|
|
'symbol' => 72 |
996
|
|
|
|
|
|
|
} |
997
|
|
|
|
|
|
|
}, |
998
|
|
|
|
|
|
|
{#State 34 |
999
|
|
|
|
|
|
|
DEFAULT => 0 |
1000
|
|
|
|
|
|
|
}, |
1001
|
|
|
|
|
|
|
{#State 35 |
1002
|
|
|
|
|
|
|
DEFAULT => -13 |
1003
|
|
|
|
|
|
|
}, |
1004
|
|
|
|
|
|
|
{#State 36 |
1005
|
|
|
|
|
|
|
ACTIONS => { |
1006
|
|
|
|
|
|
|
"\n" => 76 |
1007
|
|
|
|
|
|
|
} |
1008
|
|
|
|
|
|
|
}, |
1009
|
|
|
|
|
|
|
{#State 37 |
1010
|
|
|
|
|
|
|
DEFAULT => -4 |
1011
|
|
|
|
|
|
|
}, |
1012
|
|
|
|
|
|
|
{#State 38 |
1013
|
|
|
|
|
|
|
ACTIONS => { |
1014
|
|
|
|
|
|
|
'IDENT' => 37 |
1015
|
|
|
|
|
|
|
}, |
1016
|
|
|
|
|
|
|
GOTOS => { |
1017
|
|
|
|
|
|
|
'identlist' => 77, |
1018
|
|
|
|
|
|
|
'ident' => 78 |
1019
|
|
|
|
|
|
|
} |
1020
|
|
|
|
|
|
|
}, |
1021
|
|
|
|
|
|
|
{#State 39 |
1022
|
|
|
|
|
|
|
ACTIONS => { |
1023
|
|
|
|
|
|
|
'LITERAL' => 70, |
1024
|
|
|
|
|
|
|
'IDENT' => 37 |
1025
|
|
|
|
|
|
|
}, |
1026
|
|
|
|
|
|
|
GOTOS => { |
1027
|
|
|
|
|
|
|
'symlist' => 80, |
1028
|
|
|
|
|
|
|
'symbol' => 81, |
1029
|
|
|
|
|
|
|
'ident' => 79 |
1030
|
|
|
|
|
|
|
} |
1031
|
|
|
|
|
|
|
}, |
1032
|
|
|
|
|
|
|
{#State 40 |
1033
|
|
|
|
|
|
|
ACTIONS => { |
1034
|
|
|
|
|
|
|
'CODE' => 83, |
1035
|
|
|
|
|
|
|
'IDENT' => 85, |
1036
|
|
|
|
|
|
|
'LITERAL' => 82 |
1037
|
|
|
|
|
|
|
}, |
1038
|
|
|
|
|
|
|
GOTOS => { |
1039
|
|
|
|
|
|
|
'perlident' => 84 |
1040
|
|
|
|
|
|
|
} |
1041
|
|
|
|
|
|
|
}, |
1042
|
|
|
|
|
|
|
{#State 41 |
1043
|
|
|
|
|
|
|
ACTIONS => { |
1044
|
|
|
|
|
|
|
"\n" => 86 |
1045
|
|
|
|
|
|
|
} |
1046
|
|
|
|
|
|
|
}, |
1047
|
|
|
|
|
|
|
{#State 42 |
1048
|
|
|
|
|
|
|
DEFAULT => -67 |
1049
|
|
|
|
|
|
|
}, |
1050
|
|
|
|
|
|
|
{#State 43 |
1051
|
|
|
|
|
|
|
DEFAULT => -69 |
1052
|
|
|
|
|
|
|
}, |
1053
|
|
|
|
|
|
|
{#State 44 |
1054
|
|
|
|
|
|
|
ACTIONS => { |
1055
|
|
|
|
|
|
|
'TAILCODE' => 88 |
1056
|
|
|
|
|
|
|
}, |
1057
|
|
|
|
|
|
|
DEFAULT => -106, |
1058
|
|
|
|
|
|
|
GOTOS => { |
1059
|
|
|
|
|
|
|
'tail' => 87 |
1060
|
|
|
|
|
|
|
} |
1061
|
|
|
|
|
|
|
}, |
1062
|
|
|
|
|
|
|
{#State 45 |
1063
|
|
|
|
|
|
|
ACTIONS => { |
1064
|
|
|
|
|
|
|
":" => 89 |
1065
|
|
|
|
|
|
|
} |
1066
|
|
|
|
|
|
|
}, |
1067
|
|
|
|
|
|
|
{#State 46 |
1068
|
|
|
|
|
|
|
ACTIONS => { |
1069
|
|
|
|
|
|
|
";" => 90 |
1070
|
|
|
|
|
|
|
} |
1071
|
|
|
|
|
|
|
}, |
1072
|
|
|
|
|
|
|
{#State 47 |
1073
|
|
|
|
|
|
|
ACTIONS => { |
1074
|
|
|
|
|
|
|
'IDENT' => 93, |
1075
|
|
|
|
|
|
|
'error' => 92, |
1076
|
|
|
|
|
|
|
"%%" => 91 |
1077
|
|
|
|
|
|
|
}, |
1078
|
|
|
|
|
|
|
GOTOS => { |
1079
|
|
|
|
|
|
|
'rules' => 94 |
1080
|
|
|
|
|
|
|
} |
1081
|
|
|
|
|
|
|
}, |
1082
|
|
|
|
|
|
|
{#State 48 |
1083
|
|
|
|
|
|
|
ACTIONS => { |
1084
|
|
|
|
|
|
|
"\n" => 95, |
1085
|
|
|
|
|
|
|
'NUMBER' => 96 |
1086
|
|
|
|
|
|
|
} |
1087
|
|
|
|
|
|
|
}, |
1088
|
|
|
|
|
|
|
{#State 49 |
1089
|
|
|
|
|
|
|
DEFAULT => -36 |
1090
|
|
|
|
|
|
|
}, |
1091
|
|
|
|
|
|
|
{#State 50 |
1092
|
|
|
|
|
|
|
DEFAULT => -31 |
1093
|
|
|
|
|
|
|
}, |
1094
|
|
|
|
|
|
|
{#State 51 |
1095
|
|
|
|
|
|
|
ACTIONS => { |
1096
|
|
|
|
|
|
|
"\n" => 97 |
1097
|
|
|
|
|
|
|
} |
1098
|
|
|
|
|
|
|
}, |
1099
|
|
|
|
|
|
|
{#State 52 |
1100
|
|
|
|
|
|
|
ACTIONS => { |
1101
|
|
|
|
|
|
|
"\n" => 98 |
1102
|
|
|
|
|
|
|
} |
1103
|
|
|
|
|
|
|
}, |
1104
|
|
|
|
|
|
|
{#State 53 |
1105
|
|
|
|
|
|
|
ACTIONS => { |
1106
|
|
|
|
|
|
|
"!" => 100, |
1107
|
|
|
|
|
|
|
'IDENT' => 85, |
1108
|
|
|
|
|
|
|
'CODE' => 99 |
1109
|
|
|
|
|
|
|
}, |
1110
|
|
|
|
|
|
|
DEFAULT => -50, |
1111
|
|
|
|
|
|
|
GOTOS => { |
1112
|
|
|
|
|
|
|
'neg' => 102, |
1113
|
|
|
|
|
|
|
'perlident' => 101 |
1114
|
|
|
|
|
|
|
} |
1115
|
|
|
|
|
|
|
}, |
1116
|
|
|
|
|
|
|
{#State 54 |
1117
|
|
|
|
|
|
|
ACTIONS => { |
1118
|
|
|
|
|
|
|
"\n" => 103 |
1119
|
|
|
|
|
|
|
} |
1120
|
|
|
|
|
|
|
}, |
1121
|
|
|
|
|
|
|
{#State 55 |
1122
|
|
|
|
|
|
|
ACTIONS => { |
1123
|
|
|
|
|
|
|
"\n" => 104 |
1124
|
|
|
|
|
|
|
} |
1125
|
|
|
|
|
|
|
}, |
1126
|
|
|
|
|
|
|
{#State 56 |
1127
|
|
|
|
|
|
|
ACTIONS => { |
1128
|
|
|
|
|
|
|
'LITERAL' => 70, |
1129
|
|
|
|
|
|
|
'IDENT' => 37 |
1130
|
|
|
|
|
|
|
}, |
1131
|
|
|
|
|
|
|
GOTOS => { |
1132
|
|
|
|
|
|
|
'ident' => 73, |
1133
|
|
|
|
|
|
|
'toklist' => 105, |
1134
|
|
|
|
|
|
|
'tokendef' => 69, |
1135
|
|
|
|
|
|
|
'symbol' => 72 |
1136
|
|
|
|
|
|
|
} |
1137
|
|
|
|
|
|
|
}, |
1138
|
|
|
|
|
|
|
{#State 57 |
1139
|
|
|
|
|
|
|
DEFAULT => -49 |
1140
|
|
|
|
|
|
|
}, |
1141
|
|
|
|
|
|
|
{#State 58 |
1142
|
|
|
|
|
|
|
DEFAULT => -8 |
1143
|
|
|
|
|
|
|
}, |
1144
|
|
|
|
|
|
|
{#State 59 |
1145
|
|
|
|
|
|
|
ACTIONS => { |
1146
|
|
|
|
|
|
|
"\n" => 106 |
1147
|
|
|
|
|
|
|
} |
1148
|
|
|
|
|
|
|
}, |
1149
|
|
|
|
|
|
|
{#State 60 |
1150
|
|
|
|
|
|
|
ACTIONS => { |
1151
|
|
|
|
|
|
|
'REGEXP' => 107, |
1152
|
|
|
|
|
|
|
'CODE' => 108 |
1153
|
|
|
|
|
|
|
} |
1154
|
|
|
|
|
|
|
}, |
1155
|
|
|
|
|
|
|
{#State 61 |
1156
|
|
|
|
|
|
|
ACTIONS => { |
1157
|
|
|
|
|
|
|
"\n" => 109 |
1158
|
|
|
|
|
|
|
} |
1159
|
|
|
|
|
|
|
}, |
1160
|
|
|
|
|
|
|
{#State 62 |
1161
|
|
|
|
|
|
|
DEFAULT => -35 |
1162
|
|
|
|
|
|
|
}, |
1163
|
|
|
|
|
|
|
{#State 63 |
1164
|
|
|
|
|
|
|
ACTIONS => { |
1165
|
|
|
|
|
|
|
"\n" => 110 |
1166
|
|
|
|
|
|
|
} |
1167
|
|
|
|
|
|
|
}, |
1168
|
|
|
|
|
|
|
{#State 64 |
1169
|
|
|
|
|
|
|
DEFAULT => -37 |
1170
|
|
|
|
|
|
|
}, |
1171
|
|
|
|
|
|
|
{#State 65 |
1172
|
|
|
|
|
|
|
DEFAULT => -22 |
1173
|
|
|
|
|
|
|
}, |
1174
|
|
|
|
|
|
|
{#State 66 |
1175
|
|
|
|
|
|
|
DEFAULT => -28 |
1176
|
|
|
|
|
|
|
}, |
1177
|
|
|
|
|
|
|
{#State 67 |
1178
|
|
|
|
|
|
|
DEFAULT => -34 |
1179
|
|
|
|
|
|
|
}, |
1180
|
|
|
|
|
|
|
{#State 68 |
1181
|
|
|
|
|
|
|
ACTIONS => { |
1182
|
|
|
|
|
|
|
'IDENT' => 37, |
1183
|
|
|
|
|
|
|
'LITERAL' => 70 |
1184
|
|
|
|
|
|
|
}, |
1185
|
|
|
|
|
|
|
GOTOS => { |
1186
|
|
|
|
|
|
|
'ident' => 73, |
1187
|
|
|
|
|
|
|
'toklist' => 111, |
1188
|
|
|
|
|
|
|
'tokendef' => 69, |
1189
|
|
|
|
|
|
|
'symbol' => 72 |
1190
|
|
|
|
|
|
|
} |
1191
|
|
|
|
|
|
|
}, |
1192
|
|
|
|
|
|
|
{#State 69 |
1193
|
|
|
|
|
|
|
DEFAULT => -57 |
1194
|
|
|
|
|
|
|
}, |
1195
|
|
|
|
|
|
|
{#State 70 |
1196
|
|
|
|
|
|
|
DEFAULT => -2 |
1197
|
|
|
|
|
|
|
}, |
1198
|
|
|
|
|
|
|
{#State 71 |
1199
|
|
|
|
|
|
|
ACTIONS => { |
1200
|
|
|
|
|
|
|
'LITERAL' => 70, |
1201
|
|
|
|
|
|
|
'IDENT' => 37, |
1202
|
|
|
|
|
|
|
"\n" => 113 |
1203
|
|
|
|
|
|
|
}, |
1204
|
|
|
|
|
|
|
GOTOS => { |
1205
|
|
|
|
|
|
|
'tokendef' => 112, |
1206
|
|
|
|
|
|
|
'symbol' => 72, |
1207
|
|
|
|
|
|
|
'ident' => 73 |
1208
|
|
|
|
|
|
|
} |
1209
|
|
|
|
|
|
|
}, |
1210
|
|
|
|
|
|
|
{#State 72 |
1211
|
|
|
|
|
|
|
DEFAULT => -63 |
1212
|
|
|
|
|
|
|
}, |
1213
|
|
|
|
|
|
|
{#State 73 |
1214
|
|
|
|
|
|
|
ACTIONS => { |
1215
|
|
|
|
|
|
|
"=" => 114 |
1216
|
|
|
|
|
|
|
}, |
1217
|
|
|
|
|
|
|
DEFAULT => -3 |
1218
|
|
|
|
|
|
|
}, |
1219
|
|
|
|
|
|
|
{#State 74 |
1220
|
|
|
|
|
|
|
ACTIONS => { |
1221
|
|
|
|
|
|
|
">" => 115 |
1222
|
|
|
|
|
|
|
} |
1223
|
|
|
|
|
|
|
}, |
1224
|
|
|
|
|
|
|
{#State 75 |
1225
|
|
|
|
|
|
|
ACTIONS => { |
1226
|
|
|
|
|
|
|
'LITERAL' => 70, |
1227
|
|
|
|
|
|
|
'IDENT' => 37, |
1228
|
|
|
|
|
|
|
"\n" => 116 |
1229
|
|
|
|
|
|
|
}, |
1230
|
|
|
|
|
|
|
GOTOS => { |
1231
|
|
|
|
|
|
|
'ident' => 73, |
1232
|
|
|
|
|
|
|
'tokendef' => 112, |
1233
|
|
|
|
|
|
|
'symbol' => 72 |
1234
|
|
|
|
|
|
|
} |
1235
|
|
|
|
|
|
|
}, |
1236
|
|
|
|
|
|
|
{#State 76 |
1237
|
|
|
|
|
|
|
DEFAULT => -21 |
1238
|
|
|
|
|
|
|
}, |
1239
|
|
|
|
|
|
|
{#State 77 |
1240
|
|
|
|
|
|
|
ACTIONS => { |
1241
|
|
|
|
|
|
|
'IDENT' => 37, |
1242
|
|
|
|
|
|
|
"\n" => 117 |
1243
|
|
|
|
|
|
|
}, |
1244
|
|
|
|
|
|
|
GOTOS => { |
1245
|
|
|
|
|
|
|
'ident' => 118 |
1246
|
|
|
|
|
|
|
} |
1247
|
|
|
|
|
|
|
}, |
1248
|
|
|
|
|
|
|
{#State 78 |
1249
|
|
|
|
|
|
|
DEFAULT => -65 |
1250
|
|
|
|
|
|
|
}, |
1251
|
|
|
|
|
|
|
{#State 79 |
1252
|
|
|
|
|
|
|
DEFAULT => -3 |
1253
|
|
|
|
|
|
|
}, |
1254
|
|
|
|
|
|
|
{#State 80 |
1255
|
|
|
|
|
|
|
ACTIONS => { |
1256
|
|
|
|
|
|
|
'LITERAL' => 70, |
1257
|
|
|
|
|
|
|
'IDENT' => 37, |
1258
|
|
|
|
|
|
|
"\n" => 119 |
1259
|
|
|
|
|
|
|
}, |
1260
|
|
|
|
|
|
|
GOTOS => { |
1261
|
|
|
|
|
|
|
'ident' => 79, |
1262
|
|
|
|
|
|
|
'symbol' => 120 |
1263
|
|
|
|
|
|
|
} |
1264
|
|
|
|
|
|
|
}, |
1265
|
|
|
|
|
|
|
{#State 81 |
1266
|
|
|
|
|
|
|
DEFAULT => -55 |
1267
|
|
|
|
|
|
|
}, |
1268
|
|
|
|
|
|
|
{#State 82 |
1269
|
|
|
|
|
|
|
ACTIONS => { |
1270
|
|
|
|
|
|
|
"\n" => 121 |
1271
|
|
|
|
|
|
|
} |
1272
|
|
|
|
|
|
|
}, |
1273
|
|
|
|
|
|
|
{#State 83 |
1274
|
|
|
|
|
|
|
ACTIONS => { |
1275
|
|
|
|
|
|
|
"\n" => 122 |
1276
|
|
|
|
|
|
|
} |
1277
|
|
|
|
|
|
|
}, |
1278
|
|
|
|
|
|
|
{#State 84 |
1279
|
|
|
|
|
|
|
ACTIONS => { |
1280
|
|
|
|
|
|
|
"\n" => 124, |
1281
|
|
|
|
|
|
|
'LITERAL' => 125, |
1282
|
|
|
|
|
|
|
"::" => 123 |
1283
|
|
|
|
|
|
|
} |
1284
|
|
|
|
|
|
|
}, |
1285
|
|
|
|
|
|
|
{#State 85 |
1286
|
|
|
|
|
|
|
DEFAULT => -9 |
1287
|
|
|
|
|
|
|
}, |
1288
|
|
|
|
|
|
|
{#State 86 |
1289
|
|
|
|
|
|
|
DEFAULT => -29 |
1290
|
|
|
|
|
|
|
}, |
1291
|
|
|
|
|
|
|
{#State 87 |
1292
|
|
|
|
|
|
|
DEFAULT => -1 |
1293
|
|
|
|
|
|
|
}, |
1294
|
|
|
|
|
|
|
{#State 88 |
1295
|
|
|
|
|
|
|
DEFAULT => -107 |
1296
|
|
|
|
|
|
|
}, |
1297
|
|
|
|
|
|
|
{#State 89 |
1298
|
|
|
|
|
|
|
DEFAULT => -71, |
1299
|
|
|
|
|
|
|
GOTOS => { |
1300
|
|
|
|
|
|
|
'@70-2' => 126 |
1301
|
|
|
|
|
|
|
} |
1302
|
|
|
|
|
|
|
}, |
1303
|
|
|
|
|
|
|
{#State 90 |
1304
|
|
|
|
|
|
|
DEFAULT => -72 |
1305
|
|
|
|
|
|
|
}, |
1306
|
|
|
|
|
|
|
{#State 91 |
1307
|
|
|
|
|
|
|
DEFAULT => -66 |
1308
|
|
|
|
|
|
|
}, |
1309
|
|
|
|
|
|
|
{#State 92 |
1310
|
|
|
|
|
|
|
ACTIONS => { |
1311
|
|
|
|
|
|
|
";" => 127 |
1312
|
|
|
|
|
|
|
} |
1313
|
|
|
|
|
|
|
}, |
1314
|
|
|
|
|
|
|
{#State 93 |
1315
|
|
|
|
|
|
|
ACTIONS => { |
1316
|
|
|
|
|
|
|
":" => 128 |
1317
|
|
|
|
|
|
|
} |
1318
|
|
|
|
|
|
|
}, |
1319
|
|
|
|
|
|
|
{#State 94 |
1320
|
|
|
|
|
|
|
DEFAULT => -68 |
1321
|
|
|
|
|
|
|
}, |
1322
|
|
|
|
|
|
|
{#State 95 |
1323
|
|
|
|
|
|
|
DEFAULT => -46 |
1324
|
|
|
|
|
|
|
}, |
1325
|
|
|
|
|
|
|
{#State 96 |
1326
|
|
|
|
|
|
|
ACTIONS => { |
1327
|
|
|
|
|
|
|
"\n" => 129 |
1328
|
|
|
|
|
|
|
} |
1329
|
|
|
|
|
|
|
}, |
1330
|
|
|
|
|
|
|
{#State 97 |
1331
|
|
|
|
|
|
|
DEFAULT => -32 |
1332
|
|
|
|
|
|
|
}, |
1333
|
|
|
|
|
|
|
{#State 98 |
1334
|
|
|
|
|
|
|
DEFAULT => -27 |
1335
|
|
|
|
|
|
|
}, |
1336
|
|
|
|
|
|
|
{#State 99 |
1337
|
|
|
|
|
|
|
ACTIONS => { |
1338
|
|
|
|
|
|
|
"\n" => 130 |
1339
|
|
|
|
|
|
|
} |
1340
|
|
|
|
|
|
|
}, |
1341
|
|
|
|
|
|
|
{#State 100 |
1342
|
|
|
|
|
|
|
DEFAULT => -51 |
1343
|
|
|
|
|
|
|
}, |
1344
|
|
|
|
|
|
|
{#State 101 |
1345
|
|
|
|
|
|
|
ACTIONS => { |
1346
|
|
|
|
|
|
|
"?" => 131, |
1347
|
|
|
|
|
|
|
"::" => 123 |
1348
|
|
|
|
|
|
|
} |
1349
|
|
|
|
|
|
|
}, |
1350
|
|
|
|
|
|
|
{#State 102 |
1351
|
|
|
|
|
|
|
ACTIONS => { |
1352
|
|
|
|
|
|
|
'REGEXP' => 132 |
1353
|
|
|
|
|
|
|
} |
1354
|
|
|
|
|
|
|
}, |
1355
|
|
|
|
|
|
|
{#State 103 |
1356
|
|
|
|
|
|
|
DEFAULT => -30 |
1357
|
|
|
|
|
|
|
}, |
1358
|
|
|
|
|
|
|
{#State 104 |
1359
|
|
|
|
|
|
|
DEFAULT => -33 |
1360
|
|
|
|
|
|
|
}, |
1361
|
|
|
|
|
|
|
{#State 105 |
1362
|
|
|
|
|
|
|
ACTIONS => { |
1363
|
|
|
|
|
|
|
"\n" => 133, |
1364
|
|
|
|
|
|
|
'IDENT' => 37, |
1365
|
|
|
|
|
|
|
'LITERAL' => 70 |
1366
|
|
|
|
|
|
|
}, |
1367
|
|
|
|
|
|
|
GOTOS => { |
1368
|
|
|
|
|
|
|
'ident' => 73, |
1369
|
|
|
|
|
|
|
'tokendef' => 112, |
1370
|
|
|
|
|
|
|
'symbol' => 72 |
1371
|
|
|
|
|
|
|
} |
1372
|
|
|
|
|
|
|
}, |
1373
|
|
|
|
|
|
|
{#State 106 |
1374
|
|
|
|
|
|
|
DEFAULT => -23 |
1375
|
|
|
|
|
|
|
}, |
1376
|
|
|
|
|
|
|
{#State 107 |
1377
|
|
|
|
|
|
|
ACTIONS => { |
1378
|
|
|
|
|
|
|
"\n" => 134 |
1379
|
|
|
|
|
|
|
} |
1380
|
|
|
|
|
|
|
}, |
1381
|
|
|
|
|
|
|
{#State 108 |
1382
|
|
|
|
|
|
|
ACTIONS => { |
1383
|
|
|
|
|
|
|
"\n" => 135 |
1384
|
|
|
|
|
|
|
} |
1385
|
|
|
|
|
|
|
}, |
1386
|
|
|
|
|
|
|
{#State 109 |
1387
|
|
|
|
|
|
|
DEFAULT => -24 |
1388
|
|
|
|
|
|
|
}, |
1389
|
|
|
|
|
|
|
{#State 110 |
1390
|
|
|
|
|
|
|
DEFAULT => -48 |
1391
|
|
|
|
|
|
|
}, |
1392
|
|
|
|
|
|
|
{#State 111 |
1393
|
|
|
|
|
|
|
ACTIONS => { |
1394
|
|
|
|
|
|
|
"\n" => 136, |
1395
|
|
|
|
|
|
|
'IDENT' => 37, |
1396
|
|
|
|
|
|
|
'LITERAL' => 70 |
1397
|
|
|
|
|
|
|
}, |
1398
|
|
|
|
|
|
|
GOTOS => { |
1399
|
|
|
|
|
|
|
'symbol' => 72, |
1400
|
|
|
|
|
|
|
'tokendef' => 112, |
1401
|
|
|
|
|
|
|
'ident' => 73 |
1402
|
|
|
|
|
|
|
} |
1403
|
|
|
|
|
|
|
}, |
1404
|
|
|
|
|
|
|
{#State 112 |
1405
|
|
|
|
|
|
|
DEFAULT => -56 |
1406
|
|
|
|
|
|
|
}, |
1407
|
|
|
|
|
|
|
{#State 113 |
1408
|
|
|
|
|
|
|
DEFAULT => -19 |
1409
|
|
|
|
|
|
|
}, |
1410
|
|
|
|
|
|
|
{#State 114 |
1411
|
|
|
|
|
|
|
ACTIONS => { |
1412
|
|
|
|
|
|
|
'CODE' => 139, |
1413
|
|
|
|
|
|
|
"%" => 137, |
1414
|
|
|
|
|
|
|
'REGEXP' => 138 |
1415
|
|
|
|
|
|
|
} |
1416
|
|
|
|
|
|
|
}, |
1417
|
|
|
|
|
|
|
{#State 115 |
1418
|
|
|
|
|
|
|
DEFAULT => -53 |
1419
|
|
|
|
|
|
|
}, |
1420
|
|
|
|
|
|
|
{#State 116 |
1421
|
|
|
|
|
|
|
DEFAULT => -18 |
1422
|
|
|
|
|
|
|
}, |
1423
|
|
|
|
|
|
|
{#State 117 |
1424
|
|
|
|
|
|
|
DEFAULT => -38 |
1425
|
|
|
|
|
|
|
}, |
1426
|
|
|
|
|
|
|
{#State 118 |
1427
|
|
|
|
|
|
|
DEFAULT => -64 |
1428
|
|
|
|
|
|
|
}, |
1429
|
|
|
|
|
|
|
{#State 119 |
1430
|
|
|
|
|
|
|
DEFAULT => -20 |
1431
|
|
|
|
|
|
|
}, |
1432
|
|
|
|
|
|
|
{#State 120 |
1433
|
|
|
|
|
|
|
DEFAULT => -54 |
1434
|
|
|
|
|
|
|
}, |
1435
|
|
|
|
|
|
|
{#State 121 |
1436
|
|
|
|
|
|
|
DEFAULT => -43 |
1437
|
|
|
|
|
|
|
}, |
1438
|
|
|
|
|
|
|
{#State 122 |
1439
|
|
|
|
|
|
|
DEFAULT => -42 |
1440
|
|
|
|
|
|
|
}, |
1441
|
|
|
|
|
|
|
{#State 123 |
1442
|
|
|
|
|
|
|
ACTIONS => { |
1443
|
|
|
|
|
|
|
'IDENT' => 140 |
1444
|
|
|
|
|
|
|
} |
1445
|
|
|
|
|
|
|
}, |
1446
|
|
|
|
|
|
|
{#State 124 |
1447
|
|
|
|
|
|
|
DEFAULT => -44 |
1448
|
|
|
|
|
|
|
}, |
1449
|
|
|
|
|
|
|
{#State 125 |
1450
|
|
|
|
|
|
|
ACTIONS => { |
1451
|
|
|
|
|
|
|
"\n" => 141 |
1452
|
|
|
|
|
|
|
} |
1453
|
|
|
|
|
|
|
}, |
1454
|
|
|
|
|
|
|
{#State 126 |
1455
|
|
|
|
|
|
|
ACTIONS => { |
1456
|
|
|
|
|
|
|
'NAME' => 143 |
1457
|
|
|
|
|
|
|
}, |
1458
|
|
|
|
|
|
|
DEFAULT => -97, |
1459
|
|
|
|
|
|
|
GOTOS => { |
1460
|
|
|
|
|
|
|
'rule' => 145, |
1461
|
|
|
|
|
|
|
'optname' => 142, |
1462
|
|
|
|
|
|
|
'rhss' => 144 |
1463
|
|
|
|
|
|
|
} |
1464
|
|
|
|
|
|
|
}, |
1465
|
|
|
|
|
|
|
{#State 127 |
1466
|
|
|
|
|
|
|
DEFAULT => -74 |
1467
|
|
|
|
|
|
|
}, |
1468
|
|
|
|
|
|
|
{#State 128 |
1469
|
|
|
|
|
|
|
ACTIONS => { |
1470
|
|
|
|
|
|
|
'NAME' => 143 |
1471
|
|
|
|
|
|
|
}, |
1472
|
|
|
|
|
|
|
DEFAULT => -97, |
1473
|
|
|
|
|
|
|
GOTOS => { |
1474
|
|
|
|
|
|
|
'rule' => 145, |
1475
|
|
|
|
|
|
|
'optname' => 142, |
1476
|
|
|
|
|
|
|
'rhss' => 146 |
1477
|
|
|
|
|
|
|
} |
1478
|
|
|
|
|
|
|
}, |
1479
|
|
|
|
|
|
|
{#State 129 |
1480
|
|
|
|
|
|
|
DEFAULT => -47 |
1481
|
|
|
|
|
|
|
}, |
1482
|
|
|
|
|
|
|
{#State 130 |
1483
|
|
|
|
|
|
|
DEFAULT => -39 |
1484
|
|
|
|
|
|
|
}, |
1485
|
|
|
|
|
|
|
{#State 131 |
1486
|
|
|
|
|
|
|
ACTIONS => { |
1487
|
|
|
|
|
|
|
'IDENT' => 148, |
1488
|
|
|
|
|
|
|
'LABEL' => 147 |
1489
|
|
|
|
|
|
|
}, |
1490
|
|
|
|
|
|
|
GOTOS => { |
1491
|
|
|
|
|
|
|
'prodname' => 149 |
1492
|
|
|
|
|
|
|
} |
1493
|
|
|
|
|
|
|
}, |
1494
|
|
|
|
|
|
|
{#State 132 |
1495
|
|
|
|
|
|
|
ACTIONS => { |
1496
|
|
|
|
|
|
|
"?" => 150 |
1497
|
|
|
|
|
|
|
} |
1498
|
|
|
|
|
|
|
}, |
1499
|
|
|
|
|
|
|
{#State 133 |
1500
|
|
|
|
|
|
|
DEFAULT => -16 |
1501
|
|
|
|
|
|
|
}, |
1502
|
|
|
|
|
|
|
{#State 134 |
1503
|
|
|
|
|
|
|
DEFAULT => -26 |
1504
|
|
|
|
|
|
|
}, |
1505
|
|
|
|
|
|
|
{#State 135 |
1506
|
|
|
|
|
|
|
DEFAULT => -25 |
1507
|
|
|
|
|
|
|
}, |
1508
|
|
|
|
|
|
|
{#State 136 |
1509
|
|
|
|
|
|
|
DEFAULT => -17 |
1510
|
|
|
|
|
|
|
}, |
1511
|
|
|
|
|
|
|
{#State 137 |
1512
|
|
|
|
|
|
|
ACTIONS => { |
1513
|
|
|
|
|
|
|
'REGEXP' => 151 |
1514
|
|
|
|
|
|
|
} |
1515
|
|
|
|
|
|
|
}, |
1516
|
|
|
|
|
|
|
{#State 138 |
1517
|
|
|
|
|
|
|
DEFAULT => -58 |
1518
|
|
|
|
|
|
|
}, |
1519
|
|
|
|
|
|
|
{#State 139 |
1520
|
|
|
|
|
|
|
DEFAULT => -62 |
1521
|
|
|
|
|
|
|
}, |
1522
|
|
|
|
|
|
|
{#State 140 |
1523
|
|
|
|
|
|
|
DEFAULT => -10 |
1524
|
|
|
|
|
|
|
}, |
1525
|
|
|
|
|
|
|
{#State 141 |
1526
|
|
|
|
|
|
|
DEFAULT => -45 |
1527
|
|
|
|
|
|
|
}, |
1528
|
|
|
|
|
|
|
{#State 142 |
1529
|
|
|
|
|
|
|
ACTIONS => { |
1530
|
|
|
|
|
|
|
"(" => 154, |
1531
|
|
|
|
|
|
|
'LITERAL' => 70, |
1532
|
|
|
|
|
|
|
'VIEWPOINT' => 152, |
1533
|
|
|
|
|
|
|
'BEGINCODE' => 153, |
1534
|
|
|
|
|
|
|
'DPREC' => 159, |
1535
|
|
|
|
|
|
|
'CODE' => 161, |
1536
|
|
|
|
|
|
|
"\$" => 162, |
1537
|
|
|
|
|
|
|
'IDENT' => 37 |
1538
|
|
|
|
|
|
|
}, |
1539
|
|
|
|
|
|
|
DEFAULT => -79, |
1540
|
|
|
|
|
|
|
GOTOS => { |
1541
|
|
|
|
|
|
|
'rhselt' => 156, |
1542
|
|
|
|
|
|
|
'symbol' => 157, |
1543
|
|
|
|
|
|
|
'rhs' => 155, |
1544
|
|
|
|
|
|
|
'rhselts' => 158, |
1545
|
|
|
|
|
|
|
'code' => 163, |
1546
|
|
|
|
|
|
|
'rhseltwithid' => 160, |
1547
|
|
|
|
|
|
|
'ident' => 79 |
1548
|
|
|
|
|
|
|
} |
1549
|
|
|
|
|
|
|
}, |
1550
|
|
|
|
|
|
|
{#State 143 |
1551
|
|
|
|
|
|
|
ACTIONS => { |
1552
|
|
|
|
|
|
|
'IDENT' => 165, |
1553
|
|
|
|
|
|
|
'LABEL' => 164 |
1554
|
|
|
|
|
|
|
} |
1555
|
|
|
|
|
|
|
}, |
1556
|
|
|
|
|
|
|
{#State 144 |
1557
|
|
|
|
|
|
|
ACTIONS => { |
1558
|
|
|
|
|
|
|
";" => 166, |
1559
|
|
|
|
|
|
|
"|" => 167 |
1560
|
|
|
|
|
|
|
} |
1561
|
|
|
|
|
|
|
}, |
1562
|
|
|
|
|
|
|
{#State 145 |
1563
|
|
|
|
|
|
|
DEFAULT => -76 |
1564
|
|
|
|
|
|
|
}, |
1565
|
|
|
|
|
|
|
{#State 146 |
1566
|
|
|
|
|
|
|
ACTIONS => { |
1567
|
|
|
|
|
|
|
"|" => 167, |
1568
|
|
|
|
|
|
|
";" => 168 |
1569
|
|
|
|
|
|
|
} |
1570
|
|
|
|
|
|
|
}, |
1571
|
|
|
|
|
|
|
{#State 147 |
1572
|
|
|
|
|
|
|
DEFAULT => -6 |
1573
|
|
|
|
|
|
|
}, |
1574
|
|
|
|
|
|
|
{#State 148 |
1575
|
|
|
|
|
|
|
ACTIONS => { |
1576
|
|
|
|
|
|
|
'LABEL' => 169 |
1577
|
|
|
|
|
|
|
}, |
1578
|
|
|
|
|
|
|
DEFAULT => -5 |
1579
|
|
|
|
|
|
|
}, |
1580
|
|
|
|
|
|
|
{#State 149 |
1581
|
|
|
|
|
|
|
ACTIONS => { |
1582
|
|
|
|
|
|
|
":" => 170 |
1583
|
|
|
|
|
|
|
} |
1584
|
|
|
|
|
|
|
}, |
1585
|
|
|
|
|
|
|
{#State 150 |
1586
|
|
|
|
|
|
|
ACTIONS => { |
1587
|
|
|
|
|
|
|
'IDENT' => 148, |
1588
|
|
|
|
|
|
|
'LABEL' => 147 |
1589
|
|
|
|
|
|
|
}, |
1590
|
|
|
|
|
|
|
GOTOS => { |
1591
|
|
|
|
|
|
|
'prodname' => 171 |
1592
|
|
|
|
|
|
|
} |
1593
|
|
|
|
|
|
|
}, |
1594
|
|
|
|
|
|
|
{#State 151 |
1595
|
|
|
|
|
|
|
ACTIONS => { |
1596
|
|
|
|
|
|
|
"!" => 173, |
1597
|
|
|
|
|
|
|
"=" => 172 |
1598
|
|
|
|
|
|
|
}, |
1599
|
|
|
|
|
|
|
DEFAULT => -59 |
1600
|
|
|
|
|
|
|
}, |
1601
|
|
|
|
|
|
|
{#State 152 |
1602
|
|
|
|
|
|
|
DEFAULT => -90 |
1603
|
|
|
|
|
|
|
}, |
1604
|
|
|
|
|
|
|
{#State 153 |
1605
|
|
|
|
|
|
|
DEFAULT => -105 |
1606
|
|
|
|
|
|
|
}, |
1607
|
|
|
|
|
|
|
{#State 154 |
1608
|
|
|
|
|
|
|
ACTIONS => { |
1609
|
|
|
|
|
|
|
'NAME' => 143 |
1610
|
|
|
|
|
|
|
}, |
1611
|
|
|
|
|
|
|
DEFAULT => -97, |
1612
|
|
|
|
|
|
|
GOTOS => { |
1613
|
|
|
|
|
|
|
'optname' => 174 |
1614
|
|
|
|
|
|
|
} |
1615
|
|
|
|
|
|
|
}, |
1616
|
|
|
|
|
|
|
{#State 155 |
1617
|
|
|
|
|
|
|
ACTIONS => { |
1618
|
|
|
|
|
|
|
'PREC' => 175 |
1619
|
|
|
|
|
|
|
}, |
1620
|
|
|
|
|
|
|
DEFAULT => -78, |
1621
|
|
|
|
|
|
|
GOTOS => { |
1622
|
|
|
|
|
|
|
'prec' => 176 |
1623
|
|
|
|
|
|
|
} |
1624
|
|
|
|
|
|
|
}, |
1625
|
|
|
|
|
|
|
{#State 156 |
1626
|
|
|
|
|
|
|
ACTIONS => { |
1627
|
|
|
|
|
|
|
'PLUS' => 177, |
1628
|
|
|
|
|
|
|
'OPTION' => 178, |
1629
|
|
|
|
|
|
|
'STAR' => 179, |
1630
|
|
|
|
|
|
|
"<" => 180, |
1631
|
|
|
|
|
|
|
"." => 181 |
1632
|
|
|
|
|
|
|
}, |
1633
|
|
|
|
|
|
|
DEFAULT => -86 |
1634
|
|
|
|
|
|
|
}, |
1635
|
|
|
|
|
|
|
{#State 157 |
1636
|
|
|
|
|
|
|
DEFAULT => -87 |
1637
|
|
|
|
|
|
|
}, |
1638
|
|
|
|
|
|
|
{#State 158 |
1639
|
|
|
|
|
|
|
ACTIONS => { |
1640
|
|
|
|
|
|
|
"(" => 154, |
1641
|
|
|
|
|
|
|
'LITERAL' => 70, |
1642
|
|
|
|
|
|
|
'BEGINCODE' => 153, |
1643
|
|
|
|
|
|
|
'VIEWPOINT' => 152, |
1644
|
|
|
|
|
|
|
"\$" => 162, |
1645
|
|
|
|
|
|
|
'CODE' => 161, |
1646
|
|
|
|
|
|
|
'IDENT' => 37, |
1647
|
|
|
|
|
|
|
'DPREC' => 159 |
1648
|
|
|
|
|
|
|
}, |
1649
|
|
|
|
|
|
|
DEFAULT => -80, |
1650
|
|
|
|
|
|
|
GOTOS => { |
1651
|
|
|
|
|
|
|
'ident' => 79, |
1652
|
|
|
|
|
|
|
'code' => 163, |
1653
|
|
|
|
|
|
|
'rhseltwithid' => 182, |
1654
|
|
|
|
|
|
|
'symbol' => 157, |
1655
|
|
|
|
|
|
|
'rhselt' => 156 |
1656
|
|
|
|
|
|
|
} |
1657
|
|
|
|
|
|
|
}, |
1658
|
|
|
|
|
|
|
{#State 159 |
1659
|
|
|
|
|
|
|
ACTIONS => { |
1660
|
|
|
|
|
|
|
'IDENT' => 37 |
1661
|
|
|
|
|
|
|
}, |
1662
|
|
|
|
|
|
|
GOTOS => { |
1663
|
|
|
|
|
|
|
'ident' => 183 |
1664
|
|
|
|
|
|
|
} |
1665
|
|
|
|
|
|
|
}, |
1666
|
|
|
|
|
|
|
{#State 160 |
1667
|
|
|
|
|
|
|
DEFAULT => -82 |
1668
|
|
|
|
|
|
|
}, |
1669
|
|
|
|
|
|
|
{#State 161 |
1670
|
|
|
|
|
|
|
DEFAULT => -104 |
1671
|
|
|
|
|
|
|
}, |
1672
|
|
|
|
|
|
|
{#State 162 |
1673
|
|
|
|
|
|
|
ACTIONS => { |
1674
|
|
|
|
|
|
|
'LITERAL' => 70, |
1675
|
|
|
|
|
|
|
"(" => 154, |
1676
|
|
|
|
|
|
|
'IDENT' => 37, |
1677
|
|
|
|
|
|
|
'CODE' => 161, |
1678
|
|
|
|
|
|
|
'DPREC' => 159, |
1679
|
|
|
|
|
|
|
'BEGINCODE' => 153, |
1680
|
|
|
|
|
|
|
'error' => 185, |
1681
|
|
|
|
|
|
|
'VIEWPOINT' => 152 |
1682
|
|
|
|
|
|
|
}, |
1683
|
|
|
|
|
|
|
GOTOS => { |
1684
|
|
|
|
|
|
|
'ident' => 79, |
1685
|
|
|
|
|
|
|
'code' => 163, |
1686
|
|
|
|
|
|
|
'rhselt' => 184, |
1687
|
|
|
|
|
|
|
'symbol' => 157 |
1688
|
|
|
|
|
|
|
} |
1689
|
|
|
|
|
|
|
}, |
1690
|
|
|
|
|
|
|
{#State 163 |
1691
|
|
|
|
|
|
|
DEFAULT => -88 |
1692
|
|
|
|
|
|
|
}, |
1693
|
|
|
|
|
|
|
{#State 164 |
1694
|
|
|
|
|
|
|
DEFAULT => -100 |
1695
|
|
|
|
|
|
|
}, |
1696
|
|
|
|
|
|
|
{#State 165 |
1697
|
|
|
|
|
|
|
ACTIONS => { |
1698
|
|
|
|
|
|
|
'LABEL' => 186 |
1699
|
|
|
|
|
|
|
}, |
1700
|
|
|
|
|
|
|
DEFAULT => -98 |
1701
|
|
|
|
|
|
|
}, |
1702
|
|
|
|
|
|
|
{#State 166 |
1703
|
|
|
|
|
|
|
DEFAULT => -70 |
1704
|
|
|
|
|
|
|
}, |
1705
|
|
|
|
|
|
|
{#State 167 |
1706
|
|
|
|
|
|
|
ACTIONS => { |
1707
|
|
|
|
|
|
|
'NAME' => 143 |
1708
|
|
|
|
|
|
|
}, |
1709
|
|
|
|
|
|
|
DEFAULT => -97, |
1710
|
|
|
|
|
|
|
GOTOS => { |
1711
|
|
|
|
|
|
|
'rule' => 187, |
1712
|
|
|
|
|
|
|
'optname' => 142 |
1713
|
|
|
|
|
|
|
} |
1714
|
|
|
|
|
|
|
}, |
1715
|
|
|
|
|
|
|
{#State 168 |
1716
|
|
|
|
|
|
|
DEFAULT => -73 |
1717
|
|
|
|
|
|
|
}, |
1718
|
|
|
|
|
|
|
{#State 169 |
1719
|
|
|
|
|
|
|
DEFAULT => -7 |
1720
|
|
|
|
|
|
|
}, |
1721
|
|
|
|
|
|
|
{#State 170 |
1722
|
|
|
|
|
|
|
ACTIONS => { |
1723
|
|
|
|
|
|
|
'LABEL' => 147, |
1724
|
|
|
|
|
|
|
'IDENT' => 148 |
1725
|
|
|
|
|
|
|
}, |
1726
|
|
|
|
|
|
|
GOTOS => { |
1727
|
|
|
|
|
|
|
'prodname' => 188 |
1728
|
|
|
|
|
|
|
} |
1729
|
|
|
|
|
|
|
}, |
1730
|
|
|
|
|
|
|
{#State 171 |
1731
|
|
|
|
|
|
|
ACTIONS => { |
1732
|
|
|
|
|
|
|
":" => 189 |
1733
|
|
|
|
|
|
|
} |
1734
|
|
|
|
|
|
|
}, |
1735
|
|
|
|
|
|
|
{#State 172 |
1736
|
|
|
|
|
|
|
ACTIONS => { |
1737
|
|
|
|
|
|
|
'IDENT' => 190 |
1738
|
|
|
|
|
|
|
} |
1739
|
|
|
|
|
|
|
}, |
1740
|
|
|
|
|
|
|
{#State 173 |
1741
|
|
|
|
|
|
|
ACTIONS => { |
1742
|
|
|
|
|
|
|
'IDENT' => 191 |
1743
|
|
|
|
|
|
|
} |
1744
|
|
|
|
|
|
|
}, |
1745
|
|
|
|
|
|
|
{#State 174 |
1746
|
|
|
|
|
|
|
ACTIONS => { |
1747
|
|
|
|
|
|
|
'CODE' => 161, |
1748
|
|
|
|
|
|
|
"\$" => 162, |
1749
|
|
|
|
|
|
|
'IDENT' => 37, |
1750
|
|
|
|
|
|
|
'DPREC' => 159, |
1751
|
|
|
|
|
|
|
'BEGINCODE' => 153, |
1752
|
|
|
|
|
|
|
'VIEWPOINT' => 152, |
1753
|
|
|
|
|
|
|
'LITERAL' => 70, |
1754
|
|
|
|
|
|
|
"(" => 154 |
1755
|
|
|
|
|
|
|
}, |
1756
|
|
|
|
|
|
|
DEFAULT => -79, |
1757
|
|
|
|
|
|
|
GOTOS => { |
1758
|
|
|
|
|
|
|
'rhs' => 192, |
1759
|
|
|
|
|
|
|
'rhselts' => 158, |
1760
|
|
|
|
|
|
|
'symbol' => 157, |
1761
|
|
|
|
|
|
|
'rhselt' => 156, |
1762
|
|
|
|
|
|
|
'ident' => 79, |
1763
|
|
|
|
|
|
|
'code' => 163, |
1764
|
|
|
|
|
|
|
'rhseltwithid' => 160 |
1765
|
|
|
|
|
|
|
} |
1766
|
|
|
|
|
|
|
}, |
1767
|
|
|
|
|
|
|
{#State 175 |
1768
|
|
|
|
|
|
|
ACTIONS => { |
1769
|
|
|
|
|
|
|
'IDENT' => 37, |
1770
|
|
|
|
|
|
|
'LITERAL' => 70 |
1771
|
|
|
|
|
|
|
}, |
1772
|
|
|
|
|
|
|
GOTOS => { |
1773
|
|
|
|
|
|
|
'ident' => 79, |
1774
|
|
|
|
|
|
|
'symbol' => 193 |
1775
|
|
|
|
|
|
|
} |
1776
|
|
|
|
|
|
|
}, |
1777
|
|
|
|
|
|
|
{#State 176 |
1778
|
|
|
|
|
|
|
ACTIONS => { |
1779
|
|
|
|
|
|
|
'CODE' => 161, |
1780
|
|
|
|
|
|
|
'BEGINCODE' => 153 |
1781
|
|
|
|
|
|
|
}, |
1782
|
|
|
|
|
|
|
DEFAULT => -102, |
1783
|
|
|
|
|
|
|
GOTOS => { |
1784
|
|
|
|
|
|
|
'code' => 194, |
1785
|
|
|
|
|
|
|
'epscode' => 195 |
1786
|
|
|
|
|
|
|
} |
1787
|
|
|
|
|
|
|
}, |
1788
|
|
|
|
|
|
|
{#State 177 |
1789
|
|
|
|
|
|
|
DEFAULT => -96 |
1790
|
|
|
|
|
|
|
}, |
1791
|
|
|
|
|
|
|
{#State 178 |
1792
|
|
|
|
|
|
|
DEFAULT => -94 |
1793
|
|
|
|
|
|
|
}, |
1794
|
|
|
|
|
|
|
{#State 179 |
1795
|
|
|
|
|
|
|
DEFAULT => -92 |
1796
|
|
|
|
|
|
|
}, |
1797
|
|
|
|
|
|
|
{#State 180 |
1798
|
|
|
|
|
|
|
ACTIONS => { |
1799
|
|
|
|
|
|
|
'STAR' => 196, |
1800
|
|
|
|
|
|
|
'PLUS' => 197 |
1801
|
|
|
|
|
|
|
} |
1802
|
|
|
|
|
|
|
}, |
1803
|
|
|
|
|
|
|
{#State 181 |
1804
|
|
|
|
|
|
|
ACTIONS => { |
1805
|
|
|
|
|
|
|
'IDENT' => 198 |
1806
|
|
|
|
|
|
|
} |
1807
|
|
|
|
|
|
|
}, |
1808
|
|
|
|
|
|
|
{#State 182 |
1809
|
|
|
|
|
|
|
DEFAULT => -81 |
1810
|
|
|
|
|
|
|
}, |
1811
|
|
|
|
|
|
|
{#State 183 |
1812
|
|
|
|
|
|
|
DEFAULT => -89 |
1813
|
|
|
|
|
|
|
}, |
1814
|
|
|
|
|
|
|
{#State 184 |
1815
|
|
|
|
|
|
|
ACTIONS => { |
1816
|
|
|
|
|
|
|
'OPTION' => 178, |
1817
|
|
|
|
|
|
|
'STAR' => 179, |
1818
|
|
|
|
|
|
|
'PLUS' => 177, |
1819
|
|
|
|
|
|
|
"<" => 180 |
1820
|
|
|
|
|
|
|
}, |
1821
|
|
|
|
|
|
|
DEFAULT => -84 |
1822
|
|
|
|
|
|
|
}, |
1823
|
|
|
|
|
|
|
{#State 185 |
1824
|
|
|
|
|
|
|
DEFAULT => -85 |
1825
|
|
|
|
|
|
|
}, |
1826
|
|
|
|
|
|
|
{#State 186 |
1827
|
|
|
|
|
|
|
DEFAULT => -99 |
1828
|
|
|
|
|
|
|
}, |
1829
|
|
|
|
|
|
|
{#State 187 |
1830
|
|
|
|
|
|
|
DEFAULT => -75 |
1831
|
|
|
|
|
|
|
}, |
1832
|
|
|
|
|
|
|
{#State 188 |
1833
|
|
|
|
|
|
|
ACTIONS => { |
1834
|
|
|
|
|
|
|
"\n" => 199 |
1835
|
|
|
|
|
|
|
} |
1836
|
|
|
|
|
|
|
}, |
1837
|
|
|
|
|
|
|
{#State 189 |
1838
|
|
|
|
|
|
|
ACTIONS => { |
1839
|
|
|
|
|
|
|
'IDENT' => 148, |
1840
|
|
|
|
|
|
|
'LABEL' => 147 |
1841
|
|
|
|
|
|
|
}, |
1842
|
|
|
|
|
|
|
GOTOS => { |
1843
|
|
|
|
|
|
|
'prodname' => 200 |
1844
|
|
|
|
|
|
|
} |
1845
|
|
|
|
|
|
|
}, |
1846
|
|
|
|
|
|
|
{#State 190 |
1847
|
|
|
|
|
|
|
DEFAULT => -60 |
1848
|
|
|
|
|
|
|
}, |
1849
|
|
|
|
|
|
|
{#State 191 |
1850
|
|
|
|
|
|
|
DEFAULT => -61 |
1851
|
|
|
|
|
|
|
}, |
1852
|
|
|
|
|
|
|
{#State 192 |
1853
|
|
|
|
|
|
|
ACTIONS => { |
1854
|
|
|
|
|
|
|
")" => 201 |
1855
|
|
|
|
|
|
|
} |
1856
|
|
|
|
|
|
|
}, |
1857
|
|
|
|
|
|
|
{#State 193 |
1858
|
|
|
|
|
|
|
DEFAULT => -101 |
1859
|
|
|
|
|
|
|
}, |
1860
|
|
|
|
|
|
|
{#State 194 |
1861
|
|
|
|
|
|
|
DEFAULT => -103 |
1862
|
|
|
|
|
|
|
}, |
1863
|
|
|
|
|
|
|
{#State 195 |
1864
|
|
|
|
|
|
|
DEFAULT => -77 |
1865
|
|
|
|
|
|
|
}, |
1866
|
|
|
|
|
|
|
{#State 196 |
1867
|
|
|
|
|
|
|
ACTIONS => { |
1868
|
|
|
|
|
|
|
'LITERAL' => 70, |
1869
|
|
|
|
|
|
|
'IDENT' => 37 |
1870
|
|
|
|
|
|
|
}, |
1871
|
|
|
|
|
|
|
GOTOS => { |
1872
|
|
|
|
|
|
|
'ident' => 79, |
1873
|
|
|
|
|
|
|
'symbol' => 202 |
1874
|
|
|
|
|
|
|
} |
1875
|
|
|
|
|
|
|
}, |
1876
|
|
|
|
|
|
|
{#State 197 |
1877
|
|
|
|
|
|
|
ACTIONS => { |
1878
|
|
|
|
|
|
|
'IDENT' => 37, |
1879
|
|
|
|
|
|
|
'LITERAL' => 70 |
1880
|
|
|
|
|
|
|
}, |
1881
|
|
|
|
|
|
|
GOTOS => { |
1882
|
|
|
|
|
|
|
'ident' => 79, |
1883
|
|
|
|
|
|
|
'symbol' => 203 |
1884
|
|
|
|
|
|
|
} |
1885
|
|
|
|
|
|
|
}, |
1886
|
|
|
|
|
|
|
{#State 198 |
1887
|
|
|
|
|
|
|
DEFAULT => -83 |
1888
|
|
|
|
|
|
|
}, |
1889
|
|
|
|
|
|
|
{#State 199 |
1890
|
|
|
|
|
|
|
DEFAULT => -40 |
1891
|
|
|
|
|
|
|
}, |
1892
|
|
|
|
|
|
|
{#State 200 |
1893
|
|
|
|
|
|
|
ACTIONS => { |
1894
|
|
|
|
|
|
|
"\n" => 204 |
1895
|
|
|
|
|
|
|
} |
1896
|
|
|
|
|
|
|
}, |
1897
|
|
|
|
|
|
|
{#State 201 |
1898
|
|
|
|
|
|
|
DEFAULT => -91 |
1899
|
|
|
|
|
|
|
}, |
1900
|
|
|
|
|
|
|
{#State 202 |
1901
|
|
|
|
|
|
|
ACTIONS => { |
1902
|
|
|
|
|
|
|
">" => 205 |
1903
|
|
|
|
|
|
|
} |
1904
|
|
|
|
|
|
|
}, |
1905
|
|
|
|
|
|
|
{#State 203 |
1906
|
|
|
|
|
|
|
ACTIONS => { |
1907
|
|
|
|
|
|
|
">" => 206 |
1908
|
|
|
|
|
|
|
} |
1909
|
|
|
|
|
|
|
}, |
1910
|
|
|
|
|
|
|
{#State 204 |
1911
|
|
|
|
|
|
|
DEFAULT => -41 |
1912
|
|
|
|
|
|
|
}, |
1913
|
|
|
|
|
|
|
{#State 205 |
1914
|
|
|
|
|
|
|
DEFAULT => -93 |
1915
|
|
|
|
|
|
|
}, |
1916
|
|
|
|
|
|
|
{#State 206 |
1917
|
|
|
|
|
|
|
DEFAULT => -95 |
1918
|
|
|
|
|
|
|
} |
1919
|
|
|
|
|
|
|
], |
1920
|
|
|
|
|
|
|
yyrules => |
1921
|
|
|
|
|
|
|
[ |
1922
|
|
|
|
|
|
|
[#Rule _SUPERSTART |
1923
|
|
|
|
|
|
|
'$start', 2, undef |
1924
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1925
|
|
|
|
|
|
|
], |
1926
|
|
|
|
|
|
|
[#Rule eyapp_1 |
1927
|
|
|
|
|
|
|
'eyapp', 3, undef |
1928
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1929
|
|
|
|
|
|
|
], |
1930
|
|
|
|
|
|
|
[#Rule symbol_2 |
1931
|
|
|
|
|
|
|
'symbol', 1, |
1932
|
|
|
|
|
|
|
sub { |
1933
|
752
|
|
|
752
|
|
1240
|
my($symbol,$lineno)=@{$_[1]}; |
|
752
|
|
|
|
|
1723
|
|
1934
|
|
|
|
|
|
|
exists($$syms{$symbol}) |
1935
|
752
|
100
|
|
|
|
2167
|
or do { |
1936
|
387
|
|
|
|
|
1083
|
$$syms{$symbol} = $lineno; |
1937
|
387
|
|
|
|
|
749
|
$$term{$symbol} = undef; |
1938
|
|
|
|
|
|
|
|
1939
|
|
|
|
|
|
|
# Warning! |
1940
|
387
|
50
|
|
|
|
1171
|
$$semantic{$symbol} = 0 unless exists($$semantic{$symbol}); |
1941
|
|
|
|
|
|
|
}; |
1942
|
752
|
|
|
|
|
1701
|
$_[1] |
1943
|
|
|
|
|
|
|
} |
1944
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1945
|
|
|
|
|
|
|
], |
1946
|
|
|
|
|
|
|
[#Rule symbol_3 |
1947
|
|
|
|
|
|
|
'symbol', 1, undef |
1948
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1949
|
|
|
|
|
|
|
], |
1950
|
|
|
|
|
|
|
[#Rule ident_4 |
1951
|
|
|
|
|
|
|
'ident', 1, |
1952
|
|
|
|
|
|
|
sub { |
1953
|
880
|
|
|
880
|
|
1496
|
my($symbol,$lineno)=@{$_[1]}; |
|
880
|
|
|
|
|
1983
|
|
1954
|
|
|
|
|
|
|
exists($$syms{$symbol}) |
1955
|
880
|
100
|
|
|
|
2613
|
or do { |
1956
|
238
|
|
|
|
|
665
|
$$syms{$symbol} = $lineno; |
1957
|
238
|
|
|
|
|
508
|
$$term{$symbol} = undef; |
1958
|
|
|
|
|
|
|
|
1959
|
|
|
|
|
|
|
# Warning! |
1960
|
238
|
50
|
|
|
|
830
|
$$semantic{$symbol} = 1 unless exists($$semantic{$symbol}); |
1961
|
|
|
|
|
|
|
# Not declared identifier? |
1962
|
238
|
50
|
33
|
|
|
1447
|
$nondeclared{$symbol} = 1 unless (exists($$nterm{$symbol}) or $$term{$symbol}); |
1963
|
|
|
|
|
|
|
}; |
1964
|
880
|
|
|
|
|
2005
|
$_[1] |
1965
|
|
|
|
|
|
|
} |
1966
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1967
|
|
|
|
|
|
|
], |
1968
|
|
|
|
|
|
|
[#Rule prodname_5 |
1969
|
|
|
|
|
|
|
'prodname', 1, undef |
1970
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1971
|
|
|
|
|
|
|
], |
1972
|
|
|
|
|
|
|
[#Rule prodname_6 |
1973
|
|
|
|
|
|
|
'prodname', 1, undef |
1974
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1975
|
|
|
|
|
|
|
], |
1976
|
|
|
|
|
|
|
[#Rule prodname_7 |
1977
|
|
|
|
|
|
|
'prodname', 2, |
1978
|
|
|
|
|
|
|
sub { |
1979
|
0
|
|
|
0
|
|
0
|
$_[1][0] .= $_[2][0]; |
1980
|
0
|
|
|
|
|
0
|
$_[1]; |
1981
|
|
|
|
|
|
|
} |
1982
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1983
|
|
|
|
|
|
|
], |
1984
|
|
|
|
|
|
|
[#Rule head_8 |
1985
|
|
|
|
|
|
|
'head', 2, undef |
1986
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1987
|
|
|
|
|
|
|
], |
1988
|
|
|
|
|
|
|
[#Rule perlident_9 |
1989
|
|
|
|
|
|
|
'perlident', 1, undef |
1990
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1991
|
|
|
|
|
|
|
], |
1992
|
|
|
|
|
|
|
[#Rule perlident_10 |
1993
|
|
|
|
|
|
|
'perlident', 3, |
1994
|
|
|
|
|
|
|
sub { |
1995
|
0
|
|
|
0
|
|
0
|
$_[1][0] .= "::".$_[3][0]; |
1996
|
0
|
|
|
|
|
0
|
$_[1]; |
1997
|
|
|
|
|
|
|
} |
1998
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
1999
|
|
|
|
|
|
|
], |
2000
|
|
|
|
|
|
|
[#Rule headsec_11 |
2001
|
|
|
|
|
|
|
'headsec', 0, undef |
2002
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2003
|
|
|
|
|
|
|
], |
2004
|
|
|
|
|
|
|
[#Rule headsec_12 |
2005
|
|
|
|
|
|
|
'headsec', 1, undef |
2006
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2007
|
|
|
|
|
|
|
], |
2008
|
|
|
|
|
|
|
[#Rule decls_13 |
2009
|
|
|
|
|
|
|
'decls', 2, undef |
2010
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2011
|
|
|
|
|
|
|
], |
2012
|
|
|
|
|
|
|
[#Rule decls_14 |
2013
|
|
|
|
|
|
|
'decls', 1, undef |
2014
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2015
|
|
|
|
|
|
|
], |
2016
|
|
|
|
|
|
|
[#Rule decl_15 |
2017
|
|
|
|
|
|
|
'decl', 1, undef |
2018
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2019
|
|
|
|
|
|
|
], |
2020
|
|
|
|
|
|
|
[#Rule decl_16 |
2021
|
|
|
|
|
|
|
'decl', 4, |
2022
|
|
|
|
|
|
|
sub { |
2023
|
14
|
|
|
14
|
|
34
|
for (@{$_[3]}) { |
|
14
|
|
|
|
|
53
|
|
2024
|
42
|
|
|
|
|
89
|
my($symbol,$lineno, $def)=@$_; |
2025
|
|
|
|
|
|
|
|
2026
|
|
|
|
|
|
|
# exists($$token{$symbol}) |
2027
|
|
|
|
|
|
|
#and do { |
2028
|
|
|
|
|
|
|
# _SyntaxError(0, |
2029
|
|
|
|
|
|
|
# "Token $symbol redefined: ". |
2030
|
|
|
|
|
|
|
# "Previously defined line $$syms{$symbol}", |
2031
|
|
|
|
|
|
|
# $lineno); |
2032
|
|
|
|
|
|
|
# next; |
2033
|
|
|
|
|
|
|
#}; |
2034
|
42
|
|
|
|
|
79
|
$$token{$symbol}=$lineno; |
2035
|
42
|
|
|
|
|
81
|
$$term{$symbol} = [ ]; |
2036
|
42
|
|
|
|
|
80
|
$$semantic{$symbol} = 1; |
2037
|
42
|
50
|
|
|
|
141
|
$$termdef{$symbol} = $def if $def; |
2038
|
|
|
|
|
|
|
} |
2039
|
|
|
|
|
|
|
undef |
2040
|
14
|
|
|
|
|
37
|
} |
2041
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2042
|
|
|
|
|
|
|
], |
2043
|
|
|
|
|
|
|
[#Rule decl_17 |
2044
|
|
|
|
|
|
|
'decl', 4, |
2045
|
|
|
|
|
|
|
sub { |
2046
|
5
|
|
|
5
|
|
11
|
for (@{$_[3]}) { |
|
5
|
|
|
|
|
14
|
|
2047
|
28
|
|
|
|
|
89
|
my($symbol,$lineno, $def)=@$_; |
2048
|
|
|
|
|
|
|
|
2049
|
|
|
|
|
|
|
# exists($$token{$symbol}) |
2050
|
|
|
|
|
|
|
#and do { |
2051
|
|
|
|
|
|
|
# _SyntaxError(0, |
2052
|
|
|
|
|
|
|
# "Token $symbol redefined: ". |
2053
|
|
|
|
|
|
|
# "Previously defined line $$syms{$symbol}", |
2054
|
|
|
|
|
|
|
# $lineno); |
2055
|
|
|
|
|
|
|
# next; |
2056
|
|
|
|
|
|
|
#}; |
2057
|
28
|
|
|
|
|
57
|
$$token{$symbol}=$lineno; |
2058
|
28
|
|
|
|
|
46
|
$$term{$symbol} = [ ]; |
2059
|
28
|
|
|
|
|
48
|
$$semantic{$symbol} = 0; |
2060
|
28
|
50
|
|
|
|
75
|
$$termdef{$symbol} = $def if $def; |
2061
|
|
|
|
|
|
|
} |
2062
|
|
|
|
|
|
|
undef |
2063
|
5
|
|
|
|
|
14
|
} |
2064
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2065
|
|
|
|
|
|
|
], |
2066
|
|
|
|
|
|
|
[#Rule decl_18 |
2067
|
|
|
|
|
|
|
'decl', 4, |
2068
|
|
|
|
|
|
|
sub { |
2069
|
0
|
|
|
0
|
|
0
|
for (@{$_[3]}) { |
|
0
|
|
|
|
|
0
|
|
2070
|
0
|
|
|
|
|
0
|
my($symbol,$lineno, $def)=@$_; |
2071
|
|
|
|
|
|
|
|
2072
|
0
|
|
|
|
|
0
|
$$token{$symbol}=$lineno; |
2073
|
0
|
|
|
|
|
0
|
$$term{$symbol} = [ ]; |
2074
|
0
|
|
|
|
|
0
|
$$semantic{$symbol} = 0; |
2075
|
0
|
|
|
|
|
0
|
push @$dummy, $symbol; |
2076
|
0
|
0
|
|
|
|
0
|
$$termdef{$symbol} = $def if $def; |
2077
|
|
|
|
|
|
|
} |
2078
|
|
|
|
|
|
|
undef |
2079
|
0
|
|
|
|
|
0
|
} |
2080
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2081
|
|
|
|
|
|
|
], |
2082
|
|
|
|
|
|
|
[#Rule decl_19 |
2083
|
|
|
|
|
|
|
'decl', 4, |
2084
|
|
|
|
|
|
|
sub { |
2085
|
4
|
|
|
4
|
|
11
|
for (@{$_[3]}) { |
|
4
|
|
|
|
|
13
|
|
2086
|
6
|
|
|
|
|
17
|
my($symbol,$lineno, $def)=@$_; |
2087
|
|
|
|
|
|
|
|
2088
|
|
|
|
|
|
|
exists($$token{$symbol}) |
2089
|
6
|
50
|
|
|
|
20
|
and do { |
2090
|
0
|
|
|
|
|
0
|
_SyntaxError(0, |
2091
|
|
|
|
|
|
|
"Token $symbol redefined: ". |
2092
|
|
|
|
|
|
|
"Previously defined line $$syms{$symbol}", |
2093
|
|
|
|
|
|
|
$lineno); |
2094
|
0
|
|
|
|
|
0
|
next; |
2095
|
|
|
|
|
|
|
}; |
2096
|
6
|
|
|
|
|
15
|
$$token{$symbol}=$lineno; |
2097
|
6
|
|
|
|
|
15
|
$$term{$symbol} = [ ]; |
2098
|
6
|
50
|
|
|
|
28
|
$$termdef{$symbol} = $def if $def; |
2099
|
|
|
|
|
|
|
} |
2100
|
|
|
|
|
|
|
undef |
2101
|
4
|
|
|
|
|
14
|
} |
2102
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2103
|
|
|
|
|
|
|
], |
2104
|
|
|
|
|
|
|
[#Rule decl_20 |
2105
|
|
|
|
|
|
|
'decl', 4, |
2106
|
|
|
|
|
|
|
sub { |
2107
|
161
|
|
|
161
|
|
301
|
for (@{$_[3]}) { |
|
161
|
|
|
|
|
438
|
|
2108
|
254
|
|
|
|
|
567
|
my($symbol,$lineno)=@$_; |
2109
|
|
|
|
|
|
|
|
2110
|
|
|
|
|
|
|
defined($$term{$symbol}[0]) |
2111
|
254
|
50
|
|
|
|
708
|
and do { |
2112
|
0
|
|
|
|
|
0
|
_SyntaxError(1, |
2113
|
|
|
|
|
|
|
"Precedence for symbol $symbol redefined: ". |
2114
|
|
|
|
|
|
|
"Previously defined line $$syms{$symbol}", |
2115
|
|
|
|
|
|
|
$lineno); |
2116
|
0
|
|
|
|
|
0
|
next; |
2117
|
|
|
|
|
|
|
}; |
2118
|
254
|
|
|
|
|
517
|
$$token{$symbol}=$lineno; |
2119
|
254
|
|
|
|
|
760
|
$$term{$symbol} = [ $_[1][0], $prec ]; |
2120
|
|
|
|
|
|
|
} |
2121
|
161
|
|
|
|
|
298
|
++$prec; |
2122
|
|
|
|
|
|
|
undef |
2123
|
161
|
|
|
|
|
362
|
} |
2124
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2125
|
|
|
|
|
|
|
], |
2126
|
|
|
|
|
|
|
[#Rule decl_21 |
2127
|
|
|
|
|
|
|
'decl', 3, |
2128
|
|
|
|
|
|
|
sub { |
2129
|
0
|
0
|
|
0
|
|
0
|
$start=$_[2][0] unless $start; |
2130
|
|
|
|
|
|
|
undef |
2131
|
0
|
|
|
|
|
0
|
} |
2132
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2133
|
|
|
|
|
|
|
], |
2134
|
|
|
|
|
|
|
[#Rule decl_22 |
2135
|
|
|
|
|
|
|
'decl', 2, |
2136
|
|
|
|
|
|
|
sub { |
2137
|
|
|
|
|
|
|
# TODO: Instead of ident has to be a prefix!!! |
2138
|
1
|
|
|
1
|
|
2
|
$prefix=$_[1][0]; |
2139
|
|
|
|
|
|
|
undef |
2140
|
1
|
|
|
|
|
3
|
} |
2141
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2142
|
|
|
|
|
|
|
], |
2143
|
|
|
|
|
|
|
[#Rule decl_23 |
2144
|
|
|
|
|
|
|
'decl', 3, |
2145
|
|
|
|
|
|
|
sub { |
2146
|
0
|
|
|
0
|
|
0
|
push @{$_[2]}, 'CODE'; |
|
0
|
|
|
|
|
0
|
|
2147
|
0
|
|
|
|
|
0
|
$whites = $_[2]; |
2148
|
|
|
|
|
|
|
} |
2149
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2150
|
|
|
|
|
|
|
], |
2151
|
|
|
|
|
|
|
[#Rule decl_24 |
2152
|
|
|
|
|
|
|
'decl', 3, |
2153
|
|
|
|
|
|
|
sub { |
2154
|
0
|
|
|
0
|
|
0
|
push @{$_[2]}, 'REGEXP'; |
|
0
|
|
|
|
|
0
|
|
2155
|
0
|
|
|
|
|
0
|
$whites = $_[2]; |
2156
|
|
|
|
|
|
|
} |
2157
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2158
|
|
|
|
|
|
|
], |
2159
|
|
|
|
|
|
|
[#Rule decl_25 |
2160
|
|
|
|
|
|
|
'decl', 4, |
2161
|
|
|
|
|
|
|
sub { |
2162
|
0
|
|
|
0
|
|
0
|
push @{$_[3]}, 'CODE'; |
|
0
|
|
|
|
|
0
|
|
2163
|
0
|
|
|
|
|
0
|
$whites = $_[3]; |
2164
|
|
|
|
|
|
|
} |
2165
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2166
|
|
|
|
|
|
|
], |
2167
|
|
|
|
|
|
|
[#Rule decl_26 |
2168
|
|
|
|
|
|
|
'decl', 4, |
2169
|
|
|
|
|
|
|
sub { |
2170
|
0
|
|
|
0
|
|
0
|
push @{$_[3]}, 'REGEXP'; |
|
0
|
|
|
|
|
0
|
|
2171
|
0
|
|
|
|
|
0
|
$whites = $_[3]; |
2172
|
|
|
|
|
|
|
} |
2173
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2174
|
|
|
|
|
|
|
], |
2175
|
|
|
|
|
|
|
[#Rule decl_27 |
2176
|
|
|
|
|
|
|
'decl', 3, |
2177
|
|
|
|
|
|
|
sub { |
2178
|
0
|
|
|
0
|
|
0
|
$namingscheme = $_[2]; |
2179
|
|
|
|
|
|
|
undef |
2180
|
0
|
|
|
|
|
0
|
} |
2181
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2182
|
|
|
|
|
|
|
], |
2183
|
|
|
|
|
|
|
[#Rule decl_28 |
2184
|
|
|
|
|
|
|
'decl', 2, |
2185
|
34
|
|
|
34
|
|
108
|
sub { push(@$head,$_[1]); undef } |
|
34
|
|
|
|
|
93
|
|
2186
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2187
|
|
|
|
|
|
|
], |
2188
|
|
|
|
|
|
|
[#Rule decl_29 |
2189
|
|
|
|
|
|
|
'decl', 3, |
2190
|
0
|
|
|
0
|
|
0
|
sub { undef } |
2191
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2192
|
|
|
|
|
|
|
], |
2193
|
|
|
|
|
|
|
[#Rule decl_30 |
2194
|
|
|
|
|
|
|
'decl', 3, |
2195
|
15
|
|
|
15
|
|
38
|
sub { $defaultaction = $_[2]; undef } |
|
15
|
|
|
|
|
39
|
|
2196
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2197
|
|
|
|
|
|
|
], |
2198
|
|
|
|
|
|
|
[#Rule decl_31 |
2199
|
|
|
|
|
|
|
'decl', 2, |
2200
|
|
|
|
|
|
|
sub { |
2201
|
0
|
|
|
0
|
|
0
|
$incremental = ''; |
2202
|
|
|
|
|
|
|
undef |
2203
|
0
|
|
|
|
|
0
|
} |
2204
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2205
|
|
|
|
|
|
|
], |
2206
|
|
|
|
|
|
|
[#Rule decl_32 |
2207
|
|
|
|
|
|
|
'decl', 3, |
2208
|
|
|
|
|
|
|
sub { |
2209
|
0
|
|
|
0
|
|
0
|
$incremental = $_[2][0]; |
2210
|
|
|
|
|
|
|
undef |
2211
|
0
|
|
|
|
|
0
|
} |
2212
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2213
|
|
|
|
|
|
|
], |
2214
|
|
|
|
|
|
|
[#Rule decl_33 |
2215
|
|
|
|
|
|
|
'decl', 3, |
2216
|
|
|
|
|
|
|
sub { |
2217
|
0
|
|
|
0
|
|
0
|
my ($code, $line) = @{$_[2]}; |
|
0
|
|
|
|
|
0
|
|
2218
|
0
|
|
|
|
|
0
|
push @$head, [ make_lexer($code, $line), $line]; |
2219
|
0
|
|
|
|
|
0
|
$lexer = 1; |
2220
|
|
|
|
|
|
|
undef |
2221
|
0
|
|
|
|
|
0
|
} |
2222
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2223
|
|
|
|
|
|
|
], |
2224
|
|
|
|
|
|
|
[#Rule decl_34 |
2225
|
|
|
|
|
|
|
'decl', 2, |
2226
|
|
|
|
|
|
|
sub { |
2227
|
34
|
|
|
34
|
|
106
|
$tree = $buildingtree = 1; |
2228
|
34
|
100
|
|
|
|
223
|
$bypass = ($_[1][0] =~m{bypass})? 1 : 0; |
2229
|
34
|
100
|
|
|
|
310
|
$alias = ($_[1][0] =~m{alias})? 1 : 0; |
2230
|
34
|
|
|
|
|
114
|
$defaultaction = [ ' goto &Parse::Eyapp::Driver::YYBuildAST ', $lineno[0]]; |
2231
|
|
|
|
|
|
|
undef |
2232
|
34
|
|
|
|
|
120
|
} |
2233
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2234
|
|
|
|
|
|
|
], |
2235
|
|
|
|
|
|
|
[#Rule decl_35 |
2236
|
|
|
|
|
|
|
'decl', 2, |
2237
|
|
|
|
|
|
|
sub { |
2238
|
18
|
|
|
18
|
|
66
|
$metatree = $tree = $buildingtree = 1; |
2239
|
|
|
|
|
|
|
undef |
2240
|
18
|
|
|
|
|
54
|
} |
2241
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2242
|
|
|
|
|
|
|
], |
2243
|
|
|
|
|
|
|
[#Rule decl_36 |
2244
|
|
|
|
|
|
|
'decl', 2, |
2245
|
|
|
|
|
|
|
sub { |
2246
|
0
|
|
|
0
|
|
0
|
$strict = 1; |
2247
|
|
|
|
|
|
|
undef |
2248
|
0
|
|
|
|
|
0
|
} |
2249
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2250
|
|
|
|
|
|
|
], |
2251
|
|
|
|
|
|
|
[#Rule decl_37 |
2252
|
|
|
|
|
|
|
'decl', 2, |
2253
|
|
|
|
|
|
|
sub { |
2254
|
0
|
|
|
0
|
|
0
|
$nocompact = 1; |
2255
|
|
|
|
|
|
|
undef |
2256
|
0
|
|
|
|
|
0
|
} |
2257
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2258
|
|
|
|
|
|
|
], |
2259
|
|
|
|
|
|
|
[#Rule decl_38 |
2260
|
|
|
|
|
|
|
'decl', 4, |
2261
|
|
|
|
|
|
|
sub { |
2262
|
0
|
|
|
0
|
|
0
|
for ( @{$_[3]} ) { |
|
0
|
|
|
|
|
0
|
|
2263
|
0
|
|
|
|
|
0
|
my($symbol,$lineno)=@$_; |
2264
|
|
|
|
|
|
|
|
2265
|
|
|
|
|
|
|
exists($$nterm{$symbol}) |
2266
|
0
|
0
|
|
|
|
0
|
and do { |
2267
|
0
|
|
|
|
|
0
|
_SyntaxError(0, |
2268
|
|
|
|
|
|
|
"Non-terminal $symbol redefined: ". |
2269
|
|
|
|
|
|
|
"Previously defined line $$syms{$symbol}", |
2270
|
|
|
|
|
|
|
$lineno); |
2271
|
0
|
|
|
|
|
0
|
next; |
2272
|
|
|
|
|
|
|
}; |
2273
|
0
|
|
|
|
|
0
|
delete($$term{$symbol}); #not a terminal |
2274
|
0
|
|
|
|
|
0
|
$$nterm{$symbol}=undef; #is a non-terminal |
2275
|
|
|
|
|
|
|
} |
2276
|
|
|
|
|
|
|
} |
2277
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2278
|
|
|
|
|
|
|
], |
2279
|
|
|
|
|
|
|
[#Rule decl_39 |
2280
|
|
|
|
|
|
|
'decl', 4, |
2281
|
|
|
|
|
|
|
sub { |
2282
|
0
|
|
|
0
|
|
0
|
my ($name, $code) = @_[2,3]; |
2283
|
0
|
|
|
|
|
0
|
my ($cn, $line) = @$name; |
2284
|
|
|
|
|
|
|
|
2285
|
|
|
|
|
|
|
|
2286
|
0
|
|
|
|
|
0
|
my ($c, $li) = @$code; |
2287
|
|
|
|
|
|
|
|
2288
|
|
|
|
|
|
|
# TODO: this must be in Output |
2289
|
0
|
|
|
|
|
0
|
my $conflict_header = <<"CONFLICT_HEADER"; |
2290
|
|
|
|
|
|
|
my \$self = \$_[0]; |
2291
|
|
|
|
|
|
|
for (\${\$self->input()}) { |
2292
|
|
|
|
|
|
|
#line $li "$filename" |
2293
|
|
|
|
|
|
|
CONFLICT_HEADER |
2294
|
0
|
|
|
|
|
0
|
$c =~ s/^/$conflict_header/; # } |
2295
|
|
|
|
|
|
|
|
2296
|
|
|
|
|
|
|
# { |
2297
|
|
|
|
|
|
|
# follows the closing curly bracket of the for .. to contextualize!!!!!! v |
2298
|
0
|
|
|
|
|
0
|
$c =~ s/$/\n################ @@@@@@@@@ End of User Code @@@@@@@@@ ###################\n }\n/; |
2299
|
|
|
|
|
|
|
#$code->[0] = $c; |
2300
|
0
|
|
|
|
|
0
|
$conflict{$cn}{codeh} = $c; |
2301
|
0
|
|
|
|
|
0
|
$conflict{$cn}{line} = $line; |
2302
|
|
|
|
|
|
|
|
2303
|
0
|
|
|
|
|
0
|
$$syms{$cn} = $line; |
2304
|
|
|
|
|
|
|
#$$nterm{$cn} = undef; |
2305
|
|
|
|
|
|
|
|
2306
|
0
|
|
|
|
|
0
|
undef; |
2307
|
|
|
|
|
|
|
} |
2308
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2309
|
|
|
|
|
|
|
], |
2310
|
|
|
|
|
|
|
[#Rule decl_40 |
2311
|
|
|
|
|
|
|
'decl', 8, |
2312
|
|
|
|
|
|
|
sub { |
2313
|
|
|
|
|
|
|
#print "<@{$_[2]} @{$_[3]} @{$_[5]} @{$_[7]}>\n"; |
2314
|
|
|
|
|
|
|
|
2315
|
0
|
|
|
0
|
|
0
|
my $conflict = $_[2]; |
2316
|
0
|
|
|
|
|
0
|
my ($startsymbol, $line) = @{$_[3]}; |
|
0
|
|
|
|
|
0
|
|
2317
|
0
|
|
|
|
|
0
|
my @prodname = ($_[5][0], $_[7][0]); |
2318
|
|
|
|
|
|
|
|
2319
|
0
|
|
|
|
|
0
|
my $cn = $conflict->[0]; |
2320
|
|
|
|
|
|
|
|
2321
|
0
|
|
|
|
|
0
|
my $c = <<"CONFLICT_HEADER"; |
2322
|
|
|
|
|
|
|
my \$self = \$_[0]; |
2323
|
|
|
|
|
|
|
for (\${\$self->input()}) { |
2324
|
|
|
|
|
|
|
#line $line "$filename" |
2325
|
|
|
|
|
|
|
\$self->YYIf('$startsymbol', '$prodname[0]', '$prodname[1]'); |
2326
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2327
|
|
|
|
|
|
|
} |
2328
|
|
|
|
|
|
|
CONFLICT_HEADER |
2329
|
|
|
|
|
|
|
|
2330
|
0
|
|
|
|
|
0
|
$conflict{$cn}{codeh} = $c; |
2331
|
0
|
|
|
|
|
0
|
$conflict{$cn}{line} = $line; |
2332
|
|
|
|
|
|
|
|
2333
|
0
|
|
|
|
|
0
|
$$syms{$cn} = $line; |
2334
|
0
|
|
|
|
|
0
|
$$nterm{$cn} = undef; |
2335
|
|
|
|
|
|
|
|
2336
|
|
|
|
|
|
|
#$$nterm{$startsymbol} = undef; |
2337
|
|
|
|
|
|
|
#delete $$syms{$startsymbol}; |
2338
|
|
|
|
|
|
|
|
2339
|
|
|
|
|
|
|
|
2340
|
0
|
0
|
|
|
|
0
|
if ($startsymbol eq 'EMPTY') { |
2341
|
0
|
|
|
|
|
0
|
$c = <<"NESTEDPARSING"; |
2342
|
|
|
|
|
|
|
{ \$self->YYIs('EMPTY', 1); } |
2343
|
|
|
|
|
|
|
NESTEDPARSING |
2344
|
|
|
|
|
|
|
} |
2345
|
|
|
|
|
|
|
else { |
2346
|
0
|
|
|
|
|
0
|
$c = <<"NESTEDPARSING"; |
2347
|
|
|
|
|
|
|
{ \$self->YYNestedParse('$startsymbol'); } |
2348
|
|
|
|
|
|
|
NESTEDPARSING |
2349
|
|
|
|
|
|
|
} |
2350
|
|
|
|
|
|
|
|
2351
|
0
|
|
|
|
|
0
|
explorer_handler($conflict, [$c, $line]); |
2352
|
|
|
|
|
|
|
|
2353
|
0
|
|
|
|
|
0
|
undef; |
2354
|
|
|
|
|
|
|
} |
2355
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2356
|
|
|
|
|
|
|
], |
2357
|
|
|
|
|
|
|
[#Rule decl_41 |
2358
|
|
|
|
|
|
|
'decl', 9, |
2359
|
|
|
|
|
|
|
sub { |
2360
|
|
|
|
|
|
|
|
2361
|
0
|
|
|
0
|
|
0
|
my $conflict = $_[2]; |
2362
|
0
|
|
|
|
|
0
|
my $neg = $_[3]; |
2363
|
0
|
|
|
|
|
0
|
my ($regexp, $line) = @{$_[4]}; |
|
0
|
|
|
|
|
0
|
|
2364
|
0
|
|
|
|
|
0
|
my @prodname = ($_[6][0], $_[8][0]); |
2365
|
|
|
|
|
|
|
|
2366
|
0
|
|
|
|
|
0
|
my $cn = $conflict->[0]; |
2367
|
|
|
|
|
|
|
|
2368
|
0
|
|
|
|
|
0
|
my $c = <<"CONFLICT_HEADER"; |
2369
|
|
|
|
|
|
|
my \$self = \$_[0]; |
2370
|
|
|
|
|
|
|
for (\${\$self->input()}) { |
2371
|
|
|
|
|
|
|
#line $line "$filename" |
2372
|
|
|
|
|
|
|
\$self->YYIf('.regexp', '$prodname[0]', '$prodname[1]'); |
2373
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2374
|
|
|
|
|
|
|
} |
2375
|
|
|
|
|
|
|
CONFLICT_HEADER |
2376
|
|
|
|
|
|
|
|
2377
|
0
|
|
|
|
|
0
|
$conflict{$cn}{codeh} = $c; |
2378
|
0
|
|
|
|
|
0
|
$conflict{$cn}{line} = $line; |
2379
|
|
|
|
|
|
|
|
2380
|
0
|
|
|
|
|
0
|
$$syms{$cn} = $line; |
2381
|
0
|
|
|
|
|
0
|
$$nterm{$cn} = undef; |
2382
|
0
|
|
|
|
|
0
|
$regexp = substr($regexp,1,-1); |
2383
|
|
|
|
|
|
|
|
2384
|
0
|
0
|
|
|
|
0
|
if (!$neg) { |
2385
|
0
|
|
|
|
|
0
|
$regexp = "\\G(?=$regexp)"; |
2386
|
|
|
|
|
|
|
} |
2387
|
|
|
|
|
|
|
else { |
2388
|
0
|
|
|
|
|
0
|
$regexp = "\\G(?!$regexp)"; |
2389
|
|
|
|
|
|
|
} |
2390
|
|
|
|
|
|
|
|
2391
|
0
|
|
|
|
|
0
|
$c = <<"NESTEDPARSING"; |
2392
|
|
|
|
|
|
|
{ \$self->YYNestedRegexp('$regexp'); } |
2393
|
|
|
|
|
|
|
NESTEDPARSING |
2394
|
|
|
|
|
|
|
|
2395
|
0
|
|
|
|
|
0
|
explorer_handler($conflict, [$c, $line]); |
2396
|
|
|
|
|
|
|
|
2397
|
0
|
|
|
|
|
0
|
undef; |
2398
|
|
|
|
|
|
|
} |
2399
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2400
|
|
|
|
|
|
|
], |
2401
|
|
|
|
|
|
|
[#Rule decl_42 |
2402
|
|
|
|
|
|
|
'decl', 4, |
2403
|
|
|
|
|
|
|
sub { |
2404
|
0
|
|
|
0
|
|
0
|
my ($name, $code) = @_[2,3]; |
2405
|
|
|
|
|
|
|
|
2406
|
0
|
|
|
|
|
0
|
explorer_handler($name, $code); |
2407
|
|
|
|
|
|
|
} |
2408
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2409
|
|
|
|
|
|
|
], |
2410
|
|
|
|
|
|
|
[#Rule decl_43 |
2411
|
|
|
|
|
|
|
'decl', 4, |
2412
|
|
|
|
|
|
|
sub { |
2413
|
0
|
|
|
0
|
|
0
|
my ($name, $startsymbol) = @_[2,3]; |
2414
|
|
|
|
|
|
|
|
2415
|
0
|
|
|
|
|
0
|
my $c = <<"NESTEDPARSING"; |
2416
|
|
|
|
|
|
|
{ \$self->YYNestedParse($startsymbol->[0]); } |
2417
|
|
|
|
|
|
|
NESTEDPARSING |
2418
|
0
|
|
|
|
|
0
|
my $li = $startsymbol->[1]; |
2419
|
|
|
|
|
|
|
|
2420
|
0
|
|
|
|
|
0
|
explorer_handler($name, [$c, $li]); |
2421
|
|
|
|
|
|
|
} |
2422
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2423
|
|
|
|
|
|
|
], |
2424
|
|
|
|
|
|
|
[#Rule decl_44 |
2425
|
|
|
|
|
|
|
'decl', 4, |
2426
|
|
|
|
|
|
|
sub { |
2427
|
0
|
|
|
0
|
|
0
|
my ($name, $startsymbol) = @_[2,3]; |
2428
|
|
|
|
|
|
|
|
2429
|
0
|
|
|
|
|
0
|
my $c = <<"NESTEDPARSING"; |
2430
|
|
|
|
|
|
|
{ \$self->YYNestedParse('$startsymbol->[0]'); } |
2431
|
|
|
|
|
|
|
NESTEDPARSING |
2432
|
0
|
|
|
|
|
0
|
my $li = $startsymbol->[1]; |
2433
|
|
|
|
|
|
|
|
2434
|
0
|
|
|
|
|
0
|
explorer_handler($name, [$c, $li]); |
2435
|
|
|
|
|
|
|
} |
2436
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2437
|
|
|
|
|
|
|
], |
2438
|
|
|
|
|
|
|
[#Rule decl_45 |
2439
|
|
|
|
|
|
|
'decl', 5, |
2440
|
|
|
|
|
|
|
sub { |
2441
|
0
|
|
|
0
|
|
0
|
my ($name, $startsymbol, $file) = @_[2,4]; |
2442
|
|
|
|
|
|
|
|
2443
|
0
|
|
|
|
|
0
|
my $c = <<"NESTEDPARSING"; |
2444
|
|
|
|
|
|
|
{ \$self->YYNestedParse('$startsymbol->[0]', $file->[0]); } |
2445
|
|
|
|
|
|
|
NESTEDPARSING |
2446
|
0
|
|
|
|
|
0
|
my $li = $startsymbol->[1]; |
2447
|
|
|
|
|
|
|
|
2448
|
0
|
|
|
|
|
0
|
explorer_handler($name, [$c, $li]); |
2449
|
|
|
|
|
|
|
} |
2450
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2451
|
|
|
|
|
|
|
], |
2452
|
|
|
|
|
|
|
[#Rule decl_46 |
2453
|
|
|
|
|
|
|
'decl', 3, |
2454
|
0
|
|
|
0
|
|
0
|
sub { $expect=$_[2][0]; undef } |
|
0
|
|
|
|
|
0
|
|
2455
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2456
|
|
|
|
|
|
|
], |
2457
|
|
|
|
|
|
|
[#Rule decl_47 |
2458
|
|
|
|
|
|
|
'decl', 4, |
2459
|
0
|
|
|
0
|
|
0
|
sub { $expect= [ $_[2][0], $_[3][0]]; undef } |
|
0
|
|
|
|
|
0
|
|
2460
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2461
|
|
|
|
|
|
|
], |
2462
|
|
|
|
|
|
|
[#Rule decl_48 |
2463
|
|
|
|
|
|
|
'decl', 3, |
2464
|
|
|
|
|
|
|
sub { |
2465
|
0
|
0
|
|
0
|
|
0
|
$expect = 0 unless defined($expect); |
2466
|
0
|
0
|
|
|
|
0
|
croak "Number of reduce-reduce conflicts is redefined (line $_[2][1], file: $filename)\n" if ref($expect); |
2467
|
0
|
|
|
|
|
0
|
$expect= [ $expect, $_[2][0]]; |
2468
|
|
|
|
|
|
|
undef |
2469
|
0
|
|
|
|
|
0
|
} |
2470
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2471
|
|
|
|
|
|
|
], |
2472
|
|
|
|
|
|
|
[#Rule decl_49 |
2473
|
|
|
|
|
|
|
'decl', 2, |
2474
|
0
|
|
|
0
|
|
0
|
sub { $_[0]->YYErrok } |
2475
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2476
|
|
|
|
|
|
|
], |
2477
|
|
|
|
|
|
|
[#Rule neg_50 |
2478
|
|
|
|
|
|
|
'neg', 0, |
2479
|
|
|
|
0
|
|
|
sub { } |
2480
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2481
|
|
|
|
|
|
|
], |
2482
|
|
|
|
|
|
|
[#Rule neg_51 |
2483
|
|
|
|
|
|
|
'neg', 1, |
2484
|
0
|
|
|
0
|
|
0
|
sub { 1; } |
2485
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2486
|
|
|
|
|
|
|
], |
2487
|
|
|
|
|
|
|
[#Rule typedecl_52 |
2488
|
|
|
|
|
|
|
'typedecl', 0, undef |
2489
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2490
|
|
|
|
|
|
|
], |
2491
|
|
|
|
|
|
|
[#Rule typedecl_53 |
2492
|
|
|
|
|
|
|
'typedecl', 3, undef |
2493
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2494
|
|
|
|
|
|
|
], |
2495
|
|
|
|
|
|
|
[#Rule symlist_54 |
2496
|
|
|
|
|
|
|
'symlist', 2, |
2497
|
93
|
|
|
93
|
|
176
|
sub { push(@{$_[1]},$_[2]); $_[1] } |
|
93
|
|
|
|
|
278
|
|
|
93
|
|
|
|
|
211
|
|
2498
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2499
|
|
|
|
|
|
|
], |
2500
|
|
|
|
|
|
|
[#Rule symlist_55 |
2501
|
|
|
|
|
|
|
'symlist', 1, |
2502
|
161
|
|
|
161
|
|
462
|
sub { [ $_[1] ] } |
2503
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2504
|
|
|
|
|
|
|
], |
2505
|
|
|
|
|
|
|
[#Rule toklist_56 |
2506
|
|
|
|
|
|
|
'toklist', 2, |
2507
|
53
|
|
|
53
|
|
112
|
sub { push(@{$_[1]},$_[2]); $_[1] } |
|
53
|
|
|
|
|
138
|
|
|
53
|
|
|
|
|
120
|
|
2508
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2509
|
|
|
|
|
|
|
], |
2510
|
|
|
|
|
|
|
[#Rule toklist_57 |
2511
|
|
|
|
|
|
|
'toklist', 1, |
2512
|
23
|
|
|
23
|
|
65
|
sub { [ $_[1] ] } |
2513
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2514
|
|
|
|
|
|
|
], |
2515
|
|
|
|
|
|
|
[#Rule tokendef_58 |
2516
|
|
|
|
|
|
|
'tokendef', 3, |
2517
|
|
|
|
|
|
|
sub { |
2518
|
0
|
|
|
0
|
|
0
|
push @{$_[3]}, 'REGEXP'; |
|
0
|
|
|
|
|
0
|
|
2519
|
0
|
|
|
|
|
0
|
push @{$_[1]}, $_[3]; |
|
0
|
|
|
|
|
0
|
|
2520
|
0
|
|
|
|
|
0
|
$_[1] |
2521
|
|
|
|
|
|
|
} |
2522
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2523
|
|
|
|
|
|
|
], |
2524
|
|
|
|
|
|
|
[#Rule tokendef_59 |
2525
|
|
|
|
|
|
|
'tokendef', 4, |
2526
|
|
|
|
|
|
|
sub { |
2527
|
0
|
|
|
0
|
|
0
|
push @{$_[4]}, 'CONTEXTUAL_REGEXP'; |
|
0
|
|
|
|
|
0
|
|
2528
|
0
|
|
|
|
|
0
|
push @{$_[1]}, $_[4]; |
|
0
|
|
|
|
|
0
|
|
2529
|
0
|
|
|
|
|
0
|
$_[1] |
2530
|
|
|
|
|
|
|
} |
2531
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2532
|
|
|
|
|
|
|
], |
2533
|
|
|
|
|
|
|
[#Rule tokendef_60 |
2534
|
|
|
|
|
|
|
'tokendef', 6, |
2535
|
|
|
|
|
|
|
sub { |
2536
|
0
|
|
|
0
|
|
0
|
push @{$_[4]}, 'CONTEXTUAL_REGEXP_MATCH'; |
|
0
|
|
|
|
|
0
|
|
2537
|
0
|
|
|
|
|
0
|
push @{$_[4]}, $_[6]; |
|
0
|
|
|
|
|
0
|
|
2538
|
0
|
|
|
|
|
0
|
push @{$_[1]}, $_[4]; |
|
0
|
|
|
|
|
0
|
|
2539
|
0
|
|
|
|
|
0
|
$_[1] |
2540
|
|
|
|
|
|
|
} |
2541
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2542
|
|
|
|
|
|
|
], |
2543
|
|
|
|
|
|
|
[#Rule tokendef_61 |
2544
|
|
|
|
|
|
|
'tokendef', 6, |
2545
|
|
|
|
|
|
|
sub { |
2546
|
0
|
|
|
0
|
|
0
|
push @{$_[4]}, 'CONTEXTUAL_REGEXP_NOMATCH'; |
|
0
|
|
|
|
|
0
|
|
2547
|
0
|
|
|
|
|
0
|
push @{$_[4]}, $_[6]; |
|
0
|
|
|
|
|
0
|
|
2548
|
0
|
|
|
|
|
0
|
push @{$_[1]}, $_[4]; |
|
0
|
|
|
|
|
0
|
|
2549
|
0
|
|
|
|
|
0
|
$_[1] |
2550
|
|
|
|
|
|
|
} |
2551
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2552
|
|
|
|
|
|
|
], |
2553
|
|
|
|
|
|
|
[#Rule tokendef_62 |
2554
|
|
|
|
|
|
|
'tokendef', 3, |
2555
|
|
|
|
|
|
|
sub { |
2556
|
0
|
|
|
0
|
|
0
|
push @{$_[3]}, 'CODE'; |
|
0
|
|
|
|
|
0
|
|
2557
|
0
|
|
|
|
|
0
|
push @{$_[1]}, $_[3]; |
|
0
|
|
|
|
|
0
|
|
2558
|
0
|
|
|
|
|
0
|
$_[1] |
2559
|
|
|
|
|
|
|
} |
2560
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2561
|
|
|
|
|
|
|
], |
2562
|
|
|
|
|
|
|
[#Rule tokendef_63 |
2563
|
|
|
|
|
|
|
'tokendef', 1, |
2564
|
|
|
|
|
|
|
sub { |
2565
|
76
|
|
|
76
|
|
135
|
push @{$_[1]}, [ @{$_[1]}, 'LITERAL']; |
|
76
|
|
|
|
|
152
|
|
|
76
|
|
|
|
|
231
|
|
2566
|
76
|
|
|
|
|
177
|
$_[1]; |
2567
|
|
|
|
|
|
|
} |
2568
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2569
|
|
|
|
|
|
|
], |
2570
|
|
|
|
|
|
|
[#Rule identlist_64 |
2571
|
|
|
|
|
|
|
'identlist', 2, |
2572
|
0
|
|
|
0
|
|
0
|
sub { push(@{$_[1]},$_[2]); $_[1] } |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
2573
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2574
|
|
|
|
|
|
|
], |
2575
|
|
|
|
|
|
|
[#Rule identlist_65 |
2576
|
|
|
|
|
|
|
'identlist', 1, |
2577
|
0
|
|
|
0
|
|
0
|
sub { [ $_[1] ] } |
2578
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2579
|
|
|
|
|
|
|
], |
2580
|
|
|
|
|
|
|
[#Rule body_66 |
2581
|
|
|
|
|
|
|
'body', 2, |
2582
|
|
|
|
|
|
|
sub { |
2583
|
54
|
50
|
|
54
|
|
266
|
$start |
2584
|
|
|
|
|
|
|
or $start=$$rules[1][0]; |
2585
|
|
|
|
|
|
|
|
2586
|
54
|
50
|
|
|
|
275
|
ref($$nterm{$start}) |
2587
|
|
|
|
|
|
|
or _SyntaxError(2,"Start symbol $start not found ". |
2588
|
|
|
|
|
|
|
"in rules section",$_[2][1]); |
2589
|
|
|
|
|
|
|
|
2590
|
|
|
|
|
|
|
# Add conflict handlers |
2591
|
|
|
|
|
|
|
# [ left hand side, right hand side, precedence, rulename, code, ] |
2592
|
54
|
|
|
|
|
298
|
for my $A (keys %conflict) { |
2593
|
|
|
|
|
|
|
|
2594
|
0
|
0
|
|
|
|
0
|
if (defined($conflict{$A}{explorer})) { |
2595
|
0
|
0
|
|
|
|
0
|
if (!$conflict{$A}{totalviewpoint}) { |
2596
|
0
|
|
|
|
|
0
|
my $code = $conflict{$A}{codeh}; |
2597
|
0
|
|
|
|
|
0
|
$conflict{$A}{codeh} = "{ $conflict{$A}{explorer} }\n{ $code }"; |
2598
|
0
|
|
|
|
|
0
|
delete $$syms{$A}; |
2599
|
0
|
|
|
|
|
0
|
delete $$nterm{$A}; |
2600
|
0
|
|
|
|
|
0
|
delete $$term{$A}; |
2601
|
0
|
|
|
|
|
0
|
delete $conflict{$A}{explorer}; |
2602
|
|
|
|
|
|
|
} |
2603
|
|
|
|
|
|
|
else { |
2604
|
0
|
|
|
|
|
0
|
my $lhs = [$A, $conflict{$A}{explorerline}]; |
2605
|
0
|
|
|
|
|
0
|
my $code = $conflict{$A}{explorer}; |
2606
|
0
|
|
|
|
|
0
|
my $rhss = [ rhs([], name => $lhs, code => $code), ]; |
2607
|
0
|
|
|
|
|
0
|
_AddRules($lhs, $rhss); |
2608
|
0
|
|
|
|
|
0
|
delete $conflict{$A}{explorer}; |
2609
|
|
|
|
|
|
|
} |
2610
|
|
|
|
|
|
|
} |
2611
|
|
|
|
|
|
|
else { |
2612
|
0
|
|
|
|
|
0
|
delete $$syms{$A}; |
2613
|
0
|
|
|
|
|
0
|
delete $$nterm{$A}; |
2614
|
0
|
|
|
|
|
0
|
delete $$term{$A}; |
2615
|
|
|
|
|
|
|
} |
2616
|
|
|
|
|
|
|
} |
2617
|
|
|
|
|
|
|
|
2618
|
|
|
|
|
|
|
# # If exists an @identifiers that is not a nterm and not a term is a warn |
2619
|
54
|
50
|
|
|
|
259
|
if ($strict) { |
2620
|
0
|
|
|
|
|
0
|
for (keys %nondeclared) { |
2621
|
|
|
|
|
|
|
warn "Warning! Non declared token $_ at line $$syms{$_} of $filename\n" |
2622
|
0
|
0
|
0
|
|
|
0
|
unless ($_ eq 'error' || $$term{$_} || exists($$nterm{$_}) || exists($conflict{$_})); |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
2623
|
|
|
|
|
|
|
} |
2624
|
|
|
|
|
|
|
} |
2625
|
|
|
|
|
|
|
# Superstart rule |
2626
|
|
|
|
|
|
|
# [ left hand side, right hand side, precedence, rulename, code, ] |
2627
|
54
|
|
|
|
|
335
|
$$rules[0]=[ '$start', [ $start, chr(0) ], undef, undef, undef,]; |
2628
|
|
|
|
|
|
|
|
2629
|
|
|
|
|
|
|
} |
2630
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2631
|
|
|
|
|
|
|
], |
2632
|
|
|
|
|
|
|
[#Rule body_67 |
2633
|
|
|
|
|
|
|
'body', 1, |
2634
|
0
|
|
|
0
|
|
0
|
sub { _SyntaxError(2,"No rules in input grammar",$_[1][1]); } |
2635
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2636
|
|
|
|
|
|
|
], |
2637
|
|
|
|
|
|
|
[#Rule rulesec_68 |
2638
|
|
|
|
|
|
|
'rulesec', 2, undef |
2639
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2640
|
|
|
|
|
|
|
], |
2641
|
|
|
|
|
|
|
[#Rule rulesec_69 |
2642
|
|
|
|
|
|
|
'rulesec', 1, undef |
2643
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2644
|
|
|
|
|
|
|
], |
2645
|
|
|
|
|
|
|
[#Rule startrules_70 |
2646
|
|
|
|
|
|
|
'startrules', 5, |
2647
|
54
|
|
|
54
|
|
383
|
sub { _AddRules($_[1],$_[4]); undef } |
|
54
|
|
|
|
|
150
|
|
2648
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2649
|
|
|
|
|
|
|
], |
2650
|
|
|
|
|
|
|
[#Rule _CODE |
2651
|
|
|
|
|
|
|
'@70-2', 0, |
2652
|
54
|
50
|
|
54
|
|
511
|
sub { $start = $_[1][0] unless $start; } |
2653
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2654
|
|
|
|
|
|
|
], |
2655
|
|
|
|
|
|
|
[#Rule startrules_72 |
2656
|
|
|
|
|
|
|
'startrules', 2, |
2657
|
0
|
|
|
0
|
|
0
|
sub { $_[0]->YYErrok } |
2658
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2659
|
|
|
|
|
|
|
], |
2660
|
|
|
|
|
|
|
[#Rule rules_73 |
2661
|
|
|
|
|
|
|
'rules', 4, |
2662
|
115
|
|
|
115
|
|
559
|
sub { _AddRules($_[1],$_[3]); undef } |
|
115
|
|
|
|
|
318
|
|
2663
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2664
|
|
|
|
|
|
|
], |
2665
|
|
|
|
|
|
|
[#Rule rules_74 |
2666
|
|
|
|
|
|
|
'rules', 2, |
2667
|
0
|
|
|
0
|
|
0
|
sub { $_[0]->YYErrok } |
2668
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2669
|
|
|
|
|
|
|
], |
2670
|
|
|
|
|
|
|
[#Rule rhss_75 |
2671
|
|
|
|
|
|
|
'rhss', 3, |
2672
|
376
|
|
|
376
|
|
696
|
sub { push(@{$_[1]},$_[3]); $_[1] } |
|
376
|
|
|
|
|
987
|
|
|
376
|
|
|
|
|
889
|
|
2673
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2674
|
|
|
|
|
|
|
], |
2675
|
|
|
|
|
|
|
[#Rule rhss_76 |
2676
|
|
|
|
|
|
|
'rhss', 1, |
2677
|
169
|
|
|
169
|
|
494
|
sub { [ $_[1] ] } |
2678
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2679
|
|
|
|
|
|
|
], |
2680
|
|
|
|
|
|
|
[#Rule rule_77 |
2681
|
|
|
|
|
|
|
'rule', 4, |
2682
|
|
|
|
|
|
|
sub { |
2683
|
39
|
|
|
39
|
|
181
|
my ($name, $rhs, $prec, $code) = @_[1..4]; |
2684
|
|
|
|
|
|
|
|
2685
|
39
|
|
|
|
|
159
|
my %index = symbol_index($rhs); |
2686
|
39
|
50
|
|
|
|
357
|
$code->[0] = prefixcode(%index).$code->[0] if ($code); |
2687
|
|
|
|
|
|
|
|
2688
|
39
|
100
|
|
|
|
241
|
insert_delaying_code(\$code) if $metatree; |
2689
|
39
|
|
|
|
|
204
|
make_accessors($name, $rhs); |
2690
|
|
|
|
|
|
|
|
2691
|
39
|
|
|
|
|
107
|
push(@{$rhs}, $prec, $name, $code); # only three???? what with prefixofcode? |
|
39
|
|
|
|
|
148
|
|
2692
|
39
|
|
|
|
|
151
|
$rhs |
2693
|
|
|
|
|
|
|
} |
2694
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2695
|
|
|
|
|
|
|
], |
2696
|
|
|
|
|
|
|
[#Rule rule_78 |
2697
|
|
|
|
|
|
|
'rule', 2, |
2698
|
|
|
|
|
|
|
sub { |
2699
|
506
|
|
|
506
|
|
1289
|
my ($name, $rhs) = @_[1, 2]; |
2700
|
506
|
|
|
|
|
833
|
my $code; |
2701
|
|
|
|
|
|
|
|
2702
|
|
|
|
|
|
|
# Be careful: $defaultaction must be replicated per action |
2703
|
|
|
|
|
|
|
# to emulate "yacc/yapp" true behavior. |
2704
|
|
|
|
|
|
|
# There was a previous bug when %metatree and %defaultaction |
2705
|
|
|
|
|
|
|
# were activated ------------------V |
2706
|
506
|
|
100
|
|
|
2459
|
$code = $defaultaction && [ @$defaultaction ]; |
2707
|
|
|
|
|
|
|
|
2708
|
|
|
|
|
|
|
defined($rhs) |
2709
|
|
|
|
|
|
|
and $rhs->[-1][0] eq 'CODE' |
2710
|
506
|
100
|
100
|
|
|
2571
|
and $code = ${pop(@{$rhs})}[1]; |
|
182
|
|
|
|
|
342
|
|
|
182
|
|
|
|
|
470
|
|
2711
|
|
|
|
|
|
|
|
2712
|
506
|
|
|
|
|
1527
|
my %index = symbol_index($rhs); |
2713
|
506
|
100
|
|
|
|
1938
|
$code->[0] = prefixcode(%index).$code->[0] if ($code); |
2714
|
506
|
|
|
|
|
1672
|
make_accessors($name, $rhs); |
2715
|
|
|
|
|
|
|
|
2716
|
506
|
100
|
|
|
|
1429
|
insert_delaying_code(\$code) if $metatree; |
2717
|
|
|
|
|
|
|
|
2718
|
506
|
|
|
|
|
913
|
push(@{$rhs}, undef, $name, $code); |
|
506
|
|
|
|
|
1515
|
|
2719
|
|
|
|
|
|
|
|
2720
|
506
|
|
|
|
|
1513
|
$rhs |
2721
|
|
|
|
|
|
|
} |
2722
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2723
|
|
|
|
|
|
|
], |
2724
|
|
|
|
|
|
|
[#Rule rhs_79 |
2725
|
|
|
|
|
|
|
'rhs', 0, undef |
2726
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2727
|
|
|
|
|
|
|
], |
2728
|
|
|
|
|
|
|
[#Rule rhs_80 |
2729
|
|
|
|
|
|
|
'rhs', 1, undef |
2730
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2731
|
|
|
|
|
|
|
], |
2732
|
|
|
|
|
|
|
[#Rule rhselts_81 |
2733
|
|
|
|
|
|
|
'rhselts', 2, |
2734
|
|
|
|
|
|
|
sub { |
2735
|
890
|
|
|
890
|
|
1438
|
push(@{$_[1]},$_[2]); |
|
890
|
|
|
|
|
2168
|
|
2736
|
890
|
|
|
|
|
1968
|
$_[1] |
2737
|
|
|
|
|
|
|
} |
2738
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2739
|
|
|
|
|
|
|
], |
2740
|
|
|
|
|
|
|
[#Rule rhselts_82 |
2741
|
|
|
|
|
|
|
'rhselts', 1, |
2742
|
549
|
|
|
549
|
|
1479
|
sub { [ $_[1] ] } |
2743
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2744
|
|
|
|
|
|
|
], |
2745
|
|
|
|
|
|
|
[#Rule rhseltwithid_83 |
2746
|
|
|
|
|
|
|
'rhseltwithid', 3, |
2747
|
|
|
|
|
|
|
sub { |
2748
|
116
|
|
|
116
|
|
206
|
push @{$_[1][1]}, $_[3][0]; |
|
116
|
|
|
|
|
382
|
|
2749
|
116
|
|
|
|
|
320
|
$_[1] |
2750
|
|
|
|
|
|
|
} |
2751
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2752
|
|
|
|
|
|
|
], |
2753
|
|
|
|
|
|
|
[#Rule rhseltwithid_84 |
2754
|
|
|
|
|
|
|
'rhseltwithid', 2, |
2755
|
|
|
|
|
|
|
sub { |
2756
|
|
|
|
|
|
|
# check that is an identifier |
2757
|
71
|
50
|
|
71
|
|
262
|
_SyntaxError(2,"\$ is allowed for identifiers only (Use dot notation instead)",$lineno[0]) |
2758
|
|
|
|
|
|
|
if not_an_id($_[2][1][0]); |
2759
|
71
|
|
|
|
|
164
|
push @{$_[2][1]}, $_[2][1][0]; |
|
71
|
|
|
|
|
248
|
|
2760
|
71
|
|
|
|
|
202
|
$_[2] |
2761
|
|
|
|
|
|
|
} |
2762
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2763
|
|
|
|
|
|
|
], |
2764
|
|
|
|
|
|
|
[#Rule rhseltwithid_85 |
2765
|
|
|
|
|
|
|
'rhseltwithid', 2, |
2766
|
0
|
|
|
0
|
|
0
|
sub { _SyntaxError(2,"\$ is allowed for identifiers only",$lineno[0]) } |
2767
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2768
|
|
|
|
|
|
|
], |
2769
|
|
|
|
|
|
|
[#Rule rhseltwithid_86 |
2770
|
|
|
|
|
|
|
'rhseltwithid', 1, |
2771
|
|
|
|
|
|
|
sub { |
2772
|
1252
|
|
|
1252
|
|
2859
|
$_[1]; |
2773
|
|
|
|
|
|
|
} |
2774
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2775
|
|
|
|
|
|
|
], |
2776
|
|
|
|
|
|
|
[#Rule rhselt_87 |
2777
|
|
|
|
|
|
|
'rhselt', 1, |
2778
|
1241
|
|
|
1241
|
|
3441
|
sub { [ 'SYMB', $_[1] ] } |
2779
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2780
|
|
|
|
|
|
|
], |
2781
|
|
|
|
|
|
|
[#Rule rhselt_88 |
2782
|
|
|
|
|
|
|
'rhselt', 1, |
2783
|
190
|
|
|
190
|
|
599
|
sub { [ 'CODE', $_[1] ] } |
2784
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2785
|
|
|
|
|
|
|
], |
2786
|
|
|
|
|
|
|
[#Rule rhselt_89 |
2787
|
|
|
|
|
|
|
'rhselt', 2, |
2788
|
|
|
|
|
|
|
sub { |
2789
|
0
|
|
|
0
|
|
0
|
my $cname = $_[2][0]; |
2790
|
0
|
|
|
|
|
0
|
$conflict{$cname}{total}++; |
2791
|
0
|
|
|
|
|
0
|
[ 'CONFLICTHANDLER', $_[2] ] |
2792
|
|
|
|
|
|
|
} |
2793
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2794
|
|
|
|
|
|
|
], |
2795
|
|
|
|
|
|
|
[#Rule rhselt_90 |
2796
|
|
|
|
|
|
|
'rhselt', 1, |
2797
|
|
|
|
|
|
|
sub { |
2798
|
0
|
|
|
0
|
|
0
|
$conflict{$_[1][0]}{totalviewpoint}++; |
2799
|
0
|
|
|
|
|
0
|
[ 'CONFLICTVIEWPOINT', $_[1] ] |
2800
|
|
|
|
|
|
|
} |
2801
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2802
|
|
|
|
|
|
|
], |
2803
|
|
|
|
|
|
|
[#Rule rhselt_91 |
2804
|
|
|
|
|
|
|
'rhselt', 4, |
2805
|
|
|
|
|
|
|
sub { |
2806
|
8
|
|
|
8
|
|
31
|
my ($name, $rhs) = @_[2, 3]; |
2807
|
|
|
|
|
|
|
|
2808
|
|
|
|
|
|
|
|
2809
|
8
|
|
50
|
|
|
64
|
my $code = $defaultaction && [ @$defaultaction ]; |
2810
|
8
|
50
|
|
|
|
43
|
$code =[ ' goto &Parse::Eyapp::Driver::YYActionforParenthesis', $lineno[0]] unless $metatree; |
2811
|
|
|
|
|
|
|
|
2812
|
|
|
|
|
|
|
defined($rhs) |
2813
|
|
|
|
|
|
|
and $rhs->[-1][0] eq 'CODE' |
2814
|
8
|
50
|
33
|
|
|
62
|
and $code = ${pop(@$rhs)}[1]; |
|
0
|
|
|
|
|
0
|
|
2815
|
|
|
|
|
|
|
|
2816
|
8
|
|
|
|
|
28
|
my %index = symbol_index($rhs); |
2817
|
8
|
50
|
|
|
|
48
|
$code->[0] = prefixcode(%index).$code->[0] if ($code); |
2818
|
|
|
|
|
|
|
|
2819
|
8
|
50
|
|
|
|
36
|
insert_delaying_code(\$code) if $metatree; |
2820
|
|
|
|
|
|
|
|
2821
|
8
|
|
|
|
|
42
|
my $A = token('PAREN-'.++$labelno); |
2822
|
8
|
|
|
|
|
46
|
_AddRules($A, [[@$rhs, undef, $name, $code]]); |
2823
|
|
|
|
|
|
|
|
2824
|
8
|
|
|
|
|
38
|
[ 'SYMB', $A] |
2825
|
|
|
|
|
|
|
} |
2826
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2827
|
|
|
|
|
|
|
], |
2828
|
|
|
|
|
|
|
[#Rule rhselt_92 |
2829
|
|
|
|
|
|
|
'rhselt', 2, |
2830
|
|
|
|
|
|
|
sub { |
2831
|
6
|
|
|
6
|
|
26
|
my ($what, $val) = @{$_[1]}; |
|
6
|
|
|
|
|
24
|
|
2832
|
6
|
50
|
|
|
|
24
|
_SyntaxError(1, "Star(*) operator can't be applied to an action", $lineno[0]) |
2833
|
|
|
|
|
|
|
if $what eq 'CODE'; |
2834
|
6
|
|
|
|
|
35
|
my $A = token('STAR-'.++$labelno); |
2835
|
6
|
|
|
|
|
20
|
my $code_rec = ' goto &Parse::Eyapp::Driver::YYActionforT_TX1X2 '; |
2836
|
6
|
|
|
|
|
17
|
my $code_empty = ' goto &Parse::Eyapp::Driver::YYActionforT_empty '; |
2837
|
|
|
|
|
|
|
|
2838
|
6
|
|
|
|
|
28
|
my $rhss = [ |
2839
|
|
|
|
|
|
|
rhs([ $A, $val], name => $_[2], code => $code_rec), |
2840
|
|
|
|
|
|
|
rhs([], name => $_[2], code => $code_empty), |
2841
|
|
|
|
|
|
|
]; |
2842
|
6
|
|
|
|
|
31
|
_AddRules($A, $rhss); |
2843
|
6
|
|
|
|
|
35
|
[ 'SYMB', $A] |
2844
|
|
|
|
|
|
|
} |
2845
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2846
|
|
|
|
|
|
|
], |
2847
|
|
|
|
|
|
|
[#Rule rhselt_93 |
2848
|
|
|
|
|
|
|
'rhselt', 5, |
2849
|
|
|
|
|
|
|
sub { |
2850
|
5
|
|
|
5
|
|
18
|
my ($what, $val) = @{$_[1]}; |
|
5
|
|
|
|
|
17
|
|
2851
|
5
|
50
|
|
|
|
26
|
_SyntaxError(1, "Star(*) operator can't be applied to an action", $lineno[0]) |
2852
|
|
|
|
|
|
|
if $what eq 'CODE'; |
2853
|
5
|
|
|
|
|
28
|
my $B = token('STAR-'.++$labelno); |
2854
|
5
|
|
|
|
|
13
|
my $code_rec = ' goto &Parse::Eyapp::Driver::YYActionforT_TX1X2 '; |
2855
|
5
|
|
|
|
|
14
|
my $code_single = ' goto &Parse::Eyapp::Driver::YYActionforT_single '; |
2856
|
5
|
|
|
|
|
38
|
my $rhss = [#rhs [token , [value, line]] ..., prec, name, code ] |
2857
|
|
|
|
|
|
|
rhs([ $B, $_[4], $val], name => $_[3], code => $code_rec), |
2858
|
|
|
|
|
|
|
rhs([ $val], name => $_[3], code => $code_single), |
2859
|
|
|
|
|
|
|
]; |
2860
|
5
|
|
|
|
|
28
|
_AddRules($B, $rhss); |
2861
|
|
|
|
|
|
|
|
2862
|
5
|
|
|
|
|
24
|
my $A = token('STAR-'.++$labelno); |
2863
|
5
|
|
|
|
|
18
|
my $code_empty = ' goto &Parse::Eyapp::Driver::YYActionforT_empty '; |
2864
|
5
|
|
|
|
|
15
|
$code_single = ' { $_[1] } # optimize '."\n"; |
2865
|
|
|
|
|
|
|
|
2866
|
5
|
|
|
|
|
20
|
$rhss = [ |
2867
|
|
|
|
|
|
|
rhs([ $B ], name => $_[3], code => $code_single ), |
2868
|
|
|
|
|
|
|
rhs([], name => $_[3], code => $code_empty), |
2869
|
|
|
|
|
|
|
]; |
2870
|
5
|
|
|
|
|
27
|
_AddRules($A, $rhss); |
2871
|
5
|
|
|
|
|
24
|
[ 'SYMB', $A ] |
2872
|
|
|
|
|
|
|
} |
2873
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2874
|
|
|
|
|
|
|
], |
2875
|
|
|
|
|
|
|
[#Rule rhselt_94 |
2876
|
|
|
|
|
|
|
'rhselt', 2, |
2877
|
|
|
|
|
|
|
sub { |
2878
|
1
|
|
|
1
|
|
2
|
my ($what, $val) = @{$_[1]}; |
|
1
|
|
|
|
|
3
|
|
2879
|
1
|
50
|
|
|
|
4
|
_SyntaxError(1, "Question(?) operator can't be applied to an action", $lineno[0]) |
2880
|
|
|
|
|
|
|
if $what eq 'CODE'; |
2881
|
1
|
|
|
|
|
4
|
my $A = token('OPTIONAL-'.++$labelno); |
2882
|
1
|
|
|
|
|
3
|
my $code_single = ' goto &Parse::Eyapp::Driver::YYActionforT_single '; |
2883
|
1
|
|
|
|
|
2
|
my $code_empty = ' goto &Parse::Eyapp::Driver::YYActionforT_empty '; |
2884
|
|
|
|
|
|
|
|
2885
|
1
|
|
|
|
|
4
|
my $rhss = [ |
2886
|
|
|
|
|
|
|
rhs([ $val], name => $_[2], code => $code_single), |
2887
|
|
|
|
|
|
|
rhs([], name => $_[2], code => $code_empty), |
2888
|
|
|
|
|
|
|
]; |
2889
|
1
|
|
|
|
|
11
|
_AddRules($A, $rhss); |
2890
|
1
|
|
|
|
|
5
|
[ 'SYMB', $A] |
2891
|
|
|
|
|
|
|
} |
2892
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2893
|
|
|
|
|
|
|
], |
2894
|
|
|
|
|
|
|
[#Rule rhselt_95 |
2895
|
|
|
|
|
|
|
'rhselt', 5, |
2896
|
|
|
|
|
|
|
sub { |
2897
|
17
|
|
|
17
|
|
46
|
my ($what, $val) = @{$_[1]}; |
|
17
|
|
|
|
|
56
|
|
2898
|
17
|
50
|
|
|
|
83
|
_SyntaxError(1, "Plus(+) operator can't be applied to an action", $lineno[0]) |
2899
|
|
|
|
|
|
|
if $what eq 'CODE'; |
2900
|
17
|
|
|
|
|
100
|
my $A = token('PLUS-'.++$labelno); |
2901
|
17
|
|
|
|
|
52
|
my $code_rec = ' goto &Parse::Eyapp::Driver::YYActionforT_TX1X2 '; |
2902
|
17
|
|
|
|
|
44
|
my $code_single = ' goto &Parse::Eyapp::Driver::YYActionforT_single '; |
2903
|
|
|
|
|
|
|
|
2904
|
17
|
|
|
|
|
95
|
my $rhss = [ |
2905
|
|
|
|
|
|
|
rhs([$A, $_[4], $val], name => $_[3], code => $code_rec), |
2906
|
|
|
|
|
|
|
rhs([$val], name => $_[3], code => $code_single), |
2907
|
|
|
|
|
|
|
]; |
2908
|
17
|
|
|
|
|
266
|
_AddRules($A, $rhss); |
2909
|
17
|
|
|
|
|
88
|
[ 'SYMB', $A] |
2910
|
|
|
|
|
|
|
} |
2911
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2912
|
|
|
|
|
|
|
], |
2913
|
|
|
|
|
|
|
[#Rule rhselt_96 |
2914
|
|
|
|
|
|
|
'rhselt', 2, |
2915
|
|
|
|
|
|
|
sub { |
2916
|
4
|
|
|
4
|
|
13
|
my ($what, $val) = @{$_[1]}; |
|
4
|
|
|
|
|
13
|
|
2917
|
4
|
50
|
|
|
|
20
|
_SyntaxError(1, "Plus(+) operator can't be applied to an action", $lineno[0]) |
2918
|
|
|
|
|
|
|
if $what eq 'CODE'; |
2919
|
4
|
|
|
|
|
22
|
my $A = token('PLUS-'.++$labelno); |
2920
|
4
|
|
|
|
|
10
|
my $code_rec = ' goto &Parse::Eyapp::Driver::YYActionforT_TX1X2 '; |
2921
|
4
|
|
|
|
|
9
|
my $code_single = ' goto &Parse::Eyapp::Driver::YYActionforT_single '; |
2922
|
|
|
|
|
|
|
|
2923
|
4
|
|
|
|
|
23
|
my $rhss = [ |
2924
|
|
|
|
|
|
|
rhs([$A, $val], name => $_[2], code => $code_rec), |
2925
|
|
|
|
|
|
|
rhs([$val], name => $_[2], code => $code_single) |
2926
|
|
|
|
|
|
|
]; |
2927
|
|
|
|
|
|
|
|
2928
|
4
|
|
|
|
|
33
|
_AddRules($A, $rhss); |
2929
|
4
|
|
|
|
|
18
|
[ 'SYMB', $A] |
2930
|
|
|
|
|
|
|
} |
2931
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2932
|
|
|
|
|
|
|
], |
2933
|
|
|
|
|
|
|
[#Rule optname_97 |
2934
|
|
|
|
|
|
|
'optname', 0, undef |
2935
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2936
|
|
|
|
|
|
|
], |
2937
|
|
|
|
|
|
|
[#Rule optname_98 |
2938
|
|
|
|
|
|
|
'optname', 2, |
2939
|
|
|
|
|
|
|
sub { |
2940
|
|
|
|
|
|
|
# save bypass status |
2941
|
357
|
|
|
357
|
|
917
|
$_[2][2] = $_[1][0]; |
2942
|
357
|
|
|
|
|
822
|
$_[2] |
2943
|
|
|
|
|
|
|
} |
2944
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2945
|
|
|
|
|
|
|
], |
2946
|
|
|
|
|
|
|
[#Rule optname_99 |
2947
|
|
|
|
|
|
|
'optname', 3, |
2948
|
|
|
|
|
|
|
sub { # LABELs are used for dynamic conflict resolution |
2949
|
|
|
|
|
|
|
# save bypass status |
2950
|
0
|
|
|
0
|
|
0
|
$_[2][2] = $_[1][0]; |
2951
|
|
|
|
|
|
|
# 0: identifier 1: line number 2: bypass |
2952
|
|
|
|
|
|
|
# concat the label to the name |
2953
|
0
|
|
|
|
|
0
|
$_[2][0] .= "$_[3][0]"; |
2954
|
|
|
|
|
|
|
|
2955
|
0
|
|
|
|
|
0
|
$_[2] |
2956
|
|
|
|
|
|
|
} |
2957
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2958
|
|
|
|
|
|
|
], |
2959
|
|
|
|
|
|
|
[#Rule optname_100 |
2960
|
|
|
|
|
|
|
'optname', 2, |
2961
|
|
|
|
|
|
|
sub { # LABELs are used for dynamic conflict resolution |
2962
|
|
|
|
|
|
|
# save bypass status |
2963
|
0
|
|
|
0
|
|
0
|
$_[2][2] = $_[1][0]; |
2964
|
0
|
|
|
|
|
0
|
$_[2] |
2965
|
|
|
|
|
|
|
} |
2966
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2967
|
|
|
|
|
|
|
], |
2968
|
|
|
|
|
|
|
[#Rule prec_101 |
2969
|
|
|
|
|
|
|
'prec', 2, |
2970
|
|
|
|
|
|
|
sub { |
2971
|
|
|
|
|
|
|
defined($$term{$_[2][0]}) |
2972
|
39
|
50
|
|
39
|
|
241
|
or do { |
2973
|
0
|
|
|
|
|
0
|
_SyntaxError(1,"No precedence for symbol $_[2][0]", |
2974
|
|
|
|
|
|
|
$_[2][1]); |
2975
|
0
|
|
|
|
|
0
|
return undef; |
2976
|
|
|
|
|
|
|
}; |
2977
|
|
|
|
|
|
|
|
2978
|
39
|
|
|
|
|
183
|
++$$precterm{$_[2][0]}; |
2979
|
39
|
|
|
|
|
148
|
$$term{$_[2][0]}[1]; |
2980
|
|
|
|
|
|
|
} |
2981
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2982
|
|
|
|
|
|
|
], |
2983
|
|
|
|
|
|
|
[#Rule epscode_102 |
2984
|
|
|
|
|
|
|
'epscode', 0, |
2985
|
23
|
|
|
23
|
|
76
|
sub { $defaultaction } |
2986
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2987
|
|
|
|
|
|
|
], |
2988
|
|
|
|
|
|
|
[#Rule epscode_103 |
2989
|
|
|
|
|
|
|
'epscode', 1, |
2990
|
16
|
|
|
16
|
|
69
|
sub { $_[1] } |
2991
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2992
|
|
|
|
|
|
|
], |
2993
|
|
|
|
|
|
|
[#Rule code_104 |
2994
|
|
|
|
|
|
|
'code', 1, |
2995
|
191
|
|
|
191
|
|
464
|
sub { $_[1] } |
2996
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
2997
|
|
|
|
|
|
|
], |
2998
|
|
|
|
|
|
|
[#Rule code_105 |
2999
|
|
|
|
|
|
|
'code', 1, |
3000
|
|
|
|
|
|
|
sub { |
3001
|
15
|
50
|
|
15
|
|
72
|
_SyntaxError(2, "%begin code is allowed only when metatree is active\n", $lineno[0]) |
3002
|
|
|
|
|
|
|
unless $metatree; |
3003
|
15
|
|
|
|
|
41
|
my $code = $_[1]; |
3004
|
15
|
|
|
|
|
51
|
push @$code, 'BEGINCODE'; |
3005
|
15
|
|
|
|
|
49
|
return $code; |
3006
|
|
|
|
|
|
|
} |
3007
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
3008
|
|
|
|
|
|
|
], |
3009
|
|
|
|
|
|
|
[#Rule tail_106 |
3010
|
|
|
|
|
|
|
'tail', 0, undef |
3011
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
3012
|
|
|
|
|
|
|
], |
3013
|
|
|
|
|
|
|
[#Rule tail_107 |
3014
|
|
|
|
|
|
|
'tail', 1, |
3015
|
54
|
|
|
54
|
|
194
|
sub { $tail=$_[1] } |
3016
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
3017
|
54
|
|
|
|
|
40589
|
] |
3018
|
|
|
|
|
|
|
], |
3019
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
3020
|
|
|
|
|
|
|
yybypass => 0, |
3021
|
|
|
|
|
|
|
yybuildingtree => 0, |
3022
|
|
|
|
|
|
|
yyprefix => '', |
3023
|
|
|
|
|
|
|
yyaccessors => { |
3024
|
|
|
|
|
|
|
}, |
3025
|
|
|
|
|
|
|
yyconflicthandlers => {} |
3026
|
|
|
|
|
|
|
, |
3027
|
|
|
|
|
|
|
yystateconflict => { }, |
3028
|
|
|
|
|
|
|
@_, |
3029
|
|
|
|
|
|
|
); |
3030
|
54
|
|
|
|
|
1084
|
bless($self,$class); |
3031
|
|
|
|
|
|
|
|
3032
|
54
|
|
|
|
|
775
|
$self->make_node_classes('TERMINAL', '_OPTIONAL', '_STAR_LIST', '_PLUS_LIST', |
3033
|
|
|
|
|
|
|
'_SUPERSTART', |
3034
|
|
|
|
|
|
|
'eyapp_1', |
3035
|
|
|
|
|
|
|
'symbol_2', |
3036
|
|
|
|
|
|
|
'symbol_3', |
3037
|
|
|
|
|
|
|
'ident_4', |
3038
|
|
|
|
|
|
|
'prodname_5', |
3039
|
|
|
|
|
|
|
'prodname_6', |
3040
|
|
|
|
|
|
|
'prodname_7', |
3041
|
|
|
|
|
|
|
'head_8', |
3042
|
|
|
|
|
|
|
'perlident_9', |
3043
|
|
|
|
|
|
|
'perlident_10', |
3044
|
|
|
|
|
|
|
'headsec_11', |
3045
|
|
|
|
|
|
|
'headsec_12', |
3046
|
|
|
|
|
|
|
'decls_13', |
3047
|
|
|
|
|
|
|
'decls_14', |
3048
|
|
|
|
|
|
|
'decl_15', |
3049
|
|
|
|
|
|
|
'decl_16', |
3050
|
|
|
|
|
|
|
'decl_17', |
3051
|
|
|
|
|
|
|
'decl_18', |
3052
|
|
|
|
|
|
|
'decl_19', |
3053
|
|
|
|
|
|
|
'decl_20', |
3054
|
|
|
|
|
|
|
'decl_21', |
3055
|
|
|
|
|
|
|
'decl_22', |
3056
|
|
|
|
|
|
|
'decl_23', |
3057
|
|
|
|
|
|
|
'decl_24', |
3058
|
|
|
|
|
|
|
'decl_25', |
3059
|
|
|
|
|
|
|
'decl_26', |
3060
|
|
|
|
|
|
|
'decl_27', |
3061
|
|
|
|
|
|
|
'decl_28', |
3062
|
|
|
|
|
|
|
'decl_29', |
3063
|
|
|
|
|
|
|
'decl_30', |
3064
|
|
|
|
|
|
|
'decl_31', |
3065
|
|
|
|
|
|
|
'decl_32', |
3066
|
|
|
|
|
|
|
'decl_33', |
3067
|
|
|
|
|
|
|
'decl_34', |
3068
|
|
|
|
|
|
|
'decl_35', |
3069
|
|
|
|
|
|
|
'decl_36', |
3070
|
|
|
|
|
|
|
'decl_37', |
3071
|
|
|
|
|
|
|
'decl_38', |
3072
|
|
|
|
|
|
|
'decl_39', |
3073
|
|
|
|
|
|
|
'decl_40', |
3074
|
|
|
|
|
|
|
'decl_41', |
3075
|
|
|
|
|
|
|
'decl_42', |
3076
|
|
|
|
|
|
|
'decl_43', |
3077
|
|
|
|
|
|
|
'decl_44', |
3078
|
|
|
|
|
|
|
'decl_45', |
3079
|
|
|
|
|
|
|
'decl_46', |
3080
|
|
|
|
|
|
|
'decl_47', |
3081
|
|
|
|
|
|
|
'decl_48', |
3082
|
|
|
|
|
|
|
'decl_49', |
3083
|
|
|
|
|
|
|
'neg_50', |
3084
|
|
|
|
|
|
|
'neg_51', |
3085
|
|
|
|
|
|
|
'typedecl_52', |
3086
|
|
|
|
|
|
|
'typedecl_53', |
3087
|
|
|
|
|
|
|
'symlist_54', |
3088
|
|
|
|
|
|
|
'symlist_55', |
3089
|
|
|
|
|
|
|
'toklist_56', |
3090
|
|
|
|
|
|
|
'toklist_57', |
3091
|
|
|
|
|
|
|
'tokendef_58', |
3092
|
|
|
|
|
|
|
'tokendef_59', |
3093
|
|
|
|
|
|
|
'tokendef_60', |
3094
|
|
|
|
|
|
|
'tokendef_61', |
3095
|
|
|
|
|
|
|
'tokendef_62', |
3096
|
|
|
|
|
|
|
'tokendef_63', |
3097
|
|
|
|
|
|
|
'identlist_64', |
3098
|
|
|
|
|
|
|
'identlist_65', |
3099
|
|
|
|
|
|
|
'body_66', |
3100
|
|
|
|
|
|
|
'body_67', |
3101
|
|
|
|
|
|
|
'rulesec_68', |
3102
|
|
|
|
|
|
|
'rulesec_69', |
3103
|
|
|
|
|
|
|
'startrules_70', |
3104
|
|
|
|
|
|
|
'_CODE', |
3105
|
|
|
|
|
|
|
'startrules_72', |
3106
|
|
|
|
|
|
|
'rules_73', |
3107
|
|
|
|
|
|
|
'rules_74', |
3108
|
|
|
|
|
|
|
'rhss_75', |
3109
|
|
|
|
|
|
|
'rhss_76', |
3110
|
|
|
|
|
|
|
'rule_77', |
3111
|
|
|
|
|
|
|
'rule_78', |
3112
|
|
|
|
|
|
|
'rhs_79', |
3113
|
|
|
|
|
|
|
'rhs_80', |
3114
|
|
|
|
|
|
|
'rhselts_81', |
3115
|
|
|
|
|
|
|
'rhselts_82', |
3116
|
|
|
|
|
|
|
'rhseltwithid_83', |
3117
|
|
|
|
|
|
|
'rhseltwithid_84', |
3118
|
|
|
|
|
|
|
'rhseltwithid_85', |
3119
|
|
|
|
|
|
|
'rhseltwithid_86', |
3120
|
|
|
|
|
|
|
'rhselt_87', |
3121
|
|
|
|
|
|
|
'rhselt_88', |
3122
|
|
|
|
|
|
|
'rhselt_89', |
3123
|
|
|
|
|
|
|
'rhselt_90', |
3124
|
|
|
|
|
|
|
'rhselt_91', |
3125
|
|
|
|
|
|
|
'rhselt_92', |
3126
|
|
|
|
|
|
|
'rhselt_93', |
3127
|
|
|
|
|
|
|
'rhselt_94', |
3128
|
|
|
|
|
|
|
'rhselt_95', |
3129
|
|
|
|
|
|
|
'rhselt_96', |
3130
|
|
|
|
|
|
|
'optname_97', |
3131
|
|
|
|
|
|
|
'optname_98', |
3132
|
|
|
|
|
|
|
'optname_99', |
3133
|
|
|
|
|
|
|
'optname_100', |
3134
|
|
|
|
|
|
|
'prec_101', |
3135
|
|
|
|
|
|
|
'epscode_102', |
3136
|
|
|
|
|
|
|
'epscode_103', |
3137
|
|
|
|
|
|
|
'code_104', |
3138
|
|
|
|
|
|
|
'code_105', |
3139
|
|
|
|
|
|
|
'tail_106', |
3140
|
|
|
|
|
|
|
'tail_107', ); |
3141
|
54
|
|
|
|
|
207
|
$self; |
3142
|
|
|
|
|
|
|
} |
3143
|
|
|
|
|
|
|
|
3144
|
|
|
|
|
|
|
|
3145
|
|
|
|
|
|
|
sub _Error { |
3146
|
0
|
|
|
0
|
|
0
|
my($value)=$_[0]->YYCurval; |
3147
|
|
|
|
|
|
|
|
3148
|
0
|
|
|
|
|
0
|
my $token = $$value[0]; |
3149
|
0
|
0
|
|
|
|
0
|
my($what)= $token ? "input: '$token'" : "symbol"; |
3150
|
|
|
|
|
|
|
|
3151
|
0
|
|
|
|
|
0
|
_SyntaxError(1,"Unexpected $what",$$value[1]); |
3152
|
|
|
|
|
|
|
} |
3153
|
|
|
|
|
|
|
|
3154
|
|
|
|
|
|
|
sub slurp_perl_code { |
3155
|
221
|
|
|
221
|
0
|
465
|
my($level,$from,$code); |
3156
|
|
|
|
|
|
|
|
3157
|
221
|
|
|
|
|
434
|
$from=pos($$input); |
3158
|
|
|
|
|
|
|
|
3159
|
221
|
|
|
|
|
380
|
$level=1; |
3160
|
221
|
|
|
|
|
868
|
while($$input=~/([{}])/gc) { |
3161
|
935
|
50
|
|
|
|
2691
|
substr($$input,pos($$input)-1,1) eq '\\' #Quoted |
3162
|
|
|
|
|
|
|
and next; |
3163
|
935
|
100
|
|
|
|
3615
|
$level += ($1 eq '{' ? 1 : -1) |
|
|
100
|
|
|
|
|
|
3164
|
|
|
|
|
|
|
or last; |
3165
|
|
|
|
|
|
|
} |
3166
|
|
|
|
|
|
|
$level |
3167
|
221
|
50
|
|
|
|
673
|
and _SyntaxError(2,"Unmatched { opened line $lineno[0]",-1); |
3168
|
221
|
|
|
|
|
640
|
$code = substr($$input,$from,pos($$input)-$from-1); |
3169
|
221
|
|
|
|
|
473
|
$lineno[1]+= $code=~tr/\n//; |
3170
|
221
|
|
|
|
|
1082
|
return [ $code, $lineno[0] ]; |
3171
|
|
|
|
|
|
|
} |
3172
|
|
|
|
|
|
|
|
3173
|
|
|
|
|
|
|
my %headertoken = ( |
3174
|
|
|
|
|
|
|
start => 'START', |
3175
|
|
|
|
|
|
|
expect => 'EXPECT', |
3176
|
|
|
|
|
|
|
token => 'TOKEN', |
3177
|
|
|
|
|
|
|
strict => 'STRICT', |
3178
|
|
|
|
|
|
|
type => 'TYPE', |
3179
|
|
|
|
|
|
|
union => 'UNION', |
3180
|
|
|
|
|
|
|
namingscheme => 'NAMINGSCHEME', |
3181
|
|
|
|
|
|
|
metatree => 'METATREE', |
3182
|
|
|
|
|
|
|
nocompact => 'NOCOMPACT', |
3183
|
|
|
|
|
|
|
conflict => 'CONFLICT', |
3184
|
|
|
|
|
|
|
whites => 'WHITES', |
3185
|
|
|
|
|
|
|
); |
3186
|
|
|
|
|
|
|
|
3187
|
|
|
|
|
|
|
# Used for <%name LIST_of_STH +>, <%name OPT_STH ?> |
3188
|
|
|
|
|
|
|
my %listtoken = ( |
3189
|
|
|
|
|
|
|
'*' => 'STAR', |
3190
|
|
|
|
|
|
|
'+' => 'PLUS', |
3191
|
|
|
|
|
|
|
'?' => 'OPTION', |
3192
|
|
|
|
|
|
|
); |
3193
|
|
|
|
|
|
|
|
3194
|
|
|
|
|
|
|
my $ID = qr{[A-Za-z_][A-Za-z0-9_]*}; |
3195
|
|
|
|
|
|
|
my $LABEL = qr{:[A-Za-z0-9_]+}; |
3196
|
|
|
|
|
|
|
my $STRING = qr { |
3197
|
|
|
|
|
|
|
' # opening apostrophe |
3198
|
|
|
|
|
|
|
(?:[^'\\]| # an ordinary character |
3199
|
|
|
|
|
|
|
\\\\| # escaped \ i.e. \\ |
3200
|
|
|
|
|
|
|
\\'| # escaped apostrophe i.e. \' |
3201
|
|
|
|
|
|
|
\\ # escape i.e. \ |
3202
|
|
|
|
|
|
|
)*? # non greedy repetitions |
3203
|
|
|
|
|
|
|
' # closing apostrophe |
3204
|
|
|
|
|
|
|
}x; |
3205
|
|
|
|
|
|
|
|
3206
|
|
|
|
|
|
|
# Head section: \n separates declarations |
3207
|
|
|
|
|
|
|
my $HEADERWHITESPACES = qr{ |
3208
|
|
|
|
|
|
|
(?: |
3209
|
|
|
|
|
|
|
[\t\ ]+ # Any white space char but \n |
3210
|
|
|
|
|
|
|
| \#[^\n]* # Perl like comments |
3211
|
|
|
|
|
|
|
| /\*.*?\*/ # C like comments |
3212
|
|
|
|
|
|
|
)+ |
3213
|
|
|
|
|
|
|
}xs; |
3214
|
|
|
|
|
|
|
|
3215
|
|
|
|
|
|
|
# Head section: \n is not significant |
3216
|
|
|
|
|
|
|
my $BODYWHITESPACES = qr{ |
3217
|
|
|
|
|
|
|
(?: |
3218
|
|
|
|
|
|
|
\s+ # Any white space char, including \n |
3219
|
|
|
|
|
|
|
| \#[^\n]* # Perl like comments |
3220
|
|
|
|
|
|
|
| /\*.*?\*/ # C like comments |
3221
|
|
|
|
|
|
|
)+ |
3222
|
|
|
|
|
|
|
}xs; |
3223
|
|
|
|
|
|
|
|
3224
|
|
|
|
|
|
|
my $REGEXP = qr{ |
3225
|
|
|
|
|
|
|
/ # opening slash |
3226
|
|
|
|
|
|
|
(?:[^/\\]| # an ordinary character |
3227
|
|
|
|
|
|
|
\\\\| # escaped \ i.e. \\ |
3228
|
|
|
|
|
|
|
\\/| # escaped slash i.e. \/ |
3229
|
|
|
|
|
|
|
\\ # escape i.e. \ |
3230
|
|
|
|
|
|
|
)*? # non greedy repetitions |
3231
|
|
|
|
|
|
|
/ # closing slash |
3232
|
|
|
|
|
|
|
}xs; |
3233
|
|
|
|
|
|
|
|
3234
|
|
|
|
|
|
|
sub _Lexer { |
3235
|
|
|
|
|
|
|
|
3236
|
|
|
|
|
|
|
#At EOF |
3237
|
4852
|
100
|
|
4852
|
|
11868
|
pos($$input) >= length($$input) |
3238
|
|
|
|
|
|
|
and return('',[ undef, -1 ]); |
3239
|
|
|
|
|
|
|
|
3240
|
|
|
|
|
|
|
#In TAIL section |
3241
|
|
|
|
|
|
|
$lexlevel > 1 |
3242
|
4798
|
100
|
|
|
|
10096
|
and do { |
3243
|
54
|
|
|
|
|
164
|
my($pos)=pos($$input); |
3244
|
|
|
|
|
|
|
|
3245
|
54
|
|
|
|
|
140
|
$lineno[0]=$lineno[1]; |
3246
|
54
|
|
|
|
|
147
|
$lineno[1]=-1; |
3247
|
54
|
|
|
|
|
235
|
pos($$input)=length($$input); |
3248
|
54
|
|
|
|
|
395
|
return('TAILCODE',[ substr($$input,$pos), $lineno[0] ]); |
3249
|
|
|
|
|
|
|
}; |
3250
|
|
|
|
|
|
|
|
3251
|
|
|
|
|
|
|
#Skip blanks |
3252
|
|
|
|
|
|
|
$lexlevel == 0 |
3253
|
|
|
|
|
|
|
? $$input=~m{\G($HEADERWHITESPACES)}gc |
3254
|
|
|
|
|
|
|
: $$input=~m{\G($BODYWHITESPACES)}gc |
3255
|
4744
|
100
|
|
|
|
36646
|
and do { |
|
|
100
|
|
|
|
|
|
3256
|
3519
|
|
|
|
|
9542
|
my($blanks)=$1; |
3257
|
|
|
|
|
|
|
|
3258
|
|
|
|
|
|
|
#Maybe At EOF |
3259
|
3519
|
50
|
|
|
|
8280
|
pos($$input) >= length($$input) and return('',[ undef, -1 ]); |
3260
|
|
|
|
|
|
|
|
3261
|
3519
|
|
|
|
|
7267
|
$lineno[1]+= $blanks=~tr/\n//; |
3262
|
|
|
|
|
|
|
}; |
3263
|
|
|
|
|
|
|
|
3264
|
4744
|
|
|
|
|
8472
|
$lineno[0]=$lineno[1]; |
3265
|
|
|
|
|
|
|
|
3266
|
4744
|
50
|
|
|
|
16624
|
$$input=~/\G($LABEL)/gc |
3267
|
|
|
|
|
|
|
and return('LABEL',[ $1, $lineno[0] ]); |
3268
|
|
|
|
|
|
|
|
3269
|
4744
|
100
|
|
|
|
22790
|
$$input=~/\G($ID)/gc |
3270
|
|
|
|
|
|
|
and return('IDENT',[ $1, $lineno[0] ]); |
3271
|
|
|
|
|
|
|
|
3272
|
|
|
|
|
|
|
|
3273
|
|
|
|
|
|
|
$$input=~/\G($STRING)/gc |
3274
|
3222
|
100
|
|
|
|
15719
|
and do { |
3275
|
752
|
|
|
|
|
1728
|
my $string = $1; |
3276
|
|
|
|
|
|
|
|
3277
|
|
|
|
|
|
|
# The string 'error' is reserved for the special token 'error' |
3278
|
752
|
50
|
|
|
|
1883
|
$string eq "'error'" and do { |
3279
|
0
|
|
|
|
|
0
|
_SyntaxError(0,"Literal 'error' ". |
3280
|
|
|
|
|
|
|
"will be treated as error token",$lineno[0]); |
3281
|
0
|
|
|
|
|
0
|
return('IDENT',[ 'error', $lineno[0] ]); |
3282
|
|
|
|
|
|
|
}; |
3283
|
|
|
|
|
|
|
|
3284
|
752
|
|
|
|
|
1391
|
my $lines = $string =~ tr/\n//; |
3285
|
752
|
50
|
|
|
|
1751
|
_SyntaxError(2, "Constant string $string contains newlines",$lineno[0]) if $lines; |
3286
|
752
|
|
|
|
|
1359
|
$lineno[1] += $lines; |
3287
|
|
|
|
|
|
|
|
3288
|
752
|
50
|
|
|
|
1781
|
$string = chr(0) if $string eq "''"; |
3289
|
|
|
|
|
|
|
|
3290
|
752
|
|
|
|
|
3501
|
return('LITERAL',[ $string, $lineno[0] ]); |
3291
|
|
|
|
|
|
|
}; |
3292
|
|
|
|
|
|
|
|
3293
|
|
|
|
|
|
|
# New section: body or tail |
3294
|
|
|
|
|
|
|
$$input=~/\G(%%)/gc |
3295
|
2470
|
100
|
|
|
|
6377
|
and do { |
3296
|
108
|
|
|
|
|
240
|
++$lexlevel; |
3297
|
108
|
|
|
|
|
602
|
return($1, [ $1, $lineno[0] ]); |
3298
|
|
|
|
|
|
|
}; |
3299
|
|
|
|
|
|
|
|
3300
|
2362
|
100
|
|
|
|
8129
|
$$input=~/\G\s*\{/gc and return ('CODE', &slurp_perl_code()); # } |
3301
|
|
|
|
|
|
|
|
3302
|
2156
|
100
|
|
|
|
5009
|
if($lexlevel == 0) {# In head section |
3303
|
|
|
|
|
|
|
|
3304
|
751
|
100
|
|
|
|
2747
|
$$input=~/\G%(left|right|nonassoc)/gc and return('ASSOC',[ uc($1), $lineno[0] ]); |
3305
|
|
|
|
|
|
|
|
3306
|
|
|
|
|
|
|
$$input=~/\G%\{/gc |
3307
|
590
|
100
|
|
|
|
1436
|
and do { |
3308
|
34
|
|
|
|
|
82
|
my($code); |
3309
|
|
|
|
|
|
|
|
3310
|
34
|
50
|
|
|
|
221
|
$$input=~/\G(.*?)%}/sgc or _SyntaxError(2,"Unmatched %{ opened line $lineno[0]",-1); |
3311
|
|
|
|
|
|
|
|
3312
|
34
|
|
|
|
|
149
|
$code=$1; |
3313
|
34
|
|
|
|
|
131
|
$lineno[1]+= $code=~tr/\n//; |
3314
|
34
|
|
|
|
|
189
|
return('HEADCODE',[ $code, $lineno[0] ]); |
3315
|
|
|
|
|
|
|
}; |
3316
|
|
|
|
|
|
|
|
3317
|
556
|
100
|
|
|
|
1328
|
$$input=~/\G%prefix\s+([A-Za-z_][A-Za-z0-9_:]*::)/gc and return('PREFIX',[ $1, $lineno[0] ]); |
3318
|
|
|
|
|
|
|
|
3319
|
|
|
|
|
|
|
$$input=~/\G%(tree((?:\s+(?:bypass|alias)){0,2}))/gc |
3320
|
555
|
100
|
|
|
|
1376
|
and do { |
3321
|
34
|
50
|
|
|
|
204
|
my $treeoptions = defined($2)? $2 : ''; |
3322
|
34
|
|
|
|
|
177
|
return('TREE',[ $treeoptions, $lineno[0] ]) |
3323
|
|
|
|
|
|
|
}; |
3324
|
|
|
|
|
|
|
|
3325
|
521
|
100
|
|
|
|
1375
|
$$input=~/\G%(?:(semantic|syntactic|dummy)(?:\s+token)?)\b/gc and return(uc($1),[ undef, $lineno[0] ]); |
3326
|
|
|
|
|
|
|
|
3327
|
502
|
50
|
|
|
|
1190
|
$$input=~/\G%(?:(incremental)(?:\s+lexer)?)\b/gc and return(uc($1),[ undef, $lineno[0] ]); |
3328
|
|
|
|
|
|
|
|
3329
|
502
|
100
|
|
|
|
1265
|
$$input=~/\G%(lexer|defaultaction|union)\b\s*/gc and return(uc($1),[ undef, $lineno[0] ]); |
3330
|
|
|
|
|
|
|
|
3331
|
487
|
50
|
|
|
|
1350
|
$$input=~/\G([0-9]+)/gc and return('NUMBER',[ $1, $lineno[0] ]); |
3332
|
|
|
|
|
|
|
|
3333
|
487
|
50
|
|
|
|
1145
|
$$input=~/\G%expect-rr/gc and return('EXPECTRR',[ undef, $lineno[0] ]); |
3334
|
|
|
|
|
|
|
|
3335
|
487
|
50
|
|
|
|
1139
|
$$input=~/\G%(explorer)/gc and return('EXPLORER',[ undef, $lineno[0] ]); |
3336
|
|
|
|
|
|
|
|
3337
|
487
|
100
|
|
|
|
2410
|
$$input=~/\G%($ID)/gc and return($headertoken{$1},[ undef, $lineno[0] ]); |
3338
|
|
|
|
|
|
|
|
3339
|
465
|
50
|
|
|
|
3007
|
$$input=~/\G($REGEXP)/gc and return('REGEXP',[ $1, $lineno[0] ]); |
3340
|
|
|
|
|
|
|
|
3341
|
465
|
50
|
|
|
|
1596
|
$$input=~/\G::/gc and return('::',[ undef, $lineno[0] ]); |
3342
|
|
|
|
|
|
|
|
3343
|
|
|
|
|
|
|
} |
3344
|
|
|
|
|
|
|
else { # In rule section |
3345
|
|
|
|
|
|
|
|
3346
|
|
|
|
|
|
|
# like in <%name LIST_of_STH *> |
3347
|
|
|
|
|
|
|
# like in <%name LIST_of_STH +> |
3348
|
|
|
|
|
|
|
# like in <%name OPT_STH ?> |
3349
|
|
|
|
|
|
|
# returns STAR or PLUS or OPTION |
3350
|
|
|
|
|
|
|
$$input=~/\G(?:<\s*%name\s*($ID)\s*)?([*+?])\s*>/gc |
3351
|
1405
|
100
|
|
|
|
8484
|
and return($listtoken{$2},[ $1, $lineno[0] ]); |
3352
|
|
|
|
|
|
|
|
3353
|
|
|
|
|
|
|
# like in %name LIST_of_STH * |
3354
|
|
|
|
|
|
|
# like in %name LIST_of_STH + |
3355
|
|
|
|
|
|
|
# like in %name OPT_STH ? |
3356
|
|
|
|
|
|
|
# returns STAR or PLUS or OPTION |
3357
|
|
|
|
|
|
|
$$input=~/\G(?:%name\s*($ID)\s*)?([*+?])/gc |
3358
|
1400
|
100
|
|
|
|
7474
|
and return($listtoken{$2},[ $1, $lineno[0] ]); |
3359
|
|
|
|
|
|
|
|
3360
|
|
|
|
|
|
|
$$input=~/\G%no\s+bypass/gc |
3361
|
1372
|
100
|
|
|
|
4909
|
and do { |
3362
|
|
|
|
|
|
|
#my $bp = defined($1)?0:1; |
3363
|
2
|
|
|
|
|
10
|
return('NAME',[ 0, $lineno[0] ]); |
3364
|
|
|
|
|
|
|
}; |
3365
|
|
|
|
|
|
|
|
3366
|
1370
|
100
|
|
|
|
3436
|
$$input=~/\G%(prec)/gc |
3367
|
|
|
|
|
|
|
and return('PREC',[ undef, $lineno[0] ]); |
3368
|
|
|
|
|
|
|
|
3369
|
1331
|
50
|
|
|
|
3054
|
$$input=~/\G%(PREC)/gc |
3370
|
|
|
|
|
|
|
and return('DPREC',[ undef, $lineno[0] ]); |
3371
|
|
|
|
|
|
|
|
3372
|
|
|
|
|
|
|
$$input=~/\G%name/gc |
3373
|
1331
|
100
|
|
|
|
3326
|
and do { |
3374
|
|
|
|
|
|
|
# return current bypass status |
3375
|
355
|
|
|
|
|
1748
|
return('NAME',[ $bypass, $lineno[0] ]); |
3376
|
|
|
|
|
|
|
}; |
3377
|
|
|
|
|
|
|
|
3378
|
|
|
|
|
|
|
# Now label is returned in the "common" area |
3379
|
|
|
|
|
|
|
# $$input=~/\G($LABEL)/gc |
3380
|
|
|
|
|
|
|
# and return('LABEL',[ $1, $lineno[0] ]); |
3381
|
|
|
|
|
|
|
|
3382
|
976
|
100
|
|
|
|
2367
|
$$input=~/\G%begin\s*{/gc # } |
3383
|
|
|
|
|
|
|
and return ('BEGINCODE', &slurp_perl_code()); |
3384
|
|
|
|
|
|
|
|
3385
|
|
|
|
|
|
|
#********** research *************# |
3386
|
961
|
50
|
|
|
|
2925
|
$$input=~/\G%([a-zA-Z_]\w*)\?/gc |
3387
|
|
|
|
|
|
|
and return('VIEWPOINT',[ $1, $lineno[0] ]); |
3388
|
|
|
|
|
|
|
|
3389
|
|
|
|
|
|
|
|
3390
|
|
|
|
|
|
|
} |
3391
|
|
|
|
|
|
|
|
3392
|
|
|
|
|
|
|
#Always return something |
3393
|
1426
|
50
|
|
|
|
4296
|
$$input=~/\G(.)/sg |
3394
|
|
|
|
|
|
|
or die "Parse::Eyapp::Grammar::Parse: Match (.) failed: report as a BUG"; |
3395
|
|
|
|
|
|
|
|
3396
|
1426
|
|
|
|
|
3134
|
my $char = $1; |
3397
|
|
|
|
|
|
|
|
3398
|
1426
|
|
|
|
|
2817
|
$char =~ s/\cM/\n/; # dos to unix |
3399
|
|
|
|
|
|
|
|
3400
|
1426
|
100
|
|
|
|
3385
|
$char eq "\n" and ++$lineno[1]; |
3401
|
|
|
|
|
|
|
|
3402
|
1426
|
|
|
|
|
6567
|
( $char ,[ $char, $lineno[0] ]); |
3403
|
|
|
|
|
|
|
|
3404
|
|
|
|
|
|
|
} |
3405
|
|
|
|
|
|
|
|
3406
|
|
|
|
|
|
|
sub _SyntaxError { |
3407
|
0
|
|
|
0
|
|
0
|
my($level,$message,$lineno)=@_; |
3408
|
|
|
|
|
|
|
|
3409
|
0
|
0
|
|
|
|
0
|
$message= "*". |
3410
|
|
|
|
|
|
|
[ 'Warning', 'Error', 'Fatal' ]->[$level]. |
3411
|
|
|
|
|
|
|
"* $message, at ". |
3412
|
|
|
|
|
|
|
($lineno < 0 ? "eof" : "line $lineno")." at file $filename\n"; |
3413
|
|
|
|
|
|
|
|
3414
|
0
|
0
|
|
|
|
0
|
$level > 1 |
3415
|
|
|
|
|
|
|
and die $message; |
3416
|
|
|
|
|
|
|
|
3417
|
0
|
|
|
|
|
0
|
warn $message; |
3418
|
|
|
|
|
|
|
|
3419
|
0
|
0
|
|
|
|
0
|
$level > 0 |
3420
|
|
|
|
|
|
|
and ++$nberr; |
3421
|
|
|
|
|
|
|
|
3422
|
0
|
0
|
|
|
|
0
|
$nberr == 20 |
3423
|
|
|
|
|
|
|
and die "*Fatal* Too many errors detected.\n" |
3424
|
|
|
|
|
|
|
} |
3425
|
|
|
|
|
|
|
|
3426
|
|
|
|
|
|
|
# _AddRules |
3427
|
|
|
|
|
|
|
# There was a serious error I introduced between versions 171 and 172 (subversion |
3428
|
|
|
|
|
|
|
# numbers). I delayed the instruction |
3429
|
|
|
|
|
|
|
# my ($tmprule)=[ $lhs, [], splice(@$rhs,-3)]; |
3430
|
|
|
|
|
|
|
# with catastrophic consequences for the resulting |
3431
|
|
|
|
|
|
|
# LALR tables. |
3432
|
|
|
|
|
|
|
# The splice of the ($precedence, $name, $code) |
3433
|
|
|
|
|
|
|
# must be done before this line, if not the counts of nullables |
3434
|
|
|
|
|
|
|
# will no work! |
3435
|
|
|
|
|
|
|
# @$rhs |
3436
|
|
|
|
|
|
|
# or do { |
3437
|
|
|
|
|
|
|
# ++$$nullable{$lhs}; |
3438
|
|
|
|
|
|
|
# ++$epsrules; |
3439
|
|
|
|
|
|
|
# }; |
3440
|
|
|
|
|
|
|
|
3441
|
|
|
|
|
|
|
sub _AddRules { |
3442
|
215
|
|
|
215
|
|
456
|
my($lhs,$lineno)=@{$_[0]}; |
|
215
|
|
|
|
|
609
|
|
3443
|
215
|
|
|
|
|
497
|
my($rhss)=$_[1]; |
3444
|
|
|
|
|
|
|
|
3445
|
|
|
|
|
|
|
ref($$nterm{$lhs}) |
3446
|
215
|
50
|
|
|
|
715
|
and do { |
3447
|
0
|
|
|
|
|
0
|
_SyntaxError(1,"Non-terminal $lhs redefined: ". |
3448
|
|
|
|
|
|
|
"Previously declared line $$syms{$lhs}",$lineno); |
3449
|
0
|
|
|
|
|
0
|
return; |
3450
|
|
|
|
|
|
|
}; |
3451
|
|
|
|
|
|
|
|
3452
|
|
|
|
|
|
|
ref($$term{$lhs}) |
3453
|
215
|
50
|
|
|
|
726
|
and do { |
3454
|
0
|
0
|
|
|
|
0
|
my($where) = exists($$token{$lhs}) ? $$token{$lhs} : $$syms{$lhs}; |
3455
|
0
|
|
|
|
|
0
|
_SyntaxError(1,"Non-terminal $lhs previously ". |
3456
|
|
|
|
|
|
|
"declared as token line $where",$lineno); |
3457
|
0
|
|
|
|
|
0
|
return; |
3458
|
|
|
|
|
|
|
}; |
3459
|
|
|
|
|
|
|
|
3460
|
|
|
|
|
|
|
ref($$nterm{$lhs}) #declared through %type |
3461
|
215
|
50
|
|
|
|
633
|
or do { |
3462
|
215
|
|
|
|
|
573
|
$$syms{$lhs}=$lineno; #Say it's declared here |
3463
|
215
|
|
|
|
|
494
|
delete($$term{$lhs}); #No more a terminal |
3464
|
|
|
|
|
|
|
}; |
3465
|
215
|
|
|
|
|
592
|
$$nterm{$lhs}=[]; #It's a non-terminal now |
3466
|
|
|
|
|
|
|
|
3467
|
|
|
|
|
|
|
# Hal Finkel's patch: a non terminal is a semantic child |
3468
|
215
|
|
|
|
|
498
|
$$semantic{$lhs} = 1; |
3469
|
|
|
|
|
|
|
|
3470
|
215
|
|
|
|
|
432
|
my($epsrules)=0; #To issue a warning if more than one epsilon rule |
3471
|
|
|
|
|
|
|
|
3472
|
215
|
|
|
|
|
526
|
for my $rhs (@$rhss) { |
3473
|
|
|
|
|
|
|
# ($precedence, $name, $code) |
3474
|
629
|
|
|
|
|
2056
|
my ($tmprule)=[ $lhs, [], splice(@$rhs,-3)]; |
3475
|
|
|
|
|
|
|
|
3476
|
|
|
|
|
|
|
# Warning! the splice of the ($precedence, $name, $code) |
3477
|
|
|
|
|
|
|
# must be done before this line, if not the counts of nullables |
3478
|
|
|
|
|
|
|
# will no work! |
3479
|
|
|
|
|
|
|
@$rhs |
3480
|
629
|
100
|
|
|
|
1656
|
or do { |
3481
|
16
|
|
|
|
|
50
|
++$$nullable{$lhs}; |
3482
|
16
|
|
|
|
|
32
|
++$epsrules; |
3483
|
|
|
|
|
|
|
}; |
3484
|
|
|
|
|
|
|
|
3485
|
|
|
|
|
|
|
# Reserve position for current rule |
3486
|
629
|
|
|
|
|
1314
|
push(@$rules, undef); |
3487
|
629
|
|
|
|
|
1074
|
my $position = $#$rules; |
3488
|
|
|
|
|
|
|
|
3489
|
|
|
|
|
|
|
# Expand to auxiliary productions all the intermediate codes |
3490
|
629
|
|
|
|
|
1563
|
$tmprule->[1] = process_production($rhs); |
3491
|
629
|
|
|
|
|
1123
|
$$rules[$position] = $tmprule; |
3492
|
629
|
|
|
|
|
956
|
push(@{$$nterm{$lhs}},$position); |
|
629
|
|
|
|
|
1457
|
|
3493
|
|
|
|
|
|
|
} |
3494
|
|
|
|
|
|
|
|
3495
|
215
|
50
|
|
|
|
705
|
$epsrules > 1 |
3496
|
|
|
|
|
|
|
and _SyntaxError(0,"More than one empty rule for symbol $lhs",$lineno); |
3497
|
|
|
|
|
|
|
} |
3498
|
|
|
|
|
|
|
|
3499
|
|
|
|
|
|
|
# This sub is called fro Parse::Eyapp::Grammar::new |
3500
|
|
|
|
|
|
|
# 0 1 2 3 4 5 6 7 8 |
3501
|
|
|
|
|
|
|
# Args: object, input, firstline, filename, tree, nocompact, lexerisdefined, acceptinputprefix, start |
3502
|
|
|
|
|
|
|
# See the call to thsi sub 'Parse' inside sub new in module Grammar.pm |
3503
|
|
|
|
|
|
|
sub Parse { |
3504
|
54
|
|
|
54
|
0
|
199
|
my($self)=shift; |
3505
|
|
|
|
|
|
|
|
3506
|
54
|
50
|
|
|
|
843
|
@_ > 0 |
3507
|
|
|
|
|
|
|
or croak("No input grammar\n"); |
3508
|
|
|
|
|
|
|
|
3509
|
54
|
|
|
|
|
156
|
my($parsed)={}; |
3510
|
|
|
|
|
|
|
|
3511
|
54
|
|
|
|
|
162
|
$input=\$_[0]; # we did a shift for $self, one less |
3512
|
|
|
|
|
|
|
|
3513
|
54
|
|
|
|
|
125
|
$lexlevel=0; |
3514
|
54
|
|
|
|
|
218
|
my $firstline = $_[1]; |
3515
|
54
|
50
|
|
|
|
220
|
$filename = $_[2] or croak "Unknown input file"; |
3516
|
54
|
50
|
|
|
|
272
|
@lineno= $firstline? ($firstline, $firstline) : (1,1); |
3517
|
|
|
|
|
|
|
|
3518
|
54
|
|
|
|
|
140
|
$tree = $_[3]; |
3519
|
54
|
50
|
|
|
|
188
|
if ($tree) { # factorize! |
3520
|
0
|
|
|
|
|
0
|
$buildingtree = 1; |
3521
|
0
|
|
|
|
|
0
|
$bypass = 0; |
3522
|
0
|
|
|
|
|
0
|
$alias = 0; |
3523
|
0
|
|
|
|
|
0
|
$defaultaction = [ ' goto &Parse::Eyapp::Driver::YYBuildAST ', 0]; |
3524
|
0
|
|
|
|
|
0
|
$namingscheme = [ '\&give_rhs_name', 0]; |
3525
|
|
|
|
|
|
|
} |
3526
|
|
|
|
|
|
|
|
3527
|
54
|
|
|
|
|
120
|
$nocompact = $_[4]; |
3528
|
|
|
|
|
|
|
|
3529
|
54
|
|
|
|
|
119
|
$nberr=0; |
3530
|
54
|
|
|
|
|
144
|
$prec=0; |
3531
|
54
|
|
|
|
|
106
|
$labelno=0; |
3532
|
|
|
|
|
|
|
|
3533
|
54
|
|
|
|
|
123
|
$head=[]; |
3534
|
54
|
|
|
|
|
124
|
$tail=""; |
3535
|
|
|
|
|
|
|
|
3536
|
54
|
|
|
|
|
114
|
$syms={}; |
3537
|
54
|
|
|
|
|
111
|
$token={}; |
3538
|
54
|
|
|
|
|
126
|
$term={}; |
3539
|
54
|
|
|
|
|
430
|
$termdef={}; |
3540
|
54
|
|
|
|
|
117
|
$nterm={}; |
3541
|
54
|
|
|
|
|
174
|
$rules=[ undef ]; #reserve slot 0 for start rule |
3542
|
54
|
|
|
|
|
126
|
$precterm={}; |
3543
|
|
|
|
|
|
|
|
3544
|
54
|
|
|
|
|
403
|
$start=""; |
3545
|
54
|
50
|
|
|
|
179
|
$start = $_[7] if ($_[7]); |
3546
|
|
|
|
|
|
|
|
3547
|
54
|
|
|
|
|
159
|
$nullable={}; |
3548
|
54
|
|
|
|
|
116
|
$expect=0; |
3549
|
54
|
|
|
|
|
115
|
$semantic = {}; |
3550
|
54
|
|
|
|
|
106
|
$strict = 0; |
3551
|
|
|
|
|
|
|
|
3552
|
54
|
|
|
|
|
313
|
pos($$input)=0; |
3553
|
|
|
|
|
|
|
|
3554
|
|
|
|
|
|
|
|
3555
|
54
|
|
|
|
|
528
|
$self->YYParse(yylex => \&_Lexer, yyerror => \&_Error); #??? |
3556
|
|
|
|
|
|
|
|
3557
|
54
|
50
|
|
|
|
266
|
$nberr |
3558
|
|
|
|
|
|
|
and _SyntaxError(2,"Errors detected: No output",-1); |
3559
|
|
|
|
|
|
|
|
3560
|
54
|
|
|
|
|
971
|
@$parsed{ 'HEAD', 'TAIL', 'RULES', 'NTERM', 'TERM', |
3561
|
|
|
|
|
|
|
'NULL', 'PREC', 'SYMS', 'START', 'EXPECT', |
3562
|
|
|
|
|
|
|
'SEMANTIC', 'BYPASS', 'ACCESSORS', 'BUILDINGTREE', |
3563
|
|
|
|
|
|
|
'PREFIX', |
3564
|
|
|
|
|
|
|
'NAMINGSCHEME', |
3565
|
|
|
|
|
|
|
'NOCOMPACT', |
3566
|
|
|
|
|
|
|
'CONFLICTHANDLERS', |
3567
|
|
|
|
|
|
|
'TERMDEF', |
3568
|
|
|
|
|
|
|
'WHITES', |
3569
|
|
|
|
|
|
|
'LEXERISDEFINED', |
3570
|
|
|
|
|
|
|
'INCREMENTAL', |
3571
|
|
|
|
|
|
|
'STRICT', |
3572
|
|
|
|
|
|
|
'DUMMY', |
3573
|
|
|
|
|
|
|
} |
3574
|
|
|
|
|
|
|
= ( $head, $tail, $rules, $nterm, $term, |
3575
|
|
|
|
|
|
|
$nullable, $precterm, $syms, $start, $expect, |
3576
|
|
|
|
|
|
|
$semantic, $bypass, $accessors, $buildingtree, |
3577
|
|
|
|
|
|
|
$prefix, |
3578
|
|
|
|
|
|
|
$namingscheme, |
3579
|
|
|
|
|
|
|
$nocompact, |
3580
|
|
|
|
|
|
|
\%conflict, |
3581
|
|
|
|
|
|
|
$termdef, |
3582
|
|
|
|
|
|
|
$whites, |
3583
|
|
|
|
|
|
|
$lexer, |
3584
|
|
|
|
|
|
|
$incremental, |
3585
|
|
|
|
|
|
|
$strict, |
3586
|
|
|
|
|
|
|
$dummy, |
3587
|
|
|
|
|
|
|
); |
3588
|
|
|
|
|
|
|
|
3589
|
54
|
|
|
|
|
163
|
undef($input); |
3590
|
54
|
|
|
|
|
128
|
undef($lexlevel); |
3591
|
54
|
|
|
|
|
160
|
undef(@lineno); |
3592
|
54
|
|
|
|
|
144
|
undef($nberr); |
3593
|
54
|
|
|
|
|
112
|
undef($prec); |
3594
|
54
|
|
|
|
|
130
|
undef($labelno); |
3595
|
54
|
|
|
|
|
138
|
undef($incremental); |
3596
|
|
|
|
|
|
|
|
3597
|
54
|
|
|
|
|
140
|
undef($head); |
3598
|
54
|
|
|
|
|
121
|
undef($tail); |
3599
|
|
|
|
|
|
|
|
3600
|
54
|
|
|
|
|
122
|
undef($syms); |
3601
|
54
|
|
|
|
|
178
|
undef($token); |
3602
|
54
|
|
|
|
|
107
|
undef($term); |
3603
|
54
|
|
|
|
|
108
|
undef($termdef); |
3604
|
54
|
|
|
|
|
106
|
undef($whites); |
3605
|
54
|
|
|
|
|
114
|
undef($nterm); |
3606
|
54
|
|
|
|
|
114
|
undef($rules); |
3607
|
54
|
|
|
|
|
132
|
undef($precterm); |
3608
|
|
|
|
|
|
|
|
3609
|
54
|
|
|
|
|
134
|
undef($start); |
3610
|
54
|
|
|
|
|
108
|
undef($nullable); |
3611
|
54
|
|
|
|
|
116
|
undef($expect); |
3612
|
54
|
|
|
|
|
130
|
undef($defaultaction); |
3613
|
54
|
|
|
|
|
118
|
undef($semantic); |
3614
|
54
|
|
|
|
|
123
|
undef($buildingtree); |
3615
|
54
|
|
|
|
|
110
|
undef($strict); |
3616
|
|
|
|
|
|
|
|
3617
|
54
|
|
|
|
|
244
|
$parsed |
3618
|
|
|
|
|
|
|
} |
3619
|
|
|
|
|
|
|
|
3620
|
|
|
|
|
|
|
|
3621
|
|
|
|
|
|
|
|
3622
|
|
|
|
|
|
|
=for None |
3623
|
|
|
|
|
|
|
|
3624
|
|
|
|
|
|
|
=cut |
3625
|
|
|
|
|
|
|
|
3626
|
|
|
|
|
|
|
|
3627
|
|
|
|
|
|
|
################ @@@@@@@@@ End of User Code @@@@@@@@@ ################### |
3628
|
|
|
|
|
|
|
|
3629
|
|
|
|
|
|
|
|
3630
|
|
|
|
|
|
|
|
3631
|
|
|
|
|
|
|
1; |