

def parse_rule(rule):
    pos = 0
    end = len(rule)
    while (pos < end):
        m = rule_pattern.match(rule, pos)
        if (m is None):
            break
        d = m.groupdict()
        _type = d['type']
        _variable = d['variable']
        if (d['static'] and (len(d['static']) > 0)):
            (yield (None, None, pos['static']))
        (yield (_type, _variable, None))
        pos = m.end()
    if (pos < end):
        r = rule[pos:]
        (yield (None, None, r))

dataset/ETHPy150Open jasonlvhit/lunar/lunar/router.py parse_rule/VarMisuse@104/120 `d`->`pos`