X-Git-Url: http://git.megacz.com/?p=sbp.git;a=blobdiff_plain;f=src%2Fedu%2Fberkeley%2Fsbp%2FUnion.java;h=dce9cbec6351ea31480c0ee3a96ea2a59362e565;hp=70a3e45753a8e4912a2edf343a8131922d5cd592;hb=6b24a8ff6410a47d7290c2b42587fd8a8c5341e8;hpb=5d18f5606c9296e6b0c5749f05fc68f358ace2f6 diff --git a/src/edu/berkeley/sbp/Union.java b/src/edu/berkeley/sbp/Union.java index 70a3e45..dce9cbe 100644 --- a/src/edu/berkeley/sbp/Union.java +++ b/src/edu/berkeley/sbp/Union.java @@ -25,13 +25,8 @@ public class Union extends Element implements Iterable { this.synthetic = synthetic; } - /** display form for the Union (ie not including the RHS) */ final String shortForm; - - /** this is just a hint to use when printing out the grammar in visual form */ final boolean synthetic; - - /** the actual alternatives */ private final List alternatives = new ArrayList(); public Iterator iterator() { return alternatives.iterator(); } @@ -74,6 +69,7 @@ public class Union extends Element implements Iterable { if (alternatives.size()==0) { sb.append(StringUtil.pad(15, shortForm) + " = "); } else for(Sequence s : this) { + // FIXME: what to do here about printing out negated sequences? sb.append(StringUtil.pad(15, first ? shortForm : "") + (first ? " = " : " | ")); first = false; sb.append(s.toString());