removed illegal use of double-star
[sbp.git] / src / edu / berkeley / sbp / Repeat.java
index 2365cbd..48ac386 100644 (file)
@@ -30,7 +30,7 @@ public class Repeat extends Union {
 
     Repeat(final Element e, boolean zeroOkay, boolean manyOkay) { this(e, zeroOkay, manyOkay, null); }
     Repeat(final Element e, boolean zeroOkay, boolean manyOkay, Element separator) {
-        super(e+(!manyOkay ? "?" : (zeroOkay ? "*" : "+")), true);
+        super(e+(!manyOkay ? "?" : (zeroOkay ? "*" : "+"))+(separator==null?"":("/"+separator.toString())), true);
         this.e = e;
         this.zeroOkay = zeroOkay;
         this.manyOkay = manyOkay;
@@ -51,8 +51,12 @@ public class Repeat extends Union {
 
     static class MaximalSequence extends Sequence.Singleton {
         private final Element e;
-        public String toString() { return e+"@";}
-        public MaximalSequence(Element e) { super(e, null, null); this.e = e; }
+        public String toString() { return e+"@"; }
+        public Topology noFollow() { return e.toAtom(); }
+        public MaximalSequence(Element e) {
+            super(e, null, null);
+            this.e = e;
+        }
     }
     static class Maximal extends Union {
         public Maximal(final Element e) {