I have a tree parser which output a new ast (tree rewriting).
The parser has attached some NodeData to some tree nodes, and one of my tree
rewrite rules should just copy this node, like:
rule_x: NODE<NodeData> ; /* should copy NodeData, but doesn't */
If I do this then the node data is not duplicated.
If have to do:
rule_x: NODE {
NodeData d = (NodeData)$NODE;
} -> NODE<NodeData>[d]
;
I thought the incoming data is copied in case of an empty rule (see
Tree construction during tree parsing in
http://www.antlr.org/wiki/display/ANTLR3/Tree+construction ) ??
cheers
Michael
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
-~----------~----~----~----~------~----~------~--~---