ANTLR 4 automatically generates parsing trees instead of relying on hand-crafted ASTs. This decision was made after we observed years of development using previous approaches that encountered extreme maintainability problems, especially when several tree parsers were involved.
If you need an abstract representation of the source code, you should create an object model that accurately represents the constructs in your language, and not rely on weakly typed and generally unstructured AST nodes. Then you produce parsing trees instead of AST to create your object model.
I would not recommend going with ANTLR 3 for any new project.
source
share