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