# File lib/multimethod/signature.rb, line 166
    def scan_parameters_string(str, need_names = true)
      # @verbose = true

      # Add self parameter at front.
      add_self

      $stderr.puts "scan_parameters_string(#{str.inspect})" if @verbose

      until str.empty?
        # Scan parameter
        p = Parameter.new
        p.verbose = @verbose
        str = p.scan_string(str)
        add_parameter(p)
        $stderr.puts "  params=#{parameter_to_s}" if @verbose       

        # Parse , or )
        str.sub!(/\A\s+/, '')
        if ! str.empty? 
          if md = /\A,/s.match(str)
            str = md.post_match
          elsif md = /\A\)/s.match(str)
            $stderr.puts "  DONE: #{to_s}\n  Remaining: #{str.inspect}" if @verbose
            break
          else
            raise NameError, "Syntax error in multimethod parameters: expected ',' or ')' at #{str.inspect}"
          end
        end
 
      end

      $stderr.puts "scan_parameters_string(...): DONE: #{to_s}\n  Remaining: #{str}" if @verbose

      str
    end