More work on rewriting the lexer