added some comments

git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@116 014f5005-505e-4b48-8d0a-63407b615a7c
master
LtWorf 2009-03-19 13:30:35 +07:00
parent 79058f3871
commit d872343481
2 changed files with 4 additions and 3 deletions

@ -68,3 +68,4 @@
0.10
- In optimizer, added a function that tokenizes an expression
- Document about complexity of operations
- Bug: error in rename operator, it didn't perform a fullcopy of the relation

@ -95,18 +95,18 @@ def tokenize(expression):
items.append(tokenize(expression[1:end]))
expression=expression[end+1:].strip()
elif expression.startswith("σ") or expression.startswith("π") or expression.startswith("ρ"): #Unary
elif expression.startswith("σ") or expression.startswith("π") or expression.startswith("ρ"): #Unary 2 bytes
items.append(expression[0:2]) #Adding operator in the top of the list
expression=expression[2:].strip() #Removing operator from the expression
par=expression.find('(')
items.append(expression[:par]) #Inserting parameter of the operator
expression=expression[par:].strip() #Removing parameter from the expression
elif expression.startswith("*") or expression.startswith("-"):
elif expression.startswith("*") or expression.startswith("-"): # Binary 1 byte
items.append(expression[0])
expression=expression[1:].strip() #1 char from the expression
state=4
elif expression.startswith("") or expression.startswith(""): #Binary short
elif expression.startswith("") or expression.startswith(""): #Binary short 3 bytes
items.append(expression[0:3]) #Adding operator in the top of the list
expression=expression[3:].strip() #Removing operator from the expression