Version 16 of macro

Updated 2015-08-01 04:11:44 by aspect

In programming languages, a macro is any programming or user interface that allows one to associate a macro name to a set of instructions to be substituted wherever the macro name appears in a program. The macro, when used, expands into something usually larger than itself. Often, the macro facility allows arguments to be substituted into the expanded code. Sometimes, the facility permits conditional expansion, internalized dynamic generation of unique names, etc.

Tcl Macro Systems

expand, by WHD
Sugar, by SS
knit, by PYK
a flexible EIAS approach to macros. Leverages tailcall
Tmac - a Tcl macro processor package
tpp
cmacro
a C-preprocessor-like macro substitution mechanism for Tcl source code.
Rivet
rivet::parse can be used to create macros
smacro
tool for programmatically generating embedded content within a file, similar to C/C++ preprocessor directives
   Peter Spjuth has "an experminent on compiled macros" with a very small core mod http://chiselapp.com/user/pspjuth/repository/tcl/home%|%now hosted on chiselapp%|% ([http://sourceforge.net/p/tcl/patches/535/%|%original patch submission @ sourceforge%|%).  This is interesting for the very simplicity of the approach


See Also

Macro Facility for Tcl
a discussion that includes some ideas and examples from RS, jcw, and others