atn.addState(null); continue; endStateNumbers.add(new Pair<BlockStartState, Integer>((BlockStartState)s, endStateNumber)); atn.addState(s); BasicBlockStartState bypassStart = new BasicBlockStartState(); bypassStart.ruleIndex = i; atn.addState(bypassStart); atn.addState(bypassStop); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i])); bypassStart.addTransition(new EpsilonTransition(matchState));
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; }
public <T extends ATNState> T newState(Class<T> nodeType, GrammarAST node) { Exception cause; try { Constructor<T> ctor = nodeType.getConstructor(); T s = ctor.newInstance(); if ( currentRule==null ) s.setRuleIndex(-1); else s.setRuleIndex(currentRule.index); atn.addState(s); return s; } catch (InstantiationException ex) { cause = ex; } catch (IllegalAccessException ex) { cause = ex; } catch (IllegalArgumentException ex) { cause = ex; } catch (InvocationTargetException ex) { cause = ex; } catch (NoSuchMethodException ex) { cause = ex; } catch (SecurityException ex) { cause = ex; } String message = String.format("Could not create %s of type %s.", ATNState.class.getName(), nodeType.getName()); throw new UnsupportedOperationException(message, cause); }
public <T extends ATNState> T newState(Class<T> nodeType, GrammarAST node) { Exception cause; try { Constructor<T> ctor = nodeType.getConstructor(); T s = ctor.newInstance(); if ( currentRule==null ) s.setRuleIndex(-1); else s.setRuleIndex(currentRule.index); atn.addState(s); return s; } catch (InstantiationException ex) { cause = ex; } catch (IllegalAccessException ex) { cause = ex; } catch (IllegalArgumentException ex) { cause = ex; } catch (InvocationTargetException ex) { cause = ex; } catch (NoSuchMethodException ex) { cause = ex; } catch (SecurityException ex) { cause = ex; } String message = String.format("Could not create %s of type %s.", ATNState.class.getName(), nodeType.getName()); throw new UnsupportedOperationException(message, cause); }
public <T extends ATNState> T newState(Class<T> nodeType, GrammarAST node) { Exception cause; try { Constructor<T> ctor = nodeType.getConstructor(); T s = ctor.newInstance(); if ( currentRule==null ) s.setRuleIndex(-1); else s.setRuleIndex(currentRule.index); atn.addState(s); return s; } catch (InstantiationException ex) { cause = ex; } catch (IllegalAccessException ex) { cause = ex; } catch (IllegalArgumentException ex) { cause = ex; } catch (InvocationTargetException ex) { cause = ex; } catch (NoSuchMethodException ex) { cause = ex; } catch (SecurityException ex) { cause = ex; } String message = String.format("Could not create %s of type %s.", ATNState.class.getName(), nodeType.getName()); throw new UnsupportedOperationException(message, cause); }
public <T extends ATNState> T newState(Class<T> nodeType, GrammarAST node) { Exception cause; try { Constructor<T> ctor = nodeType.getConstructor(); T s = ctor.newInstance(); if ( currentRule==null ) s.setRuleIndex(-1); else s.setRuleIndex(currentRule.index); atn.addState(s); return s; } catch (InstantiationException ex) { cause = ex; } catch (IllegalAccessException ex) { cause = ex; } catch (IllegalArgumentException ex) { cause = ex; } catch (InvocationTargetException ex) { cause = ex; } catch (NoSuchMethodException ex) { cause = ex; } catch (SecurityException ex) { cause = ex; } String message = String.format("Could not create %s of type %s.", ATNState.class.getName(), nodeType.getName()); throw new UnsupportedOperationException(message, cause); }
@NotNull public <T extends ATNState> T newState(@NotNull Class<T> nodeType, GrammarAST node) { Exception cause; try { Constructor<T> ctor = nodeType.getConstructor(); T s = ctor.newInstance(); if ( currentRule==null ) s.setRuleIndex(-1); else s.setRuleIndex(currentRule.index); atn.addState(s); return s; } catch (InstantiationException ex) { cause = ex; } catch (IllegalAccessException ex) { cause = ex; } catch (IllegalArgumentException ex) { cause = ex; } catch (InvocationTargetException ex) { cause = ex; } catch (NoSuchMethodException ex) { cause = ex; } catch (SecurityException ex) { cause = ex; } String message = String.format("Could not create %s of type %s.", ATNState.class.getName(), nodeType.getName()); throw new UnsupportedOperationException(message, cause); }
@NotNull public ATNState newState(@Nullable GrammarAST node) { ATNState n = new BasicState(); n.setRuleIndex(currentRule.index); atn.addState(n); return n; }
atn.addState(null); continue; endStateNumbers.add(new Pair<BlockStartState, Integer>((BlockStartState)s, endStateNumber)); atn.addState(s); BasicBlockStartState bypassStart = new BasicBlockStartState(); bypassStart.ruleIndex = i; atn.addState(bypassStart); atn.addState(bypassStop); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i])); bypassStart.addTransition(new EpsilonTransition(matchState));
atn.addState(null); continue; endStateNumbers.add(Tuple.create((BlockStartState)s, endStateNumber)); atn.addState(s); BasicBlockStartState bypassStart = new BasicBlockStartState(); bypassStart.ruleIndex = i; atn.addState(bypassStart); atn.addState(bypassStop); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i])); bypassStart.addTransition(new EpsilonTransition(matchState));
atn.addState(null); continue; endStateNumbers.add(new Pair<BlockStartState, Integer>((BlockStartState)s, endStateNumber)); atn.addState(s); BasicBlockStartState bypassStart = new BasicBlockStartState(); bypassStart.ruleIndex = i; atn.addState(bypassStart); atn.addState(bypassStop); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i])); bypassStart.addTransition(new EpsilonTransition(matchState));
atn.addState(null); continue; endStateNumbers.add(new Pair<BlockStartState, Integer>((BlockStartState)s, endStateNumber)); atn.addState(s); BasicBlockStartState bypassStart = new BasicBlockStartState(); bypassStart.ruleIndex = i; atn.addState(bypassStart); atn.addState(bypassStop); atn.addState(matchState); matchState.addTransition(new AtomTransition(bypassStop, atn.ruleToTokenType[i])); bypassStart.addTransition(new EpsilonTransition(matchState));
ATNState intermediateState = new BasicState(); intermediateState.setRuleIndex(target.ruleIndex); atn.addState(intermediateState); optimizedTransitions.add(new EpsilonTransition(intermediateState));
atn.addState(setOptimizedState);