StringTemplate Grammars
StringTemplate
has multiple grammars that describe templates at varying degrees of detail. At the grossest level of granularity, the group.g
grammar accepts a list of templates with formal template arguments. Each of these templates is broken up into chunks of literal text and attribute expressions via template.g
. The default lexer uses $...$
delimiters, but the angle.bracket.template.g
lexer provides <...>
delimiters. Each of the attribute expression chunks is processed by action.g
. It builds trees (ASTs) representing the operation indicated in the expression. These ASTs
represent the "precompiled" templates, which are evaluated by the tree grammar eval.g
each time a StringTemplate
is rendered to string with ToString()
.
...