diff --git a/contributors.txt b/contributors.txt index 3b9c42284a..be27d19da4 100644 --- a/contributors.txt +++ b/contributors.txt @@ -266,3 +266,4 @@ YYYY/MM/DD, github id, Full name, email 2020/09/16, trenki2, Markus Trenkwalder, trenki2[at]gmx[dot]net 2020/10/08, Marti2203, Martin Mirchev, mirchevmartin2203@gmail.com 2020/10/20, adamwojs, Adam Wójs, adam[at]wojs.pl +2020/10/24, cliid, Jiwu Jang, jiwujang@naver.com \ No newline at end of file diff --git a/runtime/Python3/src/antlr4/Lexer.py b/runtime/Python3/src/antlr4/Lexer.py index a60b5bcc93..0a96b70af4 100644 --- a/runtime/Python3/src/antlr4/Lexer.py +++ b/runtime/Python3/src/antlr4/Lexer.py @@ -9,8 +9,12 @@ # of speed. #/ from io import StringIO -from typing.io import TextIO + import sys +if sys.version_info[1] > 5: + from typing import TextIO +else: + from typing.io import TextIO from antlr4.CommonTokenFactory import CommonTokenFactory from antlr4.atn.LexerATNSimulator import LexerATNSimulator from antlr4.InputStream import InputStream diff --git a/runtime/Python3/src/antlr4/Parser.py b/runtime/Python3/src/antlr4/Parser.py index c461bbdc04..11bf41796c 100644 --- a/runtime/Python3/src/antlr4/Parser.py +++ b/runtime/Python3/src/antlr4/Parser.py @@ -3,7 +3,10 @@ # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. import sys -from typing.io import TextIO +if sys.version_info[1] > 5: + from typing import TextIO +else: + from typing.io import TextIO from antlr4.BufferedTokenStream import TokenStream from antlr4.CommonTokenFactory import TokenFactory from antlr4.error.ErrorStrategy import DefaultErrorStrategy