Examples


Lexer source: sample.l
Generated C++ source: sample.cc
Generated C++ header: sample.hh
Modified C++ header: sample.hh

YooLex class header: yoolex.hh

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.

Use

	g++ -I . sample.cc -o sample
to generate the executable.
$Id: examples.html,v 1.8 2002/01/27 06:31:28 coconut Exp $