From 5a264ac696a2507f9aeed6232d5a68bf0df9642b Mon Sep 17 00:00:00 2001 From: LtWorf Date: Sat, 4 Oct 2008 18:03:35 +0000 Subject: [PATCH] optimization git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@47 014f5005-505e-4b48-8d0a-63407b615a7c --- parser.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/parser.py b/parser.py index 10cc9ba..5fa16af 100644 --- a/parser.py +++ b/parser.py @@ -141,14 +141,16 @@ def parse_op(expr): #We split the string into an array, and we parse only the ones with even index quotes=expr.split('"'); - for i in range (0,len(quotes),2): - for j in symbols: - quotes[i]=quotes[i].replace(j,"_____%s_____"% (j)) - #The parts outside the quotes was parsed, put the string together again if (len(quotes)>1): + for i in range (0,len(quotes),2): + for j in symbols: + quotes[i]=quotes[i].replace(j,"_____%s_____"% (j)) + #The parts outside the quotes was parsed, put the string together again expr= '"'.join(quotes) + + tokens=expr.split("_____") i=0;