+ ArrayList<TestCase> cases = new ArrayList<TestCase>();
+ Tree tt = r2.expand1();
+ for(int i=0; i<tt.size(); i++) {
+ Tree t = tt.child(i);
+ String[] expect = new String[t.child(2).size()];
+ for(int j=0; j<t.child(2).size(); j++)
+ expect[j] = stringifyChildren(t.child(2).child(j));
+ cases.add(new TestCase(stringifyChildren(t.child(0)),
+ stringifyChildren(t.child(1)),
+ expect,
+ GrammarAST.buildFromAST(t.child(3), "s", resolver),
+ false,
+ false));
+
+ }
+ TestCase[] expanded = new TestCase[cases.size()];
+ for(int i=0; i<expanded.length; i++)
+ expanded[i] = cases.get(i);