@classmethod
def extract_keywords(cls, line, items):
    """
        Given the keyword string, parse a dictionary of options.
        """
    unprocessed = list(reversed(line.split('=')))
    while unprocessed:
        chunk = unprocessed.pop()
        key = None
        if chunk.strip() in cls.allowed:
            key = chunk.strip()
        else:
            raise SyntaxError('Invalid keyword: %s' % chunk.strip())
        value = unprocessed.pop().strip()
        if len(unprocessed) != 0:
            for option in cls.allowed:
                if value.endswith(option):
                    value = value[:-len(option)].strip()
                    unprocessed.append(option)
                    break
            else:
                raise SyntaxError('Invalid keyword: %s' % value.split()[-1])
        keyword = '%s=%s' % (key, value)
        try:
            items.update(eval('dict(%s)' % keyword))
        except:
            raise SyntaxError('Could not evaluate keyword: %s' % keyword)
    return items
