allqueued = true;
int where = parents().size();
for(Parser.Table.Reduction r : token==null ? state.getEofReductions() : state.getReductions(token))
- if (r.numPop > 1)
+ if (r.numPop >= 1)
r.reduce(this, null, null);
for(int i=0; i<where; i++)
queueReductions(get(i), false);
// cache instances here as a way of avoiding
// recreating them.
if (r.numPop <= 0) continue;
- if (r.numPop == 1) {
- Forest ret = n.cache().get(r);
- if (ret != null) r.reduce(this, n2, ret);
- else n.cache().put(r, r.reduce(this, n2, null));
- } else {
- if (includeLongs) r.reduce(this, n2, null);
+ if (includeLongs) {
+ if (r.numPop == 1) {
+ Forest ret = n.cache().get(r);
+ if (ret != null) r.reduce(this, n2, ret);
+ else n.cache().put(r, r.reduce(this, n2, null));
+ } else {
+ r.reduce(this, n2, null);
+ }
}
}
}