diff --git a/preprocessor/macro/MacroFlex.ll b/preprocessor/macro/MacroFlex.ll index 1369b5ebe7c6a658ab6cbb95d9cf0f491359da38..590f60ac49210680112a988610841bb0bc23494a 100644 --- a/preprocessor/macro/MacroFlex.ll +++ b/preprocessor/macro/MacroFlex.ll @@ -167,8 +167,8 @@ CONT \\\\ <STMT>ifdef { reading_if_statement = true; return token::IFDEF; } <STMT>if { reading_if_statement = true; return token::IF; } -<STMT>else { driver.error(*yylloc, "@#else is not matched by an @#if statement"); } -<STMT>endif { driver.error(*yylloc, "@#endif is not matched by an @#if statement"); } +<STMT>else { driver.error(*yylloc, "@#else is not matched by an @#if/@#ifdef statement"); } +<STMT>endif { driver.error(*yylloc, "@#endif is not matched by an @#if/@#ifdef statement"); } <STMT>echo { return token::ECHO_DIR; } <STMT>error { return token::ERROR; } @@ -225,7 +225,7 @@ CONT \\\\ yylloc->step(); } <THEN_BODY>. { then_body_tmp.append(yytext); yylloc->step(); } -<THEN_BODY><<EOF>> { driver.error(if_stmt_loc_tmp, "@#if not matched by an @#endif (unexpected end of file)"); } +<THEN_BODY><<EOF>> { driver.error(if_stmt_loc_tmp, "@#if/@#ifdef not matched by an @#endif (unexpected end of file)"); } <THEN_BODY>^{SPC}*@#{SPC}*else{SPC}*(\/\/.*)?{EOL} { yylloc->lines(1); yylloc->step(); @@ -267,7 +267,7 @@ CONT \\\\ yylloc->step(); } <ELSE_BODY>. { else_body_tmp.append(yytext); yylloc->step(); } -<ELSE_BODY><<EOF>> { driver.error(if_stmt_loc_tmp, "@#if not matched by an @#endif (unexpected end of file)"); } +<ELSE_BODY><<EOF>> { driver.error(if_stmt_loc_tmp, "@#if/@#ifdef not matched by an @#endif (unexpected end of file)"); } <ELSE_BODY>^{SPC}*@#{SPC}*endif{SPC}*(\/\/.*)?{EOL} { yylloc->lines(1);