depager 0.2.0 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +4 -0
- data/README.en +5 -10
- data/bin/depager +17 -20
- data/examples/c89/c89.tab.rb +5632 -702
- data/examples/pl0d/pl0ds.dr +41 -41
- data/examples/pl0d/pl0ds.tab.rb +1887 -874
- data/examples/sample_calc/calc.action.tab.rb +243 -69
- data/examples/sample_calc/{calc.astl.action.dr → calc.ast.action.dr} +7 -7
- data/examples/sample_calc/calc.ast.action.tab.rb +755 -0
- data/examples/sample_calc/{calc.astl.dr → calc.ast.dr} +7 -7
- data/examples/sample_calc/calc.ast.tab.rb +672 -0
- data/examples/sample_calc/calc.astdf.dr +5 -5
- data/examples/sample_calc/calc.astdf.tab.rb +405 -202
- data/examples/sample_calc/calc.atree.tab.rb +243 -69
- data/examples/sample_calc/calc.cst.tab.rb +275 -109
- data/examples/sample_calc/calc.lex.tab.rb +210 -28
- data/examples/sample_calc/calc.nvaction.tab.rb +251 -77
- data/examples/sample_calc/calc.tab.rb +210 -28
- data/examples/sample_calc/calc_prec.nvaction.tab.rb +224 -50
- data/examples/slex_test/divreg.slex.tab.rb +97 -21
- data/examples/slex_test/ljoin.slex.tab.rb +128 -35
- data/lib/depager.rb +77 -44
- data/lib/depager/{ast_base.dr → ast.dr} +56 -18
- data/lib/depager/{ast_base.rb → ast.rb} +432 -424
- data/lib/depager/astdf.rb +3 -6
- data/lib/depager/atree.rb +54 -62
- data/lib/depager/cst.dr +2 -2
- data/lib/depager/cst.rb +64 -77
- data/lib/depager/grammar.rb +225 -66
- data/lib/depager/lex.dr +1 -1
- data/lib/depager/lex.rb +45 -54
- data/lib/depager/lr.rb +181 -262
- data/lib/depager/lr_put_table.rb +116 -0
- data/lib/depager/nvaction.rb +1 -1
- data/lib/depager/parser.rb +23 -2
- data/lib/depager/slex.dr +3 -3
- data/lib/depager/slex.rb +148 -169
- data/lib/depager/srp.rb +1 -1
- data/lib/depager/template/ast.erbs +69 -0
- data/lib/depager/template/extension_lalr_master.erb +3 -3
- data/lib/depager/template/extension_lalr_slave.erb +7 -7
- data/lib/depager/template/simple.erb +4 -2
- data/lib/depager/template/single_lalr_parser.erb +30 -10
- data/lib/depager/utils.rb +10 -9
- data/lib/depager/version.rb +2 -8
- metadata +10 -11
- data/examples/sample_calc/calc.astl.action.tab.rb +0 -593
- data/examples/sample_calc/calc.astl.tab.rb +0 -501
- data/lib/depager/astl.rb +0 -14
- data/lib/depager/template/astdf.erbs +0 -57
- data/lib/depager/template/astl.erbs +0 -57
data/examples/pl0d/pl0ds.dr
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
%class PL0d
|
2
2
|
%extend Lexer ('depager/lex.rb')
|
3
|
-
%extend
|
4
|
-
%decorate @
|
3
|
+
%extend ASTBuilder ('depager/ast.rb')
|
4
|
+
%decorate @ASTBuilder
|
5
5
|
#%decorate ShiftReducePrinter ('depager/srp.rb')
|
6
6
|
%%
|
7
7
|
%LEX{
|
@@ -68,18 +68,18 @@
|
|
68
68
|
}
|
69
69
|
program(block)
|
70
70
|
{
|
71
|
-
visit(
|
71
|
+
visit($.block)
|
72
72
|
}
|
73
73
|
block(decls, stmt)
|
74
74
|
{
|
75
75
|
@env.push({})
|
76
|
-
visit(
|
77
|
-
visit(
|
76
|
+
visit($.decls)
|
77
|
+
visit($.stmt)
|
78
78
|
@env.pop
|
79
79
|
}
|
80
80
|
var_decl(-idents)
|
81
81
|
{
|
82
|
-
|
82
|
+
$.idents.to_a.each do |ident|
|
83
83
|
if @env.last[ident.value]
|
84
84
|
warn "'#{ident.value}' already exist."; exit
|
85
85
|
else
|
@@ -89,67 +89,67 @@
|
|
89
89
|
}
|
90
90
|
const_decl(const_inits)
|
91
91
|
{
|
92
|
-
visit(
|
92
|
+
visit($.const_inits)
|
93
93
|
}
|
94
94
|
const_init(-ident, -number)
|
95
95
|
{
|
96
|
-
if @env.last[
|
97
|
-
warn "'#{
|
96
|
+
if @env.last[$.ident.value]
|
97
|
+
warn "'#{$.ident.value}' already exist."; exit
|
98
98
|
else
|
99
|
-
@env.last[
|
99
|
+
@env.last[$.ident.value] = STEntry.new(:CONST, 0, $.number.value)
|
100
100
|
end
|
101
101
|
}
|
102
102
|
func_decl(-ident, -params, -block)
|
103
103
|
{
|
104
|
-
if @env[0][
|
105
|
-
warn "'#{
|
104
|
+
if @env[0][$.ident.value]
|
105
|
+
warn "'#{$.ident.value}' already exist."; exit
|
106
106
|
end
|
107
107
|
body = proc do |args|
|
108
108
|
value = 0
|
109
109
|
n = @env.size
|
110
110
|
@env.push({})
|
111
|
-
value =
|
112
|
-
@env.last['return'] = STEntry.new(:VAR, 0,
|
113
|
-
|
111
|
+
value = catch(:return) do
|
112
|
+
@env.last['return'] = STEntry.new(:VAR, 0, :return)
|
113
|
+
$.params.to_a.each_with_index do |a, x|
|
114
114
|
@env.last[a.value] = STEntry.new(:VAR, 0, args[x])
|
115
115
|
end
|
116
|
-
visit(
|
116
|
+
visit($.block)
|
117
117
|
end
|
118
118
|
@env = @env[0, n]
|
119
119
|
value
|
120
120
|
end
|
121
|
-
@env.last[
|
121
|
+
@env.last[$.ident.value] = STEntry.new(:FUNC, $.params.size, body)
|
122
122
|
}
|
123
123
|
nop_stmt(-nop)
|
124
124
|
{
|
125
125
|
}
|
126
126
|
assign_stmt(-ident, expr)
|
127
127
|
{
|
128
|
-
if ent = lookup(
|
128
|
+
if ent = lookup($.ident.value)
|
129
129
|
unless ent.kind == :VAR
|
130
|
-
warn "'#{
|
130
|
+
warn "'#{$.ident.value}' not var."; exit
|
131
131
|
end
|
132
|
-
ent.value = visit(
|
132
|
+
ent.value = visit($.expr).value
|
133
133
|
else
|
134
134
|
warn @env.pretty_inspect
|
135
|
-
warn "'#{
|
135
|
+
warn "'#{$.ident.value}' not found."; exit
|
136
136
|
end
|
137
137
|
}
|
138
138
|
begin_stmt(stmt, stmts)
|
139
139
|
{
|
140
|
-
visit(
|
141
|
-
visit(
|
140
|
+
visit($.stmt)
|
141
|
+
visit($.stmts)
|
142
142
|
}
|
143
143
|
if_stmt(cond, stmt)
|
144
144
|
{
|
145
|
-
if visit(
|
146
|
-
visit(
|
145
|
+
if visit($.cond).value != 0
|
146
|
+
visit($.stmt)
|
147
147
|
end
|
148
148
|
}
|
149
149
|
while_stmt(cond, stmt)
|
150
150
|
{
|
151
|
-
while visit(
|
152
|
-
visit(
|
151
|
+
while visit($.cond).value != 0
|
152
|
+
visit($.stmt)
|
153
153
|
end
|
154
154
|
}
|
155
155
|
return_stmt(expr)
|
@@ -159,42 +159,42 @@
|
|
159
159
|
unless ent
|
160
160
|
warn "'return' not in func."; exit
|
161
161
|
end
|
162
|
-
|
162
|
+
throw :return, visit($.expr).value
|
163
163
|
}
|
164
164
|
apply(-ident, -args)
|
165
165
|
{
|
166
166
|
ent = nil
|
167
|
-
@env.reverse_each{|s| break if ent = s[
|
167
|
+
@env.reverse_each{|s| break if ent = s[$.ident.value] }
|
168
168
|
unless ent
|
169
|
-
warn "'#{
|
169
|
+
warn "'#{$.ident.value}' not found."; exit
|
170
170
|
end
|
171
171
|
unless ent.kind == :FUNC
|
172
|
-
warn "'#{
|
172
|
+
warn "'#{$.ident.value}' not func."; exit
|
173
173
|
end
|
174
174
|
|
175
|
-
args =
|
176
|
-
# warn "#{' '*(@env.size-2)}|#{
|
175
|
+
args = $.args.to_a.map{|a| visit(a).value }
|
176
|
+
# warn "#{' '*(@env.size-2)}|#{$.ident.value} : #{args.inspect}"
|
177
177
|
unless ent.narg == args.size
|
178
178
|
warn "#{ent.narg} #{args.size} #{args.inspect}"
|
179
|
-
warn "'#{
|
179
|
+
warn "'#{$.ident.value}' unmatch args."; exit
|
180
180
|
end
|
181
|
-
|
182
|
-
# warn "#{' '*(@env.size-2)}|-> #{
|
181
|
+
$.value = ent.value.call(args)
|
182
|
+
# warn "#{' '*(@env.size-2)}|-> #{$.value} @ #{$.ident.value}"
|
183
183
|
}
|
184
184
|
refv(-ident)
|
185
185
|
{
|
186
|
-
unless ent = lookup(
|
187
|
-
warn "'#{
|
186
|
+
unless ent = lookup($.ident.value)
|
187
|
+
warn "'#{$.ident.value}' not found."; exit
|
188
188
|
end
|
189
189
|
if ent.kind == :VAR || ent.kind == :CONST
|
190
|
-
|
190
|
+
$.value = ent.value
|
191
191
|
else
|
192
|
-
warn "'#{
|
192
|
+
warn "'#{$.ident.value}' not var."; exit
|
193
193
|
end
|
194
194
|
}
|
195
195
|
number(-n)
|
196
196
|
{
|
197
|
-
|
197
|
+
$.value = $.n.value
|
198
198
|
}
|
199
199
|
%}
|
200
200
|
#begin-rule
|
data/examples/pl0d/pl0ds.tab.rb
CHANGED
@@ -3,8 +3,8 @@ begin; require 'rubygems'; rescue Exception; end
|
|
3
3
|
require 'depager/parser.rb'
|
4
4
|
|
5
5
|
|
6
|
-
module
|
7
|
-
end
|
6
|
+
module Depager::DecoratorUtils; end
|
7
|
+
module D4PL0d; end
|
8
8
|
|
9
9
|
class PL0d < Depager::LALR::Basis
|
10
10
|
|
@@ -12,19 +12,19 @@ class PL0d < Depager::LALR::Basis
|
|
12
12
|
### Reduce Table
|
13
13
|
reduce_table = [
|
14
14
|
[ -1, 1 ], # ( 0) $start : program
|
15
|
-
[ 0, 2 ], # ( 1) program : block .
|
15
|
+
[ 0, 2 ], # ( 1) program : block '.'
|
16
16
|
[ 1, 2 ], # ( 2) block : opt_decl_list statement
|
17
17
|
[ 2, 0 ], # ( 3) opt_decl_list :
|
18
18
|
[ 2, 2 ], # ( 4) opt_decl_list : opt_decl_list decl
|
19
|
-
[ 4, 3 ], # ( 5) decl : CONST const_init_list ;
|
20
|
-
[ 4, 3 ], # ( 6) decl : VAR ident_list ;
|
21
|
-
[ 4, 6 ], # ( 7) decl : FUNCTION IDENT ( ) block ;
|
22
|
-
[ 4, 7 ], # ( 8) decl : FUNCTION IDENT ( ident_list ) block ;
|
19
|
+
[ 4, 3 ], # ( 5) decl : CONST const_init_list ';'
|
20
|
+
[ 4, 3 ], # ( 6) decl : VAR ident_list ';'
|
21
|
+
[ 4, 6 ], # ( 7) decl : FUNCTION IDENT '(' ')' block ';'
|
22
|
+
[ 4, 7 ], # ( 8) decl : FUNCTION IDENT '(' ident_list ')' block ';'
|
23
23
|
[ 5, 1 ], # ( 9) const_init_list : const_init
|
24
|
-
[ 5, 3 ], # ( 10) const_init_list : const_init_list , const_init
|
24
|
+
[ 5, 3 ], # ( 10) const_init_list : const_init_list ',' const_init
|
25
25
|
[ 7, 3 ], # ( 11) const_init : IDENT EQ NUMBER
|
26
26
|
[ 6, 1 ], # ( 12) ident_list : IDENT
|
27
|
-
[ 6, 3 ], # ( 13) ident_list : ident_list , IDENT
|
27
|
+
[ 6, 3 ], # ( 13) ident_list : ident_list ',' IDENT
|
28
28
|
[ 3, 0 ], # ( 14) statement :
|
29
29
|
[ 3, 3 ], # ( 15) statement : IDENT COLOEQ expression
|
30
30
|
[ 3, 4 ], # ( 16) statement : BEGINN statement opt_state_list END
|
@@ -34,7 +34,7 @@ class PL0d < Depager::LALR::Basis
|
|
34
34
|
[ 3, 2 ], # ( 20) statement : WRITE expression
|
35
35
|
[ 3, 1 ], # ( 21) statement : WRITELN
|
36
36
|
[ 9, 0 ], # ( 22) opt_state_list :
|
37
|
-
[ 9, 3 ], # ( 23) opt_state_list : opt_state_list ; statement
|
37
|
+
[ 9, 3 ], # ( 23) opt_state_list : opt_state_list ';' statement
|
38
38
|
[ 10, 2 ], # ( 24) condition : ODD expression
|
39
39
|
[ 10, 3 ], # ( 25) condition : expression EQ expression
|
40
40
|
[ 10, 3 ], # ( 26) condition : expression NOTEQ expression
|
@@ -42,24 +42,24 @@ class PL0d < Depager::LALR::Basis
|
|
42
42
|
[ 10, 3 ], # ( 28) condition : expression GT expression
|
43
43
|
[ 10, 3 ], # ( 29) condition : expression LE expression
|
44
44
|
[ 10, 3 ], # ( 30) condition : expression GE expression
|
45
|
-
[ 8, 3 ], # ( 31) expression : expression + term
|
46
|
-
[ 8, 3 ], # ( 32) expression : expression - term
|
45
|
+
[ 8, 3 ], # ( 31) expression : expression '+' term
|
46
|
+
[ 8, 3 ], # ( 32) expression : expression '-' term
|
47
47
|
[ 8, 1 ], # ( 33) expression : term
|
48
|
-
[ 8, 2 ], # ( 34) expression : - term
|
49
|
-
[ 11, 3 ], # ( 35) term : term * factor
|
50
|
-
[ 11, 3 ], # ( 36) term : term / factor
|
48
|
+
[ 8, 2 ], # ( 34) expression : '-' term
|
49
|
+
[ 11, 3 ], # ( 35) term : term '*' factor
|
50
|
+
[ 11, 3 ], # ( 36) term : term '/' factor
|
51
51
|
[ 11, 1 ], # ( 37) term : factor
|
52
52
|
[ 12, 1 ], # ( 38) factor : IDENT
|
53
53
|
[ 12, 1 ], # ( 39) factor : NUMBER
|
54
|
-
[ 12, 3 ], # ( 40) factor : IDENT ( )
|
55
|
-
[ 12, 4 ], # ( 41) factor : IDENT ( exp_list )
|
56
|
-
[ 12, 3 ], # ( 42) factor : ( expression )
|
54
|
+
[ 12, 3 ], # ( 40) factor : IDENT '(' ')'
|
55
|
+
[ 12, 4 ], # ( 41) factor : IDENT '(' exp_list ')'
|
56
|
+
[ 12, 3 ], # ( 42) factor : '(' expression ')'
|
57
57
|
[ 13, 1 ], # ( 43) exp_list : expression
|
58
|
-
[ 13, 3 ], # ( 44) exp_list : exp_list , expression
|
58
|
+
[ 13, 3 ], # ( 44) exp_list : exp_list ',' expression
|
59
59
|
]
|
60
60
|
### Extension Params
|
61
61
|
nparams = {
|
62
|
-
'
|
62
|
+
'ASTBuilder' => 2,
|
63
63
|
}
|
64
64
|
### Term to Int
|
65
65
|
t2i = {
|
@@ -138,96 +138,96 @@ class PL0d < Depager::LALR::Basis
|
|
138
138
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
139
139
|
[ ACC, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
140
140
|
[ nil, nil, 4, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
141
|
-
[ nil, nil, nil,
|
141
|
+
[ nil, nil, nil, 14, nil, 15, 16, 6, nil, nil, nil, nil, nil, nil, 7, nil, 8, nil, 9, nil, 10, 11, 12, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
142
142
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
143
143
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
144
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
145
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
146
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
147
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
148
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
149
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
150
|
-
[ nil, nil, nil, nil, nil, nil, nil, 33, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
151
|
-
[ nil, nil, nil, nil, nil, nil, nil, 19, 21, nil, nil, nil, 17, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 18, nil, nil, nil, nil, nil, nil, 22, nil, nil, ],
|
144
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 17, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
145
|
+
[ nil, nil, nil, nil, nil, nil, nil, 6, nil, nil, nil, nil, nil, nil, 7, nil, 8, nil, 9, nil, 10, 11, 12, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
146
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
147
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 20, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
148
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
149
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
152
150
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
153
151
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
152
|
+
[ nil, nil, nil, nil, nil, nil, nil, 33, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
153
|
+
[ nil, nil, nil, nil, nil, nil, nil, 35, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
154
154
|
[ nil, nil, nil, nil, nil, nil, nil, 36, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
155
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
155
156
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
156
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
157
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
158
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
159
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
160
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
161
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 42, 43, ],
|
157
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 39, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
158
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
159
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 42, 43, 44, 45, 46, 47, 48, nil, nil, ],
|
160
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 49, 50, ],
|
161
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
162
162
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
163
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
164
|
-
[ nil, nil, nil, nil, nil, nil, nil, 19, 21, nil, nil, nil, 17, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 22, nil, nil, ],
|
165
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 53, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
166
|
-
[ nil, nil, nil, nil, 54, nil, nil, nil, nil, nil, 55, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
163
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 52, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
167
164
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
165
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
166
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 54, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
167
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
168
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
169
|
+
[ nil, nil, nil, nil, 55, nil, nil, nil, nil, nil, 56, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
168
170
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
169
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
170
|
-
[ nil, nil, nil, nil,
|
171
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 57, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
172
|
+
[ nil, nil, nil, nil, 58, nil, nil, nil, nil, nil, 59, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
171
173
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
172
|
-
[ nil, nil, nil, nil, 57, nil, nil, nil, nil, nil, 58, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
173
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 59, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
174
174
|
[ nil, nil, nil, nil, nil, nil, nil, nil, 60, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
175
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
176
|
-
[ nil, nil, nil, nil,
|
177
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
178
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
179
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
180
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
181
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
182
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
183
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
184
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
185
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
186
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
187
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
188
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
189
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
190
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
191
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
175
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
176
|
+
[ nil, nil, nil, nil, 62, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 61, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
177
|
+
[ nil, nil, nil, nil, nil, nil, nil, 6, nil, nil, nil, nil, nil, nil, 7, nil, 8, nil, 9, nil, 10, 11, 12, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
178
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
179
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
180
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
181
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
182
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
183
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
184
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
185
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
186
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
187
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
188
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
189
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 49, 50, ],
|
190
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, 74, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
191
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, 77, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
192
|
+
[ nil, nil, nil, nil, nil, nil, nil, 6, nil, nil, nil, nil, nil, nil, 7, nil, 8, nil, 9, nil, 10, 11, 12, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
193
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
194
|
+
[ nil, nil, nil, nil, nil, nil, nil, 33, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
195
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 80, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
192
196
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
193
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
194
|
-
[ nil, nil, nil, nil,
|
197
|
+
[ nil, nil, nil, nil, nil, nil, nil, 81, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
198
|
+
[ nil, nil, nil, nil, nil, nil, nil, 35, nil, 82, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
195
199
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
196
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
197
|
-
[ nil, nil, nil, nil, nil, nil, nil, 7, nil, nil, nil, nil, nil, nil, 9, nil, 13, nil, 6, nil, 10, 11, 14, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
198
|
-
[ nil, nil, nil, nil, nil, nil, nil, 33, nil, 83, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
200
|
+
[ nil, nil, nil, nil, nil, nil, nil, 6, nil, nil, nil, nil, nil, nil, 7, nil, 8, nil, 9, nil, 10, 11, 12, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
199
201
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
200
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
201
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
202
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
203
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
204
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
205
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
206
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
207
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
208
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 49, 50, ],
|
209
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 49, 50, ],
|
202
210
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
203
211
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
204
212
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
213
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, 85, 86, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
214
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
205
215
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
206
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 42, 43, ],
|
207
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 44, 46, nil, nil, ],
|
208
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 42, 43, ],
|
209
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 44, 46, nil, nil, ],
|
210
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 44, 46, nil, nil, ],
|
211
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 44, 46, nil, nil, ],
|
212
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 44, 46, nil, nil, ],
|
213
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 44, 46, nil, nil, ],
|
214
216
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
215
217
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
216
|
-
[ nil, nil, nil, nil, nil, nil, nil, 7, nil, nil, nil, nil, nil, nil, 9, nil, 13, nil, 6, nil, 10, 11, 14, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
217
218
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
218
219
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
219
220
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
220
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil,
|
221
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, 88, 59, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
221
222
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
222
223
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
223
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
224
|
+
[ nil, nil, nil, nil, nil, nil, nil, 25, 27, nil, nil, nil, 26, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 23, nil, nil, ],
|
225
|
+
[ nil, nil, nil, nil, 90, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
224
226
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
227
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 47, 48, nil, nil, ],
|
225
228
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
226
|
-
[ nil, nil, nil, nil, 91, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
227
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 44, 46, nil, nil, ],
|
228
229
|
[ nil, nil, nil, nil, 92, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
229
230
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
230
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
231
231
|
]
|
232
232
|
### Default Reduce Table
|
233
233
|
defred_table = [
|
@@ -236,9 +236,7 @@ class PL0d < Depager::LALR::Basis
|
|
236
236
|
nil,
|
237
237
|
-14,
|
238
238
|
-1,
|
239
|
-
-
|
240
|
-
nil,
|
241
|
-
nil,
|
239
|
+
-2,
|
242
240
|
nil,
|
243
241
|
-14,
|
244
242
|
nil,
|
@@ -246,33 +244,35 @@ class PL0d < Depager::LALR::Basis
|
|
246
244
|
nil,
|
247
245
|
nil,
|
248
246
|
-21,
|
249
|
-
-
|
247
|
+
-4,
|
250
248
|
nil,
|
251
|
-
-39,
|
252
249
|
nil,
|
253
|
-
-38,
|
254
250
|
nil,
|
255
251
|
nil,
|
252
|
+
-22,
|
253
|
+
nil,
|
256
254
|
nil,
|
257
|
-
-33,
|
258
|
-
-37,
|
259
255
|
nil,
|
256
|
+
-33,
|
260
257
|
nil,
|
258
|
+
-37,
|
259
|
+
-38,
|
260
|
+
-39,
|
261
261
|
nil,
|
262
262
|
nil,
|
263
|
-
-9,
|
264
|
-
-22,
|
265
263
|
-19,
|
266
264
|
-20,
|
267
|
-
-12,
|
268
265
|
nil,
|
266
|
+
-9,
|
269
267
|
nil,
|
270
268
|
nil,
|
271
|
-
-
|
269
|
+
-12,
|
270
|
+
nil,
|
271
|
+
-15,
|
272
272
|
nil,
|
273
273
|
-14,
|
274
|
+
-24,
|
274
275
|
nil,
|
275
|
-
-34,
|
276
276
|
nil,
|
277
277
|
nil,
|
278
278
|
nil,
|
@@ -282,47 +282,47 @@ class PL0d < Depager::LALR::Basis
|
|
282
282
|
nil,
|
283
283
|
nil,
|
284
284
|
nil,
|
285
|
+
-34,
|
285
286
|
nil,
|
286
|
-
-15,
|
287
287
|
nil,
|
288
|
+
-14,
|
288
289
|
-5,
|
289
290
|
nil,
|
290
291
|
nil,
|
291
292
|
-6,
|
292
293
|
nil,
|
293
|
-
-14,
|
294
|
-
nil,
|
295
|
-
-40,
|
296
294
|
nil,
|
297
|
-
-
|
298
|
-
-
|
299
|
-
-
|
300
|
-
-
|
301
|
-
-36,
|
302
|
-
-31,
|
295
|
+
-16,
|
296
|
+
-14,
|
297
|
+
-17,
|
298
|
+
-25,
|
303
299
|
-26,
|
304
|
-
-32,
|
305
300
|
-27,
|
306
301
|
-28,
|
307
302
|
-29,
|
308
|
-
-25,
|
309
303
|
-30,
|
310
|
-
-
|
304
|
+
-31,
|
305
|
+
-32,
|
306
|
+
-35,
|
307
|
+
-36,
|
308
|
+
-40,
|
309
|
+
nil,
|
310
|
+
-43,
|
311
|
+
-42,
|
312
|
+
-18,
|
311
313
|
-10,
|
312
|
-
-
|
313
|
-
-16,
|
314
|
+
-11,
|
314
315
|
-13,
|
315
|
-
-17,
|
316
|
-
nil,
|
317
316
|
-3,
|
318
|
-
-41,
|
319
317
|
nil,
|
320
318
|
-23,
|
321
|
-
-
|
319
|
+
-41,
|
322
320
|
nil,
|
323
|
-
-44,
|
324
321
|
nil,
|
322
|
+
-3,
|
323
|
+
-44,
|
325
324
|
-7,
|
325
|
+
nil,
|
326
326
|
-8,
|
327
327
|
]
|
328
328
|
defred_after_shift_table = [
|
@@ -331,20 +331,20 @@ class PL0d < Depager::LALR::Basis
|
|
331
331
|
nil,
|
332
332
|
nil,
|
333
333
|
-1,
|
334
|
-
-
|
334
|
+
-2,
|
335
335
|
nil,
|
336
336
|
nil,
|
337
337
|
nil,
|
338
338
|
nil,
|
339
339
|
nil,
|
340
340
|
nil,
|
341
|
+
-21,
|
342
|
+
-4,
|
341
343
|
nil,
|
342
344
|
nil,
|
343
|
-
-21,
|
344
|
-
-2,
|
345
345
|
nil,
|
346
|
-
-39,
|
347
346
|
nil,
|
347
|
+
-22,
|
348
348
|
nil,
|
349
349
|
nil,
|
350
350
|
nil,
|
@@ -352,11 +352,13 @@ class PL0d < Depager::LALR::Basis
|
|
352
352
|
nil,
|
353
353
|
-37,
|
354
354
|
nil,
|
355
|
+
-39,
|
356
|
+
nil,
|
357
|
+
nil,
|
355
358
|
nil,
|
356
359
|
nil,
|
357
360
|
nil,
|
358
361
|
-9,
|
359
|
-
-22,
|
360
362
|
nil,
|
361
363
|
nil,
|
362
364
|
-12,
|
@@ -379,45 +381,43 @@ class PL0d < Depager::LALR::Basis
|
|
379
381
|
nil,
|
380
382
|
nil,
|
381
383
|
nil,
|
382
|
-
nil,
|
383
384
|
-5,
|
384
385
|
nil,
|
385
386
|
nil,
|
386
387
|
-6,
|
387
388
|
nil,
|
388
389
|
nil,
|
390
|
+
-16,
|
389
391
|
nil,
|
390
|
-
-
|
392
|
+
-17,
|
391
393
|
nil,
|
392
394
|
nil,
|
393
|
-
-18,
|
394
|
-
-42,
|
395
|
-
-35,
|
396
|
-
-36,
|
397
395
|
nil,
|
398
396
|
nil,
|
399
397
|
nil,
|
400
398
|
nil,
|
401
399
|
nil,
|
402
400
|
nil,
|
401
|
+
-35,
|
402
|
+
-36,
|
403
|
+
-40,
|
403
404
|
nil,
|
404
405
|
nil,
|
405
|
-
-
|
406
|
+
-42,
|
407
|
+
-18,
|
406
408
|
-10,
|
407
|
-
|
408
|
-
-16,
|
409
|
+
-11,
|
409
410
|
-13,
|
410
|
-
-17,
|
411
|
-
nil,
|
412
411
|
-3,
|
413
|
-
-41,
|
414
412
|
nil,
|
415
413
|
-23,
|
416
|
-
-
|
414
|
+
-41,
|
417
415
|
nil,
|
418
416
|
nil,
|
417
|
+
-3,
|
419
418
|
nil,
|
420
419
|
-7,
|
420
|
+
nil,
|
421
421
|
-8,
|
422
422
|
]
|
423
423
|
### Nonterm to Int
|
@@ -459,34 +459,34 @@ class PL0d < Depager::LALR::Basis
|
|
459
459
|
[ 1, 2, 3, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
460
460
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
461
461
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
462
|
-
[ nil, nil, nil,
|
462
|
+
[ nil, nil, nil, 5, 13, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
463
463
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
464
464
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
465
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, 20, 23, 24, nil, ],
|
466
465
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
467
|
-
[ nil, nil, nil,
|
468
|
-
[ nil, nil, nil,
|
469
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
470
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
471
|
-
[ nil, nil, nil, nil, nil, nil,
|
472
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, 25, nil, 35, 23, 24, nil, ],
|
466
|
+
[ nil, nil, nil, 18, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
467
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 21, nil, 19, 22, 24, nil, ],
|
468
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 21, nil, 28, 22, 24, nil, ],
|
469
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 29, nil, nil, 22, 24, nil, ],
|
470
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 30, nil, nil, 22, 24, nil, ],
|
473
471
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
474
472
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
473
|
+
[ nil, nil, nil, nil, nil, 31, nil, 32, nil, nil, nil, nil, nil, nil, ],
|
474
|
+
[ nil, nil, nil, nil, nil, nil, 34, nil, nil, nil, nil, nil, nil, nil, ],
|
475
475
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
476
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 37, nil, nil, 22, 24, nil, ],
|
477
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, 38, nil, nil, nil, nil, ],
|
476
478
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
477
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
479
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 40, nil, nil, 22, 24, nil, ],
|
478
480
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
479
481
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
480
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
481
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 41, 24, nil, ],
|
482
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 51, 24, nil, ],
|
482
483
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
483
484
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
484
485
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
485
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
486
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 53, nil, nil, 22, 24, nil, ],
|
486
487
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
487
488
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
488
489
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
489
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, 56, nil, nil, nil, nil, ],
|
490
490
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
491
491
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
492
492
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
@@ -494,30 +494,31 @@ class PL0d < Depager::LALR::Basis
|
|
494
494
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
495
495
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
496
496
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
497
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, 63, nil, nil, 23, 24, 62, ],
|
498
|
-
[ nil, nil, nil, 64, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
499
497
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
498
|
+
[ nil, nil, nil, 63, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
500
499
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
501
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
502
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
503
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
504
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
500
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 64, nil, nil, 22, 24, nil, ],
|
501
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 65, nil, nil, 22, 24, nil, ],
|
502
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 66, nil, nil, 22, 24, nil, ],
|
503
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 67, nil, nil, 22, 24, nil, ],
|
504
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 68, nil, nil, 22, 24, nil, ],
|
505
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 69, nil, nil, 22, 24, nil, ],
|
505
506
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 70, 24, nil, ],
|
506
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
507
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
508
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil,
|
509
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, 74, nil, nil, 23, 24, nil, ],
|
510
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, 75, nil, nil, 23, 24, nil, ],
|
507
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 71, 24, nil, ],
|
508
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 72, nil, ],
|
509
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, 73, nil, ],
|
511
510
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
511
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 76, nil, nil, 22, 24, 75, ],
|
512
512
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
513
|
+
[ nil, nil, nil, 78, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
513
514
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
514
|
-
[ nil, nil, nil, nil, nil, nil, nil,
|
515
|
+
[ nil, nil, nil, nil, nil, nil, nil, 79, nil, nil, nil, nil, nil, nil, ],
|
515
516
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
516
517
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
517
518
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
518
|
-
[ nil, nil, nil,
|
519
|
-
[ nil, nil, nil, nil, nil, nil, 82, nil, nil, nil, nil, nil, nil, nil, ],
|
519
|
+
[ nil, nil, nil, nil, nil, nil, 83, nil, nil, nil, nil, nil, nil, nil, ],
|
520
520
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
521
|
+
[ nil, nil, nil, 84, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
521
522
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
522
523
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
523
524
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
@@ -534,547 +535,1558 @@ class PL0d < Depager::LALR::Basis
|
|
534
535
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
535
536
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
536
537
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
537
|
-
[ nil, nil, nil, 86, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
538
538
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
539
539
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
540
540
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
541
|
+
[ nil, 87, 3, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
541
542
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
542
|
-
[ nil, 88, 3, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
543
543
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
544
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, 89, nil, nil, 23, 24, nil, ],
|
545
544
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
546
|
-
[ nil,
|
545
|
+
[ nil, nil, nil, nil, nil, nil, nil, nil, 89, nil, nil, 22, 24, nil, ],
|
547
546
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
547
|
+
[ nil, 91, 3, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
548
548
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
549
549
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
550
550
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
551
551
|
[ nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, ],
|
552
552
|
]
|
553
553
|
|
554
|
-
Tables = [ reduce_table, nparams, action_table,
|
555
|
-
defred_table, defred_after_shift_table, goto_table,
|
556
|
-
t2i, i2t, nt2i, i2nt ]
|
557
554
|
|
558
|
-
|
559
|
-
|
555
|
+
alias orig_error error
|
556
|
+
def error
|
557
|
+
orig_error
|
558
|
+
warn "current state: #{StateInfo[@stack.last]}"
|
560
559
|
end
|
561
560
|
|
562
|
-
###
|
561
|
+
### States
|
562
|
+
StateInfo = [
|
563
|
+
<<'----------',
|
564
|
+
I000 =
|
565
|
+
( 0) $start : _ program
|
563
566
|
|
564
|
-
def lex
|
565
|
-
begin
|
566
|
-
until @line.empty?
|
567
|
-
case @line
|
568
|
-
|
569
|
-
when /\A\s+/
|
570
|
-
@oldline = @line; @line = $'
|
571
|
-
|
572
567
|
|
573
|
-
|
574
|
-
when /\A:=/
|
575
|
-
@oldline = @line; @line = $'
|
576
|
-
yield _Token(:COLOEQ, $&)
|
568
|
+
$default reduce using rule 3 (opt_decl_list) [after shift]
|
577
569
|
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
570
|
+
----------
|
571
|
+
|
572
|
+
<<'----------',
|
573
|
+
I001 =
|
574
|
+
( 0) $start : program _
|
582
575
|
|
583
|
-
|
584
|
-
when /\A<=/
|
585
|
-
@oldline = @line; @line = $'
|
586
|
-
yield _Token(:LE, $&)
|
587
576
|
|
588
|
-
|
589
|
-
when /\A>=/
|
590
|
-
@oldline = @line; @line = $'
|
591
|
-
yield _Token(:GE, $&)
|
592
577
|
|
593
|
-
|
594
|
-
when /\A=/
|
595
|
-
@oldline = @line; @line = $'
|
596
|
-
yield _Token(:EQ, $&)
|
578
|
+
$end accept
|
597
579
|
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
580
|
+
----------
|
581
|
+
|
582
|
+
<<'----------',
|
583
|
+
I002 =
|
584
|
+
( 1) program : block _ '.'
|
602
585
|
|
603
|
-
|
604
|
-
when /\A>/
|
605
|
-
@oldline = @line; @line = $'
|
606
|
-
yield _Token(:GT, $&)
|
586
|
+
'.' shift, and goto to state 4
|
607
587
|
|
608
|
-
|
609
|
-
when /\Aconst/
|
610
|
-
@oldline = @line; @line = $'
|
611
|
-
yield _Token(:CONST, $&)
|
612
588
|
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
589
|
+
----------
|
590
|
+
|
591
|
+
<<'----------',
|
592
|
+
I003 =
|
593
|
+
( 2) block : opt_decl_list _ statement
|
594
|
+
( 4) opt_decl_list : opt_decl_list _ decl
|
595
|
+
|
596
|
+
CONST shift, and goto to state 14
|
597
|
+
VAR shift, and goto to state 15
|
598
|
+
FUNCTION shift, and goto to state 16
|
599
|
+
IDENT shift, and goto to state 6
|
600
|
+
BEGINN shift, and goto to state 7
|
601
|
+
IF shift, and goto to state 8
|
602
|
+
WHILE shift, and goto to state 9
|
603
|
+
RETURN shift, and goto to state 10
|
604
|
+
WRITE shift, and goto to state 11
|
605
|
+
WRITELN shift, and goto to state 12
|
606
|
+
|
607
|
+
$default reduce using rule 14 (statement)
|
608
|
+
|
609
|
+
----------
|
610
|
+
|
611
|
+
<<'----------',
|
612
|
+
I004 =
|
613
|
+
( 1) program : block '.' _
|
617
614
|
|
618
|
-
|
619
|
-
when /\Afunction/
|
620
|
-
@oldline = @line; @line = $'
|
621
|
-
yield _Token(:FUNCTION, $&)
|
622
615
|
|
623
|
-
|
624
|
-
when /\Abegin/
|
625
|
-
@oldline = @line; @line = $'
|
626
|
-
yield _Token(:BEGINN, $&)
|
616
|
+
$default reduce using rule 1 (program) [after shift]
|
627
617
|
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
618
|
+
----------
|
619
|
+
|
620
|
+
<<'----------',
|
621
|
+
I005 =
|
622
|
+
( 2) block : opt_decl_list statement _
|
632
623
|
|
633
|
-
|
634
|
-
when /\Aif/
|
635
|
-
@oldline = @line; @line = $'
|
636
|
-
yield _Token(:IF, $&)
|
637
624
|
|
638
|
-
|
639
|
-
when /\Athen/
|
640
|
-
@oldline = @line; @line = $'
|
641
|
-
yield _Token(:THEN, $&)
|
625
|
+
$default reduce using rule 2 (block) [after shift]
|
642
626
|
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
627
|
+
----------
|
628
|
+
|
629
|
+
<<'----------',
|
630
|
+
I006 =
|
631
|
+
( 15) statement : IDENT _ COLOEQ expression
|
647
632
|
|
648
|
-
|
649
|
-
when /\Ado/
|
650
|
-
@oldline = @line; @line = $'
|
651
|
-
yield _Token(:DO, $&)
|
633
|
+
COLOEQ shift, and goto to state 17
|
652
634
|
|
653
|
-
|
654
|
-
when /\Areturn/
|
655
|
-
@oldline = @line; @line = $'
|
656
|
-
yield _Token(:RETURN, $&)
|
657
635
|
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
636
|
+
----------
|
637
|
+
|
638
|
+
<<'----------',
|
639
|
+
I007 =
|
640
|
+
( 16) statement : BEGINN _ statement opt_state_list END
|
662
641
|
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
642
|
+
IDENT shift, and goto to state 6
|
643
|
+
BEGINN shift, and goto to state 7
|
644
|
+
IF shift, and goto to state 8
|
645
|
+
WHILE shift, and goto to state 9
|
646
|
+
RETURN shift, and goto to state 10
|
647
|
+
WRITE shift, and goto to state 11
|
648
|
+
WRITELN shift, and goto to state 12
|
667
649
|
|
668
|
-
|
669
|
-
when /\Aodd/
|
670
|
-
@oldline = @line; @line = $'
|
671
|
-
yield _Token(:ODD, $&)
|
650
|
+
$default reduce using rule 14 (statement)
|
672
651
|
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
652
|
+
----------
|
653
|
+
|
654
|
+
<<'----------',
|
655
|
+
I008 =
|
656
|
+
( 17) statement : IF _ condition THEN statement
|
677
657
|
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
658
|
+
IDENT shift, and goto to state 25
|
659
|
+
'(' shift, and goto to state 27
|
660
|
+
NUMBER shift, and goto to state 26
|
661
|
+
ODD shift, and goto to state 20
|
662
|
+
'-' shift, and goto to state 23
|
682
663
|
|
683
|
-
|
684
|
-
when /\A./
|
685
|
-
@oldline = @line; @line = $'
|
686
|
-
yield _Token($&, $&)
|
687
664
|
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
end while @line0 = @line = getline
|
694
|
-
yield nil, nil
|
695
|
-
end
|
696
|
-
|
697
|
-
end
|
665
|
+
----------
|
666
|
+
|
667
|
+
<<'----------',
|
668
|
+
I009 =
|
669
|
+
( 18) statement : WHILE _ condition DO statement
|
698
670
|
|
699
|
-
|
671
|
+
IDENT shift, and goto to state 25
|
672
|
+
'(' shift, and goto to state 27
|
673
|
+
NUMBER shift, and goto to state 26
|
674
|
+
ODD shift, and goto to state 20
|
675
|
+
'-' shift, and goto to state 23
|
700
676
|
|
701
|
-
class Node
|
702
|
-
attr_accessor :lineno
|
703
|
-
attr_accessor :value
|
704
|
-
|
705
|
-
def initialize
|
706
|
-
@value = nil
|
707
677
|
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
def self.[] lineno, *args
|
714
|
-
self.new lineno, *args
|
715
|
-
end
|
716
|
-
def accept v
|
717
|
-
end
|
718
|
-
end
|
719
|
-
require 'forwardable'
|
720
|
-
class NodeList < Node
|
721
|
-
attr_accessor :lineno
|
722
|
-
extend Forwardable
|
723
|
-
_methods = Array.instance_methods -
|
724
|
-
Object.instance_methods -
|
725
|
-
['push', 'concat', 'to_ary', 'map']
|
726
|
-
def_delegators(:@lst, *_methods)
|
727
|
-
def initialize(lineno, lst=[])
|
728
|
-
@lineno = lineno
|
729
|
-
@lst = lst.to_a
|
730
|
-
end
|
731
|
-
|
732
|
-
def value
|
733
|
-
@lst.map{|i| "i.value"}
|
734
|
-
end
|
735
|
-
|
736
|
-
def push(i) @lst.push i; self; end
|
737
|
-
def concat(i) @lst.concat i; self; end
|
738
|
-
def map(&b) @lst.map(&b); end
|
739
|
-
def to_ary() @lst; end
|
740
|
-
def accept(v)
|
741
|
-
@lst.each{|i| i.accept(v) }
|
742
|
-
end
|
743
|
-
end
|
678
|
+
----------
|
679
|
+
|
680
|
+
<<'----------',
|
681
|
+
I010 =
|
682
|
+
( 19) statement : RETURN _ expression
|
744
683
|
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
super()
|
750
|
-
@lineno = lineno
|
751
|
-
@lineno = lineno
|
752
|
-
@block = block
|
684
|
+
IDENT shift, and goto to state 25
|
685
|
+
'(' shift, and goto to state 27
|
686
|
+
NUMBER shift, and goto to state 26
|
687
|
+
'-' shift, and goto to state 23
|
753
688
|
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
689
|
+
|
690
|
+
----------
|
691
|
+
|
692
|
+
<<'----------',
|
693
|
+
I011 =
|
694
|
+
( 20) statement : WRITE _ expression
|
695
|
+
|
696
|
+
IDENT shift, and goto to state 25
|
697
|
+
'(' shift, and goto to state 27
|
698
|
+
NUMBER shift, and goto to state 26
|
699
|
+
'-' shift, and goto to state 23
|
700
|
+
|
701
|
+
|
702
|
+
----------
|
703
|
+
|
704
|
+
<<'----------',
|
705
|
+
I012 =
|
706
|
+
( 21) statement : WRITELN _
|
707
|
+
|
708
|
+
|
709
|
+
$default reduce using rule 21 (statement) [after shift]
|
710
|
+
|
711
|
+
----------
|
712
|
+
|
713
|
+
<<'----------',
|
714
|
+
I013 =
|
715
|
+
( 4) opt_decl_list : opt_decl_list decl _
|
716
|
+
|
717
|
+
|
718
|
+
$default reduce using rule 4 (opt_decl_list) [after shift]
|
719
|
+
|
720
|
+
----------
|
721
|
+
|
722
|
+
<<'----------',
|
723
|
+
I014 =
|
724
|
+
( 5) decl : CONST _ const_init_list ';'
|
725
|
+
|
726
|
+
IDENT shift, and goto to state 33
|
727
|
+
|
728
|
+
|
729
|
+
----------
|
730
|
+
|
731
|
+
<<'----------',
|
732
|
+
I015 =
|
733
|
+
( 6) decl : VAR _ ident_list ';'
|
734
|
+
|
735
|
+
IDENT shift, and goto to state 35
|
736
|
+
|
737
|
+
|
738
|
+
----------
|
739
|
+
|
740
|
+
<<'----------',
|
741
|
+
I016 =
|
742
|
+
( 7) decl : FUNCTION _ IDENT '(' ')' block ';'
|
743
|
+
( 8) decl : FUNCTION _ IDENT '(' ident_list ')' block ';'
|
744
|
+
|
745
|
+
IDENT shift, and goto to state 36
|
746
|
+
|
747
|
+
|
748
|
+
----------
|
749
|
+
|
750
|
+
<<'----------',
|
751
|
+
I017 =
|
752
|
+
( 15) statement : IDENT COLOEQ _ expression
|
753
|
+
|
754
|
+
IDENT shift, and goto to state 25
|
755
|
+
'(' shift, and goto to state 27
|
756
|
+
NUMBER shift, and goto to state 26
|
757
|
+
'-' shift, and goto to state 23
|
758
|
+
|
759
|
+
|
760
|
+
----------
|
761
|
+
|
762
|
+
<<'----------',
|
763
|
+
I018 =
|
764
|
+
( 16) statement : BEGINN statement _ opt_state_list END
|
765
|
+
|
766
|
+
|
767
|
+
$default reduce using rule 22 (opt_state_list) [after shift]
|
768
|
+
|
769
|
+
----------
|
770
|
+
|
771
|
+
<<'----------',
|
772
|
+
I019 =
|
773
|
+
( 17) statement : IF condition _ THEN statement
|
774
|
+
|
775
|
+
THEN shift, and goto to state 39
|
776
|
+
|
777
|
+
|
778
|
+
----------
|
779
|
+
|
780
|
+
<<'----------',
|
781
|
+
I020 =
|
782
|
+
( 24) condition : ODD _ expression
|
783
|
+
|
784
|
+
IDENT shift, and goto to state 25
|
785
|
+
'(' shift, and goto to state 27
|
786
|
+
NUMBER shift, and goto to state 26
|
787
|
+
'-' shift, and goto to state 23
|
788
|
+
|
789
|
+
|
790
|
+
----------
|
791
|
+
|
792
|
+
<<'----------',
|
793
|
+
I021 =
|
794
|
+
( 25) condition : expression _ EQ expression
|
795
|
+
( 26) condition : expression _ NOTEQ expression
|
796
|
+
( 27) condition : expression _ LT expression
|
797
|
+
( 28) condition : expression _ GT expression
|
798
|
+
( 29) condition : expression _ LE expression
|
799
|
+
( 30) condition : expression _ GE expression
|
800
|
+
( 31) expression : expression _ '+' term
|
801
|
+
( 32) expression : expression _ '-' term
|
802
|
+
|
803
|
+
EQ shift, and goto to state 41
|
804
|
+
NOTEQ shift, and goto to state 42
|
805
|
+
LT shift, and goto to state 43
|
806
|
+
GT shift, and goto to state 44
|
807
|
+
LE shift, and goto to state 45
|
808
|
+
GE shift, and goto to state 46
|
809
|
+
'+' shift, and goto to state 47
|
810
|
+
'-' shift, and goto to state 48
|
811
|
+
|
812
|
+
|
813
|
+
----------
|
814
|
+
|
815
|
+
<<'----------',
|
816
|
+
I022 =
|
817
|
+
( 33) expression : term _
|
818
|
+
( 35) term : term _ '*' factor
|
819
|
+
( 36) term : term _ '/' factor
|
820
|
+
|
821
|
+
'*' shift, and goto to state 49
|
822
|
+
'/' shift, and goto to state 50
|
823
|
+
|
824
|
+
$default reduce using rule 33 (expression)
|
825
|
+
|
826
|
+
----------
|
827
|
+
|
828
|
+
<<'----------',
|
829
|
+
I023 =
|
830
|
+
( 34) expression : '-' _ term
|
831
|
+
|
832
|
+
IDENT shift, and goto to state 25
|
833
|
+
'(' shift, and goto to state 27
|
834
|
+
NUMBER shift, and goto to state 26
|
835
|
+
|
836
|
+
|
837
|
+
----------
|
838
|
+
|
839
|
+
<<'----------',
|
840
|
+
I024 =
|
841
|
+
( 37) term : factor _
|
842
|
+
|
843
|
+
|
844
|
+
$default reduce using rule 37 (term) [after shift]
|
845
|
+
|
846
|
+
----------
|
847
|
+
|
848
|
+
<<'----------',
|
849
|
+
I025 =
|
850
|
+
( 38) factor : IDENT _
|
851
|
+
( 40) factor : IDENT _ '(' ')'
|
852
|
+
( 41) factor : IDENT _ '(' exp_list ')'
|
853
|
+
|
854
|
+
'(' shift, and goto to state 52
|
855
|
+
|
856
|
+
$default reduce using rule 38 (factor)
|
857
|
+
|
858
|
+
----------
|
859
|
+
|
860
|
+
<<'----------',
|
861
|
+
I026 =
|
862
|
+
( 39) factor : NUMBER _
|
863
|
+
|
864
|
+
|
865
|
+
$default reduce using rule 39 (factor) [after shift]
|
866
|
+
|
867
|
+
----------
|
868
|
+
|
869
|
+
<<'----------',
|
870
|
+
I027 =
|
871
|
+
( 42) factor : '(' _ expression ')'
|
872
|
+
|
873
|
+
IDENT shift, and goto to state 25
|
874
|
+
'(' shift, and goto to state 27
|
875
|
+
NUMBER shift, and goto to state 26
|
876
|
+
'-' shift, and goto to state 23
|
877
|
+
|
878
|
+
|
879
|
+
----------
|
880
|
+
|
881
|
+
<<'----------',
|
882
|
+
I028 =
|
883
|
+
( 18) statement : WHILE condition _ DO statement
|
884
|
+
|
885
|
+
DO shift, and goto to state 54
|
886
|
+
|
887
|
+
|
888
|
+
----------
|
889
|
+
|
890
|
+
<<'----------',
|
891
|
+
I029 =
|
892
|
+
( 19) statement : RETURN expression _
|
893
|
+
( 31) expression : expression _ '+' term
|
894
|
+
( 32) expression : expression _ '-' term
|
895
|
+
|
896
|
+
'+' shift, and goto to state 47
|
897
|
+
'-' shift, and goto to state 48
|
898
|
+
|
899
|
+
$default reduce using rule 19 (statement)
|
900
|
+
|
901
|
+
----------
|
902
|
+
|
903
|
+
<<'----------',
|
904
|
+
I030 =
|
905
|
+
( 20) statement : WRITE expression _
|
906
|
+
( 31) expression : expression _ '+' term
|
907
|
+
( 32) expression : expression _ '-' term
|
908
|
+
|
909
|
+
'+' shift, and goto to state 47
|
910
|
+
'-' shift, and goto to state 48
|
911
|
+
|
912
|
+
$default reduce using rule 20 (statement)
|
913
|
+
|
914
|
+
----------
|
915
|
+
|
916
|
+
<<'----------',
|
917
|
+
I031 =
|
918
|
+
( 5) decl : CONST const_init_list _ ';'
|
919
|
+
( 10) const_init_list : const_init_list _ ',' const_init
|
920
|
+
|
921
|
+
';' shift, and goto to state 55
|
922
|
+
',' shift, and goto to state 56
|
923
|
+
|
924
|
+
|
925
|
+
----------
|
926
|
+
|
927
|
+
<<'----------',
|
928
|
+
I032 =
|
929
|
+
( 9) const_init_list : const_init _
|
930
|
+
|
931
|
+
|
932
|
+
$default reduce using rule 9 (const_init_list) [after shift]
|
933
|
+
|
934
|
+
----------
|
935
|
+
|
936
|
+
<<'----------',
|
937
|
+
I033 =
|
938
|
+
( 11) const_init : IDENT _ EQ NUMBER
|
939
|
+
|
940
|
+
EQ shift, and goto to state 57
|
941
|
+
|
942
|
+
|
943
|
+
----------
|
944
|
+
|
945
|
+
<<'----------',
|
946
|
+
I034 =
|
947
|
+
( 6) decl : VAR ident_list _ ';'
|
948
|
+
( 13) ident_list : ident_list _ ',' IDENT
|
949
|
+
|
950
|
+
';' shift, and goto to state 58
|
951
|
+
',' shift, and goto to state 59
|
952
|
+
|
953
|
+
|
954
|
+
----------
|
955
|
+
|
956
|
+
<<'----------',
|
957
|
+
I035 =
|
958
|
+
( 12) ident_list : IDENT _
|
959
|
+
|
960
|
+
|
961
|
+
$default reduce using rule 12 (ident_list) [after shift]
|
962
|
+
|
963
|
+
----------
|
964
|
+
|
965
|
+
<<'----------',
|
966
|
+
I036 =
|
967
|
+
( 7) decl : FUNCTION IDENT _ '(' ')' block ';'
|
968
|
+
( 8) decl : FUNCTION IDENT _ '(' ident_list ')' block ';'
|
969
|
+
|
970
|
+
'(' shift, and goto to state 60
|
971
|
+
|
972
|
+
|
973
|
+
----------
|
974
|
+
|
975
|
+
<<'----------',
|
976
|
+
I037 =
|
977
|
+
( 15) statement : IDENT COLOEQ expression _
|
978
|
+
( 31) expression : expression _ '+' term
|
979
|
+
( 32) expression : expression _ '-' term
|
980
|
+
|
981
|
+
'+' shift, and goto to state 47
|
982
|
+
'-' shift, and goto to state 48
|
983
|
+
|
984
|
+
$default reduce using rule 15 (statement)
|
985
|
+
|
986
|
+
----------
|
987
|
+
|
988
|
+
<<'----------',
|
989
|
+
I038 =
|
990
|
+
( 16) statement : BEGINN statement opt_state_list _ END
|
991
|
+
( 23) opt_state_list : opt_state_list _ ';' statement
|
992
|
+
|
993
|
+
';' shift, and goto to state 62
|
994
|
+
END shift, and goto to state 61
|
995
|
+
|
996
|
+
|
997
|
+
----------
|
998
|
+
|
999
|
+
<<'----------',
|
1000
|
+
I039 =
|
1001
|
+
( 17) statement : IF condition THEN _ statement
|
1002
|
+
|
1003
|
+
IDENT shift, and goto to state 6
|
1004
|
+
BEGINN shift, and goto to state 7
|
1005
|
+
IF shift, and goto to state 8
|
1006
|
+
WHILE shift, and goto to state 9
|
1007
|
+
RETURN shift, and goto to state 10
|
1008
|
+
WRITE shift, and goto to state 11
|
1009
|
+
WRITELN shift, and goto to state 12
|
1010
|
+
|
1011
|
+
$default reduce using rule 14 (statement)
|
1012
|
+
|
1013
|
+
----------
|
1014
|
+
|
1015
|
+
<<'----------',
|
1016
|
+
I040 =
|
1017
|
+
( 24) condition : ODD expression _
|
1018
|
+
( 31) expression : expression _ '+' term
|
1019
|
+
( 32) expression : expression _ '-' term
|
1020
|
+
|
1021
|
+
'+' shift, and goto to state 47
|
1022
|
+
'-' shift, and goto to state 48
|
1023
|
+
|
1024
|
+
$default reduce using rule 24 (condition)
|
1025
|
+
|
1026
|
+
----------
|
1027
|
+
|
1028
|
+
<<'----------',
|
1029
|
+
I041 =
|
1030
|
+
( 25) condition : expression EQ _ expression
|
1031
|
+
|
1032
|
+
IDENT shift, and goto to state 25
|
1033
|
+
'(' shift, and goto to state 27
|
1034
|
+
NUMBER shift, and goto to state 26
|
1035
|
+
'-' shift, and goto to state 23
|
1036
|
+
|
1037
|
+
|
1038
|
+
----------
|
1039
|
+
|
1040
|
+
<<'----------',
|
1041
|
+
I042 =
|
1042
|
+
( 26) condition : expression NOTEQ _ expression
|
1043
|
+
|
1044
|
+
IDENT shift, and goto to state 25
|
1045
|
+
'(' shift, and goto to state 27
|
1046
|
+
NUMBER shift, and goto to state 26
|
1047
|
+
'-' shift, and goto to state 23
|
1048
|
+
|
1049
|
+
|
1050
|
+
----------
|
1051
|
+
|
1052
|
+
<<'----------',
|
1053
|
+
I043 =
|
1054
|
+
( 27) condition : expression LT _ expression
|
1055
|
+
|
1056
|
+
IDENT shift, and goto to state 25
|
1057
|
+
'(' shift, and goto to state 27
|
1058
|
+
NUMBER shift, and goto to state 26
|
1059
|
+
'-' shift, and goto to state 23
|
1060
|
+
|
1061
|
+
|
1062
|
+
----------
|
1063
|
+
|
1064
|
+
<<'----------',
|
1065
|
+
I044 =
|
1066
|
+
( 28) condition : expression GT _ expression
|
1067
|
+
|
1068
|
+
IDENT shift, and goto to state 25
|
1069
|
+
'(' shift, and goto to state 27
|
1070
|
+
NUMBER shift, and goto to state 26
|
1071
|
+
'-' shift, and goto to state 23
|
1072
|
+
|
1073
|
+
|
1074
|
+
----------
|
1075
|
+
|
1076
|
+
<<'----------',
|
1077
|
+
I045 =
|
1078
|
+
( 29) condition : expression LE _ expression
|
1079
|
+
|
1080
|
+
IDENT shift, and goto to state 25
|
1081
|
+
'(' shift, and goto to state 27
|
1082
|
+
NUMBER shift, and goto to state 26
|
1083
|
+
'-' shift, and goto to state 23
|
1084
|
+
|
1085
|
+
|
1086
|
+
----------
|
1087
|
+
|
1088
|
+
<<'----------',
|
1089
|
+
I046 =
|
1090
|
+
( 30) condition : expression GE _ expression
|
1091
|
+
|
1092
|
+
IDENT shift, and goto to state 25
|
1093
|
+
'(' shift, and goto to state 27
|
1094
|
+
NUMBER shift, and goto to state 26
|
1095
|
+
'-' shift, and goto to state 23
|
1096
|
+
|
1097
|
+
|
1098
|
+
----------
|
1099
|
+
|
1100
|
+
<<'----------',
|
1101
|
+
I047 =
|
1102
|
+
( 31) expression : expression '+' _ term
|
1103
|
+
|
1104
|
+
IDENT shift, and goto to state 25
|
1105
|
+
'(' shift, and goto to state 27
|
1106
|
+
NUMBER shift, and goto to state 26
|
1107
|
+
|
1108
|
+
|
1109
|
+
----------
|
1110
|
+
|
1111
|
+
<<'----------',
|
1112
|
+
I048 =
|
1113
|
+
( 32) expression : expression '-' _ term
|
1114
|
+
|
1115
|
+
IDENT shift, and goto to state 25
|
1116
|
+
'(' shift, and goto to state 27
|
1117
|
+
NUMBER shift, and goto to state 26
|
1118
|
+
|
1119
|
+
|
1120
|
+
----------
|
1121
|
+
|
1122
|
+
<<'----------',
|
1123
|
+
I049 =
|
1124
|
+
( 35) term : term '*' _ factor
|
1125
|
+
|
1126
|
+
IDENT shift, and goto to state 25
|
1127
|
+
'(' shift, and goto to state 27
|
1128
|
+
NUMBER shift, and goto to state 26
|
1129
|
+
|
1130
|
+
|
1131
|
+
----------
|
1132
|
+
|
1133
|
+
<<'----------',
|
1134
|
+
I050 =
|
1135
|
+
( 36) term : term '/' _ factor
|
1136
|
+
|
1137
|
+
IDENT shift, and goto to state 25
|
1138
|
+
'(' shift, and goto to state 27
|
1139
|
+
NUMBER shift, and goto to state 26
|
1140
|
+
|
1141
|
+
|
1142
|
+
----------
|
1143
|
+
|
1144
|
+
<<'----------',
|
1145
|
+
I051 =
|
1146
|
+
( 34) expression : '-' term _
|
1147
|
+
( 35) term : term _ '*' factor
|
1148
|
+
( 36) term : term _ '/' factor
|
1149
|
+
|
1150
|
+
'*' shift, and goto to state 49
|
1151
|
+
'/' shift, and goto to state 50
|
1152
|
+
|
1153
|
+
$default reduce using rule 34 (expression)
|
1154
|
+
|
1155
|
+
----------
|
1156
|
+
|
1157
|
+
<<'----------',
|
1158
|
+
I052 =
|
1159
|
+
( 40) factor : IDENT '(' _ ')'
|
1160
|
+
( 41) factor : IDENT '(' _ exp_list ')'
|
1161
|
+
|
1162
|
+
IDENT shift, and goto to state 25
|
1163
|
+
'(' shift, and goto to state 27
|
1164
|
+
')' shift, and goto to state 74
|
1165
|
+
NUMBER shift, and goto to state 26
|
1166
|
+
'-' shift, and goto to state 23
|
1167
|
+
|
1168
|
+
|
1169
|
+
----------
|
1170
|
+
|
1171
|
+
<<'----------',
|
1172
|
+
I053 =
|
1173
|
+
( 42) factor : '(' expression _ ')'
|
1174
|
+
( 31) expression : expression _ '+' term
|
1175
|
+
( 32) expression : expression _ '-' term
|
1176
|
+
|
1177
|
+
')' shift, and goto to state 77
|
1178
|
+
'+' shift, and goto to state 47
|
1179
|
+
'-' shift, and goto to state 48
|
1180
|
+
|
1181
|
+
|
1182
|
+
----------
|
1183
|
+
|
1184
|
+
<<'----------',
|
1185
|
+
I054 =
|
1186
|
+
( 18) statement : WHILE condition DO _ statement
|
1187
|
+
|
1188
|
+
IDENT shift, and goto to state 6
|
1189
|
+
BEGINN shift, and goto to state 7
|
1190
|
+
IF shift, and goto to state 8
|
1191
|
+
WHILE shift, and goto to state 9
|
1192
|
+
RETURN shift, and goto to state 10
|
1193
|
+
WRITE shift, and goto to state 11
|
1194
|
+
WRITELN shift, and goto to state 12
|
1195
|
+
|
1196
|
+
$default reduce using rule 14 (statement)
|
1197
|
+
|
1198
|
+
----------
|
1199
|
+
|
1200
|
+
<<'----------',
|
1201
|
+
I055 =
|
1202
|
+
( 5) decl : CONST const_init_list ';' _
|
1203
|
+
|
1204
|
+
|
1205
|
+
$default reduce using rule 5 (decl) [after shift]
|
1206
|
+
|
1207
|
+
----------
|
1208
|
+
|
1209
|
+
<<'----------',
|
1210
|
+
I056 =
|
1211
|
+
( 10) const_init_list : const_init_list ',' _ const_init
|
1212
|
+
|
1213
|
+
IDENT shift, and goto to state 33
|
1214
|
+
|
1215
|
+
|
1216
|
+
----------
|
1217
|
+
|
1218
|
+
<<'----------',
|
1219
|
+
I057 =
|
1220
|
+
( 11) const_init : IDENT EQ _ NUMBER
|
1221
|
+
|
1222
|
+
NUMBER shift, and goto to state 80
|
1223
|
+
|
1224
|
+
|
1225
|
+
----------
|
1226
|
+
|
1227
|
+
<<'----------',
|
1228
|
+
I058 =
|
1229
|
+
( 6) decl : VAR ident_list ';' _
|
1230
|
+
|
1231
|
+
|
1232
|
+
$default reduce using rule 6 (decl) [after shift]
|
1233
|
+
|
1234
|
+
----------
|
1235
|
+
|
1236
|
+
<<'----------',
|
1237
|
+
I059 =
|
1238
|
+
( 13) ident_list : ident_list ',' _ IDENT
|
1239
|
+
|
1240
|
+
IDENT shift, and goto to state 81
|
1241
|
+
|
1242
|
+
|
1243
|
+
----------
|
1244
|
+
|
1245
|
+
<<'----------',
|
1246
|
+
I060 =
|
1247
|
+
( 7) decl : FUNCTION IDENT '(' _ ')' block ';'
|
1248
|
+
( 8) decl : FUNCTION IDENT '(' _ ident_list ')' block ';'
|
1249
|
+
|
1250
|
+
IDENT shift, and goto to state 35
|
1251
|
+
')' shift, and goto to state 82
|
1252
|
+
|
1253
|
+
|
1254
|
+
----------
|
1255
|
+
|
1256
|
+
<<'----------',
|
1257
|
+
I061 =
|
1258
|
+
( 16) statement : BEGINN statement opt_state_list END _
|
1259
|
+
|
1260
|
+
|
1261
|
+
$default reduce using rule 16 (statement) [after shift]
|
1262
|
+
|
1263
|
+
----------
|
1264
|
+
|
1265
|
+
<<'----------',
|
1266
|
+
I062 =
|
1267
|
+
( 23) opt_state_list : opt_state_list ';' _ statement
|
1268
|
+
|
1269
|
+
IDENT shift, and goto to state 6
|
1270
|
+
BEGINN shift, and goto to state 7
|
1271
|
+
IF shift, and goto to state 8
|
1272
|
+
WHILE shift, and goto to state 9
|
1273
|
+
RETURN shift, and goto to state 10
|
1274
|
+
WRITE shift, and goto to state 11
|
1275
|
+
WRITELN shift, and goto to state 12
|
1276
|
+
|
1277
|
+
$default reduce using rule 14 (statement)
|
1278
|
+
|
1279
|
+
----------
|
1280
|
+
|
1281
|
+
<<'----------',
|
1282
|
+
I063 =
|
1283
|
+
( 17) statement : IF condition THEN statement _
|
1284
|
+
|
1285
|
+
|
1286
|
+
$default reduce using rule 17 (statement) [after shift]
|
1287
|
+
|
1288
|
+
----------
|
1289
|
+
|
1290
|
+
<<'----------',
|
1291
|
+
I064 =
|
1292
|
+
( 25) condition : expression EQ expression _
|
1293
|
+
( 31) expression : expression _ '+' term
|
1294
|
+
( 32) expression : expression _ '-' term
|
1295
|
+
|
1296
|
+
'+' shift, and goto to state 47
|
1297
|
+
'-' shift, and goto to state 48
|
1298
|
+
|
1299
|
+
$default reduce using rule 25 (condition)
|
1300
|
+
|
1301
|
+
----------
|
1302
|
+
|
1303
|
+
<<'----------',
|
1304
|
+
I065 =
|
1305
|
+
( 26) condition : expression NOTEQ expression _
|
1306
|
+
( 31) expression : expression _ '+' term
|
1307
|
+
( 32) expression : expression _ '-' term
|
1308
|
+
|
1309
|
+
'+' shift, and goto to state 47
|
1310
|
+
'-' shift, and goto to state 48
|
1311
|
+
|
1312
|
+
$default reduce using rule 26 (condition)
|
1313
|
+
|
1314
|
+
----------
|
1315
|
+
|
1316
|
+
<<'----------',
|
1317
|
+
I066 =
|
1318
|
+
( 27) condition : expression LT expression _
|
1319
|
+
( 31) expression : expression _ '+' term
|
1320
|
+
( 32) expression : expression _ '-' term
|
1321
|
+
|
1322
|
+
'+' shift, and goto to state 47
|
1323
|
+
'-' shift, and goto to state 48
|
1324
|
+
|
1325
|
+
$default reduce using rule 27 (condition)
|
1326
|
+
|
1327
|
+
----------
|
1328
|
+
|
1329
|
+
<<'----------',
|
1330
|
+
I067 =
|
1331
|
+
( 28) condition : expression GT expression _
|
1332
|
+
( 31) expression : expression _ '+' term
|
1333
|
+
( 32) expression : expression _ '-' term
|
1334
|
+
|
1335
|
+
'+' shift, and goto to state 47
|
1336
|
+
'-' shift, and goto to state 48
|
1337
|
+
|
1338
|
+
$default reduce using rule 28 (condition)
|
1339
|
+
|
1340
|
+
----------
|
1341
|
+
|
1342
|
+
<<'----------',
|
1343
|
+
I068 =
|
1344
|
+
( 29) condition : expression LE expression _
|
1345
|
+
( 31) expression : expression _ '+' term
|
1346
|
+
( 32) expression : expression _ '-' term
|
1347
|
+
|
1348
|
+
'+' shift, and goto to state 47
|
1349
|
+
'-' shift, and goto to state 48
|
1350
|
+
|
1351
|
+
$default reduce using rule 29 (condition)
|
1352
|
+
|
1353
|
+
----------
|
1354
|
+
|
1355
|
+
<<'----------',
|
1356
|
+
I069 =
|
1357
|
+
( 30) condition : expression GE expression _
|
1358
|
+
( 31) expression : expression _ '+' term
|
1359
|
+
( 32) expression : expression _ '-' term
|
1360
|
+
|
1361
|
+
'+' shift, and goto to state 47
|
1362
|
+
'-' shift, and goto to state 48
|
1363
|
+
|
1364
|
+
$default reduce using rule 30 (condition)
|
1365
|
+
|
1366
|
+
----------
|
1367
|
+
|
1368
|
+
<<'----------',
|
1369
|
+
I070 =
|
1370
|
+
( 31) expression : expression '+' term _
|
1371
|
+
( 35) term : term _ '*' factor
|
1372
|
+
( 36) term : term _ '/' factor
|
1373
|
+
|
1374
|
+
'*' shift, and goto to state 49
|
1375
|
+
'/' shift, and goto to state 50
|
1376
|
+
|
1377
|
+
$default reduce using rule 31 (expression)
|
1378
|
+
|
1379
|
+
----------
|
1380
|
+
|
1381
|
+
<<'----------',
|
1382
|
+
I071 =
|
1383
|
+
( 32) expression : expression '-' term _
|
1384
|
+
( 35) term : term _ '*' factor
|
1385
|
+
( 36) term : term _ '/' factor
|
1386
|
+
|
1387
|
+
'*' shift, and goto to state 49
|
1388
|
+
'/' shift, and goto to state 50
|
1389
|
+
|
1390
|
+
$default reduce using rule 32 (expression)
|
1391
|
+
|
1392
|
+
----------
|
1393
|
+
|
1394
|
+
<<'----------',
|
1395
|
+
I072 =
|
1396
|
+
( 35) term : term '*' factor _
|
1397
|
+
|
1398
|
+
|
1399
|
+
$default reduce using rule 35 (term) [after shift]
|
1400
|
+
|
1401
|
+
----------
|
1402
|
+
|
1403
|
+
<<'----------',
|
1404
|
+
I073 =
|
1405
|
+
( 36) term : term '/' factor _
|
1406
|
+
|
1407
|
+
|
1408
|
+
$default reduce using rule 36 (term) [after shift]
|
1409
|
+
|
1410
|
+
----------
|
1411
|
+
|
1412
|
+
<<'----------',
|
1413
|
+
I074 =
|
1414
|
+
( 40) factor : IDENT '(' ')' _
|
1415
|
+
|
1416
|
+
|
1417
|
+
$default reduce using rule 40 (factor) [after shift]
|
1418
|
+
|
1419
|
+
----------
|
1420
|
+
|
1421
|
+
<<'----------',
|
1422
|
+
I075 =
|
1423
|
+
( 41) factor : IDENT '(' exp_list _ ')'
|
1424
|
+
( 44) exp_list : exp_list _ ',' expression
|
1425
|
+
|
1426
|
+
')' shift, and goto to state 85
|
1427
|
+
',' shift, and goto to state 86
|
1428
|
+
|
1429
|
+
|
1430
|
+
----------
|
1431
|
+
|
1432
|
+
<<'----------',
|
1433
|
+
I076 =
|
1434
|
+
( 43) exp_list : expression _
|
1435
|
+
( 31) expression : expression _ '+' term
|
1436
|
+
( 32) expression : expression _ '-' term
|
1437
|
+
|
1438
|
+
'+' shift, and goto to state 47
|
1439
|
+
'-' shift, and goto to state 48
|
1440
|
+
|
1441
|
+
$default reduce using rule 43 (exp_list)
|
1442
|
+
|
1443
|
+
----------
|
1444
|
+
|
1445
|
+
<<'----------',
|
1446
|
+
I077 =
|
1447
|
+
( 42) factor : '(' expression ')' _
|
1448
|
+
|
1449
|
+
|
1450
|
+
$default reduce using rule 42 (factor) [after shift]
|
1451
|
+
|
1452
|
+
----------
|
1453
|
+
|
1454
|
+
<<'----------',
|
1455
|
+
I078 =
|
1456
|
+
( 18) statement : WHILE condition DO statement _
|
1457
|
+
|
1458
|
+
|
1459
|
+
$default reduce using rule 18 (statement) [after shift]
|
1460
|
+
|
1461
|
+
----------
|
1462
|
+
|
1463
|
+
<<'----------',
|
1464
|
+
I079 =
|
1465
|
+
( 10) const_init_list : const_init_list ',' const_init _
|
1466
|
+
|
1467
|
+
|
1468
|
+
$default reduce using rule 10 (const_init_list) [after shift]
|
1469
|
+
|
1470
|
+
----------
|
1471
|
+
|
1472
|
+
<<'----------',
|
1473
|
+
I080 =
|
1474
|
+
( 11) const_init : IDENT EQ NUMBER _
|
1475
|
+
|
1476
|
+
|
1477
|
+
$default reduce using rule 11 (const_init) [after shift]
|
1478
|
+
|
1479
|
+
----------
|
1480
|
+
|
1481
|
+
<<'----------',
|
1482
|
+
I081 =
|
1483
|
+
( 13) ident_list : ident_list ',' IDENT _
|
1484
|
+
|
1485
|
+
|
1486
|
+
$default reduce using rule 13 (ident_list) [after shift]
|
1487
|
+
|
1488
|
+
----------
|
1489
|
+
|
1490
|
+
<<'----------',
|
1491
|
+
I082 =
|
1492
|
+
( 7) decl : FUNCTION IDENT '(' ')' _ block ';'
|
1493
|
+
|
1494
|
+
|
1495
|
+
$default reduce using rule 3 (opt_decl_list) [after shift]
|
1496
|
+
|
1497
|
+
----------
|
1498
|
+
|
1499
|
+
<<'----------',
|
1500
|
+
I083 =
|
1501
|
+
( 8) decl : FUNCTION IDENT '(' ident_list _ ')' block ';'
|
1502
|
+
( 13) ident_list : ident_list _ ',' IDENT
|
1503
|
+
|
1504
|
+
')' shift, and goto to state 88
|
1505
|
+
',' shift, and goto to state 59
|
1506
|
+
|
1507
|
+
|
1508
|
+
----------
|
1509
|
+
|
1510
|
+
<<'----------',
|
1511
|
+
I084 =
|
1512
|
+
( 23) opt_state_list : opt_state_list ';' statement _
|
1513
|
+
|
1514
|
+
|
1515
|
+
$default reduce using rule 23 (opt_state_list) [after shift]
|
1516
|
+
|
1517
|
+
----------
|
1518
|
+
|
1519
|
+
<<'----------',
|
1520
|
+
I085 =
|
1521
|
+
( 41) factor : IDENT '(' exp_list ')' _
|
1522
|
+
|
1523
|
+
|
1524
|
+
$default reduce using rule 41 (factor) [after shift]
|
1525
|
+
|
1526
|
+
----------
|
1527
|
+
|
1528
|
+
<<'----------',
|
1529
|
+
I086 =
|
1530
|
+
( 44) exp_list : exp_list ',' _ expression
|
1531
|
+
|
1532
|
+
IDENT shift, and goto to state 25
|
1533
|
+
'(' shift, and goto to state 27
|
1534
|
+
NUMBER shift, and goto to state 26
|
1535
|
+
'-' shift, and goto to state 23
|
1536
|
+
|
1537
|
+
|
1538
|
+
----------
|
1539
|
+
|
1540
|
+
<<'----------',
|
1541
|
+
I087 =
|
1542
|
+
( 7) decl : FUNCTION IDENT '(' ')' block _ ';'
|
1543
|
+
|
1544
|
+
';' shift, and goto to state 90
|
1545
|
+
|
1546
|
+
|
1547
|
+
----------
|
1548
|
+
|
1549
|
+
<<'----------',
|
1550
|
+
I088 =
|
1551
|
+
( 8) decl : FUNCTION IDENT '(' ident_list ')' _ block ';'
|
1552
|
+
|
1553
|
+
|
1554
|
+
$default reduce using rule 3 (opt_decl_list) [after shift]
|
1555
|
+
|
1556
|
+
----------
|
1557
|
+
|
1558
|
+
<<'----------',
|
1559
|
+
I089 =
|
1560
|
+
( 44) exp_list : exp_list ',' expression _
|
1561
|
+
( 31) expression : expression _ '+' term
|
1562
|
+
( 32) expression : expression _ '-' term
|
1563
|
+
|
1564
|
+
'+' shift, and goto to state 47
|
1565
|
+
'-' shift, and goto to state 48
|
1566
|
+
|
1567
|
+
$default reduce using rule 44 (exp_list)
|
1568
|
+
|
1569
|
+
----------
|
1570
|
+
|
1571
|
+
<<'----------',
|
1572
|
+
I090 =
|
1573
|
+
( 7) decl : FUNCTION IDENT '(' ')' block ';' _
|
1574
|
+
|
1575
|
+
|
1576
|
+
$default reduce using rule 7 (decl) [after shift]
|
1577
|
+
|
1578
|
+
----------
|
1579
|
+
|
1580
|
+
<<'----------',
|
1581
|
+
I091 =
|
1582
|
+
( 8) decl : FUNCTION IDENT '(' ident_list ')' block _ ';'
|
1583
|
+
|
1584
|
+
';' shift, and goto to state 92
|
1585
|
+
|
1586
|
+
|
1587
|
+
----------
|
1588
|
+
|
1589
|
+
<<'----------',
|
1590
|
+
I092 =
|
1591
|
+
( 8) decl : FUNCTION IDENT '(' ident_list ')' block ';' _
|
1592
|
+
|
1593
|
+
|
1594
|
+
$default reduce using rule 8 (decl) [after shift]
|
1595
|
+
|
1596
|
+
----------
|
1597
|
+
]
|
1598
|
+
|
1599
|
+
|
1600
|
+
Tables = [ reduce_table, nparams, action_table,
|
1601
|
+
defred_table, defred_after_shift_table, goto_table,
|
1602
|
+
t2i, i2t, nt2i, i2nt ]
|
1603
|
+
|
1604
|
+
def self.createDecoratedParser
|
1605
|
+
D4PL0d::ASTBuilder.new(PL0d.new())
|
1606
|
+
end
|
1607
|
+
|
1608
|
+
### Inner Code
|
1609
|
+
|
1610
|
+
def lex
|
1611
|
+
begin
|
1612
|
+
until @line.empty?
|
1613
|
+
case @line
|
1614
|
+
|
1615
|
+
when /\A\s+/
|
1616
|
+
@oldline = @line; @line = $'
|
1617
|
+
|
1618
|
+
|
1619
|
+
|
1620
|
+
when /\A:=/
|
1621
|
+
@oldline = @line; @line = $'
|
1622
|
+
yield _Token(:COLOEQ, $&)
|
1623
|
+
|
1624
|
+
|
1625
|
+
when /\A<>/
|
1626
|
+
@oldline = @line; @line = $'
|
1627
|
+
yield _Token(:NOTEQ, $&)
|
1628
|
+
|
1629
|
+
|
1630
|
+
when /\A<=/
|
1631
|
+
@oldline = @line; @line = $'
|
1632
|
+
yield _Token(:LE, $&)
|
1633
|
+
|
1634
|
+
|
1635
|
+
when /\A>=/
|
1636
|
+
@oldline = @line; @line = $'
|
1637
|
+
yield _Token(:GE, $&)
|
1638
|
+
|
1639
|
+
|
1640
|
+
when /\A=/
|
1641
|
+
@oldline = @line; @line = $'
|
1642
|
+
yield _Token(:EQ, $&)
|
1643
|
+
|
1644
|
+
|
1645
|
+
when /\A</
|
1646
|
+
@oldline = @line; @line = $'
|
1647
|
+
yield _Token(:LT, $&)
|
1648
|
+
|
1649
|
+
|
1650
|
+
when /\A>/
|
1651
|
+
@oldline = @line; @line = $'
|
1652
|
+
yield _Token(:GT, $&)
|
1653
|
+
|
1654
|
+
|
1655
|
+
when /\Aconst/
|
1656
|
+
@oldline = @line; @line = $'
|
1657
|
+
yield _Token(:CONST, $&)
|
1658
|
+
|
1659
|
+
|
1660
|
+
when /\Avar/
|
1661
|
+
@oldline = @line; @line = $'
|
1662
|
+
yield _Token(:VAR, $&)
|
1663
|
+
|
1664
|
+
|
1665
|
+
when /\Afunction/
|
1666
|
+
@oldline = @line; @line = $'
|
1667
|
+
yield _Token(:FUNCTION, $&)
|
1668
|
+
|
1669
|
+
|
1670
|
+
when /\Abegin/
|
1671
|
+
@oldline = @line; @line = $'
|
1672
|
+
yield _Token(:BEGINN, $&)
|
1673
|
+
|
1674
|
+
|
1675
|
+
when /\Aend/
|
1676
|
+
@oldline = @line; @line = $'
|
1677
|
+
yield _Token(:END, $&)
|
1678
|
+
|
1679
|
+
|
1680
|
+
when /\Aif/
|
1681
|
+
@oldline = @line; @line = $'
|
1682
|
+
yield _Token(:IF, $&)
|
1683
|
+
|
1684
|
+
|
1685
|
+
when /\Athen/
|
1686
|
+
@oldline = @line; @line = $'
|
1687
|
+
yield _Token(:THEN, $&)
|
1688
|
+
|
1689
|
+
|
1690
|
+
when /\Awhile/
|
1691
|
+
@oldline = @line; @line = $'
|
1692
|
+
yield _Token(:WHILE, $&)
|
1693
|
+
|
1694
|
+
|
1695
|
+
when /\Ado/
|
1696
|
+
@oldline = @line; @line = $'
|
1697
|
+
yield _Token(:DO, $&)
|
1698
|
+
|
1699
|
+
|
1700
|
+
when /\Areturn/
|
1701
|
+
@oldline = @line; @line = $'
|
1702
|
+
yield _Token(:RETURN, $&)
|
1703
|
+
|
1704
|
+
|
1705
|
+
when /\Awriteln/
|
1706
|
+
@oldline = @line; @line = $'
|
1707
|
+
yield _Token(:WRITELN, $&)
|
1708
|
+
|
1709
|
+
|
1710
|
+
when /\Awrite/
|
1711
|
+
@oldline = @line; @line = $'
|
1712
|
+
yield _Token(:WRITE, $&)
|
1713
|
+
|
1714
|
+
|
1715
|
+
when /\Aodd/
|
1716
|
+
@oldline = @line; @line = $'
|
1717
|
+
yield _Token(:ODD, $&)
|
1718
|
+
|
1719
|
+
|
1720
|
+
when /\A[a-zA-Z][a-zA-Z0-9_]*/
|
1721
|
+
@oldline = @line; @line = $'
|
1722
|
+
yield _Token(:IDENT, $&)
|
1723
|
+
|
1724
|
+
|
1725
|
+
when /\A[0-9]+/
|
1726
|
+
@oldline = @line; @line = $'
|
1727
|
+
yield _Token(:NUMBER, $&.to_i)
|
1728
|
+
|
1729
|
+
|
1730
|
+
when /\A./
|
1731
|
+
@oldline = @line; @line = $'
|
1732
|
+
yield _Token($&, $&)
|
1733
|
+
|
1734
|
+
|
1735
|
+
else
|
1736
|
+
raise RuntimeError, "must not happen #{@line}"
|
1737
|
+
end
|
1738
|
+
end
|
1739
|
+
end while @line0 = @line = getline
|
1740
|
+
yield nil, nil
|
1741
|
+
end
|
1742
|
+
|
1743
|
+
end
|
1744
|
+
|
1745
|
+
### Outer Code
|
1746
|
+
|
1747
|
+
class Node
|
1748
|
+
attr_accessor :lineno
|
1749
|
+
attr_accessor :value
|
1750
|
+
|
1751
|
+
def initialize
|
1752
|
+
@value = nil
|
1753
|
+
|
1754
|
+
end
|
1755
|
+
|
1756
|
+
def self.[] lineno, *args
|
1757
|
+
self.new lineno, *args
|
1758
|
+
end
|
1759
|
+
def accept v
|
1760
|
+
end
|
1761
|
+
end
|
1762
|
+
class NodeList < Node
|
1763
|
+
attr_accessor :lineno
|
1764
|
+
def initialize(lineno, lst=[])
|
1765
|
+
@lineno = lineno
|
1766
|
+
@lst = lst.to_a.select{|i| ! i.is_a?(NilNode)}
|
1767
|
+
end
|
1768
|
+
|
1769
|
+
def all_value
|
1770
|
+
@lst.map{|i| i.value}
|
1771
|
+
end
|
1772
|
+
|
1773
|
+
def size
|
1774
|
+
@lst.size
|
1775
|
+
end
|
1776
|
+
alias length size
|
1777
|
+
def push(i)
|
1778
|
+
@lst.push i unless i.is_a? NilNode
|
1779
|
+
self
|
1780
|
+
end
|
1781
|
+
def concat(i)
|
1782
|
+
@lst.concat i
|
1783
|
+
self
|
1784
|
+
end
|
1785
|
+
def to_ary()
|
1786
|
+
@lst
|
1787
|
+
end
|
1788
|
+
alias to_a to_ary
|
1789
|
+
alias list to_ary
|
1790
|
+
def accept(v)
|
1791
|
+
@lst.each{|i| i.accept(v) }
|
1792
|
+
end
|
1793
|
+
end
|
1794
|
+
class NilNode
|
1795
|
+
attr_accessor :lineno
|
1796
|
+
attr_accessor :value
|
1797
|
+
def initialize(lineno, *args)
|
1798
|
+
@lineno = lineno
|
1799
|
+
end
|
1800
|
+
def accept v
|
1801
|
+
end
|
1802
|
+
end
|
1803
|
+
|
1804
|
+
|
1805
|
+
class Node_program < Node
|
1806
|
+
attr_accessor :block
|
1807
|
+
attr_accessor
|
1808
|
+
def initialize lineno, block
|
1809
|
+
super()
|
1810
|
+
@lineno = lineno
|
1811
|
+
@lineno = lineno
|
1812
|
+
@block = block
|
1813
|
+
|
1814
|
+
end
|
1815
|
+
def accept v
|
1816
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
1817
|
+
|
1818
|
+
v.visit_Node_program(self)
|
1819
|
+
self
|
765
1820
|
end
|
1821
|
+
end
|
766
1822
|
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
1823
|
+
class Node_block < Node
|
1824
|
+
attr_accessor :decls, :stmt
|
1825
|
+
attr_accessor
|
1826
|
+
def initialize lineno, decls, stmt
|
1827
|
+
super()
|
1828
|
+
@lineno = lineno
|
1829
|
+
@lineno = lineno
|
774
1830
|
@decls = decls
|
775
1831
|
@stmt = stmt
|
776
1832
|
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
@decls.accept(v); @decls
|
781
|
-
end
|
782
|
-
|
783
|
-
def _stmt_ v
|
784
|
-
@stmt.accept(v); @stmt
|
785
|
-
end
|
1833
|
+
end
|
1834
|
+
def accept v
|
1835
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
786
1836
|
|
787
|
-
|
788
|
-
|
789
|
-
v.visit_Node_block(self)
|
790
|
-
self
|
791
|
-
end
|
1837
|
+
v.visit_Node_block(self)
|
1838
|
+
self
|
792
1839
|
end
|
1840
|
+
end
|
793
1841
|
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
|
1842
|
+
class Node_var_decl < Node
|
1843
|
+
attr_accessor :idents
|
1844
|
+
attr_accessor :idents
|
1845
|
+
def initialize lineno, idents
|
1846
|
+
super()
|
1847
|
+
@lineno = lineno
|
1848
|
+
@lineno = lineno
|
801
1849
|
@idents = idents
|
802
1850
|
|
803
|
-
|
1851
|
+
end
|
1852
|
+
def accept v
|
1853
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
804
1854
|
|
805
|
-
|
806
|
-
|
807
|
-
v.visit_Node_var_decl(self)
|
808
|
-
self
|
809
|
-
end
|
1855
|
+
v.visit_Node_var_decl(self)
|
1856
|
+
self
|
810
1857
|
end
|
1858
|
+
end
|
811
1859
|
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
1860
|
+
class Node_const_decl < Node
|
1861
|
+
attr_accessor :const_inits
|
1862
|
+
attr_accessor
|
1863
|
+
def initialize lineno, const_inits
|
1864
|
+
super()
|
1865
|
+
@lineno = lineno
|
1866
|
+
@lineno = lineno
|
819
1867
|
@const_inits = const_inits
|
820
1868
|
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
@const_inits.accept(v); @const_inits
|
825
|
-
end
|
1869
|
+
end
|
1870
|
+
def accept v
|
1871
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
826
1872
|
|
827
|
-
|
828
|
-
|
829
|
-
v.visit_Node_const_decl(self)
|
830
|
-
self
|
831
|
-
end
|
1873
|
+
v.visit_Node_const_decl(self)
|
1874
|
+
self
|
832
1875
|
end
|
1876
|
+
end
|
833
1877
|
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
1878
|
+
class Node_const_init < Node
|
1879
|
+
attr_accessor :ident, :number
|
1880
|
+
attr_accessor :ident, :number
|
1881
|
+
def initialize lineno, ident, number
|
1882
|
+
super()
|
1883
|
+
@lineno = lineno
|
1884
|
+
@lineno = lineno
|
841
1885
|
@ident = ident
|
842
1886
|
@number = number
|
843
1887
|
|
844
|
-
|
1888
|
+
end
|
1889
|
+
def accept v
|
1890
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
845
1891
|
|
846
|
-
|
847
|
-
|
848
|
-
v.visit_Node_const_init(self)
|
849
|
-
self
|
850
|
-
end
|
1892
|
+
v.visit_Node_const_init(self)
|
1893
|
+
self
|
851
1894
|
end
|
1895
|
+
end
|
852
1896
|
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
1897
|
+
class Node_func_decl < Node
|
1898
|
+
attr_accessor :ident, :params, :block
|
1899
|
+
attr_accessor :ident, :params, :block
|
1900
|
+
def initialize lineno, ident, params, block
|
1901
|
+
super()
|
1902
|
+
@lineno = lineno
|
1903
|
+
@lineno = lineno
|
860
1904
|
@ident = ident
|
861
1905
|
@params = params
|
862
1906
|
@block = block
|
863
1907
|
|
864
|
-
|
1908
|
+
end
|
1909
|
+
def accept v
|
1910
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
865
1911
|
|
866
|
-
|
867
|
-
|
868
|
-
v.visit_Node_func_decl(self)
|
869
|
-
self
|
870
|
-
end
|
1912
|
+
v.visit_Node_func_decl(self)
|
1913
|
+
self
|
871
1914
|
end
|
1915
|
+
end
|
872
1916
|
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
1917
|
+
class Node_nop_stmt < Node
|
1918
|
+
attr_accessor :nop
|
1919
|
+
attr_accessor :nop
|
1920
|
+
def initialize lineno, nop
|
1921
|
+
super()
|
1922
|
+
@lineno = lineno
|
1923
|
+
@lineno = lineno
|
880
1924
|
@nop = nop
|
881
1925
|
|
882
|
-
|
1926
|
+
end
|
1927
|
+
def accept v
|
1928
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
883
1929
|
|
884
|
-
|
885
|
-
|
886
|
-
v.visit_Node_nop_stmt(self)
|
887
|
-
self
|
888
|
-
end
|
1930
|
+
v.visit_Node_nop_stmt(self)
|
1931
|
+
self
|
889
1932
|
end
|
1933
|
+
end
|
890
1934
|
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
1935
|
+
class Node_assign_stmt < Node
|
1936
|
+
attr_accessor :ident, :expr
|
1937
|
+
attr_accessor :ident
|
1938
|
+
def initialize lineno, ident, expr
|
1939
|
+
super()
|
1940
|
+
@lineno = lineno
|
1941
|
+
@lineno = lineno
|
898
1942
|
@ident = ident
|
899
1943
|
@expr = expr
|
900
1944
|
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
@expr.accept(v); @expr
|
905
|
-
end
|
1945
|
+
end
|
1946
|
+
def accept v
|
1947
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
906
1948
|
|
907
|
-
|
908
|
-
|
909
|
-
v.visit_Node_assign_stmt(self)
|
910
|
-
self
|
911
|
-
end
|
1949
|
+
v.visit_Node_assign_stmt(self)
|
1950
|
+
self
|
912
1951
|
end
|
1952
|
+
end
|
913
1953
|
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
1954
|
+
class Node_begin_stmt < Node
|
1955
|
+
attr_accessor :stmt, :stmts
|
1956
|
+
attr_accessor
|
1957
|
+
def initialize lineno, stmt, stmts
|
1958
|
+
super()
|
1959
|
+
@lineno = lineno
|
1960
|
+
@lineno = lineno
|
921
1961
|
@stmt = stmt
|
922
1962
|
@stmts = stmts
|
923
1963
|
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
@stmt.accept(v); @stmt
|
928
|
-
end
|
929
|
-
|
930
|
-
def _stmts_ v
|
931
|
-
@stmts.accept(v); @stmts
|
932
|
-
end
|
1964
|
+
end
|
1965
|
+
def accept v
|
1966
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
933
1967
|
|
934
|
-
|
935
|
-
|
936
|
-
v.visit_Node_begin_stmt(self)
|
937
|
-
self
|
938
|
-
end
|
1968
|
+
v.visit_Node_begin_stmt(self)
|
1969
|
+
self
|
939
1970
|
end
|
1971
|
+
end
|
940
1972
|
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
1973
|
+
class Node_if_stmt < Node
|
1974
|
+
attr_accessor :cond, :stmt
|
1975
|
+
attr_accessor
|
1976
|
+
def initialize lineno, cond, stmt
|
1977
|
+
super()
|
1978
|
+
@lineno = lineno
|
1979
|
+
@lineno = lineno
|
948
1980
|
@cond = cond
|
949
1981
|
@stmt = stmt
|
950
1982
|
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
@cond.accept(v); @cond
|
955
|
-
end
|
956
|
-
|
957
|
-
def _stmt_ v
|
958
|
-
@stmt.accept(v); @stmt
|
959
|
-
end
|
1983
|
+
end
|
1984
|
+
def accept v
|
1985
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
960
1986
|
|
961
|
-
|
962
|
-
|
963
|
-
v.visit_Node_if_stmt(self)
|
964
|
-
self
|
965
|
-
end
|
1987
|
+
v.visit_Node_if_stmt(self)
|
1988
|
+
self
|
966
1989
|
end
|
1990
|
+
end
|
967
1991
|
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
1992
|
+
class Node_while_stmt < Node
|
1993
|
+
attr_accessor :cond, :stmt
|
1994
|
+
attr_accessor
|
1995
|
+
def initialize lineno, cond, stmt
|
1996
|
+
super()
|
1997
|
+
@lineno = lineno
|
1998
|
+
@lineno = lineno
|
975
1999
|
@cond = cond
|
976
2000
|
@stmt = stmt
|
977
2001
|
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
@cond.accept(v); @cond
|
982
|
-
end
|
983
|
-
|
984
|
-
def _stmt_ v
|
985
|
-
@stmt.accept(v); @stmt
|
986
|
-
end
|
2002
|
+
end
|
2003
|
+
def accept v
|
2004
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
987
2005
|
|
988
|
-
|
989
|
-
|
990
|
-
v.visit_Node_while_stmt(self)
|
991
|
-
self
|
992
|
-
end
|
2006
|
+
v.visit_Node_while_stmt(self)
|
2007
|
+
self
|
993
2008
|
end
|
2009
|
+
end
|
994
2010
|
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
2011
|
+
class Node_return_stmt < Node
|
2012
|
+
attr_accessor :expr
|
2013
|
+
attr_accessor
|
2014
|
+
def initialize lineno, expr
|
2015
|
+
super()
|
2016
|
+
@lineno = lineno
|
2017
|
+
@lineno = lineno
|
1002
2018
|
@expr = expr
|
1003
2019
|
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
@expr.accept(v); @expr
|
1008
|
-
end
|
2020
|
+
end
|
2021
|
+
def accept v
|
2022
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
1009
2023
|
|
1010
|
-
|
1011
|
-
|
1012
|
-
v.visit_Node_return_stmt(self)
|
1013
|
-
self
|
1014
|
-
end
|
2024
|
+
v.visit_Node_return_stmt(self)
|
2025
|
+
self
|
1015
2026
|
end
|
2027
|
+
end
|
1016
2028
|
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
2029
|
+
class Node_apply < Node
|
2030
|
+
attr_accessor :ident, :args
|
2031
|
+
attr_accessor :ident, :args
|
2032
|
+
def initialize lineno, ident, args
|
2033
|
+
super()
|
2034
|
+
@lineno = lineno
|
2035
|
+
@lineno = lineno
|
1024
2036
|
@ident = ident
|
1025
2037
|
@args = args
|
1026
2038
|
|
1027
|
-
|
2039
|
+
end
|
2040
|
+
def accept v
|
2041
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
1028
2042
|
|
1029
|
-
|
1030
|
-
|
1031
|
-
v.visit_Node_apply(self)
|
1032
|
-
self
|
1033
|
-
end
|
2043
|
+
v.visit_Node_apply(self)
|
2044
|
+
self
|
1034
2045
|
end
|
2046
|
+
end
|
1035
2047
|
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
2048
|
+
class Node_refv < Node
|
2049
|
+
attr_accessor :ident
|
2050
|
+
attr_accessor :ident
|
2051
|
+
def initialize lineno, ident
|
2052
|
+
super()
|
2053
|
+
@lineno = lineno
|
2054
|
+
@lineno = lineno
|
1043
2055
|
@ident = ident
|
1044
2056
|
|
1045
|
-
|
2057
|
+
end
|
2058
|
+
def accept v
|
2059
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
1046
2060
|
|
1047
|
-
|
1048
|
-
|
1049
|
-
v.visit_Node_refv(self)
|
1050
|
-
self
|
1051
|
-
end
|
2061
|
+
v.visit_Node_refv(self)
|
2062
|
+
self
|
1052
2063
|
end
|
2064
|
+
end
|
1053
2065
|
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
2066
|
+
class Node_number < Node
|
2067
|
+
attr_accessor :n
|
2068
|
+
attr_accessor :n
|
2069
|
+
def initialize lineno, n
|
2070
|
+
super()
|
2071
|
+
@lineno = lineno
|
2072
|
+
@lineno = lineno
|
1061
2073
|
@n = n
|
1062
2074
|
|
1063
|
-
|
2075
|
+
end
|
2076
|
+
def accept v
|
2077
|
+
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
1064
2078
|
|
1065
|
-
|
1066
|
-
|
1067
|
-
v.visit_Node_number(self)
|
1068
|
-
self
|
1069
|
-
end
|
2079
|
+
v.visit_Node_number(self)
|
2080
|
+
self
|
1070
2081
|
end
|
2082
|
+
end
|
1071
2083
|
|
1072
2084
|
class Visitor
|
1073
2085
|
def visit node
|
1074
2086
|
node.accept(self)
|
1075
2087
|
end
|
1076
2088
|
|
1077
|
-
module_eval <<-'.,.,
|
2089
|
+
module_eval <<-'.,.,120998293030813.,.,', 'pl0d/pl0ds.dr', 38
|
1078
2090
|
|
1079
2091
|
STEntry = Struct.new(:kind, :narg, :value)
|
1080
2092
|
def initialize
|
@@ -1106,33 +2118,39 @@ module_eval <<-'.,.,1187541087803.,.,', 'pl0d/pl0ds.dr', 38
|
|
1106
2118
|
warn e.pretty_inspect
|
1107
2119
|
end
|
1108
2120
|
|
1109
|
-
.,.,
|
2121
|
+
.,.,120998293030813.,.,
|
1110
2122
|
|
1111
|
-
module_eval <<-'.,.,
|
1112
|
-
|
2123
|
+
module_eval <<-'.,.,12099829305176.,.,', 'pl0d/pl0ds.dr', 69
|
2124
|
+
def visit_Node_program node
|
1113
2125
|
|
1114
2126
|
visit(node.block)
|
1115
2127
|
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
2128
|
+
rescue
|
2129
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2130
|
+
raise
|
2131
|
+
|
2132
|
+
end
|
2133
|
+
.,.,12099829305176.,.,
|
1119
2134
|
|
1120
|
-
module_eval <<-'.,.,
|
1121
|
-
|
2135
|
+
module_eval <<-'.,.,120998293049390.,.,', 'pl0d/pl0ds.dr', 73
|
2136
|
+
def visit_Node_block node
|
1122
2137
|
|
1123
2138
|
@env.push({})
|
1124
2139
|
visit(node.decls)
|
1125
2140
|
visit(node.stmt)
|
1126
2141
|
@env.pop
|
1127
2142
|
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
2143
|
+
rescue
|
2144
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2145
|
+
raise
|
2146
|
+
|
2147
|
+
end
|
2148
|
+
.,.,120998293049390.,.,
|
1131
2149
|
|
1132
|
-
module_eval <<-'.,.,
|
1133
|
-
|
2150
|
+
module_eval <<-'.,.,120998293012688.,.,', 'pl0d/pl0ds.dr', 80
|
2151
|
+
def visit_Node_var_decl node
|
1134
2152
|
|
1135
|
-
node.idents.each do |ident|
|
2153
|
+
node.idents.to_a.each do |ident|
|
1136
2154
|
if @env.last[ident.value]
|
1137
2155
|
warn "'#{ident.value}' already exist."; exit
|
1138
2156
|
else
|
@@ -1140,21 +2158,27 @@ module_eval <<-'.,.,118754108720128.,.,', 'pl0d/pl0ds.dr', 80
|
|
1140
2158
|
end
|
1141
2159
|
end
|
1142
2160
|
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
2161
|
+
rescue
|
2162
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2163
|
+
raise
|
2164
|
+
|
2165
|
+
end
|
2166
|
+
.,.,120998293012688.,.,
|
1146
2167
|
|
1147
|
-
module_eval <<-'.,.,
|
1148
|
-
|
2168
|
+
module_eval <<-'.,.,120998293023822.,.,', 'pl0d/pl0ds.dr', 90
|
2169
|
+
def visit_Node_const_decl node
|
1149
2170
|
|
1150
2171
|
visit(node.const_inits)
|
1151
2172
|
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
2173
|
+
rescue
|
2174
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2175
|
+
raise
|
2176
|
+
|
2177
|
+
end
|
2178
|
+
.,.,120998293023822.,.,
|
1155
2179
|
|
1156
|
-
module_eval <<-'.,.,
|
1157
|
-
|
2180
|
+
module_eval <<-'.,.,120998293050532.,.,', 'pl0d/pl0ds.dr', 94
|
2181
|
+
def visit_Node_const_init node
|
1158
2182
|
|
1159
2183
|
if @env.last[node.ident.value]
|
1160
2184
|
warn "'#{node.ident.value}' already exist."; exit
|
@@ -1162,12 +2186,15 @@ module_eval <<-'.,.,118754108745112.,.,', 'pl0d/pl0ds.dr', 94
|
|
1162
2186
|
@env.last[node.ident.value] = STEntry.new(:CONST, 0, node.number.value)
|
1163
2187
|
end
|
1164
2188
|
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
2189
|
+
rescue
|
2190
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2191
|
+
raise
|
2192
|
+
|
2193
|
+
end
|
2194
|
+
.,.,120998293050532.,.,
|
1168
2195
|
|
1169
|
-
module_eval <<-'.,.,
|
1170
|
-
|
2196
|
+
module_eval <<-'.,.,12099829308926.,.,', 'pl0d/pl0ds.dr', 102
|
2197
|
+
def visit_Node_func_decl node
|
1171
2198
|
|
1172
2199
|
if @env[0][node.ident.value]
|
1173
2200
|
warn "'#{node.ident.value}' already exist."; exit
|
@@ -1176,9 +2203,9 @@ module_eval <<-'.,.,118754108729522.,.,', 'pl0d/pl0ds.dr', 102
|
|
1176
2203
|
value = 0
|
1177
2204
|
n = @env.size
|
1178
2205
|
@env.push({})
|
1179
|
-
value =
|
1180
|
-
@env.last['return'] = STEntry.new(:VAR, 0,
|
1181
|
-
node.params.each_with_index do |a, x|
|
2206
|
+
value = catch(:return) do
|
2207
|
+
@env.last['return'] = STEntry.new(:VAR, 0, :return)
|
2208
|
+
node.params.to_a.each_with_index do |a, x|
|
1182
2209
|
@env.last[a.value] = STEntry.new(:VAR, 0, args[x])
|
1183
2210
|
end
|
1184
2211
|
visit(node.block)
|
@@ -1188,20 +2215,26 @@ module_eval <<-'.,.,118754108729522.,.,', 'pl0d/pl0ds.dr', 102
|
|
1188
2215
|
end
|
1189
2216
|
@env.last[node.ident.value] = STEntry.new(:FUNC, node.params.size, body)
|
1190
2217
|
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
2218
|
+
rescue
|
2219
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2220
|
+
raise
|
2221
|
+
|
2222
|
+
end
|
2223
|
+
.,.,12099829308926.,.,
|
1194
2224
|
|
1195
|
-
module_eval <<-'.,.,
|
1196
|
-
|
1197
|
-
|
2225
|
+
module_eval <<-'.,.,12099829302167.,.,', 'pl0d/pl0ds.dr', 123
|
2226
|
+
def visit_Node_nop_stmt node
|
1198
2227
|
|
1199
|
-
end
|
1200
2228
|
|
1201
|
-
|
2229
|
+
rescue
|
2230
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2231
|
+
raise
|
2232
|
+
|
2233
|
+
end
|
2234
|
+
.,.,12099829302167.,.,
|
1202
2235
|
|
1203
|
-
module_eval <<-'.,.,
|
1204
|
-
|
2236
|
+
module_eval <<-'.,.,120998293024002.,.,', 'pl0d/pl0ds.dr', 126
|
2237
|
+
def visit_Node_assign_stmt node
|
1205
2238
|
|
1206
2239
|
if ent = lookup(node.ident.value)
|
1207
2240
|
unless ent.kind == :VAR
|
@@ -1213,58 +2246,73 @@ module_eval <<-'.,.,11875410875543.,.,', 'pl0d/pl0ds.dr', 126
|
|
1213
2246
|
warn "'#{node.ident.value}' not found."; exit
|
1214
2247
|
end
|
1215
2248
|
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
2249
|
+
rescue
|
2250
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2251
|
+
raise
|
2252
|
+
|
2253
|
+
end
|
2254
|
+
.,.,120998293024002.,.,
|
1219
2255
|
|
1220
|
-
module_eval <<-'.,.,
|
1221
|
-
|
2256
|
+
module_eval <<-'.,.,120998293048902.,.,', 'pl0d/pl0ds.dr', 138
|
2257
|
+
def visit_Node_begin_stmt node
|
1222
2258
|
|
1223
2259
|
visit(node.stmt)
|
1224
2260
|
visit(node.stmts)
|
1225
2261
|
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
2262
|
+
rescue
|
2263
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2264
|
+
raise
|
2265
|
+
|
2266
|
+
end
|
2267
|
+
.,.,120998293048902.,.,
|
1229
2268
|
|
1230
|
-
module_eval <<-'.,.,
|
1231
|
-
|
2269
|
+
module_eval <<-'.,.,120998293040187.,.,', 'pl0d/pl0ds.dr', 143
|
2270
|
+
def visit_Node_if_stmt node
|
1232
2271
|
|
1233
2272
|
if visit(node.cond).value != 0
|
1234
2273
|
visit(node.stmt)
|
1235
2274
|
end
|
1236
2275
|
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
2276
|
+
rescue
|
2277
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2278
|
+
raise
|
2279
|
+
|
2280
|
+
end
|
2281
|
+
.,.,120998293040187.,.,
|
1240
2282
|
|
1241
|
-
module_eval <<-'.,.,
|
1242
|
-
|
2283
|
+
module_eval <<-'.,.,120998293044323.,.,', 'pl0d/pl0ds.dr', 149
|
2284
|
+
def visit_Node_while_stmt node
|
1243
2285
|
|
1244
2286
|
while visit(node.cond).value != 0
|
1245
2287
|
visit(node.stmt)
|
1246
2288
|
end
|
1247
2289
|
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
2290
|
+
rescue
|
2291
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2292
|
+
raise
|
2293
|
+
|
2294
|
+
end
|
2295
|
+
.,.,120998293044323.,.,
|
1251
2296
|
|
1252
|
-
module_eval <<-'.,.,
|
1253
|
-
|
2297
|
+
module_eval <<-'.,.,120998293053102.,.,', 'pl0d/pl0ds.dr', 155
|
2298
|
+
def visit_Node_return_stmt node
|
1254
2299
|
|
1255
2300
|
ent = nil
|
1256
2301
|
@env.reverse_each{|s| break if ent = s['return'] }
|
1257
2302
|
unless ent
|
1258
2303
|
warn "'return' not in func."; exit
|
1259
2304
|
end
|
1260
|
-
|
1261
|
-
|
1262
|
-
end
|
2305
|
+
throw :return, visit(node.expr).value
|
1263
2306
|
|
1264
|
-
|
2307
|
+
rescue
|
2308
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2309
|
+
raise
|
2310
|
+
|
2311
|
+
end
|
2312
|
+
.,.,120998293053102.,.,
|
1265
2313
|
|
1266
|
-
module_eval <<-'.,.,
|
1267
|
-
|
2314
|
+
module_eval <<-'.,.,120998293056491.,.,', 'pl0d/pl0ds.dr', 164
|
2315
|
+
def visit_Node_apply node
|
1268
2316
|
|
1269
2317
|
ent = nil
|
1270
2318
|
@env.reverse_each{|s| break if ent = s[node.ident.value] }
|
@@ -1275,7 +2323,7 @@ module_eval <<-'.,.,118754108733309.,.,', 'pl0d/pl0ds.dr', 164
|
|
1275
2323
|
warn "'#{node.ident.value}' not func."; exit
|
1276
2324
|
end
|
1277
2325
|
|
1278
|
-
args = node.args.map{|a| visit(a).value }
|
2326
|
+
args = node.args.to_a.map{|a| visit(a).value }
|
1279
2327
|
# warn "#{' '*(@env.size-2)}|#{node.ident.value} : #{args.inspect}"
|
1280
2328
|
unless ent.narg == args.size
|
1281
2329
|
warn "#{ent.narg} #{args.size} #{args.inspect}"
|
@@ -1284,12 +2332,15 @@ module_eval <<-'.,.,118754108733309.,.,', 'pl0d/pl0ds.dr', 164
|
|
1284
2332
|
node.value = ent.value.call(args)
|
1285
2333
|
# warn "#{' '*(@env.size-2)}|-> #{node.value} @ #{node.ident.value}"
|
1286
2334
|
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
2335
|
+
rescue
|
2336
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2337
|
+
raise
|
2338
|
+
|
2339
|
+
end
|
2340
|
+
.,.,120998293056491.,.,
|
1290
2341
|
|
1291
|
-
module_eval <<-'.,.,
|
1292
|
-
|
2342
|
+
module_eval <<-'.,.,120998293060345.,.,', 'pl0d/pl0ds.dr', 184
|
2343
|
+
def visit_Node_refv node
|
1293
2344
|
|
1294
2345
|
unless ent = lookup(node.ident.value)
|
1295
2346
|
warn "'#{node.ident.value}' not found."; exit
|
@@ -1300,24 +2351,30 @@ module_eval <<-'.,.,118754108711179.,.,', 'pl0d/pl0ds.dr', 184
|
|
1300
2351
|
warn "'#{node.ident.value}' not var."; exit
|
1301
2352
|
end
|
1302
2353
|
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
2354
|
+
rescue
|
2355
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2356
|
+
raise
|
2357
|
+
|
2358
|
+
end
|
2359
|
+
.,.,120998293060345.,.,
|
1306
2360
|
|
1307
|
-
module_eval <<-'.,.,
|
1308
|
-
|
2361
|
+
module_eval <<-'.,.,120998293043567.,.,', 'pl0d/pl0ds.dr', 195
|
2362
|
+
def visit_Node_number node
|
1309
2363
|
|
1310
2364
|
node.value = node.n.value
|
1311
2365
|
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
2366
|
+
rescue
|
2367
|
+
warn "raise at src:#{node.lineno}/#{node.class.name}"
|
2368
|
+
raise
|
2369
|
+
|
2370
|
+
end
|
2371
|
+
.,.,120998293043567.,.,
|
1315
2372
|
|
1316
2373
|
end
|
1317
2374
|
|
1318
|
-
class D4PL0d::
|
2375
|
+
class D4PL0d::ASTBuilder < Depager::LALR::Action #:nodoc:all
|
1319
2376
|
include Depager::DecoratorUtils
|
1320
|
-
|
2377
|
+
[]
|
1321
2378
|
on_reduce = [
|
1322
2379
|
nil,
|
1323
2380
|
:_ast_0,
|
@@ -1368,325 +2425,281 @@ class D4PL0d::ASTBuilderLazy < Depager::LALR::Action #:nodoc:all
|
|
1368
2425
|
]
|
1369
2426
|
Tables = [on_reduce]
|
1370
2427
|
def initialize inside
|
1371
|
-
super inside, '
|
2428
|
+
super inside, 'ASTBuilder'
|
1372
2429
|
@on_reduce, = self.class::Tables
|
1373
2430
|
init_parser
|
1374
2431
|
end
|
1375
2432
|
|
1376
2433
|
|
1377
|
-
module_eval <<-'.,.,
|
1378
|
-
|
2434
|
+
module_eval <<-'.,.,120998293028968.,.,', 'pl0d/pl0ds.dr', 202
|
2435
|
+
def _ast_0 val
|
1379
2436
|
Node_program.new(val[0].lineno, val[0])
|
1380
|
-
|
1381
|
-
|
1382
|
-
.,.,118754108727698.,.,
|
2437
|
+
end
|
2438
|
+
.,.,120998293028968.,.,
|
1383
2439
|
|
1384
|
-
module_eval <<-'.,.,
|
1385
|
-
|
2440
|
+
module_eval <<-'.,.,12099829301180.,.,', 'pl0d/pl0ds.dr', 207
|
2441
|
+
def _ast_1 val
|
1386
2442
|
Node_block.new(val[0].lineno, val[0], val[1])
|
1387
|
-
|
1388
|
-
|
1389
|
-
.,.,118754108715107.,.,
|
2443
|
+
end
|
2444
|
+
.,.,12099829301180.,.,
|
1390
2445
|
|
1391
|
-
module_eval <<-'.,.,
|
1392
|
-
|
2446
|
+
module_eval <<-'.,.,120998293015897.,.,', 'pl0d/pl0ds.dr', 211
|
2447
|
+
def _ast_2 val
|
1393
2448
|
NodeList.new(basis.file.lineno, [])
|
1394
|
-
|
1395
|
-
|
1396
|
-
.,.,11875410875615.,.,
|
2449
|
+
end
|
2450
|
+
.,.,120998293015897.,.,
|
1397
2451
|
|
1398
|
-
module_eval <<-'.,.,
|
1399
|
-
|
2452
|
+
module_eval <<-'.,.,120998293049270.,.,', 'pl0d/pl0ds.dr', 213
|
2453
|
+
def _ast_3 val
|
1400
2454
|
val[0].push(val[1])
|
1401
|
-
|
1402
|
-
|
1403
|
-
.,.,118754108757005.,.,
|
2455
|
+
end
|
2456
|
+
.,.,120998293049270.,.,
|
1404
2457
|
|
1405
|
-
module_eval <<-'.,.,
|
1406
|
-
|
2458
|
+
module_eval <<-'.,.,12099829307013.,.,', 'pl0d/pl0ds.dr', 218
|
2459
|
+
def _ast_4 val
|
1407
2460
|
Node_const_decl.new(val[0].lineno, val[1])
|
1408
|
-
|
1409
|
-
|
1410
|
-
.,.,118754108729694.,.,
|
2461
|
+
end
|
2462
|
+
.,.,12099829307013.,.,
|
1411
2463
|
|
1412
|
-
module_eval <<-'.,.,
|
1413
|
-
|
2464
|
+
module_eval <<-'.,.,120998293039291.,.,', 'pl0d/pl0ds.dr', 220
|
2465
|
+
def _ast_5 val
|
1414
2466
|
Node_var_decl.new(val[0].lineno, val[1])
|
1415
|
-
|
1416
|
-
|
1417
|
-
.,.,118754108716594.,.,
|
2467
|
+
end
|
2468
|
+
.,.,120998293039291.,.,
|
1418
2469
|
|
1419
|
-
module_eval <<-'.,.,
|
1420
|
-
|
2470
|
+
module_eval <<-'.,.,120998293039568.,.,', 'pl0d/pl0ds.dr', 222
|
2471
|
+
def _ast_6 val
|
1421
2472
|
Node_func_decl.new(val[0].lineno, val[1], NodeList.new(basis.file.lineno, []), val[4])
|
1422
|
-
|
1423
|
-
|
1424
|
-
.,.,118754108748120.,.,
|
2473
|
+
end
|
2474
|
+
.,.,120998293039568.,.,
|
1425
2475
|
|
1426
|
-
module_eval <<-'.,.,
|
1427
|
-
|
2476
|
+
module_eval <<-'.,.,120998293035123.,.,', 'pl0d/pl0ds.dr', 224
|
2477
|
+
def _ast_7 val
|
1428
2478
|
Node_func_decl.new(val[0].lineno, val[1], val[3], val[5])
|
1429
|
-
|
1430
|
-
|
1431
|
-
.,.,11875410872297.,.,
|
2479
|
+
end
|
2480
|
+
.,.,120998293035123.,.,
|
1432
2481
|
|
1433
|
-
module_eval <<-'.,.,
|
1434
|
-
|
2482
|
+
module_eval <<-'.,.,120998293017209.,.,', 'pl0d/pl0ds.dr', 229
|
2483
|
+
def _ast_8 val
|
1435
2484
|
NodeList.new(val[0].lineno, [val[0]])
|
1436
|
-
|
1437
|
-
|
1438
|
-
.,.,118754108745043.,.,
|
2485
|
+
end
|
2486
|
+
.,.,120998293017209.,.,
|
1439
2487
|
|
1440
|
-
module_eval <<-'.,.,
|
1441
|
-
|
2488
|
+
module_eval <<-'.,.,120998293036515.,.,', 'pl0d/pl0ds.dr', 231
|
2489
|
+
def _ast_9 val
|
1442
2490
|
val[0].push(val[2])
|
1443
|
-
|
1444
|
-
|
1445
|
-
.,.,118754108726175.,.,
|
2491
|
+
end
|
2492
|
+
.,.,120998293036515.,.,
|
1446
2493
|
|
1447
|
-
module_eval <<-'.,.,
|
1448
|
-
|
2494
|
+
module_eval <<-'.,.,120998293030836.,.,', 'pl0d/pl0ds.dr', 236
|
2495
|
+
def _ast_10 val
|
1449
2496
|
Node_const_init.new(val[0].lineno, val[0], val[2])
|
1450
|
-
|
1451
|
-
|
1452
|
-
.,.,118754108751885.,.,
|
2497
|
+
end
|
2498
|
+
.,.,120998293030836.,.,
|
1453
2499
|
|
1454
|
-
module_eval <<-'.,.,
|
1455
|
-
|
2500
|
+
module_eval <<-'.,.,120998293047982.,.,', 'pl0d/pl0ds.dr', 241
|
2501
|
+
def _ast_11 val
|
1456
2502
|
NodeList.new(val[0].lineno, [val[0]])
|
1457
|
-
|
1458
|
-
|
1459
|
-
.,.,118754108731413.,.,
|
2503
|
+
end
|
2504
|
+
.,.,120998293047982.,.,
|
1460
2505
|
|
1461
|
-
module_eval <<-'.,.,
|
1462
|
-
|
2506
|
+
module_eval <<-'.,.,120998293022999.,.,', 'pl0d/pl0ds.dr', 243
|
2507
|
+
def _ast_12 val
|
1463
2508
|
val[0].push(val[2])
|
1464
|
-
|
1465
|
-
|
1466
|
-
.,.,118754108762803.,.,
|
2509
|
+
end
|
2510
|
+
.,.,120998293022999.,.,
|
1467
2511
|
|
1468
|
-
module_eval <<-'.,.,
|
1469
|
-
|
2512
|
+
module_eval <<-'.,.,12099829302646.,.,', 'pl0d/pl0ds.dr', 247
|
2513
|
+
def _ast_13 val
|
1470
2514
|
Node_nop_stmt.new(basis.file.lineno, NodeList.new(basis.file.lineno, []))
|
1471
|
-
|
1472
|
-
|
1473
|
-
.,.,118754108760561.,.,
|
2515
|
+
end
|
2516
|
+
.,.,12099829302646.,.,
|
1474
2517
|
|
1475
|
-
module_eval <<-'.,.,
|
1476
|
-
|
2518
|
+
module_eval <<-'.,.,12099829305298.,.,', 'pl0d/pl0ds.dr', 249
|
2519
|
+
def _ast_14 val
|
1477
2520
|
Node_assign_stmt.new(val[0].lineno, val[0], val[2])
|
1478
|
-
|
1479
|
-
|
1480
|
-
.,.,11875410873504.,.,
|
2521
|
+
end
|
2522
|
+
.,.,12099829305298.,.,
|
1481
2523
|
|
1482
|
-
module_eval <<-'.,.,
|
1483
|
-
|
2524
|
+
module_eval <<-'.,.,120998293020763.,.,', 'pl0d/pl0ds.dr', 251
|
2525
|
+
def _ast_15 val
|
1484
2526
|
Node_begin_stmt.new(val[0].lineno, val[1], val[2])
|
1485
|
-
|
1486
|
-
|
1487
|
-
.,.,118754108713027.,.,
|
2527
|
+
end
|
2528
|
+
.,.,120998293020763.,.,
|
1488
2529
|
|
1489
|
-
module_eval <<-'.,.,
|
1490
|
-
|
2530
|
+
module_eval <<-'.,.,12099829309981.,.,', 'pl0d/pl0ds.dr', 253
|
2531
|
+
def _ast_16 val
|
1491
2532
|
Node_if_stmt.new(val[0].lineno, val[1], val[3])
|
1492
|
-
|
1493
|
-
|
1494
|
-
.,.,118754108719666.,.,
|
2533
|
+
end
|
2534
|
+
.,.,12099829309981.,.,
|
1495
2535
|
|
1496
|
-
module_eval <<-'.,.,
|
1497
|
-
|
2536
|
+
module_eval <<-'.,.,120998293050109.,.,', 'pl0d/pl0ds.dr', 255
|
2537
|
+
def _ast_17 val
|
1498
2538
|
Node_while_stmt.new(val[0].lineno, val[1], val[3])
|
1499
|
-
|
1500
|
-
|
1501
|
-
.,.,118754108739704.,.,
|
2539
|
+
end
|
2540
|
+
.,.,120998293050109.,.,
|
1502
2541
|
|
1503
|
-
module_eval <<-'.,.,
|
1504
|
-
|
2542
|
+
module_eval <<-'.,.,120998293013512.,.,', 'pl0d/pl0ds.dr', 257
|
2543
|
+
def _ast_18 val
|
1505
2544
|
Node_return_stmt.new(val[0].lineno, val[1])
|
1506
|
-
|
1507
|
-
|
1508
|
-
.,.,11875410875794.,.,
|
2545
|
+
end
|
2546
|
+
.,.,120998293013512.,.,
|
1509
2547
|
|
1510
|
-
module_eval <<-'.,.,
|
1511
|
-
|
2548
|
+
module_eval <<-'.,.,120998293056086.,.,', 'pl0d/pl0ds.dr', 259
|
2549
|
+
def _ast_19 val
|
1512
2550
|
Node_apply.new(val[0].lineno, Depager::Token['write'], NodeList.new(val[0].lineno, [val[1]]))
|
1513
|
-
|
1514
|
-
|
1515
|
-
.,.,118754108744227.,.,
|
2551
|
+
end
|
2552
|
+
.,.,120998293056086.,.,
|
1516
2553
|
|
1517
|
-
module_eval <<-'.,.,
|
1518
|
-
|
2554
|
+
module_eval <<-'.,.,120998293043974.,.,', 'pl0d/pl0ds.dr', 261
|
2555
|
+
def _ast_20 val
|
1519
2556
|
Node_apply.new(val[0].lineno, Depager::Token['writeln'], NodeList.new(basis.file.lineno, []))
|
1520
|
-
|
1521
|
-
|
1522
|
-
.,.,118754108763948.,.,
|
2557
|
+
end
|
2558
|
+
.,.,120998293043974.,.,
|
1523
2559
|
|
1524
|
-
module_eval <<-'.,.,
|
1525
|
-
|
2560
|
+
module_eval <<-'.,.,120998293061866.,.,', 'pl0d/pl0ds.dr', 265
|
2561
|
+
def _ast_21 val
|
1526
2562
|
NodeList.new(basis.file.lineno, [])
|
1527
|
-
|
1528
|
-
|
1529
|
-
.,.,118754108740172.,.,
|
2563
|
+
end
|
2564
|
+
.,.,120998293061866.,.,
|
1530
2565
|
|
1531
|
-
module_eval <<-'.,.,
|
1532
|
-
|
2566
|
+
module_eval <<-'.,.,120998293056171.,.,', 'pl0d/pl0ds.dr', 267
|
2567
|
+
def _ast_22 val
|
1533
2568
|
val[0].push(val[2])
|
1534
|
-
|
1535
|
-
|
1536
|
-
.,.,118754108721677.,.,
|
2569
|
+
end
|
2570
|
+
.,.,120998293056171.,.,
|
1537
2571
|
|
1538
|
-
module_eval <<-'.,.,
|
1539
|
-
|
2572
|
+
module_eval <<-'.,.,120998293047443.,.,', 'pl0d/pl0ds.dr', 272
|
2573
|
+
def _ast_23 val
|
1540
2574
|
Node_apply.new(val[0].lineno, Depager::Token['odd'], NodeList.new(val[0].lineno, [val[1]]))
|
1541
|
-
|
1542
|
-
|
1543
|
-
.,.,118754108735202.,.,
|
2575
|
+
end
|
2576
|
+
.,.,120998293047443.,.,
|
1544
2577
|
|
1545
|
-
module_eval <<-'.,.,
|
1546
|
-
|
2578
|
+
module_eval <<-'.,.,12099829302565.,.,', 'pl0d/pl0ds.dr', 274
|
2579
|
+
def _ast_24 val
|
1547
2580
|
Node_apply.new(val[0].lineno, Depager::Token['='], NodeList.new(val[0].lineno, [val[0], val[2]]))
|
1548
|
-
|
1549
|
-
|
1550
|
-
.,.,118754108736535.,.,
|
2581
|
+
end
|
2582
|
+
.,.,12099829302565.,.,
|
1551
2583
|
|
1552
|
-
module_eval <<-'.,.,
|
1553
|
-
|
2584
|
+
module_eval <<-'.,.,12099829301068.,.,', 'pl0d/pl0ds.dr', 276
|
2585
|
+
def _ast_25 val
|
1554
2586
|
Node_apply.new(val[0].lineno, Depager::Token['<>'], NodeList.new(val[0].lineno, [val[0], val[2]]))
|
1555
|
-
|
1556
|
-
|
1557
|
-
.,.,1187541087179.,.,
|
2587
|
+
end
|
2588
|
+
.,.,12099829301068.,.,
|
1558
2589
|
|
1559
|
-
module_eval <<-'.,.,
|
1560
|
-
|
2590
|
+
module_eval <<-'.,.,120998293039924.,.,', 'pl0d/pl0ds.dr', 278
|
2591
|
+
def _ast_26 val
|
1561
2592
|
Node_apply.new(val[0].lineno, Depager::Token['<'], NodeList.new(val[0].lineno, [val[0], val[2]]))
|
1562
|
-
|
1563
|
-
|
1564
|
-
.,.,118754108713463.,.,
|
2593
|
+
end
|
2594
|
+
.,.,120998293039924.,.,
|
1565
2595
|
|
1566
|
-
module_eval <<-'.,.,
|
1567
|
-
|
2596
|
+
module_eval <<-'.,.,120998293038866.,.,', 'pl0d/pl0ds.dr', 280
|
2597
|
+
def _ast_27 val
|
1568
2598
|
Node_apply.new(val[0].lineno, Depager::Token['>'], NodeList.new(val[0].lineno, [val[0], val[2]]))
|
1569
|
-
|
1570
|
-
|
1571
|
-
.,.,118754108751700.,.,
|
2599
|
+
end
|
2600
|
+
.,.,120998293038866.,.,
|
1572
2601
|
|
1573
|
-
module_eval <<-'.,.,
|
1574
|
-
|
2602
|
+
module_eval <<-'.,.,120998293023733.,.,', 'pl0d/pl0ds.dr', 282
|
2603
|
+
def _ast_28 val
|
1575
2604
|
Node_apply.new(val[0].lineno, Depager::Token['<='], NodeList.new(val[0].lineno, [val[0], val[2]]))
|
1576
|
-
|
1577
|
-
|
1578
|
-
.,.,118754108731039.,.,
|
2605
|
+
end
|
2606
|
+
.,.,120998293023733.,.,
|
1579
2607
|
|
1580
|
-
module_eval <<-'.,.,
|
1581
|
-
|
2608
|
+
module_eval <<-'.,.,120998293029020.,.,', 'pl0d/pl0ds.dr', 284
|
2609
|
+
def _ast_29 val
|
1582
2610
|
Node_apply.new(val[0].lineno, Depager::Token['>='], NodeList.new(val[0].lineno, [val[0], val[2]]))
|
1583
|
-
|
1584
|
-
|
1585
|
-
.,.,118754108740869.,.,
|
2611
|
+
end
|
2612
|
+
.,.,120998293029020.,.,
|
1586
2613
|
|
1587
|
-
module_eval <<-'.,.,
|
1588
|
-
|
2614
|
+
module_eval <<-'.,.,12099829302639.,.,', 'pl0d/pl0ds.dr', 289
|
2615
|
+
def _ast_30 val
|
1589
2616
|
Node_apply.new(val[0].lineno, Depager::Token['+'], NodeList.new(val[0].lineno, [val[0], val[2]]))
|
1590
|
-
|
1591
|
-
|
1592
|
-
.,.,118754108740678.,.,
|
2617
|
+
end
|
2618
|
+
.,.,12099829302639.,.,
|
1593
2619
|
|
1594
|
-
module_eval <<-'.,.,
|
1595
|
-
|
2620
|
+
module_eval <<-'.,.,120998293052461.,.,', 'pl0d/pl0ds.dr', 291
|
2621
|
+
def _ast_31 val
|
1596
2622
|
Node_apply.new(val[0].lineno, Depager::Token['-'], NodeList.new(val[0].lineno, [val[0], val[2]]))
|
1597
|
-
|
1598
|
-
|
1599
|
-
.,.,118754108737097.,.,
|
2623
|
+
end
|
2624
|
+
.,.,120998293052461.,.,
|
1600
2625
|
|
1601
|
-
module_eval <<-'.,.,
|
1602
|
-
|
2626
|
+
module_eval <<-'.,.,120998293012310.,.,', 'pl0d/pl0ds.dr', 293
|
2627
|
+
def _ast_32 val
|
1603
2628
|
val[0]
|
1604
|
-
|
1605
|
-
|
1606
|
-
.,.,118754108740133.,.,
|
2629
|
+
end
|
2630
|
+
.,.,120998293012310.,.,
|
1607
2631
|
|
1608
|
-
module_eval <<-'.,.,
|
1609
|
-
|
2632
|
+
module_eval <<-'.,.,12099829309705.,.,', 'pl0d/pl0ds.dr', 295
|
2633
|
+
def _ast_33 val
|
1610
2634
|
Node_apply.new(val[0].lineno, Depager::Token['UMINUS'], NodeList.new(val[0].lineno, [val[1]]))
|
1611
|
-
|
1612
|
-
|
1613
|
-
.,.,118754108740085.,.,
|
2635
|
+
end
|
2636
|
+
.,.,12099829309705.,.,
|
1614
2637
|
|
1615
|
-
module_eval <<-'.,.,
|
1616
|
-
|
2638
|
+
module_eval <<-'.,.,120998293050902.,.,', 'pl0d/pl0ds.dr', 300
|
2639
|
+
def _ast_34 val
|
1617
2640
|
Node_apply.new(val[0].lineno, Depager::Token['*'], NodeList.new(val[0].lineno, [val[0], val[2]]))
|
1618
|
-
|
1619
|
-
|
1620
|
-
.,.,118754108751372.,.,
|
2641
|
+
end
|
2642
|
+
.,.,120998293050902.,.,
|
1621
2643
|
|
1622
|
-
module_eval <<-'.,.,
|
1623
|
-
|
2644
|
+
module_eval <<-'.,.,120998293030588.,.,', 'pl0d/pl0ds.dr', 302
|
2645
|
+
def _ast_35 val
|
1624
2646
|
Node_apply.new(val[0].lineno, Depager::Token['/'], NodeList.new(val[0].lineno, [val[0], val[2]]))
|
1625
|
-
|
1626
|
-
|
1627
|
-
.,.,118754108734661.,.,
|
2647
|
+
end
|
2648
|
+
.,.,120998293030588.,.,
|
1628
2649
|
|
1629
|
-
module_eval <<-'.,.,
|
1630
|
-
|
2650
|
+
module_eval <<-'.,.,120998293042608.,.,', 'pl0d/pl0ds.dr', 304
|
2651
|
+
def _ast_36 val
|
1631
2652
|
val[0]
|
1632
|
-
|
1633
|
-
|
1634
|
-
.,.,118754108749541.,.,
|
2653
|
+
end
|
2654
|
+
.,.,120998293042608.,.,
|
1635
2655
|
|
1636
|
-
module_eval <<-'.,.,
|
1637
|
-
|
2656
|
+
module_eval <<-'.,.,120998293040243.,.,', 'pl0d/pl0ds.dr', 309
|
2657
|
+
def _ast_37 val
|
1638
2658
|
Node_refv.new(val[0].lineno, val[0])
|
1639
|
-
|
1640
|
-
|
1641
|
-
.,.,118754108723290.,.,
|
2659
|
+
end
|
2660
|
+
.,.,120998293040243.,.,
|
1642
2661
|
|
1643
|
-
module_eval <<-'.,.,
|
1644
|
-
|
2662
|
+
module_eval <<-'.,.,120998293051665.,.,', 'pl0d/pl0ds.dr', 311
|
2663
|
+
def _ast_38 val
|
1645
2664
|
Node_number.new(val[0].lineno, val[0])
|
1646
|
-
|
1647
|
-
|
1648
|
-
.,.,118754108715292.,.,
|
2665
|
+
end
|
2666
|
+
.,.,120998293051665.,.,
|
1649
2667
|
|
1650
|
-
module_eval <<-'.,.,
|
1651
|
-
|
2668
|
+
module_eval <<-'.,.,120998293051059.,.,', 'pl0d/pl0ds.dr', 313
|
2669
|
+
def _ast_39 val
|
1652
2670
|
Node_apply.new(val[0].lineno, val[0], NodeList.new(basis.file.lineno, []))
|
1653
|
-
|
1654
|
-
|
1655
|
-
.,.,118754108760976.,.,
|
2671
|
+
end
|
2672
|
+
.,.,120998293051059.,.,
|
1656
2673
|
|
1657
|
-
module_eval <<-'.,.,
|
1658
|
-
|
2674
|
+
module_eval <<-'.,.,120998293058561.,.,', 'pl0d/pl0ds.dr', 315
|
2675
|
+
def _ast_40 val
|
1659
2676
|
Node_apply.new(val[0].lineno, val[0], val[2])
|
1660
|
-
|
1661
|
-
|
1662
|
-
.,.,118754108756282.,.,
|
2677
|
+
end
|
2678
|
+
.,.,120998293058561.,.,
|
1663
2679
|
|
1664
|
-
module_eval <<-'.,.,
|
1665
|
-
|
2680
|
+
module_eval <<-'.,.,120998293057987.,.,', 'pl0d/pl0ds.dr', 317
|
2681
|
+
def _ast_41 val
|
1666
2682
|
val[1]
|
1667
|
-
|
1668
|
-
|
1669
|
-
.,.,11875410872866.,.,
|
2683
|
+
end
|
2684
|
+
.,.,120998293057987.,.,
|
1670
2685
|
|
1671
|
-
module_eval <<-'.,.,
|
1672
|
-
|
2686
|
+
module_eval <<-'.,.,120998293032376.,.,', 'pl0d/pl0ds.dr', 322
|
2687
|
+
def _ast_42 val
|
1673
2688
|
NodeList.new(val[0].lineno, [val[0]])
|
1674
|
-
|
1675
|
-
|
1676
|
-
.,.,118754108711379.,.,
|
2689
|
+
end
|
2690
|
+
.,.,120998293032376.,.,
|
1677
2691
|
|
1678
|
-
module_eval <<-'.,.,
|
1679
|
-
|
2692
|
+
module_eval <<-'.,.,120998293064182.,.,', 'pl0d/pl0ds.dr', 324
|
2693
|
+
def _ast_43 val
|
1680
2694
|
val[0].push(val[2])
|
1681
|
-
|
1682
|
-
|
1683
|
-
.,.,118754108743061.,.,
|
2695
|
+
end
|
2696
|
+
.,.,120998293064182.,.,
|
1684
2697
|
|
1685
2698
|
end
|
1686
2699
|
|
1687
2700
|
|
1688
2701
|
def createDecoratedPL0d
|
1689
|
-
D4PL0d::
|
2702
|
+
D4PL0d::ASTBuilder.new(PL0d.new())
|
1690
2703
|
end
|
1691
2704
|
|
1692
2705
|
### main
|