checkpoint
[sbp.git] / src / edu / berkeley / sbp / meta / MetaGrammarBindings.java
index c7952b0..fcb775b 100644 (file)
@@ -92,7 +92,7 @@ public class MetaGrammarBindings {
         
         System.err.println("#import " + fileName + " as " + as);
         try {
-            Tree t = new CharParser(MetaGrammar.make()).parse(new FileInputStream(fileName)).expand1();
+            Tree t = new CharParser(MetaGrammar.make()).parse(new FileInputStream("tests/"+fileName)).expand1();
             Tree.TreeFunctor<Object,Object> red = (Tree.TreeFunctor<Object,Object>)t.head();
             String oldprefix = prefix;
             prefix = as;
@@ -261,7 +261,8 @@ public class MetaGrammarBindings {
             Sequence ret = null;
             if (dropAll)     ret = Sequence.drop(els, false);
             else {
-                ret = cx.rm.tryResolveTag(tag, cnt==null?null:cnt.name, els, drops);
+                Production prod = new Production(tag, (cnt==null?null:cnt.name), els, drops);
+                ret = cx.rm.tryResolveTag(prod);
                 if (ret == null) {
                     int idx = -1;
                     for(int i=0; i<els.length; i++)