riml 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/riml +3 -2
- data/lib/compiler.rb +17 -5
- data/lib/constants.rb +4 -0
- data/lib/grammar.y +157 -148
- data/lib/include_cache.rb +46 -0
- data/lib/lexer.rb +41 -28
- data/lib/nodes.rb +46 -9
- data/lib/parser.rb +149 -140
- data/lib/riml.rb +24 -15
- data/version.rb +2 -2
- metadata +54 -3
- data/Gemfile.lock +0 -15
@@ -0,0 +1,46 @@
|
|
1
|
+
module Riml
|
2
|
+
class IncludeCache
|
3
|
+
|
4
|
+
def initialize
|
5
|
+
@cache = {}
|
6
|
+
@m = Mutex.new
|
7
|
+
# Only Ruby 2.0+ has Mutex#owned? method
|
8
|
+
@owns_lock = nil
|
9
|
+
end
|
10
|
+
|
11
|
+
# `fetch` can be called recursively in the `yield`ed block, so must
|
12
|
+
# make sure not to try to lock a Mutex if it's already locked, as this
|
13
|
+
# would result in a deadlock.
|
14
|
+
def fetch(included_filename)
|
15
|
+
if source = @cache[included_filename]
|
16
|
+
return source
|
17
|
+
end
|
18
|
+
|
19
|
+
if @m.locked? && @owns_lock == Thread.current
|
20
|
+
@cache[included_filename] = yield
|
21
|
+
else
|
22
|
+
ret = nil
|
23
|
+
@cache[included_filename] = @m.synchronize do
|
24
|
+
begin
|
25
|
+
@owns_lock = Thread.current
|
26
|
+
ret = yield
|
27
|
+
ensure
|
28
|
+
@owns_lock = nil
|
29
|
+
end
|
30
|
+
end
|
31
|
+
ret
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def [](included_filename)
|
36
|
+
@m.synchronize { @cache[included_filename] }
|
37
|
+
end
|
38
|
+
|
39
|
+
# `clear` should only be called by the main thread that is using the
|
40
|
+
# `Riml.compile_files` method.
|
41
|
+
def clear
|
42
|
+
@m.synchronize { @cache.clear }
|
43
|
+
self
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/lexer.rb
CHANGED
@@ -11,13 +11,17 @@ module Riml
|
|
11
11
|
ANCHORED_INTERPOLATION_REGEX = /\A#{INTERPOLATION_REGEX}/m
|
12
12
|
INTERPOLATION_SPLIT_REGEX = /(\#\{.*?\})/m
|
13
13
|
|
14
|
-
attr_reader :tokens, :prev_token, :lineno, :chunk,
|
14
|
+
attr_reader :tokens, :prev_token, :lineno, :chunk,
|
15
|
+
:current_indent, :invalid_keyword, :filename,
|
16
|
+
:parser_info
|
15
17
|
# for REPL
|
16
18
|
attr_accessor :ignore_indentation_check
|
17
19
|
|
18
|
-
def initialize(code)
|
20
|
+
def initialize(code, filename = nil, parser_info = false)
|
19
21
|
@code = code
|
20
22
|
@code.chomp!
|
23
|
+
@filename = filename
|
24
|
+
@parser_info = parser_info
|
21
25
|
set_start_state!
|
22
26
|
end
|
23
27
|
|
@@ -27,13 +31,17 @@ module Riml
|
|
27
31
|
# array of doubles and triples: [tokenname, tokenval, lineno_to_add(optional)]
|
28
32
|
# ex: [[:NEWLINE, "\n"]] OR [[:NEWLINE, "\n", 1]]
|
29
33
|
@token_buf = []
|
34
|
+
# array of doubles OR triples, depending if `@parser_info` is set to true
|
35
|
+
# doubles: [tokenname, tokenval]
|
36
|
+
# ex: [[:NEWLINE, "\n"], ...]
|
37
|
+
# triples: [tokenname, tokenval, parser_info]
|
38
|
+
# ex: [[:NEWLINE, "\n", { :lineno => 1, :filename => 'main.riml' }], ...]
|
30
39
|
@tokens = []
|
31
40
|
@prev_token = nil
|
32
41
|
@lineno = 1
|
33
42
|
@current_indent = 0
|
34
43
|
@indent_pending = false
|
35
44
|
@dedent_pending = false
|
36
|
-
@one_line_conditional_end_pending = false
|
37
45
|
@in_function_declaration = false
|
38
46
|
@invalid_keyword = nil
|
39
47
|
end
|
@@ -53,8 +61,14 @@ module Riml
|
|
53
61
|
if token.size == 3
|
54
62
|
@lineno += token.pop
|
55
63
|
end
|
56
|
-
|
57
|
-
|
64
|
+
if @parser_info
|
65
|
+
tokens << decorate_token(token)
|
66
|
+
@prev_token = token.first(2)
|
67
|
+
return token
|
68
|
+
else
|
69
|
+
tokens << token
|
70
|
+
return @prev_token = token
|
71
|
+
end
|
58
72
|
end
|
59
73
|
check_indentation unless ignore_indentation_check
|
60
74
|
nil
|
@@ -80,7 +94,7 @@ module Riml
|
|
80
94
|
@i += splat_var.size
|
81
95
|
@token_buf << [:SCOPE_MODIFIER, 'a:'] << [:IDENTIFIER, splat_var[2..-1]]
|
82
96
|
# the 'n' scope modifier is added by riml
|
83
|
-
elsif scope_modifier = chunk[/\A([bwtglsavn]:)(\w
|
97
|
+
elsif scope_modifier = chunk[/\A([bwtglsavn]:)(\w|\{)/, 1]
|
84
98
|
@i += 2
|
85
99
|
@token_buf << [:SCOPE_MODIFIER, scope_modifier]
|
86
100
|
elsif scope_modifier_literal = chunk[/\A([bwtglsavn]:)/]
|
@@ -185,9 +199,7 @@ module Riml
|
|
185
199
|
@token_buf << [:NEWLINE, "\n"] unless prev_token && prev_token[0] == :NEWLINE
|
186
200
|
|
187
201
|
# pending indents/dedents
|
188
|
-
if @
|
189
|
-
@one_line_conditional_end_pending = false
|
190
|
-
elsif @indent_pending
|
202
|
+
if @indent_pending
|
191
203
|
@indent_pending = false
|
192
204
|
elsif @dedent_pending
|
193
205
|
@dedent_pending = false
|
@@ -233,37 +245,42 @@ module Riml
|
|
233
245
|
end
|
234
246
|
end
|
235
247
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
if
|
243
|
-
return @invalid_keyword =
|
248
|
+
# Checks if any of previous n tokens are keywords.
|
249
|
+
# If any found, sets `@invalid_keyword` to the found token value.
|
250
|
+
def prev_token_is_keyword?(n = 2)
|
251
|
+
return false if n <= 0
|
252
|
+
(1..n).each do |i|
|
253
|
+
t = tokens[-i]
|
254
|
+
if t && t[1] && KEYWORDS.include?(t[1])
|
255
|
+
return @invalid_keyword = t[1]
|
244
256
|
end
|
245
257
|
end
|
258
|
+
false
|
246
259
|
end
|
247
260
|
|
248
261
|
private
|
249
262
|
|
263
|
+
def decorate_token(token)
|
264
|
+
token << {
|
265
|
+
:lineno => @lineno,
|
266
|
+
:filename => @filename
|
267
|
+
}
|
268
|
+
token
|
269
|
+
end
|
270
|
+
|
250
271
|
def track_indent_level(chunk, identifier)
|
251
272
|
case identifier.to_sym
|
252
273
|
when :def, :def!, :defm, :defm!, :while, :until, :for, :try, :class
|
253
274
|
@current_indent += 2
|
254
275
|
@indent_pending = true
|
255
276
|
when :if, :unless
|
256
|
-
if
|
257
|
-
@one_line_conditional_end_pending = true
|
258
|
-
elsif !statement_modifier?
|
277
|
+
if !statement_modifier?
|
259
278
|
@current_indent += 2
|
260
279
|
@indent_pending = true
|
261
280
|
end
|
262
281
|
when *END_KEYWORDS.map(&:to_sym)
|
263
|
-
|
264
|
-
|
265
|
-
@dedent_pending = true
|
266
|
-
end
|
282
|
+
@current_indent -= 2
|
283
|
+
@dedent_pending = true
|
267
284
|
end
|
268
285
|
end
|
269
286
|
|
@@ -288,10 +305,6 @@ module Riml
|
|
288
305
|
raise SyntaxError, "#{(@current_indent / 2).abs} too many END identifiers" if @current_indent < 0
|
289
306
|
end
|
290
307
|
|
291
|
-
def one_line_conditional?(chunk)
|
292
|
-
chunk[/^(if|unless).+?(else)?.+?end$/]
|
293
|
-
end
|
294
|
-
|
295
308
|
def handle_interpolation(*parts)
|
296
309
|
parts.delete_if {|p| p.empty?}.each_with_index do |part, i|
|
297
310
|
if part[0..1] == '#{' && part[-1] == '}'
|
data/lib/nodes.rb
CHANGED
@@ -8,7 +8,7 @@ module Riml
|
|
8
8
|
visitor.visit(self)
|
9
9
|
end
|
10
10
|
|
11
|
-
attr_accessor :parent_node, :scope, :force_newline
|
11
|
+
attr_accessor :parent_node, :scope, :force_newline, :parser_info
|
12
12
|
alias parent parent_node
|
13
13
|
alias parent= parent_node=
|
14
14
|
|
@@ -17,6 +17,18 @@ module Riml
|
|
17
17
|
@compiled_output ||= ''
|
18
18
|
end
|
19
19
|
|
20
|
+
def location_info
|
21
|
+
n = self
|
22
|
+
while n != nil && !n.parser_info
|
23
|
+
n = n.parent
|
24
|
+
end
|
25
|
+
if n.nil?
|
26
|
+
return '<unknown>'
|
27
|
+
end
|
28
|
+
filename = parser_info[:filename] || Constants::COMPILED_STRING_LOCATION
|
29
|
+
"#{filename}:#{parser_info[:lineno]}"
|
30
|
+
end
|
31
|
+
|
20
32
|
# catches "descendant_of_#{some_class}?" methods
|
21
33
|
# def descendant_of_call_node?
|
22
34
|
# CallNode === self.parent_node
|
@@ -344,7 +356,6 @@ module Riml
|
|
344
356
|
remove_parens_wrapper if builtin_command?
|
345
357
|
end
|
346
358
|
|
347
|
-
# TODO: find way to remove this hack
|
348
359
|
def remove_parens_wrapper
|
349
360
|
return unless WrapInParensNode === arguments.first
|
350
361
|
arguments[0] = arguments[0].expression
|
@@ -384,6 +395,8 @@ module Riml
|
|
384
395
|
# call Method()
|
385
396
|
# call s:Method(argument1, argument2)
|
386
397
|
class ExplicitCallNode < CallNode; end
|
398
|
+
|
399
|
+
# riml_include and riml_source
|
387
400
|
class RimlCommandNode < CallNode
|
388
401
|
|
389
402
|
def initialize(*)
|
@@ -393,21 +406,29 @@ module Riml
|
|
393
406
|
end
|
394
407
|
end
|
395
408
|
|
396
|
-
# yields full file path for each existing file found in
|
409
|
+
# yields basename and full file path for each existing file found in
|
410
|
+
# Riml.source_path or Riml.include_path
|
397
411
|
def each_existing_file!
|
398
412
|
files = {}
|
399
|
-
|
413
|
+
file_variants.each do |(fname_given, fname_ext_added)|
|
414
|
+
fname = nil
|
400
415
|
if base_path = paths.detect do |path|
|
401
|
-
|
402
|
-
File.
|
416
|
+
full_given = File.join(path, fname_given)
|
417
|
+
full_ext_added = File.join(path, fname_ext_added)
|
418
|
+
fname = if File.exists?(full_given)
|
419
|
+
fname_given
|
420
|
+
elsif File.exists?(full_ext_added)
|
421
|
+
add_ext_to_filename(fname_given)
|
422
|
+
fname_ext_added
|
423
|
+
end
|
403
424
|
end
|
404
|
-
files[
|
425
|
+
files[fname] = File.join(base_path, fname)
|
405
426
|
else
|
406
|
-
raise Riml::FileNotFound, "#{
|
427
|
+
raise Riml::FileNotFound, "#{fname_given.inspect} could not be found in " \
|
407
428
|
"Riml.#{name.sub('riml_', '')}_path (#{paths.join(':').inspect})"
|
408
429
|
end
|
409
430
|
end
|
410
|
-
return files
|
431
|
+
return files unless block_given?
|
411
432
|
# all files exist
|
412
433
|
files.each do |basename, full_path|
|
413
434
|
begin
|
@@ -425,6 +446,22 @@ module Riml
|
|
425
446
|
Riml.source_path
|
426
447
|
end
|
427
448
|
end
|
449
|
+
|
450
|
+
private
|
451
|
+
|
452
|
+
def file_variants
|
453
|
+
arguments.map { |arg| file_variants_for_arg(arg) }
|
454
|
+
end
|
455
|
+
|
456
|
+
def file_variants_for_arg(arg)
|
457
|
+
[arg.value, "#{arg.value}.riml"]
|
458
|
+
end
|
459
|
+
|
460
|
+
def add_ext_to_filename(fname)
|
461
|
+
arg = arguments.detect { |a| a.value == fname }
|
462
|
+
return unless arg
|
463
|
+
arg.value = file_variants_for_arg(arg).last
|
464
|
+
end
|
428
465
|
end
|
429
466
|
|
430
467
|
class OperatorNode < Struct.new(:operator, :operands)
|
data/lib/parser.rb
CHANGED
@@ -23,7 +23,7 @@ module_eval(<<'...end grammar.y/module_eval...', 'grammar.y', 535)
|
|
23
23
|
if tokens?(object)
|
24
24
|
@tokens = object
|
25
25
|
elsif code?(object)
|
26
|
-
@lexer = Riml::Lexer.new(object)
|
26
|
+
@lexer = Riml::Lexer.new(object, filename, true)
|
27
27
|
end
|
28
28
|
|
29
29
|
begin
|
@@ -34,7 +34,7 @@ module_eval(<<'...end grammar.y/module_eval...', 'grammar.y', 535)
|
|
34
34
|
warning = "#{@lexer.invalid_keyword.inspect} is a keyword, and cannot " \
|
35
35
|
"be used as a variable name"
|
36
36
|
end
|
37
|
-
error_msg = "
|
37
|
+
error_msg = "#{e.message} at #{@lexer.filename}:#{@lexer.lineno}"
|
38
38
|
error_msg << "\n\n#{warning}" if warning
|
39
39
|
raise Riml::ParseError, error_msg
|
40
40
|
end
|
@@ -49,10 +49,13 @@ module_eval(<<'...end grammar.y/module_eval...', 'grammar.y', 535)
|
|
49
49
|
# the lexer getting the next token
|
50
50
|
def next_token
|
51
51
|
return @tokens.shift unless @lexer
|
52
|
-
@lexer.next_token
|
52
|
+
token = @lexer.next_token
|
53
|
+
@current_parser_info = token.pop if token
|
54
|
+
token
|
53
55
|
end
|
54
56
|
|
55
57
|
private
|
58
|
+
|
56
59
|
def tokens?(object)
|
57
60
|
Array === object
|
58
61
|
end
|
@@ -60,6 +63,12 @@ module_eval(<<'...end grammar.y/module_eval...', 'grammar.y', 535)
|
|
60
63
|
def code?(object)
|
61
64
|
String === object
|
62
65
|
end
|
66
|
+
|
67
|
+
def make_node(racc_val)
|
68
|
+
node = yield racc_val
|
69
|
+
node.parser_info = @current_parser_info
|
70
|
+
node
|
71
|
+
end
|
63
72
|
...end grammar.y/module_eval...
|
64
73
|
##### State transition tables begin ###
|
65
74
|
|
@@ -1370,7 +1379,7 @@ Racc_debug_parser = false
|
|
1370
1379
|
|
1371
1380
|
module_eval(<<'.,.,', 'grammar.y', 39)
|
1372
1381
|
def _reduce_1(val, _values, result)
|
1373
|
-
result = Riml::Nodes.new([])
|
1382
|
+
result = make_node(val) { |_| Riml::Nodes.new([]) }
|
1374
1383
|
result
|
1375
1384
|
end
|
1376
1385
|
.,.,
|
@@ -1384,7 +1393,7 @@ module_eval(<<'.,.,', 'grammar.y', 40)
|
|
1384
1393
|
|
1385
1394
|
module_eval(<<'.,.,', 'grammar.y', 45)
|
1386
1395
|
def _reduce_3(val, _values, result)
|
1387
|
-
result = Riml::Nodes.new([
|
1396
|
+
result = make_node(val) { |v| Riml::Nodes.new([ v[0] ]) }
|
1388
1397
|
result
|
1389
1398
|
end
|
1390
1399
|
.,.,
|
@@ -1405,14 +1414,14 @@ module_eval(<<'.,.,', 'grammar.y', 47)
|
|
1405
1414
|
|
1406
1415
|
module_eval(<<'.,.,', 'grammar.y', 48)
|
1407
1416
|
def _reduce_6(val, _values, result)
|
1408
|
-
result = Riml::Nodes.new([])
|
1417
|
+
result = make_node(val) { |_| Riml::Nodes.new([]) }
|
1409
1418
|
result
|
1410
1419
|
end
|
1411
1420
|
.,.,
|
1412
1421
|
|
1413
1422
|
module_eval(<<'.,.,', 'grammar.y', 49)
|
1414
1423
|
def _reduce_7(val, _values, result)
|
1415
|
-
result = Riml::Nodes.new(
|
1424
|
+
result = make_node(val) { |v| Riml::Nodes.new(v[1]) }
|
1416
1425
|
result
|
1417
1426
|
end
|
1418
1427
|
.,.,
|
@@ -1552,7 +1561,7 @@ module_eval(<<'.,.,', 'grammar.y', 75)
|
|
1552
1561
|
|
1553
1562
|
module_eval(<<'.,.,', 'grammar.y', 76)
|
1554
1563
|
def _reduce_27(val, _values, result)
|
1555
|
-
result = Riml::DictGetDotNode.new(
|
1564
|
+
result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) }
|
1556
1565
|
result
|
1557
1566
|
end
|
1558
1567
|
.,.,
|
@@ -1587,7 +1596,7 @@ module_eval(<<'.,.,', 'grammar.y', 80)
|
|
1587
1596
|
|
1588
1597
|
module_eval(<<'.,.,', 'grammar.y', 81)
|
1589
1598
|
def _reduce_32(val, _values, result)
|
1590
|
-
result = Riml::WrapInParensNode.new(
|
1599
|
+
result = make_node(val) { |v| Riml::WrapInParensNode.new(v[1]) }
|
1591
1600
|
result
|
1592
1601
|
end
|
1593
1602
|
.,.,
|
@@ -1643,7 +1652,7 @@ module_eval(<<'.,.,', 'grammar.y', 91)
|
|
1643
1652
|
|
1644
1653
|
module_eval(<<'.,.,', 'grammar.y', 92)
|
1645
1654
|
def _reduce_40(val, _values, result)
|
1646
|
-
result = Riml::WrapInParensNode.new(
|
1655
|
+
result = make_node(val) { |v| Riml::WrapInParensNode.new(v[1]) }
|
1647
1656
|
result
|
1648
1657
|
end
|
1649
1658
|
.,.,
|
@@ -1748,77 +1757,77 @@ module_eval(<<'.,.,', 'grammar.y', 116)
|
|
1748
1757
|
|
1749
1758
|
module_eval(<<'.,.,', 'grammar.y', 117)
|
1750
1759
|
def _reduce_55(val, _values, result)
|
1751
|
-
result = Riml::TrueNode.new
|
1760
|
+
result = make_node(val) { |_| Riml::TrueNode.new }
|
1752
1761
|
result
|
1753
1762
|
end
|
1754
1763
|
.,.,
|
1755
1764
|
|
1756
1765
|
module_eval(<<'.,.,', 'grammar.y', 118)
|
1757
1766
|
def _reduce_56(val, _values, result)
|
1758
|
-
result = Riml::FalseNode.new
|
1767
|
+
result = make_node(val) { |_| Riml::FalseNode.new }
|
1759
1768
|
result
|
1760
1769
|
end
|
1761
1770
|
.,.,
|
1762
1771
|
|
1763
1772
|
module_eval(<<'.,.,', 'grammar.y', 122)
|
1764
1773
|
def _reduce_57(val, _values, result)
|
1765
|
-
result = Riml::NumberNode.new(
|
1774
|
+
result = make_node(val) { |v| Riml::NumberNode.new(v[0]) }
|
1766
1775
|
result
|
1767
1776
|
end
|
1768
1777
|
.,.,
|
1769
1778
|
|
1770
1779
|
module_eval(<<'.,.,', 'grammar.y', 126)
|
1771
1780
|
def _reduce_58(val, _values, result)
|
1772
|
-
result = Riml::StringNode.new(
|
1781
|
+
result = make_node(val) { |v| Riml::StringNode.new(v[0], :s) }
|
1773
1782
|
result
|
1774
1783
|
end
|
1775
1784
|
.,.,
|
1776
1785
|
|
1777
1786
|
module_eval(<<'.,.,', 'grammar.y', 127)
|
1778
1787
|
def _reduce_59(val, _values, result)
|
1779
|
-
result = Riml::StringNode.new(
|
1788
|
+
result = make_node(val) { |v| Riml::StringNode.new(v[0], :d) }
|
1780
1789
|
result
|
1781
1790
|
end
|
1782
1791
|
.,.,
|
1783
1792
|
|
1784
1793
|
module_eval(<<'.,.,', 'grammar.y', 128)
|
1785
1794
|
def _reduce_60(val, _values, result)
|
1786
|
-
result = Riml::StringLiteralConcatNode.new(
|
1795
|
+
result = make_node(val) { |v| Riml::StringLiteralConcatNode.new(v[0], Riml::StringNode.new(v[1], :s)) }
|
1787
1796
|
result
|
1788
1797
|
end
|
1789
1798
|
.,.,
|
1790
1799
|
|
1791
1800
|
module_eval(<<'.,.,', 'grammar.y', 129)
|
1792
1801
|
def _reduce_61(val, _values, result)
|
1793
|
-
result = Riml::StringLiteralConcatNode.new(
|
1802
|
+
result = make_node(val) { |v| Riml::StringLiteralConcatNode.new(v[0], Riml::StringNode.new(v[1], :d)) }
|
1794
1803
|
result
|
1795
1804
|
end
|
1796
1805
|
.,.,
|
1797
1806
|
|
1798
1807
|
module_eval(<<'.,.,', 'grammar.y', 133)
|
1799
1808
|
def _reduce_62(val, _values, result)
|
1800
|
-
result = Riml::RegexpNode.new(
|
1809
|
+
result = make_node(val) { |v| Riml::RegexpNode.new(v[0]) }
|
1801
1810
|
result
|
1802
1811
|
end
|
1803
1812
|
.,.,
|
1804
1813
|
|
1805
1814
|
module_eval(<<'.,.,', 'grammar.y', 137)
|
1806
1815
|
def _reduce_63(val, _values, result)
|
1807
|
-
result = Riml::ScopeModifierLiteralNode.new(
|
1816
|
+
result = make_node(val) { |v| Riml::ScopeModifierLiteralNode.new(v[0]) }
|
1808
1817
|
result
|
1809
1818
|
end
|
1810
1819
|
.,.,
|
1811
1820
|
|
1812
1821
|
module_eval(<<'.,.,', 'grammar.y', 141)
|
1813
1822
|
def _reduce_64(val, _values, result)
|
1814
|
-
result = Riml::ListNode.new(
|
1823
|
+
result = make_node(val) { |v| Riml::ListNode.new(v[0]) }
|
1815
1824
|
result
|
1816
1825
|
end
|
1817
1826
|
.,.,
|
1818
1827
|
|
1819
1828
|
module_eval(<<'.,.,', 'grammar.y', 145)
|
1820
1829
|
def _reduce_65(val, _values, result)
|
1821
|
-
result = Riml::ListUnpackNode.new(
|
1830
|
+
result = make_node(val) { |v| Riml::ListUnpackNode.new(v[1] << v[3]) }
|
1822
1831
|
result
|
1823
1832
|
end
|
1824
1833
|
.,.,
|
@@ -1860,7 +1869,7 @@ module_eval(<<'.,.,', 'grammar.y', 156)
|
|
1860
1869
|
|
1861
1870
|
module_eval(<<'.,.,', 'grammar.y', 160)
|
1862
1871
|
def _reduce_71(val, _values, result)
|
1863
|
-
result = Riml::DictionaryNode.new(
|
1872
|
+
result = make_node(val) { |v| Riml::DictionaryNode.new(v[0]) }
|
1864
1873
|
result
|
1865
1874
|
end
|
1866
1875
|
.,.,
|
@@ -1909,49 +1918,49 @@ module_eval(<<'.,.,', 'grammar.y', 178)
|
|
1909
1918
|
|
1910
1919
|
module_eval(<<'.,.,', 'grammar.y', 182)
|
1911
1920
|
def _reduce_78(val, _values, result)
|
1912
|
-
result = Riml::DictGetDotNode.new(
|
1921
|
+
result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) }
|
1913
1922
|
result
|
1914
1923
|
end
|
1915
1924
|
.,.,
|
1916
1925
|
|
1917
1926
|
module_eval(<<'.,.,', 'grammar.y', 183)
|
1918
1927
|
def _reduce_79(val, _values, result)
|
1919
|
-
result = Riml::DictGetDotNode.new(
|
1928
|
+
result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) }
|
1920
1929
|
result
|
1921
1930
|
end
|
1922
1931
|
.,.,
|
1923
1932
|
|
1924
1933
|
module_eval(<<'.,.,', 'grammar.y', 184)
|
1925
1934
|
def _reduce_80(val, _values, result)
|
1926
|
-
result = Riml::DictGetDotNode.new(
|
1935
|
+
result = make_node(val) { |v| Riml::DictGetDotNode.new(v[0], v[1]) }
|
1927
1936
|
result
|
1928
1937
|
end
|
1929
1938
|
.,.,
|
1930
1939
|
|
1931
1940
|
module_eval(<<'.,.,', 'grammar.y', 185)
|
1932
1941
|
def _reduce_81(val, _values, result)
|
1933
|
-
result = Riml::DictGetDotNode.new(Riml::WrapInParensNode.new(
|
1942
|
+
result = make_node(val) { |v| Riml::DictGetDotNode.new(Riml::WrapInParensNode.new(v[1]), v[3]) }
|
1934
1943
|
result
|
1935
1944
|
end
|
1936
1945
|
.,.,
|
1937
1946
|
|
1938
1947
|
module_eval(<<'.,.,', 'grammar.y', 189)
|
1939
1948
|
def _reduce_82(val, _values, result)
|
1940
|
-
result = Riml::ListOrDictGetNode.new(
|
1949
|
+
result = make_node(val) { |v| Riml::ListOrDictGetNode.new(v[0], v[1]) }
|
1941
1950
|
result
|
1942
1951
|
end
|
1943
1952
|
.,.,
|
1944
1953
|
|
1945
1954
|
module_eval(<<'.,.,', 'grammar.y', 190)
|
1946
1955
|
def _reduce_83(val, _values, result)
|
1947
|
-
result = Riml::ListOrDictGetNode.new(Riml::WrapInParensNode.new(
|
1956
|
+
result = make_node(val) { |v| Riml::ListOrDictGetNode.new(Riml::WrapInParensNode.new(v[1]), v[3]) }
|
1948
1957
|
result
|
1949
1958
|
end
|
1950
1959
|
.,.,
|
1951
1960
|
|
1952
1961
|
module_eval(<<'.,.,', 'grammar.y', 194)
|
1953
1962
|
def _reduce_84(val, _values, result)
|
1954
|
-
result = Riml::ListOrDictGetNode.new(
|
1963
|
+
result = make_node(val) { |v| Riml::ListOrDictGetNode.new(v[0], v[1]) }
|
1955
1964
|
result
|
1956
1965
|
end
|
1957
1966
|
.,.,
|
@@ -1986,28 +1995,28 @@ module_eval(<<'.,.,', 'grammar.y', 201)
|
|
1986
1995
|
|
1987
1996
|
module_eval(<<'.,.,', 'grammar.y', 205)
|
1988
1997
|
def _reduce_89(val, _values, result)
|
1989
|
-
result = Riml::SublistNode.new([
|
1998
|
+
result = make_node(val) { |v| Riml::SublistNode.new([v[0], Riml::LiteralNode.new(' : '), v[2]]) }
|
1990
1999
|
result
|
1991
2000
|
end
|
1992
2001
|
.,.,
|
1993
2002
|
|
1994
2003
|
module_eval(<<'.,.,', 'grammar.y', 206)
|
1995
2004
|
def _reduce_90(val, _values, result)
|
1996
|
-
result = Riml::SublistNode.new([
|
2005
|
+
result = make_node(val) { |v| Riml::SublistNode.new([v[0], Riml::LiteralNode.new(' :')]) }
|
1997
2006
|
result
|
1998
2007
|
end
|
1999
2008
|
.,.,
|
2000
2009
|
|
2001
2010
|
module_eval(<<'.,.,', 'grammar.y', 207)
|
2002
2011
|
def _reduce_91(val, _values, result)
|
2003
|
-
result = Riml::SublistNode.new([Riml::LiteralNode.new(': '),
|
2012
|
+
result = make_node(val) { |v| Riml::SublistNode.new([Riml::LiteralNode.new(': '), v[1]]) }
|
2004
2013
|
result
|
2005
2014
|
end
|
2006
2015
|
.,.,
|
2007
2016
|
|
2008
2017
|
module_eval(<<'.,.,', 'grammar.y', 208)
|
2009
2018
|
def _reduce_92(val, _values, result)
|
2010
|
-
result = Riml::SublistNode.new([Riml::LiteralNode.new(':')])
|
2019
|
+
result = make_node(val) { |_| Riml::SublistNode.new([Riml::LiteralNode.new(':')]) }
|
2011
2020
|
result
|
2012
2021
|
end
|
2013
2022
|
.,.,
|
@@ -2042,84 +2051,84 @@ module_eval(<<'.,.,', 'grammar.y', 218)
|
|
2042
2051
|
|
2043
2052
|
module_eval(<<'.,.,', 'grammar.y', 222)
|
2044
2053
|
def _reduce_97(val, _values, result)
|
2045
|
-
result = Riml::CallNode.new(
|
2054
|
+
result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], v[3]) }
|
2046
2055
|
result
|
2047
2056
|
end
|
2048
2057
|
.,.,
|
2049
2058
|
|
2050
2059
|
module_eval(<<'.,.,', 'grammar.y', 223)
|
2051
2060
|
def _reduce_98(val, _values, result)
|
2052
|
-
result = Riml::CallNode.new(nil,
|
2061
|
+
result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[2]) }
|
2053
2062
|
result
|
2054
2063
|
end
|
2055
2064
|
.,.,
|
2056
2065
|
|
2057
2066
|
module_eval(<<'.,.,', 'grammar.y', 224)
|
2058
2067
|
def _reduce_99(val, _values, result)
|
2059
|
-
result = Riml::CallNode.new(nil,
|
2068
|
+
result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[2]) }
|
2060
2069
|
result
|
2061
2070
|
end
|
2062
2071
|
.,.,
|
2063
2072
|
|
2064
2073
|
module_eval(<<'.,.,', 'grammar.y', 225)
|
2065
2074
|
def _reduce_100(val, _values, result)
|
2066
|
-
result = Riml::CallNode.new(nil,
|
2075
|
+
result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], v[1]) }
|
2067
2076
|
result
|
2068
2077
|
end
|
2069
2078
|
.,.,
|
2070
2079
|
|
2071
2080
|
module_eval(<<'.,.,', 'grammar.y', 226)
|
2072
2081
|
def _reduce_101(val, _values, result)
|
2073
|
-
result = Riml::CallNode.new(nil,
|
2082
|
+
result = make_node(val) { |v| Riml::CallNode.new(nil, v[0], []) }
|
2074
2083
|
result
|
2075
2084
|
end
|
2076
2085
|
.,.,
|
2077
2086
|
|
2078
2087
|
module_eval(<<'.,.,', 'grammar.y', 227)
|
2079
2088
|
def _reduce_102(val, _values, result)
|
2080
|
-
result = Riml::ExplicitCallNode.new(nil, nil,
|
2089
|
+
result = make_node(val) { |v| Riml::ExplicitCallNode.new(nil, nil, v[2]) }
|
2081
2090
|
result
|
2082
2091
|
end
|
2083
2092
|
.,.,
|
2084
2093
|
|
2085
2094
|
module_eval(<<'.,.,', 'grammar.y', 231)
|
2086
2095
|
def _reduce_103(val, _values, result)
|
2087
|
-
result = Riml::CallNode.new(
|
2096
|
+
result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], v[3]) }
|
2088
2097
|
result
|
2089
2098
|
end
|
2090
2099
|
.,.,
|
2091
2100
|
|
2092
2101
|
module_eval(<<'.,.,', 'grammar.y', 232)
|
2093
2102
|
def _reduce_104(val, _values, result)
|
2094
|
-
result = Riml::CallNode.new(
|
2103
|
+
result = make_node(val) { |v| Riml::CallNode.new(v[0], v[1], []) }
|
2095
2104
|
result
|
2096
2105
|
end
|
2097
2106
|
.,.,
|
2098
2107
|
|
2099
2108
|
module_eval(<<'.,.,', 'grammar.y', 236)
|
2100
2109
|
def _reduce_105(val, _values, result)
|
2101
|
-
result = Riml::RimlCommandNode.new(nil,
|
2110
|
+
result = make_node(val) { |v| Riml::RimlCommandNode.new(nil, v[0], v[2]) }
|
2102
2111
|
result
|
2103
2112
|
end
|
2104
2113
|
.,.,
|
2105
2114
|
|
2106
2115
|
module_eval(<<'.,.,', 'grammar.y', 237)
|
2107
2116
|
def _reduce_106(val, _values, result)
|
2108
|
-
result = Riml::RimlCommandNode.new(nil,
|
2117
|
+
result = make_node(val) { |v| Riml::RimlCommandNode.new(nil, v[0], v[1]) }
|
2109
2118
|
result
|
2110
2119
|
end
|
2111
2120
|
.,.,
|
2112
2121
|
|
2113
2122
|
module_eval(<<'.,.,', 'grammar.y', 241)
|
2114
2123
|
def _reduce_107(val, _values, result)
|
2115
|
-
result = Riml::ExplicitCallNode.new(
|
2124
|
+
result = make_node(val) { |v| Riml::ExplicitCallNode.new(v[1], v[2], v[4]) }
|
2116
2125
|
result
|
2117
2126
|
end
|
2118
2127
|
.,.,
|
2119
2128
|
|
2120
2129
|
module_eval(<<'.,.,', 'grammar.y', 242)
|
2121
2130
|
def _reduce_108(val, _values, result)
|
2122
|
-
result = Riml::ExplicitCallNode.new(nil,
|
2131
|
+
result = make_node(val) { |v| Riml::ExplicitCallNode.new(nil, v[1], v[3]) }
|
2123
2132
|
result
|
2124
2133
|
end
|
2125
2134
|
.,.,
|
@@ -2147,7 +2156,7 @@ module_eval(<<'.,.,', 'grammar.y', 252)
|
|
2147
2156
|
|
2148
2157
|
module_eval(<<'.,.,', 'grammar.y', 253)
|
2149
2158
|
def _reduce_112(val, _values, result)
|
2150
|
-
result = [ Riml::SIDNode.new(
|
2159
|
+
result = [ make_node(val) { |v| Riml::SIDNode.new(v[1]) }, val[3] ]
|
2151
2160
|
result
|
2152
2161
|
end
|
2153
2162
|
.,.,
|
@@ -2182,287 +2191,287 @@ module_eval(<<'.,.,', 'grammar.y', 263)
|
|
2182
2191
|
|
2183
2192
|
module_eval(<<'.,.,', 'grammar.y', 267)
|
2184
2193
|
def _reduce_117(val, _values, result)
|
2185
|
-
result = Riml::BinaryOperatorNode.new(
|
2194
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2186
2195
|
result
|
2187
2196
|
end
|
2188
2197
|
.,.,
|
2189
2198
|
|
2190
2199
|
module_eval(<<'.,.,', 'grammar.y', 268)
|
2191
2200
|
def _reduce_118(val, _values, result)
|
2192
|
-
result = Riml::BinaryOperatorNode.new(
|
2201
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2193
2202
|
result
|
2194
2203
|
end
|
2195
2204
|
.,.,
|
2196
2205
|
|
2197
2206
|
module_eval(<<'.,.,', 'grammar.y', 270)
|
2198
2207
|
def _reduce_119(val, _values, result)
|
2199
|
-
result = Riml::BinaryOperatorNode.new(
|
2208
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2200
2209
|
result
|
2201
2210
|
end
|
2202
2211
|
.,.,
|
2203
2212
|
|
2204
2213
|
module_eval(<<'.,.,', 'grammar.y', 271)
|
2205
2214
|
def _reduce_120(val, _values, result)
|
2206
|
-
result = Riml::BinaryOperatorNode.new(
|
2215
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2207
2216
|
result
|
2208
2217
|
end
|
2209
2218
|
.,.,
|
2210
2219
|
|
2211
2220
|
module_eval(<<'.,.,', 'grammar.y', 272)
|
2212
2221
|
def _reduce_121(val, _values, result)
|
2213
|
-
result = Riml::BinaryOperatorNode.new(
|
2222
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2214
2223
|
result
|
2215
2224
|
end
|
2216
2225
|
.,.,
|
2217
2226
|
|
2218
2227
|
module_eval(<<'.,.,', 'grammar.y', 275)
|
2219
2228
|
def _reduce_122(val, _values, result)
|
2220
|
-
result = Riml::BinaryOperatorNode.new(
|
2229
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2221
2230
|
result
|
2222
2231
|
end
|
2223
2232
|
.,.,
|
2224
2233
|
|
2225
2234
|
module_eval(<<'.,.,', 'grammar.y', 277)
|
2226
2235
|
def _reduce_123(val, _values, result)
|
2227
|
-
result = Riml::BinaryOperatorNode.new(
|
2236
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2228
2237
|
result
|
2229
2238
|
end
|
2230
2239
|
.,.,
|
2231
2240
|
|
2232
2241
|
module_eval(<<'.,.,', 'grammar.y', 278)
|
2233
2242
|
def _reduce_124(val, _values, result)
|
2234
|
-
result = Riml::BinaryOperatorNode.new(
|
2243
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2235
2244
|
result
|
2236
2245
|
end
|
2237
2246
|
.,.,
|
2238
2247
|
|
2239
2248
|
module_eval(<<'.,.,', 'grammar.y', 279)
|
2240
2249
|
def _reduce_125(val, _values, result)
|
2241
|
-
result = Riml::BinaryOperatorNode.new(
|
2250
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2242
2251
|
result
|
2243
2252
|
end
|
2244
2253
|
.,.,
|
2245
2254
|
|
2246
2255
|
module_eval(<<'.,.,', 'grammar.y', 281)
|
2247
2256
|
def _reduce_126(val, _values, result)
|
2248
|
-
result = Riml::BinaryOperatorNode.new(
|
2257
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2249
2258
|
result
|
2250
2259
|
end
|
2251
2260
|
.,.,
|
2252
2261
|
|
2253
2262
|
module_eval(<<'.,.,', 'grammar.y', 282)
|
2254
2263
|
def _reduce_127(val, _values, result)
|
2255
|
-
result = Riml::BinaryOperatorNode.new(
|
2264
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2256
2265
|
result
|
2257
2266
|
end
|
2258
2267
|
.,.,
|
2259
2268
|
|
2260
2269
|
module_eval(<<'.,.,', 'grammar.y', 283)
|
2261
2270
|
def _reduce_128(val, _values, result)
|
2262
|
-
result = Riml::BinaryOperatorNode.new(
|
2271
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2263
2272
|
result
|
2264
2273
|
end
|
2265
2274
|
.,.,
|
2266
2275
|
|
2267
2276
|
module_eval(<<'.,.,', 'grammar.y', 285)
|
2268
2277
|
def _reduce_129(val, _values, result)
|
2269
|
-
result = Riml::BinaryOperatorNode.new(
|
2278
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2270
2279
|
result
|
2271
2280
|
end
|
2272
2281
|
.,.,
|
2273
2282
|
|
2274
2283
|
module_eval(<<'.,.,', 'grammar.y', 286)
|
2275
2284
|
def _reduce_130(val, _values, result)
|
2276
|
-
result = Riml::BinaryOperatorNode.new(
|
2285
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2277
2286
|
result
|
2278
2287
|
end
|
2279
2288
|
.,.,
|
2280
2289
|
|
2281
2290
|
module_eval(<<'.,.,', 'grammar.y', 287)
|
2282
2291
|
def _reduce_131(val, _values, result)
|
2283
|
-
result = Riml::BinaryOperatorNode.new(
|
2292
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2284
2293
|
result
|
2285
2294
|
end
|
2286
2295
|
.,.,
|
2287
2296
|
|
2288
2297
|
module_eval(<<'.,.,', 'grammar.y', 289)
|
2289
2298
|
def _reduce_132(val, _values, result)
|
2290
|
-
result = Riml::BinaryOperatorNode.new(
|
2299
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2291
2300
|
result
|
2292
2301
|
end
|
2293
2302
|
.,.,
|
2294
2303
|
|
2295
2304
|
module_eval(<<'.,.,', 'grammar.y', 290)
|
2296
2305
|
def _reduce_133(val, _values, result)
|
2297
|
-
result = Riml::BinaryOperatorNode.new(
|
2306
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2298
2307
|
result
|
2299
2308
|
end
|
2300
2309
|
.,.,
|
2301
2310
|
|
2302
2311
|
module_eval(<<'.,.,', 'grammar.y', 291)
|
2303
2312
|
def _reduce_134(val, _values, result)
|
2304
|
-
result = Riml::BinaryOperatorNode.new(
|
2313
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2305
2314
|
result
|
2306
2315
|
end
|
2307
2316
|
.,.,
|
2308
2317
|
|
2309
2318
|
module_eval(<<'.,.,', 'grammar.y', 293)
|
2310
2319
|
def _reduce_135(val, _values, result)
|
2311
|
-
result = Riml::BinaryOperatorNode.new(
|
2320
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2312
2321
|
result
|
2313
2322
|
end
|
2314
2323
|
.,.,
|
2315
2324
|
|
2316
2325
|
module_eval(<<'.,.,', 'grammar.y', 294)
|
2317
2326
|
def _reduce_136(val, _values, result)
|
2318
|
-
result = Riml::BinaryOperatorNode.new(
|
2327
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2319
2328
|
result
|
2320
2329
|
end
|
2321
2330
|
.,.,
|
2322
2331
|
|
2323
2332
|
module_eval(<<'.,.,', 'grammar.y', 295)
|
2324
2333
|
def _reduce_137(val, _values, result)
|
2325
|
-
result = Riml::BinaryOperatorNode.new(
|
2334
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2326
2335
|
result
|
2327
2336
|
end
|
2328
2337
|
.,.,
|
2329
2338
|
|
2330
2339
|
module_eval(<<'.,.,', 'grammar.y', 297)
|
2331
2340
|
def _reduce_138(val, _values, result)
|
2332
|
-
result = Riml::BinaryOperatorNode.new(
|
2341
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2333
2342
|
result
|
2334
2343
|
end
|
2335
2344
|
.,.,
|
2336
2345
|
|
2337
2346
|
module_eval(<<'.,.,', 'grammar.y', 298)
|
2338
2347
|
def _reduce_139(val, _values, result)
|
2339
|
-
result = Riml::BinaryOperatorNode.new(
|
2348
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2340
2349
|
result
|
2341
2350
|
end
|
2342
2351
|
.,.,
|
2343
2352
|
|
2344
2353
|
module_eval(<<'.,.,', 'grammar.y', 299)
|
2345
2354
|
def _reduce_140(val, _values, result)
|
2346
|
-
result = Riml::BinaryOperatorNode.new(
|
2355
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2347
2356
|
result
|
2348
2357
|
end
|
2349
2358
|
.,.,
|
2350
2359
|
|
2351
2360
|
module_eval(<<'.,.,', 'grammar.y', 301)
|
2352
2361
|
def _reduce_141(val, _values, result)
|
2353
|
-
result = Riml::BinaryOperatorNode.new(
|
2362
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2354
2363
|
result
|
2355
2364
|
end
|
2356
2365
|
.,.,
|
2357
2366
|
|
2358
2367
|
module_eval(<<'.,.,', 'grammar.y', 302)
|
2359
2368
|
def _reduce_142(val, _values, result)
|
2360
|
-
result = Riml::BinaryOperatorNode.new(
|
2369
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2361
2370
|
result
|
2362
2371
|
end
|
2363
2372
|
.,.,
|
2364
2373
|
|
2365
2374
|
module_eval(<<'.,.,', 'grammar.y', 303)
|
2366
2375
|
def _reduce_143(val, _values, result)
|
2367
|
-
result = Riml::BinaryOperatorNode.new(
|
2376
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2368
2377
|
result
|
2369
2378
|
end
|
2370
2379
|
.,.,
|
2371
2380
|
|
2372
2381
|
module_eval(<<'.,.,', 'grammar.y', 305)
|
2373
2382
|
def _reduce_144(val, _values, result)
|
2374
|
-
result = Riml::BinaryOperatorNode.new(
|
2383
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2375
2384
|
result
|
2376
2385
|
end
|
2377
2386
|
.,.,
|
2378
2387
|
|
2379
2388
|
module_eval(<<'.,.,', 'grammar.y', 306)
|
2380
2389
|
def _reduce_145(val, _values, result)
|
2381
|
-
result = Riml::BinaryOperatorNode.new(
|
2390
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2382
2391
|
result
|
2383
2392
|
end
|
2384
2393
|
.,.,
|
2385
2394
|
|
2386
2395
|
module_eval(<<'.,.,', 'grammar.y', 307)
|
2387
2396
|
def _reduce_146(val, _values, result)
|
2388
|
-
result = Riml::BinaryOperatorNode.new(
|
2397
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2389
2398
|
result
|
2390
2399
|
end
|
2391
2400
|
.,.,
|
2392
2401
|
|
2393
2402
|
module_eval(<<'.,.,', 'grammar.y', 308)
|
2394
2403
|
def _reduce_147(val, _values, result)
|
2395
|
-
result = Riml::BinaryOperatorNode.new(
|
2404
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2396
2405
|
result
|
2397
2406
|
end
|
2398
2407
|
.,.,
|
2399
2408
|
|
2400
2409
|
module_eval(<<'.,.,', 'grammar.y', 309)
|
2401
2410
|
def _reduce_148(val, _values, result)
|
2402
|
-
result = Riml::BinaryOperatorNode.new(
|
2411
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2403
2412
|
result
|
2404
2413
|
end
|
2405
2414
|
.,.,
|
2406
2415
|
|
2407
2416
|
module_eval(<<'.,.,', 'grammar.y', 310)
|
2408
2417
|
def _reduce_149(val, _values, result)
|
2409
|
-
result = Riml::BinaryOperatorNode.new(
|
2418
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2410
2419
|
result
|
2411
2420
|
end
|
2412
2421
|
.,.,
|
2413
2422
|
|
2414
2423
|
module_eval(<<'.,.,', 'grammar.y', 312)
|
2415
2424
|
def _reduce_150(val, _values, result)
|
2416
|
-
result = Riml::BinaryOperatorNode.new(
|
2425
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2417
2426
|
result
|
2418
2427
|
end
|
2419
2428
|
.,.,
|
2420
2429
|
|
2421
2430
|
module_eval(<<'.,.,', 'grammar.y', 313)
|
2422
2431
|
def _reduce_151(val, _values, result)
|
2423
|
-
result = Riml::BinaryOperatorNode.new(
|
2432
|
+
result = make_node(val) { |v| Riml::BinaryOperatorNode.new(v[1], [v[0], v[2]]) }
|
2424
2433
|
result
|
2425
2434
|
end
|
2426
2435
|
.,.,
|
2427
2436
|
|
2428
2437
|
module_eval(<<'.,.,', 'grammar.y', 317)
|
2429
2438
|
def _reduce_152(val, _values, result)
|
2430
|
-
result = Riml::UnaryOperatorNode.new(val[0], [val[1]])
|
2439
|
+
result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) }
|
2431
2440
|
result
|
2432
2441
|
end
|
2433
2442
|
.,.,
|
2434
2443
|
|
2435
2444
|
module_eval(<<'.,.,', 'grammar.y', 318)
|
2436
2445
|
def _reduce_153(val, _values, result)
|
2437
|
-
result = Riml::UnaryOperatorNode.new(val[0], [val[1]])
|
2446
|
+
result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) }
|
2438
2447
|
result
|
2439
2448
|
end
|
2440
2449
|
.,.,
|
2441
2450
|
|
2442
2451
|
module_eval(<<'.,.,', 'grammar.y', 319)
|
2443
2452
|
def _reduce_154(val, _values, result)
|
2444
|
-
result = Riml::UnaryOperatorNode.new(val[0], [val[1]])
|
2453
|
+
result = make_node(val) { |v| Riml::UnaryOperatorNode.new(val[0], [val[1]]) }
|
2445
2454
|
result
|
2446
2455
|
end
|
2447
2456
|
.,.,
|
2448
2457
|
|
2449
2458
|
module_eval(<<'.,.,', 'grammar.y', 324)
|
2450
2459
|
def _reduce_155(val, _values, result)
|
2451
|
-
result = Riml::AssignNode.new(
|
2460
|
+
result = make_node(val) { |v| Riml::AssignNode.new(v[1][0], v[1][1], v[1][2]) }
|
2452
2461
|
result
|
2453
2462
|
end
|
2454
2463
|
.,.,
|
2455
2464
|
|
2456
2465
|
module_eval(<<'.,.,', 'grammar.y', 325)
|
2457
2466
|
def _reduce_156(val, _values, result)
|
2458
|
-
result = Riml::AssignNode.new(
|
2467
|
+
result = make_node(val) { |v| Riml::AssignNode.new(v[0][0], v[0][1], v[0][2]) }
|
2459
2468
|
result
|
2460
2469
|
end
|
2461
2470
|
.,.,
|
2462
2471
|
|
2463
2472
|
module_eval(<<'.,.,', 'grammar.y', 329)
|
2464
2473
|
def _reduce_157(val, _values, result)
|
2465
|
-
result = Riml::MultiAssignNode.new([
|
2474
|
+
result = make_node(val) { |v| Riml::MultiAssignNode.new([v[0], v[2]]) }
|
2466
2475
|
result
|
2467
2476
|
end
|
2468
2477
|
.,.,
|
@@ -2539,21 +2548,21 @@ module_eval(<<'.,.,', 'grammar.y', 346)
|
|
2539
2548
|
|
2540
2549
|
module_eval(<<'.,.,', 'grammar.y', 351)
|
2541
2550
|
def _reduce_168(val, _values, result)
|
2542
|
-
result = Riml::GetVariableNode.new(
|
2551
|
+
result = make_node(val) { |v| Riml::GetVariableNode.new(v[0], v[1]) }
|
2543
2552
|
result
|
2544
2553
|
end
|
2545
2554
|
.,.,
|
2546
2555
|
|
2547
2556
|
module_eval(<<'.,.,', 'grammar.y', 352)
|
2548
2557
|
def _reduce_169(val, _values, result)
|
2549
|
-
result = Riml::GetSpecialVariableNode.new(
|
2558
|
+
result = make_node(val) { |v| Riml::GetSpecialVariableNode.new(v[0], v[1]) }
|
2550
2559
|
result
|
2551
2560
|
end
|
2552
2561
|
.,.,
|
2553
2562
|
|
2554
2563
|
module_eval(<<'.,.,', 'grammar.y', 353)
|
2555
2564
|
def _reduce_170(val, _values, result)
|
2556
|
-
result = Riml::GetVariableByScopeAndDictNameNode.new(
|
2565
|
+
result = make_node(val) { |v| Riml::GetVariableByScopeAndDictNameNode.new(v[0], v[1]) }
|
2557
2566
|
result
|
2558
2567
|
end
|
2559
2568
|
.,.,
|
@@ -2567,21 +2576,21 @@ module_eval(<<'.,.,', 'grammar.y', 357)
|
|
2567
2576
|
|
2568
2577
|
module_eval(<<'.,.,', 'grammar.y', 358)
|
2569
2578
|
def _reduce_172(val, _values, result)
|
2570
|
-
result = Riml::GetCurlyBraceNameNode.new(
|
2579
|
+
result = make_node(val) { |v| Riml::GetCurlyBraceNameNode.new(v[0], v[1]) }
|
2571
2580
|
result
|
2572
2581
|
end
|
2573
2582
|
.,.,
|
2574
2583
|
|
2575
2584
|
module_eval(<<'.,.,', 'grammar.y', 362)
|
2576
2585
|
def _reduce_173(val, _values, result)
|
2577
|
-
result = Riml::UnletVariableNode.new('!', [
|
2586
|
+
result = make_node(val) { |v| Riml::UnletVariableNode.new('!', [ v[1] ]) }
|
2578
2587
|
result
|
2579
2588
|
end
|
2580
2589
|
.,.,
|
2581
2590
|
|
2582
2591
|
module_eval(<<'.,.,', 'grammar.y', 363)
|
2583
2592
|
def _reduce_174(val, _values, result)
|
2584
|
-
result = Riml::UnletVariableNode.new('!', [
|
2593
|
+
result = make_node(val) { |v| Riml::UnletVariableNode.new('!', [ v[1] ]) }
|
2585
2594
|
result
|
2586
2595
|
end
|
2587
2596
|
.,.,
|
@@ -2595,21 +2604,21 @@ module_eval(<<'.,.,', 'grammar.y', 364)
|
|
2595
2604
|
|
2596
2605
|
module_eval(<<'.,.,', 'grammar.y', 368)
|
2597
2606
|
def _reduce_176(val, _values, result)
|
2598
|
-
result = Riml::CurlyBraceVariable.new([
|
2607
|
+
result = make_node(val) { |v| Riml::CurlyBraceVariable.new([ v[0] ]) }
|
2599
2608
|
result
|
2600
2609
|
end
|
2601
2610
|
.,.,
|
2602
2611
|
|
2603
2612
|
module_eval(<<'.,.,', 'grammar.y', 369)
|
2604
2613
|
def _reduce_177(val, _values, result)
|
2605
|
-
result = Riml::CurlyBraceVariable.new([ Riml::CurlyBracePart.new(
|
2614
|
+
result = make_node(val) { |v| Riml::CurlyBraceVariable.new([ Riml::CurlyBracePart.new(v[0]), v[1] ]) }
|
2606
2615
|
result
|
2607
2616
|
end
|
2608
2617
|
.,.,
|
2609
2618
|
|
2610
2619
|
module_eval(<<'.,.,', 'grammar.y', 370)
|
2611
2620
|
def _reduce_178(val, _values, result)
|
2612
|
-
result = val[0] << Riml::CurlyBracePart.new(
|
2621
|
+
result = val[0] << make_node(val) { |v| Riml::CurlyBracePart.new(v[1]) }
|
2613
2622
|
result
|
2614
2623
|
end
|
2615
2624
|
.,.,
|
@@ -2623,49 +2632,49 @@ module_eval(<<'.,.,', 'grammar.y', 371)
|
|
2623
2632
|
|
2624
2633
|
module_eval(<<'.,.,', 'grammar.y', 375)
|
2625
2634
|
def _reduce_180(val, _values, result)
|
2626
|
-
result = Riml::CurlyBracePart.new(
|
2635
|
+
result = make_node(val) { |v| Riml::CurlyBracePart.new(v[1]) }
|
2627
2636
|
result
|
2628
2637
|
end
|
2629
2638
|
.,.,
|
2630
2639
|
|
2631
2640
|
module_eval(<<'.,.,', 'grammar.y', 376)
|
2632
2641
|
def _reduce_181(val, _values, result)
|
2633
|
-
result = Riml::CurlyBracePart.new([
|
2642
|
+
result = make_node(val) { |v| Riml::CurlyBracePart.new([v[1], v[2]]) }
|
2634
2643
|
result
|
2635
2644
|
end
|
2636
2645
|
.,.,
|
2637
2646
|
|
2638
2647
|
module_eval(<<'.,.,', 'grammar.y', 377)
|
2639
2648
|
def _reduce_182(val, _values, result)
|
2640
|
-
result = Riml::CurlyBracePart.new([
|
2649
|
+
result = make_node(val) { |v| Riml::CurlyBracePart.new([v[1], v[2]]) }
|
2641
2650
|
result
|
2642
2651
|
end
|
2643
2652
|
.,.,
|
2644
2653
|
|
2645
2654
|
module_eval(<<'.,.,', 'grammar.y', 383)
|
2646
2655
|
def _reduce_183(val, _values, result)
|
2647
|
-
result = Riml.const_get(val[0]).new('!',
|
2656
|
+
result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], [], v[3], v[4]) }
|
2648
2657
|
result
|
2649
2658
|
end
|
2650
2659
|
.,.,
|
2651
2660
|
|
2652
2661
|
module_eval(<<'.,.,', 'grammar.y', 384)
|
2653
2662
|
def _reduce_184(val, _values, result)
|
2654
|
-
result = Riml.const_get(val[0]).new('!',
|
2663
|
+
result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], v[4], v[6], v[7]) }
|
2655
2664
|
result
|
2656
2665
|
end
|
2657
2666
|
.,.,
|
2658
2667
|
|
2659
2668
|
module_eval(<<'.,.,', 'grammar.y', 385)
|
2660
2669
|
def _reduce_185(val, _values, result)
|
2661
|
-
result = Riml.const_get(val[0]).new('!',
|
2670
|
+
result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], [v[4]], v[6], v[7]) }
|
2662
2671
|
result
|
2663
2672
|
end
|
2664
2673
|
.,.,
|
2665
2674
|
|
2666
2675
|
module_eval(<<'.,.,', 'grammar.y', 386)
|
2667
2676
|
def _reduce_186(val, _values, result)
|
2668
|
-
result = Riml.const_get(val[0]).new('!',
|
2677
|
+
result = make_node(val) { |v| Riml.const_get(val[0]).new('!', v[1][0], v[1][1], v[2], v[4] << v[6], v[8], v[9]) }
|
2669
2678
|
result
|
2670
2679
|
end
|
2671
2680
|
.,.,
|
@@ -2693,7 +2702,7 @@ module_eval(<<'.,.,', 'grammar.y', 392)
|
|
2693
2702
|
|
2694
2703
|
module_eval(<<'.,.,', 'grammar.y', 397)
|
2695
2704
|
def _reduce_190(val, _values, result)
|
2696
|
-
result = Riml::GetCurlyBraceNameNode.new('',
|
2705
|
+
result = make_node(val) { |v| Riml::GetCurlyBraceNameNode.new('', v[0]) }
|
2697
2706
|
result
|
2698
2707
|
end
|
2699
2708
|
.,.,
|
@@ -2763,28 +2772,28 @@ module_eval(<<'.,.,', 'grammar.y', 413)
|
|
2763
2772
|
|
2764
2773
|
module_eval(<<'.,.,', 'grammar.y', 417)
|
2765
2774
|
def _reduce_200(val, _values, result)
|
2766
|
-
result = Riml::DefaultParamNode.new(
|
2775
|
+
result = make_node(val) { |v| Riml::DefaultParamNode.new(v[0], v[2]) }
|
2767
2776
|
result
|
2768
2777
|
end
|
2769
2778
|
.,.,
|
2770
2779
|
|
2771
2780
|
module_eval(<<'.,.,', 'grammar.y', 421)
|
2772
2781
|
def _reduce_201(val, _values, result)
|
2773
|
-
result = Riml::ReturnNode.new(
|
2782
|
+
result = make_node(val) { |v| Riml::ReturnNode.new(v[1]) }
|
2774
2783
|
result
|
2775
2784
|
end
|
2776
2785
|
.,.,
|
2777
2786
|
|
2778
2787
|
module_eval(<<'.,.,', 'grammar.y', 422)
|
2779
2788
|
def _reduce_202(val, _values, result)
|
2780
|
-
result = Riml::IfNode.new(
|
2789
|
+
result = make_node(val) { |v| Riml::IfNode.new(v[3], Nodes.new([ReturnNode.new(v[1])])) }
|
2781
2790
|
result
|
2782
2791
|
end
|
2783
2792
|
.,.,
|
2784
2793
|
|
2785
2794
|
module_eval(<<'.,.,', 'grammar.y', 423)
|
2786
2795
|
def _reduce_203(val, _values, result)
|
2787
|
-
result = Riml::UnlessNode.new(
|
2796
|
+
result = make_node(val) { |v| Riml::UnlessNode.new(v[3], Nodes.new([ReturnNode.new(v[1])])) }
|
2788
2797
|
result
|
2789
2798
|
end
|
2790
2799
|
.,.,
|
@@ -2805,126 +2814,126 @@ module_eval(<<'.,.,', 'grammar.y', 428)
|
|
2805
2814
|
|
2806
2815
|
module_eval(<<'.,.,', 'grammar.y', 432)
|
2807
2816
|
def _reduce_206(val, _values, result)
|
2808
|
-
result = Riml::FinishNode.new
|
2817
|
+
result = make_node(val) { |_| Riml::FinishNode.new }
|
2809
2818
|
result
|
2810
2819
|
end
|
2811
2820
|
.,.,
|
2812
2821
|
|
2813
2822
|
module_eval(<<'.,.,', 'grammar.y', 437)
|
2814
2823
|
def _reduce_207(val, _values, result)
|
2815
|
-
result = Riml::IfNode.new(
|
2824
|
+
result = make_node(val) { |v| Riml::IfNode.new(v[1], v[2]) }
|
2816
2825
|
result
|
2817
2826
|
end
|
2818
2827
|
.,.,
|
2819
2828
|
|
2820
2829
|
module_eval(<<'.,.,', 'grammar.y', 438)
|
2821
2830
|
def _reduce_208(val, _values, result)
|
2822
|
-
result = Riml::IfNode.new(
|
2831
|
+
result = make_node(val) { |v| Riml::IfNode.new(v[1], Riml::Nodes.new([v[3]])) }
|
2823
2832
|
result
|
2824
2833
|
end
|
2825
2834
|
.,.,
|
2826
2835
|
|
2827
2836
|
module_eval(<<'.,.,', 'grammar.y', 439)
|
2828
2837
|
def _reduce_209(val, _values, result)
|
2829
|
-
result = Riml::IfNode.new(
|
2838
|
+
result = make_node(val) { |v| Riml::IfNode.new(v[2], Riml::Nodes.new([v[0]])) }
|
2830
2839
|
result
|
2831
2840
|
end
|
2832
2841
|
.,.,
|
2833
2842
|
|
2834
2843
|
module_eval(<<'.,.,', 'grammar.y', 443)
|
2835
2844
|
def _reduce_210(val, _values, result)
|
2836
|
-
result = Riml::UnlessNode.new(
|
2845
|
+
result = make_node(val) { |v| Riml::UnlessNode.new(v[1], v[2]) }
|
2837
2846
|
result
|
2838
2847
|
end
|
2839
2848
|
.,.,
|
2840
2849
|
|
2841
2850
|
module_eval(<<'.,.,', 'grammar.y', 444)
|
2842
2851
|
def _reduce_211(val, _values, result)
|
2843
|
-
result = Riml::UnlessNode.new(
|
2852
|
+
result = make_node(val) { |v| Riml::UnlessNode.new(v[1], Riml::Nodes.new([v[3]])) }
|
2844
2853
|
result
|
2845
2854
|
end
|
2846
2855
|
.,.,
|
2847
2856
|
|
2848
2857
|
module_eval(<<'.,.,', 'grammar.y', 445)
|
2849
2858
|
def _reduce_212(val, _values, result)
|
2850
|
-
result = Riml::UnlessNode.new(
|
2859
|
+
result = make_node(val) { |v| Riml::UnlessNode.new(v[2], Riml::Nodes.new([v[0]])) }
|
2851
2860
|
result
|
2852
2861
|
end
|
2853
2862
|
.,.,
|
2854
2863
|
|
2855
2864
|
module_eval(<<'.,.,', 'grammar.y', 449)
|
2856
2865
|
def _reduce_213(val, _values, result)
|
2857
|
-
result = Riml::TernaryOperatorNode.new([
|
2866
|
+
result = make_node(val) { |v| Riml::TernaryOperatorNode.new([v[0], v[2], v[4]]) }
|
2858
2867
|
result
|
2859
2868
|
end
|
2860
2869
|
.,.,
|
2861
2870
|
|
2862
2871
|
module_eval(<<'.,.,', 'grammar.y', 453)
|
2863
2872
|
def _reduce_214(val, _values, result)
|
2864
|
-
result = Riml::WhileNode.new(
|
2873
|
+
result = make_node(val) { |v| Riml::WhileNode.new(v[1], v[2]) }
|
2865
2874
|
result
|
2866
2875
|
end
|
2867
2876
|
.,.,
|
2868
2877
|
|
2869
2878
|
module_eval(<<'.,.,', 'grammar.y', 457)
|
2870
2879
|
def _reduce_215(val, _values, result)
|
2871
|
-
result = Riml::BreakNode.new
|
2880
|
+
result = make_node(val) { |_| Riml::BreakNode.new }
|
2872
2881
|
result
|
2873
2882
|
end
|
2874
2883
|
.,.,
|
2875
2884
|
|
2876
2885
|
module_eval(<<'.,.,', 'grammar.y', 458)
|
2877
2886
|
def _reduce_216(val, _values, result)
|
2878
|
-
result = Riml::ContinueNode.new
|
2887
|
+
result = make_node(val) { |_| Riml::ContinueNode.new }
|
2879
2888
|
result
|
2880
2889
|
end
|
2881
2890
|
.,.,
|
2882
2891
|
|
2883
2892
|
module_eval(<<'.,.,', 'grammar.y', 462)
|
2884
2893
|
def _reduce_217(val, _values, result)
|
2885
|
-
result = Riml::UntilNode.new(
|
2894
|
+
result = make_node(val) { |v| Riml::UntilNode.new(v[1], v[2]) }
|
2886
2895
|
result
|
2887
2896
|
end
|
2888
2897
|
.,.,
|
2889
2898
|
|
2890
2899
|
module_eval(<<'.,.,', 'grammar.y', 466)
|
2891
2900
|
def _reduce_218(val, _values, result)
|
2892
|
-
result = Riml::ForNode.new(
|
2901
|
+
result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) }
|
2893
2902
|
result
|
2894
2903
|
end
|
2895
2904
|
.,.,
|
2896
2905
|
|
2897
2906
|
module_eval(<<'.,.,', 'grammar.y', 467)
|
2898
2907
|
def _reduce_219(val, _values, result)
|
2899
|
-
result = Riml::ForNode.new(
|
2908
|
+
result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) }
|
2900
2909
|
result
|
2901
2910
|
end
|
2902
2911
|
.,.,
|
2903
2912
|
|
2904
2913
|
module_eval(<<'.,.,', 'grammar.y', 468)
|
2905
2914
|
def _reduce_220(val, _values, result)
|
2906
|
-
result = Riml::ForNode.new(
|
2915
|
+
result = make_node(val) { |v| Riml::ForNode.new(v[1], v[3], v[4]) }
|
2907
2916
|
result
|
2908
2917
|
end
|
2909
2918
|
.,.,
|
2910
2919
|
|
2911
2920
|
module_eval(<<'.,.,', 'grammar.y', 472)
|
2912
2921
|
def _reduce_221(val, _values, result)
|
2913
|
-
result = Riml::TryNode.new(
|
2922
|
+
result = make_node(val) { |v| Riml::TryNode.new(v[1], nil, nil) }
|
2914
2923
|
result
|
2915
2924
|
end
|
2916
2925
|
.,.,
|
2917
2926
|
|
2918
2927
|
module_eval(<<'.,.,', 'grammar.y', 473)
|
2919
2928
|
def _reduce_222(val, _values, result)
|
2920
|
-
result = Riml::TryNode.new(
|
2929
|
+
result = make_node(val) { |v| Riml::TryNode.new(v[1], v[2], nil) }
|
2921
2930
|
result
|
2922
2931
|
end
|
2923
2932
|
.,.,
|
2924
2933
|
|
2925
2934
|
module_eval(<<'.,.,', 'grammar.y', 474)
|
2926
2935
|
def _reduce_223(val, _values, result)
|
2927
|
-
result = Riml::TryNode.new(
|
2936
|
+
result = make_node(val) { |v| Riml::TryNode.new(v[1], v[2], v[4]) }
|
2928
2937
|
result
|
2929
2938
|
end
|
2930
2939
|
.,.,
|
@@ -2938,28 +2947,28 @@ module_eval(<<'.,.,', 'grammar.y', 478)
|
|
2938
2947
|
|
2939
2948
|
module_eval(<<'.,.,', 'grammar.y', 479)
|
2940
2949
|
def _reduce_225(val, _values, result)
|
2941
|
-
result = [ Riml::CatchNode.new(nil,
|
2950
|
+
result = [ make_node(val) { |v| Riml::CatchNode.new(nil, v[1]) } ]
|
2942
2951
|
result
|
2943
2952
|
end
|
2944
2953
|
.,.,
|
2945
2954
|
|
2946
2955
|
module_eval(<<'.,.,', 'grammar.y', 480)
|
2947
2956
|
def _reduce_226(val, _values, result)
|
2948
|
-
result = [ Riml::CatchNode.new(
|
2957
|
+
result = [ make_node(val) { |v| Riml::CatchNode.new(v[1], v[2]) } ]
|
2949
2958
|
result
|
2950
2959
|
end
|
2951
2960
|
.,.,
|
2952
2961
|
|
2953
2962
|
module_eval(<<'.,.,', 'grammar.y', 481)
|
2954
2963
|
def _reduce_227(val, _values, result)
|
2955
|
-
result = val[0] << Riml::CatchNode.new(nil,
|
2964
|
+
result = val[0] << make_node(val) { |v| Riml::CatchNode.new(nil, v[2]) }
|
2956
2965
|
result
|
2957
2966
|
end
|
2958
2967
|
.,.,
|
2959
2968
|
|
2960
2969
|
module_eval(<<'.,.,', 'grammar.y', 482)
|
2961
2970
|
def _reduce_228(val, _values, result)
|
2962
|
-
result = val[0] << Riml::CatchNode.new(
|
2971
|
+
result = val[0] << make_node(val) { |v| Riml::CatchNode.new(v[2], v[3]) }
|
2963
2972
|
result
|
2964
2973
|
end
|
2965
2974
|
.,.,
|
@@ -2973,7 +2982,7 @@ module_eval(<<'.,.,', 'grammar.y', 489)
|
|
2973
2982
|
|
2974
2983
|
module_eval(<<'.,.,', 'grammar.y', 490)
|
2975
2984
|
def _reduce_230(val, _values, result)
|
2976
|
-
result = Riml::Nodes.new([])
|
2985
|
+
result = make_node(val) { |_| Riml::Nodes.new([]) }
|
2977
2986
|
result
|
2978
2987
|
end
|
2979
2988
|
.,.,
|
@@ -3008,63 +3017,63 @@ module_eval(<<'.,.,', 'grammar.y', 497)
|
|
3008
3017
|
|
3009
3018
|
module_eval(<<'.,.,', 'grammar.y', 501)
|
3010
3019
|
def _reduce_235(val, _values, result)
|
3011
|
-
result = Riml::ElseNode.new(
|
3020
|
+
result = make_node(val) { |v| Riml::ElseNode.new(v[2]) }
|
3012
3021
|
result
|
3013
3022
|
end
|
3014
3023
|
.,.,
|
3015
3024
|
|
3016
3025
|
module_eval(<<'.,.,', 'grammar.y', 505)
|
3017
3026
|
def _reduce_236(val, _values, result)
|
3018
|
-
result = Riml::Nodes.new([Riml::ElseifNode.new(
|
3027
|
+
result = make_node(val) { |v| Riml::Nodes.new([Riml::ElseifNode.new(v[1], v[3])]) }
|
3019
3028
|
result
|
3020
3029
|
end
|
3021
3030
|
.,.,
|
3022
3031
|
|
3023
3032
|
module_eval(<<'.,.,', 'grammar.y', 506)
|
3024
3033
|
def _reduce_237(val, _values, result)
|
3025
|
-
result = val[0] << Riml::ElseifNode.new(
|
3034
|
+
result = val[0] << make_node(val) { |v| Riml::ElseifNode.new(v[2], v[4]) }
|
3026
3035
|
result
|
3027
3036
|
end
|
3028
3037
|
.,.,
|
3029
3038
|
|
3030
3039
|
module_eval(<<'.,.,', 'grammar.y', 510)
|
3031
3040
|
def _reduce_238(val, _values, result)
|
3032
|
-
result = Riml::ClassDefinitionNode.new(
|
3041
|
+
result = make_node(val) { |v| Riml::ClassDefinitionNode.new(v[1], v[2], nil, v[3]) }
|
3033
3042
|
result
|
3034
3043
|
end
|
3035
3044
|
.,.,
|
3036
3045
|
|
3037
3046
|
module_eval(<<'.,.,', 'grammar.y', 511)
|
3038
3047
|
def _reduce_239(val, _values, result)
|
3039
|
-
result = Riml::ClassDefinitionNode.new(
|
3048
|
+
result = make_node(val) { |v| Riml::ClassDefinitionNode.new(v[1], v[2], (v[4] || ClassDefinitionNode::DEFAULT_SCOPE_MODIFIER) + v[5], v[6]) }
|
3040
3049
|
result
|
3041
3050
|
end
|
3042
3051
|
.,.,
|
3043
3052
|
|
3044
3053
|
module_eval(<<'.,.,', 'grammar.y', 515)
|
3045
3054
|
def _reduce_240(val, _values, result)
|
3046
|
-
result = Riml::ObjectInstantiationNode.new(
|
3055
|
+
result = make_node(val) { |v| Riml::ObjectInstantiationNode.new(v[1]) }
|
3047
3056
|
result
|
3048
3057
|
end
|
3049
3058
|
.,.,
|
3050
3059
|
|
3051
3060
|
module_eval(<<'.,.,', 'grammar.y', 519)
|
3052
3061
|
def _reduce_241(val, _values, result)
|
3053
|
-
result = Riml::SuperNode.new(
|
3062
|
+
result = make_node(val) { |v| Riml::SuperNode.new(v[2], true) }
|
3054
3063
|
result
|
3055
3064
|
end
|
3056
3065
|
.,.,
|
3057
3066
|
|
3058
3067
|
module_eval(<<'.,.,', 'grammar.y', 520)
|
3059
3068
|
def _reduce_242(val, _values, result)
|
3060
|
-
result = Riml::SuperNode.new([], false)
|
3069
|
+
result = make_node(val) { |_| Riml::SuperNode.new([], false) }
|
3061
3070
|
result
|
3062
3071
|
end
|
3063
3072
|
.,.,
|
3064
3073
|
|
3065
3074
|
module_eval(<<'.,.,', 'grammar.y', 524)
|
3066
3075
|
def _reduce_243(val, _values, result)
|
3067
|
-
result = Riml::ExLiteralNode.new(
|
3076
|
+
result = make_node(val) { |v| Riml::ExLiteralNode.new(v[0]) }
|
3068
3077
|
result
|
3069
3078
|
end
|
3070
3079
|
.,.,
|