Python: fix reported input alternatives are not in par with Java version

This commit is contained in:
alimg 2017-06-19 18:51:59 +03:00
parent e9155ef9cb
commit f0d1a093ed
2 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ class IntervalSet(object):
elif a==Token.EPSILON:
return u"<EPSILON>"
else:
if a<len(literalNames):
if a<len(literalNames) and literalNames[a] != u"<INVALID>":
return literalNames[a]
if a<len(symbolicNames):
return symbolicNames[a]

View File

@ -173,7 +173,7 @@ class IntervalSet(object):
elif a==Token.EPSILON:
return "<EPSILON>"
else:
if a<len(literalNames):
if a<len(literalNames) and literalNames[a] != "<INVALID>":
return literalNames[a]
if a<len(symbolicNames):
return symbolicNames[a]