Commit 04a4eddb authored by dimitri's avatar dimitri

Release-1.3.9.1-20041221

parent d048df98
DOXYGEN Version 1.3.9.1-20041213
DOXYGEN Version 1.3.9.1-20041221
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (13 December 2004)
Dimitri van Heesch (21 December 2004)
DOXYGEN Version 1.3.9.1_20041213
DOXYGEN Version 1.3.9.1_20041221
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (13 December 2004)
Dimitri van Heesch (dimitri@stack.nl) (21 December 2004)
1.3.9.1-20041213
1.3.9.1-20041221
......@@ -180,7 +180,7 @@ if test -z "$f_platform"; then
f_platform=sunos-g++
;;
SunOS:5*)
f_platform=solaris-cc
f_platform=solaris-g++
;;
ULTRIX:*)
f_platform=ultrix-g++
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.3.9.1_20041213
Version: 1.3.9.1_20041221
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -117,7 +117,9 @@ ID ([a-z_A-Z][a-z_A-Z0-9]*)|(@[0-9]+)
name += yytext;
BEGIN(Operator);
}
<Start>(~{B}*)?{ID}({B}*"["{B}*"]")* { // the []'s are for Java
<Start>(~{B}*)?{ID}/({B}*"["{B}*"]")* { // the []'s are for Java,
// the / was add to deal with multi-
// dimensional C++ arrays like A[][15]
addTypeName();
name += yytext;
}
......@@ -331,3 +333,11 @@ int main()
dumpDecl("void ( * Name < T > :: bla ) ( int, char * )");
}
#endif
#if !defined(YY_FLEX_SUBMINOR_VERSION)
//----------------------------------------------------------------------------
extern "C" { // some bogus code to keep the compiler happy
void declinfoYYdummy() { yy_flex_realloc(0,0); }
}
#endif
......@@ -563,12 +563,18 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName,
void Definition::writeSourceReffedBy(OutputList &ol,const char *scopeName)
{
writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_sourceRefByDict,FALSE);
if (Config_getBool("REFERENCED_BY_RELATION"))
{
writeSourceRefList(ol,scopeName,theTranslator->trReferencedBy(),m_sourceRefByDict,FALSE);
}
}
void Definition::writeSourceRefs(OutputList &ol,const char *scopeName)
{
writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_sourceRefsDict,TRUE);
if (Config_getBool("REFERENCES_RELATION"))
{
writeSourceRefList(ol,scopeName,theTranslator->trReferences(),m_sourceRefsDict,TRUE);
}
}
bool Definition::hasDocumentation() const
......@@ -758,7 +764,6 @@ void Definition::writePathFragment(OutputList &ol) const
if (m_outerScope && m_outerScope!=Doxygen::globalScope)
{
m_outerScope->writePathFragment(ol);
ol.writeString("&nbsp;");
if (m_outerScope->definitionType()==Definition::TypeClass ||
m_outerScope->definitionType()==Definition::TypeNamespace)
{
......@@ -773,11 +778,21 @@ void Definition::writePathFragment(OutputList &ol) const
}
else
{
ol.writeString("&nbsp;");
ol.writeString("/");
ol.writeString("&nbsp;");
}
ol.writeString("&nbsp;");
}
ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName);
if (isLinkable())
{
ol.writeObjectLink(getReference(),getOutputFileBase(),0,m_localName);
}
else
{
ol.startBold();
ol.docify(m_localName);
ol.endBold();
}
}
void Definition::writeNavigationPath(OutputList &ol) const
......
......@@ -222,7 +222,7 @@ void DirDef::writeDocumentation(OutputList &ol)
else
{
ol.startBold();
ol.writeString(fd->name());
ol.docify(fd->name());
ol.endBold();
}
if (fd->generateSourceFile())
......
......@@ -279,11 +279,24 @@ static void checkArgumentName(const QString &name,bool isParam)
//printf("member type=%d\n",memberDef->memberType());
QString scope=g_memberDef->getScopeString();
if (!scope.isEmpty()) scope+="::"; else scope="";
warn_doc_error(g_memberDef->docFile(),g_memberDef->docLine(),
QString inheritedFrom = "";
QString docFile = g_memberDef->docFile();
int docLine = g_memberDef->docLine();
MemberDef *inheritedMd = g_memberDef->inheritsDocsFrom();
if (inheritedMd) // documentation was inherited
{
inheritedFrom.sprintf(" inherited from member %s at line "
"%d in file %s",inheritedMd->name().data(),
inheritedMd->docLine(),inheritedMd->docFile().data());
docFile = g_memberDef->getDefFileName();
docLine = g_memberDef->getDefLine();
}
warn_doc_error(docFile,docLine,
"Warning: argument `%s' of command @param "
"is not found in the argument list of %s%s%s",
"is not found in the argument list of %s%s%s%s",
aName.data(),scope.data(),g_memberDef->name().data(),
argListToString(al).data());
argListToString(al).data(),inheritedFrom.data());
}
p=i+l;
}
......@@ -331,7 +344,14 @@ static void checkUndocumentedParams()
errMsg+=" parameter "+argName+"\n";
}
}
warn_doc_error(g_memberDef->docFile(),g_memberDef->docLine(),errMsg);
if (g_memberDef->inheritsDocsFrom())
{
warn_doc_error(g_memberDef->getDefFileName(),g_memberDef->getDefLine(),errMsg);
}
else
{
warn_doc_error(g_memberDef->docFile(),g_memberDef->docLine(),errMsg);
}
}
}
}
......@@ -1597,8 +1617,16 @@ bool DocXRefItem::parse()
ASSERT(item!=0);
if (item)
{
m_file = refList->listName();
m_anchor = item->listAnchor;
if (g_memberDef && g_memberDef->name().at(0)=='@')
{
m_file = "@"; // can't cross reference anonymous enum
m_anchor = "@";
}
else
{
m_file = refList->listName();
m_anchor = item->listAnchor;
}
m_title = refList->sectionTitle();
//printf("DocXRefItem: file=%s anchor=%s title=%s\n",
// m_file.data(),m_anchor.data(),m_title.data());
......
......@@ -317,6 +317,7 @@ HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
REFWORD ("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID}{FUNCARG}?
%option noyywrap
%option yylineno
......@@ -666,7 +667,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
return 0;
}
<St_Ref>("#"|"::")?({ID}("."|"#"|"::"|"-"))*{ID} {
<St_Ref>{REFWORD} {
g_token->name=yytext;
return TK_WORD;
}
......
......@@ -543,6 +543,20 @@ static void writeBoxMemberList(QTextStream &t,char prot,MemberList &ml,ClassDef
t << "\\l";
}
}
// write member groups within the memberlist
MemberGroupList *mgl = ml.getMemberGroupList();
if (mgl)
{
MemberGroupListIterator mgli(*mgl);
MemberGroup *mg;
for (mgli.toFirst();(mg=mgli.current());++mgli)
{
if (mg->members())
{
writeBoxMemberList(t,prot,*mg->members(),scope);
}
}
}
}
void DotNode::writeBox(QTextStream &t,
......@@ -582,6 +596,18 @@ void DotNode::writeBox(QTextStream &t,
writeBoxMemberList(t,'-',m_classDef->priMethods,m_classDef);
writeBoxMemberList(t,'-',m_classDef->priStaticMethods,m_classDef);
writeBoxMemberList(t,'-',m_classDef->priSlots,m_classDef);
if (m_classDef->memberGroupSDict)
{
MemberGroupSDict::Iterator mgdi(*m_classDef->memberGroupSDict);
MemberGroup *mg;
for (mgdi.toFirst();(mg=mgdi.current());++mgdi)
{
if (mg->members())
{
writeBoxMemberList(t,'*',*mg->members(),m_classDef);
}
}
}
t << "}";
}
else // old look
......@@ -2851,7 +2877,7 @@ void DotGroupCollaboration::addCollaborationMember(
QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat format,
const char *path, const char *,
const char *path, const char *relPath,
bool writeImageMap)
{
QDir d(path);
......@@ -2922,11 +2948,11 @@ QCString DotGroupCollaboration::writeGraph( QTextStream &t, GraphOutputFormat fo
if (writeImageMap)
{
QCString mapLabel = convertNameToFile(baseName);
t << "<center><table><tr><td><img src=\"" << imgName
t << "<center><table><tr><td><img src=\"" << relPath << imgName
<< "\" border=\"0\" alt=\"\" usemap=\"#"
<< mapLabel << "_map\">" << endl;
t << "<map name=\"" << mapLabel << "_map\">" << endl;
convertMapFile(t,mapName,"");
convertMapFile(t,mapName,relPath);
t << "</map></td></tr></table></center>" << endl;
thisDir.remove(mapName);
}
......
......@@ -3431,8 +3431,11 @@ static bool findClassRelation(
cd->getFileDef(), // todo: is this ok?
baseClassName,
&baseClassTypeDef,
&templSpec);
//printf("baseClassName=%s baseClass=%p cd=%p\n",baseClassName.data(),baseClass,cd);
&templSpec,
mode==Undocumented
);
//printf("baseClassName=%s baseClass=%p cd=%p explicitGlobalScope=%d\n",
// baseClassName.data(),baseClass,cd,explicitGlobalScope);
//printf(" root->name=`%s' baseClassName=`%s' baseClass=%s templSpec=%s\n",
// root->name.data(),
// baseClassName.data(),
......@@ -3530,7 +3533,7 @@ static bool findClassRelation(
{
findTemplateInstanceRelation(root,context,baseClass,templSpec,templateNames,isArtificial);
}
else if (mode==DocumentedOnly)
else if (mode==DocumentedOnly || mode==Undocumented)
{
QCString usedName;
if (baseClassTypeDef)
......@@ -4243,7 +4246,8 @@ static bool findGlobalMember(Entry *root,
}
else // got docs for an undefined member!
{
if (root->type!="friend class" && root->type!="friend struct" &&
if (root->type!="friend class" &&
root->type!="friend struct" &&
root->type!="friend union")
{
warn(root->fileName,root->startLine,
......@@ -4879,10 +4883,12 @@ static void findMember(Entry *root,
int candidates=0;
if (mn->count()>0)
{
//printf("Assume template class\n");
for (mni.toFirst();(md=mni.current());++mni)
{
ClassDef *cd=md->getClassDef();
if (cd!=0 && cd->name()==className)
//printf("cd->name()==%s className=%s\n",cd->name().data(),className.data());
if (cd!=0 && rightScopeMatch(cd->name(),className))
{
if (root->tArgLists && md->templateArguments() &&
root->tArgLists->getLast()->count()<=md->templateArguments()->count())
......@@ -6175,6 +6181,7 @@ static void inheritDocumentation()
}
if (bmd) // copy the documentation from the reimplemented member
{
md->setInheritsDocsFrom(bmd);
md->setDocumentation(bmd->documentation(),bmd->docFile(),bmd->docLine());
md->setDocsForDefinition(bmd->isDocsForDefinition());
md->setBriefDescription(bmd->briefDescription(),bmd->briefFile(),bmd->briefLine());
......
......@@ -630,7 +630,7 @@ void FTVHelp::generateTreeView()
#endif
t << "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n";
t << " <head>\n";
t << " <meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset=\""
t << " <meta http-equiv=\"Content-Type\" content=\"text/xhtml;charset="
<< theTranslator->idLanguageCharset() << "\" />\n";
t << " <meta http-equiv=\"Content-Style-Type\" content=\"text/css\" />\n";
t << " <meta http-equiv=\"Content-Language\" content=\"en\" />\n";
......
......@@ -923,10 +923,21 @@ void HtmlDocVisitor::visitPost(DocParamList *)
void HtmlDocVisitor::visitPre(DocXRefItem *x)
{
if (m_hide) return;
m_t << "<dl compact><dt><b><a class=\"el\" href=\""
<< x->relPath() << x->file() << Doxygen::htmlFileExtension << "#" << x->anchor() << "\">";
bool anonymousEnum = x->file()=="@";
if (!anonymousEnum)
{
m_t << "<dl compact><dt><b><a class=\"el\" href=\""
<< x->relPath() << x->file() << Doxygen::htmlFileExtension
<< "#" << x->anchor() << "\">";
}
else
{
m_t << "<dl compact><dt><b>";
}
filter(x->title());
m_t << ":</a></b></dt><dd>";
m_t << ":";
if (!anonymousEnum) m_t << "</a>";
m_t << "</b></dt><dd>";
}
void HtmlDocVisitor::visitPost(DocXRefItem *)
......
......@@ -1108,7 +1108,7 @@ void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const
{
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
t << "<p>" << endl;
t << "<table class=\"mdTable\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\">" << endl;
t << "<table class=\"mdTable\" cellpadding=\"2\" cellspacing=\"0\">" << endl;
t << " <tr>" << endl;
t << " <td class=\"mdRow\">" << endl;
t << " <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" << endl;
......
......@@ -603,6 +603,7 @@ int countClassHierarchy()
void writeHierarchicalIndex(OutputList &ol)
{
//printf("writeHierarchicalIndex: %d classes\n",hierarchyClasses);
if (hierarchyClasses==0) return;
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
......
......@@ -930,8 +930,9 @@ void LatexDocVisitor::visitPre(DocXRefItem *x)
{
if (m_hide) return;
m_t << "\\begin{Desc}" << endl;
bool anonymousEnum = x->file()=="@";
m_t << "\\item[";
if (Config_getBool("PDF_HYPERLINKS"))
if (Config_getBool("PDF_HYPERLINKS") && !anonymousEnum)
{
m_t << "\\hyperlink{" << stripPath(x->file()) << "_" << x->anchor() << "}{";
}
......
......@@ -425,6 +425,7 @@ MemberDef::MemberDef(const char *df,int dl,
groupMember = 0;
m_hasDocumentedParams = FALSE;
m_hasDocumentedReturnType = FALSE;
m_docProvider = 0;
}
/*! Destroys the member definition. */
......
......@@ -181,8 +181,9 @@ class MemberDef : public Definition
void makeRelated() { related=TRUE; }
void setHasDocumentedParams(bool b) { m_hasDocumentedParams = b; }
void setHasDocumentedReturnType(bool b) { m_hasDocumentedReturnType = b; }
void setInheritsDocsFrom(MemberDef *md) { m_docProvider = md; }
// output generatation
// output generation
void writeLink(OutputList &ol,
ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd);
void writeDeclaration(OutputList &ol,
......@@ -276,6 +277,8 @@ class MemberDef : public Definition
void setTemplateMaster(MemberDef *mt) { m_templateMaster=mt; }
void addListReference(Definition *d);
MemberDef *inheritsDocsFrom() const { return m_docProvider; }
//QCString getBodyAnchor() const
//{
// return bodyMemb ? bodyMemb->anchor() : anchor();
......@@ -397,6 +400,9 @@ class MemberDef : public Definition
bool m_hasDocumentedParams;
bool m_hasDocumentedReturnType;
// documentation inheritance
MemberDef *m_docProvider;
};
#endif
......@@ -58,6 +58,7 @@ class MemberList : public QList<MemberDef>
void setInGroup(bool group) { m_inGroup=group; }
void addListReferences(Definition *def);
void findSectionsInDocumentation();
MemberGroupList *getMemberGroupList() const { return memberGroupList; }
private:
int m_varCnt,m_funcCnt,m_enumCnt,m_enumValCnt,m_typeCnt;
......
......@@ -1173,11 +1173,12 @@ void RTFDocVisitor::visitPost(DocParamList *)
void RTFDocVisitor::visitPre(DocXRefItem *x)
{
if (m_hide) return;
bool anonymousEnum = x->file()=="@";
DBG_RTF("{\\comment RTFDocVisitor::visitPre(DocXRefItem)}\n");
m_t << "{"; // start param list
//m_t << "{\\b "; // start bold
m_t << "{" << rtf_Style["Heading5"]->reference << endl;
if (Config_getBool("RTF_HYPERLINKS"))
if (Config_getBool("RTF_HYPERLINKS") && !anonymousEnum)
{
QString refName;
if (!x->file().isEmpty())
......
......@@ -83,6 +83,7 @@ static int lastInternalDocContext;
static int lastPreLineCtrlContext;
static int lastSkipVerbStringContext;
static int lastCommentInArgContext;
static int lastFileDocContext;
static int nextDefContext;
static int overloadContext;
static Protection protection;
......@@ -299,34 +300,14 @@ static QCString stripQuotes(const char *s)
return name;
}
//static QCString stripCComments(const QCString &s)
//{
// int p=0,i;
// QCString result;
// while ((i=s.find("/*",p))!=-1)
// {
// result+=s.mid(p,i-p);
// int ei = s.find("*/",i+1);
// if (ei!=-1)
// {
// p=ei+2;
// }
// else
// {
// return result;
// }
// }
// result+=s.right(s.length()-p);
// printf("stripCComments: input=%s output=%s\n",s.data(),result.data());
// return result;
//}
static void newDocState();
//-----------------------------------------------------------------
static void addXRefItem(const char *listName,const char *itemTitle,const char *listTitle)
static void addXRefItem(bool inBody,const char *listName,const char *itemTitle,const char *listTitle)
{
Entry *docEntry = inBody && previous ? previous : current;
//printf("docEntry=%p\n",docEntry);
if (listName==0) return;
//printf("addXRefItem(%s,%s,%s)\n",listName,itemTitle,listTitle);
......@@ -338,9 +319,9 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
Doxygen::xrefLists->insert(listName,refList);
//printf("new list!\n");
}
if (current->sli)
if (docEntry->sli)
{
QListIterator<ListItemInfo> slii(*current->sli);
QListIterator<ListItemInfo> slii(*docEntry->sli);
for (slii.toFirst();(lii=slii.current());++slii)
{
if (strcmp(lii->type,listName)==0)
......@@ -350,9 +331,11 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
}
}
}
#if 0 // with this code multiple @todo items can be put under the same
// heading, I removed it because it changes the text flow.
if (lii) // already found item of same type before
{
//printf("listName=%s item id = %d\n",listName,lii->itemId);
//printf("listName=%s item id = %d existing\n",listName,lii->itemId);
RefItem *item = refList->getRefItem(lii->itemId);
ASSERT(item!=0);
item->text += " <p>";
......@@ -360,25 +343,29 @@ static void addXRefItem(const char *listName,const char *itemTitle,const char *l
//printf("%s: text +=%s\n",listName,item->text.data());
}
else // new item
#endif
{
int itemId = refList->addRefItem();
//printf("listName=%s item id = %d\n",listName,itemId);
//printf("listName=%s item id = %d new current=%p\n",listName,itemId,current);
// if we have already an item from the same list type (e.g. a second @todo)
// in the same Entry (i.e. lii!=0) then we reuse its link anchor.
char anchorLabel[1024];
sprintf(anchorLabel,"_%s%06d",listName,itemId);
sprintf(anchorLabel,"_%s%06d",listName,lii ? lii->itemId : itemId);
RefItem *item = refList->getRefItem(itemId);
ASSERT(item!=0);
item->text = current->brief.copy();
item->text = current->brief;
item->listAnchor = anchorLabel;
current->addSpecialListItem(listName,itemId);
docEntry->addSpecialListItem(listName,itemId);
QCString cmdString;
cmdString.sprintf("\\xrefitem %s %d\n",listName,itemId);
current->doc += cmdString;
docEntry->doc += cmdString;
SectionInfo *si=new SectionInfo(listName,anchorLabel,
sectionTitle,SectionInfo::Anchor);
Doxygen::sectionDict.insert(anchorLabel,si);
current->anchors->append(si);
docEntry->anchors->append(si);
}
current->brief = slString.copy(); // restore orginial brief desc.
current->brief = slString; // restore orginial brief desc.
}
//-----------------------------------------------------------------------------
......@@ -405,6 +392,8 @@ static QCString addFormula()
return formLabel;
}
//-----------------------------------------------------------------------------
static bool nameIsOperator(QCString &name)
{
int i=name.find("operator");
......@@ -414,6 +403,8 @@ static bool nameIsOperator(QCString &name)
return FALSE; // case TEXToperatorTEXT
}
//-----------------------------------------------------------------------------
static void checkFormula()
{
if (insideFormula)
......@@ -422,6 +413,8 @@ static void checkFormula()
}
}
//-----------------------------------------------------------------------------
static void checkDocs()
{
checkFormula();
......@@ -436,33 +429,7 @@ static void checkDocs()
}
}
#if 0
static QCString extractName(const QCString &s)
{
//static const QRegExp id("[a-z_A-Z][a-z_A-Z0-9]*");
//int i,p=0,l;
//while ((i=id.match(s,p,&l))!=-1)
//{
// QCString idstr=s.mid(i,l);
// if (idstr!="struct" && idstr!="class" && idstr!="union")
// {
//
// return idstr;
// }
// p=i+l;
//}
//return "";
QCString result=s;
if (result.left(7)=="struct ") result=result.right(result.length()-7);
if (result.left(6)=="class " ) result=result.right(result.length()-6);
if (result.left(6)=="union " ) result=result.right(result.length()-6);
int l=result.length()-1;
while (l>=0 &&
(result.at(l)=='*' || result.at(l)==' ' || isspace(result.at(l)))
) l--;
return removeRedundantWhiteSpace(result.left(l+1));
}
#endif
//-----------------------------------------------------------------------------
static void setContext()
{
......@@ -483,6 +450,8 @@ static void setContext()
//printf("setContext(%s) insideIDL=%d\n",yyFileName,insideIDL);
}
//-----------------------------------------------------------------------------
static void prependScope()
{
if (current_root->section & Entry::SCOPE_MASK)
......@@ -516,6 +485,8 @@ static void prependScope()
}
}
//-----------------------------------------------------------------------------
/*! Returns TRUE iff the current entry could be a K&R style C function */
static bool checkForKnRstyleC()
{
......@@ -532,6 +503,8 @@ static bool checkForKnRstyleC()
return TRUE;
}
//-----------------------------------------------------------------------------
static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
{
int si = current->args.length();
......@@ -605,6 +578,8 @@ static void splitKnRArg(QCString &oldStyleArgPtr,QCString &oldStyleArgName)
//fprintf(stderr,"type=%s ptr=%s name=%s\n",oldStyleArgType.data(),oldStyleArgPtr.data(),oldStyleArgName.data());
}
//-----------------------------------------------------------------------------
/*! Update the argument \a name with additional \a type info. For K&R style
* function the type is found \e after the argument list, so this routine
* in needed to fix up.
......@@ -930,6 +905,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
BEGIN( FindMembers );
}
}
<NextSemi>\' {
if (insidePHP)
{
lastStringContext=NextSemi;
BEGIN(SkipPHPString);
}
}
<NextSemi>{CHARLIT} { if (insidePHP) REJECT; }
<NextSemi>\" {
lastStringContext=NextSemi;
......@@ -965,7 +947,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
else
REJECT;
}
<FindMembers>{B}*("properties"|"__property"){BN}*":"{BN}* { // IDL or Borland C++ builder property
<FindMembers>{B}*("properties"){BN}*":"{BN}* { // IDL or Borland C++ builder property
current->mtype = mtype = Property;
current->protection = protection = Public ;
current->type.resize(0);
......@@ -1441,6 +1423,11 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
<Operator>"("{BN}*")"({BN}*"<"[^>]*">"){BN}*/"(" { // A::operator()<int>(int arg)
lineCount();
current->name += "()";
BEGIN( FindMembers );
}
<Operator>"("{BN}*")"{BN}*/"(" {
lineCount();
current->name += yytext ;
......@@ -2125,6 +2112,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
initBracketCount--;
current->initializer+=*yytext;
}
<ReadInitializer>\' {
if (insidePHP)
{
current->initializer+=yytext;
pCopyQuotedString = &current->initializer;
lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
else
{
current->initializer+=yytext;
}
}
<ReadInitializer>{CHARLIT} {
if (insidePHP)
{
......@@ -2218,6 +2218,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
yyLineNr++;
*pCopyRoundString+=*yytext;
}
<CopyRound>\' {
if (insidePHP)
{
current->initializer+=yytext;
pCopyQuotedString = pCopyRoundString;
lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
else
{
*pCopyRoundString+=yytext;
}
}
<CopyRound>{CHARLIT} {
if (insidePHP)
{
......@@ -2242,6 +2255,15 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastStringContext=YY_START;
BEGIN(CopyString);
}
<CopyCurly>\' {
*pCopyCurlyString+=*yytext;
if (insidePHP)
{
pCopyQuotedString=pCopyCurlyString;
lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
}
<CopyCurly>"{" {
*pCopyCurlyString+=*yytext;
curlyCount++;
......@@ -2439,6 +2461,19 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastContext = YY_START ;
BEGIN( Comment ) ;
}
<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
if (!insidePHP)
{
current->program += yytext;
}
else
{ // begin of single quoted string
current->program += yytext;
pCopyQuotedString = &current->program;
lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
}
<ReadBody,ReadNSBody,ReadBodyIntf>{CHARLIT} {
if (insidePHP)
{
......@@ -2699,19 +2734,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
insideObjC=FALSE;
BEGIN( FindMembers );
}
<ReadBody,ReadNSBody,ReadBodyIntf>"'" {
if (!insidePHP)
{
current->program += yytext;
}
else
{ // begin of single quoted string
current->program += yytext;
pCopyQuotedString = &current->program;
lastStringContext=YY_START;
BEGIN(CopyPHPString);
}
}
<ReadBody,ReadNSBody,ReadBodyIntf>. { current->program += yytext ; }
<FindMembers>"("/({BN}*{TSCOPE}{BN}*"::")*{TSCOPE}{BN}*")"{BN}*"(" | /* typedef void (A<int>::func_t)(args...) */
......@@ -3155,6 +3177,15 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
lastStringContext=FuncPtrInit;
BEGIN(CopyString);
}
<FuncPtrInit>\' {
current->args += *yytext;
if (insidePHP)
{
pCopyQuotedString=&current->args;
lastStringContext=FuncPtrInit;
BEGIN(CopyPHPString);
}
}
<FuncPtrInit>{CHARLIT} {
if (insidePHP)
{
......@@ -3459,10 +3490,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current = tempEntry;
BEGIN( lastCurlyContext );
}
<SkipCurly>{CHARLIT} {
//addToBody(yytext);
if (insidePHP) REJECT;
}
<SkipCurly>\" {
//addToBody(yytext);
lastStringContext=SkipCurly;
......@@ -3526,6 +3553,13 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
pSkipVerbString=&current->initializer;
BEGIN(SkipVerbString);
}
<SkipInits,SkipCurly,SkipCurlyCpp>\' {
if (insidePHP)
{
lastStringContext=YY_START;
BEGIN(SkipPHPString);
}
}
<SkipInits,SkipCurly,SkipCurlyCpp>{CHARLIT} {
if (insidePHP) REJECT;
}
......@@ -4319,6 +4353,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->section = Entry::FILEDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
lastFileDocContext = YY_START;
BEGIN( FileDocArg1 );
}
<Doc,LineDoc,JavaDoc>{B}*{CMD}"dir"{B}* {
......@@ -4406,7 +4441,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<TodoParam>"//" |
<TodoParam>"/*" |
<TodoParam>. {
addXRefItem("todo",theTranslator->trTodo(),theTranslator->trTodoList());
addXRefItem(lastDocContext==SkipCurly,
"todo",theTranslator->trTodo(),theTranslator->trTodoList());
int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
BEGIN(slStartContext);
}
......@@ -4414,7 +4450,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<TestParam>"//" |
<TestParam>"/*" |
<TestParam>. {
addXRefItem("test",theTranslator->trTest(),theTranslator->trTestList());
addXRefItem(lastDocContext==SkipCurly,
"test",theTranslator->trTest(),theTranslator->trTestList());
int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
BEGIN(slStartContext);
}
......@@ -4422,7 +4459,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<BugParam>"//" |
<BugParam>"/*" |
<BugParam>. {
addXRefItem("bug",theTranslator->trBug(),theTranslator->trBugList());
addXRefItem(lastDocContext==SkipCurly,
"bug",theTranslator->trBug(),theTranslator->trBugList());
int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
BEGIN(slStartContext);
}
......@@ -4430,7 +4468,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<DeprecatedParam>"//" |
<DeprecatedParam>"/*" |
<DeprecatedParam>. {
addXRefItem("deprecated",theTranslator->trDeprecated(),theTranslator->trDeprecatedList());
addXRefItem(lastDocContext==SkipCurly,
"deprecated",theTranslator->trDeprecated(),theTranslator->trDeprecatedList());
int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
BEGIN(slStartContext);
}
......@@ -4469,7 +4508,8 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<XRefItemParam4>"//" |
<XRefItemParam4>"/*" |
<XRefItemParam4>. {
addXRefItem(xrefItemKey,xrefItemTitle,xrefListTitle);
addXRefItem(lastDocContext==SkipCurly,
xrefItemKey,xrefItemTitle,xrefListTitle);
int i;for (i=yyleng-1;i>=0;i--) unput(yytext[i]);
BEGIN(slStartContext);
}
......@@ -4649,6 +4689,14 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->name = yyFileName;
yyLineNr++;
newDocState();
if (lastFileDocContext==LineDoc)
{
current->doc += "\n\n";
current_root->addSubEntry(current);
current = new Entry ;
initEntry();
BEGIN( FindMembers );
}
}
<PageDocArg1>{FILE} {
current->name = stripQuotes(yytext);
......@@ -5734,25 +5782,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
}
if (!handled)
{
//QCString *pValue=Doxygen::aliasDict[yytext+1];
//if (pValue)
//{
// int i,l=pValue->length();
// char c;
// for (i=l-1;i>=0;i--)
// {
// c=pValue->at(i);
// unput(c);
// if (c=='\n') yyLineNr--;
// }
//}
//else
//{
if (YY_START==CopyArgComment)
fullArgString+=yytext;
else
current->doc+=yytext;
//}
}
}
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text
......@@ -5766,22 +5799,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->brief+=yytext;
}
<JavaDoc,LineDoc,ClassDocBrief,AfterDocBrief,AfterDocLine,CopyArgCommentLine>{CMD}[a-z_A-Z][a-z_A-Z0-9]* {
//QCString *pValue=Doxygen::aliasDict[yytext+1];
//if (pValue)
//{
// int i,l=pValue->length();
// for (i=l-1;i>=0;i--)
// {
// unput(pValue->at(i));
// }
//}
//else
//{
if (YY_START==CopyArgCommentLine)
fullArgString+=yytext;
else
current->brief+=yytext;
//}
}
<DefLineDoc,LineDoc,ClassDoc,PageDoc,Doc>"/*"|"//" { current->doc += yytext; }
<SkipCxxComment>.*/\n {
......
......@@ -3561,6 +3561,7 @@ bool resolveLink(/* in */ const char *scName,
*resContext=0;
QCString linkRef=lr;
printf("ResolveLink linkRef=%s\n",lr);
FileDef *fd;
GroupDef *gd;
PageDef *pd;
......@@ -4704,7 +4705,7 @@ void addRefItem(const QList<ListItemInfo> *sli,
const char *prefix,
const char *name,const char *title,const char *args)
{
//printf("addRefItem(prefix=%s,name=%s,title=%s,args=%s)\n",prefix,name,title,args);
//printf("addRefItem(sli=%p,prefix=%s,name=%s,title=%s,args=%s)\n",sli,prefix,name,title,args);
if (sli)
{
QListIterator<ListItemInfo> slii(*sli);
......@@ -4724,7 +4725,7 @@ void addRefItem(const QList<ListItemInfo> *sli,
{
RefItem *item = refList->getRefItem(lii->itemId);
ASSERT(item!=0);
//printf("anchor=%s\n",item->listAnchor.data());
//printf("anchor=%s written=%d\n",item->listAnchor.data(),item->written);
if (item->written) return;
QCString doc(1000);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment