a Templating Tool for Tcl used to separate code from presentation. Inclues a simple Tic-Tac-Toe game as a demonstration of some of the basic features of the system. There are some other examples and a description of what this tools does at:


The README file contains a summary of theory, features and operations.

A snapshot of the compiler with additional test files is at:


Lacking any better ideas for a name, <tic-tac-toe> is the current placeholder.

The compiler itself is a standalone binary file. It is based on flex/ bison and validates syntax. The result of compiling a template file is a Tcl script which no longer needs the compiler. The script can be sourced from inside a proc or a namespace and sets a local variable __string to the result. You could also very likely place the result of the compile directly into memory (it just reads stdin and prints to stdout), but I write to files so that a script can notice changes to the template file and recompile.