public void createStatesForConversion(Grammar grammar, Automaton automaton) {
		initialize();
		StatePlacer sp = new StatePlacer();
		String[] variables = grammar.getVariables();
		for (int k = 0; k < variables.length; k++) {
			String variable = variables[k];
			Point point = sp.getPointForState(automaton);
			State state = automaton.createState(point);
			if (variable.equals(grammar.getStartVariable()))
				automaton.setInitialState(state);
			state.setLabel(variable);
			mapStateToVariable(state, variable);
		}

		Point pt = sp.getPointForState(automaton);
		State finalState = automaton.createState(pt);
		automaton.addFinalState(finalState);
		mapStateToVariable(finalState, FINAL_STATE);
	}