- Timestamp:
- May 23, 2018 10:08:39 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Storage/CUE.cpp
r67874 r72293 312 312 DECLINLINE(void) cueTokenizerSkipCh(PCUETOKENIZER pTokenizer) 313 313 { 314 pTokenizer->pszInput++; 314 /* Never ever go past EOS. */ 315 if (!cueTokenizerIsEos(pTokenizer)) 316 pTokenizer->pszInput++; 315 317 } 316 318 … … 383 385 384 386 /** 387 * Skip all whitespace starting from the current input buffer position. 388 * Skips all present comments too. 389 * 390 * @returns nothing. 391 * @param pTokenizer The tokenizer state. 392 */ 393 DECLINLINE(void) cueTokenizerSkipWhitespace(PCUETOKENIZER pTokenizer) 394 { 395 while (!cueTokenizerIsEos(pTokenizer)) 396 { 397 while ( cueTokenizerGetCh(pTokenizer) == ' ' 398 || cueTokenizerGetCh(pTokenizer) == '\t') 399 cueTokenizerSkipCh(pTokenizer); 400 401 if ( !cueTokenizerIsEos(pTokenizer) 402 && !cueTokenizerIsSkipNewLine(pTokenizer)) 403 break; /* Skipped everything, next is some real content. */ 404 } 405 } 406 407 /** 385 408 * Skips a multi line comment. 386 409 * … … 393 416 && !cueTokenizerIsSkipNewLine(pTokenizer)) 394 417 cueTokenizerSkipCh(pTokenizer); 395 } 396 397 /** 398 * Skip all whitespace starting from the current input buffer position. 399 * Skips all present comments too. 400 * 401 * @returns nothing. 402 * @param pTokenizer The tokenizer state. 403 */ 404 DECLINLINE(void) cueTokenizerSkipWhitespace(PCUETOKENIZER pTokenizer) 405 { 406 while (!cueTokenizerIsEos(pTokenizer)) 407 { 408 while ( cueTokenizerGetCh(pTokenizer) == ' ' 409 || cueTokenizerGetCh(pTokenizer) == '\t') 410 cueTokenizerSkipCh(pTokenizer); 411 412 if ( !cueTokenizerIsEos(pTokenizer) 413 && !cueTokenizerIsSkipNewLine(pTokenizer)) 414 break; /* Skipped everything, next is some real content. */ 415 } 418 cueTokenizerSkipWhitespace(pTokenizer); 416 419 } 417 420 … … 428 431 unsigned cchKeyword = 0; 429 432 bool fIsKeyword = false; 430 bool fIsComment = false;431 const char *pszKeyword = pTokenizer->pszInput;432 433 Assert(RT_C_IS_ALPHA(*p szKeyword));433 bool fIsComment; 434 const char *pszKeyword; 435 436 Assert(RT_C_IS_ALPHA(*pTokenizer->pszInput)); 434 437 435 438 do 436 439 { 437 440 fIsComment = false; 441 pszKeyword = pTokenizer->pszInput; 438 442 439 443 do
Note:
See TracChangeset
for help on using the changeset viewer.