trunk preprocessor: allow one line comments behind @#endif and @#endfor

git-svn-id: https://www.dynare.org/svn/dynare/trunk@2394 ac1d8469-bf42-47a9-8791-bf33cf982152
issue#70
sebastien 2009-02-04 23:24:16 +00:00
parent ba1e49de17
commit e61f213a84
1 changed files with 3 additions and 3 deletions

View File

@ -188,7 +188,7 @@ CONT \\\\
}
<FOR_BODY>. { for_body_tmp.append(yytext); yylloc->step(); }
<FOR_BODY><<EOF>> { driver.error(for_stmt_loc_tmp, "@#for loop not matched by an @#endfor (unexpected end of file)"); }
<FOR_BODY>^{SPC}*@#{SPC}*endfor{SPC}*{EOL} {
<FOR_BODY>^{SPC}*@#{SPC}*endfor{SPC}*(\/\/.*)?{EOL} {
yylloc->lines(1);
yylloc->step();
if (nested_for_nb)
@ -233,7 +233,7 @@ CONT \\\\
}
}
<THEN_BODY>^{SPC}*@#{SPC}*endif{SPC}*{EOL} {
<THEN_BODY>^{SPC}*@#{SPC}*endif{SPC}*(\/\/.*)?{EOL} {
yylloc->lines(1);
yylloc->step();
if (nested_if_nb)
@ -263,7 +263,7 @@ CONT \\\\
<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>^{SPC}*@#{SPC}*endif{SPC}*{EOL} {
<ELSE_BODY>^{SPC}*@#{SPC}*endif{SPC}*(\/\/.*)?{EOL} {
yylloc->lines(1);
yylloc->step();
if (nested_if_nb)