Compounds of the structure STR1 and pharmaceutically acceptable salts thereof, wherein R1 and R2 are independently hydrogen, alkyl, carboxy, alkylcarboxy, arylcarboxy, alkyl carbalkoxy, alkanoyl, formyl, nitrile, amino, amino alkyl, alkylamine, carboxamide, halo, trihalomethyl, hydroxy, alkoxy, aryloxy, nitro, sulfonyl, sulfonamide, thio, alkylthio, or R1 and R2 can be taken together to form a phenyl ring; B is C or N, in which N can be in any position of the ring; X is O, S, NR4, CH2 Z, CH=N, CH=CH, C C, CH2 ZCH2, C=O, C=CR or WC=O; Y is CHCH2, C=CH, C--CH2, CHCHR5, CHC(R5)2 or CC(R5)2 ; R3 is O, OH, OR4, SH, SR4, NH, HNR4 or N(R4)2 ; and M is an integer from 0 to 10; wherein Z is O, S or NR4 ; R4 is H, alkyl or aryl; W is O, S or NR4 ; and R5 is H, alkyl or fluoro have antiinflammatory and antiallergic activities.