convered maximal to use character lookahead
[sbp.git] / src / edu / berkeley / sbp / Sequence.java
index fcff530..d252604 100644 (file)
@@ -35,6 +35,13 @@ public abstract class Sequence extends Element implements Iterable<Element> {
 
     ////////////////////////////////////////////////////////////////////////////////
 
+    public Topology noFollow() { return null; }
+
+    Topology toAtom() {
+        if (elements.length!=1) throw new RuntimeException("cannot invoke toAtom() on a Sequence with " + elements.length + " elements: " + this);
+        return elements[0].toAtom();
+    }
+
     protected final Element[] elements;
 
     final HashSet<Sequence> needs;