X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=mysql2sql%2Fprocess_tokens.py;fp=mysql2sql%2Fprocess_tokens.py;h=7e323543f81f9baa5f65444e7edc8327e16d7eb7;hb=7d3342fc8ae5d217736c9c055b53445c628da765;hp=ddab2bf649eac2e69e67eef48e7b1edbf07b0dea;hpb=0f209248832190291a510febd790e71a815e496a;p=sqlconvert.git diff --git a/mysql2sql/process_tokens.py b/mysql2sql/process_tokens.py index ddab2bf..7e32354 100644 --- a/mysql2sql/process_tokens.py +++ b/mysql2sql/process_tokens.py @@ -1,5 +1,6 @@ from sqlparse import parse +from sqlparse.compat import PY3 from sqlparse.tokens import Name, Error, Punctuation, Comment, Newline, \ Whitespace @@ -25,6 +26,10 @@ def find_error(token_list): return False +if PY3: + xrange = range + + class StatementGrouper(object): """Collect lines and reparse until the last statement is complete"""