def _parse_options(self, argv, location):
observed = []<EOL>while argv:<EOL><INDENT>if argv[<NUM_LIT:0>].startswith('<STR_LIT>'):<EOL><INDENT>name = argv.pop(<NUM_LIT:0>)[<NUM_LIT:2>:]<EOL>if not name:<EOL><INDENT>break<EOL><DEDENT>if name not in self.options:<EOL><INDENT>raise InvalidOption(name)<EOL><DEDENT>option = self.options[name]<EOL>if not option.recurring:<EOL><INDENT>if option in observed:<EOL><INDENT>raise OptionRecurrenceError(name)<EOL><DEDENT>observed.append(option)<EOL><DEDENT>option.parse(argv, name, location)<EOL><DEDENT>elif argv[<NUM_LIT:0>].startswith('<STR_LIT:->'):<EOL><INDENT>if argv[<NUM_LIT:0>] == '<STR_LIT:->':<EOL><INDENT>break<EOL><DEDENT>block = argv.pop(<NUM_LIT:0>)[<NUM_LIT:1>:]<EOL>for abbreviation in block[:-<NUM_LIT:1>]:<EOL><INDENT>if self.abbreviations[abbreviation].nargs != <NUM_LIT:0>:<EOL><INDENT>raise BadAbbreviationBlock(abbreviation, block, "<STR_LIT>")<EOL><DEDENT><DEDENT>for abbreviation in block:<EOL><INDENT>option = self.abbreviations[abbreviation]<EOL>if not option.recurring:<EOL><INDENT>if option in observed:<EOL><INDENT>raise OptionRecurrenceError(option.name)<EOL><DEDENT>observed.append(option)<EOL><DEDENT>option.parse(argv, '<STR_LIT:->' + abbreviation, location)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>
Parse the options part of an argument list.
        IN:
        lsArgs <list str>:
            List of arguments. Will be altered.
        location <str>:
            A user friendly string describing where this data came from.