diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2003-07-25 12:37:34 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2003-07-25 12:37:34 (GMT) |
commit | 5f27d7a0fcea0154d7d68cfb0812e097bb0deff1 (patch) | |
tree | 5648b4ab8fb4ca6051647d47c3e8cf8d621e8782 /src/scanner.l | |
parent | 655c12fb6a950ed1b59bbcc29852ce20e45fdc6a (diff) | |
download | Doxygen-5f27d7a0fcea0154d7d68cfb0812e097bb0deff1.zip Doxygen-5f27d7a0fcea0154d7d68cfb0812e097bb0deff1.tar.gz Doxygen-5f27d7a0fcea0154d7d68cfb0812e097bb0deff1.tar.bz2 |
Release-1.3.3
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/src/scanner.l b/src/scanner.l index 8b47179..9d9d7e3 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -157,6 +157,7 @@ static QCString xrefItemKey; static QCString xrefItemTitle; static QCString xrefListTitle; +static QCString g_skipBlockName; //----------------------------------------------------------------------------- @@ -2809,6 +2810,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] lastCContext = YY_START; BEGIN(SkipCxxComment); } +<SkipInits>\" { + lastStringContext=YY_START; + BEGIN( SkipString ); + } <SkipInits>; { warn(yyFileName,yyLineNr, "Warning: Found ';' while parsing initializer list! " @@ -3855,31 +3860,37 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] <Doc,PageDoc,ClassDoc>{CMD}"verbatim"/[^a-z_A-Z0-9] { lastVerbState=YY_START; current->doc+="\\verbatim"; + g_skipBlockName="verbatim"; BEGIN(SkipVerbatim); } <JavaDoc>{CMD}"verbatim"/[^a-z_A-Z0-9] { lastVerbState=YY_START; current->brief+="\\verbatim"; + g_skipBlockName="verbatim"; BEGIN(SkipVerbatim); } <Doc,PageDoc,ClassDoc>{CMD}"latexonly"/[^a-z_A-Z0-9] { lastVerbState=YY_START; current->doc+="\\latexonly"; + g_skipBlockName="latexonly"; BEGIN(SkipVerbatim); } <JavaDoc>{CMD}"latexonly"/[^a-z_A-Z0-9] { lastVerbState=YY_START; current->brief+="\\latexonly"; + g_skipBlockName="latexonly"; BEGIN(SkipVerbatim); } <Doc,PageDoc,ClassDoc>{CMD}"htmlonly"/[^a-z_A-Z0-9] { lastVerbState=YY_START; current->doc+="\\htmlonly"; + g_skipBlockName="htmlonly"; BEGIN(SkipVerbatim); } <JavaDoc>{CMD}"htmlonly"/[^a-z_A-Z0-9] { lastVerbState=YY_START; current->brief+="\\htmlonly"; + g_skipBlockName="htmlonly"; BEGIN(SkipVerbatim); } <Doc,PageDoc,ClassDoc>{CMD}"addindex"{B}+[^\n]+ { @@ -3946,7 +3957,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] <SkipVerbatim>. { current->doc+=*yytext; } -<SkipCode>{CMD}"endcode" { +<SkipVerbatim><<EOF>> { + warn(yyFileName,yyLineNr, + "Warning: reached end of file while inside a @%s block; check for missing @end%s!",g_skipBlockName.data(),g_skipBlockName.data() + ); + yyterminate(); + } +<SkipCode>{CMD}"endcode"/[^a-z_A-Z0-9] { *pSkipDoc+="\\endcode"; BEGIN(lastCodeState); } @@ -3975,6 +3992,12 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] <SkipCode>. { *pSkipDoc+=*yytext; } +<SkipCode><<EOF>> { + warn(yyFileName,yyLineNr, + "Warning: reached end of file while inside a @code block; check for missing @endcode!" + ); + yyterminate(); + } <AnchorLabel>{LABELID} { SectionInfo *si = new SectionInfo(yyFileName,yytext,0,SectionInfo::Anchor); Doxygen::sectionDict.insert(yytext,si); @@ -4494,6 +4517,9 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] current->name = current->name.stripWhiteSpace(); newDocState(); } +<DefLineDoc,LineDoc,AfterDocLine>{SECTIONCMD} { + warn(yyFileName,yyLineNr,"Command %s not allowed in single-line C++ comment! Ignoring.",yytext); + } <Doc>[a-z_A-Z0-9]+ { current->doc += yytext; } <Doc,PageDoc,AfterDoc,LineDoc,ClassDoc>("\\\\"|"@@") { current->doc += yytext; } <Doc>. { current->doc += *yytext; } |