write C++ lexer