dumpDeadEndConfigs method
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.
Implementation
void dumpDeadEndConfigs(NoViableAltException nvae) {
log('dead end configs: ', level: Level.SEVERE.value);
for (var c in nvae.deadEndConfigs!) {
var trans = 'no edges';
if (c.state.numberOfTransitions > 0) {
final t = c.state.transition(0);
if (t is AtomTransition) {
final at = t;
trans = 'Atom ' + getTokenName(at.atomLabel);
} else if (t is SetTransition) {
final st = t;
final not = st is NotSetTransition;
trans = (not ? '~' : '') + 'Set ' + st.label.toString();
}
}
log(c.toString(parser, true) + ':' + trans, level: Level.SEVERE.value);
}
}