TestCase[] expanded = (TestCase[])new TestCaseBuilder().walk(r2.expand1());
System.err.println("executing...");
- for(TestCase tc : expanded) tc.execute();
+ for(TestCase tc : expanded) {
+ tc.execute();
+ /*
+ String st = "a";
+ for(int i=0; i<12; i++) {
+ //System.out.println("length " + st.length());
+ tc.input = st;
+ long nowy = System.currentTimeMillis();
+ GSS.shifts = 0;
+ GSS.reductions = 0;
+ tc.execute();
+ System.out.println("length " + st.length() + " => " + ((System.currentTimeMillis()-nowy)/1000.0) + " " + GSS.shifts + " " + GSS.reductions);
+ st = st+st;
+ }
+ */
+ }
} catch (Throwable t) {
System.err.println("\n\nexception thrown, class == " + t.getClass().getName());
public static class TestCase {
private final boolean tib;
private final boolean jav;
- public final String input;
+ public /*final*/ String input;
public final String[] output;
public final Union grammar;
public TestCase(String input, String[] output, Union grammar, boolean tib, boolean jav) throws IOException {
Forest<String> res = null;
ParseFailed pfe = null;
CharParser parser = new CharParser(grammar);
- parser.helpgc = false;
+ //parser.helpgc = false;
try {
res = tib
? /*new CharParser(grammar).parse(new Tib(input))*/ null
pfe = pf;
}
//ystem.out.println("res=="+res);
+
if (graph) {
FileOutputStream fos = new FileOutputStream("out.dot");
PrintWriter p = new PrintWriter(new OutputStreamWriter(fos));
return true;
}
System.out.println("\r\033[32mPASS\033[0m ");
+
return false;
}
}