public static Production[] getNonUnitProductionsOnVariable(String variable,
			Grammar grammar) {
		ArrayList list = new ArrayList();
		ProductionChecker pc = new ProductionChecker();
		Production[] productions = grammar.getProductions();
		for (int k = 0; k < productions.length; k++) {
			if (variable.equals(productions[k].getLHS())
					&& !ProductionChecker.isUnitProduction(productions[k])) {
				list.add(productions[k]);
			}
		}
		return (Production[]) list.toArray(new Production[0]);
	}