You might have more success if you said what target you were using :-) Also 
remember antlr.markmail.com.

The generated routines already return a struct, so you cannot put a struct in 
that struct. You need to return a pointer to a struct.

Jim

> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of Bob
> Sent: Friday, May 28, 2010 5:06 PM
> To: [email protected]
> Subject: [antlr-interest] Can "returns" return an aggregate?
> 
> Is there a way to return an aggregate ?
> 
> 
> 
> struct A { int m; double n; };
> 
> extern struct A foo(void);
> 
> 
> 
> myrule returns [struct A a]
> 
>     : X
> 
>      { $a = foo(); }
> 
>   ;
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address




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.

Reply via email to