protected ATNState stateFactory(int type, int ruleIndex) { ATNState s; switch (type) { case ATNState.INVALID_TYPE: return null; case ATNState.BASIC : s = new BasicState(); break; case ATNState.RULE_START : s = new RuleStartState(); break; case ATNState.BLOCK_START : s = new BasicBlockStartState(); break; case ATNState.PLUS_BLOCK_START : s = new PlusBlockStartState(); break; case ATNState.STAR_BLOCK_START : s = new StarBlockStartState(); break; case ATNState.TOKEN_START : s = new TokensStartState(); break; case ATNState.RULE_STOP : s = new RuleStopState(); break; case ATNState.BLOCK_END : s = new BlockEndState(); break; case ATNState.STAR_LOOP_BACK : s = new StarLoopbackState(); break; case ATNState.STAR_LOOP_ENTRY : s = new StarLoopEntryState(); break; case ATNState.PLUS_LOOP_BACK : s = new PlusLoopbackState(); break; case ATNState.LOOP_END : s = new LoopEndState(); break; default : String message = String.format(Locale.getDefault(), "The specified state type %d is not valid.", type); throw new IllegalArgumentException(message); } s.ruleIndex = ruleIndex; return s; }
bypassStop.addTransition(new EpsilonTransition(endState)); ATNState matchState = new BasicState(); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i]));
public ATNState newState(GrammarAST node) { ATNState n = new BasicState(); n.setRuleIndex(currentRule.index); atn.addState(n); return n; }
public ATNState newState(GrammarAST node) { ATNState n = new BasicState(); n.setRuleIndex(currentRule.index); atn.addState(n); return n; }
public ATNState newState(GrammarAST node) { ATNState n = new BasicState(); n.setRuleIndex(currentRule.index); atn.addState(n); return n; }
public ATNState newState(GrammarAST node) { ATNState n = new BasicState(); n.setRuleIndex(currentRule.index); atn.addState(n); return n; }
@NotNull public ATNState newState(@Nullable GrammarAST node) { ATNState n = new BasicState(); n.setRuleIndex(currentRule.index); atn.addState(n); return n; }
protected ATNState stateFactory(int type, int ruleIndex) { ATNState s; switch (type) { case ATNState.INVALID_TYPE: return null; case ATNState.BASIC : s = new BasicState(); break; case ATNState.RULE_START : s = new RuleStartState(); break; case ATNState.BLOCK_START : s = new BasicBlockStartState(); break; case ATNState.PLUS_BLOCK_START : s = new PlusBlockStartState(); break; case ATNState.STAR_BLOCK_START : s = new StarBlockStartState(); break; case ATNState.TOKEN_START : s = new TokensStartState(); break; case ATNState.RULE_STOP : s = new RuleStopState(); break; case ATNState.BLOCK_END : s = new BlockEndState(); break; case ATNState.STAR_LOOP_BACK : s = new StarLoopbackState(); break; case ATNState.STAR_LOOP_ENTRY : s = new StarLoopEntryState(); break; case ATNState.PLUS_LOOP_BACK : s = new PlusLoopbackState(); break; case ATNState.LOOP_END : s = new LoopEndState(); break; default : String message = String.format(Locale.getDefault(), "The specified state type %d is not valid.", type); throw new IllegalArgumentException(message); } s.ruleIndex = ruleIndex; return s; }
protected ATNState stateFactory(int type, int ruleIndex) { ATNState s; switch (type) { case ATNState.INVALID_TYPE: return null; case ATNState.BASIC : s = new BasicState(); break; case ATNState.RULE_START : s = new RuleStartState(); break; case ATNState.BLOCK_START : s = new BasicBlockStartState(); break; case ATNState.PLUS_BLOCK_START : s = new PlusBlockStartState(); break; case ATNState.STAR_BLOCK_START : s = new StarBlockStartState(); break; case ATNState.TOKEN_START : s = new TokensStartState(); break; case ATNState.RULE_STOP : s = new RuleStopState(); break; case ATNState.BLOCK_END : s = new BlockEndState(); break; case ATNState.STAR_LOOP_BACK : s = new StarLoopbackState(); break; case ATNState.STAR_LOOP_ENTRY : s = new StarLoopEntryState(); break; case ATNState.PLUS_LOOP_BACK : s = new PlusLoopbackState(); break; case ATNState.LOOP_END : s = new LoopEndState(); break; default : String message = String.format(Locale.getDefault(), "The specified state type %d is not valid.", type); throw new IllegalArgumentException(message); } s.ruleIndex = ruleIndex; return s; }
protected ATNState stateFactory(int type, int ruleIndex) { ATNState s; switch (type) { case ATNState.INVALID_TYPE: return null; case ATNState.BASIC : s = new BasicState(); break; case ATNState.RULE_START : s = new RuleStartState(); break; case ATNState.BLOCK_START : s = new BasicBlockStartState(); break; case ATNState.PLUS_BLOCK_START : s = new PlusBlockStartState(); break; case ATNState.STAR_BLOCK_START : s = new StarBlockStartState(); break; case ATNState.TOKEN_START : s = new TokensStartState(); break; case ATNState.RULE_STOP : s = new RuleStopState(); break; case ATNState.BLOCK_END : s = new BlockEndState(); break; case ATNState.STAR_LOOP_BACK : s = new StarLoopbackState(); break; case ATNState.STAR_LOOP_ENTRY : s = new StarLoopEntryState(); break; case ATNState.PLUS_LOOP_BACK : s = new PlusLoopbackState(); break; case ATNState.LOOP_END : s = new LoopEndState(); break; default : String message = String.format(Locale.getDefault(), "The specified state type %d is not valid.", type); throw new IllegalArgumentException(message); } s.ruleIndex = ruleIndex; return s; }
protected ATNState stateFactory(int type, int ruleIndex) { ATNState s; switch (type) { case ATNState.INVALID_TYPE: return null; case ATNState.BASIC : s = new BasicState(); break; case ATNState.RULE_START : s = new RuleStartState(); break; case ATNState.BLOCK_START : s = new BasicBlockStartState(); break; case ATNState.PLUS_BLOCK_START : s = new PlusBlockStartState(); break; case ATNState.STAR_BLOCK_START : s = new StarBlockStartState(); break; case ATNState.TOKEN_START : s = new TokensStartState(); break; case ATNState.RULE_STOP : s = new RuleStopState(); break; case ATNState.BLOCK_END : s = new BlockEndState(); break; case ATNState.STAR_LOOP_BACK : s = new StarLoopbackState(); break; case ATNState.STAR_LOOP_ENTRY : s = new StarLoopEntryState(); break; case ATNState.PLUS_LOOP_BACK : s = new PlusLoopbackState(); break; case ATNState.LOOP_END : s = new LoopEndState(); break; default : String message = String.format(Locale.getDefault(), "The specified state type %d is not valid.", type); throw new IllegalArgumentException(message); } s.ruleIndex = ruleIndex; return s; }
ATNState intermediateState = new BasicState(); intermediateState.setRuleIndex(target.ruleIndex); atn.addState(intermediateState);
ATNState setOptimizedState = new BasicState(); setOptimizedState.setRuleIndex(decision.ruleIndex); atn.addState(setOptimizedState);
bypassStop.addTransition(new EpsilonTransition(endState)); ATNState matchState = new BasicState(); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i]));
bypassStop.addTransition(new EpsilonTransition(endState)); ATNState matchState = new BasicState(); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i]));
bypassStop.addTransition(new EpsilonTransition(endState)); ATNState matchState = new BasicState(); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i]));
bypassStop.addTransition(new EpsilonTransition(endState)); ATNState matchState = new BasicState(); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i]));