///////////////////////////////////////////////////////////////////// // Tokenizer.cpp - Reads words from a file // // // #include #include "Tokenizer.h" /* hello ruby program */ //----< constructor may be called with no argument >----------- //----< destructor >------------------------------------------- Toker::~Toker() { } //----< attach tokenizer to a source file or string >---------- bool Toker::attach(const std::string& name, bool srcIsFile) { if(srcIsFile) pIn = new std::ifstream(name.c_str()); else pIn = new std::istringstream(name.c_str()); return pIn->good(); }