Skip to content

Commit ff8e446

Browse files
committed
version checking
1 parent 3ecd838 commit ff8e446

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/antlr4/Recognizer.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ def __init__(self):
4444

4545
def checkVersion(self, toolVersion):
4646
runtimeVersion = "4.4.0"
47-
if not runtimeVersion==toolVersion:
47+
rv=runtimeVersion[0:4]
48+
tv=toolVersion[0:4]
49+
if not rv==tv:
4850
print("ANTLR runtime and generated code versions disagree: "+runtimeVersion+"!="+toolVersion)
4951

5052
def addErrorListener(self, listener):

0 commit comments

Comments
 (0)