[antlr-interest] tree parser / rewritter
Lloyd Dupont
lloyd at galador.net
Wed Sep 4 04:02:04 PDT 2002
I have a tree parser. and I have tree I want to read muliple time, simplyfing each time.
let's imagine I have
file: (node1 | node2) *;
node1: #(NODE1 FOO);
node2: #(NODE2 BAR);
I want to do something with node1 on first pas and remove it.
I tryed something like:
options {
buildAST = true;
}
stage1: (!node1Analysis | .) *;
stage2:! (node2Analysis) *;
where stage2 is called with getAST() produce by stage1.
unfrtunately, hen I do that the node2 is empty, where all child are gone ?
I can't understand.
has anyone idea ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20020904/e729780a/attachment.html
More information about the antlr-interest
mailing list