#ifndef CALLSPROC_H #define CALLSPROC_H ///////////////////////////////////////////////////////////////////// // callsProc.h - Defines processing for Calls program // // ver 1.3 // // // // Language: Visual C++, ver 7.0 // // Platfrom: Dell Dimension 8100, Windows 2000, SP 2.0 // // Application: Prototype for CSE687 Pr#2, Spring 2003 // // Author: Jim Fawcett, CST 2-187, Syracuse University // // (315) 443-3948, jfawcett@twcny.rr.com // ///////////////////////////////////////////////////////////////////// /* Module Operation: ================= callsProc's operations are to find function definitions and invocations within a source code file. If it encounters an include statement it calls scanner::scan(...). Public Interface: ================= scanner s; callsProc cp(s); ifstream in(fileName); if(in.good()) { semiExp se(in); process(se); } */ ///////////////////////////////////////////////////////////////////// // Build Process // ///////////////////////////////////////////////////////////////////// // Required Files: // // callsProc.h, callsProc.cpp, // // scanner.h, scanner.cpp, grammar.h, grammar.cpp // // display.h, display.cpp, // // semi.h, semi.cpp, tok.h, tok.cpp // // // // Compiler command: // // cl /DTEST_SCANNER callsProc.cpp scanner.cpp grammar.cpp \ // // display.cpp semi.cpp tok.cpp // ///////////////////////////////////////////////////////////////////// /* Maintenance History: ==================== ver 1.3 : 04/28/03 - cosmetic change: added argument to typeTable::show in callsProc::process ver 1.2 : 04/27/03 - added more output to display the products of grammar and provide a lot of the functionality for calls and depends. ver 1.1 : 04/26/03 - based on a bug report by Priyaa Nachimathu, I found and fixed a bug in callsProc::Process that affected scope processing Every call to semiExp::get() must be followed by: grammar::intoScope() and then grammar::outOfScope(). ver 1.0 : 04/25/03 - first release */ // #include "scanner.h" #include "semi.h" #include "grammar.h" #include #include /////////////////////////////////////////////////////////////// // callsProc class // /////////////////////////////////////////////////////////////// class callsProc : public scanProc { public: callsProc(scanner &s); bool virtual process(semiExp &se); typeTable& classTable(); typeTable& functionTable(); typeTable& classDecsTable(); typeTable& classFuncsTable(); private: std::string extractFileName(semiExp &se); scanner& _scanner; std::set headersSeen; typeTable classTab; typeTable functionTab; typeTable classDecsTab; typeTable classFuncsTab; }; inline typeTable& callsProc::classTable() { return classTab; } inline typeTable& callsProc::functionTable() { return functionTab; } inline typeTable& callsProc::classDecsTable() { return classDecsTab; } inline typeTable& callsProc::classFuncsTable() { return classFuncsTab; } #endif