public int parseTerm() throws IOException {
        Element localRoot = IRT.createElement(String.valueOf(Tags.TERM));
        curRootElement.appendChild(localRoot);
        curRootElement = localRoot;

        int result = parseFactor();
        //curToken = lexer.getToken();
        while (curToken.type == DIVIDE ||
                curToken.type == MULTIPLY) {
            switch (curToken.type) {
                case DIVIDE:
                    localRoot.setAttribute("opcode", "/");
                    curToken = lexer.getToken();
                    result /= parseFactor();
                    break;
                case MULTIPLY:
                    localRoot.setAttribute("opcode", "*");
                    curToken = lexer.getToken();
                    result *= parseFactor();
                    break;
//                default:
//                    throw new IOException(curToken.row + ":" + curToken.column +
//                            "ожидалось: *, /. получено: " + curToken.c);
            }
            // curToken = lexer.getToken();
        }
        return result;
    }