'Given options string, convert it into an ordered list of (option_id, option_description) tuples, where
id==description for now.  TODO: make it possible to specify different id and descriptions.'

@staticmethod
def parse_options(options):

    options = re.sub("([a-zA-Z])('|\\\\')([a-zA-Z])", '\\1&#39;\\3', options)
    options = re.sub("\\\\'", '&#39;', options)
    lexer = shlex.shlex(options[1:(-1)].encode('utf8'))
    lexer.quotes = "'"
    lexer.whitespace = ',    '
    tokens = [x[1:(-1)].decode('utf8').replace('&#39;', "'") for x in lexer]
    return [(t, t) for t in tokens]
