Changeset 1437 for code/branches/console/src/core
- Timestamp:
- May 27, 2008, 4:15:47 AM (16 years ago)
- Location:
- code/branches/console/src/core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/console/src/core/CommandExecutor.cc
r1436 r1437 146 146 void CommandExecutor::parse(const std::string& command, bool bInitialize) 147 147 { 148 std::cout << "parse (" << bInitialize << "): command: >" << command << "<" << std::endl;149 148 if (bInitialize) 150 149 CommandExecutor::getEvaluation().initialize(command); … … 344 343 } 345 344 } 346 std::cout << "1\n";347 345 case CS_ParamPreparation: 348 std::cout << "2\n";349 346 { 350 347 if (CommandExecutor::getEvaluation().function_->getParamCount() == 0 || CommandExecutor::enoughArgumentsGiven(CommandExecutor::getEvaluation().function_)) … … 359 356 argumentNumber -= 1; 360 357 361 std::cout << "arglist: " << CommandExecutor::getLastArgument() << ", " << CommandExecutor::getEvaluation().function_->getName() << ", " << argumentNumber << std::endl;362 358 CommandExecutor::createListOfPossibleArguments(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber); 363 359 CommandExecutor::getEvaluation().state_ = CS_Params; … … 371 367 } 372 368 case CS_Params: 373 std::cout << "3\n";374 369 { 375 370 if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 1) 376 371 { 377 std::cout << "3_1\n";378 372 // There is exactly one possible argument 379 373 CommandExecutor::getEvaluation().argument_ = (*CommandExecutor::getEvaluation().listOfPossibleArguments_.begin()).second; … … 384 378 else if (CommandExecutor::getEvaluation().listOfPossibleArguments_.size() == 0) 385 379 { 386 std::cout << "3_2\n";387 380 // The user tries something new - we let him do 388 381 CommandExecutor::getEvaluation().state_ = CS_ParamPreparation; … … 392 385 else 393 386 { 394 std::cout << "3_3\n";395 387 // There are several possibilities 396 388 unsigned int argumentNumber = CommandExecutor::argumentsGiven(); 397 389 if (argumentNumber > 0) 398 390 --argumentNumber; 399 std::cout << "3_3_1\n";400 391 if (CommandExecutor::getEvaluation().functionclass_ && argumentNumber > 0) 401 392 --argumentNumber; 402 393 403 std::cout << "3_3_2\n";404 394 CommandExecutor::getEvaluation().argument_ = CommandExecutor::getCommonBegin(CommandExecutor::getEvaluation().listOfPossibleArguments_); 405 std::cout << "3_3_3\n";406 395 CommandExecutor::getEvaluation().possibleArgument_ = CommandExecutor::getPossibleArgument(CommandExecutor::getLastArgument(), CommandExecutor::getEvaluation().function_, argumentNumber); 407 std::cout << "3_3_4\n";408 396 CommandExecutor::getEvaluation().state_ = CS_ParamPreparation; 409 std::cout << "3_3_5\n";410 397 return; 411 398 } 412 399 } 413 400 case CS_Finished: 414 std::cout << "4\n";415 401 { 416 402 // Nothing more to do -
code/branches/console/src/core/ConsoleCommandCompilation.cc
r1436 r1437 88 88 { 89 89 if (newline) 90 { 90 91 COUT(0) << text << std::endl; 92 } 91 93 else 94 { 92 95 COUT(0) << text; 96 } 93 97 } 94 98
Note: See TracChangeset
for help on using the changeset viewer.