this is a Lexical Analyser for c++ compiler
I write this in python

file : keywords.txt ---> all of c++ key words list
operators.txt ---> all of c++ operator list
code.cpp ---> a sample c++ code for test