private void dealWithOperator(char c) throws ExpressionException {
        ArithmeticParameter arithmeticSymbol = ArithmeticParameter.getArithmeticBySymbol(c);
        if (arithmeticSymbol == OPEN_BRACKET)
            operatorStack.push(OPEN_BRACKET);
        else {
            if (operatorStack.empty() || arithmeticSymbol.getPriority() > operatorStack.peek().getPriority())
                if (arithmeticSymbol == CLOSE_BRACKET) {
                    while (operatorStack.peek() != OPEN_BRACKET) {
                        operation();
                    }
                    operatorStack.pop();
                } else
                    operatorStack.push(arithmeticSymbol);
            else {
                while (!operatorStack.empty() && arithmeticSymbol.getPriority() <= operatorStack.peek().getPriority()) {
                    operation();
                }
                operatorStack.push(arithmeticSymbol);
            }
        }
    }