public Production[] getProductionsToAddForProduction(Production production,
			Set lambdaSet) {
		// Stupid...
		/*
		 * ProductionChecker pc = new ProductionChecker(); String[] variables =
		 * production.getVariablesOnRHS(); ArrayList list = new ArrayList();
		 * for(int k = 0; k < variables.length; k++) {
		 * if(isInLambdaSet(variables[k],lambdaSet)) list.add(variables[k]); }
		 * String[] lambdaVar = (String[]) list.toArray(new String[0]); String[]
		 * combs = getCombinations(lambdaVar); ArrayList productions = new
		 * ArrayList(); for(int k = 0; k < combs.length; k++) { Production p =
		 * getProductionForCombination(production,combs[k]);
		 * if(!pc.isLambdaProduction(p)) productions.add(p); } return
		 * (Production[]) productions.toArray(new Production[0]);
		 */

		String[] start = new String[] { "" };
		String rhs = production.getRHS();
		for (int i = 0; i < rhs.length(); i++) {
			String v = rhs.substring(i, i + 1);
			if (lambdaSet.contains(v)) {
				String s[] = new String[start.length * 2];
				for (int j = 0; j < start.length; j++) {
					s[j] = start[j] + v;
					s[j + start.length] = start[j];
				}
				start = s;
			} else {
				for (int j = 0; j < start.length; j++)
					start[j] += v;
			}
		}
		Arrays.sort(start);
		ArrayList list = new ArrayList();
		String lhs = production.getLHS();
		for (int i = (start[0].length() == 0) ? 1 : 0; i < start.length; i++)
			list.add(new Production(lhs, start[i]));
		return (Production[]) list.toArray(new Production[0]);
	}