- Implemented A3t::getWords, to replace A3::extract_words.
This commit is contained in:
Paul Beckingham 2014-04-24 12:17:28 -04:00
parent b01906cd62
commit 1d298c9068
2 changed files with 19 additions and 2 deletions

View file

@ -584,6 +584,24 @@ const std::string A3t::getFilterExpression () const
return filter; return filter;
} }
////////////////////////////////////////////////////////////////////////////////
const std::vector <std::string> A3t::getWords () const
{
std::vector <std::string> words;
std::vector <Tree*>::const_iterator i;
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
{
if (! (*i)->hasTag ("BINARY") &&
! (*i)->hasTag ("RC") &&
! (*i)->hasTag ("CONFIG") &&
! (*i)->hasTag ("CMD") &&
! (*i)->hasTag ("TERMINATOR"))
words.push_back ((*i)->attribute ("raw"));
}
return words;
}
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
// /pattern/ // /pattern/
void A3t::findPattern () void A3t::findPattern ()

View file

@ -57,8 +57,7 @@ public:
Tree* captureFirst (const std::string&); Tree* captureFirst (const std::string&);
const std::string getFilterExpression () const; const std::string getFilterExpression () const;
const std::vector <std::string> getWords () const;
// TODO Extract words
// TODO Extract modifications // TODO Extract modifications
private: private: