public static boolean isProductionInGrammar(Production production,
			Grammar grammar) {
		Production[] productions = grammar.getProductions();
		for (int k = 0; k < productions.length; k++) {
			if (production.equals(productions[k]))
				return true;
		}
		return false;
	}