From 48c72945af93723a2ee77d7fa9164da1cb0a44f5 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 14 Jan 2004 17:48:48 +0000 Subject: [PATCH] Next, do data-flow analysis to deduce types. --- mad | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mad b/mad index 79226b0..42dead6 100755 --- a/mad +++ b/mad @@ -328,8 +328,8 @@ def print_expr(t): return "%s" % print_expr(t[1]) elif t[0] == '-': return "(-%s)" % print_expr(t[1]) - elif t[0] in ('variable', 'intnum'): - return "%s" % print_expr(t[1]) + elif t[0] == 'intnum': + return t[1] else: return "***"+`t` @@ -346,7 +346,6 @@ def print_statement(statement): declaration += ", " return(declaration[:-2] + ";") elif statement[0] == 'for': - print statement (keyword, label, dummy, start, increment, predicate) = statement indent += 1 return "for (%s = %s; %s; %s += %s) {" % (dummy, print_expr(start), print_expr(predicate), dummy, print_expr(increment)) -- 2.43.0