diff options
author | albert-github <albert.tests@gmail.com> | 2018-06-19 17:47:36 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2018-06-19 17:47:36 (GMT) |
commit | a0db6fdbff2e21502bb2ac7437c5bd57d515d83b (patch) | |
tree | f15cb290aabd901dddf128efc56554627d57b188 /src/pre.l | |
parent | 4536982bdebc0056d0c5d64a12881f20b5801c06 (diff) | |
download | Doxygen-a0db6fdbff2e21502bb2ac7437c5bd57d515d83b.zip Doxygen-a0db6fdbff2e21502bb2ac7437c5bd57d515d83b.tar.gz Doxygen-a0db6fdbff2e21502bb2ac7437c5bd57d515d83b.tar.bz2 |
Bug 796621 - @cond does not stop at @endcond Fortran
The backslash (\) is in Fortran not an escape character but was handled as such, this has been corrected.
Handling of the different Fortran string types ('...' and "...") made more consistent.
Diffstat (limited to 'src/pre.l')
-rw-r--r-- | src/pre.l | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -1740,6 +1740,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) %x CopyLine %x CopyString %x CopyStringFtn +%x CopyStringFtnDouble %x Include %x IncludeID %x EndImport @@ -1851,7 +1852,14 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) } <CopyLine>\" { outputChar(*yytext); - BEGIN( CopyString ); + if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran) + { + BEGIN( CopyString ); + } + else + { + BEGIN( CopyStringFtnDouble ); + } } <CopyLine>\' { if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran) REJECT; @@ -1859,7 +1867,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) BEGIN( CopyStringFtn ); } <CopyString>[^\"\\\r\n]+ { - outputArray(yytext,(int)yyleng); + outputArray(yytext,(int)yyleng); } <CopyString>\\. { outputArray(yytext,(int)yyleng); @@ -1868,8 +1876,18 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) outputChar(*yytext); BEGIN( CopyLine ); } +<CopyStringFtnDouble>[^\"\\\r\n]+ { + outputArray(yytext,(int)yyleng); + } +<CopyStringFtnDouble>\\. { + outputArray(yytext,(int)yyleng); + } +<CopyStringFtnDouble>\" { + outputChar(*yytext); + BEGIN( CopyLine ); + } <CopyStringFtn>[^\'\\\r\n]+ { - outputArray(yytext,(int)yyleng); + outputArray(yytext,(int)yyleng); } <CopyStringFtn>\\. { outputArray(yytext,(int)yyleng); |