private SPPFNode getExpectedSPPF() { NonterminalSymbolNode node1 = new NonterminalSymbolNode(grammar.getNonterminalByName("S"), 0, 6); NonterminalSymbolNode node2 = new NonterminalSymbolNode(grammar.getNonterminalByName("forall"), 0, 6); node1.addChild(node2); return node1; }
@Test public void test() throws ParseError { NonterminalSymbolNode sppf = levelParser.parse(Input.fromString("forall"), grammar, "S"); assertTrue(sppf.deepEquals(getExpectedSPPF())); }