We've already implemented the algorithm to remove empty productions and rules that only contain empty production from our grammar. I've implemented some other helper methods to help us create clone of complete grammar tree anytime and destroy those.
I've also devised on a clever mechanism to distinguish between allocated and static nodes. Only allocated blocks will ever be destroyed. This will allow us to insert some nodes selectively within our grammar and then destroy those later on.
Let's continue to another step then! Remove unit productions!