summaryrefslogtreecommitdiffstats
path: root/src/commentscan.l
diff options
context:
space:
mode:
Diffstat (limited to 'src/commentscan.l')
-rw-r--r--src/commentscan.l53
1 files changed, 20 insertions, 33 deletions
diff --git a/src/commentscan.l b/src/commentscan.l
index edd4910..35001c3 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -327,8 +327,7 @@ class DocCmdMapper
{
if (m_map.find(p->cmdName)!=0)
{
- err("DocCmdMapper: command %s already added\n",p->cmdName);
- exit(1);
+ term("DocCmdMapper: command %s already added\n",p->cmdName);
}
Cmd *cmd = new Cmd;
cmd->func = p->handler;
@@ -395,7 +394,7 @@ class GuardedSection
* statics
*/
-static ParserInterface *langParser; // the language parser that is calling us
+static OutlineParserInterface *langParser; // the language parser that is calling us
static QCString inputString; // input string
static int inputPosition; // read pointer
static QCString yyFileName; // file name that is read from
@@ -533,7 +532,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
if (listName==0) return;
//printf("addXRefItem(%s,%s,%s,%d)\n",listName,itemTitle,listTitle,append);
- ListItemInfo *lii=0;
+ const ListItemInfo *lii=0;
RefList *refList = Doxygen::xrefLists->find(listName);
if (refList==0) // new list
{
@@ -541,16 +540,13 @@ static void addXRefItem(const char *listName,const char *itemTitle,
Doxygen::xrefLists->insert(listName,refList);
//printf("new list!\n");
}
- if (current->sli)
+ for (const ListItemInfo &item : current->sli)
{
- QListIterator<ListItemInfo> slii(*current->sli);
- for (slii.toLast();(lii=slii.current());--slii)
+ if (qstrcmp(item.type,listName)==0)
{
- if (qstrcmp(lii->type,listName)==0)
- {
- //printf("found %s lii->type=%s\n",listName,lii->type);
- break;
- }
+ //printf("found %s lii->type=%s\n",listName,lii->type);
+ lii = &item;
+ break;
}
}
if (lii && append) // already found item of same type just before this one
@@ -605,7 +601,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
g_sectionTitle,SectionInfo::Anchor,
g_sectionLevel);
Doxygen::sectionDict->append(anchorLabel,si);
- current->anchors->append(si);
+ current->anchors.push_back(si);
}
}
outputXRef.resize(0);
@@ -673,7 +669,7 @@ static void addSection()
g_sectionTitle,sectionLevelToType(g_sectionLevel),g_sectionLevel);
// add section to this entry
- current->anchors->append(si);
+ current->anchors.push_back(si);
// add section to the global dictionary
Doxygen::sectionDict->append(g_sectionLabel,si);
@@ -850,7 +846,7 @@ static void addAnchor(const char *anchor)
{
si = new SectionInfo(yyFileName,yyLineNr,anchor,0,SectionInfo::Anchor,0);
Doxygen::sectionDict->append(anchor,si);
- current->anchors->append(si);
+ current->anchors.push_back(si);
}
}
@@ -1824,7 +1820,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
addOutput(yytext);
// we add subpage labels as a kind of "inheritance" relation to prevent
// needing to add another list to the Entry class.
- current->extends->append(new BaseInfo(yytext,Public,Normal));
+ current->extends.push_back(BaseInfo(yytext,Public,Normal));
BEGIN(SubpageTitle);
}
<SubpageLabel>{DOCNL} { // missing argument
@@ -1973,7 +1969,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
BEGIN(Comment);
}
<GuardParamEnd>{B}* {
- if (!g_spaceBeforeIf.isEmpty()) // needed for 665313 in combation with bug620924
+ if (!g_spaceBeforeIf.isEmpty()) // needed for 665313 in combination with bug620924
{
addOutput(g_spaceBeforeIf);
}
@@ -2141,8 +2137,8 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle argument of ingroup command ------- */
<InGroupParam>{LABELID} { // group id
- current->groups->append(
- new Grouping(yytext, Grouping::GROUPING_INGROUP)
+ current->groups.push_back(
+ Grouping(yytext, Grouping::GROUPING_INGROUP)
);
inGroupParamFound=TRUE;
}
@@ -2224,8 +2220,8 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle argument of inherit command ------- */
<InheritParam>({ID}("::"|"."))*{ID} { // found argument
- current->extends->append(
- new BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
+ current->extends.push_back(
+ BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
);
BEGIN( Comment );
}
@@ -2247,8 +2243,8 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle argument of extends and implements commands ------- */
<ExtendsParam>({ID}("::"|"."))*{ID} { // found argument
- current->extends->append(
- new BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
+ current->extends.push_back(
+ BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
);
BEGIN( Comment );
}
@@ -3130,7 +3126,7 @@ QCString preprocessCommentBlock(const QCString &comment,
}
}
-bool parseCommentBlock(/* in */ ParserInterface *parser,
+bool parseCommentBlock(/* in */ OutlineParserInterface *parser,
/* in */ Entry *curEntry,
/* in */ const QCString &comment,
/* in */ const QCString &fileName,
@@ -3284,13 +3280,4 @@ static void handleGuard(const QCString &expr)
}
}
-
-
-#if !defined(YY_FLEX_SUBMINOR_VERSION)
-//----------------------------------------------------------------------------
-extern "C" { // some bogus code to keep the compiler happy
- void commentscanYYdummy() { yy_flex_realloc(0,0); }
-}
-#endif
-
#include "commentscan.l.h"