|
|
@ -38,7 +38,11 @@ class ETHContract(persistent.Persistent): |
|
|
|
str_eval = '' |
|
|
|
str_eval = '' |
|
|
|
easm_code = None |
|
|
|
easm_code = None |
|
|
|
|
|
|
|
|
|
|
|
tokens = filter(None, re.split("(and|or|not)", expression.replace(" ", ""), re.IGNORECASE)) |
|
|
|
# tokens = filter(None, re.split("( and | or | not )", expression.replace(" ", ""), re.IGNORECASE)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tokens = re.split("\s+(and|or|not)\s+", expression, re.IGNORECASE) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(tokens) |
|
|
|
|
|
|
|
|
|
|
|
for token in tokens: |
|
|
|
for token in tokens: |
|
|
|
|
|
|
|
|
|
|
@ -66,4 +70,6 @@ class ETHContract(persistent.Persistent): |
|
|
|
|
|
|
|
|
|
|
|
continue |
|
|
|
continue |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
print(str_eval) |
|
|
|
|
|
|
|
|
|
|
|
return eval(str_eval.strip()) |
|
|
|
return eval(str_eval.strip()) |
|
|
|