def token(self, location=None):
        """Get the next waiting token.  If a location is given, then
        return the token at currentIndex+location without advancing
        currentIndex; setting it gives lookahead/lookback capability."""
        try:
            if location is None:
                tok = self._buffer[self._currentIndex]
                self._currentIndex += 1
            else:
                tok = self._buffer[self._currentIndex+location]
            return tok
        except __HOLE__:
            raise ExpectedMoreTokensException(self._currentIndex+1)
dataset/ETHPy150Open nltk/nltk/nltk/sem/logic.py/LogicParser.token