Updated the final code to generate parse tree

Updated the final code to generate parse tree from the DCG