code generation via templating

6 views
Skip to first unread message

sean jensen-grey

unread,
Feb 25, 2010, 12:38:44 PM2/25/10
to mython
Here is a link to the Terrence Parr paper on

Enforcing Strict Model-View Separation in Template Engines
http://www.cs.usfca.edu/~parrt/papers/mvc.templates.pdf

presentation slides
http://www.antlr.org/workshop/ANTLR2004/proceedings/StringTemplate.pdf

One of the cleanest apis I have come across besides the full featured,
http://www.stringtemplate.org/ is the Template Power library for php.

http://templatepower.codocad.com/manual/index.php

It supports basic operations of cloning a template block and setting
variables. Everything else is handled in client code.

When it comes to doing source code transformations on python code,
rope looks interesting

http://rope.sourceforge.net/library.html

see
rope.refactor.* and
rope.contrib.generate

Sean

Reply all
Reply to author
Forward
0 new messages