2 How it works

CppCC is not very different from other similar tools in the way it works. A grammar file has to be written, and as the result of running the tool providing the grammar file as its input3 , a set of C++ source files will be obtained (See Fig. 1). These sources will contain the scanner and the parser that accept as input the language specified in the grammar file. More precisely, three pairs of header/definition source files will be created, one for the scanner's class, one for the parser's class and one for the token class.

Figure 1: Data flow through CppCC.
\includegraphics{pics/cppcc_l1dfl.eps}


Alec Panovici 2003-02-01