[antlr-interest] Imaginary node modifies tree unexpectedly. Bug, Grrr, or not what I expected?

The Researcher researcher0x00 at gmail.com
Fri Apr 1 11:04:23 PDT 2011


As a work around, use dupTree().

Note: This is example code, change as necessary.

a
scope { CommonTree b1tree; }
@init { $a::b1tree = null; }
:
   b1 = b
   { $a::b1tree = (CommonTree)adaptor.DupTree((CommonTree)$b1.tree); }
   b2 = b
;


More information about the antlr-interest mailing list