Rough sketch of the lexer.