Skip to content
Snippets Groups Projects
Commit 412e8a7d authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Preprocessor: fix problem with "%" sign inside string in native statements

parent aafa3283
Branches
No related tags found
No related merge requests found
...@@ -580,7 +580,9 @@ string eofbuff; ...@@ -580,7 +580,9 @@ string eofbuff;
/* Add the native statement */ /* Add the native statement */
<NATIVE>{ <NATIVE>{
[^/%*\n\.]* | [^/%*\n\.\'\"]* |
\'[^\'\n]*\' |
\"[^\"\n]*\" |
\.{1,2} | \.{1,2} |
"*" | "*" |
"/" { yymore(); eofbuff = string(yytext); } "/" { yymore(); eofbuff = string(yytext); }
......
...@@ -28,6 +28,8 @@ fff = [ 1 delta 4 ; ... /* COMMENT ...@@ -28,6 +28,8 @@ fff = [ 1 delta 4 ; ... /* COMMENT
1 0 4 ; ... // comment */ 1 0 4 ; ... // comment */
phi 9 4 ] % comment phi 9 4 ] % comment
disp(' %% This is not a comment %% ')
model; model;
c*theta*h^(1+psi)=(1-alpha)*y; c*theta*h^(1+psi)=(1-alpha)*y;
k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1))) k = beta*(((exp(b)*c)/(exp(b(+1))*c(+1)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment