#ifndef PROTOTYPE_H #define PROTOTYPE_H ///////////////////////////////////////////////////////////////////// // Prototype.h - Demonstrate grammar processing // // // // Language: Visual C++ 2008 // // Platform: Dell Dimension 9200, Windows Vista Ultimate // // Application: Prototype for CSE687 Pr1, Sp08 // // Author: Jim Fawcett, CST 2-187, Syracuse University // // (315) 443-3948, jfawcett@twcny.rr.com // ///////////////////////////////////////////////////////////////////// /* Processing in this module may throw a standard exception. If you catch the exception and display its message, you can see why that happened - main shows you how to do that. */ #include #include struct Item { std::string funcName; int lineNumber; }; class Prototype { public: Prototype() : isVerbose_(false) {} void setVerbose(bool isVerbose); void registerToker(Toker* pToker); int findFunctions(); std::vector& getFunctions(); private: bool isSpecialControlKey(const std::string& tok); std::vector functions; bool isVerbose_; Toker* pToker_; }; inline void Prototype::setVerbose(bool isVerbose) { isVerbose_ = isVerbose; } inline void Prototype::registerToker(Toker* pToker) { pToker_ = pToker; } inline std::vector& Prototype::getFunctions() { findFunctions(); return functions; } #endif