cool compiler in python and lex