# File lib/kwartz/main.rb, line 105
    def parse_argv(argv)
      properties = @_properties
      while !argv.empty? && argv[0][0] == ?-
        optstr = argv.shift
        optstr = optstr[1, optstr.length - 1]
        if optstr[0] == ?-           # properties
          unless optstr =~ /\A-([-\w]+)(?:=(.*))?/
            raise option_error("'-#{optstr}': invalid property pattern.")
          end
          pname = $1 ;  pvalue = $2
          case pvalue
          when nil                    ;  pvalue = true
          when /\A\d+\z/              ;  pvalue = pvalue.to_i
          when /\A\d+\.\d+\z/         ;  pvalue = pvalue.to_f
          when 'true', 'yes', 'on'    ;  pvalue = true
          when 'false', 'no', 'off'   ;  pvalue = false
          when 'nil', 'null'          ;  pvalue = nil
          when /\A'.*'\z/, /\A".*"\z/ ; pvalue = eval pvalue
          end
          properties[pname.intern] = pvalue
        else                         # command-line options
          while optstr && !optstr.empty?
            optchar = optstr[0]
            optstr = optstr[1, optstr.length - 1]
            entry = _find_entry(optchar)
            entry  or raise CommandOptionError.new("-#{optchar.chr}: unknown option.")
            char, key, argname = entry
            case argname
            when nil, false
              instance_variable_set("@#{key}", true)
            when String
              arg = optstr
              arg = argv.shift unless arg && !arg.empty?
              arg  or raise CommandOptionError.new("-#{optchar.chr}: #{argname} required.")
              instance_variable_set("@#{key}", arg)
              optstr = ''
            when true
              arg = optstr
              arg = true unless arg && !arg.empty?
              instance_variable_set("@#{key}", arg)
              optstr = ''
            else
              raise "** internal error **"
            end
          end #while
        end #if
      end #while
      filenames = argv
      return filenames
    end