summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-10-24 18:18:56 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-10-24 18:18:56 (GMT)
commit79a5fb85eb38d8a4388c9a281a09549e7bcb8b78 (patch)
treea3e5426db07e417c276c043b1c2436f169045b49 /src
parentb7ae07dc2e3b4b635cc59a49d326a88d45f9206b (diff)
downloadDoxygen-79a5fb85eb38d8a4388c9a281a09549e7bcb8b78.zip
Doxygen-79a5fb85eb38d8a4388c9a281a09549e7bcb8b78.tar.gz
Doxygen-79a5fb85eb38d8a4388c9a281a09549e7bcb8b78.tar.bz2
Release-1.4.5-20051024
Diffstat (limited to 'src')
-rw-r--r--src/classdef.cpp2
-rw-r--r--src/code.l4
-rw-r--r--src/commentscan.l2
-rw-r--r--src/dot.cpp1
-rw-r--r--src/doxygen.cpp2
-rw-r--r--src/entry.cpp7
-rw-r--r--src/htmlhelp.cpp4
-rw-r--r--src/memberdef.cpp11
-rw-r--r--src/pyscanner.l86
-rw-r--r--src/scanner.l4
10 files changed, 83 insertions, 40 deletions
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 214da47..99f09b5 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -47,6 +47,7 @@ ClassDef::ClassDef(
: Definition(defFileName,defLine,removeRedundantWhiteSpace(nm),0,0,isSymbol)
{
m_compType=ct;
+ m_isObjC = FALSE;
QCString compoundName=compoundTypeString();
if (fName)
{
@@ -92,7 +93,6 @@ ClassDef::ClassDef(
m_artificial = FALSE;
m_isAbstract = FALSE;
m_isStatic = FALSE;
- m_isObjC = FALSE;
m_isTemplArg = FALSE;
m_membersMerged = FALSE;
m_categoryOf = 0;
diff --git a/src/code.l b/src/code.l
index a8ba916..ac5480c 100644
--- a/src/code.l
+++ b/src/code.l
@@ -1226,6 +1226,7 @@ static void startFontClass(const char *s)
static void writeObjCMethodCall(ObjCCallCtx *ctx)
{
if (ctx==0) return;
+ if (ctx->methodName.isEmpty()) return;
const char *p = ctx->format.data();
//printf("writeObjCMethodCall(%s) obj=%s method=%s\n",
// ctx->format.data(),ctx->objectTypeOrName.data(),ctx->methodName.data());
@@ -2418,6 +2419,9 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<ObjCCall,ObjCMName,ObjCSkipStr>"$" { g_currentCtx->format+="$$"; }
<ObjCCall,ObjCMName>"(" { g_currentCtx->format+=*yytext; g_braceCount++; }
<ObjCCall,ObjCMName>")" { g_currentCtx->format+=*yytext; g_braceCount--; }
+<ObjCSkipStr>"@"/"\"" { // needed to prevent matching the global rule (for C#)
+ g_currentCtx->format+=yytext;
+ }
<ObjCCall,ObjCMName,ObjCSkipStr>. { g_currentCtx->format+=*yytext; }
<ObjCCall,ObjCMName,ObjCSkipStr>\n { g_currentCtx->format+=*yytext; }
diff --git a/src/commentscan.l b/src/commentscan.l
index fe7f171..e5830df 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -1636,7 +1636,7 @@ MAILADR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]
{
if (*yytext=='\n') yyLineNr++;
addOutput('\n');
- //printf("functionProto=%s\n",functionProto.data());
+ printf("functionProto=%s\n",functionProto.data());
langParser->parsePrototype(functionProto);
BEGIN( Comment );
}
diff --git a/src/dot.cpp b/src/dot.cpp
index 3cc7e2f..1bc1cf8 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -561,6 +561,7 @@ static QCString convertLabel(const QCString &l)
{
QCString result;
const char *p=l.data();
+ if (p==0) return result;
char c;
while ((c=*p++))
{
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index ff2606a..6bfedd4 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -245,7 +245,7 @@ static STLInfo g_stlinfo[] =
{ "ofstream", "basic_ofstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
{ "wofstream", "basic_ofstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
{ "fstream", "basic_fstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
- { "wfstream", "basic_wfstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
+ { "wfstream", "basic_fstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
{ "istringstream", "basic_istringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
{ "wistringstream", "basic_istringstream<wchar_t>", 0, 0, 0, 0, 0, FALSE, FALSE },
{ "ostringstream", "basic_ostringstream<char>", 0, 0, 0, 0, 0, FALSE, FALSE },
diff --git a/src/entry.cpp b/src/entry.cpp
index 5ce3239..5206b2d 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -24,7 +24,6 @@ int Entry::num=0;
Entry::Entry()
{
num++;
- //printf("New Entry %d\n",num);
parent=0;
section = EMPTY_SEC;
sublist = new QList<Entry>;
@@ -50,7 +49,6 @@ Entry::Entry()
Entry::Entry(const Entry &e)
{
num++;
- //printf("Copy New Entry %d\n",num);
section = e.section;
protection = e.protection;
mtype = e.mtype;
@@ -171,7 +169,7 @@ Entry::Entry(const Entry &e)
Entry::~Entry()
{
- //printf("Deleting entry %d name %s type %x chilren %d\n",
+ //printf("Deleting entry %d name %s type %x children %d\n",
// num,name.data(),section,sublist->count());
delete sublist;
delete extends;
@@ -190,7 +188,8 @@ void Entry::addSubEntry(Entry *current)
//printf("Entry %d with name %s type 0x%x added to %s type 0x%x\n",
// current->num,current->name.data(),current->section,
// name.data(),section);
- //printf("Entry::addSubEntry(%s) %p\n",current->name.data(),current->tArgList);
+ //printf("Entry::addSubEntry(%s:%p) to %s\n",current->name.data(),
+ // current,name.data());
current->parent=this;
sublist->append(current);
}
diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp
index c8d7187..4836663 100644
--- a/src/htmlhelp.cpp
+++ b/src/htmlhelp.cpp
@@ -446,6 +446,10 @@ void HtmlHelp::createProjectFile()
t << s << endl;
s = indexFiles.next();
}
+ t << "tabs.css";
+ t << "tab_b.gif";
+ t << "tab_l.gif";
+ t << "tab_r.gif";
f.close();
}
else
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 748fb9a..15a95f5 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -2248,7 +2248,16 @@ bool MemberDef::isConstructor() const
}
else // for other languages
{
- return name()==classDef->localName();
+ QCString locName = classDef->localName();
+ int i=locName.find('<');
+ if (i==-1) // not a template class
+ {
+ return name()==locName;
+ }
+ else
+ {
+ return name()==locName.left(i);
+ }
}
}
else
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 0bcab03..15caa43 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -105,6 +105,9 @@ static QCString g_moduleScope;
static QCString g_packageName;
static bool g_hideClassDocs;
+
+static QCString g_defVal;
+static int g_braceCount;
//-----------------------------------------------------------------------------
@@ -310,9 +313,11 @@ static void handleCommentBlock(const QCString &doc,bool brief)
static void endOfDef()
{
- current = bodyEntry;
- bodyEntry->endBodyLine = yyLineNr;
- bodyEntry = 0;
+ if (bodyEntry)
+ {
+ bodyEntry->endBodyLine = yyLineNr;
+ bodyEntry = 0;
+ }
newEntry();
//g_insideConstructor = FALSE;
}
@@ -436,6 +441,7 @@ STARTDOCSYMS ^{B}"##"/[^#]
%x FunctionDec
%x FunctionParams
%x FunctionBody
+%x FunctionParamDefVal
/* Class states */
@@ -798,17 +804,6 @@ STARTDOCSYMS ^{B}"##"/[^#]
}
current->name = yytext;
current->name = current->name.stripWhiteSpace();
- //if (!current->name.isEmpty() && current->name.at(0)=='_')
- //{
- // current->protection = Private;
- //}
- //if ((current_root->section&Entry::SCOPE_MASK) &&
- // current->name=="__init__") // constructor
- //{
- // g_insideConstructor = TRUE;
- // g_constructorEntry = current;
- // newEntry();
- //}
}
{B}"(" {
@@ -827,21 +822,19 @@ STARTDOCSYMS ^{B}"##"/[^#]
current->argList->getLast()->name = QCString(yytext).stripWhiteSpace();
current->argList->getLast()->type = "";
}
- "="[^,)\n]+ { // default value
+ "=" { // default value
// TODO: this rule is too simple, need to be able to
// match things like =")" as well!
QCString defVal=&yytext[1];
- if (current->argList->getLast())
- {
- current->argList->getLast()->defval=defVal.stripWhiteSpace();
- }
+ g_defVal.resize(0);
+ g_braceCount=0;
+ BEGIN(FunctionParamDefVal);
}
")" { // end of parameter list
}
":" {
- lineCount();
g_specialBlock = TRUE; // expecting a docstring
bodyEntry = current;
BEGIN( FunctionBody );
@@ -852,6 +845,36 @@ STARTDOCSYMS ^{B}"##"/[^#]
}
+<FunctionParamDefVal>{
+ "(" { // internal opening brace
+ g_braceCount++;
+ g_defVal+=*yytext;
+ }
+ "," |
+ ")" {
+ if (g_braceCount==0) // end of default argument
+ {
+ if (current->argList->getLast())
+ {
+ current->argList->getLast()->defval=g_defVal.stripWhiteSpace();
+ }
+ BEGIN(FunctionParams);
+ }
+ else // continue
+ {
+ g_braceCount--;
+ g_defVal+=*yytext;
+ }
+ }
+ . {
+ g_defVal+=*yytext;
+ }
+ \n {
+ g_defVal+=*yytext;
+ yyLineNr++;
+ }
+}
+
<ClassBody>{
\n/{IDENTIFIER}{BB} { // new def at indent 0
@@ -861,6 +884,13 @@ STARTDOCSYMS ^{B}"##"/[^#]
YY_CURRENT_BUFFER->yy_at_bol=TRUE;
BEGIN(Search);
}
+ \n/"##" {
+ yyLineNr++;
+ endOfDef();
+ g_hideClassDocs = FALSE;
+ YY_CURRENT_BUFFER->yy_at_bol=TRUE;
+ BEGIN(Search);
+ }
^{BB}/\n { // skip empty line
current->program+=yytext;
}
@@ -904,13 +934,13 @@ STARTDOCSYMS ^{B}"##"/[^#]
current->program+=yytext;
g_specialBlock = FALSE;
}
- ^{POUNDCOMMENT} { // normal comment
- current->program+=yytext;
- }
{NEWLINE} {
current->program+=*yytext;
yyLineNr++;
}
+ ^{POUNDCOMMENT} { // normal comment
+ current->program+=yytext;
+ }
. { // any character
g_specialBlock = FALSE;
current->program+=*yytext;
@@ -926,7 +956,6 @@ STARTDOCSYMS ^{B}"##"/[^#]
initTriSingleQuoteBlock();
BEGIN(TripleComment);
}
-
}
<ClassDec>{IDENTIFIER} {
@@ -1145,7 +1174,7 @@ STARTDOCSYMS ^{B}"##"/[^#]
// printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock);
if (g_doubleQuote==(yytext[0]=='"'))
{
- if (g_specialBlock /*|| g_expectModuleDocs*/)
+ if (g_specialBlock)
{
QCString actualDoc=docBlock;
if (!docBlockSpecial) // legacy unformatted docstring
@@ -1157,6 +1186,7 @@ STARTDOCSYMS ^{B}"##"/[^#]
//{
// actualDoc.prepend("\\namespace "+g_moduleScope+"\\_linebr ");
//}
+ //printf("-------> current=%p bodyEntry=%p\n",current,bodyEntry);
handleCommentBlock(actualDoc, FALSE);
}
//g_expectModuleDocs=FALSE;
@@ -1190,7 +1220,7 @@ STARTDOCSYMS ^{B}"##"/[^#]
docBlock += yytext;
}
}
- [^"\n \t]+ {
+ [^"'\n \t]+ {
docBlock += yytext;
}
\n {
@@ -1423,10 +1453,6 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt)
initParser();
current = new Entry;
- // Set the python flags
- //current_root->python = TRUE;
- //current->python = TRUE;
-
groupEnterFile(yyFileName,yyLineNr);
current->reset();
diff --git a/src/scanner.l b/src/scanner.l
index d037938..4f05a10 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -3522,8 +3522,8 @@ IDLATTR ("["[^\]]*"]"){BN}*
{
current->name += "-p";
}
- if (current->section == Entry::PROTOCOL_SEC /*||
- current->section == Entry::OBJCIMPL_SEC*/)
+ if (current->section == Entry::PROTOCOL_SEC ||
+ current->section == Entry::OBJCIMPL_SEC)
{
unput('{'); // fake start of body
}