Table of Contents

Antlr - Parse Tree Visitor

About

The Tree - Visitor (Design Pattern) in Antlr that will visit the parse tree in a depth-first search order

In a visitor, you can:

Use mainly when the code is spread around many parts.

The listener can also be used to compile but only when the parse tree is created. There is therefore no control on order and/or context

Example

See gerardnico/antlr/blob/master/src/main/java/com/gerardnico/antlr/sqlite/Sqlites.java