metaprogram

A program which modifies or generates other programs. A compiler is an example of a metaprogram: it takes a program as input and produces another (compiled) one as output.