 The series of reactions begins with the condensation/substitution of an aniline with alkoxy methylenemalonic ester or acyl malonic ester, producing anilidomethylenemalonic ester.Then through a 6 electron cyclization process, 4-hydroxy-3-carboalkoxyquinoline is formed, which exist mostly in the 4-oxo form.Saponification results in the formation of an acid.