An algebraic expression parser in Java