public static void printGrammarByAnchors(Grammar grammar)
{
for(String cat : grammar.getAllCategories())
{
System.out.println("Cat: " + cat);
List<GrammarEntry> entries = new ArrayList<GrammarEntry>(grammar.getEntriesByAnchorCategory(new FeatureConstant(cat)));
Grammar.sortByTreeSize(entries);
Grammar.printShort(entries);
System.out.println("\n");
}
}