Antlr4 Listeners and Visitors – which to implement?

Here is quote from the book that I think is relevant: The biggest difference between the listener and visitor mechanisms is that listener methods are called by the ANTLR-provided walker object, whereas visitor methods must walk their children with explicit visit calls. Forgetting to invoke visit() on a node’s children means those subtrees don’t get … Read more