public void printGrammar(Grammar grammar) {
		int emptyRules = 0, injections = 0;
		for (Production p : grammar.productions) {
			if (p.reachable) {
				if (p.isEmpty()) {
					++emptyRules;
				} else if (p.isInjection()) {
					++injections;
				}
			}
		}
		
		monitor.println("Empty production rules: " + emptyRules);
		monitor.println("Injections: " + injections + "\n");			
		
		monitor.println("Nonterminal usage (in reachable productions):");
		grammar.printNonTerminalUsage(monitor);
		
		monitor.println("\nProductions:");
		for (NonTerminal n : grammar.nonTerminals.values()) {
			for (Production p : n.productions) {
				monitor.println("" + p.nr + ": " + (p.reachable ? "r" : " ") + (p.usedForReject ? "u" : " ") + " " + p);
			}
		}
		
		grammar.printFirstAndFollow(monitor);
		grammar.printPrioritiesAndFollowRestrictions(monitor);
	}