Next: Information Updating(Sniff) Prev: Main Tools(Sniff) Up: Sniff Top: Top

5.7.3. Information Extraction

Sniff's information extractor is a fuzzy C++ parser. This means that it understands enough about C and C++ to extract the information of interest without having to understand C++ completely. This approach makes it possible to parse every file only once without including header files and expanding macros.

Not expanding macros is somewhat controversially because it could result in a loss of information if macros are used to change C++ syntax or semantics. Experience shows that this is no problem. Until now no user of Sniff has informed us about macro expansion problems. Not expanding macros means that the symbolic information corresponds exactly to the locally visible source code. This is frequently an advantage, for example, when macros are used to put unique prefixes in front of all class names.

Sniff's information extractor extracts information about declarations and definitions of C++ language elements and macros. It does not extract information about the usage of symbols. This information is extracted on the fly.