gll
gll copied to clipboard
GC the SPPF based on whether a node is still "reachable"
This can be done with ref-counting, but to avoid using an actual Rc (e.g. to be able to do #9) and/or the GSS being more tightly coupled with the SPPF, I'd prefer to use an "unwinding" approach, where we propagate failure up the call-chain, and generate calls to decrement SPPF ref-counts on failure.
May interfere with #12, #13, #16 etc. by removing nodes that could be needed later.
We don't have to do "unwinding" right away, we can recover the "stashed" left SPPF children node of a concatenation, from a Continuation (those are the only SPPF nodes kept around by GSS).