diff options
Diffstat (limited to '')
-rw-r--r-- | src/buildparser.cpp | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/src/buildparser.cpp b/src/buildparser.cpp index 364aaa5..50fc0fc 100644 --- a/src/buildparser.cpp +++ b/src/buildparser.cpp | |||
@@ -283,7 +283,7 @@ void BuildParser::addPerformParam( const char *sParam ) | |||
283 | // | 283 | // |
284 | void BuildParser::addAction() | 284 | void BuildParser::addAction() |
285 | { | 285 | { |
286 | lActions.push_back( ActionTmp("", ActionTmpCmdList()) ); | 286 | lActions.push_back( ActionTmp("", ActionTmpCmdList() ) ); |
287 | } | 287 | } |
288 | 288 | ||
289 | void BuildParser::addAction( const char *sName ) | 289 | void BuildParser::addAction( const char *sName ) |
@@ -296,6 +296,11 @@ void BuildParser::addCommand( int nType ) | |||
296 | lActions.back().second.push_back( ActionTmpCmd( nType, lTmp ) ); | 296 | lActions.back().second.push_back( ActionTmpCmd( nType, lTmp ) ); |
297 | } | 297 | } |
298 | 298 | ||
299 | void BuildParser::addGrpCommand( const char *sGroup, int nType ) | ||
300 | { | ||
301 | lActions.back().second.push_back( ActionTmpCmd( nType, sGroup ) ); | ||
302 | } | ||
303 | |||
299 | // | 304 | // |
300 | // Global variable functions | 305 | // Global variable functions |
301 | // | 306 | // |
@@ -324,8 +329,15 @@ void BuildParser::debugDump() | |||
324 | for( ActionTmpCmdList::iterator j = (*i).second.begin(); | 329 | for( ActionTmpCmdList::iterator j = (*i).second.begin(); |
325 | j != (*i).second.end(); j++ ) | 330 | j != (*i).second.end(); j++ ) |
326 | { | 331 | { |
327 | printf(" %d ", (*j).first ); | 332 | printf(" %d ", (*j).nAct ); |
328 | printBuildList( (*j).second ); | 333 | if( (*j).bGroup ) |
334 | { | ||
335 | printf("!%s", (*j).sGroup.c_str() ); | ||
336 | } | ||
337 | else | ||
338 | { | ||
339 | printBuildList( (*j).lCmds ); | ||
340 | } | ||
329 | printf("\n"); | 341 | printf("\n"); |
330 | } | 342 | } |
331 | } | 343 | } |
@@ -555,14 +567,23 @@ Build *BuildParser::genBuild() | |||
555 | for( ActionTmpCmdList::iterator j = (*i).second.begin(); | 567 | for( ActionTmpCmdList::iterator j = (*i).second.begin(); |
556 | j != (*i).second.end(); j++ ) | 568 | j != (*i).second.end(); j++ ) |
557 | { | 569 | { |
558 | StringList lWhat = buildToStringList( | 570 | if( (*j).bGroup ) |
559 | (*j).second, StringList(), bld | 571 | { |
560 | ); | 572 | pAct->addCommand( |
561 | 573 | (Action::eAction)((*j).nAct), (*j).sGroup, true | |
562 | for( StringList::iterator k = lWhat.begin(); | 574 | ); |
563 | k != lWhat.end(); k++ ) | 575 | } |
576 | else | ||
564 | { | 577 | { |
565 | pAct->addCommand( (Action::eAction)((*j).first), *k ); | 578 | StringList lWhat = buildToStringList( |
579 | (*j).lCmds, StringList(), bld | ||
580 | ); | ||
581 | |||
582 | for( StringList::iterator k = lWhat.begin(); | ||
583 | k != lWhat.end(); k++ ) | ||
584 | { | ||
585 | pAct->addCommand( (Action::eAction)((*j).nAct), *k, false ); | ||
586 | } | ||
566 | } | 587 | } |
567 | } | 588 | } |
568 | 589 | ||