YooLex class header:
The difference between the generated C++ header and the modified C++
header was that the modified version added
_lineNumber to the class declaration
and initated it in the constructor. By default, YooLex checks first if the header file
exist. If not, it then generate a C++ header file. Otherwise, only C++ source file is
generated. This method provides a clean way of preserving user's modification to the
scanner class without introducing much changes to the Flex input file format at all.
g++ -I . sample.cc -o sampleto generate the executable.