We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ff8e446 commit 530d1b9Copy full SHA for 530d1b9
src/antlr4/Recognizer.py
@@ -44,8 +44,8 @@ def __init__(self):
44
45
def checkVersion(self, toolVersion):
46
runtimeVersion = "4.4.0"
47
- rv=runtimeVersion[0:4]
48
- tv=toolVersion[0:4]
+ rv=runtimeVersion[0:max(runtimeVersion.rfind("."),runtimeVersion.rfind("-"))]
+ tv=toolVersion[0:max(toolVersion.rfind("."),toolVersion.rfind("-"))]
49
if not rv==tv:
50
print("ANTLR runtime and generated code versions disagree: "+runtimeVersion+"!="+toolVersion)
51
0 commit comments