# File lib/treetop/compiler/metagrammar.rb, line 2741
      def _nt_quoted_string
        start_index = index
        if node_cache[:quoted_string].has_key?(index)
          cached = node_cache[:quoted_string][index]
          if cached
            node_cache[:quoted_string][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
            @index = cached.interval.end
          end
          return cached
        end

        i0, s0 = index, []
        i1 = index
        r2 = _nt_single_quoted_string
        if r2
          r2 = SyntaxNode.new(input, (index-1)...index) if r2 == true
          r1 = r2
        else
          r3 = _nt_double_quoted_string
          if r3
            r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
            r1 = r3
          else
            @index = i1
            r1 = nil
          end
        end
        s0 << r1
        if r1
          s4, i4 = [], index
          loop do
            if has_terminal?(@regexps[gr = '\A[ir]'] ||= Regexp.new(gr), :regexp, index)
              r5 = true
              @index += 1
            else
              terminal_parse_failure('[ir]')
              r5 = nil
            end
            if r5
              s4 << r5
            else
              break
            end
          end
          r4 = instantiate_node(SyntaxNode,input, i4...index, s4)
          s0 << r4
        end
        if s0.last
          r0 = instantiate_node(Terminal,input, i0...index, s0)
          r0.extend(QuotedString0)
          r0.extend(QuotedString1)
        else
          @index = i0
          r0 = nil
        end

        node_cache[:quoted_string][start_index] = r0

        r0
      end