}
public void testReplace1() throws Exception{
Grammar g = new Parser(DIR + "test_replace1.txt").parse();
GrammarElementReplacer ger = new GrammarElementReplacer(g.getNonterminal("X"), g.getNonterminal("S"));
g.accept(ger);
compareIgnoreNewlines(g.toString(), DIR + "test_replace1_expected.txt");
}
//----------------------------------------------------------------------
private Grammar checkNonCNF(String string, String start) throws IOException{