Hi again,
TokenRewriteStream can only replace the declared token, not the rule. right?
for example,If I want to replace VAR, it works fine, But if I want to replace
variableDeclaration , the error said $a can not be resolved.
variableStatement
: m= VAR? variableDeclaration ( COMMA variableDeclaration )* semic
{tokens.replace($m, "something else");}
;
variableStatement
: VAR? variableDeclaration ( COMMA m=variableDeclaration )* semic
{tokens.replace($m, "something else");}
;
So how can I replace variableDeclaration ?
Thanks in advance.
Annie
_________________________________________________________________
Live Search视频搜索,快速检索视频的利器!
http://www.live.com/?scope=video
--~--~---------~--~----~------------~-------~--~----~
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