checkpoint
[sbp.git] / src / edu / berkeley / sbp / misc / Demo.java
index d29a8f9..212e60e 100644 (file)
@@ -273,6 +273,19 @@ public class Demo {
                 for(int i=0; i<o.length; i++) o2[map[i]] = o[i];
                 return plant(o2);
             }
                 for(int i=0; i<o.length; i++) o2[map[i]] = o[i];
                 return plant(o2);
             }
+            public int[] buildSequence(Production p) {
+                Annotation[][] annotations = _bindable.getArgAnnotations();
+                String[]       names       = _bindable.getArgNames();
+                String name = _bindable.getSimpleName();
+                int len = annotations.length;
+                int ofs = 0;
+                bind.arg[] argtags  = new bind.arg[len];
+                for(int i=0; i<names.length; i++)
+                    for(Annotation a : annotations[i+ofs])
+                        if (a instanceof bind.arg)
+                            argtags[i+ofs] = (bind.arg)a;
+                return Target.this.buildSequence(p, names, argtags);
+            }
         }
     }
 
         }
     }
 
@@ -310,8 +323,8 @@ public class Demo {
                 ofs++;
             }
             */
                 ofs++;
             }
             */
-            String[] names   = new String[len];
-            bind.arg[]    argtags = new bind.arg[len];
+            String[] names      = new String[len];
+            bind.arg[] argtags  = new bind.arg[len];
             for(int i=0; i<names.length; i++)
                 for(Annotation a : annotations[i+ofs])
                     if (a instanceof bind.arg)
             for(int i=0; i<names.length; i++)
                 for(Annotation a : annotations[i+ofs])
                     if (a instanceof bind.arg)