add a calculator for symbolic matrix derivative. The std::stack will cause error. So I write a stack for this special case