def visitVariable(self, elem): if elem.s == "_|_": return C.Bottom() elif elem.s == "*": return C.Mult() elif elem.s == '+': return C.Add() elif elem.s == "-": return C.Sub() elif elem.s == "if": return C.If() elif elem.s == "==": return C.Equal() elif elem.s == "!=": return C.NEqual() elif elem.s == "head": return C.Head() elif elem.s == "tail": return C.Tail() elif elem.s == "seq": return C.Seq() elif elem.s == "Cons": return C.Cons() elif elem.s == "Nil": return C.Nil() elif elem.s == "null": return C.Null() elif elem.s == "True": return C.TRUE() elif elem.s == "False": return C.FALSE() elif elem.s == "concat": return C.Concat() return C.Variable(elem.s)
def visitEqual(self, elem): return C.Equal()