Grammar implements Mapper { public Symbol getStartSymbol() { if (rules.size() > 0) { return rules.get(startSymbol_index).getLHS(); } return null; } Grammar();   Grammar(Grammar copy); abstract boolean genotype2Phenotype(); abstract boolean phenotype2Genotype(); abstract String getDerivationString(); abstract void clear(); Symbol getStartSymbol(); boolean setStartSymbol(Symbol newStartSymbol); boolean setStartSymbol(String newStartSymbol); Rule getStartRule(); ArrayList<Rule> getRules(); int getProductionCount(); void setRules(ArrayList<Rule> newRules); ArrayList<Symbol> getTerminals(); ArrayList<String> getTerminalStrings();  }
@Test public void testGetStartSymbol() { System.out.println("* GrammarTest: getStartSymbol"); Symbol s = new Symbol(startSymbol); assertEquals(true, g.getStartSymbol().equals(s)); }