def emit(self, token=None):

        if token is None:
            token = CommonToken(
                input=self.input,
                type=self._state.type,
                channel=self._state.channel,
                start=self._state.tokenStartCharIndex,
                stop=self.getCharIndex()-1
                )
            token.line = self._state.tokenStartLine
            token.text = self._state.text
            token.charPositionInLine = self._state.tokenStartCharPositionInLine

        self._state.token = token
        
        return token
The standard method called to automatically emit a token at the
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/antlr3/antlr3/recognizers.py/Lexer.emit