Refactored MathExpressionParser to javalpg