Patent ID: 8091071

Claim:
A computer-implemented method comprising: registering, by a computer processor, callback functions for selected template variables; selecting, by the computer processor, a reusable customizable template to render program code; parsing, by the computer processor, the reusable customizable template, the reusable customizable template including code lines and control lines, wherein the code lines are parsed into static text and variables to be rendered in the program code, the control lines are parsed into tokens that are further parsed into variables, tags and constant text; building, by the computer processor, an analysis tree to represent the parsed template, the analysis tree having tree nodes formed by components from the parsed code lines and control lines, wherein the tree nodes are connected according to syntactical relationships in the template; analyzing, by the computer processor, the parsed tags, variables, static text and constant text individually and in combination for syntax errors; if errors are detected, generating, by the computer processor, an error report listing the nodes containing the errors; if no error is detected, finishing, by the computer processor, building the analysis tree; dynamically replacing, by the computer processor, generic data variables in the reusable customizable template with custom data, wherein for each of the generic data variables that matches a selected template variable with a registered callback function and the matched generic data variable is replaced by a value retrieved by the registered callback function; and rendering, by the computer processor, the program code from the reusable customizable template including the custom data.