Hello list,
The following rule generates the AST that I want:
localVariableDeclaration
: LOCAL variableDcl ( ',' variableDcl )* -> ^(LOCAL variableDcl)+
;
But how do I generate an equivalent AST if the variableDcl list is not
in the localVariableDeclaration rule, as in the following fragment?
localVariableDeclaration
: LOCAL variableDeclarationList
;
variableDeclarationList
: variableDcl ( ',' variableDcl )*
;
I want to produce a set of ^(LOCAL variableDcl) subtrees, but I want
to reuse the variableDeclarationList from other rules, so I'd rather
not inline it.
Thanks!
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.