public String toString(Recognizer<?, ?> recog, boolean showAlt) { StringBuilder buf = new StringBuilder(); // if ( state.ruleIndex>=0 ) { // if ( recog!=null ) buf.append(recog.getRuleNames()[state.ruleIndex]+":"); // else buf.append(state.ruleIndex+":"); // } buf.append('('); buf.append(state); if ( showAlt ) { buf.append(","); buf.append(alt); } if ( context!=null ) { buf.append(",["); buf.append(context.toString()); buf.append("]"); } if ( semanticContext!=null && semanticContext != SemanticContext.NONE ) { buf.append(","); buf.append(semanticContext); } if ( getOuterContextDepth()>0 ) { buf.append(",up=").append(getOuterContextDepth()); } buf.append(')'); return buf.toString(); } }
hasSemanticContext = true; if (config.getOuterContextDepth() > 0) { dipsIntoOuterContext = true;
protected int getAltThatFinishedDecisionEntryRule(ATNConfigSet configs) { IntervalSet alts = new IntervalSet(); for (ATNConfig c : configs) { if ( c.getOuterContextDepth()>0 || (c.state instanceof RuleStopState && c.context.hasEmptyPath()) ) { alts.add(c.alt); } } if ( alts.size()==0 ) return ATN.INVALID_ALT_NUMBER; return alts.getMinElement(); }
public final boolean getReachesIntoOuterContext() { return getOuterContextDepth() != 0; }
public String toString(Recognizer<?, ?> recog, boolean showAlt) { StringBuilder buf = new StringBuilder(); // if ( state.ruleIndex>=0 ) { // if ( recog!=null ) buf.append(recog.getRuleNames()[state.ruleIndex]+":"); // else buf.append(state.ruleIndex+":"); // } buf.append('('); buf.append(state); if ( showAlt ) { buf.append(","); buf.append(alt); } if ( context!=null ) { buf.append(",["); buf.append(context.toString()); buf.append("]"); } if ( semanticContext!=null && semanticContext != SemanticContext.NONE ) { buf.append(","); buf.append(semanticContext); } if ( getOuterContextDepth()>0 ) { buf.append(",up=").append(getOuterContextDepth()); } buf.append(')'); return buf.toString(); } }
public String toString(Recognizer<?, ?> recog, boolean showAlt) { StringBuilder buf = new StringBuilder(); // if ( state.ruleIndex>=0 ) { // if ( recog!=null ) buf.append(recog.getRuleNames()[state.ruleIndex]+":"); // else buf.append(state.ruleIndex+":"); // } buf.append('('); buf.append(state); if ( showAlt ) { buf.append(","); buf.append(alt); } if ( context!=null ) { buf.append(",["); buf.append(context.toString()); buf.append("]"); } if ( semanticContext!=null && semanticContext != SemanticContext.NONE ) { buf.append(","); buf.append(semanticContext); } if ( getOuterContextDepth()>0 ) { buf.append(",up=").append(getOuterContextDepth()); } buf.append(')'); return buf.toString(); } }
public String toString(Recognizer<?, ?> recog, boolean showAlt) { StringBuilder buf = new StringBuilder(); // if ( state.ruleIndex>=0 ) { // if ( recog!=null ) buf.append(recog.getRuleNames()[state.ruleIndex]+":"); // else buf.append(state.ruleIndex+":"); // } buf.append('('); buf.append(state); if ( showAlt ) { buf.append(","); buf.append(alt); } if ( context!=null ) { buf.append(",["); buf.append(context.toString()); buf.append("]"); } if ( semanticContext!=null && semanticContext != SemanticContext.NONE ) { buf.append(","); buf.append(semanticContext); } if ( getOuterContextDepth()>0 ) { buf.append(",up=").append(getOuterContextDepth()); } buf.append(')'); return buf.toString(); } }
hasSemanticContext = true; if (config.getOuterContextDepth() > 0) { dipsIntoOuterContext = true;
hasSemanticContext = true; if (config.getOuterContextDepth() > 0) { dipsIntoOuterContext = true;
hasSemanticContext = true; if (config.getOuterContextDepth() > 0) { dipsIntoOuterContext = true;
buf.append(",up=").append(getOuterContextDepth());
protected int getAltThatFinishedDecisionEntryRule(ATNConfigSet configs) { IntervalSet alts = new IntervalSet(); for (ATNConfig c : configs) { if ( c.getOuterContextDepth()>0 || (c.state instanceof RuleStopState && c.context.hasEmptyPath()) ) { alts.add(c.alt); } } if ( alts.size()==0 ) return ATN.INVALID_ALT_NUMBER; return alts.getMinElement(); }
protected int getAltThatFinishedDecisionEntryRule(ATNConfigSet configs) { IntervalSet alts = new IntervalSet(); for (ATNConfig c : configs) { if ( c.getOuterContextDepth()>0 || (c.state instanceof RuleStopState && c.context.hasEmptyPath()) ) { alts.add(c.alt); } } if ( alts.size()==0 ) return ATN.INVALID_ALT_NUMBER; return alts.getMinElement(); }
protected int getAltThatFinishedDecisionEntryRule(ATNConfigSet configs) { IntervalSet alts = new IntervalSet(); for (ATNConfig c : configs) { if ( c.getOuterContextDepth()>0 || (c.state instanceof RuleStopState && c.context.hasEmptyPath()) ) { alts.add(c.alt); } } if ( alts.size()==0 ) return ATN.INVALID_ALT_NUMBER; return alts.getMinElement(); }
addKey = (mergedConfig == null); if (mergedConfig != null && canMerge(e, key, mergedConfig)) { mergedConfig.setOuterContextDepth(Math.max(mergedConfig.getOuterContextDepth(), e.getOuterContextDepth())); if (e.isPrecedenceFilterSuppressed()) { mergedConfig.setPrecedenceFilterSuppressed(true); ATNConfig unmergedConfig = unmerged.get(i); if (canMerge(e, key, unmergedConfig)) { unmergedConfig.setOuterContextDepth(Math.max(unmergedConfig.getOuterContextDepth(), e.getOuterContextDepth())); if (e.isPrecedenceFilterSuppressed()) { unmergedConfig.setPrecedenceFilterSuppressed(true);
c.setOuterContextDepth(config.getOuterContextDepth()); c.setPrecedenceFilterSuppressed(config.isPrecedenceFilterSuppressed()); assert depth > Integer.MIN_VALUE; c.setOuterContextDepth(c.getOuterContextDepth() + 1); if (!tail_call_preserves_sll && PredictionContext.isEmptyLocal(config.getContext())) { c.setOuterContextDepth(c.getOuterContextDepth() + 1);