public LRParseTableDerivationPane(GrammarEnvironment environment) {
		super(new BorderLayout());
		Grammar g = environment.getGrammar();
		augmentedGrammar = Operations.getAugmentedGrammar(g);
        if(augmentedGrammar == null) return;
		JPanel right = new JPanel(new BorderLayout());

		// right.setLayout(new BoxLayout(right, BoxLayout.Y_AXIS));

		JLabel description = new JLabel();
		right.add(description, BorderLayout.NORTH);

		// FirstFollowModel ffmodel = new FirstFollowModel(g);
		FirstFollowTable fftable = new FirstFollowTable(g);
		fftable.getColumnModel().getColumn(0).setPreferredWidth(30);
		right.add(new JScrollPane(fftable));
		fftable.getFFModel().setCanEditFirst(true);
		fftable.getFFModel().setCanEditFollow(true);

		dfa = new FiniteStateAutomaton();
		// The right split pane.
		controller = new LRParseDerivationController(g, augmentedGrammar,
				environment, fftable, description, dfa, this);
		JPanel editorHolder = new JPanel(new BorderLayout());
		EditorPane editor = createEditor(editorHolder);
		controller.editor = editor;
		editorHolder.add(editor, BorderLayout.CENTER);
		split = SplitPaneFactory.createSplit(environment, false, 0.4,
				new JScrollPane(fftable), editorHolder);
		split2 = SplitPaneFactory.createSplit(environment, false, 0.7, split,
				null);
		right.add(split2, BorderLayout.CENTER);

		GrammarTable table = new GrammarTable(
				new gui.grammar.GrammarTableModel(augmentedGrammar) {
					public boolean isCellEditable(int r, int c) {
						return false;
					}
				}) {
			public String getToolTipText(MouseEvent event) {
				try {
					int row = rowAtPoint(event.getPoint());
					return getGrammarModel().getProduction(row).toString()
							+ " is production " + row;
				} catch (Throwable e) {
					return null;
				}
			}
		};
		JSplitPane big = SplitPaneFactory.createSplit(environment, true, 0.3,
				table, right);
		this.add(big, BorderLayout.CENTER);

		// Make the tool bar.
		JToolBar toolbar = new JToolBar();
		toolbar.add(controller.doSelectedAction);
		toolbar.add(controller.doStepAction);
		toolbar.add(controller.doAllAction);
		toolbar.addSeparator();
		toolbar.add(controller.nextAction);
		toolbar.addSeparator();
		toolbar.add(controller.parseAction);
		this.add(toolbar, BorderLayout.NORTH);
	}