public string NameOf(int symbol) {
foreach (DictionaryEntry de in names) {
if ((int)de.Value == symbol) {
return ((XmlQualifiedName)de.Key).ToString();
}
}
if (wildcards != null) {
foreach (DictionaryEntry de in wildcards) {
if ((int)de.Value == symbol) {
return (string)de.Key + ":*";
}
}
}
return "##other:*";
}
}
public override void Dump(StringBuilder bb, SymbolsDictionary symbols, Positions positions) { bb.Append("\"" + symbols.NameOf(positions[pos].symbol) + "\""); }