bug with nonvalid end-iterator for alreadyPrinted set in
Grammar::printRulesForNonterminal method is fix