removed debug prints

git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@136 014f5005-505e-4b48-8d0a-63407b615a7c
master
LtWorf 2009-04-28 21:33:16 +07:00
parent e898eed426
commit a4325679cb
1 changed files with 2 additions and 13 deletions

@ -40,16 +40,11 @@ class node (object):
expression=expression[0]
if len(expression)==1 and isinstance(expression[0],str): #We have a string (relation name)
print "Relation: ",expression[0]
self.kind=RELATION
self.name=expression[0]
return
for i in range(len(expression)-1,-1,-1): #Expression from right to left
if expression[i] in b_operators: #Binary operator
print "Operator: ",expression[i]
print "left subtree: ",expression[:i]
print "right subtree: ",expression[i+1:]
if expression[i] in b_operators: #Binary operator
self.kind=BINARY
self.name=expression[i]
self.left=node(expression[:i])
@ -59,14 +54,9 @@ class node (object):
if expression[i] in u_operators: #Unary operator
self.kind=UNARY
self.name=expression[i]
self.prop=expression[1+i]
self.prop=expression[1+i].strip()
self.child=node(expression[2+i])
print "Operator: ",expression[i]
print "prop: ",expression[1+i]
print "child: ",self.child
return
pass
@ -174,7 +164,6 @@ def general_optimize(expression):
'''This function performs general optimizations. Means that it will not need to
know the fields used by the relations'''
n=tree(expression) #Gets the tree
print n
for i in optimizations.general_optimizations:
n=i(n) #Performs the optimization
return n.__str__()