Rewrite block lexer