def enterRule(self, listener: ParseTreeListener):
    if hasattr(listener, 'enterProgram'):
        listener.enterProgram(self)
def enterRule(self, listener: ParseTreeListener):
    if hasattr(listener, 'enterProgram'):
        listener.enterProgram(self)