Syntheses of sugar-related trihydroxyazepanes from simple carbohydrates and their activities as reversible glycosidase inhibitors.