code: def parse(self, argv, command):
          
          # Prepare
  
          command_args = ' '.join(argv)
          command.fieldnames = None
          command.options.reset()
  
          command_args = SearchCommandParser._arguments_re.match(command_args)
  
          if command_args is None:
              raise SyntaxError("Syntax error: %s" % ' '.join(argv))
  
          # Parse options
  
          for option in SearchCommandParser._options_re.finditer(
                  command_args.group('options')):
              name, value = option.group(1), option.group(2)
              if not name in command.options:
                  raise ValueError('Unrecognized option: %s = %s' % (name, value))
              command.options[name].value = SearchCommandParser.unquote(value)
  
          missing = command.options.get_missing()
  
          if missing is not None:
              if len(missing) == 1:
                  raise ValueError('A value for "%s" is required' % missing[0])
              else:
                  raise ValueError(
                      'Values for these options are required: %s' %
                      ', '.join(missing))
  
          # Parse field names
  
          command.fieldnames = command_args.group('fieldnames').split()
          command.logger.debug('%s: %s', type(command).__name__, command)
          return
docs: Splits an argument list into an options dictionary and a fieldname
          list.
  
          The argument list, `argv`, must be of the form::
  
              *[option]... *[<field-name>]
  
          Options are validated and assigned to items in `command.options`. Field
          names are validated and stored in the list of `command.fieldnames`.
  
          #Arguments:
  
          :param command: Search command instance.
          :type command: ``SearchCommand``
          :param argv: List of search command arguments.
          :type argv: ``list``
          :return: ``None``
  
          #Exceptions:
  
          ``SyntaxError``: Argument list is incorrectly formed.
          ``ValueError``: Unrecognized option/field name, or an illegal field value.