[antlr-interest] how to collect multiple AST under single root

Anton Arhipov tonyfox24 at hot.ee
Mon Apr 11 15:09:52 PDT 2005


hi! could anyone suggest please how could I collect multiple ASTs under 
a single root :

rule1 :
      ( tmp:rule2 )*
      {
          #rule1 = #([RULE, "root"],tmp);
       }
    ;

rule2 :
 ...............
   ;


this creates only a root with a single child.

thx.
A.


More information about the antlr-interest mailing list