lexer written in c++