public void addAllNewProductionsToGrammar(Grammar oldGrammar,
			Grammar newGrammar, VariableDependencyGraph graph) {
		GrammarChecker gc = new GrammarChecker();
		String[] variables = oldGrammar.getVariables();
		for (int k = 0; k < variables.length; k++) {
			String v1 = variables[k];
			String[] dep = getDependencies(v1, oldGrammar, graph);
			for (int i = 0; i < dep.length; i++) {
				Production[] prods = GrammarChecker
						.getNonUnitProductionsOnVariable(dep[i], oldGrammar);
				newGrammar.addProductions(getNewProductions(v1, prods));
			}
		}
	}