[antlr-interest] Working on ObjC templates

Alan Condit acondit at ipns.com
Fri Jul 2 16:59:31 PDT 2010

I am trying to add name and type to ObjC.stg as attributes of return type. But I keep getting an error saying that java.util.ArrayList has no such attribute: type in template context[headerFile if(PARSER)_subtemplate parserHeaderFile(...) anonymous anonymous
returnScopeInterface if(!ruleDescriptor.isSynPred)_subtemplate

So where is it that I need to add type that I haven't done.

I added it here:
ruleDeclarations() ::= <<
<ruleDescriptor.returnScope.attributes:{ a |
<a.type> <a.name>; }>
<returnType()> _retval = [[<returnTypeName()> alloc] init];
[_retval setStart:[input LT:1]];<\n>
<returnType()> _<ruleDescriptor.singleValueReturnName> = <initValue(typeName=returnType())>;

Thanks in advance,

Alan Condit
1085 Tierra Ct.
Woodburn, OR 97071

Email -- acondit at ipns.com
Home-Office (503) 982-0906

More information about the antlr-interest mailing list