Programs that create other programs are usually called compilers. So you need to Google for the components required to convert source code to object code. Start with lex and yacc, which are used in the parsing of source statements,
Apache Ant - Welcome[
^] etc.