def p_for1(p): """for : FOR NAME IN load block """ p[0] = Node("ForEach") p[0].iter = p[2] p[0].list = p[4] p[0].body = p[5]
def p_for2(p): """for : FOR nameList IN load block """ x = Node("Tuple") p[0] = Node("ForEach") p[0].iter = x p[0].list = p[4] p[0].body = p[5] p[0].iter.elems = p[2]