code: def parse(self, ctx, ref, text):
          
  
          self.ctx = ctx
          self.pos = error.Position(ref)
          self.top = None
          self.top_element = None
  
          self.uri = None
          self.nsmap = {}
          self.prefixmap = {}
          self.included = []
          self.extensions = {}
  
          self.data = ''
          self.element_stack = []
  
          try:
              self.parser.Parse(text.encode('utf-8'), True)
          except error.Abort:
              return None
          except expat.ExpatError as ex:
              self.pos.line = ex.lineno
              error.err_add(self.ctx.errors, self.pos, 'SYNTAX_ERROR',
                            str(ex).split(":")[0])
              return None
  
          self.look_ahead()
          self.create_statement(self.top_element, None)
          return self.top
docs: Parse the string `text` containing a YIN (sub)module.
  
          Return a Statement on success or None on failure.