[antlr-interest] Tree walking Q
Bryan Ewbank
ewbank at gmail.com
Sun Jun 5 07:11:35 PDT 2005
Are you missing the "|"'s in your example, or do you intend that it
match a list of groups of five trees at each node? After your
discussion of the complexity with your tree, this shows all node to be
identical and of the form:
#( . ( FirstToken SecondToken ThirdToken FourthToken .)* )
On 6/5/05, Gerald B. Rosenberg <gbr at newtechlaw.com> wrote:
> walker:
> #(a1:FirstToken p1:walker) { processFirstToken(AST a1, AST p1); }
> #(a2:SecondToken p2:walker) { processSecondToken(AST a2, AST p2); }
> #(a3:ThirdToken p3:walker) { processThirdToken(AST a3, AST p3); }
> #(a4:FourthToken p4:walker) { processFourthToken(AST a4, AST p4); }
> #(uk:. (p5:walker)*) { System.out.println("Skipping all
> others..."); }
> ;
More information about the antlr-interest
mailing list