'Return a token from this source; i.e., match a token on the char
stream.'

def nextToken(self):

    while 1:
        self._state.token = None
        self._state.channel = DEFAULT_CHANNEL
        self._state.tokenStartCharIndex = self.input.index()
        self._state.tokenStartCharPositionInLine = self.input.charPositionInLine
        self._state.tokenStartLine = self.input.line
        self._state.text = None
        if (self.input.LA(1) == EOF):
            return EOF_TOKEN
        try:
            self.mTokens()
            if (self._state.token is None):
                self.emit()
            elif (self._state.token == SKIP_TOKEN):
                continue
            return self._state.token
        except NoViableAltException as re:
            self.reportError(re)
            self.recover(re)
        except RecognitionException as re:
            self.reportError(re)
