Explore quadratic table graph representation
Build a 2D array for every syntax node on the LHS and RHS. Cap the number of items in each (LHS, RHS) pair to (say) 10 to avoid exploring an exponential number of graph nodes.
This would give us very fast graph node lookup, plus the ability to tune how many different routes we explore for each nested node.
This would require a sentinel node for each end node in each syntax layer, as they have LHS and RHS as None.
This may not make graph logic faster, but it could enable a scalable parent node accuracy.
The idea of keeping a list of graph nodes ignoring parents, and then iterating through, could also work with the current representation.
Essentially done.