- //get sets
- std::getline(fileStream,word,'(');
- std::vector<std::string> wordBits;
- CDMUtilities::splitter::split(wordBits,word," \n",CDMUtilities::splitter::no_empties);
- if (wordBits[wordBits.size() - 1] == "main" || wordBits[wordBits.size() - 1] == "IMPLEMENT_APP")
+ std::string fileContent = "";
+ char ch = fileStream.get();
+ while(!fileStream.eof())
+ {
+ fileContent.push_back(ch);
+ ch = fileStream.get();
+ }
+ fileStream.close();
+
+ boost::regex expression("^\\h*IMPLEMENT_APP[#\\s\\(]");
+ std::string::const_iterator start, end;
+ start = fileContent.begin();
+ end = fileContent.end();
+ boost::match_results<std::string::const_iterator> what;
+ boost::match_flag_type flags = boost::match_default;
+ if(boost::regex_search(start, end, what, expression, flags))