def getUnexpectedType(self):

        from antlr3.streams import TokenStream
        from antlr3.tree import TreeNodeStream

        if isinstance(self.input, TokenStream):
            return self.token.type

        elif isinstance(self.input, TreeNodeStream):
            adaptor = self.input.treeAdaptor
            return adaptor.getType(self.node)

        else:
            return self.c
Return the token type or char of the unexpected input element
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/antlr3/antlr3/exceptions.py/RecognitionException.getUnexpectedType