column = decisionASTNode.getCharPositionInLine();
String fileName = probe.dfa.nfa.grammar.getFileName();
if ( fileName!=null ) {
file = fileName;
}
ST st = getMessageTemplate();
// convert to string key to avoid 3.1 ST bug
Map<String, Set<Token>> altToLocationsWithStringKey = new LinkedHashMap<String, Set<Token>>();
List<Integer> alts = new ArrayList<Integer>();
alts.addAll(altToLocations.keySet());
Collections.sort(alts);
for (Integer altI : alts) {
altToLocationsWithStringKey.put(altI.toString(), altToLocations.get(altI));
/*
List<String> tokens = new ArrayList<String>();
for (Token t : altToLocations.get(altI)) {
tokens.add(t.toString());
}
Collections.sort(tokens);
System.out.println("tokens=\n"+tokens);
*/
}
st.add("altToLocations", altToLocationsWithStringKey);
List<Label> sampleInputLabels = problemState.dfa.probe.getSampleNonDeterministicInputSequence(problemState);
String input = problemState.dfa.probe.getInputSequenceDisplay(sampleInputLabels);
st.add("upon", input);
st.add("hasPredicateBlockedByAction", problemState.dfa.hasPredicateBlockedByAction);
return super.toString(st);
}