ANNOUNCE: Tmac 1.0 - a macro preprocessor in Tcl for Tcl (8 December 2003)

I've added various enhancements and fixes and bumped the release to
1.0 as I expect it to be stable at this point.

 

Changes since the original release (0.1 in May 2003)

   - Fixed: several defects in parameter parsing when various
     quotes styles were nested.

   - Added: -proc option defines a filter macro and its proc in one step

   - Added: -oneline option takes out newlines in block macros allowing
     cleaner coding when wanting a command spread over several lines (can
     leave out the backslashes)

   - Added: "passtrick" -parse option to let single char delimiters escape
     themselves

   - Improved: expr parameter wrapping

   - Improved: GUI viewer/devel tool now has a compact vertical mode and can load
     macro definition files for browsing. Much more convenient for devel/test of
     single macros.

   - Added: Several files of example macros for strings, control structures, and
     wiki markup. Includes do/while, enhanced switch, etc.

   - Updated: Tests and docs to cover new features.

 

The new Release is posted here

www.tclbuzz.com/v0/tmac

 

Feedback invited,
Roy Terry

 

From the original announcement:

I've created this Tcl package to give Tcl programmers
another set of options in building applications. You
might call it Tmac "Super Glue for Tcl".

Tmac provides flexible ways to modify the Tcl source
before it is seen by Tcl. Macros are defined by
name and come in 2 basic types:

   - Block macros: insert a block of text with parameter
     substitutions
       and
   - Filter macros: pass unlimited parameters to user-provided
     code and put the computed string back into the source stream.

Additional Features

   - Macro calls may nest
   - Macro delimiter strings are configurable
   - Macro definitions may invoke other macros
   - A scope feature is available to prevent macro
     name collisions
   - Special options are available for preprocessing
     complex parameters before passing to expr
   - "big gulp" macro based comments are indifferent
     to mismatched braces.
   - macro substitution may be invoked in separate phases
     and on various units such as strings, procs, and files.


The goal for the macro package is to let programmers
create coding conveniences in order to reduce effort
and increase overall quality. Macros, of course, ought
to be used with caution.

Tmac is licensed for free personal or commercial use.

Regards,
Roy Terry
royterry at earthlink DOT net

 

 

Tmac - copyright Roy E. Terry, 2003  royterry@earthlink.net

TMac Home Introduction Usage Download Q&A + Examples