StarLoopEntryState starLoopEntryState = (StarLoopEntryState)state; checkCondition(starLoopEntryState.loopBackState != null); checkCondition(starLoopEntryState.getNumberOfTransitions() == 2); if (starLoopEntryState.transition(0).target instanceof StarBlockStartState) { checkCondition(starLoopEntryState.transition(1).target instanceof LoopEndState); checkCondition(!starLoopEntryState.nonGreedy); else if (starLoopEntryState.transition(0).target instanceof LoopEndState) { checkCondition(starLoopEntryState.transition(1).target instanceof StarBlockStartState); checkCondition(starLoopEntryState.nonGreedy);
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 blockStart = loopEntry.transition(0).target;
ATNState blockStart = loopEntry.transition(0).target;
StarLoopEntryState starLoopEntryState = (StarLoopEntryState)state; checkCondition(starLoopEntryState.loopBackState != null); checkCondition(starLoopEntryState.getNumberOfTransitions() == 2); if (starLoopEntryState.transition(0).target instanceof StarBlockStartState) { checkCondition(starLoopEntryState.transition(1).target instanceof LoopEndState); checkCondition(!starLoopEntryState.nonGreedy); else if (starLoopEntryState.transition(0).target instanceof LoopEndState) { checkCondition(starLoopEntryState.transition(1).target instanceof StarBlockStartState); checkCondition(starLoopEntryState.nonGreedy);
ATNState blockStart = loopEntry.transition(0).target;
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; }
StarLoopEntryState starLoopEntryState = (StarLoopEntryState)state; checkCondition(starLoopEntryState.loopBackState != null); checkCondition(starLoopEntryState.getNumberOfTransitions() == 2); if (starLoopEntryState.transition(0).target instanceof StarBlockStartState) { checkCondition(starLoopEntryState.transition(1).target instanceof LoopEndState); checkCondition(!starLoopEntryState.nonGreedy); else if (starLoopEntryState.transition(0).target instanceof LoopEndState) { checkCondition(starLoopEntryState.transition(1).target instanceof StarBlockStartState); checkCondition(starLoopEntryState.nonGreedy);
ATNState blockStart = loopEntry.transition(0).target;
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; }
StarLoopEntryState starLoopEntryState = (StarLoopEntryState)state; checkCondition(starLoopEntryState.loopBackState != null); checkCondition(starLoopEntryState.getNumberOfTransitions() == 2); if (starLoopEntryState.transition(0).target instanceof StarBlockStartState) { checkCondition(starLoopEntryState.transition(1).target instanceof LoopEndState); checkCondition(!starLoopEntryState.nonGreedy); else if (starLoopEntryState.transition(0).target instanceof LoopEndState) { checkCondition(starLoopEntryState.transition(1).target instanceof StarBlockStartState); checkCondition(starLoopEntryState.nonGreedy);
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; }
StarLoopEntryState starLoopEntryState = (StarLoopEntryState)state; checkCondition(starLoopEntryState.loopBackState != null); checkCondition(starLoopEntryState.getNumberOfTransitions() == 2); if (starLoopEntryState.transition(0).target instanceof StarBlockStartState) { checkCondition(starLoopEntryState.transition(1).target instanceof LoopEndState); checkCondition(!starLoopEntryState.nonGreedy); else if (starLoopEntryState.transition(0).target instanceof LoopEndState) { checkCondition(starLoopEntryState.transition(1).target instanceof StarBlockStartState); checkCondition(starLoopEntryState.nonGreedy);
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; }