From 4a38beb8137ecbe8b1cb31d0365cbb5f4307b785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20B=C3=B6hm?= Date: Fri, 3 Jul 2009 09:52:32 +0200 Subject: rename BEQ to BEZ and make TACList iterable --- src/back/tac.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/back/tac.py b/src/back/tac.py index 23ba1db..bff5944 100644 --- a/src/back/tac.py +++ b/src/back/tac.py @@ -34,7 +34,7 @@ Op.LE = Op("LE") # x = Z || N Op.GE = Op("GE") # x = !N Op.GT = Op("GT") # x = !Z && !N -Op.BEQ = Op("BEQ") # if x goto y +Op.BEZ = Op("BEZ") # if x == 0 goto y Op.JMP = Op("JMP") # goto x Op.PARAM = Op("PARAM") # param x @@ -78,3 +78,6 @@ class TACList(object): for i in range(len(self.__tac_list)): res += "%04d: %s\n" % (i, repr(self.__tac_list[i])) return res + + def __iter__(self): + return self.__tac_list.__iter__() -- cgit v1.2.3