# 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 node_cache[:line][index] = 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 (match_len = has_terminal?('#', false, index)) r6 = true @index += match_len else terminal_parse_failure('\'#\'') r6 = nil end s5 << r6 if r6 s7, i7 = [], index loop do if index < input_length r8 = true @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 end module Formula5 def m elements[0] end end module Formula6 def n elements[0] end def mod elements[3] end def p elements[4] end end module Formula7 def n elements[0] end end module Formula8 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 node_cache[:formula][index] = 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 (match_len = has_terminal?('=?', false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true 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 (match_len = has_terminal?('=?', false, index)) r15 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true 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 (match_len = has_terminal?('=', false, index)) r21 = true @index += match_len 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 r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true r0 = r16 else i25, s25 = index, [] r26 = _nt_class_name s25 << r26 if r26 if (match_len = has_terminal?(':', false, index)) r27 = true @index += match_len 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 i30, s30 = index, [] r31 = _nt_class_name_import_nested s30 << r31 if s30.last r30 = instantiate_node(SyntaxNode,input, i30...index, s30) r30.extend(Formula3) else @index = i30 r30 = nil end s25 << r30 end end end if s25.last r25 = instantiate_node(SubNodeNested,input, i25...index, s25) r25.extend(Formula4) else @index = i25 r25 = nil end if r25 r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true r0 = r25 else i32, s32 = index, [] r33 = _nt_class_name s32 << r33 if r33 if (match_len = has_terminal?(':', false, index)) r34 = true @index += match_len else terminal_parse_failure('\':\'') r34 = nil end s32 << r34 if r34 r36 = _nt_sp if r36 r35 = r36 else r35 = instantiate_node(SyntaxNode,input, index...index) end s32 << r35 if r35 i38, s38 = index, [] r39 = _nt_class_name s38 << r39 if r39 if (match_len = has_terminal?('::', false, index)) r40 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'::\'') r40 = nil end s38 << r40 end if s38.last r38 = instantiate_node(SyntaxNode,input, i38...index, s38) r38.extend(Formula5) else @index = i38 r38 = nil end if r38 r37 = r38 else r37 = instantiate_node(SyntaxNode,input, index...index) end s32 << r37 if r37 r41 = _nt_class_name s32 << r41 end end end end if s32.last r32 = instantiate_node(SubNode,input, i32...index, s32) r32.extend(Formula6) else @index = i32 r32 = nil end if r32 r32 = SyntaxNode.new(input, (index-1)...index) if r32 == true r0 = r32 else i42, s42 = index, [] r43 = _nt_class_name s42 << r43 if r43 if (match_len = has_terminal?(':', false, index)) r44 = true @index += match_len else terminal_parse_failure('\':\'') r44 = nil end s42 << r44 end if s42.last r42 = instantiate_node(BaseNode,input, i42...index, s42) r42.extend(Formula7) else @index = i42 r42 = nil end if r42 r42 = SyntaxNode.new(input, (index-1)...index) if r42 == true r0 = r42 else i45, s45 = index, [] if (match_len = has_terminal?('import', false, index)) r46 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'import\'') r46 = nil end s45 << r46 if r46 r47 = _nt_sp s45 << r47 if r47 r48 = _nt_class_name_import s45 << r48 end end if s45.last r45 = instantiate_node(Import,input, i45...index, s45) r45.extend(Formula8) else @index = i45 r45 = nil end if r45 r45 = SyntaxNode.new(input, (index-1)...index) if r45 == true r0 = r45 else @index = i0 r0 = nil end 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 node_cache[:class_name][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?(@regexps[gr = '\A[A-Z]'] ||= Regexp.new(gr), :regexp, index) r1 = true @index += 1 else terminal_parse_failure('[A-Z]') r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_]'] ||= Regexp.new(gr), :regexp, index) r3 = true @index += 1 else terminal_parse_failure('[a-zA-Z0-9_]') 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 ClassNameImport0 end module ClassNameImport1 end def _nt_class_name_import start_index = index if node_cache[:class_name_import].has_key?(index) cached = node_cache[:class_name_import][index] if cached node_cache[:class_name_import][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?(@regexps[gr = '\A[A-Z]'] ||= Regexp.new(gr), :regexp, index) r1 = true @index += 1 else terminal_parse_failure('[A-Z]') r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_]'] ||= Regexp.new(gr), :regexp, index) r3 = true @index += 1 else terminal_parse_failure('[a-zA-Z0-9_]') r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 s4, i4 = [], index loop do i5, s5 = index, [] if (match_len = has_terminal?('::', false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'::\'') r6 = nil end s5 << r6 if r6 if has_terminal?(@regexps[gr = '\A[A-Z]'] ||= Regexp.new(gr), :regexp, index) r7 = true @index += 1 else terminal_parse_failure('[A-Z]') r7 = nil end s5 << r7 if r7 s8, i8 = [], index loop do if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_]'] ||= Regexp.new(gr), :regexp, index) r9 = true @index += 1 else terminal_parse_failure('[a-zA-Z0-9_]') r9 = nil end if r9 s8 << r9 else break end end r8 = instantiate_node(SyntaxNode,input, i8...index, s8) s5 << r8 end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ClassNameImport0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ClassNameImport1) else @index = i0 r0 = nil end node_cache[:class_name_import][start_index] = r0 r0 end module ClassNameImportNested0 end module ClassNameImportNested1 end def _nt_class_name_import_nested start_index = index if node_cache[:class_name_import_nested].has_key?(index) cached = node_cache[:class_name_import_nested][index] if cached node_cache[:class_name_import_nested][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?(@regexps[gr = '\A[A-Z]'] ||= Regexp.new(gr), :regexp, index) r1 = true @index += 1 else terminal_parse_failure('[A-Z]') r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_]'] ||= Regexp.new(gr), :regexp, index) r3 = true @index += 1 else terminal_parse_failure('[a-zA-Z0-9_]') r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 s4, i4 = [], index loop do i5, s5 = index, [] if (match_len = has_terminal?('::', false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'::\'') r6 = nil end s5 << r6 if r6 if has_terminal?(@regexps[gr = '\A[A-Z]'] ||= Regexp.new(gr), :regexp, index) r7 = true @index += 1 else terminal_parse_failure('[A-Z]') r7 = nil end s5 << r7 if r7 s8, i8 = [], index loop do if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_]'] ||= Regexp.new(gr), :regexp, index) r9 = true @index += 1 else terminal_parse_failure('[a-zA-Z0-9_]') r9 = nil end if r9 s8 << r9 else break end end r8 = instantiate_node(SyntaxNode,input, i8...index, s8) s5 << r8 end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ClassNameImportNested0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end if s4.size < 2 @index = i4 r4 = nil else r4 = instantiate_node(SyntaxNode,input, i4...index, s4) end s0 << r4 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ClassNameImportNested1) else @index = i0 r0 = nil end node_cache[:class_name_import_nested][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 node_cache[:expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] if (match_len = has_terminal?('ERR(', false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 r6 = _nt_fn_args if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s1 << r5 if r5 r8 = _nt_sp if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s1 << r7 if r7 if (match_len = has_terminal?(')', false, index)) r9 = true @index += match_len else terminal_parse_failure('\')\'') r9 = nil end s1 << r9 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 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i10, s10 = index, [] r11 = _nt_unary_op s10 << r11 if r11 r13 = _nt_sp if r13 r12 = r13 else r12 = instantiate_node(SyntaxNode,input, index...index) end s10 << r12 if r12 r14 = _nt_expression s10 << r14 end end if s10.last r10 = instantiate_node(UnOp,input, i10...index, s10) r10.extend(Expression1) else @index = i10 r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 else i15, s15 = index, [] if (match_len = has_terminal?('if', false, index)) r16 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'if\'') r16 = nil end s15 << r16 if r16 r18 = _nt_sp if r18 r17 = r18 else r17 = instantiate_node(SyntaxNode,input, index...index) end s15 << r17 if r17 r19 = _nt_expression s15 << r19 if r19 r21 = _nt_sp if r21 r20 = r21 else r20 = instantiate_node(SyntaxNode,input, index...index) end s15 << r20 if r20 if (match_len = has_terminal?('then', false, index)) r22 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'then\'') r22 = nil end s15 << r22 if r22 r24 = _nt_sp if r24 r23 = r24 else r23 = instantiate_node(SyntaxNode,input, index...index) end s15 << r23 if r23 r25 = _nt_expression s15 << r25 if r25 r27 = _nt_sp if r27 r26 = r27 else r26 = instantiate_node(SyntaxNode,input, index...index) end s15 << r26 if r26 if (match_len = has_terminal?('else', false, index)) r28 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'else\'') r28 = nil end s15 << r28 if r28 r30 = _nt_sp if r30 r29 = r30 else r29 = instantiate_node(SyntaxNode,input, index...index) end s15 << r29 if r29 r31 = _nt_expression s15 << r31 end end end end end end end end end end if s15.last r15 = instantiate_node(IfElse,input, i15...index, s15) r15.extend(Expression2) else @index = i15 r15 = nil end if r15 r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true r0 = r15 else i32, s32 = index, [] r33 = _nt_getattr_exp s32 << r33 if r33 r35 = _nt_sp if r35 r34 = r35 else r34 = instantiate_node(SyntaxNode,input, index...index) end s32 << r34 if r34 r36 = _nt_binary_op s32 << r36 if r36 r38 = _nt_sp if r38 r37 = r38 else r37 = instantiate_node(SyntaxNode,input, index...index) end s32 << r37 if r37 r39 = _nt_expression s32 << r39 end end end end if s32.last r32 = instantiate_node(BinOp,input, i32...index, s32) r32.extend(Expression3) else @index = i32 r32 = nil end if r32 r32 = SyntaxNode.new(input, (index-1)...index) if r32 == true r0 = r32 else r40 = _nt_getattr_exp if r40 r40 = SyntaxNode.new(input, (index-1)...index) if r40 == true r0 = r40 else @index = i0 r0 = nil end end end end end node_cache[:expression][start_index] = r0 r0 end module BlockArgs0 def sp41 elements[0] end def sp42 elements[1] end def i elements[3] end def e elements[7] end end module BlockArgs1 def sp41 elements[0] end def sp42 elements[1] end def i elements[3] end end def _nt_block_args start_index = index if node_cache[:block_args].has_key?(index) cached = node_cache[:block_args][index] if cached node_cache[:block_args][index] = 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_sp4 s1 << r3 if r3 r5 = _nt_sp if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 r6 = _nt_identifier s1 << r6 if r6 r8 = _nt_sp if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s1 << r7 if r7 if (match_len = has_terminal?('=?', false, index)) r9 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'=?\'') r9 = nil end s1 << r9 if r9 r11 = _nt_sp1 if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s1 << r10 if r10 r12 = _nt_expression s1 << r12 end end end end end end end if s1.last r1 = instantiate_node(BlockParameterDefault,input, i1...index, s1) r1.extend(BlockArgs0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i13, s13 = index, [] r14 = _nt_sp4 s13 << r14 if r14 r15 = _nt_sp4 s13 << r15 if r15 r17 = _nt_sp if r17 r16 = r17 else r16 = instantiate_node(SyntaxNode,input, index...index) end s13 << r16 if r16 r18 = _nt_identifier s13 << r18 if r18 r20 = _nt_sp if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s13 << r19 if r19 if (match_len = has_terminal?('=?', false, index)) r21 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'=?\'') r21 = nil end s13 << r21 end end end end end if s13.last r13 = instantiate_node(BlockParameter,input, i13...index, s13) r13.extend(BlockArgs1) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 else @index = i0 r0 = nil end end node_cache[:block_args][start_index] = r0 r0 end module BlockFormulas0 def sp41 elements[0] end def sp42 elements[1] end def i elements[3] end def e elements[7] end end def _nt_block_formulas start_index = index if node_cache[:block_formulas].has_key?(index) cached = node_cache[:block_formulas][index] if cached node_cache[:block_formulas][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_sp4 s0 << r1 if r1 r2 = _nt_sp4 s0 << r2 if r2 r4 = _nt_sp if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r5 = _nt_identifier s0 << r5 if r5 r7 = _nt_sp if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s0 << r6 if r6 if (match_len = has_terminal?('=', false, index)) r8 = true @index += match_len else terminal_parse_failure('\'=\'') r8 = nil end s0 << r8 if r8 r10 = _nt_sp if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s0 << r9 if r9 r11 = _nt_expression s0 << r11 end end end end end end end if s0.last r0 = instantiate_node(BlockFormula,input, i0...index, s0) r0.extend(BlockFormulas0) else @index = i0 r0 = nil end node_cache[:block_formulas][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 node_cache[:getattr_exp][index] = 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 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r4 = _nt_value if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true 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 node_cache[:dotted][index] = 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 def b_args elements[8] end def expressions elements[9] end end module DotExp3 def i elements[2] end def al elements[5] end end module DotExp4 def i elements[2] end def b_args elements[3] end def expressions elements[4] end end module DotExp5 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 node_cache[:dot_exp][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] if (match_len = has_terminal?('[', false, index)) r2 = true @index += match_len 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 (match_len = has_terminal?(']', false, index)) r8 = true @index += match_len 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 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i9, s9 = index, [] if (match_len = has_terminal?('(', false, index)) r10 = true @index += match_len 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 (match_len = has_terminal?(')', false, index)) r17 = true @index += match_len 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 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 else i18, s18 = index, [] if (match_len = has_terminal?('.', false, index)) r19 = true @index += match_len 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 (match_len = has_terminal?('(', false, index)) r23 = true @index += match_len 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_fn_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 (match_len = has_terminal?(')', false, index)) r30 = true @index += match_len else terminal_parse_failure('\')\'') r30 = nil end s18 << r30 if r30 s31, i31 = [], index loop do r32 = _nt_block_args if r32 s31 << r32 else break end end r31 = instantiate_node(SyntaxNode,input, i31...index, s31) s18 << r31 if r31 s33, i33 = [], index loop do r34 = _nt_block_formulas if r34 s33 << r34 else break end end if s33.empty? @index = i33 r33 = nil else r33 = instantiate_node(SyntaxNode,input, i33...index, s33) end s18 << r33 end end end end end end end end end if s18.last r18 = instantiate_node(BlockExpression,input, i18...index, s18) r18.extend(DotExp2) else @index = i18 r18 = nil end if r18 r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true r0 = r18 else i35, s35 = index, [] if (match_len = has_terminal?('.', false, index)) r36 = true @index += match_len else terminal_parse_failure('\'.\'') r36 = nil end s35 << r36 if r36 r38 = _nt_sp if r38 r37 = r38 else r37 = instantiate_node(SyntaxNode,input, index...index) end s35 << r37 if r37 r39 = _nt_identifier s35 << r39 if r39 if (match_len = has_terminal?('(', false, index)) r40 = true @index += match_len else terminal_parse_failure('\'(\'') r40 = nil end s35 << r40 if r40 r42 = _nt_sp if r42 r41 = r42 else r41 = instantiate_node(SyntaxNode,input, index...index) end s35 << r41 if r41 r44 = _nt_fn_args if r44 r43 = r44 else r43 = instantiate_node(SyntaxNode,input, index...index) end s35 << r43 if r43 r46 = _nt_sp if r46 r45 = r46 else r45 = instantiate_node(SyntaxNode,input, index...index) end s35 << r45 if r45 if (match_len = has_terminal?(')', false, index)) r47 = true @index += match_len else terminal_parse_failure('\')\'') r47 = nil end s35 << r47 end end end end end end end if s35.last r35 = instantiate_node(Call,input, i35...index, s35) r35.extend(DotExp3) else @index = i35 r35 = nil end if r35 r35 = SyntaxNode.new(input, (index-1)...index) if r35 == true r0 = r35 else i48, s48 = index, [] if (match_len = has_terminal?('.', false, index)) r49 = true @index += match_len else terminal_parse_failure('\'.\'') r49 = nil end s48 << r49 if r49 r51 = _nt_sp if r51 r50 = r51 else r50 = instantiate_node(SyntaxNode,input, index...index) end s48 << r50 if r50 r52 = _nt_identifier s48 << r52 if r52 s53, i53 = [], index loop do r54 = _nt_block_args if r54 s53 << r54 else break end end r53 = instantiate_node(SyntaxNode,input, i53...index, s53) s48 << r53 if r53 s55, i55 = [], index loop do r56 = _nt_block_formulas if r56 s55 << r56 else break end end if s55.empty? @index = i55 r55 = nil else r55 = instantiate_node(SyntaxNode,input, i55...index, s55) end s48 << r55 end end end end if s48.last r48 = instantiate_node(BlockExpression,input, i48...index, s48) r48.extend(DotExp4) else @index = i48 r48 = nil end if r48 r48 = SyntaxNode.new(input, (index-1)...index) if r48 == true r0 = r48 else i57, s57 = index, [] if (match_len = has_terminal?('.', false, index)) r58 = true @index += match_len else terminal_parse_failure('\'.\'') r58 = nil end s57 << r58 if r58 r60 = _nt_sp if r60 r59 = r60 else r59 = instantiate_node(SyntaxNode,input, index...index) end s57 << r59 if r59 i61 = index r62 = _nt_identifier if r62 r62 = SyntaxNode.new(input, (index-1)...index) if r62 == true r61 = r62 else r63 = _nt_integer if r63 r63 = SyntaxNode.new(input, (index-1)...index) if r63 == true r61 = r63 else @index = i61 r61 = nil end end s57 << r61 end end if s57.last r57 = instantiate_node(GetAttr,input, i57...index, s57) r57.extend(DotExp5) else @index = i57 r57 = nil end if r57 r57 = SyntaxNode.new(input, (index-1)...index) if r57 == true r0 = r57 else @index = i0 r0 = nil end end 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 node_cache[:unpack_args][index] = 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 (match_len = has_terminal?(',', false, index)) r6 = true @index += match_len 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 node_cache[:list_expr][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if (match_len = has_terminal?('[]', false, index)) r1 = instantiate_node(ListExpr,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'[]\'') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i2, s2 = index, [] if (match_len = has_terminal?('[', false, index)) r3 = true @index += match_len 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 (match_len = has_terminal?('for', false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 (match_len = has_terminal?('in', false, index)) r12 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 (match_len = has_terminal?('if', false, index)) r19 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 (match_len = has_terminal?(']', false, index)) r24 = true @index += match_len 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 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else i25, s25 = index, [] if (match_len = has_terminal?('[', false, index)) r26 = true @index += match_len 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 (match_len = has_terminal?(']', false, index)) r32 = true @index += match_len 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 r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true 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 node_cache[:set_expr][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if (match_len = has_terminal?('{-}', false, index)) r1 = instantiate_node(SetExpr,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'{-}\'') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i2, s2 = index, [] if (match_len = has_terminal?('{', false, index)) r3 = true @index += match_len 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 (match_len = has_terminal?('for', false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 (match_len = has_terminal?('in', false, index)) r12 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 (match_len = has_terminal?('if', false, index)) r19 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 (match_len = has_terminal?('}', false, index)) r24 = true @index += match_len 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 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else i25, s25 = index, [] if (match_len = has_terminal?('{', false, index)) r26 = true @index += match_len 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 (match_len = has_terminal?('}', false, index)) r32 = true @index += match_len 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 r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true 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 node_cache[:hash_expr][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if (match_len = has_terminal?('{}', false, index)) r1 = instantiate_node(HashExpr,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'{}\'') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i2, s2 = index, [] if (match_len = has_terminal?('{', false, index)) r3 = true @index += match_len 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 (match_len = has_terminal?(':', false, index)) r9 = true @index += match_len 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 (match_len = has_terminal?('for', false, index)) r14 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 (match_len = has_terminal?('in', false, index)) r18 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 (match_len = has_terminal?('if', false, index)) r25 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len 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 (match_len = has_terminal?('}', false, index)) r30 = true @index += match_len 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 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else i31, s31 = index, [] if (match_len = has_terminal?('{', false, index)) r32 = true @index += match_len 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 (match_len = has_terminal?('}', false, index)) r38 = true @index += match_len 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 r31 = SyntaxNode.new(input, (index-1)...index) if r31 == true r0 = r31 else @index = i0 r0 = nil end end end node_cache[:hash_expr][start_index] = r0 r0 end module BinaryOp0 def sp elements[1] end end def _nt_binary_op start_index = index if node_cache[:binary_op].has_key?(index) cached = node_cache[:binary_op][index] if cached node_cache[:binary_op][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if (match_len = has_terminal?('==', false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'==\'') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else if (match_len = has_terminal?('!=', false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'!=\'') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else if (match_len = has_terminal?('>=', false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'>=\'') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else if (match_len = has_terminal?('<=', false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'<=\'') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 else if (match_len = has_terminal?('&&', false, index)) r5 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'&&\'') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 else if (match_len = has_terminal?('||', false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'||\'') r6 = nil end if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 else if (match_len = has_terminal?('**', false, index)) r7 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'**\'') r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 else if (match_len = has_terminal?('>', false, index)) r8 = true @index += match_len else terminal_parse_failure('\'>\'') r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else if (match_len = has_terminal?('<', false, index)) r9 = true @index += match_len else terminal_parse_failure('\'<\'') r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 else if (match_len = has_terminal?('+', false, index)) r10 = true @index += match_len else terminal_parse_failure('\'+\'') r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 else if (match_len = has_terminal?('-', false, index)) r11 = true @index += match_len else terminal_parse_failure('\'-\'') r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 else if (match_len = has_terminal?('*', false, index)) r12 = true @index += match_len else terminal_parse_failure('\'*\'') r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r0 = r12 else if (match_len = has_terminal?('/', false, index)) r13 = true @index += match_len else terminal_parse_failure('\'/\'') r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 else if (match_len = has_terminal?('%', false, index)) r14 = true @index += match_len else terminal_parse_failure('\'%\'') r14 = nil end if r14 r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true r0 = r14 else if (match_len = has_terminal?('&', false, index)) r15 = true @index += match_len else terminal_parse_failure('\'&\'') r15 = nil end if r15 r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true r0 = r15 else if (match_len = has_terminal?('^', false, index)) r16 = true @index += match_len else terminal_parse_failure('\'^\'') r16 = nil end if r16 r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true r0 = r16 else if (match_len = has_terminal?('|', false, index)) r17 = true @index += match_len else terminal_parse_failure('\'|\'') r17 = nil end if r17 r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true r0 = r17 else i18, s18 = index, [] if (match_len = has_terminal?('in', false, index)) r19 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'in\'') r19 = nil end s18 << r19 if r19 r20 = _nt_sp s18 << r20 end if s18.last r18 = instantiate_node(SyntaxNode,input, i18...index, s18) r18.extend(BinaryOp0) else @index = i18 r18 = nil end if r18 r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true r0 = r18 else @index = i0 r0 = nil end end 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 node_cache[:unary_op][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if (match_len = has_terminal?('!', false, index)) r1 = true @index += match_len else terminal_parse_failure('\'!\'') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else if (match_len = has_terminal?('-', false, index)) r2 = true @index += match_len else terminal_parse_failure('\'-\'') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:unary_op][start_index] = r0 r0 end module Value0 def c elements[0] end end module Value1 def m elements[0] end end module Value2 def mod elements[0] end def c elements[1] end end module Value3 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 node_cache[:value][index] = 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 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_integer if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else r3 = _nt_string if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else r4 = _nt_boolean if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 else r5 = _nt_nil_val if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 else r6 = _nt_identifier if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 else r7 = _nt_sup if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 else r8 = _nt_self if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else r9 = _nt_list_expr if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 else r10 = _nt_set_expr if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 else r11 = _nt_hash_expr if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 else i12, s12 = index, [] r13 = _nt_class_name_import s12 << r13 if s12.last r12 = instantiate_node(NodeAsValueNested,input, i12...index, s12) r12.extend(Value0) else @index = i12 r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r0 = r12 else i14, s14 = index, [] i16, s16 = index, [] r17 = _nt_class_name s16 << r17 if r17 if (match_len = has_terminal?('::', false, index)) r18 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'::\'') r18 = nil end s16 << r18 end if s16.last r16 = instantiate_node(SyntaxNode,input, i16...index, s16) r16.extend(Value1) else @index = i16 r16 = nil end if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s14 << r15 if r15 r19 = _nt_class_name s14 << r19 end if s14.last r14 = instantiate_node(NodeAsValue,input, i14...index, s14) r14.extend(Value2) else @index = i14 r14 = nil end if r14 r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true r0 = r14 else i20, s20 = index, [] if (match_len = has_terminal?('(', false, index)) r21 = true @index += match_len else terminal_parse_failure('\'(\'') r21 = nil end s20 << r21 if r21 r23 = _nt_sp if r23 r22 = r23 else r22 = instantiate_node(SyntaxNode,input, index...index) end s20 << r22 if r22 r24 = _nt_expression s20 << r24 if r24 r26 = _nt_sp if r26 r25 = r26 else r25 = instantiate_node(SyntaxNode,input, index...index) end s20 << r25 if r25 if (match_len = has_terminal?(')', false, index)) r27 = true @index += match_len else terminal_parse_failure('\')\'') r27 = nil end s20 << r27 end end end end if s20.last r20 = instantiate_node(Expr,input, i20...index, s20) r20.extend(Value3) else @index = i20 r20 = nil end if r20 r20 = SyntaxNode.new(input, (index-1)...index) if r20 == true r0 = r20 else @index = i0 r0 = nil end end 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 node_cache[:fn_args][index] = 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 (match_len = has_terminal?(',', false, index)) r6 = true @index += match_len 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 sp elements[1] end def e3 elements[2] end end module HashArgs1 def al elements[3] end end module HashArgs2 def splat elements[0] end def e0 elements[1] end def ifexp elements[3] end def args_rest elements[4] end end module HashArgs3 def sp elements[1] end def e3 elements[2] end end module HashArgs4 def al elements[3] end end module HashArgs5 def e0 elements[0] end def e1 elements[4] end def ifexp elements[6] end def args_rest elements[7] 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 node_cache[:hash_args][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] if (match_len = has_terminal?('**', false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'**\'') r2 = nil end s1 << r2 if r2 r3 = _nt_expression s1 << r3 if r3 r5 = _nt_sp if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 i7, s7 = index, [] if (match_len = has_terminal?('if', false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'if\'') r8 = nil end s7 << r8 if r8 r9 = _nt_sp s7 << r9 if r9 r10 = _nt_expression s7 << r10 if r10 r12 = _nt_sp if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s7 << r11 end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(HashArgs0) else @index = i7 r7 = nil end if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s1 << r6 if r6 i14, s14 = index, [] r16 = _nt_sp if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s14 << r15 if r15 if (match_len = has_terminal?(',', false, index)) r17 = true @index += match_len else terminal_parse_failure('\',\'') r17 = nil end s14 << r17 if r17 r19 = _nt_sp if r19 r18 = r19 else r18 = instantiate_node(SyntaxNode,input, index...index) end s14 << r18 if r18 r21 = _nt_hash_args if r21 r20 = r21 else r20 = instantiate_node(SyntaxNode,input, index...index) end s14 << r20 end end end if s14.last r14 = instantiate_node(SyntaxNode,input, i14...index, s14) r14.extend(HashArgs1) else @index = i14 r14 = nil end if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s1 << r13 end end end end if s1.last r1 = instantiate_node(HashArgs,input, i1...index, s1) r1.extend(HashArgs2) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i22, s22 = index, [] r23 = _nt_expression s22 << r23 if r23 r25 = _nt_sp if r25 r24 = r25 else r24 = instantiate_node(SyntaxNode,input, index...index) end s22 << r24 if r24 if (match_len = has_terminal?(':', false, index)) r26 = true @index += match_len else terminal_parse_failure('\':\'') r26 = nil end s22 << r26 if r26 r28 = _nt_sp if r28 r27 = r28 else r27 = instantiate_node(SyntaxNode,input, index...index) end s22 << r27 if r27 r29 = _nt_expression s22 << r29 if r29 r31 = _nt_sp if r31 r30 = r31 else r30 = instantiate_node(SyntaxNode,input, index...index) end s22 << r30 if r30 i33, s33 = index, [] if (match_len = has_terminal?('if', false, index)) r34 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'if\'') r34 = nil end s33 << r34 if r34 r35 = _nt_sp s33 << r35 if r35 r36 = _nt_expression s33 << r36 if r36 r38 = _nt_sp if r38 r37 = r38 else r37 = instantiate_node(SyntaxNode,input, index...index) end s33 << r37 end end end if s33.last r33 = instantiate_node(SyntaxNode,input, i33...index, s33) r33.extend(HashArgs3) else @index = i33 r33 = nil end if r33 r32 = r33 else r32 = instantiate_node(SyntaxNode,input, index...index) end s22 << r32 if r32 i40, s40 = index, [] r42 = _nt_sp if r42 r41 = r42 else r41 = instantiate_node(SyntaxNode,input, index...index) end s40 << r41 if r41 if (match_len = has_terminal?(',', false, index)) r43 = true @index += match_len else terminal_parse_failure('\',\'') r43 = nil end s40 << r43 if r43 r45 = _nt_sp if r45 r44 = r45 else r44 = instantiate_node(SyntaxNode,input, index...index) end s40 << r44 if r44 r47 = _nt_hash_args if r47 r46 = r47 else r46 = instantiate_node(SyntaxNode,input, index...index) end s40 << r46 end end end if s40.last r40 = instantiate_node(SyntaxNode,input, i40...index, s40) r40.extend(HashArgs4) else @index = i40 r40 = nil end if r40 r39 = r40 else r39 = instantiate_node(SyntaxNode,input, index...index) end s22 << r39 end end end end end end end if s22.last r22 = instantiate_node(HashArgs,input, i22...index, s22) r22.extend(HashArgs5) else @index = i22 r22 = nil end if r22 r22 = SyntaxNode.new(input, (index-1)...index) if r22 == true r0 = r22 else @index = i0 r0 = nil end end node_cache[:hash_args][start_index] = r0 r0 end module KwArgs0 def sp elements[1] end def e3 elements[2] end end module KwArgs1 def al elements[3] end end module KwArgs2 def splat elements[0] end def arg0 elements[1] end def ifexp elements[3] end def args_rest elements[4] end end module KwArgs3 def i elements[0] end end module KwArgs4 def sp elements[1] end def e3 elements[2] end end module KwArgs5 def al elements[3] end end module KwArgs6 def k elements[0] end def arg0 elements[1] end def ifexp elements[3] end def args_rest elements[4] 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 node_cache[:kw_args][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] if (match_len = has_terminal?('**', false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'**\'') r2 = nil end s1 << r2 if r2 r3 = _nt_expression s1 << r3 if r3 r5 = _nt_sp if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 i7, s7 = index, [] if (match_len = has_terminal?('if', false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'if\'') r8 = nil end s7 << r8 if r8 r9 = _nt_sp s7 << r9 if r9 r10 = _nt_expression s7 << r10 if r10 r12 = _nt_sp if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s7 << r11 end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(KwArgs0) else @index = i7 r7 = nil end if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s1 << r6 if r6 i14, s14 = index, [] r16 = _nt_sp if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s14 << r15 if r15 if (match_len = has_terminal?(',', false, index)) r17 = true @index += match_len else terminal_parse_failure('\',\'') r17 = nil end s14 << r17 if r17 r19 = _nt_sp if r19 r18 = r19 else r18 = instantiate_node(SyntaxNode,input, index...index) end s14 << r18 if r18 r21 = _nt_kw_args if r21 r20 = r21 else r20 = instantiate_node(SyntaxNode,input, index...index) end s14 << r20 end end end if s14.last r14 = instantiate_node(SyntaxNode,input, i14...index, s14) r14.extend(KwArgs1) else @index = i14 r14 = nil end if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s1 << r13 end end end end if s1.last r1 = instantiate_node(KwArgs,input, i1...index, s1) r1.extend(KwArgs2) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i22, s22 = index, [] i24, s24 = index, [] r25 = _nt_identifier s24 << r25 if r25 r27 = _nt_sp if r27 r26 = r27 else r26 = instantiate_node(SyntaxNode,input, index...index) end s24 << r26 if r26 if (match_len = has_terminal?('=', false, index)) r28 = true @index += match_len else terminal_parse_failure('\'=\'') r28 = nil end s24 << r28 if r28 r30 = _nt_sp if r30 r29 = r30 else r29 = instantiate_node(SyntaxNode,input, index...index) end s24 << r29 end end end if s24.last r24 = instantiate_node(SyntaxNode,input, i24...index, s24) r24.extend(KwArgs3) else @index = i24 r24 = nil end if r24 r23 = r24 else r23 = instantiate_node(SyntaxNode,input, index...index) end s22 << r23 if r23 r31 = _nt_expression s22 << r31 if r31 r33 = _nt_sp if r33 r32 = r33 else r32 = instantiate_node(SyntaxNode,input, index...index) end s22 << r32 if r32 i35, s35 = index, [] if (match_len = has_terminal?('if', false, index)) r36 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'if\'') r36 = nil end s35 << r36 if r36 r37 = _nt_sp s35 << r37 if r37 r38 = _nt_expression s35 << r38 if r38 r40 = _nt_sp if r40 r39 = r40 else r39 = instantiate_node(SyntaxNode,input, index...index) end s35 << r39 end end end if s35.last r35 = instantiate_node(SyntaxNode,input, i35...index, s35) r35.extend(KwArgs4) else @index = i35 r35 = nil end if r35 r34 = r35 else r34 = instantiate_node(SyntaxNode,input, index...index) end s22 << r34 if r34 i42, s42 = index, [] r44 = _nt_sp if r44 r43 = r44 else r43 = instantiate_node(SyntaxNode,input, index...index) end s42 << r43 if r43 if (match_len = has_terminal?(',', false, index)) r45 = true @index += match_len else terminal_parse_failure('\',\'') r45 = nil end s42 << r45 if r45 r47 = _nt_sp if r47 r46 = r47 else r46 = instantiate_node(SyntaxNode,input, index...index) end s42 << r46 if r46 r49 = _nt_kw_args if r49 r48 = r49 else r48 = instantiate_node(SyntaxNode,input, index...index) end s42 << r48 end end end if s42.last r42 = instantiate_node(SyntaxNode,input, i42...index, s42) r42.extend(KwArgs5) else @index = i42 r42 = nil end if r42 r41 = r42 else r41 = instantiate_node(SyntaxNode,input, index...index) end s22 << r41 end end end end if s22.last r22 = instantiate_node(KwArgs,input, i22...index, s22) r22.extend(KwArgs6) else @index = i22 r22 = nil end if r22 r22 = SyntaxNode.new(input, (index-1)...index) if r22 == true r0 = r22 else @index = i0 r0 = nil end 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 node_cache[:decimal][index] = 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 (match_len = has_terminal?('.', false, index)) r2 = true @index += match_len else terminal_parse_failure('\'.\'') r2 = nil end s0 << r2 if r2 s3, i3 = [], index loop do if has_terminal?(@regexps[gr = '\A[0-9]'] ||= Regexp.new(gr), :regexp, index) r4 = true @index += 1 else terminal_parse_failure('[0-9]') 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 node_cache[:integer][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if (match_len = has_terminal?('0', false, index)) r1 = instantiate_node(Literal,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'0\'') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i2, s2 = index, [] if has_terminal?(@regexps[gr = '\A[1-9]'] ||= Regexp.new(gr), :regexp, index) r3 = true @index += 1 else terminal_parse_failure('[1-9]') r3 = nil end s2 << r3 if r3 s4, i4 = [], index loop do if has_terminal?(@regexps[gr = '\A[0-9]'] ||= Regexp.new(gr), :regexp, index) r5 = true @index += 1 else terminal_parse_failure('[0-9]') 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 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true 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 node_cache[:identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if has_terminal?(@regexps[gr = '\A[a-z]'] ||= Regexp.new(gr), :regexp, index) r1 = true @index += 1 else terminal_parse_failure('[a-z]') r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_]'] ||= Regexp.new(gr), :regexp, index) r3 = true @index += 1 else terminal_parse_failure('[a-zA-Z0-9_]') r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 if (match_len = has_terminal?('?', false, index)) r5 = true @index += match_len else terminal_parse_failure('\'?\'') 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(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 node_cache[:boolean][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index if (match_len = has_terminal?('true', false, index)) r1 = instantiate_node(Literal,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'true\'') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else if (match_len = has_terminal?('false', false, index)) r2 = instantiate_node(Literal,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'false\'') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:boolean][start_index] = r0 r0 end def _nt_sup start_index = index if node_cache[:sup].has_key?(index) cached = node_cache[:sup][index] if cached node_cache[:sup][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?('_sup', false, index)) r0 = instantiate_node(Sup,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'_sup\'') r0 = nil end node_cache[:sup][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 node_cache[:self][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?('_', false, index)) r0 = instantiate_node(Self,input, index...(index + match_len)) @index += match_len 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 node_cache[:nil_val][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?('nil', false, index)) r0 = instantiate_node(Literal,input, index...(index + match_len)) @index += match_len 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 node_cache[:sp4][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?(' ', false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\' \'') r0 = nil end node_cache[:sp4][start_index] = r0 r0 end def _nt_sp1 start_index = index if node_cache[:sp1].has_key?(index) cached = node_cache[:sp1][index] if cached node_cache[:sp1][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?(' ', false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\' \'') r0 = nil end node_cache[:sp1][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 node_cache[:sp][index] = 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?(@regexps[gr = '\A[\\s]'] ||= Regexp.new(gr), :regexp, index) r1 = true @index += 1 else terminal_parse_failure('[\\s]') 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 node_cache[:string][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] if (match_len = has_terminal?('"', false, index)) r2 = true @index += match_len else terminal_parse_failure('\'"\'') r2 = nil end s1 << r2 if r2 s3, i3 = [], index loop do i4 = index if (match_len = has_terminal?('\"', false, index)) r5 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('\'\\"\'') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r4 = r5 else i6, s6 = index, [] i7 = index if (match_len = has_terminal?('"', false, index)) r8 = true @index += match_len else terminal_parse_failure('\'"\'') r8 = nil end if r8 @index = i7 r7 = nil terminal_parse_failure('\'"\'', true) else @terminal_failures.pop @index = i7 r7 = instantiate_node(SyntaxNode,input, index...index) end s6 << r7 if r7 if index < input_length r9 = true @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 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true 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 (match_len = has_terminal?('"', false, index)) r10 = true @index += match_len 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 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i11, s11 = index, [] if (match_len = has_terminal?("'", false, index)) r12 = true @index += match_len else terminal_parse_failure('"\'"') r12 = nil end s11 << r12 if r12 s13, i13 = [], index loop do if has_terminal?(@regexps[gr = '\A[^\']'] ||= Regexp.new(gr), :regexp, index) r14 = true @index += 1 else terminal_parse_failure('[^\']') r14 = nil end if r14 s13 << r14 else break end end r13 = instantiate_node(SyntaxNode,input, i13...index, s13) s11 << r13 if r13 if (match_len = has_terminal?("'", false, index)) r15 = true @index += match_len 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 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true 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