public String[] getDependencies(String variable, Grammar grammar,
			VariableDependencyGraph graph) {
		ArrayList list = new ArrayList();
		String[] variables = grammar.getVariables();
		for (int k = 0; k < variables.length; k++) {
			if (!variable.equals(variables[k])) {
				if (isDependentOn(variable, variables[k], graph)) {
					list.add(variables[k]);
				}
			}
		}
		return (String[]) list.toArray(new String[0]);
	}