Formation of complex organic molecules in astrophysical environments: Sugars and derivatives