since i've replaced this with a non-va_arg yyerror, call this when you hit a syntax error and then call the non-va_arg yyerror with the result
| 547 | // call this when you hit a syntax error and then call |
| 548 | // the non-va_arg yyerror with the result |
| 549 | std::string FormatSyntaxError( char ch, const char* pszAdditionalMsg = NULL ) |
| 550 | { |
| 551 | // TODO:BAM MKS will call yyerror with narrow-char hard-coded string, so if |
| 552 | // we do it here as well, I suppose that's OK. This should be eventually |
| 553 | // corrected. |
| 554 | |
| 555 | std::ostringstream ssErr; |
| 556 | ssErr << "Syntax error: \'" << ch << "\'"; |
| 557 | if( pszAdditionalMsg ) |
| 558 | ssErr << ", " << pszAdditionalMsg; |
| 559 | |
| 560 | return ssErr.str(); |
| 561 | } |
| 562 | |
| 563 | // saves typing |
| 564 | #define TRACE_RETURN(x) lextrace(_T(#x)); return x |