diff --git a/runtime/Python3/src/antlr4/atn/SemanticContext.py b/runtime/Python3/src/antlr4/atn/SemanticContext.py index d69165e4d..7536ded1e 100644 --- a/runtime/Python3/src/antlr4/atn/SemanticContext.py +++ b/runtime/Python3/src/antlr4/atn/SemanticContext.py @@ -36,9 +36,9 @@ #

I have scoped the {@link AND}, {@link OR}, and {@link Predicate} subclasses of # {@link SemanticContext} within the scope of this outer class.

# -from io import StringIO from antlr4.Recognizer import Recognizer from antlr4.RuleContext import RuleContext +from io import StringIO class SemanticContext(object): @@ -115,7 +115,7 @@ def orContext(a:SemanticContext, b:SemanticContext): else: return result -def filterPrecedencePredicates(collection:list): +def filterPrecedencePredicates(collection:set): return [context for context in collection if isinstance(context, PrecedencePredicate)]