First of all Hi to everybody, This is my first email here, I have just recently started using ANTLR. I'm working on some DSL and since i haven't got any experience with antlr, i have stumbled across some issues. I am trying to use "rewrite rules" to create a nice two dimensional AST. I have declared couple of imaginary nodes but what happens is when i for example do something like:
rule : L_SQ_B ANNT (ra=ON | ra=OFF) R_SQ_B COLON RULE L_SQ_B d=DIGITS* R_SQ_B WS* curlyblock -> ^(RULE_NODE $ra) ; This create an imaginary node and then on the outer rule(the one that gets called last) i am trying to add a root node and assign this RULE_NODE to that root node: input : (filter)* EOF -> ^(ROOT_NODE RULE_NODE) ; ..and after this I end up with ROOT_NODE and just a new/blank RULE_NODE. How do these nodes work? Do they oney work once and get rewritten when you use them twice? You get my point I hope Thanks, Damir 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.
