At 11:23 26/01/2009, Carter Cheng wrote:
 >rule1: type idlist[type];
 >
 >idlist[.... t]: var[type] (COMMA var[type])*;
 >
 >var[... t]: ID -> ^(ID $t);
 >
 >I tried using ANTLR3_BASE_TREE but the last construct does not 
seem
 >to work properly. What is the default return type for a rule in
 >buildAST mode?

Each rule will typically have its own custom return type (eg. the 
idlist rule will return an idlist_return object).

To pass a tree in as a parameter, do something like 
var[$type.tree].


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