Xie, Linlin wrote:

Hi Jim,

 

The weird thing is if I use the $rule1.tree directly, the generated code would try to convert the rule1_return structure to common token type first, but if I assign the rule to a variable, say P: r1=Rule1 Rule2; then using $r1.tree would be completely fine, as the generated  code would just keep the rule1_return structure, not trying to convert it at all.

 

Can you see why it works this way? Thanks a lot.

Maybe a bug in code generation templates, I will take a look, but for now, use labels :-)

Jim

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to