summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
authorDimitri van Heesch <dimitri@stack.nl>2010-06-25 11:31:51 (GMT)
committerDimitri van Heesch <dimitri@stack.nl>2010-06-25 11:31:51 (GMT)
commitc37c8626674dd6ba0d53dcad84dd4bb5d92005a4 (patch)
treefa51c4ac8c1fe241b2d6c4af9d2f9a1297ce8e0a /src/commentscan.l
parent0c6ee149829948582e5e5c1b96c8b3105b02672a (diff)
downloadDoxygen-c37c8626674dd6ba0d53dcad84dd4bb5d92005a4.zip
Doxygen-c37c8626674dd6ba0d53dcad84dd4bb5d92005a4.tar.gz
Doxygen-c37c8626674dd6ba0d53dcad84dd4bb5d92005a4.tar.bz2
Release-1.7.1
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l88
1 files changed, 45 insertions, 43 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index b805fff..bd92350 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -433,6 +433,7 @@ static QCString getDocSectionName(int s)
case Entry::CATEGORYDOC_SEC: return "\\category";
case Entry::ENUMDOC_SEC: return "\\enum";
case Entry::PAGEDOC_SEC: return "\\page";
+ case Entry::VARIABLEDOC_SEC: return "\\var";
case Entry::MEMBERDOC_SEC: return "\\fn";
case Entry::OVERLOADDOC_SEC: return "\\overload";
case Entry::FILEDOC_SEC: return "\\file";
@@ -451,6 +452,7 @@ static QCString getDocSectionName(int s)
static bool makeStructuralIndicator(Entry::Sections s)
{
+ //printf("current->section=%x\n",current->section);
if (!getDocSectionName(current->section).isEmpty())
{
return TRUE;
@@ -1098,18 +1100,18 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<ReadFormulaShort>{CMD}"f$" { // end of inline formula
formulaText+="$";
- addOutput(addFormula());
+ addOutput(" "+addFormula());
BEGIN(Comment);
}
<ReadFormulaLong>{CMD}"f]" { // end of block formula
formulaText+="\\]";
- addOutput(addFormula());
+ addOutput(" "+addFormula());
BEGIN(Comment);
}
<ReadFormulaLong>{CMD}"f}" { // end of custom env formula
formulaText+="\\end";
formulaText+=formulaEnv;
- addOutput(addFormula());
+ addOutput(" "+addFormula());
BEGIN(Comment);
}
<ReadFormulaLong,ReadFormulaShort>[^\\@\n]+ { // any non-special character
@@ -1136,7 +1138,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<EnumDocArg1>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: missing argument after \\enum."
+ "warning: missing argument after \\enum."
);
addOutput('\n');
if (*yytext=='\n') yyLineNr++;
@@ -1157,7 +1159,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<NameSpaceDocArg1>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: missing argument after "
+ "warning: missing argument after "
"\\namespace."
);
addOutput('\n');
@@ -1179,7 +1181,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<PackageDocArg1>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: missing argument after "
+ "warning: missing argument after "
"\\package."
);
addOutput('\n');
@@ -1210,7 +1212,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<ClassDocArg1,CategoryDocArg1>{DOCNL} {
warn(yyFileName,yyLineNr,
- "Warning: missing argument after "
+ "warning: missing argument after "
"\\%s.",YY_START==ClassDocArg1?"class":"category"
);
addOutput('\n');
@@ -1271,7 +1273,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<GroupDocArg1>{DOCNL} { // missing argument!
warn(yyFileName,yyLineNr,
- "Warning: missing group name after %s",
+ "warning: missing group name after %s",
current->groupDocCmd()
);
addOutput('\n');
@@ -1292,7 +1294,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
) // defgroup requires second argument
{
warn(yyFileName,yyLineNr,
- "Warning: missing title after "
+ "warning: missing title after "
"\\defgroup %s", current->name.data()
);
}
@@ -1312,7 +1314,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<PageDocArg1>{DOCNL} {
warn(yyFileName,yyLineNr,
- "Warning: missing argument after "
+ "warning: missing argument after "
"\\page."
);
if (*yytext=='\n') yyLineNr++;
@@ -1358,7 +1360,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<XRefItemParam1>{DOCNL} { // missing arguments
warn(yyFileName,yyLineNr,
- "Warning: Missing first argument of \\xrefitem"
+ "warning: Missing first argument of \\xrefitem"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
@@ -1378,7 +1380,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<XRefItemParam2>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: Missing second argument of \\xrefitem"
+ "warning: Missing second argument of \\xrefitem"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
@@ -1399,7 +1401,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<XRefItemParam3>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: Missing third argument of \\xrefitem"
+ "warning: Missing third argument of \\xrefitem"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
@@ -1426,7 +1428,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<RelatesParam1>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: Missing argument of \\relates or \\memberof command"
+ "warning: Missing argument of \\relates or \\memberof command"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
@@ -1461,7 +1463,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<SectionLabel>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: \\section command has no label"
+ "warning: \\section command has no label"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
@@ -1469,7 +1471,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<SectionLabel>. { // invalid character for section label
warn(yyFileName,yyLineNr,
- "Warning: Invalid or missing section label"
+ "warning: Invalid or missing section label"
);
BEGIN(Comment);
}
@@ -1516,7 +1518,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<SubpageLabel>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: \\subpage command has no label"
+ "warning: \\subpage command has no label"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
@@ -1546,7 +1548,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<AnchorLabel>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: \\anchor command has no label"
+ "warning: \\anchor command has no label"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
@@ -1554,7 +1556,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<AnchorLabel>. { // invalid character for anchor label
warn(yyFileName,yyLineNr,
- "Warning: Invalid or missing anchor label"
+ "warning: Invalid or missing anchor label"
);
BEGIN(Comment);
}
@@ -1586,7 +1588,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (g_commentCount<0 && blockName!="verbatim")
{
warn(yyFileName,yyLineNr,
- "Warning: found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",blockName.data(),blockName.data());
+ "warning: found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",blockName.data(),blockName.data());
}
}
<FormatBlock>. {
@@ -1594,7 +1596,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<FormatBlock><<EOF>> {
warn(yyFileName,yyLineNr,
- "Warning: reached end of comment while inside a @%s block; check for missing @end%s tag!",
+ "warning: reached end of comment while inside a @%s block; check for missing @end%s tag!",
blockName.data(),blockName.data()
);
yyterminate();
@@ -1670,7 +1672,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "Warning: found @endif without matching start command");
+ "warning: found @endif without matching start command");
}
else
{
@@ -1682,7 +1684,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "Warning: found @else without matching start command");
+ "warning: found @else without matching start command");
}
else
{
@@ -1699,7 +1701,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "Warning: found @elseif without matching start command");
+ "warning: found @elseif without matching start command");
}
else
{
@@ -1803,7 +1805,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (!inGroupParamFound)
{
warn(yyFileName,yyLineNr,
- "Warning: Missing group name for \\ingroup command"
+ "warning: Missing group name for \\ingroup command"
);
}
if (*yytext=='\n') yyLineNr++;
@@ -1884,7 +1886,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<InheritParam>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: \\inherit command has no argument"
+ "warning: \\inherit command has no argument"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
@@ -1892,7 +1894,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<InheritParam>. { // invalid character for anchor label
warn(yyFileName,yyLineNr,
- "Warning: Invalid or missing name for \\inherit command"
+ "warning: Invalid or missing name for \\inherit command"
);
BEGIN(Comment);
}
@@ -1907,7 +1909,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
<ExtendsParam>{DOCNL} { // missing argument
warn(yyFileName,yyLineNr,
- "Warning: \\extends or \\implements command has no argument"
+ "warning: \\extends or \\implements command has no argument"
);
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
@@ -2201,7 +2203,7 @@ static bool handleMemberOf(const QCString &)
static bool handleRefItem(const QCString &)
{
- addOutput("@refitem ");
+ addOutput(" @refitem ");
BEGIN(LineParam);
return FALSE;
}
@@ -2209,7 +2211,7 @@ static bool handleRefItem(const QCString &)
static bool handleSection(const QCString &s)
{
setOutput(OutputDoc);
- addOutput("@"+s+" ");
+ addOutput(" @"+s+" ");
BEGIN(SectionLabel);
if (s=="section") g_sectionLevel=1;
else if (s=="subsection") g_sectionLevel=2;
@@ -2226,23 +2228,23 @@ static bool handleSubpage(const QCString &s)
)
{
warn(yyFileName,yyLineNr,
- "Warning: found \\subpage command in a comment block that is not marked as a page!");
+ "warning: found \\subpage command in a comment block that is not marked as a page!");
}
- addOutput("@"+s+" ");
+ addOutput(" @"+s+" ");
BEGIN(SubpageLabel);
return FALSE;
}
static bool handleAnchor(const QCString &s)
{
- addOutput("@"+s+" ");
+ addOutput(" @"+s+" ");
BEGIN(AnchorLabel);
return FALSE;
}
static bool handleFormatBlock(const QCString &s)
{
- addOutput("@"+s+" ");
+ addOutput(" @"+s+" ");
//printf("handleFormatBlock(%s)\n",s.data());
blockName=s;
g_commentCount=0;
@@ -2252,7 +2254,7 @@ static bool handleFormatBlock(const QCString &s)
static bool handleAddIndex(const QCString &)
{
- addOutput("@addindex ");
+ addOutput(" @addindex ");
BEGIN(LineParam);
return FALSE;
}
@@ -2278,7 +2280,7 @@ static bool handleElseIf(const QCString &)
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "Warning: found \\else without matching start command");
+ "warning: found \\else without matching start command");
}
else
{
@@ -2293,7 +2295,7 @@ static bool handleElse(const QCString &)
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "Warning: found \\else without matching start command");
+ "warning: found \\else without matching start command");
}
else
{
@@ -2307,7 +2309,7 @@ static bool handleEndIf(const QCString &)
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "Warning: found \\endif without matching start command");
+ "warning: found \\endif without matching start command");
}
else
{
@@ -2449,7 +2451,7 @@ static void checkFormula()
{
if (YY_START==ReadFormulaShort || YY_START==ReadFormulaLong)
{
- warn(yyFileName,yyLineNr,"Warning: End of comment block while inside formula.");
+ warn(yyFileName,yyLineNr,"warning: End of comment block while inside formula.");
}
}
@@ -2574,14 +2576,14 @@ void groupLeaveFile(const char *fileName,int line)
{
//if (g_memberGroupId!=DOX_NOGROUP)
//{
- // warn(fileName,line,"Warning: end of file while inside a member group\n");
+ // warn(fileName,line,"warning: end of file while inside a member group\n");
//}
g_memberGroupId=DOX_NOGROUP;
g_memberGroupRelates.resize(0);
g_memberGroupDocs.resize(0);
if (!g_autoGroupStack.isEmpty())
{
- warn(fileName,line,"Warning: end of file while inside a group\n");
+ warn(fileName,line,"warning: end of file while inside a group\n");
}
}
@@ -2589,7 +2591,7 @@ void groupEnterCompound(const char *fileName,int line,const char *name)
{
if (g_memberGroupId!=DOX_NOGROUP)
{
- warn(fileName,line,"Warning: try to put compound %s inside a member group\n",name);
+ warn(fileName,line,"warning: try to put compound %s inside a member group\n",name);
}
g_memberGroupId=DOX_NOGROUP;
g_memberGroupRelates.resize(0);
@@ -2612,7 +2614,7 @@ void groupLeaveCompound(const char *,int,const char * /*name*/)
//printf("groupLeaveCompound(%s)\n",name);
//if (g_memberGroupId!=DOX_NOGROUP)
//{
- // warn(fileName,line,"Warning: end of compound %s while inside a member group\n",name);
+ // warn(fileName,line,"warning: end of compound %s while inside a member group\n",name);
//}
g_memberGroupId=DOX_NOGROUP;
g_memberGroupRelates.resize(0);