Python 3 lexer and parser written in Python 2.7