checkpoint
[sbp.git] / src / edu / berkeley / sbp / Sequence.java
index 68e9357..1adfadd 100644 (file)
@@ -32,6 +32,7 @@ public abstract class Sequence extends Element implements Iterable<Element> {
 
     /** after matching the sequence, place the result of the <tt>idx</tt>th match in the output tree */
     public static Sequence singleton(Element[] e, int idx) { return new Singleton(e, idx); }
+    public static Sequence singleton(Element e) { return singleton(new Element[] { e }, 0); }
 
     /**
      *  after matching the sequence, create the specified output tree