add source code in scanner.h && scanner.cpp