diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2008-01-16 19:20:21 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2008-01-16 19:20:21 (GMT) |
commit | 8dab665567c9dffaa3f5fea198fc2110d536594d (patch) | |
tree | 78bac4e928b25e139605aceefa82537f378d8af0 /src/fortrancode.l | |
parent | d3461a1c31f008345d784dc3e819047bc5265c30 (diff) | |
download | Doxygen-8dab665567c9dffaa3f5fea198fc2110d536594d.zip Doxygen-8dab665567c9dffaa3f5fea198fc2110d536594d.tar.gz Doxygen-8dab665567c9dffaa3f5fea198fc2110d536594d.tar.bz2 |
Release-1.5.4
Diffstat (limited to 'src/fortrancode.l')
-rw-r--r-- | src/fortrancode.l | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/fortrancode.l b/src/fortrancode.l index daf9593..c71de8f 100644 --- a/src/fortrancode.l +++ b/src/fortrancode.l @@ -107,6 +107,7 @@ static Definition * g_currentDefinition; static MemberDef * g_currentMemberDef; static bool g_includeCodeFragment; +static char stringStartSymbol; // single or double quote static void endFontClass() { @@ -831,6 +832,7 @@ IGNORE (IMPLICIT{BS}NONE|CONTAINS|WRITE|READ|ALLOCATE|DEALLOCATE|SIZE) } <*>"!"[^>\n].*|"!"$ { // normal comment + if(YY_START == String) REJECT; // ignore in strings startFontClass("comment"); codifyLines(yytext); endFontClass(); @@ -846,26 +848,26 @@ IGNORE (IMPLICIT{BS}NONE|CONTAINS|WRITE|READ|ALLOCATE|DEALLOCATE|SIZE) generateLink(*g_code, yytext); g_insideBody=FALSE; } - /*------ strings --------------------------------------------------*/ <*>"\\\\" { str+=yytext; /* ignore \\ */} -<*>"\\\"" { str+=yytext; /* ignore \" */} +<*>"\\\""|\\\' { str+=yytext; /* ignore \" */} -<String>\" { // string ends with next quote without previous backspace +<String>\"|\' { // string ends with next quote without previous backspace + if(yytext[0]!=stringStartSymbol) REJECT; // single vs double quote str+=yytext; startFontClass("stringliteral"); codifyLines(str); endFontClass(); yy_pop_state(); } -<*>\" { /* string starts */ +<*>\"|\' { /* string starts */ + /* if(YY_START == StrIgnore) REJECT; // ignore in simple comments */ yy_push_state(YY_START); - BEGIN(String); + stringStartSymbol=yytext[0]; // single or double quote + BEGIN(String); str=yytext; } -<String>. {str+=yytext;} - - +<String>. {str+=yytext;} /*-----------------------------------------------------------------------------*/ <*>\n { |