Продвинутые препроцессоры, шаблонизаторы и средства для создания DSL. Краткая подборка. Предметно-ориентированный язык программирования (англ. domain-specific programming language, domain-specific language, DSL)
http://ru.wikipedi …0%B0%D0%BD%D0%B8%D1%8F
COG - классика жанра. Появилось немало вариаций на тему.
http://nedbatchelder.com/code/cog/
PerlPP: Perl preprocessor
https://github.com/d-ash/perlpp
Jinja2 is a full featured template engine for Python.
http://jinja.pocoo.org/
Cheetah is an open source template engine and code generation tool, written in Python. It can be used standalone or combined with other tools and frameworks. Web development is its principle use, but Cheetah is very flexible and is also being used to generate C++ game code, Java, sql, form emails and even Python code.
http://www.cheetah …emplate.org/index.html
Упрощенная версия гепарда (Cheetah )
http://code.google.com/p/spitfire/
Обзор по теме
http://habrahabr.ru/post/49636/