use of org.antlr.v4.runtime.misc.NotNull in project antlr4 by tunnelvisionlabs.
the class ATN method nextTokens.
/**
* Compute the set of valid tokens that can occur starting in state {@code s}.
* If {@code ctx} is {@link PredictionContext#EMPTY_LOCAL}, the set of tokens will not include what can follow
* the rule surrounding {@code s}. In other words, the set will be
* restricted to tokens reachable staying within {@code s}'s rule.
*/
@NotNull
public IntervalSet nextTokens(ATNState s, @NotNull PredictionContext ctx) {
Args.notNull("ctx", ctx);
LL1Analyzer anal = new LL1Analyzer(this);
IntervalSet next = anal.LOOK(s, ctx);
return next;
}
use of org.antlr.v4.runtime.misc.NotNull in project antlr4 by tunnelvisionlabs.
the class ATN method defineMode.
public void defineMode(@NotNull String name, @NotNull TokensStartState s) {
modeNameToStartState.put(name, s);
modeToStartState.add(s);
modeToDFA = Arrays.copyOf(modeToDFA, modeToStartState.size());
modeToDFA[modeToDFA.length - 1] = new DFA(s);
defineDecisionState(s);
}
Aggregations