public Production[] getProductionsToAddToGrammar(Grammar grammar,
			Set lambdaSet) {
		ArrayList list = new ArrayList();
		Production[] productions = grammar.getProductions();
		for (int k = 0; k < productions.length; k++) {
			Production[] prods = getProductionsToAddForProduction(
					productions[k], lambdaSet);
			for (int j = 0; j < prods.length; j++) {
				list.add(prods[j]);
			}
		}
		return (Production[]) list.toArray(new Production[0]);
	}