From bbc6cba4a354982510f44fa42418961c5c8ed7d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 13 Jun 2012 18:34:20 +0200 Subject: [PATCH] Macroprocessor: mention @#ifdef in error messages --- preprocessor/macro/MacroFlex.ll | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/preprocessor/macro/MacroFlex.ll b/preprocessor/macro/MacroFlex.ll index 1369b5ebe..590f60ac4 100644 --- a/preprocessor/macro/MacroFlex.ll +++ b/preprocessor/macro/MacroFlex.ll @@ -167,8 +167,8 @@ CONT \\\\ ifdef { reading_if_statement = true; return token::IFDEF; } if { reading_if_statement = true; return token::IF; } -else { driver.error(*yylloc, "@#else is not matched by an @#if statement"); } -endif { driver.error(*yylloc, "@#endif is not matched by an @#if statement"); } +else { driver.error(*yylloc, "@#else is not matched by an @#if/@#ifdef statement"); } +endif { driver.error(*yylloc, "@#endif is not matched by an @#if/@#ifdef statement"); } echo { return token::ECHO_DIR; } error { return token::ERROR; } @@ -225,7 +225,7 @@ CONT \\\\ yylloc->step(); } . { then_body_tmp.append(yytext); yylloc->step(); } -<> { driver.error(if_stmt_loc_tmp, "@#if not matched by an @#endif (unexpected end of file)"); } +<> { driver.error(if_stmt_loc_tmp, "@#if/@#ifdef not matched by an @#endif (unexpected end of file)"); } ^{SPC}*@#{SPC}*else{SPC}*(\/\/.*)?{EOL} { yylloc->lines(1); yylloc->step(); @@ -267,7 +267,7 @@ CONT \\\\ yylloc->step(); } . { else_body_tmp.append(yytext); yylloc->step(); } -<> { driver.error(if_stmt_loc_tmp, "@#if not matched by an @#endif (unexpected end of file)"); } +<> { driver.error(if_stmt_loc_tmp, "@#if/@#ifdef not matched by an @#endif (unexpected end of file)"); } ^{SPC}*@#{SPC}*endif{SPC}*(\/\/.*)?{EOL} { yylloc->lines(1);