Whenever you conclude, keep track of where you came from, i.e. what elements are used to form a new element. Then the parsing forest can be found by examining the top element spanning the entire input. If you are dealing with ambiguous grammars, you should also consider packaging ambiguity, i.e. do not recombine (locally) equivalent assays together.
I really recommend Klaas Sikkel's excellent book, Analysis Charts, for the theoretical side of things.
Johan benum evensberget
source share