I apologize but I find the StringTemplate documentation not very helpful.
I usually use the main documentation to get familiar with a project and
then a Cheat Sheet to remind me what works. In the case of StringTemplate
the Cheat Sheet saved the day. Below is the answer that worked.
Synthesize(scope) ::=<<
<scope.attributes:{a|@synthesize <a.name>;<\n>}; separator="\n">
>>
ruleAttributeScopeImplementation(scope) ::= <<
/* start of ruleAttributeScopeImplementation */
<if(scope.attributes)>
@implementation <scope.name>_Scope<\n>
<Synthesize(scope)> /* THIS WAS JUST TOO SIMPLE */
+ (<scope.name>_Scope *)new<scope.name>_Scope
{
return [[[<scope.name>_Scope alloc] init] retain];
}
/********* a bunch more lines of template ************/
/********* end of these more lines ************/
@end /* end of <scope.name>_Scope implemtation */<\n>
<endif>
>>
The answer was just too simple.
Alan
---
Alan Condit
1085 Tierra Ct.
Woodburn, OR 97071
Email -- [email protected]
Home-Office (503) 982-0906
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.