A lexer and parser example using python and PLY