checkpoint
[sbp.git] / src / edu / berkeley / sbp / Union.java
index 77a1581..d52c6e9 100644 (file)
@@ -52,12 +52,20 @@ public class Union extends Element implements Iterable<Sequence> {
 
     /** adds an alternative */
     public void add(Sequence s) {
+        /*
+          FIXME
         if (viewed)
-            throw new RuntimeException("attempt to add a Sequence to a Union that has already been examined");
+            throw new RuntimeException("attempt to add a Sequence to a Union that has already been examined:\n  "+this);
+        */
         if (alternatives.contains(s)) return;
         alternatives.add(s);
     }
 
+    /** adds a one-element sequence */
+    public void add(Element e) {
+        add(Sequence.create(e));
+    }
+
 
     // Epsilon Form //////////////////////////////////////////////////////////////////////////////