def stack_2_eqn(self,p):
        """returns equation string for program stack"""
        stack_eqn = []
        if p: # if stack is not empty
            for n in p.stack:
                self.eval_eqn(n,stack_eqn)
            return stack_eqn[-1]
        return []