Noeud « Next »: , Noeud « Previous »: src, Noeud « Up »: Project Layout



3.2.3 The src/misc Directory

Convenient C++ routines.

— File: contract.hh (src/misc/)

A useful improvement over cassert.

— File: escape.hh (src/misc/)

This file implements a means to output string while escaping non printable characters. An example:

            cout << "escape (\"\111\") = " << escape ("\"\111\"") << endl;
     

Understanding how escape works is required starting from T2.

— File: set.hh (src/misc/)

A wrapper around std::set that introduce convenient operators (operator+ and so forth).

— File: timer.hh (src/misc/)
— File: timer.cc (src/misc/)

A class that makes it possible to have timings of the compilation process, as when using --time-report with gcc, or --report=time with bison. It is used in the Task machinery, but can be used to provide better timings (e.g., separating the scanner from the parser).