_nt_primary (Treetop::Compiler::Metagrammar)

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

            i0 = index
            i1, s1 = index, []
            r2 = _nt_prefix
            s1 << r2
            if r2
              r3 = _nt_atomic
              s1 << r3
            end
            if s1.last
              r1 = instantiate_node(SyntaxNode,input, i1...index, s1)
              r1.extend(Primary0)
              r1.extend(Primary1)
            else
              self.index = i1
              r1 = nil
            end
            if r1
              r0 = r1
            else
              i4, s4 = index, []
              r5 = _nt_atomic
              s4 << r5
              if r5
                r6 = _nt_suffix
                s4 << r6
                if r6
                  r7 = _nt_node_class_declarations
                  s4 << r7
                end
              end
              if s4.last
                r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
                r4.extend(Primary2)
                r4.extend(Primary3)
              else
                self.index = i4
                r4 = nil
              end
              if r4
                r0 = r4
              else
                i8, s8 = index, []
                r9 = _nt_atomic
                s8 << r9
                if r9
                  r10 = _nt_node_class_declarations
                  s8 << r10
                end
                if s8.last
                  r8 = instantiate_node(SyntaxNode,input, i8...index, s8)
                  r8.extend(Primary4)
                  r8.extend(Primary5)
                else
                  self.index = i8
                  r8 = nil
                end
                if r8
                  r0 = r8
                else
                  self.index = i0
                  r0 = nil
                end
              end
            end

            node_cache[:primary][start_index] = r0

            return r0
          end