Changeset 3693 in CLRX for CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp
- Timestamp:
- Feb 1, 2018, 4:21:53 PM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CLRadeonExtender/trunk/amdbin/ROCmBinaries.cpp
r3692 r3693 312 312 313 313 static std::string parseYAMLStringValue(const char*& ptr, const char* end, size_t& lineNo, 314 cxuint prevIndent, bool singleValue = false )314 cxuint prevIndent, bool singleValue = false, bool blockAccept = true) 315 315 { 316 316 skipSpacesToLineEnd(ptr, end); … … 323 323 else if (*ptr == '|' || *ptr == '>') 324 324 { 325 if (!blockAccept) 326 throw ParseException(lineNo, "Illegal block string start"); 325 327 // multiline 326 328 bool newLineFold = *ptr=='>'; … … 415 417 public: 416 418 virtual void consume(const char*& ptr, const char* end, size_t& lineNo, 417 cxuint prevIndent, bool singleValue ) = 0;419 cxuint prevIndent, bool singleValue, bool blockAccept) = 0; 418 420 }; 419 421 … … 432 434 { 433 435 // parse in line 434 elemConsumer->consume(ptr, end, lineNo, 0, false );436 elemConsumer->consume(ptr, end, lineNo, 0, false, false); 435 437 skipSpacesAndComments(ptr, end, lineNo); 436 438 if (ptr!=end && *ptr==']') … … 468 470 if (afterMinus == ptr) 469 471 throw ParseException(lineNo, "No spaces after '-'"); 470 elemConsumer->consume(ptr, end, lineNo, indent0 +1 + ptr-afterMinus, true);472 elemConsumer->consume(ptr, end, lineNo, indent0, true, true); 471 473 472 474 size_t indent = skipSpacesAndComments(ptr, end, lineNo); … … 496 498 497 499 virtual void consume(const char*& ptr, const char* end, size_t& lineNo, 498 cxuint prevIndent, bool singleValue )500 cxuint prevIndent, bool singleValue, bool blockAccept) 499 501 { 500 502 if (elemsNum == requiredElemsNum) … … 522 524 523 525 virtual void consume(const char*& ptr, const char* end, size_t& lineNo, 524 cxuint prevIndent, bool singleValue )526 cxuint prevIndent, bool singleValue, bool blockAccept) 525 527 { 526 528 const size_t oldLineNo = lineNo; 527 std::string str = parseYAMLStringValue(ptr, end, lineNo, prevIndent, singleValue); 529 std::string str = parseYAMLStringValue(ptr, end, lineNo, prevIndent, 530 singleValue, blockAccept); 528 531 // parse printf string 529 532 ROCmPrintfInfo printfInfo{};
Note: See TracChangeset
for help on using the changeset viewer.