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:
- control the order of visite
- return data from the function
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
Articles Related
Example
See gerardnico/antlr/blob/master/src/main/java/com/gerardnico/antlr/sqlite/Sqlites.java