From 9edf0b7dc8b36700e890ed6ebaa4d8a8e8c7ea7e Mon Sep 17 00:00:00 2001 From: sebastien Date: Tue, 8 Apr 2008 15:14:08 +0000 Subject: [PATCH] v4 preprocessor: fixed bug with C-style comments, i.e. of the form /* ... */ git-svn-id: https://www.dynare.org/svn/dynare/dynare_v4@1786 ac1d8469-bf42-47a9-8791-bf33cf982152 --- preprocessor/DynareFlex.ll | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/preprocessor/DynareFlex.ll b/preprocessor/DynareFlex.ll index 9281f22aa..7cf77768e 100644 --- a/preprocessor/DynareFlex.ll +++ b/preprocessor/DynareFlex.ll @@ -84,7 +84,7 @@ int sigma_e = 0; BEGIN(line_caller); } - /* spaces, tabs and EOL are ignored */ + /* spaces, tabs and carriage returns are ignored */ <*>[ \t\r\f]+ { yylloc->step(); } <*>[\n]+ { yylloc->lines(yyleng); yylloc->step(); } @@ -93,9 +93,8 @@ int sigma_e = 0; ["/"]["/"].* "/*" {comment_caller = YY_START; BEGIN COMMENT;} -[^*\n]* -"*"+[^/\n] -"*"+"/" {BEGIN comment_caller;} +"*/" {BEGIN comment_caller;} +. /* Begin of a Dynare statement */ var {BEGIN DYNARE_STATEMENT; return token::VAR;}