Kalmer's lexer & parser
exercise 2.3