X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2Fmeta%2FRepeat.java;h=680b63699f0677dd842d079af911c134e8bbd86c;hp=f21e8209b6b58d06592caae54f00ca1d38b71571;hb=4378d20232cd88fb2a57edc5a5114f952ab58a18;hpb=e6be1f03f79b16cd410991d7e64cfa7beab6de59 diff --git a/src/edu/berkeley/sbp/meta/Repeat.java b/src/edu/berkeley/sbp/meta/Repeat.java index f21e820..680b636 100644 --- a/src/edu/berkeley/sbp/meta/Repeat.java +++ b/src/edu/berkeley/sbp/meta/Repeat.java @@ -18,21 +18,21 @@ public class Repeat extends Union { protected Repeat(final Element e, boolean zeroOkay, boolean manyOkay, final Element separator, boolean maximal, Object tag, Atom follow) { super(e+(!manyOkay ? "?" : (zeroOkay ? (maximal ? "**" : "*") : (maximal ? "++" : "+")))+(separator==null?"":("/"+separator)), true); if (zeroOkay && !manyOkay) { - add(Sequence.empty().followedBy(follow)); - add(Sequence.singleton(e).followedBy(follow)); + add(Sequence.newEmptySequence().followedBy(follow)); + add(Sequence.newSingletonSequence(e).followedBy(follow)); return; } if (zeroOkay) { - add(Sequence.rewritingSequence(tag, new Element[] { }, null).followedBy(follow)); + add(Sequence.newRewritingSequence(tag, new Element[] { }, null).followedBy(follow)); //add(new Sequence.Constant.Empty()); // FUGLY - add(Sequence.singleton(many1(e, separator, tag)).followedBy(follow)); + add(Sequence.newSingletonSequence(many1(e, separator, tag)).followedBy(follow)); } else { - add(Sequence.rewritingSequence(tag, new Element[] { e }, null).followedBy(follow)); + add(Sequence.newRewritingSequence(tag, new Element[] { e }, null).followedBy(follow)); if (separator==null) - add(Sequence.unwrap(new Element[] { e, Repeat.this }, tag, new boolean[] { false, false }).followedBy(follow)); + add(Sequence.newUnwrapSequence(new Element[] { e, Repeat.this }, tag, new boolean[] { false, false }).followedBy(follow)); else - add(Sequence.unwrap(new Element[] { e, separator, Repeat.this }, tag, new boolean[] { false, true, false }).followedBy(follow)); + add(Sequence.newUnwrapSequence(new Element[] { e, separator, Repeat.this }, tag, new boolean[] { false, true, false }).followedBy(follow)); } }