# Autogenerated from a Treetop grammar. Edits may be lost. module OrigenVerilog module Verilog module Grammar include Treetop::Runtime def root @root ||= :verilog_source end module VerilogSource0 def to_ast n :verilog_source, *elements_to_ast end end def _nt_verilog_source start_index = index if node_cache[:verilog_source].has_key?(index) cached = node_cache[:verilog_source][index] if cached node_cache[:verilog_source][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do r1 = _nt_verilog_source_items if r1 s0 << r1 else break end end if s0.empty? @index = i0 r0 = nil else r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(VerilogSource0) r0.extend(VerilogSource0) end node_cache[:verilog_source][start_index] = r0 r0 end module VerilogLibrary0 def to_ast n :verilog_library, *elements_to_ast end end def _nt_verilog_library start_index = index if node_cache[:verilog_library].has_key?(index) cached = node_cache[:verilog_library][index] if cached node_cache[:verilog_library][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do r1 = _nt_verilog_library_items if r1 s0 << r1 else break end end if s0.empty? @index = i0 r0 = nil else r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(VerilogLibrary0) r0.extend(VerilogLibrary0) end node_cache[:verilog_library][start_index] = r0 r0 end def _nt_verilog_library_items start_index = index if node_cache[:verilog_library_items].has_key?(index) cached = node_cache[:verilog_library_items][index] if cached node_cache[:verilog_library_items][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_S if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_N if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else r3 = _nt_block_comment if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else r4 = _nt_one_line_comment if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 else r5 = _nt_compiler_directive if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 else r6 = _nt_library_declaration if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 else r7 = _nt_include_statement if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 else r8 = _nt_config_declaration if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else @index = i0 r0 = nil end end end end end end end end node_cache[:verilog_library_items][start_index] = r0 r0 end module LibraryDeclaration0 def s1 elements[0] end def s2 elements[2] end def file_path_spec elements[3] end end module LibraryDeclaration1 def s1 elements[0] end def s2 elements[2] end def file_path_spec elements[3] end end module LibraryDeclaration2 def S elements[1] end def file_path_spec elements[2] end end module LibraryDeclaration3 def S1 elements[1] end def library_identifier elements[2] end def S2 elements[3] end def file_path_spec elements[4] end def s1 elements[6] end def s2 elements[8] end end module LibraryDeclaration4 def to_ast n :library_declaration, *elements_to_ast end end def _nt_library_declaration start_index = index if node_cache[:library_declaration].has_key?(index) cached = node_cache[:library_declaration][index] if cached node_cache[:library_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("library", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"library"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 r3 = _nt_library_identifier s0 << r3 if r3 r4 = _nt_S s0 << r4 if r4 r5 = _nt_file_path_spec s0 << r5 if r5 s6, i6 = [], index loop do i7, s7 = index, [] r8 = _nt_s s7 << r8 if r8 if (match_len = has_terminal?(",", false, index)) r9 = true @index += match_len else terminal_parse_failure('","') r9 = nil end s7 << r9 if r9 r10 = _nt_s s7 << r10 if r10 r11 = _nt_file_path_spec s7 << r11 end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(LibraryDeclaration0) else @index = i7 r7 = nil end if r7 s6 << r7 else break end end r6 = instantiate_node(SyntaxNode,input, i6...index, s6) s0 << r6 if r6 r12 = _nt_s s0 << r12 if r12 i14, s14 = index, [] if (match_len = has_terminal?("-incdir", false, index)) r15 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"-incdir"') r15 = nil end s14 << r15 if r15 r16 = _nt_S s14 << r16 if r16 r17 = _nt_file_path_spec s14 << r17 if r17 s18, i18 = [], index loop do i19, s19 = index, [] r20 = _nt_s s19 << r20 if r20 if (match_len = has_terminal?(",", false, index)) r21 = true @index += match_len else terminal_parse_failure('","') r21 = nil end s19 << r21 if r21 r22 = _nt_s s19 << r22 if r22 r23 = _nt_file_path_spec s19 << r23 end end end if s19.last r19 = instantiate_node(SyntaxNode,input, i19...index, s19) r19.extend(LibraryDeclaration1) else @index = i19 r19 = nil end if r19 s18 << r19 else break end end r18 = instantiate_node(SyntaxNode,input, i18...index, s18) s14 << r18 end end end if s14.last r14 = instantiate_node(SyntaxNode,input, i14...index, s14) r14.extend(LibraryDeclaration2) else @index = i14 r14 = nil end if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s0 << r13 if r13 r24 = _nt_s s0 << r24 if r24 if (match_len = has_terminal?(";", false, index)) r25 = true @index += match_len else terminal_parse_failure('";"') r25 = nil end s0 << r25 end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(LibraryDeclaration3) r0.extend(LibraryDeclaration4) else @index = i0 r0 = nil end node_cache[:library_declaration][start_index] = r0 r0 end module IncludeStatement0 def S elements[1] end def file_path_spec elements[2] end def s elements[3] end end module IncludeStatement1 def to_ast n :include_statement, *elements_to_ast end end def _nt_include_statement start_index = index if node_cache[:include_statement].has_key?(index) cached = node_cache[:include_statement][index] if cached node_cache[:include_statement][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("include", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"include"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 r3 = _nt_file_path_spec s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?(";", false, index)) r5 = true @index += match_len else terminal_parse_failure('";"') r5 = nil end s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(IncludeStatement0) r0.extend(IncludeStatement1) else @index = i0 r0 = nil end node_cache[:include_statement][start_index] = r0 r0 end def _nt_verilog_source_items start_index = index if node_cache[:verilog_source_items].has_key?(index) cached = node_cache[:verilog_source_items][index] if cached node_cache[:verilog_source_items][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_S if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_N if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else r3 = _nt_block_comment if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else r4 = _nt_one_line_comment if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 else r5 = _nt_compiler_directive if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 else r6 = _nt_module_declaration if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 else r7 = _nt_udp_declaration if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 else r8 = _nt_config_declaration if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else @index = i0 r0 = nil end end end end end end end end node_cache[:verilog_source_items][start_index] = r0 r0 end module ModuleDeclaration0 def s elements[0] end def attribute_instance elements[1] end end module ModuleDeclaration1 def s elements[0] end def module_item elements[1] end end module ModuleDeclaration2 def s1 elements[1] end def module_keyword elements[2] end def S elements[3] end def module_identifier elements[4] end def s2 elements[5] end def s3 elements[7] end def list_of_ports elements[8] end def s4 elements[9] end def s5 elements[12] end end module ModuleDeclaration3 def s elements[0] end def attribute_instance elements[1] end end module ModuleDeclaration4 def s elements[0] end def non_port_module_item elements[1] end end module ModuleDeclaration5 def s1 elements[1] end def module_keyword elements[2] end def S elements[3] end def module_identifier elements[4] end def s2 elements[5] end def s3 elements[7] end def s4 elements[9] end def s5 elements[12] end end module ModuleDeclaration6 def to_ast n :module_declaration, *elements_to_ast end end def _nt_module_declaration start_index = index if node_cache[:module_declaration].has_key?(index) cached = node_cache[:module_declaration][index] if cached node_cache[:module_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ModuleDeclaration0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s1 << r2 if r2 r6 = _nt_s s1 << r6 if r6 r7 = _nt_module_keyword s1 << r7 if r7 r8 = _nt_S s1 << r8 if r8 r9 = _nt_module_identifier s1 << r9 if r9 r10 = _nt_s s1 << r10 if r10 r12 = _nt_module_parameter_port_list if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s1 << r11 if r11 r13 = _nt_s s1 << r13 if r13 r14 = _nt_list_of_ports s1 << r14 if r14 r15 = _nt_s s1 << r15 if r15 if (match_len = has_terminal?(";", false, index)) r16 = true @index += match_len else terminal_parse_failure('";"') r16 = nil end s1 << r16 if r16 s17, i17 = [], index loop do i18, s18 = index, [] r19 = _nt_s s18 << r19 if r19 r20 = _nt_module_item s18 << r20 end if s18.last r18 = instantiate_node(SyntaxNode,input, i18...index, s18) r18.extend(ModuleDeclaration1) else @index = i18 r18 = nil end if r18 s17 << r18 else break end end r17 = instantiate_node(SyntaxNode,input, i17...index, s17) s1 << r17 if r17 r21 = _nt_s s1 << r21 if r21 if (match_len = has_terminal?("endmodule", false, index)) r22 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endmodule"') r22 = nil end s1 << r22 end end end end end end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ModuleDeclaration2) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ModuleDeclaration6) r0.extend(ModuleDeclaration6) else i23, s23 = index, [] s24, i24 = [], index loop do i25, s25 = index, [] r26 = _nt_s s25 << r26 if r26 r27 = _nt_attribute_instance s25 << r27 end if s25.last r25 = instantiate_node(SyntaxNode,input, i25...index, s25) r25.extend(ModuleDeclaration3) else @index = i25 r25 = nil end if r25 s24 << r25 else break end end r24 = instantiate_node(SyntaxNode,input, i24...index, s24) s23 << r24 if r24 r28 = _nt_s s23 << r28 if r28 r29 = _nt_module_keyword s23 << r29 if r29 r30 = _nt_S s23 << r30 if r30 r31 = _nt_module_identifier s23 << r31 if r31 r32 = _nt_s s23 << r32 if r32 r34 = _nt_module_parameter_port_list if r34 r33 = r34 else r33 = instantiate_node(SyntaxNode,input, index...index) end s23 << r33 if r33 r35 = _nt_s s23 << r35 if r35 r37 = _nt_list_of_port_declarations if r37 r36 = r37 else r36 = instantiate_node(SyntaxNode,input, index...index) end s23 << r36 if r36 r38 = _nt_s s23 << r38 if r38 if (match_len = has_terminal?(";", false, index)) r39 = true @index += match_len else terminal_parse_failure('";"') r39 = nil end s23 << r39 if r39 s40, i40 = [], index loop do i41, s41 = index, [] r42 = _nt_s s41 << r42 if r42 r43 = _nt_non_port_module_item s41 << r43 end if s41.last r41 = instantiate_node(SyntaxNode,input, i41...index, s41) r41.extend(ModuleDeclaration4) else @index = i41 r41 = nil end if r41 s40 << r41 else break end end r40 = instantiate_node(SyntaxNode,input, i40...index, s40) s23 << r40 if r40 r44 = _nt_s s23 << r44 if r44 if (match_len = has_terminal?("endmodule", false, index)) r45 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endmodule"') r45 = nil end s23 << r45 end end end end end end end end end end end end end if s23.last r23 = instantiate_node(SyntaxNode,input, i23...index, s23) r23.extend(ModuleDeclaration5) else @index = i23 r23 = nil end if r23 r23 = SyntaxNode.new(input, (index-1)...index) if r23 == true r0 = r23 r0.extend(ModuleDeclaration6) r0.extend(ModuleDeclaration6) else @index = i0 r0 = nil end end node_cache[:module_declaration][start_index] = r0 r0 end def _nt_module_keyword start_index = index if node_cache[:module_keyword].has_key?(index) cached = node_cache[:module_keyword][index] if cached node_cache[:module_keyword][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?("module", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"module"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else if (match_len = has_terminal?("macromodule", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"macromodule"') 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[:module_keyword][start_index] = r0 r0 end module CompilerDirective0 def to_ast n :compiler_directive, *elements_to_ast end end def _nt_compiler_directive start_index = index if node_cache[:compiler_directive].has_key?(index) cached = node_cache[:compiler_directive][index] if cached node_cache[:compiler_directive][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do i1 = index r2 = _nt_error if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r1 = r2 else r3 = _nt_timescale_compiler_directive if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r1 = r3 else @index = i1 r1 = nil end end if r1 s0 << r1 else break end if s0.size == 1 break end end if s0.size < 1 @index = i0 r0 = nil else if s0.size < 1 @terminal_failures.pop end r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(CompilerDirective0) r0.extend(CompilerDirective0) end node_cache[:compiler_directive][start_index] = r0 r0 end module Error0 def S elements[1] end def message elements[2] end end module Error1 def to_ast n :error, message.to_ast end end def _nt_error start_index = index if node_cache[:error].has_key?(index) cached = node_cache[:error][index] if cached node_cache[:error][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("`error", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"`error"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 r3 = _nt_string s0 << r3 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Error0) r0.extend(Error1) else @index = i0 r0 = nil end node_cache[:error][start_index] = r0 r0 end module TimescaleCompilerDirective0 def S elements[1] end def time_number1 elements[2] end def s1 elements[3] end def s2 elements[5] end def time_number2 elements[6] end end module TimescaleCompilerDirective1 def to_ast n :timescale_compiler_directive, *elements_to_ast end end def _nt_timescale_compiler_directive start_index = index if node_cache[:timescale_compiler_directive].has_key?(index) cached = node_cache[:timescale_compiler_directive][index] if cached node_cache[:timescale_compiler_directive][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("`timescale", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"`timescale"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 r3 = _nt_time_number s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?("/", false, index)) r5 = true @index += match_len else terminal_parse_failure('"/"') r5 = nil end s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 r7 = _nt_time_number s0 << r7 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(TimescaleCompilerDirective0) r0.extend(TimescaleCompilerDirective1) else @index = i0 r0 = nil end node_cache[:timescale_compiler_directive][start_index] = r0 r0 end module TimeNumber0 def value elements[0] end def s elements[1] end def unit elements[2] end end module TimeNumber1 def to_ast n :time_number, value.text_value.to_i, unit.text_value end end def _nt_time_number start_index = index if node_cache[:time_number].has_key?(index) cached = node_cache[:time_number][index] if cached node_cache[:time_number][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] i1 = index if (match_len = has_terminal?("100", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"100"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r1 = r2 else if (match_len = has_terminal?("10", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"10"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r1 = r3 else if (match_len = has_terminal?("1", false, index)) r4 = true @index += match_len else terminal_parse_failure('"1"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r1 = r4 else @index = i1 r1 = nil end end end s0 << r1 if r1 r5 = _nt_s s0 << r5 if r5 i6 = index if (match_len = has_terminal?("s", false, index)) r7 = true @index += match_len else terminal_parse_failure('"s"') r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r6 = r7 else if (match_len = has_terminal?("ms", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"ms"') r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r6 = r8 else if (match_len = has_terminal?("us", false, index)) r9 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"us"') r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r6 = r9 else if (match_len = has_terminal?("ns", false, index)) r10 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"ns"') r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r6 = r10 else if (match_len = has_terminal?("ps", false, index)) r11 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"ps"') r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r6 = r11 else if (match_len = has_terminal?("fs", false, index)) r12 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"fs"') r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r6 = r12 else @index = i6 r6 = nil end end end end end end s0 << r6 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(TimeNumber0) r0.extend(TimeNumber1) else @index = i0 r0 = nil end node_cache[:time_number][start_index] = r0 r0 end module ModuleParameterPortList0 def s1 elements[0] end def s2 elements[2] end def parameter_declaration elements[3] end end module ModuleParameterPortList1 def s1 elements[1] end def parameter_declaration elements[2] end def s2 elements[4] end end module ModuleParameterPortList2 def to_ast n :module_parameter_port_list, *elements_to_ast end end def _nt_module_parameter_port_list start_index = index if node_cache[:module_parameter_port_list].has_key?(index) cached = node_cache[:module_parameter_port_list][index] if cached node_cache[:module_parameter_port_list][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = 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 s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_parameter_declaration s0 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 if (match_len = has_terminal?(',', false, index)) r7 = true @index += match_len else terminal_parse_failure('\',\'') r7 = nil end s5 << r7 if r7 r8 = _nt_s s5 << r8 if r8 r9 = _nt_parameter_declaration s5 << r9 end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ModuleParameterPortList0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 if r4 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(")", false, index)) r11 = true @index += match_len else terminal_parse_failure('")"') r11 = nil end s0 << r11 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ModuleParameterPortList1) r0.extend(ModuleParameterPortList2) else @index = i0 r0 = nil end node_cache[:module_parameter_port_list][start_index] = r0 r0 end module ListOfPorts0 def s1 elements[0] end def s2 elements[2] end def port elements[3] end end module ListOfPorts1 def s1 elements[1] end def port elements[2] end def s2 elements[4] end end module ListOfPorts2 def to_ast n :list_of_ports, *elements_to_ast end end def _nt_list_of_ports start_index = index if node_cache[:list_of_ports].has_key?(index) cached = node_cache[:list_of_ports][index] if cached node_cache[:list_of_ports][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("(", false, index)) r1 = true @index += match_len else terminal_parse_failure('"("') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_port s0 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 if (match_len = has_terminal?(',', false, index)) r7 = true @index += match_len else terminal_parse_failure('\',\'') r7 = nil end s5 << r7 if r7 r8 = _nt_s s5 << r8 if r8 r9 = _nt_port s5 << r9 end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ListOfPorts0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 if r4 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(")", false, index)) r11 = true @index += match_len else terminal_parse_failure('")"') r11 = nil end s0 << r11 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ListOfPorts1) r0.extend(ListOfPorts2) else @index = i0 r0 = nil end node_cache[:list_of_ports][start_index] = r0 r0 end module ListOfPortDeclarations0 def s1 elements[0] end def s2 elements[2] end def port_declaration elements[3] end end module ListOfPortDeclarations1 def s1 elements[1] end def s2 elements[4] end end def _nt_list_of_port_declarations start_index = index if node_cache[:list_of_port_declarations].has_key?(index) cached = node_cache[:list_of_port_declarations][index] if cached node_cache[:list_of_port_declarations][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("(", false, index)) r1 = true @index += match_len else terminal_parse_failure('"("') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_port_declaration if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 s5, i5 = [], index loop do i6, s6 = index, [] r7 = _nt_s s6 << r7 if r7 if (match_len = has_terminal?(',', false, index)) r8 = true @index += match_len else terminal_parse_failure('\',\'') r8 = nil end s6 << r8 if r8 r9 = _nt_s s6 << r9 if r9 r10 = _nt_port_declaration s6 << r10 end end end if s6.last r6 = instantiate_node(SyntaxNode,input, i6...index, s6) r6.extend(ListOfPortDeclarations0) else @index = i6 r6 = nil end if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s0 << r5 if r5 r11 = _nt_s s0 << r11 if r11 if (match_len = has_terminal?(")", false, index)) r12 = true @index += match_len else terminal_parse_failure('")"') r12 = nil end s0 << r12 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ListOfPortDeclarations1) else @index = i0 r0 = nil end node_cache[:list_of_port_declarations][start_index] = r0 r0 end module Port0 def port_identifier elements[1] end def s1 elements[2] end def s2 elements[4] end def s3 elements[6] end end module Port1 def to_ast n :port, *elements_to_ast end end def _nt_port start_index = index if node_cache[:port].has_key?(index) cached = node_cache[:port][index] if cached node_cache[:port][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_port_expression if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(Port1) r0.extend(Port1) 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 r4 = _nt_port_identifier s2 << r4 if r4 r5 = _nt_s s2 << r5 if r5 if (match_len = has_terminal?("(", false, index)) r6 = true @index += match_len else terminal_parse_failure('"("') r6 = nil end s2 << r6 if r6 r7 = _nt_s s2 << r7 if r7 r9 = _nt_port_expression if r9 r8 = r9 else r8 = instantiate_node(SyntaxNode,input, index...index) end s2 << r8 if r8 r10 = _nt_s s2 << r10 if r10 if (match_len = has_terminal?(")", false, index)) r11 = true @index += match_len else terminal_parse_failure('")"') r11 = nil end s2 << r11 end end end end end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(Port0) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(Port1) r0.extend(Port1) else @index = i0 r0 = nil end end node_cache[:port][start_index] = r0 r0 end module PortExpression0 def s1 elements[0] end def s2 elements[2] end def port_reference elements[3] end def s3 elements[4] end end module PortExpression1 def port_reference elements[0] end end module PortExpression2 def to_ast n :port_expression, *elements_to_ast end end def _nt_port_expression start_index = index if node_cache[:port_expression].has_key?(index) cached = node_cache[:port_expression][index] if cached node_cache[:port_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_port_reference if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(PortExpression2) r0.extend(PortExpression2) else i2, s2 = index, [] r3 = _nt_port_reference s2 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 if (match_len = has_terminal?(',', false, index)) r7 = true @index += match_len else terminal_parse_failure('\',\'') r7 = nil end s5 << r7 if r7 r8 = _nt_s s5 << r8 if r8 r9 = _nt_port_reference s5 << r9 if r9 r10 = _nt_s s5 << r10 end end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(PortExpression0) else @index = i5 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(SyntaxNode,input, i2...index, s2) r2.extend(PortExpression1) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(PortExpression2) r0.extend(PortExpression2) else @index = i0 r0 = nil end end node_cache[:port_expression][start_index] = r0 r0 end module PortReference0 def s1 elements[1] end def constant_range_expression elements[2] end def s2 elements[3] end end module PortReference1 def port_identifier elements[0] end def s elements[1] end end module PortReference2 def to_ast n :port_reference, *elements_to_ast end end def _nt_port_reference start_index = index if node_cache[:port_reference].has_key?(index) cached = node_cache[:port_reference][index] if cached node_cache[:port_reference][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_port_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 i4, s4 = index, [] if (match_len = has_terminal?("[", false, index)) r5 = true @index += match_len else terminal_parse_failure('"["') r5 = nil end s4 << r5 if r5 r6 = _nt_s s4 << r6 if r6 r7 = _nt_constant_range_expression s4 << r7 if r7 r8 = _nt_s s4 << r8 if r8 if (match_len = has_terminal?("]", false, index)) r9 = true @index += match_len else terminal_parse_failure('"]"') r9 = nil end s4 << r9 end end end end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(PortReference0) else @index = i4 r4 = nil end if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(PortReference1) r0.extend(PortReference2) else @index = i0 r0 = nil end node_cache[:port_reference][start_index] = r0 r0 end module PortDeclaration0 def s elements[0] end def attribute_instance elements[1] end end module PortDeclaration1 def s elements[1] end def inout_declaration elements[2] end end module PortDeclaration2 def s elements[0] end def attribute_instance elements[1] end end module PortDeclaration3 def s elements[1] end def input_declaration elements[2] end end module PortDeclaration4 def s elements[0] end def attribute_instance elements[1] end end module PortDeclaration5 def s elements[1] end def output_declaration elements[2] end end def _nt_port_declaration start_index = index if node_cache[:port_declaration].has_key?(index) cached = node_cache[:port_declaration][index] if cached node_cache[:port_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(PortDeclaration0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s1 << r2 if r2 r6 = _nt_s s1 << r6 if r6 r7 = _nt_inout_declaration s1 << r7 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(PortDeclaration1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i8, s8 = index, [] s9, i9 = [], index loop do i10, s10 = index, [] r11 = _nt_s s10 << r11 if r11 r12 = _nt_attribute_instance s10 << r12 end if s10.last r10 = instantiate_node(SyntaxNode,input, i10...index, s10) r10.extend(PortDeclaration2) else @index = i10 r10 = nil end if r10 s9 << r10 else break end end r9 = instantiate_node(SyntaxNode,input, i9...index, s9) s8 << r9 if r9 r13 = _nt_s s8 << r13 if r13 r14 = _nt_input_declaration s8 << r14 end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(PortDeclaration3) else @index = i8 r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else i15, s15 = index, [] s16, i16 = [], index loop do i17, s17 = index, [] r18 = _nt_s s17 << r18 if r18 r19 = _nt_attribute_instance s17 << r19 end if s17.last r17 = instantiate_node(SyntaxNode,input, i17...index, s17) r17.extend(PortDeclaration4) else @index = i17 r17 = nil end if r17 s16 << r17 else break end end r16 = instantiate_node(SyntaxNode,input, i16...index, s16) s15 << r16 if r16 r20 = _nt_s s15 << r20 if r20 r21 = _nt_output_declaration s15 << r21 end end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(PortDeclaration5) else @index = i15 r15 = nil end if r15 r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true r0 = r15 else @index = i0 r0 = nil end end end node_cache[:port_declaration][start_index] = r0 r0 end module ModuleItem0 def port_declaration elements[0] end def s elements[1] end end def _nt_module_item start_index = index if node_cache[:module_item].has_key?(index) cached = node_cache[:module_item][index] if cached node_cache[:module_item][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_port_declaration s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?(";", false, index)) r4 = true @index += match_len else terminal_parse_failure('";"') r4 = nil end s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ModuleItem0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r5 = _nt_non_port_module_item if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 else @index = i0 r0 = nil end end node_cache[:module_item][start_index] = r0 r0 end module ModuleOrGenerateItem0 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem1 def s elements[1] end def module_or_generate_item_declaration elements[2] end end module ModuleOrGenerateItem2 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem3 def s1 elements[1] end def local_parameter_declaration elements[2] end def s2 elements[3] end end module ModuleOrGenerateItem4 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem5 def s elements[1] end def parameter_override elements[2] end end module ModuleOrGenerateItem6 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem7 def s elements[1] end def continuous_assign elements[2] end end module ModuleOrGenerateItem8 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem9 def s elements[1] end def gate_instantiation elements[2] end end module ModuleOrGenerateItem10 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem11 def s elements[1] end def udp_instantiation elements[2] end end module ModuleOrGenerateItem12 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem13 def s elements[1] end def module_instantiation elements[2] end end module ModuleOrGenerateItem14 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem15 def s elements[1] end def initial_construct elements[2] end end module ModuleOrGenerateItem16 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem17 def s elements[1] end def always_construct elements[2] end end module ModuleOrGenerateItem18 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem19 def s elements[1] end def loop_generate_construct elements[2] end end module ModuleOrGenerateItem20 def s1 elements[0] end def attribute_instance elements[1] end def s2 elements[2] end end module ModuleOrGenerateItem21 def s elements[1] end def conditional_generate_construct elements[2] end end module ModuleOrGenerateItem22 def to_ast n :module_or_generate_item, *elements_to_ast end end def _nt_module_or_generate_item start_index = index if node_cache[:module_or_generate_item].has_key?(index) cached = node_cache[:module_or_generate_item][index] if cached node_cache[:module_or_generate_item][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 if r5 r6 = _nt_s s3 << r6 end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ModuleOrGenerateItem0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s1 << r2 if r2 r7 = _nt_s s1 << r7 if r7 r8 = _nt_module_or_generate_item_declaration s1 << r8 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ModuleOrGenerateItem1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else i9, s9 = index, [] s10, i10 = [], index loop do i11, s11 = index, [] r12 = _nt_s s11 << r12 if r12 r13 = _nt_attribute_instance s11 << r13 if r13 r14 = _nt_s s11 << r14 end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(ModuleOrGenerateItem2) else @index = i11 r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s9 << r10 if r10 r15 = _nt_s s9 << r15 if r15 r16 = _nt_local_parameter_declaration s9 << r16 if r16 r17 = _nt_s s9 << r17 if r17 if (match_len = has_terminal?(";", false, index)) r18 = true @index += match_len else terminal_parse_failure('";"') r18 = nil end s9 << r18 end end end end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(ModuleOrGenerateItem3) else @index = i9 r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else i19, s19 = index, [] s20, i20 = [], index loop do i21, s21 = index, [] r22 = _nt_s s21 << r22 if r22 r23 = _nt_attribute_instance s21 << r23 if r23 r24 = _nt_s s21 << r24 end end if s21.last r21 = instantiate_node(SyntaxNode,input, i21...index, s21) r21.extend(ModuleOrGenerateItem4) else @index = i21 r21 = nil end if r21 s20 << r21 else break end end r20 = instantiate_node(SyntaxNode,input, i20...index, s20) s19 << r20 if r20 r25 = _nt_s s19 << r25 if r25 r26 = _nt_parameter_override s19 << r26 end end if s19.last r19 = instantiate_node(SyntaxNode,input, i19...index, s19) r19.extend(ModuleOrGenerateItem5) else @index = i19 r19 = nil end if r19 r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true r0 = r19 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else i27, s27 = index, [] s28, i28 = [], index loop do i29, s29 = index, [] r30 = _nt_s s29 << r30 if r30 r31 = _nt_attribute_instance s29 << r31 if r31 r32 = _nt_s s29 << r32 end end if s29.last r29 = instantiate_node(SyntaxNode,input, i29...index, s29) r29.extend(ModuleOrGenerateItem6) else @index = i29 r29 = nil end if r29 s28 << r29 else break end end r28 = instantiate_node(SyntaxNode,input, i28...index, s28) s27 << r28 if r28 r33 = _nt_s s27 << r33 if r33 r34 = _nt_continuous_assign s27 << r34 end end if s27.last r27 = instantiate_node(SyntaxNode,input, i27...index, s27) r27.extend(ModuleOrGenerateItem7) else @index = i27 r27 = nil end if r27 r27 = SyntaxNode.new(input, (index-1)...index) if r27 == true r0 = r27 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else i35, s35 = index, [] s36, i36 = [], index loop do i37, s37 = index, [] r38 = _nt_s s37 << r38 if r38 r39 = _nt_attribute_instance s37 << r39 if r39 r40 = _nt_s s37 << r40 end end if s37.last r37 = instantiate_node(SyntaxNode,input, i37...index, s37) r37.extend(ModuleOrGenerateItem8) else @index = i37 r37 = nil end if r37 s36 << r37 else break end end r36 = instantiate_node(SyntaxNode,input, i36...index, s36) s35 << r36 if r36 r41 = _nt_s s35 << r41 if r41 r42 = _nt_gate_instantiation s35 << r42 end end if s35.last r35 = instantiate_node(SyntaxNode,input, i35...index, s35) r35.extend(ModuleOrGenerateItem9) else @index = i35 r35 = nil end if r35 r35 = SyntaxNode.new(input, (index-1)...index) if r35 == true r0 = r35 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else i43, s43 = index, [] s44, i44 = [], index loop do i45, s45 = index, [] r46 = _nt_s s45 << r46 if r46 r47 = _nt_attribute_instance s45 << r47 if r47 r48 = _nt_s s45 << r48 end end if s45.last r45 = instantiate_node(SyntaxNode,input, i45...index, s45) r45.extend(ModuleOrGenerateItem10) else @index = i45 r45 = nil end if r45 s44 << r45 else break end end r44 = instantiate_node(SyntaxNode,input, i44...index, s44) s43 << r44 if r44 r49 = _nt_s s43 << r49 if r49 r50 = _nt_udp_instantiation s43 << r50 end end if s43.last r43 = instantiate_node(SyntaxNode,input, i43...index, s43) r43.extend(ModuleOrGenerateItem11) else @index = i43 r43 = nil end if r43 r43 = SyntaxNode.new(input, (index-1)...index) if r43 == true r0 = r43 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else i51, s51 = index, [] s52, i52 = [], index loop do i53, s53 = index, [] r54 = _nt_s s53 << r54 if r54 r55 = _nt_attribute_instance s53 << r55 if r55 r56 = _nt_s s53 << r56 end end if s53.last r53 = instantiate_node(SyntaxNode,input, i53...index, s53) r53.extend(ModuleOrGenerateItem12) else @index = i53 r53 = nil end if r53 s52 << r53 else break end end r52 = instantiate_node(SyntaxNode,input, i52...index, s52) s51 << r52 if r52 r57 = _nt_s s51 << r57 if r57 r58 = _nt_module_instantiation s51 << r58 end end if s51.last r51 = instantiate_node(SyntaxNode,input, i51...index, s51) r51.extend(ModuleOrGenerateItem13) else @index = i51 r51 = nil end if r51 r51 = SyntaxNode.new(input, (index-1)...index) if r51 == true r0 = r51 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else i59, s59 = index, [] s60, i60 = [], index loop do i61, s61 = index, [] r62 = _nt_s s61 << r62 if r62 r63 = _nt_attribute_instance s61 << r63 if r63 r64 = _nt_s s61 << r64 end end if s61.last r61 = instantiate_node(SyntaxNode,input, i61...index, s61) r61.extend(ModuleOrGenerateItem14) else @index = i61 r61 = nil end if r61 s60 << r61 else break end end r60 = instantiate_node(SyntaxNode,input, i60...index, s60) s59 << r60 if r60 r65 = _nt_s s59 << r65 if r65 r66 = _nt_initial_construct s59 << r66 end end if s59.last r59 = instantiate_node(SyntaxNode,input, i59...index, s59) r59.extend(ModuleOrGenerateItem15) else @index = i59 r59 = nil end if r59 r59 = SyntaxNode.new(input, (index-1)...index) if r59 == true r0 = r59 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else i67, s67 = index, [] s68, i68 = [], index loop do i69, s69 = index, [] r70 = _nt_s s69 << r70 if r70 r71 = _nt_attribute_instance s69 << r71 if r71 r72 = _nt_s s69 << r72 end end if s69.last r69 = instantiate_node(SyntaxNode,input, i69...index, s69) r69.extend(ModuleOrGenerateItem16) else @index = i69 r69 = nil end if r69 s68 << r69 else break end end r68 = instantiate_node(SyntaxNode,input, i68...index, s68) s67 << r68 if r68 r73 = _nt_s s67 << r73 if r73 r74 = _nt_always_construct s67 << r74 end end if s67.last r67 = instantiate_node(SyntaxNode,input, i67...index, s67) r67.extend(ModuleOrGenerateItem17) else @index = i67 r67 = nil end if r67 r67 = SyntaxNode.new(input, (index-1)...index) if r67 == true r0 = r67 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else i75, s75 = index, [] s76, i76 = [], index loop do i77, s77 = index, [] r78 = _nt_s s77 << r78 if r78 r79 = _nt_attribute_instance s77 << r79 if r79 r80 = _nt_s s77 << r80 end end if s77.last r77 = instantiate_node(SyntaxNode,input, i77...index, s77) r77.extend(ModuleOrGenerateItem18) else @index = i77 r77 = nil end if r77 s76 << r77 else break end end r76 = instantiate_node(SyntaxNode,input, i76...index, s76) s75 << r76 if r76 r81 = _nt_s s75 << r81 if r81 r82 = _nt_loop_generate_construct s75 << r82 end end if s75.last r75 = instantiate_node(SyntaxNode,input, i75...index, s75) r75.extend(ModuleOrGenerateItem19) else @index = i75 r75 = nil end if r75 r75 = SyntaxNode.new(input, (index-1)...index) if r75 == true r0 = r75 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else i83, s83 = index, [] s84, i84 = [], index loop do i85, s85 = index, [] r86 = _nt_s s85 << r86 if r86 r87 = _nt_attribute_instance s85 << r87 if r87 r88 = _nt_s s85 << r88 end end if s85.last r85 = instantiate_node(SyntaxNode,input, i85...index, s85) r85.extend(ModuleOrGenerateItem20) else @index = i85 r85 = nil end if r85 s84 << r85 else break end end r84 = instantiate_node(SyntaxNode,input, i84...index, s84) s83 << r84 if r84 r89 = _nt_s s83 << r89 if r89 r90 = _nt_conditional_generate_construct s83 << r90 end end if s83.last r83 = instantiate_node(SyntaxNode,input, i83...index, s83) r83.extend(ModuleOrGenerateItem21) else @index = i83 r83 = nil end if r83 r83 = SyntaxNode.new(input, (index-1)...index) if r83 == true r0 = r83 r0.extend(ModuleOrGenerateItem22) r0.extend(ModuleOrGenerateItem22) else @index = i0 r0 = nil end end end end end end end end end end end node_cache[:module_or_generate_item][start_index] = r0 r0 end def _nt_module_or_generate_item_declaration start_index = index if node_cache[:module_or_generate_item_declaration].has_key?(index) cached = node_cache[:module_or_generate_item_declaration][index] if cached node_cache[:module_or_generate_item_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_net_declaration if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_reg_declaration if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else r3 = _nt_integer_declaration if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else r4 = _nt_real_declaration if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 else r5 = _nt_time_declaration if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 else r6 = _nt_realtime_declaration if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 else r7 = _nt_event_declaration if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 else r8 = _nt_genvar_declaration if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else r9 = _nt_task_declaration if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 else r10 = _nt_function_declaration if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 else @index = i0 r0 = nil end end end end end end end end end end node_cache[:module_or_generate_item_declaration][start_index] = r0 r0 end module NonPortModuleItem0 def s elements[0] end def attribute_instance elements[1] end end module NonPortModuleItem1 def s1 elements[1] end def parameter_declaration elements[2] end def s2 elements[3] end end module NonPortModuleItem2 def s elements[0] end def attribute_instance elements[1] end end module NonPortModuleItem3 def s elements[1] end def specparam_declaration elements[2] end end module NonPortModuleItem4 def to_ast n :non_port_module_item, *elements_to_ast end end def _nt_non_port_module_item start_index = index if node_cache[:non_port_module_item].has_key?(index) cached = node_cache[:non_port_module_item][index] if cached node_cache[:non_port_module_item][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_module_or_generate_item if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(NonPortModuleItem4) r0.extend(NonPortModuleItem4) else r2 = _nt_generate_region if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(NonPortModuleItem4) r0.extend(NonPortModuleItem4) else r3 = _nt_specify_block if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(NonPortModuleItem4) r0.extend(NonPortModuleItem4) else i4, s4 = index, [] s5, i5 = [], index loop do i6, s6 = index, [] r7 = _nt_s s6 << r7 if r7 r8 = _nt_attribute_instance s6 << r8 end if s6.last r6 = instantiate_node(SyntaxNode,input, i6...index, s6) r6.extend(NonPortModuleItem0) else @index = i6 r6 = nil end if r6 s5 << r6 else break end end r5 = instantiate_node(SyntaxNode,input, i5...index, s5) s4 << r5 if r5 r9 = _nt_s s4 << r9 if r9 r10 = _nt_parameter_declaration s4 << r10 if r10 r11 = _nt_s s4 << r11 if r11 if (match_len = has_terminal?(";", false, index)) r12 = true @index += match_len else terminal_parse_failure('";"') r12 = nil end s4 << r12 end end end end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(NonPortModuleItem1) else @index = i4 r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(NonPortModuleItem4) r0.extend(NonPortModuleItem4) else i13, s13 = index, [] s14, i14 = [], index loop do i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 r17 = _nt_attribute_instance s15 << r17 end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(NonPortModuleItem2) else @index = i15 r15 = nil end if r15 s14 << r15 else break end end r14 = instantiate_node(SyntaxNode,input, i14...index, s14) s13 << r14 if r14 r18 = _nt_s s13 << r18 if r18 r19 = _nt_specparam_declaration s13 << r19 end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(NonPortModuleItem3) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(NonPortModuleItem4) r0.extend(NonPortModuleItem4) else @index = i0 r0 = nil end end end end end node_cache[:non_port_module_item][start_index] = r0 r0 end module ParameterOverride0 def s1 elements[1] end def list_of_defparam_assignments elements[2] end def s2 elements[3] end end module ParameterOverride1 def to_ast n :parameter_override, *elements_to_ast end end def _nt_parameter_override start_index = index if node_cache[:parameter_override].has_key?(index) cached = node_cache[:parameter_override][index] if cached node_cache[:parameter_override][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("defparam", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"defparam"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_list_of_defparam_assignments s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?(";", false, index)) r5 = true @index += match_len else terminal_parse_failure('";"') r5 = nil end s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ParameterOverride0) r0.extend(ParameterOverride1) else @index = i0 r0 = nil end node_cache[:parameter_override][start_index] = r0 r0 end module ConfigDeclaration0 def s elements[0] end def config_rule_statement elements[1] end end module ConfigDeclaration1 def config_identifier elements[1] end def s1 elements[2] end def s2 elements[4] end def design_statement elements[5] end def s3 elements[7] end end module ConfigDeclaration2 def to_ast n :config_declaration, *elements_to_ast end end def _nt_config_declaration start_index = index if node_cache[:config_declaration].has_key?(index) cached = node_cache[:config_declaration][index] if cached node_cache[:config_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("config", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"config"') r1 = nil end s0 << r1 if r1 r2 = _nt_config_identifier s0 << r2 if r2 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?(";", false, index)) r4 = true @index += match_len else terminal_parse_failure('";"') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r6 = _nt_design_statement s0 << r6 if r6 s7, i7 = [], index loop do i8, s8 = index, [] r9 = _nt_s s8 << r9 if r9 r10 = _nt_config_rule_statement s8 << r10 end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(ConfigDeclaration0) else @index = i8 r8 = nil end if r8 s7 << r8 else break end end r7 = instantiate_node(SyntaxNode,input, i7...index, s7) s0 << r7 if r7 r11 = _nt_s s0 << r11 if r11 if (match_len = has_terminal?("endconfig", false, index)) r12 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endconfig"') r12 = nil end s0 << r12 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ConfigDeclaration1) r0.extend(ConfigDeclaration2) else @index = i0 r0 = nil end node_cache[:config_declaration][start_index] = r0 r0 end module DesignStatement0 def library_identifier elements[0] end end module DesignStatement1 def s elements[0] end def cell_identifier elements[2] end end module DesignStatement2 def s elements[2] end end module DesignStatement3 def to_ast n :design_statement, *elements_to_ast end end def _nt_design_statement start_index = index if node_cache[:design_statement].has_key?(index) cached = node_cache[:design_statement][index] if cached node_cache[:design_statement][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("design", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"design"') r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 i6, s6 = index, [] r7 = _nt_library_identifier s6 << r7 if r7 if (match_len = has_terminal?(".", false, index)) r8 = true @index += match_len else terminal_parse_failure('"."') r8 = nil end s6 << r8 end if s6.last r6 = instantiate_node(SyntaxNode,input, i6...index, s6) r6.extend(DesignStatement0) else @index = i6 r6 = nil end if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s3 << r5 if r5 r9 = _nt_cell_identifier s3 << r9 end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(DesignStatement1) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(";", false, index)) r11 = true @index += match_len else terminal_parse_failure('";"') r11 = nil end s0 << r11 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(DesignStatement2) r0.extend(DesignStatement3) else @index = i0 r0 = nil end node_cache[:design_statement][start_index] = r0 r0 end module ConfigRuleStatement0 def default_clause elements[0] end def S elements[1] end def liblist_clause elements[2] end def s elements[3] end end module ConfigRuleStatement1 def inst_clause elements[0] end def S elements[1] end def liblist_clause elements[2] end def s elements[3] end end module ConfigRuleStatement2 def inst_clause elements[0] end def S elements[1] end def use_clause elements[2] end def s elements[3] end end module ConfigRuleStatement3 def cell_clause elements[0] end def S elements[1] end def liblist_clause elements[2] end def s elements[3] end end module ConfigRuleStatement4 def cell_clause elements[0] end def S elements[1] end def use_clause elements[2] end def s elements[3] end end module ConfigRuleStatement5 def to_ast n :config_rule_statement, *elements_to_ast end end def _nt_config_rule_statement start_index = index if node_cache[:config_rule_statement].has_key?(index) cached = node_cache[:config_rule_statement][index] if cached node_cache[:config_rule_statement][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_default_clause s1 << r2 if r2 r3 = _nt_S s1 << r3 if r3 r4 = _nt_liblist_clause s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 if (match_len = has_terminal?(";", false, index)) r6 = true @index += match_len else terminal_parse_failure('";"') r6 = nil end s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ConfigRuleStatement0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ConfigRuleStatement5) r0.extend(ConfigRuleStatement5) else i7, s7 = index, [] r8 = _nt_inst_clause s7 << r8 if r8 r9 = _nt_S s7 << r9 if r9 r10 = _nt_liblist_clause s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 if (match_len = has_terminal?(";", false, index)) r12 = true @index += match_len else terminal_parse_failure('";"') r12 = nil end s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(ConfigRuleStatement1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(ConfigRuleStatement5) r0.extend(ConfigRuleStatement5) else i13, s13 = index, [] r14 = _nt_inst_clause s13 << r14 if r14 r15 = _nt_S s13 << r15 if r15 r16 = _nt_use_clause s13 << r16 if r16 r17 = _nt_s s13 << r17 if r17 if (match_len = has_terminal?(";", false, index)) r18 = true @index += match_len else terminal_parse_failure('";"') r18 = nil end s13 << r18 end end end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(ConfigRuleStatement2) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(ConfigRuleStatement5) r0.extend(ConfigRuleStatement5) else i19, s19 = index, [] r20 = _nt_cell_clause s19 << r20 if r20 r21 = _nt_S s19 << r21 if r21 r22 = _nt_liblist_clause s19 << r22 if r22 r23 = _nt_s s19 << r23 if r23 if (match_len = has_terminal?(";", false, index)) r24 = true @index += match_len else terminal_parse_failure('";"') r24 = nil end s19 << r24 end end end end if s19.last r19 = instantiate_node(SyntaxNode,input, i19...index, s19) r19.extend(ConfigRuleStatement3) else @index = i19 r19 = nil end if r19 r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true r0 = r19 r0.extend(ConfigRuleStatement5) r0.extend(ConfigRuleStatement5) else i25, s25 = index, [] r26 = _nt_cell_clause s25 << r26 if r26 r27 = _nt_S s25 << r27 if r27 r28 = _nt_use_clause s25 << r28 if r28 r29 = _nt_s s25 << r29 if r29 if (match_len = has_terminal?(";", false, index)) r30 = true @index += match_len else terminal_parse_failure('";"') r30 = nil end s25 << r30 end end end end if s25.last r25 = instantiate_node(SyntaxNode,input, i25...index, s25) r25.extend(ConfigRuleStatement4) else @index = i25 r25 = nil end if r25 r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true r0 = r25 r0.extend(ConfigRuleStatement5) r0.extend(ConfigRuleStatement5) else @index = i0 r0 = nil end end end end end node_cache[:config_rule_statement][start_index] = r0 r0 end module DefaultClause0 def to_ast n :default_clause, *elements_to_ast end end def _nt_default_clause start_index = index if node_cache[:default_clause].has_key?(index) cached = node_cache[:default_clause][index] if cached node_cache[:default_clause][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_default r0.extend(DefaultClause0) r0.extend(DefaultClause0) node_cache[:default_clause][start_index] = r0 r0 end module InstClause0 def S elements[1] end def inst_name elements[2] end end module InstClause1 def to_ast n :inst_clause, *elements_to_ast end end def _nt_inst_clause start_index = index if node_cache[:inst_clause].has_key?(index) cached = node_cache[:inst_clause][index] if cached node_cache[:inst_clause][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("instance", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"instance"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 r3 = _nt_inst_name s0 << r3 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(InstClause0) r0.extend(InstClause1) else @index = i0 r0 = nil end node_cache[:inst_clause][start_index] = r0 r0 end module InstName0 def instance_identifier elements[1] end end module InstName1 def topmodule_identifier elements[0] end end module InstName2 def to_ast n :inst_name, *elements_to_ast end end def _nt_inst_name start_index = index if node_cache[:inst_name].has_key?(index) cached = node_cache[:inst_name][index] if cached node_cache[:inst_name][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_topmodule_identifier s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] if (match_len = has_terminal?(".", false, index)) r4 = true @index += match_len else terminal_parse_failure('"."') r4 = nil end s3 << r4 if r4 r5 = _nt_instance_identifier s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(InstName0) else @index = i3 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(InstName1) r0.extend(InstName2) else @index = i0 r0 = nil end node_cache[:inst_name][start_index] = r0 r0 end module CellClause0 def library_identifier elements[0] end end module CellClause1 def S elements[1] end def cell_identifier elements[3] end end module CellClause2 def to_ast n :cell_clause, *elements_to_ast end end def _nt_cell_clause start_index = index if node_cache[:cell_clause].has_key?(index) cached = node_cache[:cell_clause][index] if cached node_cache[:cell_clause][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("cell", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"cell"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 i4, s4 = index, [] r5 = _nt_library_identifier s4 << r5 if r5 if (match_len = has_terminal?(".", false, index)) r6 = true @index += match_len else terminal_parse_failure('"."') r6 = nil end s4 << r6 end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(CellClause0) else @index = i4 r4 = nil end if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r7 = _nt_cell_identifier s0 << r7 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(CellClause1) r0.extend(CellClause2) else @index = i0 r0 = nil end node_cache[:cell_clause][start_index] = r0 r0 end module LiblistClause0 def s elements[0] end def library_identifier elements[1] end end module LiblistClause1 end module LiblistClause2 def to_ast n :liblist_clause, *elements_to_ast end end def _nt_liblist_clause start_index = index if node_cache[:liblist_clause].has_key?(index) cached = node_cache[:liblist_clause][index] if cached node_cache[:liblist_clause][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("liblist", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"liblist"') r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_library_identifier s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(LiblistClause0) else @index = i3 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(LiblistClause1) r0.extend(LiblistClause2) else @index = i0 r0 = nil end node_cache[:liblist_clause][start_index] = r0 r0 end module UseClause0 def library_identifier elements[0] end end module UseClause1 def S elements[1] end def cell_identifier elements[3] end end module UseClause2 def to_ast n :use_clause, *elements_to_ast end end def _nt_use_clause start_index = index if node_cache[:use_clause].has_key?(index) cached = node_cache[:use_clause][index] if cached node_cache[:use_clause][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("use", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"use"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 i4, s4 = index, [] r5 = _nt_library_identifier s4 << r5 if r5 if (match_len = has_terminal?(".", false, index)) r6 = true @index += match_len else terminal_parse_failure('"."') r6 = nil end s4 << r6 end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(UseClause0) else @index = i4 r4 = nil end if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r7 = _nt_cell_identifier s0 << r7 if r7 if (match_len = has_terminal?(":config", false, index)) r9 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('":config"') r9 = nil end if r9 r8 = r9 else r8 = instantiate_node(SyntaxNode,input, index...index) end s0 << r8 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(UseClause1) r0.extend(UseClause2) else @index = i0 r0 = nil end node_cache[:use_clause][start_index] = r0 r0 end module LocalParameterDeclaration0 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def list_of_param_assignments elements[6] end end module LocalParameterDeclaration1 def s1 elements[1] end def parameter_type elements[2] end def s2 elements[3] end def list_of_param_assignments elements[4] end end module LocalParameterDeclaration2 def to_ast n :local_parameter_declaration, *elements_to_ast end end def _nt_local_parameter_declaration start_index = index if node_cache[:local_parameter_declaration].has_key?(index) cached = node_cache[:local_parameter_declaration][index] if cached node_cache[:local_parameter_declaration][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?("localparam", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"localparam"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r5 = _nt_signed if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 r6 = _nt_s s1 << r6 if r6 r8 = _nt_range if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s1 << r7 if r7 r9 = _nt_s s1 << r9 if r9 r10 = _nt_list_of_param_assignments s1 << r10 end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(LocalParameterDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(LocalParameterDeclaration2) r0.extend(LocalParameterDeclaration2) else i11, s11 = index, [] if (match_len = has_terminal?("localparam", false, index)) r12 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"localparam"') r12 = nil end s11 << r12 if r12 r13 = _nt_s s11 << r13 if r13 r14 = _nt_parameter_type s11 << r14 if r14 r15 = _nt_s s11 << r15 if r15 r16 = _nt_list_of_param_assignments s11 << r16 end end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(LocalParameterDeclaration1) else @index = i11 r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(LocalParameterDeclaration2) r0.extend(LocalParameterDeclaration2) else @index = i0 r0 = nil end end node_cache[:local_parameter_declaration][start_index] = r0 r0 end module ParameterDeclaration0 def s1 elements[1] end def parameter_type elements[2] end def s2 elements[3] end def list_of_param_assignments elements[4] end end module ParameterDeclaration1 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def list_of_param_assignments elements[6] end end module ParameterDeclaration2 def to_ast n :parameter_declaration, *elements_to_ast end end def _nt_parameter_declaration start_index = index if node_cache[:parameter_declaration].has_key?(index) cached = node_cache[:parameter_declaration][index] if cached node_cache[:parameter_declaration][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?("parameter", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"parameter"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r4 = _nt_parameter_type s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_list_of_param_assignments s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ParameterDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ParameterDeclaration2) r0.extend(ParameterDeclaration2) else i7, s7 = index, [] if (match_len = has_terminal?("parameter", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"parameter"') r8 = nil end s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 r11 = _nt_signed if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s7 << r10 if r10 r12 = _nt_s s7 << r12 if r12 r14 = _nt_range if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s7 << r13 if r13 r15 = _nt_s s7 << r15 if r15 r16 = _nt_list_of_param_assignments s7 << r16 end end end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(ParameterDeclaration1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(ParameterDeclaration2) r0.extend(ParameterDeclaration2) else @index = i0 r0 = nil end end node_cache[:parameter_declaration][start_index] = r0 r0 end module SpecparamDeclaration0 def s1 elements[1] end def s2 elements[3] end def list_of_specparam_assignments elements[4] end def s3 elements[5] end end module SpecparamDeclaration1 def to_ast n :specparam_declaration, *elements_to_ast end end def _nt_specparam_declaration start_index = index if node_cache[:specparam_declaration].has_key?(index) cached = node_cache[:specparam_declaration][index] if cached node_cache[:specparam_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("specparam", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"specparam"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_range if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r5 = _nt_s s0 << r5 if r5 r6 = _nt_list_of_specparam_assignments s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(";", false, index)) r8 = true @index += match_len else terminal_parse_failure('";"') r8 = nil end s0 << r8 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SpecparamDeclaration0) r0.extend(SpecparamDeclaration1) else @index = i0 r0 = nil end node_cache[:specparam_declaration][start_index] = r0 r0 end module ParameterType0 def to_ast n :parameter_type, text_value end end def _nt_parameter_type start_index = index if node_cache[:parameter_type].has_key?(index) cached = node_cache[:parameter_type][index] if cached node_cache[:parameter_type][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?("integer", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"integer"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ParameterType0) r0.extend(ParameterType0) else if (match_len = has_terminal?("real", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"real"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(ParameterType0) r0.extend(ParameterType0) else if (match_len = has_terminal?("realtime", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"realtime"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(ParameterType0) r0.extend(ParameterType0) else if (match_len = has_terminal?("time", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"time"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(ParameterType0) r0.extend(ParameterType0) else @index = i0 r0 = nil end end end end node_cache[:parameter_type][start_index] = r0 r0 end module Signed0 def to_ast n(:signed) end end def _nt_signed start_index = index if node_cache[:signed].has_key?(index) cached = node_cache[:signed][index] if cached node_cache[:signed][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?("signed", false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) r0.extend(Signed0) @index += match_len else terminal_parse_failure('"signed"') r0 = nil end node_cache[:signed][start_index] = r0 r0 end module Reg0 def to_ast n(:reg) end end def _nt_reg start_index = index if node_cache[:reg].has_key?(index) cached = node_cache[:reg][index] if cached node_cache[:reg][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?("reg", false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) r0.extend(Reg0) @index += match_len else terminal_parse_failure('"reg"') r0 = nil end node_cache[:reg][start_index] = r0 r0 end module Time0 def to_ast n(:time) end end def _nt_time start_index = index if node_cache[:time].has_key?(index) cached = node_cache[:time][index] if cached node_cache[:time][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?("time", false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) r0.extend(Time0) @index += match_len else terminal_parse_failure('"time"') r0 = nil end node_cache[:time][start_index] = r0 r0 end module Integer0 def to_ast n(:integer) end 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 if (match_len = has_terminal?("integer", false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) r0.extend(Integer0) @index += match_len else terminal_parse_failure('"integer"') r0 = nil end node_cache[:integer][start_index] = r0 r0 end module Real0 def to_ast n(:real) end end def _nt_real start_index = index if node_cache[:real].has_key?(index) cached = node_cache[:real][index] if cached node_cache[:real][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?("real", false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) r0.extend(Real0) @index += match_len else terminal_parse_failure('"real"') r0 = nil end node_cache[:real][start_index] = r0 r0 end module Realtime0 def to_ast n(:realtime) end end def _nt_realtime start_index = index if node_cache[:realtime].has_key?(index) cached = node_cache[:realtime][index] if cached node_cache[:realtime][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?("realtime", false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) r0.extend(Realtime0) @index += match_len else terminal_parse_failure('"realtime"') r0 = nil end node_cache[:realtime][start_index] = r0 r0 end module InoutDeclaration0 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def list_of_port_identifiers elements[8] end end module InoutDeclaration1 def to_ast n :inout_declaration, *elements_to_ast end end def _nt_inout_declaration start_index = index if node_cache[:inout_declaration].has_key?(index) cached = node_cache[:inout_declaration][index] if cached node_cache[:inout_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("inout", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"inout"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_net_type if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r5 = _nt_s s0 << r5 if r5 r7 = _nt_signed if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s0 << r6 if r6 r8 = _nt_s s0 << r8 if r8 r10 = _nt_range if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s0 << r9 if r9 r11 = _nt_s s0 << r11 if r11 r12 = _nt_list_of_port_identifiers s0 << r12 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(InoutDeclaration0) r0.extend(InoutDeclaration1) else @index = i0 r0 = nil end node_cache[:inout_declaration][start_index] = r0 r0 end module InputDeclaration0 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def list_of_port_identifiers elements[8] end end module InputDeclaration1 def to_ast n :input_declaration, *elements_to_ast end end def _nt_input_declaration start_index = index if node_cache[:input_declaration].has_key?(index) cached = node_cache[:input_declaration][index] if cached node_cache[:input_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("input", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"input"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_net_type if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r5 = _nt_s s0 << r5 if r5 r7 = _nt_signed if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s0 << r6 if r6 r8 = _nt_s s0 << r8 if r8 r10 = _nt_range if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s0 << r9 if r9 r11 = _nt_s s0 << r11 if r11 r12 = _nt_list_of_port_identifiers s0 << r12 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(InputDeclaration0) r0.extend(InputDeclaration1) else @index = i0 r0 = nil end node_cache[:input_declaration][start_index] = r0 r0 end module OutputDeclaration0 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def list_of_variable_port_identifiers elements[6] end end module OutputDeclaration1 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def list_of_port_identifiers elements[8] end end module OutputDeclaration2 def s1 elements[1] end def output_variable_type elements[2] end def s2 elements[3] end def list_of_variable_port_identifiers elements[4] end end module OutputDeclaration3 def to_ast n :output_declaration, *elements_to_ast end end def _nt_output_declaration start_index = index if node_cache[:output_declaration].has_key?(index) cached = node_cache[:output_declaration][index] if cached node_cache[:output_declaration][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?("output reg", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"output reg"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r5 = _nt_signed if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 r6 = _nt_s s1 << r6 if r6 r8 = _nt_range if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s1 << r7 if r7 r9 = _nt_s s1 << r9 if r9 r10 = _nt_list_of_variable_port_identifiers s1 << r10 end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(OutputDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(OutputDeclaration3) r0.extend(OutputDeclaration3) else i11, s11 = index, [] if (match_len = has_terminal?("output", false, index)) r12 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"output"') r12 = nil end s11 << r12 if r12 r13 = _nt_s s11 << r13 if r13 r15 = _nt_net_type if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s11 << r14 if r14 r16 = _nt_s s11 << r16 if r16 r18 = _nt_signed if r18 r17 = r18 else r17 = instantiate_node(SyntaxNode,input, index...index) end s11 << r17 if r17 r19 = _nt_s s11 << r19 if r19 r21 = _nt_range if r21 r20 = r21 else r20 = instantiate_node(SyntaxNode,input, index...index) end s11 << r20 if r20 r22 = _nt_s s11 << r22 if r22 r23 = _nt_list_of_port_identifiers s11 << r23 end end end end end end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(OutputDeclaration1) else @index = i11 r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(OutputDeclaration3) r0.extend(OutputDeclaration3) else i24, s24 = index, [] if (match_len = has_terminal?("output", false, index)) r25 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"output"') r25 = nil end s24 << r25 if r25 r26 = _nt_s s24 << r26 if r26 r27 = _nt_output_variable_type s24 << r27 if r27 r28 = _nt_s s24 << r28 if r28 r29 = _nt_list_of_variable_port_identifiers s24 << r29 end end end end if s24.last r24 = instantiate_node(SyntaxNode,input, i24...index, s24) r24.extend(OutputDeclaration2) else @index = i24 r24 = nil end if r24 r24 = SyntaxNode.new(input, (index-1)...index) if r24 == true r0 = r24 r0.extend(OutputDeclaration3) r0.extend(OutputDeclaration3) else @index = i0 r0 = nil end end end node_cache[:output_declaration][start_index] = r0 r0 end module EventDeclaration0 def S elements[1] end def list_of_event_identifiers elements[2] end def s elements[3] end end module EventDeclaration1 def to_ast n :event_declaration, *elements_to_ast end end def _nt_event_declaration start_index = index if node_cache[:event_declaration].has_key?(index) cached = node_cache[:event_declaration][index] if cached node_cache[:event_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("event", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"event"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 r3 = _nt_list_of_event_identifiers s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?(";", false, index)) r5 = true @index += match_len else terminal_parse_failure('";"') r5 = nil end s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(EventDeclaration0) r0.extend(EventDeclaration1) else @index = i0 r0 = nil end node_cache[:event_declaration][start_index] = r0 r0 end module IntegerDeclaration0 def S elements[1] end def list_of_variable_identifiers elements[2] end def s elements[3] end end module IntegerDeclaration1 def to_ast n :integer_declaration, *elements_to_ast end end def _nt_integer_declaration start_index = index if node_cache[:integer_declaration].has_key?(index) cached = node_cache[:integer_declaration][index] if cached node_cache[:integer_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("integer", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"integer"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 r3 = _nt_list_of_variable_identifiers s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?(";", false, index)) r5 = true @index += match_len else terminal_parse_failure('";"') r5 = nil end s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(IntegerDeclaration0) r0.extend(IntegerDeclaration1) else @index = i0 r0 = nil end node_cache[:integer_declaration][start_index] = r0 r0 end module NetDeclaration0 def net_type elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def list_of_net_identifiers elements[6] end def s4 elements[7] end end module NetDeclaration1 def net_type elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[6] end def list_of_net_decl_assignments elements[7] end def s4 elements[8] end end module NetDeclaration2 def net_type elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def range elements[6] end def s4 elements[7] end def s5 elements[9] end def list_of_net_identifiers elements[10] end def s6 elements[11] end end module NetDeclaration3 def net_type elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def range elements[8] end def s5 elements[9] end def list_of_net_decl_assignments elements[11] end def s6 elements[12] end end module NetDeclaration4 def trireg elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def list_of_net_identifiers elements[7] end def s4 elements[8] end end module NetDeclaration5 def trireg elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def list_of_net_decl_assignments elements[7] end def s4 elements[8] end end module NetDeclaration6 def trireg elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def range elements[8] end def s5 elements[9] end def s6 elements[11] end def list_of_net_identifiers elements[12] end def s7 elements[13] end end module NetDeclaration7 def trireg elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def range elements[8] end def s5 elements[9] end def s6 elements[11] end def list_of_net_decl_assignments elements[12] end def s7 elements[13] end end module NetDeclaration8 def to_ast n :net_declaration, *elements_to_ast end end def _nt_net_declaration start_index = index if node_cache[:net_declaration].has_key?(index) cached = node_cache[:net_declaration][index] if cached node_cache[:net_declaration][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_net_type s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r5 = _nt_signed if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 r6 = _nt_s s1 << r6 if r6 r8 = _nt_delay3 if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s1 << r7 if r7 r9 = _nt_s s1 << r9 if r9 r10 = _nt_list_of_net_identifiers s1 << r10 if r10 r11 = _nt_s s1 << r11 if r11 if (match_len = has_terminal?(";", false, index)) r12 = true @index += match_len else terminal_parse_failure('";"') r12 = nil end s1 << r12 end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(NetDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(NetDeclaration8) r0.extend(NetDeclaration8) else i13, s13 = index, [] r14 = _nt_net_type s13 << r14 if r14 r15 = _nt_s s13 << r15 if r15 r17 = _nt_drive_strength if r17 r16 = r17 else r16 = instantiate_node(SyntaxNode,input, index...index) end s13 << r16 if r16 r18 = _nt_s s13 << r18 if r18 r20 = _nt_signed if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s13 << r19 if r19 r22 = _nt_delay3 if r22 r21 = r22 else r21 = instantiate_node(SyntaxNode,input, index...index) end s13 << r21 if r21 r23 = _nt_s s13 << r23 if r23 r24 = _nt_list_of_net_decl_assignments s13 << r24 if r24 r25 = _nt_s s13 << r25 if r25 if (match_len = has_terminal?(";", false, index)) r26 = true @index += match_len else terminal_parse_failure('";"') r26 = nil end s13 << r26 end end end end end end end end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(NetDeclaration1) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(NetDeclaration8) r0.extend(NetDeclaration8) else i27, s27 = index, [] r28 = _nt_net_type s27 << r28 if r28 r29 = _nt_s s27 << r29 if r29 i31 = index if (match_len = has_terminal?("vectored", false, index)) r32 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"vectored"') r32 = nil end if r32 r32 = SyntaxNode.new(input, (index-1)...index) if r32 == true r31 = r32 else if (match_len = has_terminal?("scalared", false, index)) r33 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"scalared"') r33 = nil end if r33 r33 = SyntaxNode.new(input, (index-1)...index) if r33 == true r31 = r33 else @index = i31 r31 = nil end end if r31 r30 = r31 else r30 = instantiate_node(SyntaxNode,input, index...index) end s27 << r30 if r30 r34 = _nt_s s27 << r34 if r34 r36 = _nt_signed if r36 r35 = r36 else r35 = instantiate_node(SyntaxNode,input, index...index) end s27 << r35 if r35 r37 = _nt_s s27 << r37 if r37 r38 = _nt_range s27 << r38 if r38 r39 = _nt_s s27 << r39 if r39 r41 = _nt_delay3 if r41 r40 = r41 else r40 = instantiate_node(SyntaxNode,input, index...index) end s27 << r40 if r40 r42 = _nt_s s27 << r42 if r42 r43 = _nt_list_of_net_identifiers s27 << r43 if r43 r44 = _nt_s s27 << r44 if r44 if (match_len = has_terminal?(";", false, index)) r45 = true @index += match_len else terminal_parse_failure('";"') r45 = nil end s27 << r45 end end end end end end end end end end end end if s27.last r27 = instantiate_node(SyntaxNode,input, i27...index, s27) r27.extend(NetDeclaration2) else @index = i27 r27 = nil end if r27 r27 = SyntaxNode.new(input, (index-1)...index) if r27 == true r0 = r27 r0.extend(NetDeclaration8) r0.extend(NetDeclaration8) else i46, s46 = index, [] r47 = _nt_net_type s46 << r47 if r47 r48 = _nt_s s46 << r48 if r48 r50 = _nt_drive_strength if r50 r49 = r50 else r49 = instantiate_node(SyntaxNode,input, index...index) end s46 << r49 if r49 r51 = _nt_s s46 << r51 if r51 i53 = index if (match_len = has_terminal?("vectored", false, index)) r54 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"vectored"') r54 = nil end if r54 r54 = SyntaxNode.new(input, (index-1)...index) if r54 == true r53 = r54 else if (match_len = has_terminal?("scalared", false, index)) r55 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"scalared"') r55 = nil end if r55 r55 = SyntaxNode.new(input, (index-1)...index) if r55 == true r53 = r55 else @index = i53 r53 = nil end end if r53 r52 = r53 else r52 = instantiate_node(SyntaxNode,input, index...index) end s46 << r52 if r52 r56 = _nt_s s46 << r56 if r56 r58 = _nt_signed if r58 r57 = r58 else r57 = instantiate_node(SyntaxNode,input, index...index) end s46 << r57 if r57 r59 = _nt_s s46 << r59 if r59 r60 = _nt_range s46 << r60 if r60 r61 = _nt_s s46 << r61 if r61 r63 = _nt_delay3 if r63 r62 = r63 else r62 = instantiate_node(SyntaxNode,input, index...index) end s46 << r62 if r62 r64 = _nt_list_of_net_decl_assignments s46 << r64 if r64 r65 = _nt_s s46 << r65 if r65 if (match_len = has_terminal?(";", false, index)) r66 = true @index += match_len else terminal_parse_failure('";"') r66 = nil end s46 << r66 end end end end end end end end end end end end end if s46.last r46 = instantiate_node(SyntaxNode,input, i46...index, s46) r46.extend(NetDeclaration3) else @index = i46 r46 = nil end if r46 r46 = SyntaxNode.new(input, (index-1)...index) if r46 == true r0 = r46 r0.extend(NetDeclaration8) r0.extend(NetDeclaration8) else i67, s67 = index, [] r68 = _nt_trireg s67 << r68 if r68 r69 = _nt_s s67 << r69 if r69 r71 = _nt_charge_strength if r71 r70 = r71 else r70 = instantiate_node(SyntaxNode,input, index...index) end s67 << r70 if r70 r72 = _nt_s s67 << r72 if r72 r74 = _nt_signed if r74 r73 = r74 else r73 = instantiate_node(SyntaxNode,input, index...index) end s67 << r73 if r73 r75 = _nt_s s67 << r75 if r75 r77 = _nt_delay3 if r77 r76 = r77 else r76 = instantiate_node(SyntaxNode,input, index...index) end s67 << r76 if r76 r78 = _nt_list_of_net_identifiers s67 << r78 if r78 r79 = _nt_s s67 << r79 if r79 if (match_len = has_terminal?(";", false, index)) r80 = true @index += match_len else terminal_parse_failure('";"') r80 = nil end s67 << r80 end end end end end end end end end if s67.last r67 = instantiate_node(SyntaxNode,input, i67...index, s67) r67.extend(NetDeclaration4) else @index = i67 r67 = nil end if r67 r67 = SyntaxNode.new(input, (index-1)...index) if r67 == true r0 = r67 r0.extend(NetDeclaration8) r0.extend(NetDeclaration8) else i81, s81 = index, [] r82 = _nt_trireg s81 << r82 if r82 r83 = _nt_s s81 << r83 if r83 r85 = _nt_drive_strength if r85 r84 = r85 else r84 = instantiate_node(SyntaxNode,input, index...index) end s81 << r84 if r84 r86 = _nt_s s81 << r86 if r86 r88 = _nt_signed if r88 r87 = r88 else r87 = instantiate_node(SyntaxNode,input, index...index) end s81 << r87 if r87 r89 = _nt_s s81 << r89 if r89 r91 = _nt_delay3 if r91 r90 = r91 else r90 = instantiate_node(SyntaxNode,input, index...index) end s81 << r90 if r90 r92 = _nt_list_of_net_decl_assignments s81 << r92 if r92 r93 = _nt_s s81 << r93 if r93 if (match_len = has_terminal?(";", false, index)) r94 = true @index += match_len else terminal_parse_failure('";"') r94 = nil end s81 << r94 end end end end end end end end end if s81.last r81 = instantiate_node(SyntaxNode,input, i81...index, s81) r81.extend(NetDeclaration5) else @index = i81 r81 = nil end if r81 r81 = SyntaxNode.new(input, (index-1)...index) if r81 == true r0 = r81 r0.extend(NetDeclaration8) r0.extend(NetDeclaration8) else i95, s95 = index, [] r96 = _nt_trireg s95 << r96 if r96 r97 = _nt_s s95 << r97 if r97 r99 = _nt_charge_strength if r99 r98 = r99 else r98 = instantiate_node(SyntaxNode,input, index...index) end s95 << r98 if r98 r100 = _nt_s s95 << r100 if r100 i102 = index if (match_len = has_terminal?("vectored", false, index)) r103 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"vectored"') r103 = nil end if r103 r103 = SyntaxNode.new(input, (index-1)...index) if r103 == true r102 = r103 else if (match_len = has_terminal?("scalared", false, index)) r104 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"scalared"') r104 = nil end if r104 r104 = SyntaxNode.new(input, (index-1)...index) if r104 == true r102 = r104 else @index = i102 r102 = nil end end if r102 r101 = r102 else r101 = instantiate_node(SyntaxNode,input, index...index) end s95 << r101 if r101 r105 = _nt_s s95 << r105 if r105 r107 = _nt_signed if r107 r106 = r107 else r106 = instantiate_node(SyntaxNode,input, index...index) end s95 << r106 if r106 r108 = _nt_s s95 << r108 if r108 r109 = _nt_range s95 << r109 if r109 r110 = _nt_s s95 << r110 if r110 r112 = _nt_delay3 if r112 r111 = r112 else r111 = instantiate_node(SyntaxNode,input, index...index) end s95 << r111 if r111 r113 = _nt_s s95 << r113 if r113 r114 = _nt_list_of_net_identifiers s95 << r114 if r114 r115 = _nt_s s95 << r115 if r115 if (match_len = has_terminal?(";", false, index)) r116 = true @index += match_len else terminal_parse_failure('";"') r116 = nil end s95 << r116 end end end end end end end end end end end end end end if s95.last r95 = instantiate_node(SyntaxNode,input, i95...index, s95) r95.extend(NetDeclaration6) else @index = i95 r95 = nil end if r95 r95 = SyntaxNode.new(input, (index-1)...index) if r95 == true r0 = r95 r0.extend(NetDeclaration8) r0.extend(NetDeclaration8) else i117, s117 = index, [] r118 = _nt_trireg s117 << r118 if r118 r119 = _nt_s s117 << r119 if r119 r121 = _nt_drive_strength if r121 r120 = r121 else r120 = instantiate_node(SyntaxNode,input, index...index) end s117 << r120 if r120 r122 = _nt_s s117 << r122 if r122 i124 = index if (match_len = has_terminal?("vectored", false, index)) r125 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"vectored"') r125 = nil end if r125 r125 = SyntaxNode.new(input, (index-1)...index) if r125 == true r124 = r125 else if (match_len = has_terminal?("scalared", false, index)) r126 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"scalared"') r126 = nil end if r126 r126 = SyntaxNode.new(input, (index-1)...index) if r126 == true r124 = r126 else @index = i124 r124 = nil end end if r124 r123 = r124 else r123 = instantiate_node(SyntaxNode,input, index...index) end s117 << r123 if r123 r127 = _nt_s s117 << r127 if r127 r129 = _nt_signed if r129 r128 = r129 else r128 = instantiate_node(SyntaxNode,input, index...index) end s117 << r128 if r128 r130 = _nt_s s117 << r130 if r130 r131 = _nt_range s117 << r131 if r131 r132 = _nt_s s117 << r132 if r132 r134 = _nt_delay3 if r134 r133 = r134 else r133 = instantiate_node(SyntaxNode,input, index...index) end s117 << r133 if r133 r135 = _nt_s s117 << r135 if r135 r136 = _nt_list_of_net_decl_assignments s117 << r136 if r136 r137 = _nt_s s117 << r137 if r137 if (match_len = has_terminal?(";", false, index)) r138 = true @index += match_len else terminal_parse_failure('";"') r138 = nil end s117 << r138 end end end end end end end end end end end end end end if s117.last r117 = instantiate_node(SyntaxNode,input, i117...index, s117) r117.extend(NetDeclaration7) else @index = i117 r117 = nil end if r117 r117 = SyntaxNode.new(input, (index-1)...index) if r117 == true r0 = r117 r0.extend(NetDeclaration8) r0.extend(NetDeclaration8) else @index = i0 r0 = nil end end end end end end end end node_cache[:net_declaration][start_index] = r0 r0 end module RealDeclaration0 def s1 elements[1] end def list_of_real_identifiers elements[2] end def s2 elements[3] end end module RealDeclaration1 def to_ast n :real_declaration, *elements_to_ast end end def _nt_real_declaration start_index = index if node_cache[:real_declaration].has_key?(index) cached = node_cache[:real_declaration][index] if cached node_cache[:real_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("real", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"real"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_list_of_real_identifiers s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?(";", false, index)) r5 = true @index += match_len else terminal_parse_failure('";"') r5 = nil end s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(RealDeclaration0) r0.extend(RealDeclaration1) else @index = i0 r0 = nil end node_cache[:real_declaration][start_index] = r0 r0 end module RealtimeDeclaration0 def s1 elements[1] end def list_of_real_identifiers elements[2] end def s2 elements[3] end end module RealtimeDeclaration1 def to_ast n :realtime_declaration, *elements_to_ast end end def _nt_realtime_declaration start_index = index if node_cache[:realtime_declaration].has_key?(index) cached = node_cache[:realtime_declaration][index] if cached node_cache[:realtime_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("realtime", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"realtime"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_list_of_real_identifiers s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?(";", false, index)) r5 = true @index += match_len else terminal_parse_failure('";"') r5 = nil end s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(RealtimeDeclaration0) r0.extend(RealtimeDeclaration1) else @index = i0 r0 = nil end node_cache[:realtime_declaration][start_index] = r0 r0 end module RegDeclaration0 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def list_of_variable_identifiers elements[6] end def s4 elements[7] end end module RegDeclaration1 def to_ast n :reg_declaration, *elements_to_ast end end def _nt_reg_declaration start_index = index if node_cache[:reg_declaration].has_key?(index) cached = node_cache[:reg_declaration][index] if cached node_cache[:reg_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("reg", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"reg"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_signed if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r5 = _nt_s s0 << r5 if r5 r7 = _nt_range if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s0 << r6 if r6 r8 = _nt_s s0 << r8 if r8 r9 = _nt_list_of_variable_identifiers s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(";", false, index)) r11 = true @index += match_len else terminal_parse_failure('";"') r11 = nil end s0 << r11 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(RegDeclaration0) r0.extend(RegDeclaration1) else @index = i0 r0 = nil end node_cache[:reg_declaration][start_index] = r0 r0 end module TimeDeclaration0 def s1 elements[1] end def list_of_variable_identifiers elements[2] end def s2 elements[3] end end module TimeDeclaration1 def to_ast n :time_declaration, *elements_to_ast end end def _nt_time_declaration start_index = index if node_cache[:time_declaration].has_key?(index) cached = node_cache[:time_declaration][index] if cached node_cache[:time_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("time", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"time"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_list_of_variable_identifiers s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?(";", false, index)) r5 = true @index += match_len else terminal_parse_failure('";"') r5 = nil end s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(TimeDeclaration0) r0.extend(TimeDeclaration1) else @index = i0 r0 = nil end node_cache[:time_declaration][start_index] = r0 r0 end module NetType0 def to_ast if text_value == "wire real" || text_value == 'wreal' n(:real) else n(text_value.to_sym) end end end def _nt_net_type start_index = index if node_cache[:net_type].has_key?(index) cached = node_cache[:net_type][index] if cached node_cache[:net_type][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?("wire real", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"wire real"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("wreal", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"wreal"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("real", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"real"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("supply0", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"supply0"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("supply1", false, index)) r5 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"supply1"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("tri", false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"tri"') r6 = nil end if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("triand", false, index)) r7 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"triand"') r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("trior", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"trior"') r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("tri0", false, index)) r9 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"tri0"') r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("tri1", false, index)) r10 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"tri1"') r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("uwire", false, index)) r11 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"uwire"') r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("wire", false, index)) r12 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"wire"') r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r0 = r12 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("wand", false, index)) r13 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"wand"') r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(NetType0) r0.extend(NetType0) else if (match_len = has_terminal?("wor", false, index)) r14 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"wor"') r14 = nil end if r14 r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true r0 = r14 r0.extend(NetType0) r0.extend(NetType0) else @index = i0 r0 = nil end end end end end end end end end end end end end end node_cache[:net_type][start_index] = r0 r0 end module Trireg0 def to_ast "trireg" end end def _nt_trireg start_index = index if node_cache[:trireg].has_key?(index) cached = node_cache[:trireg][index] if cached node_cache[:trireg][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if (match_len = has_terminal?("trireg", false, index)) r0 = instantiate_node(SyntaxNode,input, index...(index + match_len)) r0.extend(Trireg0) @index += match_len else terminal_parse_failure('"trireg"') r0 = nil end node_cache[:trireg][start_index] = r0 r0 end def _nt_output_variable_type start_index = index if node_cache[:output_variable_type].has_key?(index) cached = node_cache[:output_variable_type][index] if cached node_cache[:output_variable_type][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_integer if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_time if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:output_variable_type][start_index] = r0 r0 end module RealType0 def s elements[0] end def dimension elements[1] end end module RealType1 def real_identifier elements[0] end end module RealType2 def real_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def constant_expression elements[4] end end module RealType3 def to_ast n :real_type, *elements_to_ast end end def _nt_real_type start_index = index if node_cache[:real_type].has_key?(index) cached = node_cache[:real_type][index] if cached node_cache[:real_type][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_real_identifier s1 << r2 if r2 s3, i3 = [], index loop do i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 r6 = _nt_dimension s4 << r6 end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(RealType0) else @index = i4 r4 = nil end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s1 << r3 end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(RealType1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(RealType3) r0.extend(RealType3) else i7, s7 = index, [] r8 = _nt_real_identifier s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 if (match_len = has_terminal?("=", false, index)) r10 = true @index += match_len else terminal_parse_failure('"="') r10 = nil end s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 r12 = _nt_constant_expression s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(RealType2) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(RealType3) r0.extend(RealType3) else @index = i0 r0 = nil end end node_cache[:real_type][start_index] = r0 r0 end module VariableType0 def variable_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def constant_expression elements[4] end end module VariableType1 def s elements[0] end def dimension elements[1] end end module VariableType2 def variable_identifier elements[0] end end module VariableType3 def to_ast n :variable_type, *elements_to_ast end end def _nt_variable_type start_index = index if node_cache[:variable_type].has_key?(index) cached = node_cache[:variable_type][index] if cached node_cache[:variable_type][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_variable_identifier s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("=", false, index)) r4 = true @index += match_len else terminal_parse_failure('"="') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_constant_expression s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(VariableType0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(VariableType3) r0.extend(VariableType3) else i7, s7 = index, [] r8 = _nt_variable_identifier s7 << r8 if r8 s9, i9 = [], index loop do i10, s10 = index, [] r11 = _nt_s s10 << r11 if r11 r12 = _nt_dimension s10 << r12 end if s10.last r10 = instantiate_node(SyntaxNode,input, i10...index, s10) r10.extend(VariableType1) else @index = i10 r10 = nil end if r10 s9 << r10 else break end end r9 = instantiate_node(SyntaxNode,input, i9...index, s9) s7 << r9 end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(VariableType2) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(VariableType3) r0.extend(VariableType3) else @index = i0 r0 = nil end end node_cache[:variable_type][start_index] = r0 r0 end module DriveStrength0 def s1 elements[1] end def strength0 elements[2] end def s2 elements[3] end def s3 elements[5] end def strength1 elements[6] end def s4 elements[7] end end module DriveStrength1 def s1 elements[1] end def strength1 elements[2] end def s2 elements[3] end def s3 elements[5] end def strength0 elements[6] end def s4 elements[7] end end module DriveStrength2 def s1 elements[1] end def strength0 elements[2] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end end module DriveStrength3 def s1 elements[1] end def strength1 elements[2] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end end module DriveStrength4 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def strength1 elements[6] end def s4 elements[7] end end module DriveStrength5 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def strength0 elements[6] end def s4 elements[7] end end module DriveStrength6 def to_ast n :drive_strength, *elements_to_ast end end def _nt_drive_strength start_index = index if node_cache[:drive_strength].has_key?(index) cached = node_cache[:drive_strength][index] if cached node_cache[:drive_strength][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 r3 = _nt_s s1 << r3 if r3 r4 = _nt_strength0 s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 if (match_len = has_terminal?(",", false, index)) r6 = true @index += match_len else terminal_parse_failure('","') r6 = nil end s1 << r6 if r6 r7 = _nt_s s1 << r7 if r7 r8 = _nt_strength1 s1 << r8 if r8 r9 = _nt_s s1 << r9 if r9 if (match_len = has_terminal?(")", false, index)) r10 = true @index += match_len else terminal_parse_failure('")"') r10 = nil end s1 << r10 end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(DriveStrength0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(DriveStrength6) r0.extend(DriveStrength6) 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 r13 = _nt_s s11 << r13 if r13 r14 = _nt_strength1 s11 << r14 if r14 r15 = _nt_s s11 << r15 if r15 if (match_len = has_terminal?(",", false, index)) r16 = true @index += match_len else terminal_parse_failure('","') r16 = nil end s11 << r16 if r16 r17 = _nt_s s11 << r17 if r17 r18 = _nt_strength0 s11 << r18 if r18 r19 = _nt_s s11 << r19 if r19 if (match_len = has_terminal?(")", false, index)) r20 = true @index += match_len else terminal_parse_failure('")"') r20 = nil end s11 << r20 end end end end end end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(DriveStrength1) else @index = i11 r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(DriveStrength6) r0.extend(DriveStrength6) else i21, s21 = index, [] if (match_len = has_terminal?("(", false, index)) r22 = true @index += match_len else terminal_parse_failure('"("') r22 = nil end s21 << r22 if r22 r23 = _nt_s s21 << r23 if r23 r24 = _nt_strength0 s21 << r24 if r24 r25 = _nt_s s21 << r25 if r25 if (match_len = has_terminal?(",", false, index)) r26 = true @index += match_len else terminal_parse_failure('","') r26 = nil end s21 << r26 if r26 r27 = _nt_s s21 << r27 if r27 if (match_len = has_terminal?("highz1", false, index)) r28 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"highz1"') r28 = nil end s21 << r28 if r28 r29 = _nt_s s21 << r29 if r29 if (match_len = has_terminal?(")", false, index)) r30 = true @index += match_len else terminal_parse_failure('")"') r30 = nil end s21 << r30 end end end end end end end end if s21.last r21 = instantiate_node(SyntaxNode,input, i21...index, s21) r21.extend(DriveStrength2) else @index = i21 r21 = nil end if r21 r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true r0 = r21 r0.extend(DriveStrength6) r0.extend(DriveStrength6) 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 r33 = _nt_s s31 << r33 if r33 r34 = _nt_strength1 s31 << r34 if r34 r35 = _nt_s s31 << r35 if r35 if (match_len = has_terminal?(",", false, index)) r36 = true @index += match_len else terminal_parse_failure('","') r36 = nil end s31 << r36 if r36 r37 = _nt_s s31 << r37 if r37 if (match_len = has_terminal?("highz0", false, index)) r38 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"highz0"') r38 = nil end s31 << r38 if r38 r39 = _nt_s s31 << r39 if r39 if (match_len = has_terminal?(")", false, index)) r40 = true @index += match_len else terminal_parse_failure('")"') r40 = nil end s31 << r40 end end end end end end end end if s31.last r31 = instantiate_node(SyntaxNode,input, i31...index, s31) r31.extend(DriveStrength3) else @index = i31 r31 = nil end if r31 r31 = SyntaxNode.new(input, (index-1)...index) if r31 == true r0 = r31 r0.extend(DriveStrength6) r0.extend(DriveStrength6) else i41, s41 = index, [] if (match_len = has_terminal?("(", false, index)) r42 = true @index += match_len else terminal_parse_failure('"("') r42 = nil end s41 << r42 if r42 r43 = _nt_s s41 << r43 if r43 if (match_len = has_terminal?("highz0", false, index)) r44 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"highz0"') r44 = nil end s41 << r44 if r44 r45 = _nt_s s41 << r45 if r45 if (match_len = has_terminal?(",", false, index)) r46 = true @index += match_len else terminal_parse_failure('","') r46 = nil end s41 << r46 if r46 r47 = _nt_s s41 << r47 if r47 r48 = _nt_strength1 s41 << r48 if r48 r49 = _nt_s s41 << r49 if r49 if (match_len = has_terminal?(")", false, index)) r50 = true @index += match_len else terminal_parse_failure('")"') r50 = nil end s41 << r50 end end end end end end end end if s41.last r41 = instantiate_node(SyntaxNode,input, i41...index, s41) r41.extend(DriveStrength4) else @index = i41 r41 = nil end if r41 r41 = SyntaxNode.new(input, (index-1)...index) if r41 == true r0 = r41 r0.extend(DriveStrength6) r0.extend(DriveStrength6) else i51, s51 = index, [] if (match_len = has_terminal?("(", false, index)) r52 = true @index += match_len else terminal_parse_failure('"("') r52 = nil end s51 << r52 if r52 r53 = _nt_s s51 << r53 if r53 if (match_len = has_terminal?("highz1", false, index)) r54 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"highz1"') r54 = nil end s51 << r54 if r54 r55 = _nt_s s51 << r55 if r55 if (match_len = has_terminal?(",", false, index)) r56 = true @index += match_len else terminal_parse_failure('","') r56 = nil end s51 << r56 if r56 r57 = _nt_s s51 << r57 if r57 r58 = _nt_strength0 s51 << r58 if r58 r59 = _nt_s s51 << r59 if r59 if (match_len = has_terminal?(")", false, index)) r60 = true @index += match_len else terminal_parse_failure('")"') r60 = nil end s51 << r60 end end end end end end end end if s51.last r51 = instantiate_node(SyntaxNode,input, i51...index, s51) r51.extend(DriveStrength5) else @index = i51 r51 = nil end if r51 r51 = SyntaxNode.new(input, (index-1)...index) if r51 == true r0 = r51 r0.extend(DriveStrength6) r0.extend(DriveStrength6) else @index = i0 r0 = nil end end end end end end node_cache[:drive_strength][start_index] = r0 r0 end module Strength00 def to_ast text_value end end def _nt_strength0 start_index = index if node_cache[:strength0].has_key?(index) cached = node_cache[:strength0][index] if cached node_cache[:strength0][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?("supply0", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"supply0"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(Strength00) r0.extend(Strength00) else if (match_len = has_terminal?("strong0", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"strong0"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(Strength00) r0.extend(Strength00) else if (match_len = has_terminal?("pull0", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"pull0"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(Strength00) r0.extend(Strength00) else if (match_len = has_terminal?("weak0", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"weak0"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(Strength00) r0.extend(Strength00) else @index = i0 r0 = nil end end end end node_cache[:strength0][start_index] = r0 r0 end module Strength10 def to_ast text_value end end def _nt_strength1 start_index = index if node_cache[:strength1].has_key?(index) cached = node_cache[:strength1][index] if cached node_cache[:strength1][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?("supply1", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"supply1"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(Strength10) r0.extend(Strength10) else if (match_len = has_terminal?("strong1", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"strong1"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(Strength10) r0.extend(Strength10) else if (match_len = has_terminal?("pull1", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"pull1"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(Strength10) r0.extend(Strength10) else if (match_len = has_terminal?("weak1", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"weak1"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(Strength10) r0.extend(Strength10) else @index = i0 r0 = nil end end end end node_cache[:strength1][start_index] = r0 r0 end module ChargeStrength0 def s1 elements[1] end def val elements[2] end def s2 elements[3] end end module ChargeStrength1 def to_ast n :charge_strength, val.text_value end end def _nt_charge_strength start_index = index if node_cache[:charge_strength].has_key?(index) cached = node_cache[:charge_strength][index] if cached node_cache[:charge_strength][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("(", false, index)) r1 = true @index += match_len else terminal_parse_failure('"("') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 i3 = index if (match_len = has_terminal?("small", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"small"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r3 = r4 else if (match_len = has_terminal?("medium", false, index)) r5 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"medium"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r3 = r5 else if (match_len = has_terminal?("large", false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"large"') r6 = nil end if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r3 = r6 else @index = i3 r3 = nil end end end s0 << r3 if r3 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(")", false, index)) r8 = true @index += match_len else terminal_parse_failure('")"') r8 = nil end s0 << r8 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ChargeStrength0) r0.extend(ChargeStrength1) else @index = i0 r0 = nil end node_cache[:charge_strength][start_index] = r0 r0 end module Delay30 def s elements[1] end def delay_value elements[2] end end module Delay31 def s1 elements[0] end def s2 elements[2] end def mintypmax_expression elements[3] end end module Delay32 def s1 elements[0] end def s2 elements[2] end def mintypmax_expression elements[3] end end module Delay33 def s1 elements[1] end def s2 elements[3] end def mintypmax_expression elements[4] end def s3 elements[7] end end module Delay34 def to_ast n :delay, *elements_to_ast end end def _nt_delay3 start_index = index if node_cache[:delay3].has_key?(index) cached = node_cache[:delay3][index] if cached node_cache[:delay3][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 r3 = _nt_s s1 << r3 if r3 r4 = _nt_delay_value s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(Delay30) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(Delay34) r0.extend(Delay34) else 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 r7 = _nt_s s5 << r7 if r7 if (match_len = has_terminal?("(", false, index)) r8 = true @index += match_len else terminal_parse_failure('"("') r8 = nil end s5 << r8 if r8 r9 = _nt_s s5 << r9 if r9 r10 = _nt_mintypmax_expression s5 << r10 if r10 i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 if (match_len = has_terminal?(",", false, index)) r14 = true @index += match_len else terminal_parse_failure('","') r14 = nil end s12 << r14 if r14 r15 = _nt_s s12 << r15 if r15 r16 = _nt_mintypmax_expression s12 << r16 end end end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(Delay31) else @index = i12 r12 = nil end if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s5 << r11 if r11 i18, s18 = index, [] r19 = _nt_s s18 << r19 if r19 if (match_len = has_terminal?(",", false, index)) r20 = true @index += match_len else terminal_parse_failure('","') r20 = nil end s18 << r20 if r20 r21 = _nt_s s18 << r21 if r21 r22 = _nt_mintypmax_expression s18 << r22 end end end if s18.last r18 = instantiate_node(SyntaxNode,input, i18...index, s18) r18.extend(Delay32) else @index = i18 r18 = nil end if r18 r17 = r18 else r17 = instantiate_node(SyntaxNode,input, index...index) end s5 << r17 if r17 r23 = _nt_s s5 << r23 if r23 if (match_len = has_terminal?(")", false, index)) r24 = true @index += match_len else terminal_parse_failure('")"') r24 = nil end s5 << r24 end end end end end end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(Delay33) else @index = i5 r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(Delay34) r0.extend(Delay34) else @index = i0 r0 = nil end end node_cache[:delay3][start_index] = r0 r0 end module Delay20 def s elements[1] end def delay_value elements[2] end end module Delay21 def s1 elements[0] end def s2 elements[2] end def mintypmax_expression elements[3] end end module Delay22 def s1 elements[1] end def s2 elements[3] end def mintypmax_expression elements[4] end def s3 elements[6] end end module Delay23 def to_ast n :delay, *elements_to_ast end end def _nt_delay2 start_index = index if node_cache[:delay2].has_key?(index) cached = node_cache[:delay2][index] if cached node_cache[:delay2][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 r3 = _nt_s s1 << r3 if r3 r4 = _nt_delay_value s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(Delay20) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(Delay23) r0.extend(Delay23) else 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 r7 = _nt_s s5 << r7 if r7 if (match_len = has_terminal?("(", false, index)) r8 = true @index += match_len else terminal_parse_failure('"("') r8 = nil end s5 << r8 if r8 r9 = _nt_s s5 << r9 if r9 r10 = _nt_mintypmax_expression s5 << r10 if r10 i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 if (match_len = has_terminal?(",", false, index)) r14 = true @index += match_len else terminal_parse_failure('","') r14 = nil end s12 << r14 if r14 r15 = _nt_s s12 << r15 if r15 r16 = _nt_mintypmax_expression s12 << r16 end end end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(Delay21) else @index = i12 r12 = nil end if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s5 << r11 if r11 r17 = _nt_s s5 << r17 if r17 if (match_len = has_terminal?(")", false, index)) r18 = true @index += match_len else terminal_parse_failure('")"') r18 = nil end s5 << r18 end end end end end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(Delay22) else @index = i5 r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(Delay23) r0.extend(Delay23) else @index = i0 r0 = nil end end node_cache[:delay2][start_index] = r0 r0 end def _nt_delay_value start_index = index if node_cache[:delay_value].has_key?(index) cached = node_cache[:delay_value][index] if cached node_cache[:delay_value][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_unsigned_number if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_real_number if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else r3 = _nt_identifier if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else @index = i0 r0 = nil end end end node_cache[:delay_value][start_index] = r0 r0 end module ListOfDefparamAssignments0 def s1 elements[0] end def s2 elements[2] end def defparam_assignment elements[3] end end module ListOfDefparamAssignments1 def defparam_assignment elements[0] end end def _nt_list_of_defparam_assignments start_index = index if node_cache[:list_of_defparam_assignments].has_key?(index) cached = node_cache[:list_of_defparam_assignments][index] if cached node_cache[:list_of_defparam_assignments][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_defparam_assignment s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_defparam_assignment s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfDefparamAssignments0) else @index = i3 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(ListOfDefparamAssignments1) else @index = i0 r0 = nil end node_cache[:list_of_defparam_assignments][start_index] = r0 r0 end module ListOfEventIdentifiers0 def s elements[0] end def dimension elements[1] end end module ListOfEventIdentifiers1 def s elements[0] end def dimension elements[1] end end module ListOfEventIdentifiers2 def s elements[1] end def event_identifier elements[2] end end module ListOfEventIdentifiers3 def event_identifier elements[0] end def s elements[2] end end def _nt_list_of_event_identifiers start_index = index if node_cache[:list_of_event_identifiers].has_key?(index) cached = node_cache[:list_of_event_identifiers][index] if cached node_cache[:list_of_event_identifiers][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_event_identifier s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_dimension s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfEventIdentifiers0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 r6 = _nt_s s0 << r6 if r6 s7, i7 = [], index loop do i8, s8 = index, [] if (match_len = has_terminal?(',', false, index)) r9 = true @index += match_len else terminal_parse_failure('\',\'') r9 = nil end s8 << r9 if r9 r10 = _nt_s s8 << r10 if r10 r11 = _nt_event_identifier s8 << r11 if r11 s12, i12 = [], index loop do i13, s13 = index, [] r14 = _nt_s s13 << r14 if r14 r15 = _nt_dimension s13 << r15 end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(ListOfEventIdentifiers1) else @index = i13 r13 = nil end if r13 s12 << r13 else break end end r12 = instantiate_node(SyntaxNode,input, i12...index, s12) s8 << r12 end end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(ListOfEventIdentifiers2) else @index = i8 r8 = nil end if r8 s7 << r8 else break end end r7 = instantiate_node(SyntaxNode,input, i7...index, s7) s0 << r7 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ListOfEventIdentifiers3) else @index = i0 r0 = nil end node_cache[:list_of_event_identifiers][start_index] = r0 r0 end module ListOfNetDeclAssignments0 def s1 elements[0] end def s2 elements[2] end def net_decl_assignment elements[3] end end module ListOfNetDeclAssignments1 def net_decl_assignment elements[0] end end def _nt_list_of_net_decl_assignments start_index = index if node_cache[:list_of_net_decl_assignments].has_key?(index) cached = node_cache[:list_of_net_decl_assignments][index] if cached node_cache[:list_of_net_decl_assignments][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_net_decl_assignment s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_net_decl_assignment s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfNetDeclAssignments0) else @index = i3 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(ListOfNetDeclAssignments1) else @index = i0 r0 = nil end node_cache[:list_of_net_decl_assignments][start_index] = r0 r0 end module ListOfNetIdentifiers0 def s elements[0] end def dimension elements[1] end end module ListOfNetIdentifiers1 def s elements[0] end def dimension elements[1] end end module ListOfNetIdentifiers2 def s1 elements[0] end def s2 elements[2] end def net_identifier elements[3] end end module ListOfNetIdentifiers3 def net_identifier elements[0] end end def _nt_list_of_net_identifiers start_index = index if node_cache[:list_of_net_identifiers].has_key?(index) cached = node_cache[:list_of_net_identifiers][index] if cached node_cache[:list_of_net_identifiers][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_net_identifier s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_dimension s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfNetIdentifiers0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 s6, i6 = [], index loop do i7, s7 = index, [] r8 = _nt_s s7 << r8 if r8 if (match_len = has_terminal?(",", false, index)) r9 = true @index += match_len else terminal_parse_failure('","') r9 = nil end s7 << r9 if r9 r10 = _nt_s s7 << r10 if r10 r11 = _nt_net_identifier s7 << r11 if r11 s12, i12 = [], index loop do i13, s13 = index, [] r14 = _nt_s s13 << r14 if r14 r15 = _nt_dimension s13 << r15 end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(ListOfNetIdentifiers1) else @index = i13 r13 = nil end if r13 s12 << r13 else break end end r12 = instantiate_node(SyntaxNode,input, i12...index, s12) s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(ListOfNetIdentifiers2) else @index = i7 r7 = nil end if r7 s6 << r7 else break end end r6 = instantiate_node(SyntaxNode,input, i6...index, s6) s0 << r6 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ListOfNetIdentifiers3) else @index = i0 r0 = nil end node_cache[:list_of_net_identifiers][start_index] = r0 r0 end module ListOfParamAssignments0 def s1 elements[0] end def s2 elements[2] end def param_assignment elements[3] end end module ListOfParamAssignments1 def param_assignment elements[0] end end def _nt_list_of_param_assignments start_index = index if node_cache[:list_of_param_assignments].has_key?(index) cached = node_cache[:list_of_param_assignments][index] if cached node_cache[:list_of_param_assignments][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_param_assignment s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_param_assignment s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfParamAssignments0) else @index = i3 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(ListOfParamAssignments1) else @index = i0 r0 = nil end node_cache[:list_of_param_assignments][start_index] = r0 r0 end module ListOfPortIdentifiers0 def s1 elements[0] end def s2 elements[2] end def port_identifier elements[3] end end module ListOfPortIdentifiers1 def port_identifier elements[0] end end def _nt_list_of_port_identifiers start_index = index if node_cache[:list_of_port_identifiers].has_key?(index) cached = node_cache[:list_of_port_identifiers][index] if cached node_cache[:list_of_port_identifiers][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_port_identifier s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_port_identifier s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfPortIdentifiers0) else @index = i3 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(ListOfPortIdentifiers1) else @index = i0 r0 = nil end node_cache[:list_of_port_identifiers][start_index] = r0 r0 end module ListOfRealIdentifiers0 def s1 elements[0] end def s2 elements[2] end def real_type elements[3] end end module ListOfRealIdentifiers1 def real_type elements[0] end end def _nt_list_of_real_identifiers start_index = index if node_cache[:list_of_real_identifiers].has_key?(index) cached = node_cache[:list_of_real_identifiers][index] if cached node_cache[:list_of_real_identifiers][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_real_type s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_real_type s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfRealIdentifiers0) else @index = i3 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(ListOfRealIdentifiers1) else @index = i0 r0 = nil end node_cache[:list_of_real_identifiers][start_index] = r0 r0 end module ListOfSpecparamAssignments0 def s1 elements[0] end def s2 elements[2] end def specparam_assignment elements[3] end end module ListOfSpecparamAssignments1 def specparam_assignment elements[0] end end def _nt_list_of_specparam_assignments start_index = index if node_cache[:list_of_specparam_assignments].has_key?(index) cached = node_cache[:list_of_specparam_assignments][index] if cached node_cache[:list_of_specparam_assignments][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_specparam_assignment s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_specparam_assignment s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfSpecparamAssignments0) else @index = i3 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(ListOfSpecparamAssignments1) else @index = i0 r0 = nil end node_cache[:list_of_specparam_assignments][start_index] = r0 r0 end module ListOfVariableIdentifiers0 def s1 elements[0] end def s2 elements[2] end def variable_type elements[3] end end module ListOfVariableIdentifiers1 def variable_type elements[0] end end def _nt_list_of_variable_identifiers start_index = index if node_cache[:list_of_variable_identifiers].has_key?(index) cached = node_cache[:list_of_variable_identifiers][index] if cached node_cache[:list_of_variable_identifiers][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_variable_type s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_variable_type s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfVariableIdentifiers0) else @index = i3 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(ListOfVariableIdentifiers1) else @index = i0 r0 = nil end node_cache[:list_of_variable_identifiers][start_index] = r0 r0 end module ListOfVariablePortIdentifiers0 def s1 elements[0] end def s2 elements[2] end def constant_expression elements[3] end end module ListOfVariablePortIdentifiers1 def s1 elements[0] end def s2 elements[2] end def constant_expression elements[3] end end module ListOfVariablePortIdentifiers2 def s1 elements[0] end def s2 elements[2] end def port_identifier elements[3] end end module ListOfVariablePortIdentifiers3 def port_identifier elements[0] end end def _nt_list_of_variable_port_identifiers start_index = index if node_cache[:list_of_variable_port_identifiers].has_key?(index) cached = node_cache[:list_of_variable_port_identifiers][index] if cached node_cache[:list_of_variable_port_identifiers][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_port_identifier s0 << r1 if r1 i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?("=", false, index)) r5 = true @index += match_len else terminal_parse_failure('"="') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_constant_expression s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfVariablePortIdentifiers0) else @index = i3 r3 = nil end if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 s8, i8 = [], index loop do i9, s9 = index, [] r10 = _nt_s s9 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s9 << r11 if r11 r12 = _nt_s s9 << r12 if r12 r13 = _nt_port_identifier s9 << r13 if r13 i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 if (match_len = has_terminal?("=", false, index)) r17 = true @index += match_len else terminal_parse_failure('"="') r17 = nil end s15 << r17 if r17 r18 = _nt_s s15 << r18 if r18 r19 = _nt_constant_expression s15 << r19 end end end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(ListOfVariablePortIdentifiers1) else @index = i15 r15 = nil end if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s9 << r14 end end end end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(ListOfVariablePortIdentifiers2) else @index = i9 r9 = nil end if r9 s8 << r9 else break end end r8 = instantiate_node(SyntaxNode,input, i8...index, s8) s0 << r8 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ListOfVariablePortIdentifiers3) else @index = i0 r0 = nil end node_cache[:list_of_variable_port_identifiers][start_index] = r0 r0 end module DefparamAssignment0 def hierarchical_parameter_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def constant_mintypmax_expression elements[4] end end module DefparamAssignment1 def to_ast n :defparam_assignment, *elements_to_ast end end def _nt_defparam_assignment start_index = index if node_cache[:defparam_assignment].has_key?(index) cached = node_cache[:defparam_assignment][index] if cached node_cache[:defparam_assignment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_hierarchical_parameter_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("=", false, index)) r3 = true @index += match_len else terminal_parse_failure('"="') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_constant_mintypmax_expression s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(DefparamAssignment0) r0.extend(DefparamAssignment1) else @index = i0 r0 = nil end node_cache[:defparam_assignment][start_index] = r0 r0 end module NetDeclAssignment0 def net_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def expression elements[4] end end module NetDeclAssignment1 def to_ast n :net_decl_assignment, *elements_to_ast end end def _nt_net_decl_assignment start_index = index if node_cache[:net_decl_assignment].has_key?(index) cached = node_cache[:net_decl_assignment][index] if cached node_cache[:net_decl_assignment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_net_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("=", false, index)) r3 = true @index += match_len else terminal_parse_failure('"="') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_expression s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NetDeclAssignment0) r0.extend(NetDeclAssignment1) else @index = i0 r0 = nil end node_cache[:net_decl_assignment][start_index] = r0 r0 end module ParamAssignment0 def parameter_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def constant_mintypmax_expression elements[4] end end module ParamAssignment1 def to_ast n :param_assignment, *elements_to_ast end end def _nt_param_assignment start_index = index if node_cache[:param_assignment].has_key?(index) cached = node_cache[:param_assignment][index] if cached node_cache[:param_assignment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_parameter_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("=", false, index)) r3 = true @index += match_len else terminal_parse_failure('"="') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_constant_mintypmax_expression s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ParamAssignment0) r0.extend(ParamAssignment1) else @index = i0 r0 = nil end node_cache[:param_assignment][start_index] = r0 r0 end module SpecparamAssignment0 def specparam_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def constant_mintypmax_expression elements[4] end end module SpecparamAssignment1 def to_ast n :specparam_assignment, *elements_to_ast end end def _nt_specparam_assignment start_index = index if node_cache[:specparam_assignment].has_key?(index) cached = node_cache[:specparam_assignment][index] if cached node_cache[:specparam_assignment][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_specparam_identifier s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("=", false, index)) r4 = true @index += match_len else terminal_parse_failure('"="') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_constant_mintypmax_expression s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(SpecparamAssignment0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(SpecparamAssignment1) r0.extend(SpecparamAssignment1) else r7 = _nt_pulse_control_specparam if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(SpecparamAssignment1) r0.extend(SpecparamAssignment1) else @index = i0 r0 = nil end end node_cache[:specparam_assignment][start_index] = r0 r0 end module PulseControlSpecparam0 def s1 elements[0] end def s2 elements[2] end def error_limit_value elements[3] end end module PulseControlSpecparam1 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def reject_limit_value elements[6] end def s4 elements[8] end end module PulseControlSpecparam2 def s1 elements[0] end def s2 elements[2] end def error_limit_value elements[3] end end module PulseControlSpecparam3 def specify_input_terminal_descriptor elements[1] end def specify_output_terminal_descriptor elements[3] end def s1 elements[4] end def s2 elements[6] end def s3 elements[8] end def reject_limit_value elements[9] end def s4 elements[11] end end module PulseControlSpecparam4 def to_ast n :pulse_control_specparam, *elements_to_ast end end def _nt_pulse_control_specparam start_index = index if node_cache[:pulse_control_specparam].has_key?(index) cached = node_cache[:pulse_control_specparam][index] if cached node_cache[:pulse_control_specparam][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?("PATHPULSE$", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"PATHPULSE$"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("=", false, index)) r4 = true @index += match_len else terminal_parse_failure('"="') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 if (match_len = has_terminal?("(", false, index)) r6 = true @index += match_len else terminal_parse_failure('"("') r6 = nil end s1 << r6 if r6 r7 = _nt_s s1 << r7 if r7 r8 = _nt_reject_limit_value s1 << r8 if r8 i10, s10 = index, [] r11 = _nt_s s10 << r11 if r11 if (match_len = has_terminal?(",", false, index)) r12 = true @index += match_len else terminal_parse_failure('","') r12 = nil end s10 << r12 if r12 r13 = _nt_s s10 << r13 if r13 r14 = _nt_error_limit_value s10 << r14 end end end if s10.last r10 = instantiate_node(SyntaxNode,input, i10...index, s10) r10.extend(PulseControlSpecparam0) else @index = i10 r10 = nil end if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s1 << r9 if r9 r15 = _nt_s s1 << r15 if r15 if (match_len = has_terminal?(")", false, index)) r16 = true @index += match_len else terminal_parse_failure('")"') r16 = nil end s1 << r16 end end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(PulseControlSpecparam1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(PulseControlSpecparam4) r0.extend(PulseControlSpecparam4) else i17, s17 = index, [] if (match_len = has_terminal?("PATHPULSE$", false, index)) r18 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"PATHPULSE$"') r18 = nil end s17 << r18 if r18 r19 = _nt_specify_input_terminal_descriptor s17 << r19 if r19 if (match_len = has_terminal?("$", false, index)) r20 = true @index += match_len else terminal_parse_failure('"$"') r20 = nil end s17 << r20 if r20 r21 = _nt_specify_output_terminal_descriptor s17 << r21 if r21 r22 = _nt_s s17 << r22 if r22 if (match_len = has_terminal?("=", false, index)) r23 = true @index += match_len else terminal_parse_failure('"="') r23 = nil end s17 << r23 if r23 r24 = _nt_s s17 << r24 if r24 if (match_len = has_terminal?("(", false, index)) r25 = true @index += match_len else terminal_parse_failure('"("') r25 = nil end s17 << r25 if r25 r26 = _nt_s s17 << r26 if r26 r27 = _nt_reject_limit_value s17 << r27 if r27 i29, s29 = index, [] r30 = _nt_s s29 << r30 if r30 if (match_len = has_terminal?(",", false, index)) r31 = true @index += match_len else terminal_parse_failure('","') r31 = nil end s29 << r31 if r31 r32 = _nt_s s29 << r32 if r32 r33 = _nt_error_limit_value s29 << r33 end end end if s29.last r29 = instantiate_node(SyntaxNode,input, i29...index, s29) r29.extend(PulseControlSpecparam2) else @index = i29 r29 = nil end if r29 r28 = r29 else r28 = instantiate_node(SyntaxNode,input, index...index) end s17 << r28 if r28 r34 = _nt_s s17 << r34 if r34 if (match_len = has_terminal?(")", false, index)) r35 = true @index += match_len else terminal_parse_failure('")"') r35 = nil end s17 << r35 end end end end end end end end end end end end if s17.last r17 = instantiate_node(SyntaxNode,input, i17...index, s17) r17.extend(PulseControlSpecparam3) else @index = i17 r17 = nil end if r17 r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true r0 = r17 r0.extend(PulseControlSpecparam4) r0.extend(PulseControlSpecparam4) else @index = i0 r0 = nil end end node_cache[:pulse_control_specparam][start_index] = r0 r0 end def _nt_error_limit_value start_index = index if node_cache[:error_limit_value].has_key?(index) cached = node_cache[:error_limit_value][index] if cached node_cache[:error_limit_value][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_limit_value node_cache[:error_limit_value][start_index] = r0 r0 end def _nt_reject_limit_value start_index = index if node_cache[:reject_limit_value].has_key?(index) cached = node_cache[:reject_limit_value][index] if cached node_cache[:reject_limit_value][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_limit_value node_cache[:reject_limit_value][start_index] = r0 r0 end def _nt_limit_value start_index = index if node_cache[:limit_value].has_key?(index) cached = node_cache[:limit_value][index] if cached node_cache[:limit_value][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_constant_mintypmax_expression node_cache[:limit_value][start_index] = r0 r0 end module Dimension0 def s1 elements[1] end def dimension_constant_expression1 elements[2] end def s2 elements[3] end def s3 elements[5] end def dimension_constant_expression2 elements[6] end def s4 elements[7] end end module Dimension1 def to_ast n :dimension, *elements_to_ast end end def _nt_dimension start_index = index if node_cache[:dimension].has_key?(index) cached = node_cache[:dimension][index] if cached node_cache[:dimension][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("[", false, index)) r1 = true @index += match_len else terminal_parse_failure('"["') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_dimension_constant_expression s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?(":", false, index)) r5 = true @index += match_len else terminal_parse_failure('":"') r5 = nil end s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 r7 = _nt_dimension_constant_expression s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 if (match_len = has_terminal?("]", false, index)) r9 = true @index += match_len else terminal_parse_failure('"]"') r9 = nil end s0 << r9 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Dimension0) r0.extend(Dimension1) else @index = i0 r0 = nil end node_cache[:dimension][start_index] = r0 r0 end module Range0 def s1 elements[1] end def msb_constant_expression elements[2] end def s2 elements[3] end def s3 elements[5] end def lsb_constant_expression elements[6] end def s4 elements[7] end end module Range1 def to_ast n :range, *elements_to_ast end end def _nt_range start_index = index if node_cache[:range].has_key?(index) cached = node_cache[:range][index] if cached node_cache[:range][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("[", false, index)) r1 = true @index += match_len else terminal_parse_failure('"["') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_msb_constant_expression s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?(":", false, index)) r5 = true @index += match_len else terminal_parse_failure('":"') r5 = nil end s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 r7 = _nt_lsb_constant_expression s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 if (match_len = has_terminal?("]", false, index)) r9 = true @index += match_len else terminal_parse_failure('"]"') r9 = nil end s0 << r9 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Range0) r0.extend(Range1) else @index = i0 r0 = nil end node_cache[:range][start_index] = r0 r0 end module FunctionDeclaration0 def s elements[0] end def function_item_declaration elements[1] end end module FunctionDeclaration1 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def function_identifier elements[6] end def s4 elements[7] end def s5 elements[9] end def function_item_declaration elements[10] end def s6 elements[12] end def function_statement elements[13] end def s7 elements[14] end end module FunctionDeclaration2 def s elements[0] end def block_item_declaration elements[1] end end module FunctionDeclaration3 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def function_identifier elements[6] end def s4 elements[7] end def s5 elements[9] end def function_port_list elements[10] end def s6 elements[11] end def s7 elements[13] end def s8 elements[15] end def s9 elements[17] end def function_statement elements[18] end def s10 elements[19] end end module FunctionDeclaration4 def to_ast n :function_declaration, *elements_to_ast end end def _nt_function_declaration start_index = index if node_cache[:function_declaration].has_key?(index) cached = node_cache[:function_declaration][index] if cached node_cache[:function_declaration][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?("function", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"function"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("automatic", false, index)) r5 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"automatic"') r5 = nil end if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 r6 = _nt_s s1 << r6 if r6 r8 = _nt_function_range_or_type if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s1 << r7 if r7 r9 = _nt_s s1 << r9 if r9 r10 = _nt_function_identifier s1 << r10 if r10 r11 = _nt_s s1 << r11 if r11 if (match_len = has_terminal?(";", false, index)) r12 = true @index += match_len else terminal_parse_failure('";"') r12 = nil end s1 << r12 if r12 r13 = _nt_s s1 << r13 if r13 r14 = _nt_function_item_declaration s1 << r14 if r14 s15, i15 = [], index loop do i16, s16 = index, [] r17 = _nt_s s16 << r17 if r17 r18 = _nt_function_item_declaration s16 << r18 end if s16.last r16 = instantiate_node(SyntaxNode,input, i16...index, s16) r16.extend(FunctionDeclaration0) else @index = i16 r16 = nil end if r16 s15 << r16 else break end end r15 = instantiate_node(SyntaxNode,input, i15...index, s15) s1 << r15 if r15 r19 = _nt_s s1 << r19 if r19 r20 = _nt_function_statement s1 << r20 if r20 r21 = _nt_s s1 << r21 if r21 if (match_len = has_terminal?("endfunction", false, index)) r22 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endfunction"') r22 = nil end s1 << r22 end end end end end end end end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(FunctionDeclaration1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(FunctionDeclaration4) r0.extend(FunctionDeclaration4) else i23, s23 = index, [] if (match_len = has_terminal?("function", false, index)) r24 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"function"') r24 = nil end s23 << r24 if r24 r25 = _nt_s s23 << r25 if r25 if (match_len = has_terminal?("automatic", false, index)) r27 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"automatic"') r27 = nil end if r27 r26 = r27 else r26 = instantiate_node(SyntaxNode,input, index...index) end s23 << r26 if r26 r28 = _nt_s s23 << r28 if r28 r30 = _nt_function_range_or_type if r30 r29 = r30 else r29 = instantiate_node(SyntaxNode,input, index...index) end s23 << r29 if r29 r31 = _nt_s s23 << r31 if r31 r32 = _nt_function_identifier s23 << r32 if r32 r33 = _nt_s s23 << r33 if r33 if (match_len = has_terminal?("(", false, index)) r34 = true @index += match_len else terminal_parse_failure('"("') r34 = nil end s23 << r34 if r34 r35 = _nt_s s23 << r35 if r35 r36 = _nt_function_port_list s23 << r36 if r36 r37 = _nt_s s23 << r37 if r37 if (match_len = has_terminal?(")", false, index)) r38 = true @index += match_len else terminal_parse_failure('")"') r38 = nil end s23 << r38 if r38 r39 = _nt_s s23 << r39 if r39 if (match_len = has_terminal?(";", false, index)) r40 = true @index += match_len else terminal_parse_failure('";"') r40 = nil end s23 << r40 if r40 r41 = _nt_s s23 << r41 if r41 s42, i42 = [], index loop do i43, s43 = index, [] r44 = _nt_s s43 << r44 if r44 r45 = _nt_block_item_declaration s43 << r45 end if s43.last r43 = instantiate_node(SyntaxNode,input, i43...index, s43) r43.extend(FunctionDeclaration2) else @index = i43 r43 = nil end if r43 s42 << r43 else break end end r42 = instantiate_node(SyntaxNode,input, i42...index, s42) s23 << r42 if r42 r46 = _nt_s s23 << r46 if r46 r47 = _nt_function_statement s23 << r47 if r47 r48 = _nt_s s23 << r48 if r48 if (match_len = has_terminal?("endfunction", false, index)) r49 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endfunction"') r49 = nil end s23 << r49 end end end end end end end end end end end end end end end end end end end end if s23.last r23 = instantiate_node(SyntaxNode,input, i23...index, s23) r23.extend(FunctionDeclaration3) else @index = i23 r23 = nil end if r23 r23 = SyntaxNode.new(input, (index-1)...index) if r23 == true r0 = r23 r0.extend(FunctionDeclaration4) r0.extend(FunctionDeclaration4) else @index = i0 r0 = nil end end node_cache[:function_declaration][start_index] = r0 r0 end module FunctionItemDeclaration0 def s elements[0] end def attribute_instance elements[1] end end module FunctionItemDeclaration1 def s1 elements[1] end def tf_input_declaration elements[2] end def s2 elements[3] end end module FunctionItemDeclaration2 def to_ast n :function_item_declaration, *elements_to_ast end end def _nt_function_item_declaration start_index = index if node_cache[:function_item_declaration].has_key?(index) cached = node_cache[:function_item_declaration][index] if cached node_cache[:function_item_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_block_item_declaration if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(FunctionItemDeclaration2) r0.extend(FunctionItemDeclaration2) else i2, s2 = index, [] s3, i3 = [], index loop do i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 r6 = _nt_attribute_instance s4 << r6 end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(FunctionItemDeclaration0) else @index = i4 r4 = nil end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s2 << r3 if r3 r7 = _nt_s s2 << r7 if r7 r8 = _nt_tf_input_declaration s2 << r8 if r8 r9 = _nt_s s2 << r9 if r9 if (match_len = has_terminal?(";", false, index)) r10 = true @index += match_len else terminal_parse_failure('";"') r10 = nil end s2 << r10 end end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(FunctionItemDeclaration1) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(FunctionItemDeclaration2) r0.extend(FunctionItemDeclaration2) else @index = i0 r0 = nil end end node_cache[:function_item_declaration][start_index] = r0 r0 end module FunctionPortList0 def s elements[0] end def attribute_instance elements[1] end end module FunctionPortList1 def s elements[0] end def attribute_instance elements[1] end end module FunctionPortList2 def s1 elements[0] end def s2 elements[3] end def tf_input_declaration elements[4] end end module FunctionPortList3 def s elements[1] end def tf_input_declaration elements[2] end end module FunctionPortList4 def to_ast n :function_port_list, *elements_to_ast end end def _nt_function_port_list start_index = index if node_cache[:function_port_list].has_key?(index) cached = node_cache[:function_port_list][index] if cached node_cache[:function_port_list][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] s1, i1 = [], index loop do i2, s2 = index, [] r3 = _nt_s s2 << r3 if r3 r4 = _nt_attribute_instance s2 << r4 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(FunctionPortList0) else @index = i2 r2 = nil end if r2 s1 << r2 else break end end r1 = instantiate_node(SyntaxNode,input, i1...index, s1) s0 << r1 if r1 r5 = _nt_s s0 << r5 if r5 r6 = _nt_tf_input_declaration s0 << r6 if r6 s7, i7 = [], index loop do i8, s8 = index, [] r9 = _nt_s s8 << r9 if r9 if (match_len = has_terminal?(",", false, index)) r10 = true @index += match_len else terminal_parse_failure('","') r10 = nil end s8 << r10 if r10 s11, i11 = [], index loop do i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 r14 = _nt_attribute_instance s12 << r14 end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(FunctionPortList1) else @index = i12 r12 = nil end if r12 s11 << r12 else break end end r11 = instantiate_node(SyntaxNode,input, i11...index, s11) s8 << r11 if r11 r15 = _nt_s s8 << r15 if r15 r16 = _nt_tf_input_declaration s8 << r16 end end end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(FunctionPortList2) else @index = i8 r8 = nil end if r8 s7 << r8 else break end end r7 = instantiate_node(SyntaxNode,input, i7...index, s7) s0 << r7 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(FunctionPortList3) r0.extend(FunctionPortList4) else @index = i0 r0 = nil end node_cache[:function_port_list][start_index] = r0 r0 end module FunctionRangeOrType0 end def _nt_function_range_or_type start_index = index if node_cache[:function_range_or_type].has_key?(index) cached = node_cache[:function_range_or_type][index] if cached node_cache[:function_range_or_type][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] r3 = _nt_signed if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s1 << r2 if r2 r5 = _nt_range if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(FunctionRangeOrType0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r6 = _nt_integer if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 else r7 = _nt_real if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 else r8 = _nt_realtime if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else r9 = _nt_time if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 else @index = i0 r0 = nil end end end end end node_cache[:function_range_or_type][start_index] = r0 r0 end module TaskDeclaration0 def s elements[0] end def task_item_declaration elements[1] end end module TaskDeclaration1 def s1 elements[1] end def s2 elements[3] end def task_identifier elements[4] end def s3 elements[5] end def s4 elements[8] end def statement_or_null elements[9] end def s5 elements[10] end end module TaskDeclaration2 def s elements[0] end def block_item_declaration elements[1] end end module TaskDeclaration3 def s1 elements[1] end def s2 elements[3] end def task_identifier elements[4] end def s3 elements[5] end def s4 elements[7] end def s5 elements[9] end def s6 elements[11] end def s7 elements[14] end def statement_or_null elements[15] end def s8 elements[16] end end module TaskDeclaration4 def to_ast n :task_declaration, *elements_to_ast end end def _nt_task_declaration start_index = index if node_cache[:task_declaration].has_key?(index) cached = node_cache[:task_declaration][index] if cached node_cache[:task_declaration][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?("task", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"task"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("automatic", false, index)) r5 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"automatic"') r5 = nil end if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 r6 = _nt_s s1 << r6 if r6 r7 = _nt_task_identifier s1 << r7 if r7 r8 = _nt_s s1 << r8 if r8 if (match_len = has_terminal?(";", false, index)) r9 = true @index += match_len else terminal_parse_failure('";"') r9 = nil end s1 << r9 if r9 s10, i10 = [], index loop do i11, s11 = index, [] r12 = _nt_s s11 << r12 if r12 r13 = _nt_task_item_declaration s11 << r13 end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(TaskDeclaration0) else @index = i11 r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s1 << r10 if r10 r14 = _nt_s s1 << r14 if r14 r15 = _nt_statement_or_null s1 << r15 if r15 r16 = _nt_s s1 << r16 if r16 if (match_len = has_terminal?("endtask", false, index)) r17 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endtask"') r17 = nil end s1 << r17 end end end end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(TaskDeclaration1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(TaskDeclaration4) r0.extend(TaskDeclaration4) else i18, s18 = index, [] if (match_len = has_terminal?("task", false, index)) r19 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"task"') r19 = nil end s18 << r19 if r19 r20 = _nt_s s18 << r20 if r20 if (match_len = has_terminal?("automatic", false, index)) r22 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"automatic"') r22 = nil end if r22 r21 = r22 else r21 = instantiate_node(SyntaxNode,input, index...index) end s18 << r21 if r21 r23 = _nt_s s18 << r23 if r23 r24 = _nt_task_identifier s18 << r24 if r24 r25 = _nt_s s18 << r25 if r25 if (match_len = has_terminal?("(", false, index)) r26 = true @index += match_len else terminal_parse_failure('"("') r26 = nil end s18 << r26 if r26 r27 = _nt_s s18 << r27 if r27 r29 = _nt_task_port_list if r29 r28 = r29 else r28 = instantiate_node(SyntaxNode,input, index...index) end s18 << r28 if r28 r30 = _nt_s s18 << r30 if r30 if (match_len = has_terminal?(")", false, index)) r31 = true @index += match_len else terminal_parse_failure('")"') r31 = nil end s18 << r31 if r31 r32 = _nt_s s18 << r32 if r32 if (match_len = has_terminal?(";", false, index)) r33 = true @index += match_len else terminal_parse_failure('";"') r33 = nil end s18 << r33 if r33 s34, i34 = [], index loop do i35, s35 = index, [] r36 = _nt_s s35 << r36 if r36 r37 = _nt_block_item_declaration s35 << r37 end if s35.last r35 = instantiate_node(SyntaxNode,input, i35...index, s35) r35.extend(TaskDeclaration2) else @index = i35 r35 = nil end if r35 s34 << r35 else break end end r34 = instantiate_node(SyntaxNode,input, i34...index, s34) s18 << r34 if r34 r38 = _nt_s s18 << r38 if r38 r39 = _nt_statement_or_null s18 << r39 if r39 r40 = _nt_s s18 << r40 if r40 if (match_len = has_terminal?("endtask", false, index)) r41 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endtask"') r41 = nil end s18 << r41 end end end end end end end end end end end end end end end end end if s18.last r18 = instantiate_node(SyntaxNode,input, i18...index, s18) r18.extend(TaskDeclaration3) else @index = i18 r18 = nil end if r18 r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true r0 = r18 r0.extend(TaskDeclaration4) r0.extend(TaskDeclaration4) else @index = i0 r0 = nil end end node_cache[:task_declaration][start_index] = r0 r0 end module TaskItemDeclaration0 def s elements[0] end def attribute_instance elements[1] end end module TaskItemDeclaration1 def s1 elements[1] end def tf_input_declaration elements[2] end def s2 elements[3] end end module TaskItemDeclaration2 def s elements[0] end def attribute_instance elements[1] end end module TaskItemDeclaration3 def s1 elements[1] end def tf_output_declaration elements[2] end def s2 elements[3] end end module TaskItemDeclaration4 def s elements[0] end def attribute_instance elements[1] end end module TaskItemDeclaration5 def s1 elements[1] end def tf_inout_declaration elements[2] end def s2 elements[3] end end module TaskItemDeclaration6 def to_ast n :task_item_declaration, *elements_to_ast end end def _nt_task_item_declaration start_index = index if node_cache[:task_item_declaration].has_key?(index) cached = node_cache[:task_item_declaration][index] if cached node_cache[:task_item_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(TaskItemDeclaration0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s1 << r2 if r2 r6 = _nt_s s1 << r6 if r6 r7 = _nt_tf_input_declaration s1 << r7 if r7 r8 = _nt_s s1 << r8 if r8 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(SyntaxNode,input, i1...index, s1) r1.extend(TaskItemDeclaration1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(TaskItemDeclaration6) r0.extend(TaskItemDeclaration6) else i10, s10 = index, [] s11, i11 = [], index loop do i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 r14 = _nt_attribute_instance s12 << r14 end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(TaskItemDeclaration2) else @index = i12 r12 = nil end if r12 s11 << r12 else break end end r11 = instantiate_node(SyntaxNode,input, i11...index, s11) s10 << r11 if r11 r15 = _nt_s s10 << r15 if r15 r16 = _nt_tf_output_declaration s10 << r16 if r16 r17 = _nt_s s10 << r17 if r17 if (match_len = has_terminal?(";", false, index)) r18 = true @index += match_len else terminal_parse_failure('";"') r18 = nil end s10 << r18 end end end end if s10.last r10 = instantiate_node(SyntaxNode,input, i10...index, s10) r10.extend(TaskItemDeclaration3) else @index = i10 r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 r0.extend(TaskItemDeclaration6) r0.extend(TaskItemDeclaration6) else i19, s19 = index, [] s20, i20 = [], index loop do i21, s21 = index, [] r22 = _nt_s s21 << r22 if r22 r23 = _nt_attribute_instance s21 << r23 end if s21.last r21 = instantiate_node(SyntaxNode,input, i21...index, s21) r21.extend(TaskItemDeclaration4) else @index = i21 r21 = nil end if r21 s20 << r21 else break end end r20 = instantiate_node(SyntaxNode,input, i20...index, s20) s19 << r20 if r20 r24 = _nt_s s19 << r24 if r24 r25 = _nt_tf_inout_declaration s19 << r25 if r25 r26 = _nt_s s19 << r26 if r26 if (match_len = has_terminal?(";", false, index)) r27 = true @index += match_len else terminal_parse_failure('";"') r27 = nil end s19 << r27 end end end end if s19.last r19 = instantiate_node(SyntaxNode,input, i19...index, s19) r19.extend(TaskItemDeclaration5) else @index = i19 r19 = nil end if r19 r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true r0 = r19 r0.extend(TaskItemDeclaration6) r0.extend(TaskItemDeclaration6) else r28 = _nt_block_item_declaration if r28 r28 = SyntaxNode.new(input, (index-1)...index) if r28 == true r0 = r28 r0.extend(TaskItemDeclaration6) r0.extend(TaskItemDeclaration6) else @index = i0 r0 = nil end end end end node_cache[:task_item_declaration][start_index] = r0 r0 end module TaskPortList0 def s1 elements[0] end def s2 elements[2] end def task_port_item elements[3] end end module TaskPortList1 def task_port_item elements[0] end end module TaskPortList2 def to_ast n :task_port_list, *elements_to_ast end end def _nt_task_port_list start_index = index if node_cache[:task_port_list].has_key?(index) cached = node_cache[:task_port_list][index] if cached node_cache[:task_port_list][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_task_port_item s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_task_port_item s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(TaskPortList0) else @index = i3 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(TaskPortList1) r0.extend(TaskPortList2) else @index = i0 r0 = nil end node_cache[:task_port_list][start_index] = r0 r0 end module TaskPortItem0 def s elements[0] end def attribute_instance elements[1] end end module TaskPortItem1 def s elements[1] end def tf_input_declaration elements[2] end end module TaskPortItem2 def s elements[0] end def attribute_instance elements[1] end end module TaskPortItem3 def s elements[1] end def tf_output_declaration elements[2] end end module TaskPortItem4 def s elements[0] end def attribute_instance elements[1] end end module TaskPortItem5 def s elements[1] end def tf_inout_declaration elements[2] end end module TaskPortItem6 def to_ast n :task_port_item, *elements_to_ast end end def _nt_task_port_item start_index = index if node_cache[:task_port_item].has_key?(index) cached = node_cache[:task_port_item][index] if cached node_cache[:task_port_item][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(TaskPortItem0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s1 << r2 if r2 r6 = _nt_s s1 << r6 if r6 r7 = _nt_tf_input_declaration s1 << r7 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(TaskPortItem1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(TaskPortItem6) r0.extend(TaskPortItem6) else i8, s8 = index, [] s9, i9 = [], index loop do i10, s10 = index, [] r11 = _nt_s s10 << r11 if r11 r12 = _nt_attribute_instance s10 << r12 end if s10.last r10 = instantiate_node(SyntaxNode,input, i10...index, s10) r10.extend(TaskPortItem2) else @index = i10 r10 = nil end if r10 s9 << r10 else break end end r9 = instantiate_node(SyntaxNode,input, i9...index, s9) s8 << r9 if r9 r13 = _nt_s s8 << r13 if r13 r14 = _nt_tf_output_declaration s8 << r14 end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(TaskPortItem3) else @index = i8 r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 r0.extend(TaskPortItem6) r0.extend(TaskPortItem6) else i15, s15 = index, [] s16, i16 = [], index loop do i17, s17 = index, [] r18 = _nt_s s17 << r18 if r18 r19 = _nt_attribute_instance s17 << r19 end if s17.last r17 = instantiate_node(SyntaxNode,input, i17...index, s17) r17.extend(TaskPortItem4) else @index = i17 r17 = nil end if r17 s16 << r17 else break end end r16 = instantiate_node(SyntaxNode,input, i16...index, s16) s15 << r16 if r16 r20 = _nt_s s15 << r20 if r20 r21 = _nt_tf_inout_declaration s15 << r21 end end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(TaskPortItem5) else @index = i15 r15 = nil end if r15 r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true r0 = r15 r0.extend(TaskPortItem6) r0.extend(TaskPortItem6) else @index = i0 r0 = nil end end end node_cache[:task_port_item][start_index] = r0 r0 end module TfInputDeclaration0 def s1 elements[1] end def s2 elements[3] end def s3 elements[6] end def list_of_port_identifiers elements[7] end end module TfInputDeclaration1 def s1 elements[1] end def task_port_type elements[2] end def s2 elements[3] end def list_of_port_identifiers elements[4] end end module TfInputDeclaration2 def to_ast n :tf_input_declaration, *elements_to_ast end end def _nt_tf_input_declaration start_index = index if node_cache[:tf_input_declaration].has_key?(index) cached = node_cache[:tf_input_declaration][index] if cached node_cache[:tf_input_declaration][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?("input", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"input"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r5 = _nt_reg if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 r6 = _nt_s s1 << r6 if r6 r8 = _nt_signed if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s1 << r7 if r7 r10 = _nt_range if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s1 << r9 if r9 r11 = _nt_s s1 << r11 if r11 r12 = _nt_list_of_port_identifiers s1 << r12 end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(TfInputDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(TfInputDeclaration2) r0.extend(TfInputDeclaration2) else i13, s13 = index, [] if (match_len = has_terminal?("input", false, index)) r14 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"input"') r14 = nil end s13 << r14 if r14 r15 = _nt_s s13 << r15 if r15 r16 = _nt_task_port_type s13 << r16 if r16 r17 = _nt_s s13 << r17 if r17 r18 = _nt_list_of_port_identifiers s13 << r18 end end end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(TfInputDeclaration1) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(TfInputDeclaration2) r0.extend(TfInputDeclaration2) else @index = i0 r0 = nil end end node_cache[:tf_input_declaration][start_index] = r0 r0 end module TfOutputDeclaration0 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def list_of_port_identifiers elements[8] end end module TfOutputDeclaration1 def s1 elements[1] end def task_port_type elements[2] end def s2 elements[3] end def list_of_port_identifiers elements[4] end end module TfOutputDeclaration2 def to_ast n :tf_output_declaration, *elements_to_ast end end def _nt_tf_output_declaration start_index = index if node_cache[:tf_output_declaration].has_key?(index) cached = node_cache[:tf_output_declaration][index] if cached node_cache[:tf_output_declaration][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?("output", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"output"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r5 = _nt_reg if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 r6 = _nt_s s1 << r6 if r6 r8 = _nt_signed if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s1 << r7 if r7 r9 = _nt_s s1 << r9 if r9 r11 = _nt_range if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s1 << r10 if r10 r12 = _nt_s s1 << r12 if r12 r13 = _nt_list_of_port_identifiers s1 << r13 end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(TfOutputDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(TfOutputDeclaration2) r0.extend(TfOutputDeclaration2) else i14, s14 = index, [] if (match_len = has_terminal?("output", false, index)) r15 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"output"') r15 = nil end s14 << r15 if r15 r16 = _nt_s s14 << r16 if r16 r17 = _nt_task_port_type s14 << r17 if r17 r18 = _nt_s s14 << r18 if r18 r19 = _nt_list_of_port_identifiers s14 << r19 end end end end if s14.last r14 = instantiate_node(SyntaxNode,input, i14...index, s14) r14.extend(TfOutputDeclaration1) else @index = i14 r14 = nil end if r14 r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true r0 = r14 r0.extend(TfOutputDeclaration2) r0.extend(TfOutputDeclaration2) else @index = i0 r0 = nil end end node_cache[:tf_output_declaration][start_index] = r0 r0 end module TfInoutDeclaration0 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def list_of_port_identifiers elements[8] end end module TfInoutDeclaration1 def s1 elements[1] end def task_port_type elements[2] end def s2 elements[3] end def list_of_port_identifiers elements[4] end end module TfInoutDeclaration2 def to_ast n :tf_inout_declaration, *elements_to_ast end end def _nt_tf_inout_declaration start_index = index if node_cache[:tf_inout_declaration].has_key?(index) cached = node_cache[:tf_inout_declaration][index] if cached node_cache[:tf_inout_declaration][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?("inout", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"inout"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r5 = _nt_reg if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 r6 = _nt_s s1 << r6 if r6 r8 = _nt_signed if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s1 << r7 if r7 r9 = _nt_s s1 << r9 if r9 r11 = _nt_range if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s1 << r10 if r10 r12 = _nt_s s1 << r12 if r12 r13 = _nt_list_of_port_identifiers s1 << r13 end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(TfInoutDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(TfInoutDeclaration2) r0.extend(TfInoutDeclaration2) else i14, s14 = index, [] if (match_len = has_terminal?("inout", false, index)) r15 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"inout"') r15 = nil end s14 << r15 if r15 r16 = _nt_s s14 << r16 if r16 r17 = _nt_task_port_type s14 << r17 if r17 r18 = _nt_s s14 << r18 if r18 r19 = _nt_list_of_port_identifiers s14 << r19 end end end end if s14.last r14 = instantiate_node(SyntaxNode,input, i14...index, s14) r14.extend(TfInoutDeclaration1) else @index = i14 r14 = nil end if r14 r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true r0 = r14 r0.extend(TfInoutDeclaration2) r0.extend(TfInoutDeclaration2) else @index = i0 r0 = nil end end node_cache[:tf_inout_declaration][start_index] = r0 r0 end module TaskPortType0 def to_ast n :task_port_type, text_value end end def _nt_task_port_type start_index = index if node_cache[:task_port_type].has_key?(index) cached = node_cache[:task_port_type][index] if cached node_cache[:task_port_type][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?("integer", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"integer"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(TaskPortType0) r0.extend(TaskPortType0) else if (match_len = has_terminal?("real", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"real"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(TaskPortType0) r0.extend(TaskPortType0) else if (match_len = has_terminal?("realtime", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"realtime"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(TaskPortType0) r0.extend(TaskPortType0) else if (match_len = has_terminal?("time", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"time"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(TaskPortType0) r0.extend(TaskPortType0) else @index = i0 r0 = nil end end end end node_cache[:task_port_type][start_index] = r0 r0 end module BlockItemDeclaration0 def s elements[0] end def attribute_instance elements[1] end end module BlockItemDeclaration1 def s1 elements[1] end def reg elements[2] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def list_of_block_variable_identifiers elements[8] end def s5 elements[9] end end module BlockItemDeclaration2 def s elements[0] end def attribute_instance elements[1] end end module BlockItemDeclaration3 def s1 elements[1] end def integer elements[2] end def s2 elements[3] end def list_of_block_variable_identifiers elements[4] end def s3 elements[5] end end module BlockItemDeclaration4 def s elements[0] end def attribute_instance elements[1] end end module BlockItemDeclaration5 def s1 elements[1] end def time elements[2] end def s2 elements[3] end def list_of_block_variable_identifiers elements[4] end def s3 elements[5] end end module BlockItemDeclaration6 def s elements[0] end def attribute_instance elements[1] end end module BlockItemDeclaration7 def s1 elements[1] end def real elements[2] end def s2 elements[3] end def list_of_block_real_identifiers elements[4] end def s3 elements[5] end end module BlockItemDeclaration8 def s elements[0] end def attribute_instance elements[1] end end module BlockItemDeclaration9 def s1 elements[1] end def realtime elements[2] end def s2 elements[3] end def list_of_block_real_identifiers elements[4] end def s3 elements[5] end end module BlockItemDeclaration10 def s elements[0] end def attribute_instance elements[1] end end module BlockItemDeclaration11 def s elements[1] end def event_declaration elements[2] end end module BlockItemDeclaration12 def s elements[0] end def attribute_instance elements[1] end end module BlockItemDeclaration13 def s1 elements[1] end def local_parameter_declaration elements[2] end def s2 elements[3] end end module BlockItemDeclaration14 def s elements[0] end def attribute_instance elements[1] end end module BlockItemDeclaration15 def s1 elements[1] end def parameter_declaration elements[2] end def s2 elements[3] end end module BlockItemDeclaration16 def to_ast n :block_item_declaration, *elements_to_ast end end def _nt_block_item_declaration start_index = index if node_cache[:block_item_declaration].has_key?(index) cached = node_cache[:block_item_declaration][index] if cached node_cache[:block_item_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(BlockItemDeclaration0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s1 << r2 if r2 r6 = _nt_s s1 << r6 if r6 r7 = _nt_reg s1 << r7 if r7 r8 = _nt_s s1 << r8 if r8 r10 = _nt_signed if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s1 << r9 if r9 r11 = _nt_s s1 << r11 if r11 r13 = _nt_range if r13 r12 = r13 else r12 = instantiate_node(SyntaxNode,input, index...index) end s1 << r12 if r12 r14 = _nt_s s1 << r14 if r14 r15 = _nt_list_of_block_variable_identifiers s1 << r15 if r15 r16 = _nt_s s1 << r16 if r16 if (match_len = has_terminal?(";", false, index)) r17 = true @index += match_len else terminal_parse_failure('";"') r17 = nil end s1 << r17 end end end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(BlockItemDeclaration1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(BlockItemDeclaration16) r0.extend(BlockItemDeclaration16) else i18, s18 = index, [] s19, i19 = [], index loop do i20, s20 = index, [] r21 = _nt_s s20 << r21 if r21 r22 = _nt_attribute_instance s20 << r22 end if s20.last r20 = instantiate_node(SyntaxNode,input, i20...index, s20) r20.extend(BlockItemDeclaration2) else @index = i20 r20 = nil end if r20 s19 << r20 else break end end r19 = instantiate_node(SyntaxNode,input, i19...index, s19) s18 << r19 if r19 r23 = _nt_s s18 << r23 if r23 r24 = _nt_integer s18 << r24 if r24 r25 = _nt_s s18 << r25 if r25 r26 = _nt_list_of_block_variable_identifiers s18 << r26 if r26 r27 = _nt_s s18 << r27 if r27 if (match_len = has_terminal?(";", false, index)) r28 = true @index += match_len else terminal_parse_failure('";"') r28 = nil end s18 << r28 end end end end end end if s18.last r18 = instantiate_node(SyntaxNode,input, i18...index, s18) r18.extend(BlockItemDeclaration3) else @index = i18 r18 = nil end if r18 r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true r0 = r18 r0.extend(BlockItemDeclaration16) r0.extend(BlockItemDeclaration16) else i29, s29 = index, [] s30, i30 = [], index loop do i31, s31 = index, [] r32 = _nt_s s31 << r32 if r32 r33 = _nt_attribute_instance s31 << r33 end if s31.last r31 = instantiate_node(SyntaxNode,input, i31...index, s31) r31.extend(BlockItemDeclaration4) else @index = i31 r31 = nil end if r31 s30 << r31 else break end end r30 = instantiate_node(SyntaxNode,input, i30...index, s30) s29 << r30 if r30 r34 = _nt_s s29 << r34 if r34 r35 = _nt_time s29 << r35 if r35 r36 = _nt_s s29 << r36 if r36 r37 = _nt_list_of_block_variable_identifiers s29 << r37 if r37 r38 = _nt_s s29 << r38 if r38 if (match_len = has_terminal?(";", false, index)) r39 = true @index += match_len else terminal_parse_failure('";"') r39 = nil end s29 << r39 end end end end end end if s29.last r29 = instantiate_node(SyntaxNode,input, i29...index, s29) r29.extend(BlockItemDeclaration5) else @index = i29 r29 = nil end if r29 r29 = SyntaxNode.new(input, (index-1)...index) if r29 == true r0 = r29 r0.extend(BlockItemDeclaration16) r0.extend(BlockItemDeclaration16) else i40, s40 = index, [] s41, i41 = [], index loop do i42, s42 = index, [] r43 = _nt_s s42 << r43 if r43 r44 = _nt_attribute_instance s42 << r44 end if s42.last r42 = instantiate_node(SyntaxNode,input, i42...index, s42) r42.extend(BlockItemDeclaration6) else @index = i42 r42 = nil end if r42 s41 << r42 else break end end r41 = instantiate_node(SyntaxNode,input, i41...index, s41) s40 << r41 if r41 r45 = _nt_s s40 << r45 if r45 r46 = _nt_real s40 << r46 if r46 r47 = _nt_s s40 << r47 if r47 r48 = _nt_list_of_block_real_identifiers s40 << r48 if r48 r49 = _nt_s s40 << r49 if r49 if (match_len = has_terminal?(";", false, index)) r50 = true @index += match_len else terminal_parse_failure('";"') r50 = nil end s40 << r50 end end end end end end if s40.last r40 = instantiate_node(SyntaxNode,input, i40...index, s40) r40.extend(BlockItemDeclaration7) else @index = i40 r40 = nil end if r40 r40 = SyntaxNode.new(input, (index-1)...index) if r40 == true r0 = r40 r0.extend(BlockItemDeclaration16) r0.extend(BlockItemDeclaration16) else i51, s51 = index, [] s52, i52 = [], index loop do i53, s53 = index, [] r54 = _nt_s s53 << r54 if r54 r55 = _nt_attribute_instance s53 << r55 end if s53.last r53 = instantiate_node(SyntaxNode,input, i53...index, s53) r53.extend(BlockItemDeclaration8) else @index = i53 r53 = nil end if r53 s52 << r53 else break end end r52 = instantiate_node(SyntaxNode,input, i52...index, s52) s51 << r52 if r52 r56 = _nt_s s51 << r56 if r56 r57 = _nt_realtime s51 << r57 if r57 r58 = _nt_s s51 << r58 if r58 r59 = _nt_list_of_block_real_identifiers s51 << r59 if r59 r60 = _nt_s s51 << r60 if r60 if (match_len = has_terminal?(";", false, index)) r61 = true @index += match_len else terminal_parse_failure('";"') r61 = nil end s51 << r61 end end end end end end if s51.last r51 = instantiate_node(SyntaxNode,input, i51...index, s51) r51.extend(BlockItemDeclaration9) else @index = i51 r51 = nil end if r51 r51 = SyntaxNode.new(input, (index-1)...index) if r51 == true r0 = r51 r0.extend(BlockItemDeclaration16) r0.extend(BlockItemDeclaration16) else i62, s62 = index, [] s63, i63 = [], index loop do i64, s64 = index, [] r65 = _nt_s s64 << r65 if r65 r66 = _nt_attribute_instance s64 << r66 end if s64.last r64 = instantiate_node(SyntaxNode,input, i64...index, s64) r64.extend(BlockItemDeclaration10) else @index = i64 r64 = nil end if r64 s63 << r64 else break end end r63 = instantiate_node(SyntaxNode,input, i63...index, s63) s62 << r63 if r63 r67 = _nt_s s62 << r67 if r67 r68 = _nt_event_declaration s62 << r68 end end if s62.last r62 = instantiate_node(SyntaxNode,input, i62...index, s62) r62.extend(BlockItemDeclaration11) else @index = i62 r62 = nil end if r62 r62 = SyntaxNode.new(input, (index-1)...index) if r62 == true r0 = r62 r0.extend(BlockItemDeclaration16) r0.extend(BlockItemDeclaration16) else i69, s69 = index, [] s70, i70 = [], index loop do i71, s71 = index, [] r72 = _nt_s s71 << r72 if r72 r73 = _nt_attribute_instance s71 << r73 end if s71.last r71 = instantiate_node(SyntaxNode,input, i71...index, s71) r71.extend(BlockItemDeclaration12) else @index = i71 r71 = nil end if r71 s70 << r71 else break end end r70 = instantiate_node(SyntaxNode,input, i70...index, s70) s69 << r70 if r70 r74 = _nt_s s69 << r74 if r74 r75 = _nt_local_parameter_declaration s69 << r75 if r75 r76 = _nt_s s69 << r76 if r76 if (match_len = has_terminal?(";", false, index)) r77 = true @index += match_len else terminal_parse_failure('";"') r77 = nil end s69 << r77 end end end end if s69.last r69 = instantiate_node(SyntaxNode,input, i69...index, s69) r69.extend(BlockItemDeclaration13) else @index = i69 r69 = nil end if r69 r69 = SyntaxNode.new(input, (index-1)...index) if r69 == true r0 = r69 r0.extend(BlockItemDeclaration16) r0.extend(BlockItemDeclaration16) else i78, s78 = index, [] s79, i79 = [], index loop do i80, s80 = index, [] r81 = _nt_s s80 << r81 if r81 r82 = _nt_attribute_instance s80 << r82 end if s80.last r80 = instantiate_node(SyntaxNode,input, i80...index, s80) r80.extend(BlockItemDeclaration14) else @index = i80 r80 = nil end if r80 s79 << r80 else break end end r79 = instantiate_node(SyntaxNode,input, i79...index, s79) s78 << r79 if r79 r83 = _nt_s s78 << r83 if r83 r84 = _nt_parameter_declaration s78 << r84 if r84 r85 = _nt_s s78 << r85 if r85 if (match_len = has_terminal?(";", false, index)) r86 = true @index += match_len else terminal_parse_failure('";"') r86 = nil end s78 << r86 end end end end if s78.last r78 = instantiate_node(SyntaxNode,input, i78...index, s78) r78.extend(BlockItemDeclaration15) else @index = i78 r78 = nil end if r78 r78 = SyntaxNode.new(input, (index-1)...index) if r78 == true r0 = r78 r0.extend(BlockItemDeclaration16) r0.extend(BlockItemDeclaration16) else @index = i0 r0 = nil end end end end end end end end node_cache[:block_item_declaration][start_index] = r0 r0 end module ListOfBlockVariableIdentifiers0 def s1 elements[0] end def s2 elements[2] end def block_variable_type elements[3] end end module ListOfBlockVariableIdentifiers1 def block_variable_type elements[0] end end module ListOfBlockVariableIdentifiers2 def to_ast n :list_of_block_variable_identifiers, *elements_to_ast end end def _nt_list_of_block_variable_identifiers start_index = index if node_cache[:list_of_block_variable_identifiers].has_key?(index) cached = node_cache[:list_of_block_variable_identifiers][index] if cached node_cache[:list_of_block_variable_identifiers][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_block_variable_type s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_block_variable_type s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfBlockVariableIdentifiers0) else @index = i3 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(ListOfBlockVariableIdentifiers1) r0.extend(ListOfBlockVariableIdentifiers2) else @index = i0 r0 = nil end node_cache[:list_of_block_variable_identifiers][start_index] = r0 r0 end module ListOfBlockRealIdentifiers0 def s1 elements[0] end def s2 elements[2] end def block_real_type elements[3] end end module ListOfBlockRealIdentifiers1 def block_real_type elements[0] end end module ListOfBlockRealIdentifiers2 def to_ast n :list_of_block_real_identifiers, *elements_to_ast end end def _nt_list_of_block_real_identifiers start_index = index if node_cache[:list_of_block_real_identifiers].has_key?(index) cached = node_cache[:list_of_block_real_identifiers][index] if cached node_cache[:list_of_block_real_identifiers][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_block_real_type s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_block_real_type s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfBlockRealIdentifiers0) else @index = i3 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(ListOfBlockRealIdentifiers1) r0.extend(ListOfBlockRealIdentifiers2) else @index = i0 r0 = nil end node_cache[:list_of_block_real_identifiers][start_index] = r0 r0 end module BlockVariableType0 def s elements[0] end def dimension elements[1] end end module BlockVariableType1 def variable_identifier elements[0] end end module BlockVariableType2 def to_ast n :block_variable_type, *elements_to_ast end end def _nt_block_variable_type start_index = index if node_cache[:block_variable_type].has_key?(index) cached = node_cache[:block_variable_type][index] if cached node_cache[:block_variable_type][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_variable_identifier s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_dimension s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(BlockVariableType0) else @index = i3 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(BlockVariableType1) r0.extend(BlockVariableType2) else @index = i0 r0 = nil end node_cache[:block_variable_type][start_index] = r0 r0 end module BlockRealType0 def s elements[0] end def dimension elements[1] end end module BlockRealType1 def real_identifier elements[0] end end module BlockRealType2 def to_ast n :block_real_type, *elements_to_ast end end def _nt_block_real_type start_index = index if node_cache[:block_real_type].has_key?(index) cached = node_cache[:block_real_type][index] if cached node_cache[:block_real_type][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_real_identifier s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_dimension s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(BlockRealType0) else @index = i3 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(BlockRealType1) r0.extend(BlockRealType2) else @index = i0 r0 = nil end node_cache[:block_real_type][start_index] = r0 r0 end module GateInstantiation0 def s1 elements[0] end def s2 elements[2] end def cmos_switch_instance elements[3] end end module GateInstantiation1 def cmos_switchtype elements[0] end def s1 elements[1] end def s2 elements[3] end def cmos_switch_instance elements[4] end def s3 elements[6] end end module GateInstantiation2 def s1 elements[0] end def s2 elements[2] end def enable_gate_instance elements[3] end end module GateInstantiation3 def enable_gatetype elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def enable_gate_instance elements[6] end def s4 elements[8] end end module GateInstantiation4 def s1 elements[0] end def s2 elements[2] end def mos_switch_instance elements[3] end end module GateInstantiation5 def mos_switchtype elements[0] end def s1 elements[1] end def s2 elements[3] end def mos_switch_instance elements[4] end def s3 elements[6] end end module GateInstantiation6 def s1 elements[0] end def s2 elements[2] end def n_input_gate_instance elements[3] end end module GateInstantiation7 def n_input_gatetype elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def n_input_gate_instance elements[6] end def s4 elements[8] end end module GateInstantiation8 def s1 elements[0] end def s2 elements[2] end def n_output_gate_instance elements[3] end end module GateInstantiation9 def n_output_gatetype elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def n_output_gate_instance elements[6] end def s4 elements[8] end end module GateInstantiation10 def s1 elements[0] end def s2 elements[2] end def pass_enable_switch_instance elements[3] end end module GateInstantiation11 def pass_en_switchtype elements[0] end def s1 elements[1] end def s2 elements[3] end def pass_enable_switch_instance elements[4] end def s3 elements[6] end end module GateInstantiation12 def s1 elements[0] end def s2 elements[2] end def pass_switch_instance elements[3] end end module GateInstantiation13 def pass_switchtype elements[0] end def s1 elements[1] end def pass_switch_instance elements[2] end def s2 elements[4] end end module GateInstantiation14 def s1 elements[0] end def s2 elements[2] end def pull_gate_instance elements[3] end end module GateInstantiation15 def s1 elements[1] end def s2 elements[3] end def pull_gate_instance elements[4] end def s3 elements[6] end end module GateInstantiation16 def s1 elements[0] end def s2 elements[2] end def pull_gate_instance elements[3] end end module GateInstantiation17 def s1 elements[1] end def s2 elements[3] end def pull_gate_instance elements[4] end def s3 elements[6] end end module GateInstantiation18 def to_ast n :gate_instantiation, *elements_to_ast end end def _nt_gate_instantiation start_index = index if node_cache[:gate_instantiation].has_key?(index) cached = node_cache[:gate_instantiation][index] if cached node_cache[:gate_instantiation][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_cmos_switchtype s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r5 = _nt_delay3 if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s1 << r4 if r4 r6 = _nt_s s1 << r6 if r6 r7 = _nt_cmos_switch_instance s1 << r7 if r7 s8, i8 = [], index loop do i9, s9 = index, [] r10 = _nt_s s9 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s9 << r11 if r11 r12 = _nt_s s9 << r12 if r12 r13 = _nt_cmos_switch_instance s9 << r13 end end end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(GateInstantiation0) else @index = i9 r9 = nil end if r9 s8 << r9 else break end end r8 = instantiate_node(SyntaxNode,input, i8...index, s8) s1 << r8 if r8 r14 = _nt_s s1 << r14 if r14 if (match_len = has_terminal?(";", false, index)) r15 = true @index += match_len else terminal_parse_failure('";"') r15 = nil end s1 << r15 end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(GateInstantiation1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(GateInstantiation18) r0.extend(GateInstantiation18) else i16, s16 = index, [] r17 = _nt_enable_gatetype s16 << r17 if r17 r18 = _nt_s s16 << r18 if r18 r20 = _nt_drive_strength if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s16 << r19 if r19 r21 = _nt_s s16 << r21 if r21 r23 = _nt_delay3 if r23 r22 = r23 else r22 = instantiate_node(SyntaxNode,input, index...index) end s16 << r22 if r22 r24 = _nt_s s16 << r24 if r24 r25 = _nt_enable_gate_instance s16 << r25 if r25 s26, i26 = [], index loop do i27, s27 = index, [] r28 = _nt_s s27 << r28 if r28 if (match_len = has_terminal?(",", false, index)) r29 = true @index += match_len else terminal_parse_failure('","') r29 = nil end s27 << r29 if r29 r30 = _nt_s s27 << r30 if r30 r31 = _nt_enable_gate_instance s27 << r31 end end end if s27.last r27 = instantiate_node(SyntaxNode,input, i27...index, s27) r27.extend(GateInstantiation2) else @index = i27 r27 = nil end if r27 s26 << r27 else break end end r26 = instantiate_node(SyntaxNode,input, i26...index, s26) s16 << r26 if r26 r32 = _nt_s s16 << r32 if r32 if (match_len = has_terminal?(";", false, index)) r33 = true @index += match_len else terminal_parse_failure('";"') r33 = nil end s16 << r33 end end end end end end end end end if s16.last r16 = instantiate_node(SyntaxNode,input, i16...index, s16) r16.extend(GateInstantiation3) else @index = i16 r16 = nil end if r16 r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true r0 = r16 r0.extend(GateInstantiation18) r0.extend(GateInstantiation18) else i34, s34 = index, [] r35 = _nt_mos_switchtype s34 << r35 if r35 r36 = _nt_s s34 << r36 if r36 r38 = _nt_delay3 if r38 r37 = r38 else r37 = instantiate_node(SyntaxNode,input, index...index) end s34 << r37 if r37 r39 = _nt_s s34 << r39 if r39 r40 = _nt_mos_switch_instance s34 << r40 if r40 s41, i41 = [], index loop do i42, s42 = index, [] r43 = _nt_s 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 if r44 r45 = _nt_s s42 << r45 if r45 r46 = _nt_mos_switch_instance s42 << r46 end end end if s42.last r42 = instantiate_node(SyntaxNode,input, i42...index, s42) r42.extend(GateInstantiation4) else @index = i42 r42 = nil end if r42 s41 << r42 else break end end r41 = instantiate_node(SyntaxNode,input, i41...index, s41) s34 << r41 if r41 r47 = _nt_s s34 << r47 if r47 if (match_len = has_terminal?(";", false, index)) r48 = true @index += match_len else terminal_parse_failure('";"') r48 = nil end s34 << r48 end end end end end end end if s34.last r34 = instantiate_node(SyntaxNode,input, i34...index, s34) r34.extend(GateInstantiation5) else @index = i34 r34 = nil end if r34 r34 = SyntaxNode.new(input, (index-1)...index) if r34 == true r0 = r34 r0.extend(GateInstantiation18) r0.extend(GateInstantiation18) else i49, s49 = index, [] r50 = _nt_n_input_gatetype s49 << r50 if r50 r51 = _nt_s s49 << r51 if r51 r53 = _nt_drive_strength if r53 r52 = r53 else r52 = instantiate_node(SyntaxNode,input, index...index) end s49 << r52 if r52 r54 = _nt_s s49 << r54 if r54 r56 = _nt_delay2 if r56 r55 = r56 else r55 = instantiate_node(SyntaxNode,input, index...index) end s49 << r55 if r55 r57 = _nt_s s49 << r57 if r57 r58 = _nt_n_input_gate_instance s49 << r58 if r58 s59, i59 = [], index loop do i60, s60 = index, [] r61 = _nt_s s60 << r61 if r61 if (match_len = has_terminal?(",", false, index)) r62 = true @index += match_len else terminal_parse_failure('","') r62 = nil end s60 << r62 if r62 r63 = _nt_s s60 << r63 if r63 r64 = _nt_n_input_gate_instance s60 << r64 end end end if s60.last r60 = instantiate_node(SyntaxNode,input, i60...index, s60) r60.extend(GateInstantiation6) else @index = i60 r60 = nil end if r60 s59 << r60 else break end end r59 = instantiate_node(SyntaxNode,input, i59...index, s59) s49 << r59 if r59 r65 = _nt_s s49 << r65 if r65 if (match_len = has_terminal?(";", false, index)) r66 = true @index += match_len else terminal_parse_failure('";"') r66 = nil end s49 << r66 end end end end end end end end end if s49.last r49 = instantiate_node(SyntaxNode,input, i49...index, s49) r49.extend(GateInstantiation7) else @index = i49 r49 = nil end if r49 r49 = SyntaxNode.new(input, (index-1)...index) if r49 == true r0 = r49 r0.extend(GateInstantiation18) r0.extend(GateInstantiation18) else i67, s67 = index, [] r68 = _nt_n_output_gatetype s67 << r68 if r68 r69 = _nt_s s67 << r69 if r69 r71 = _nt_drive_strength if r71 r70 = r71 else r70 = instantiate_node(SyntaxNode,input, index...index) end s67 << r70 if r70 r72 = _nt_s s67 << r72 if r72 r74 = _nt_delay2 if r74 r73 = r74 else r73 = instantiate_node(SyntaxNode,input, index...index) end s67 << r73 if r73 r75 = _nt_s s67 << r75 if r75 r76 = _nt_n_output_gate_instance s67 << r76 if r76 s77, i77 = [], index loop do i78, s78 = index, [] r79 = _nt_s s78 << r79 if r79 if (match_len = has_terminal?(",", false, index)) r80 = true @index += match_len else terminal_parse_failure('","') r80 = nil end s78 << r80 if r80 r81 = _nt_s s78 << r81 if r81 r82 = _nt_n_output_gate_instance s78 << r82 end end end if s78.last r78 = instantiate_node(SyntaxNode,input, i78...index, s78) r78.extend(GateInstantiation8) else @index = i78 r78 = nil end if r78 s77 << r78 else break end end r77 = instantiate_node(SyntaxNode,input, i77...index, s77) s67 << r77 if r77 r83 = _nt_s s67 << r83 if r83 if (match_len = has_terminal?(";", false, index)) r84 = true @index += match_len else terminal_parse_failure('";"') r84 = nil end s67 << r84 end end end end end end end end end if s67.last r67 = instantiate_node(SyntaxNode,input, i67...index, s67) r67.extend(GateInstantiation9) else @index = i67 r67 = nil end if r67 r67 = SyntaxNode.new(input, (index-1)...index) if r67 == true r0 = r67 r0.extend(GateInstantiation18) r0.extend(GateInstantiation18) else i85, s85 = index, [] r86 = _nt_pass_en_switchtype s85 << r86 if r86 r87 = _nt_s s85 << r87 if r87 r89 = _nt_delay2 if r89 r88 = r89 else r88 = instantiate_node(SyntaxNode,input, index...index) end s85 << r88 if r88 r90 = _nt_s s85 << r90 if r90 r91 = _nt_pass_enable_switch_instance s85 << r91 if r91 s92, i92 = [], index loop do i93, s93 = index, [] r94 = _nt_s s93 << r94 if r94 if (match_len = has_terminal?(",", false, index)) r95 = true @index += match_len else terminal_parse_failure('","') r95 = nil end s93 << r95 if r95 r96 = _nt_s s93 << r96 if r96 r97 = _nt_pass_enable_switch_instance s93 << r97 end end end if s93.last r93 = instantiate_node(SyntaxNode,input, i93...index, s93) r93.extend(GateInstantiation10) else @index = i93 r93 = nil end if r93 s92 << r93 else break end end r92 = instantiate_node(SyntaxNode,input, i92...index, s92) s85 << r92 if r92 r98 = _nt_s s85 << r98 if r98 if (match_len = has_terminal?(";", false, index)) r99 = true @index += match_len else terminal_parse_failure('";"') r99 = nil end s85 << r99 end end end end end end end if s85.last r85 = instantiate_node(SyntaxNode,input, i85...index, s85) r85.extend(GateInstantiation11) else @index = i85 r85 = nil end if r85 r85 = SyntaxNode.new(input, (index-1)...index) if r85 == true r0 = r85 r0.extend(GateInstantiation18) r0.extend(GateInstantiation18) else i100, s100 = index, [] r101 = _nt_pass_switchtype s100 << r101 if r101 r102 = _nt_s s100 << r102 if r102 r103 = _nt_pass_switch_instance s100 << r103 if r103 s104, i104 = [], index loop do i105, s105 = index, [] r106 = _nt_s s105 << r106 if r106 if (match_len = has_terminal?(",", false, index)) r107 = true @index += match_len else terminal_parse_failure('","') r107 = nil end s105 << r107 if r107 r108 = _nt_s s105 << r108 if r108 r109 = _nt_pass_switch_instance s105 << r109 end end end if s105.last r105 = instantiate_node(SyntaxNode,input, i105...index, s105) r105.extend(GateInstantiation12) else @index = i105 r105 = nil end if r105 s104 << r105 else break end end r104 = instantiate_node(SyntaxNode,input, i104...index, s104) s100 << r104 if r104 r110 = _nt_s s100 << r110 if r110 if (match_len = has_terminal?(";", false, index)) r111 = true @index += match_len else terminal_parse_failure('";"') r111 = nil end s100 << r111 end end end end end if s100.last r100 = instantiate_node(SyntaxNode,input, i100...index, s100) r100.extend(GateInstantiation13) else @index = i100 r100 = nil end if r100 r100 = SyntaxNode.new(input, (index-1)...index) if r100 == true r0 = r100 r0.extend(GateInstantiation18) r0.extend(GateInstantiation18) else i112, s112 = index, [] if (match_len = has_terminal?("pulldown", false, index)) r113 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"pulldown"') r113 = nil end s112 << r113 if r113 r114 = _nt_s s112 << r114 if r114 r116 = _nt_pulldown_strength if r116 r115 = r116 else r115 = instantiate_node(SyntaxNode,input, index...index) end s112 << r115 if r115 r117 = _nt_s s112 << r117 if r117 r118 = _nt_pull_gate_instance s112 << r118 if r118 s119, i119 = [], index loop do i120, s120 = index, [] r121 = _nt_s s120 << r121 if r121 if (match_len = has_terminal?(",", false, index)) r122 = true @index += match_len else terminal_parse_failure('","') r122 = nil end s120 << r122 if r122 r123 = _nt_s s120 << r123 if r123 r124 = _nt_pull_gate_instance s120 << r124 end end end if s120.last r120 = instantiate_node(SyntaxNode,input, i120...index, s120) r120.extend(GateInstantiation14) else @index = i120 r120 = nil end if r120 s119 << r120 else break end end r119 = instantiate_node(SyntaxNode,input, i119...index, s119) s112 << r119 if r119 r125 = _nt_s s112 << r125 if r125 if (match_len = has_terminal?(";", false, index)) r126 = true @index += match_len else terminal_parse_failure('";"') r126 = nil end s112 << r126 end end end end end end end if s112.last r112 = instantiate_node(SyntaxNode,input, i112...index, s112) r112.extend(GateInstantiation15) else @index = i112 r112 = nil end if r112 r112 = SyntaxNode.new(input, (index-1)...index) if r112 == true r0 = r112 r0.extend(GateInstantiation18) r0.extend(GateInstantiation18) else i127, s127 = index, [] if (match_len = has_terminal?("pullup", false, index)) r128 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"pullup"') r128 = nil end s127 << r128 if r128 r129 = _nt_s s127 << r129 if r129 r131 = _nt_pullup_strength if r131 r130 = r131 else r130 = instantiate_node(SyntaxNode,input, index...index) end s127 << r130 if r130 r132 = _nt_s s127 << r132 if r132 r133 = _nt_pull_gate_instance s127 << r133 if r133 s134, i134 = [], index loop do i135, s135 = index, [] r136 = _nt_s s135 << r136 if r136 if (match_len = has_terminal?(",", false, index)) r137 = true @index += match_len else terminal_parse_failure('","') r137 = nil end s135 << r137 if r137 r138 = _nt_s s135 << r138 if r138 r139 = _nt_pull_gate_instance s135 << r139 end end end if s135.last r135 = instantiate_node(SyntaxNode,input, i135...index, s135) r135.extend(GateInstantiation16) else @index = i135 r135 = nil end if r135 s134 << r135 else break end end r134 = instantiate_node(SyntaxNode,input, i134...index, s134) s127 << r134 if r134 r140 = _nt_s s127 << r140 if r140 if (match_len = has_terminal?(";", false, index)) r141 = true @index += match_len else terminal_parse_failure('";"') r141 = nil end s127 << r141 end end end end end end end if s127.last r127 = instantiate_node(SyntaxNode,input, i127...index, s127) r127.extend(GateInstantiation17) else @index = i127 r127 = nil end if r127 r127 = SyntaxNode.new(input, (index-1)...index) if r127 == true r0 = r127 r0.extend(GateInstantiation18) r0.extend(GateInstantiation18) else @index = i0 r0 = nil end end end end end end end end end node_cache[:gate_instantiation][start_index] = r0 r0 end module CmosSwitchInstance0 def s1 elements[1] end def s2 elements[3] end def output_terminal elements[4] end def s3 elements[5] end def s4 elements[7] end def input_terminal elements[8] end def s5 elements[9] end def s6 elements[11] end def ncontrol_terminal elements[12] end def s7 elements[13] end def s8 elements[15] end def pcontrol_terminal elements[16] end def s9 elements[17] end end module CmosSwitchInstance1 def to_ast n :cmos_switch_instance, *elements_to_ast end end def _nt_cmos_switch_instance start_index = index if node_cache[:cmos_switch_instance].has_key?(index) cached = node_cache[:cmos_switch_instance][index] if cached node_cache[:cmos_switch_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_name_of_gate_instance if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r6 = _nt_output_terminal s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(",", false, index)) r8 = true @index += match_len else terminal_parse_failure('","') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 r10 = _nt_input_terminal s0 << r10 if r10 r11 = _nt_s s0 << r11 if r11 if (match_len = has_terminal?(",", false, index)) r12 = true @index += match_len else terminal_parse_failure('","') r12 = nil end s0 << r12 if r12 r13 = _nt_s s0 << r13 if r13 r14 = _nt_ncontrol_terminal s0 << r14 if r14 r15 = _nt_s s0 << r15 if r15 if (match_len = has_terminal?(",", false, index)) r16 = true @index += match_len else terminal_parse_failure('","') r16 = nil end s0 << r16 if r16 r17 = _nt_s s0 << r17 if r17 r18 = _nt_pcontrol_terminal s0 << r18 if r18 r19 = _nt_s s0 << r19 if r19 if (match_len = has_terminal?(")", false, index)) r20 = true @index += match_len else terminal_parse_failure('")"') r20 = nil end s0 << r20 end end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(CmosSwitchInstance0) r0.extend(CmosSwitchInstance1) else @index = i0 r0 = nil end node_cache[:cmos_switch_instance][start_index] = r0 r0 end module EnableGateInstance0 def s1 elements[1] end def s2 elements[3] end def output_terminal elements[4] end def s3 elements[5] end def s4 elements[7] end def input_terminal elements[8] end def s5 elements[9] end def s6 elements[11] end def enable_terminal elements[12] end def s7 elements[13] end end module EnableGateInstance1 def to_ast n :enable_gate_instance, *elements_to_ast end end def _nt_enable_gate_instance start_index = index if node_cache[:enable_gate_instance].has_key?(index) cached = node_cache[:enable_gate_instance][index] if cached node_cache[:enable_gate_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_name_of_gate_instance if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r6 = _nt_output_terminal s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(",", false, index)) r8 = true @index += match_len else terminal_parse_failure('","') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 r10 = _nt_input_terminal s0 << r10 if r10 r11 = _nt_s s0 << r11 if r11 if (match_len = has_terminal?(",", false, index)) r12 = true @index += match_len else terminal_parse_failure('","') r12 = nil end s0 << r12 if r12 r13 = _nt_s s0 << r13 if r13 r14 = _nt_enable_terminal s0 << r14 if r14 r15 = _nt_s s0 << r15 if r15 if (match_len = has_terminal?(")", false, index)) r16 = true @index += match_len else terminal_parse_failure('")"') r16 = nil end s0 << r16 end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(EnableGateInstance0) r0.extend(EnableGateInstance1) else @index = i0 r0 = nil end node_cache[:enable_gate_instance][start_index] = r0 r0 end module MosSwitchInstance0 def s1 elements[1] end def s2 elements[3] end def output_terminal elements[4] end def s3 elements[5] end def s4 elements[7] end def input_terminal elements[8] end def s5 elements[9] end def s6 elements[11] end def enable_terminal elements[12] end def s7 elements[13] end end module MosSwitchInstance1 def to_ast n :mos_switch_instance, *elements_to_ast end end def _nt_mos_switch_instance start_index = index if node_cache[:mos_switch_instance].has_key?(index) cached = node_cache[:mos_switch_instance][index] if cached node_cache[:mos_switch_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_name_of_gate_instance if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r6 = _nt_output_terminal s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(",", false, index)) r8 = true @index += match_len else terminal_parse_failure('","') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 r10 = _nt_input_terminal s0 << r10 if r10 r11 = _nt_s s0 << r11 if r11 if (match_len = has_terminal?(",", false, index)) r12 = true @index += match_len else terminal_parse_failure('","') r12 = nil end s0 << r12 if r12 r13 = _nt_s s0 << r13 if r13 r14 = _nt_enable_terminal s0 << r14 if r14 r15 = _nt_s s0 << r15 if r15 if (match_len = has_terminal?(")", false, index)) r16 = true @index += match_len else terminal_parse_failure('")"') r16 = nil end s0 << r16 end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(MosSwitchInstance0) r0.extend(MosSwitchInstance1) else @index = i0 r0 = nil end node_cache[:mos_switch_instance][start_index] = r0 r0 end module NInputGateInstance0 def s elements[0] end def input_terminal elements[2] end end module NInputGateInstance1 def s1 elements[1] end def s2 elements[3] end def output_terminal elements[4] end def s3 elements[5] end def s4 elements[7] end def input_terminal elements[8] end def s5 elements[10] end end module NInputGateInstance2 def to_ast n :n_input_gate_instance, *elements_to_ast end end def _nt_n_input_gate_instance start_index = index if node_cache[:n_input_gate_instance].has_key?(index) cached = node_cache[:n_input_gate_instance][index] if cached node_cache[:n_input_gate_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_name_of_gate_instance if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r6 = _nt_output_terminal s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(",", false, index)) r8 = true @index += match_len else terminal_parse_failure('","') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 r10 = _nt_input_terminal s0 << r10 if r10 s11, i11 = [], index loop do i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 if (match_len = has_terminal?(",", false, index)) r14 = true @index += match_len else terminal_parse_failure('","') r14 = nil end s12 << r14 if r14 r15 = _nt_input_terminal s12 << r15 end end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(NInputGateInstance0) else @index = i12 r12 = nil end if r12 s11 << r12 else break end end r11 = instantiate_node(SyntaxNode,input, i11...index, s11) s0 << r11 if r11 r16 = _nt_s s0 << r16 if r16 if (match_len = has_terminal?(")", false, index)) r17 = true @index += match_len else terminal_parse_failure('")"') r17 = nil end s0 << r17 end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NInputGateInstance1) r0.extend(NInputGateInstance2) else @index = i0 r0 = nil end node_cache[:n_input_gate_instance][start_index] = r0 r0 end module NOutputGateInstance0 def s1 elements[0] end def s2 elements[2] end def output_terminal elements[3] end end module NOutputGateInstance1 def s1 elements[1] end def s2 elements[3] end def output_terminal elements[4] end def s3 elements[6] end def input_terminal elements[8] end def s4 elements[9] end end module NOutputGateInstance2 def to_ast n :n_output_gate_instance, *elements_to_ast end end def _nt_n_output_gate_instance start_index = index if node_cache[:n_output_gate_instance].has_key?(index) cached = node_cache[:n_output_gate_instance][index] if cached node_cache[:n_output_gate_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_name_of_gate_instance if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r6 = _nt_output_terminal s0 << r6 if r6 s7, i7 = [], index loop do i8, s8 = index, [] r9 = _nt_s s8 << r9 if r9 if (match_len = has_terminal?(",", false, index)) r10 = true @index += match_len else terminal_parse_failure('","') r10 = nil end s8 << r10 if r10 r11 = _nt_s s8 << r11 if r11 r12 = _nt_output_terminal s8 << r12 end end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(NOutputGateInstance0) else @index = i8 r8 = nil end if r8 s7 << r8 else break end end r7 = instantiate_node(SyntaxNode,input, i7...index, s7) s0 << r7 if r7 r13 = _nt_s s0 << r13 if r13 if (match_len = has_terminal?(",", false, index)) r14 = true @index += match_len else terminal_parse_failure('","') r14 = nil end s0 << r14 if r14 r15 = _nt_input_terminal s0 << r15 if r15 r16 = _nt_s s0 << r16 if r16 if (match_len = has_terminal?(")", false, index)) r17 = true @index += match_len else terminal_parse_failure('")"') r17 = nil end s0 << r17 end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NOutputGateInstance1) r0.extend(NOutputGateInstance2) else @index = i0 r0 = nil end node_cache[:n_output_gate_instance][start_index] = r0 r0 end module PassSwitchInstance0 def s1 elements[1] end def s2 elements[3] end def inout_terminal1 elements[4] end def s3 elements[5] end def s4 elements[7] end def inout_terminal2 elements[8] end def s5 elements[9] end end module PassSwitchInstance1 def to_ast n :pass_switch_instance, *elements_to_ast end end def _nt_pass_switch_instance start_index = index if node_cache[:pass_switch_instance].has_key?(index) cached = node_cache[:pass_switch_instance][index] if cached node_cache[:pass_switch_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_name_of_gate_instance if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r6 = _nt_inout_terminal s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(",", false, index)) r8 = true @index += match_len else terminal_parse_failure('","') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 r10 = _nt_inout_terminal s0 << r10 if r10 r11 = _nt_s s0 << r11 if r11 if (match_len = has_terminal?(")", false, index)) r12 = true @index += match_len else terminal_parse_failure('")"') r12 = nil end s0 << r12 end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(PassSwitchInstance0) r0.extend(PassSwitchInstance1) else @index = i0 r0 = nil end node_cache[:pass_switch_instance][start_index] = r0 r0 end module PassEnableSwitchInstance0 def s1 elements[1] end def s2 elements[3] end def inout_terminal1 elements[4] end def s3 elements[5] end def s4 elements[7] end def inout_terminal2 elements[8] end def s5 elements[9] end def s6 elements[11] end def enable_terminal elements[12] end def s7 elements[13] end end module PassEnableSwitchInstance1 def to_ast n :pass_enable_switch_instance, *elements_to_ast end end def _nt_pass_enable_switch_instance start_index = index if node_cache[:pass_enable_switch_instance].has_key?(index) cached = node_cache[:pass_enable_switch_instance][index] if cached node_cache[:pass_enable_switch_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_name_of_gate_instance if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r6 = _nt_inout_terminal s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(",", false, index)) r8 = true @index += match_len else terminal_parse_failure('","') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 r10 = _nt_inout_terminal s0 << r10 if r10 r11 = _nt_s s0 << r11 if r11 if (match_len = has_terminal?(",", false, index)) r12 = true @index += match_len else terminal_parse_failure('","') r12 = nil end s0 << r12 if r12 r13 = _nt_s s0 << r13 if r13 r14 = _nt_enable_terminal s0 << r14 if r14 r15 = _nt_s s0 << r15 if r15 if (match_len = has_terminal?(")", false, index)) r16 = true @index += match_len else terminal_parse_failure('")"') r16 = nil end s0 << r16 end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(PassEnableSwitchInstance0) r0.extend(PassEnableSwitchInstance1) else @index = i0 r0 = nil end node_cache[:pass_enable_switch_instance][start_index] = r0 r0 end module PullGateInstance0 def s1 elements[1] end def s2 elements[3] end def output_terminal elements[4] end def s3 elements[5] end end module PullGateInstance1 def to_ast n :pull_gate_instance, *elements_to_ast end end def _nt_pull_gate_instance start_index = index if node_cache[:pull_gate_instance].has_key?(index) cached = node_cache[:pull_gate_instance][index] if cached node_cache[:pull_gate_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_name_of_gate_instance if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r6 = _nt_output_terminal s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(")", false, index)) r8 = true @index += match_len else terminal_parse_failure('")"') r8 = nil end s0 << r8 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(PullGateInstance0) r0.extend(PullGateInstance1) else @index = i0 r0 = nil end node_cache[:pull_gate_instance][start_index] = r0 r0 end module NameOfGateInstance0 def gate_instance_identifier elements[0] end def s elements[1] end end module NameOfGateInstance1 def to_ast n :name_of_gate_instance, *elements_to_ast end end def _nt_name_of_gate_instance start_index = index if node_cache[:name_of_gate_instance].has_key?(index) cached = node_cache[:name_of_gate_instance][index] if cached node_cache[:name_of_gate_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_gate_instance_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_range if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NameOfGateInstance0) r0.extend(NameOfGateInstance1) else @index = i0 r0 = nil end node_cache[:name_of_gate_instance][start_index] = r0 r0 end module PulldownStrength0 def s1 elements[1] end def strength0 elements[2] end def s2 elements[3] end def s3 elements[5] end def strength1 elements[6] end def s4 elements[7] end end module PulldownStrength1 def s1 elements[1] end def strength1 elements[2] end def s2 elements[3] end def s3 elements[5] end def strength0 elements[6] end def s4 elements[7] end end module PulldownStrength2 def s1 elements[1] end def strength0 elements[2] end def s2 elements[3] end end module PulldownStrength3 def to_ast n :pulldown_strength, *elements_to_ast end end def _nt_pulldown_strength start_index = index if node_cache[:pulldown_strength].has_key?(index) cached = node_cache[:pulldown_strength][index] if cached node_cache[:pulldown_strength][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 r3 = _nt_s s1 << r3 if r3 r4 = _nt_strength0 s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 if (match_len = has_terminal?(",", false, index)) r6 = true @index += match_len else terminal_parse_failure('","') r6 = nil end s1 << r6 if r6 r7 = _nt_s s1 << r7 if r7 r8 = _nt_strength1 s1 << r8 if r8 r9 = _nt_s s1 << r9 if r9 if (match_len = has_terminal?(")", false, index)) r10 = true @index += match_len else terminal_parse_failure('")"') r10 = nil end s1 << r10 end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(PulldownStrength0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(PulldownStrength3) r0.extend(PulldownStrength3) 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 r13 = _nt_s s11 << r13 if r13 r14 = _nt_strength1 s11 << r14 if r14 r15 = _nt_s s11 << r15 if r15 if (match_len = has_terminal?(",", false, index)) r16 = true @index += match_len else terminal_parse_failure('","') r16 = nil end s11 << r16 if r16 r17 = _nt_s s11 << r17 if r17 r18 = _nt_strength0 s11 << r18 if r18 r19 = _nt_s s11 << r19 if r19 if (match_len = has_terminal?(")", false, index)) r20 = true @index += match_len else terminal_parse_failure('")"') r20 = nil end s11 << r20 end end end end end end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(PulldownStrength1) else @index = i11 r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(PulldownStrength3) r0.extend(PulldownStrength3) else i21, s21 = index, [] if (match_len = has_terminal?("(", false, index)) r22 = true @index += match_len else terminal_parse_failure('"("') r22 = nil end s21 << r22 if r22 r23 = _nt_s s21 << r23 if r23 r24 = _nt_strength0 s21 << r24 if r24 r25 = _nt_s s21 << r25 if r25 if (match_len = has_terminal?(")", false, index)) r26 = true @index += match_len else terminal_parse_failure('")"') r26 = nil end s21 << r26 end end end end if s21.last r21 = instantiate_node(SyntaxNode,input, i21...index, s21) r21.extend(PulldownStrength2) else @index = i21 r21 = nil end if r21 r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true r0 = r21 r0.extend(PulldownStrength3) r0.extend(PulldownStrength3) else @index = i0 r0 = nil end end end node_cache[:pulldown_strength][start_index] = r0 r0 end module PullupStrength0 def s1 elements[1] end def strength0 elements[2] end def s2 elements[3] end def s3 elements[5] end def strength1 elements[6] end def s4 elements[7] end end module PullupStrength1 def s1 elements[1] end def strength1 elements[2] end def s2 elements[3] end def s3 elements[5] end def strength0 elements[6] end def s4 elements[7] end end module PullupStrength2 def s1 elements[1] end def strength1 elements[2] end def s2 elements[3] end end module PullupStrength3 def to_ast n :pullup_strength, *elements_to_ast end end def _nt_pullup_strength start_index = index if node_cache[:pullup_strength].has_key?(index) cached = node_cache[:pullup_strength][index] if cached node_cache[:pullup_strength][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 r3 = _nt_s s1 << r3 if r3 r4 = _nt_strength0 s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 if (match_len = has_terminal?(",", false, index)) r6 = true @index += match_len else terminal_parse_failure('","') r6 = nil end s1 << r6 if r6 r7 = _nt_s s1 << r7 if r7 r8 = _nt_strength1 s1 << r8 if r8 r9 = _nt_s s1 << r9 if r9 if (match_len = has_terminal?(")", false, index)) r10 = true @index += match_len else terminal_parse_failure('")"') r10 = nil end s1 << r10 end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(PullupStrength0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(PullupStrength3) r0.extend(PullupStrength3) 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 r13 = _nt_s s11 << r13 if r13 r14 = _nt_strength1 s11 << r14 if r14 r15 = _nt_s s11 << r15 if r15 if (match_len = has_terminal?(",", false, index)) r16 = true @index += match_len else terminal_parse_failure('","') r16 = nil end s11 << r16 if r16 r17 = _nt_s s11 << r17 if r17 r18 = _nt_strength0 s11 << r18 if r18 r19 = _nt_s s11 << r19 if r19 if (match_len = has_terminal?(")", false, index)) r20 = true @index += match_len else terminal_parse_failure('")"') r20 = nil end s11 << r20 end end end end end end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(PullupStrength1) else @index = i11 r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(PullupStrength3) r0.extend(PullupStrength3) else i21, s21 = index, [] if (match_len = has_terminal?("(", false, index)) r22 = true @index += match_len else terminal_parse_failure('"("') r22 = nil end s21 << r22 if r22 r23 = _nt_s s21 << r23 if r23 r24 = _nt_strength1 s21 << r24 if r24 r25 = _nt_s s21 << r25 if r25 if (match_len = has_terminal?(")", false, index)) r26 = true @index += match_len else terminal_parse_failure('")"') r26 = nil end s21 << r26 end end end end if s21.last r21 = instantiate_node(SyntaxNode,input, i21...index, s21) r21.extend(PullupStrength2) else @index = i21 r21 = nil end if r21 r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true r0 = r21 r0.extend(PullupStrength3) r0.extend(PullupStrength3) else @index = i0 r0 = nil end end end node_cache[:pullup_strength][start_index] = r0 r0 end module EnableTerminal0 def to_ast n :enable_terminal, *elements_to_ast end end def _nt_enable_terminal start_index = index if node_cache[:enable_terminal].has_key?(index) cached = node_cache[:enable_terminal][index] if cached node_cache[:enable_terminal][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_expression r0.extend(EnableTerminal0) r0.extend(EnableTerminal0) node_cache[:enable_terminal][start_index] = r0 r0 end module InoutTerminal0 def to_ast n :inout_terminal, *elements_to_ast end end def _nt_inout_terminal start_index = index if node_cache[:inout_terminal].has_key?(index) cached = node_cache[:inout_terminal][index] if cached node_cache[:inout_terminal][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_net_lvalue r0.extend(InoutTerminal0) r0.extend(InoutTerminal0) node_cache[:inout_terminal][start_index] = r0 r0 end module InputTerminal0 def to_ast n :input_terminal, *elements_to_ast end end def _nt_input_terminal start_index = index if node_cache[:input_terminal].has_key?(index) cached = node_cache[:input_terminal][index] if cached node_cache[:input_terminal][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_expression r0.extend(InputTerminal0) r0.extend(InputTerminal0) node_cache[:input_terminal][start_index] = r0 r0 end module NcontrolTerminal0 def to_ast n :ncontrol_terminal, *elements_to_ast end end def _nt_ncontrol_terminal start_index = index if node_cache[:ncontrol_terminal].has_key?(index) cached = node_cache[:ncontrol_terminal][index] if cached node_cache[:ncontrol_terminal][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_expression r0.extend(NcontrolTerminal0) r0.extend(NcontrolTerminal0) node_cache[:ncontrol_terminal][start_index] = r0 r0 end module OutputTerminal0 def to_ast n :output_terminal, *elements_to_ast end end def _nt_output_terminal start_index = index if node_cache[:output_terminal].has_key?(index) cached = node_cache[:output_terminal][index] if cached node_cache[:output_terminal][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_net_lvalue r0.extend(OutputTerminal0) r0.extend(OutputTerminal0) node_cache[:output_terminal][start_index] = r0 r0 end module PcontrolTerminal0 def to_ast n :pcontrol_terminal, *elements_to_ast end end def _nt_pcontrol_terminal start_index = index if node_cache[:pcontrol_terminal].has_key?(index) cached = node_cache[:pcontrol_terminal][index] if cached node_cache[:pcontrol_terminal][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_expression r0.extend(PcontrolTerminal0) r0.extend(PcontrolTerminal0) node_cache[:pcontrol_terminal][start_index] = r0 r0 end module CmosSwitchtype0 def to_ast text_value end end def _nt_cmos_switchtype start_index = index if node_cache[:cmos_switchtype].has_key?(index) cached = node_cache[:cmos_switchtype][index] if cached node_cache[:cmos_switchtype][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?("cmos", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"cmos"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(CmosSwitchtype0) r0.extend(CmosSwitchtype0) else if (match_len = has_terminal?("rcmos", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"rcmos"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(CmosSwitchtype0) r0.extend(CmosSwitchtype0) else @index = i0 r0 = nil end end node_cache[:cmos_switchtype][start_index] = r0 r0 end module EnableGatetype0 def to_ast text_value end end def _nt_enable_gatetype start_index = index if node_cache[:enable_gatetype].has_key?(index) cached = node_cache[:enable_gatetype][index] if cached node_cache[:enable_gatetype][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?("bufif0", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"bufif0"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(EnableGatetype0) r0.extend(EnableGatetype0) else if (match_len = has_terminal?("bufif1", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"bufif1"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(EnableGatetype0) r0.extend(EnableGatetype0) else if (match_len = has_terminal?("notif0", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"notif0"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(EnableGatetype0) r0.extend(EnableGatetype0) else if (match_len = has_terminal?("notif1", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"notif1"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(EnableGatetype0) r0.extend(EnableGatetype0) else @index = i0 r0 = nil end end end end node_cache[:enable_gatetype][start_index] = r0 r0 end module MosSwitchtype0 def to_ast text_value end end def _nt_mos_switchtype start_index = index if node_cache[:mos_switchtype].has_key?(index) cached = node_cache[:mos_switchtype][index] if cached node_cache[:mos_switchtype][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?("nmos", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"nmos"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(MosSwitchtype0) r0.extend(MosSwitchtype0) else if (match_len = has_terminal?("pmos", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"pmos"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(MosSwitchtype0) r0.extend(MosSwitchtype0) else if (match_len = has_terminal?("rnmos", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"rnmos"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(MosSwitchtype0) r0.extend(MosSwitchtype0) else if (match_len = has_terminal?("rpmos", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"rpmos"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(MosSwitchtype0) r0.extend(MosSwitchtype0) else @index = i0 r0 = nil end end end end node_cache[:mos_switchtype][start_index] = r0 r0 end module NInputGatetype0 def to_ast text_value end end def _nt_n_input_gatetype start_index = index if node_cache[:n_input_gatetype].has_key?(index) cached = node_cache[:n_input_gatetype][index] if cached node_cache[:n_input_gatetype][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?("and", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"and"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(NInputGatetype0) r0.extend(NInputGatetype0) else if (match_len = has_terminal?("nand", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"nand"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(NInputGatetype0) r0.extend(NInputGatetype0) else if (match_len = has_terminal?("or", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"or"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(NInputGatetype0) r0.extend(NInputGatetype0) else if (match_len = has_terminal?("nor", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"nor"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(NInputGatetype0) r0.extend(NInputGatetype0) else if (match_len = has_terminal?("xor", false, index)) r5 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"xor"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(NInputGatetype0) r0.extend(NInputGatetype0) else if (match_len = has_terminal?("xnor", false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"xnor"') r6 = nil end if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 r0.extend(NInputGatetype0) r0.extend(NInputGatetype0) else @index = i0 r0 = nil end end end end end end node_cache[:n_input_gatetype][start_index] = r0 r0 end module NOutputGatetype0 def to_ast text_value end end def _nt_n_output_gatetype start_index = index if node_cache[:n_output_gatetype].has_key?(index) cached = node_cache[:n_output_gatetype][index] if cached node_cache[:n_output_gatetype][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?("buf", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"buf"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(NOutputGatetype0) r0.extend(NOutputGatetype0) else if (match_len = has_terminal?("not", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"not"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(NOutputGatetype0) r0.extend(NOutputGatetype0) else @index = i0 r0 = nil end end node_cache[:n_output_gatetype][start_index] = r0 r0 end module PassEnSwitchtype0 def to_ast text_value end end def _nt_pass_en_switchtype start_index = index if node_cache[:pass_en_switchtype].has_key?(index) cached = node_cache[:pass_en_switchtype][index] if cached node_cache[:pass_en_switchtype][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?("tranif0", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"tranif0"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(PassEnSwitchtype0) r0.extend(PassEnSwitchtype0) else if (match_len = has_terminal?("tranif1", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"tranif1"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(PassEnSwitchtype0) r0.extend(PassEnSwitchtype0) else if (match_len = has_terminal?("rtranif1", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"rtranif1"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(PassEnSwitchtype0) r0.extend(PassEnSwitchtype0) else if (match_len = has_terminal?("rtranif0", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"rtranif0"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(PassEnSwitchtype0) r0.extend(PassEnSwitchtype0) else @index = i0 r0 = nil end end end end node_cache[:pass_en_switchtype][start_index] = r0 r0 end module PassSwitchtype0 def to_ast text_value end end def _nt_pass_switchtype start_index = index if node_cache[:pass_switchtype].has_key?(index) cached = node_cache[:pass_switchtype][index] if cached node_cache[:pass_switchtype][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?("tran", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"tran"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(PassSwitchtype0) r0.extend(PassSwitchtype0) else if (match_len = has_terminal?("rtran", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"rtran"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(PassSwitchtype0) r0.extend(PassSwitchtype0) else @index = i0 r0 = nil end end node_cache[:pass_switchtype][start_index] = r0 r0 end module ModuleInstantiation0 def s1 elements[0] end def s2 elements[2] end def module_instance elements[3] end end module ModuleInstantiation1 def module_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def module_instance elements[4] end def s3 elements[6] end end module ModuleInstantiation2 def to_ast n :module_instantiation, *elements_to_ast end end def _nt_module_instantiation start_index = index if node_cache[:module_instantiation].has_key?(index) cached = node_cache[:module_instantiation][index] if cached node_cache[:module_instantiation][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_module_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_parameter_value_assignment if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r5 = _nt_s s0 << r5 if r5 r6 = _nt_module_instance s0 << r6 if r6 s7, i7 = [], index loop do i8, s8 = index, [] r9 = _nt_s s8 << r9 if r9 if (match_len = has_terminal?(",", false, index)) r10 = true @index += match_len else terminal_parse_failure('","') r10 = nil end s8 << r10 if r10 r11 = _nt_s s8 << r11 if r11 r12 = _nt_module_instance s8 << r12 end end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(ModuleInstantiation0) else @index = i8 r8 = nil end if r8 s7 << r8 else break end end r7 = instantiate_node(SyntaxNode,input, i7...index, s7) s0 << r7 if r7 r13 = _nt_s s0 << r13 if r13 if (match_len = has_terminal?(";", false, index)) r14 = true @index += match_len else terminal_parse_failure('";"') r14 = nil end s0 << r14 end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ModuleInstantiation1) r0.extend(ModuleInstantiation2) else @index = i0 r0 = nil end node_cache[:module_instantiation][start_index] = r0 r0 end module ParameterValueAssignment0 def s1 elements[1] end def s2 elements[3] end def list_of_parameter_assignments elements[4] end def s3 elements[5] end end module ParameterValueAssignment1 def to_ast n :parameter_value_assignment, *elements_to_ast end end def _nt_parameter_value_assignment start_index = index if node_cache[:parameter_value_assignment].has_key?(index) cached = node_cache[:parameter_value_assignment][index] if cached node_cache[:parameter_value_assignment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("#", false, index)) r1 = true @index += match_len else terminal_parse_failure('"#"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_list_of_parameter_assignments s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(")", false, index)) r7 = true @index += match_len else terminal_parse_failure('")"') r7 = nil end s0 << r7 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ParameterValueAssignment0) r0.extend(ParameterValueAssignment1) else @index = i0 r0 = nil end node_cache[:parameter_value_assignment][start_index] = r0 r0 end module ListOfParameterAssignments0 def s1 elements[0] end def s2 elements[2] end def ordered_parameter_assignment elements[3] end end module ListOfParameterAssignments1 def ordered_parameter_assignment elements[0] end end module ListOfParameterAssignments2 def s1 elements[0] end def s2 elements[2] end def named_parameter_assignment elements[3] end end module ListOfParameterAssignments3 def named_parameter_assignment elements[0] end end module ListOfParameterAssignments4 def to_ast n :list_of_parameter_assignments, *elements_to_ast end end def _nt_list_of_parameter_assignments start_index = index if node_cache[:list_of_parameter_assignments].has_key?(index) cached = node_cache[:list_of_parameter_assignments][index] if cached node_cache[:list_of_parameter_assignments][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_ordered_parameter_assignment s1 << r2 if r2 s3, i3 = [], index loop do i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 if (match_len = has_terminal?(",", false, index)) r6 = true @index += match_len else terminal_parse_failure('","') r6 = nil end s4 << r6 if r6 r7 = _nt_s s4 << r7 if r7 r8 = _nt_ordered_parameter_assignment s4 << r8 end end end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(ListOfParameterAssignments0) else @index = i4 r4 = nil end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s1 << r3 end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ListOfParameterAssignments1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ListOfParameterAssignments4) r0.extend(ListOfParameterAssignments4) else i9, s9 = index, [] r10 = _nt_named_parameter_assignment s9 << r10 if r10 s11, i11 = [], index loop do i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 if (match_len = has_terminal?(",", false, index)) r14 = true @index += match_len else terminal_parse_failure('","') r14 = nil end s12 << r14 if r14 r15 = _nt_s s12 << r15 if r15 r16 = _nt_named_parameter_assignment s12 << r16 end end end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(ListOfParameterAssignments2) else @index = i12 r12 = nil end if r12 s11 << r12 else break end end r11 = instantiate_node(SyntaxNode,input, i11...index, s11) s9 << r11 end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(ListOfParameterAssignments3) else @index = i9 r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(ListOfParameterAssignments4) r0.extend(ListOfParameterAssignments4) else @index = i0 r0 = nil end end node_cache[:list_of_parameter_assignments][start_index] = r0 r0 end def _nt_ordered_parameter_assignment start_index = index if node_cache[:ordered_parameter_assignment].has_key?(index) cached = node_cache[:ordered_parameter_assignment][index] if cached node_cache[:ordered_parameter_assignment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_expression node_cache[:ordered_parameter_assignment][start_index] = r0 r0 end module NamedParameterAssignment0 def parameter_identifier elements[1] end def s1 elements[2] end def s2 elements[4] end def s3 elements[6] end end module NamedParameterAssignment1 def to_ast n :named_parameter_assignment, *elements_to_ast end end def _nt_named_parameter_assignment start_index = index if node_cache[:named_parameter_assignment].has_key?(index) cached = node_cache[:named_parameter_assignment][index] if cached node_cache[:named_parameter_assignment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?(".", false, index)) r1 = true @index += match_len else terminal_parse_failure('"."') r1 = nil end s0 << r1 if r1 r2 = _nt_parameter_identifier s0 << r2 if r2 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r7 = _nt_mintypmax_expression if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s0 << r6 if r6 r8 = _nt_s s0 << r8 if r8 if (match_len = has_terminal?(")", false, index)) r9 = true @index += match_len else terminal_parse_failure('")"') r9 = nil end s0 << r9 end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NamedParameterAssignment0) r0.extend(NamedParameterAssignment1) else @index = i0 r0 = nil end node_cache[:named_parameter_assignment][start_index] = r0 r0 end module ModuleInstance0 def name_of_module_instance elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end end module ModuleInstance1 def to_ast n :module_instance, *elements_to_ast end end def _nt_module_instance start_index = index if node_cache[:module_instance].has_key?(index) cached = node_cache[:module_instance][index] if cached node_cache[:module_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_name_of_module_instance s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r6 = _nt_list_of_port_connections if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s0 << r5 if r5 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(")", false, index)) r8 = true @index += match_len else terminal_parse_failure('")"') r8 = nil end s0 << r8 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ModuleInstance0) r0.extend(ModuleInstance1) else @index = i0 r0 = nil end node_cache[:module_instance][start_index] = r0 r0 end module NameOfModuleInstance0 def module_instance_identifier elements[0] end def s elements[1] end end module NameOfModuleInstance1 def to_ast n :name_of_module_instance, *elements_to_ast end end def _nt_name_of_module_instance start_index = index if node_cache[:name_of_module_instance].has_key?(index) cached = node_cache[:name_of_module_instance][index] if cached node_cache[:name_of_module_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_module_instance_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_range if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NameOfModuleInstance0) r0.extend(NameOfModuleInstance1) else @index = i0 r0 = nil end node_cache[:name_of_module_instance][start_index] = r0 r0 end module ListOfPortConnections0 def s1 elements[0] end def s2 elements[2] end def named_port_connection elements[3] end end module ListOfPortConnections1 def named_port_connection elements[0] end end module ListOfPortConnections2 def s1 elements[0] end def s2 elements[2] end def ordered_port_connection elements[3] end end module ListOfPortConnections3 def ordered_port_connection elements[0] end end module ListOfPortConnections4 def to_ast n :list_of_port_connections, *elements_to_ast end end def _nt_list_of_port_connections start_index = index if node_cache[:list_of_port_connections].has_key?(index) cached = node_cache[:list_of_port_connections][index] if cached node_cache[:list_of_port_connections][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_named_port_connection s1 << r2 if r2 s3, i3 = [], index loop do i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 if (match_len = has_terminal?(",", false, index)) r6 = true @index += match_len else terminal_parse_failure('","') r6 = nil end s4 << r6 if r6 r7 = _nt_s s4 << r7 if r7 r8 = _nt_named_port_connection s4 << r8 end end end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(ListOfPortConnections0) else @index = i4 r4 = nil end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s1 << r3 end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ListOfPortConnections1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ListOfPortConnections4) r0.extend(ListOfPortConnections4) else i9, s9 = index, [] r10 = _nt_ordered_port_connection s9 << r10 if r10 s11, i11 = [], index loop do i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 if (match_len = has_terminal?(",", false, index)) r14 = true @index += match_len else terminal_parse_failure('","') r14 = nil end s12 << r14 if r14 r15 = _nt_s s12 << r15 if r15 r16 = _nt_ordered_port_connection s12 << r16 end end end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(ListOfPortConnections2) else @index = i12 r12 = nil end if r12 s11 << r12 else break end end r11 = instantiate_node(SyntaxNode,input, i11...index, s11) s9 << r11 end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(ListOfPortConnections3) else @index = i9 r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(ListOfPortConnections4) r0.extend(ListOfPortConnections4) else @index = i0 r0 = nil end end node_cache[:list_of_port_connections][start_index] = r0 r0 end module OrderedPortConnection0 def attribute_instance elements[0] end def s elements[1] end end module OrderedPortConnection1 def s elements[1] end end module OrderedPortConnection2 def to_ast n :ordered_port_connection, *elements_to_ast end end def _nt_ordered_port_connection start_index = index if node_cache[:ordered_port_connection].has_key?(index) cached = node_cache[:ordered_port_connection][index] if cached node_cache[:ordered_port_connection][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] s1, i1 = [], index loop do i2, s2 = index, [] r3 = _nt_attribute_instance s2 << r3 if r3 r4 = _nt_s s2 << r4 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(OrderedPortConnection0) else @index = i2 r2 = nil end if r2 s1 << r2 else break end end r1 = instantiate_node(SyntaxNode,input, i1...index, s1) s0 << r1 if r1 r5 = _nt_s s0 << r5 if r5 r7 = _nt_expression if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s0 << r6 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(OrderedPortConnection1) r0.extend(OrderedPortConnection2) else @index = i0 r0 = nil end node_cache[:ordered_port_connection][start_index] = r0 r0 end module NamedPortConnection0 def attribute_instance elements[0] end def s elements[1] end end module NamedPortConnection1 def s1 elements[1] end def port_identifier elements[3] end def s2 elements[4] end def s3 elements[6] end def s4 elements[8] end end module NamedPortConnection2 def to_ast n :named_port_connection, *elements_to_ast end end def _nt_named_port_connection start_index = index if node_cache[:named_port_connection].has_key?(index) cached = node_cache[:named_port_connection][index] if cached node_cache[:named_port_connection][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] s1, i1 = [], index loop do i2, s2 = index, [] r3 = _nt_attribute_instance s2 << r3 if r3 r4 = _nt_s s2 << r4 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(NamedPortConnection0) else @index = i2 r2 = nil end if r2 s1 << r2 else break end end r1 = instantiate_node(SyntaxNode,input, i1...index, s1) s0 << r1 if r1 r5 = _nt_s s0 << r5 if r5 if (match_len = has_terminal?(".", false, index)) r6 = true @index += match_len else terminal_parse_failure('"."') r6 = nil end s0 << r6 if r6 r7 = _nt_port_identifier s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 if (match_len = has_terminal?("(", false, index)) r9 = true @index += match_len else terminal_parse_failure('"("') r9 = nil end s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 r12 = _nt_expression if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s0 << r11 if r11 r13 = _nt_s s0 << r13 if r13 if (match_len = has_terminal?(")", false, index)) r14 = true @index += match_len else terminal_parse_failure('")"') r14 = nil end s0 << r14 end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NamedPortConnection1) r0.extend(NamedPortConnection2) else @index = i0 r0 = nil end node_cache[:named_port_connection][start_index] = r0 r0 end module GenerateRegion0 def s elements[0] end def module_or_generate_item elements[1] end end module GenerateRegion1 def s elements[2] end end module GenerateRegion2 def to_ast n :generate_region, *elements_to_ast end end def _nt_generate_region start_index = index if node_cache[:generate_region].has_key?(index) cached = node_cache[:generate_region][index] if cached node_cache[:generate_region][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("generate", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"generate"') r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_module_or_generate_item s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(GenerateRegion0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?("endgenerate", false, index)) r7 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endgenerate"') r7 = nil end s0 << r7 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(GenerateRegion1) r0.extend(GenerateRegion2) else @index = i0 r0 = nil end node_cache[:generate_region][start_index] = r0 r0 end module GenvarDeclaration0 def s1 elements[1] end def list_of_genvar_identifiers elements[2] end def s2 elements[3] end end module GenvarDeclaration1 def to_ast n :genvar_declaration, *elements_to_ast end end def _nt_genvar_declaration start_index = index if node_cache[:genvar_declaration].has_key?(index) cached = node_cache[:genvar_declaration][index] if cached node_cache[:genvar_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("genvar", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"genvar"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_list_of_genvar_identifiers s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?(";", false, index)) r5 = true @index += match_len else terminal_parse_failure('";"') r5 = nil end s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(GenvarDeclaration0) r0.extend(GenvarDeclaration1) else @index = i0 r0 = nil end node_cache[:genvar_declaration][start_index] = r0 r0 end module ListOfGenvarIdentifiers0 def s1 elements[0] end def s2 elements[2] end def genvar_identifier elements[3] end end module ListOfGenvarIdentifiers1 def genvar_identifier elements[0] end end module ListOfGenvarIdentifiers2 def to_ast n :list_of_genvar_identifiers, *elements_to_ast end end def _nt_list_of_genvar_identifiers start_index = index if node_cache[:list_of_genvar_identifiers].has_key?(index) cached = node_cache[:list_of_genvar_identifiers][index] if cached node_cache[:list_of_genvar_identifiers][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_genvar_identifier s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_genvar_identifier s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfGenvarIdentifiers0) else @index = i3 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(ListOfGenvarIdentifiers1) r0.extend(ListOfGenvarIdentifiers2) else @index = i0 r0 = nil end node_cache[:list_of_genvar_identifiers][start_index] = r0 r0 end module LoopGenerateConstruct0 def s1 elements[1] end def s2 elements[3] end def genvar_initialization elements[4] end def s3 elements[5] end def s4 elements[7] end def genvar_expression elements[8] end def s5 elements[9] end def s6 elements[11] end def genvar_iteration elements[12] end def s7 elements[13] end def s8 elements[15] end def generate_block elements[16] end end module LoopGenerateConstruct1 def to_ast n :loop_generate_construct, *elements_to_ast end end def _nt_loop_generate_construct start_index = index if node_cache[:loop_generate_construct].has_key?(index) cached = node_cache[:loop_generate_construct][index] if cached node_cache[:loop_generate_construct][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("for", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"for"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_genvar_initialization s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(";", false, index)) r7 = true @index += match_len else terminal_parse_failure('";"') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_genvar_expression s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(";", false, index)) r11 = true @index += match_len else terminal_parse_failure('";"') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_genvar_iteration s0 << r13 if r13 r14 = _nt_s s0 << r14 if r14 if (match_len = has_terminal?(")", false, index)) r15 = true @index += match_len else terminal_parse_failure('")"') r15 = nil end s0 << r15 if r15 r16 = _nt_s s0 << r16 if r16 r17 = _nt_generate_block s0 << r17 end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(LoopGenerateConstruct0) r0.extend(LoopGenerateConstruct1) else @index = i0 r0 = nil end node_cache[:loop_generate_construct][start_index] = r0 r0 end module GenvarInitialization0 def genvar_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def constant_expression elements[4] end end module GenvarInitialization1 def to_ast n :genvar_initialization, *elements_to_ast end end def _nt_genvar_initialization start_index = index if node_cache[:genvar_initialization].has_key?(index) cached = node_cache[:genvar_initialization][index] if cached node_cache[:genvar_initialization][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_genvar_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("=", false, index)) r3 = true @index += match_len else terminal_parse_failure('"="') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_constant_expression s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(GenvarInitialization0) r0.extend(GenvarInitialization1) else @index = i0 r0 = nil end node_cache[:genvar_initialization][start_index] = r0 r0 end module GenvarExpression0 def s elements[0] end def attribute_instance elements[1] end end module GenvarExpression1 def unary_operator elements[0] end def s elements[2] end def genvar_primary elements[3] end end module GenvarExpression2 def s elements[0] end def attribute_instance elements[1] end end module GenvarExpression3 def genvar_expression1 elements[0] end def s1 elements[1] end def binary_operator elements[2] end def s2 elements[4] end def genvar_expression2 elements[5] end end module GenvarExpression4 def s elements[0] end def attribute_instance elements[1] end end module GenvarExpression5 def genvar_expression1 elements[0] end def s1 elements[1] end def s2 elements[4] end def genvar_expression2 elements[5] end def s3 elements[6] end def s4 elements[8] end def genvar_expression3 elements[9] end end module GenvarExpression6 def to_ast n :genvar_expression, *elements_to_ast end end def _nt_genvar_expression start_index = index if node_cache[:genvar_expression].has_key?(index) cached = node_cache[:genvar_expression][index] if cached node_cache[:genvar_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_genvar_primary if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(GenvarExpression6) r0.extend(GenvarExpression6) else i2, s2 = index, [] r3 = _nt_unary_operator s2 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 r7 = _nt_attribute_instance s5 << r7 end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(GenvarExpression0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s2 << r4 if r4 r8 = _nt_s s2 << r8 if r8 r9 = _nt_genvar_primary s2 << r9 end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(GenvarExpression1) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(GenvarExpression6) r0.extend(GenvarExpression6) else i10, s10 = index, [] r11 = _nt_genvar_expression s10 << r11 if r11 r12 = _nt_s s10 << r12 if r12 r13 = _nt_binary_operator s10 << r13 if r13 s14, i14 = [], index loop do i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 r17 = _nt_attribute_instance s15 << r17 end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(GenvarExpression2) else @index = i15 r15 = nil end if r15 s14 << r15 else break end end r14 = instantiate_node(SyntaxNode,input, i14...index, s14) s10 << r14 if r14 r18 = _nt_s s10 << r18 if r18 r19 = _nt_genvar_expression s10 << r19 end end end end end if s10.last r10 = instantiate_node(SyntaxNode,input, i10...index, s10) r10.extend(GenvarExpression3) else @index = i10 r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 r0.extend(GenvarExpression6) r0.extend(GenvarExpression6) else i20, s20 = index, [] r21 = _nt_genvar_expression s20 << r21 if r21 r22 = _nt_s s20 << r22 if r22 if (match_len = has_terminal?("?", false, index)) r23 = true @index += match_len else terminal_parse_failure('"?"') r23 = nil end s20 << r23 if r23 s24, i24 = [], index loop do i25, s25 = index, [] r26 = _nt_s s25 << r26 if r26 r27 = _nt_attribute_instance s25 << r27 end if s25.last r25 = instantiate_node(SyntaxNode,input, i25...index, s25) r25.extend(GenvarExpression4) else @index = i25 r25 = nil end if r25 s24 << r25 else break end end r24 = instantiate_node(SyntaxNode,input, i24...index, s24) s20 << r24 if r24 r28 = _nt_s s20 << r28 if r28 r29 = _nt_genvar_expression s20 << r29 if r29 r30 = _nt_s s20 << r30 if r30 if (match_len = has_terminal?(":", false, index)) r31 = true @index += match_len else terminal_parse_failure('":"') r31 = nil end s20 << r31 if r31 r32 = _nt_s s20 << r32 if r32 r33 = _nt_genvar_expression s20 << r33 end end end end end end end end end if s20.last r20 = instantiate_node(SyntaxNode,input, i20...index, s20) r20.extend(GenvarExpression5) else @index = i20 r20 = nil end if r20 r20 = SyntaxNode.new(input, (index-1)...index) if r20 == true r0 = r20 r0.extend(GenvarExpression6) r0.extend(GenvarExpression6) else @index = i0 r0 = nil end end end end node_cache[:genvar_expression][start_index] = r0 r0 end module GenvarIteration0 def genvar_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def genvar_expression elements[4] end end module GenvarIteration1 def to_ast n :genvar_iteration, *elements_to_ast end end def _nt_genvar_iteration start_index = index if node_cache[:genvar_iteration].has_key?(index) cached = node_cache[:genvar_iteration][index] if cached node_cache[:genvar_iteration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_genvar_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("=", false, index)) r3 = true @index += match_len else terminal_parse_failure('"="') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_genvar_expression s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(GenvarIteration0) r0.extend(GenvarIteration1) else @index = i0 r0 = nil end node_cache[:genvar_iteration][start_index] = r0 r0 end def _nt_genvar_primary start_index = index if node_cache[:genvar_primary].has_key?(index) cached = node_cache[:genvar_primary][index] if cached node_cache[:genvar_primary][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_constant_primary if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_genvar_identifier if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:genvar_primary][start_index] = r0 r0 end def _nt_conditional_generate_construct start_index = index if node_cache[:conditional_generate_construct].has_key?(index) cached = node_cache[:conditional_generate_construct][index] if cached node_cache[:conditional_generate_construct][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_if_generate_construct if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_case_generate_construct if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:conditional_generate_construct][start_index] = r0 r0 end module IfGenerateConstruct0 def s elements[1] end def generate_block_or_null elements[2] end end module IfGenerateConstruct1 def s1 elements[1] end def s2 elements[3] end def constant_expression elements[4] end def s3 elements[5] end def s4 elements[7] end def generate_block_or_null elements[8] end def s5 elements[9] end end module IfGenerateConstruct2 def to_ast n :if_generate_construct, *elements_to_ast end end def _nt_if_generate_construct start_index = index if node_cache[:if_generate_construct].has_key?(index) cached = node_cache[:if_generate_construct][index] if cached node_cache[:if_generate_construct][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("if", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"if"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_constant_expression s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(")", false, index)) r7 = true @index += match_len else terminal_parse_failure('")"') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_generate_block_or_null s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 i12, s12 = index, [] if (match_len = has_terminal?("else", false, index)) r13 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"else"') r13 = nil end s12 << r13 if r13 r14 = _nt_s s12 << r14 if r14 r15 = _nt_generate_block_or_null s12 << r15 end end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(IfGenerateConstruct0) else @index = i12 r12 = nil end if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s0 << r11 end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(IfGenerateConstruct1) r0.extend(IfGenerateConstruct2) else @index = i0 r0 = nil end node_cache[:if_generate_construct][start_index] = r0 r0 end module CaseGenerateConstruct0 def s elements[0] end def case_generate_item elements[1] end end module CaseGenerateConstruct1 def s1 elements[1] end def s2 elements[3] end def constant_expression elements[4] end def s3 elements[5] end def s4 elements[7] end def case_generate_item elements[8] end def s5 elements[10] end end module CaseGenerateConstruct2 def to_ast n :case_generate_construct, *elements_to_ast end end def _nt_case_generate_construct start_index = index if node_cache[:case_generate_construct].has_key?(index) cached = node_cache[:case_generate_construct][index] if cached node_cache[:case_generate_construct][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("case", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"case"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_constant_expression s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(")", false, index)) r7 = true @index += match_len else terminal_parse_failure('")"') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_case_generate_item s0 << r9 if r9 s10, i10 = [], index loop do i11, s11 = index, [] r12 = _nt_s s11 << r12 if r12 r13 = _nt_case_generate_item s11 << r13 end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(CaseGenerateConstruct0) else @index = i11 r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s0 << r10 if r10 r14 = _nt_s s0 << r14 if r14 if (match_len = has_terminal?("endcase", false, index)) r15 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endcase"') r15 = nil end s0 << r15 end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(CaseGenerateConstruct1) r0.extend(CaseGenerateConstruct2) else @index = i0 r0 = nil end node_cache[:case_generate_construct][start_index] = r0 r0 end module CaseGenerateItem0 def s1 elements[0] end def s2 elements[2] end def constant_expression elements[3] end end module CaseGenerateItem1 def constant_expression elements[0] end def s1 elements[2] end def s2 elements[4] end def generate_block_or_null elements[5] end end module CaseGenerateItem2 def default elements[0] end def s1 elements[1] end def s2 elements[3] end def generate_block_or_null elements[4] end end module CaseGenerateItem3 def to_ast n :case_generate_item, *elements_to_ast end end def _nt_case_generate_item start_index = index if node_cache[:case_generate_item].has_key?(index) cached = node_cache[:case_generate_item][index] if cached node_cache[:case_generate_item][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_constant_expression s1 << r2 if r2 s3, i3 = [], index loop do i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 if (match_len = has_terminal?(",", false, index)) r6 = true @index += match_len else terminal_parse_failure('","') r6 = nil end s4 << r6 if r6 r7 = _nt_s s4 << r7 if r7 r8 = _nt_constant_expression s4 << r8 end end end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(CaseGenerateItem0) else @index = i4 r4 = nil end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s1 << r3 if r3 r9 = _nt_s s1 << r9 if r9 if (match_len = has_terminal?(":", false, index)) r10 = true @index += match_len else terminal_parse_failure('":"') r10 = nil end s1 << r10 if r10 r11 = _nt_s s1 << r11 if r11 r12 = _nt_generate_block_or_null s1 << r12 end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(CaseGenerateItem1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(CaseGenerateItem3) r0.extend(CaseGenerateItem3) else i13, s13 = index, [] r14 = _nt_default s13 << r14 if r14 r15 = _nt_s s13 << r15 if r15 if (match_len = has_terminal?(":", false, index)) r17 = true @index += match_len else terminal_parse_failure('":"') r17 = nil end if r17 r16 = r17 else r16 = instantiate_node(SyntaxNode,input, index...index) end s13 << r16 if r16 r18 = _nt_s s13 << r18 if r18 r19 = _nt_generate_block_or_null s13 << r19 end end end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(CaseGenerateItem2) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(CaseGenerateItem3) r0.extend(CaseGenerateItem3) else @index = i0 r0 = nil end end node_cache[:case_generate_item][start_index] = r0 r0 end module GenerateBlock0 def s elements[1] end def generate_block_identifier elements[2] end end module GenerateBlock1 def s elements[0] end def module_or_generate_item elements[1] end end module GenerateBlock2 def s1 elements[1] end def s2 elements[4] end end module GenerateBlock3 def to_ast n :generate_block, *elements_to_ast end end def _nt_generate_block start_index = index if node_cache[:generate_block].has_key?(index) cached = node_cache[:generate_block][index] if cached node_cache[:generate_block][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_module_or_generate_item if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(GenerateBlock3) r0.extend(GenerateBlock3) else i2, s2 = index, [] if (match_len = has_terminal?("begin", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"begin"') r3 = nil end s2 << r3 if r3 r4 = _nt_s s2 << r4 if r4 i6, s6 = index, [] if (match_len = has_terminal?(":", false, index)) r7 = true @index += match_len else terminal_parse_failure('":"') r7 = nil end s6 << r7 if r7 r8 = _nt_s s6 << r8 if r8 r9 = _nt_generate_block_identifier s6 << r9 end end if s6.last r6 = instantiate_node(SyntaxNode,input, i6...index, s6) r6.extend(GenerateBlock0) else @index = i6 r6 = nil end if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s2 << r5 if r5 s10, i10 = [], index loop do i11, s11 = index, [] r12 = _nt_s s11 << r12 if r12 r13 = _nt_module_or_generate_item s11 << r13 end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(GenerateBlock1) else @index = i11 r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s2 << r10 if r10 r14 = _nt_s s2 << r14 if r14 if (match_len = has_terminal?("end", false, index)) r15 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"end"') r15 = nil end s2 << r15 end end end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(GenerateBlock2) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(GenerateBlock3) r0.extend(GenerateBlock3) else @index = i0 r0 = nil end end node_cache[:generate_block][start_index] = r0 r0 end module GenerateBlockOrNull0 def s elements[0] end end module GenerateBlockOrNull1 def to_ast elements_to_ast.first end end def _nt_generate_block_or_null start_index = index if node_cache[:generate_block_or_null].has_key?(index) cached = node_cache[:generate_block_or_null][index] if cached node_cache[:generate_block_or_null][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_generate_block if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(GenerateBlockOrNull1) r0.extend(GenerateBlockOrNull1) else i2, s2 = index, [] r3 = _nt_s s2 << r3 if r3 if (match_len = has_terminal?(";", false, index)) r4 = true @index += match_len else terminal_parse_failure('";"') r4 = nil end s2 << r4 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(GenerateBlockOrNull0) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(GenerateBlockOrNull1) r0.extend(GenerateBlockOrNull1) else @index = i0 r0 = nil end end node_cache[:generate_block_or_null][start_index] = r0 r0 end module UdpDeclaration0 def s elements[0] end def attribute_instance elements[1] end end module UdpDeclaration1 def s elements[0] end def udp_port_declaration elements[1] end end module UdpDeclaration2 def s1 elements[1] end def S elements[3] end def udp_identifier elements[4] end def s2 elements[5] end def s3 elements[7] end def udp_port_list elements[8] end def s4 elements[9] end def s5 elements[11] end def s6 elements[13] end def udp_port_declaration elements[14] end def s7 elements[16] end def udp_body elements[17] end def s8 elements[18] end end module UdpDeclaration3 def s elements[0] end def attribute_instance elements[1] end end module UdpDeclaration4 def s1 elements[1] end def S elements[3] end def udp_identifier elements[4] end def s2 elements[5] end def s3 elements[7] end def udp_declaration_port_list elements[8] end def s4 elements[9] end def s5 elements[11] end def s6 elements[13] end def udp_body elements[14] end def s7 elements[15] end end module UdpDeclaration5 def to_ast n :udp_declaration, *elements_to_ast end end def _nt_udp_declaration start_index = index if node_cache[:udp_declaration].has_key?(index) cached = node_cache[:udp_declaration][index] if cached node_cache[:udp_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(UdpDeclaration0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s1 << r2 if r2 r6 = _nt_s s1 << r6 if r6 if (match_len = has_terminal?("primitive", false, index)) r7 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"primitive"') r7 = nil end s1 << r7 if r7 r8 = _nt_S s1 << r8 if r8 r9 = _nt_udp_identifier s1 << r9 if r9 r10 = _nt_s s1 << r10 if r10 if (match_len = has_terminal?("(", false, index)) r11 = true @index += match_len else terminal_parse_failure('"("') r11 = nil end s1 << r11 if r11 r12 = _nt_s s1 << r12 if r12 r13 = _nt_udp_port_list s1 << r13 if r13 r14 = _nt_s s1 << r14 if r14 if (match_len = has_terminal?(")", false, index)) r15 = true @index += match_len else terminal_parse_failure('")"') r15 = nil end s1 << r15 if r15 r16 = _nt_s s1 << r16 if r16 if (match_len = has_terminal?(";", false, index)) r17 = true @index += match_len else terminal_parse_failure('";"') r17 = nil end s1 << r17 if r17 r18 = _nt_s s1 << r18 if r18 r19 = _nt_udp_port_declaration s1 << r19 if r19 s20, i20 = [], index loop do i21, s21 = index, [] r22 = _nt_s s21 << r22 if r22 r23 = _nt_udp_port_declaration s21 << r23 end if s21.last r21 = instantiate_node(SyntaxNode,input, i21...index, s21) r21.extend(UdpDeclaration1) else @index = i21 r21 = nil end if r21 s20 << r21 else break end end r20 = instantiate_node(SyntaxNode,input, i20...index, s20) s1 << r20 if r20 r24 = _nt_s s1 << r24 if r24 r25 = _nt_udp_body s1 << r25 if r25 r26 = _nt_s s1 << r26 if r26 if (match_len = has_terminal?("endprimitive", false, index)) r27 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endprimitive"') r27 = nil end s1 << r27 end end end end end end end end end end end end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(UdpDeclaration2) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(UdpDeclaration5) r0.extend(UdpDeclaration5) else i28, s28 = index, [] s29, i29 = [], index loop do i30, s30 = index, [] r31 = _nt_s s30 << r31 if r31 r32 = _nt_attribute_instance s30 << r32 end if s30.last r30 = instantiate_node(SyntaxNode,input, i30...index, s30) r30.extend(UdpDeclaration3) else @index = i30 r30 = nil end if r30 s29 << r30 else break end end r29 = instantiate_node(SyntaxNode,input, i29...index, s29) s28 << r29 if r29 r33 = _nt_s s28 << r33 if r33 if (match_len = has_terminal?("primitive", false, index)) r34 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"primitive"') r34 = nil end s28 << r34 if r34 r35 = _nt_S s28 << r35 if r35 r36 = _nt_udp_identifier s28 << r36 if r36 r37 = _nt_s s28 << r37 if r37 if (match_len = has_terminal?("(", false, index)) r38 = true @index += match_len else terminal_parse_failure('"("') r38 = nil end s28 << r38 if r38 r39 = _nt_s s28 << r39 if r39 r40 = _nt_udp_declaration_port_list s28 << r40 if r40 r41 = _nt_s s28 << r41 if r41 if (match_len = has_terminal?(")", false, index)) r42 = true @index += match_len else terminal_parse_failure('")"') r42 = nil end s28 << r42 if r42 r43 = _nt_s s28 << r43 if r43 if (match_len = has_terminal?(";", false, index)) r44 = true @index += match_len else terminal_parse_failure('";"') r44 = nil end s28 << r44 if r44 r45 = _nt_s s28 << r45 if r45 r46 = _nt_udp_body s28 << r46 if r46 r47 = _nt_s s28 << r47 if r47 if (match_len = has_terminal?("endprimitive", false, index)) r48 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endprimitive"') r48 = nil end s28 << r48 end end end end end end end end end end end end end end end end if s28.last r28 = instantiate_node(SyntaxNode,input, i28...index, s28) r28.extend(UdpDeclaration4) else @index = i28 r28 = nil end if r28 r28 = SyntaxNode.new(input, (index-1)...index) if r28 == true r0 = r28 r0.extend(UdpDeclaration5) r0.extend(UdpDeclaration5) else @index = i0 r0 = nil end end node_cache[:udp_declaration][start_index] = r0 r0 end module UdpPortList0 def s1 elements[0] end def s2 elements[2] end def input_port_identifier elements[3] end end module UdpPortList1 def output_port_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def input_port_identifier elements[4] end end module UdpPortList2 def to_ast n :udp_port_list, *elements_to_ast end end def _nt_udp_port_list start_index = index if node_cache[:udp_port_list].has_key?(index) cached = node_cache[:udp_port_list][index] if cached node_cache[:udp_port_list][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_output_port_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?(",", false, index)) r3 = true @index += match_len else terminal_parse_failure('","') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_input_port_identifier s0 << r5 if r5 s6, i6 = [], index loop do i7, s7 = index, [] r8 = _nt_s s7 << r8 if r8 if (match_len = has_terminal?(",", false, index)) r9 = true @index += match_len else terminal_parse_failure('","') r9 = nil end s7 << r9 if r9 r10 = _nt_s s7 << r10 if r10 r11 = _nt_input_port_identifier s7 << r11 end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(UdpPortList0) else @index = i7 r7 = nil end if r7 s6 << r7 else break end end r6 = instantiate_node(SyntaxNode,input, i6...index, s6) s0 << r6 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(UdpPortList1) r0.extend(UdpPortList2) else @index = i0 r0 = nil end node_cache[:udp_port_list][start_index] = r0 r0 end module UdpDeclarationPortList0 def s1 elements[0] end def s2 elements[2] end def udp_input_declaration elements[3] end end module UdpDeclarationPortList1 def udp_output_declaration elements[0] end def s1 elements[1] end def s2 elements[3] end def udp_input_declaration elements[4] end end module UdpDeclarationPortList2 def to_ast n :udp_declaration_port_list, *elements_to_ast end end def _nt_udp_declaration_port_list start_index = index if node_cache[:udp_declaration_port_list].has_key?(index) cached = node_cache[:udp_declaration_port_list][index] if cached node_cache[:udp_declaration_port_list][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_udp_output_declaration s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?(",", false, index)) r3 = true @index += match_len else terminal_parse_failure('","') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_udp_input_declaration s0 << r5 if r5 s6, i6 = [], index loop do i7, s7 = index, [] r8 = _nt_s s7 << r8 if r8 if (match_len = has_terminal?(",", false, index)) r9 = true @index += match_len else terminal_parse_failure('","') r9 = nil end s7 << r9 if r9 r10 = _nt_s s7 << r10 if r10 r11 = _nt_udp_input_declaration s7 << r11 end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(UdpDeclarationPortList0) else @index = i7 r7 = nil end if r7 s6 << r7 else break end end r6 = instantiate_node(SyntaxNode,input, i6...index, s6) s0 << r6 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(UdpDeclarationPortList1) r0.extend(UdpDeclarationPortList2) else @index = i0 r0 = nil end node_cache[:udp_declaration_port_list][start_index] = r0 r0 end module UdpPortDeclaration0 def udp_output_declaration elements[0] end def s elements[1] end end module UdpPortDeclaration1 def udp_input_declaration elements[0] end def s elements[1] end end module UdpPortDeclaration2 def udp_reg_declarations elements[0] end def s elements[1] end end module UdpPortDeclaration3 def to_ast n :udp_port_declaration, *elements_to_ast end end def _nt_udp_port_declaration start_index = index if node_cache[:udp_port_declaration].has_key?(index) cached = node_cache[:udp_port_declaration][index] if cached node_cache[:udp_port_declaration][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_udp_output_declaration s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?(";", false, index)) r4 = true @index += match_len else terminal_parse_failure('";"') r4 = nil end s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(UdpPortDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(UdpPortDeclaration3) r0.extend(UdpPortDeclaration3) else i5, s5 = index, [] r6 = _nt_udp_input_declaration s5 << r6 if r6 r7 = _nt_s s5 << r7 if r7 if (match_len = has_terminal?(";", false, index)) r8 = true @index += match_len else terminal_parse_failure('";"') r8 = nil end s5 << r8 end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(UdpPortDeclaration1) else @index = i5 r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(UdpPortDeclaration3) r0.extend(UdpPortDeclaration3) else i9, s9 = index, [] r10 = _nt_udp_reg_declarations s9 << r10 if r10 r11 = _nt_s s9 << r11 if r11 if (match_len = has_terminal?(";", false, index)) r12 = true @index += match_len else terminal_parse_failure('";"') r12 = nil end s9 << r12 end end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(UdpPortDeclaration2) else @index = i9 r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(UdpPortDeclaration3) r0.extend(UdpPortDeclaration3) else @index = i0 r0 = nil end end end node_cache[:udp_port_declaration][start_index] = r0 r0 end module UdpOutputDeclaration0 def s elements[0] end def attribute_instance elements[1] end end module UdpOutputDeclaration1 def s1 elements[0] end def s2 elements[2] end def constant_expression elements[3] end end module UdpOutputDeclaration2 def s1 elements[1] end def s2 elements[3] end def reg elements[4] end def s3 elements[5] end def port_identifier elements[6] end end module UdpOutputDeclaration3 def s elements[0] end def attribute_instance elements[1] end end module UdpOutputDeclaration4 def s1 elements[1] end def s2 elements[3] end def port_identifier elements[4] end end module UdpOutputDeclaration5 def to_ast n :udp_output_declaration, *elements_to_ast end end def _nt_udp_output_declaration start_index = index if node_cache[:udp_output_declaration].has_key?(index) cached = node_cache[:udp_output_declaration][index] if cached node_cache[:udp_output_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(UdpOutputDeclaration0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s1 << r2 if r2 r6 = _nt_s s1 << r6 if r6 if (match_len = has_terminal?("output", false, index)) r7 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"output"') r7 = nil end s1 << r7 if r7 r8 = _nt_s s1 << r8 if r8 r9 = _nt_reg s1 << r9 if r9 r10 = _nt_s s1 << r10 if r10 r11 = _nt_port_identifier s1 << r11 if r11 i13, s13 = index, [] r14 = _nt_s s13 << r14 if r14 if (match_len = has_terminal?("=", false, index)) r15 = true @index += match_len else terminal_parse_failure('"="') r15 = nil end s13 << r15 if r15 r16 = _nt_s s13 << r16 if r16 r17 = _nt_constant_expression s13 << r17 end end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(UdpOutputDeclaration1) else @index = i13 r13 = nil end if r13 r12 = r13 else r12 = instantiate_node(SyntaxNode,input, index...index) end s1 << r12 end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(UdpOutputDeclaration2) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(UdpOutputDeclaration5) r0.extend(UdpOutputDeclaration5) else i18, s18 = index, [] s19, i19 = [], index loop do i20, s20 = index, [] r21 = _nt_s s20 << r21 if r21 r22 = _nt_attribute_instance s20 << r22 end if s20.last r20 = instantiate_node(SyntaxNode,input, i20...index, s20) r20.extend(UdpOutputDeclaration3) else @index = i20 r20 = nil end if r20 s19 << r20 else break end end r19 = instantiate_node(SyntaxNode,input, i19...index, s19) s18 << r19 if r19 r23 = _nt_s s18 << r23 if r23 if (match_len = has_terminal?("output", false, index)) r24 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"output"') r24 = nil end s18 << r24 if r24 r25 = _nt_s s18 << r25 if r25 r26 = _nt_port_identifier s18 << r26 end end end end if s18.last r18 = instantiate_node(SyntaxNode,input, i18...index, s18) r18.extend(UdpOutputDeclaration4) else @index = i18 r18 = nil end if r18 r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true r0 = r18 r0.extend(UdpOutputDeclaration5) r0.extend(UdpOutputDeclaration5) else @index = i0 r0 = nil end end node_cache[:udp_output_declaration][start_index] = r0 r0 end module UdpInputDeclaration0 def s elements[0] end def attribute_instance elements[1] end end module UdpInputDeclaration1 def s elements[1] end def S elements[3] end def list_of_port_identifiers elements[4] end end module UdpInputDeclaration2 def to_ast n :udp_input_declaration, *elements_to_ast end end def _nt_udp_input_declaration start_index = index if node_cache[:udp_input_declaration].has_key?(index) cached = node_cache[:udp_input_declaration][index] if cached node_cache[:udp_input_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] s1, i1 = [], index loop do i2, s2 = index, [] r3 = _nt_s s2 << r3 if r3 r4 = _nt_attribute_instance s2 << r4 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(UdpInputDeclaration0) else @index = i2 r2 = nil end if r2 s1 << r2 else break end end r1 = instantiate_node(SyntaxNode,input, i1...index, s1) s0 << r1 if r1 r5 = _nt_s s0 << r5 if r5 if (match_len = has_terminal?("input", false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"input"') r6 = nil end s0 << r6 if r6 r7 = _nt_S s0 << r7 if r7 r8 = _nt_list_of_port_identifiers s0 << r8 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(UdpInputDeclaration1) r0.extend(UdpInputDeclaration2) else @index = i0 r0 = nil end node_cache[:udp_input_declaration][start_index] = r0 r0 end module UdpRegDeclaration0 def s elements[0] end def attribute_instance elements[1] end end module UdpRegDeclaration1 def s elements[1] end def S elements[3] end def variable_identifier elements[4] end end module UdpRegDeclaration2 def to_ast n :udp_reg_declaration, *elements_to_ast end end def _nt_udp_reg_declaration start_index = index if node_cache[:udp_reg_declaration].has_key?(index) cached = node_cache[:udp_reg_declaration][index] if cached node_cache[:udp_reg_declaration][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] s1, i1 = [], index loop do i2, s2 = index, [] r3 = _nt_s s2 << r3 if r3 r4 = _nt_attribute_instance s2 << r4 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(UdpRegDeclaration0) else @index = i2 r2 = nil end if r2 s1 << r2 else break end end r1 = instantiate_node(SyntaxNode,input, i1...index, s1) s0 << r1 if r1 r5 = _nt_s s0 << r5 if r5 if (match_len = has_terminal?("reg", false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"reg"') r6 = nil end s0 << r6 if r6 r7 = _nt_S s0 << r7 if r7 r8 = _nt_variable_identifier s0 << r8 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(UdpRegDeclaration1) r0.extend(UdpRegDeclaration2) else @index = i0 r0 = nil end node_cache[:udp_reg_declaration][start_index] = r0 r0 end def _nt_udp_body start_index = index if node_cache[:udp_body].has_key?(index) cached = node_cache[:udp_body][index] if cached node_cache[:udp_body][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_combinational_body if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_sequential_body if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:udp_body][start_index] = r0 r0 end module CombinationalBody0 def s elements[0] end def combinational_entry elements[1] end end module CombinationalBody1 def S elements[1] end def combinational_entry elements[2] end def s elements[4] end end module CombinationalBody2 def to_ast n :combinational_body, *elements_to_ast end end def _nt_combinational_body start_index = index if node_cache[:combinational_body].has_key?(index) cached = node_cache[:combinational_body][index] if cached node_cache[:combinational_body][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("table", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"table"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 r3 = _nt_combinational_entry s0 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 r7 = _nt_combinational_entry s5 << r7 end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(CombinationalBody0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 if r4 r8 = _nt_s s0 << r8 if r8 if (match_len = has_terminal?("endtable", false, index)) r9 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endtable"') r9 = nil end s0 << r9 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(CombinationalBody1) r0.extend(CombinationalBody2) else @index = i0 r0 = nil end node_cache[:combinational_body][start_index] = r0 r0 end module CombinationalEntry0 def level_input_list elements[0] end def s1 elements[1] end def s2 elements[3] end def output_symbol elements[4] end def s3 elements[5] end end module CombinationalEntry1 def to_ast n :combinational_entry, *elements_to_ast end end def _nt_combinational_entry start_index = index if node_cache[:combinational_entry].has_key?(index) cached = node_cache[:combinational_entry][index] if cached node_cache[:combinational_entry][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_level_input_list s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?(":", false, index)) r3 = true @index += match_len else terminal_parse_failure('":"') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_output_symbol s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(";", false, index)) r7 = true @index += match_len else terminal_parse_failure('";"') r7 = nil end s0 << r7 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(CombinationalEntry0) r0.extend(CombinationalEntry1) else @index = i0 r0 = nil end node_cache[:combinational_entry][start_index] = r0 r0 end module SequentialBody0 def s elements[0] end def sequential_entry elements[1] end end module SequentialBody1 def s1 elements[1] end def S elements[3] end def sequential_entry elements[4] end def s2 elements[6] end end module SequentialBody2 def to_ast n :sequential_body, *elements_to_ast end end def _nt_sequential_body start_index = index if node_cache[:sequential_body].has_key?(index) cached = node_cache[:sequential_body][index] if cached node_cache[:sequential_body][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_udp_initial_statement if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("table", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"table"') r4 = nil end s0 << r4 if r4 r5 = _nt_S s0 << r5 if r5 r6 = _nt_sequential_entry s0 << r6 if r6 s7, i7 = [], index loop do i8, s8 = index, [] r9 = _nt_s s8 << r9 if r9 r10 = _nt_sequential_entry s8 << r10 end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(SequentialBody0) else @index = i8 r8 = nil end if r8 s7 << r8 else break end end r7 = instantiate_node(SyntaxNode,input, i7...index, s7) s0 << r7 if r7 r11 = _nt_s s0 << r11 if r11 if (match_len = has_terminal?("endtable", false, index)) r12 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endtable"') r12 = nil end s0 << r12 end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SequentialBody1) r0.extend(SequentialBody2) else @index = i0 r0 = nil end node_cache[:sequential_body][start_index] = r0 r0 end module UdpInitialStatement0 def S elements[1] end def output_port_identifier elements[2] end def s1 elements[3] end def s2 elements[5] end def init_val elements[6] end def s3 elements[7] end end module UdpInitialStatement1 def to_ast n :udp_initial_statement, *elements_to_ast end end def _nt_udp_initial_statement start_index = index if node_cache[:udp_initial_statement].has_key?(index) cached = node_cache[:udp_initial_statement][index] if cached node_cache[:udp_initial_statement][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("initial", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"initial"') r1 = nil end s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 r3 = _nt_output_port_identifier s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 if (match_len = has_terminal?("=", false, index)) r5 = true @index += match_len else terminal_parse_failure('"="') r5 = nil end s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 r7 = _nt_init_val s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 if (match_len = has_terminal?(";", false, index)) r9 = true @index += match_len else terminal_parse_failure('";"') r9 = nil end s0 << r9 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(UdpInitialStatement0) r0.extend(UdpInitialStatement1) else @index = i0 r0 = nil end node_cache[:udp_initial_statement][start_index] = r0 r0 end module InitVal0 def to_ast n :init_val, text_value[-1] end end def _nt_init_val start_index = index if node_cache[:init_val].has_key?(index) cached = node_cache[:init_val][index] if cached node_cache[:init_val][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?("1'b0", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'b0"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else if (match_len = has_terminal?("1'b1", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'b1"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else if (match_len = has_terminal?("1'bx", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'bx"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else if (match_len = has_terminal?("1'bX", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'bX"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 else if (match_len = has_terminal?("1'B0", false, index)) r5 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'B0"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 else if (match_len = has_terminal?("1'B1", false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'B1"') r6 = nil end if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 else if (match_len = has_terminal?("1'Bx", false, index)) r7 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'Bx"') r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 else if (match_len = has_terminal?("1'BX", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'BX"') r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else if (match_len = has_terminal?("1", false, index)) r9 = true @index += match_len else terminal_parse_failure('"1"') r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 else if (match_len = has_terminal?("0", false, index)) r10 = instantiate_node(SyntaxNode,input, index...(index + match_len)) r10.extend(InitVal0) @index += match_len else terminal_parse_failure('"0"') r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 else @index = i0 r0 = nil end end end end end end end end end end node_cache[:init_val][start_index] = r0 r0 end module SequentialEntry0 def seq_input_list elements[0] end def s1 elements[1] end def s2 elements[3] end def current_state elements[4] end def s3 elements[5] end def s4 elements[7] end def next_state elements[8] end def s5 elements[9] end end module SequentialEntry1 def to_ast n :sequential_entry, *elements_to_ast end end def _nt_sequential_entry start_index = index if node_cache[:sequential_entry].has_key?(index) cached = node_cache[:sequential_entry][index] if cached node_cache[:sequential_entry][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_seq_input_list s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?(":", false, index)) r3 = true @index += match_len else terminal_parse_failure('":"') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_current_state s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(":", false, index)) r7 = true @index += match_len else terminal_parse_failure('":"') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_next_state s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(";", false, index)) r11 = true @index += match_len else terminal_parse_failure('";"') r11 = nil end s0 << r11 end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SequentialEntry0) r0.extend(SequentialEntry1) else @index = i0 r0 = nil end node_cache[:sequential_entry][start_index] = r0 r0 end def _nt_seq_input_list start_index = index if node_cache[:seq_input_list].has_key?(index) cached = node_cache[:seq_input_list][index] if cached node_cache[:seq_input_list][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_level_input_list if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_edge_input_list if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:seq_input_list][start_index] = r0 r0 end module LevelInputList0 def s elements[0] end def level_symbol elements[1] end end module LevelInputList1 def level_symbol elements[0] end end module LevelInputList2 def to_ast n :level_input_list, *elements_to_ast end end def _nt_level_input_list start_index = index if node_cache[:level_input_list].has_key?(index) cached = node_cache[:level_input_list][index] if cached node_cache[:level_input_list][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_level_symbol s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_level_symbol s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(LevelInputList0) else @index = i3 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(LevelInputList1) r0.extend(LevelInputList2) else @index = i0 r0 = nil end node_cache[:level_input_list][start_index] = r0 r0 end module EdgeInputList0 def s elements[0] end def level_symbol elements[1] end end module EdgeInputList1 def s elements[0] end def level_symbol elements[1] end end module EdgeInputList2 def s elements[1] end def edge_indicator elements[2] end end module EdgeInputList3 def to_ast n :edge_input_list, *elements_to_ast end end def _nt_edge_input_list start_index = index if node_cache[:edge_input_list].has_key?(index) cached = node_cache[:edge_input_list][index] if cached node_cache[:edge_input_list][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] s1, i1 = [], index loop do i2, s2 = index, [] r3 = _nt_s s2 << r3 if r3 r4 = _nt_level_symbol s2 << r4 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(EdgeInputList0) else @index = i2 r2 = nil end if r2 s1 << r2 else break end end r1 = instantiate_node(SyntaxNode,input, i1...index, s1) s0 << r1 if r1 r5 = _nt_s s0 << r5 if r5 r6 = _nt_edge_indicator s0 << r6 if r6 s7, i7 = [], index loop do i8, s8 = index, [] r9 = _nt_s s8 << r9 if r9 r10 = _nt_level_symbol s8 << r10 end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(EdgeInputList1) else @index = i8 r8 = nil end if r8 s7 << r8 else break end end r7 = instantiate_node(SyntaxNode,input, i7...index, s7) s0 << r7 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(EdgeInputList2) r0.extend(EdgeInputList3) else @index = i0 r0 = nil end node_cache[:edge_input_list][start_index] = r0 r0 end module EdgeIndicator0 def s1 elements[1] end def level_symbol1 elements[2] end def level_symbol2 elements[3] end def s2 elements[4] end end module EdgeIndicator1 def to_ast n :edge_indicator, *elements_to_ast end end def _nt_edge_indicator start_index = index if node_cache[:edge_indicator].has_key?(index) cached = node_cache[:edge_indicator][index] if cached node_cache[:edge_indicator][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 r3 = _nt_s s1 << r3 if r3 r4 = _nt_level_symbol s1 << r4 if r4 r5 = _nt_level_symbol s1 << r5 if r5 r6 = _nt_s s1 << r6 if r6 if (match_len = has_terminal?(")", false, index)) r7 = true @index += match_len else terminal_parse_failure('")"') r7 = nil end s1 << r7 end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(EdgeIndicator0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(EdgeIndicator1) r0.extend(EdgeIndicator1) else r8 = _nt_edge_symbol if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 r0.extend(EdgeIndicator1) r0.extend(EdgeIndicator1) else @index = i0 r0 = nil end end node_cache[:edge_indicator][start_index] = r0 r0 end module CurrentState0 def to_ast n :current_state, *elements_to_ast end end def _nt_current_state start_index = index if node_cache[:current_state].has_key?(index) cached = node_cache[:current_state][index] if cached node_cache[:current_state][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_level_symbol r0.extend(CurrentState0) r0.extend(CurrentState0) node_cache[:current_state][start_index] = r0 r0 end module NextState0 def to_ast n :next_state, *elements_to_ast end end def _nt_next_state start_index = index if node_cache[:next_state].has_key?(index) cached = node_cache[:next_state][index] if cached node_cache[:next_state][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_output_symbol if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(NextState0) r0.extend(NextState0) 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 r0.extend(NextState0) r0.extend(NextState0) else @index = i0 r0 = nil end end node_cache[:next_state][start_index] = r0 r0 end module OutputSymbol0 def to_ast text_value end end def _nt_output_symbol start_index = index if node_cache[:output_symbol].has_key?(index) cached = node_cache[:output_symbol][index] if cached node_cache[:output_symbol][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 = true @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 r0.extend(OutputSymbol0) r0.extend(OutputSymbol0) else if (match_len = has_terminal?("1", false, index)) r2 = true @index += match_len else terminal_parse_failure('"1"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(OutputSymbol0) r0.extend(OutputSymbol0) else if (match_len = has_terminal?("x", false, index)) r3 = true @index += match_len else terminal_parse_failure('"x"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(OutputSymbol0) r0.extend(OutputSymbol0) else if (match_len = has_terminal?("X", false, index)) r4 = true @index += match_len else terminal_parse_failure('"X"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(OutputSymbol0) r0.extend(OutputSymbol0) else @index = i0 r0 = nil end end end end node_cache[:output_symbol][start_index] = r0 r0 end module LevelSymbol0 def to_ast text_value end end def _nt_level_symbol start_index = index if node_cache[:level_symbol].has_key?(index) cached = node_cache[:level_symbol][index] if cached node_cache[:level_symbol][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 = true @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 r0.extend(LevelSymbol0) r0.extend(LevelSymbol0) else if (match_len = has_terminal?("1", false, index)) r2 = true @index += match_len else terminal_parse_failure('"1"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(LevelSymbol0) r0.extend(LevelSymbol0) else if (match_len = has_terminal?("x", false, index)) r3 = true @index += match_len else terminal_parse_failure('"x"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(LevelSymbol0) r0.extend(LevelSymbol0) else if (match_len = has_terminal?("X", false, index)) r4 = true @index += match_len else terminal_parse_failure('"X"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(LevelSymbol0) r0.extend(LevelSymbol0) else if (match_len = has_terminal?("?", false, index)) r5 = true @index += match_len else terminal_parse_failure('"?"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(LevelSymbol0) r0.extend(LevelSymbol0) else if (match_len = has_terminal?("b", false, index)) r6 = true @index += match_len else terminal_parse_failure('"b"') r6 = nil end if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 r0.extend(LevelSymbol0) r0.extend(LevelSymbol0) else if (match_len = has_terminal?("B", false, index)) r7 = true @index += match_len else terminal_parse_failure('"B"') r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(LevelSymbol0) r0.extend(LevelSymbol0) else @index = i0 r0 = nil end end end end end end end node_cache[:level_symbol][start_index] = r0 r0 end module EdgeSymbol0 def to_ast text_value end end def _nt_edge_symbol start_index = index if node_cache[:edge_symbol].has_key?(index) cached = node_cache[:edge_symbol][index] if cached node_cache[:edge_symbol][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?("r", false, index)) r1 = true @index += match_len else terminal_parse_failure('"r"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(EdgeSymbol0) r0.extend(EdgeSymbol0) else if (match_len = has_terminal?("R", false, index)) r2 = true @index += match_len else terminal_parse_failure('"R"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(EdgeSymbol0) r0.extend(EdgeSymbol0) else if (match_len = has_terminal?("f", false, index)) r3 = true @index += match_len else terminal_parse_failure('"f"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(EdgeSymbol0) r0.extend(EdgeSymbol0) else if (match_len = has_terminal?("F", false, index)) r4 = true @index += match_len else terminal_parse_failure('"F"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(EdgeSymbol0) r0.extend(EdgeSymbol0) else if (match_len = has_terminal?("p", false, index)) r5 = true @index += match_len else terminal_parse_failure('"p"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(EdgeSymbol0) r0.extend(EdgeSymbol0) else if (match_len = has_terminal?("P", false, index)) r6 = true @index += match_len else terminal_parse_failure('"P"') r6 = nil end if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 r0.extend(EdgeSymbol0) r0.extend(EdgeSymbol0) else if (match_len = has_terminal?("n", false, index)) r7 = true @index += match_len else terminal_parse_failure('"n"') r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(EdgeSymbol0) r0.extend(EdgeSymbol0) else if (match_len = has_terminal?("N", false, index)) r8 = true @index += match_len else terminal_parse_failure('"N"') r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 r0.extend(EdgeSymbol0) r0.extend(EdgeSymbol0) 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 r0.extend(EdgeSymbol0) r0.extend(EdgeSymbol0) else @index = i0 r0 = nil end end end end end end end end end node_cache[:edge_symbol][start_index] = r0 r0 end module UdpInstantiation0 def s1 elements[0] end def s2 elements[2] end def udp_instance elements[3] end end module UdpInstantiation1 def udp_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def udp_instance elements[6] end def s4 elements[8] end end module UdpInstantiation2 def to_ast n :udp_instantiation, *elements_to_ast end end def _nt_udp_instantiation start_index = index if node_cache[:udp_instantiation].has_key?(index) cached = node_cache[:udp_instantiation][index] if cached node_cache[:udp_instantiation][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_udp_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_drive_strength if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r5 = _nt_s s0 << r5 if r5 r7 = _nt_delay2 if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s0 << r6 if r6 r8 = _nt_s s0 << r8 if r8 r9 = _nt_udp_instance s0 << r9 if r9 s10, i10 = [], index loop do i11, s11 = index, [] r12 = _nt_s s11 << r12 if r12 if (match_len = has_terminal?(",", false, index)) r13 = true @index += match_len else terminal_parse_failure('","') r13 = nil end s11 << r13 if r13 r14 = _nt_s s11 << r14 if r14 r15 = _nt_udp_instance s11 << r15 end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(UdpInstantiation0) else @index = i11 r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s0 << r10 if r10 r16 = _nt_s s0 << r16 if r16 if (match_len = has_terminal?(";", false, index)) r17 = true @index += match_len else terminal_parse_failure('";"') r17 = nil end s0 << r17 end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(UdpInstantiation1) r0.extend(UdpInstantiation2) else @index = i0 r0 = nil end node_cache[:udp_instantiation][start_index] = r0 r0 end module UdpInstance0 def s1 elements[0] end def s2 elements[2] end def input_terminal elements[3] end end module UdpInstance1 def s1 elements[1] end def s2 elements[3] end def output_terminal elements[4] end def s3 elements[5] end def s4 elements[7] end def input_terminal elements[8] end def s5 elements[10] end end module UdpInstance2 def to_ast n :udp_instance, *elements_to_ast end end def _nt_udp_instance start_index = index if node_cache[:udp_instance].has_key?(index) cached = node_cache[:udp_instance][index] if cached node_cache[:udp_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_name_of_udp_instance if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s0 << r4 if r4 r5 = _nt_s s0 << r5 if r5 r6 = _nt_output_terminal s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?(",", false, index)) r8 = true @index += match_len else terminal_parse_failure('","') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 r10 = _nt_input_terminal s0 << r10 if r10 s11, i11 = [], index loop do i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 if (match_len = has_terminal?(",", false, index)) r14 = true @index += match_len else terminal_parse_failure('","') r14 = nil end s12 << r14 if r14 r15 = _nt_s s12 << r15 if r15 r16 = _nt_input_terminal s12 << r16 end end end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(UdpInstance0) else @index = i12 r12 = nil end if r12 s11 << r12 else break end end r11 = instantiate_node(SyntaxNode,input, i11...index, s11) s0 << r11 if r11 r17 = _nt_s s0 << r17 if r17 if (match_len = has_terminal?(")", false, index)) r18 = true @index += match_len else terminal_parse_failure('")"') r18 = nil end s0 << r18 end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(UdpInstance1) r0.extend(UdpInstance2) else @index = i0 r0 = nil end node_cache[:udp_instance][start_index] = r0 r0 end module NameOfUdpInstance0 def udp_instance_identifier elements[0] end def s elements[1] end end module NameOfUdpInstance1 def to_ast n :name_of_udp_instance, *elements_to_ast end end def _nt_name_of_udp_instance start_index = index if node_cache[:name_of_udp_instance].has_key?(index) cached = node_cache[:name_of_udp_instance][index] if cached node_cache[:name_of_udp_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_udp_instance_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_range if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NameOfUdpInstance0) r0.extend(NameOfUdpInstance1) else @index = i0 r0 = nil end node_cache[:name_of_udp_instance][start_index] = r0 r0 end module ContinuousAssign0 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def list_of_net_assignments elements[6] end def s4 elements[7] end end module ContinuousAssign1 def to_ast n :continuous_assign, *elements_to_ast end end def _nt_continuous_assign start_index = index if node_cache[:continuous_assign].has_key?(index) cached = node_cache[:continuous_assign][index] if cached node_cache[:continuous_assign][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("assign", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"assign"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_drive_strength if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r5 = _nt_s s0 << r5 if r5 r7 = _nt_delay3 if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s0 << r6 if r6 r8 = _nt_s s0 << r8 if r8 r9 = _nt_list_of_net_assignments s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(";", false, index)) r11 = true @index += match_len else terminal_parse_failure('";"') r11 = nil end s0 << r11 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ContinuousAssign0) r0.extend(ContinuousAssign1) else @index = i0 r0 = nil end node_cache[:continuous_assign][start_index] = r0 r0 end module ListOfNetAssignments0 def s1 elements[0] end def s2 elements[2] end def net_assignment elements[3] end end module ListOfNetAssignments1 def net_assignment elements[0] end end module ListOfNetAssignments2 def to_ast n :list_of_net_assignments, *elements_to_ast end end def _nt_list_of_net_assignments start_index = index if node_cache[:list_of_net_assignments].has_key?(index) cached = node_cache[:list_of_net_assignments][index] if cached node_cache[:list_of_net_assignments][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_net_assignment s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(",", false, index)) r5 = true @index += match_len else terminal_parse_failure('","') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_net_assignment s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ListOfNetAssignments0) else @index = i3 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(ListOfNetAssignments1) r0.extend(ListOfNetAssignments2) else @index = i0 r0 = nil end node_cache[:list_of_net_assignments][start_index] = r0 r0 end module NetAssignment0 def net_lvalue elements[0] end def s1 elements[1] end def s2 elements[3] end def expression elements[4] end end module NetAssignment1 def to_ast n :net_assignment, *elements_to_ast end end def _nt_net_assignment start_index = index if node_cache[:net_assignment].has_key?(index) cached = node_cache[:net_assignment][index] if cached node_cache[:net_assignment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_net_lvalue s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("=", false, index)) r3 = true @index += match_len else terminal_parse_failure('"="') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_expression s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NetAssignment0) r0.extend(NetAssignment1) else @index = i0 r0 = nil end node_cache[:net_assignment][start_index] = r0 r0 end module InitialConstruct0 def s elements[1] end def statement elements[2] end end module InitialConstruct1 def to_ast n :initial_construct, *elements_to_ast end end def _nt_initial_construct start_index = index if node_cache[:initial_construct].has_key?(index) cached = node_cache[:initial_construct][index] if cached node_cache[:initial_construct][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("initial", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"initial"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_statement s0 << r3 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(InitialConstruct0) r0.extend(InitialConstruct1) else @index = i0 r0 = nil end node_cache[:initial_construct][start_index] = r0 r0 end module AlwaysConstruct0 def s elements[1] end def statement elements[2] end end module AlwaysConstruct1 def to_ast n :always_construct, *elements_to_ast end end def _nt_always_construct start_index = index if node_cache[:always_construct].has_key?(index) cached = node_cache[:always_construct][index] if cached node_cache[:always_construct][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("always", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"always"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_statement s0 << r3 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(AlwaysConstruct0) r0.extend(AlwaysConstruct1) else @index = i0 r0 = nil end node_cache[:always_construct][start_index] = r0 r0 end module BlockingAssignment0 def variable_lvalue elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def expression elements[6] end end module BlockingAssignment1 def to_ast n :blocking_assignment, *elements_to_ast end end def _nt_blocking_assignment start_index = index if node_cache[:blocking_assignment].has_key?(index) cached = node_cache[:blocking_assignment][index] if cached node_cache[:blocking_assignment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_variable_lvalue s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("=", false, index)) r3 = true @index += match_len else terminal_parse_failure('"="') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r6 = _nt_delay_or_event_control if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s0 << r5 if r5 r7 = _nt_s s0 << r7 if r7 r8 = _nt_expression s0 << r8 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(BlockingAssignment0) r0.extend(BlockingAssignment1) else @index = i0 r0 = nil end node_cache[:blocking_assignment][start_index] = r0 r0 end module NonblockingAssignment0 def variable_lvalue elements[0] end def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end def expression elements[6] end end module NonblockingAssignment1 def to_ast n :nonblocking_assignment, *elements_to_ast end end def _nt_nonblocking_assignment start_index = index if node_cache[:nonblocking_assignment].has_key?(index) cached = node_cache[:nonblocking_assignment][index] if cached node_cache[:nonblocking_assignment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_variable_lvalue s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 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 s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r6 = _nt_delay_or_event_control if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s0 << r5 if r5 r7 = _nt_s s0 << r7 if r7 r8 = _nt_expression s0 << r8 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NonblockingAssignment0) r0.extend(NonblockingAssignment1) else @index = i0 r0 = nil end node_cache[:nonblocking_assignment][start_index] = r0 r0 end module ProceduralContinuousAssignments0 def s elements[1] end def variable_assignment elements[2] end end module ProceduralContinuousAssignments1 def s elements[1] end def variable_lvalue elements[2] end end module ProceduralContinuousAssignments2 def s elements[1] end def variable_assignment elements[2] end end module ProceduralContinuousAssignments3 def s elements[1] end def net_assignment elements[2] end end module ProceduralContinuousAssignments4 def s elements[1] end def variable_lvalue elements[2] end end module ProceduralContinuousAssignments5 def s elements[1] end def net_lvalue elements[2] end end def _nt_procedural_continuous_assignments start_index = index if node_cache[:procedural_continuous_assignments].has_key?(index) cached = node_cache[:procedural_continuous_assignments][index] if cached node_cache[:procedural_continuous_assignments][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?("assign", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"assign"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r4 = _nt_variable_assignment s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ProceduralContinuousAssignments0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i5, s5 = index, [] if (match_len = has_terminal?("deassign", false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"deassign"') r6 = nil end s5 << r6 if r6 r7 = _nt_s s5 << r7 if r7 r8 = _nt_variable_lvalue s5 << r8 end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ProceduralContinuousAssignments1) else @index = i5 r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 else i9, s9 = index, [] if (match_len = has_terminal?("force", false, index)) r10 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"force"') r10 = nil end s9 << r10 if r10 r11 = _nt_s s9 << r11 if r11 r12 = _nt_variable_assignment s9 << r12 end end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(ProceduralContinuousAssignments2) else @index = i9 r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 else i13, s13 = index, [] if (match_len = has_terminal?("force", false, index)) r14 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"force"') r14 = nil end s13 << r14 if r14 r15 = _nt_s s13 << r15 if r15 r16 = _nt_net_assignment s13 << r16 end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(ProceduralContinuousAssignments3) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 else i17, s17 = index, [] if (match_len = has_terminal?("release", false, index)) r18 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"release"') r18 = nil end s17 << r18 if r18 r19 = _nt_s s17 << r19 if r19 r20 = _nt_variable_lvalue s17 << r20 end end if s17.last r17 = instantiate_node(SyntaxNode,input, i17...index, s17) r17.extend(ProceduralContinuousAssignments4) else @index = i17 r17 = nil end if r17 r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true r0 = r17 else i21, s21 = index, [] if (match_len = has_terminal?("release", false, index)) r22 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"release"') r22 = nil end s21 << r22 if r22 r23 = _nt_s s21 << r23 if r23 r24 = _nt_net_lvalue s21 << r24 end end if s21.last r21 = instantiate_node(SyntaxNode,input, i21...index, s21) r21.extend(ProceduralContinuousAssignments5) else @index = i21 r21 = nil end if r21 r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true r0 = r21 else @index = i0 r0 = nil end end end end end end node_cache[:procedural_continuous_assignments][start_index] = r0 r0 end module VariableAssignment0 def variable_lvalue elements[0] end def s1 elements[1] end def s2 elements[3] end def expression elements[4] end end module VariableAssignment1 def to_ast n :variable_assignment, *elements_to_ast end end def _nt_variable_assignment start_index = index if node_cache[:variable_assignment].has_key?(index) cached = node_cache[:variable_assignment][index] if cached node_cache[:variable_assignment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_variable_lvalue s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("=", false, index)) r3 = true @index += match_len else terminal_parse_failure('"="') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_expression s0 << r5 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(VariableAssignment0) r0.extend(VariableAssignment1) else @index = i0 r0 = nil end node_cache[:variable_assignment][start_index] = r0 r0 end module ParBlock0 def s elements[0] end def block_item_declaration elements[1] end end module ParBlock1 def s1 elements[0] end def s2 elements[2] end def block_identifier elements[3] end end module ParBlock2 def s elements[0] end def statement elements[1] end end module ParBlock3 def s elements[3] end end module ParBlock4 def to_ast n :par_block, *elements_to_ast end end def _nt_par_block start_index = index if node_cache[:par_block].has_key?(index) cached = node_cache[:par_block][index] if cached node_cache[:par_block][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("fork", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"fork"') r1 = nil end s0 << r1 if r1 i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(":", false, index)) r5 = true @index += match_len else terminal_parse_failure('":"') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_block_identifier s3 << r7 if r7 s8, i8 = [], index loop do i9, s9 = index, [] r10 = _nt_s s9 << r10 if r10 r11 = _nt_block_item_declaration s9 << r11 end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(ParBlock0) else @index = i9 r9 = nil end if r9 s8 << r9 else break end end r8 = instantiate_node(SyntaxNode,input, i8...index, s8) s3 << r8 end end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ParBlock1) else @index = i3 r3 = nil end if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 s12, i12 = [], index loop do i13, s13 = index, [] r14 = _nt_s s13 << r14 if r14 r15 = _nt_statement s13 << r15 end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(ParBlock2) else @index = i13 r13 = nil end if r13 s12 << r13 else break end end r12 = instantiate_node(SyntaxNode,input, i12...index, s12) s0 << r12 if r12 r16 = _nt_s s0 << r16 if r16 if (match_len = has_terminal?("join", false, index)) r17 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"join"') r17 = nil end s0 << r17 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ParBlock3) r0.extend(ParBlock4) else @index = i0 r0 = nil end node_cache[:par_block][start_index] = r0 r0 end module SeqBlock0 def s elements[0] end def block_item_declaration elements[1] end end module SeqBlock1 def s1 elements[0] end def s2 elements[2] end def block_identifier elements[3] end end module SeqBlock2 def s elements[0] end def statement elements[1] end end module SeqBlock3 def s elements[3] end end module SeqBlock4 def to_ast n :seq_block, *elements_to_ast end end def _nt_seq_block start_index = index if node_cache[:seq_block].has_key?(index) cached = node_cache[:seq_block][index] if cached node_cache[:seq_block][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("begin", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"begin"') r1 = nil end s0 << r1 if r1 i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?(":", false, index)) r5 = true @index += match_len else terminal_parse_failure('":"') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_block_identifier s3 << r7 if r7 s8, i8 = [], index loop do i9, s9 = index, [] r10 = _nt_s s9 << r10 if r10 r11 = _nt_block_item_declaration s9 << r11 end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(SeqBlock0) else @index = i9 r9 = nil end if r9 s8 << r9 else break end end r8 = instantiate_node(SyntaxNode,input, i8...index, s8) s3 << r8 end end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(SeqBlock1) else @index = i3 r3 = nil end if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 s12, i12 = [], index loop do i13, s13 = index, [] r14 = _nt_s s13 << r14 if r14 r15 = _nt_statement s13 << r15 end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(SeqBlock2) else @index = i13 r13 = nil end if r13 s12 << r13 else break end end r12 = instantiate_node(SyntaxNode,input, i12...index, s12) s0 << r12 if r12 r16 = _nt_s s0 << r16 if r16 if (match_len = has_terminal?("end", false, index)) r17 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"end"') r17 = nil end s0 << r17 end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SeqBlock3) r0.extend(SeqBlock4) else @index = i0 r0 = nil end node_cache[:seq_block][start_index] = r0 r0 end module Statement0 def s elements[0] end def attribute_instance elements[1] end end module Statement1 def s1 elements[1] end def blocking_assignment elements[2] end def s2 elements[3] end end module Statement2 def s elements[0] end def attribute_instance elements[1] end end module Statement3 def s elements[1] end def case_statement elements[2] end end module Statement4 def s elements[0] end def attribute_instance elements[1] end end module Statement5 def s elements[1] end def conditional_statement elements[2] end end module Statement6 def s elements[0] end def attribute_instance elements[1] end end module Statement7 def s elements[1] end def disable_statement elements[2] end end module Statement8 def s elements[0] end def attribute_instance elements[1] end end module Statement9 def s elements[1] end def event_trigger elements[2] end end module Statement10 def s elements[0] end def attribute_instance elements[1] end end module Statement11 def s elements[1] end def loop_statement elements[2] end end module Statement12 def s elements[0] end def attribute_instance elements[1] end end module Statement13 def s1 elements[1] end def nonblocking_assignment elements[2] end def s2 elements[3] end end module Statement14 def s elements[0] end def attribute_instance elements[1] end end module Statement15 def s elements[1] end def par_block elements[2] end end module Statement16 def s elements[0] end def attribute_instance elements[1] end end module Statement17 def s1 elements[1] end def procedural_continuous_assignments elements[2] end def s2 elements[3] end end module Statement18 def s elements[0] end def attribute_instance elements[1] end end module Statement19 def s elements[1] end def procedural_timing_control_statement elements[2] end end module Statement20 def s elements[0] end def attribute_instance elements[1] end end module Statement21 def s elements[1] end def seq_block elements[2] end end module Statement22 def s elements[0] end def attribute_instance elements[1] end end module Statement23 def s elements[1] end def system_task_enable elements[2] end end module Statement24 def s elements[0] end def attribute_instance elements[1] end end module Statement25 def s elements[1] end def task_enable elements[2] end end module Statement26 def s elements[0] end def attribute_instance elements[1] end end module Statement27 def s elements[1] end def wait_statement elements[2] end end module Statement28 def to_ast n :statement, *elements_to_ast end end def _nt_statement start_index = index if node_cache[:statement].has_key?(index) cached = node_cache[:statement][index] if cached node_cache[:statement][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index i1, s1 = index, [] s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(Statement0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s1 << r2 if r2 r6 = _nt_s s1 << r6 if r6 r7 = _nt_blocking_assignment s1 << r7 if r7 r8 = _nt_s s1 << r8 if r8 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(SyntaxNode,input, i1...index, s1) r1.extend(Statement1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(Statement28) r0.extend(Statement28) else i10, s10 = index, [] s11, i11 = [], index loop do i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 r14 = _nt_attribute_instance s12 << r14 end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(Statement2) else @index = i12 r12 = nil end if r12 s11 << r12 else break end end r11 = instantiate_node(SyntaxNode,input, i11...index, s11) s10 << r11 if r11 r15 = _nt_s s10 << r15 if r15 r16 = _nt_case_statement s10 << r16 end end if s10.last r10 = instantiate_node(SyntaxNode,input, i10...index, s10) r10.extend(Statement3) else @index = i10 r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 r0.extend(Statement28) r0.extend(Statement28) else i17, s17 = index, [] s18, i18 = [], index loop do i19, s19 = index, [] r20 = _nt_s s19 << r20 if r20 r21 = _nt_attribute_instance s19 << r21 end if s19.last r19 = instantiate_node(SyntaxNode,input, i19...index, s19) r19.extend(Statement4) else @index = i19 r19 = nil end if r19 s18 << r19 else break end end r18 = instantiate_node(SyntaxNode,input, i18...index, s18) s17 << r18 if r18 r22 = _nt_s s17 << r22 if r22 r23 = _nt_conditional_statement s17 << r23 end end if s17.last r17 = instantiate_node(SyntaxNode,input, i17...index, s17) r17.extend(Statement5) else @index = i17 r17 = nil end if r17 r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true r0 = r17 r0.extend(Statement28) r0.extend(Statement28) else i24, s24 = index, [] s25, i25 = [], index loop do i26, s26 = index, [] r27 = _nt_s s26 << r27 if r27 r28 = _nt_attribute_instance s26 << r28 end if s26.last r26 = instantiate_node(SyntaxNode,input, i26...index, s26) r26.extend(Statement6) else @index = i26 r26 = nil end if r26 s25 << r26 else break end end r25 = instantiate_node(SyntaxNode,input, i25...index, s25) s24 << r25 if r25 r29 = _nt_s s24 << r29 if r29 r30 = _nt_disable_statement s24 << r30 end end if s24.last r24 = instantiate_node(SyntaxNode,input, i24...index, s24) r24.extend(Statement7) else @index = i24 r24 = nil end if r24 r24 = SyntaxNode.new(input, (index-1)...index) if r24 == true r0 = r24 r0.extend(Statement28) r0.extend(Statement28) else i31, s31 = index, [] s32, i32 = [], index loop do i33, s33 = index, [] r34 = _nt_s s33 << r34 if r34 r35 = _nt_attribute_instance s33 << r35 end if s33.last r33 = instantiate_node(SyntaxNode,input, i33...index, s33) r33.extend(Statement8) else @index = i33 r33 = nil end if r33 s32 << r33 else break end end r32 = instantiate_node(SyntaxNode,input, i32...index, s32) s31 << r32 if r32 r36 = _nt_s s31 << r36 if r36 r37 = _nt_event_trigger s31 << r37 end end if s31.last r31 = instantiate_node(SyntaxNode,input, i31...index, s31) r31.extend(Statement9) else @index = i31 r31 = nil end if r31 r31 = SyntaxNode.new(input, (index-1)...index) if r31 == true r0 = r31 r0.extend(Statement28) r0.extend(Statement28) else i38, s38 = index, [] s39, i39 = [], index loop do i40, s40 = index, [] r41 = _nt_s s40 << r41 if r41 r42 = _nt_attribute_instance s40 << r42 end if s40.last r40 = instantiate_node(SyntaxNode,input, i40...index, s40) r40.extend(Statement10) else @index = i40 r40 = nil end if r40 s39 << r40 else break end end r39 = instantiate_node(SyntaxNode,input, i39...index, s39) s38 << r39 if r39 r43 = _nt_s s38 << r43 if r43 r44 = _nt_loop_statement s38 << r44 end end if s38.last r38 = instantiate_node(SyntaxNode,input, i38...index, s38) r38.extend(Statement11) else @index = i38 r38 = nil end if r38 r38 = SyntaxNode.new(input, (index-1)...index) if r38 == true r0 = r38 r0.extend(Statement28) r0.extend(Statement28) else i45, s45 = index, [] s46, i46 = [], index loop do i47, s47 = index, [] r48 = _nt_s s47 << r48 if r48 r49 = _nt_attribute_instance s47 << r49 end if s47.last r47 = instantiate_node(SyntaxNode,input, i47...index, s47) r47.extend(Statement12) else @index = i47 r47 = nil end if r47 s46 << r47 else break end end r46 = instantiate_node(SyntaxNode,input, i46...index, s46) s45 << r46 if r46 r50 = _nt_s s45 << r50 if r50 r51 = _nt_nonblocking_assignment s45 << r51 if r51 r52 = _nt_s s45 << r52 if r52 if (match_len = has_terminal?(";", false, index)) r53 = true @index += match_len else terminal_parse_failure('";"') r53 = nil end s45 << r53 end end end end if s45.last r45 = instantiate_node(SyntaxNode,input, i45...index, s45) r45.extend(Statement13) else @index = i45 r45 = nil end if r45 r45 = SyntaxNode.new(input, (index-1)...index) if r45 == true r0 = r45 r0.extend(Statement28) r0.extend(Statement28) else i54, s54 = index, [] s55, i55 = [], index loop do i56, s56 = index, [] r57 = _nt_s s56 << r57 if r57 r58 = _nt_attribute_instance s56 << r58 end if s56.last r56 = instantiate_node(SyntaxNode,input, i56...index, s56) r56.extend(Statement14) else @index = i56 r56 = nil end if r56 s55 << r56 else break end end r55 = instantiate_node(SyntaxNode,input, i55...index, s55) s54 << r55 if r55 r59 = _nt_s s54 << r59 if r59 r60 = _nt_par_block s54 << r60 end end if s54.last r54 = instantiate_node(SyntaxNode,input, i54...index, s54) r54.extend(Statement15) else @index = i54 r54 = nil end if r54 r54 = SyntaxNode.new(input, (index-1)...index) if r54 == true r0 = r54 r0.extend(Statement28) r0.extend(Statement28) else i61, s61 = index, [] s62, i62 = [], index loop do i63, s63 = index, [] r64 = _nt_s s63 << r64 if r64 r65 = _nt_attribute_instance s63 << r65 end if s63.last r63 = instantiate_node(SyntaxNode,input, i63...index, s63) r63.extend(Statement16) else @index = i63 r63 = nil end if r63 s62 << r63 else break end end r62 = instantiate_node(SyntaxNode,input, i62...index, s62) s61 << r62 if r62 r66 = _nt_s s61 << r66 if r66 r67 = _nt_procedural_continuous_assignments s61 << r67 if r67 r68 = _nt_s s61 << r68 if r68 if (match_len = has_terminal?(";", false, index)) r69 = true @index += match_len else terminal_parse_failure('";"') r69 = nil end s61 << r69 end end end end if s61.last r61 = instantiate_node(SyntaxNode,input, i61...index, s61) r61.extend(Statement17) else @index = i61 r61 = nil end if r61 r61 = SyntaxNode.new(input, (index-1)...index) if r61 == true r0 = r61 r0.extend(Statement28) r0.extend(Statement28) else i70, s70 = index, [] s71, i71 = [], index loop do i72, s72 = index, [] r73 = _nt_s s72 << r73 if r73 r74 = _nt_attribute_instance s72 << r74 end if s72.last r72 = instantiate_node(SyntaxNode,input, i72...index, s72) r72.extend(Statement18) else @index = i72 r72 = nil end if r72 s71 << r72 else break end end r71 = instantiate_node(SyntaxNode,input, i71...index, s71) s70 << r71 if r71 r75 = _nt_s s70 << r75 if r75 r76 = _nt_procedural_timing_control_statement s70 << r76 end end if s70.last r70 = instantiate_node(SyntaxNode,input, i70...index, s70) r70.extend(Statement19) else @index = i70 r70 = nil end if r70 r70 = SyntaxNode.new(input, (index-1)...index) if r70 == true r0 = r70 r0.extend(Statement28) r0.extend(Statement28) else i77, s77 = index, [] s78, i78 = [], index loop do i79, s79 = index, [] r80 = _nt_s s79 << r80 if r80 r81 = _nt_attribute_instance s79 << r81 end if s79.last r79 = instantiate_node(SyntaxNode,input, i79...index, s79) r79.extend(Statement20) else @index = i79 r79 = nil end if r79 s78 << r79 else break end end r78 = instantiate_node(SyntaxNode,input, i78...index, s78) s77 << r78 if r78 r82 = _nt_s s77 << r82 if r82 r83 = _nt_seq_block s77 << r83 end end if s77.last r77 = instantiate_node(SyntaxNode,input, i77...index, s77) r77.extend(Statement21) else @index = i77 r77 = nil end if r77 r77 = SyntaxNode.new(input, (index-1)...index) if r77 == true r0 = r77 r0.extend(Statement28) r0.extend(Statement28) else i84, s84 = index, [] s85, i85 = [], index loop do i86, s86 = index, [] r87 = _nt_s s86 << r87 if r87 r88 = _nt_attribute_instance s86 << r88 end if s86.last r86 = instantiate_node(SyntaxNode,input, i86...index, s86) r86.extend(Statement22) else @index = i86 r86 = nil end if r86 s85 << r86 else break end end r85 = instantiate_node(SyntaxNode,input, i85...index, s85) s84 << r85 if r85 r89 = _nt_s s84 << r89 if r89 r90 = _nt_system_task_enable s84 << r90 end end if s84.last r84 = instantiate_node(SyntaxNode,input, i84...index, s84) r84.extend(Statement23) else @index = i84 r84 = nil end if r84 r84 = SyntaxNode.new(input, (index-1)...index) if r84 == true r0 = r84 r0.extend(Statement28) r0.extend(Statement28) else i91, s91 = index, [] s92, i92 = [], index loop do i93, s93 = index, [] r94 = _nt_s s93 << r94 if r94 r95 = _nt_attribute_instance s93 << r95 end if s93.last r93 = instantiate_node(SyntaxNode,input, i93...index, s93) r93.extend(Statement24) else @index = i93 r93 = nil end if r93 s92 << r93 else break end end r92 = instantiate_node(SyntaxNode,input, i92...index, s92) s91 << r92 if r92 r96 = _nt_s s91 << r96 if r96 r97 = _nt_task_enable s91 << r97 end end if s91.last r91 = instantiate_node(SyntaxNode,input, i91...index, s91) r91.extend(Statement25) else @index = i91 r91 = nil end if r91 r91 = SyntaxNode.new(input, (index-1)...index) if r91 == true r0 = r91 r0.extend(Statement28) r0.extend(Statement28) else i98, s98 = index, [] s99, i99 = [], index loop do i100, s100 = index, [] r101 = _nt_s s100 << r101 if r101 r102 = _nt_attribute_instance s100 << r102 end if s100.last r100 = instantiate_node(SyntaxNode,input, i100...index, s100) r100.extend(Statement26) else @index = i100 r100 = nil end if r100 s99 << r100 else break end end r99 = instantiate_node(SyntaxNode,input, i99...index, s99) s98 << r99 if r99 r103 = _nt_s s98 << r103 if r103 r104 = _nt_wait_statement s98 << r104 end end if s98.last r98 = instantiate_node(SyntaxNode,input, i98...index, s98) r98.extend(Statement27) else @index = i98 r98 = nil end if r98 r98 = SyntaxNode.new(input, (index-1)...index) if r98 == true r0 = r98 r0.extend(Statement28) r0.extend(Statement28) else @index = i0 r0 = nil end end end end end end end end end end end end end end node_cache[:statement][start_index] = r0 r0 end module StatementOrNull0 def s elements[0] end def attribute_instance elements[1] end end module StatementOrNull1 def s elements[1] end end module StatementOrNull2 def to_ast elements_to_ast.first end end def _nt_statement_or_null start_index = index if node_cache[:statement_or_null].has_key?(index) cached = node_cache[:statement_or_null][index] if cached node_cache[:statement_or_null][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_statement if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(StatementOrNull2) r0.extend(StatementOrNull2) else i2, s2 = index, [] s3, i3 = [], index loop do i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 r6 = _nt_attribute_instance s4 << r6 end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(StatementOrNull0) else @index = i4 r4 = nil end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s2 << r3 if r3 r7 = _nt_s s2 << r7 if r7 if (match_len = has_terminal?(";", false, index)) r8 = true @index += match_len else terminal_parse_failure('";"') r8 = nil end s2 << r8 end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(StatementOrNull1) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(StatementOrNull2) r0.extend(StatementOrNull2) else @index = i0 r0 = nil end end node_cache[:statement_or_null][start_index] = r0 r0 end def _nt_function_statement1 start_index = index if node_cache[:function_statement1].has_key?(index) cached = node_cache[:function_statement1][index] if cached node_cache[:function_statement1][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_statement node_cache[:function_statement1][start_index] = r0 r0 end module DelayControl0 def s elements[1] end def delay_value elements[2] end end module DelayControl1 def s1 elements[1] end def s2 elements[3] end def mintypmax_expression elements[4] end def s3 elements[5] end end module DelayControl2 def to_ast n :delay_control, *elements_to_ast end end def _nt_delay_control start_index = index if node_cache[:delay_control].has_key?(index) cached = node_cache[:delay_control][index] if cached node_cache[:delay_control][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 r3 = _nt_s s1 << r3 if r3 r4 = _nt_delay_value s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(DelayControl0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(DelayControl2) r0.extend(DelayControl2) else 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 r7 = _nt_s s5 << r7 if r7 if (match_len = has_terminal?("(", false, index)) r8 = true @index += match_len else terminal_parse_failure('"("') r8 = nil end s5 << r8 if r8 r9 = _nt_s s5 << r9 if r9 r10 = _nt_mintypmax_expression s5 << r10 if r10 r11 = _nt_s s5 << r11 if r11 if (match_len = has_terminal?(")", false, index)) r12 = true @index += match_len else terminal_parse_failure('")"') r12 = nil end s5 << r12 end end end end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(DelayControl1) else @index = i5 r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(DelayControl2) r0.extend(DelayControl2) else @index = i0 r0 = nil end end node_cache[:delay_control][start_index] = r0 r0 end module DelayOrEventControl0 def s1 elements[1] end def s2 elements[3] end def expression elements[4] end def s3 elements[5] end def s4 elements[7] end def event_control elements[8] end end module DelayOrEventControl1 def to_ast n :delay_or_event_control, *elements_to_ast end end def _nt_delay_or_event_control start_index = index if node_cache[:delay_or_event_control].has_key?(index) cached = node_cache[:delay_or_event_control][index] if cached node_cache[:delay_or_event_control][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_delay_control if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(DelayOrEventControl1) r0.extend(DelayOrEventControl1) else r2 = _nt_event_control if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(DelayOrEventControl1) r0.extend(DelayOrEventControl1) else i3, s3 = index, [] if (match_len = has_terminal?("repeat", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"repeat"') r4 = nil end s3 << r4 if r4 r5 = _nt_s s3 << r5 if r5 if (match_len = has_terminal?("(", false, index)) r6 = true @index += match_len else terminal_parse_failure('"("') r6 = nil end s3 << r6 if r6 r7 = _nt_s s3 << r7 if r7 r8 = _nt_expression s3 << r8 if r8 r9 = _nt_s s3 << r9 if r9 if (match_len = has_terminal?(")", false, index)) r10 = true @index += match_len else terminal_parse_failure('")"') r10 = nil end s3 << r10 if r10 r11 = _nt_s s3 << r11 if r11 r12 = _nt_event_control s3 << r12 end end end end end end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(DelayOrEventControl0) else @index = i3 r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(DelayOrEventControl1) r0.extend(DelayOrEventControl1) else @index = i0 r0 = nil end end end node_cache[:delay_or_event_control][start_index] = r0 r0 end module DisableStatement0 def s1 elements[1] end def hierarchical_task_identifier elements[2] end def s2 elements[3] end end module DisableStatement1 def s1 elements[1] end def hierarchical_block_identifier elements[2] end def s2 elements[3] end end module DisableStatement2 def to_ast n :disable_statement, *elements_to_ast end end def _nt_disable_statement start_index = index if node_cache[:disable_statement].has_key?(index) cached = node_cache[:disable_statement][index] if cached node_cache[:disable_statement][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?("disable", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"disable"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r4 = _nt_hierarchical_task_identifier s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 if (match_len = has_terminal?(";", false, index)) r6 = true @index += match_len else terminal_parse_failure('";"') r6 = nil end s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(DisableStatement0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(DisableStatement2) r0.extend(DisableStatement2) else i7, s7 = index, [] if (match_len = has_terminal?("disable", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"disable"') r8 = nil end s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 r10 = _nt_hierarchical_block_identifier s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 if (match_len = has_terminal?(";", false, index)) r12 = true @index += match_len else terminal_parse_failure('";"') r12 = nil end s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(DisableStatement1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(DisableStatement2) r0.extend(DisableStatement2) else @index = i0 r0 = nil end end node_cache[:disable_statement][start_index] = r0 r0 end module EventControl0 def s elements[1] end def hierarchical_event_identifier elements[2] end end module EventControl1 def s1 elements[1] end def s2 elements[3] end def event_expression elements[4] end def s3 elements[5] end end module EventControl2 def s elements[1] end end module EventControl3 def s1 elements[1] end def s2 elements[3] end def s3 elements[5] end end module EventControl4 def to_ast n :event_control, *elements_to_ast end end def _nt_event_control start_index = index if node_cache[:event_control].has_key?(index) cached = node_cache[:event_control][index] if cached node_cache[:event_control][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 r3 = _nt_s s1 << r3 if r3 r4 = _nt_hierarchical_event_identifier s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(EventControl0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(EventControl4) r0.extend(EventControl4) else 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 r7 = _nt_s s5 << r7 if r7 if (match_len = has_terminal?("(", false, index)) r8 = true @index += match_len else terminal_parse_failure('"("') r8 = nil end s5 << r8 if r8 r9 = _nt_s s5 << r9 if r9 r10 = _nt_event_expression s5 << r10 if r10 r11 = _nt_s s5 << r11 if r11 if (match_len = has_terminal?(")", false, index)) r12 = true @index += match_len else terminal_parse_failure('")"') r12 = nil end s5 << r12 end end end end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(EventControl1) else @index = i5 r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(EventControl4) r0.extend(EventControl4) else i13, s13 = index, [] if (match_len = has_terminal?("@", false, index)) r14 = true @index += match_len else terminal_parse_failure('"@"') r14 = nil end s13 << r14 if r14 r15 = _nt_s s13 << r15 if r15 if (match_len = has_terminal?("*", false, index)) r16 = true @index += match_len else terminal_parse_failure('"*"') r16 = nil end s13 << r16 end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(EventControl2) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(EventControl4) r0.extend(EventControl4) else i17, s17 = index, [] if (match_len = has_terminal?("@", false, index)) r18 = true @index += match_len else terminal_parse_failure('"@"') r18 = nil end s17 << r18 if r18 r19 = _nt_s s17 << r19 if r19 if (match_len = has_terminal?("(", false, index)) r20 = true @index += match_len else terminal_parse_failure('"("') r20 = nil end s17 << r20 if r20 r21 = _nt_s s17 << r21 if r21 if (match_len = has_terminal?("*", false, index)) r22 = true @index += match_len else terminal_parse_failure('"*"') r22 = nil end s17 << r22 if r22 r23 = _nt_s s17 << r23 if r23 if (match_len = has_terminal?(")", false, index)) r24 = true @index += match_len else terminal_parse_failure('")"') r24 = nil end s17 << r24 end end end end end end if s17.last r17 = instantiate_node(SyntaxNode,input, i17...index, s17) r17.extend(EventControl3) else @index = i17 r17 = nil end if r17 r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true r0 = r17 r0.extend(EventControl4) r0.extend(EventControl4) else @index = i0 r0 = nil end end end end node_cache[:event_control][start_index] = r0 r0 end module EventTrigger0 def s1 elements[0] end def s2 elements[2] end def expression elements[3] end def s3 elements[4] end end module EventTrigger1 def s1 elements[1] end def hierarchical_event_identifier elements[2] end def s2 elements[4] end end module EventTrigger2 def to_ast n :event_trigger, *elements_to_ast end end def _nt_event_trigger start_index = index if node_cache[:event_trigger].has_key?(index) cached = node_cache[:event_trigger][index] if cached node_cache[:event_trigger][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = 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 s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_hierarchical_event_identifier s0 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 if (match_len = has_terminal?("[", false, index)) r7 = true @index += match_len else terminal_parse_failure('"["') r7 = nil end s5 << r7 if r7 r8 = _nt_s s5 << r8 if r8 r9 = _nt_expression s5 << r9 if r9 r10 = _nt_s s5 << r10 if r10 if (match_len = has_terminal?("]", false, index)) r11 = true @index += match_len else terminal_parse_failure('"]"') r11 = nil end s5 << r11 end end end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(EventTrigger0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 if r4 r12 = _nt_s s0 << r12 if r12 if (match_len = has_terminal?(";", false, index)) r13 = true @index += match_len else terminal_parse_failure('";"') r13 = nil end s0 << r13 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(EventTrigger1) r0.extend(EventTrigger2) else @index = i0 r0 = nil end node_cache[:event_trigger][start_index] = r0 r0 end module EventExpression0 def s elements[1] end def expression elements[2] end end module EventExpression1 def s elements[1] end def expression elements[2] end end module EventExpression2 def expression elements[0] end end module EventExpression3 def to_ast n :event_expression, *elements_to_ast end end def _nt_event_expression start_index = index if node_cache[:event_expression].has_key?(index) cached = node_cache[:event_expression][index] if cached node_cache[:event_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?("posedge", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"posedge"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r4 = _nt_expression s1 << r4 if r4 r6 = _nt_event_expression_tail if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s1 << r5 end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(EventExpression0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(EventExpression3) r0.extend(EventExpression3) else i7, s7 = index, [] if (match_len = has_terminal?("negedge", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"negedge"') r8 = nil end s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 r10 = _nt_expression s7 << r10 if r10 r12 = _nt_event_expression_tail 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(EventExpression1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(EventExpression3) r0.extend(EventExpression3) else i13, s13 = index, [] r14 = _nt_expression s13 << r14 if r14 r16 = _nt_event_expression_tail if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s13 << r15 end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(EventExpression2) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(EventExpression3) r0.extend(EventExpression3) else @index = i0 r0 = nil end end end node_cache[:event_expression][start_index] = r0 r0 end module EventExpressionTail0 def s1 elements[0] end def s2 elements[2] end def event_expression elements[3] end end module EventExpressionTail1 def s1 elements[0] end def s2 elements[2] end def event_expression elements[3] end end def _nt_event_expression_tail start_index = index if node_cache[:event_expression_tail].has_key?(index) cached = node_cache[:event_expression_tail][index] if cached node_cache[:event_expression_tail][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_s s1 << r2 if r2 if (match_len = has_terminal?("or", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"or"') r3 = nil end s1 << r3 if r3 r4 = _nt_s s1 << r4 if r4 r5 = _nt_event_expression s1 << r5 if r5 r7 = _nt_event_expression_tail if r7 r6 = r7 else r6 = instantiate_node(SyntaxNode,input, index...index) end s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(EventExpressionTail0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i8, s8 = index, [] r9 = _nt_s s8 << r9 if r9 if (match_len = has_terminal?(",", false, index)) r10 = true @index += match_len else terminal_parse_failure('","') r10 = nil end s8 << r10 if r10 r11 = _nt_s s8 << r11 if r11 r12 = _nt_event_expression s8 << r12 if r12 r14 = _nt_event_expression_tail if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s8 << r13 end end end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(EventExpressionTail1) else @index = i8 r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else @index = i0 r0 = nil end end node_cache[:event_expression_tail][start_index] = r0 r0 end def _nt_procedural_timing_control start_index = index if node_cache[:procedural_timing_control].has_key?(index) cached = node_cache[:procedural_timing_control][index] if cached node_cache[:procedural_timing_control][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_delay_control if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_event_control if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:procedural_timing_control][start_index] = r0 r0 end module ProceduralTimingControlStatement0 def procedural_timing_control elements[0] end def s elements[1] end def statement_or_null elements[2] end end module ProceduralTimingControlStatement1 def to_ast n :procedural_timing_control_statement, *elements_to_ast end end def _nt_procedural_timing_control_statement start_index = index if node_cache[:procedural_timing_control_statement].has_key?(index) cached = node_cache[:procedural_timing_control_statement][index] if cached node_cache[:procedural_timing_control_statement][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_procedural_timing_control s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_statement_or_null s0 << r3 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ProceduralTimingControlStatement0) r0.extend(ProceduralTimingControlStatement1) else @index = i0 r0 = nil end node_cache[:procedural_timing_control_statement][start_index] = r0 r0 end module WaitStatement0 def s1 elements[1] end def s2 elements[3] end def expression elements[4] end def s3 elements[5] end def s4 elements[7] end def statement_or_null elements[8] end end module WaitStatement1 def to_ast n :wait_statement, *elements_to_ast end end def _nt_wait_statement start_index = index if node_cache[:wait_statement].has_key?(index) cached = node_cache[:wait_statement][index] if cached node_cache[:wait_statement][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("wait", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"wait"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_expression s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(")", false, index)) r7 = true @index += match_len else terminal_parse_failure('")"') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_statement_or_null s0 << r9 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(WaitStatement0) r0.extend(WaitStatement1) else @index = i0 r0 = nil end node_cache[:wait_statement][start_index] = r0 r0 end module ConditionalStatement0 def s1 elements[0] end def s2 elements[2] end def statement_or_null elements[3] end end module ConditionalStatement1 def s1 elements[1] end def s2 elements[3] end def expression elements[4] end def s3 elements[5] end def s4 elements[7] end def statement_or_null elements[8] end end module ConditionalStatement2 def to_ast n :conditional_statement, *elements_to_ast end end def _nt_conditional_statement start_index = index if node_cache[:conditional_statement].has_key?(index) cached = node_cache[:conditional_statement][index] if cached node_cache[:conditional_statement][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?("if", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"if"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_expression s1 << r6 if r6 r7 = _nt_s s1 << r7 if r7 if (match_len = has_terminal?(")", false, index)) r8 = true @index += match_len else terminal_parse_failure('")"') r8 = nil end s1 << r8 if r8 r9 = _nt_s s1 << r9 if r9 r10 = _nt_statement_or_null s1 << r10 if r10 i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 if (match_len = has_terminal?("else", false, index)) r14 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"else"') r14 = nil end s12 << r14 if r14 r15 = _nt_s s12 << r15 if r15 r16 = _nt_statement_or_null s12 << r16 end end end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(ConditionalStatement0) else @index = i12 r12 = nil end if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s1 << r11 end end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ConditionalStatement1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ConditionalStatement2) r0.extend(ConditionalStatement2) else r17 = _nt_if_else_if_statement if r17 r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true r0 = r17 r0.extend(ConditionalStatement2) r0.extend(ConditionalStatement2) else @index = i0 r0 = nil end end node_cache[:conditional_statement][start_index] = r0 r0 end module IfElseIfStatement0 def s1 elements[0] end def s2 elements[2] end def s3 elements[4] end def s4 elements[6] end def expression elements[7] end def s5 elements[8] end def s6 elements[10] end def statement_or_null elements[11] end end module IfElseIfStatement1 def s1 elements[0] end def s2 elements[2] end def statement_or_null elements[3] end end module IfElseIfStatement2 def s1 elements[1] end def s2 elements[3] end def expression elements[4] end def s3 elements[5] end def s4 elements[7] end def statement_or_null elements[8] end end module IfElseIfStatement3 def to_ast n :if_else_if_statement, *elements_to_ast end end def _nt_if_else_if_statement start_index = index if node_cache[:if_else_if_statement].has_key?(index) cached = node_cache[:if_else_if_statement][index] if cached node_cache[:if_else_if_statement][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("if", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"if"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_expression s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(")", false, index)) r7 = true @index += match_len else terminal_parse_failure('")"') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_statement_or_null s0 << r9 if r9 s10, i10 = [], index loop do i11, s11 = index, [] r12 = _nt_s s11 << r12 if r12 if (match_len = has_terminal?("else", false, index)) r13 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"else"') r13 = nil end s11 << r13 if r13 r14 = _nt_s s11 << r14 if r14 if (match_len = has_terminal?("if", false, index)) r15 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"if"') r15 = nil end s11 << r15 if r15 r16 = _nt_s s11 << r16 if r16 if (match_len = has_terminal?("(", false, index)) r17 = true @index += match_len else terminal_parse_failure('"("') r17 = nil end s11 << r17 if r17 r18 = _nt_s s11 << r18 if r18 r19 = _nt_expression s11 << r19 if r19 r20 = _nt_s s11 << r20 if r20 if (match_len = has_terminal?(")", false, index)) r21 = true @index += match_len else terminal_parse_failure('")"') r21 = nil end s11 << r21 if r21 r22 = _nt_s s11 << r22 if r22 r23 = _nt_statement_or_null s11 << r23 end end end end end end end end end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(IfElseIfStatement0) else @index = i11 r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s0 << r10 if r10 i25, s25 = index, [] r26 = _nt_s s25 << r26 if r26 if (match_len = has_terminal?("else", false, index)) r27 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"else"') r27 = nil end s25 << r27 if r27 r28 = _nt_s s25 << r28 if r28 r29 = _nt_statement_or_null s25 << r29 end end end if s25.last r25 = instantiate_node(SyntaxNode,input, i25...index, s25) r25.extend(IfElseIfStatement1) else @index = i25 r25 = nil end if r25 r24 = r25 else r24 = instantiate_node(SyntaxNode,input, index...index) end s0 << r24 end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(IfElseIfStatement2) r0.extend(IfElseIfStatement3) else @index = i0 r0 = nil end node_cache[:if_else_if_statement][start_index] = r0 r0 end module CaseStatement0 def s elements[0] end def case_item elements[1] end end module CaseStatement1 def s1 elements[1] end def s2 elements[3] end def expression elements[4] end def s3 elements[5] end def s4 elements[7] end def case_item elements[8] end def s5 elements[10] end end module CaseStatement2 def s elements[0] end def case_item elements[1] end end module CaseStatement3 def s1 elements[1] end def s2 elements[3] end def expression elements[4] end def s3 elements[5] end def s4 elements[7] end def case_item elements[8] end def s5 elements[10] end end module CaseStatement4 def s elements[0] end def case_item elements[1] end end module CaseStatement5 def s1 elements[1] end def s2 elements[3] end def expression elements[4] end def s3 elements[5] end def s4 elements[7] end def case_item elements[8] end def s5 elements[10] end end module CaseStatement6 def to_ast n :case_statement, *elements_to_ast end end def _nt_case_statement start_index = index if node_cache[:case_statement].has_key?(index) cached = node_cache[:case_statement][index] if cached node_cache[:case_statement][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?("case", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"case"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_expression s1 << r6 if r6 r7 = _nt_s s1 << r7 if r7 if (match_len = has_terminal?(")", false, index)) r8 = true @index += match_len else terminal_parse_failure('")"') r8 = nil end s1 << r8 if r8 r9 = _nt_s s1 << r9 if r9 r10 = _nt_case_item s1 << r10 if r10 s11, i11 = [], index loop do i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 r14 = _nt_case_item s12 << r14 end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(CaseStatement0) else @index = i12 r12 = nil end if r12 s11 << r12 else break end end r11 = instantiate_node(SyntaxNode,input, i11...index, s11) s1 << r11 if r11 r15 = _nt_s s1 << r15 if r15 if (match_len = has_terminal?("endcase", false, index)) r16 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endcase"') r16 = nil end s1 << r16 end end end end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(CaseStatement1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(CaseStatement6) r0.extend(CaseStatement6) else i17, s17 = index, [] if (match_len = has_terminal?("casez", false, index)) r18 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"casez"') r18 = nil end s17 << r18 if r18 r19 = _nt_s s17 << r19 if r19 if (match_len = has_terminal?("(", false, index)) r20 = true @index += match_len else terminal_parse_failure('"("') r20 = nil end s17 << r20 if r20 r21 = _nt_s s17 << r21 if r21 r22 = _nt_expression s17 << r22 if r22 r23 = _nt_s s17 << r23 if r23 if (match_len = has_terminal?(")", false, index)) r24 = true @index += match_len else terminal_parse_failure('")"') r24 = nil end s17 << r24 if r24 r25 = _nt_s s17 << r25 if r25 r26 = _nt_case_item s17 << r26 if r26 s27, i27 = [], index loop do i28, s28 = index, [] r29 = _nt_s s28 << r29 if r29 r30 = _nt_case_item s28 << r30 end if s28.last r28 = instantiate_node(SyntaxNode,input, i28...index, s28) r28.extend(CaseStatement2) else @index = i28 r28 = nil end if r28 s27 << r28 else break end end r27 = instantiate_node(SyntaxNode,input, i27...index, s27) s17 << r27 if r27 r31 = _nt_s s17 << r31 if r31 if (match_len = has_terminal?("endcase", false, index)) r32 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endcase"') r32 = nil end s17 << r32 end end end end end end end end end end end if s17.last r17 = instantiate_node(SyntaxNode,input, i17...index, s17) r17.extend(CaseStatement3) else @index = i17 r17 = nil end if r17 r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true r0 = r17 r0.extend(CaseStatement6) r0.extend(CaseStatement6) else i33, s33 = index, [] if (match_len = has_terminal?("casex", false, index)) r34 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"casex"') r34 = nil end s33 << r34 if r34 r35 = _nt_s s33 << r35 if r35 if (match_len = has_terminal?("(", false, index)) r36 = true @index += match_len else terminal_parse_failure('"("') r36 = nil end s33 << r36 if r36 r37 = _nt_s s33 << r37 if r37 r38 = _nt_expression s33 << r38 if r38 r39 = _nt_s s33 << r39 if r39 if (match_len = has_terminal?(")", false, index)) r40 = true @index += match_len else terminal_parse_failure('")"') r40 = nil end s33 << r40 if r40 r41 = _nt_s s33 << r41 if r41 r42 = _nt_case_item s33 << r42 if r42 s43, i43 = [], index loop do i44, s44 = index, [] r45 = _nt_s s44 << r45 if r45 r46 = _nt_case_item s44 << r46 end if s44.last r44 = instantiate_node(SyntaxNode,input, i44...index, s44) r44.extend(CaseStatement4) else @index = i44 r44 = nil end if r44 s43 << r44 else break end end r43 = instantiate_node(SyntaxNode,input, i43...index, s43) s33 << r43 if r43 r47 = _nt_s s33 << r47 if r47 if (match_len = has_terminal?("endcase", false, index)) r48 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endcase"') r48 = nil end s33 << r48 end end end end end end end end end end end if s33.last r33 = instantiate_node(SyntaxNode,input, i33...index, s33) r33.extend(CaseStatement5) else @index = i33 r33 = nil end if r33 r33 = SyntaxNode.new(input, (index-1)...index) if r33 == true r0 = r33 r0.extend(CaseStatement6) r0.extend(CaseStatement6) else @index = i0 r0 = nil end end end node_cache[:case_statement][start_index] = r0 r0 end module CaseItem0 def s1 elements[0] end def s2 elements[2] end def expression elements[3] end end module CaseItem1 def expression elements[0] end def s1 elements[2] end def s2 elements[4] end def statement_or_null elements[5] end end module CaseItem2 def s1 elements[1] end def s2 elements[3] end def statement_or_null elements[4] end end module CaseItem3 def to_ast n :case_item, *elements_to_ast end end def _nt_case_item start_index = index if node_cache[:case_item].has_key?(index) cached = node_cache[:case_item][index] if cached node_cache[:case_item][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_expression s1 << r2 if r2 s3, i3 = [], index loop do i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 if (match_len = has_terminal?(",", false, index)) r6 = true @index += match_len else terminal_parse_failure('","') r6 = nil end s4 << r6 if r6 r7 = _nt_s s4 << r7 if r7 r8 = _nt_expression s4 << r8 end end end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(CaseItem0) else @index = i4 r4 = nil end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s1 << r3 if r3 r9 = _nt_s s1 << r9 if r9 if (match_len = has_terminal?(":", false, index)) r10 = true @index += match_len else terminal_parse_failure('":"') r10 = nil end s1 << r10 if r10 r11 = _nt_s s1 << r11 if r11 r12 = _nt_statement_or_null s1 << r12 end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(CaseItem1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(CaseItem3) r0.extend(CaseItem3) else i13, s13 = index, [] if (match_len = has_terminal?("default", false, index)) r14 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"default"') r14 = nil end s13 << r14 if r14 r15 = _nt_s s13 << r15 if r15 if (match_len = has_terminal?(":", false, index)) r17 = true @index += match_len else terminal_parse_failure('":"') r17 = nil end if r17 r16 = r17 else r16 = instantiate_node(SyntaxNode,input, index...index) end s13 << r16 if r16 r18 = _nt_s s13 << r18 if r18 r19 = _nt_statement_or_null s13 << r19 end end end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(CaseItem2) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(CaseItem3) r0.extend(CaseItem3) else @index = i0 r0 = nil end end node_cache[:case_item][start_index] = r0 r0 end module LoopStatement0 def s elements[1] end def statement elements[2] end end module LoopStatement1 def s1 elements[1] end def s2 elements[3] end def expression elements[4] end def s3 elements[5] end def s4 elements[7] end def statement elements[8] end end module LoopStatement2 def s1 elements[1] end def s2 elements[3] end def expression elements[4] end def s3 elements[5] end def s4 elements[7] end def statement elements[8] end end module LoopStatement3 def s1 elements[1] end def s2 elements[3] end def variable_assignment1 elements[4] end def s3 elements[5] end def s4 elements[7] end def expression elements[8] end def s5 elements[9] end def s6 elements[11] end def variable_assignment2 elements[12] end def s7 elements[13] end def s8 elements[15] end def statement elements[16] end end module LoopStatement4 def to_ast n :loop_statement, *elements_to_ast end end def _nt_loop_statement start_index = index if node_cache[:loop_statement].has_key?(index) cached = node_cache[:loop_statement][index] if cached node_cache[:loop_statement][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?("forever", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"forever"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 r4 = _nt_statement s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(LoopStatement0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(LoopStatement4) r0.extend(LoopStatement4) else i5, s5 = index, [] if (match_len = has_terminal?("repeat", false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"repeat"') r6 = nil end s5 << r6 if r6 r7 = _nt_s s5 << r7 if r7 if (match_len = has_terminal?("(", false, index)) r8 = true @index += match_len else terminal_parse_failure('"("') r8 = nil end s5 << r8 if r8 r9 = _nt_s s5 << r9 if r9 r10 = _nt_expression s5 << r10 if r10 r11 = _nt_s s5 << r11 if r11 if (match_len = has_terminal?(")", false, index)) r12 = true @index += match_len else terminal_parse_failure('")"') r12 = nil end s5 << r12 if r12 r13 = _nt_s s5 << r13 if r13 r14 = _nt_statement s5 << r14 end end end end end end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(LoopStatement1) else @index = i5 r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(LoopStatement4) r0.extend(LoopStatement4) else i15, s15 = index, [] if (match_len = has_terminal?("while", false, index)) r16 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"while"') r16 = nil end s15 << r16 if r16 r17 = _nt_s s15 << r17 if r17 if (match_len = has_terminal?("(", false, index)) r18 = true @index += match_len else terminal_parse_failure('"("') r18 = nil end s15 << r18 if r18 r19 = _nt_s s15 << r19 if r19 r20 = _nt_expression s15 << r20 if r20 r21 = _nt_s s15 << r21 if r21 if (match_len = has_terminal?(")", false, index)) r22 = true @index += match_len else terminal_parse_failure('")"') r22 = nil end s15 << r22 if r22 r23 = _nt_s s15 << r23 if r23 r24 = _nt_statement s15 << r24 end end end end end end end end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(LoopStatement2) else @index = i15 r15 = nil end if r15 r15 = SyntaxNode.new(input, (index-1)...index) if r15 == true r0 = r15 r0.extend(LoopStatement4) r0.extend(LoopStatement4) else i25, s25 = index, [] if (match_len = has_terminal?("for", false, index)) r26 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"for"') r26 = nil end s25 << r26 if r26 r27 = _nt_s s25 << r27 if r27 if (match_len = has_terminal?("(", false, index)) r28 = true @index += match_len else terminal_parse_failure('"("') r28 = nil end s25 << r28 if r28 r29 = _nt_s s25 << r29 if r29 r30 = _nt_variable_assignment s25 << r30 if r30 r31 = _nt_s s25 << r31 if r31 if (match_len = has_terminal?(";", false, index)) r32 = true @index += match_len else terminal_parse_failure('";"') r32 = nil end s25 << r32 if r32 r33 = _nt_s s25 << r33 if r33 r34 = _nt_expression s25 << r34 if r34 r35 = _nt_s s25 << r35 if r35 if (match_len = has_terminal?(";", false, index)) r36 = true @index += match_len else terminal_parse_failure('";"') r36 = nil end s25 << r36 if r36 r37 = _nt_s s25 << r37 if r37 r38 = _nt_variable_assignment s25 << r38 if r38 r39 = _nt_s s25 << r39 if r39 if (match_len = has_terminal?(")", false, index)) r40 = true @index += match_len else terminal_parse_failure('")"') r40 = nil end s25 << r40 if r40 r41 = _nt_s s25 << r41 if r41 r42 = _nt_statement s25 << r42 end end end end end end end end end end end end end end end end if s25.last r25 = instantiate_node(SyntaxNode,input, i25...index, s25) r25.extend(LoopStatement3) else @index = i25 r25 = nil end if r25 r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true r0 = r25 r0.extend(LoopStatement4) r0.extend(LoopStatement4) else @index = i0 r0 = nil end end end end node_cache[:loop_statement][start_index] = r0 r0 end module SystemTaskEnable0 def s elements[0] end end module SystemTaskEnable1 def s1 elements[0] end def s2 elements[2] end def s3 elements[4] end def s4 elements[6] end end module SystemTaskEnable2 def system_task_identifier elements[0] end def s elements[2] end end module SystemTaskEnable3 def to_ast n :system_task_enable, *elements_to_ast end end def _nt_system_task_enable start_index = index if node_cache[:system_task_enable].has_key?(index) cached = node_cache[:system_task_enable][index] if cached node_cache[:system_task_enable][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_system_task_identifier s0 << r1 if r1 i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?("(", false, index)) r5 = true @index += match_len else terminal_parse_failure('"("') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r8 = _nt_expression if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s3 << r7 if r7 r9 = _nt_s s3 << r9 if r9 s10, i10 = [], index loop do i11, s11 = index, [] r12 = _nt_s s11 << r12 if r12 if (match_len = has_terminal?(",", false, index)) r13 = true @index += match_len else terminal_parse_failure('","') r13 = nil end s11 << r13 if r13 r15 = _nt_expression if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s11 << r14 end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(SystemTaskEnable0) else @index = i11 r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s3 << r10 if r10 r16 = _nt_s s3 << r16 if r16 if (match_len = has_terminal?(")", false, index)) r17 = true @index += match_len else terminal_parse_failure('")"') r17 = nil end s3 << r17 end end end end end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(SystemTaskEnable1) else @index = i3 r3 = nil end if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 r18 = _nt_s s0 << r18 if r18 if (match_len = has_terminal?(";", false, index)) r19 = true @index += match_len else terminal_parse_failure('";"') r19 = nil end s0 << r19 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SystemTaskEnable2) r0.extend(SystemTaskEnable3) else @index = i0 r0 = nil end node_cache[:system_task_enable][start_index] = r0 r0 end module TaskEnable0 def s1 elements[0] end def s2 elements[2] end def expression elements[3] end end module TaskEnable1 def s1 elements[0] end def s2 elements[2] end def expression elements[3] end def s3 elements[5] end end module TaskEnable2 def hierarchical_task_identifier elements[0] end def s elements[2] end end module TaskEnable3 def to_ast n :task_enable, *elements_to_ast end end def _nt_task_enable start_index = index if node_cache[:task_enable].has_key?(index) cached = node_cache[:task_enable][index] if cached node_cache[:task_enable][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_hierarchical_task_identifier s0 << r1 if r1 i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?("(", false, index)) r5 = true @index += match_len else terminal_parse_failure('"("') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_expression s3 << r7 if r7 s8, i8 = [], index loop do i9, s9 = index, [] r10 = _nt_s s9 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s9 << r11 if r11 r12 = _nt_s s9 << r12 if r12 r13 = _nt_expression s9 << r13 end end end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(TaskEnable0) else @index = i9 r9 = nil end if r9 s8 << r9 else break end end r8 = instantiate_node(SyntaxNode,input, i8...index, s8) s3 << r8 if r8 r14 = _nt_s s3 << r14 if r14 if (match_len = has_terminal?(")", false, index)) r15 = true @index += match_len else terminal_parse_failure('")"') r15 = nil end s3 << r15 end end end end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(TaskEnable1) else @index = i3 r3 = nil end if r3 r2 = r3 else r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 r16 = _nt_s s0 << r16 if r16 if (match_len = has_terminal?(";", false, index)) r17 = true @index += match_len else terminal_parse_failure('";"') r17 = nil end s0 << r17 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(TaskEnable2) r0.extend(TaskEnable3) else @index = i0 r0 = nil end node_cache[:task_enable][start_index] = r0 r0 end module SpecifyBlock0 def s elements[0] end def specify_item elements[1] end end module SpecifyBlock1 def s elements[2] end end module SpecifyBlock2 def to_ast n :specify_block, *elements_to_ast end end def _nt_specify_block start_index = index if node_cache[:specify_block].has_key?(index) cached = node_cache[:specify_block][index] if cached node_cache[:specify_block][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("specify", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"specify"') r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_specify_item s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(SpecifyBlock0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?("endspecify", false, index)) r7 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"endspecify"') r7 = nil end s0 << r7 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SpecifyBlock1) r0.extend(SpecifyBlock2) else @index = i0 r0 = nil end node_cache[:specify_block][start_index] = r0 r0 end def _nt_specify_item start_index = index if node_cache[:specify_item].has_key?(index) cached = node_cache[:specify_item][index] if cached node_cache[:specify_item][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_specparam_declaration if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_pulsestyle_declaration if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else r3 = _nt_showcancelled_declaration if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else r4 = _nt_path_declaration if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 else r5 = _nt_system_timing_check if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 else @index = i0 r0 = nil end end end end end node_cache[:specify_item][start_index] = r0 r0 end module PulsestyleDeclaration0 def S elements[1] end def list_of_path_outputs elements[2] end def s elements[3] end end module PulsestyleDeclaration1 def S elements[1] end def list_of_path_outputs elements[2] end def s elements[3] end end module PulsestyleDeclaration2 def to_ast n :pulsestyle_declaration, *elements_to_ast end end def _nt_pulsestyle_declaration start_index = index if node_cache[:pulsestyle_declaration].has_key?(index) cached = node_cache[:pulsestyle_declaration][index] if cached node_cache[:pulsestyle_declaration][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?("pulsestyle_onevent", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"pulsestyle_onevent"') r2 = nil end s1 << r2 if r2 r3 = _nt_S s1 << r3 if r3 r4 = _nt_list_of_path_outputs s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 if (match_len = has_terminal?(";", false, index)) r6 = true @index += match_len else terminal_parse_failure('";"') r6 = nil end s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(PulsestyleDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(PulsestyleDeclaration2) r0.extend(PulsestyleDeclaration2) else i7, s7 = index, [] if (match_len = has_terminal?("pulsestyle_ondetect", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"pulsestyle_ondetect"') r8 = nil end s7 << r8 if r8 r9 = _nt_S s7 << r9 if r9 r10 = _nt_list_of_path_outputs s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 if (match_len = has_terminal?(";", false, index)) r12 = true @index += match_len else terminal_parse_failure('";"') r12 = nil end s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(PulsestyleDeclaration1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(PulsestyleDeclaration2) r0.extend(PulsestyleDeclaration2) else @index = i0 r0 = nil end end node_cache[:pulsestyle_declaration][start_index] = r0 r0 end module ShowcancelledDeclaration0 def S elements[1] end def list_of_path_outputs elements[2] end def s elements[3] end end module ShowcancelledDeclaration1 def S elements[1] end def list_of_path_outputs elements[2] end def s elements[3] end end module ShowcancelledDeclaration2 def to_ast n :showcancelled_declaration, *elements_to_ast end end def _nt_showcancelled_declaration start_index = index if node_cache[:showcancelled_declaration].has_key?(index) cached = node_cache[:showcancelled_declaration][index] if cached node_cache[:showcancelled_declaration][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?("showcancelled", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"showcancelled"') r2 = nil end s1 << r2 if r2 r3 = _nt_S s1 << r3 if r3 r4 = _nt_list_of_path_outputs s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 if (match_len = has_terminal?(";", false, index)) r6 = true @index += match_len else terminal_parse_failure('";"') r6 = nil end s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ShowcancelledDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ShowcancelledDeclaration2) r0.extend(ShowcancelledDeclaration2) else i7, s7 = index, [] if (match_len = has_terminal?("noshowcancelled", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"noshowcancelled"') r8 = nil end s7 << r8 if r8 r9 = _nt_S s7 << r9 if r9 r10 = _nt_list_of_path_outputs s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 if (match_len = has_terminal?(";", false, index)) r12 = true @index += match_len else terminal_parse_failure('";"') r12 = nil end s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(ShowcancelledDeclaration1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(ShowcancelledDeclaration2) r0.extend(ShowcancelledDeclaration2) else @index = i0 r0 = nil end end node_cache[:showcancelled_declaration][start_index] = r0 r0 end module PathDeclaration0 def edge_sensitive_path_declaration elements[0] end def s elements[1] end end module PathDeclaration1 def state_dependent_path_declaration elements[0] end def s elements[1] end end module PathDeclaration2 def simple_path_declaration elements[0] end def s elements[1] end end module PathDeclaration3 def to_ast n :path_declaration, *elements_to_ast end end def _nt_path_declaration start_index = index if node_cache[:path_declaration].has_key?(index) cached = node_cache[:path_declaration][index] if cached node_cache[:path_declaration][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_edge_sensitive_path_declaration s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?(";", false, index)) r4 = true @index += match_len else terminal_parse_failure('";"') r4 = nil end s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(PathDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(PathDeclaration3) r0.extend(PathDeclaration3) else i5, s5 = index, [] r6 = _nt_state_dependent_path_declaration s5 << r6 if r6 r7 = _nt_s s5 << r7 if r7 if (match_len = has_terminal?(";", false, index)) r8 = true @index += match_len else terminal_parse_failure('";"') r8 = nil end s5 << r8 end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(PathDeclaration1) else @index = i5 r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(PathDeclaration3) r0.extend(PathDeclaration3) else i9, s9 = index, [] r10 = _nt_simple_path_declaration s9 << r10 if r10 r11 = _nt_s s9 << r11 if r11 if (match_len = has_terminal?(";", false, index)) r12 = true @index += match_len else terminal_parse_failure('";"') r12 = nil end s9 << r12 end end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(PathDeclaration2) else @index = i9 r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(PathDeclaration3) r0.extend(PathDeclaration3) else @index = i0 r0 = nil end end end node_cache[:path_declaration][start_index] = r0 r0 end module SimplePathDeclaration0 def parallel_path_description elements[0] end def s1 elements[1] end def s2 elements[3] end def path_delay_value elements[4] end end module SimplePathDeclaration1 def full_path_description elements[0] end def s1 elements[1] end def s2 elements[3] end def path_delay_value elements[4] end end module SimplePathDeclaration2 def to_ast n :simple_path_declaration, *elements_to_ast end end def _nt_simple_path_declaration start_index = index if node_cache[:simple_path_declaration].has_key?(index) cached = node_cache[:simple_path_declaration][index] if cached node_cache[:simple_path_declaration][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_parallel_path_description s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("=", false, index)) r4 = true @index += match_len else terminal_parse_failure('"="') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_path_delay_value s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(SimplePathDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(SimplePathDeclaration2) r0.extend(SimplePathDeclaration2) else i7, s7 = index, [] r8 = _nt_full_path_description s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 if (match_len = has_terminal?("=", false, index)) r10 = true @index += match_len else terminal_parse_failure('"="') r10 = nil end s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 r12 = _nt_path_delay_value s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(SimplePathDeclaration1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(SimplePathDeclaration2) r0.extend(SimplePathDeclaration2) else @index = i0 r0 = nil end end node_cache[:simple_path_declaration][start_index] = r0 r0 end module ParallelPathDescription0 def s1 elements[1] end def specify_input_terminal_descriptor elements[2] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def specify_output_terminal_descriptor elements[8] end def s5 elements[9] end end module ParallelPathDescription1 def to_ast n :parallel_path_description, *elements_to_ast end end def _nt_parallel_path_description start_index = index if node_cache[:parallel_path_description].has_key?(index) cached = node_cache[:parallel_path_description][index] if cached node_cache[:parallel_path_description][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("(", false, index)) r1 = true @index += match_len else terminal_parse_failure('"("') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_specify_input_terminal_descriptor s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r6 = _nt_polarity_operator if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s0 << r5 if r5 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?("=>", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"=>"') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 r10 = _nt_specify_output_terminal_descriptor s0 << r10 if r10 r11 = _nt_s s0 << r11 if r11 if (match_len = has_terminal?(")", false, index)) r12 = true @index += match_len else terminal_parse_failure('")"') r12 = nil end s0 << r12 end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ParallelPathDescription0) r0.extend(ParallelPathDescription1) else @index = i0 r0 = nil end node_cache[:parallel_path_description][start_index] = r0 r0 end module FullPathDescription0 def s1 elements[1] end def list_of_path_inputs elements[2] end def s2 elements[3] end def s3 elements[5] end def s4 elements[7] end def list_of_path_outputs elements[8] end def s5 elements[9] end end module FullPathDescription1 def to_ast n :full_path_description, *elements_to_ast end end def _nt_full_path_description start_index = index if node_cache[:full_path_description].has_key?(index) cached = node_cache[:full_path_description][index] if cached node_cache[:full_path_description][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("(", false, index)) r1 = true @index += match_len else terminal_parse_failure('"("') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_list_of_path_inputs s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r6 = _nt_polarity_operator if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s0 << r5 if r5 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?("*>", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"*>"') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 r10 = _nt_list_of_path_outputs s0 << r10 if r10 r11 = _nt_s s0 << r11 if r11 if (match_len = has_terminal?(")", false, index)) r12 = true @index += match_len else terminal_parse_failure('")"') r12 = nil end s0 << r12 end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(FullPathDescription0) r0.extend(FullPathDescription1) else @index = i0 r0 = nil end node_cache[:full_path_description][start_index] = r0 r0 end module ListOfPathInputs0 def s1 elements[0] end def s2 elements[2] end def specify_input_terminal_descriptor elements[3] end end module ListOfPathInputs1 def specify_input_terminal_descriptor elements[0] end end module ListOfPathInputs2 def to_ast n :list_of_path_inputs, *elements_to_ast end end def _nt_list_of_path_inputs start_index = index if node_cache[:list_of_path_inputs].has_key?(index) cached = node_cache[:list_of_path_inputs][index] if cached node_cache[:list_of_path_inputs][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_specify_input_terminal_descriptor s0 << r1 if r1 i2, s2 = index, [] r3 = _nt_s s2 << r3 if r3 if (match_len = has_terminal?(",", false, index)) r4 = true @index += match_len else terminal_parse_failure('","') r4 = nil end s2 << r4 if r4 r5 = _nt_s s2 << r5 if r5 r6 = _nt_specify_input_terminal_descriptor s2 << r6 end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(ListOfPathInputs0) else @index = i2 r2 = nil end s0 << r2 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ListOfPathInputs1) r0.extend(ListOfPathInputs2) else @index = i0 r0 = nil end node_cache[:list_of_path_inputs][start_index] = r0 r0 end module ListOfPathOutputs0 def s1 elements[0] end def s2 elements[2] end def specify_output_terminal_descriptor elements[3] end end module ListOfPathOutputs1 def specify_output_terminal_descriptor elements[0] end end module ListOfPathOutputs2 def to_ast n :list_of_path_outputs, *elements_to_ast end end def _nt_list_of_path_outputs start_index = index if node_cache[:list_of_path_outputs].has_key?(index) cached = node_cache[:list_of_path_outputs][index] if cached node_cache[:list_of_path_outputs][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_specify_output_terminal_descriptor s0 << r1 if r1 i2, s2 = index, [] r3 = _nt_s s2 << r3 if r3 if (match_len = has_terminal?(",", false, index)) r4 = true @index += match_len else terminal_parse_failure('","') r4 = nil end s2 << r4 if r4 r5 = _nt_s s2 << r5 if r5 r6 = _nt_specify_output_terminal_descriptor s2 << r6 end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(ListOfPathOutputs0) else @index = i2 r2 = nil end s0 << r2 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ListOfPathOutputs1) r0.extend(ListOfPathOutputs2) else @index = i0 r0 = nil end node_cache[:list_of_path_outputs][start_index] = r0 r0 end module SpecifyInputTerminalDescriptor0 def s1 elements[1] end def constant_range_expression elements[2] end def s2 elements[3] end end module SpecifyInputTerminalDescriptor1 def input_identifier elements[0] end end module SpecifyInputTerminalDescriptor2 def to_ast n :specify_input_terminal_descriptor, *elements_to_ast end end def _nt_specify_input_terminal_descriptor start_index = index if node_cache[:specify_input_terminal_descriptor].has_key?(index) cached = node_cache[:specify_input_terminal_descriptor][index] if cached node_cache[:specify_input_terminal_descriptor][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_input_identifier s0 << r1 if r1 i3, s3 = index, [] if (match_len = has_terminal?("[", false, index)) r4 = true @index += match_len else terminal_parse_failure('"["') r4 = nil end s3 << r4 if r4 r5 = _nt_s s3 << r5 if r5 r6 = _nt_constant_range_expression s3 << r6 if r6 r7 = _nt_s s3 << r7 if r7 if (match_len = has_terminal?("]", false, index)) r8 = true @index += match_len else terminal_parse_failure('"]"') r8 = nil end s3 << r8 end end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(SpecifyInputTerminalDescriptor0) 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(SyntaxNode,input, i0...index, s0) r0.extend(SpecifyInputTerminalDescriptor1) r0.extend(SpecifyInputTerminalDescriptor2) else @index = i0 r0 = nil end node_cache[:specify_input_terminal_descriptor][start_index] = r0 r0 end module SpecifyOutputTerminalDescriptor0 def s1 elements[1] end def constant_range_expression elements[2] end def s2 elements[3] end end module SpecifyOutputTerminalDescriptor1 def output_identifier elements[0] end end module SpecifyOutputTerminalDescriptor2 def to_ast n :specify_output_terminal_descriptor, *elements_to_ast end end def _nt_specify_output_terminal_descriptor start_index = index if node_cache[:specify_output_terminal_descriptor].has_key?(index) cached = node_cache[:specify_output_terminal_descriptor][index] if cached node_cache[:specify_output_terminal_descriptor][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_output_identifier s0 << r1 if r1 i3, s3 = index, [] if (match_len = has_terminal?("[", false, index)) r4 = true @index += match_len else terminal_parse_failure('"["') r4 = nil end s3 << r4 if r4 r5 = _nt_s s3 << r5 if r5 r6 = _nt_constant_range_expression s3 << r6 if r6 r7 = _nt_s s3 << r7 if r7 if (match_len = has_terminal?("]", false, index)) r8 = true @index += match_len else terminal_parse_failure('"]"') r8 = nil end s3 << r8 end end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(SpecifyOutputTerminalDescriptor0) 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(SyntaxNode,input, i0...index, s0) r0.extend(SpecifyOutputTerminalDescriptor1) r0.extend(SpecifyOutputTerminalDescriptor2) else @index = i0 r0 = nil end node_cache[:specify_output_terminal_descriptor][start_index] = r0 r0 end def _nt_input_identifier start_index = index if node_cache[:input_identifier].has_key?(index) cached = node_cache[:input_identifier][index] if cached node_cache[:input_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_input_port_identifier if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_inout_port_identifier if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:input_identifier][start_index] = r0 r0 end def _nt_output_identifier start_index = index if node_cache[:output_identifier].has_key?(index) cached = node_cache[:output_identifier][index] if cached node_cache[:output_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_output_port_identifier if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_inout_port_identifier if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:output_identifier][start_index] = r0 r0 end module PathDelayValue0 def s1 elements[1] end def list_of_path_delay_expressions elements[2] end def s2 elements[3] end end module PathDelayValue1 def to_ast n :path_delay_value, *elements_to_ast end end def _nt_path_delay_value start_index = index if node_cache[:path_delay_value].has_key?(index) cached = node_cache[:path_delay_value][index] if cached node_cache[:path_delay_value][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_list_of_path_delay_expressions if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(PathDelayValue1) r0.extend(PathDelayValue1) 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 r4 = _nt_s s2 << r4 if r4 r5 = _nt_list_of_path_delay_expressions s2 << r5 if r5 r6 = _nt_s s2 << r6 if r6 if (match_len = has_terminal?(")", false, index)) r7 = true @index += match_len else terminal_parse_failure('")"') r7 = nil end s2 << r7 end end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(PathDelayValue0) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(PathDelayValue1) r0.extend(PathDelayValue1) else @index = i0 r0 = nil end end node_cache[:path_delay_value][start_index] = r0 r0 end module ListOfPathDelayExpressions0 def trise_path_delay_expression elements[0] end def s1 elements[1] end def s2 elements[3] end def tfall_path_delay_expression elements[4] end end module ListOfPathDelayExpressions1 def trise_path_delay_expression elements[0] end def s1 elements[1] end def s2 elements[3] end def tfall_path_delay_expression elements[4] end def s3 elements[5] end def s4 elements[7] end def tz_path_delay_expression elements[8] end end module ListOfPathDelayExpressions2 def t01_path_delay_expression elements[0] end def s1 elements[1] end def s2 elements[3] end def t10_path_delay_expression elements[4] end def s3 elements[5] end def s4 elements[7] end def t0z_path_delay_expression elements[8] end def s5 elements[9] end def s6 elements[11] end def tz1_path_delay_expression elements[12] end def s7 elements[13] end def s8 elements[15] end def t1z_path_delay_expression elements[16] end def s9 elements[17] end def s10 elements[19] end def tz0_path_delay_expression elements[20] end end module ListOfPathDelayExpressions3 def t01_path_delay_expression elements[0] end def s1 elements[1] end def s2 elements[3] end def t10_path_delay_expression elements[4] end def s3 elements[5] end def s4 elements[7] end def t0z_path_delay_expression elements[8] end def s5 elements[9] end def s6 elements[11] end def tz1_path_delay_expression elements[12] end def s7 elements[13] end def s8 elements[15] end def t1z_path_delay_expression elements[16] end def s9 elements[17] end def s10 elements[19] end def tz0_path_delay_expression elements[20] end def s11 elements[21] end def s12 elements[23] end def t0x_path_delay_expression elements[24] end def s13 elements[25] end def s14 elements[27] end def tx1_path_delay_expression elements[28] end def s15 elements[29] end def s16 elements[31] end def t1x_path_delay_expression elements[32] end def s17 elements[33] end def s18 elements[35] end def tx0_path_delay_expression elements[36] end def s19 elements[37] end def s20 elements[39] end def txz_path_delay_expression elements[40] end def s21 elements[41] end def s22 elements[43] end def tzx_path_delay_expression elements[44] end end module ListOfPathDelayExpressions4 def to_ast n :list_of_path_delay_expressions, *elements_to_ast end end def _nt_list_of_path_delay_expressions start_index = index if node_cache[:list_of_path_delay_expressions].has_key?(index) cached = node_cache[:list_of_path_delay_expressions][index] if cached node_cache[:list_of_path_delay_expressions][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_trise_path_delay_expression s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?(",", false, index)) r4 = true @index += match_len else terminal_parse_failure('","') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_tfall_path_delay_expression s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ListOfPathDelayExpressions0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ListOfPathDelayExpressions4) r0.extend(ListOfPathDelayExpressions4) else i7, s7 = index, [] r8 = _nt_trise_path_delay_expression s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 if (match_len = has_terminal?(",", false, index)) r10 = true @index += match_len else terminal_parse_failure('","') r10 = nil end s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 r12 = _nt_tfall_path_delay_expression s7 << r12 if r12 r13 = _nt_s s7 << r13 if r13 if (match_len = has_terminal?(",", false, index)) r14 = true @index += match_len else terminal_parse_failure('","') r14 = nil end s7 << r14 if r14 r15 = _nt_s s7 << r15 if r15 r16 = _nt_tz_path_delay_expression s7 << r16 end end end end end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(ListOfPathDelayExpressions1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(ListOfPathDelayExpressions4) r0.extend(ListOfPathDelayExpressions4) else i17, s17 = index, [] r18 = _nt_t01_path_delay_expression s17 << r18 if r18 r19 = _nt_s s17 << r19 if r19 if (match_len = has_terminal?(",", false, index)) r20 = true @index += match_len else terminal_parse_failure('","') r20 = nil end s17 << r20 if r20 r21 = _nt_s s17 << r21 if r21 r22 = _nt_t10_path_delay_expression s17 << r22 if r22 r23 = _nt_s s17 << r23 if r23 if (match_len = has_terminal?(",", false, index)) r24 = true @index += match_len else terminal_parse_failure('","') r24 = nil end s17 << r24 if r24 r25 = _nt_s s17 << r25 if r25 r26 = _nt_t0z_path_delay_expression s17 << r26 if r26 r27 = _nt_s s17 << r27 if r27 if (match_len = has_terminal?(",", false, index)) r28 = true @index += match_len else terminal_parse_failure('","') r28 = nil end s17 << r28 if r28 r29 = _nt_s s17 << r29 if r29 r30 = _nt_tz1_path_delay_expression s17 << r30 if r30 r31 = _nt_s s17 << r31 if r31 if (match_len = has_terminal?(",", false, index)) r32 = true @index += match_len else terminal_parse_failure('","') r32 = nil end s17 << r32 if r32 r33 = _nt_s s17 << r33 if r33 r34 = _nt_t1z_path_delay_expression s17 << r34 if r34 r35 = _nt_s s17 << r35 if r35 if (match_len = has_terminal?(",", false, index)) r36 = true @index += match_len else terminal_parse_failure('","') r36 = nil end s17 << r36 if r36 r37 = _nt_s s17 << r37 if r37 r38 = _nt_tz0_path_delay_expression s17 << r38 end end end end end end end end end end end end end end end end end end end end if s17.last r17 = instantiate_node(SyntaxNode,input, i17...index, s17) r17.extend(ListOfPathDelayExpressions2) else @index = i17 r17 = nil end if r17 r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true r0 = r17 r0.extend(ListOfPathDelayExpressions4) r0.extend(ListOfPathDelayExpressions4) else i39, s39 = index, [] r40 = _nt_t01_path_delay_expression s39 << r40 if r40 r41 = _nt_s s39 << r41 if r41 if (match_len = has_terminal?(",", false, index)) r42 = true @index += match_len else terminal_parse_failure('","') r42 = nil end s39 << r42 if r42 r43 = _nt_s s39 << r43 if r43 r44 = _nt_t10_path_delay_expression s39 << r44 if r44 r45 = _nt_s s39 << r45 if r45 if (match_len = has_terminal?(",", false, index)) r46 = true @index += match_len else terminal_parse_failure('","') r46 = nil end s39 << r46 if r46 r47 = _nt_s s39 << r47 if r47 r48 = _nt_t0z_path_delay_expression s39 << r48 if r48 r49 = _nt_s s39 << r49 if r49 if (match_len = has_terminal?(",", false, index)) r50 = true @index += match_len else terminal_parse_failure('","') r50 = nil end s39 << r50 if r50 r51 = _nt_s s39 << r51 if r51 r52 = _nt_tz1_path_delay_expression s39 << r52 if r52 r53 = _nt_s s39 << r53 if r53 if (match_len = has_terminal?(",", false, index)) r54 = true @index += match_len else terminal_parse_failure('","') r54 = nil end s39 << r54 if r54 r55 = _nt_s s39 << r55 if r55 r56 = _nt_t1z_path_delay_expression s39 << r56 if r56 r57 = _nt_s s39 << r57 if r57 if (match_len = has_terminal?(",", false, index)) r58 = true @index += match_len else terminal_parse_failure('","') r58 = nil end s39 << r58 if r58 r59 = _nt_s s39 << r59 if r59 r60 = _nt_tz0_path_delay_expression s39 << r60 if r60 r61 = _nt_s s39 << r61 if r61 if (match_len = has_terminal?(",", false, index)) r62 = true @index += match_len else terminal_parse_failure('","') r62 = nil end s39 << r62 if r62 r63 = _nt_s s39 << r63 if r63 r64 = _nt_t0x_path_delay_expression s39 << r64 if r64 r65 = _nt_s s39 << r65 if r65 if (match_len = has_terminal?(",", false, index)) r66 = true @index += match_len else terminal_parse_failure('","') r66 = nil end s39 << r66 if r66 r67 = _nt_s s39 << r67 if r67 r68 = _nt_tx1_path_delay_expression s39 << r68 if r68 r69 = _nt_s s39 << r69 if r69 if (match_len = has_terminal?(",", false, index)) r70 = true @index += match_len else terminal_parse_failure('","') r70 = nil end s39 << r70 if r70 r71 = _nt_s s39 << r71 if r71 r72 = _nt_t1x_path_delay_expression s39 << r72 if r72 r73 = _nt_s s39 << r73 if r73 if (match_len = has_terminal?(",", false, index)) r74 = true @index += match_len else terminal_parse_failure('","') r74 = nil end s39 << r74 if r74 r75 = _nt_s s39 << r75 if r75 r76 = _nt_tx0_path_delay_expression s39 << r76 if r76 r77 = _nt_s s39 << r77 if r77 if (match_len = has_terminal?(",", false, index)) r78 = true @index += match_len else terminal_parse_failure('","') r78 = nil end s39 << r78 if r78 r79 = _nt_s s39 << r79 if r79 r80 = _nt_txz_path_delay_expression s39 << r80 if r80 r81 = _nt_s s39 << r81 if r81 if (match_len = has_terminal?(",", false, index)) r82 = true @index += match_len else terminal_parse_failure('","') r82 = nil end s39 << r82 if r82 r83 = _nt_s s39 << r83 if r83 r84 = _nt_tzx_path_delay_expression s39 << r84 end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end end if s39.last r39 = instantiate_node(SyntaxNode,input, i39...index, s39) r39.extend(ListOfPathDelayExpressions3) else @index = i39 r39 = nil end if r39 r39 = SyntaxNode.new(input, (index-1)...index) if r39 == true r0 = r39 r0.extend(ListOfPathDelayExpressions4) r0.extend(ListOfPathDelayExpressions4) else r85 = _nt_t_path_delay_expression if r85 r85 = SyntaxNode.new(input, (index-1)...index) if r85 == true r0 = r85 r0.extend(ListOfPathDelayExpressions4) r0.extend(ListOfPathDelayExpressions4) else @index = i0 r0 = nil end end end end end node_cache[:list_of_path_delay_expressions][start_index] = r0 r0 end def _nt_t_path_delay_expression start_index = index if node_cache[:t_path_delay_expression].has_key?(index) cached = node_cache[:t_path_delay_expression][index] if cached node_cache[:t_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:t_path_delay_expression][start_index] = r0 r0 end def _nt_trise_path_delay_expression start_index = index if node_cache[:trise_path_delay_expression].has_key?(index) cached = node_cache[:trise_path_delay_expression][index] if cached node_cache[:trise_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:trise_path_delay_expression][start_index] = r0 r0 end def _nt_tfall_path_delay_expression start_index = index if node_cache[:tfall_path_delay_expression].has_key?(index) cached = node_cache[:tfall_path_delay_expression][index] if cached node_cache[:tfall_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:tfall_path_delay_expression][start_index] = r0 r0 end def _nt_tz_path_delay_expression start_index = index if node_cache[:tz_path_delay_expression].has_key?(index) cached = node_cache[:tz_path_delay_expression][index] if cached node_cache[:tz_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:tz_path_delay_expression][start_index] = r0 r0 end def _nt_t01_path_delay_expression start_index = index if node_cache[:t01_path_delay_expression].has_key?(index) cached = node_cache[:t01_path_delay_expression][index] if cached node_cache[:t01_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:t01_path_delay_expression][start_index] = r0 r0 end def _nt_t10_path_delay_expression start_index = index if node_cache[:t10_path_delay_expression].has_key?(index) cached = node_cache[:t10_path_delay_expression][index] if cached node_cache[:t10_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:t10_path_delay_expression][start_index] = r0 r0 end def _nt_t0z_path_delay_expression start_index = index if node_cache[:t0z_path_delay_expression].has_key?(index) cached = node_cache[:t0z_path_delay_expression][index] if cached node_cache[:t0z_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:t0z_path_delay_expression][start_index] = r0 r0 end def _nt_tz1_path_delay_expression start_index = index if node_cache[:tz1_path_delay_expression].has_key?(index) cached = node_cache[:tz1_path_delay_expression][index] if cached node_cache[:tz1_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:tz1_path_delay_expression][start_index] = r0 r0 end def _nt_t1z_path_delay_expression start_index = index if node_cache[:t1z_path_delay_expression].has_key?(index) cached = node_cache[:t1z_path_delay_expression][index] if cached node_cache[:t1z_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:t1z_path_delay_expression][start_index] = r0 r0 end def _nt_tz0_path_delay_expression start_index = index if node_cache[:tz0_path_delay_expression].has_key?(index) cached = node_cache[:tz0_path_delay_expression][index] if cached node_cache[:tz0_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:tz0_path_delay_expression][start_index] = r0 r0 end def _nt_t0x_path_delay_expression start_index = index if node_cache[:t0x_path_delay_expression].has_key?(index) cached = node_cache[:t0x_path_delay_expression][index] if cached node_cache[:t0x_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:t0x_path_delay_expression][start_index] = r0 r0 end def _nt_tx1_path_delay_expression start_index = index if node_cache[:tx1_path_delay_expression].has_key?(index) cached = node_cache[:tx1_path_delay_expression][index] if cached node_cache[:tx1_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:tx1_path_delay_expression][start_index] = r0 r0 end def _nt_t1x_path_delay_expression start_index = index if node_cache[:t1x_path_delay_expression].has_key?(index) cached = node_cache[:t1x_path_delay_expression][index] if cached node_cache[:t1x_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:t1x_path_delay_expression][start_index] = r0 r0 end def _nt_tx0_path_delay_expression start_index = index if node_cache[:tx0_path_delay_expression].has_key?(index) cached = node_cache[:tx0_path_delay_expression][index] if cached node_cache[:tx0_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:tx0_path_delay_expression][start_index] = r0 r0 end def _nt_txz_path_delay_expression start_index = index if node_cache[:txz_path_delay_expression].has_key?(index) cached = node_cache[:txz_path_delay_expression][index] if cached node_cache[:txz_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:txz_path_delay_expression][start_index] = r0 r0 end def _nt_tzx_path_delay_expression start_index = index if node_cache[:tzx_path_delay_expression].has_key?(index) cached = node_cache[:tzx_path_delay_expression][index] if cached node_cache[:tzx_path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_path_delay_expression node_cache[:tzx_path_delay_expression][start_index] = r0 r0 end def _nt_path_delay_expression start_index = index if node_cache[:path_delay_expression].has_key?(index) cached = node_cache[:path_delay_expression][index] if cached node_cache[:path_delay_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_constant_mintypmax_expression node_cache[:path_delay_expression][start_index] = r0 r0 end module EdgeSensitivePathDeclaration0 def parallel_edge_sensitive_path_description elements[0] end def s1 elements[1] end def s2 elements[3] end def path_delay_value elements[4] end end module EdgeSensitivePathDeclaration1 def full_edge_sensitive_path_description elements[0] end def s1 elements[1] end def s2 elements[3] end def path_delay_value elements[4] end end module EdgeSensitivePathDeclaration2 def to_ast n :edge_sensitive_path_declaration, *elements_to_ast end end def _nt_edge_sensitive_path_declaration start_index = index if node_cache[:edge_sensitive_path_declaration].has_key?(index) cached = node_cache[:edge_sensitive_path_declaration][index] if cached node_cache[:edge_sensitive_path_declaration][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_parallel_edge_sensitive_path_description s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("=", false, index)) r4 = true @index += match_len else terminal_parse_failure('"="') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_path_delay_value s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(EdgeSensitivePathDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(EdgeSensitivePathDeclaration2) r0.extend(EdgeSensitivePathDeclaration2) else i7, s7 = index, [] r8 = _nt_full_edge_sensitive_path_description s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 if (match_len = has_terminal?("=", false, index)) r10 = true @index += match_len else terminal_parse_failure('"="') r10 = nil end s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 r12 = _nt_path_delay_value s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(EdgeSensitivePathDeclaration1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(EdgeSensitivePathDeclaration2) r0.extend(EdgeSensitivePathDeclaration2) else @index = i0 r0 = nil end end node_cache[:edge_sensitive_path_declaration][start_index] = r0 r0 end module ParallelEdgeSensitivePathDescription0 def s1 elements[1] end def s2 elements[3] end def specify_input_terminal_descriptor elements[4] end def s3 elements[5] end def s4 elements[7] end def s5 elements[9] end def specify_output_terminal_descriptor elements[10] end def s6 elements[11] end def s7 elements[13] end def s8 elements[15] end def data_source_expression elements[16] end def s9 elements[17] end def s10 elements[19] end end module ParallelEdgeSensitivePathDescription1 def to_ast n :parallel_edge_sensitive_path_description, *elements_to_ast end end def _nt_parallel_edge_sensitive_path_description start_index = index if node_cache[:parallel_edge_sensitive_path_description].has_key?(index) cached = node_cache[:parallel_edge_sensitive_path_description][index] if cached node_cache[:parallel_edge_sensitive_path_description][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("(", false, index)) r1 = true @index += match_len else terminal_parse_failure('"("') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_edge_identifier if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r5 = _nt_s s0 << r5 if r5 r6 = _nt_specify_input_terminal_descriptor s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?("=>", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"=>"') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 if (match_len = has_terminal?("(", false, index)) r10 = true @index += match_len else terminal_parse_failure('"("') r10 = nil end s0 << r10 if r10 r11 = _nt_s s0 << r11 if r11 r12 = _nt_specify_output_terminal_descriptor s0 << r12 if r12 r13 = _nt_s s0 << r13 if r13 r15 = _nt_polarity_operator if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s0 << r14 if r14 r16 = _nt_s s0 << r16 if r16 if (match_len = has_terminal?(":", false, index)) r17 = true @index += match_len else terminal_parse_failure('":"') r17 = nil end s0 << r17 if r17 r18 = _nt_s s0 << r18 if r18 r19 = _nt_data_source_expression s0 << r19 if r19 r20 = _nt_s s0 << r20 if r20 if (match_len = has_terminal?(")", false, index)) r21 = true @index += match_len else terminal_parse_failure('")"') r21 = nil end s0 << r21 if r21 r22 = _nt_s s0 << r22 if r22 if (match_len = has_terminal?(")", false, index)) r23 = true @index += match_len else terminal_parse_failure('")"') r23 = nil end s0 << r23 end end end end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ParallelEdgeSensitivePathDescription0) r0.extend(ParallelEdgeSensitivePathDescription1) else @index = i0 r0 = nil end node_cache[:parallel_edge_sensitive_path_description][start_index] = r0 r0 end module FullEdgeSensitivePathDescription0 def s1 elements[1] end def s2 elements[3] end def list_of_path_inputs elements[4] end def s3 elements[5] end def s4 elements[7] end def s5 elements[9] end def list_of_path_outputs elements[10] end def s6 elements[11] end def s7 elements[13] end def s8 elements[15] end def data_source_expression elements[16] end def s9 elements[17] end def s10 elements[19] end end module FullEdgeSensitivePathDescription1 def to_ast n :full_edge_sensitive_path_description, *elements_to_ast end end def _nt_full_edge_sensitive_path_description start_index = index if node_cache[:full_edge_sensitive_path_description].has_key?(index) cached = node_cache[:full_edge_sensitive_path_description][index] if cached node_cache[:full_edge_sensitive_path_description][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("(", false, index)) r1 = true @index += match_len else terminal_parse_failure('"("') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r4 = _nt_edge_identifier if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 if r3 r5 = _nt_s s0 << r5 if r5 r6 = _nt_list_of_path_inputs s0 << r6 if r6 r7 = _nt_s s0 << r7 if r7 if (match_len = has_terminal?("*>", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"*>"') r8 = nil end s0 << r8 if r8 r9 = _nt_s s0 << r9 if r9 if (match_len = has_terminal?("(", false, index)) r10 = true @index += match_len else terminal_parse_failure('"("') r10 = nil end s0 << r10 if r10 r11 = _nt_s s0 << r11 if r11 r12 = _nt_list_of_path_outputs s0 << r12 if r12 r13 = _nt_s s0 << r13 if r13 r15 = _nt_polarity_operator if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s0 << r14 if r14 r16 = _nt_s s0 << r16 if r16 if (match_len = has_terminal?(":", false, index)) r17 = true @index += match_len else terminal_parse_failure('":"') r17 = nil end s0 << r17 if r17 r18 = _nt_s s0 << r18 if r18 r19 = _nt_data_source_expression s0 << r19 if r19 r20 = _nt_s s0 << r20 if r20 if (match_len = has_terminal?(")", false, index)) r21 = true @index += match_len else terminal_parse_failure('")"') r21 = nil end s0 << r21 if r21 r22 = _nt_s s0 << r22 if r22 if (match_len = has_terminal?(")", false, index)) r23 = true @index += match_len else terminal_parse_failure('")"') r23 = nil end s0 << r23 end end end end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(FullEdgeSensitivePathDescription0) r0.extend(FullEdgeSensitivePathDescription1) else @index = i0 r0 = nil end node_cache[:full_edge_sensitive_path_description][start_index] = r0 r0 end def _nt_data_source_expression start_index = index if node_cache[:data_source_expression].has_key?(index) cached = node_cache[:data_source_expression][index] if cached node_cache[:data_source_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_expression node_cache[:data_source_expression][start_index] = r0 r0 end module EdgeIdentifier0 def to_ast n :edge_identifier, text_value end end def _nt_edge_identifier start_index = index if node_cache[:edge_identifier].has_key?(index) cached = node_cache[:edge_identifier][index] if cached node_cache[:edge_identifier][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?("posedge", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"posedge"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(EdgeIdentifier0) r0.extend(EdgeIdentifier0) else if (match_len = has_terminal?("negedge", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"negedge"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(EdgeIdentifier0) r0.extend(EdgeIdentifier0) else @index = i0 r0 = nil end end node_cache[:edge_identifier][start_index] = r0 r0 end module StateDependentPathDeclaration0 def s1 elements[1] end def s2 elements[3] end def module_path_expression elements[4] end def s3 elements[5] end def s4 elements[7] end def simple_path_declaration elements[8] end end module StateDependentPathDeclaration1 def s1 elements[1] end def s2 elements[3] end def module_path_expression elements[4] end def s3 elements[5] end def s4 elements[7] end def edge_sensitive_path_declaration elements[8] end end module StateDependentPathDeclaration2 def s elements[1] end def simple_path_declaration elements[2] end end module StateDependentPathDeclaration3 def to_ast n :state_dependent_path_declaration, *elements_to_ast end end def _nt_state_dependent_path_declaration start_index = index if node_cache[:state_dependent_path_declaration].has_key?(index) cached = node_cache[:state_dependent_path_declaration][index] if cached node_cache[:state_dependent_path_declaration][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?("if", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"if"') r2 = nil end s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("(", false, index)) r4 = true @index += match_len else terminal_parse_failure('"("') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_module_path_expression s1 << r6 if r6 r7 = _nt_s s1 << r7 if r7 if (match_len = has_terminal?(")", false, index)) r8 = true @index += match_len else terminal_parse_failure('")"') r8 = nil end s1 << r8 if r8 r9 = _nt_s s1 << r9 if r9 r10 = _nt_simple_path_declaration s1 << r10 end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(StateDependentPathDeclaration0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(StateDependentPathDeclaration3) r0.extend(StateDependentPathDeclaration3) else i11, s11 = index, [] if (match_len = has_terminal?("if", false, index)) r12 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"if"') r12 = nil end s11 << r12 if r12 r13 = _nt_s s11 << r13 if r13 if (match_len = has_terminal?("(", false, index)) r14 = true @index += match_len else terminal_parse_failure('"("') r14 = nil end s11 << r14 if r14 r15 = _nt_s s11 << r15 if r15 r16 = _nt_module_path_expression s11 << r16 if r16 r17 = _nt_s s11 << r17 if r17 if (match_len = has_terminal?(")", false, index)) r18 = true @index += match_len else terminal_parse_failure('")"') r18 = nil end s11 << r18 if r18 r19 = _nt_s s11 << r19 if r19 r20 = _nt_edge_sensitive_path_declaration s11 << r20 end end end end end end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(StateDependentPathDeclaration1) else @index = i11 r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(StateDependentPathDeclaration3) r0.extend(StateDependentPathDeclaration3) else i21, s21 = index, [] if (match_len = has_terminal?("ifnone", false, index)) r22 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"ifnone"') r22 = nil end s21 << r22 if r22 r23 = _nt_s s21 << r23 if r23 r24 = _nt_simple_path_declaration s21 << r24 end end if s21.last r21 = instantiate_node(SyntaxNode,input, i21...index, s21) r21.extend(StateDependentPathDeclaration2) else @index = i21 r21 = nil end if r21 r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true r0 = r21 r0.extend(StateDependentPathDeclaration3) r0.extend(StateDependentPathDeclaration3) else @index = i0 r0 = nil end end end node_cache[:state_dependent_path_declaration][start_index] = r0 r0 end module PolarityOperator0 def to_ast n :polarity_operator, text_value end end def _nt_polarity_operator start_index = index if node_cache[:polarity_operator].has_key?(index) cached = node_cache[:polarity_operator][index] if cached node_cache[:polarity_operator][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 r0.extend(PolarityOperator0) r0.extend(PolarityOperator0) 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 r0.extend(PolarityOperator0) r0.extend(PolarityOperator0) else @index = i0 r0 = nil end end node_cache[:polarity_operator][start_index] = r0 r0 end module SystemTimingCheck0 def to_ast n :system_timing_check, *elements_to_ast end end def _nt_system_timing_check start_index = index if node_cache[:system_timing_check].has_key?(index) cached = node_cache[:system_timing_check][index] if cached node_cache[:system_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_setup_timing_check if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r2 = _nt_hold_timing_check if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r3 = _nt_setuphold_timing_check if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r4 = _nt_recovery_timing_check if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r5 = _nt_removal_timing_check if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r6 = _nt_recrem_timing_check if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r7 = _nt_skew_timing_check if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r8 = _nt_timeskew_timing_check if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r9 = _nt_fullskew_timing_check if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r10 = _nt_period_timing_check if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r11 = _nt_width_timing_check if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else r12 = _nt_nochange_timing_check if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r0 = r12 r0.extend(SystemTimingCheck0) r0.extend(SystemTimingCheck0) else @index = i0 r0 = nil end end end end end end end end end end end end node_cache[:system_timing_check][start_index] = r0 r0 end module SetupTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module SetupTimingCheck1 def s1 elements[1] end def s2 elements[3] end def data_event elements[4] end def s3 elements[5] end def s4 elements[7] end def reference_event elements[8] end def s5 elements[9] end def s6 elements[11] end def timing_check_limit elements[12] end def s7 elements[14] end def s8 elements[16] end end module SetupTimingCheck2 def to_ast n :setup_timing_check, *elements_to_ast end end def _nt_setup_timing_check start_index = index if node_cache[:setup_timing_check].has_key?(index) cached = node_cache[:setup_timing_check][index] if cached node_cache[:setup_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$setup", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$setup"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_data_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_reference_event s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_timing_check_limit s0 << r13 if r13 i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 if (match_len = has_terminal?(",", false, index)) r17 = true @index += match_len else terminal_parse_failure('","') r17 = nil end s15 << r17 if r17 r18 = _nt_s s15 << r18 if r18 r20 = _nt_notifier if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s15 << r19 end end end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(SetupTimingCheck0) else @index = i15 r15 = nil end if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s0 << r14 if r14 r21 = _nt_s s0 << r21 if r21 if (match_len = has_terminal?(")", false, index)) r22 = true @index += match_len else terminal_parse_failure('")"') r22 = nil end s0 << r22 if r22 r23 = _nt_s s0 << r23 if r23 if (match_len = has_terminal?(";", false, index)) r24 = true @index += match_len else terminal_parse_failure('";"') r24 = nil end s0 << r24 end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SetupTimingCheck1) r0.extend(SetupTimingCheck2) else @index = i0 r0 = nil end node_cache[:setup_timing_check][start_index] = r0 r0 end module HoldTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module HoldTimingCheck1 def s1 elements[1] end def s2 elements[3] end def reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def data_event elements[8] end def s5 elements[9] end def s6 elements[11] end def timing_check_limit elements[12] end def s7 elements[14] end def s8 elements[16] end end module HoldTimingCheck2 def to_ast n :hold_timing_check, *elements_to_ast end end def _nt_hold_timing_check start_index = index if node_cache[:hold_timing_check].has_key?(index) cached = node_cache[:hold_timing_check][index] if cached node_cache[:hold_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$hold", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$hold"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_data_event s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_timing_check_limit s0 << r13 if r13 i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 if (match_len = has_terminal?(",", false, index)) r17 = true @index += match_len else terminal_parse_failure('","') r17 = nil end s15 << r17 if r17 r18 = _nt_s s15 << r18 if r18 r20 = _nt_notifier if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s15 << r19 end end end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(HoldTimingCheck0) else @index = i15 r15 = nil end if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s0 << r14 if r14 r21 = _nt_s s0 << r21 if r21 if (match_len = has_terminal?(")", false, index)) r22 = true @index += match_len else terminal_parse_failure('")"') r22 = nil end s0 << r22 if r22 r23 = _nt_s s0 << r23 if r23 if (match_len = has_terminal?(";", false, index)) r24 = true @index += match_len else terminal_parse_failure('";"') r24 = nil end s0 << r24 end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(HoldTimingCheck1) r0.extend(HoldTimingCheck2) else @index = i0 r0 = nil end node_cache[:hold_timing_check][start_index] = r0 r0 end module SetupholdTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module SetupholdTimingCheck1 def s1 elements[0] end def s2 elements[2] end end module SetupholdTimingCheck2 def s1 elements[0] end def s2 elements[2] end end module SetupholdTimingCheck3 def s1 elements[0] end def s2 elements[2] end end module SetupholdTimingCheck4 def s1 elements[0] end def s2 elements[2] end end module SetupholdTimingCheck5 def s1 elements[1] end def s2 elements[3] end def reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def data_event elements[8] end def s5 elements[9] end def s6 elements[11] end def timing_check_limit1 elements[12] end def s7 elements[13] end def s8 elements[15] end def timing_check_limit2 elements[16] end def s9 elements[17] end def s10 elements[19] end def s11 elements[21] end end module SetupholdTimingCheck6 def to_ast n :setuphold_timing_check, *elements_to_ast end end def _nt_setuphold_timing_check start_index = index if node_cache[:setuphold_timing_check].has_key?(index) cached = node_cache[:setuphold_timing_check][index] if cached node_cache[:setuphold_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$setuphold", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$setuphold"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_data_event s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_timing_check_limit s0 << r13 if r13 r14 = _nt_s s0 << r14 if r14 if (match_len = has_terminal?(",", false, index)) r15 = true @index += match_len else terminal_parse_failure('","') r15 = nil end s0 << r15 if r15 r16 = _nt_s s0 << r16 if r16 r17 = _nt_timing_check_limit s0 << r17 if r17 r18 = _nt_s s0 << r18 if r18 i20, s20 = index, [] r21 = _nt_s s20 << r21 if r21 if (match_len = has_terminal?(",", false, index)) r22 = true @index += match_len else terminal_parse_failure('","') r22 = nil end s20 << r22 if r22 r23 = _nt_s s20 << r23 if r23 r25 = _nt_notifier if r25 r24 = r25 else r24 = instantiate_node(SyntaxNode,input, index...index) end s20 << r24 if r24 i27, s27 = index, [] r28 = _nt_s s27 << r28 if r28 if (match_len = has_terminal?(",", false, index)) r29 = true @index += match_len else terminal_parse_failure('","') r29 = nil end s27 << r29 if r29 r30 = _nt_s s27 << r30 if r30 r32 = _nt_stamptime_condition if r32 r31 = r32 else r31 = instantiate_node(SyntaxNode,input, index...index) end s27 << r31 if r31 i34, s34 = index, [] r35 = _nt_s s34 << r35 if r35 if (match_len = has_terminal?(",", false, index)) r36 = true @index += match_len else terminal_parse_failure('","') r36 = nil end s34 << r36 if r36 r37 = _nt_s s34 << r37 if r37 r39 = _nt_checktime_condition if r39 r38 = r39 else r38 = instantiate_node(SyntaxNode,input, index...index) end s34 << r38 if r38 i41, s41 = index, [] r42 = _nt_s s41 << r42 if r42 if (match_len = has_terminal?(",", false, index)) r43 = true @index += match_len else terminal_parse_failure('","') r43 = nil end s41 << r43 if r43 r44 = _nt_s s41 << r44 if r44 r46 = _nt_delayed_reference if r46 r45 = r46 else r45 = instantiate_node(SyntaxNode,input, index...index) end s41 << r45 if r45 i48, s48 = index, [] r49 = _nt_s s48 << r49 if r49 if (match_len = has_terminal?(",", false, index)) r50 = true @index += match_len else terminal_parse_failure('","') r50 = nil end s48 << r50 if r50 r51 = _nt_s s48 << r51 if r51 r53 = _nt_delayed_data if r53 r52 = r53 else r52 = instantiate_node(SyntaxNode,input, index...index) end s48 << r52 end end end if s48.last r48 = instantiate_node(SyntaxNode,input, i48...index, s48) r48.extend(SetupholdTimingCheck0) else @index = i48 r48 = nil end if r48 r47 = r48 else r47 = instantiate_node(SyntaxNode,input, index...index) end s41 << r47 end end end end if s41.last r41 = instantiate_node(SyntaxNode,input, i41...index, s41) r41.extend(SetupholdTimingCheck1) else @index = i41 r41 = nil end if r41 r40 = r41 else r40 = instantiate_node(SyntaxNode,input, index...index) end s34 << r40 end end end end if s34.last r34 = instantiate_node(SyntaxNode,input, i34...index, s34) r34.extend(SetupholdTimingCheck2) else @index = i34 r34 = nil end if r34 r33 = r34 else r33 = instantiate_node(SyntaxNode,input, index...index) end s27 << r33 end end end end if s27.last r27 = instantiate_node(SyntaxNode,input, i27...index, s27) r27.extend(SetupholdTimingCheck3) else @index = i27 r27 = nil end if r27 r26 = r27 else r26 = instantiate_node(SyntaxNode,input, index...index) end s20 << r26 end end end end if s20.last r20 = instantiate_node(SyntaxNode,input, i20...index, s20) r20.extend(SetupholdTimingCheck4) else @index = i20 r20 = nil end if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s0 << r19 if r19 r54 = _nt_s s0 << r54 if r54 if (match_len = has_terminal?(")", false, index)) r55 = true @index += match_len else terminal_parse_failure('")"') r55 = nil end s0 << r55 if r55 r56 = _nt_s s0 << r56 if r56 if (match_len = has_terminal?(";", false, index)) r57 = true @index += match_len else terminal_parse_failure('";"') r57 = nil end s0 << r57 end end end end end end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SetupholdTimingCheck5) r0.extend(SetupholdTimingCheck6) else @index = i0 r0 = nil end node_cache[:setuphold_timing_check][start_index] = r0 r0 end module RecoveryTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module RecoveryTimingCheck1 def s1 elements[1] end def s2 elements[3] end def reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def data_event elements[8] end def s5 elements[9] end def s6 elements[11] end def timing_check_limit elements[12] end def s7 elements[14] end def s8 elements[16] end end module RecoveryTimingCheck2 def to_ast n :recovery_timing_check, *elements_to_ast end end def _nt_recovery_timing_check start_index = index if node_cache[:recovery_timing_check].has_key?(index) cached = node_cache[:recovery_timing_check][index] if cached node_cache[:recovery_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$recovery", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$recovery"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_data_event s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_timing_check_limit s0 << r13 if r13 i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 if (match_len = has_terminal?(",", false, index)) r17 = true @index += match_len else terminal_parse_failure('","') r17 = nil end s15 << r17 if r17 r18 = _nt_s s15 << r18 if r18 r20 = _nt_notifier if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s15 << r19 end end end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(RecoveryTimingCheck0) else @index = i15 r15 = nil end if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s0 << r14 if r14 r21 = _nt_s s0 << r21 if r21 if (match_len = has_terminal?(")", false, index)) r22 = true @index += match_len else terminal_parse_failure('")"') r22 = nil end s0 << r22 if r22 r23 = _nt_s s0 << r23 if r23 if (match_len = has_terminal?(";", false, index)) r24 = true @index += match_len else terminal_parse_failure('";"') r24 = nil end s0 << r24 end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(RecoveryTimingCheck1) r0.extend(RecoveryTimingCheck2) else @index = i0 r0 = nil end node_cache[:recovery_timing_check][start_index] = r0 r0 end module RemovalTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module RemovalTimingCheck1 def s1 elements[1] end def s2 elements[3] end def reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def data_event elements[8] end def s5 elements[9] end def s6 elements[11] end def timing_check_limit elements[12] end def s7 elements[14] end def s8 elements[16] end end module RemovalTimingCheck2 def to_ast n :removal_timing_check, *elements_to_ast end end def _nt_removal_timing_check start_index = index if node_cache[:removal_timing_check].has_key?(index) cached = node_cache[:removal_timing_check][index] if cached node_cache[:removal_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$removal", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$removal"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_data_event s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_timing_check_limit s0 << r13 if r13 i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 if (match_len = has_terminal?(",", false, index)) r17 = true @index += match_len else terminal_parse_failure('","') r17 = nil end s15 << r17 if r17 r18 = _nt_s s15 << r18 if r18 r20 = _nt_notifier if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s15 << r19 end end end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(RemovalTimingCheck0) else @index = i15 r15 = nil end if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s0 << r14 if r14 r21 = _nt_s s0 << r21 if r21 if (match_len = has_terminal?(")", false, index)) r22 = true @index += match_len else terminal_parse_failure('")"') r22 = nil end s0 << r22 if r22 r23 = _nt_s s0 << r23 if r23 if (match_len = has_terminal?(";", false, index)) r24 = true @index += match_len else terminal_parse_failure('";"') r24 = nil end s0 << r24 end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(RemovalTimingCheck1) r0.extend(RemovalTimingCheck2) else @index = i0 r0 = nil end node_cache[:removal_timing_check][start_index] = r0 r0 end module RecremTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module RecremTimingCheck1 def s1 elements[0] end def s2 elements[2] end end module RecremTimingCheck2 def s1 elements[0] end def s2 elements[2] end end module RecremTimingCheck3 def s1 elements[0] end def s2 elements[2] end end module RecremTimingCheck4 def s1 elements[0] end def s2 elements[2] end end module RecremTimingCheck5 def s1 elements[1] end def s2 elements[3] end def reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def data_event elements[8] end def s5 elements[9] end def s6 elements[11] end def timing_check_limit1 elements[12] end def s7 elements[13] end def s8 elements[15] end def timing_check_limit2 elements[16] end def s9 elements[17] end def s10 elements[19] end def s11 elements[21] end end module RecremTimingCheck6 def to_ast n :recrem_timing_check, *elements_to_ast end end def _nt_recrem_timing_check start_index = index if node_cache[:recrem_timing_check].has_key?(index) cached = node_cache[:recrem_timing_check][index] if cached node_cache[:recrem_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$recrem", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$recrem"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_data_event s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_timing_check_limit s0 << r13 if r13 r14 = _nt_s s0 << r14 if r14 if (match_len = has_terminal?(",", false, index)) r15 = true @index += match_len else terminal_parse_failure('","') r15 = nil end s0 << r15 if r15 r16 = _nt_s s0 << r16 if r16 r17 = _nt_timing_check_limit s0 << r17 if r17 r18 = _nt_s s0 << r18 if r18 i20, s20 = index, [] r21 = _nt_s s20 << r21 if r21 if (match_len = has_terminal?(",", false, index)) r22 = true @index += match_len else terminal_parse_failure('","') r22 = nil end s20 << r22 if r22 r23 = _nt_s s20 << r23 if r23 r25 = _nt_notifier if r25 r24 = r25 else r24 = instantiate_node(SyntaxNode,input, index...index) end s20 << r24 if r24 i27, s27 = index, [] r28 = _nt_s s27 << r28 if r28 if (match_len = has_terminal?(",", false, index)) r29 = true @index += match_len else terminal_parse_failure('","') r29 = nil end s27 << r29 if r29 r30 = _nt_s s27 << r30 if r30 r32 = _nt_stamptime_condition if r32 r31 = r32 else r31 = instantiate_node(SyntaxNode,input, index...index) end s27 << r31 if r31 i34, s34 = index, [] r35 = _nt_s s34 << r35 if r35 if (match_len = has_terminal?(",", false, index)) r36 = true @index += match_len else terminal_parse_failure('","') r36 = nil end s34 << r36 if r36 r37 = _nt_s s34 << r37 if r37 r39 = _nt_checktime_condition if r39 r38 = r39 else r38 = instantiate_node(SyntaxNode,input, index...index) end s34 << r38 if r38 i41, s41 = index, [] r42 = _nt_s s41 << r42 if r42 if (match_len = has_terminal?(",", false, index)) r43 = true @index += match_len else terminal_parse_failure('","') r43 = nil end s41 << r43 if r43 r44 = _nt_s s41 << r44 if r44 r46 = _nt_delayed_reference if r46 r45 = r46 else r45 = instantiate_node(SyntaxNode,input, index...index) end s41 << r45 if r45 i48, s48 = index, [] r49 = _nt_s s48 << r49 if r49 if (match_len = has_terminal?(",", false, index)) r50 = true @index += match_len else terminal_parse_failure('","') r50 = nil end s48 << r50 if r50 r51 = _nt_s s48 << r51 if r51 r53 = _nt_delayed_data if r53 r52 = r53 else r52 = instantiate_node(SyntaxNode,input, index...index) end s48 << r52 end end end if s48.last r48 = instantiate_node(SyntaxNode,input, i48...index, s48) r48.extend(RecremTimingCheck0) else @index = i48 r48 = nil end if r48 r47 = r48 else r47 = instantiate_node(SyntaxNode,input, index...index) end s41 << r47 end end end end if s41.last r41 = instantiate_node(SyntaxNode,input, i41...index, s41) r41.extend(RecremTimingCheck1) else @index = i41 r41 = nil end if r41 r40 = r41 else r40 = instantiate_node(SyntaxNode,input, index...index) end s34 << r40 end end end end if s34.last r34 = instantiate_node(SyntaxNode,input, i34...index, s34) r34.extend(RecremTimingCheck2) else @index = i34 r34 = nil end if r34 r33 = r34 else r33 = instantiate_node(SyntaxNode,input, index...index) end s27 << r33 end end end end if s27.last r27 = instantiate_node(SyntaxNode,input, i27...index, s27) r27.extend(RecremTimingCheck3) else @index = i27 r27 = nil end if r27 r26 = r27 else r26 = instantiate_node(SyntaxNode,input, index...index) end s20 << r26 end end end end if s20.last r20 = instantiate_node(SyntaxNode,input, i20...index, s20) r20.extend(RecremTimingCheck4) else @index = i20 r20 = nil end if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s0 << r19 if r19 r54 = _nt_s s0 << r54 if r54 if (match_len = has_terminal?(")", false, index)) r55 = true @index += match_len else terminal_parse_failure('")"') r55 = nil end s0 << r55 if r55 r56 = _nt_s s0 << r56 if r56 if (match_len = has_terminal?(";", false, index)) r57 = true @index += match_len else terminal_parse_failure('";"') r57 = nil end s0 << r57 end end end end end end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(RecremTimingCheck5) r0.extend(RecremTimingCheck6) else @index = i0 r0 = nil end node_cache[:recrem_timing_check][start_index] = r0 r0 end module SkewTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module SkewTimingCheck1 def s1 elements[1] end def s2 elements[3] end def reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def data_event elements[8] end def s5 elements[9] end def s6 elements[11] end def timing_check_limit elements[12] end def s7 elements[14] end def s8 elements[16] end end module SkewTimingCheck2 def to_ast n :skew_timing_check, *elements_to_ast end end def _nt_skew_timing_check start_index = index if node_cache[:skew_timing_check].has_key?(index) cached = node_cache[:skew_timing_check][index] if cached node_cache[:skew_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$skew", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$skew"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_data_event s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_timing_check_limit s0 << r13 if r13 i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 if (match_len = has_terminal?(",", false, index)) r17 = true @index += match_len else terminal_parse_failure('","') r17 = nil end s15 << r17 if r17 r18 = _nt_s s15 << r18 if r18 r20 = _nt_notifier if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s15 << r19 end end end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(SkewTimingCheck0) else @index = i15 r15 = nil end if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s0 << r14 if r14 r21 = _nt_s s0 << r21 if r21 if (match_len = has_terminal?(")", false, index)) r22 = true @index += match_len else terminal_parse_failure('")"') r22 = nil end s0 << r22 if r22 r23 = _nt_s s0 << r23 if r23 if (match_len = has_terminal?(";", false, index)) r24 = true @index += match_len else terminal_parse_failure('";"') r24 = nil end s0 << r24 end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SkewTimingCheck1) r0.extend(SkewTimingCheck2) else @index = i0 r0 = nil end node_cache[:skew_timing_check][start_index] = r0 r0 end module TimeskewTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module TimeskewTimingCheck1 def s1 elements[0] end def s2 elements[2] end end module TimeskewTimingCheck2 def s1 elements[0] end def s2 elements[2] end end module TimeskewTimingCheck3 def s1 elements[1] end def s2 elements[3] end def reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def data_event elements[8] end def s5 elements[9] end def s6 elements[11] end def timing_check_limit elements[12] end def s7 elements[13] end def s8 elements[15] end def s9 elements[17] end end module TimeskewTimingCheck4 def to_ast n :timeskew_timing_check, *elements_to_ast end end def _nt_timeskew_timing_check start_index = index if node_cache[:timeskew_timing_check].has_key?(index) cached = node_cache[:timeskew_timing_check][index] if cached node_cache[:timeskew_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$timeskew", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$timeskew"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_data_event s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_timing_check_limit s0 << r13 if r13 r14 = _nt_s s0 << r14 if r14 i16, s16 = index, [] r17 = _nt_s s16 << r17 if r17 if (match_len = has_terminal?(",", false, index)) r18 = true @index += match_len else terminal_parse_failure('","') r18 = nil end s16 << r18 if r18 r19 = _nt_s s16 << r19 if r19 r21 = _nt_notifier if r21 r20 = r21 else r20 = instantiate_node(SyntaxNode,input, index...index) end s16 << r20 if r20 i23, s23 = index, [] r24 = _nt_s s23 << r24 if r24 if (match_len = has_terminal?(",", false, index)) r25 = true @index += match_len else terminal_parse_failure('","') r25 = nil end s23 << r25 if r25 r26 = _nt_s s23 << r26 if r26 r28 = _nt_event_based_flag if r28 r27 = r28 else r27 = instantiate_node(SyntaxNode,input, index...index) end s23 << r27 if r27 i30, s30 = index, [] r31 = _nt_s s30 << r31 if r31 if (match_len = has_terminal?(",", false, index)) r32 = true @index += match_len else terminal_parse_failure('","') r32 = nil end s30 << r32 if r32 r33 = _nt_s s30 << r33 if r33 r35 = _nt_remain_active_flag if r35 r34 = r35 else r34 = instantiate_node(SyntaxNode,input, index...index) end s30 << r34 end end end if s30.last r30 = instantiate_node(SyntaxNode,input, i30...index, s30) r30.extend(TimeskewTimingCheck0) else @index = i30 r30 = nil end if r30 r29 = r30 else r29 = instantiate_node(SyntaxNode,input, index...index) end s23 << r29 end end end end if s23.last r23 = instantiate_node(SyntaxNode,input, i23...index, s23) r23.extend(TimeskewTimingCheck1) else @index = i23 r23 = nil end if r23 r22 = r23 else r22 = instantiate_node(SyntaxNode,input, index...index) end s16 << r22 end end end end if s16.last r16 = instantiate_node(SyntaxNode,input, i16...index, s16) r16.extend(TimeskewTimingCheck2) else @index = i16 r16 = nil end if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s0 << r15 if r15 r36 = _nt_s s0 << r36 if r36 if (match_len = has_terminal?(")", false, index)) r37 = true @index += match_len else terminal_parse_failure('")"') r37 = nil end s0 << r37 if r37 r38 = _nt_s s0 << r38 if r38 if (match_len = has_terminal?(";", false, index)) r39 = true @index += match_len else terminal_parse_failure('";"') r39 = nil end s0 << r39 end end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(TimeskewTimingCheck3) r0.extend(TimeskewTimingCheck4) else @index = i0 r0 = nil end node_cache[:timeskew_timing_check][start_index] = r0 r0 end module FullskewTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module FullskewTimingCheck1 def s1 elements[0] end def s2 elements[2] end end module FullskewTimingCheck2 def s1 elements[0] end def s2 elements[2] end end module FullskewTimingCheck3 def s1 elements[1] end def s2 elements[3] end def reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def data_event elements[8] end def s5 elements[9] end def s6 elements[11] end def timing_check_limit1 elements[12] end def s7 elements[13] end def s8 elements[15] end def timing_check_limit2 elements[16] end def s9 elements[17] end def s10 elements[19] end def s11 elements[21] end end module FullskewTimingCheck4 def to_ast n :fullskew_timing_check, *elements_to_ast end end def _nt_fullskew_timing_check start_index = index if node_cache[:fullskew_timing_check].has_key?(index) cached = node_cache[:fullskew_timing_check][index] if cached node_cache[:fullskew_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$fullskew", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$fullskew"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_data_event s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_timing_check_limit s0 << r13 if r13 r14 = _nt_s s0 << r14 if r14 if (match_len = has_terminal?(",", false, index)) r15 = true @index += match_len else terminal_parse_failure('","') r15 = nil end s0 << r15 if r15 r16 = _nt_s s0 << r16 if r16 r17 = _nt_timing_check_limit s0 << r17 if r17 r18 = _nt_s s0 << r18 if r18 i20, s20 = index, [] r21 = _nt_s s20 << r21 if r21 if (match_len = has_terminal?(",", false, index)) r22 = true @index += match_len else terminal_parse_failure('","') r22 = nil end s20 << r22 if r22 r23 = _nt_s s20 << r23 if r23 r25 = _nt_notifier if r25 r24 = r25 else r24 = instantiate_node(SyntaxNode,input, index...index) end s20 << r24 if r24 i27, s27 = index, [] r28 = _nt_s s27 << r28 if r28 if (match_len = has_terminal?(",", false, index)) r29 = true @index += match_len else terminal_parse_failure('","') r29 = nil end s27 << r29 if r29 r30 = _nt_s s27 << r30 if r30 r32 = _nt_event_based_flag if r32 r31 = r32 else r31 = instantiate_node(SyntaxNode,input, index...index) end s27 << r31 if r31 i34, s34 = index, [] r35 = _nt_s s34 << r35 if r35 if (match_len = has_terminal?(",", false, index)) r36 = true @index += match_len else terminal_parse_failure('","') r36 = nil end s34 << r36 if r36 r37 = _nt_s s34 << r37 if r37 r39 = _nt_remain_active_flag if r39 r38 = r39 else r38 = instantiate_node(SyntaxNode,input, index...index) end s34 << r38 end end end if s34.last r34 = instantiate_node(SyntaxNode,input, i34...index, s34) r34.extend(FullskewTimingCheck0) else @index = i34 r34 = nil end if r34 r33 = r34 else r33 = instantiate_node(SyntaxNode,input, index...index) end s27 << r33 end end end end if s27.last r27 = instantiate_node(SyntaxNode,input, i27...index, s27) r27.extend(FullskewTimingCheck1) else @index = i27 r27 = nil end if r27 r26 = r27 else r26 = instantiate_node(SyntaxNode,input, index...index) end s20 << r26 end end end end if s20.last r20 = instantiate_node(SyntaxNode,input, i20...index, s20) r20.extend(FullskewTimingCheck2) else @index = i20 r20 = nil end if r20 r19 = r20 else r19 = instantiate_node(SyntaxNode,input, index...index) end s0 << r19 if r19 r40 = _nt_s s0 << r40 if r40 if (match_len = has_terminal?(")", false, index)) r41 = true @index += match_len else terminal_parse_failure('")"') r41 = nil end s0 << r41 if r41 r42 = _nt_s s0 << r42 if r42 if (match_len = has_terminal?(";", false, index)) r43 = true @index += match_len else terminal_parse_failure('";"') r43 = nil end s0 << r43 end end end end end end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(FullskewTimingCheck3) r0.extend(FullskewTimingCheck4) else @index = i0 r0 = nil end node_cache[:fullskew_timing_check][start_index] = r0 r0 end module PeriodTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module PeriodTimingCheck1 def s1 elements[1] end def s2 elements[3] end def controlled_reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def timing_check_limit elements[8] end def s5 elements[10] end def s6 elements[12] end end module PeriodTimingCheck2 def to_ast n :period_timing_check, *elements_to_ast end end def _nt_period_timing_check start_index = index if node_cache[:period_timing_check].has_key?(index) cached = node_cache[:period_timing_check][index] if cached node_cache[:period_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$period", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$period"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_controlled_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_timing_check_limit s0 << r9 if r9 i11, s11 = index, [] r12 = _nt_s s11 << r12 if r12 if (match_len = has_terminal?(",", false, index)) r13 = true @index += match_len else terminal_parse_failure('","') r13 = nil end s11 << r13 if r13 r14 = _nt_s s11 << r14 if r14 r16 = _nt_notifier if r16 r15 = r16 else r15 = instantiate_node(SyntaxNode,input, index...index) end s11 << r15 end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(PeriodTimingCheck0) else @index = i11 r11 = nil end if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s0 << r10 if r10 r17 = _nt_s s0 << r17 if r17 if (match_len = has_terminal?(")", false, index)) r18 = true @index += match_len else terminal_parse_failure('")"') r18 = nil end s0 << r18 if r18 r19 = _nt_s s0 << r19 if r19 if (match_len = has_terminal?(";", false, index)) r20 = true @index += match_len else terminal_parse_failure('";"') r20 = nil end s0 << r20 end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(PeriodTimingCheck1) r0.extend(PeriodTimingCheck2) else @index = i0 r0 = nil end node_cache[:period_timing_check][start_index] = r0 r0 end module WidthTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module WidthTimingCheck1 def s1 elements[0] end def s2 elements[2] end def threshold elements[3] end end module WidthTimingCheck2 def s1 elements[1] end def s2 elements[3] end def controlled_reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def timing_check_limit elements[8] end def s5 elements[9] end def s6 elements[11] end def s7 elements[13] end end module WidthTimingCheck3 def to_ast n :width_timing_check, *elements_to_ast end end def _nt_width_timing_check start_index = index if node_cache[:width_timing_check].has_key?(index) cached = node_cache[:width_timing_check][index] if cached node_cache[:width_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$width", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$width"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_controlled_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_timing_check_limit s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 if (match_len = has_terminal?(",", false, index)) r14 = true @index += match_len else terminal_parse_failure('","') r14 = nil end s12 << r14 if r14 r15 = _nt_s s12 << r15 if r15 r16 = _nt_threshold s12 << r16 if r16 i18, s18 = index, [] r19 = _nt_s s18 << r19 if r19 if (match_len = has_terminal?(",", false, index)) r20 = true @index += match_len else terminal_parse_failure('","') r20 = nil end s18 << r20 if r20 r21 = _nt_s s18 << r21 if r21 r23 = _nt_notifier 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(WidthTimingCheck0) else @index = i18 r18 = nil end if r18 r17 = r18 else r17 = instantiate_node(SyntaxNode,input, index...index) end s12 << r17 end end end end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(WidthTimingCheck1) else @index = i12 r12 = nil end if r12 r11 = r12 else r11 = instantiate_node(SyntaxNode,input, index...index) end s0 << r11 if r11 r24 = _nt_s s0 << r24 if r24 if (match_len = has_terminal?(")", false, index)) r25 = true @index += match_len else terminal_parse_failure('")"') r25 = nil end s0 << r25 if r25 r26 = _nt_s s0 << r26 if r26 if (match_len = has_terminal?(";", false, index)) r27 = true @index += match_len else terminal_parse_failure('";"') r27 = nil end s0 << r27 end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(WidthTimingCheck2) r0.extend(WidthTimingCheck3) else @index = i0 r0 = nil end node_cache[:width_timing_check][start_index] = r0 r0 end module NochangeTimingCheck0 def s1 elements[0] end def s2 elements[2] end end module NochangeTimingCheck1 def s1 elements[1] end def s2 elements[3] end def reference_event elements[4] end def s3 elements[5] end def s4 elements[7] end def data_event elements[8] end def s5 elements[9] end def s6 elements[11] end def start_edge_offset elements[12] end def s7 elements[13] end def s8 elements[15] end def end_edge_offset elements[16] end def s9 elements[18] end def s10 elements[20] end end module NochangeTimingCheck2 def to_ast n :nochange_timing_check, *elements_to_ast end end def _nt_nochange_timing_check start_index = index if node_cache[:nochange_timing_check].has_key?(index) cached = node_cache[:nochange_timing_check][index] if cached node_cache[:nochange_timing_check][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$nochange", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"$nochange"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_reference_event s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_data_event s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_start_edge_offset s0 << r13 if r13 r14 = _nt_s s0 << r14 if r14 if (match_len = has_terminal?(",", false, index)) r15 = true @index += match_len else terminal_parse_failure('","') r15 = nil end s0 << r15 if r15 r16 = _nt_s s0 << r16 if r16 r17 = _nt_end_edge_offset s0 << r17 if r17 i19, s19 = index, [] r20 = _nt_s s19 << r20 if r20 if (match_len = has_terminal?(",", false, index)) r21 = true @index += match_len else terminal_parse_failure('","') r21 = nil end s19 << r21 if r21 r22 = _nt_s s19 << r22 if r22 r24 = _nt_notifier if r24 r23 = r24 else r23 = instantiate_node(SyntaxNode,input, index...index) end s19 << r23 end end end if s19.last r19 = instantiate_node(SyntaxNode,input, i19...index, s19) r19.extend(NochangeTimingCheck0) else @index = i19 r19 = nil end if r19 r18 = r19 else r18 = instantiate_node(SyntaxNode,input, index...index) end s0 << r18 if r18 r25 = _nt_s s0 << r25 if r25 if (match_len = has_terminal?(")", false, index)) r26 = true @index += match_len else terminal_parse_failure('")"') r26 = nil end s0 << r26 if r26 r27 = _nt_s s0 << r27 if r27 if (match_len = has_terminal?(";", false, index)) r28 = true @index += match_len else terminal_parse_failure('";"') r28 = nil end s0 << r28 end end end end end end end end end end end end end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(NochangeTimingCheck1) r0.extend(NochangeTimingCheck2) else @index = i0 r0 = nil end node_cache[:nochange_timing_check][start_index] = r0 r0 end def _nt_checktime_condition start_index = index if node_cache[:checktime_condition].has_key?(index) cached = node_cache[:checktime_condition][index] if cached node_cache[:checktime_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_mintypmax_expression node_cache[:checktime_condition][start_index] = r0 r0 end def _nt_controlled_reference_event start_index = index if node_cache[:controlled_reference_event].has_key?(index) cached = node_cache[:controlled_reference_event][index] if cached node_cache[:controlled_reference_event][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_controlled_timing_check_event node_cache[:controlled_reference_event][start_index] = r0 r0 end def _nt_data_event start_index = index if node_cache[:data_event].has_key?(index) cached = node_cache[:data_event][index] if cached node_cache[:data_event][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_timing_check_event node_cache[:data_event][start_index] = r0 r0 end module DelayedData0 def terminal_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def constant_mintypmax_expression elements[4] end def s3 elements[5] end end module DelayedData1 def to_ast n :delayed_data, *elements_to_ast end end def _nt_delayed_data start_index = index if node_cache[:delayed_data].has_key?(index) cached = node_cache[:delayed_data][index] if cached node_cache[:delayed_data][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_terminal_identifier s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("[", false, index)) r4 = true @index += match_len else terminal_parse_failure('"["') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_constant_mintypmax_expression s1 << r6 if r6 r7 = _nt_s s1 << r7 if r7 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 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(DelayedData0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(DelayedData1) r0.extend(DelayedData1) else r9 = _nt_terminal_identifier if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(DelayedData1) r0.extend(DelayedData1) else @index = i0 r0 = nil end end node_cache[:delayed_data][start_index] = r0 r0 end module DelayedReference0 def terminal_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def constant_mintypmax_expression elements[4] end def s3 elements[5] end end module DelayedReference1 def to_ast n :delayed_reference, *elements_to_ast end end def _nt_delayed_reference start_index = index if node_cache[:delayed_reference].has_key?(index) cached = node_cache[:delayed_reference][index] if cached node_cache[:delayed_reference][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_terminal_identifier s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?("[", false, index)) r4 = true @index += match_len else terminal_parse_failure('"["') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_constant_mintypmax_expression s1 << r6 if r6 r7 = _nt_s s1 << r7 if r7 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 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(DelayedReference0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(DelayedReference1) r0.extend(DelayedReference1) else r9 = _nt_terminal_identifier if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(DelayedReference1) r0.extend(DelayedReference1) else @index = i0 r0 = nil end end node_cache[:delayed_reference][start_index] = r0 r0 end def _nt_end_edge_offset start_index = index if node_cache[:end_edge_offset].has_key?(index) cached = node_cache[:end_edge_offset][index] if cached node_cache[:end_edge_offset][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_mintypmax_expression node_cache[:end_edge_offset][start_index] = r0 r0 end def _nt_event_based_flag start_index = index if node_cache[:event_based_flag].has_key?(index) cached = node_cache[:event_based_flag][index] if cached node_cache[:event_based_flag][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_constant_expression node_cache[:event_based_flag][start_index] = r0 r0 end def _nt_notifier start_index = index if node_cache[:notifier].has_key?(index) cached = node_cache[:notifier][index] if cached node_cache[:notifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_variable_identifier node_cache[:notifier][start_index] = r0 r0 end def _nt_reference_event start_index = index if node_cache[:reference_event].has_key?(index) cached = node_cache[:reference_event][index] if cached node_cache[:reference_event][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_timing_check_event node_cache[:reference_event][start_index] = r0 r0 end def _nt_remain_active_flag start_index = index if node_cache[:remain_active_flag].has_key?(index) cached = node_cache[:remain_active_flag][index] if cached node_cache[:remain_active_flag][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_constant_expression node_cache[:remain_active_flag][start_index] = r0 r0 end def _nt_stamptime_condition start_index = index if node_cache[:stamptime_condition].has_key?(index) cached = node_cache[:stamptime_condition][index] if cached node_cache[:stamptime_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_mintypmax_expression node_cache[:stamptime_condition][start_index] = r0 r0 end def _nt_start_edge_offset start_index = index if node_cache[:start_edge_offset].has_key?(index) cached = node_cache[:start_edge_offset][index] if cached node_cache[:start_edge_offset][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_mintypmax_expression node_cache[:start_edge_offset][start_index] = r0 r0 end def _nt_threshold start_index = index if node_cache[:threshold].has_key?(index) cached = node_cache[:threshold][index] if cached node_cache[:threshold][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_constant_expression node_cache[:threshold][start_index] = r0 r0 end def _nt_timing_check_limit start_index = index if node_cache[:timing_check_limit].has_key?(index) cached = node_cache[:timing_check_limit][index] if cached node_cache[:timing_check_limit][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_expression node_cache[:timing_check_limit][start_index] = r0 r0 end module TimingCheckEvent0 def S1 elements[0] end def S2 elements[2] end def timing_check_condition elements[3] end end module TimingCheckEvent1 def s elements[1] end def specify_terminal_descriptor elements[2] end end module TimingCheckEvent2 def to_ast n :timing_check_event, *elements_to_ast end end def _nt_timing_check_event start_index = index if node_cache[:timing_check_event].has_key?(index) cached = node_cache[:timing_check_event][index] if cached node_cache[:timing_check_event][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_timing_check_event_control if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_s s0 << r3 if r3 r4 = _nt_specify_terminal_descriptor s0 << r4 if r4 i6, s6 = index, [] r7 = _nt_S s6 << r7 if r7 if (match_len = has_terminal?("&&&", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"&&&"') r8 = nil end s6 << r8 if r8 r9 = _nt_S s6 << r9 if r9 r10 = _nt_timing_check_condition s6 << r10 end end end if s6.last r6 = instantiate_node(SyntaxNode,input, i6...index, s6) r6.extend(TimingCheckEvent0) else @index = i6 r6 = nil end if r6 r5 = r6 else r5 = instantiate_node(SyntaxNode,input, index...index) end s0 << r5 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(TimingCheckEvent1) r0.extend(TimingCheckEvent2) else @index = i0 r0 = nil end node_cache[:timing_check_event][start_index] = r0 r0 end module ControlledTimingCheckEvent0 def S1 elements[0] end def S2 elements[2] end def timing_check_condition elements[3] end end module ControlledTimingCheckEvent1 def timing_check_event_control elements[0] end def S elements[1] end def specify_terminal_descriptor elements[2] end end module ControlledTimingCheckEvent2 def to_ast n :controlled_timing_check_event, *elements_to_ast end end def _nt_controlled_timing_check_event start_index = index if node_cache[:controlled_timing_check_event].has_key?(index) cached = node_cache[:controlled_timing_check_event][index] if cached node_cache[:controlled_timing_check_event][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_timing_check_event_control s0 << r1 if r1 r2 = _nt_S s0 << r2 if r2 r3 = _nt_specify_terminal_descriptor s0 << r3 if r3 i5, s5 = index, [] r6 = _nt_S s5 << r6 if r6 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 s5 << r7 if r7 r8 = _nt_S s5 << r8 if r8 r9 = _nt_timing_check_condition s5 << r9 end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ControlledTimingCheckEvent0) else @index = i5 r5 = nil end if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s0 << r4 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ControlledTimingCheckEvent1) r0.extend(ControlledTimingCheckEvent2) else @index = i0 r0 = nil end node_cache[:controlled_timing_check_event][start_index] = r0 r0 end module TimingCheckEventControl0 def to_ast n :timing_check_event_control, text_value end end def _nt_timing_check_event_control start_index = index if node_cache[:timing_check_event_control].has_key?(index) cached = node_cache[:timing_check_event_control][index] if cached node_cache[:timing_check_event_control][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?("posedge", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"posedge"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else if (match_len = has_terminal?("negedge", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"negedge"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else r3 = _nt_edge_control_specifier r3.extend(TimingCheckEventControl0) r3.extend(TimingCheckEventControl0) if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else @index = i0 r0 = nil end end end node_cache[:timing_check_event_control][start_index] = r0 r0 end def _nt_specify_terminal_descriptor start_index = index if node_cache[:specify_terminal_descriptor].has_key?(index) cached = node_cache[:specify_terminal_descriptor][index] if cached node_cache[:specify_terminal_descriptor][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_specify_input_terminal_descriptor if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_specify_output_terminal_descriptor if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:specify_terminal_descriptor][start_index] = r0 r0 end module EdgeControlSpecifier0 def s1 elements[0] end def s2 elements[2] end def edge_descriptor elements[3] end end module EdgeControlSpecifier1 def S elements[0] end def edge_descriptor elements[1] end end module EdgeControlSpecifier2 end module EdgeControlSpecifier3 def to_ast n :edge_control_specifier, *elements_to_ast end end def _nt_edge_control_specifier start_index = index if node_cache[:edge_control_specifier].has_key?(index) cached = node_cache[:edge_control_specifier][index] if cached node_cache[:edge_control_specifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("edge", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"edge"') r1 = nil end s0 << r1 if r1 i3, s3 = index, [] r4 = _nt_S s3 << r4 if r4 r5 = _nt_edge_descriptor s3 << r5 if r5 s6, i6 = [], index loop do i7, s7 = index, [] r8 = _nt_s s7 << r8 if r8 if (match_len = has_terminal?(",", false, index)) r9 = true @index += match_len else terminal_parse_failure('","') r9 = nil end s7 << r9 if r9 r10 = _nt_s s7 << r10 if r10 r11 = _nt_edge_descriptor s7 << r11 end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(EdgeControlSpecifier0) else @index = i7 r7 = nil end if r7 s6 << r7 else break end end r6 = instantiate_node(SyntaxNode,input, i6...index, s6) s3 << r6 end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(EdgeControlSpecifier1) 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(SyntaxNode,input, i0...index, s0) r0.extend(EdgeControlSpecifier2) r0.extend(EdgeControlSpecifier3) else @index = i0 r0 = nil end node_cache[:edge_control_specifier][start_index] = r0 r0 end module EdgeDescriptor20 def z_or_x elements[0] end def s elements[1] end def zero_or_one elements[2] end end module EdgeDescriptor21 def zero_or_one elements[0] end def s elements[1] end def z_or_x elements[2] end end module EdgeDescriptor22 def to_ast n :edge_descriptor2, text_value end end def _nt_edge_descriptor2 start_index = index if node_cache[:edge_descriptor2].has_key?(index) cached = node_cache[:edge_descriptor2][index] if cached node_cache[:edge_descriptor2][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?("01", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"01"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else if (match_len = has_terminal?("10", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"10"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else i3, s3 = index, [] r4 = _nt_z_or_x s3 << r4 if r4 r5 = _nt_s s3 << r5 if r5 r6 = _nt_zero_or_one s3 << r6 end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(EdgeDescriptor20) else @index = i3 r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else i7, s7 = index, [] r8 = _nt_zero_or_one s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 r10 = _nt_z_or_x s7 << r10 end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(EdgeDescriptor21) r7.extend(EdgeDescriptor22) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 else @index = i0 r0 = nil end end end end node_cache[:edge_descriptor2][start_index] = r0 r0 end def _nt_zero_or_one start_index = index if node_cache[:zero_or_one].has_key?(index) cached = node_cache[:zero_or_one][index] if cached node_cache[:zero_or_one][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 = true @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 if (match_len = has_terminal?("1", false, index)) r2 = true @index += match_len else terminal_parse_failure('"1"') 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[:zero_or_one][start_index] = r0 r0 end def _nt_z_or_x start_index = index if node_cache[:z_or_x].has_key?(index) cached = node_cache[:z_or_x][index] if cached node_cache[:z_or_x][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?("x", false, index)) r1 = true @index += match_len else terminal_parse_failure('"x"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else if (match_len = has_terminal?("X", false, index)) r2 = true @index += match_len else terminal_parse_failure('"X"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else if (match_len = has_terminal?("z", false, index)) r3 = true @index += match_len else terminal_parse_failure('"z"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 else if (match_len = has_terminal?("Z", false, index)) r4 = true @index += match_len else terminal_parse_failure('"Z"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 else @index = i0 r0 = nil end end end end node_cache[:z_or_x][start_index] = r0 r0 end module TimingCheckCondition0 def s1 elements[1] end def scalar_timing_check_condition elements[2] end def s2 elements[3] end end module TimingCheckCondition1 def to_ast n :timing_check_condition, *elements_to_ast end end def _nt_timing_check_condition start_index = index if node_cache[:timing_check_condition].has_key?(index) cached = node_cache[:timing_check_condition][index] if cached node_cache[:timing_check_condition][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_scalar_timing_check_condition if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(TimingCheckCondition1) r0.extend(TimingCheckCondition1) 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 r4 = _nt_s s2 << r4 if r4 r5 = _nt_scalar_timing_check_condition s2 << r5 if r5 r6 = _nt_s s2 << r6 if r6 if (match_len = has_terminal?(")", false, index)) r7 = true @index += match_len else terminal_parse_failure('")"') r7 = nil end s2 << r7 end end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(TimingCheckCondition0) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(TimingCheckCondition1) r0.extend(TimingCheckCondition1) else @index = i0 r0 = nil end end node_cache[:timing_check_condition][start_index] = r0 r0 end module ScalarTimingCheckCondition0 def expression elements[0] end def s1 elements[1] end def s2 elements[3] end def scalar_constant elements[4] end end module ScalarTimingCheckCondition1 def expression elements[0] end def s1 elements[1] end def s2 elements[3] end def scalar_constant elements[4] end end module ScalarTimingCheckCondition2 def expression elements[0] end def s1 elements[1] end def s2 elements[3] end def scalar_constant elements[4] end end module ScalarTimingCheckCondition3 def expression elements[0] end def s1 elements[1] end def s2 elements[3] end def scalar_constant elements[4] end end module ScalarTimingCheckCondition4 def s elements[1] end def expression elements[2] end end module ScalarTimingCheckCondition5 def to_ast n :scalar_timing_check_condition, *elements_to_ast end end def _nt_scalar_timing_check_condition start_index = index if node_cache[:scalar_timing_check_condition].has_key?(index) cached = node_cache[:scalar_timing_check_condition][index] if cached node_cache[:scalar_timing_check_condition][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_expression s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 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 s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_scalar_constant s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ScalarTimingCheckCondition0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ScalarTimingCheckCondition5) r0.extend(ScalarTimingCheckCondition5) else i7, s7 = index, [] r8 = _nt_expression s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 if (match_len = has_terminal?("===", false, index)) r10 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"==="') r10 = nil end s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 r12 = _nt_scalar_constant s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(ScalarTimingCheckCondition1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(ScalarTimingCheckCondition5) r0.extend(ScalarTimingCheckCondition5) else i13, s13 = index, [] r14 = _nt_expression s13 << r14 if r14 r15 = _nt_s s13 << r15 if r15 if (match_len = has_terminal?("!=", false, index)) r16 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"!="') r16 = nil end s13 << r16 if r16 r17 = _nt_s s13 << r17 if r17 r18 = _nt_scalar_constant s13 << r18 end end end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(ScalarTimingCheckCondition2) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(ScalarTimingCheckCondition5) r0.extend(ScalarTimingCheckCondition5) else i19, s19 = index, [] r20 = _nt_expression s19 << r20 if r20 r21 = _nt_s s19 << r21 if r21 if (match_len = has_terminal?("!==", false, index)) r22 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"!=="') r22 = nil end s19 << r22 if r22 r23 = _nt_s s19 << r23 if r23 r24 = _nt_scalar_constant s19 << r24 end end end end if s19.last r19 = instantiate_node(SyntaxNode,input, i19...index, s19) r19.extend(ScalarTimingCheckCondition3) else @index = i19 r19 = nil end if r19 r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true r0 = r19 r0.extend(ScalarTimingCheckCondition5) r0.extend(ScalarTimingCheckCondition5) else r25 = _nt_expression if r25 r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true r0 = r25 r0.extend(ScalarTimingCheckCondition5) r0.extend(ScalarTimingCheckCondition5) else i26, s26 = index, [] if (match_len = has_terminal?("~", false, index)) r27 = true @index += match_len else terminal_parse_failure('"~"') r27 = nil end s26 << r27 if r27 r28 = _nt_s s26 << r28 if r28 r29 = _nt_expression s26 << r29 end end if s26.last r26 = instantiate_node(SyntaxNode,input, i26...index, s26) r26.extend(ScalarTimingCheckCondition4) else @index = i26 r26 = nil end if r26 r26 = SyntaxNode.new(input, (index-1)...index) if r26 == true r0 = r26 r0.extend(ScalarTimingCheckCondition5) r0.extend(ScalarTimingCheckCondition5) else @index = i0 r0 = nil end end end end end end node_cache[:scalar_timing_check_condition][start_index] = r0 r0 end module ScalarConstant0 def to_ast n :scalar_constant, text_value[-1] end end def _nt_scalar_constant start_index = index if node_cache[:scalar_constant].has_key?(index) cached = node_cache[:scalar_constant][index] if cached node_cache[:scalar_constant][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?("1'b0", false, index)) r1 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'b0"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ScalarConstant0) r0.extend(ScalarConstant0) else if (match_len = has_terminal?("1'b1", false, index)) r2 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'b1"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(ScalarConstant0) r0.extend(ScalarConstant0) else if (match_len = has_terminal?("1'B0", false, index)) r3 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'B0"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(ScalarConstant0) r0.extend(ScalarConstant0) else if (match_len = has_terminal?("1'B1", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"1\'B1"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(ScalarConstant0) r0.extend(ScalarConstant0) else if (match_len = has_terminal?("'b0", false, index)) r5 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"\'b0"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(ScalarConstant0) r0.extend(ScalarConstant0) else if (match_len = has_terminal?("'b1", false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"\'b1"') r6 = nil end if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r0 = r6 r0.extend(ScalarConstant0) r0.extend(ScalarConstant0) else if (match_len = has_terminal?("'B0", false, index)) r7 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"\'B0"') r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(ScalarConstant0) r0.extend(ScalarConstant0) else if (match_len = has_terminal?("'B1", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"\'B1"') r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 r0.extend(ScalarConstant0) r0.extend(ScalarConstant0) else if (match_len = has_terminal?("1", false, index)) r9 = true @index += match_len else terminal_parse_failure('"1"') r9 = nil end if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(ScalarConstant0) r0.extend(ScalarConstant0) else if (match_len = has_terminal?("0", false, index)) r10 = true @index += match_len else terminal_parse_failure('"0"') r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 r0.extend(ScalarConstant0) r0.extend(ScalarConstant0) else @index = i0 r0 = nil end end end end end end end end end end node_cache[:scalar_constant][start_index] = r0 r0 end module Concatenation0 def s1 elements[0] end def s2 elements[2] end def expression elements[3] end end module Concatenation1 def s1 elements[1] end def expression elements[2] end def s2 elements[4] end end module Concatenation2 def to_ast n :concatenation, *elements_to_ast end end def _nt_concatenation start_index = index if node_cache[:concatenation].has_key?(index) cached = node_cache[:concatenation][index] if cached node_cache[:concatenation][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("{", false, index)) r1 = true @index += match_len else terminal_parse_failure('"{"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_expression s0 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s5 << r7 if r7 r8 = _nt_s s5 << r8 if r8 r9 = _nt_expression s5 << r9 end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(Concatenation0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 if r4 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?("}", false, index)) r11 = true @index += match_len else terminal_parse_failure('"}"') r11 = nil end s0 << r11 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Concatenation1) r0.extend(Concatenation2) else @index = i0 r0 = nil end node_cache[:concatenation][start_index] = r0 r0 end module ConstantConcatenation0 def s1 elements[0] end def s2 elements[2] end def constant_expression elements[3] end end module ConstantConcatenation1 def s1 elements[1] end def constant_expression elements[2] end def s2 elements[4] end end module ConstantConcatenation2 def to_ast n :constant_concatenation, *elements_to_ast end end def _nt_constant_concatenation start_index = index if node_cache[:constant_concatenation].has_key?(index) cached = node_cache[:constant_concatenation][index] if cached node_cache[:constant_concatenation][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("{", false, index)) r1 = true @index += match_len else terminal_parse_failure('"{"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_constant_expression s0 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s5 << r7 if r7 r8 = _nt_s s5 << r8 if r8 r9 = _nt_constant_expression s5 << r9 end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ConstantConcatenation0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 if r4 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?("}", false, index)) r11 = true @index += match_len else terminal_parse_failure('"}"') r11 = nil end s0 << r11 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ConstantConcatenation1) r0.extend(ConstantConcatenation2) else @index = i0 r0 = nil end node_cache[:constant_concatenation][start_index] = r0 r0 end module ConstantMultipleConcatenation0 def s1 elements[1] end def constant_expression elements[2] end def s2 elements[3] end def constant_concatenation elements[4] end def s3 elements[5] end end module ConstantMultipleConcatenation1 def to_ast n :constant_multiple_concatenation, *elements_to_ast end end def _nt_constant_multiple_concatenation start_index = index if node_cache[:constant_multiple_concatenation].has_key?(index) cached = node_cache[:constant_multiple_concatenation][index] if cached node_cache[:constant_multiple_concatenation][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("{", false, index)) r1 = true @index += match_len else terminal_parse_failure('"{"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_constant_expression s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_constant_concatenation s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?("}", false, index)) r7 = true @index += match_len else terminal_parse_failure('"}"') r7 = nil end s0 << r7 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ConstantMultipleConcatenation0) r0.extend(ConstantMultipleConcatenation1) else @index = i0 r0 = nil end node_cache[:constant_multiple_concatenation][start_index] = r0 r0 end module ModulePathConcatenation0 def s1 elements[0] end def s2 elements[2] end def module_path_expression elements[3] end end module ModulePathConcatenation1 def s1 elements[1] end def module_path_expression elements[2] end def s2 elements[4] end end module ModulePathConcatenation2 def to_ast n :module_path_concatenation, *elements_to_ast end end def _nt_module_path_concatenation start_index = index if node_cache[:module_path_concatenation].has_key?(index) cached = node_cache[:module_path_concatenation][index] if cached node_cache[:module_path_concatenation][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("{", false, index)) r1 = true @index += match_len else terminal_parse_failure('"{"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_module_path_expression s0 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 if (match_len = has_terminal?(",", false, index)) r7 = true @index += match_len else terminal_parse_failure('","') r7 = nil end s5 << r7 if r7 r8 = _nt_s s5 << r8 if r8 r9 = _nt_module_path_expression s5 << r9 end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ModulePathConcatenation0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 if r4 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?("}", false, index)) r11 = true @index += match_len else terminal_parse_failure('"}"') r11 = nil end s0 << r11 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ModulePathConcatenation1) r0.extend(ModulePathConcatenation2) else @index = i0 r0 = nil end node_cache[:module_path_concatenation][start_index] = r0 r0 end module ModulePathMultipleConcatenation0 def s1 elements[1] end def constant_expression elements[2] end def s2 elements[3] end def module_path_concatenation elements[4] end def s3 elements[5] end end module ModulePathMultipleConcatenation1 def to_ast n :module_path_multiple_concatenation, *elements_to_ast end end def _nt_module_path_multiple_concatenation start_index = index if node_cache[:module_path_multiple_concatenation].has_key?(index) cached = node_cache[:module_path_multiple_concatenation][index] if cached node_cache[:module_path_multiple_concatenation][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("{", false, index)) r1 = true @index += match_len else terminal_parse_failure('"{"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_constant_expression s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_module_path_concatenation s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?("}", false, index)) r7 = true @index += match_len else terminal_parse_failure('"}"') r7 = nil end s0 << r7 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ModulePathMultipleConcatenation0) r0.extend(ModulePathMultipleConcatenation1) else @index = i0 r0 = nil end node_cache[:module_path_multiple_concatenation][start_index] = r0 r0 end module MultipleConcatenation0 def s1 elements[1] end def constant_expression elements[2] end def s2 elements[3] end def concatenation elements[4] end def s3 elements[5] end end module MultipleConcatenation1 def to_ast n :multiple_concatenation, *elements_to_ast end end def _nt_multiple_concatenation start_index = index if node_cache[:multiple_concatenation].has_key?(index) cached = node_cache[:multiple_concatenation][index] if cached node_cache[:multiple_concatenation][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("{", false, index)) r1 = true @index += match_len else terminal_parse_failure('"{"') r1 = nil end s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_constant_expression s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_concatenation s0 << r5 if r5 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?("}", false, index)) r7 = true @index += match_len else terminal_parse_failure('"}"') r7 = nil end s0 << r7 end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(MultipleConcatenation0) r0.extend(MultipleConcatenation1) else @index = i0 r0 = nil end node_cache[:multiple_concatenation][start_index] = r0 r0 end module ConstantFunctionCall0 def s elements[0] end def attribute_instance elements[1] end end module ConstantFunctionCall1 def s1 elements[0] end def s2 elements[2] end def constant_expression elements[3] end end module ConstantFunctionCall2 def function_identifier elements[0] end def s1 elements[2] end def s2 elements[4] end def constant_expression elements[5] end def s3 elements[7] end end module ConstantFunctionCall3 def to_ast n :function_identifier, *elements_to_ast end end def _nt_constant_function_call start_index = index if node_cache[:constant_function_call].has_key?(index) cached = node_cache[:constant_function_call][index] if cached node_cache[:constant_function_call][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_function_identifier s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(ConstantFunctionCall0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?("(", false, index)) r7 = true @index += match_len else terminal_parse_failure('"("') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_constant_expression s0 << r9 if r9 s10, i10 = [], index loop do i11, s11 = index, [] r12 = _nt_s s11 << r12 if r12 if (match_len = has_terminal?(",", false, index)) r13 = true @index += match_len else terminal_parse_failure('","') r13 = nil end s11 << r13 if r13 r14 = _nt_s s11 << r14 if r14 r15 = _nt_constant_expression s11 << r15 end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(ConstantFunctionCall1) else @index = i11 r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s0 << r10 if r10 r16 = _nt_s s0 << r16 if r16 if (match_len = has_terminal?(")", false, index)) r17 = true @index += match_len else terminal_parse_failure('")"') r17 = nil end s0 << r17 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ConstantFunctionCall2) r0.extend(ConstantFunctionCall3) else @index = i0 r0 = nil end node_cache[:constant_function_call][start_index] = r0 r0 end module ConstantSystemFunctionCall0 def s1 elements[0] end def s2 elements[2] end def constant_expression elements[3] end end module ConstantSystemFunctionCall1 def system_function_identifier elements[0] end def s1 elements[1] end def s2 elements[3] end def constant_expression elements[4] end def s3 elements[6] end end module ConstantSystemFunctionCall2 def to_ast n :constant_system_function_call, *elements_to_ast end end def _nt_constant_system_function_call start_index = index if node_cache[:constant_system_function_call].has_key?(index) cached = node_cache[:constant_system_function_call][index] if cached node_cache[:constant_system_function_call][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_system_function_identifier s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("(", false, index)) r3 = true @index += match_len else terminal_parse_failure('"("') r3 = nil end s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_constant_expression s0 << r5 if r5 s6, i6 = [], index loop do i7, s7 = index, [] r8 = _nt_s s7 << r8 if r8 if (match_len = has_terminal?(",", false, index)) r9 = true @index += match_len else terminal_parse_failure('","') r9 = nil end s7 << r9 if r9 r10 = _nt_s s7 << r10 if r10 r11 = _nt_constant_expression s7 << r11 end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(ConstantSystemFunctionCall0) else @index = i7 r7 = nil end if r7 s6 << r7 else break end end r6 = instantiate_node(SyntaxNode,input, i6...index, s6) s0 << r6 if r6 r12 = _nt_s s0 << r12 if r12 if (match_len = has_terminal?(")", false, index)) r13 = true @index += match_len else terminal_parse_failure('")"') r13 = nil end s0 << r13 end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ConstantSystemFunctionCall1) r0.extend(ConstantSystemFunctionCall2) else @index = i0 r0 = nil end node_cache[:constant_system_function_call][start_index] = r0 r0 end module FunctionCall0 def s elements[0] end def attribute_instance elements[1] end end module FunctionCall1 def s1 elements[0] end def s2 elements[2] end def expression elements[3] end end module FunctionCall2 def hierarchical_function_identifier elements[0] end def s1 elements[2] end def s2 elements[4] end def expression elements[5] end def s3 elements[7] end end module FunctionCall3 def to_ast n :function_call, *elements_to_ast end end def _nt_function_call start_index = index if node_cache[:function_call].has_key?(index) cached = node_cache[:function_call][index] if cached node_cache[:function_call][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_hierarchical_function_identifier s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 r5 = _nt_attribute_instance s3 << r5 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(FunctionCall0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 r6 = _nt_s s0 << r6 if r6 if (match_len = has_terminal?("(", false, index)) r7 = true @index += match_len else terminal_parse_failure('"("') r7 = nil end s0 << r7 if r7 r8 = _nt_s s0 << r8 if r8 r9 = _nt_expression s0 << r9 if r9 s10, i10 = [], index loop do i11, s11 = index, [] r12 = _nt_s s11 << r12 if r12 if (match_len = has_terminal?(",", false, index)) r13 = true @index += match_len else terminal_parse_failure('","') r13 = nil end s11 << r13 if r13 r14 = _nt_s s11 << r14 if r14 r15 = _nt_expression s11 << r15 end end end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(FunctionCall1) else @index = i11 r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s0 << r10 if r10 r16 = _nt_s s0 << r16 if r16 if (match_len = has_terminal?(")", false, index)) r17 = true @index += match_len else terminal_parse_failure('")"') r17 = nil end s0 << r17 end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(FunctionCall2) r0.extend(FunctionCall3) else @index = i0 r0 = nil end node_cache[:function_call][start_index] = r0 r0 end module SystemFunctionCall0 def s1 elements[0] end def s2 elements[2] end def expression elements[3] end end module SystemFunctionCall1 def s1 elements[0] end def s2 elements[2] end def expression elements[3] end def s3 elements[5] end end module SystemFunctionCall2 def system_function_identifier elements[0] end end module SystemFunctionCall3 def to_ast n :system_function_call, *elements_to_ast end end def _nt_system_function_call start_index = index if node_cache[:system_function_call].has_key?(index) cached = node_cache[:system_function_call][index] if cached node_cache[:system_function_call][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_system_function_identifier s0 << r1 if r1 i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?("(", false, index)) r5 = true @index += match_len else terminal_parse_failure('"("') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_expression s3 << r7 if r7 s8, i8 = [], index loop do i9, s9 = index, [] r10 = _nt_s s9 << r10 if r10 if (match_len = has_terminal?(",", false, index)) r11 = true @index += match_len else terminal_parse_failure('","') r11 = nil end s9 << r11 if r11 r12 = _nt_s s9 << r12 if r12 r13 = _nt_expression s9 << r13 end end end if s9.last r9 = instantiate_node(SyntaxNode,input, i9...index, s9) r9.extend(SystemFunctionCall0) else @index = i9 r9 = nil end if r9 s8 << r9 else break end end r8 = instantiate_node(SyntaxNode,input, i8...index, s8) s3 << r8 if r8 r14 = _nt_s s3 << r14 if r14 if (match_len = has_terminal?(")", false, index)) r15 = true @index += match_len else terminal_parse_failure('")"') r15 = nil end s3 << r15 end end end end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(SystemFunctionCall1) 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(SyntaxNode,input, i0...index, s0) r0.extend(SystemFunctionCall2) r0.extend(SystemFunctionCall3) else @index = i0 r0 = nil end node_cache[:system_function_call][start_index] = r0 r0 end def _nt_base_expression start_index = index if node_cache[:base_expression].has_key?(index) cached = node_cache[:base_expression][index] if cached node_cache[:base_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_expression node_cache[:base_expression][start_index] = r0 r0 end def _nt_constant_base_expression start_index = index if node_cache[:constant_base_expression].has_key?(index) cached = node_cache[:constant_base_expression][index] if cached node_cache[:constant_base_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_constant_expression node_cache[:constant_base_expression][start_index] = r0 r0 end module ConstantExpression0 def s elements[0] end def attribute_instance elements[1] end end module ConstantExpression1 def unary_operator elements[0] end def s elements[2] end def constant_primary elements[3] end end module ConstantExpression2 def constant_primary elements[0] end end module ConstantExpression3 def to_ast n :constant_expression, *elements_to_ast end end def _nt_constant_expression start_index = index if node_cache[:constant_expression].has_key?(index) cached = node_cache[:constant_expression][index] if cached node_cache[:constant_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, [] r2 = _nt_unary_operator s1 << r2 if r2 s3, i3 = [], index loop do i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 r6 = _nt_attribute_instance s4 << r6 end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(ConstantExpression0) else @index = i4 r4 = nil end if r4 s3 << r4 else break end end r3 = instantiate_node(SyntaxNode,input, i3...index, s3) s1 << r3 if r3 r7 = _nt_s s1 << r7 if r7 r8 = _nt_constant_primary s1 << r8 if r8 r10 = _nt_constant_expression_tail if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s1 << r9 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ConstantExpression1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ConstantExpression3) r0.extend(ConstantExpression3) else i11, s11 = index, [] r12 = _nt_constant_primary s11 << r12 if r12 r14 = _nt_constant_expression_tail if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s11 << r13 end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(ConstantExpression2) else @index = i11 r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(ConstantExpression3) r0.extend(ConstantExpression3) else @index = i0 r0 = nil end end node_cache[:constant_expression][start_index] = r0 r0 end module ConstantExpressionTail0 def s elements[0] end def attribute_instance elements[1] end end module ConstantExpressionTail1 def s1 elements[0] end def s2 elements[3] end def constant_expression1 elements[4] end def s3 elements[5] end def s4 elements[7] end def constant_expression2 elements[8] end end module ConstantExpressionTail2 def s elements[0] end def attribute_instance elements[1] end end module ConstantExpressionTail3 def s1 elements[0] end def binary_operator elements[1] end def s2 elements[3] end def constant_expression elements[4] end end def _nt_constant_expression_tail start_index = index if node_cache[:constant_expression_tail].has_key?(index) cached = node_cache[:constant_expression_tail][index] if cached node_cache[:constant_expression_tail][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_s s1 << r2 if r2 if (match_len = has_terminal?("?", false, index)) r3 = true @index += match_len else terminal_parse_failure('"?"') r3 = nil end s1 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 r7 = _nt_attribute_instance s5 << r7 end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ConstantExpressionTail0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s1 << r4 if r4 r8 = _nt_s s1 << r8 if r8 r9 = _nt_constant_expression s1 << r9 if r9 r10 = _nt_s s1 << r10 if r10 if (match_len = has_terminal?(":", false, index)) r11 = true @index += match_len else terminal_parse_failure('":"') r11 = nil end s1 << r11 if r11 r12 = _nt_s s1 << r12 if r12 r13 = _nt_constant_expression s1 << r13 if r13 r15 = _nt_constant_expression_tail if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s1 << r14 end end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ConstantExpressionTail1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i16, s16 = index, [] r17 = _nt_s s16 << r17 if r17 r18 = _nt_binary_operator s16 << r18 if r18 s19, i19 = [], index loop do i20, s20 = index, [] r21 = _nt_s s20 << r21 if r21 r22 = _nt_attribute_instance s20 << r22 end if s20.last r20 = instantiate_node(SyntaxNode,input, i20...index, s20) r20.extend(ConstantExpressionTail2) else @index = i20 r20 = nil end if r20 s19 << r20 else break end end r19 = instantiate_node(SyntaxNode,input, i19...index, s19) s16 << r19 if r19 r23 = _nt_s s16 << r23 if r23 r24 = _nt_constant_expression s16 << r24 if r24 r26 = _nt_constant_expression_tail if r26 r25 = r26 else r25 = instantiate_node(SyntaxNode,input, index...index) end s16 << r25 end end end end end if s16.last r16 = instantiate_node(SyntaxNode,input, i16...index, s16) r16.extend(ConstantExpressionTail3) else @index = i16 r16 = nil end if r16 r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true r0 = r16 else @index = i0 r0 = nil end end node_cache[:constant_expression_tail][start_index] = r0 r0 end module ConstantMintypmaxExpression0 def constant_expression1 elements[0] end def s1 elements[1] end def s2 elements[3] end def constant_expression2 elements[4] end def s3 elements[5] end def s4 elements[7] end def constant_expression3 elements[8] end end def _nt_constant_mintypmax_expression start_index = index if node_cache[:constant_mintypmax_expression].has_key?(index) cached = node_cache[:constant_mintypmax_expression][index] if cached node_cache[:constant_mintypmax_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, [] r2 = _nt_constant_expression s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?(":", false, index)) r4 = true @index += match_len else terminal_parse_failure('":"') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_constant_expression s1 << r6 if r6 r7 = _nt_s s1 << r7 if r7 if (match_len = has_terminal?(":", false, index)) r8 = true @index += match_len else terminal_parse_failure('":"') r8 = nil end s1 << r8 if r8 r9 = _nt_s s1 << r9 if r9 r10 = _nt_constant_expression s1 << r10 end end end end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ConstantMintypmaxExpression0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r11 = _nt_constant_expression if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 else @index = i0 r0 = nil end end node_cache[:constant_mintypmax_expression][start_index] = r0 r0 end module ConstantRangeExpression0 def msb_constant_expression elements[0] end def s1 elements[1] end def s2 elements[3] end def lsb_constant_expression elements[4] end end module ConstantRangeExpression1 def constant_base_expression elements[0] end def s1 elements[1] end def s2 elements[3] end def width_constant_expression elements[4] end end module ConstantRangeExpression2 def constant_base_expression elements[0] end def s1 elements[1] end def s2 elements[3] end def width_constant_expression elements[4] end end module ConstantRangeExpression3 def to_ast n :constant_range_expression, *elements_to_ast end end def _nt_constant_range_expression start_index = index if node_cache[:constant_range_expression].has_key?(index) cached = node_cache[:constant_range_expression][index] if cached node_cache[:constant_range_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, [] r2 = _nt_msb_constant_expression s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?(":", false, index)) r4 = true @index += match_len else terminal_parse_failure('":"') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_lsb_constant_expression s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ConstantRangeExpression0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ConstantRangeExpression3) r0.extend(ConstantRangeExpression3) else i7, s7 = index, [] r8 = _nt_constant_base_expression s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 if (match_len = has_terminal?("+:", false, index)) r10 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"+:"') r10 = nil end s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 r12 = _nt_width_constant_expression s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(ConstantRangeExpression1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(ConstantRangeExpression3) r0.extend(ConstantRangeExpression3) else i13, s13 = index, [] r14 = _nt_constant_base_expression s13 << r14 if r14 r15 = _nt_s s13 << r15 if r15 if (match_len = has_terminal?("-:", false, index)) r16 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"-:"') r16 = nil end s13 << r16 if r16 r17 = _nt_s s13 << r17 if r17 r18 = _nt_width_constant_expression s13 << r18 end end end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(ConstantRangeExpression2) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(ConstantRangeExpression3) r0.extend(ConstantRangeExpression3) else r19 = _nt_constant_expression if r19 r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true r0 = r19 r0.extend(ConstantRangeExpression3) r0.extend(ConstantRangeExpression3) else @index = i0 r0 = nil end end end end node_cache[:constant_range_expression][start_index] = r0 r0 end def _nt_dimension_constant_expression start_index = index if node_cache[:dimension_constant_expression].has_key?(index) cached = node_cache[:dimension_constant_expression][index] if cached node_cache[:dimension_constant_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_constant_expression node_cache[:dimension_constant_expression][start_index] = r0 r0 end module Expression0 def s elements[0] end def attribute_instance elements[1] end end module Expression1 def unary_operator elements[0] end def s elements[2] end end module Expression2 def main elements[0] end def tail elements[1] end end module Expression3 def main elements[0] end def tail elements[1] end end module Expression4 # Some logic needed here to make things pretty after dealing with the left recursion workaround def to_ast if !respond_to?(:tail) || tail.empty? n :expression, *elements_to_ast else if tail.respond_to?(:expr2) n :conditional_expression, n(:expression1, n(:expression, main.to_ast)), tail.expr2.to_ast, tail.expr3.to_ast else n :expression, *elements_to_ast end end 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, [] i2, s2 = index, [] r3 = _nt_unary_operator s2 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 r7 = _nt_attribute_instance s5 << r7 end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(Expression0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s2 << r4 if r4 r8 = _nt_s s2 << r8 end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(Expression1) else @index = i2 r2 = nil end s1 << r2 if r2 r9 = _nt_primary s1 << r9 if r9 r11 = _nt_expression_tail if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s1 << r10 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(Expression2) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(Expression4) r0.extend(Expression4) else i12, s12 = index, [] r13 = _nt_primary s12 << r13 if r13 r15 = _nt_expression_tail if r15 r14 = r15 else r14 = instantiate_node(SyntaxNode,input, index...index) end s12 << r14 end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(Expression3) else @index = i12 r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r0 = r12 r0.extend(Expression4) r0.extend(Expression4) else @index = i0 r0 = nil end end node_cache[:expression][start_index] = r0 r0 end module ExpressionTail0 def s elements[0] end def attribute_instance elements[1] end end module ExpressionTail1 def s1 elements[0] end def binary_operator elements[1] end def s2 elements[3] end def expression elements[4] end end module ExpressionTail2 def s elements[0] end def attribute_instance elements[1] end end module ExpressionTail3 def s1 elements[0] end def s2 elements[3] end def expr2 elements[4] end def s3 elements[5] end def s4 elements[7] end def expr3 elements[8] end end def _nt_expression_tail start_index = index if node_cache[:expression_tail].has_key?(index) cached = node_cache[:expression_tail][index] if cached node_cache[:expression_tail][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_s s1 << r2 if r2 r3 = _nt_binary_operator s1 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 r7 = _nt_attribute_instance s5 << r7 end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ExpressionTail0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s1 << r4 if r4 r8 = _nt_s s1 << r8 if r8 r9 = _nt_expression s1 << r9 if r9 r11 = _nt_expression_tail if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s1 << r10 end end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ExpressionTail1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i12, s12 = index, [] r13 = _nt_s s12 << r13 if r13 if (match_len = has_terminal?("?", false, index)) r14 = true @index += match_len else terminal_parse_failure('"?"') r14 = nil end s12 << r14 if r14 s15, i15 = [], index loop do i16, s16 = index, [] r17 = _nt_s s16 << r17 if r17 r18 = _nt_attribute_instance s16 << r18 end if s16.last r16 = instantiate_node(SyntaxNode,input, i16...index, s16) r16.extend(ExpressionTail2) else @index = i16 r16 = nil end if r16 s15 << r16 else break end end r15 = instantiate_node(SyntaxNode,input, i15...index, s15) s12 << r15 if r15 r19 = _nt_s s12 << r19 if r19 r20 = _nt_expression2 s12 << r20 if r20 r21 = _nt_s s12 << r21 if r21 if (match_len = has_terminal?(":", false, index)) r22 = true @index += match_len else terminal_parse_failure('":"') r22 = nil end s12 << r22 if r22 r23 = _nt_s s12 << r23 if r23 r24 = _nt_expression3 s12 << r24 if r24 r26 = _nt_expression_tail if r26 r25 = r26 else r25 = instantiate_node(SyntaxNode,input, index...index) end s12 << r25 end end end end end end end end end if s12.last r12 = instantiate_node(SyntaxNode,input, i12...index, s12) r12.extend(ExpressionTail3) else @index = i12 r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r0 = r12 else @index = i0 r0 = nil end end node_cache[:expression_tail][start_index] = r0 r0 end module Expression10 def to_ast n :expression1, *elements_to_ast end end def _nt_expression1 start_index = index if node_cache[:expression1].has_key?(index) cached = node_cache[:expression1][index] if cached node_cache[:expression1][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do r1 = _nt_expression if r1 s0 << r1 else break end if s0.size == 1 break end end if s0.size < 1 @index = i0 r0 = nil else if s0.size < 1 @terminal_failures.pop end r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Expression10) r0.extend(Expression10) end node_cache[:expression1][start_index] = r0 r0 end module Expression20 def to_ast n :expression2, *elements_to_ast end end def _nt_expression2 start_index = index if node_cache[:expression2].has_key?(index) cached = node_cache[:expression2][index] if cached node_cache[:expression2][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do r1 = _nt_expression if r1 s0 << r1 else break end if s0.size == 1 break end end if s0.size < 1 @index = i0 r0 = nil else if s0.size < 1 @terminal_failures.pop end r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Expression20) r0.extend(Expression20) end node_cache[:expression2][start_index] = r0 r0 end module Expression30 def to_ast n :expression3, *elements_to_ast end end def _nt_expression3 start_index = index if node_cache[:expression3].has_key?(index) cached = node_cache[:expression3][index] if cached node_cache[:expression3][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do r1 = _nt_expression if r1 s0 << r1 else break end if s0.size == 1 break end end if s0.size < 1 @index = i0 r0 = nil else if s0.size < 1 @terminal_failures.pop end r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Expression30) r0.extend(Expression30) end node_cache[:expression3][start_index] = r0 r0 end def _nt_lsb_constant_expression start_index = index if node_cache[:lsb_constant_expression].has_key?(index) cached = node_cache[:lsb_constant_expression][index] if cached node_cache[:lsb_constant_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_constant_expression node_cache[:lsb_constant_expression][start_index] = r0 r0 end module MintypmaxExpression0 def expression1 elements[0] end def s1 elements[1] end def s2 elements[3] end def expression2 elements[4] end def s3 elements[5] end def s4 elements[7] end def expression3 elements[8] end end module MintypmaxExpression1 def to_ast n :mintypmax_expression, *elements_to_ast end end def _nt_mintypmax_expression start_index = index if node_cache[:mintypmax_expression].has_key?(index) cached = node_cache[:mintypmax_expression][index] if cached node_cache[:mintypmax_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_expression if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(MintypmaxExpression1) r0.extend(MintypmaxExpression1) else i2, s2 = index, [] r3 = _nt_expression s2 << r3 if r3 r4 = _nt_s s2 << r4 if r4 if (match_len = has_terminal?(":", false, index)) r5 = true @index += match_len else terminal_parse_failure('":"') r5 = nil end s2 << r5 if r5 r6 = _nt_s s2 << r6 if r6 r7 = _nt_expression s2 << r7 if r7 r8 = _nt_s s2 << r8 if r8 if (match_len = has_terminal?(":", false, index)) r9 = true @index += match_len else terminal_parse_failure('":"') r9 = nil end s2 << r9 if r9 r10 = _nt_s s2 << r10 if r10 r11 = _nt_expression s2 << r11 end end end end end end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(MintypmaxExpression0) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(MintypmaxExpression1) r0.extend(MintypmaxExpression1) else @index = i0 r0 = nil end end node_cache[:mintypmax_expression][start_index] = r0 r0 end module ModulePathConditionalExpression0 def s elements[0] end def attribute_instance elements[1] end end module ModulePathConditionalExpression1 def module_path_expression1 elements[0] end def s1 elements[1] end def s2 elements[4] end def module_path_expression2 elements[5] end def s3 elements[6] end def s4 elements[8] end def module_path_expression3 elements[9] end end module ModulePathConditionalExpression2 def to_ast n :module_path_conditional_expression, *elements_to_ast end end def _nt_module_path_conditional_expression start_index = index if node_cache[:module_path_conditional_expression].has_key?(index) cached = node_cache[:module_path_conditional_expression][index] if cached node_cache[:module_path_conditional_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_module_path_expression s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 if (match_len = has_terminal?("?", false, index)) r3 = true @index += match_len else terminal_parse_failure('"?"') r3 = nil end s0 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 r7 = _nt_attribute_instance s5 << r7 end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ModulePathConditionalExpression0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 if r4 r8 = _nt_s s0 << r8 if r8 r9 = _nt_module_path_expression s0 << r9 if r9 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?(":", false, index)) r11 = true @index += match_len else terminal_parse_failure('":"') r11 = nil end s0 << r11 if r11 r12 = _nt_s s0 << r12 if r12 r13 = _nt_module_path_expression s0 << r13 end end end end end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(ModulePathConditionalExpression1) r0.extend(ModulePathConditionalExpression2) else @index = i0 r0 = nil end node_cache[:module_path_conditional_expression][start_index] = r0 r0 end module ModulePathExpression0 def s elements[0] end def attribute_instance elements[1] end end module ModulePathExpression1 def unary_module_path_operator elements[0] end def s elements[2] end def module_path_primary elements[3] end end module ModulePathExpression2 def s elements[0] end def attribute_instance elements[1] end end module ModulePathExpression3 def module_path_expression1 elements[0] end def s1 elements[1] end def binary_module_path_operator elements[2] end def s2 elements[4] end def module_path_expression2 elements[5] end end module ModulePathExpression4 def to_ast n :module_path_expression, *elements_to_ast end end def _nt_module_path_expression start_index = index if node_cache[:module_path_expression].has_key?(index) cached = node_cache[:module_path_expression][index] if cached node_cache[:module_path_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_module_path_primary if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ModulePathExpression4) r0.extend(ModulePathExpression4) else i2, s2 = index, [] r3 = _nt_unary_module_path_operator s2 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 r7 = _nt_attribute_instance s5 << r7 end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ModulePathExpression0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s2 << r4 if r4 r8 = _nt_s s2 << r8 if r8 r9 = _nt_module_path_primary s2 << r9 end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(ModulePathExpression1) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(ModulePathExpression4) r0.extend(ModulePathExpression4) else i10, s10 = index, [] r11 = _nt_module_path_expression s10 << r11 if r11 r12 = _nt_s s10 << r12 if r12 r13 = _nt_binary_module_path_operator s10 << r13 if r13 s14, i14 = [], index loop do i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 r17 = _nt_attribute_instance s15 << r17 end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(ModulePathExpression2) else @index = i15 r15 = nil end if r15 s14 << r15 else break end end r14 = instantiate_node(SyntaxNode,input, i14...index, s14) s10 << r14 if r14 r18 = _nt_s s10 << r18 if r18 r19 = _nt_module_path_expression s10 << r19 end end end end end if s10.last r10 = instantiate_node(SyntaxNode,input, i10...index, s10) r10.extend(ModulePathExpression3) else @index = i10 r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 r0.extend(ModulePathExpression4) r0.extend(ModulePathExpression4) else r20 = _nt_module_path_conditional_expression if r20 r20 = SyntaxNode.new(input, (index-1)...index) if r20 == true r0 = r20 r0.extend(ModulePathExpression4) r0.extend(ModulePathExpression4) else @index = i0 r0 = nil end end end end node_cache[:module_path_expression][start_index] = r0 r0 end module ModulePathMintypmaxExpression0 def module_path_expression1 elements[0] end def s1 elements[1] end def s2 elements[3] end def module_path_expression2 elements[4] end def s3 elements[5] end def s4 elements[7] end def module_path_expression3 elements[8] end end module ModulePathMintypmaxExpression1 def to_ast n :module_path_mintypmax_expression, *elements_to_ast end end def _nt_module_path_mintypmax_expression start_index = index if node_cache[:module_path_mintypmax_expression].has_key?(index) cached = node_cache[:module_path_mintypmax_expression][index] if cached node_cache[:module_path_mintypmax_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_module_path_expression if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ModulePathMintypmaxExpression1) r0.extend(ModulePathMintypmaxExpression1) else i2, s2 = index, [] r3 = _nt_module_path_expression s2 << r3 if r3 r4 = _nt_s s2 << r4 if r4 if (match_len = has_terminal?(":", false, index)) r5 = true @index += match_len else terminal_parse_failure('":"') r5 = nil end s2 << r5 if r5 r6 = _nt_s s2 << r6 if r6 r7 = _nt_module_path_expression s2 << r7 if r7 r8 = _nt_s s2 << r8 if r8 if (match_len = has_terminal?(":", false, index)) r9 = true @index += match_len else terminal_parse_failure('":"') r9 = nil end s2 << r9 if r9 r10 = _nt_s s2 << r10 if r10 r11 = _nt_module_path_expression s2 << r11 end end end end end end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(ModulePathMintypmaxExpression0) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(ModulePathMintypmaxExpression1) r0.extend(ModulePathMintypmaxExpression1) else @index = i0 r0 = nil end end node_cache[:module_path_mintypmax_expression][start_index] = r0 r0 end def _nt_msb_constant_expression start_index = index if node_cache[:msb_constant_expression].has_key?(index) cached = node_cache[:msb_constant_expression][index] if cached node_cache[:msb_constant_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_constant_expression node_cache[:msb_constant_expression][start_index] = r0 r0 end module RangeExpression0 def msb_constant_expression elements[0] end def s1 elements[1] end def s2 elements[3] end def lsb_constant_expression elements[4] end end module RangeExpression1 def base_expression elements[0] end def s1 elements[1] end def s2 elements[3] end def width_constant_expression elements[4] end end module RangeExpression2 def base_expression elements[0] end def s1 elements[1] end def s2 elements[3] end def width_constant_expression elements[4] end end module RangeExpression3 def to_ast n :range_expression, *elements_to_ast end end def _nt_range_expression start_index = index if node_cache[:range_expression].has_key?(index) cached = node_cache[:range_expression][index] if cached node_cache[:range_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, [] r2 = _nt_msb_constant_expression s1 << r2 if r2 r3 = _nt_s s1 << r3 if r3 if (match_len = has_terminal?(":", false, index)) r4 = true @index += match_len else terminal_parse_failure('":"') r4 = nil end s1 << r4 if r4 r5 = _nt_s s1 << r5 if r5 r6 = _nt_lsb_constant_expression s1 << r6 end end end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(RangeExpression0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(RangeExpression3) r0.extend(RangeExpression3) else i7, s7 = index, [] r8 = _nt_base_expression s7 << r8 if r8 r9 = _nt_s s7 << r9 if r9 if (match_len = has_terminal?("+:", false, index)) r10 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"+:"') r10 = nil end s7 << r10 if r10 r11 = _nt_s s7 << r11 if r11 r12 = _nt_width_constant_expression s7 << r12 end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(RangeExpression1) else @index = i7 r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(RangeExpression3) r0.extend(RangeExpression3) else i13, s13 = index, [] r14 = _nt_base_expression s13 << r14 if r14 r15 = _nt_s s13 << r15 if r15 if (match_len = has_terminal?("-:", false, index)) r16 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"-:"') r16 = nil end s13 << r16 if r16 r17 = _nt_s s13 << r17 if r17 r18 = _nt_width_constant_expression s13 << r18 end end end end if s13.last r13 = instantiate_node(SyntaxNode,input, i13...index, s13) r13.extend(RangeExpression2) else @index = i13 r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r0 = r13 r0.extend(RangeExpression3) r0.extend(RangeExpression3) else r19 = _nt_expression if r19 r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true r0 = r19 r0.extend(RangeExpression3) r0.extend(RangeExpression3) else @index = i0 r0 = nil end end end end node_cache[:range_expression][start_index] = r0 r0 end def _nt_width_constant_expression start_index = index if node_cache[:width_constant_expression].has_key?(index) cached = node_cache[:width_constant_expression][index] if cached node_cache[:width_constant_expression][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_constant_expression node_cache[:width_constant_expression][start_index] = r0 r0 end module ConstantPrimary0 def s1 elements[0] end def s2 elements[2] end def constant_range_expression elements[3] end def s3 elements[4] end end module ConstantPrimary1 def parameter_identifier elements[0] end end module ConstantPrimary2 def s1 elements[0] end def s2 elements[2] end def constant_range_expression elements[3] end def s3 elements[4] end end module ConstantPrimary3 def specparam_identifier elements[0] end end module ConstantPrimary4 def s1 elements[1] end def constant_mintypmax_expression elements[2] end def s2 elements[3] end end module ConstantPrimary5 def to_ast n :constant_primary, *elements_to_ast end end def _nt_constant_primary start_index = index if node_cache[:constant_primary].has_key?(index) cached = node_cache[:constant_primary][index] if cached node_cache[:constant_primary][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_parameter_identifier s1 << r2 if r2 i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 if (match_len = has_terminal?("[", false, index)) r6 = true @index += match_len else terminal_parse_failure('"["') r6 = nil end s4 << r6 if r6 r7 = _nt_s s4 << r7 if r7 r8 = _nt_constant_range_expression s4 << r8 if r8 r9 = _nt_s s4 << r9 if r9 if (match_len = has_terminal?("]", false, index)) r10 = true @index += match_len else terminal_parse_failure('"]"') r10 = nil end s4 << r10 end end end end end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(ConstantPrimary0) else @index = i4 r4 = nil end if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(ConstantPrimary1) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ConstantPrimary5) r0.extend(ConstantPrimary5) else i11, s11 = index, [] r12 = _nt_specparam_identifier s11 << r12 if r12 i14, s14 = index, [] r15 = _nt_s s14 << r15 if r15 if (match_len = has_terminal?("[", false, index)) r16 = true @index += match_len else terminal_parse_failure('"["') r16 = nil end s14 << r16 if r16 r17 = _nt_s s14 << r17 if r17 r18 = _nt_constant_range_expression s14 << r18 if r18 r19 = _nt_s s14 << r19 if r19 if (match_len = has_terminal?("]", false, index)) r20 = true @index += match_len else terminal_parse_failure('"]"') r20 = nil end s14 << r20 end end end end end if s14.last r14 = instantiate_node(SyntaxNode,input, i14...index, s14) r14.extend(ConstantPrimary2) else @index = i14 r14 = nil end if r14 r13 = r14 else r13 = instantiate_node(SyntaxNode,input, index...index) end s11 << r13 end if s11.last r11 = instantiate_node(SyntaxNode,input, i11...index, s11) r11.extend(ConstantPrimary3) else @index = i11 r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(ConstantPrimary5) r0.extend(ConstantPrimary5) else r21 = _nt_constant_concatenation if r21 r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true r0 = r21 r0.extend(ConstantPrimary5) r0.extend(ConstantPrimary5) else r22 = _nt_constant_multiple_concatenation if r22 r22 = SyntaxNode.new(input, (index-1)...index) if r22 == true r0 = r22 r0.extend(ConstantPrimary5) r0.extend(ConstantPrimary5) else r23 = _nt_constant_function_call if r23 r23 = SyntaxNode.new(input, (index-1)...index) if r23 == true r0 = r23 r0.extend(ConstantPrimary5) r0.extend(ConstantPrimary5) else r24 = _nt_constant_system_function_call if r24 r24 = SyntaxNode.new(input, (index-1)...index) if r24 == true r0 = r24 r0.extend(ConstantPrimary5) r0.extend(ConstantPrimary5) 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 r27 = _nt_s s25 << r27 if r27 r28 = _nt_constant_mintypmax_expression s25 << r28 if r28 r29 = _nt_s s25 << r29 if r29 if (match_len = has_terminal?(")", false, index)) r30 = true @index += match_len else terminal_parse_failure('")"') r30 = nil end s25 << r30 end end end end if s25.last r25 = instantiate_node(SyntaxNode,input, i25...index, s25) r25.extend(ConstantPrimary4) else @index = i25 r25 = nil end if r25 r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true r0 = r25 r0.extend(ConstantPrimary5) r0.extend(ConstantPrimary5) else r31 = _nt_number if r31 r31 = SyntaxNode.new(input, (index-1)...index) if r31 == true r0 = r31 r0.extend(ConstantPrimary5) r0.extend(ConstantPrimary5) else r32 = _nt_string if r32 r32 = SyntaxNode.new(input, (index-1)...index) if r32 == true r0 = r32 r0.extend(ConstantPrimary5) r0.extend(ConstantPrimary5) else @index = i0 r0 = nil end end end end end end end end end node_cache[:constant_primary][start_index] = r0 r0 end module ModulePathPrimary0 def s1 elements[1] end def module_path_mintypmax_expression elements[2] end def s2 elements[3] end end module ModulePathPrimary1 def to_ast n :module_path_primary, *elements_to_ast end end def _nt_module_path_primary start_index = index if node_cache[:module_path_primary].has_key?(index) cached = node_cache[:module_path_primary][index] if cached node_cache[:module_path_primary][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_module_path_concatenation if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ModulePathPrimary1) r0.extend(ModulePathPrimary1) else r2 = _nt_module_path_multiple_concatenation if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(ModulePathPrimary1) r0.extend(ModulePathPrimary1) else r3 = _nt_function_call if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(ModulePathPrimary1) r0.extend(ModulePathPrimary1) else r4 = _nt_system_function_call if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(ModulePathPrimary1) r0.extend(ModulePathPrimary1) else 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 r7 = _nt_s s5 << r7 if r7 r8 = _nt_module_path_mintypmax_expression s5 << r8 if r8 r9 = _nt_s s5 << r9 if r9 if (match_len = has_terminal?(")", false, index)) r10 = true @index += match_len else terminal_parse_failure('")"') r10 = nil end s5 << r10 end end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(ModulePathPrimary0) else @index = i5 r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(ModulePathPrimary1) r0.extend(ModulePathPrimary1) else r11 = _nt_number if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(ModulePathPrimary1) r0.extend(ModulePathPrimary1) else r12 = _nt_identifier if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r0 = r12 r0.extend(ModulePathPrimary1) r0.extend(ModulePathPrimary1) else @index = i0 r0 = nil end end end end end end end node_cache[:module_path_primary][start_index] = r0 r0 end module Primary0 def s elements[0] end end module Primary1 def s1 elements[0] end def s2 elements[2] end def expression elements[3] end def s3 elements[4] end end module Primary2 def s1 elements[0] end def s2 elements[3] end def range_expression elements[4] end def s3 elements[5] end end module Primary3 def hierarchical_identifier elements[0] end end module Primary4 def s1 elements[1] end def mintypmax_expression elements[2] end def s2 elements[3] end end module Primary5 def to_ast n :primary, *elements_to_ast end end def _nt_primary start_index = index if node_cache[:primary].has_key?(index) cached = node_cache[:primary][index] if cached node_cache[:primary][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_hierarchical_identifier s1 << r2 if r2 i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 s6, i6 = [], index loop do i7, s7 = index, [] r8 = _nt_s s7 << r8 if r8 if (match_len = has_terminal?("[", false, index)) r9 = true @index += match_len else terminal_parse_failure('"["') r9 = nil end s7 << r9 if r9 r10 = _nt_s s7 << r10 if r10 r11 = _nt_expression s7 << r11 if r11 r12 = _nt_s s7 << r12 if r12 if (match_len = has_terminal?("]", false, index)) r13 = true @index += match_len else terminal_parse_failure('"]"') r13 = nil end s7 << r13 if r13 i14 = index i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 if (match_len = has_terminal?("[", false, index)) r17 = true @index += match_len else terminal_parse_failure('"["') r17 = nil end s15 << r17 end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(Primary0) else @index = i15 r15 = nil end if r15 @index = i14 r14 = instantiate_node(SyntaxNode,input, index...index) else @index = i14 r14 = nil end s7 << r14 end end end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(Primary1) else @index = i7 r7 = nil end if r7 s6 << r7 else break end end r6 = instantiate_node(SyntaxNode,input, i6...index, s6) s4 << r6 if r6 if (match_len = has_terminal?("[", false, index)) r18 = true @index += match_len else terminal_parse_failure('"["') r18 = nil end s4 << r18 if r18 r19 = _nt_s s4 << r19 if r19 r20 = _nt_range_expression s4 << r20 if r20 r21 = _nt_s s4 << r21 if r21 if (match_len = has_terminal?("]", false, index)) r22 = true @index += match_len else terminal_parse_failure('"]"') r22 = nil end s4 << r22 end end end end end end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(Primary2) else @index = i4 r4 = nil end if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(Primary3) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(Primary5) r0.extend(Primary5) else r23 = _nt_concatenation if r23 r23 = SyntaxNode.new(input, (index-1)...index) if r23 == true r0 = r23 r0.extend(Primary5) r0.extend(Primary5) else r24 = _nt_multiple_concatenation if r24 r24 = SyntaxNode.new(input, (index-1)...index) if r24 == true r0 = r24 r0.extend(Primary5) r0.extend(Primary5) else r25 = _nt_function_call if r25 r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true r0 = r25 r0.extend(Primary5) r0.extend(Primary5) else r26 = _nt_system_function_call if r26 r26 = SyntaxNode.new(input, (index-1)...index) if r26 == true r0 = r26 r0.extend(Primary5) r0.extend(Primary5) else i27, s27 = index, [] if (match_len = has_terminal?("(", false, index)) r28 = true @index += match_len else terminal_parse_failure('"("') r28 = nil end s27 << r28 if r28 r29 = _nt_s s27 << r29 if r29 r30 = _nt_mintypmax_expression s27 << r30 if r30 r31 = _nt_s s27 << r31 if r31 if (match_len = has_terminal?(")", false, index)) r32 = true @index += match_len else terminal_parse_failure('")"') r32 = nil end s27 << r32 end end end end if s27.last r27 = instantiate_node(SyntaxNode,input, i27...index, s27) r27.extend(Primary4) else @index = i27 r27 = nil end if r27 r27 = SyntaxNode.new(input, (index-1)...index) if r27 == true r0 = r27 r0.extend(Primary5) r0.extend(Primary5) else r33 = _nt_number if r33 r33 = SyntaxNode.new(input, (index-1)...index) if r33 == true r0 = r33 r0.extend(Primary5) r0.extend(Primary5) else r34 = _nt_string if r34 r34 = SyntaxNode.new(input, (index-1)...index) if r34 == true r0 = r34 r0.extend(Primary5) r0.extend(Primary5) else @index = i0 r0 = nil end end end end end end end end node_cache[:primary][start_index] = r0 r0 end module NetLvalue0 def s elements[0] end end module NetLvalue1 def s1 elements[0] end def s2 elements[2] end def constant_expression elements[3] end def s3 elements[4] end end module NetLvalue2 def s1 elements[0] end def s2 elements[3] end def constant_range_expression elements[4] end def s3 elements[5] end end module NetLvalue3 def hierarchical_net_identifier elements[0] end end module NetLvalue4 def s1 elements[0] end def s2 elements[2] end def net_lvalue elements[3] end end module NetLvalue5 def s1 elements[1] end def net_lvalue elements[2] end def s2 elements[4] end end module NetLvalue6 def to_ast n :net_lvalue, *elements_to_ast end end def _nt_net_lvalue start_index = index if node_cache[:net_lvalue].has_key?(index) cached = node_cache[:net_lvalue][index] if cached node_cache[:net_lvalue][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_hierarchical_net_identifier s1 << r2 if r2 i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 s6, i6 = [], index loop do i7, s7 = index, [] r8 = _nt_s s7 << r8 if r8 if (match_len = has_terminal?("[", false, index)) r9 = true @index += match_len else terminal_parse_failure('"["') r9 = nil end s7 << r9 if r9 r10 = _nt_s s7 << r10 if r10 r11 = _nt_constant_expression s7 << r11 if r11 r12 = _nt_s s7 << r12 if r12 if (match_len = has_terminal?("]", false, index)) r13 = true @index += match_len else terminal_parse_failure('"]"') r13 = nil end s7 << r13 if r13 i14 = index i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 if (match_len = has_terminal?("[", false, index)) r17 = true @index += match_len else terminal_parse_failure('"["') r17 = nil end s15 << r17 end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(NetLvalue0) else @index = i15 r15 = nil end if r15 @index = i14 r14 = instantiate_node(SyntaxNode,input, index...index) else @index = i14 r14 = nil end s7 << r14 end end end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(NetLvalue1) else @index = i7 r7 = nil end if r7 s6 << r7 else break end end r6 = instantiate_node(SyntaxNode,input, i6...index, s6) s4 << r6 if r6 if (match_len = has_terminal?("[", false, index)) r18 = true @index += match_len else terminal_parse_failure('"["') r18 = nil end s4 << r18 if r18 r19 = _nt_s s4 << r19 if r19 r20 = _nt_constant_range_expression s4 << r20 if r20 r21 = _nt_s s4 << r21 if r21 if (match_len = has_terminal?("]", false, index)) r22 = true @index += match_len else terminal_parse_failure('"]"') r22 = nil end s4 << r22 end end end end end end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(NetLvalue2) else @index = i4 r4 = nil end if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(NetLvalue3) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(NetLvalue6) r0.extend(NetLvalue6) else i23, s23 = index, [] if (match_len = has_terminal?("{", false, index)) r24 = true @index += match_len else terminal_parse_failure('"{"') r24 = nil end s23 << r24 if r24 r25 = _nt_s s23 << r25 if r25 r26 = _nt_net_lvalue s23 << r26 if r26 s27, i27 = [], index loop do i28, s28 = index, [] r29 = _nt_s s28 << r29 if r29 if (match_len = has_terminal?(",", false, index)) r30 = true @index += match_len else terminal_parse_failure('","') r30 = nil end s28 << r30 if r30 r31 = _nt_s s28 << r31 if r31 r32 = _nt_net_lvalue s28 << r32 end end end if s28.last r28 = instantiate_node(SyntaxNode,input, i28...index, s28) r28.extend(NetLvalue4) else @index = i28 r28 = nil end if r28 s27 << r28 else break end end r27 = instantiate_node(SyntaxNode,input, i27...index, s27) s23 << r27 if r27 r33 = _nt_s s23 << r33 if r33 if (match_len = has_terminal?("}", false, index)) r34 = true @index += match_len else terminal_parse_failure('"}"') r34 = nil end s23 << r34 end end end end end if s23.last r23 = instantiate_node(SyntaxNode,input, i23...index, s23) r23.extend(NetLvalue5) else @index = i23 r23 = nil end if r23 r23 = SyntaxNode.new(input, (index-1)...index) if r23 == true r0 = r23 r0.extend(NetLvalue6) r0.extend(NetLvalue6) else @index = i0 r0 = nil end end node_cache[:net_lvalue][start_index] = r0 r0 end module VariableLvalue0 def s elements[0] end end module VariableLvalue1 def s1 elements[0] end def s2 elements[2] end def expression elements[3] end def s3 elements[4] end end module VariableLvalue2 def s1 elements[0] end def s2 elements[3] end def range_expression elements[4] end def s3 elements[5] end end module VariableLvalue3 def hierarchical_variable_identifier elements[0] end end module VariableLvalue4 def s1 elements[0] end def s2 elements[2] end def variable_lvalue elements[3] end end module VariableLvalue5 def s1 elements[1] end def variable_lvalue elements[2] end def s2 elements[4] end end module VariableLvalue6 def to_ast n :variable_lvalue, *elements_to_ast end end def _nt_variable_lvalue start_index = index if node_cache[:variable_lvalue].has_key?(index) cached = node_cache[:variable_lvalue][index] if cached node_cache[:variable_lvalue][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_hierarchical_variable_identifier s1 << r2 if r2 i4, s4 = index, [] r5 = _nt_s s4 << r5 if r5 s6, i6 = [], index loop do i7, s7 = index, [] r8 = _nt_s s7 << r8 if r8 if (match_len = has_terminal?("[", false, index)) r9 = true @index += match_len else terminal_parse_failure('"["') r9 = nil end s7 << r9 if r9 r10 = _nt_s s7 << r10 if r10 r11 = _nt_expression s7 << r11 if r11 r12 = _nt_s s7 << r12 if r12 if (match_len = has_terminal?("]", false, index)) r13 = true @index += match_len else terminal_parse_failure('"]"') r13 = nil end s7 << r13 if r13 i14 = index i15, s15 = index, [] r16 = _nt_s s15 << r16 if r16 if (match_len = has_terminal?("[", false, index)) r17 = true @index += match_len else terminal_parse_failure('"["') r17 = nil end s15 << r17 end if s15.last r15 = instantiate_node(SyntaxNode,input, i15...index, s15) r15.extend(VariableLvalue0) else @index = i15 r15 = nil end if r15 @index = i14 r14 = instantiate_node(SyntaxNode,input, index...index) else @index = i14 r14 = nil end s7 << r14 end end end end end end if s7.last r7 = instantiate_node(SyntaxNode,input, i7...index, s7) r7.extend(VariableLvalue1) else @index = i7 r7 = nil end if r7 s6 << r7 else break end end r6 = instantiate_node(SyntaxNode,input, i6...index, s6) s4 << r6 if r6 if (match_len = has_terminal?("[", false, index)) r18 = true @index += match_len else terminal_parse_failure('"["') r18 = nil end s4 << r18 if r18 r19 = _nt_s s4 << r19 if r19 r20 = _nt_range_expression s4 << r20 if r20 r21 = _nt_s s4 << r21 if r21 if (match_len = has_terminal?("]", false, index)) r22 = true @index += match_len else terminal_parse_failure('"]"') r22 = nil end s4 << r22 end end end end end end if s4.last r4 = instantiate_node(SyntaxNode,input, i4...index, s4) r4.extend(VariableLvalue2) else @index = i4 r4 = nil end if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(VariableLvalue3) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(VariableLvalue6) r0.extend(VariableLvalue6) else i23, s23 = index, [] if (match_len = has_terminal?("{", false, index)) r24 = true @index += match_len else terminal_parse_failure('"{"') r24 = nil end s23 << r24 if r24 r25 = _nt_s s23 << r25 if r25 r26 = _nt_variable_lvalue s23 << r26 if r26 s27, i27 = [], index loop do i28, s28 = index, [] r29 = _nt_s s28 << r29 if r29 if (match_len = has_terminal?(",", false, index)) r30 = true @index += match_len else terminal_parse_failure('","') r30 = nil end s28 << r30 if r30 r31 = _nt_s s28 << r31 if r31 r32 = _nt_variable_lvalue s28 << r32 end end end if s28.last r28 = instantiate_node(SyntaxNode,input, i28...index, s28) r28.extend(VariableLvalue4) else @index = i28 r28 = nil end if r28 s27 << r28 else break end end r27 = instantiate_node(SyntaxNode,input, i27...index, s27) s23 << r27 if r27 r33 = _nt_s s23 << r33 if r33 if (match_len = has_terminal?("}", false, index)) r34 = true @index += match_len else terminal_parse_failure('"}"') r34 = nil end s23 << r34 end end end end end if s23.last r23 = instantiate_node(SyntaxNode,input, i23...index, s23) r23.extend(VariableLvalue5) else @index = i23 r23 = nil end if r23 r23 = SyntaxNode.new(input, (index-1)...index) if r23 == true r0 = r23 r0.extend(VariableLvalue6) r0.extend(VariableLvalue6) else @index = i0 r0 = nil end end node_cache[:variable_lvalue][start_index] = r0 r0 end module UnaryOperator0 def to_ast n :unary_operator, text_value end end def _nt_unary_operator start_index = index if node_cache[:unary_operator].has_key?(index) cached = node_cache[:unary_operator][index] if cached node_cache[:unary_operator][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 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) 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 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) else if (match_len = has_terminal?("!", false, index)) r3 = true @index += match_len else terminal_parse_failure('"!"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) else if (match_len = has_terminal?("&", false, index)) r4 = true @index += match_len else terminal_parse_failure('"&"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) else if (match_len = has_terminal?("|", false, index)) r5 = true @index += match_len else terminal_parse_failure('"|"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) 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 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) 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 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) else if (match_len = has_terminal?("~^", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"~^"') r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) 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 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) else if (match_len = has_terminal?("^~", false, index)) r10 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"^~"') r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) 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 r0.extend(UnaryOperator0) r0.extend(UnaryOperator0) else @index = i0 r0 = nil end end end end end end end end end end end node_cache[:unary_operator][start_index] = r0 r0 end module BinaryOperator0 def to_ast n :binary_operator, text_value end end def _nt_binary_operator start_index = index if node_cache[:binary_operator].has_key?(index) cached = node_cache[:binary_operator][index] if cached node_cache[:binary_operator][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 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) 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 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("/", false, index)) r3 = true @index += match_len else terminal_parse_failure('"/"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("%", false, index)) r4 = true @index += match_len else terminal_parse_failure('"%"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) 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 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) 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 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("*", false, index)) r7 = true @index += match_len else terminal_parse_failure('"*"') r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("===", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"==="') r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else 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 if r9 r9 = SyntaxNode.new(input, (index-1)...index) if r9 == true r0 = r9 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("!==", false, index)) r10 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"!=="') r10 = nil end if r10 r10 = SyntaxNode.new(input, (index-1)...index) if r10 == true r0 = r10 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("!=", false, index)) r11 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"!="') r11 = nil end if r11 r11 = SyntaxNode.new(input, (index-1)...index) if r11 == true r0 = r11 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("||", false, index)) r12 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"||"') r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r0 = r12 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) 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 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("&&", false, index)) r14 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"&&"') r14 = nil end if r14 r14 = SyntaxNode.new(input, (index-1)...index) if r14 == true r0 = r14 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) 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 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?(">=", false, index)) r16 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('">="') r16 = nil end if r16 r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true r0 = r16 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?(">>>", false, index)) r17 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('">>>"') r17 = nil end if r17 r17 = SyntaxNode.new(input, (index-1)...index) if r17 == true r0 = r17 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else 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 if r18 r18 = SyntaxNode.new(input, (index-1)...index) if r18 == true r0 = r18 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?(">", false, index)) r19 = true @index += match_len else terminal_parse_failure('">"') r19 = nil end if r19 r19 = SyntaxNode.new(input, (index-1)...index) if r19 == true r0 = r19 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("<=", false, index)) r20 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"<="') r20 = nil end if r20 r20 = SyntaxNode.new(input, (index-1)...index) if r20 == true r0 = r20 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else 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 if r21 r21 = SyntaxNode.new(input, (index-1)...index) if r21 == true r0 = r21 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("<<", false, index)) r22 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"<<"') r22 = nil end if r22 r22 = SyntaxNode.new(input, (index-1)...index) if r22 == true r0 = r22 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("<", false, index)) r23 = true @index += match_len else terminal_parse_failure('"<"') r23 = nil end if r23 r23 = SyntaxNode.new(input, (index-1)...index) if r23 == true r0 = r23 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("^~", false, index)) r24 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"^~"') r24 = nil end if r24 r24 = SyntaxNode.new(input, (index-1)...index) if r24 == true r0 = r24 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else if (match_len = has_terminal?("^", false, index)) r25 = true @index += match_len else terminal_parse_failure('"^"') r25 = nil end if r25 r25 = SyntaxNode.new(input, (index-1)...index) if r25 == true r0 = r25 r0.extend(BinaryOperator0) r0.extend(BinaryOperator0) else @index = i0 r0 = nil end end end end end end end end end end end end end end end end end end end end end end end end end node_cache[:binary_operator][start_index] = r0 r0 end module UnaryModulePathOperator0 def to_ast n :unary_module_path_operator, text_value end end def _nt_unary_module_path_operator start_index = index if node_cache[:unary_module_path_operator].has_key?(index) cached = node_cache[:unary_module_path_operator][index] if cached node_cache[:unary_module_path_operator][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 r0.extend(UnaryModulePathOperator0) r0.extend(UnaryModulePathOperator0) 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 r0.extend(UnaryModulePathOperator0) r0.extend(UnaryModulePathOperator0) else if (match_len = has_terminal?("|", false, index)) r3 = true @index += match_len else terminal_parse_failure('"|"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(UnaryModulePathOperator0) r0.extend(UnaryModulePathOperator0) 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 r0.extend(UnaryModulePathOperator0) r0.extend(UnaryModulePathOperator0) 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 r0.extend(UnaryModulePathOperator0) r0.extend(UnaryModulePathOperator0) 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 r0.extend(UnaryModulePathOperator0) r0.extend(UnaryModulePathOperator0) else if (match_len = has_terminal?("~", false, index)) r7 = true @index += match_len else terminal_parse_failure('"~"') r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(UnaryModulePathOperator0) r0.extend(UnaryModulePathOperator0) else if (match_len = has_terminal?("^~", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"^~"') r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 r0.extend(UnaryModulePathOperator0) r0.extend(UnaryModulePathOperator0) 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 r0.extend(UnaryModulePathOperator0) r0.extend(UnaryModulePathOperator0) else @index = i0 r0 = nil end end end end end end end end end node_cache[:unary_module_path_operator][start_index] = r0 r0 end module BinaryModulePathOperator0 def to_ast n :binary_module_path_operator, text_value end end def _nt_binary_module_path_operator start_index = index if node_cache[:binary_module_path_operator].has_key?(index) cached = node_cache[:binary_module_path_operator][index] if cached node_cache[:binary_module_path_operator][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 r0.extend(BinaryModulePathOperator0) r0.extend(BinaryModulePathOperator0) 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 r0.extend(BinaryModulePathOperator0) r0.extend(BinaryModulePathOperator0) 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 r0.extend(BinaryModulePathOperator0) r0.extend(BinaryModulePathOperator0) 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 r0.extend(BinaryModulePathOperator0) r0.extend(BinaryModulePathOperator0) else if (match_len = has_terminal?("|", false, index)) r5 = true @index += match_len else terminal_parse_failure('"|"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(BinaryModulePathOperator0) r0.extend(BinaryModulePathOperator0) 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 r0.extend(BinaryModulePathOperator0) r0.extend(BinaryModulePathOperator0) else if (match_len = has_terminal?("&", false, index)) r7 = true @index += match_len else terminal_parse_failure('"&"') r7 = nil end if r7 r7 = SyntaxNode.new(input, (index-1)...index) if r7 == true r0 = r7 r0.extend(BinaryModulePathOperator0) r0.extend(BinaryModulePathOperator0) else if (match_len = has_terminal?("^~", false, index)) r8 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"^~"') r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 r0.extend(BinaryModulePathOperator0) r0.extend(BinaryModulePathOperator0) 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 r0.extend(BinaryModulePathOperator0) r0.extend(BinaryModulePathOperator0) else @index = i0 r0 = nil end end end end end end end end end node_cache[:binary_module_path_operator][start_index] = r0 r0 end module Number0 # 1..1 is used to stop Treetop from merging nodes below this level def to_ast n :number, *elements_to_ast end end def _nt_number start_index = index if node_cache[:number].has_key?(index) cached = node_cache[:number][index] if cached node_cache[:number][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do i1 = index r2 = _nt_octal_number if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r1 = r2 else r3 = _nt_binary_number if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r1 = r3 else r4 = _nt_hex_number if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r1 = r4 else r5 = _nt_real_number if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r1 = r5 else r6 = _nt_decimal_number if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r1 = r6 else @index = i1 r1 = nil end end end end end if r1 s0 << r1 else break end if s0.size == 1 break end end if s0.size < 1 @index = i0 r0 = nil else if s0.size < 1 @terminal_failures.pop end r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(Number0) r0.extend(Number0) end node_cache[:number][start_index] = r0 r0 end module RealNumber0 def unsigned_number1 elements[0] end def unsigned_number2 elements[2] end end module RealNumber1 def unsigned_number elements[1] end end module RealNumber2 def unsigned_number1 elements[0] end def exp elements[2] end def unsigned_number2 elements[4] end end module RealNumber3 def to_ast n :real_number, *elements_to_ast end end def _nt_real_number start_index = index if node_cache[:real_number].has_key?(index) cached = node_cache[:real_number][index] if cached node_cache[:real_number][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_unsigned_number s1 << r2 if r2 if (match_len = has_terminal?(".", false, index)) r3 = true @index += match_len else terminal_parse_failure('"."') r3 = nil end s1 << r3 if r3 r4 = _nt_unsigned_number s1 << r4 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(RealNumber0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(RealNumber3) r0.extend(RealNumber3) else i5, s5 = index, [] r6 = _nt_unsigned_number s5 << r6 if r6 i8, s8 = index, [] if (match_len = has_terminal?(".", false, index)) r9 = true @index += match_len else terminal_parse_failure('"."') r9 = nil end s8 << r9 if r9 r10 = _nt_unsigned_number s8 << r10 end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(RealNumber1) else @index = i8 r8 = nil end if r8 r7 = r8 else r7 = instantiate_node(SyntaxNode,input, index...index) end s5 << r7 if r7 r11 = _nt_exp s5 << r11 if r11 r13 = _nt_sign if r13 r12 = r13 else r12 = instantiate_node(SyntaxNode,input, index...index) end s5 << r12 if r12 r14 = _nt_unsigned_number s5 << r14 end end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(RealNumber2) else @index = i5 r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r0 = r5 r0.extend(RealNumber3) r0.extend(RealNumber3) else @index = i0 r0 = nil end end node_cache[:real_number][start_index] = r0 r0 end module Exp0 def to_ast "exp" end end def _nt_exp start_index = index if node_cache[:exp].has_key?(index) cached = node_cache[:exp][index] if cached node_cache[:exp][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?("e", false, index)) r1 = true @index += match_len else terminal_parse_failure('"e"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(Exp0) r0.extend(Exp0) else if (match_len = has_terminal?("E", false, index)) r2 = true @index += match_len else terminal_parse_failure('"E"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(Exp0) r0.extend(Exp0) else @index = i0 r0 = nil end end node_cache[:exp][start_index] = r0 r0 end module DecimalNumber0 def decimal_base elements[1] end def s elements[2] end def unsigned_number elements[3] end end module DecimalNumber1 def decimal_base elements[1] end def s elements[2] end def x_digit elements[3] end end module DecimalNumber2 def decimal_base elements[1] end def s elements[2] end def z_digit elements[3] end end module DecimalNumber3 def to_ast n :decimal_number, *elements_to_ast end end def _nt_decimal_number start_index = index if node_cache[:decimal_number].has_key?(index) cached = node_cache[:decimal_number][index] if cached node_cache[:decimal_number][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do i1 = index i2, s2 = index, [] r4 = _nt_size if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s2 << r3 if r3 r5 = _nt_decimal_base s2 << r5 if r5 r6 = _nt_s s2 << r6 if r6 r7 = _nt_unsigned_number s2 << r7 end end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(DecimalNumber0) else @index = i2 r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r1 = r2 else i8, s8 = index, [] r10 = _nt_size if r10 r9 = r10 else r9 = instantiate_node(SyntaxNode,input, index...index) end s8 << r9 if r9 r11 = _nt_decimal_base s8 << r11 if r11 r12 = _nt_s s8 << r12 if r12 r13 = _nt_x_digit s8 << r13 if r13 s14, i14 = [], index loop do r15 = _nt__ if r15 s14 << r15 else break end end r14 = instantiate_node(SyntaxNode,input, i14...index, s14) s8 << r14 end end end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(DecimalNumber1) else @index = i8 r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r1 = r8 else i16, s16 = index, [] r18 = _nt_size if r18 r17 = r18 else r17 = instantiate_node(SyntaxNode,input, index...index) end s16 << r17 if r17 r19 = _nt_decimal_base s16 << r19 if r19 r20 = _nt_s s16 << r20 if r20 r21 = _nt_z_digit s16 << r21 if r21 s22, i22 = [], index loop do r23 = _nt__ if r23 s22 << r23 else break end end r22 = instantiate_node(SyntaxNode,input, i22...index, s22) s16 << r22 end end end end if s16.last r16 = instantiate_node(SyntaxNode,input, i16...index, s16) r16.extend(DecimalNumber2) else @index = i16 r16 = nil end if r16 r16 = SyntaxNode.new(input, (index-1)...index) if r16 == true r1 = r16 else r24 = _nt_unsigned_number if r24 r24 = SyntaxNode.new(input, (index-1)...index) if r24 == true r1 = r24 else @index = i1 r1 = nil end end end end if r1 s0 << r1 else break end if s0.size == 1 break end end if s0.size < 1 @index = i0 r0 = nil else if s0.size < 1 @terminal_failures.pop end r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(DecimalNumber3) r0.extend(DecimalNumber3) end node_cache[:decimal_number][start_index] = r0 r0 end module BinaryNumber0 def binary_base elements[1] end def s elements[2] end def binary_value elements[3] end end module BinaryNumber1 def to_ast n :binary_number, *elements_to_ast end end def _nt_binary_number start_index = index if node_cache[:binary_number].has_key?(index) cached = node_cache[:binary_number][index] if cached node_cache[:binary_number][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_size if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_binary_base s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_binary_value s0 << r5 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(BinaryNumber0) r0.extend(BinaryNumber1) else @index = i0 r0 = nil end node_cache[:binary_number][start_index] = r0 r0 end module OctalNumber0 def octal_base elements[1] end def s elements[2] end def octal_value elements[3] end end module OctalNumber1 def to_ast n :octal_number, *elements_to_ast end end def _nt_octal_number start_index = index if node_cache[:octal_number].has_key?(index) cached = node_cache[:octal_number][index] if cached node_cache[:octal_number][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_size if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_octal_base s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_octal_value s0 << r5 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(OctalNumber0) r0.extend(OctalNumber1) else @index = i0 r0 = nil end node_cache[:octal_number][start_index] = r0 r0 end module HexNumber0 def hex_base elements[1] end def s elements[2] end def hex_value elements[3] end end module HexNumber1 def to_ast n :hex_number, *elements_to_ast end end def _nt_hex_number start_index = index if node_cache[:hex_number].has_key?(index) cached = node_cache[:hex_number][index] if cached node_cache[:hex_number][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r2 = _nt_size if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 r3 = _nt_hex_base s0 << r3 if r3 r4 = _nt_s s0 << r4 if r4 r5 = _nt_hex_value s0 << r5 end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(HexNumber0) r0.extend(HexNumber1) else @index = i0 r0 = nil end node_cache[:hex_number][start_index] = r0 r0 end module Sign0 def to_ast n :sign, text_value end end def _nt_sign start_index = index if node_cache[:sign].has_key?(index) cached = node_cache[:sign][index] if cached node_cache[:sign][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 r0.extend(Sign0) r0.extend(Sign0) 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 r0.extend(Sign0) r0.extend(Sign0) else @index = i0 r0 = nil end end node_cache[:sign][start_index] = r0 r0 end module Size0 def to_ast n :size, elements_to_ast.join.to_i end end def _nt_size start_index = index if node_cache[:size].has_key?(index) cached = node_cache[:size][index] if cached node_cache[:size][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_non_zero_unsigned_number r0.extend(Size0) r0.extend(Size0) node_cache[:size][start_index] = r0 r0 end module NonZeroUnsignedNumber0 def non_zero_decimal_digit elements[0] end end module NonZeroUnsignedNumber1 def to_ast elements_to_ast.join.to_i end end def _nt_non_zero_unsigned_number start_index = index if node_cache[:non_zero_unsigned_number].has_key?(index) cached = node_cache[:non_zero_unsigned_number][index] if cached node_cache[:non_zero_unsigned_number][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_non_zero_decimal_digit s0 << r1 if r1 s2, i2 = [], index loop do i3 = index if (match_len = has_terminal?("_", false, index)) r4 = true @index += match_len else terminal_parse_failure('"_"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r3 = r4 else r5 = _nt_decimal_digit if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r3 = r5 else @index = i3 r3 = nil end 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(NonZeroUnsignedNumber0) r0.extend(NonZeroUnsignedNumber1) else @index = i0 r0 = nil end node_cache[:non_zero_unsigned_number][start_index] = r0 r0 end module UnsignedNumber0 def decimal_digit elements[0] end end module UnsignedNumber1 def to_ast elements_to_ast.join.to_i end end def _nt_unsigned_number start_index = index if node_cache[:unsigned_number].has_key?(index) cached = node_cache[:unsigned_number][index] if cached node_cache[:unsigned_number][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_decimal_digit s0 << r1 if r1 s2, i2 = [], index loop do i3 = index if (match_len = has_terminal?("_", false, index)) r4 = true @index += match_len else terminal_parse_failure('"_"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r3 = r4 else r5 = _nt_decimal_digit if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r3 = r5 else @index = i3 r3 = nil end 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(UnsignedNumber0) r0.extend(UnsignedNumber1) else @index = i0 r0 = nil end node_cache[:unsigned_number][start_index] = r0 r0 end module BinaryValue0 def binary_digit elements[0] end end module BinaryValue1 def to_ast elements_to_ast.join end end def _nt_binary_value start_index = index if node_cache[:binary_value].has_key?(index) cached = node_cache[:binary_value][index] if cached node_cache[:binary_value][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_binary_digit s0 << r1 if r1 s2, i2 = [], index loop do i3 = index if (match_len = has_terminal?("_", false, index)) r4 = true @index += match_len else terminal_parse_failure('"_"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r3 = r4 else r5 = _nt_binary_digit if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r3 = r5 else @index = i3 r3 = nil end 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(BinaryValue0) r0.extend(BinaryValue1) else @index = i0 r0 = nil end node_cache[:binary_value][start_index] = r0 r0 end module OctalValue0 def octal_digit elements[0] end end module OctalValue1 def to_ast elements_to_ast.join end end def _nt_octal_value start_index = index if node_cache[:octal_value].has_key?(index) cached = node_cache[:octal_value][index] if cached node_cache[:octal_value][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_octal_digit s0 << r1 if r1 s2, i2 = [], index loop do i3 = index if (match_len = has_terminal?("_", false, index)) r4 = true @index += match_len else terminal_parse_failure('"_"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r3 = r4 else r5 = _nt_octal_digit if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r3 = r5 else @index = i3 r3 = nil end 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(OctalValue0) r0.extend(OctalValue1) else @index = i0 r0 = nil end node_cache[:octal_value][start_index] = r0 r0 end module HexValue0 def hex_digit elements[0] end end module HexValue1 def to_ast elements_to_ast.join end end def _nt_hex_value start_index = index if node_cache[:hex_value].has_key?(index) cached = node_cache[:hex_value][index] if cached node_cache[:hex_value][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_hex_digit s0 << r1 if r1 s2, i2 = [], index loop do i3 = index if (match_len = has_terminal?("_", false, index)) r4 = true @index += match_len else terminal_parse_failure('"_"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r3 = r4 else r5 = _nt_hex_digit if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r3 = r5 else @index = i3 r3 = nil end 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(HexValue0) r0.extend(HexValue1) else @index = i0 r0 = nil end node_cache[:hex_value][start_index] = r0 r0 end module DecimalBase0 end module DecimalBase1 end def _nt_decimal_base start_index = index if node_cache[:decimal_base].has_key?(index) cached = node_cache[:decimal_base][index] if cached node_cache[:decimal_base][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 i4 = index if (match_len = has_terminal?("s", false, index)) r5 = true @index += match_len else terminal_parse_failure('"s"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r4 = r5 else if (match_len = has_terminal?("S", false, index)) r6 = true @index += match_len else terminal_parse_failure('"S"') 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 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 if r3 if (match_len = has_terminal?("d", false, index)) r7 = true @index += match_len else terminal_parse_failure('"d"') r7 = nil end s1 << r7 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(DecimalBase0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i8, s8 = index, [] if (match_len = has_terminal?("'", false, index)) r9 = true @index += match_len else terminal_parse_failure('"\'"') r9 = nil end s8 << r9 if r9 i11 = index if (match_len = has_terminal?("s", false, index)) r12 = true @index += match_len else terminal_parse_failure('"s"') r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r11 = r12 else if (match_len = has_terminal?("S", false, index)) r13 = true @index += match_len else terminal_parse_failure('"S"') r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r11 = r13 else @index = i11 r11 = nil end end if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s8 << r10 if r10 if (match_len = has_terminal?("D", false, index)) r14 = true @index += match_len else terminal_parse_failure('"D"') r14 = nil end s8 << r14 end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(DecimalBase1) else @index = i8 r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else @index = i0 r0 = nil end end node_cache[:decimal_base][start_index] = r0 r0 end module BinaryBase0 end module BinaryBase1 end def _nt_binary_base start_index = index if node_cache[:binary_base].has_key?(index) cached = node_cache[:binary_base][index] if cached node_cache[:binary_base][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 i4 = index if (match_len = has_terminal?("s", false, index)) r5 = true @index += match_len else terminal_parse_failure('"s"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r4 = r5 else if (match_len = has_terminal?("S", false, index)) r6 = true @index += match_len else terminal_parse_failure('"S"') 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 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 if r3 if (match_len = has_terminal?("b", false, index)) r7 = true @index += match_len else terminal_parse_failure('"b"') r7 = nil end s1 << r7 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(BinaryBase0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i8, s8 = index, [] if (match_len = has_terminal?("'", false, index)) r9 = true @index += match_len else terminal_parse_failure('"\'"') r9 = nil end s8 << r9 if r9 i11 = index if (match_len = has_terminal?("s", false, index)) r12 = true @index += match_len else terminal_parse_failure('"s"') r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r11 = r12 else if (match_len = has_terminal?("S", false, index)) r13 = true @index += match_len else terminal_parse_failure('"S"') r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r11 = r13 else @index = i11 r11 = nil end end if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s8 << r10 if r10 if (match_len = has_terminal?("B", false, index)) r14 = true @index += match_len else terminal_parse_failure('"B"') r14 = nil end s8 << r14 end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(BinaryBase1) else @index = i8 r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else @index = i0 r0 = nil end end node_cache[:binary_base][start_index] = r0 r0 end module OctalBase0 end module OctalBase1 end def _nt_octal_base start_index = index if node_cache[:octal_base].has_key?(index) cached = node_cache[:octal_base][index] if cached node_cache[:octal_base][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 i4 = index if (match_len = has_terminal?("s", false, index)) r5 = true @index += match_len else terminal_parse_failure('"s"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r4 = r5 else if (match_len = has_terminal?("S", false, index)) r6 = true @index += match_len else terminal_parse_failure('"S"') 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 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 if r3 if (match_len = has_terminal?("o", false, index)) r7 = true @index += match_len else terminal_parse_failure('"o"') r7 = nil end s1 << r7 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(OctalBase0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i8, s8 = index, [] if (match_len = has_terminal?("'", false, index)) r9 = true @index += match_len else terminal_parse_failure('"\'"') r9 = nil end s8 << r9 if r9 i11 = index if (match_len = has_terminal?("s", false, index)) r12 = true @index += match_len else terminal_parse_failure('"s"') r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r11 = r12 else if (match_len = has_terminal?("S", false, index)) r13 = true @index += match_len else terminal_parse_failure('"S"') r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r11 = r13 else @index = i11 r11 = nil end end if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s8 << r10 if r10 if (match_len = has_terminal?("O", false, index)) r14 = true @index += match_len else terminal_parse_failure('"O"') r14 = nil end s8 << r14 end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(OctalBase1) else @index = i8 r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else @index = i0 r0 = nil end end node_cache[:octal_base][start_index] = r0 r0 end module HexBase0 end module HexBase1 end def _nt_hex_base start_index = index if node_cache[:hex_base].has_key?(index) cached = node_cache[:hex_base][index] if cached node_cache[:hex_base][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 i4 = index if (match_len = has_terminal?("s", false, index)) r5 = true @index += match_len else terminal_parse_failure('"s"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r4 = r5 else if (match_len = has_terminal?("S", false, index)) r6 = true @index += match_len else terminal_parse_failure('"S"') 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 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s1 << r3 if r3 if (match_len = has_terminal?("h", false, index)) r7 = true @index += match_len else terminal_parse_failure('"h"') r7 = nil end s1 << r7 end end if s1.last r1 = instantiate_node(SyntaxNode,input, i1...index, s1) r1.extend(HexBase0) else @index = i1 r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else i8, s8 = index, [] if (match_len = has_terminal?("'", false, index)) r9 = true @index += match_len else terminal_parse_failure('"\'"') r9 = nil end s8 << r9 if r9 i11 = index if (match_len = has_terminal?("s", false, index)) r12 = true @index += match_len else terminal_parse_failure('"s"') r12 = nil end if r12 r12 = SyntaxNode.new(input, (index-1)...index) if r12 == true r11 = r12 else if (match_len = has_terminal?("S", false, index)) r13 = true @index += match_len else terminal_parse_failure('"S"') r13 = nil end if r13 r13 = SyntaxNode.new(input, (index-1)...index) if r13 == true r11 = r13 else @index = i11 r11 = nil end end if r11 r10 = r11 else r10 = instantiate_node(SyntaxNode,input, index...index) end s8 << r10 if r10 if (match_len = has_terminal?("H", false, index)) r14 = true @index += match_len else terminal_parse_failure('"H"') r14 = nil end s8 << r14 end end if s8.last r8 = instantiate_node(SyntaxNode,input, i8...index, s8) r8.extend(HexBase1) else @index = i8 r8 = nil end if r8 r8 = SyntaxNode.new(input, (index-1)...index) if r8 == true r0 = r8 else @index = i0 r0 = nil end end node_cache[:hex_base][start_index] = r0 r0 end module NonZeroDecimalDigit0 def to_ast text_value end end def _nt_non_zero_decimal_digit start_index = index if node_cache[:non_zero_decimal_digit].has_key?(index) cached = node_cache[:non_zero_decimal_digit][index] if cached node_cache[:non_zero_decimal_digit][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?(@regexps[gr = '\A[1-9]'] ||= Regexp.new(gr), :regexp, index) r0 = instantiate_node(SyntaxNode,input, index...(index + 1)) r0.extend(NonZeroDecimalDigit0) r0.extend(NonZeroDecimalDigit0) @index += 1 else terminal_parse_failure('[1-9]') r0 = nil end node_cache[:non_zero_decimal_digit][start_index] = r0 r0 end module DecimalDigit0 def to_ast text_value end end def _nt_decimal_digit start_index = index if node_cache[:decimal_digit].has_key?(index) cached = node_cache[:decimal_digit][index] if cached node_cache[:decimal_digit][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end if has_terminal?(@regexps[gr = '\A[0-9]'] ||= Regexp.new(gr), :regexp, index) r0 = instantiate_node(SyntaxNode,input, index...(index + 1)) r0.extend(DecimalDigit0) r0.extend(DecimalDigit0) @index += 1 else terminal_parse_failure('[0-9]') r0 = nil end node_cache[:decimal_digit][start_index] = r0 r0 end module BinaryDigit0 def to_ast text_value end end def _nt_binary_digit start_index = index if node_cache[:binary_digit].has_key?(index) cached = node_cache[:binary_digit][index] if cached node_cache[:binary_digit][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_x_digit if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(BinaryDigit0) r0.extend(BinaryDigit0) else r2 = _nt_z_digit if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(BinaryDigit0) r0.extend(BinaryDigit0) else if (match_len = has_terminal?("0", false, index)) r3 = true @index += match_len else terminal_parse_failure('"0"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(BinaryDigit0) r0.extend(BinaryDigit0) else if (match_len = has_terminal?("1", false, index)) r4 = true @index += match_len else terminal_parse_failure('"1"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r0 = r4 r0.extend(BinaryDigit0) r0.extend(BinaryDigit0) else @index = i0 r0 = nil end end end end node_cache[:binary_digit][start_index] = r0 r0 end module OctalDigit0 def to_ast text_value end end def _nt_octal_digit start_index = index if node_cache[:octal_digit].has_key?(index) cached = node_cache[:octal_digit][index] if cached node_cache[:octal_digit][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_x_digit if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(OctalDigit0) r0.extend(OctalDigit0) else r2 = _nt_z_digit if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(OctalDigit0) r0.extend(OctalDigit0) else if has_terminal?(@regexps[gr = '\A[0-7]'] ||= Regexp.new(gr), :regexp, index) r3 = true @index += 1 else terminal_parse_failure('[0-7]') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(OctalDigit0) r0.extend(OctalDigit0) else @index = i0 r0 = nil end end end node_cache[:octal_digit][start_index] = r0 r0 end module HexDigit0 def to_ast text_value.upcase end end def _nt_hex_digit start_index = index if node_cache[:hex_digit].has_key?(index) cached = node_cache[:hex_digit][index] if cached node_cache[:hex_digit][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_x_digit if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(HexDigit0) r0.extend(HexDigit0) else r2 = _nt_z_digit if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(HexDigit0) r0.extend(HexDigit0) else if has_terminal?(@regexps[gr = '\A[0-9a-fA-F]'] ||= Regexp.new(gr), :regexp, index) r3 = true @index += 1 else terminal_parse_failure('[0-9a-fA-F]') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(HexDigit0) r0.extend(HexDigit0) else @index = i0 r0 = nil end end end node_cache[:hex_digit][start_index] = r0 r0 end module XDigit0 def to_ast "X" end end def _nt_x_digit start_index = index if node_cache[:x_digit].has_key?(index) cached = node_cache[:x_digit][index] if cached node_cache[:x_digit][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?("x", false, index)) r1 = true @index += match_len else terminal_parse_failure('"x"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(XDigit0) r0.extend(XDigit0) else if (match_len = has_terminal?("X", false, index)) r2 = true @index += match_len else terminal_parse_failure('"X"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(XDigit0) r0.extend(XDigit0) else @index = i0 r0 = nil end end node_cache[:x_digit][start_index] = r0 r0 end module ZDigit0 def to_ast "Z" end end def _nt_z_digit start_index = index if node_cache[:z_digit].has_key?(index) cached = node_cache[:z_digit][index] if cached node_cache[:z_digit][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?("z", false, index)) r1 = true @index += match_len else terminal_parse_failure('"z"') r1 = nil end if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 r0.extend(ZDigit0) r0.extend(ZDigit0) else if (match_len = has_terminal?("Z", false, index)) r2 = true @index += match_len else terminal_parse_failure('"Z"') r2 = nil end if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 r0.extend(ZDigit0) r0.extend(ZDigit0) else if (match_len = has_terminal?("?", false, index)) r3 = true @index += match_len else terminal_parse_failure('"?"') r3 = nil end if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r0 = r3 r0.extend(ZDigit0) r0.extend(ZDigit0) else @index = i0 r0 = nil end end end node_cache[:z_digit][start_index] = r0 r0 end module String0 end module String1 def val elements[1] end end module String2 def to_ast val.text_value end 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, s0 = index, [] if (match_len = has_terminal?('"', false, index)) r1 = true @index += match_len else terminal_parse_failure('\'"\'') r1 = nil end s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] i4 = index if (match_len = has_terminal?('"', false, index)) r5 = true @index += match_len else terminal_parse_failure('\'"\'') r5 = nil end if r5 @index = i4 r4 = nil terminal_parse_failure('\'"\'', true) else @terminal_failures.pop @index = i4 r4 = instantiate_node(SyntaxNode,input, index...index) end s3 << r4 if r4 i6 = index r7 = _nt_N if r7 @index = i6 r6 = nil else @index = i6 r6 = instantiate_node(SyntaxNode,input, index...index) end s3 << r6 if r6 if index < input_length r8 = true @index += 1 else terminal_parse_failure("any character") r8 = nil end s3 << r8 end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(String0) else @index = i3 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)) r9 = true @index += match_len else terminal_parse_failure('\'"\'') r9 = nil end s0 << r9 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(String1) r0.extend(String2) else @index = i0 r0 = nil end node_cache[:string][start_index] = r0 r0 end module AttributeInstance0 def s1 elements[0] end def s2 elements[2] end def attr_spec elements[3] end end module AttributeInstance1 def s1 elements[1] end def attr_spec elements[2] end def s2 elements[4] end end module AttributeInstance2 def to_ast n :attribute_instance, *elements_to_ast end end def _nt_attribute_instance start_index = index if node_cache[:attribute_instance].has_key?(index) cached = node_cache[:attribute_instance][index] if cached node_cache[:attribute_instance][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = 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 s0 << r1 if r1 r2 = _nt_s s0 << r2 if r2 r3 = _nt_attr_spec s0 << r3 if r3 s4, i4 = [], index loop do i5, s5 = index, [] r6 = _nt_s s5 << r6 if r6 if (match_len = has_terminal?(',', false, index)) r7 = true @index += match_len else terminal_parse_failure('\',\'') r7 = nil end s5 << r7 if r7 r8 = _nt_s s5 << r8 if r8 r9 = _nt_attr_spec s5 << r9 end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(AttributeInstance0) else @index = i5 r5 = nil end if r5 s4 << r5 else break end end r4 = instantiate_node(SyntaxNode,input, i4...index, s4) s0 << r4 if r4 r10 = _nt_s s0 << r10 if r10 if (match_len = has_terminal?("*)", false, index)) r11 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"*)"') r11 = nil end s0 << r11 end end end end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(AttributeInstance1) r0.extend(AttributeInstance2) else @index = i0 r0 = nil end node_cache[:attribute_instance][start_index] = r0 r0 end module AttrSpec0 def s1 elements[0] end def s2 elements[2] end def constant_expression elements[3] end end module AttrSpec1 def attr_name elements[0] end end module AttrSpec2 def to_ast n :attr_spec, *elements_to_ast end end def _nt_attr_spec start_index = index if node_cache[:attr_spec].has_key?(index) cached = node_cache[:attr_spec][index] if cached node_cache[:attr_spec][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] r1 = _nt_attr_name s0 << r1 if r1 i3, s3 = index, [] r4 = _nt_s s3 << r4 if r4 if (match_len = has_terminal?("=", false, index)) r5 = true @index += match_len else terminal_parse_failure('"="') r5 = nil end s3 << r5 if r5 r6 = _nt_s s3 << r6 if r6 r7 = _nt_constant_expression s3 << r7 end end end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(AttrSpec0) 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(SyntaxNode,input, i0...index, s0) r0.extend(AttrSpec1) r0.extend(AttrSpec2) else @index = i0 r0 = nil end node_cache[:attr_spec][start_index] = r0 r0 end def _nt_attr_name start_index = index if node_cache[:attr_name].has_key?(index) cached = node_cache[:attr_name][index] if cached node_cache[:attr_name][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:attr_name][start_index] = r0 r0 end def _nt_comment start_index = index if node_cache[:comment].has_key?(index) cached = node_cache[:comment][index] if cached node_cache[:comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0 = index r1 = _nt_one_line_comment if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_block_comment if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:comment][start_index] = r0 r0 end module BlockComment0 end module BlockComment1 def end_of_comment elements[2] end end module BlockComment2 #def to_ast # n :comment, text_value #end end def _nt_block_comment start_index = index if node_cache[:block_comment].has_key?(index) cached = node_cache[:block_comment][index] if cached node_cache[:block_comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = 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 s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] i4 = index r5 = _nt_end_of_comment if r5 @index = i4 r4 = nil else @index = i4 r4 = instantiate_node(SyntaxNode,input, index...index) end s3 << r4 if r4 if index < input_length r6 = true @index += 1 else terminal_parse_failure("any character") r6 = nil end s3 << r6 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(BlockComment0) else @index = i3 r3 = nil end if r3 s2 << r3 else break end end r2 = instantiate_node(SyntaxNode,input, i2...index, s2) s0 << r2 if r2 r7 = _nt_end_of_comment s0 << r7 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(BlockComment1) r0.extend(BlockComment2) else @index = i0 r0 = nil end node_cache[:block_comment][start_index] = r0 r0 end def _nt_end_of_comment start_index = index if node_cache[:end_of_comment].has_key?(index) cached = node_cache[:end_of_comment][index] if cached node_cache[:end_of_comment][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[:end_of_comment][start_index] = r0 r0 end module OneLineComment0 end module OneLineComment1 end module OneLineComment2 #def to_ast # n :comment, text_value #end end def _nt_one_line_comment start_index = index if node_cache[:one_line_comment].has_key?(index) cached = node_cache[:one_line_comment][index] if cached node_cache[:one_line_comment][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = 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 s0 << r1 if r1 s2, i2 = [], index loop do i3, s3 = index, [] i4 = index r5 = _nt_N if r5 @index = i4 r4 = nil else @index = i4 r4 = instantiate_node(SyntaxNode,input, index...index) end s3 << r4 if r4 if index < input_length r6 = true @index += 1 else terminal_parse_failure("any character") r6 = nil end s3 << r6 end if s3.last r3 = instantiate_node(SyntaxNode,input, i3...index, s3) r3.extend(OneLineComment0) else @index = i3 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(OneLineComment1) r0.extend(OneLineComment2) else @index = i0 r0 = nil end node_cache[:one_line_comment][start_index] = r0 r0 end def _nt_block_identifier start_index = index if node_cache[:block_identifier].has_key?(index) cached = node_cache[:block_identifier][index] if cached node_cache[:block_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:block_identifier][start_index] = r0 r0 end def _nt_cell_identifier start_index = index if node_cache[:cell_identifier].has_key?(index) cached = node_cache[:cell_identifier][index] if cached node_cache[:cell_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:cell_identifier][start_index] = r0 r0 end def _nt_config_identifier start_index = index if node_cache[:config_identifier].has_key?(index) cached = node_cache[:config_identifier][index] if cached node_cache[:config_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:config_identifier][start_index] = r0 r0 end module EscapedIdentifier0 def S elements[2] end end def _nt_escaped_identifier start_index = index if node_cache[:escaped_identifier].has_key?(index) cached = node_cache[:escaped_identifier][index] if cached node_cache[:escaped_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("\\", false, index)) r1 = true @index += match_len else terminal_parse_failure('"\\\\"') r1 = nil end s0 << r1 if r1 i2 = index r3 = _nt_S if r3 @index = i2 r2 = nil else @index = i2 r2 = instantiate_node(SyntaxNode,input, index...index) end s0 << r2 if r2 r4 = _nt_S s0 << r4 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(EscapedIdentifier0) else @index = i0 r0 = nil end node_cache[:escaped_identifier][start_index] = r0 r0 end def _nt_event_identifier start_index = index if node_cache[:event_identifier].has_key?(index) cached = node_cache[:event_identifier][index] if cached node_cache[:event_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:event_identifier][start_index] = r0 r0 end def _nt_function_identifier start_index = index if node_cache[:function_identifier].has_key?(index) cached = node_cache[:function_identifier][index] if cached node_cache[:function_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:function_identifier][start_index] = r0 r0 end def _nt_gate_instance_identifier start_index = index if node_cache[:gate_instance_identifier].has_key?(index) cached = node_cache[:gate_instance_identifier][index] if cached node_cache[:gate_instance_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:gate_instance_identifier][start_index] = r0 r0 end def _nt_generate_block_identifier start_index = index if node_cache[:generate_block_identifier].has_key?(index) cached = node_cache[:generate_block_identifier][index] if cached node_cache[:generate_block_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:generate_block_identifier][start_index] = r0 r0 end def _nt_genvar_identifier start_index = index if node_cache[:genvar_identifier].has_key?(index) cached = node_cache[:genvar_identifier][index] if cached node_cache[:genvar_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:genvar_identifier][start_index] = r0 r0 end def _nt_hierarchical_block_identifier start_index = index if node_cache[:hierarchical_block_identifier].has_key?(index) cached = node_cache[:hierarchical_block_identifier][index] if cached node_cache[:hierarchical_block_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_hierarchical_identifier node_cache[:hierarchical_block_identifier][start_index] = r0 r0 end def _nt_hierarchical_event_identifier start_index = index if node_cache[:hierarchical_event_identifier].has_key?(index) cached = node_cache[:hierarchical_event_identifier][index] if cached node_cache[:hierarchical_event_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_hierarchical_identifier node_cache[:hierarchical_event_identifier][start_index] = r0 r0 end def _nt_hierarchical_function_identifier start_index = index if node_cache[:hierarchical_function_identifier].has_key?(index) cached = node_cache[:hierarchical_function_identifier][index] if cached node_cache[:hierarchical_function_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_hierarchical_identifier node_cache[:hierarchical_function_identifier][start_index] = r0 r0 end module HierarchicalIdentifier0 def s1 elements[1] end def constant_expression elements[2] end def s2 elements[3] end end module HierarchicalIdentifier1 def identifier elements[0] end end module HierarchicalIdentifier2 def identifier elements[1] end end def _nt_hierarchical_identifier start_index = index if node_cache[:hierarchical_identifier].has_key?(index) cached = node_cache[:hierarchical_identifier][index] if cached node_cache[:hierarchical_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] s1, i1 = [], index loop do i2, s2 = index, [] r3 = _nt_identifier s2 << r3 if r3 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 r7 = _nt_s s5 << r7 if r7 r8 = _nt_constant_expression s5 << r8 if r8 r9 = _nt_s s5 << r9 if r9 if (match_len = has_terminal?("]", false, index)) r10 = true @index += match_len else terminal_parse_failure('"]"') r10 = nil end s5 << r10 end end end end if s5.last r5 = instantiate_node(SyntaxNode,input, i5...index, s5) r5.extend(HierarchicalIdentifier0) else @index = i5 r5 = nil end if r5 r4 = r5 else r4 = instantiate_node(SyntaxNode,input, index...index) end s2 << r4 if r4 if (match_len = has_terminal?(".", false, index)) r11 = true @index += match_len else terminal_parse_failure('"."') r11 = nil end s2 << r11 end end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(HierarchicalIdentifier1) else @index = i2 r2 = nil end if r2 s1 << r2 else break end end r1 = instantiate_node(SyntaxNode,input, i1...index, s1) s0 << r1 if r1 r12 = _nt_identifier s0 << r12 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(HierarchicalIdentifier2) else @index = i0 r0 = nil end node_cache[:hierarchical_identifier][start_index] = r0 r0 end def _nt_hierarchical_net_identifier start_index = index if node_cache[:hierarchical_net_identifier].has_key?(index) cached = node_cache[:hierarchical_net_identifier][index] if cached node_cache[:hierarchical_net_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_hierarchical_identifier node_cache[:hierarchical_net_identifier][start_index] = r0 r0 end def _nt_hierarchical_parameter_identifier start_index = index if node_cache[:hierarchical_parameter_identifier].has_key?(index) cached = node_cache[:hierarchical_parameter_identifier][index] if cached node_cache[:hierarchical_parameter_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_hierarchical_identifier node_cache[:hierarchical_parameter_identifier][start_index] = r0 r0 end def _nt_hierarchical_variable_identifier start_index = index if node_cache[:hierarchical_variable_identifier].has_key?(index) cached = node_cache[:hierarchical_variable_identifier][index] if cached node_cache[:hierarchical_variable_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_hierarchical_identifier node_cache[:hierarchical_variable_identifier][start_index] = r0 r0 end def _nt_hierarchical_task_identifier start_index = index if node_cache[:hierarchical_task_identifier].has_key?(index) cached = node_cache[:hierarchical_task_identifier][index] if cached node_cache[:hierarchical_task_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_hierarchical_identifier node_cache[:hierarchical_task_identifier][start_index] = r0 r0 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 = index r1 = _nt_simple_identifier if r1 r1 = SyntaxNode.new(input, (index-1)...index) if r1 == true r0 = r1 else r2 = _nt_escaped_identifier if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r0 = r2 else @index = i0 r0 = nil end end node_cache[:identifier][start_index] = r0 r0 end def _nt_inout_port_identifier start_index = index if node_cache[:inout_port_identifier].has_key?(index) cached = node_cache[:inout_port_identifier][index] if cached node_cache[:inout_port_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:inout_port_identifier][start_index] = r0 r0 end def _nt_input_port_identifier start_index = index if node_cache[:input_port_identifier].has_key?(index) cached = node_cache[:input_port_identifier][index] if cached node_cache[:input_port_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:input_port_identifier][start_index] = r0 r0 end def _nt_instance_identifier start_index = index if node_cache[:instance_identifier].has_key?(index) cached = node_cache[:instance_identifier][index] if cached node_cache[:instance_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:instance_identifier][start_index] = r0 r0 end def _nt_library_identifier start_index = index if node_cache[:library_identifier].has_key?(index) cached = node_cache[:library_identifier][index] if cached node_cache[:library_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:library_identifier][start_index] = r0 r0 end def _nt_module_identifier start_index = index if node_cache[:module_identifier].has_key?(index) cached = node_cache[:module_identifier][index] if cached node_cache[:module_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:module_identifier][start_index] = r0 r0 end def _nt_module_instance_identifier start_index = index if node_cache[:module_instance_identifier].has_key?(index) cached = node_cache[:module_instance_identifier][index] if cached node_cache[:module_instance_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:module_instance_identifier][start_index] = r0 r0 end def _nt_net_identifier start_index = index if node_cache[:net_identifier].has_key?(index) cached = node_cache[:net_identifier][index] if cached node_cache[:net_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:net_identifier][start_index] = r0 r0 end def _nt_output_port_identifier start_index = index if node_cache[:output_port_identifier].has_key?(index) cached = node_cache[:output_port_identifier][index] if cached node_cache[:output_port_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:output_port_identifier][start_index] = r0 r0 end module ParameterIdentifier0 def to_ast n :parameter_identifier, text_value end end def _nt_parameter_identifier start_index = index if node_cache[:parameter_identifier].has_key?(index) cached = node_cache[:parameter_identifier][index] if cached node_cache[:parameter_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier r0.extend(ParameterIdentifier0) r0.extend(ParameterIdentifier0) node_cache[:parameter_identifier][start_index] = r0 r0 end def _nt_port_identifier start_index = index if node_cache[:port_identifier].has_key?(index) cached = node_cache[:port_identifier][index] if cached node_cache[:port_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:port_identifier][start_index] = r0 r0 end def _nt_real_identifier start_index = index if node_cache[:real_identifier].has_key?(index) cached = node_cache[:real_identifier][index] if cached node_cache[:real_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:real_identifier][start_index] = r0 r0 end module SimpleIdentifier0 end module SimpleIdentifier1 end module SimpleIdentifier2 def to_ast text_value end end def _nt_simple_identifier start_index = index if node_cache[:simple_identifier].has_key?(index) cached = node_cache[:simple_identifier][index] if cached node_cache[:simple_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] i1 = index i2, s2 = index, [] i3 = index if (match_len = has_terminal?("input", false, index)) r4 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"input"') r4 = nil end if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r3 = r4 else if (match_len = has_terminal?("output", false, index)) r5 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"output"') r5 = nil end if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r3 = r5 else if (match_len = has_terminal?("inout", false, index)) r6 = instantiate_node(SyntaxNode,input, index...(index + match_len)) @index += match_len else terminal_parse_failure('"inout"') r6 = nil end if r6 r6 = SyntaxNode.new(input, (index-1)...index) if r6 == true r3 = r6 else @index = i3 r3 = nil end end end s2 << r3 if r3 i7 = index if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_]'] ||= Regexp.new(gr), :regexp, index) r8 = true @index += 1 else terminal_parse_failure('[a-zA-Z0-9_]') r8 = nil end if r8 @index = i7 r7 = nil terminal_parse_failure('[a-zA-Z0-9_]', true) else @terminal_failures.pop @index = i7 r7 = instantiate_node(SyntaxNode,input, index...index) end s2 << r7 end if s2.last r2 = instantiate_node(SyntaxNode,input, i2...index, s2) r2.extend(SimpleIdentifier0) else @index = i2 r2 = nil end if r2 @index = i1 r1 = nil terminal_parse_failure("", true) else @terminal_failures.pop @index = i1 r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 if has_terminal?(@regexps[gr = '\A[a-zA-Z_]'] ||= Regexp.new(gr), :regexp, index) r9 = true @index += 1 else terminal_parse_failure('[a-zA-Z_]') r9 = nil end s0 << r9 if r9 s10, i10 = [], index loop do if has_terminal?(@regexps[gr = '\A[a-zA-Z0-9_]'] ||= Regexp.new(gr), :regexp, index) r11 = true @index += 1 else terminal_parse_failure('[a-zA-Z0-9_]') r11 = nil end if r11 s10 << r11 else break end end r10 = instantiate_node(SyntaxNode,input, i10...index, s10) s0 << r10 end end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SimpleIdentifier1) r0.extend(SimpleIdentifier2) else @index = i0 r0 = nil end node_cache[:simple_identifier][start_index] = r0 r0 end def _nt_specparam_identifier start_index = index if node_cache[:specparam_identifier].has_key?(index) cached = node_cache[:specparam_identifier][index] if cached node_cache[:specparam_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:specparam_identifier][start_index] = r0 r0 end module SystemFunctionIdentifier0 end module SystemFunctionIdentifier1 def to_ast text_value end end def _nt_system_function_identifier start_index = index if node_cache[:system_function_identifier].has_key?(index) cached = node_cache[:system_function_identifier][index] if cached node_cache[:system_function_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$", false, index)) r1 = true @index += match_len else terminal_parse_failure('"$"') 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 if s2.empty? @index = i2 r2 = nil else r2 = instantiate_node(SyntaxNode,input, i2...index, s2) end s0 << r2 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SystemFunctionIdentifier0) r0.extend(SystemFunctionIdentifier1) else @index = i0 r0 = nil end node_cache[:system_function_identifier][start_index] = r0 r0 end module SystemTaskIdentifier0 end module SystemTaskIdentifier1 def to_ast text_value end end def _nt_system_task_identifier start_index = index if node_cache[:system_task_identifier].has_key?(index) cached = node_cache[:system_task_identifier][index] if cached node_cache[:system_task_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("$", false, index)) r1 = true @index += match_len else terminal_parse_failure('"$"') 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 if s2.empty? @index = i2 r2 = nil else r2 = instantiate_node(SyntaxNode,input, i2...index, s2) end s0 << r2 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(SystemTaskIdentifier0) r0.extend(SystemTaskIdentifier1) else @index = i0 r0 = nil end node_cache[:system_task_identifier][start_index] = r0 r0 end def _nt_task_identifier start_index = index if node_cache[:task_identifier].has_key?(index) cached = node_cache[:task_identifier][index] if cached node_cache[:task_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:task_identifier][start_index] = r0 r0 end def _nt_terminal_identifier start_index = index if node_cache[:terminal_identifier].has_key?(index) cached = node_cache[:terminal_identifier][index] if cached node_cache[:terminal_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:terminal_identifier][start_index] = r0 r0 end def _nt_text_macro_identifier start_index = index if node_cache[:text_macro_identifier].has_key?(index) cached = node_cache[:text_macro_identifier][index] if cached node_cache[:text_macro_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:text_macro_identifier][start_index] = r0 r0 end def _nt_topmodule_identifier start_index = index if node_cache[:topmodule_identifier].has_key?(index) cached = node_cache[:topmodule_identifier][index] if cached node_cache[:topmodule_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:topmodule_identifier][start_index] = r0 r0 end def _nt_udp_identifier start_index = index if node_cache[:udp_identifier].has_key?(index) cached = node_cache[:udp_identifier][index] if cached node_cache[:udp_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:udp_identifier][start_index] = r0 r0 end def _nt_udp_instance_identifier start_index = index if node_cache[:udp_instance_identifier].has_key?(index) cached = node_cache[:udp_instance_identifier][index] if cached node_cache[:udp_instance_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:udp_instance_identifier][start_index] = r0 r0 end def _nt_variable_identifier start_index = index if node_cache[:variable_identifier].has_key?(index) cached = node_cache[:variable_identifier][index] if cached node_cache[:variable_identifier][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end r0 = _nt_identifier node_cache[:variable_identifier][start_index] = r0 r0 end def _nt_space start_index = index if node_cache[:space].has_key?(index) cached = node_cache[:space][index] if cached node_cache[:space][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?("\t", false, index)) r2 = true @index += match_len else terminal_parse_failure('"\\t"') 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[:space][start_index] = r0 r0 end def _nt_s start_index = index if node_cache[:s].has_key?(index) cached = node_cache[:s][index] if cached node_cache[:s][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do i1 = index r2 = _nt_space if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r1 = r2 else r3 = _nt_N if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r1 = r3 else r4 = _nt_one_line_comment if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r1 = r4 else r5 = _nt_block_comment if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r1 = r5 else @index = i1 r1 = nil end end end end if r1 s0 << r1 else break end end r0 = instantiate_node(SyntaxNode,input, i0...index, s0) node_cache[:s][start_index] = r0 r0 end module S0 #def to_ast # elements_to_ast #end end def _nt_S start_index = index if node_cache[:S].has_key?(index) cached = node_cache[:S][index] if cached node_cache[:S][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end s0, i0 = [], index loop do i1 = index r2 = _nt_space if r2 r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true r1 = r2 else r3 = _nt_N if r3 r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true r1 = r3 else r4 = _nt_one_line_comment if r4 r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true r1 = r4 else r5 = _nt_block_comment if r5 r5 = SyntaxNode.new(input, (index-1)...index) if r5 == true r1 = r5 else @index = i1 r1 = nil end end end 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) r0.extend(S0) r0.extend(S0) end node_cache[:S][start_index] = r0 r0 end module N0 end def _nt_n start_index = index if node_cache[:n].has_key?(index) cached = node_cache[:n][index] if cached node_cache[:n][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("\r", false, index)) r2 = true @index += match_len else terminal_parse_failure('"\\r"') r2 = nil end if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 if (match_len = has_terminal?("\n", false, index)) r4 = true @index += match_len else terminal_parse_failure('"\\n"') r4 = nil end if r4 r3 = r4 else r3 = instantiate_node(SyntaxNode,input, index...index) end s0 << r3 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(N0) else @index = i0 r0 = nil end node_cache[:n][start_index] = r0 r0 end module N0 end def _nt_N start_index = index if node_cache[:N].has_key?(index) cached = node_cache[:N][index] if cached node_cache[:N][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true @index = cached.interval.end end return cached end i0, s0 = index, [] if (match_len = has_terminal?("\r", false, index)) r2 = true @index += match_len else terminal_parse_failure('"\\r"') r2 = nil end if r2 r1 = r2 else r1 = instantiate_node(SyntaxNode,input, index...index) end s0 << r1 if r1 if (match_len = has_terminal?("\n", false, index)) r3 = true @index += match_len else terminal_parse_failure('"\\n"') r3 = nil end s0 << r3 end if s0.last r0 = instantiate_node(SyntaxNode,input, i0...index, s0) r0.extend(N0) else @index = i0 r0 = nil end node_cache[:N][start_index] = r0 r0 end end class GrammarParser < Treetop::Runtime::CompiledParser include Grammar end end end