About
The parse tree listener (or listener) is a class that implements callback methods that are called by the parser when it creates the parse tree.
You can overwrite this class to get information when the parser enter or exit a rule (ie as found a pattern)
If you need context or control over the visit of the tree, you can use afterwards a visitor for compilation.