checkpoint
[sbp.git] / src / edu / berkeley / sbp / meta / MetaGrammar.java
index 32cac8a..5772906 100644 (file)
@@ -106,7 +106,6 @@ public class MetaGrammar {
                                                 _bindable,
                                                 isRaw()) {
                             public Object invoke(Iterable<Tree<Object>> t) {
-                                if (_israw) return _bindable.impose(new Object[] { t });
                                 ArrayList ret = new ArrayList();
                                 ret.add(region);
                                 for(Tree tc : t) {
@@ -140,8 +139,7 @@ public class MetaGrammar {
                                                   p.elements,
                                                   p.drops);
             return Sequence.rewritingSequence(new TreeBindableReducer(buildSequence(p),
-                                                                      _bindable,
-                                                                      isRaw()),
+                                                                      _bindable),
                                               p.elements,
                                               p.drops);
         }
@@ -151,26 +149,22 @@ public class MetaGrammar {
     public static class TreeBindableReducer implements Tree.TreeFunctor<Object,Object>, ToJava {
          int[] map;
          Bindable _bindable;
-         boolean _israw;
 
         public void toJava(StringBuffer sb) {
             sb.append("new MetaGrammar.TreeBindableReducer(new int[] {");
             for(int i=0; i<map.length; i++) sb.append((i+"")+(i<map.length-1 ? "," : ""));
             sb.append("}, ");
             _bindable.toJava(sb);
-            sb.append(", ");
-            sb.append(_israw ? "true" : "false");
             sb.append(")");
         }
         
+        public TreeBindableReducer(int[] map, Bindable b) { this(map,b, false); }
         public TreeBindableReducer(int[] map, Bindable b, boolean raw) {
             this.map = map;
             this._bindable = b;
-            this._israw = raw;
         }
         public String toString() { return "reducer-"+_bindable.toString(); }
         public Object invoke(Iterable<Tree<Object>> t) {
-            if (_israw) return _bindable.createBinding().invoke(new Object[] { t });
             ArrayList ret = new ArrayList();
             for(Tree tc : t) {
                 if (tc.head() != null && tc.head() instanceof Functor)