[stringtemplate-interest] Meaning of @ syntax for templates?
Terence Parr
parrt at cs.usfca.edu
Mon Dec 22 16:37:12 PST 2008
On Dec 22, 2008, at 2:18 PM, Mike Pagel wrote:
> What exactly is the meaning of this style of defining a template in
> a group:
>
> @outputFile.imports() ::= <<
> ...
> >>
>
> I've seen this in the group file grammar and used in ANTLR templates
> but I don't think it is explained where I looked... :-) Is this just
> syntactic sugar to simulate a namespace? I am trying to understand
> not to criticize...
Hi. these are super great "region" definitions, a finer-grained
alternative to template inheritance. See
http://www.antlr.org/wiki/display/ST/Template+regions
you will dig it.
Ter
More information about the stringtemplate-interest
mailing list