From e8dbcc696d5825f86d8b020dbd499efb6c7a4911 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 --- DynareFlex.ll | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/DynareFlex.ll b/DynareFlex.ll index 9281f22a..7cf77768 100644 --- a/DynareFlex.ll +++ b/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;}