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(); } ;