What does a tree look like? ANTLR has a number of support classes such as CommonTreeNodeStream that work on these kinds of trees. You don't have to make your trees implement this interface, but if you do, you'll be able to use more support code.
NOTE: When constructing trees, ANTLR can build any kind of tree; it can even use Token objects as trees if you add a child list to your tokens.
This is a tree node without any payload; just navigation and factory stuff.
How to create and navigate trees. Rather than have a separate factory and adaptor, I've merged them. Makes sense to encapsulate.
This takes the place of the tree construction code generated in the generated code in 2.x and the ASTFactory.
I do not need to know the type of a tree at all so they are all generic Objects. This may increase the amount of typecasting needed. :(
A stream of tree nodes, accessing nodes from a tree of some kind
How to execute code for node t when a visitor visits node t. Execute pre() before visiting children and execute post() after visiting children.
Generated using TypeDoc
Sam Harwell