If {@code ctx} is {@code null} and the end of the rule containing * {@code s} is reached, {@link Token#EPSILON} is added to the result set. * If {@code ctx} is not {@code null} and the end of the outermost rule is * reached, {@link Token#EOF} is added to the result set.
* * @param s the ATN state * @param ctx the complete parser context, or {@code null} if the context * should be ignored * * @return The set of tokens that can follow {@code s} in the ATN in the * specified {@code ctx}. */ LOOK(s: ATNState, ctx: PredictionContext): IntervalSet; /** * Compute set of tokens that can follow {@code s} in the ATN in the * specified {@code ctx}. * *If {@code ctx} is {@code null} and the end of the rule containing * {@code s} is reached, {@link Token#EPSILON} is added to the result set. * If {@code ctx} is not {@code PredictionContext#EMPTY_LOCAL} and the end of the outermost rule is * reached, {@link Token#EOF} is added to the result set.
* * @param s the ATN state * @param stopState the ATN state to stop at. This can be a * {@link BlockEndState} to detect epsilon paths through a closure. * @param ctx the complete parser context, or {@code null} if the context * should be ignored * * @return The set of tokens that can follow {@code s} in the ATN in the * specified {@code ctx}. */ LOOK(s: ATNState, ctx: PredictionContext, stopState: ATNState | null): IntervalSet; /** * Compute set of tokens that can follow {@code s} in the ATN in the * specified {@code ctx}. * * If {@code ctx} is {@link PredictionContext#EMPTY_LOCAL} and * {@code stopState} or the end of the rule containing {@code s} is reached, * {@link Token#EPSILON} is added to the result set. If {@code ctx} is not * {@link PredictionContext#EMPTY_LOCAL} and {@code addEOF} is {@code true} * and {@code stopState} or the end of the outermost rule is reached, * {@link Token#EOF} is added to the result set. * * @param s the ATN state. * @param stopState the ATN state to stop at. This can be a * {@link BlockEndState} to detect epsilon paths through a closure. * @param ctx The outer context, or {@link PredictionContext#EMPTY_LOCAL} if * the outer context should not be used. * @param look The result lookahead set. * @param lookBusy A set used for preventing epsilon closures in the ATN * from causing a stack overflow. Outside code should pass * {@code new HashSet