- Added a Tcl template processing facility to SICS

This commit is contained in:
koennecke
2006-12-07 14:07:53 +00:00
parent f9de64629a
commit 372e04c634
3 changed files with 162 additions and 0 deletions

38
tcl/tjxphelp Normal file
View File

@ -0,0 +1,38 @@
Tcl Template Processing System.
This is a test file and help text for my Tcl template processing
system. It was inspired by JSP and JXP. But is in my favourite
scripting language Tcl. Basically it allows to mix Tcl scripts with
text. The text can contain special marks which are then executed as
Tcl scripts in a variety of ways. Three tags are supported:
<%! set var waschmaschine %>
This tag executes the Tcl script but prints nothing, except may
be error messages. Please note that this can be used to source
more Tcl files which contains procedures you need for doing your
work.
<%=var %> prints the value of the Tcl variable var. When processed,
this should print waschmaschine.
<% set a [list 1 2 3]
join $a
%>
executes the Tcl code within and prints the result. This should be
1 2 3.
All Tcl code is executed at global level. There is nothing more to
this. All this was done in 75 lines of Tcl, including comments! You
should be able to process this file through tjxp to see what you get.
Txjp is brough to you by:
Mark Koennecke, Mark.Koennecke@psi.ch
txjp is copyrighted under the GNU Public Licence 2.0, which you can
find elsewhere.
Enjoy!