Lexer improvements for less alocations