antlr.py line 2426: def getTokenNames(): return tokenNames should be: def getTokenNames(self): return self.tokenNames Cheers, Klaas P.S. I found this bug with pychecker.