def _parse(data):
    # This is probably a bad way to get the rules. but works.
    # Find start line where icons rules start
    pat_start = re.compile('}.+content:', re.DOTALL)
    start = [x for x in re.finditer(pat_start, data)][0].start()
    data = data[start:]  # crop
    data = data.replace("\\", '0x')  # replace unicodes
    # Find keys
    pat_keys = re.compile('[a-zA-Z0-9_-]+:before')
    keys = []
    lines = []
    for i in re.finditer(pat_keys, data):
        lineno = data.count("\n", 0, i.start()) + 1
        lines.append(lineno)  # save line position
        keys.append(i.group().replace(':before', ''))

    # Find values (unicode value) and save it to values list as many times as
    # needed
    values = []
    QUOTE = '"'
    data = data.replace("'", '"')
    pat_values = re.compile('content:.+')

    for i in re.finditer(pat_values, data):
        lineno = data.count("\n", 0, i.start()) + 1
        v = i.group().split(QUOTE)[1]
        v = v.replace('content:', '')
        for j, lnum in enumerate(lines):
            if lineno <= lnum:
                try:
                    val = int(v.replace('content:', ''), 0)
                except:
                    val = 0
                values.append(val)
            else:
                break
        [lines.pop(0) for x in lines[0:j]]  # pop assigned lines

    # Create dict
    res = dict(zip(keys, values))

    return res
dataset/ETHPy150Open kivy-garden/garden.iconfonts/iconfonts.py/_parse/swapped operands of `<=`