generate script to parse code and fill templates