private ArithmeticResult factor(Block codeBlock) throws SyntaxFormatException, IOException {
		ArithmeticResult designatorResult = designator(codeBlock);
		if (designatorResult != null) {
			return designatorResult;
		}

		ArithmeticResult funcCallResult = funcCall(codeBlock);
		if (funcCallResult != null) {
			return funcCallResult;
		}

		if (checkCurrentType(TokenType.NUMBER)) {
			int number = lexer.getCurrentToken().getNumberValue();
			moveToNextToken();
			return new ArithmeticResult(number);
		}

		if (checkCurrentType(TokenType.BEGIN_PARENTHESIS)) {
			moveToNextToken();
			ArithmeticResult expressionResult = expression(codeBlock);
			if (expressionResult == null) {
				throwFormatException("factor: expression expected!");
			}
			assertAndMoveNext(TokenType.END_PARENTHESIS);
			return expressionResult;
		}
		return null;
	}