[antlr-interest] Extending TreeRuleReturnScope
Kay Roepke
kroepke at classdump.org
Wed Aug 8 22:28:28 PDT 2007
On Aug 9, 2007, at 7:19 AM, Kay Roepke wrote:
> I'll add a bug for this.
If you desperately need it:
==== //depot/code/antlr/main/src/org/antlr/codegen/templates/Java/
Java.stg#110 - /Users/kroepke/Projects/antlr3/code/antlr/main/src/org/
antlr/codegen/templates/Java/Java.stg ====
@@ -1083,6 +1083,7 @@
<if(ruleDescriptor.hasMultipleReturnValues)>
public static class <returnType()> extends <if(TREE_PARSER)
>Tree<else>Parser<endif>RuleReturnScope {
<scope.attributes:{public <it.decl>;}; separator="\n">
+ <actions.(actionScope).ruleReturnMembers>
<@ruleReturnMembers()>
};
<endif>
just apply this patch to Java.stg and use the example I sent just
minutes ago. That works :)
In case the patch is mangled, it's in template returnScope() in
Java.stg. Simple addition.
I'll check with Ter whether to include this.
cheers,
-k
--
Kay Röpke
http://classdump.org/
More information about the antlr-interest
mailing list