[antlr-interest] Tree parser

rkevinburton at charter.net rkevinburton at charter.net
Thu Jul 31 10:47:41 PDT 2008


I would like to generate a tree parser. Unfortunateliy the ANTLR book has very little to say of the issue (or I just don't know where to look) and the sample grammars that I see seem to implement the 'walker' different from the way ANTLR does it now. For example in the CSharp grammar there is syntax like (the 'walker grammar names are different):

               CSharpwalker = new CSharpWalker();
                walker.setASTFactory(new ASTNodeFactory());
                CSharpParser.initializeASTFactory(walker.getASTFactory());

where the constructor for the waler no longer takes '0' arguments. There isn't a method 'setASTFactory' and there also isn't a method 'initializedASTFactory'. If I have a TreeParser grammar how do I integrate it with the parser?

Thank you.

Kevin



More information about the antlr-interest mailing list