public static PredictionContext fromRuleContext(ATN atn, RuleContext outerContext) {if ( outerContext==null ) outerContext = RuleContext.EMPTY;if ( outerContext.parent==null || outerContext==RuleContext.EMPTY ) {return PredictionContext.EMPTY;}PredictionContext parent = EMPTY;parent = PredictionContext.fromRuleContext(atn, outerContext.parent);ATNState state = atn.states.get(outerContext.invokingState);RuleTransition transition = (RuleTransition)state.transition(0);return SingletonPredictionContext.create(parent, transition.followState.stateNumber);}