TreeWizard wiz = new TreeWizard(adaptor, tokens);
CommonTree t = (CommonTree)wiz.create("(A B[T__32] (C (D E[a])))");
// C pattern has no text arg so despite [bar] in t, no need
// to match text--check structure only.
boolean valid = wiz.parse(t, "(A B[foo] C)");
assertEquals("(A T__32 (C (D a)))", t.toStringTree());
}
@Test public void testParseWithTextFails() throws Exception {
TreeWizard wiz = new TreeWizard(adaptor, tokens);
CommonTree t = (CommonTree)wiz.create("(A B C)");