Commit e8dbcc69 authored by sebastien's avatar sebastien
Browse files

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
parent 6a9f2c47
......@@ -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;
<INITIAL,DYNARE_STATEMENT,DYNARE_BLOCK>["/"]["/"].*
<INITIAL,DYNARE_STATEMENT,DYNARE_BLOCK>"/*" {comment_caller = YY_START; BEGIN COMMENT;}
<COMMENT>[^*\n]*
<COMMENT>"*"+[^/\n]
<COMMENT>"*"+"/" {BEGIN comment_caller;}
<COMMENT>"*/" {BEGIN comment_caller;}
<COMMENT>.
/* Begin of a Dynare statement */
<INITIAL>var {BEGIN DYNARE_STATEMENT; return token::VAR;}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment