diff --git a/preprocessor/DynareFlex.ll b/preprocessor/DynareFlex.ll index 254739e21e69c61ea70951c322ba57842b064aef..2ed5b6f7998dbdf72d77fdc469871a0c3592a715 100644 --- a/preprocessor/DynareFlex.ll +++ b/preprocessor/DynareFlex.ll @@ -580,7 +580,9 @@ string eofbuff; /* Add the native statement */ <NATIVE>{ - [^/%*\n\.]* | + [^/%*\n\.\'\"]* | + \'[^\'\n]*\' | + \"[^\"\n]*\" | \.{1,2} | "*" | "/" { yymore(); eofbuff = string(yytext); } diff --git a/tests/comments.mod b/tests/comments.mod index f2a6689952181df80e9aebb7c109dfd894d10c72..dd8f9b73cfb6cda24a5ee4aa4656427d71292910 100644 --- a/tests/comments.mod +++ b/tests/comments.mod @@ -28,6 +28,8 @@ fff = [ 1 delta 4 ; ... /* COMMENT 1 0 4 ; ... // comment */ phi 9 4 ] % comment +disp(' %% This is not a comment %% ') + model; c*theta*h^(1+psi)=(1-alpha)*y; k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))