diff options
-rw-r--r-- | src/config.l | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/config.l b/src/config.l index 0002ecb..38350a5 100644 --- a/src/config.l +++ b/src/config.l @@ -601,9 +601,9 @@ static void readIncludeFile(const char *incName) %} -%option nounput %option noyywrap +%x PreStart %x Start %x SkipComment %x SkipInvalid @@ -617,13 +617,11 @@ static void readIncludeFile(const char *incName) %% <*>\0x0d -/* - <PreStart>"##".*"\n" { config->appendStartComment(yytext);} - <PreStart>. { +<PreStart>"##".*"\n" { config->appendStartComment(yytext);} +<PreStart>. { BEGIN(Start); - REJECT; + unput(*yytext); } -*/ <Start,GetString,GetStrList,GetBool,SkipInvalid>"##".*"\n" { config->appendUserComment(yytext);} <Start,GetString,GetStrList,GetBool,SkipInvalid>"#" { BEGIN(SkipComment); } <Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QCString cmd=yytext; @@ -861,8 +859,7 @@ void Config::writeTemplate(FTextStream &t,bool sl,bool upd) /* print first lines of user comment that were at the beginning of the file, might have special meaning for editors */ if (m_startComment) { - t << takeStartComment(); - t << "\n"; + t << takeStartComment() << endl; } t << "# Doxyfile " << versionString << endl << endl; if (!sl) @@ -1755,7 +1752,7 @@ bool Config::parseString(const char *fn,const char *str,bool update) includeStack.clear(); includeDepth = 0; configYYrestart( configYYin ); - BEGIN( Start ); + BEGIN( PreStart ); config_upd = update; configYYlex(); config_upd = FALSE; |