public void DumpDeadEndConfigs(NoViableAltException nvae)
{
Console.Error.WriteLine("dead end configs: ");
foreach (ATNConfig c in nvae.DeadEndConfigs.configs)
{
String trans = "no edges";
if (c.state.NumberOfTransitions > 0)
{
Transition t = c.state.Transition(0);
if (t is AtomTransition)
{
AtomTransition at = (AtomTransition)t;
trans = "Atom " + GetTokenName(at.token);
}
else if (t is SetTransition)
{
SetTransition st = (SetTransition)t;
bool not = st is NotSetTransition;
trans = (not ? "~" : "") + "Set " + st.set.ToString();
}
}
Console.Error.WriteLine(c.ToString(parser, true) + ":" + trans);
}
}