def METHOD_NAME(self, listener:ParseTreeListener, r:RuleNode):
    """
 Enters a grammar rule by first triggering the generic event {@link ParseTreeListener#enterEveryRule}
 then by triggering the event specific to the given parse tree node
 @param listener The listener responding to the trigger events
 @param r The grammar rule containing the rule context
    """
    ctx = r.getRuleContext()
    listener.enterEveryRule(ctx)
    ctx.METHOD_NAME(listener)