By default, expressions in a template are delimited by dollar signs:
$...$. This works great for the most common case of HTML generation because the attribute expressions are clearly highlighted in the text. Sometimes, with other formats like SQL statement generation, you may want to change the template expression delimiters to avoid a conflict and to make the expressions stand out.
The start and stop strings are limited to either
<...> (unless you build your own lexical analyzer to break apart templates into chunks). group file templates use
<...> delimiters by default (in v2.2
$...$ was the default delimiter). Templates created with the StringTemplate object constructor still use
$...$ by default.
To specify that
StringTemplate should use a specific delimiter you must create a
Python accepts either a antlr.CharScanner class (
All templates created through the group or in anyway associated with the group will assume your the angle bracket delimiters. It's smart to be consistent across all files of similar type such as "all HTML templates use
$...$" and "all SQL templates use