can generate empty nodes
git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@141 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
parent
bc0492ef77
commit
b694fdd99d
@ -35,6 +35,8 @@ class node (object):
|
||||
kind=None
|
||||
|
||||
def __init__(self,expression):
|
||||
if expression==None or len(expression)==0:
|
||||
return
|
||||
'''Generates the tree from the tokenized expression'''
|
||||
while len(expression)==1 and isinstance(expression[0],list): #We have a list, removing
|
||||
expression=expression[0]
|
||||
@ -177,7 +179,7 @@ if __name__=="__main__":
|
||||
#a= tokenize("(a - (a ᑌ b) * π a,b (a-b)) - ρ 123 (a)")
|
||||
#a= tokenize(u"π a,b (a*b)")
|
||||
#a=tokenize("(a-b*c)*(b-c)")
|
||||
a=general_optimize("σ i==2 (σ b>5 ( σ a>2 (C))) * σ a>2 ( σ a>2 (C))")
|
||||
a=general_optimize("σ i==2 (c ᑌ d- b)")
|
||||
#a=general_optimize("σ i==2 (σ b>5 (d))")
|
||||
print a
|
||||
#print node(a)
|
||||
|
Loading…
Reference in New Issue
Block a user