Register a token.

        Args:
            token (Token): the token class to register
            regexp (str): the regexp for that token

def register(self, token, regexp):
        """Register a token.

        Args:
            token (Token): the token class to register
            regexp (str): the regexp for that token
        """
        self._tokens.append((token, re.compile(regexp)))