code: private static final ExpressionTree parseToTree(String expression) throws InvalidExpressionException {
  
          ExpressionParser parser = new ExpressionParser();
          parser.parse(expression);
  
          return new ExpressionTree(parser.getVar(), parser.getTokens());
      }
docs: Parse a mathematical expression and form a binary expression tree.
  @param expression
  @return
  @throws InvalidExpressionException