myco 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/myco/bootstrap/find_constant.rb +4 -11
- data/lib/myco/code_loader.rb +2 -1
- data/lib/myco/code_tools/AST/ConstantAccess.my +47 -3
- data/lib/myco/code_tools/AST/ConstantAccess.my.rb +13 -9
- data/lib/myco/code_tools/AST/ConstantAssignment.my +1 -5
- data/lib/myco/code_tools/AST/ConstantAssignment.my.rb +3 -9
- data/lib/myco/code_tools/AST/ToRuby.my +5 -2
- data/lib/myco/code_tools/AST/ToRuby.my.rb +7 -3
- data/lib/myco/code_tools/AST.my +1 -0
- data/lib/myco/code_tools/AST.my.rb +9 -1
- data/lib/myco/code_tools/Parser.my +24 -0
- data/lib/myco/code_tools/Parser.my.rb +25 -0
- data/lib/myco/code_tools/parser/MycoBuilder.my +67 -0
- data/lib/myco/code_tools/parser/MycoBuilder.my.rb +99 -0
- data/lib/myco/code_tools/parser/MycoCharacterClasses.my +20 -0
- data/lib/myco/code_tools/parser/MycoCharacterClasses.my.rb +56 -0
- data/lib/myco/code_tools/parser/MycoGrammar.my +564 -0
- data/lib/myco/code_tools/parser/MycoGrammar.my.rb +1851 -0
- data/lib/myco/code_tools/parser/MycoTokens.my +78 -0
- data/lib/myco/code_tools/parser/MycoTokens.my.rb +170 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Builder.my +4 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Builder.my.rb +5 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeHelpers.my +142 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeHelpers.my.rb +181 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeInstructions.my +420 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeInstructions.my.rb +415 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeParser.my +137 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/BytecodeParser.my.rb +237 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Constructions.my +183 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Constructions.my.rb +370 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Grammar.my +65 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Grammar.my.rb +83 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Instructions.my +139 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Instructions.my.rb +284 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Machine.my +37 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Machine.my.rb +24 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Parser.my +42 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Parser.my.rb +52 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Patterns.my +123 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Patterns.my.rb +164 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Processor.my +236 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces/Processor.my.rb +339 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces.my +15 -0
- data/lib/myco/code_tools/parser/pegleromyces/lib/pegleromyces.my.rb +14 -0
- data/lib/myco/code_tools.rb +1 -1
- data/lib/myco/version.rb +1 -1
- data/lib/myco.rb +2 -0
- metadata +44 -25
- data/lib/myco/code_tools/parser/peg_parser.rb +0 -7182
- data/lib/myco/code_tools/parser.rb +0 -39
@@ -0,0 +1,1851 @@
|
|
1
|
+
|
2
|
+
::Myco::Component.new([::Myco::FileToplevel], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
3
|
+
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
4
|
+
declare_meme(:"MycoCharacterClasses.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
|
5
|
+
declare_meme(:"MycoTokens.my", [[:import, []]], nil, ::Myco.cscope.dup) { |*| nil}
|
6
|
+
::Myco.cscope.for_method_definition.const_set(:MycoGrammar, (::Myco::Component.new([::Myco.find_constant(:Pegleromyces)::Grammar], ::Myco.cscope.for_method_definition, __FILE__, __LINE__)
|
7
|
+
.tap { |__c__| __c__.__last__ = __c__.component_eval {(
|
8
|
+
::Myco.cscope.for_method_definition.const_set(:C, (::Myco.find_constant(:MycoCharacterClasses)))
|
9
|
+
::Myco.cscope.for_method_definition.const_set(:T, (::Myco.find_constant(:MycoTokens)))
|
10
|
+
__category__(:rules).component_eval {(
|
11
|
+
declare_meme(:root, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.declobj_expr_body.__send__(
|
12
|
+
:[],
|
13
|
+
:n0
|
14
|
+
)) { || (self.ast.declfile(
|
15
|
+
self.__send__(:n0),
|
16
|
+
self.__send__(:n0)
|
17
|
+
))}.__send__(
|
18
|
+
:[],
|
19
|
+
:root
|
20
|
+
))}
|
21
|
+
declare_meme(:decl, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.declobj.__send__(
|
22
|
+
:/,
|
23
|
+
self.declstr
|
24
|
+
).__send__(
|
25
|
+
:/,
|
26
|
+
self.copen
|
27
|
+
))}
|
28
|
+
declare_meme(:declobj_expr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.category.__send__(
|
29
|
+
:/,
|
30
|
+
self.declobj_expr_not_category
|
31
|
+
))}
|
32
|
+
declare_meme(:declobj_expr_not_category, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.decl.__send__(
|
33
|
+
:/,
|
34
|
+
self.cdefn
|
35
|
+
).__send__(
|
36
|
+
:/,
|
37
|
+
self.cmeme
|
38
|
+
).__send__(
|
39
|
+
:/,
|
40
|
+
self.constant
|
41
|
+
).__send__(
|
42
|
+
:/,
|
43
|
+
self.meme
|
44
|
+
))}
|
45
|
+
declare_meme(:meme_expr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.arg_expr)}
|
46
|
+
declare_meme(:arg_expr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.assignment.__send__(
|
47
|
+
:/,
|
48
|
+
self.left_chained_atoms
|
49
|
+
).__send__(
|
50
|
+
:/,
|
51
|
+
self.dyn_string
|
52
|
+
).__send__(
|
53
|
+
:/,
|
54
|
+
self.dyn_symstr
|
55
|
+
).__send__(
|
56
|
+
:/,
|
57
|
+
self.expr_atom
|
58
|
+
))}
|
59
|
+
declare_meme(:expr_atom, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.decl.__send__(
|
60
|
+
:/,
|
61
|
+
self.left_chained_invocations
|
62
|
+
).__send__(
|
63
|
+
:/,
|
64
|
+
self.lit_string
|
65
|
+
).__send__(
|
66
|
+
:/,
|
67
|
+
self.lit_symstr
|
68
|
+
).__send__(
|
69
|
+
:/,
|
70
|
+
self.unary_operation
|
71
|
+
).__send__(
|
72
|
+
:/,
|
73
|
+
self.paren_expr
|
74
|
+
).__send__(
|
75
|
+
:/,
|
76
|
+
self.constant
|
77
|
+
).__send__(
|
78
|
+
:/,
|
79
|
+
self.lit_simple
|
80
|
+
).__send__(
|
81
|
+
:/,
|
82
|
+
self.lit_array
|
83
|
+
).__send__(
|
84
|
+
:/,
|
85
|
+
self.invoke
|
86
|
+
))}
|
87
|
+
declare_meme(:expr_atom_not_chained, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.decl.__send__(
|
88
|
+
:/,
|
89
|
+
self.lit_string
|
90
|
+
).__send__(
|
91
|
+
:/,
|
92
|
+
self.lit_symstr
|
93
|
+
).__send__(
|
94
|
+
:/,
|
95
|
+
self.unary_operation
|
96
|
+
).__send__(
|
97
|
+
:/,
|
98
|
+
self.paren_expr
|
99
|
+
).__send__(
|
100
|
+
:/,
|
101
|
+
self.constant
|
102
|
+
).__send__(
|
103
|
+
:/,
|
104
|
+
self.lit_simple
|
105
|
+
).__send__(
|
106
|
+
:/,
|
107
|
+
self.lit_array
|
108
|
+
).__send__(
|
109
|
+
:/,
|
110
|
+
self.invoke
|
111
|
+
))}
|
112
|
+
declare_meme(:expr_atom_not_string, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.decl.__send__(
|
113
|
+
:/,
|
114
|
+
self.left_chained_invocations
|
115
|
+
).__send__(
|
116
|
+
:/,
|
117
|
+
self.unary_operation
|
118
|
+
).__send__(
|
119
|
+
:/,
|
120
|
+
self.paren_expr
|
121
|
+
).__send__(
|
122
|
+
:/,
|
123
|
+
self.constant
|
124
|
+
).__send__(
|
125
|
+
:/,
|
126
|
+
self.lit_simple
|
127
|
+
).__send__(
|
128
|
+
:/,
|
129
|
+
self.lit_array
|
130
|
+
).__send__(
|
131
|
+
:/,
|
132
|
+
self.invoke
|
133
|
+
))}
|
134
|
+
declare_meme(:lit_simple, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).null.__send__(
|
135
|
+
:[],
|
136
|
+
:t0
|
137
|
+
)) { || (self.ast.null(self.__send__(:t0)))}.__send__(
|
138
|
+
:/,
|
139
|
+
self.r(::Myco.find_constant(:T).void.__send__(
|
140
|
+
:[],
|
141
|
+
:t0
|
142
|
+
)) { || (self.ast.void(self.__send__(:t0)))}
|
143
|
+
).__send__(
|
144
|
+
:/,
|
145
|
+
self.r(::Myco.find_constant(:T).true.__send__(
|
146
|
+
:[],
|
147
|
+
:t0
|
148
|
+
)) { || (self.ast.true(self.__send__(:t0)))}
|
149
|
+
).__send__(
|
150
|
+
:/,
|
151
|
+
self.r(::Myco.find_constant(:T).false.__send__(
|
152
|
+
:[],
|
153
|
+
:t0
|
154
|
+
)) { || (self.ast.false(self.__send__(:t0)))}
|
155
|
+
).__send__(
|
156
|
+
:/,
|
157
|
+
self.r(::Myco.find_constant(:T).self.__send__(
|
158
|
+
:[],
|
159
|
+
:t0
|
160
|
+
)) { || (self.ast.self(self.__send__(:t0)))}
|
161
|
+
).__send__(
|
162
|
+
:/,
|
163
|
+
self.r(::Myco.find_constant(:T).float.__send__(
|
164
|
+
:[],
|
165
|
+
:t0
|
166
|
+
)) { || (self.ast.lit(
|
167
|
+
self.__send__(:t0),
|
168
|
+
self.__send__(:t0).float
|
169
|
+
))}
|
170
|
+
).__send__(
|
171
|
+
:/,
|
172
|
+
self.r(::Myco.find_constant(:T).integer.__send__(
|
173
|
+
:[],
|
174
|
+
:t0
|
175
|
+
)) { || (self.ast.lit(
|
176
|
+
self.__send__(:t0),
|
177
|
+
self.__send__(:t0).integer
|
178
|
+
))}
|
179
|
+
).__send__(
|
180
|
+
:/,
|
181
|
+
self.r(::Myco.find_constant(:T).symbol.__send__(
|
182
|
+
:[],
|
183
|
+
:t0
|
184
|
+
)) { || (self.ast.lit(
|
185
|
+
self.__send__(:t0),
|
186
|
+
self.__send__(:t0).text.slice(::Range.new(
|
187
|
+
1,
|
188
|
+
-1
|
189
|
+
)).to_sym
|
190
|
+
))}
|
191
|
+
))}
|
192
|
+
declare_meme(:lit_string, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).string_begin.__send__(
|
193
|
+
:+,
|
194
|
+
::Myco.find_constant(:T).string_body.__send__(
|
195
|
+
:[],
|
196
|
+
:tb
|
197
|
+
)
|
198
|
+
).__send__(
|
199
|
+
:+,
|
200
|
+
::Myco.find_constant(:T).string_end
|
201
|
+
).__send__(
|
202
|
+
:/,
|
203
|
+
::Myco.find_constant(:T).sstring_begin.__send__(
|
204
|
+
:+,
|
205
|
+
::Myco.find_constant(:T).sstring_body.__send__(
|
206
|
+
:[],
|
207
|
+
:tb
|
208
|
+
)
|
209
|
+
).__send__(
|
210
|
+
:+,
|
211
|
+
::Myco.find_constant(:T).sstring_end
|
212
|
+
)
|
213
|
+
)) { || (self.ast.lit(
|
214
|
+
self.tb,
|
215
|
+
self.encode_escapes(self.tb.text)
|
216
|
+
))})}
|
217
|
+
declare_meme(:lit_string_as_symbol, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).string_begin.__send__(
|
218
|
+
:+,
|
219
|
+
::Myco.find_constant(:T).string_body.__send__(
|
220
|
+
:[],
|
221
|
+
:tb
|
222
|
+
)
|
223
|
+
).__send__(
|
224
|
+
:+,
|
225
|
+
::Myco.find_constant(:T).string_end
|
226
|
+
).__send__(
|
227
|
+
:/,
|
228
|
+
::Myco.find_constant(:T).sstring_begin.__send__(
|
229
|
+
:+,
|
230
|
+
::Myco.find_constant(:T).sstring_body.__send__(
|
231
|
+
:[],
|
232
|
+
:tb
|
233
|
+
)
|
234
|
+
).__send__(
|
235
|
+
:+,
|
236
|
+
::Myco.find_constant(:T).sstring_end
|
237
|
+
)
|
238
|
+
)) { || (self.ast.lit(
|
239
|
+
self.tb,
|
240
|
+
self.encode_escapes(self.tb.text).to_sym
|
241
|
+
))})}
|
242
|
+
declare_meme(:lit_symstr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).symstr_begin.__send__(
|
243
|
+
:+,
|
244
|
+
::Myco.find_constant(:T).string_body.__send__(
|
245
|
+
:[],
|
246
|
+
:tb
|
247
|
+
)
|
248
|
+
).__send__(
|
249
|
+
:+,
|
250
|
+
::Myco.find_constant(:T).string_end
|
251
|
+
)) { || (self.ast.lit(
|
252
|
+
self.tb,
|
253
|
+
self.encode_escapes(self.tb.text).to_sym
|
254
|
+
))})}
|
255
|
+
declare_meme(:category_name, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).catgry_begin.__send__(
|
256
|
+
:+,
|
257
|
+
::Myco.find_constant(:T).catgry_body.__send__(
|
258
|
+
:[],
|
259
|
+
:tb
|
260
|
+
)
|
261
|
+
).__send__(
|
262
|
+
:+,
|
263
|
+
::Myco.find_constant(:T).catgry_end
|
264
|
+
)) { || (self.ast.lit(
|
265
|
+
self.tb,
|
266
|
+
self.encode_escapes(self.tb.text).to_sym
|
267
|
+
))})}
|
268
|
+
declare_meme(:dyn_string_part, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:C).spc.__send__(:*).__send__(
|
269
|
+
:+,
|
270
|
+
self.expr_atom_not_string.__send__(
|
271
|
+
:[],
|
272
|
+
:n0
|
273
|
+
)
|
274
|
+
).__send__(
|
275
|
+
:+,
|
276
|
+
::Myco.find_constant(:C).spc.__send__(:*)
|
277
|
+
).__send__(
|
278
|
+
:+,
|
279
|
+
self.lit_string.__send__(
|
280
|
+
:[],
|
281
|
+
:n1
|
282
|
+
)
|
283
|
+
)) { || ([
|
284
|
+
self.__send__(:n0),
|
285
|
+
self.__send__(:n1)
|
286
|
+
])})}
|
287
|
+
declare_meme(:dyn_string_parts, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.dyn_string_part.__send__(:+).__send__(
|
288
|
+
:[],
|
289
|
+
:nlist
|
290
|
+
)) { || (self.nlist.flatten)})}
|
291
|
+
declare_meme(:dyn_string, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.lit_string.__send__(
|
292
|
+
:[],
|
293
|
+
:n0
|
294
|
+
).__send__(
|
295
|
+
:+,
|
296
|
+
self.dyn_string_parts.__send__(
|
297
|
+
:[],
|
298
|
+
:nrest
|
299
|
+
)
|
300
|
+
)) { || (self.ast.dstr(
|
301
|
+
self.__send__(:n0),
|
302
|
+
[self.__send__(:n0)].__send__(
|
303
|
+
:+,
|
304
|
+
self.nrest
|
305
|
+
)
|
306
|
+
))})}
|
307
|
+
declare_meme(:dyn_symstr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.lit_symstr.__send__(
|
308
|
+
:[],
|
309
|
+
:n0
|
310
|
+
).__send__(
|
311
|
+
:+,
|
312
|
+
self.dyn_string_parts.__send__(
|
313
|
+
:[],
|
314
|
+
:nrest
|
315
|
+
)
|
316
|
+
)) { || (self.ast.dsym(
|
317
|
+
self.__send__(:n0),
|
318
|
+
[self.__send__(:n0)].__send__(
|
319
|
+
:+,
|
320
|
+
self.nrest
|
321
|
+
)
|
322
|
+
))})}
|
323
|
+
declare_meme(:colon_const, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).scope.__send__(
|
324
|
+
:+,
|
325
|
+
::Myco.find_constant(:T).constant.__send__(
|
326
|
+
:[],
|
327
|
+
:tc
|
328
|
+
)
|
329
|
+
)) { || (self.tc)})}
|
330
|
+
declare_meme(:constant, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).scope.__send__(:-).__send__(
|
331
|
+
:[],
|
332
|
+
:ts
|
333
|
+
).__send__(
|
334
|
+
:+,
|
335
|
+
::Myco.find_constant(:T).constant.__send__(
|
336
|
+
:[],
|
337
|
+
:tc
|
338
|
+
)
|
339
|
+
).__send__(
|
340
|
+
:+,
|
341
|
+
self.colon_const.__send__(:*).__send__(
|
342
|
+
:[],
|
343
|
+
:trest
|
344
|
+
)
|
345
|
+
)) { || (self.ast.const(
|
346
|
+
::Myco.branch_op(:"||", self.ts) {self.tc},
|
347
|
+
self.ts.__send__(:!).__send__(:!),
|
348
|
+
[
|
349
|
+
self.tc.sym,
|
350
|
+
*self.trest.map(&:sym)
|
351
|
+
]
|
352
|
+
))})}
|
353
|
+
declare_meme(:const_sep, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:C).spc_nl.__send__(:*).__send__(
|
354
|
+
:+,
|
355
|
+
::Myco.find_constant(:T).const_sep
|
356
|
+
).__send__(
|
357
|
+
:+,
|
358
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
359
|
+
).__send__(:+))}
|
360
|
+
declare_meme(:sepd_constant, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.const_sep.__send__(
|
361
|
+
:+,
|
362
|
+
self.constant.__send__(
|
363
|
+
:[],
|
364
|
+
:n0
|
365
|
+
)
|
366
|
+
)) { || (self.__send__(:n0))})}
|
367
|
+
declare_meme(:constant_list, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.constant.__send__(
|
368
|
+
:[],
|
369
|
+
:n0
|
370
|
+
).__send__(
|
371
|
+
:+,
|
372
|
+
self.sepd_constant.__send__(:*).__send__(
|
373
|
+
:[],
|
374
|
+
:nrest
|
375
|
+
)
|
376
|
+
)) { || (self.ast.arrass(
|
377
|
+
self.__send__(:n0),
|
378
|
+
[
|
379
|
+
self.__send__(:n0),
|
380
|
+
*self.nrest
|
381
|
+
]
|
382
|
+
))})}
|
383
|
+
declare_meme(:id_as_symbol, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).identifier.__send__(
|
384
|
+
:[],
|
385
|
+
:t0
|
386
|
+
)) { || (self.ast.lit(
|
387
|
+
self.__send__(:t0),
|
388
|
+
self.__send__(:t0).sym
|
389
|
+
))})}
|
390
|
+
declare_meme(:declobj_sepd_expr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.arg_sep.__send__(
|
391
|
+
:+,
|
392
|
+
self.declobj_expr.__send__(
|
393
|
+
:[],
|
394
|
+
:n0
|
395
|
+
)
|
396
|
+
)) { || (self.__send__(:n0))})}
|
397
|
+
declare_meme(:declobj_sepd_exprs, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.declobj_expr.__send__(
|
398
|
+
:[],
|
399
|
+
:n0
|
400
|
+
).__send__(
|
401
|
+
:+,
|
402
|
+
self.declobj_sepd_expr.__send__(:*).__send__(
|
403
|
+
:[],
|
404
|
+
:nrest
|
405
|
+
)
|
406
|
+
).__send__(
|
407
|
+
:+,
|
408
|
+
self.arg_sep_opt
|
409
|
+
)) { || ([
|
410
|
+
self.__send__(:n0),
|
411
|
+
*self.nrest
|
412
|
+
])})}
|
413
|
+
declare_meme(:declobj_expr_body, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.arg_sep_opt.__send__(
|
414
|
+
:+,
|
415
|
+
self.declobj_sepd_exprs.__send__(
|
416
|
+
:[],
|
417
|
+
:nlist
|
418
|
+
)
|
419
|
+
).__send__(
|
420
|
+
:+,
|
421
|
+
::Myco.find_constant(:T).declare_end.__send__(
|
422
|
+
:[],
|
423
|
+
:te
|
424
|
+
)
|
425
|
+
)) { || (self.ast.block(
|
426
|
+
self.nlist.first,
|
427
|
+
self.nlist
|
428
|
+
))}.__send__(
|
429
|
+
:/,
|
430
|
+
self.r(self.arg_sep_opt.__send__(
|
431
|
+
:+,
|
432
|
+
::Myco.find_constant(:T).declare_end.__send__(
|
433
|
+
:[],
|
434
|
+
:te
|
435
|
+
)
|
436
|
+
)) { || (self.ast.null(self.te))}
|
437
|
+
))}
|
438
|
+
declare_meme(:declobj, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.constant_list.__send__(
|
439
|
+
:[],
|
440
|
+
:n0
|
441
|
+
).__send__(
|
442
|
+
:+,
|
443
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
444
|
+
).__send__(
|
445
|
+
:+,
|
446
|
+
::Myco.find_constant(:T).declare_begin.__send__(
|
447
|
+
:[],
|
448
|
+
:tb
|
449
|
+
)
|
450
|
+
).__send__(
|
451
|
+
:+,
|
452
|
+
self.declobj_expr_body.__send__(
|
453
|
+
:[],
|
454
|
+
:n1
|
455
|
+
)
|
456
|
+
)) { || (self.ast.declobj(
|
457
|
+
self.tb,
|
458
|
+
self.__send__(:n0),
|
459
|
+
self.__send__(:n1)
|
460
|
+
))})}
|
461
|
+
declare_meme(:category_expr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.declobj_expr_not_category)}
|
462
|
+
declare_meme(:category_sepd_expr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.arg_sep.__send__(
|
463
|
+
:+,
|
464
|
+
self.category_expr.__send__(
|
465
|
+
:[],
|
466
|
+
:n0
|
467
|
+
)
|
468
|
+
)) { || (self.__send__(:n0))})}
|
469
|
+
declare_meme(:category_sepd_exprs, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.arg_sep.__send__(
|
470
|
+
:+,
|
471
|
+
self.category_expr.__send__(
|
472
|
+
:[],
|
473
|
+
:n0
|
474
|
+
)
|
475
|
+
).__send__(
|
476
|
+
:+,
|
477
|
+
self.category_sepd_expr.__send__(:*).__send__(
|
478
|
+
:[],
|
479
|
+
:nrest
|
480
|
+
)
|
481
|
+
)) { || ([
|
482
|
+
self.__send__(:n0),
|
483
|
+
*self.nrest
|
484
|
+
])})}
|
485
|
+
declare_meme(:category, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.category_name.__send__(
|
486
|
+
:[],
|
487
|
+
:n0
|
488
|
+
).__send__(
|
489
|
+
:+,
|
490
|
+
self.category_sepd_exprs.__send__(:-).__send__(
|
491
|
+
:[],
|
492
|
+
:nlist
|
493
|
+
)
|
494
|
+
).__send__(
|
495
|
+
:+,
|
496
|
+
self.arg_sep_opt.__send__(
|
497
|
+
:+,
|
498
|
+
::Myco.find_constant(:T).catgry_begin.__send__(
|
499
|
+
:/,
|
500
|
+
::Myco.find_constant(:T).declare_end
|
501
|
+
)
|
502
|
+
).__send__(:!).__send__(:!)
|
503
|
+
)) { || (self.ast.category(
|
504
|
+
self.__send__(:n0),
|
505
|
+
self.__send__(:n0).value,
|
506
|
+
::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.nlist) {self.ast.block(
|
507
|
+
self.nlist.first,
|
508
|
+
self.nlist
|
509
|
+
)}) {self.ast.null(self.__send__(:n0))}
|
510
|
+
))})}
|
511
|
+
declare_meme(:copen, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.constant.__send__(
|
512
|
+
:[],
|
513
|
+
:n0
|
514
|
+
).__send__(
|
515
|
+
:+,
|
516
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
517
|
+
).__send__(
|
518
|
+
:+,
|
519
|
+
::Myco.find_constant(:T).reopen.__send__(
|
520
|
+
:[],
|
521
|
+
:tb
|
522
|
+
)
|
523
|
+
).__send__(
|
524
|
+
:+,
|
525
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
526
|
+
).__send__(
|
527
|
+
:+,
|
528
|
+
::Myco.find_constant(:T).declare_begin
|
529
|
+
).__send__(
|
530
|
+
:+,
|
531
|
+
self.declobj_expr_body.__send__(
|
532
|
+
:[],
|
533
|
+
:n1
|
534
|
+
)
|
535
|
+
)) { || (self.ast.copen(
|
536
|
+
self.tb,
|
537
|
+
self.__send__(:n0),
|
538
|
+
self.__send__(:n1)
|
539
|
+
))})}
|
540
|
+
declare_meme(:cdefn, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.constant.__send__(
|
541
|
+
:[],
|
542
|
+
:n0
|
543
|
+
).__send__(
|
544
|
+
:+,
|
545
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
546
|
+
).__send__(
|
547
|
+
:+,
|
548
|
+
::Myco.find_constant(:T).define.__send__(
|
549
|
+
:[],
|
550
|
+
:tb
|
551
|
+
)
|
552
|
+
).__send__(
|
553
|
+
:+,
|
554
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
555
|
+
).__send__(
|
556
|
+
:+,
|
557
|
+
self.declobj.__send__(
|
558
|
+
:[],
|
559
|
+
:n1
|
560
|
+
)
|
561
|
+
)) { || (self.ast.cdefn(
|
562
|
+
self.tb,
|
563
|
+
self.__send__(:n0),
|
564
|
+
self.__send__(:n1)
|
565
|
+
))})}
|
566
|
+
declare_meme(:declstr_body, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).declstr_begin.__send__(
|
567
|
+
:[],
|
568
|
+
:tb
|
569
|
+
).__send__(
|
570
|
+
:+,
|
571
|
+
::Myco.find_constant(:C).spc.__send__(:*)
|
572
|
+
).__send__(
|
573
|
+
:+,
|
574
|
+
::Myco.find_constant(:C).nl
|
575
|
+
).__send__(
|
576
|
+
:+,
|
577
|
+
::Myco.find_constant(:T).declstr_body.__send__(
|
578
|
+
:[],
|
579
|
+
:ts
|
580
|
+
)
|
581
|
+
).__send__(
|
582
|
+
:+,
|
583
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
584
|
+
).__send__(
|
585
|
+
:+,
|
586
|
+
::Myco.find_constant(:T).declstr_end
|
587
|
+
)) { || (self.ast.str(
|
588
|
+
self.tb,
|
589
|
+
self.ts.text
|
590
|
+
))})}
|
591
|
+
declare_meme(:declstr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.constant_list.__send__(
|
592
|
+
:[],
|
593
|
+
:nc
|
594
|
+
).__send__(
|
595
|
+
:+,
|
596
|
+
::Myco.find_constant(:C).spc.__send__(:+)
|
597
|
+
).__send__(
|
598
|
+
:+,
|
599
|
+
self.declstr_body.__send__(
|
600
|
+
:[],
|
601
|
+
:nb
|
602
|
+
)
|
603
|
+
)) { || (self.ast.declstr(
|
604
|
+
self.nc,
|
605
|
+
self.nc,
|
606
|
+
self.nb
|
607
|
+
))})}
|
608
|
+
declare_meme(:assignment, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.local_assignment.__send__(
|
609
|
+
:/,
|
610
|
+
self.invoke_assignment
|
611
|
+
))}
|
612
|
+
declare_meme(:assign_rhs, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.arg_expr)}
|
613
|
+
declare_meme(:local_assignment, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).identifier.__send__(
|
614
|
+
:[],
|
615
|
+
:ti
|
616
|
+
).__send__(
|
617
|
+
:+,
|
618
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
619
|
+
).__send__(
|
620
|
+
:+,
|
621
|
+
::Myco.find_constant(:T).assign.__send__(
|
622
|
+
:[],
|
623
|
+
:to
|
624
|
+
)
|
625
|
+
).__send__(
|
626
|
+
:+,
|
627
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
628
|
+
).__send__(
|
629
|
+
:+,
|
630
|
+
self.assign_rhs.__send__(
|
631
|
+
:[],
|
632
|
+
:rhs
|
633
|
+
)
|
634
|
+
)) { || (self.ast.lasgn(
|
635
|
+
self.to,
|
636
|
+
self.ti.sym,
|
637
|
+
self.rhs
|
638
|
+
))})}
|
639
|
+
declare_meme(:invoke_assignment_lhs, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.left_chained_invocations.__send__(
|
640
|
+
:/,
|
641
|
+
self.invoke
|
642
|
+
))}
|
643
|
+
declare_meme(:invoke_assignment, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.invoke_assignment_lhs.__send__(
|
644
|
+
:[],
|
645
|
+
:lhs
|
646
|
+
).__send__(
|
647
|
+
:+,
|
648
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
649
|
+
).__send__(
|
650
|
+
:+,
|
651
|
+
::Myco.find_constant(:T).assign.__send__(
|
652
|
+
:[],
|
653
|
+
:to
|
654
|
+
)
|
655
|
+
).__send__(
|
656
|
+
:+,
|
657
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
658
|
+
).__send__(
|
659
|
+
:+,
|
660
|
+
self.assign_rhs.__send__(
|
661
|
+
:[],
|
662
|
+
:rhs
|
663
|
+
)
|
664
|
+
)) { || (
|
665
|
+
self.lhs.__send__(
|
666
|
+
:name=,
|
667
|
+
"#{self.lhs.name}=".to_sym
|
668
|
+
)
|
669
|
+
orig_arguments = ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.lhs.arguments) {self.lhs.arguments.body}) {[]}
|
670
|
+
arg_order = ::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.lhs.name.__send__(
|
671
|
+
:==,
|
672
|
+
:[]=
|
673
|
+
)) {[
|
674
|
+
*orig_arguments,
|
675
|
+
self.rhs
|
676
|
+
]}) {[
|
677
|
+
self.rhs,
|
678
|
+
*orig_arguments
|
679
|
+
]}
|
680
|
+
self.lhs.__send__(
|
681
|
+
:arguments=,
|
682
|
+
self.ast.argass(
|
683
|
+
self.rhs,
|
684
|
+
arg_order
|
685
|
+
)
|
686
|
+
)
|
687
|
+
self.lhs
|
688
|
+
)})}
|
689
|
+
declare_meme(:invoke_body, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:C).spc_nl.__send__(:*).__send__(
|
690
|
+
:+,
|
691
|
+
self.param_list.__send__(:-).__send__(
|
692
|
+
:[],
|
693
|
+
:np
|
694
|
+
)
|
695
|
+
).__send__(
|
696
|
+
:+,
|
697
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
698
|
+
).__send__(
|
699
|
+
:+,
|
700
|
+
self.meme_enclosed_expr_body.__send__(
|
701
|
+
:[],
|
702
|
+
:nb
|
703
|
+
)
|
704
|
+
)) { || ([
|
705
|
+
self.np,
|
706
|
+
self.nb
|
707
|
+
])})}
|
708
|
+
declare_meme(:opt_arg_list, [], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:C).spc.__send__(:*).__send__(
|
709
|
+
:+,
|
710
|
+
self.arg_list.__send__(
|
711
|
+
:[],
|
712
|
+
:n
|
713
|
+
)
|
714
|
+
)) { || (self.n)}.__send__(:-))}
|
715
|
+
declare_meme(:opt_invoke_body, [], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:C).spc_nl.__send__(:*).__send__(
|
716
|
+
:+,
|
717
|
+
self.invoke_body.__send__(
|
718
|
+
:[],
|
719
|
+
:nx
|
720
|
+
)
|
721
|
+
)) { || (self.nx)}.__send__(:-))}
|
722
|
+
declare_meme(:invoke, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).identifier.__send__(
|
723
|
+
:[],
|
724
|
+
:tn
|
725
|
+
).__send__(
|
726
|
+
:+,
|
727
|
+
self.opt_arg_list.__send__(
|
728
|
+
:[],
|
729
|
+
:na
|
730
|
+
)
|
731
|
+
).__send__(
|
732
|
+
:+,
|
733
|
+
self.opt_invoke_body.__send__(
|
734
|
+
:[],
|
735
|
+
:nlist
|
736
|
+
)
|
737
|
+
)) { || (self.ast.invoke(
|
738
|
+
self.tn,
|
739
|
+
nil,
|
740
|
+
self.tn.sym,
|
741
|
+
self.na,
|
742
|
+
*::Myco.branch_op(:"||", self.nlist) {[]}
|
743
|
+
))})}
|
744
|
+
declare_meme(:op_invoke, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.op_invoke_id.__send__(
|
745
|
+
:[],
|
746
|
+
:tn
|
747
|
+
).__send__(
|
748
|
+
:+,
|
749
|
+
self.opt_arg_list.__send__(
|
750
|
+
:[],
|
751
|
+
:na
|
752
|
+
)
|
753
|
+
).__send__(
|
754
|
+
:+,
|
755
|
+
self.opt_invoke_body.__send__(
|
756
|
+
:[],
|
757
|
+
:nlist
|
758
|
+
)
|
759
|
+
)) { || (self.ast.invoke(
|
760
|
+
self.tn,
|
761
|
+
nil,
|
762
|
+
self.tn.sym,
|
763
|
+
self.na,
|
764
|
+
*::Myco.branch_op(:"||", self.nlist) {[]}
|
765
|
+
))})}
|
766
|
+
declare_meme(:elem_invoke, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.lit_array.__send__(
|
767
|
+
:[],
|
768
|
+
:na
|
769
|
+
).__send__(
|
770
|
+
:+,
|
771
|
+
self.opt_invoke_body.__send__(
|
772
|
+
:[],
|
773
|
+
:nlist
|
774
|
+
)
|
775
|
+
)) { || (self.ast.invoke(
|
776
|
+
self.na,
|
777
|
+
nil,
|
778
|
+
:[],
|
779
|
+
self.ast.argass(
|
780
|
+
self.na,
|
781
|
+
self.na.body
|
782
|
+
),
|
783
|
+
*::Myco.branch_op(:"||", self.nlist) {[]}
|
784
|
+
))})}
|
785
|
+
declare_meme(:op_invoke_id, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.left_op_normal)}
|
786
|
+
declare_meme(:arg_sep, [], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:C).spc.__send__(:*).__send__(
|
787
|
+
:+,
|
788
|
+
::Myco.find_constant(:T).arg_sep
|
789
|
+
).__send__(
|
790
|
+
:+,
|
791
|
+
::Myco.find_constant(:C).spc.__send__(:*)
|
792
|
+
).__send__(:+))}
|
793
|
+
declare_meme(:arg_sep_opt, [], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:C).spc.__send__(
|
794
|
+
:/,
|
795
|
+
::Myco.find_constant(:T).arg_sep
|
796
|
+
).__send__(:*))}
|
797
|
+
declare_meme(:in_arg_normal, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.in_arg_splat.__send__(
|
798
|
+
:/,
|
799
|
+
self.r(self.arg_expr.__send__(
|
800
|
+
:[],
|
801
|
+
:n0
|
802
|
+
).__send__(
|
803
|
+
:+,
|
804
|
+
self.in_arg_kwarg_mark.__send__(:!)
|
805
|
+
)) { || (self.__send__(:n0))}
|
806
|
+
))}
|
807
|
+
declare_meme(:in_arg_sepd_normal, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.arg_sep.__send__(
|
808
|
+
:+,
|
809
|
+
self.in_arg_normal.__send__(
|
810
|
+
:[],
|
811
|
+
:n0
|
812
|
+
)
|
813
|
+
)) { || (self.__send__(:n0))})}
|
814
|
+
declare_meme(:in_arg_normals, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.in_arg_normal.__send__(
|
815
|
+
:[],
|
816
|
+
:n0
|
817
|
+
).__send__(
|
818
|
+
:+,
|
819
|
+
self.in_arg_sepd_normal.__send__(:*).__send__(
|
820
|
+
:[],
|
821
|
+
:nrest
|
822
|
+
)
|
823
|
+
)) { || ([
|
824
|
+
self.__send__(:n0),
|
825
|
+
*self.nrest
|
826
|
+
])})}
|
827
|
+
declare_meme(:in_arg_sepd_kwarg, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.arg_sep.__send__(
|
828
|
+
:+,
|
829
|
+
self.in_arg_kwarg.__send__(
|
830
|
+
:[],
|
831
|
+
:n0
|
832
|
+
)
|
833
|
+
)) { || (self.__send__(:n0))})}
|
834
|
+
declare_meme(:in_arg_kwargs, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.in_arg_kwarg.__send__(
|
835
|
+
:[],
|
836
|
+
:n0
|
837
|
+
).__send__(
|
838
|
+
:+,
|
839
|
+
self.in_arg_sepd_kwarg.__send__(:*).__send__(
|
840
|
+
:[],
|
841
|
+
:nrest
|
842
|
+
)
|
843
|
+
)) { || (self.ast.hash(
|
844
|
+
self.__send__(:n0).first,
|
845
|
+
[
|
846
|
+
self.__send__(:n0),
|
847
|
+
*self.nrest
|
848
|
+
].flatten
|
849
|
+
))})}
|
850
|
+
declare_meme(:in_arg_kwarg_mark, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:C).spc_nl.__send__(:*).__send__(
|
851
|
+
:+,
|
852
|
+
::Myco.find_constant(:T).meme_mark
|
853
|
+
))}
|
854
|
+
declare_meme(:in_arg_kwarg, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.id_as_symbol.__send__(
|
855
|
+
:[],
|
856
|
+
:n0
|
857
|
+
).__send__(
|
858
|
+
:+,
|
859
|
+
self.in_arg_kwarg_mark
|
860
|
+
).__send__(
|
861
|
+
:+,
|
862
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
863
|
+
).__send__(
|
864
|
+
:+,
|
865
|
+
self.arg_expr.__send__(
|
866
|
+
:[],
|
867
|
+
:n1
|
868
|
+
)
|
869
|
+
)) { || ([
|
870
|
+
self.__send__(:n0),
|
871
|
+
self.__send__(:n1)
|
872
|
+
])})}
|
873
|
+
declare_meme(:in_arg_splat, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).op_mult.__send__(
|
874
|
+
:[],
|
875
|
+
:to
|
876
|
+
).__send__(
|
877
|
+
:+,
|
878
|
+
self.expr_atom.__send__(
|
879
|
+
:[],
|
880
|
+
:n0
|
881
|
+
)
|
882
|
+
)) { || (self.ast.splat(
|
883
|
+
self.to,
|
884
|
+
self.__send__(:n0)
|
885
|
+
))})}
|
886
|
+
declare_meme(:in_arg_block, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).op_toproc.__send__(
|
887
|
+
:[],
|
888
|
+
:to
|
889
|
+
).__send__(
|
890
|
+
:+,
|
891
|
+
self.expr_atom.__send__(
|
892
|
+
:[],
|
893
|
+
:n0
|
894
|
+
)
|
895
|
+
)) { || (self.ast.blkarg(
|
896
|
+
self.to,
|
897
|
+
self.__send__(:n0)
|
898
|
+
))})}
|
899
|
+
declare_meme(:in_arg_list, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.in_arg_normals.__send__(
|
900
|
+
:[],
|
901
|
+
:n0
|
902
|
+
).__send__(
|
903
|
+
:+,
|
904
|
+
self.arg_sep
|
905
|
+
).__send__(
|
906
|
+
:+,
|
907
|
+
self.in_arg_kwargs.__send__(
|
908
|
+
:[],
|
909
|
+
:n1
|
910
|
+
)
|
911
|
+
).__send__(
|
912
|
+
:+,
|
913
|
+
self.arg_sep
|
914
|
+
).__send__(
|
915
|
+
:+,
|
916
|
+
self.in_arg_block.__send__(
|
917
|
+
:[],
|
918
|
+
:n2
|
919
|
+
)
|
920
|
+
)) { || ([
|
921
|
+
*self.__send__(:n0),
|
922
|
+
self.__send__(:n1),
|
923
|
+
self.__send__(:n2)
|
924
|
+
])}.__send__(
|
925
|
+
:/,
|
926
|
+
self.r(self.in_arg_normals.__send__(
|
927
|
+
:[],
|
928
|
+
:n0
|
929
|
+
).__send__(
|
930
|
+
:+,
|
931
|
+
self.arg_sep
|
932
|
+
).__send__(
|
933
|
+
:+,
|
934
|
+
self.in_arg_kwargs.__send__(
|
935
|
+
:[],
|
936
|
+
:n1
|
937
|
+
)
|
938
|
+
)) { || ([
|
939
|
+
*self.__send__(:n0),
|
940
|
+
self.__send__(:n1)
|
941
|
+
])}
|
942
|
+
).__send__(
|
943
|
+
:/,
|
944
|
+
self.r(self.in_arg_normals.__send__(
|
945
|
+
:[],
|
946
|
+
:n0
|
947
|
+
).__send__(
|
948
|
+
:+,
|
949
|
+
self.arg_sep
|
950
|
+
).__send__(
|
951
|
+
:+,
|
952
|
+
self.in_arg_block.__send__(
|
953
|
+
:[],
|
954
|
+
:n1
|
955
|
+
)
|
956
|
+
)) { || ([
|
957
|
+
*self.__send__(:n0),
|
958
|
+
self.__send__(:n1)
|
959
|
+
])}
|
960
|
+
).__send__(
|
961
|
+
:/,
|
962
|
+
self.r(self.in_arg_kwargs.__send__(
|
963
|
+
:[],
|
964
|
+
:n0
|
965
|
+
).__send__(
|
966
|
+
:+,
|
967
|
+
self.arg_sep
|
968
|
+
).__send__(
|
969
|
+
:+,
|
970
|
+
self.in_arg_block.__send__(
|
971
|
+
:[],
|
972
|
+
:n1
|
973
|
+
)
|
974
|
+
)) { || ([
|
975
|
+
self.__send__(:n0),
|
976
|
+
self.__send__(:n1)
|
977
|
+
])}
|
978
|
+
).__send__(
|
979
|
+
:/,
|
980
|
+
self.r(self.in_arg_normals.__send__(
|
981
|
+
:[],
|
982
|
+
:n0
|
983
|
+
)) { || ([*self.__send__(:n0)])}
|
984
|
+
).__send__(
|
985
|
+
:/,
|
986
|
+
self.r(self.in_arg_kwargs.__send__(
|
987
|
+
:[],
|
988
|
+
:n0
|
989
|
+
)) { || ([self.__send__(:n0)])}
|
990
|
+
).__send__(
|
991
|
+
:/,
|
992
|
+
self.r(self.in_arg_block.__send__(
|
993
|
+
:[],
|
994
|
+
:n0
|
995
|
+
)) { || ([self.__send__(:n0)])}
|
996
|
+
))}
|
997
|
+
declare_meme(:arg_list, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).args_begin.__send__(
|
998
|
+
:[],
|
999
|
+
:tb
|
1000
|
+
).__send__(
|
1001
|
+
:+,
|
1002
|
+
self.arg_sep_opt
|
1003
|
+
).__send__(
|
1004
|
+
:+,
|
1005
|
+
self.in_arg_list.__send__(:-).__send__(
|
1006
|
+
:[],
|
1007
|
+
:nlist
|
1008
|
+
)
|
1009
|
+
).__send__(
|
1010
|
+
:+,
|
1011
|
+
self.arg_sep_opt
|
1012
|
+
).__send__(
|
1013
|
+
:+,
|
1014
|
+
::Myco.find_constant(:T).args_end
|
1015
|
+
)) { || (self.ast.argass(
|
1016
|
+
self.tb,
|
1017
|
+
::Myco.branch_op(:"||", self.nlist) {[]}
|
1018
|
+
))})}
|
1019
|
+
declare_meme(:lit_array, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).array_begin.__send__(
|
1020
|
+
:[],
|
1021
|
+
:tb
|
1022
|
+
).__send__(
|
1023
|
+
:+,
|
1024
|
+
self.arg_sep_opt
|
1025
|
+
).__send__(
|
1026
|
+
:+,
|
1027
|
+
self.in_arg_list.__send__(:-).__send__(
|
1028
|
+
:[],
|
1029
|
+
:nlist
|
1030
|
+
)
|
1031
|
+
).__send__(
|
1032
|
+
:+,
|
1033
|
+
self.arg_sep_opt
|
1034
|
+
).__send__(
|
1035
|
+
:+,
|
1036
|
+
::Myco.find_constant(:T).array_end
|
1037
|
+
)) { || (self.ast.arrass(
|
1038
|
+
self.tb,
|
1039
|
+
::Myco.branch_op(:"||", self.nlist) {[]}
|
1040
|
+
))})}
|
1041
|
+
declare_meme(:param, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).identifier.__send__(
|
1042
|
+
:[],
|
1043
|
+
:ti
|
1044
|
+
).__send__(
|
1045
|
+
:+,
|
1046
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1047
|
+
).__send__(
|
1048
|
+
:+,
|
1049
|
+
::Myco.find_constant(:T).assign.__send__(
|
1050
|
+
:[],
|
1051
|
+
:to
|
1052
|
+
)
|
1053
|
+
).__send__(
|
1054
|
+
:+,
|
1055
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1056
|
+
).__send__(
|
1057
|
+
:+,
|
1058
|
+
self.arg_expr.__send__(
|
1059
|
+
:[],
|
1060
|
+
:nv
|
1061
|
+
)
|
1062
|
+
)) { || ([
|
1063
|
+
:optional,
|
1064
|
+
self.ast.lasgn(
|
1065
|
+
self.ti,
|
1066
|
+
self.ti.sym,
|
1067
|
+
self.nv
|
1068
|
+
)
|
1069
|
+
])}.__send__(
|
1070
|
+
:/,
|
1071
|
+
self.r(::Myco.find_constant(:T).identifier.__send__(
|
1072
|
+
:[],
|
1073
|
+
:ti
|
1074
|
+
).__send__(
|
1075
|
+
:+,
|
1076
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1077
|
+
).__send__(
|
1078
|
+
:+,
|
1079
|
+
::Myco.find_constant(:T).meme_mark.__send__(
|
1080
|
+
:[],
|
1081
|
+
:to
|
1082
|
+
)
|
1083
|
+
).__send__(
|
1084
|
+
:+,
|
1085
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1086
|
+
).__send__(
|
1087
|
+
:+,
|
1088
|
+
self.arg_expr.__send__(:-).__send__(
|
1089
|
+
:[],
|
1090
|
+
:nv
|
1091
|
+
)
|
1092
|
+
)) { || ([
|
1093
|
+
:kwargs,
|
1094
|
+
self.ast.lasgn(
|
1095
|
+
self.ti,
|
1096
|
+
self.ti.sym,
|
1097
|
+
::Myco.branch_op(:"||", self.nv) {self.ast.lit(
|
1098
|
+
self.to,
|
1099
|
+
:*
|
1100
|
+
)}
|
1101
|
+
)
|
1102
|
+
])}
|
1103
|
+
).__send__(
|
1104
|
+
:/,
|
1105
|
+
self.r(::Myco.find_constant(:T).op_exp.__send__(
|
1106
|
+
:+,
|
1107
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1108
|
+
).__send__(
|
1109
|
+
:+,
|
1110
|
+
::Myco.find_constant(:T).identifier.__send__(
|
1111
|
+
:[],
|
1112
|
+
:ti
|
1113
|
+
)
|
1114
|
+
)) { || ([
|
1115
|
+
:kwrest,
|
1116
|
+
self.ti.sym
|
1117
|
+
])}
|
1118
|
+
).__send__(
|
1119
|
+
:/,
|
1120
|
+
self.r(::Myco.find_constant(:T).op_mult.__send__(
|
1121
|
+
:+,
|
1122
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1123
|
+
).__send__(
|
1124
|
+
:+,
|
1125
|
+
::Myco.find_constant(:T).identifier.__send__(
|
1126
|
+
:[],
|
1127
|
+
:ti
|
1128
|
+
)
|
1129
|
+
)) { || ([
|
1130
|
+
:rest,
|
1131
|
+
self.ti.sym
|
1132
|
+
])}
|
1133
|
+
).__send__(
|
1134
|
+
:/,
|
1135
|
+
self.r(::Myco.find_constant(:T).op_toproc.__send__(
|
1136
|
+
:+,
|
1137
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1138
|
+
).__send__(
|
1139
|
+
:+,
|
1140
|
+
::Myco.find_constant(:T).identifier.__send__(
|
1141
|
+
:[],
|
1142
|
+
:ti
|
1143
|
+
)
|
1144
|
+
)) { || ([
|
1145
|
+
:block,
|
1146
|
+
self.ti.sym
|
1147
|
+
])}
|
1148
|
+
).__send__(
|
1149
|
+
:/,
|
1150
|
+
self.r(::Myco.find_constant(:T).identifier.__send__(
|
1151
|
+
:[],
|
1152
|
+
:ti
|
1153
|
+
)) { || ([
|
1154
|
+
:required,
|
1155
|
+
self.ti.sym
|
1156
|
+
])}
|
1157
|
+
))}
|
1158
|
+
declare_meme(:param_sepd, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.arg_sep.__send__(
|
1159
|
+
:+,
|
1160
|
+
self.param.__send__(
|
1161
|
+
:[],
|
1162
|
+
:n0
|
1163
|
+
)
|
1164
|
+
)) { || (self.__send__(:n0))})}
|
1165
|
+
declare_meme(:param_sepds, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.param.__send__(
|
1166
|
+
:[],
|
1167
|
+
:n0
|
1168
|
+
).__send__(
|
1169
|
+
:+,
|
1170
|
+
self.param_sepd.__send__(:*).__send__(
|
1171
|
+
:[],
|
1172
|
+
:nrest
|
1173
|
+
)
|
1174
|
+
).__send__(
|
1175
|
+
:+,
|
1176
|
+
self.arg_sep_opt
|
1177
|
+
)) { || ([
|
1178
|
+
self.__send__(:n0),
|
1179
|
+
*self.nrest
|
1180
|
+
])})}
|
1181
|
+
declare_meme(:param_list, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).params_begin.__send__(
|
1182
|
+
:[],
|
1183
|
+
:tb
|
1184
|
+
).__send__(
|
1185
|
+
:+,
|
1186
|
+
::Myco.find_constant(:T).params_end
|
1187
|
+
)) { || (self.ast.args(
|
1188
|
+
self.tb,
|
1189
|
+
[],
|
1190
|
+
[],
|
1191
|
+
nil,
|
1192
|
+
[],
|
1193
|
+
[],
|
1194
|
+
nil,
|
1195
|
+
nil
|
1196
|
+
))}.__send__(
|
1197
|
+
:/,
|
1198
|
+
self.r(::Myco.find_constant(:T).params_begin.__send__(
|
1199
|
+
:[],
|
1200
|
+
:tb
|
1201
|
+
).__send__(
|
1202
|
+
:+,
|
1203
|
+
self.param_sepds.__send__(
|
1204
|
+
:[],
|
1205
|
+
:plist
|
1206
|
+
)
|
1207
|
+
).__send__(
|
1208
|
+
:+,
|
1209
|
+
::Myco.find_constant(:T).params_end
|
1210
|
+
)) { || (
|
1211
|
+
required = []
|
1212
|
+
optional = []
|
1213
|
+
rest = []
|
1214
|
+
post = []
|
1215
|
+
kwargs = []
|
1216
|
+
kwrest = []
|
1217
|
+
block = []
|
1218
|
+
self.loop { || (
|
1219
|
+
::Myco.branch_op(:"||", ::Myco.branch_op(:"&&", self.plist.__send__(
|
1220
|
+
:[],
|
1221
|
+
0
|
1222
|
+
)) {self.plist.__send__(
|
1223
|
+
:[],
|
1224
|
+
0
|
1225
|
+
).__send__(
|
1226
|
+
:[],
|
1227
|
+
0
|
1228
|
+
).__send__(
|
1229
|
+
:==,
|
1230
|
+
:required
|
1231
|
+
)}) {self.__send__(:break)}
|
1232
|
+
required.push(self.plist.shift.__send__(
|
1233
|
+
:[],
|
1234
|
+
1
|
1235
|
+
))
|
1236
|
+
)}
|
1237
|
+
self.loop { || (
|
1238
|
+
::Myco.branch_op(:"||", ::Myco.branch_op(:"&&", self.plist.__send__(
|
1239
|
+
:[],
|
1240
|
+
0
|
1241
|
+
)) {self.plist.__send__(
|
1242
|
+
:[],
|
1243
|
+
0
|
1244
|
+
).__send__(
|
1245
|
+
:[],
|
1246
|
+
0
|
1247
|
+
).__send__(
|
1248
|
+
:==,
|
1249
|
+
:optional
|
1250
|
+
)}) {self.__send__(:break)}
|
1251
|
+
optional.push(self.plist.shift.__send__(
|
1252
|
+
:[],
|
1253
|
+
1
|
1254
|
+
))
|
1255
|
+
)}
|
1256
|
+
self.loop { || (
|
1257
|
+
::Myco.branch_op(:"||", ::Myco.branch_op(:"&&", self.plist.__send__(
|
1258
|
+
:[],
|
1259
|
+
0
|
1260
|
+
)) {self.plist.__send__(
|
1261
|
+
:[],
|
1262
|
+
0
|
1263
|
+
).__send__(
|
1264
|
+
:[],
|
1265
|
+
0
|
1266
|
+
).__send__(
|
1267
|
+
:==,
|
1268
|
+
:rest
|
1269
|
+
)}) {self.__send__(:break)}
|
1270
|
+
rest.push(self.plist.shift.__send__(
|
1271
|
+
:[],
|
1272
|
+
1
|
1273
|
+
))
|
1274
|
+
)}
|
1275
|
+
self.loop { || (
|
1276
|
+
::Myco.branch_op(:"||", ::Myco.branch_op(:"&&", self.plist.__send__(
|
1277
|
+
:[],
|
1278
|
+
0
|
1279
|
+
)) {self.plist.__send__(
|
1280
|
+
:[],
|
1281
|
+
0
|
1282
|
+
).__send__(
|
1283
|
+
:[],
|
1284
|
+
0
|
1285
|
+
).__send__(
|
1286
|
+
:==,
|
1287
|
+
:required
|
1288
|
+
)}) {self.__send__(:break)}
|
1289
|
+
post.push(self.plist.shift.__send__(
|
1290
|
+
:[],
|
1291
|
+
1
|
1292
|
+
))
|
1293
|
+
)}
|
1294
|
+
self.loop { || (
|
1295
|
+
::Myco.branch_op(:"||", ::Myco.branch_op(:"&&", self.plist.__send__(
|
1296
|
+
:[],
|
1297
|
+
0
|
1298
|
+
)) {self.plist.__send__(
|
1299
|
+
:[],
|
1300
|
+
0
|
1301
|
+
).__send__(
|
1302
|
+
:[],
|
1303
|
+
0
|
1304
|
+
).__send__(
|
1305
|
+
:==,
|
1306
|
+
:kwargs
|
1307
|
+
)}) {self.__send__(:break)}
|
1308
|
+
kwargs.push(self.plist.shift.__send__(
|
1309
|
+
:[],
|
1310
|
+
1
|
1311
|
+
))
|
1312
|
+
)}
|
1313
|
+
self.loop { || (
|
1314
|
+
::Myco.branch_op(:"||", ::Myco.branch_op(:"&&", self.plist.__send__(
|
1315
|
+
:[],
|
1316
|
+
0
|
1317
|
+
)) {self.plist.__send__(
|
1318
|
+
:[],
|
1319
|
+
0
|
1320
|
+
).__send__(
|
1321
|
+
:[],
|
1322
|
+
0
|
1323
|
+
).__send__(
|
1324
|
+
:==,
|
1325
|
+
:kwrest
|
1326
|
+
)}) {self.__send__(:break)}
|
1327
|
+
kwrest.push(self.plist.shift.__send__(
|
1328
|
+
:[],
|
1329
|
+
1
|
1330
|
+
))
|
1331
|
+
)}
|
1332
|
+
self.loop { || (
|
1333
|
+
::Myco.branch_op(:"||", ::Myco.branch_op(:"&&", self.plist.__send__(
|
1334
|
+
:[],
|
1335
|
+
0
|
1336
|
+
)) {self.plist.__send__(
|
1337
|
+
:[],
|
1338
|
+
0
|
1339
|
+
).__send__(
|
1340
|
+
:[],
|
1341
|
+
0
|
1342
|
+
).__send__(
|
1343
|
+
:==,
|
1344
|
+
:block
|
1345
|
+
)}) {self.__send__(:break)}
|
1346
|
+
block.push(self.plist.shift.__send__(
|
1347
|
+
:[],
|
1348
|
+
1
|
1349
|
+
))
|
1350
|
+
)}
|
1351
|
+
required = required
|
1352
|
+
optional = optional
|
1353
|
+
rest = rest.first
|
1354
|
+
post = post
|
1355
|
+
kwargs = kwargs
|
1356
|
+
kwrest = kwrest.first
|
1357
|
+
block = block.first
|
1358
|
+
block = ::Myco.branch_op(:"&&", block) {self.ast.blkprm(
|
1359
|
+
self.tb,
|
1360
|
+
block
|
1361
|
+
)}
|
1362
|
+
self.ast.args(
|
1363
|
+
self.tb,
|
1364
|
+
required,
|
1365
|
+
optional,
|
1366
|
+
rest,
|
1367
|
+
post,
|
1368
|
+
kwargs,
|
1369
|
+
kwrest,
|
1370
|
+
block
|
1371
|
+
)
|
1372
|
+
)}
|
1373
|
+
))}
|
1374
|
+
declare_meme(:left_op_normal, [], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:T).op_exp.__send__(
|
1375
|
+
:/,
|
1376
|
+
::Myco.find_constant(:T).op_mult
|
1377
|
+
).__send__(
|
1378
|
+
:/,
|
1379
|
+
::Myco.find_constant(:T).op_div
|
1380
|
+
).__send__(
|
1381
|
+
:/,
|
1382
|
+
::Myco.find_constant(:T).op_mod
|
1383
|
+
).__send__(
|
1384
|
+
:/,
|
1385
|
+
::Myco.find_constant(:T).op_plus
|
1386
|
+
).__send__(
|
1387
|
+
:/,
|
1388
|
+
::Myco.find_constant(:T).op_minus
|
1389
|
+
).__send__(
|
1390
|
+
:/,
|
1391
|
+
::Myco.find_constant(:T).op_compare
|
1392
|
+
).__send__(
|
1393
|
+
:/,
|
1394
|
+
::Myco.find_constant(:T).op_and
|
1395
|
+
).__send__(
|
1396
|
+
:/,
|
1397
|
+
::Myco.find_constant(:T).op_or
|
1398
|
+
))}
|
1399
|
+
declare_meme(:left_op_branch, [], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:T).op_and.__send__(
|
1400
|
+
:/,
|
1401
|
+
::Myco.find_constant(:T).op_or
|
1402
|
+
).__send__(
|
1403
|
+
:/,
|
1404
|
+
::Myco.find_constant(:T).op_and_q
|
1405
|
+
).__send__(
|
1406
|
+
:/,
|
1407
|
+
::Myco.find_constant(:T).op_or_q
|
1408
|
+
).__send__(
|
1409
|
+
:/,
|
1410
|
+
::Myco.find_constant(:T).op_void_q
|
1411
|
+
))}
|
1412
|
+
declare_meme(:left_op, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.left_op_normal.__send__(
|
1413
|
+
:/,
|
1414
|
+
self.left_op_branch
|
1415
|
+
))}
|
1416
|
+
declare_meme(:sepd_chained_atom, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:C).spc_nl.__send__(:*).__send__(
|
1417
|
+
:+,
|
1418
|
+
self.left_op.__send__(
|
1419
|
+
:[],
|
1420
|
+
:to
|
1421
|
+
)
|
1422
|
+
).__send__(
|
1423
|
+
:+,
|
1424
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1425
|
+
).__send__(
|
1426
|
+
:+,
|
1427
|
+
self.expr_atom.__send__(
|
1428
|
+
:[],
|
1429
|
+
:n1
|
1430
|
+
)
|
1431
|
+
)) { || ([
|
1432
|
+
self.to,
|
1433
|
+
self.__send__(:n1)
|
1434
|
+
])})}
|
1435
|
+
declare_meme(:left_chained_atoms, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.expr_atom.__send__(
|
1436
|
+
:[],
|
1437
|
+
:n0
|
1438
|
+
).__send__(
|
1439
|
+
:+,
|
1440
|
+
self.sepd_chained_atom.__send__(:+).__send__(
|
1441
|
+
:[],
|
1442
|
+
:nlist
|
1443
|
+
)
|
1444
|
+
)) { || (
|
1445
|
+
self.nlist.unshift(self.__send__(:n0))
|
1446
|
+
self.nlist.__send__(:flatten!)
|
1447
|
+
self.collapse(
|
1448
|
+
self.nlist,
|
1449
|
+
:t_op_exp
|
1450
|
+
)
|
1451
|
+
self.collapse(
|
1452
|
+
self.nlist,
|
1453
|
+
:t_op_mult,
|
1454
|
+
:t_op_div,
|
1455
|
+
:t_op_mod
|
1456
|
+
)
|
1457
|
+
self.collapse(
|
1458
|
+
self.nlist,
|
1459
|
+
:t_op_plus,
|
1460
|
+
:t_op_minus
|
1461
|
+
)
|
1462
|
+
self.collapse(
|
1463
|
+
self.nlist,
|
1464
|
+
:t_op_compare
|
1465
|
+
)
|
1466
|
+
self.collapse(
|
1467
|
+
self.nlist,
|
1468
|
+
:t_op_and,
|
1469
|
+
:t_op_or,
|
1470
|
+
:t_op_and_q,
|
1471
|
+
:t_op_or_q,
|
1472
|
+
:t_op_void_q
|
1473
|
+
) { |n0, op, n1| (self.ast.branch_op(
|
1474
|
+
op,
|
1475
|
+
op.sym,
|
1476
|
+
n0,
|
1477
|
+
n1
|
1478
|
+
))}
|
1479
|
+
::Myco.branch_op(:"||", self.nlist.count.__send__(
|
1480
|
+
:==,
|
1481
|
+
1
|
1482
|
+
)) {self.raise("Failed to fully collapse left_chained_atoms: #{self.nlist}")}
|
1483
|
+
self.nlist.first
|
1484
|
+
)})}
|
1485
|
+
declare_meme(:left_invoke_op, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:T).quest.__send__(
|
1486
|
+
:/,
|
1487
|
+
::Myco.find_constant(:T).dot
|
1488
|
+
))}
|
1489
|
+
declare_meme(:sepd_chained_invocation, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:C).spc_nl.__send__(:*).__send__(
|
1490
|
+
:+,
|
1491
|
+
self.left_invoke_op.__send__(
|
1492
|
+
:[],
|
1493
|
+
:t0
|
1494
|
+
)
|
1495
|
+
).__send__(
|
1496
|
+
:+,
|
1497
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1498
|
+
).__send__(
|
1499
|
+
:+,
|
1500
|
+
self.invoke.__send__(
|
1501
|
+
:/,
|
1502
|
+
self.op_invoke
|
1503
|
+
).__send__(
|
1504
|
+
:[],
|
1505
|
+
:n1
|
1506
|
+
)
|
1507
|
+
)) { || ([
|
1508
|
+
self.__send__(:t0),
|
1509
|
+
self.__send__(:n1)
|
1510
|
+
])}.__send__(
|
1511
|
+
:/,
|
1512
|
+
self.r(::Myco.find_constant(:C).spc.__send__(:*).token(:t_dot).__send__(
|
1513
|
+
:[],
|
1514
|
+
:t0
|
1515
|
+
).__send__(
|
1516
|
+
:+,
|
1517
|
+
self.elem_invoke.__send__(
|
1518
|
+
:[],
|
1519
|
+
:n1
|
1520
|
+
)
|
1521
|
+
)) { || ([
|
1522
|
+
self.__send__(:t0),
|
1523
|
+
self.__send__(:n1)
|
1524
|
+
])}
|
1525
|
+
))}
|
1526
|
+
declare_meme(:left_chained_invocations, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.expr_atom_not_chained.__send__(
|
1527
|
+
:[],
|
1528
|
+
:n0
|
1529
|
+
).__send__(
|
1530
|
+
:+,
|
1531
|
+
self.sepd_chained_invocation.__send__(:+).__send__(
|
1532
|
+
:[],
|
1533
|
+
:nlist
|
1534
|
+
)
|
1535
|
+
)) { || (
|
1536
|
+
self.nlist.unshift(self.__send__(:n0))
|
1537
|
+
self.nlist.send(:flatten!)
|
1538
|
+
self.collapse(
|
1539
|
+
self.nlist,
|
1540
|
+
:t_dot,
|
1541
|
+
:t_quest
|
1542
|
+
) { |n0, op, n1| (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", op.type.__send__(
|
1543
|
+
:==,
|
1544
|
+
:t_dot
|
1545
|
+
)) {(
|
1546
|
+
n1.__send__(
|
1547
|
+
:receiver=,
|
1548
|
+
n0
|
1549
|
+
)
|
1550
|
+
n1
|
1551
|
+
)}) {self.ast.quest(
|
1552
|
+
op,
|
1553
|
+
n0,
|
1554
|
+
n1
|
1555
|
+
)})}
|
1556
|
+
::Myco.branch_op(:"||", self.nlist.count.__send__(
|
1557
|
+
:==,
|
1558
|
+
1
|
1559
|
+
)) {self.raise("Failed to fully collapse left_chained_invocations: #{self.nlist}")}
|
1560
|
+
self.nlist.first
|
1561
|
+
)})}
|
1562
|
+
declare_meme(:unary_operation, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).op_not.__send__(
|
1563
|
+
:[],
|
1564
|
+
:to
|
1565
|
+
).__send__(
|
1566
|
+
:+,
|
1567
|
+
self.expr_atom.__send__(
|
1568
|
+
:[],
|
1569
|
+
:n0
|
1570
|
+
)
|
1571
|
+
)) { || (self.ast.invoke(
|
1572
|
+
self.to,
|
1573
|
+
self.__send__(:n0),
|
1574
|
+
:!,
|
1575
|
+
nil
|
1576
|
+
))})}
|
1577
|
+
declare_meme(:t_inln_sep, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:T).arg_sep.inner.__send__(:!).__send__(
|
1578
|
+
:+,
|
1579
|
+
::Myco.find_constant(:T).expr_sep
|
1580
|
+
))}
|
1581
|
+
declare_meme(:inln_sep, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:C).spc.__send__(:*).__send__(
|
1582
|
+
:+,
|
1583
|
+
self.t_inln_sep
|
1584
|
+
).__send__(
|
1585
|
+
:+,
|
1586
|
+
::Myco.find_constant(:C).spc.__send__(:*)
|
1587
|
+
).__send__(:+))}
|
1588
|
+
declare_meme(:inln_sep_opt, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:C).spc.__send__(
|
1589
|
+
:/,
|
1590
|
+
self.t_inln_sep
|
1591
|
+
).__send__(:*))}
|
1592
|
+
declare_meme(:expr_sep, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:C).spc.__send__(:*).__send__(
|
1593
|
+
:+,
|
1594
|
+
::Myco.find_constant(:T).expr_sep
|
1595
|
+
).__send__(
|
1596
|
+
:+,
|
1597
|
+
::Myco.find_constant(:C).spc.__send__(:*)
|
1598
|
+
).__send__(:+))}
|
1599
|
+
declare_meme(:expr_sep_opt, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (::Myco.find_constant(:C).spc.__send__(
|
1600
|
+
:/,
|
1601
|
+
::Myco.find_constant(:T).expr_sep
|
1602
|
+
).__send__(:*))}
|
1603
|
+
declare_meme(:meme_inline_sepd_expr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.inln_sep.__send__(
|
1604
|
+
:+,
|
1605
|
+
self.meme_expr.__send__(
|
1606
|
+
:[],
|
1607
|
+
:n
|
1608
|
+
)
|
1609
|
+
)) { || (self.n)})}
|
1610
|
+
declare_meme(:meme_inline_sepd_exprs, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.meme_expr.__send__(
|
1611
|
+
:[],
|
1612
|
+
:n0
|
1613
|
+
).__send__(
|
1614
|
+
:+,
|
1615
|
+
self.meme_inline_sepd_expr.__send__(:*).__send__(
|
1616
|
+
:[],
|
1617
|
+
:nrest
|
1618
|
+
)
|
1619
|
+
).__send__(
|
1620
|
+
:+,
|
1621
|
+
self.inln_sep_opt
|
1622
|
+
)) { || ([
|
1623
|
+
self.__send__(:n0),
|
1624
|
+
*self.nrest
|
1625
|
+
])})}
|
1626
|
+
declare_meme(:meme_sepd_expr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.expr_sep.__send__(
|
1627
|
+
:+,
|
1628
|
+
self.meme_expr.__send__(
|
1629
|
+
:[],
|
1630
|
+
:n
|
1631
|
+
)
|
1632
|
+
)) { || (self.n)})}
|
1633
|
+
declare_meme(:meme_sepd_exprs, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.meme_expr.__send__(
|
1634
|
+
:[],
|
1635
|
+
:n0
|
1636
|
+
).__send__(
|
1637
|
+
:+,
|
1638
|
+
self.meme_sepd_expr.__send__(:*).__send__(
|
1639
|
+
:[],
|
1640
|
+
:nrest
|
1641
|
+
)
|
1642
|
+
).__send__(
|
1643
|
+
:+,
|
1644
|
+
self.expr_sep_opt
|
1645
|
+
)) { || ([
|
1646
|
+
self.__send__(:n0),
|
1647
|
+
*self.nrest
|
1648
|
+
])})}
|
1649
|
+
declare_meme(:meme_inline_expr_body, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.inln_sep_opt.__send__(
|
1650
|
+
:+,
|
1651
|
+
self.meme_inline_sepd_exprs.__send__(
|
1652
|
+
:[],
|
1653
|
+
:nlist
|
1654
|
+
)
|
1655
|
+
)) { || (self.ast.block(
|
1656
|
+
self.nlist.first,
|
1657
|
+
self.nlist
|
1658
|
+
))})}
|
1659
|
+
declare_meme(:meme_expr_body, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.expr_sep_opt.__send__(
|
1660
|
+
:+,
|
1661
|
+
self.meme_sepd_exprs.__send__(
|
1662
|
+
:[],
|
1663
|
+
:nlist
|
1664
|
+
)
|
1665
|
+
).__send__(
|
1666
|
+
:+,
|
1667
|
+
::Myco.find_constant(:T).meme_end.__send__(
|
1668
|
+
:[],
|
1669
|
+
:te
|
1670
|
+
)
|
1671
|
+
)) { || (self.ast.block(
|
1672
|
+
self.nlist.first,
|
1673
|
+
self.nlist
|
1674
|
+
))}.__send__(
|
1675
|
+
:/,
|
1676
|
+
self.r(self.expr_sep_opt.__send__(
|
1677
|
+
:+,
|
1678
|
+
::Myco.find_constant(:T).meme_end.__send__(
|
1679
|
+
:[],
|
1680
|
+
:te
|
1681
|
+
)
|
1682
|
+
)) { || (self.ast.null(self.te))}
|
1683
|
+
))}
|
1684
|
+
declare_meme(:paren_expr_body, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.expr_sep_opt.__send__(
|
1685
|
+
:+,
|
1686
|
+
self.meme_sepd_exprs.__send__(
|
1687
|
+
:[],
|
1688
|
+
:nlist
|
1689
|
+
)
|
1690
|
+
).__send__(
|
1691
|
+
:+,
|
1692
|
+
::Myco.find_constant(:T).paren_end.__send__(
|
1693
|
+
:[],
|
1694
|
+
:te
|
1695
|
+
)
|
1696
|
+
)) { || (::Myco.branch_op(:"??", ::Myco.branch_op(:"&?", self.nlist.count.__send__(
|
1697
|
+
:==,
|
1698
|
+
1
|
1699
|
+
)) {self.nlist.first}) {self.ast.block(
|
1700
|
+
self.nlist.first,
|
1701
|
+
self.nlist
|
1702
|
+
)})}.__send__(
|
1703
|
+
:/,
|
1704
|
+
self.r(self.expr_sep_opt.__send__(
|
1705
|
+
:+,
|
1706
|
+
::Myco.find_constant(:T).paren_end.__send__(
|
1707
|
+
:[],
|
1708
|
+
:te
|
1709
|
+
)
|
1710
|
+
)) { || (self.ast.null(self.te))}
|
1711
|
+
))}
|
1712
|
+
declare_meme(:paren_expr, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).paren_begin.__send__(
|
1713
|
+
:+,
|
1714
|
+
self.paren_expr_body.__send__(
|
1715
|
+
:[],
|
1716
|
+
:n0
|
1717
|
+
)
|
1718
|
+
)) { || (self.__send__(:n0))})}
|
1719
|
+
declare_meme(:meme_enclosed_expr_body, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:T).meme_begin.__send__(
|
1720
|
+
:+,
|
1721
|
+
self.meme_expr_body.__send__(
|
1722
|
+
:[],
|
1723
|
+
:n0
|
1724
|
+
)
|
1725
|
+
)) { || (self.__send__(:n0))})}
|
1726
|
+
declare_meme(:meme_either_body, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.meme_enclosed_expr_body.__send__(
|
1727
|
+
:/,
|
1728
|
+
self.meme_inline_expr_body
|
1729
|
+
))}
|
1730
|
+
declare_meme(:cmeme, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.constant.__send__(
|
1731
|
+
:[],
|
1732
|
+
:n0
|
1733
|
+
).__send__(
|
1734
|
+
:+,
|
1735
|
+
::Myco.find_constant(:C).spc.__send__(:*)
|
1736
|
+
).__send__(
|
1737
|
+
:+,
|
1738
|
+
::Myco.find_constant(:T).meme_mark.__send__(
|
1739
|
+
:[],
|
1740
|
+
:tm
|
1741
|
+
)
|
1742
|
+
).__send__(
|
1743
|
+
:+,
|
1744
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1745
|
+
).__send__(
|
1746
|
+
:+,
|
1747
|
+
self.meme_inline_expr_body.__send__(
|
1748
|
+
:[],
|
1749
|
+
:n1
|
1750
|
+
)
|
1751
|
+
)) { || (self.ast.cdecl(
|
1752
|
+
self.tm,
|
1753
|
+
self.__send__(:n0),
|
1754
|
+
self.__send__(:n1)
|
1755
|
+
))})}
|
1756
|
+
declare_meme(:meme_name, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.id_as_symbol.__send__(
|
1757
|
+
:/,
|
1758
|
+
self.lit_string_as_symbol
|
1759
|
+
))}
|
1760
|
+
declare_meme(:decorator, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.meme_name.__send__(
|
1761
|
+
:[],
|
1762
|
+
:ni
|
1763
|
+
).__send__(
|
1764
|
+
:+,
|
1765
|
+
self.arg_list.__send__(:-).__send__(
|
1766
|
+
:[],
|
1767
|
+
:na
|
1768
|
+
)
|
1769
|
+
)) { || (self.ast.deco(
|
1770
|
+
self.ni,
|
1771
|
+
self.ni,
|
1772
|
+
self.na
|
1773
|
+
))})}
|
1774
|
+
declare_meme(:sepd_decorator, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(::Myco.find_constant(:C).spc.__send__(:*).__send__(
|
1775
|
+
:+,
|
1776
|
+
self.decorator.__send__(
|
1777
|
+
:[],
|
1778
|
+
:n
|
1779
|
+
)
|
1780
|
+
)) { || (self.n)})}
|
1781
|
+
declare_meme(:decorators_and_meme_name, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.decorator.__send__(
|
1782
|
+
:[],
|
1783
|
+
:n0
|
1784
|
+
).__send__(
|
1785
|
+
:+,
|
1786
|
+
self.sepd_decorator.__send__(:*).__send__(
|
1787
|
+
:[],
|
1788
|
+
:nrest
|
1789
|
+
)
|
1790
|
+
)) { || (self.ast.arrass(
|
1791
|
+
self.__send__(:n0),
|
1792
|
+
[
|
1793
|
+
self.__send__(:n0),
|
1794
|
+
*self.nrest
|
1795
|
+
].reverse
|
1796
|
+
))})}
|
1797
|
+
declare_meme(:meme, [[:rule, []]], nil, ::Myco.cscope.dup) { |*| (self.r(self.decorators_and_meme_name.__send__(
|
1798
|
+
:[],
|
1799
|
+
:nd
|
1800
|
+
).__send__(
|
1801
|
+
:+,
|
1802
|
+
::Myco.find_constant(:C).spc.__send__(:*)
|
1803
|
+
).__send__(
|
1804
|
+
:+,
|
1805
|
+
::Myco.find_constant(:T).meme_mark.__send__(
|
1806
|
+
:[],
|
1807
|
+
:tm
|
1808
|
+
)
|
1809
|
+
).__send__(
|
1810
|
+
:+,
|
1811
|
+
self.r(::Myco.find_constant(:C).spc_nl.__send__(:*).__send__(
|
1812
|
+
:+,
|
1813
|
+
self.param_list.__send__(:-).__send__(
|
1814
|
+
:[],
|
1815
|
+
:n
|
1816
|
+
)
|
1817
|
+
)) { || (self.n)}.__send__(
|
1818
|
+
:[],
|
1819
|
+
:np
|
1820
|
+
)
|
1821
|
+
).__send__(
|
1822
|
+
:+,
|
1823
|
+
::Myco.find_constant(:C).spc_nl.__send__(:*)
|
1824
|
+
).__send__(
|
1825
|
+
:+,
|
1826
|
+
self.meme_either_body.__send__(
|
1827
|
+
:[],
|
1828
|
+
:nb
|
1829
|
+
)
|
1830
|
+
)) { || (self.ast.meme(
|
1831
|
+
self.tm,
|
1832
|
+
self.nd.body.shift.name,
|
1833
|
+
self.nd,
|
1834
|
+
self.np,
|
1835
|
+
self.nb
|
1836
|
+
))}.__send__(
|
1837
|
+
:/,
|
1838
|
+
self.r(self.decorators_and_meme_name.__send__(
|
1839
|
+
:[],
|
1840
|
+
:nd
|
1841
|
+
)) { || (self.ast.meme(
|
1842
|
+
self.nd,
|
1843
|
+
self.nd.body.shift.name,
|
1844
|
+
self.nd,
|
1845
|
+
nil,
|
1846
|
+
nil
|
1847
|
+
))}
|
1848
|
+
))}
|
1849
|
+
)}
|
1850
|
+
)}}.instance))
|
1851
|
+
)}}.instance
|