modify parse tree program to accept a grammar as an optional argument and print the tree to a ps file