diff --git a/runtime/Python2/src/antlr4/Parser.py b/runtime/Python2/src/antlr4/Parser.py index e70318dfc..d8be80cf0 100644 --- a/runtime/Python2/src/antlr4/Parser.py +++ b/runtime/Python2/src/antlr4/Parser.py @@ -10,7 +10,8 @@ from antlr4.atn.ATNDeserializer import ATNDeserializer from antlr4.atn.ATNDeserializationOptions import ATNDeserializationOptions from antlr4.error.Errors import UnsupportedOperationException from antlr4.tree.ParseTreePatternMatcher import ParseTreePatternMatcher -from antlr4.tree.Tree import ParseTreeListener +from antlr4.tree.Tree import ParseTreeListener, ErrorNode, TerminalNode + class TraceListener(ParseTreeListener): diff --git a/runtime/Python2/src/antlr4/PredictionContext.py b/runtime/Python2/src/antlr4/PredictionContext.py index 25c02c05c..749234a33 100644 --- a/runtime/Python2/src/antlr4/PredictionContext.py +++ b/runtime/Python2/src/antlr4/PredictionContext.py @@ -5,9 +5,7 @@ #/ from io import StringIO from antlr4.RuleContext import RuleContext -from antlr4.atn.ATN import ATN -from antlr4.atn.ATNState import ATNState - +from antlr4.error.Errors import IllegalStateException class PredictionContext(object): diff --git a/runtime/Python3/src/antlr4/PredictionContext.py b/runtime/Python3/src/antlr4/PredictionContext.py index 1316180fc..f117127dd 100644 --- a/runtime/Python3/src/antlr4/PredictionContext.py +++ b/runtime/Python3/src/antlr4/PredictionContext.py @@ -4,6 +4,9 @@ # can be found in the LICENSE.txt file in the project root. #/ from io import StringIO + +from antlr4.error.Errors import IllegalStateException + from antlr4.RuleContext import RuleContext from antlr4.atn.ATN import ATN from antlr4.atn.ATNState import ATNState