@Override public String toString() { return toString(null, true); }
/** Used for debugging in adaptivePredict around execATN but I cut * it out for clarity now that alg. works well. We can leave this * "dead" code for a bit. */ public void dumpDeadEndConfigs(NoViableAltException nvae) { System.err.println("dead end configs: "); for (ATNConfig c : nvae.getDeadEndConfigs()) { String trans = "no edges"; if ( c.state.getNumberOfTransitions()>0 ) { Transition t = c.state.transition(0); if ( t instanceof AtomTransition) { AtomTransition at = (AtomTransition)t; trans = "Atom "+getTokenName(at.label); } else if ( t instanceof SetTransition ) { SetTransition st = (SetTransition)t; boolean not = st instanceof NotSetTransition; trans = (not?"~":"")+"Set "+st.set.toString(); } } System.err.println(c.toString(parser, true)+":"+trans); } }
@Override public String toString() { return toString(null, true); }
@Override public String toString() { return toString(null, true); }
@Override public String toString() { return toString(null, true, false); }
@Override public String toString() { return toString(null, true); }
public String toString(@Nullable Recognizer<?, ?> recog, boolean showAlt) { return toString(recog, showAlt, true); }
buf.append(", "); buf.append(sortedConfigs.get(i).toString(null, true, showContext));
ATNConfig c = configsInAlt.get(cIndex); n++; buf.append(c.toString(null, false)); if ( (cIndex+1)<configsInAlt.size() ) { buf.append(", ");
ATNConfig c = configsInAlt.get(cIndex); n++; buf.append(c.toString(null, false)); if ( (cIndex+1)<configsInAlt.size() ) { buf.append(", ");
ATNConfig c = configsInAlt.get(cIndex); n++; buf.append(c.toString(null, false)); if ( (cIndex+1)<configsInAlt.size() ) { buf.append(", ");
ATNConfig c = configsInAlt.get(cIndex); n++; buf.append(c.toString(null, false)); if ( (cIndex+1)<configsInAlt.size() ) { buf.append(", ");
ATNConfig c = configsInAlt.get(cIndex); n++; buf.append(c.toString(null, false)); if ( (cIndex+1)<configsInAlt.size() ) { buf.append(", ");
/** Used for debugging in adaptivePredict around execATN but I cut * it out for clarity now that alg. works well. We can leave this * "dead" code for a bit. */ public void dumpDeadEndConfigs(NoViableAltException nvae) { System.err.println("dead end configs: "); for (ATNConfig c : nvae.getDeadEndConfigs()) { String trans = "no edges"; if ( c.state.getNumberOfTransitions()>0 ) { Transition t = c.state.transition(0); if ( t instanceof AtomTransition) { AtomTransition at = (AtomTransition)t; trans = "Atom "+getTokenName(at.label); } else if ( t instanceof SetTransition ) { SetTransition st = (SetTransition)t; boolean not = st instanceof NotSetTransition; trans = (not?"~":"")+"Set "+st.set.toString(); } } System.err.println(c.toString(parser, true)+":"+trans); } }
/** Used for debugging in adaptivePredict around execATN but I cut * it out for clarity now that alg. works well. We can leave this * "dead" code for a bit. */ public void dumpDeadEndConfigs(NoViableAltException nvae) { System.err.println("dead end configs: "); for (ATNConfig c : nvae.getDeadEndConfigs()) { String trans = "no edges"; if ( c.state.getNumberOfTransitions()>0 ) { Transition t = c.state.transition(0); if ( t instanceof AtomTransition) { AtomTransition at = (AtomTransition)t; trans = "Atom "+getTokenName(at.label); } else if ( t instanceof SetTransition ) { SetTransition st = (SetTransition)t; boolean not = st instanceof NotSetTransition; trans = (not?"~":"")+"Set "+st.set.toString(); } } System.err.println(c.toString(parser, true)+":"+trans); } }
/** Used for debugging in adaptivePredict around execATN but I cut * it out for clarity now that alg. works well. We can leave this * "dead" code for a bit. */ public void dumpDeadEndConfigs(NoViableAltException nvae) { System.err.println("dead end configs: "); for (ATNConfig c : nvae.getDeadEndConfigs()) { String trans = "no edges"; if ( c.state.getNumberOfTransitions()>0 ) { Transition t = c.state.transition(0); if ( t instanceof AtomTransition) { AtomTransition at = (AtomTransition)t; trans = "Atom "+getTokenName(at.label); } else if ( t instanceof SetTransition ) { SetTransition st = (SetTransition)t; boolean not = st instanceof NotSetTransition; trans = (not?"~":"")+"Set "+st.set.toString(); } } System.err.println(c.toString(parser, true)+":"+trans); } }
public void dumpDeadEndConfigs(@NotNull NoViableAltException nvae) { System.err.println("dead end configs: "); for (ATNConfig c : nvae.getDeadEndConfigs()) { String trans = "no edges"; if ( c.getState().getNumberOfOptimizedTransitions()>0 ) { Transition t = c.getState().getOptimizedTransition(0); if ( t instanceof AtomTransition) { AtomTransition at = (AtomTransition)t; trans = "Atom "+getTokenName(at.label); } else if ( t instanceof SetTransition ) { SetTransition st = (SetTransition)t; boolean not = st instanceof NotSetTransition; trans = (not?"~":"")+"Set "+st.set.toString(); } } System.err.println(c.toString(parser, true)+":"+trans); } }