code: def register(self, token, regexp):
          
          self._tokens.append((token, re.compile(regexp)))
docs: Register a token.
  
          Args:
              token (Token): the token class to register
              regexp (str): the regexp for that token