public void createStatesForConversion(Grammar grammar, Automaton automaton) {
		initialize();
		StatePlacer sp = new StatePlacer();

		State initialState = automaton.createState(sp
				.getPointForState(automaton));
		automaton.setInitialState(initialState);

		State intermediateState = automaton.createState(sp
				.getPointForState(automaton));
		INTERMEDIATE_STATE = intermediateState;

		State finalState = automaton
				.createState(sp.getPointForState(automaton));
		automaton.addFinalState(finalState);

		String startVariable = grammar.getStartVariable();
		String temp = startVariable.concat(BOTTOM_OF_STACK);
		PDATransition trans1 = new PDATransition(initialState,
				intermediateState, "", BOTTOM_OF_STACK, temp);
		automaton.addTransition(trans1);
		PDATransition trans2 = new PDATransition(intermediateState, finalState,
				"", BOTTOM_OF_STACK, "");
		automaton.addTransition(trans2);

		String[] terminals = grammar.getTerminals();
		for (int k = 0; k < terminals.length; k++) {
			PDATransition trans = new PDATransition(intermediateState,
					intermediateState, terminals[k], terminals[k], "");
			automaton.addTransition(trans);
		}

	}