public String parse(String expression) throws InvalidExpressionException {

        this.expression = expression;

        try {
            var = check();
        } catch (InvalidExpressionException e) {
            e.printStackTrace();
        }

        this.expression = formatString(expression);
        System.out.println(this.expression);
        tokens = tokenize(this.expression);

        return this.expression;
    }
public String parse ( String expression ) throws InvalidExpressionException { this . expression = expression ; try { var = check ( ) ; } catch ( InvalidExpressionException e ) { e . printStackTrace ( ) ; } this . expression = formatString ( expression ) ; System . out . println ( this . expression ) ; tokens = tokenize ( this . expression ) ; return this . expression ; }
Creates tokens in polish notation for and re-formats the expression, unless an expression without valid syntax
is passed in.
@param expression a mathematical expression.
@return a modified version of the expression.