Improved math SymbolParser