depager 0.2.3 → 0.3.0.b20160729
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.en +4 -19
- data/README.ja +42 -79
- data/bin/depager +42 -45
- data/examples/action_pl0d/pl0d.action.dr +421 -0
- data/examples/action_pl0d/test.pl0ds +49 -0
- data/examples/c89/c89.dr +493 -496
- data/examples/c89/test.c89 +10 -10
- data/examples/extension/astdf.rb +10 -0
- data/examples/extension/atree.dr +55 -0
- data/examples/{sample_calc → extension}/calc.atree.dr +42 -43
- data/examples/extension/calc.simple_action.dr +33 -0
- data/examples/extension/paction.dr +16 -15
- data/examples/extension/pactiontest.dr +14 -14
- data/examples/extension/simple_action.rb +44 -0
- data/examples/pl0d/pl0ds.dr +337 -334
- data/examples/pl0d/test.pl0ds +33 -33
- data/examples/rie_calc/calc.rie.dr +57 -0
- data/examples/rie_calc/test.calc +4 -0
- data/examples/rie_dcuse/dcuse.rie.dr +71 -0
- data/examples/rie_dcuse/test.dcuse +1 -0
- data/examples/rie_pl0/orig_ex/exerrdg.pl0 +44 -0
- data/examples/rie_pl0/orig_ex/exerrm.pl0 +19 -0
- data/examples/rie_pl0/orig_ex/exerrmre.pl0 +20 -0
- data/examples/rie_pl0/orig_ex/exerrtok.pl0 +18 -0
- data/examples/rie_pl0/orig_ex/exmdg.pl0 +40 -0
- data/examples/rie_pl0/orig_ex/exmdgwwl.pl0 +43 -0
- data/examples/rie_pl0/orig_ex/exmrw.pl0 +22 -0
- data/examples/rie_pl0/orig_ex/exmwwl.pl0 +18 -0
- data/examples/rie_pl0/orig_ex/exnorw.pl0 +17 -0
- data/examples/rie_pl0/pl0.rie.dr +450 -0
- data/examples/rie_pl0/test.pl0 +10 -0
- data/examples/sample_calc/calc.action.dr +33 -33
- data/examples/sample_calc/calc.ast.action.dr +65 -66
- data/examples/sample_calc/calc.ast.dr +55 -55
- data/examples/sample_calc/calc.cst.dr +45 -45
- data/examples/sample_calc/calc.dr +43 -43
- data/examples/sample_calc/calc.lex.dr +29 -29
- data/examples/sample_calc/{calc_prec.nvaction.dr → calc_prec.action.dr} +31 -31
- data/examples/slex_test/divreg.slex.dr +29 -29
- data/examples/slex_test/ljoin.slex.dr +36 -36
- data/examples/slex_test/test.divreg +1 -1
- data/examples/slex_test/test.ljoin +3 -3
- data/lib/depager.rb +582 -670
- data/lib/depager/grammar.rb +256 -291
- data/lib/depager/lr.rb +574 -579
- data/lib/depager/parser.rb +282 -277
- data/lib/depager/ruby/plugins/_rie_debug.rb +35 -0
- data/lib/depager/ruby/plugins/action.rb +53 -43
- data/lib/depager/ruby/plugins/ast.dr +364 -269
- data/lib/depager/ruby/plugins/ast.rb +1367 -1308
- data/lib/depager/ruby/plugins/cst.dr +172 -180
- data/lib/depager/ruby/plugins/cst.rb +587 -626
- data/lib/depager/ruby/plugins/lex.dr +85 -89
- data/lib/depager/ruby/plugins/lex.rb +310 -336
- data/lib/depager/ruby/plugins/rie.dr +723 -0
- data/lib/depager/ruby/plugins/rie.rb +1653 -0
- data/lib/depager/ruby/plugins/slex.dr +202 -200
- data/lib/depager/ruby/plugins/slex.rb +780 -817
- data/lib/depager/ruby/plugins/srp.rb +56 -51
- data/lib/depager/ruby/templates/extension_lalr_master.erb +46 -51
- data/lib/depager/ruby/templates/extension_lalr_slave.erb +99 -107
- data/lib/depager/ruby/templates/single_lalr_parser.erb +115 -117
- data/lib/depager/utils.rb +148 -318
- data/lib/depager/version.rb +4 -3
- metadata +52 -60
- data/ChangeLog +0 -16
- data/data/depager/pre-setup.rb +0 -3
- data/examples/c89/c89.tab.rb +0 -7127
- data/examples/pl0d/pl0ds.tab.rb +0 -2698
- data/examples/sample_calc/calc.action.tab.rb +0 -457
- data/examples/sample_calc/calc.ast.action.tab.rb +0 -749
- data/examples/sample_calc/calc.ast.tab.rb +0 -665
- data/examples/sample_calc/calc.astdf.dr +0 -54
- data/examples/sample_calc/calc.astdf.tab.rb +0 -672
- data/examples/sample_calc/calc.atree.tab.rb +0 -451
- data/examples/sample_calc/calc.cst.tab.rb +0 -644
- data/examples/sample_calc/calc.lex.tab.rb +0 -374
- data/examples/sample_calc/calc.nvaction.dr +0 -33
- data/examples/sample_calc/calc.nvaction.tab.rb +0 -465
- data/examples/sample_calc/calc.tab.rb +0 -365
- data/examples/sample_calc/calc_prec.nvaction.tab.rb +0 -431
- data/examples/slex_test/divreg.slex.tab.rb +0 -303
- data/examples/slex_test/ljoin.slex.tab.rb +0 -370
- data/lib/depager/ruby/plugins/_ast_tmpl.rb +0 -73
- data/lib/depager/ruby/plugins/astdf.rb +0 -6
- data/lib/depager/ruby/plugins/atree.dr +0 -55
- data/lib/depager/ruby/plugins/atree.rb +0 -347
- data/lib/depager/ruby/plugins/nvaction.rb +0 -19
- data/lib/depager/ruby/templates/simple.erb +0 -23
- data/setup.rb +0 -1585
@@ -1,73 +0,0 @@
|
|
1
|
-
class ASTBuilderExtension
|
2
|
-
TMPL_NODE_BASE = <<EOS
|
3
|
-
class Node
|
4
|
-
attr_accessor :lineno
|
5
|
-
attr_accessor <%= _opt_attr.map{|i| ":\#{i}" }.join(', ') %>
|
6
|
-
<%= ini %>
|
7
|
-
def self.[] lineno, *args
|
8
|
-
self.new lineno, *args
|
9
|
-
end
|
10
|
-
def accept v
|
11
|
-
end
|
12
|
-
end
|
13
|
-
class NodeList < Node
|
14
|
-
attr_accessor :lineno
|
15
|
-
def initialize(lineno, lst=[])
|
16
|
-
@lineno = lineno
|
17
|
-
@lst = lst.to_a.select{|i| ! i.is_a?(NilNode)}
|
18
|
-
end
|
19
|
-
<% _opt_attr.each do |i| %>
|
20
|
-
def all_<%= i %>
|
21
|
-
@lst.map{|i| i.<%= i %>}
|
22
|
-
end
|
23
|
-
<% end %>
|
24
|
-
def size
|
25
|
-
@lst.size
|
26
|
-
end
|
27
|
-
alias length size
|
28
|
-
def push(i)
|
29
|
-
@lst.push i unless i.is_a? NilNode
|
30
|
-
self
|
31
|
-
end
|
32
|
-
def concat(i)
|
33
|
-
@lst.concat i
|
34
|
-
self
|
35
|
-
end
|
36
|
-
def to_ary()
|
37
|
-
@lst
|
38
|
-
end
|
39
|
-
alias to_a to_ary
|
40
|
-
alias list to_ary
|
41
|
-
def accept(v)
|
42
|
-
@lst.each{|i| i.accept(v) }
|
43
|
-
end
|
44
|
-
end
|
45
|
-
class NilNode
|
46
|
-
attr_accessor :lineno
|
47
|
-
attr_accessor <%= _opt_attr.map{|i| ":\#{i}" }.join(', ') %>
|
48
|
-
def initialize(lineno, *args)
|
49
|
-
@lineno = lineno
|
50
|
-
end
|
51
|
-
def accept v
|
52
|
-
end
|
53
|
-
end
|
54
|
-
EOS
|
55
|
-
|
56
|
-
TMPL_NODE = <<EOS
|
57
|
-
class Node_<%= name %> < Node
|
58
|
-
attr_accessor <%= nodes.map{|i| ":\#{i}" }.join(', ') %>
|
59
|
-
attr_accessor <%= attrs.map{|i| ":\#{i}" }.join(', ') %>
|
60
|
-
def initialize <%= nodes.unshift('lineno').join(', ') %>
|
61
|
-
super()
|
62
|
-
@lineno = lineno
|
63
|
-
<%= nodes.inject(''){|r,i| r << " @\#{i} = \#{i}\n"} %>
|
64
|
-
end
|
65
|
-
def accept v
|
66
|
-
warn @lineno.to_s+':'+self.class.to_s if $DEBUG
|
67
|
-
<%= accept %>
|
68
|
-
v.visit_Node_<%= name %>(self)
|
69
|
-
self
|
70
|
-
end
|
71
|
-
end
|
72
|
-
EOS
|
73
|
-
end
|
@@ -1,55 +0,0 @@
|
|
1
|
-
%defext ATreeBuilderExtension
|
2
|
-
%extend NVAction ('plugins/nvaction.rb')
|
3
|
-
%extend Lexer ('plugins/lex.rb')
|
4
|
-
%decorate @NVAction
|
5
|
-
#%decorate ShiftReducePrinter ('plugins/srp.rb')
|
6
|
-
%inner{
|
7
|
-
attr_accessor :optouter, :on_reduce
|
8
|
-
def init_parser
|
9
|
-
@optouter = []
|
10
|
-
@on_reduce = []
|
11
|
-
end
|
12
|
-
def post_rule_list
|
13
|
-
g_parser.optouter <<
|
14
|
-
gen_action_decorator_code(target_name, paramkey,
|
15
|
-
@on_reduce, @optouter)
|
16
|
-
end
|
17
|
-
%}
|
18
|
-
%hook post_rhs
|
19
|
-
%banner '=>...'
|
20
|
-
%%
|
21
|
-
%LEX{
|
22
|
-
/[ \t]+/ { }
|
23
|
-
/\n/ { yield nil, nil }
|
24
|
-
/[a-zA-Z][a-zA-Z0-9_]*/ { yield :ID, Token[$&, lineno] }
|
25
|
-
/'(.+)'/ { yield :STR, Token[$1, lineno] }
|
26
|
-
/::/ { yield :CC, Token[$&, lineno] }
|
27
|
-
/=>/ { yield :EG, Token[$&, lineno] }
|
28
|
-
/./ { yield $&, Token[$&, lineno] }
|
29
|
-
%}
|
30
|
-
|
31
|
-
#begin-rule
|
32
|
-
start:
|
33
|
-
EG ast
|
34
|
-
{
|
35
|
-
n = master.nrules
|
36
|
-
master.optouter <<
|
37
|
-
master.gen_defm_code("_atree_#{n} val", _ast, _EG.lineno)
|
38
|
-
master.on_reduce[n] = ":_atree_#{n}"
|
39
|
-
}
|
40
|
-
;
|
41
|
-
ast:
|
42
|
-
ID '(' ')' { "[:#{_ID.value}]" }
|
43
|
-
| ID '(' fact_list ')' { "[:#{_ID.value}, #{_fact_list.join(',')}]" }
|
44
|
-
| ID { "val[#{g_parser.name_to_rhs_index(_ID.value)}]" }
|
45
|
-
;
|
46
|
-
fact_list:
|
47
|
-
fact { [ _fact ] }
|
48
|
-
| fact_list ',' fact { _fact_list.push _fact }
|
49
|
-
;
|
50
|
-
fact:
|
51
|
-
ID { "val[#{g_parser.name_to_rhs_index(_ID.value)}]" }
|
52
|
-
| STR { "'#{_STR.value}'" }
|
53
|
-
;
|
54
|
-
#end-rule
|
55
|
-
%%
|
@@ -1,347 +0,0 @@
|
|
1
|
-
|
2
|
-
###
|
3
|
-
### ATreeBuilderExtension - Depager Extension (master)
|
4
|
-
###
|
5
|
-
require 'pp.rb'
|
6
|
-
require 'depager/parser.rb'
|
7
|
-
|
8
|
-
|
9
|
-
module D4ATreeBuilderExtension #:nodoc:all
|
10
|
-
end
|
11
|
-
|
12
|
-
class ATreeBuilderExtension #:nodoc:all
|
13
|
-
include Depager::ExtensionUtils
|
14
|
-
|
15
|
-
attr_accessor :h2p
|
16
|
-
|
17
|
-
def initialize
|
18
|
-
@master = self
|
19
|
-
@hook = []
|
20
|
-
@h2p = {}
|
21
|
-
init_parser
|
22
|
-
end
|
23
|
-
|
24
|
-
def __regext__ p
|
25
|
-
super p, :default, nil
|
26
|
-
|
27
|
-
@hook[0] = ATreeBuilderExtension_post_rhs.new(p, @nparam, self)
|
28
|
-
@h2p['post_rhs'] = @hook[0]
|
29
|
-
p.hooks[:post_rhs].push [@hook[0], :do_parse]
|
30
|
-
|
31
|
-
regext p
|
32
|
-
end
|
33
|
-
|
34
|
-
### Inner Code
|
35
|
-
attr_accessor :optouter, :on_reduce
|
36
|
-
def init_parser
|
37
|
-
@optouter = []
|
38
|
-
@on_reduce = []
|
39
|
-
end
|
40
|
-
def post_rule_list
|
41
|
-
g_parser.optouter <<
|
42
|
-
gen_action_decorator_code(target_name, paramkey,
|
43
|
-
@on_reduce, @optouter)
|
44
|
-
end
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
### Outer Code
|
49
|
-
|
50
|
-
###
|
51
|
-
### ATreeBuilderExtension_post_rhs - Part of Depager Extension (slave)
|
52
|
-
###
|
53
|
-
module D4ATreeBuilderExtension_post_rhs #:nodoc:all
|
54
|
-
end
|
55
|
-
|
56
|
-
class ATreeBuilderExtension_post_rhs < Depager::LALR::Basis #:nodoc:all
|
57
|
-
include Depager::ExtensionUtils
|
58
|
-
|
59
|
-
|
60
|
-
### Reduce Table
|
61
|
-
reduce_table = [
|
62
|
-
[ -1, 1 ],
|
63
|
-
[ 0, 2 ],
|
64
|
-
[ 1, 3 ],
|
65
|
-
[ 1, 4 ],
|
66
|
-
[ 1, 1 ],
|
67
|
-
[ 2, 1 ],
|
68
|
-
[ 2, 3 ],
|
69
|
-
[ 3, 1 ],
|
70
|
-
[ 3, 1 ],
|
71
|
-
]
|
72
|
-
### Extension Params
|
73
|
-
nparams = {
|
74
|
-
'NVAction' => 2,
|
75
|
-
}
|
76
|
-
### Term to Int
|
77
|
-
t2i = {
|
78
|
-
nil => 0,
|
79
|
-
false => 1,
|
80
|
-
:EG => 2,
|
81
|
-
:ID => 3,
|
82
|
-
"(" => 4,
|
83
|
-
")" => 5,
|
84
|
-
"," => 6,
|
85
|
-
:STR => 7,
|
86
|
-
}
|
87
|
-
### Int to Term
|
88
|
-
i2t = [
|
89
|
-
nil,
|
90
|
-
false,
|
91
|
-
:EG,
|
92
|
-
:ID,
|
93
|
-
"(",
|
94
|
-
")",
|
95
|
-
",",
|
96
|
-
:STR,
|
97
|
-
]
|
98
|
-
### Action Table
|
99
|
-
action_table = [
|
100
|
-
[ nil, nil, 2, nil, nil, nil, nil, nil, ],
|
101
|
-
[ ACC, nil, nil, nil, nil, nil, nil, nil, ],
|
102
|
-
[ nil, nil, nil, 4, nil, nil, nil, nil, ],
|
103
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, ],
|
104
|
-
[ nil, nil, nil, nil, 5, nil, nil, nil, ],
|
105
|
-
[ nil, nil, nil, 7, nil, 10, nil, 6, ],
|
106
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, ],
|
107
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, ],
|
108
|
-
[ nil, nil, nil, nil, nil, 12, 11, nil, ],
|
109
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, ],
|
110
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, ],
|
111
|
-
[ nil, nil, nil, 7, nil, nil, nil, 6, ],
|
112
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, ],
|
113
|
-
[ nil, nil, nil, nil, nil, nil, nil, nil, ],
|
114
|
-
]
|
115
|
-
### Default Reduce Table
|
116
|
-
defred_table = [
|
117
|
-
nil,
|
118
|
-
nil,
|
119
|
-
nil,
|
120
|
-
-1,
|
121
|
-
-4,
|
122
|
-
nil,
|
123
|
-
-8,
|
124
|
-
-7,
|
125
|
-
nil,
|
126
|
-
-5,
|
127
|
-
-2,
|
128
|
-
nil,
|
129
|
-
-3,
|
130
|
-
-6,
|
131
|
-
]
|
132
|
-
defred_after_shift_table = [
|
133
|
-
nil,
|
134
|
-
nil,
|
135
|
-
nil,
|
136
|
-
-1,
|
137
|
-
nil,
|
138
|
-
nil,
|
139
|
-
-8,
|
140
|
-
-7,
|
141
|
-
nil,
|
142
|
-
-5,
|
143
|
-
-2,
|
144
|
-
nil,
|
145
|
-
-3,
|
146
|
-
-6,
|
147
|
-
]
|
148
|
-
### Nonterm to Int
|
149
|
-
nt2i = {
|
150
|
-
:start => 0,
|
151
|
-
:ast => 1,
|
152
|
-
:fact_list => 2,
|
153
|
-
:fact => 3,
|
154
|
-
}
|
155
|
-
### Int to Nonterm
|
156
|
-
i2nt = [
|
157
|
-
:start,
|
158
|
-
:ast,
|
159
|
-
:fact_list,
|
160
|
-
:fact,
|
161
|
-
]
|
162
|
-
### Goto Table
|
163
|
-
goto_table = [
|
164
|
-
[ 1, nil, nil, nil, ],
|
165
|
-
[ nil, nil, nil, nil, ],
|
166
|
-
[ nil, 3, nil, nil, ],
|
167
|
-
[ nil, nil, nil, nil, ],
|
168
|
-
[ nil, nil, nil, nil, ],
|
169
|
-
[ nil, nil, 8, 9, ],
|
170
|
-
[ nil, nil, nil, nil, ],
|
171
|
-
[ nil, nil, nil, nil, ],
|
172
|
-
[ nil, nil, nil, nil, ],
|
173
|
-
[ nil, nil, nil, nil, ],
|
174
|
-
[ nil, nil, nil, nil, ],
|
175
|
-
[ nil, nil, nil, 13, ],
|
176
|
-
[ nil, nil, nil, nil, ],
|
177
|
-
[ nil, nil, nil, nil, ],
|
178
|
-
]
|
179
|
-
|
180
|
-
Tables = [ reduce_table, nparams, action_table,
|
181
|
-
defred_table, defred_after_shift_table, goto_table,
|
182
|
-
t2i, i2t, nt2i, i2nt ]
|
183
|
-
|
184
|
-
attr_accessor :p, :m
|
185
|
-
def initialize p, nparam, master = nil
|
186
|
-
super()
|
187
|
-
@g_parser = @p = p
|
188
|
-
@master = @m = master
|
189
|
-
@nparam = nparam
|
190
|
-
@dect = D4ATreeBuilderExtension_post_rhs::NVAction.new(self)
|
191
|
-
init_parser
|
192
|
-
end
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
def banner
|
197
|
-
"=>... / #{@master.class.name}"
|
198
|
-
end
|
199
|
-
|
200
|
-
### Inner Code
|
201
|
-
|
202
|
-
def lex
|
203
|
-
begin
|
204
|
-
until @line.empty?
|
205
|
-
case @line
|
206
|
-
|
207
|
-
when /\A[ \t]+/
|
208
|
-
@oldline = @line; @line = $'
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
when /\A\n/
|
213
|
-
@oldline = @line; @line = $'
|
214
|
-
yield nil, nil
|
215
|
-
|
216
|
-
|
217
|
-
when /\A[a-zA-Z][a-zA-Z0-9_]*/
|
218
|
-
@oldline = @line; @line = $'
|
219
|
-
yield :ID, Token[$&, lineno]
|
220
|
-
|
221
|
-
|
222
|
-
when /\A'(.+)'/
|
223
|
-
@oldline = @line; @line = $'
|
224
|
-
yield :STR, Token[$1, lineno]
|
225
|
-
|
226
|
-
|
227
|
-
when /\A::/
|
228
|
-
@oldline = @line; @line = $'
|
229
|
-
yield :CC, Token[$&, lineno]
|
230
|
-
|
231
|
-
|
232
|
-
when /\A=>/
|
233
|
-
@oldline = @line; @line = $'
|
234
|
-
yield :EG, Token[$&, lineno]
|
235
|
-
|
236
|
-
|
237
|
-
when /\A./
|
238
|
-
@oldline = @line; @line = $'
|
239
|
-
yield $&, Token[$&, lineno]
|
240
|
-
|
241
|
-
|
242
|
-
else
|
243
|
-
raise RuntimeError, "must not happen #{@line}"
|
244
|
-
end
|
245
|
-
end
|
246
|
-
end while @line0 = @line = getline
|
247
|
-
yield nil, nil
|
248
|
-
end
|
249
|
-
|
250
|
-
end
|
251
|
-
|
252
|
-
### Outer Code
|
253
|
-
|
254
|
-
class D4ATreeBuilderExtension_post_rhs::NVAction < Depager::LALR::Action #:nodoc:all
|
255
|
-
include Depager::DecoratorUtils
|
256
|
-
|
257
|
-
on_reduce = [
|
258
|
-
nil,
|
259
|
-
:_act_0,
|
260
|
-
:_act_1,
|
261
|
-
:_act_2,
|
262
|
-
:_act_3,
|
263
|
-
:_act_4,
|
264
|
-
:_act_5,
|
265
|
-
:_act_6,
|
266
|
-
:_act_7,
|
267
|
-
|
268
|
-
]
|
269
|
-
Tables = [on_reduce]
|
270
|
-
def initialize inside
|
271
|
-
super inside, 'NVAction'
|
272
|
-
@on_reduce, = self.class::Tables
|
273
|
-
init_parser
|
274
|
-
end
|
275
|
-
|
276
|
-
|
277
|
-
module_eval <<-'.,.,122745803312021.,.,', 'atree.dr', 32
|
278
|
-
def _act_0 val
|
279
|
-
_EG, _ast, = *val
|
280
|
-
|
281
|
-
n = master.nrules
|
282
|
-
master.optouter <<
|
283
|
-
master.gen_defm_code("_atree_#{n} val", _ast, _EG.lineno)
|
284
|
-
master.on_reduce[n] = ":_atree_#{n}"
|
285
|
-
|
286
|
-
end
|
287
|
-
.,.,122745803312021.,.,
|
288
|
-
|
289
|
-
module_eval <<-'.,.,122745803352334.,.,', 'atree.dr', 40
|
290
|
-
def _act_1 val
|
291
|
-
_ID, _, _, = *val
|
292
|
-
"[:#{_ID.value}]"
|
293
|
-
|
294
|
-
end
|
295
|
-
.,.,122745803352334.,.,
|
296
|
-
|
297
|
-
module_eval <<-'.,.,122745803310141.,.,', 'atree.dr', 41
|
298
|
-
def _act_2 val
|
299
|
-
_ID, _, _fact_list, _, = *val
|
300
|
-
"[:#{_ID.value}, #{_fact_list.join(',')}]"
|
301
|
-
|
302
|
-
end
|
303
|
-
.,.,122745803310141.,.,
|
304
|
-
|
305
|
-
module_eval <<-'.,.,12274580336943.,.,', 'atree.dr', 42
|
306
|
-
def _act_3 val
|
307
|
-
_ID, = *val
|
308
|
-
"val[#{g_parser.name_to_rhs_index(_ID.value)}]"
|
309
|
-
|
310
|
-
end
|
311
|
-
.,.,12274580336943.,.,
|
312
|
-
|
313
|
-
module_eval <<-'.,.,122745803340243.,.,', 'atree.dr', 45
|
314
|
-
def _act_4 val
|
315
|
-
_fact, = *val
|
316
|
-
[ _fact ]
|
317
|
-
|
318
|
-
end
|
319
|
-
.,.,122745803340243.,.,
|
320
|
-
|
321
|
-
module_eval <<-'.,.,122745803340227.,.,', 'atree.dr', 46
|
322
|
-
def _act_5 val
|
323
|
-
_fact_list, _, _fact, = *val
|
324
|
-
_fact_list.push _fact
|
325
|
-
|
326
|
-
end
|
327
|
-
.,.,122745803340227.,.,
|
328
|
-
|
329
|
-
module_eval <<-'.,.,122745803346290.,.,', 'atree.dr', 49
|
330
|
-
def _act_6 val
|
331
|
-
_ID, = *val
|
332
|
-
"val[#{g_parser.name_to_rhs_index(_ID.value)}]"
|
333
|
-
|
334
|
-
end
|
335
|
-
.,.,122745803346290.,.,
|
336
|
-
|
337
|
-
module_eval <<-'.,.,122745803310739.,.,', 'atree.dr', 50
|
338
|
-
def _act_7 val
|
339
|
-
_STR, = *val
|
340
|
-
"'#{_STR.value}'"
|
341
|
-
|
342
|
-
end
|
343
|
-
.,.,122745803310739.,.,
|
344
|
-
|
345
|
-
end
|
346
|
-
|
347
|
-
|