Finally fix Python 2.6.

Also added a syntax for 2.6. There are some thing that just don't work in 2.6.
This commit is contained in:
Dave Halter
2017-07-31 21:31:26 +02:00
parent ddd16124ac
commit d6c624bd34
7 changed files with 185 additions and 14 deletions

View File

@@ -154,12 +154,9 @@ def load_grammar(**kwargs):
def load_grammar(version=None):
version_info = parse_version_string(version)
# For these versions we use the same grammar files, because nothing
# changed.
# The 3.3 grammar didn't change with the update to 3.4.
if version_info == (3, 3):
version_info = parse_version_string('3.4')
elif version_info == (2, 6):
version_info = parse_version_string('2.7')
file = 'python/grammar%s%s.txt' % (version_info.major, version_info.minor)