code: def parse(self, text):
          
  
          text = tounicode(text, encoding="utf-8")
          result, i = self._parse(text, 0)
          if text[i:].strip():
              self._fail("Unexpected trailing content", text, i)
          return result
docs: Do the parsing.