_nt_module_declaration (Treetop::Compiler::Metagrammar)

    # File lib/treetop/compiler/metagrammar.rb, line 264
          def _nt_module_declaration
            start_index = index
            if node_cache[:module_declaration].has_key?(index)
              cached = node_cache[:module_declaration][index]
              @index = cached.interval.end if cached
              return cached
            end

            i0, s0 = index, []
            i1, s1 = index, []
            if input.index('module', index) == index
              r2 = instantiate_node(SyntaxNode,input, index...(index + 6))
              @index += 6
            else
              terminal_parse_failure('module')
              r2 = nil
            end
            s1 << r2
            if r2
              r3 = _nt_space
              s1 << r3
              if r3
                if input.index(Regexp.new('[A-Z]'), index) == index
                  r4 = instantiate_node(SyntaxNode,input, index...(index + 1))
                  @index += 1
                else
                  r4 = nil
                end
                s1 << r4
                if r4
                  s5, i5 = [], index
                  loop do
                    r6 = _nt_alphanumeric_char
                    if r6
                      s5 << r6
                    else
                      break
                    end
                  end
                  r5 = instantiate_node(SyntaxNode,input, i5...index, s5)
                  s1 << r5
                  if r5
                    r7 = _nt_space
                    s1 << r7
                  end
                end
              end
            end
            if s1.last
              r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
              r1.extend(ModuleDeclaration0)
            else
              self.index = i1
              r1 = nil
            end
            s0 << r1
            if r1
              i8 = index
              r9 = _nt_module_declaration
              if r9
                r8 = r9
              else
                r10 = _nt_grammar
                if r10
                  r8 = r10
                else
                  self.index = i8
                  r8 = nil
                end
              end
              s0 << r8
              if r8
                i11, s11 = index, []
                r12 = _nt_space
                s11 << r12
                if r12
                  if input.index('end', index) == index
                    r13 = instantiate_node(SyntaxNode,input, index...(index + 3))
                    @index += 3
                  else
                    terminal_parse_failure('end')
                    r13 = nil
                  end
                  s11 << r13
                end
                if s11.last
                  r11 = instantiate_node(SyntaxNode,input, i11...index, s11)
                  r11.extend(ModuleDeclaration1)
                else
                  self.index = i11
                  r11 = nil
                end
                s0 << r11
              end
            end
            if s0.last
              r0 = instantiate_node(SyntaxNode,input, i0...index, s0)
              r0.extend(ModuleDeclaration2)
              r0.extend(ModuleDeclaration3)
            else
              self.index = i0
              r0 = nil
            end

            node_cache[:module_declaration][start_index] = r0

            return r0
          end