def _expect_empty(self):
        """ Checks if the token stream is empty.

            * Raises a ``ParseError` exception if a token is found.
            """

        item = self._lexer.get_token()
        if item:
            line_no, token = item
            raise ParseError(u"Unexpected token '{0}' on line {1}"
                             .format(common.from_utf8(token.strip()), line_no))
Checks if the token stream is empty.

            * Raises a ``ParseError` exception if a token is found.