[antlr-interest] ANTLR 3.1 incompatible change for tree parser labels?
Terence Parr
parrt at cs.usfca.edu
Wed Mar 25 11:32:27 PDT 2009
Ah. That is a different problem; I don't think that ever worked. are
you sure that 314 isn't your issue?
you have output=AST or ST, right?
To fix: open file
src/main/resources/org/antlr/codegen/templates/Java/Java.stg
and change ruleLabelDefs() template to:
ruleLabelDefs() ::= <<
<[ruleDescriptor.tokenLabels,ruleDescriptor.tokenListLabels,
ruleDescriptor.wildcardTreeLabels,ruleDescriptor.wildcardTreeListLabels]
:{<labelType> <it.label.text>=null;}; separator="\n"
>
<
[ruleDescriptor
.tokenListLabels
,ruleDescriptor.ruleListLabels,ruleDescriptor.wildcardTreeListLabels]
:{List list_<it.label.text>=null;}; separator="\n"
>
<ruleDescriptor.ruleLabels:ruleLabelDef(label=it); separator="\n">
<ruleDescriptor.ruleListLabels:{ll|RuleReturnScope <ll.label.text> =
null;}; separator="\n">
>>
All I did was change the last line to be:
<ruleDescriptor.ruleListLabels:{ll|RuleReturnScope <ll.label.text> =
null;}; separator="\n">
Ter
On Mar 25, 2009, at 11:27 AM, FranklinChen at cmu.edu wrote:
> Terence Parr writes:
>> ok, found the bug report:
>>
>> http://www.antlr.org/jira/browse/ANTLR-314
>
> I just looked on the mailing list archives and see that my problem was
> reported as ANTLR-381.
>
> --
> Franklin
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090325/bd48a24b/attachment.html
More information about the antlr-interest
mailing list