- this.tag = tagf.invoke(loc);
- Forest<T> ret = super.postReduce(loc, args, p);
- this.tag = null;
- return ret;
+ for(int i=0; i<args.length; i++) if (args[i]==null) throw new Error();
+ if (drops==null) return Forest.create(loc, (T)tag, args, false, true);
+ int count = 0;
+ for(int i=0; i<drops.length; i++) if (!drops[i]) count++;
+ Forest<T>[] args2 = new Forest[count];
+ int j = 0;
+ for(int i=0; i<args.length; i++) if (!drops[i]) args2[j++] = args[i];
+ return Forest.create(loc, (T)tag, args2, false, true);
+ }
+ Forest epsilonForm(Input.Region loc, Grammar cache) {
+ return Forest.create(loc, tag, new Forest[0], false);