- Implemented ::findModifications to identify nodes that comprise the
  task modifications.
This commit is contained in:
Paul Beckingham 2014-04-20 10:12:24 -04:00
parent 2390838894
commit e05610d1d7
2 changed files with 22 additions and 0 deletions

View file

@ -135,6 +135,7 @@ Tree* A3t::parse ()
findAttributeModifier ();
findOperator ();
findFilter ();
findModifications ();
validate ();
@ -949,6 +950,26 @@ void A3t::findFilter ()
}
}
////////////////////////////////////////////////////////////////////////////////
void A3t::findModifications ()
{
bool after_writecmd = false;
std::vector <Tree*>::iterator i;
for (i = _tree->_branches.begin (); i != _tree->_branches.end (); ++i)
{
if ((*i)->hasTag ("WRITECMD"))
after_writecmd = true;
if (after_writecmd &&
! (*i)->hasTag ("CMD") &&
! (*i)->hasTag ("TERMINATOR") &&
! (*i)->hasTag ("BINARY") &&
! (*i)->hasTag ("RC") &&
! (*i)->hasTag ("CONFIG"))
(*i)->tag ("MODIFICATION");
}
}
////////////////////////////////////////////////////////////////////////////////
// Validate the parse tree.
void A3t::validate ()

View file

@ -65,6 +65,7 @@ private:
void findAttributeModifier ();
void findOperator ();
void findFilter ();
void findModifications ();
void validate ();
// TODO Resolve aliases