checkpoint
[sbp.git] / src / edu / berkeley / sbp / misc / RegressionTests.java
index a7fb1c8..1646a17 100644 (file)
@@ -4,11 +4,12 @@ import java.util.*;
 import java.lang.reflect.*;
 import edu.berkeley.sbp.*;
 import edu.berkeley.sbp.misc.*;
+import edu.berkeley.sbp.meta.*;
 import edu.berkeley.sbp.bind.*;
 import edu.berkeley.sbp.tib.*;
 import edu.berkeley.sbp.chr.*;
 import edu.berkeley.sbp.util.*;
-import static edu.berkeley.sbp.misc.MetaGrammar.*;
+import static edu.berkeley.sbp.meta.MetaGrammar.*;
 
 public class RegressionTests {
 
@@ -89,25 +90,14 @@ public class RegressionTests {
         }
     }
 
-    public static class TestCaseMaker extends ReflectiveMeta {
+    public static class TestCaseMaker extends AnnotationGrammarBindingResolver {
         public TestCaseMaker() {
-            super(TestCaseMakerHelper.class, new Class[] {
-                     MG.Grammar.class,
-                     MG.NonTerminal.class,
-                     MG.AnonUn.class,
-                     MG.Range.class,
-                     MG.El.class,
-                     MG.Seq.class,
-                     MG.NonTerminalReference.class,
-                     MG.StringLiteral.class,
-                     MG.XTree.class,
-                     MG.CharClass.class
-            });
+            super(TestCaseMakerHelper.class);
         }
-        public static class TestCaseMakerHelper extends MG {
+        public static class TestCaseMakerHelper extends MetaGrammarBindings {
             public static @bind.as("grammaro") @bind.raw Object grammaro(Iterable<Tree> t) {
                 System.out.println("working on " + t);
-                return MetaGrammar.make(t.iterator().next(), "s", new ReflectiveMetaPlain());
+                return MetaGrammar.make(t.iterator().next(), "s", new TaggingGrammarBindingResolver());
             }
             //public static @bind.as("tca")           Object tca(Object[] o) throws IOException {
             //return new TestCase((String)o[0], (String[])o[1], (Union)o[2], false, false); }