private void processCloseBracket(List<String> parsed, List<String> stack) {
        while (stack.size() > 0) {
            String last = stack.get(stack.size() - 1);
            if (last.equals(OPEN_BRACKET)) {
                stack.remove(stack.size() - 1);
                break;
            }
            parsed.add(last);
            stack.remove(stack.size() - 1);
        }
    }