make sure we track Input.Region for epsilon reductions (important for ambiguity-hunting)
[sbp.git] / src / edu / berkeley / sbp / Forest.java
index ee3bfbc..43ffb10 100644 (file)
@@ -21,6 +21,7 @@ public abstract class Forest<NodeType> implements GraphViz.ToGraphViz {
     public void expand(HashSet<Tree<NodeType>> ht) { expand(ht, new HashSet<Forest<NodeType>>(), null); }
 
     static <NodeType> Forest<NodeType> create(Input.Region loc, NodeType head, Forest<NodeType>[] children, boolean lift) {
+        if (loc == null) throw new Error();
         return new One<NodeType>(loc, head, children, lift);
     }