# Autogenerated from a Treetop grammar. Edits may be lost. module Delorean include Treetop::Runtime def root @root ||= :line end module Line0 end module Line1 def f elements[0] end end def _nt_line start_index = index if node_cache[:line].has_key?(index) cached = node_cache[:line][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_formula s0 << r1 if r1 r3 = _nt_sp if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 i5, s5 = index, [] if has_terminal?('#', false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('#') r6 = nil end s5 << r6 if r6 s7, i7 = [], index loop do if index < input_length r8 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("any character") r8 = nil end if r8 s7 << r8 else break end end r7 = instantiate_node(SyntaxNode,input, i7...index, s7) s5 << r7 end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(Line0) else @index = i5 r5 = nil end if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s0 << r4 end end if s0.last r0 = instantiate_node(Line,input, i0...index, s0) r0.extend(Line1) else @index = i0 r0 = nil end node_cache[:line][start_index] = r0 r0 end module Formula0 def sp4 elements[0] end def i elements[1] end def e elements[5] end end module Formula1 def sp4 elements[0] end def i elements[1] end end module Formula2 def sp4 elements[0] end def i elements[1] end def e elements[5] end end module Formula3 def m elements[0] end end module Formula4 def n elements[0] end def mod elements[3] end def p elements[4] end end module Formula5 def n elements[0] end end module Formula6 def sp elements[1] end def n elements[2] end end def _nt_formula start_index = index if node_cache[:formula].has_key?(index) cached = node_cache[:formula][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] r2 = _nt_sp4 s1 << r2 if r2 r3 = _nt_identifier s1 << r3 if r3 r5 = _nt_sp if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 if has_terminal?('=?', false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('=?') r6 = nil end s1 << r6 if r6 r8 = _nt_sp if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s1 << r7 if r7 r9 = _nt_expression s1 << r9 end end end end end if s1.last r1 = instantiate_node(ParameterDefault,input, i1...index, s1) r1.extend(Formula0) else @index = i1 r1 = nil end if r1 r0 = r1 else i10, s10 = index, [] r11 = _nt_sp4 s10 << r11 if r11 r12 = _nt_identifier s10 << r12 if r12 r14 = _nt_sp if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s10 << r13 if r13 if has_terminal?('=?', false, index) r15 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('=?') r15 = nil end s10 << r15 end end end if s10.last r10 = instantiate_node(Parameter,input, i10...index, s10) r10.extend(Formula1) else @index = i10 r10 = nil end if r10 r0 = r10 else i16, s16 = index, [] r17 = _nt_sp4 s16 << r17 if r17 r18 = _nt_identifier s16 << r18 if r18 r20 = _nt_sp if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s16 << r19 if r19 if has_terminal?('=', false, index) r21 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('=') r21 = nil end s16 << r21 if r21 r23 = _nt_sp if r23 r22 = r23 else r22 = instantiate_node(SyntaxNode,input, index...index) end s16 << r22 if r22 r24 = _nt_expression s16 << r24 end end end end end if s16.last r16 = instantiate_node(Formula,input, i16...index, s16) r16.extend(Formula2) else @index = i16 r16 = nil end if r16 r0 = r16 else i25, s25 = index, [] r26 = _nt_class_name s25 << r26 if r26 if has_terminal?(':', false, index) r27 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(':') r27 = nil end s25 << r27 if r27 r29 = _nt_sp if r29 r28 = r29 else r28 = instantiate_node(SyntaxNode,input, index...index) end s25 << r28 if r28 i31, s31 = index, [] r32 = _nt_class_name s31 << r32 if r32 if has_terminal?('::', false, index) r33 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('::') r33 = nil end s31 << r33 end if s31.last r31 = instantiate_node(SyntaxNode,input, i31...index, s31) r31.extend(Formula3) else @index = i31 r31 = nil end if r31 r30 = r31 else r30 = instantiate_node(SyntaxNode,input, index...index) end s25 << r30 if r30 r34 = _nt_class_name s25 << r34 end end end end if s25.last r25 = instantiate_node(SubNode,input, i25...index, s25) r25.extend(Formula4) else @index = i25 r25 = nil end if r25 r0 = r25 else i35, s35 = index, [] r36 = _nt_class_name s35 << r36 if r36 if has_terminal?(':', false, index) r37 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(':') r37 = nil end s35 << r37 end if s35.last r35 = instantiate_node(BaseNode,input, i35...index, s35) r35.extend(Formula5) else @index = i35 r35 = nil end if r35 r0 = r35 else i38, s38 = index, [] if has_terminal?('import', false, index) r39 = instantiate_node(SyntaxNode,input, index...(index + 6)) @index += 6 else terminal_parse_failure('import') r39 = nil end s38 << r39 if r39 r40 = _nt_sp s38 << r40 if r40 r41 = _nt_class_name s38 << r41 end end if s38.last r38 = instantiate_node(Import,input, i38...index, s38) r38.extend(Formula6) else @index = i38 r38 = nil end if r38 r0 = r38 else @index = i0 r0 = nil end end end end end end node_cache[:formula][start_index] = r0 r0 end module ClassName0 end def _nt_class_name start_index = index if node_cache[:class_name].has_key?(index) cached = node_cache[:class_name][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?('\G[A-Z]', true, index) r1 = true @index += 1 else r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do if has_terminal?('\G[a-zA-Z0-9_]', true, index) r3 = true @index += 1 else r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ClassName0) else @index = i0 r0 = nil end node_cache[:class_name][start_index] = r0 r0 end module Expression0 def args elements[2] end end module Expression1 def op elements[0] end def e elements[2] end end module Expression2 def v elements[2] end def e1 elements[6] end def e2 elements[10] end end module Expression3 def v elements[0] end def op elements[2] end def e elements[4] end end def _nt_expression start_index = index if node_cache[:expression].has_key?(index) cached = node_cache[:expression][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] if has_terminal?('ERR(', false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 4)) @index += 4 else terminal_parse_failure('ERR(') r2 = nil end s1 << r2 if r2 r4 = _nt_sp if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 if r3 r5 = _nt_fn_args s1 << r5 if r5 r7 = _nt_sp if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s1 << r6 if r6 if has_terminal?(')', false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(')') r8 = nil end s1 << r8 end end end end if s1.last r1 = instantiate_node(ErrorOp,input, i1...index, s1) r1.extend(Expression0) else @index = i1 r1 = nil end if r1 r0 = r1 else i9, s9 = index, [] r10 = _nt_unary_op s9 << r10 if r10 r12 = _nt_sp if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s9 << r11 if r11 r13 = _nt_expression s9 << r13 end end if s9.last r9 = instantiate_node(UnOp,input, i9...index, s9) r9.extend(Expression1) else @index = i9 r9 = nil end if r9 r0 = r9 else i14, s14 = index, [] if has_terminal?('if', false, index) r15 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('if') r15 = nil end s14 << r15 if r15 r17 = _nt_sp if r17 r16 = r17 else r16 = instantiate_node(SyntaxNode,input, index...index) end s14 << r16 if r16 r18 = _nt_expression s14 << r18 if r18 r20 = _nt_sp if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s14 << r19 if r19 if has_terminal?('then', false, index) r21 = instantiate_node(SyntaxNode,input, index...(index + 4)) @index += 4 else terminal_parse_failure('then') r21 = nil end s14 << r21 if r21 r23 = _nt_sp if r23 r22 = r23 else r22 = instantiate_node(SyntaxNode,input, index...index) end s14 << r22 if r22 r24 = _nt_expression s14 << r24 if r24 r26 = _nt_sp if r26 r25 = r26 else r25 = instantiate_node(SyntaxNode,input, index...index) end s14 << r25 if r25 if has_terminal?('else', false, index) r27 = instantiate_node(SyntaxNode,input, index...(index + 4)) @index += 4 else terminal_parse_failure('else') r27 = nil end s14 << r27 if r27 r29 = _nt_sp if r29 r28 = r29 else r28 = instantiate_node(SyntaxNode,input, index...index) end s14 << r28 if r28 r30 = _nt_expression s14 << r30 end end end end end end end end end end if s14.last r14 = instantiate_node(IfElse,input, i14...index, s14) r14.extend(Expression2) else @index = i14 r14 = nil end if r14 r0 = r14 else i31, s31 = index, [] r32 = _nt_getattr_exp s31 << r32 if r32 r34 = _nt_sp if r34 r33 = r34 else r33 = instantiate_node(SyntaxNode,input, index...index) end s31 << r33 if r33 r35 = _nt_binary_op s31 << r35 if r35 r37 = _nt_sp if r37 r36 = r37 else r36 = instantiate_node(SyntaxNode,input, index...index) end s31 << r36 if r36 r38 = _nt_expression s31 << r38 end end end end if s31.last r31 = instantiate_node(BinOp,input, i31...index, s31) r31.extend(Expression3) else @index = i31 r31 = nil end if r31 r0 = r31 else r39 = _nt_getattr_exp if r39 r0 = r39 else @index = i0 r0 = nil end end end end end node_cache[:expression][start_index] = r0 r0 end module GetattrExp0 def v elements[0] end def dotted elements[1] end end def _nt_getattr_exp start_index = index if node_cache[:getattr_exp].has_key?(index) cached = node_cache[:getattr_exp][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] r2 = _nt_value s1 << r2 if r2 r3 = _nt_dotted s1 << r3 end if s1.last r1 = instantiate_node(GetattrExp,input, i1...index, s1) r1.extend(GetattrExp0) else @index = i1 r1 = nil end if r1 r0 = r1 else r4 = _nt_value if r4 r0 = r4 else @index = i0 r0 = nil end end node_cache[:getattr_exp][start_index] = r0 r0 end module Dotted0 def d elements[0] end def d_rest elements[1] end end def _nt_dotted start_index = index if node_cache[:dotted].has_key?(index) cached = node_cache[:dotted][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_dot_exp s0 << r1 if r1 r3 = _nt_dotted if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 end if s0.last r0 = instantiate_node(Dotted,input, i0...index, s0) r0.extend(Dotted0) else @index = i0 r0 = nil end node_cache[:dotted][start_index] = r0 r0 end module DotExp0 def args elements[2] end end module DotExp1 def al elements[2] end end module DotExp2 def i elements[2] end def al elements[5] end end module DotExp3 def i elements[2] end end def _nt_dot_exp start_index = index if node_cache[:dot_exp].has_key?(index) cached = node_cache[:dot_exp][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] if has_terminal?('[', false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('[') r2 = nil end s1 << r2 if r2 r4 = _nt_sp if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 if r3 r5 = _nt_fn_args s1 << r5 if r5 r7 = _nt_sp if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s1 << r6 if r6 if has_terminal?(']', false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(']') r8 = nil end s1 << r8 end end end end if s1.last r1 = instantiate_node(IndexOp,input, i1...index, s1) r1.extend(DotExp0) else @index = i1 r1 = nil end if r1 r0 = r1 else i9, s9 = index, [] if has_terminal?('(', false, index) r10 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('(') r10 = nil end s9 << r10 if r10 r12 = _nt_sp if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s9 << r11 if r11 r14 = _nt_kw_args if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s9 << r13 if r13 r16 = _nt_sp if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s9 << r15 if r15 if has_terminal?(')', false, index) r17 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(')') r17 = nil end s9 << r17 end end end end if s9.last r9 = instantiate_node(NodeCall,input, i9...index, s9) r9.extend(DotExp1) else @index = i9 r9 = nil end if r9 r0 = r9 else i18, s18 = index, [] if has_terminal?('.', false, index) r19 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('.') r19 = nil end s18 << r19 if r19 r21 = _nt_sp if r21 r20 = r21 else r20 = instantiate_node(SyntaxNode,input, index...index) end s18 << r20 if r20 r22 = _nt_identifier s18 << r22 if r22 if has_terminal?('(', false, index) r23 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('(') r23 = nil end s18 << r23 if r23 r25 = _nt_sp if r25 r24 = r25 else r24 = instantiate_node(SyntaxNode,input, index...index) end s18 << r24 if r24 r27 = _nt_kw_args if r27 r26 = r27 else r26 = instantiate_node(SyntaxNode,input, index...index) end s18 << r26 if r26 r29 = _nt_sp if r29 r28 = r29 else r28 = instantiate_node(SyntaxNode,input, index...index) end s18 << r28 if r28 if has_terminal?(')', false, index) r30 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(')') r30 = nil end s18 << r30 end end end end end end end if s18.last r18 = instantiate_node(Call,input, i18...index, s18) r18.extend(DotExp2) else @index = i18 r18 = nil end if r18 r0 = r18 else i31, s31 = index, [] if has_terminal?('.', false, index) r32 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('.') r32 = nil end s31 << r32 if r32 r34 = _nt_sp if r34 r33 = r34 else r33 = instantiate_node(SyntaxNode,input, index...index) end s31 << r33 if r33 i35 = index r36 = _nt_identifier if r36 r35 = r36 else r37 = _nt_integer if r37 r35 = r37 else @index = i35 r35 = nil end end s31 << r35 end end if s31.last r31 = instantiate_node(GetAttr,input, i31...index, s31) r31.extend(DotExp3) else @index = i31 r31 = nil end if r31 r0 = r31 else @index = i0 r0 = nil end end end end node_cache[:dot_exp][start_index] = r0 r0 end module UnpackArgs0 def args elements[3] end end module UnpackArgs1 def arg0 elements[0] end def args_rest elements[1] end end def _nt_unpack_args start_index = index if node_cache[:unpack_args].has_key?(index) cached = node_cache[:unpack_args][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_identifier s0 << r1 if r1 i3, s3 = index, [] r5 = _nt_sp if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s3 << r4 if r4 if has_terminal?(',', false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(',') r6 = nil end s3 << r6 if r6 r8 = _nt_sp if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s3 << r7 if r7 r10 = _nt_unpack_args if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s3 << r9 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(UnpackArgs0) else @index = i3 r3 = nil end if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 end if s0.last r0 = instantiate_node(UnpackArgs,input, i0...index, s0) r0.extend(UnpackArgs1) else @index = i0 r0 = nil end node_cache[:unpack_args][start_index] = r0 r0 end module ListExpr0 def sp elements[1] end def e3 elements[2] end end module ListExpr1 def e2 elements[2] end def sp1 elements[3] end def sp2 elements[5] end def args elements[6] end def sp3 elements[7] end def sp4 elements[9] end def e1 elements[10] end def ifexp elements[12] end end module ListExpr2 def args elements[2] end end def _nt_list_expr start_index = index if node_cache[:list_expr].has_key?(index) cached = node_cache[:list_expr][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if has_terminal?('[]', false, index) r1 = instantiate_node(ListExpr,input, index...(index + 2)) @index += 2 else terminal_parse_failure('[]') r1 = nil end if r1 r0 = r1 else i2, s2 = index, [] if has_terminal?('[', false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('[') r3 = nil end s2 << r3 if r3 r5 = _nt_sp if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s2 << r4 if r4 r6 = _nt_expression s2 << r6 if r6 r7 = _nt_sp s2 << r7 if r7 if has_terminal?('for', false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 3)) @index += 3 else terminal_parse_failure('for') r8 = nil end s2 << r8 if r8 r9 = _nt_sp s2 << r9 if r9 r10 = _nt_unpack_args s2 << r10 if r10 r11 = _nt_sp s2 << r11 if r11 if has_terminal?('in', false, index) r12 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('in') r12 = nil end s2 << r12 if r12 r13 = _nt_sp s2 << r13 if r13 r14 = _nt_expression s2 << r14 if r14 r16 = _nt_sp if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s2 << r15 if r15 i18, s18 = index, [] if has_terminal?('if', false, index) r19 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('if') r19 = nil end s18 << r19 if r19 r20 = _nt_sp s18 << r20 if r20 r21 = _nt_expression s18 << r21 if r21 r23 = _nt_sp if r23 r22 = r23 else r22 = instantiate_node(SyntaxNode,input, index...index) end s18 << r22 end end end if s18.last r18 = instantiate_node(SyntaxNode,input, i18...index, s18) r18.extend(ListExpr0) else @index = i18 r18 = nil end if r18 r17 = r18 else r17 = instantiate_node(SyntaxNode,input, index...index) end s2 << r17 if r17 if has_terminal?(']', false, index) r24 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(']') r24 = nil end s2 << r24 end end end end end end end end end end end end end if s2.last r2 = instantiate_node(ListComprehension,input, i2...index, s2) r2.extend(ListExpr1) else @index = i2 r2 = nil end if r2 r0 = r2 else i25, s25 = index, [] if has_terminal?('[', false, index) r26 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('[') r26 = nil end s25 << r26 if r26 r28 = _nt_sp if r28 r27 = r28 else r27 = instantiate_node(SyntaxNode,input, index...index) end s25 << r27 if r27 r29 = _nt_fn_args s25 << r29 if r29 r31 = _nt_sp if r31 r30 = r31 else r30 = instantiate_node(SyntaxNode,input, index...index) end s25 << r30 if r30 if has_terminal?(']', false, index) r32 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(']') r32 = nil end s25 << r32 end end end end if s25.last r25 = instantiate_node(ListExpr,input, i25...index, s25) r25.extend(ListExpr2) else @index = i25 r25 = nil end if r25 r0 = r25 else @index = i0 r0 = nil end end end node_cache[:list_expr][start_index] = r0 r0 end module SetExpr0 def sp elements[1] end def e3 elements[2] end end module SetExpr1 def e2 elements[2] end def sp1 elements[3] end def sp2 elements[5] end def args elements[6] end def sp3 elements[7] end def sp4 elements[9] end def e1 elements[10] end def ifexp elements[12] end end module SetExpr2 def args elements[2] end end def _nt_set_expr start_index = index if node_cache[:set_expr].has_key?(index) cached = node_cache[:set_expr][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if has_terminal?('{-}', false, index) r1 = instantiate_node(SetExpr,input, index...(index + 3)) @index += 3 else terminal_parse_failure('{-}') r1 = nil end if r1 r0 = r1 else i2, s2 = index, [] if has_terminal?('{', false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('{') r3 = nil end s2 << r3 if r3 r5 = _nt_sp if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s2 << r4 if r4 r6 = _nt_expression s2 << r6 if r6 r7 = _nt_sp s2 << r7 if r7 if has_terminal?('for', false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 3)) @index += 3 else terminal_parse_failure('for') r8 = nil end s2 << r8 if r8 r9 = _nt_sp s2 << r9 if r9 r10 = _nt_unpack_args s2 << r10 if r10 r11 = _nt_sp s2 << r11 if r11 if has_terminal?('in', false, index) r12 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('in') r12 = nil end s2 << r12 if r12 r13 = _nt_sp s2 << r13 if r13 r14 = _nt_expression s2 << r14 if r14 r16 = _nt_sp if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s2 << r15 if r15 i18, s18 = index, [] if has_terminal?('if', false, index) r19 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('if') r19 = nil end s18 << r19 if r19 r20 = _nt_sp s18 << r20 if r20 r21 = _nt_expression s18 << r21 if r21 r23 = _nt_sp if r23 r22 = r23 else r22 = instantiate_node(SyntaxNode,input, index...index) end s18 << r22 end end end if s18.last r18 = instantiate_node(SyntaxNode,input, i18...index, s18) r18.extend(SetExpr0) else @index = i18 r18 = nil end if r18 r17 = r18 else r17 = instantiate_node(SyntaxNode,input, index...index) end s2 << r17 if r17 if has_terminal?('}', false, index) r24 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('}') r24 = nil end s2 << r24 end end end end end end end end end end end end end if s2.last r2 = instantiate_node(SetComprehension,input, i2...index, s2) r2.extend(SetExpr1) else @index = i2 r2 = nil end if r2 r0 = r2 else i25, s25 = index, [] if has_terminal?('{', false, index) r26 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('{') r26 = nil end s25 << r26 if r26 r28 = _nt_sp if r28 r27 = r28 else r27 = instantiate_node(SyntaxNode,input, index...index) end s25 << r27 if r27 r29 = _nt_fn_args s25 << r29 if r29 r31 = _nt_sp if r31 r30 = r31 else r30 = instantiate_node(SyntaxNode,input, index...index) end s25 << r30 if r30 if has_terminal?('}', false, index) r32 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('}') r32 = nil end s25 << r32 end end end end if s25.last r25 = instantiate_node(SetExpr,input, i25...index, s25) r25.extend(SetExpr2) else @index = i25 r25 = nil end if r25 r0 = r25 else @index = i0 r0 = nil end end end node_cache[:set_expr][start_index] = r0 r0 end module HashExpr0 def sp elements[1] end def ei elements[2] end end module HashExpr1 def el elements[2] end def er elements[6] end def sp1 elements[7] end def sp2 elements[9] end def args elements[10] end def sp3 elements[11] end def sp4 elements[13] end def e1 elements[14] end def ifexp elements[16] end end module HashExpr2 def args elements[2] end end def _nt_hash_expr start_index = index if node_cache[:hash_expr].has_key?(index) cached = node_cache[:hash_expr][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if has_terminal?('{}', false, index) r1 = instantiate_node(HashExpr,input, index...(index + 2)) @index += 2 else terminal_parse_failure('{}') r1 = nil end if r1 r0 = r1 else i2, s2 = index, [] if has_terminal?('{', false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('{') r3 = nil end s2 << r3 if r3 r5 = _nt_sp if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s2 << r4 if r4 r6 = _nt_expression s2 << r6 if r6 r8 = _nt_sp if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s2 << r7 if r7 if has_terminal?(':', false, index) r9 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(':') r9 = nil end s2 << r9 if r9 r11 = _nt_sp if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s2 << r10 if r10 r12 = _nt_expression s2 << r12 if r12 r13 = _nt_sp s2 << r13 if r13 if has_terminal?('for', false, index) r14 = instantiate_node(SyntaxNode,input, index...(index + 3)) @index += 3 else terminal_parse_failure('for') r14 = nil end s2 << r14 if r14 r15 = _nt_sp s2 << r15 if r15 r16 = _nt_unpack_args s2 << r16 if r16 r17 = _nt_sp s2 << r17 if r17 if has_terminal?('in', false, index) r18 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('in') r18 = nil end s2 << r18 if r18 r19 = _nt_sp s2 << r19 if r19 r20 = _nt_expression s2 << r20 if r20 r22 = _nt_sp if r22 r21 = r22 else r21 = instantiate_node(SyntaxNode,input, index...index) end s2 << r21 if r21 i24, s24 = index, [] if has_terminal?('if', false, index) r25 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('if') r25 = nil end s24 << r25 if r25 r26 = _nt_sp s24 << r26 if r26 r27 = _nt_expression s24 << r27 if r27 r29 = _nt_sp if r29 r28 = r29 else r28 = instantiate_node(SyntaxNode,input, index...index) end s24 << r28 end end end if s24.last r24 = instantiate_node(SyntaxNode,input, i24...index, s24) r24.extend(HashExpr0) else @index = i24 r24 = nil end if r24 r23 = r24 else r23 = instantiate_node(SyntaxNode,input, index...index) end s2 << r23 if r23 if has_terminal?('}', false, index) r30 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('}') r30 = nil end s2 << r30 end end end end end end end end end end end end end end end end end if s2.last r2 = instantiate_node(HashComprehension,input, i2...index, s2) r2.extend(HashExpr1) else @index = i2 r2 = nil end if r2 r0 = r2 else i31, s31 = index, [] if has_terminal?('{', false, index) r32 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('{') r32 = nil end s31 << r32 if r32 r34 = _nt_sp if r34 r33 = r34 else r33 = instantiate_node(SyntaxNode,input, index...index) end s31 << r33 if r33 r35 = _nt_hash_args s31 << r35 if r35 r37 = _nt_sp if r37 r36 = r37 else r36 = instantiate_node(SyntaxNode,input, index...index) end s31 << r36 if r36 if has_terminal?('}', false, index) r38 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('}') r38 = nil end s31 << r38 end end end end if s31.last r31 = instantiate_node(HashExpr,input, i31...index, s31) r31.extend(HashExpr2) else @index = i31 r31 = nil end if r31 r0 = r31 else @index = i0 r0 = nil end end end node_cache[:hash_expr][start_index] = r0 r0 end def _nt_binary_op start_index = index if node_cache[:binary_op].has_key?(index) cached = node_cache[:binary_op][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if has_terminal?('==', false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('==') r1 = nil end if r1 r0 = r1 else if has_terminal?('!=', false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('!=') r2 = nil end if r2 r0 = r2 else if has_terminal?('>=', false, index) r3 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('>=') r3 = nil end if r3 r0 = r3 else if has_terminal?('<=', false, index) r4 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('<=') r4 = nil end if r4 r0 = r4 else if has_terminal?('&&', false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('&&') r5 = nil end if r5 r0 = r5 else if has_terminal?('||', false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('||') r6 = nil end if r6 r0 = r6 else if has_terminal?('>', false, index) r7 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('>') r7 = nil end if r7 r0 = r7 else if has_terminal?('<', false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('<') r8 = nil end if r8 r0 = r8 else if has_terminal?('+', false, index) r9 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('+') r9 = nil end if r9 r0 = r9 else if has_terminal?('-', false, index) r10 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('-') r10 = nil end if r10 r0 = r10 else if has_terminal?('*', false, index) r11 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('*') r11 = nil end if r11 r0 = r11 else if has_terminal?('/', false, index) r12 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('/') r12 = nil end if r12 r0 = r12 else if has_terminal?('%', false, index) r13 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('%') r13 = nil end if r13 r0 = r13 else if has_terminal?('&', false, index) r14 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('&') r14 = nil end if r14 r0 = r14 else if has_terminal?('^', false, index) r15 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('^') r15 = nil end if r15 r0 = r15 else if has_terminal?('|', false, index) r16 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('|') r16 = nil end if r16 r0 = r16 else @index = i0 r0 = nil end end end end end end end end end end end end end end end end node_cache[:binary_op][start_index] = r0 r0 end def _nt_unary_op start_index = index if node_cache[:unary_op].has_key?(index) cached = node_cache[:unary_op][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if has_terminal?('!', false, index) r1 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('!') r1 = nil end if r1 r0 = r1 else if has_terminal?('-', false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('-') r2 = nil end if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:unary_op][start_index] = r0 r0 end module Value0 def m elements[0] end end module Value1 def mod elements[0] end def c elements[1] end end module Value2 def e elements[2] end end def _nt_value start_index = index if node_cache[:value].has_key?(index) cached = node_cache[:value][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_decimal if r1 r0 = r1 else r2 = _nt_integer if r2 r0 = r2 else r3 = _nt_string if r3 r0 = r3 else r4 = _nt_boolean if r4 r0 = r4 else r5 = _nt_nil_val if r5 r0 = r5 else r6 = _nt_identifier if r6 r0 = r6 else r7 = _nt_self if r7 r0 = r7 else r8 = _nt_list_expr if r8 r0 = r8 else r9 = _nt_set_expr if r9 r0 = r9 else r10 = _nt_hash_expr if r10 r0 = r10 else i11, s11 = index, [] i13, s13 = index, [] r14 = _nt_class_name s13 << r14 if r14 if has_terminal?('::', false, index) r15 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('::') r15 = nil end s13 << r15 end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(Value0) else @index = i13 r13 = nil end if r13 r12 = r13 else r12 = instantiate_node(SyntaxNode,input, index...index) end s11 << r12 if r12 r16 = _nt_class_name s11 << r16 end if s11.last r11 = instantiate_node(NodeAsValue,input, i11...index, s11) r11.extend(Value1) else @index = i11 r11 = nil end if r11 r0 = r11 else i17, s17 = index, [] if has_terminal?('(', false, index) r18 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('(') r18 = nil end s17 << r18 if r18 r20 = _nt_sp if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s17 << r19 if r19 r21 = _nt_expression s17 << r21 if r21 r23 = _nt_sp if r23 r22 = r23 else r22 = instantiate_node(SyntaxNode,input, index...index) end s17 << r22 if r22 if has_terminal?(')', false, index) r24 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(')') r24 = nil end s17 << r24 end end end end if s17.last r17 = instantiate_node(Expr,input, i17...index, s17) r17.extend(Value2) else @index = i17 r17 = nil end if r17 r0 = r17 else @index = i0 r0 = nil end end end end end end end end end end end end node_cache[:value][start_index] = r0 r0 end module FnArgs0 def args elements[3] end end module FnArgs1 def arg0 elements[0] end def args_rest elements[1] end end def _nt_fn_args start_index = index if node_cache[:fn_args].has_key?(index) cached = node_cache[:fn_args][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_expression s0 << r1 if r1 i3, s3 = index, [] r5 = _nt_sp if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s3 << r4 if r4 if has_terminal?(',', false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(',') r6 = nil end s3 << r6 if r6 r8 = _nt_sp if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s3 << r7 if r7 r10 = _nt_fn_args if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s3 << r9 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(FnArgs0) else @index = i3 r3 = nil end if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 end if s0.last r0 = instantiate_node(FnArgs,input, i0...index, s0) r0.extend(FnArgs1) else @index = i0 r0 = nil end node_cache[:fn_args][start_index] = r0 r0 end module HashArgs0 def al elements[3] end end module HashArgs1 def e0 elements[0] end def e1 elements[4] end def args_rest elements[5] end end def _nt_hash_args start_index = index if node_cache[:hash_args].has_key?(index) cached = node_cache[:hash_args][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_expression s0 << r1 if r1 r3 = _nt_sp if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 if has_terminal?(':', false, index) r4 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(':') r4 = nil end s0 << r4 if r4 r6 = _nt_sp if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s0 << r5 if r5 r7 = _nt_expression s0 << r7 if r7 i9, s9 = index, [] r11 = _nt_sp if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s9 << r10 if r10 if has_terminal?(',', false, index) r12 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(',') r12 = nil end s9 << r12 if r12 r14 = _nt_sp if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s9 << r13 if r13 r16 = _nt_hash_args if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s9 << r15 end end end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(HashArgs0) else @index = i9 r9 = nil end if r9 r8 = r9 else r8 = instantiate_node(SyntaxNode,input, index...index) end s0 << r8 end end end end end if s0.last r0 = instantiate_node(HashArgs,input, i0...index, s0) r0.extend(HashArgs1) else @index = i0 r0 = nil end node_cache[:hash_args][start_index] = r0 r0 end module KwArgs0 def i elements[0] end end module KwArgs1 def al elements[3] end end module KwArgs2 def k elements[0] end def arg0 elements[1] end def args_rest elements[2] end end def _nt_kw_args start_index = index if node_cache[:kw_args].has_key?(index) cached = node_cache[:kw_args][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] i2, s2 = index, [] r3 = _nt_identifier s2 << r3 if r3 r5 = _nt_sp if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s2 << r4 if r4 if has_terminal?('=', false, index) r6 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('=') r6 = nil end s2 << r6 if r6 r8 = _nt_sp if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s2 << r7 end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(KwArgs0) else @index = i2 r2 = nil end if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r9 = _nt_expression s0 << r9 if r9 i11, s11 = index, [] r13 = _nt_sp if r13 r12 = r13 else r12 = instantiate_node(SyntaxNode,input, index...index) end s11 << r12 if r12 if has_terminal?(',', false, index) r14 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure(',') r14 = nil end s11 << r14 if r14 r16 = _nt_sp if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s11 << r15 if r15 r18 = _nt_kw_args if r18 r17 = r18 else r17 = instantiate_node(SyntaxNode,input, index...index) end s11 << r17 end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(KwArgs1) else @index = i11 r11 = nil end if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s0 << r10 end end if s0.last r0 = instantiate_node(KwArgs,input, i0...index, s0) r0.extend(KwArgs2) else @index = i0 r0 = nil end node_cache[:kw_args][start_index] = r0 r0 end module Decimal0 def i elements[0] end end def _nt_decimal start_index = index if node_cache[:decimal].has_key?(index) cached = node_cache[:decimal][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_integer s0 << r1 if r1 if has_terminal?('.', false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('.') r2 = nil end s0 << r2 if r2 s3, i3 = [], index loop do if has_terminal?('\G[0-9]', true, index) r4 = true @index += 1 else r4 = nil end if r4 s3 << r4 else break end end if s3.empty? @index = i3 r3 = nil else r3 = instantiate_node(SyntaxNode,input, i3...index, s3) end s0 << r3 end end if s0.last r0 = instantiate_node(Literal,input, i0...index, s0) r0.extend(Decimal0) else @index = i0 r0 = nil end node_cache[:decimal][start_index] = r0 r0 end module Integer0 end def _nt_integer start_index = index if node_cache[:integer].has_key?(index) cached = node_cache[:integer][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if has_terminal?('0', false, index) r1 = instantiate_node(Literal,input, index...(index + 1)) @index += 1 else terminal_parse_failure('0') r1 = nil end if r1 r0 = r1 else i2, s2 = index, [] if has_terminal?('\G[1-9]', true, index) r3 = true @index += 1 else r3 = nil end s2 << r3 if r3 s4, i4 = [], index loop do if has_terminal?('\G[0-9]', true, index) r5 = true @index += 1 else r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s2 << r4 end if s2.last r2 = instantiate_node(Literal,input, i2...index, s2) r2.extend(Integer0) else @index = i2 r2 = nil end if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:integer][start_index] = r0 r0 end module Identifier0 end def _nt_identifier start_index = index if node_cache[:identifier].has_key?(index) cached = node_cache[:identifier][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?('\G[a-z]', true, index) r1 = true @index += 1 else r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do if has_terminal?('\G[a-zA-Z0-9_]', true, index) r3 = true @index += 1 else r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 end if s0.last r0 = instantiate_node(Identifier,input, i0...index, s0) r0.extend(Identifier0) else @index = i0 r0 = nil end node_cache[:identifier][start_index] = r0 r0 end def _nt_boolean start_index = index if node_cache[:boolean].has_key?(index) cached = node_cache[:boolean][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if has_terminal?('true', false, index) r1 = instantiate_node(Literal,input, index...(index + 4)) @index += 4 else terminal_parse_failure('true') r1 = nil end if r1 r0 = r1 else if has_terminal?('false', false, index) r2 = instantiate_node(Literal,input, index...(index + 5)) @index += 5 else terminal_parse_failure('false') r2 = nil end if r2 r0 = r2 else @index = i0 r0 = nil end end node_cache[:boolean][start_index] = r0 r0 end def _nt_self start_index = index if node_cache[:self].has_key?(index) cached = node_cache[:self][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?('_', false, index) r0 = instantiate_node(Self,input, index...(index + 1)) @index += 1 else terminal_parse_failure('_') r0 = nil end node_cache[:self][start_index] = r0 r0 end def _nt_nil_val start_index = index if node_cache[:nil_val].has_key?(index) cached = node_cache[:nil_val][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?('nil', false, index) r0 = instantiate_node(Literal,input, index...(index + 3)) @index += 3 else terminal_parse_failure('nil') r0 = nil end node_cache[:nil_val][start_index] = r0 r0 end def _nt_sp4 start_index = index if node_cache[:sp4].has_key?(index) cached = node_cache[:sp4][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?(' ', false, index) r0 = instantiate_node(SyntaxNode,input, index...(index + 4)) @index += 4 else terminal_parse_failure(' ') r0 = nil end node_cache[:sp4][start_index] = r0 r0 end def _nt_sp start_index = index if node_cache[:sp].has_key?(index) cached = node_cache[:sp][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do if has_terminal?('\G[\\s]', true, index) r1 = true @index += 1 else r1 = nil end if r1 s0 << r1 else break end end if s0.empty? @index = i0 r0 = nil else r0 = instantiate_node(SyntaxNode,input, i0...index, s0) end node_cache[:sp][start_index] = r0 r0 end module String0 end module String1 end module String2 end def _nt_string start_index = index if node_cache[:string].has_key?(index) cached = node_cache[:string][index] if cached cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] if has_terminal?('"', false, index) r2 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('"') r2 = nil end s1 << r2 if r2 s3, i3 = [], index loop do i4 = index if has_terminal?('\"', false, index) r5 = instantiate_node(SyntaxNode,input, index...(index + 2)) @index += 2 else terminal_parse_failure('\"') r5 = nil end if r5 r4 = r5 else i6, s6 = index, [] i7 = index if has_terminal?('"', false, index) r8 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('"') r8 = nil end if r8 r7 = nil else @index = i7 r7 = instantiate_node(SyntaxNode,input, index...index) end s6 << r7 if r7 if index < input_length r9 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("any character") r9 = nil end s6 << r9 end if s6.last r6 = instantiate_node(SyntaxNode,input, i6...index, s6) r6.extend(String0) else @index = i6 r6 = nil end if r6 r4 = r6 else @index = i4 r4 = nil end end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s1 << r3 if r3 if has_terminal?('"', false, index) r10 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure('"') r10 = nil end s1 << r10 end end if s1.last r1 = instantiate_node(IString,input, i1...index, s1) r1.extend(String1) else @index = i1 r1 = nil end if r1 r0 = r1 else i11, s11 = index, [] if has_terminal?("'", false, index) r12 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("'") r12 = nil end s11 << r12 if r12 s13, i13 = [], index loop do if has_terminal?('\G[^\']', true, index) r14 = true @index += 1 else r14 = nil end if r14 s13 << r14 else break end end r13 = instantiate_node(SyntaxNode,input, i13...index, s13) s11 << r13 if r13 if has_terminal?("'", false, index) r15 = instantiate_node(SyntaxNode,input, index...(index + 1)) @index += 1 else terminal_parse_failure("'") r15 = nil end s11 << r15 end end if s11.last r11 = instantiate_node(DString,input, i11...index, s11) r11.extend(String2) else @index = i11 r11 = nil end if r11 r0 = r11 else @index = i0 r0 = nil end end node_cache[:string][start_index] = r0 r0 end end class DeloreanParser < Treetop::Runtime::CompiledParser include Delorean end