diff options
author | albert-github <albert.tests@gmail.com> | 2016-08-28 09:25:52 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2016-08-28 09:25:52 (GMT) |
commit | 4a7673fed2f28a24e0c7e8bb94621b0e14ac9ed5 (patch) | |
tree | eca893a2de0841fd58bb78bad3719eecde91a813 /src/pre.l | |
parent | cd6a8d34708c40da3e568fdb689b59e7a3d8bdbc (diff) | |
download | Doxygen-4a7673fed2f28a24e0c7e8bb94621b0e14ac9ed5.zip Doxygen-4a7673fed2f28a24e0c7e8bb94621b0e14ac9ed5.tar.gz Doxygen-4a7673fed2f28a24e0c7e8bb94621b0e14ac9ed5.tar.bz2 |
FORTRAN determination string in preprocessing
In FORTRAN a string can start (and end) either with a double quote or a single quote. The later was not considered in the preprocessing resulting in unwanted substitutions in strings.
Diffstat (limited to 'src/pre.l')
-rw-r--r-- | src/pre.l | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1737,6 +1737,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) %x SkipString %x CopyLine %x CopyString +%x CopyStringFtn %x Include %x IncludeID %x EndImport @@ -1850,6 +1851,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) outputChar(*yytext); BEGIN( CopyString ); } +<CopyLine>\' { + if (getLanguageFromFileName(g_yyFileName)!=SrcLangExt_Fortran) REJECT; + outputChar(*yytext); + BEGIN( CopyStringFtn ); + } <CopyString>[^\"\\\r\n]+ { outputArray(yytext,(int)yyleng); } @@ -1860,6 +1866,16 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) outputChar(*yytext); BEGIN( CopyLine ); } +<CopyStringFtn>[^\'\\\r\n]+ { + outputArray(yytext,(int)yyleng); + } +<CopyStringFtn>\\. { + outputArray(yytext,(int)yyleng); + } +<CopyStringFtn>\' { + outputChar(*yytext); + BEGIN( CopyLine ); + } <CopyLine>{ID}/{BN}{0,80}"(" { g_expectGuard = FALSE; Define *def=0; |