Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
732 lines (650 sloc) 21.7 KB
#
# DO NOT MODIFY!!!!
# This file is automatically generated by Racc 1.4.7
# from Racc grammer file "".
#
require 'racc/parser.rb'
require "lexer"
require "nodes"
class Parser < Racc::Parser
module_eval(<<'...end grammar.y/module_eval...', 'grammar.y', 187)
def parse(code, show_tokens=false)
@tokens = Lexer.new.run(code)
p @tokens if show_tokens
do_parse
end
def next_token
@tokens.shift
end
...end grammar.y/module_eval...
##### State transition tables begin ###
racc_action_table = [
27, 74, 24, 25, 5, 17, 18, 19, 20, 21,
22, 26, 84, 28, 27, 23, 24, 25, 53, 17,
18, 19, 20, 21, 22, 26, 50, 28, 49, 23,
6, 16, 70, 27, 82, 24, 25, 5, 17, 18,
19, 20, 21, 22, 26, 16, 28, 27, 23, 24,
25, 5, 17, 18, 19, 20, 21, 22, 26, 94,
28, 55, 23, 6, 16, 5, 31, 92, 31, 31,
93, 42, 43, 40, 41, 95, 46, 6, 16, 27,
96, 24, 25, 5, 17, 18, 19, 20, 21, 22,
26, 6, 28, 27, 23, 24, 25, 5, 17, 18,
19, 20, 21, 22, 26, 97, 28, 31, 23, 6,
16, 31, 29, 42, 43, 40, 41, 36, 37, 38,
39, 34, 35, 6, 16, 27, 91, 24, 25, 90,
17, 18, 19, 20, 21, 22, 26, 100, 28, 27,
23, 24, 25, nil, 17, 18, 19, 20, 21, 22,
26, nil, 28, nil, 23, nil, 16, nil, 27, nil,
24, 25, 5, 17, 18, 19, 20, 21, 22, 26,
16, 28, 27, 23, 24, 25, nil, 17, 18, 19,
20, 21, 22, 26, nil, 28, nil, 23, 6, 16,
nil, 27, 80, 24, 25, 79, 17, 18, 19, 20,
21, 22, 26, 16, 28, 27, 23, 24, 25, 5,
17, 18, 19, 20, 21, 22, 26, nil, 28, nil,
23, 31, 16, 42, 43, 40, 41, 36, 37, 38,
39, 34, 35, 33, 32, 6, 16, 27, nil, 24,
25, 5, 17, 18, 19, 20, 21, 22, 26, nil,
28, 27, 23, 24, 25, 5, 17, 18, 19, 20,
21, 22, 26, nil, 28, nil, 23, 6, 16, 31,
nil, 42, 43, 40, 41, 36, 37, 38, 39, nil,
nil, 6, 16, 27, 47, 24, 25, 46, 17, 18,
19, 20, 21, 22, 26, nil, 28, 27, 23, 24,
25, nil, 17, 18, 19, 20, 21, 22, 26, nil,
28, nil, 23, nil, 16, nil, 27, nil, 24, 25,
nil, 17, 18, 19, 20, 21, 22, 26, 16, 28,
27, 23, 24, 25, nil, 17, 18, 19, 20, 21,
22, 26, nil, 28, nil, 23, nil, 16, nil, 27,
nil, 24, 25, nil, 17, 18, 19, 20, 21, 22,
26, 16, 28, 27, 23, 24, 25, nil, 17, 18,
19, 20, 21, 22, 26, nil, 28, nil, 23, nil,
16, nil, 27, nil, 24, 25, nil, 17, 18, 19,
20, 21, 22, 26, 16, 28, 27, 23, 24, 25,
nil, 17, 18, 19, 20, 21, 22, 26, nil, 28,
nil, 23, nil, 16, nil, 27, nil, 24, 25, nil,
17, 18, 19, 20, 21, 22, 26, 16, 28, 27,
23, 24, 25, nil, 17, 18, 19, 20, 21, 22,
26, nil, 28, nil, 23, nil, 16, nil, 27, nil,
24, 25, nil, 17, 18, 19, 20, 21, 22, 26,
16, 28, 27, 23, 24, 25, nil, 17, 18, 19,
20, 21, 22, 26, nil, 28, nil, 23, nil, 16,
nil, 31, 5, 42, 43, 40, 41, 36, 37, 38,
39, nil, 31, 16, 42, 43, 40, 41, 36, 37,
38, 39, 34, 35, 33, 32, 5, 31, 6, 42,
43, 40, 41, nil, nil, nil, 31, nil, 42, 43,
40, 41, 36, 37, 38, 39, 34, 35, 33, 32,
nil, 31, 6, 42, 43, 40, 41, 36, 37, 38,
39, 34, 35, 33, 32, nil, nil, nil, 31, 68,
42, 43, 40, 41, 36, 37, 38, 39, 34, 35,
33, 32, 31, nil, 42, 43, 40, 41, 36, 37,
38, 39, 34, 35, 33, 32, 31, nil, 42, 43,
40, 41, 36, 37, 38, 39, 34, 35, 33, 32,
31, nil, 42, 43, 40, 41, 36, 37, 38, 39,
34, 35, 33, 32, 31, nil, 42, 43, 40, 41,
36, 37, 38, 39, 34, 35, 33, 31, nil, 42,
43, 40, 41, 31, nil, 42, 43, 40, 41, 31,
nil, 42, 43, 31, nil, 42, 43 ]
racc_action_check = [
46, 49, 46, 46, 50, 46, 46, 46, 46, 46,
46, 46, 74, 46, 30, 46, 30, 30, 29, 30,
30, 30, 30, 30, 30, 30, 25, 30, 24, 30,
50, 46, 46, 47, 74, 47, 47, 94, 47, 47,
47, 47, 47, 47, 47, 30, 47, 0, 47, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 86,
0, 31, 0, 94, 47, 3, 67, 85, 66, 60,
86, 60, 60, 60, 60, 87, 55, 0, 0, 16,
89, 16, 16, 73, 16, 16, 16, 16, 16, 16,
16, 3, 16, 81, 16, 81, 81, 81, 81, 81,
81, 81, 81, 81, 81, 91, 81, 48, 81, 73,
16, 57, 1, 57, 57, 57, 57, 57, 57, 57,
57, 57, 57, 81, 81, 23, 83, 23, 23, 83,
23, 23, 23, 23, 23, 23, 23, 99, 23, 80,
23, 80, 80, nil, 80, 80, 80, 80, 80, 80,
80, nil, 80, nil, 80, nil, 23, nil, 77, nil,
77, 77, 77, 77, 77, 77, 77, 77, 77, 77,
80, 77, 27, 77, 27, 27, nil, 27, 27, 27,
27, 27, 27, 27, nil, 27, nil, 27, 77, 77,
nil, 28, 71, 28, 28, 71, 28, 28, 28, 28,
28, 28, 28, 27, 28, 76, 28, 76, 76, 76,
76, 76, 76, 76, 76, 76, 76, nil, 76, nil,
76, 88, 28, 88, 88, 88, 88, 88, 88, 88,
88, 88, 88, 88, 88, 76, 76, 98, nil, 98,
98, 98, 98, 98, 98, 98, 98, 98, 98, nil,
98, 75, 98, 75, 75, 75, 75, 75, 75, 75,
75, 75, 75, nil, 75, nil, 75, 98, 98, 59,
nil, 59, 59, 59, 59, 59, 59, 59, 59, nil,
nil, 75, 75, 32, 22, 32, 32, 22, 32, 32,
32, 32, 32, 32, 32, nil, 32, 43, 32, 43,
43, nil, 43, 43, 43, 43, 43, 43, 43, nil,
43, nil, 43, nil, 32, nil, 34, nil, 34, 34,
nil, 34, 34, 34, 34, 34, 34, 34, 43, 34,
35, 34, 35, 35, nil, 35, 35, 35, 35, 35,
35, 35, nil, 35, nil, 35, nil, 34, nil, 36,
nil, 36, 36, nil, 36, 36, 36, 36, 36, 36,
36, 35, 36, 37, 36, 37, 37, nil, 37, 37,
37, 37, 37, 37, 37, nil, 37, nil, 37, nil,
36, nil, 38, nil, 38, 38, nil, 38, 38, 38,
38, 38, 38, 38, 37, 38, 39, 38, 39, 39,
nil, 39, 39, 39, 39, 39, 39, 39, nil, 39,
nil, 39, nil, 38, nil, 40, nil, 40, 40, nil,
40, 40, 40, 40, 40, 40, 40, 39, 40, 41,
40, 41, 41, nil, 41, 41, 41, 41, 41, 41,
41, nil, 41, nil, 41, nil, 40, nil, 42, nil,
42, 42, nil, 42, 42, 42, 42, 42, 42, 42,
41, 42, 33, 42, 33, 33, nil, 33, 33, 33,
33, 33, 33, 33, nil, 33, nil, 33, nil, 42,
nil, 58, 52, 58, 58, 58, 58, 58, 58, 58,
58, nil, 52, 33, 52, 52, 52, 52, 52, 52,
52, 52, 52, 52, 52, 52, 51, 62, 52, 62,
62, 62, 62, nil, nil, nil, 51, nil, 51, 51,
51, 51, 51, 51, 51, 51, 51, 51, 51, 51,
nil, 44, 51, 44, 44, 44, 44, 44, 44, 44,
44, 44, 44, 44, 44, nil, nil, nil, 54, 44,
54, 54, 54, 54, 54, 54, 54, 54, 54, 54,
54, 54, 4, nil, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 69, nil, 69, 69,
69, 69, 69, 69, 69, 69, 69, 69, 69, 69,
72, nil, 72, 72, 72, 72, 72, 72, 72, 72,
72, 72, 72, 72, 56, nil, 56, 56, 56, 56,
56, 56, 56, 56, 56, 56, 56, 63, nil, 63,
63, 63, 63, 61, nil, 61, 61, 61, 61, 65,
nil, 65, 65, 64, nil, 64, 64 ]
racc_action_pointer = [
45, 112, nil, 59, 546, nil, nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil, 77, nil, nil, nil,
nil, nil, 254, 123, 16, 13, nil, 170, 189, 18,
12, 49, 281, 460, 314, 328, 347, 361, 380, 394,
413, 427, 446, 295, 515, nil, -2, 31, 91, -32,
-2, 500, 476, nil, 532, 43, 588, 95, 465, 253,
53, 607, 491, 601, 617, 613, 52, 50, nil, 560,
nil, 161, 574, 77, 0, 249, 203, 156, nil, nil,
137, 91, nil, 95, nil, 53, 56, 61, 205, 66,
nil, 93, nil, nil, 31, nil, nil, nil, 235, 123,
nil ]
racc_action_default = [
-1, -56, -2, -3, -4, -7, -8, -9, -10, -11,
-12, -13, -14, -15, -16, -17, -56, -19, -20, -21,
-22, -23, -26, -56, -56, -56, -52, -56, -56, -56,
-6, -56, -56, -56, -56, -56, -56, -56, -56, -56,
-56, -56, -56, -56, -56, -24, -56, -56, -43, -46,
-56, -56, -56, 101, -5, -26, -31, -32, -33, -34,
-35, -36, -37, -38, -39, -40, -41, -42, -18, -29,
-27, -56, -44, -56, -56, -1, -1, -1, -25, -28,
-56, -1, -47, -56, -49, -56, -56, -56, -30, -56,
-48, -56, -51, -53, -56, -55, -45, -50, -1, -56,
-54 ]
racc_goto_table = [
1, 30, 44, 45, 71, 73, 83, nil, nil, 48,
nil, nil, nil, 51, 52, nil, 54, nil, 56, 57,
58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
nil, nil, 69, 72, nil, nil, 78, nil, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil, 75, 76,
77, nil, nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil, 88, nil, nil, nil,
nil, 81, nil, nil, nil, 85, 86, 87, nil, nil,
nil, 89, nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, 98, nil, nil, nil, nil, nil, 99 ]
racc_goto_check = [
1, 2, 4, 14, 15, 16, 17, nil, nil, 4,
nil, nil, nil, 4, 4, nil, 4, nil, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
nil, nil, 4, 4, nil, nil, 14, nil, nil, nil,
nil, nil, nil, nil, nil, nil, nil, nil, 2, 2,
2, nil, nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, nil, nil, nil, nil, 4, nil, nil, nil,
nil, 2, nil, nil, nil, 1, 1, 1, nil, nil,
nil, 1, nil, nil, nil, nil, nil, nil, nil, nil,
nil, nil, 2, nil, nil, nil, nil, nil, 1 ]
racc_goto_pointer = [
nil, 0, -2, nil, -14, nil, nil, nil, nil, nil,
nil, nil, nil, nil, -19, -42, -44, -68 ]
racc_goto_default = [
nil, nil, 2, 3, 4, 7, 8, 9, 10, 11,
12, 13, 14, 15, nil, nil, nil, nil ]
racc_reduce_table = [
0, 0, :racc_error,
0, 36, :_reduce_1,
1, 36, :_reduce_2,
1, 36, :_reduce_3,
1, 38, :_reduce_4,
3, 38, :_reduce_5,
2, 38, :_reduce_6,
1, 37, :_reduce_none,
1, 37, :_reduce_none,
1, 39, :_reduce_none,
1, 39, :_reduce_none,
1, 39, :_reduce_none,
1, 39, :_reduce_none,
1, 39, :_reduce_none,
1, 39, :_reduce_none,
1, 39, :_reduce_none,
1, 39, :_reduce_none,
1, 39, :_reduce_none,
3, 39, :_reduce_18,
1, 40, :_reduce_19,
1, 40, :_reduce_20,
1, 40, :_reduce_21,
1, 40, :_reduce_22,
1, 40, :_reduce_23,
2, 41, :_reduce_24,
4, 41, :_reduce_25,
0, 49, :_reduce_26,
2, 49, :_reduce_27,
3, 49, :_reduce_28,
1, 50, :_reduce_29,
3, 50, :_reduce_30,
3, 42, :_reduce_31,
3, 42, :_reduce_32,
3, 42, :_reduce_33,
3, 42, :_reduce_34,
3, 42, :_reduce_35,
3, 42, :_reduce_36,
3, 42, :_reduce_37,
3, 42, :_reduce_38,
3, 42, :_reduce_39,
3, 42, :_reduce_40,
3, 42, :_reduce_41,
3, 42, :_reduce_42,
2, 42, :_reduce_43,
3, 44, :_reduce_44,
6, 45, :_reduce_45,
0, 51, :_reduce_46,
2, 51, :_reduce_47,
3, 51, :_reduce_48,
1, 52, :_reduce_49,
3, 52, :_reduce_50,
5, 46, :_reduce_51,
1, 43, :_reduce_52,
5, 47, :_reduce_53,
8, 47, :_reduce_54,
5, 48, :_reduce_55 ]
racc_reduce_n = 56
racc_shift_n = 101
racc_token_table = {
false => 0,
:error => 1,
:IF => 2,
:ELSE => 3,
:DEF => 4,
:CLASS => 5,
:NEWLINE => 6,
:NUMBER => 7,
:STRING => 8,
:TRUE => 9,
:FALSE => 10,
:NIL => 11,
:IDENTIFIER => 12,
:CONSTANT => 13,
:END => 14,
:WHILE => 15,
"." => 16,
"!" => 17,
"*" => 18,
"/" => 19,
"+" => 20,
"-" => 21,
">" => 22,
">=" => 23,
"<" => 24,
"<=" => 25,
"==" => 26,
"!=" => 27,
"&&" => 28,
"||" => 29,
"=" => 30,
"," => 31,
";" => 32,
"(" => 33,
")" => 34 }
racc_nt_base = 35
racc_use_result_var = true
Racc_arg = [
racc_action_table,
racc_action_check,
racc_action_default,
racc_action_pointer,
racc_goto_table,
racc_goto_check,
racc_goto_default,
racc_goto_pointer,
racc_nt_base,
racc_reduce_table,
racc_token_table,
racc_shift_n,
racc_reduce_n,
racc_use_result_var ]
Racc_token_to_s_table = [
"$end",
"error",
"IF",
"ELSE",
"DEF",
"CLASS",
"NEWLINE",
"NUMBER",
"STRING",
"TRUE",
"FALSE",
"NIL",
"IDENTIFIER",
"CONSTANT",
"END",
"WHILE",
"\".\"",
"\"!\"",
"\"*\"",
"\"/\"",
"\"+\"",
"\"-\"",
"\">\"",
"\">=\"",
"\"<\"",
"\"<=\"",
"\"==\"",
"\"!=\"",
"\"&&\"",
"\"||\"",
"\"=\"",
"\",\"",
"\";\"",
"\"(\"",
"\")\"",
"$start",
"Expressions",
"Terminator",
"ExpressionList",
"Expression",
"Literal",
"Call",
"Operator",
"Constant",
"Assign",
"Def",
"Class",
"If",
"While",
"Arguments",
"ArgList",
"Parameters",
"ParamList" ]
Racc_debug_parser = false
##### State transition tables end #####
# reduce 0 omitted
module_eval(<<'.,.,', 'grammar.y', 47)
def _reduce_1(val, _values, result)
result = Nodes.new([])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 48)
def _reduce_2(val, _values, result)
result = Nodes.new([])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 49)
def _reduce_3(val, _values, result)
result = Nodes.new(val[0])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 53)
def _reduce_4(val, _values, result)
result = [ val[0] ]
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 54)
def _reduce_5(val, _values, result)
result = val[0] << val[2]
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 56)
def _reduce_6(val, _values, result)
result = val[0]
result
end
.,.,
# reduce 7 omitted
# reduce 8 omitted
# reduce 9 omitted
# reduce 10 omitted
# reduce 11 omitted
# reduce 12 omitted
# reduce 13 omitted
# reduce 14 omitted
# reduce 15 omitted
# reduce 16 omitted
# reduce 17 omitted
module_eval(<<'.,.,', 'grammar.y', 76)
def _reduce_18(val, _values, result)
result = val[1]
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 81)
def _reduce_19(val, _values, result)
result = NumberNode.new(val[0])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 82)
def _reduce_20(val, _values, result)
result = StringNode.new(val[0])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 83)
def _reduce_21(val, _values, result)
result = TrueNode.new
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 84)
def _reduce_22(val, _values, result)
result = FalseNode.new
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 85)
def _reduce_23(val, _values, result)
result = NilNode.new
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 91)
def _reduce_24(val, _values, result)
result = CallNode.new(nil, val[0], val[1])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 94)
def _reduce_25(val, _values, result)
result = CallNode.new(val[0], val[2], val[3])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 98)
def _reduce_26(val, _values, result)
result = []
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 99)
def _reduce_27(val, _values, result)
result = []
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 100)
def _reduce_28(val, _values, result)
result = val[1]
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 104)
def _reduce_29(val, _values, result)
result = val
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 105)
def _reduce_30(val, _values, result)
result = val[0] << val[2]
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 110)
def _reduce_31(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 111)
def _reduce_32(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 112)
def _reduce_33(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 113)
def _reduce_34(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 114)
def _reduce_35(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 115)
def _reduce_36(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 116)
def _reduce_37(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 117)
def _reduce_38(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 120)
def _reduce_39(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 121)
def _reduce_40(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 122)
def _reduce_41(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 123)
def _reduce_42(val, _values, result)
result = CallNode.new(val[0], val[1], [val[2]])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 125)
def _reduce_43(val, _values, result)
result = CallNode.new(val[1], val[0], [])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 130)
def _reduce_44(val, _values, result)
result = AssignNode.new(val[0], val[2])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 137)
def _reduce_45(val, _values, result)
result = DefNode.new(val[1], val[2], val[4])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 141)
def _reduce_46(val, _values, result)
result = []
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 142)
def _reduce_47(val, _values, result)
result = []
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 143)
def _reduce_48(val, _values, result)
result = val[1]
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 147)
def _reduce_49(val, _values, result)
result = val
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 148)
def _reduce_50(val, _values, result)
result = val[0] << val[2]
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 155)
def _reduce_51(val, _values, result)
result = ClassNode.new(val[1], val[3])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 160)
def _reduce_52(val, _values, result)
result = ConstantNode.new(val[0])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 166)
def _reduce_53(val, _values, result)
result = IfNode.new(val[1], val[3], nil)
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 171)
def _reduce_54(val, _values, result)
result = IfNode.new(val[1], val[3], val[6])
result
end
.,.,
module_eval(<<'.,.,', 'grammar.y', 177)
def _reduce_55(val, _values, result)
result = WhileNode.new(val[1], val[3])
result
end
.,.,
def _reduce_none(val, _values, result)
val[0]
end
end # class Parser