def set_parser(self, parser):
    self.parser = parser
    if (self.handler is not None):
        self.handler.parser = parser
def set_parser(self, parser):
    self.parser = parser
    if (self.handler is not None):
        self.handler.parser = parser