Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
6f118034
Commit
6f118034
authored
Dec 07, 2002
by
dimitri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release-1.3-rc1-20021207
parent
f3e7209f
Changes
40
Show whitespace changes
Inline
Side-by-side
Showing
40 changed files
with
760 additions
and
414 deletions
+760
-414
INSTALL
INSTALL
+2
-2
README
README
+2
-2
VERSION
VERSION
+1
-1
config.doc
doc/config.doc
+8
-0
language.doc
doc/language.doc
+7
-8
maintainers.txt
doc/maintainers.txt
+1
-1
doxygen.spec
packages/rpm/doxygen.spec
+1
-1
classdef.cpp
src/classdef.cpp
+1
-1
code.l
src/code.l
+35
-19
config.l
src/config.l
+8
-0
docparser.cpp
src/docparser.cpp
+222
-185
docparser.h
src/docparser.h
+6
-3
doctokenizer.h
src/doctokenizer.h
+1
-1
doctokenizer.l
src/doctokenizer.l
+46
-8
dot.cpp
src/dot.cpp
+122
-69
dot.h
src/dot.h
+2
-0
doxygen.cpp
src/doxygen.cpp
+97
-10
doxygen.h
src/doxygen.h
+3
-2
entry.h
src/entry.h
+4
-6
filedef.cpp
src/filedef.cpp
+1
-1
groupdef.cpp
src/groupdef.cpp
+1
-1
htmldocvisitor.cpp
src/htmldocvisitor.cpp
+9
-2
latexdocvisitor.cpp
src/latexdocvisitor.cpp
+10
-2
latexgen.cpp
src/latexgen.cpp
+1
-0
mandocvisitor.cpp
src/mandocvisitor.cpp
+5
-2
memberdef.cpp
src/memberdef.cpp
+4
-3
membergroup.cpp
src/membergroup.cpp
+3
-2
membergroup.h
src/membergroup.h
+10
-1
message.cpp
src/message.cpp
+40
-46
message.h
src/message.h
+1
-0
namespacedef.cpp
src/namespacedef.cpp
+1
-1
page.h
src/page.h
+1
-1
perlmodgen.cpp
src/perlmodgen.cpp
+3
-0
printdocvisitor.h
src/printdocvisitor.h
+1
-0
rtfdocvisitor.cpp
src/rtfdocvisitor.cpp
+7
-4
scanner.l
src/scanner.l
+41
-17
translator_it.h
src/translator_it.h
+21
-2
util.cpp
src/util.cpp
+24
-9
xmldocvisitor.cpp
src/xmldocvisitor.cpp
+5
-1
xmlgen.cpp
src/xmlgen.cpp
+2
-0
No files found.
INSTALL
View file @
6f118034
DOXYGEN Version 1.3-rc1-20021
128
DOXYGEN Version 1.3-rc1-20021
207
Please read the installation section of the manual
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
(http://www.doxygen.org/install.html) for instructions.
--------
--------
Dimitri van Heesch (
28 Nov
ember 2002)
Dimitri van Heesch (
07 Dec
ember 2002)
README
View file @
6f118034
DOXYGEN Version 1.3_rc1_20021
128
DOXYGEN Version 1.3_rc1_20021
207
Please read INSTALL for compilation instructions.
Please read INSTALL for compilation instructions.
...
@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
...
@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (
28 Nov
ember 2002)
Dimitri van Heesch (dimitri@stack.nl) (
07 Dec
ember 2002)
VERSION
View file @
6f118034
1.3-rc1-20021
128
1.3-rc1-20021
207
doc/config.doc
View file @
6f118034
...
@@ -195,6 +195,7 @@ followed by the descriptions of the tags grouped by category.
...
@@ -195,6 +195,7 @@ followed by the descriptions of the tags grouped by category.
\
refitem
cfg_treeview_width
TREEVIEW_WIDTH
\
refitem
cfg_treeview_width
TREEVIEW_WIDTH
\
refitem
cfg_verbatim_headers
VERBATIM_HEADERS
\
refitem
cfg_verbatim_headers
VERBATIM_HEADERS
\
refitem
cfg_warn_format
WARN_FORMAT
\
refitem
cfg_warn_format
WARN_FORMAT
\
refitem
cfg_warn_if_doc_error
WARN_IF_DOC_ERROR
\
refitem
cfg_warn_if_undocumented
WARN_IF_UNDOCUMENTED
\
refitem
cfg_warn_if_undocumented
WARN_IF_UNDOCUMENTED
\
refitem
cfg_warn_logfile
WARN_LOGFILE
\
refitem
cfg_warn_logfile
WARN_LOGFILE
\
refitem
cfg_warnings
WARNINGS
\
refitem
cfg_warnings
WARNINGS
...
@@ -583,6 +584,13 @@ function's detailed documentation block.
...
@@ -583,6 +584,13 @@ function's detailed documentation block.
for undocumented members. If \c EXTRACT_ALL is set to \c YES then this flag will
for undocumented members. If \c EXTRACT_ALL is set to \c YES then this flag will
automatically be disabled.
automatically be disabled.
\anchor cfg_warn_if_doc_error
<dt>\c WARN_IF_DOC_ERROR <dd>
If \c WARN_IF_DOC_ERROR is set to \c YES, doxygen will generate warnings for
potential errors in the documentation, such as not documenting some
parameters in a documented function, or documenting parameters that
don'
t
exist
or
using
markup
commands
wrongly
.
\
anchor
cfg_warn_format
\
anchor
cfg_warn_format
<
dt
>\
c
WARN_FORMAT
<
dd
>
<
dt
>\
c
WARN_FORMAT
<
dd
>
\
addindex
WARN_FORMAT
\
addindex
WARN_FORMAT
...
...
doc/language.doc
View file @
6f118034
...
@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
...
@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
languages other than English (the default) at configuration time.
Currently (version 1.
3pre1
), 28 languages
Currently (version 1.
2.14-20020317
), 28 languages
are supported (sorted alphabetically):
are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish,
Czech, Danish, Dutch, English, Finnish,
...
@@ -119,9 +119,9 @@ when the translator was updated.
...
@@ -119,9 +119,9 @@ when the translator was updated.
</TR>
</TR>
<TR BGCOLOR="#ffffff">
<TR BGCOLOR="#ffffff">
<TD>German</TD>
<TD>German</TD>
<TD>Jens Seidel<
br>Jens Breitenstein<
/TD>
<TD>Jens Seidel</TD>
<TD>jensseidel@NOSPAM.users.sf.net<
br>Jens.Breitenstein@NOSPAM.tlc.de<
/TD>
<TD>jensseidel@NOSPAM.users.sf.net</TD>
<TD>
1.2.17
</TD>
<TD>
up-to-date
</TD>
</TR>
</TR>
<TR BGCOLOR="#ffffff">
<TR BGCOLOR="#ffffff">
<TD>Greek</TD>
<TD>Greek</TD>
...
@@ -139,7 +139,7 @@ when the translator was updated.
...
@@ -139,7 +139,7 @@ when the translator was updated.
<TD>Italian</TD>
<TD>Italian</TD>
<TD>Alessandro Falappa<br>Ahmed Aldo Faisal</TD>
<TD>Alessandro Falappa<br>Ahmed Aldo Faisal</TD>
<TD>alessandro@NOSPAM.falappa.net<br>aaf23@NOSPAM.cam.ac.uk</TD>
<TD>alessandro@NOSPAM.falappa.net<br>aaf23@NOSPAM.cam.ac.uk</TD>
<TD>
1.2.18
</TD>
<TD>
up-to-date
</TD>
</TR>
</TR>
<TR BGCOLOR="#ffffff">
<TR BGCOLOR="#ffffff">
<TD>Japanese</TD>
<TD>Japanese</TD>
...
@@ -253,14 +253,13 @@ when the translator was updated.
...
@@ -253,14 +253,13 @@ when the translator was updated.
\hline
\hline
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & 1.2.17 \\
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & 1.2.17 \\
\hline
\hline
German & Jens Seidel & {\tt jensseidel@users.sf.net} & 1.2.17 \\
German & Jens Seidel & {\tt jensseidel@users.sf.net} & up-to-date \\
& Jens Breitenstein & {\tt Jens.Breitenstein@tlc.de} & \\
\hline
\hline
Greek & Harry Kalogirou & {\tt harkal@rainbow.cs.unipi.gr} & 1.2.11 \\
Greek & Harry Kalogirou & {\tt harkal@rainbow.cs.unipi.gr} & 1.2.11 \\
\hline
\hline
Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt foldvari@diatronltd.com} & 1.2.1 \\
Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt foldvari@diatronltd.com} & 1.2.1 \\
\hline
\hline
Italian & Alessandro Falappa & {\tt alessandro@falappa.net} &
1.2.18
\\
Italian & Alessandro Falappa & {\tt alessandro@falappa.net} &
up-to-date
\\
& Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & \\
& Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & \\
\hline
\hline
Japanese & Ryunosuke Sato & {\tt puyo@mint.freemail.ne.jp} & 1.2.18 \\
Japanese & Ryunosuke Sato & {\tt puyo@mint.freemail.ne.jp} & 1.2.18 \\
...
...
doc/maintainers.txt
View file @
6f118034
...
@@ -49,7 +49,7 @@ Alessandro Falappa: alessandro@falappa.net
...
@@ -49,7 +49,7 @@ Alessandro Falappa: alessandro@falappa.net
Ahmed Aldo Faisal: aaf23@cam.ac.uk
Ahmed Aldo Faisal: aaf23@cam.ac.uk
Japanese
Japanese
Ryunosuke Sato
: puyo@mint.freemail.ne.jp
Ryunosuke Sato
h: sun594@hotmail.com
Kenji Nagamatsu: naga@joyful.club.ne.jp
Kenji Nagamatsu: naga@joyful.club.ne.jp
Korean
Korean
...
...
packages/rpm/doxygen.spec
View file @
6f118034
Summary: A documentation system for C/C++.
Summary: A documentation system for C/C++.
Name: doxygen
Name: doxygen
Version: 1.3_rc1_20021
128
Version: 1.3_rc1_20021
207
Release: 1
Release: 1
Epoch: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
...
...
src/classdef.cpp
View file @
6f118034
...
@@ -556,7 +556,7 @@ void ClassDef::distributeMemberGroupDocumentation()
...
@@ -556,7 +556,7 @@ void ClassDef::distributeMemberGroupDocumentation()
void
ClassDef
::
findSectionsInDocumentation
()
void
ClassDef
::
findSectionsInDocumentation
()
{
{
docFindSections
(
documentation
(),
0
,
this
,
0
);
docFindSections
(
documentation
(),
0
,
this
,
0
,
docFile
()
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
...
...
src/code.l
View file @
6f118034
...
@@ -109,6 +109,8 @@ static int g_lastCContext;
...
@@ -109,6 +109,8 @@ static int g_lastCContext;
class VariableContext
class VariableContext
{
{
public:
public:
static const ClassDef *dummyContext;
class Scope : public SDict<ClassDef>
class Scope : public SDict<ClassDef>
{
{
public:
public:
...
@@ -157,12 +159,14 @@ class VariableContext
...
@@ -157,12 +159,14 @@ class VariableContext
void addVariable(const QCString &type,const QCString &name);
void addVariable(const QCString &type,const QCString &name);
ClassDef *findVariable(const QCString &name);
ClassDef *findVariable(const QCString &name);
private:
Scope m_globalScope;
Scope m_globalScope;
QList<Scope> m_scopes;
QList<Scope> m_scopes;
};
};
void VariableContext::addVariable(const QCString &type,const QCString &name)
void VariableContext::addVariable(const QCString &type,const QCString &name)
{
{
//printf("VariableContext::addVariable(%s,%s)\n",type.data(),name.data());
QCString ltype = type.simplifyWhiteSpace();
QCString ltype = type.simplifyWhiteSpace();
QCString lname = name.simplifyWhiteSpace();
QCString lname = name.simplifyWhiteSpace();
if (ltype.left(7)=="struct ")
if (ltype.left(7)=="struct ")
...
@@ -191,6 +195,11 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
...
@@ -191,6 +195,11 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
// probably a template class, try without arguments as well
// probably a template class, try without arguments as well
addVariable(ltype.left(i),name);
addVariable(ltype.left(i),name);
}
}
else // add a dummy entry so the name is hidden
{
//printf("adding dummy context!\n");
scope->append(lname,dummyContext);
}
}
}
ClassDef *VariableContext::findVariable(const QCString &name)
ClassDef *VariableContext::findVariable(const QCString &name)
...
@@ -215,6 +224,8 @@ ClassDef *VariableContext::findVariable(const QCString &name)
...
@@ -215,6 +224,8 @@ ClassDef *VariableContext::findVariable(const QCString &name)
return result;
return result;
}
}
const ClassDef *VariableContext::dummyContext = (ClassDef*)0x8;
static VariableContext g_theVarContext;
static VariableContext g_theVarContext;
//-------------------------------------------------------------------
//-------------------------------------------------------------------
...
@@ -538,10 +549,13 @@ static MemberDef *setCallContextForVar(const QCString &name)
...
@@ -538,10 +549,13 @@ static MemberDef *setCallContextForVar(const QCString &name)
MemberName *mn;
MemberName *mn;
ClassDef *mcd = g_theVarContext.findVariable(name);
ClassDef *mcd = g_theVarContext.findVariable(name);
if (mcd) // local variable
if (mcd) // local variable
{
if (mcd!=VariableContext::dummyContext)
{
{
//printf("local var `%s' mcd=%s\n",name.data(),mcd->name().data());
//printf("local var `%s' mcd=%s\n",name.data(),mcd->name().data());
g_theCallContext.setClass(mcd);
g_theCallContext.setClass(mcd);
}
}
}
else
else
{
{
// look for a class member
// look for a class member
...
@@ -611,7 +625,8 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst)
...
@@ -611,7 +625,8 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst)
}
}
static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int *clNameLen=0)
static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,
bool typeOnly=FALSE)
{
{
int i=0;
int i=0;
//printf("generateClassOrGlobalLink(clName=%s)\n",clName);
//printf("generateClassOrGlobalLink(clName=%s)\n",clName);
...
@@ -621,12 +636,12 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
...
@@ -621,12 +636,12 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
clName++;
clName++;
}
}
QCString className=clName;
QCString className=clName;
if (clNameLen) *clNameLen=0;
if (className.isEmpty()) return;
if (className.isEmpty()) return;
ClassDef *cd=0;
ClassDef *cd=0;
if (!g_theVarContext.findVariable(className)) // not a local variable
if (!g_theVarContext.findVariable(className)) // not a local variable
{
{
//printf("not a local var!\n");
Definition *d = g_currentDefinition;
Definition *d = g_currentDefinition;
cd = getResolvedClass(d,className);
cd = getResolvedClass(d,className);
if (cd==0 && (i=className.find('<'))!=-1)
if (cd==0 && (i=className.find('<'))!=-1)
...
@@ -650,11 +665,10 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
...
@@ -650,11 +665,10 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
}
}
}
}
writeMultiLineCodeLink(ol,cd->getReference(),cd->getOutputFileBase(),0,className);
writeMultiLineCodeLink(ol,cd->getReference(),cd->getOutputFileBase(),0,className);
if (clNameLen) *clNameLen=className.length()-i-1;
}
}
else
else
{
{
if (cd==0) // not a class, see if it is a global enum/variable/typedef.
if (cd==0
&& !typeOnly
) // not a class, see if it is a global enum/variable/typedef.
{
{
MemberDef *md = setCallContextForVar(clName);
MemberDef *md = setCallContextForVar(clName);
//printf("is a global md=%p\n",md);
//printf("is a global md=%p\n",md);
...
@@ -677,7 +691,6 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
...
@@ -677,7 +691,6 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
}
}
codifyLines(clName);
codifyLines(clName);
if (clNameLen) *clNameLen=className.length()-1;
}
}
}
}
...
@@ -803,6 +816,8 @@ static void generateMemberLink(BaseCodeDocInterface &ol,const QCString &varName,
...
@@ -803,6 +816,8 @@ static void generateMemberLink(BaseCodeDocInterface &ol,const QCString &varName,
// look for the variable in the current context
// look for the variable in the current context
ClassDef *vcd = g_theVarContext.findVariable(varName);
ClassDef *vcd = g_theVarContext.findVariable(varName);
if (vcd)
if (vcd)
{
if (vcd!=VariableContext::dummyContext)
{
{
//printf("Class found!\n");
//printf("Class found!\n");
if (getLink(vcd->name(),memName,ol))
if (getLink(vcd->name(),memName,ol))
...
@@ -820,7 +835,8 @@ static void generateMemberLink(BaseCodeDocInterface &ol,const QCString &varName,
...
@@ -820,7 +835,8 @@ static void generateMemberLink(BaseCodeDocInterface &ol,const QCString &varName,
}
}
}
}
}
}
else // variable not in current context, maybe it is
}
else // variable not in current context, maybe it is in a parent context
{
{
vcd = getResolvedClass(g_currentDefinition,g_classScope);
vcd = getResolvedClass(g_currentDefinition,g_classScope);
if (vcd && vcd->isLinkable())
if (vcd && vcd->isLinkable())
...
@@ -1536,7 +1552,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
...
@@ -1536,7 +1552,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
<MemberCall2,FuncCall>[a-z_A-Z][:a-z_A-Z0-9]*({B}*"<"[^\n\<\>]*">")? {
<MemberCall2,FuncCall>[a-z_A-Z][:a-z_A-Z0-9]*({B}*"<"[^\n\<\>]*">")? {
addParmType();
addParmType();
g_parmName=yytext;
g_parmName=yytext;
generateClassOrGlobalLink(*g_code,yytext);
generateClassOrGlobalLink(*g_code,yytext
,TRUE
);
}
}
<MemberCall2,FuncCall>, {
<MemberCall2,FuncCall>, {
g_code->codify(yytext);
g_code->codify(yytext);
...
...
src/config.l
View file @
6f118034
...
@@ -1664,6 +1664,14 @@ void Config::create()
...
@@ -1664,6 +1664,14 @@ void Config::create()
"automatically be disabled. \n",
"automatically be disabled. \n",
TRUE
TRUE
);
);
cb = addBool(
"WARN_IF_DOC_ERROR",
"If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for \n"
"potential errors in the documentation, such as not documenting some \n"
"parameters in a documented function, or documenting parameters that \n"
"don't exist or using markup commands wrongly. \n",
TRUE
);
cs = addString(
cs = addString(
"WARN_FORMAT",
"WARN_FORMAT",
"The WARN_FORMAT tag determines the format of the warning messages that \n"
"The WARN_FORMAT tag determines the format of the warning messages that \n"
...
...
src/docparser.cpp
View file @
6f118034
...
@@ -172,13 +172,13 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
...
@@ -172,13 +172,13 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: could not write output image %s"
,
outputFile
.
data
());
"Warning: could not write output image %s"
,
outputFile
.
data
());
}
}
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: could not open image %s"
,
fileName
);
"Warning: could not open image %s"
,
fileName
);
}
}
...
@@ -205,14 +205,14 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
...
@@ -205,14 +205,14 @@ static QCString findAndCopyImage(const char *fileName,DocImage::Type type)
text
.
sprintf
(
"Warning: image file name %s is ambigious.
\n
"
,
fileName
);
text
.
sprintf
(
"Warning: image file name %s is ambigious.
\n
"
,
fileName
);
text
+=
"Possible candidates:
\n
"
;
text
+=
"Possible candidates:
\n
"
;
text
+=
showFileDefMatches
(
Doxygen
::
imageNameDict
,
fileName
);
text
+=
showFileDefMatches
(
Doxygen
::
imageNameDict
,
fileName
);
warn
(
g_fileName
,
doctokenizerYYlineno
,
text
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
text
);
}
}
else
else
{
{
result
=
fileName
;
result
=
fileName
;
if
(
result
.
left
(
5
)
!=
"http:"
&&
result
.
left
(
6
)
!=
"https:"
)
if
(
result
.
left
(
5
)
!=
"http:"
&&
result
.
left
(
6
)
!=
"https:"
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: image file %s is not found in IMAGE_PATH: "
"Warning: image file %s is not found in IMAGE_PATH: "
"assuming external image."
,
fileName
"assuming external image."
,
fileName
);
);
...
@@ -228,7 +228,7 @@ static void checkArgumentName(const QString &name,bool isParam)
...
@@ -228,7 +228,7 @@ static void checkArgumentName(const QString &name,bool isParam)
g_memberDef
->
argumentList
()
:
g_memberDef
->
argumentList
()
:
g_memberDef
->
declArgumentList
();
g_memberDef
->
declArgumentList
();
if
(
al
==
0
)
return
;
// no argument list
if
(
al
==
0
)
return
;
// no argument list
if
(
!
Config_getBool
(
"WARN_IF_
UNDOCUMENTED
"
))
return
;
if
(
!
Config_getBool
(
"WARN_IF_
DOC_ERROR
"
))
return
;
static
QRegExp
re
(
"[a-zA-Z0-9_]+
\\
.*"
);
static
QRegExp
re
(
"[a-zA-Z0-9_]+
\\
.*"
);
int
p
=
0
,
i
=
0
,
l
;
int
p
=
0
,
i
=
0
,
l
;
...
@@ -256,12 +256,11 @@ static void checkArgumentName(const QString &name,bool isParam)
...
@@ -256,12 +256,11 @@ static void checkArgumentName(const QString &name,bool isParam)
//printf("member type=%d\n",memberDef->memberType());
//printf("member type=%d\n",memberDef->memberType());
QString
scope
=
g_memberDef
->
getScopeString
();
QString
scope
=
g_memberDef
->
getScopeString
();
if
(
!
scope
.
isEmpty
())
scope
+=
"::"
;
else
scope
=
""
;
if
(
!
scope
.
isEmpty
())
scope
+=
"::"
;
else
scope
=
""
;
warn
(
g_memberDef
->
docFile
(),
g_memberDef
->
docLine
(),
warn
_doc_error
(
g_memberDef
->
docFile
(),
g_memberDef
->
docLine
(),
"Warning: argument `%s' of command @param "
"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"
,
aName
.
data
(),
scope
.
data
(),
g_memberDef
->
name
().
data
(),
aName
.
data
(),
scope
.
data
(),
g_memberDef
->
name
().
data
(),
argListToString
(
al
).
data
()
argListToString
(
al
).
data
());
);
}
}
p
=
i
+
l
;
p
=
i
+
l
;
}
}
...
@@ -269,7 +268,7 @@ static void checkArgumentName(const QString &name,bool isParam)
...
@@ -269,7 +268,7 @@ static void checkArgumentName(const QString &name,bool isParam)
static
void
checkUndocumentedParams
()
static
void
checkUndocumentedParams
()
{
{
if
(
g_memberDef
&&
g_hasParamCommand
&&
Config_getBool
(
"WARN_IF_
UNDOCUMENTED
"
))
if
(
g_memberDef
&&
g_hasParamCommand
&&
Config_getBool
(
"WARN_IF_
DOC_ERROR
"
))
{
{
ArgumentList
*
al
=
g_memberDef
->
isDocsForDefinition
()
?
ArgumentList
*
al
=
g_memberDef
->
isDocsForDefinition
()
?
g_memberDef
->
argumentList
()
:
g_memberDef
->
argumentList
()
:
...
@@ -293,19 +292,20 @@ static void checkUndocumentedParams()
...
@@ -293,19 +292,20 @@ static void checkUndocumentedParams()
{
{
QString
scope
=
g_memberDef
->
getScopeString
();
QString
scope
=
g_memberDef
->
getScopeString
();
if
(
!
scope
.
isEmpty
())
scope
+=
"::"
;
else
scope
=
""
;
if
(
!
scope
.
isEmpty
())
scope
+=
"::"
;
else
scope
=
""
;
warn
(
g_memberDef
->
docFile
(),
g_memberDef
->
docLine
(),
QString
errMsg
=
(
QString
)
"Warning: The following parameters of "
"Warning: The following parameters of "
+
"%s%s%s are not documented:"
,
scope
+
QString
(
g_memberDef
->
name
())
+
scope
.
data
(),
g_memberDef
->
name
().
data
(),
QString
(
argListToString
(
al
))
+
argListToString
(
al
).
data
())
;
" are not documented:"
;
for
(
ali
.
toFirst
();(
a
=
ali
.
current
());
++
ali
)
for
(
ali
.
toFirst
();(
a
=
ali
.
current
());
++
ali
)
{
{
QString
argName
=
g_memberDef
->
isDefine
()
?
a
->
type
:
a
->
name
;
QString
argName
=
g_memberDef
->
isDefine
()
?
a
->
type
:
a
->
name
;
if
(
!
argName
.
isEmpty
()
&&
g_paramsFound
.
find
(
argName
)
==
0
)
if
(
!
argName
.
isEmpty
()
&&
g_paramsFound
.
find
(
argName
)
==
0
)
{
{
warn_cont
(
" parameter %s
\n
"
,
argName
.
data
())
;
errMsg
+=
" parameter "
+
argName
+
"
\n
"
;
}
}
}
}
warn_doc_error
(
g_memberDef
->
docFile
(),
g_memberDef
->
docLine
(),
errMsg
);
}
}
}
}
}
}
...
@@ -522,7 +522,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
...
@@ -522,7 +522,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
return
tok
;
return
tok
;
}
}
...
@@ -535,15 +535,15 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
...
@@ -535,15 +535,15 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children,
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command
\\
%s as the argument of a
\\
%s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command
\\
%s as the argument of a
\\
%s command"
,
tokenName
.
data
(),
cmdName
.
data
());
tokenName
.
data
(),
cmdName
.
data
());
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
tokenName
.
data
());
tokenName
.
data
());
break
;
break
;
default:
default:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -570,7 +570,7 @@ static void handleStyleLeave(DocNode *parent,QList<DocNode> &children,
...
@@ -570,7 +570,7 @@ static void handleStyleLeave(DocNode *parent,QList<DocNode> &children,
g_styleStack
.
top
()
->
position
()
!=
g_nodeStack
.
count
()
// wrong position
g_styleStack
.
top
()
->
position
()
!=
g_nodeStack
.
count
()
// wrong position
)
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: found </%s> tag without matching <%s> in the same paragraph"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: found </%s> tag without matching <%s> in the same paragraph"
,
tagName
,
tagName
);
tagName
,
tagName
);
}
}
else
// end the section
else
// end the section
...
@@ -600,7 +600,7 @@ static void handlePendingStyleCommands(DocNode *parent,QList<DocNode> &children)
...
@@ -600,7 +600,7 @@ static void handlePendingStyleCommands(DocNode *parent,QList<DocNode> &children)
case
DocStyleChange
:
:
Superscript
:
cmd
=
"superscript"
;
break
;
case
DocStyleChange
:
:
Superscript
:
cmd
=
"superscript"
;
break
;
case
DocStyleChange
:
:
Preformatted
:
cmd
=
"pre"
;
break
;
case
DocStyleChange
:
:
Preformatted
:
cmd
=
"pre"
;
break
;
}
}
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: end of paragraph without end of style "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: end of paragraph without end of style "
"command </%s>"
,
cmd
);
"command </%s>"
,
cmd
);
children
.
append
(
new
DocStyleChange
(
parent
,
g_nodeStack
.
count
(),
sc
->
style
(),
FALSE
));
children
.
append
(
new
DocStyleChange
(
parent
,
g_nodeStack
.
count
(),
sc
->
style
(),
FALSE
));
g_styleStack
.
pop
();
g_styleStack
.
pop
();
...
@@ -728,7 +728,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
...
@@ -728,7 +728,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
doctokenizerYYsetStateHtmlOnly
();
doctokenizerYYsetStateHtmlOnly
();
int
retval
=
doctokenizerYYlex
();
int
retval
=
doctokenizerYYlex
();
children
.
append
(
new
DocVerbatim
(
parent
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
HtmlOnly
,
g_isExample
,
g_fileName
));
children
.
append
(
new
DocVerbatim
(
parent
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
HtmlOnly
,
g_isExample
,
g_fileName
));
if
(
retval
==
0
)
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: htmlonly section ended without end marker"
);
if
(
retval
==
0
)
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: htmlonly section ended without end marker"
);
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
}
}
break
;
break
;
...
@@ -737,7 +737,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
...
@@ -737,7 +737,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
doctokenizerYYsetStateLatexOnly
();
doctokenizerYYsetStateLatexOnly
();
int
retval
=
doctokenizerYYlex
();
int
retval
=
doctokenizerYYlex
();
children
.
append
(
new
DocVerbatim
(
parent
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
LatexOnly
,
g_isExample
,
g_fileName
));
children
.
append
(
new
DocVerbatim
(
parent
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
LatexOnly
,
g_isExample
,
g_fileName
));
if
(
retval
==
0
)
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: latexonly section ended without end marker"
,
doctokenizerYYlineno
);
if
(
retval
==
0
)
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: latexonly section ended without end marker"
,
doctokenizerYYlineno
);
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
}
}
break
;
break
;
...
@@ -752,20 +752,20 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
...
@@ -752,20 +752,20 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
tokenName
.
data
());
tokenName
.
data
());
break
;
break
;
}
}
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
"argument of command %s"
,
tokenName
.
data
());
"argument of command %s"
,
tokenName
.
data
());
break
;
break
;
}
}
else
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
else
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
tokenName
.
data
());
tokToString
(
tok
),
tokenName
.
data
());
break
;
break
;
}
}
...
@@ -778,7 +778,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
...
@@ -778,7 +778,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
tokenName
.
data
());
tokenName
.
data
());
break
;
break
;
}
}
...
@@ -787,7 +787,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
...
@@ -787,7 +787,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children
DocInternalRef
*
ref
=
0
;
DocInternalRef
*
ref
=
0
;
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
tokenName
.
data
());
tokToString
(
tok
),
tokenName
.
data
());
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
break
;
break
;
...
@@ -951,6 +951,8 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter)
...
@@ -951,6 +951,8 @@ DocSymbol::SymType DocSymbol::decodeSymbol(const QString &symName,char *letter)
int
l
=
symName
.
length
();
int
l
=
symName
.
length
();
DBG
((
"decodeSymbol(%s) l=%d
\n
"
,
symName
.
data
(),
l
));
DBG
((
"decodeSymbol(%s) l=%d
\n
"
,
symName
.
data
(),
l
));
if
(
symName
==
"©"
)
return
DocSymbol
::
Copy
;
if
(
symName
==
"©"
)
return
DocSymbol
::
Copy
;
else
if
(
symName
==
"&tm;"
)
return
DocSymbol
::
Tm
;
else
if
(
symName
==
"®"
)
return
DocSymbol
::
Reg
;
else
if
(
symName
==
"<"
)
return
DocSymbol
::
Less
;
else
if
(
symName
==
"<"
)
return
DocSymbol
::
Less
;
else
if
(
symName
==
">"
)
return
DocSymbol
::
Greater
;
else
if
(
symName
==
">"
)
return
DocSymbol
::
Greater
;
else
if
(
symName
==
"&"
)
return
DocSymbol
::
Amp
;
else
if
(
symName
==
"&"
)
return
DocSymbol
::
Amp
;
...
@@ -1040,14 +1042,14 @@ static void readTextFileByName(const QString &file,QString &text)
...
@@ -1040,14 +1042,14 @@ static void readTextFileByName(const QString &file,QString &text)
}
}
else
if
(
ambig
)
else
if
(
ambig
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: included file name %s is ambigious"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: included file name %s is ambigious"
"Possible candidates:
\n
%s"
,
file
.
data
(),
"Possible candidates:
\n
%s"
,
file
.
data
(),
showFileDefMatches
(
Doxygen
::
exampleNameDict
,
file
).
data
()
showFileDefMatches
(
Doxygen
::
exampleNameDict
,
file
).
data
()
);
);
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: included file %s is not found"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: included file %s is not found"
"Check you EXAMPLE_PATH"
,
file
.
data
());
"Check you EXAMPLE_PATH"
,
file
.
data
());
}
}
}
}
...
@@ -1059,7 +1061,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
...
@@ -1059,7 +1061,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
{
{
if
(
id
.
isEmpty
())
if
(
id
.
isEmpty
())
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Empty anchor label"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Empty anchor label"
);
}
}
if
(
newAnchor
)
// found <a name="label">
if
(
newAnchor
)
// found <a name="label">
{
{
...
@@ -1075,7 +1077,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
...
@@ -1075,7 +1077,7 @@ DocAnchor::DocAnchor(DocNode *parent,const QString &id,bool newAnchor)
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Invalid anchor id `%s'"
,
id
.
data
());
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Invalid anchor id `%s'"
,
id
.
data
());
}
}
}
}
}
}
...
@@ -1242,13 +1244,13 @@ void DocCopy::parse()
...
@@ -1242,13 +1244,13 @@ void DocCopy::parse()
}
}
else
// oops, recursion
else
// oops, recursion
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: recursive call chain of
\\
copydoc commands detected at %d
\n
"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: recursive call chain of
\\
copydoc commands detected at %d
\n
"
,
doctokenizerYYlineno
);
doctokenizerYYlineno
);
}
}
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: target %s of
\\
copydoc command not found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: target %s of
\\
copydoc command not found"
,
m_link
.
data
());
m_link
.
data
());
}
}
}
}
...
@@ -1343,15 +1345,15 @@ void DocSecRefItem::parse()
...
@@ -1343,15 +1345,15 @@ void DocSecRefItem::parse()
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
refitem"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
refitem"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -1371,13 +1373,13 @@ void DocSecRefItem::parse()
...
@@ -1371,13 +1373,13 @@ void DocSecRefItem::parse()
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning reference to unknown section %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning reference to unknown section %s"
,
m_target
.
data
());
m_target
.
data
());
}
}
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning reference to empty target"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning reference to empty target"
);
}
}
DBG
((
"DocSecRefItem::parse() end
\n
"
));
DBG
((
"DocSecRefItem::parse() end
\n
"
));
...
@@ -1407,13 +1409,13 @@ void DocSecRefList::parse()
...
@@ -1407,13 +1409,13 @@ void DocSecRefList::parse()
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after
\\
refitem command"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after
\\
refitem command"
);
break
;
break
;
}
}
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of
\\
refitem"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of
\\
refitem"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -1426,7 +1428,7 @@ void DocSecRefList::parse()
...
@@ -1426,7 +1428,7 @@ void DocSecRefList::parse()
case
CMD_ENDSECREFLIST
:
case
CMD_ENDSECREFLIST
:
goto
endsecreflist
;
goto
endsecreflist
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
secreflist"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
secreflist"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
goto
endsecreflist
;
goto
endsecreflist
;
}
}
...
@@ -1437,7 +1439,7 @@ void DocSecRefList::parse()
...
@@ -1437,7 +1439,7 @@ void DocSecRefList::parse()
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s inside section reference list"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s inside section reference list"
,
tokToString
(
tok
));
tokToString
(
tok
));
goto
endsecreflist
;
goto
endsecreflist
;
}
}
...
@@ -1480,15 +1482,15 @@ void DocInternalRef::parse()
...
@@ -1480,15 +1482,15 @@ void DocInternalRef::parse()
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
ref"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
ref"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -1551,7 +1553,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
...
@@ -1551,7 +1553,7 @@ DocRef::DocRef(DocNode *parent,const QString &target) :
}
}
else
// oops, bogus target
else
// oops, bogus target
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unable to resolve reference to `%s' for
\\
ref command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unable to resolve reference to `%s' for
\\
ref command"
,
target
.
data
());
target
.
data
());
}
}
}
}
...
@@ -1569,15 +1571,15 @@ void DocRef::parse()
...
@@ -1569,15 +1571,15 @@ void DocRef::parse()
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
ref"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
ref"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -1620,7 +1622,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
...
@@ -1620,7 +1622,7 @@ DocLink::DocLink(DocNode *parent,const QString &target) :
}
}
else
// oops, bogus target
else
// oops, bogus target
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unable to resolve link to `%s' for
\\
link command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unable to resolve link to `%s' for
\\
link command"
,
target
.
data
());
target
.
data
());
}
}
}
}
...
@@ -1645,17 +1647,17 @@ QString DocLink::parse(bool isJavaLink)
...
@@ -1645,17 +1647,17 @@ QString DocLink::parse(bool isJavaLink)
case
CMD_ENDLINK
:
case
CMD_ENDLINK
:
if
(
isJavaLink
)
if
(
isJavaLink
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: {@link.. ended with @endlink command"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: {@link.. ended with @endlink command"
);
}
}
goto
endlink
;
goto
endlink
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
link"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
link"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
}
}
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_LNKWORD
:
case
TK_LNKWORD
:
...
@@ -1682,7 +1684,7 @@ QString DocLink::parse(bool isJavaLink)
...
@@ -1682,7 +1684,7 @@ QString DocLink::parse(bool isJavaLink)
m_children
.
append
(
new
DocWord
(
this
,
g_token
->
name
));
m_children
.
append
(
new
DocWord
(
this
,
g_token
->
name
));
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -1690,7 +1692,7 @@ QString DocLink::parse(bool isJavaLink)
...
@@ -1690,7 +1692,7 @@ QString DocLink::parse(bool isJavaLink)
}
}
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected end of comment while inside"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected end of comment while inside"
" link command
\n
"
);
" link command
\n
"
);
}
}
endlink
:
endlink
:
...
@@ -1727,15 +1729,15 @@ void DocDotFile::parse()
...
@@ -1727,15 +1729,15 @@ void DocDotFile::parse()
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
dotfile"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
dotfile"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -1754,7 +1756,7 @@ void DocDotFile::parse()
...
@@ -1754,7 +1756,7 @@ void DocDotFile::parse()
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unknown option %s after image title"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unknown option %s after image title"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
}
}
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
...
@@ -1771,14 +1773,14 @@ void DocDotFile::parse()
...
@@ -1771,14 +1773,14 @@ void DocDotFile::parse()
}
}
else
if
(
ambig
)
else
if
(
ambig
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: included dot file name %s is ambigious.
\n
"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: included dot file name %s is ambigious.
\n
"
"Possible candidates:
\n
%s"
,
m_name
.
data
(),
"Possible candidates:
\n
%s"
,
m_name
.
data
(),
showFileDefMatches
(
Doxygen
::
exampleNameDict
,
m_name
).
data
()
showFileDefMatches
(
Doxygen
::
exampleNameDict
,
m_name
).
data
()
);
);
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: included dot file %s is not found "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: included dot file %s is not found "
"in any of the paths specified via DOTFILE_DIRS!"
,
m_name
.
data
());
"in any of the paths specified via DOTFILE_DIRS!"
,
m_name
.
data
());
}
}
...
@@ -1804,15 +1806,15 @@ void DocImage::parse()
...
@@ -1804,15 +1806,15 @@ void DocImage::parse()
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
image"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a
\\
image"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -1831,7 +1833,7 @@ void DocImage::parse()
...
@@ -1831,7 +1833,7 @@ void DocImage::parse()
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unknown option %s after image title"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unknown option %s after image title"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
}
}
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
...
@@ -1862,7 +1864,7 @@ int DocHtmlHeader::parse()
...
@@ -1862,7 +1864,7 @@ int DocHtmlHeader::parse()
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a <h%d> tag"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a <h%d> tag"
,
g_token
->
name
.
data
(),
m_level
);
g_token
->
name
.
data
(),
m_level
);
break
;
break
;
case
TK_HTMLTAG
:
case
TK_HTMLTAG
:
...
@@ -1872,7 +1874,7 @@ int DocHtmlHeader::parse()
...
@@ -1872,7 +1874,7 @@ int DocHtmlHeader::parse()
{
{
if
(
m_level
!=
1
)
if
(
m_level
!=
1
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h1>"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h1>"
,
m_level
);
m_level
);
}
}
goto
endheader
;
goto
endheader
;
...
@@ -1881,7 +1883,7 @@ int DocHtmlHeader::parse()
...
@@ -1881,7 +1883,7 @@ int DocHtmlHeader::parse()
{
{
if
(
m_level
!=
2
)
if
(
m_level
!=
2
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h2>"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h2>"
,
m_level
);
m_level
);
}
}
goto
endheader
;
goto
endheader
;
...
@@ -1890,7 +1892,7 @@ int DocHtmlHeader::parse()
...
@@ -1890,7 +1892,7 @@ int DocHtmlHeader::parse()
{
{
if
(
m_level
!=
3
)
if
(
m_level
!=
3
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h3>"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h3>"
,
m_level
);
m_level
);
}
}
goto
endheader
;
goto
endheader
;
...
@@ -1899,7 +1901,7 @@ int DocHtmlHeader::parse()
...
@@ -1899,7 +1901,7 @@ int DocHtmlHeader::parse()
{
{
if
(
m_level
!=
4
)
if
(
m_level
!=
4
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h4>"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h4>"
,
m_level
);
m_level
);
}
}
goto
endheader
;
goto
endheader
;
...
@@ -1908,7 +1910,7 @@ int DocHtmlHeader::parse()
...
@@ -1908,7 +1910,7 @@ int DocHtmlHeader::parse()
{
{
if
(
m_level
!=
5
)
if
(
m_level
!=
5
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h5>"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h5>"
,
m_level
);
m_level
);
}
}
goto
endheader
;
goto
endheader
;
...
@@ -1917,24 +1919,24 @@ int DocHtmlHeader::parse()
...
@@ -1917,24 +1919,24 @@ int DocHtmlHeader::parse()
{
{
if
(
m_level
!=
6
)
if
(
m_level
!=
6
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h6>"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: <h%d> ended with </h6>"
,
m_level
);
m_level
);
}
}
goto
endheader
;
goto
endheader
;
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected html tag <%s%s> found within <h%d> context"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected html tag <%s%s> found within <h%d> context"
,
g_token
->
endTag
?
"/"
:
""
,
g_token
->
name
.
data
(),
m_level
);
g_token
->
endTag
?
"/"
:
""
,
g_token
->
name
.
data
(),
m_level
);
}
}
}
}
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -1942,7 +1944,7 @@ int DocHtmlHeader::parse()
...
@@ -1942,7 +1944,7 @@ int DocHtmlHeader::parse()
}
}
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected end of comment while inside"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected end of comment while inside"
" <h%d> tag
\n
"
,
m_level
);
" <h%d> tag
\n
"
,
m_level
);
}
}
endheader
:
endheader
:
...
@@ -1969,11 +1971,11 @@ int DocHRef::parse()
...
@@ -1969,11 +1971,11 @@ int DocHRef::parse()
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a <a>..</a> block"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a <a>..</a> block"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_HTMLTAG
:
case
TK_HTMLTAG
:
...
@@ -1985,13 +1987,13 @@ int DocHRef::parse()
...
@@ -1985,13 +1987,13 @@ int DocHRef::parse()
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected html tag <%s%s> found within <a href=...> context"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected html tag <%s%s> found within <a href=...> context"
,
g_token
->
endTag
?
"/"
:
""
,
g_token
->
name
.
data
(),
doctokenizerYYlineno
);
g_token
->
endTag
?
"/"
:
""
,
g_token
->
name
.
data
(),
doctokenizerYYlineno
);
}
}
}
}
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
),
doctokenizerYYlineno
);
tokToString
(
tok
),
doctokenizerYYlineno
);
break
;
break
;
}
}
...
@@ -1999,7 +2001,7 @@ int DocHRef::parse()
...
@@ -1999,7 +2001,7 @@ int DocHRef::parse()
}
}
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected end of comment while inside"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected end of comment while inside"
" <a href=...> tag"
,
doctokenizerYYlineno
);
" <a href=...> tag"
,
doctokenizerYYlineno
);
}
}
endhref
:
endhref
:
...
@@ -2037,7 +2039,7 @@ int DocInternal::parse()
...
@@ -2037,7 +2039,7 @@ int DocInternal::parse()
}
}
if
(
retval
==
TK_LISTITEM
)
if
(
retval
==
TK_LISTITEM
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Invalid list item found"
,
doctokenizerYYlineno
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Invalid list item found"
,
doctokenizerYYlineno
);
}
}
}
while
(
retval
!=
0
&&
retval
!=
RetVal_Section
);
}
while
(
retval
!=
0
&&
retval
!=
RetVal_Section
);
if
(
lastPar
)
lastPar
->
markLast
();
if
(
lastPar
)
lastPar
->
markLast
();
...
@@ -2049,7 +2051,7 @@ int DocInternal::parse()
...
@@ -2049,7 +2051,7 @@ int DocInternal::parse()
//int secLev = sec->type==SectionInfo::Subsection ? 2 : 1;
//int secLev = sec->type==SectionInfo::Subsection ? 2 : 1;
//if (secLev!=1) // wrong level
//if (secLev!=1) // wrong level
//{
//{
// warn(g_fileName,doctokenizerYYlineno,"Warning: Expected level 1 section, found a section with level %d.",secLev);
// warn
_doc_error
(g_fileName,doctokenizerYYlineno,"Warning: Expected level 1 section, found a section with level %d.",secLev);
// break;
// break;
//}
//}
//else
//else
...
@@ -2062,7 +2064,7 @@ int DocInternal::parse()
...
@@ -2062,7 +2064,7 @@ int DocInternal::parse()
if
(
retval
==
RetVal_Internal
)
if
(
retval
==
RetVal_Internal
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning:
\\
internal command found inside internal section"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning:
\\
internal command found inside internal section"
);
}
}
DBG
((
"DocInternal::parse() end
\n
"
));
DBG
((
"DocInternal::parse() end
\n
"
));
...
@@ -2081,7 +2083,7 @@ int DocIndexEntry::parse()
...
@@ -2081,7 +2083,7 @@ int DocIndexEntry::parse()
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after
\\
addindex command"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after
\\
addindex command"
);
goto
endindexentry
;
goto
endindexentry
;
}
}
m_entry
=
""
;
m_entry
=
""
;
...
@@ -2110,7 +2112,7 @@ int DocIndexEntry::parse()
...
@@ -2110,7 +2112,7 @@ int DocIndexEntry::parse()
case
DocSymbol
:
:
Apos
:
m_entry
+=
'\''
;
break
;
case
DocSymbol
:
:
Apos
:
m_entry
+=
'\''
;
break
;
case
DocSymbol
:
:
Quot
:
m_entry
+=
'"'
;
break
;
case
DocSymbol
:
:
Quot
:
m_entry
+=
'"'
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected symbol found as argument of
\\
addindex"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected symbol found as argument of
\\
addindex"
);
break
;
break
;
}
}
}
}
...
@@ -2127,13 +2129,13 @@ int DocIndexEntry::parse()
...
@@ -2127,13 +2129,13 @@ int DocIndexEntry::parse()
case
CMD_HASH
:
m_entry
+=
'#'
;
break
;
case
CMD_HASH
:
m_entry
+=
'#'
;
break
;
case
CMD_PERCENT
:
m_entry
+=
'%'
;
break
;
case
CMD_PERCENT
:
m_entry
+=
'%'
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected command %s found as argument of
\\
addindex"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected command %s found as argument of
\\
addindex"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
}
}
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -2161,11 +2163,11 @@ int DocHtmlCaption::parse()
...
@@ -2161,11 +2163,11 @@ int DocHtmlCaption::parse()
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a <caption> tag"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a <caption> tag"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_HTMLTAG
:
case
TK_HTMLTAG
:
...
@@ -2178,13 +2180,13 @@ int DocHtmlCaption::parse()
...
@@ -2178,13 +2180,13 @@ int DocHtmlCaption::parse()
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected html tag <%s%s> found within <caption> context"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected html tag <%s%s> found within <caption> context"
,
g_token
->
endTag
?
"/"
:
""
,
g_token
->
name
.
data
());
g_token
->
endTag
?
"/"
:
""
,
g_token
->
name
.
data
());
}
}
}
}
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -2192,7 +2194,7 @@ int DocHtmlCaption::parse()
...
@@ -2192,7 +2194,7 @@ int DocHtmlCaption::parse()
}
}
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected end of comment while inside"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected end of comment while inside"
" <caption> tag"
,
doctokenizerYYlineno
);
" <caption> tag"
,
doctokenizerYYlineno
);
}
}
endcaption
:
endcaption
:
...
@@ -2259,20 +2261,20 @@ int DocHtmlRow::parse()
...
@@ -2259,20 +2261,20 @@ int DocHtmlRow::parse()
}
}
else
// found some other tag
else
// found some other tag
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <td> or <th> tag but "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <td> or <th> tag but "
"found <%s> instead!"
,
g_token
->
name
.
data
());
"found <%s> instead!"
,
g_token
->
name
.
data
());
goto
endrow
;
goto
endrow
;
}
}
}
}
else
if
(
tok
==
0
)
// premature end of comment
else
if
(
tok
==
0
)
// premature end of comment
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while looking"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while looking"
" for a html description title"
);
" for a html description title"
);
goto
endrow
;
goto
endrow
;
}
}
else
// token other than html token
else
// token other than html token
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <td> or <th> tag but found %s token instead!"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <td> or <th> tag but found %s token instead!"
,
tokToString
(
tok
));
tokToString
(
tok
));
goto
endrow
;
goto
endrow
;
}
}
...
@@ -2323,7 +2325,7 @@ getrow:
...
@@ -2323,7 +2325,7 @@ getrow:
{
{
if
(
m_caption
)
if
(
m_caption
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: table already has a caption, found another one"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: table already has a caption, found another one"
);
}
}
else
else
{
{
...
@@ -2338,18 +2340,18 @@ getrow:
...
@@ -2338,18 +2340,18 @@ getrow:
}
}
else
// found wrong token
else
// found wrong token
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <tr> or <caption> tag but "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <tr> or <caption> tag but "
"found <%s%s> instead!"
,
g_token
->
endTag
?
"/"
:
""
,
g_token
->
name
.
data
());
"found <%s%s> instead!"
,
g_token
->
endTag
?
"/"
:
""
,
g_token
->
name
.
data
());
}
}
}
}
else
if
(
tok
==
0
)
// premature end of comment
else
if
(
tok
==
0
)
// premature end of comment
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while looking"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while looking"
" for a <tr> or <caption> tag"
);
" for a <tr> or <caption> tag"
);
}
}
else
// token other than html token
else
// token other than html token
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <tr> tag but found %s token instead!"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <tr> tag but found %s token instead!"
,
tokToString
(
tok
));
tokToString
(
tok
));
}
}
...
@@ -2383,11 +2385,11 @@ int DocHtmlDescTitle::parse()
...
@@ -2383,11 +2385,11 @@ int DocHtmlDescTitle::parse()
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a <dt> tag"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a <dt> tag"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_HTMLTAG
:
case
TK_HTMLTAG
:
...
@@ -2404,13 +2406,13 @@ int DocHtmlDescTitle::parse()
...
@@ -2404,13 +2406,13 @@ int DocHtmlDescTitle::parse()
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected html tag <%s%s> found within <dt> context"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected html tag <%s%s> found within <dt> context"
,
g_token
->
endTag
?
"/"
:
""
,
g_token
->
name
.
data
());
g_token
->
endTag
?
"/"
:
""
,
g_token
->
name
.
data
());
}
}
}
}
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -2418,7 +2420,7 @@ int DocHtmlDescTitle::parse()
...
@@ -2418,7 +2420,7 @@ int DocHtmlDescTitle::parse()
}
}
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected end of comment while inside"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected end of comment while inside"
" <dt> tag"
);
" <dt> tag"
);
}
}
endtitle
:
endtitle
:
...
@@ -2478,20 +2480,20 @@ int DocHtmlDescList::parse()
...
@@ -2478,20 +2480,20 @@ int DocHtmlDescList::parse()
}
}
else
// found some other tag
else
// found some other tag
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <dt> tag but "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <dt> tag but "
"found <%s> instead!"
,
g_token
->
name
.
data
());
"found <%s> instead!"
,
g_token
->
name
.
data
());
goto
enddesclist
;
goto
enddesclist
;
}
}
}
}
else
if
(
tok
==
0
)
// premature end of comment
else
if
(
tok
==
0
)
// premature end of comment
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while looking"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while looking"
" for a html description title"
);
" for a html description title"
);
goto
enddesclist
;
goto
enddesclist
;
}
}
else
// token other than html token
else
// token other than html token
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <dt> tag but found %s token instead!"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <dt> tag but found %s token instead!"
,
tokToString
(
tok
));
tokToString
(
tok
));
goto
enddesclist
;
goto
enddesclist
;
}
}
...
@@ -2516,7 +2518,7 @@ int DocHtmlDescList::parse()
...
@@ -2516,7 +2518,7 @@ int DocHtmlDescList::parse()
if
(
retval
==
0
)
if
(
retval
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while inside <dl> block"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while inside <dl> block"
);
}
}
enddesclist
:
enddesclist
:
...
@@ -2603,20 +2605,20 @@ int DocHtmlList::parse()
...
@@ -2603,20 +2605,20 @@ int DocHtmlList::parse()
}
}
else
// found some other tag
else
// found some other tag
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <li> tag but "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <li> tag but "
"found <%s> instead!"
,
g_token
->
name
.
data
());
"found <%s> instead!"
,
g_token
->
name
.
data
());
goto
endlist
;
goto
endlist
;
}
}
}
}
else
if
(
tok
==
0
)
// premature end of comment
else
if
(
tok
==
0
)
// premature end of comment
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while looking"
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while looking"
" for a html list item"
);
" for a html list item"
);
goto
endlist
;
goto
endlist
;
}
}
else
// token other than html token
else
// token other than html token
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <li> tag but found %s token instead!"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected <li> tag but found %s token instead!"
,
tokToString
(
tok
));
tokToString
(
tok
));
goto
endlist
;
goto
endlist
;
}
}
...
@@ -2630,7 +2632,7 @@ int DocHtmlList::parse()
...
@@ -2630,7 +2632,7 @@ int DocHtmlList::parse()
if
(
retval
==
0
)
if
(
retval
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while inside <%cl> block"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment while inside <%cl> block"
,
m_type
==
Unordered
?
'u'
:
'o'
);
m_type
==
Unordered
?
'u'
:
'o'
);
}
}
...
@@ -2724,15 +2726,15 @@ void DocTitle::parse()
...
@@ -2724,15 +2726,15 @@ void DocTitle::parse()
switch
(
tok
)
switch
(
tok
)
{
{
case
TK_COMMAND
:
case
TK_COMMAND
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a title section"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal command %s as part of a title section"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
case
TK_SYMBOL
:
case
TK_SYMBOL
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -2745,6 +2747,11 @@ void DocTitle::parse()
...
@@ -2745,6 +2747,11 @@ void DocTitle::parse()
ASSERT
(
n
==
this
);
ASSERT
(
n
==
this
);
}
}
void
DocTitle
::
parseFromString
(
const
QString
&
text
)
{
m_children
.
append
(
new
DocWord
(
this
,
text
));
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
DocSimpleSect
::
DocSimpleSect
(
DocNode
*
parent
,
Type
t
)
:
DocSimpleSect
::
DocSimpleSect
(
DocNode
*
parent
,
Type
t
)
:
...
@@ -2803,6 +2810,24 @@ int DocSimpleSect::parse(bool userTitle)
...
@@ -2803,6 +2810,24 @@ int DocSimpleSect::parse(bool userTitle)
return
retval
;
// 0==EOF, TK_NEWPARA, TK_LISTITEM, TK_ENDLIST, RetVal_SimpleSec
return
retval
;
// 0==EOF, TK_NEWPARA, TK_LISTITEM, TK_ENDLIST, RetVal_SimpleSec
}
}
int
DocSimpleSect
::
parseRcs
()
{
DBG
((
"DocSimpleSect::parseRcs() start
\n
"
));
g_nodeStack
.
push
(
this
);
m_title
=
new
DocTitle
(
this
);
m_title
->
parseFromString
(
g_token
->
name
);
docParserPushContext
();
internalValidatingParseDoc
(
this
,
m_children
,
g_token
->
text
);
docParserPopContext
();
DBG
((
"DocSimpleSect::parseRcs() end retval=%d
\n
"
,
retval
));
DocNode
*
n
=
g_nodeStack
.
pop
();
ASSERT
(
n
==
this
);
return
RetVal_OK
;
}
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
int
DocParamList
::
parse
(
const
QString
&
cmdName
)
int
DocParamList
::
parse
(
const
QString
&
cmdName
)
...
@@ -2814,7 +2839,7 @@ int DocParamList::parse(const QString &cmdName)
...
@@ -2814,7 +2839,7 @@ int DocParamList::parse(const QString &cmdName)
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
}
}
doctokenizerYYsetStateParam
();
doctokenizerYYsetStateParam
();
...
@@ -2837,7 +2862,7 @@ int DocParamList::parse(const QString &cmdName)
...
@@ -2837,7 +2862,7 @@ int DocParamList::parse(const QString &cmdName)
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
if
(
tok
==
0
)
/* premature end of comment block */
if
(
tok
==
0
)
/* premature end of comment block */
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
"argument of command %s"
,
cmdName
.
data
());
"argument of command %s"
,
cmdName
.
data
());
return
0
;
return
0
;
}
}
...
@@ -2945,7 +2970,7 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
...
@@ -2945,7 +2970,7 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -2954,13 +2979,13 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
...
@@ -2954,13 +2979,13 @@ void DocPara::handleIncludeOperator(const QString &cmdName,DocIncOperator::Type
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
"argument of command %s"
,
cmdName
.
data
());
"argument of command %s"
,
cmdName
.
data
());
return
;
return
;
}
}
else
if
(
tok
!=
TK_WORD
)
else
if
(
tok
!=
TK_WORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
cmdName
.
data
());
tokToString
(
tok
),
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -2995,21 +3020,21 @@ void DocPara::handleImage(const QString &cmdName)
...
@@ -2995,21 +3020,21 @@ void DocPara::handleImage(const QString &cmdName)
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
return
;
return
;
}
}
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
cmdName
.
data
());
tokToString
(
tok
),
cmdName
.
data
());
return
;
return
;
}
}
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -3020,7 +3045,7 @@ void DocPara::handleImage(const QString &cmdName)
...
@@ -3020,7 +3045,7 @@ void DocPara::handleImage(const QString &cmdName)
else
if
(
imgType
==
"rtf"
)
t
=
DocImage
::
Rtf
;
else
if
(
imgType
==
"rtf"
)
t
=
DocImage
::
Rtf
;
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: image type %s specified as the first argument of "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: image type %s specified as the first argument of "
"%s is not valid"
,
"%s is not valid"
,
imgType
.
data
(),
cmdName
.
data
());
imgType
.
data
(),
cmdName
.
data
());
return
;
return
;
...
@@ -3029,7 +3054,7 @@ void DocPara::handleImage(const QString &cmdName)
...
@@ -3029,7 +3054,7 @@ void DocPara::handleImage(const QString &cmdName)
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WORD
)
if
(
tok
!=
TK_WORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
cmdName
.
data
());
tokToString
(
tok
),
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -3044,7 +3069,7 @@ void DocPara::handleDotFile(const QString &cmdName)
...
@@ -3044,7 +3069,7 @@ void DocPara::handleDotFile(const QString &cmdName)
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -3052,12 +3077,13 @@ void DocPara::handleDotFile(const QString &cmdName)
...
@@ -3052,12 +3077,13 @@ void DocPara::handleDotFile(const QString &cmdName)
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WORD
)
if
(
tok
!=
TK_WORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
cmdName
.
data
());
tokToString
(
tok
),
cmdName
.
data
());
return
;
return
;
}
}
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
DocDotFile
*
df
=
new
DocDotFile
(
this
,
g_token
->
name
);
QString
name
=
g_token
->
name
;
DocDotFile
*
df
=
new
DocDotFile
(
this
,
name
);
m_children
.
append
(
df
);
m_children
.
append
(
df
);
df
->
parse
();
df
->
parse
();
}
}
...
@@ -3067,7 +3093,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
...
@@ -3067,7 +3093,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -3075,7 +3101,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
...
@@ -3075,7 +3101,7 @@ void DocPara::handleLink(const QString &cmdName,bool isJavaLink)
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WORD
)
if
(
tok
!=
TK_WORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
cmdName
.
data
());
tokToString
(
tok
),
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -3094,7 +3120,7 @@ void DocPara::handleRef(const QString &cmdName)
...
@@ -3094,7 +3120,7 @@ void DocPara::handleRef(const QString &cmdName)
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -3103,7 +3129,7 @@ void DocPara::handleRef(const QString &cmdName)
...
@@ -3103,7 +3129,7 @@ void DocPara::handleRef(const QString &cmdName)
DocRef
*
ref
=
0
;
DocRef
*
ref
=
0
;
if
(
tok
!=
TK_WORD
)
if
(
tok
!=
TK_WORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
cmdName
.
data
());
tokToString
(
tok
),
cmdName
.
data
());
goto
endref
;
goto
endref
;
}
}
...
@@ -3144,7 +3170,7 @@ int DocPara::handleLanguageSwitch()
...
@@ -3144,7 +3170,7 @@ int DocPara::handleLanguageSwitch()
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s as parameter of
\\
~"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s as parameter of
\\
~"
,
tokToString
(
tok
));
tokToString
(
tok
));
goto
endlang
;
goto
endlang
;
}
}
...
@@ -3164,7 +3190,7 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
...
@@ -3164,7 +3190,7 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -3173,13 +3199,13 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
...
@@ -3173,13 +3199,13 @@ void DocPara::handleInclude(const QString &cmdName,DocInclude::Type t)
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
"argument of command %s"
,
cmdName
.
data
());
"argument of command %s"
,
cmdName
.
data
());
return
;
return
;
}
}
else
if
(
tok
!=
TK_WORD
)
else
if
(
tok
!=
TK_WORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
cmdName
.
data
());
tokToString
(
tok
),
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -3194,20 +3220,20 @@ void DocPara::handleSection(const QString &cmdName)
...
@@ -3194,20 +3220,20 @@ void DocPara::handleSection(const QString &cmdName)
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
return
;
return
;
}
}
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
"argument of command %s
\n
"
,
cmdName
.
data
());
"argument of command %s
\n
"
,
cmdName
.
data
());
return
;
return
;
}
}
else
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
else
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
cmdName
.
data
());
tokToString
(
tok
),
cmdName
.
data
());
return
;
return
;
}
}
...
@@ -3224,7 +3250,7 @@ int DocPara::handleCommand(const QString &cmdName)
...
@@ -3224,7 +3250,7 @@ int DocPara::handleCommand(const QString &cmdName)
switch
(
CmdMapper
::
map
(
cmdName
))
switch
(
CmdMapper
::
map
(
cmdName
))
{
{
case
CMD_UNKNOWN
:
case
CMD_UNKNOWN
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Found unknown command `
\\
%s'"
,
cmdName
.
data
());
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Found unknown command `
\\
%s'"
,
cmdName
.
data
());
break
;
break
;
case
CMD_EMPHASIS
:
case
CMD_EMPHASIS
:
m_children
.
append
(
new
DocStyleChange
(
this
,
g_nodeStack
.
count
(),
DocStyleChange
::
Italic
,
TRUE
));
m_children
.
append
(
new
DocStyleChange
(
this
,
g_nodeStack
.
count
(),
DocStyleChange
::
Italic
,
TRUE
));
...
@@ -3351,7 +3377,7 @@ int DocPara::handleCommand(const QString &cmdName)
...
@@ -3351,7 +3377,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateCode
();
doctokenizerYYsetStateCode
();
retval
=
doctokenizerYYlex
();
retval
=
doctokenizerYYlex
();
m_children
.
append
(
new
DocVerbatim
(
this
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
Code
,
g_isExample
,
g_fileName
));
m_children
.
append
(
new
DocVerbatim
(
this
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
Code
,
g_isExample
,
g_fileName
));
if
(
retval
==
0
)
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: code section ended without end marker"
);
if
(
retval
==
0
)
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: code section ended without end marker"
);
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
}
}
break
;
break
;
...
@@ -3360,7 +3386,7 @@ int DocPara::handleCommand(const QString &cmdName)
...
@@ -3360,7 +3386,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateHtmlOnly
();
doctokenizerYYsetStateHtmlOnly
();
retval
=
doctokenizerYYlex
();
retval
=
doctokenizerYYlex
();
m_children
.
append
(
new
DocVerbatim
(
this
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
HtmlOnly
,
g_isExample
,
g_fileName
));
m_children
.
append
(
new
DocVerbatim
(
this
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
HtmlOnly
,
g_isExample
,
g_fileName
));
if
(
retval
==
0
)
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: htmlonly section ended without end marker"
);
if
(
retval
==
0
)
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: htmlonly section ended without end marker"
);
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
}
}
break
;
break
;
...
@@ -3369,7 +3395,7 @@ int DocPara::handleCommand(const QString &cmdName)
...
@@ -3369,7 +3395,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateLatexOnly
();
doctokenizerYYsetStateLatexOnly
();
retval
=
doctokenizerYYlex
();
retval
=
doctokenizerYYlex
();
m_children
.
append
(
new
DocVerbatim
(
this
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
LatexOnly
,
g_isExample
,
g_fileName
));
m_children
.
append
(
new
DocVerbatim
(
this
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
LatexOnly
,
g_isExample
,
g_fileName
));
if
(
retval
==
0
)
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: latexonly section ended without end marker"
);
if
(
retval
==
0
)
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: latexonly section ended without end marker"
);
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
}
}
break
;
break
;
...
@@ -3378,7 +3404,7 @@ int DocPara::handleCommand(const QString &cmdName)
...
@@ -3378,7 +3404,7 @@ int DocPara::handleCommand(const QString &cmdName)
doctokenizerYYsetStateVerbatim
();
doctokenizerYYsetStateVerbatim
();
retval
=
doctokenizerYYlex
();
retval
=
doctokenizerYYlex
();
m_children
.
append
(
new
DocVerbatim
(
this
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
Verbatim
,
g_isExample
,
g_fileName
));
m_children
.
append
(
new
DocVerbatim
(
this
,
g_context
,
g_token
->
verb
,
DocVerbatim
::
Verbatim
,
g_isExample
,
g_fileName
));
if
(
retval
==
0
)
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: verbatim section ended without end marker"
);
if
(
retval
==
0
)
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: verbatim section ended without end marker"
);
doctokenizerYYsetStatePara
();
doctokenizerYYsetStatePara
();
}
}
break
;
break
;
...
@@ -3387,7 +3413,7 @@ int DocPara::handleCommand(const QString &cmdName)
...
@@ -3387,7 +3413,7 @@ int DocPara::handleCommand(const QString &cmdName)
case
CMD_ENDLATEXONLY
:
case
CMD_ENDLATEXONLY
:
case
CMD_ENDLINK
:
case
CMD_ENDLINK
:
case
CMD_ENDVERBATIM
:
case
CMD_ENDVERBATIM
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected command %s"
,
g_token
->
name
.
data
());
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected command %s"
,
g_token
->
name
.
data
());
break
;
break
;
case
CMD_PARAM
:
case
CMD_PARAM
:
retval
=
handleParamSection
(
cmdName
,
DocParamSect
::
Param
);
retval
=
handleParamSection
(
cmdName
,
DocParamSect
::
Param
);
...
@@ -3421,20 +3447,20 @@ int DocPara::handleCommand(const QString &cmdName)
...
@@ -3421,20 +3447,20 @@ int DocPara::handleCommand(const QString &cmdName)
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
break
;
break
;
}
}
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
"argument of command %s"
,
cmdName
.
data
());
"argument of command %s"
,
cmdName
.
data
());
break
;
break
;
}
}
else
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
else
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
cmdName
.
data
());
tokToString
(
tok
),
cmdName
.
data
());
break
;
break
;
}
}
...
@@ -3457,20 +3483,20 @@ int DocPara::handleCommand(const QString &cmdName)
...
@@ -3457,20 +3483,20 @@ int DocPara::handleCommand(const QString &cmdName)
int
tok
=
doctokenizerYYlex
();
int
tok
=
doctokenizerYYlex
();
if
(
tok
!=
TK_WHITESPACE
)
if
(
tok
!=
TK_WHITESPACE
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: expected whitespace after %s command"
,
cmdName
.
data
());
cmdName
.
data
());
break
;
break
;
}
}
tok
=
doctokenizerYYlex
();
tok
=
doctokenizerYYlex
();
if
(
tok
==
0
)
if
(
tok
==
0
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected end of comment block while parsing the "
"argument of command %s
\n
"
,
cmdName
.
data
());
"argument of command %s
\n
"
,
cmdName
.
data
());
break
;
break
;
}
}
else
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
else
if
(
tok
!=
TK_WORD
&&
tok
!=
TK_LNKWORD
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected token %s as the argument of %s"
,
tokToString
(
tok
),
cmdName
.
data
());
tokToString
(
tok
),
cmdName
.
data
());
break
;
break
;
}
}
...
@@ -3526,10 +3552,10 @@ int DocPara::handleCommand(const QString &cmdName)
...
@@ -3526,10 +3552,10 @@ int DocPara::handleCommand(const QString &cmdName)
}
}
break
;
break
;
case
CMD_SECREFITEM
:
case
CMD_SECREFITEM
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected command %s"
,
g_token
->
name
.
data
());
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected command %s"
,
g_token
->
name
.
data
());
break
;
break
;
case
CMD_ENDSECREFLIST
:
case
CMD_ENDSECREFLIST
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected command %s"
,
g_token
->
name
.
data
());
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected command %s"
,
g_token
->
name
.
data
());
break
;
break
;
case
CMD_FORMULA
:
case
CMD_FORMULA
:
{
{
...
@@ -3541,7 +3567,7 @@ int DocPara::handleCommand(const QString &cmdName)
...
@@ -3541,7 +3567,7 @@ int DocPara::handleCommand(const QString &cmdName)
retval
=
handleLanguageSwitch
();
retval
=
handleLanguageSwitch
();
break
;
break
;
case
CMD_INTERNALREF
:
case
CMD_INTERNALREF
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected command %s"
,
g_token
->
name
.
data
());
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: unexpected command %s"
,
g_token
->
name
.
data
());
break
;
break
;
default
:
default
:
// we should not get here!
// we should not get here!
...
@@ -3581,7 +3607,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
...
@@ -3581,7 +3607,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
case
HTML_LI
:
case
HTML_LI
:
if
(
!
insideUL
(
this
)
&&
!
insideOL
(
this
))
if
(
!
insideUL
(
this
)
&&
!
insideOL
(
this
))
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: lonely <li> tag found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: lonely <li> tag found"
);
}
}
else
else
{
{
...
@@ -3635,7 +3661,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
...
@@ -3635,7 +3661,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
retval
=
RetVal_DescTitle
;
retval
=
RetVal_DescTitle
;
break
;
break
;
case
HTML_DD
:
case
HTML_DD
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag <dd> found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag <dd> found"
);
break
;
break
;
case
HTML_TABLE
:
case
HTML_TABLE
:
{
{
...
@@ -3654,7 +3680,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
...
@@ -3654,7 +3680,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
retval
=
RetVal_TableHCell
;
retval
=
RetVal_TableHCell
;
break
;
break
;
case
HTML_CAPTION
:
case
HTML_CAPTION
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag <caption> found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag <caption> found"
);
break
;
break
;
case
HTML_BR
:
case
HTML_BR
:
{
{
...
@@ -3684,7 +3710,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
...
@@ -3684,7 +3710,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: found <a> tag with name option but without value!"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: found <a> tag with name option but without value!"
);
}
}
}
}
else
if
(
opt
->
name
==
"href"
)
// <a href=url>..</a> tag
else
if
(
opt
->
name
==
"href"
)
// <a href=url>..</a> tag
...
@@ -3759,7 +3785,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
...
@@ -3759,7 +3785,7 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
}
}
break
;
break
;
case
HTML_UNKNOWN
:
case
HTML_UNKNOWN
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported html tag <%s> found"
,
tagName
.
data
());
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported html tag <%s> found"
,
tagName
.
data
());
break
;
break
;
default
:
default
:
// we should not get here!
// we should not get here!
...
@@ -3779,7 +3805,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
...
@@ -3779,7 +3805,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case
HTML_UL
:
case
HTML_UL
:
if
(
!
insideUL
(
this
))
if
(
!
insideUL
(
this
))
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: found </ul> tag without matching <ul>"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: found </ul> tag without matching <ul>"
);
}
}
else
else
{
{
...
@@ -3789,7 +3815,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
...
@@ -3789,7 +3815,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case
HTML_OL
:
case
HTML_OL
:
if
(
!
insideOL
(
this
))
if
(
!
insideOL
(
this
))
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: found </ol> tag without matching <ol>"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: found </ol> tag without matching <ol>"
);
}
}
else
else
{
{
...
@@ -3799,7 +3825,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
...
@@ -3799,7 +3825,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
case
HTML_LI
:
case
HTML_LI
:
if
(
!
insideLI
(
this
))
if
(
!
insideLI
(
this
))
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: found </li> tag without matching <li>"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: found </li> tag without matching <li>"
);
}
}
else
else
{
{
...
@@ -3809,7 +3835,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
...
@@ -3809,7 +3835,7 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
//case HTML_PRE:
//case HTML_PRE:
// if (!insidePRE(this))
// if (!insidePRE(this))
// {
// {
// warn(g_fileName,doctokenizerYYlineno,"Warning: found </pre> tag without matching <pre>");
// warn
_doc_error
(g_fileName,doctokenizerYYlineno,"Warning: found </pre> tag without matching <pre>");
// }
// }
// else
// else
// {
// {
...
@@ -3867,32 +3893,32 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
...
@@ -3867,32 +3893,32 @@ int DocPara::handleHtmlEndTag(const QString &tagName)
// ignore </th> tag
// ignore </th> tag
break
;
break
;
case
HTML_CAPTION
:
case
HTML_CAPTION
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </caption> found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </caption> found"
);
break
;
break
;
case
HTML_BR
:
case
HTML_BR
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal </br> tag found
\n
"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Illegal </br> tag found
\n
"
);
break
;
break
;
case
HTML_H1
:
case
HTML_H1
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </h1> found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </h1> found"
);
break
;
break
;
case
HTML_H2
:
case
HTML_H2
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </h2> found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </h2> found"
);
break
;
break
;
case
HTML_H3
:
case
HTML_H3
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </h3> found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </h3> found"
);
break
;
break
;
case
HTML_IMG
:
case
HTML_IMG
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </img> found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </img> found"
);
break
;
break
;
case
HTML_HR
:
case
HTML_HR
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </hr> found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected tag </hr> found"
);
break
;
break
;
case
HTML_A
:
case
HTML_A
:
//warn(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </a> found");
//warn
_doc_error
(g_fileName,doctokenizerYYlineno,"Warning: Unexpected tag </a> found");
// ignore </a> tag (can be part of <a name=...></a>
// ignore </a> tag (can be part of <a name=...></a>
break
;
break
;
case
HTML_UNKNOWN
:
case
HTML_UNKNOWN
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported html tag </%s> found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported html tag </%s> found"
,
tagName
.
data
());
tagName
.
data
());
break
;
break
;
default
:
default
:
...
@@ -4025,13 +4051,13 @@ reparsetoken:
...
@@ -4025,13 +4051,13 @@ reparsetoken:
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: End of list marker found "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: End of list marker found "
"has invalid indent level"
);
"has invalid indent level"
);
}
}
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: End of list marker found without any preceding "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: End of list marker found without any preceding "
"list items"
);
"list items"
);
}
}
break
;
break
;
...
@@ -4132,7 +4158,7 @@ reparsetoken:
...
@@ -4132,7 +4158,7 @@ reparsetoken:
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
}
}
break
;
break
;
...
@@ -4140,6 +4166,17 @@ reparsetoken:
...
@@ -4140,6 +4166,17 @@ reparsetoken:
case
TK_NEWPARA
:
case
TK_NEWPARA
:
retval
=
TK_NEWPARA
;
retval
=
TK_NEWPARA
;
goto
endparagraph
;
goto
endparagraph
;
case
TK_RCSTAG
:
{
DocSimpleSect
*
ss
=
new
DocSimpleSect
(
this
,
DocSimpleSect
::
Rcs
);
m_children
.
append
(
ss
);
ss
->
parseRcs
();
}
break
;
default
:
warn_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Found unexpected token (id=%x)
\n
"
,
tok
);
break
;
}
}
}
}
endparagraph
:
endparagraph
:
...
@@ -4194,7 +4231,7 @@ int DocSection::parse()
...
@@ -4194,7 +4231,7 @@ int DocSection::parse()
}
}
if
(
retval
==
TK_LISTITEM
)
if
(
retval
==
TK_LISTITEM
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Invalid list item found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Invalid list item found"
);
}
}
}
while
(
retval
!=
0
&&
}
while
(
retval
!=
0
&&
retval
!=
RetVal_Internal
&&
retval
!=
RetVal_Internal
&&
...
@@ -4247,7 +4284,7 @@ int DocSection::parse()
...
@@ -4247,7 +4284,7 @@ int DocSection::parse()
if
(
retval
==
RetVal_Subsection
)
level
=
2
;
if
(
retval
==
RetVal_Subsection
)
level
=
2
;
else
if
(
retval
==
RetVal_Subsubsection
)
level
=
3
;
else
if
(
retval
==
RetVal_Subsubsection
)
level
=
3
;
else
level
=
4
;
else
level
=
4
;
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected %s "
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected %s "
"command found inside %s!"
,
"command found inside %s!"
,
sectionLevelToName
[
level
],
sectionLevelToName
[
m_level
]);
sectionLevelToName
[
level
],
sectionLevelToName
[
m_level
]);
retval
=
0
;
// stop parsing
retval
=
0
;
// stop parsing
...
@@ -4296,7 +4333,7 @@ void DocText::parse()
...
@@ -4296,7 +4333,7 @@ void DocText::parse()
}
}
else
else
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unsupported symbol %s found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
}
}
}
}
...
@@ -4329,13 +4366,13 @@ void DocText::parse()
...
@@ -4329,13 +4366,13 @@ void DocText::parse()
m_children
.
append
(
new
DocSymbol
(
this
,
DocSymbol
::
Percent
));
m_children
.
append
(
new
DocSymbol
(
this
,
DocSymbol
::
Percent
));
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected command `%s' found"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected command `%s' found"
,
g_token
->
name
.
data
());
g_token
->
name
.
data
());
break
;
break
;
}
}
break
;
break
;
default
:
default
:
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Unexpected token %s"
,
tokToString
(
tok
));
tokToString
(
tok
));
break
;
break
;
}
}
...
@@ -4373,7 +4410,7 @@ void DocRoot::parse()
...
@@ -4373,7 +4410,7 @@ void DocRoot::parse()
}
}
if
(
retval
==
TK_LISTITEM
)
if
(
retval
==
TK_LISTITEM
)
{
{
warn
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Invalid list item found"
);
warn
_doc_error
(
g_fileName
,
doctokenizerYYlineno
,
"Warning: Invalid list item found"
);
}
}
}
while
(
retval
!=
0
&&
retval
!=
RetVal_Section
&&
retval
!=
RetVal_Internal
);
}
while
(
retval
!=
0
&&
retval
!=
RetVal_Section
&&
retval
!=
RetVal_Internal
);
if
(
lastPar
)
lastPar
->
markLast
();
if
(
lastPar
)
lastPar
->
markLast
();
...
@@ -4493,8 +4530,8 @@ DocNode *validatingParseText(const char *input)
...
@@ -4493,8 +4530,8 @@ DocNode *validatingParseText(const char *input)
return
txt
;
return
txt
;
}
}
void
docFindSections
(
const
char
*
input
,
PageInfo
*
pi
,
Definition
*
d
,
MemberGroup
*
mg
)
void
docFindSections
(
const
char
*
input
,
PageInfo
*
pi
,
Definition
*
d
,
MemberGroup
*
mg
,
const
char
*
fileName
)
{
{
doctokenizerYYFindSections
(
input
,
pi
,
d
,
mg
);
doctokenizerYYFindSections
(
input
,
pi
,
d
,
mg
,
fileName
);
}
}
src/docparser.h
View file @
6f118034
...
@@ -59,7 +59,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
...
@@ -59,7 +59,7 @@ DocNode *validatingParseDoc(const char *fileName,int startLine,
DocNode
*
validatingParseText
(
const
char
*
input
);
DocNode
*
validatingParseText
(
const
char
*
input
);
/*! Searches for section and anchor commands in the input */
/*! Searches for section and anchor commands in the input */
void
docFindSections
(
const
char
*
input
,
PageInfo
*
pi
,
Definition
*
d
,
MemberGroup
*
m
);
void
docFindSections
(
const
char
*
input
,
PageInfo
*
pi
,
Definition
*
d
,
MemberGroup
*
m
,
const
char
*
fileName
);
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
...
@@ -156,6 +156,7 @@ template<class T> class CompAccept
...
@@ -156,6 +156,7 @@ template<class T> class CompAccept
protected
:
protected
:
QList
<
DocNode
>
m_children
;
QList
<
DocNode
>
m_children
;
QList
<
DocNode
>
&
getChildren
()
const
{
return
m_children
;
}
};
};
...
@@ -297,7 +298,7 @@ class DocSymbol : public DocNode
...
@@ -297,7 +298,7 @@ class DocSymbol : public DocNode
{
{
public
:
public
:
enum
SymType
{
Unknown
=
0
,
BSlash
,
At
,
Less
,
Greater
,
Amp
,
Dollar
,
Hash
,
Percent
,
enum
SymType
{
Unknown
=
0
,
BSlash
,
At
,
Less
,
Greater
,
Amp
,
Dollar
,
Hash
,
Percent
,
Copy
,
Apos
,
Quot
,
Uml
,
Acute
,
Grave
,
Circ
,
Tilde
,
Szlig
,
Copy
,
Tm
,
Reg
,
Apos
,
Quot
,
Uml
,
Acute
,
Grave
,
Circ
,
Tilde
,
Szlig
,
Cedil
,
Ring
,
Nbsp
Cedil
,
Ring
,
Nbsp
};
};
DocSymbol
(
DocNode
*
parent
,
SymType
s
,
char
letter
=
'\0'
)
:
DocSymbol
(
DocNode
*
parent
,
SymType
s
,
char
letter
=
'\0'
)
:
...
@@ -506,6 +507,7 @@ class DocTitle : public CompAccept<DocTitle>, public DocNode
...
@@ -506,6 +507,7 @@ class DocTitle : public CompAccept<DocTitle>, public DocNode
public
:
public
:
DocTitle
(
DocNode
*
parent
)
:
m_parent
(
parent
)
{}
DocTitle
(
DocNode
*
parent
)
:
m_parent
(
parent
)
{}
void
parse
();
void
parse
();
void
parseFromString
(
const
QString
&
title
);
Kind
kind
()
const
{
return
Kind_Title
;
}
Kind
kind
()
const
{
return
Kind_Title
;
}
DocNode
*
parent
()
const
{
return
m_parent
;
}
DocNode
*
parent
()
const
{
return
m_parent
;
}
void
accept
(
DocVisitor
*
v
)
{
CompAccept
<
DocTitle
>::
accept
(
this
,
v
);
}
void
accept
(
DocVisitor
*
v
)
{
CompAccept
<
DocTitle
>::
accept
(
this
,
v
);
}
...
@@ -856,11 +858,12 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode
...
@@ -856,11 +858,12 @@ class DocSimpleSect : public CompAccept<DocSimpleSect>, public DocNode
enum
Type
enum
Type
{
{
Unknown
,
See
,
Return
,
Author
,
Authors
,
Version
,
Since
,
Date
,
Unknown
,
See
,
Return
,
Author
,
Authors
,
Version
,
Since
,
Date
,
Note
,
Warning
,
Pre
,
Post
,
Invar
,
Remark
,
Attention
,
User
Note
,
Warning
,
Pre
,
Post
,
Invar
,
Remark
,
Attention
,
User
,
Rcs
};
};
DocSimpleSect
(
DocNode
*
parent
,
Type
t
);
DocSimpleSect
(
DocNode
*
parent
,
Type
t
);
virtual
~
DocSimpleSect
();
virtual
~
DocSimpleSect
();
int
parse
(
bool
userTitle
);
int
parse
(
bool
userTitle
);
int
parseRcs
();
Kind
kind
()
const
{
return
Kind_SimpleSect
;
}
Kind
kind
()
const
{
return
Kind_SimpleSect
;
}
Type
type
()
const
{
return
m_type
;
}
Type
type
()
const
{
return
m_type
;
}
DocNode
*
parent
()
const
{
return
m_parent
;
}
DocNode
*
parent
()
const
{
return
m_parent
;
}
...
...
src/doctokenizer.h
View file @
6f118034
...
@@ -111,7 +111,7 @@ const char *tokToString(int token);
...
@@ -111,7 +111,7 @@ const char *tokToString(int token);
// operations on the scanner
// operations on the scanner
void
doctokenizerYYFindSections
(
const
char
*
input
,
PageInfo
*
pi
,
Definition
*
d
,
void
doctokenizerYYFindSections
(
const
char
*
input
,
PageInfo
*
pi
,
Definition
*
d
,
MemberGroup
*
mg
);
MemberGroup
*
mg
,
const
char
*
fileName
);
void
doctokenizerYYinit
(
const
char
*
input
,
const
char
*
fileName
);
void
doctokenizerYYinit
(
const
char
*
input
,
const
char
*
fileName
);
void
doctokenizerYYcleanup
();
void
doctokenizerYYcleanup
();
void
doctokenizerYYpushContext
();
void
doctokenizerYYpushContext
();
...
...
src/doctokenizer.l
View file @
6f118034
...
@@ -51,6 +51,7 @@ static MemberGroup *g_memberGroup;
...
@@ -51,6 +51,7 @@ static MemberGroup *g_memberGroup;
static QCString g_secLabel;
static QCString g_secLabel;
static QCString g_secTitle;
static QCString g_secTitle;
static SectionInfo::SectionType g_secType;
static SectionInfo::SectionType g_secType;
static QCString g_endMarker;
struct DocLexerContext
struct DocLexerContext
{
{
...
@@ -286,10 +287,10 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
...
@@ -286,10 +287,10 @@ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
LNKWORD1 ("::"|"#")?{SCOPEMASK}
LNKWORD1 ("::"|"#")?{SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile")
CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
WORD1 [^ \t\n\r\\@<>(){}&$#,.]+|"{"|"}"
WORD1 [^ \t\n\r\\@<>()
\[\]:;\?
{}&$#,.]+|"{"|"}"
WORD2 "."|","|"("|")"
WORD2 "."|","|"("|")"
|"["|"]"|":"|";"|"\?"
WORD1NQ [^ \t\n\r\\@<>(){}&$#,."]+
WORD1NQ [^ \t\n\r\\@<>()
\[\]:;\?
{}&$#,."]+
WORD2NQ "."|","|"("|")"
WORD2NQ "."|","|"("|")"
|"["|"]"|":"|";"|"\?"
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
...
@@ -325,6 +326,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
...
@@ -325,6 +326,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
%s St_SecLabel1
%s St_SecLabel1
%s St_SecLabel2
%s St_SecLabel2
%s St_SecTitle
%s St_SecTitle
%x St_SecSkip
%%
%%
<St_Para>\r /* skip carriage return */
<St_Para>\r /* skip carriage return */
...
@@ -383,9 +385,9 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
...
@@ -383,9 +385,9 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
}
}
<St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */
<St_Para>"$"{ID}":"[^\n$]+"$" { /* RCS tag */
QString tagName(yytext+1);
QString tagName(yytext+1);
int i=tagName.find(':');
int i
ndex
=tagName.find(':');
g_token->name = tagName.left(i);
g_token->name = tagName.left(i
ndex
);
g_token->text = tagName.mid(i
+1,tagName.length()-i
-2);
g_token->text = tagName.mid(i
ndex+1,tagName.length()-index
-2);
return TK_RCSTAG;
return TK_RCSTAG;
}
}
<St_Para,St_HtmlOnly>"$("{ID}")" { /* environment variable */
<St_Para,St_HtmlOnly>"$("{ID}")" { /* environment variable */
...
@@ -720,6 +722,41 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
...
@@ -720,6 +722,41 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
g_secType = SectionInfo::Paragraph;
g_secType = SectionInfo::Paragraph;
BEGIN(St_SecLabel2);
BEGIN(St_SecLabel2);
}
}
<St_Sections>{CMD}"verbatim" {
g_endMarker="endverbatim";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"htmlonly" {
g_endMarker="endhtmlonly";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"latexonly" {
g_endMarker="endlatexonly";
BEGIN(St_SecSkip);
}
<St_Sections>{CMD}"code" {
g_endMarker="endcode";
BEGIN(St_SecSkip);
}
<St_Sections>"<!--" {
g_endMarker="-->";
BEGIN(St_SecSkip);
}
<St_SecSkip>{CMD}{ID} {
if (strcmp(yytext+1,g_endMarker)==0)
{
BEGIN(St_Sections);
}
}
<St_SecSkip>"-->" {
if (strcmp(yytext,g_endMarker)==0)
{
BEGIN(St_Sections);
}
}
<St_SecSkip>[^a-z_A-Z0-9\-]+
<St_SecSkip>.
<St_SecSkip>\n
<St_Sections>.
<St_Sections>.
<St_Sections>\n
<St_Sections>\n
<St_SecLabel1>{LABELID} {
<St_SecLabel1>{LABELID} {
...
@@ -756,7 +793,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
...
@@ -756,7 +793,7 @@ LABELID [a-z_A-Z][a-z_A-Z0-9\-]*
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
void doctokenizerYYFindSections(const char *input,PageInfo *pi,Definition *d,
void doctokenizerYYFindSections(const char *input,PageInfo *pi,Definition *d,
MemberGroup *mg)
MemberGroup *mg
,const char *fileName
)
{
{
if (input==0) return;
if (input==0) return;
g_inputString = input;
g_inputString = input;
...
@@ -765,6 +802,7 @@ void doctokenizerYYFindSections(const char *input,PageInfo *pi,Definition *d,
...
@@ -765,6 +802,7 @@ void doctokenizerYYFindSections(const char *input,PageInfo *pi,Definition *d,
g_pageInfo = pi;
g_pageInfo = pi;
g_definition = d;
g_definition = d;
g_memberGroup = mg;
g_memberGroup = mg;
g_fileName = fileName;
BEGIN(St_Sections);
BEGIN(St_Sections);
doctokenizerYYlineno = 1;
doctokenizerYYlineno = 1;
doctokenizerYYlex();
doctokenizerYYlex();
...
...
src/dot.cpp
View file @
6f118034
...
@@ -33,6 +33,8 @@
...
@@ -33,6 +33,8 @@
//--------------------------------------------------------------------
//--------------------------------------------------------------------
static
const
int
maxCmdLine
=
4096
;
/*! mapping from protection levels to color names */
/*! mapping from protection levels to color names */
static
const
char
*
edgeColorMap
[]
=
static
const
char
*
edgeColorMap
[]
=
{
{
...
@@ -54,9 +56,12 @@ static const char *edgeStyleMap[] =
...
@@ -54,9 +56,12 @@ static const char *edgeStyleMap[] =
* site image map.
* site image map.
* \param t the stream to which the result is written.
* \param t the stream to which the result is written.
* \param mapName the name of the map file.
* \param mapName the name of the map file.
* \param urlOnly if FALSE the url field in the map contains an external
* references followed by a $ and then the URL.
* \returns TRUE if succesful.
* \returns TRUE if succesful.
*/
*/
static
bool
convertMapFile
(
QTextStream
&
t
,
const
char
*
mapName
)
static
bool
convertMapFile
(
QTextStream
&
t
,
const
char
*
mapName
,
bool
urlOnly
=
FALSE
)
{
{
QFile
f
(
mapName
);
QFile
f
(
mapName
);
if
(
!
f
.
open
(
IO_ReadOnly
))
if
(
!
f
.
open
(
IO_ReadOnly
))
...
@@ -93,6 +98,14 @@ static bool convertMapFile(QTextStream &t,const char *mapName)
...
@@ -93,6 +98,14 @@ static bool convertMapFile(QTextStream &t,const char *mapName)
x2
=
x1
;
x2
=
x1
;
x1
=
temp
;
x1
=
temp
;
}
}
if
(
urlOnly
)
{
t
<<
"<area href=
\"
"
<<
url
<<
"
\"
shape=
\"
rect
\"
coords=
\"
"
<<
x1
<<
","
<<
y1
<<
","
<<
x2
<<
","
<<
y2
<<
"
\"
"
<<
" alt=
\"\"
>"
<<
endl
;
}
else
// name and external reference are separated by a $
{
char
*
refPtr
=
url
;
char
*
refPtr
=
url
;
char
*
urlPtr
=
strchr
(
url
,
'$'
);
char
*
urlPtr
=
strchr
(
url
,
'$'
);
//printf("url=`%s'\n",url);
//printf("url=`%s'\n",url);
...
@@ -120,6 +133,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName)
...
@@ -120,6 +133,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName)
}
}
}
}
}
}
}
return
TRUE
;
return
TRUE
;
}
}
...
@@ -766,7 +780,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
...
@@ -766,7 +780,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
t
<<
"}"
<<
endl
;
t
<<
"}"
<<
endl
;
f
.
close
();
f
.
close
();
QCString
dotArgs
(
4096
);
QCString
dotArgs
(
maxCmdLine
);
dotArgs
.
sprintf
(
"-T%s
\"
%s
\"
-o
\"
%s
\"
"
,
dotArgs
.
sprintf
(
"-T%s
\"
%s
\"
-o
\"
%s
\"
"
,
imgExt
.
data
(),
dotName
.
data
(),
imgName
.
data
());
imgExt
.
data
(),
dotName
.
data
(),
imgName
.
data
());
//printf("Running: dot -T%s %s -o %s\n",imgExt.data(),dotName.data(),imgName.data());
//printf("Running: dot -T%s %s -o %s\n",imgExt.data(),dotName.data(),imgName.data());
...
@@ -1239,23 +1253,24 @@ static void findMaximalDotGraph(DotNode *root,
...
@@ -1239,23 +1253,24 @@ static void findMaximalDotGraph(DotNode *root,
)
)
{
{
int
minDistance
=
1
;
// min distance that shows only direct children.
int
minDistance
=
1
;
// min distance that shows only direct children.
int
curDistance
=
2
;
// current distance to try
int
curDistance
;
//=QMIN(2,maxDist)
; // current distance to try
int
maxDistance
=
maxDist
;
// max distance that show whole graph
int
maxDistance
=
maxDist
;
// max distance that show whole graph
int
width
=
0
;
int
width
=
0
;
int
height
=
0
;
int
height
=
0
;
int
maxDotGraphWidth
=
Config_getInt
(
"MAX_DOT_GRAPH_WIDTH"
);
int
maxDotGraphWidth
=
Config_getInt
(
"MAX_DOT_GRAPH_WIDTH"
);
int
maxDotGraphHeight
=
Config_getInt
(
"MAX_DOT_GRAPH_HEIGHT"
);
int
maxDotGraphHeight
=
Config_getInt
(
"MAX_DOT_GRAPH_HEIGHT"
);
int
lastFit
=
minDistance
;
// binary search for the maximal inheritance depth that fits in a reasonable
// binary search for the maximal inheritance depth that fits in a reasonable
// sized image (dimensions: Config_getInt("MAX_DOT_GRAPH_WIDTH"), Config_getInt("MAX_DOT_GRAPH_HEIGHT"))
// sized image (dimensions: Config_getInt("MAX_DOT_GRAPH_WIDTH"), Config_getInt("MAX_DOT_GRAPH_HEIGHT"))
if
(
maxDistance
>
1
)
while
(
minDistance
<=
maxDistance
)
{
do
{
{
curDistance
=
(
minDistance
+
maxDistance
)
/
2
;
writeDotGraph
(
root
,
format
,
baseName
,
lrRank
,
renderParents
,
writeDotGraph
(
root
,
format
,
baseName
,
lrRank
,
renderParents
,
curDistance
,
backArrows
);
curDistance
,
backArrows
);
QCString
dotArgs
(
4096
);
QCString
dotArgs
(
maxCmdLine
);
// create annotated dot file
// create annotated dot file
dotArgs
.
sprintf
(
"-Tdot
\"
%s.dot
\"
-o
\"
%s_tmp.dot
\"
"
,
baseName
.
data
(),
baseName
.
data
());
dotArgs
.
sprintf
(
"-Tdot
\"
%s.dot
\"
-o
\"
%s_tmp.dot
\"
"
,
baseName
.
data
(),
baseName
.
data
());
if
(
iSystem
(
Config_getString
(
"DOT_PATH"
)
+
"dot"
,
dotArgs
)
!=
0
)
if
(
iSystem
(
Config_getString
(
"DOT_PATH"
)
+
"dot"
,
dotArgs
)
!=
0
)
...
@@ -1277,26 +1292,24 @@ static void findMaximalDotGraph(DotNode *root,
...
@@ -1277,26 +1292,24 @@ static void findMaximalDotGraph(DotNode *root,
bool
graphFits
=
(
width
<
maxDotGraphWidth
&&
height
<
maxDotGraphHeight
);
bool
graphFits
=
(
width
<
maxDotGraphWidth
&&
height
<
maxDotGraphHeight
);
if
(
graphFits
)
// graph is small enough
if
(
graphFits
)
// graph is small enough
{
{
minDistance
=
curDistance
;
lastFit
=
curDistance
;
minDistance
=
curDistance
+
1
;
//printf("Image fits [%d-%d]\n",minDistance,maxDistance);
//printf("Image fits [%d-%d]\n",minDistance,maxDistance);
}
}
else
// graph does not fit anymore with curDistance
else
// graph does not fit anymore with curDistance
{
{
//printf("Image does not fit [%d-%d]\n",minDistance,maxDistance);
//printf("Image does not fit [%d-%d]\n",minDistance,maxDistance);
maxDistance
=
curDistance
;
maxDistance
=
curDistance
-
1
;
}
}
curDistance
=
minDistance
+
(
maxDistance
-
curDistance
)
/
2
;
//printf("curDistance=%d\n",curDistance);
}
while
((
maxDistance
-
minDistance
)
>
1
);
}
}
//printf("lastFit=%d\n",lastFit);
writeDotGraph
(
root
,
writeDotGraph
(
root
,
format
,
format
,
baseName
,
baseName
,
lrRank
||
(
minDistance
==
1
&&
width
>
Config_getInt
(
"MAX_DOT_GRAPH_WIDTH"
)),
lrRank
||
(
minDistance
==
1
&&
width
>
Config_getInt
(
"MAX_DOT_GRAPH_WIDTH"
)),
renderParents
,
renderParents
,
minDistance
,
lastFit
,
backArrows
backArrows
);
);
}
}
...
@@ -1357,7 +1370,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
...
@@ -1357,7 +1370,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
if
(
format
==
BITMAP
)
// run dot to create a bitmap image
if
(
format
==
BITMAP
)
// run dot to create a bitmap image
{
{
QCString
dotArgs
(
4096
);
QCString
dotArgs
(
maxCmdLine
);
QCString
imgExt
=
Config_getEnum
(
"DOT_IMAGE_FORMAT"
);
QCString
imgExt
=
Config_getEnum
(
"DOT_IMAGE_FORMAT"
);
QCString
imgName
=
baseName
+
"."
+
imgExt
;
QCString
imgName
=
baseName
+
"."
+
imgExt
;
dotArgs
.
sprintf
(
"-T%s
\"
%s.dot
\"
-o
\"
%s
\"
"
,
dotArgs
.
sprintf
(
"-T%s
\"
%s.dot
\"
-o
\"
%s
\"
"
,
...
@@ -1410,7 +1423,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
...
@@ -1410,7 +1423,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
}
}
else
if
(
format
==
EPS
)
// run dot to create a .eps image
else
if
(
format
==
EPS
)
// run dot to create a .eps image
{
{
QCString
dotArgs
(
4096
);
QCString
dotArgs
(
maxCmdLine
);
dotArgs
.
sprintf
(
"-Tps
\"
%s.dot
\"
-o
\"
%s.eps
\"
"
,
baseName
.
data
(),
baseName
.
data
());
dotArgs
.
sprintf
(
"-Tps
\"
%s.dot
\"
-o
\"
%s.eps
\"
"
,
baseName
.
data
(),
baseName
.
data
());
if
(
iSystem
(
Config_getString
(
"DOT_PATH"
)
+
"dot"
,
dotArgs
)
!=
0
)
if
(
iSystem
(
Config_getString
(
"DOT_PATH"
)
+
"dot"
,
dotArgs
)
!=
0
)
{
{
...
@@ -1427,7 +1440,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
...
@@ -1427,7 +1440,7 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
}
}
if
(
Config_getBool
(
"USE_PDFLATEX"
))
if
(
Config_getBool
(
"USE_PDFLATEX"
))
{
{
QCString
epstopdfArgs
(
4096
);
QCString
epstopdfArgs
(
maxCmdLine
);
epstopdfArgs
.
sprintf
(
"
\"
%s.eps
\"
--outfile=
\"
%s.pdf
\"
"
,
epstopdfArgs
.
sprintf
(
"
\"
%s.eps
\"
--outfile=
\"
%s.pdf
\"
"
,
baseName
.
data
(),
baseName
.
data
());
baseName
.
data
(),
baseName
.
data
());
if
(
iSystem
(
"epstopdf"
,
epstopdfArgs
,
TRUE
)
!=
0
)
if
(
iSystem
(
"epstopdf"
,
epstopdfArgs
,
TRUE
)
!=
0
)
...
@@ -1594,7 +1607,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
...
@@ -1594,7 +1607,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
if
(
format
==
BITMAP
)
if
(
format
==
BITMAP
)
{
{
// run dot to create a bitmap image
// run dot to create a bitmap image
QCString
dotArgs
(
4096
);
QCString
dotArgs
(
maxCmdLine
);
QCString
imgExt
=
Config_getEnum
(
"DOT_IMAGE_FORMAT"
);
QCString
imgExt
=
Config_getEnum
(
"DOT_IMAGE_FORMAT"
);
QCString
imgName
=
baseName
+
"."
+
imgExt
;
QCString
imgName
=
baseName
+
"."
+
imgExt
;
dotArgs
.
sprintf
(
"-T%s
\"
%s.dot
\"
-o
\"
%s
\"
"
,
dotArgs
.
sprintf
(
"-T%s
\"
%s.dot
\"
-o
\"
%s
\"
"
,
...
@@ -1640,7 +1653,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
...
@@ -1640,7 +1653,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
else
if
(
format
==
EPS
)
else
if
(
format
==
EPS
)
{
{
// run dot to create a .eps image
// run dot to create a .eps image
QCString
dotArgs
(
4096
);
QCString
dotArgs
(
maxCmdLine
);
dotArgs
.
sprintf
(
"-Tps
\"
%s.dot
\"
-o
\"
%s.eps
\"
"
,
dotArgs
.
sprintf
(
"-Tps
\"
%s.dot
\"
-o
\"
%s.eps
\"
"
,
baseName
.
data
(),
baseName
.
data
());
baseName
.
data
(),
baseName
.
data
());
if
(
iSystem
(
Config_getString
(
"DOT_PATH"
)
+
"dot"
,
dotArgs
)
!=
0
)
if
(
iSystem
(
Config_getString
(
"DOT_PATH"
)
+
"dot"
,
dotArgs
)
!=
0
)
...
@@ -1658,7 +1671,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
...
@@ -1658,7 +1671,7 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
}
}
if
(
Config_getBool
(
"USE_PDFLATEX"
))
if
(
Config_getBool
(
"USE_PDFLATEX"
))
{
{
QCString
epstopdfArgs
(
4096
);
QCString
epstopdfArgs
(
maxCmdLine
);
epstopdfArgs
.
sprintf
(
"
\"
%s.eps
\"
--outfile=
\"
%s.pdf
\"
"
,
epstopdfArgs
.
sprintf
(
"
\"
%s.eps
\"
--outfile=
\"
%s.pdf
\"
"
,
baseName
.
data
(),
baseName
.
data
());
baseName
.
data
(),
baseName
.
data
());
if
(
iSystem
(
"epstopdf"
,
epstopdfArgs
,
TRUE
)
!=
0
)
if
(
iSystem
(
"epstopdf"
,
epstopdfArgs
,
TRUE
)
!=
0
)
...
@@ -1747,7 +1760,7 @@ void generateGraphLegend(const char *path)
...
@@ -1747,7 +1760,7 @@ void generateGraphLegend(const char *path)
QDir
::
setCurrent
(
d
.
absPath
());
QDir
::
setCurrent
(
d
.
absPath
());
// run dot to generate the a bitmap image from the graph
// run dot to generate the a bitmap image from the graph
QCString
dotArgs
(
4096
);
QCString
dotArgs
(
maxCmdLine
);
QCString
imgExt
=
Config_getEnum
(
"DOT_IMAGE_FORMAT"
);
QCString
imgExt
=
Config_getEnum
(
"DOT_IMAGE_FORMAT"
);
QCString
imgName
=
"graph_legend."
+
imgExt
;
QCString
imgName
=
"graph_legend."
+
imgExt
;
dotArgs
.
sprintf
(
"-T%s graph_legend.dot -o %s"
,
imgExt
.
data
(),
imgName
.
data
());
dotArgs
.
sprintf
(
"-T%s graph_legend.dot -o %s"
,
imgExt
.
data
(),
imgName
.
data
());
...
@@ -1789,7 +1802,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
...
@@ -1789,7 +1802,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
// outf.writeBlock(a.data(),s);
// outf.writeBlock(a.data(),s);
//}
//}
QCString
dotArgs
(
4096
);
QCString
dotArgs
(
maxCmdLine
);
QCString
imgExt
=
Config_getEnum
(
"DOT_IMAGE_FORMAT"
);
QCString
imgExt
=
Config_getEnum
(
"DOT_IMAGE_FORMAT"
);
QCString
imgName
=
(
QCString
)
outFile
+
"."
+
imgExt
;
QCString
imgName
=
(
QCString
)
outFile
+
"."
+
imgExt
;
if
(
format
==
BITMAP
)
if
(
format
==
BITMAP
)
...
@@ -1812,7 +1825,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
...
@@ -1812,7 +1825,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
// Added by Nils Strom
// Added by Nils Strom
if
(
(
format
==
EPS
)
&&
(
Config_getBool
(
"USE_PDFLATEX"
))
)
if
(
(
format
==
EPS
)
&&
(
Config_getBool
(
"USE_PDFLATEX"
))
)
{
{
QCString
epstopdfArgs
(
4096
);
QCString
epstopdfArgs
(
maxCmdLine
);
epstopdfArgs
.
sprintf
(
"
\"
%s.eps
\"
--outfile=
\"
%s.pdf
\"
"
,
epstopdfArgs
.
sprintf
(
"
\"
%s.eps
\"
--outfile=
\"
%s.pdf
\"
"
,
outFile
,
outFile
);
outFile
,
outFile
);
if
(
iSystem
(
"epstopdf"
,
epstopdfArgs
,
TRUE
)
!=
0
)
if
(
iSystem
(
"epstopdf"
,
epstopdfArgs
,
TRUE
)
!=
0
)
...
@@ -1826,3 +1839,43 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
...
@@ -1826,3 +1839,43 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
QDir
::
setCurrent
(
oldDir
);
QDir
::
setCurrent
(
oldDir
);
}
}
/*! Marco Dalla Gasperina [marcodg@attbi.com] added this to allow
* dotfiles to generate image maps.
* \param inFile just the basename part of the filename
* \param outDir output directory
* \returns a string which is the HTML image map (without the \<map\>\</map\>)
*/
QString
getDotImageMapFromFile
(
const
QString
&
inFile
,
const
QString
&
outDir
)
{
QString
outFile
=
inFile
+
".map"
;
// chdir to the output dir, so dot can find the font file.
QCString
oldDir
=
convertToQCString
(
QDir
::
currentDirPath
());
// go to the html output directory (i.e. path)
QDir
::
setCurrent
(
outDir
);
//printf("Going to dir %s\n",QDir::currentDirPath().data());
QCString
dotArgs
(
maxCmdLine
);
dotArgs
.
sprintf
(
"-Timap
\"
%s
\"
-o
\"
%s
\"
"
,
inFile
.
data
(),
outFile
.
data
());
QCString
dotExe
=
Config_getString
(
"DOT_PATH"
)
+
"dot"
;
//printf("Running: %s %s\n",dotExe.data(),dotArgs.data());
if
(
iSystem
(
dotExe
,
dotArgs
)
!=
0
)
{
err
(
"Problems running dot. Check your installation!
\n
"
);
QDir
::
setCurrent
(
oldDir
);
return
""
;
}
QString
result
;
QTextOStream
tmpout
(
&
result
);
convertMapFile
(
tmpout
,
outFile
,
TRUE
);
QDir
().
remove
(
outFile
);
//printf("result=%s\n",result.data());
QDir
::
setCurrent
(
oldDir
);
return
result
;
}
// end MDG mods
src/dot.h
View file @
6f118034
...
@@ -173,5 +173,7 @@ class DotInclDepGraph
...
@@ -173,5 +173,7 @@ class DotInclDepGraph
void
generateGraphLegend
(
const
char
*
path
);
void
generateGraphLegend
(
const
char
*
path
);
void
writeDotGraphFromFile
(
const
char
*
inFile
,
const
char
*
outDir
,
void
writeDotGraphFromFile
(
const
char
*
inFile
,
const
char
*
outDir
,
const
char
*
outFile
,
GraphOutputFormat
format
);
const
char
*
outFile
,
GraphOutputFormat
format
);
QString
getDotImageMapFromFile
(
const
QString
&
inFile
,
const
QString
&
outDir
);
#endif
#endif
src/doxygen.cpp
View file @
6f118034
...
@@ -103,8 +103,9 @@ StringDict Doxygen::tagDestinationDict(257); // all tag locations
...
@@ -103,8 +103,9 @@ StringDict Doxygen::tagDestinationDict(257); // all tag locations
// a member group
// a member group
QDict
<
void
>
Doxygen
::
expandAsDefinedDict
(
257
);
// all macros that should be expanded
QDict
<
void
>
Doxygen
::
expandAsDefinedDict
(
257
);
// all macros that should be expanded
QIntDict
<
QCString
>
Doxygen
::
memberHeaderDict
(
1009
);
// dictionary of the member groups heading
QIntDict
<
MemberGroupInfo
>
Doxygen
::
memGrpInfoDict
(
1009
);
// dictionary of the member groups heading
QIntDict
<
QCString
>
Doxygen
::
memberDocDict
(
1009
);
// dictionary of the member groups heading
//QIntDict<QCString> Doxygen::memberHeaderDict(1009); // dictionary of the member groups heading
//QIntDict<QCString> Doxygen::memberDocDict(1009); // dictionary of the member groups heading
PageInfo
*
Doxygen
::
mainPage
=
0
;
PageInfo
*
Doxygen
::
mainPage
=
0
;
QTextStream
Doxygen
::
tagFile
;
QTextStream
Doxygen
::
tagFile
;
...
@@ -173,10 +174,8 @@ void statistics()
...
@@ -173,10 +174,8 @@ void statistics()
compoundKeywordDict
.
statistics
();
compoundKeywordDict
.
statistics
();
fprintf
(
stderr
,
"--- expandAsDefinedDict stats ----
\n
"
);
fprintf
(
stderr
,
"--- expandAsDefinedDict stats ----
\n
"
);
Doxygen
::
expandAsDefinedDict
.
statistics
();
Doxygen
::
expandAsDefinedDict
.
statistics
();
fprintf
(
stderr
,
"--- memberHeaderDict stats ----
\n
"
);
fprintf
(
stderr
,
"--- memGrpInfoDict stats ----
\n
"
);
Doxygen
::
memberHeaderDict
.
statistics
();
Doxygen
::
memGrpInfoDict
.
statistics
();
fprintf
(
stderr
,
"--- memberDocDict stats ----
\n
"
);
Doxygen
::
memberDocDict
.
statistics
();
}
}
...
@@ -1061,10 +1060,13 @@ static void findUsingDirectives(Entry *root)
...
@@ -1061,10 +1060,13 @@ static void findUsingDirectives(Entry *root)
static
void
findUsingDeclarations
(
Entry
*
root
)
static
void
findUsingDeclarations
(
Entry
*
root
)
{
{
if
(
root
->
section
==
Entry
::
USINGDECL_SEC
)
if
(
root
->
section
==
Entry
::
USINGDECL_SEC
&&
!
(
root
->
parent
->
section
&
Entry
::
COMPOUND_MASK
)
// not a class/struct member
)
{
{
//printf("Found using declaration %s at line %d of %s\n",
printf
(
"Found using declaration %s at line %d of %s inside section %x
\n
"
,
// root->name.data(),root->startLine,root->fileName.data());
root
->
name
.
data
(),
root
->
startLine
,
root
->
fileName
.
data
(),
root
->
parent
->
section
);
bool
ambig
;
bool
ambig
;
if
(
!
root
->
name
.
isEmpty
())
if
(
!
root
->
name
.
isEmpty
())
{
{
...
@@ -1142,6 +1144,88 @@ static void findUsingDeclarations(Entry *root)
...
@@ -1142,6 +1144,88 @@ static void findUsingDeclarations(Entry *root)
//----------------------------------------------------------------------
//----------------------------------------------------------------------
static
void
findUsingDeclImports
(
Entry
*
root
)
{
if
(
root
->
section
==
Entry
::
USINGDECL_SEC
&&
(
root
->
parent
->
section
&
Entry
::
COMPOUND_MASK
)
// in a class/struct member
)
{
//printf("Found using declaration %s at line %d of %s inside section %x\n",
// root->name.data(),root->startLine,root->fileName.data(),
// root->parent->section);
QCString
fullName
=
removeRedundantWhiteSpace
(
root
->
parent
->
name
);
fullName
=
stripAnonymousNamespaceScope
(
fullName
);
fullName
=
stripTemplateSpecifiersFromScope
(
fullName
);
ClassDef
*
cd
=
getClass
(
fullName
);
if
(
cd
)
{
//printf("found class %s\n",cd->name().data());
int
i
=
root
->
name
.
find
(
"::"
);
if
(
i
!=-
1
)
{
QCString
scope
=
root
->
name
.
left
(
i
);
QCString
memName
=
root
->
name
.
right
(
root
->
name
.
length
()
-
i
-
2
);
ClassDef
*
bcd
=
getResolvedClass
(
cd
,
scope
);
if
(
bcd
)
{
//printf("found class %s\n",bcd->name().data());
MemberNameInfoSDict
*
mndict
=
bcd
->
memberNameInfoSDict
();
MemberNameInfo
*
mni
=
mndict
->
find
(
memName
);
if
(
mni
)
{
MemberNameInfoIterator
mnii
(
*
mni
);
MemberInfo
*
mi
;
for
(
;
(
mi
=
mnii
.
current
())
;
++
mnii
)
{
MemberDef
*
md
=
mi
->
memberDef
;
if
(
md
&&
md
->
protection
()
!=
Private
)
{
//printf("found member %s\n",mni->memberName());
MemberDef
*
newMd
=
new
MemberDef
(
root
->
fileName
,
root
->
startLine
,
md
->
typeString
(),
memName
,
md
->
argsString
(),
md
->
excpString
(),
root
->
protection
,
root
->
virt
,
md
->
isStatic
(),
FALSE
,
md
->
memberType
(),
md
->
templateArguments
(),
md
->
argumentList
()
);
cd
->
insertMember
(
newMd
);
newMd
->
setMemberClass
(
cd
);
if
(
!
root
->
doc
.
isEmpty
()
||
!
root
->
brief
.
isEmpty
())
{
newMd
->
setDocumentation
(
root
->
doc
,
root
->
docFile
,
root
->
docLine
);
newMd
->
setBriefDescription
(
root
->
brief
,
root
->
briefFile
,
root
->
briefLine
);
}
else
{
newMd
->
setDocumentation
(
md
->
documentation
(),
md
->
docFile
(),
md
->
docLine
());
newMd
->
setBriefDescription
(
md
->
briefDescription
(),
md
->
briefFile
(),
md
->
briefLine
());
}
newMd
->
setDefinition
(
md
->
definition
());
newMd
->
setBitfields
(
md
->
bitfieldString
());
newMd
->
addSectionsToDefinition
(
root
->
anchors
);
newMd
->
setBodySegment
(
md
->
getStartBodyLine
(),
md
->
getEndBodyLine
());
newMd
->
setBodyDef
(
md
->
getBodyDef
());
newMd
->
setInitializer
(
md
->
initializer
());
newMd
->
setMaxInitLines
(
md
->
initializerLines
());
newMd
->
setMemberGroupId
(
root
->
mGrpId
);
newMd
->
setMemberSpecifiers
(
md
->
getMemberSpecifiers
());
}
}
}
}
}
}
}
EntryListIterator
eli
(
*
root
->
sublist
);
Entry
*
e
;
for
(;(
e
=
eli
.
current
());
++
eli
)
{
findUsingDeclImports
(
e
);
}
}
//----------------------------------------------------------------------
static
MemberDef
*
addVariableToClass
(
static
MemberDef
*
addVariableToClass
(
Entry
*
root
,
Entry
*
root
,
ClassDef
*
cd
,
ClassDef
*
cd
,
...
@@ -7702,6 +7786,9 @@ void parseInput()
...
@@ -7702,6 +7786,9 @@ void parseInput()
findMemberDocumentation
(
root
);
// may introduce new members !
findMemberDocumentation
(
root
);
// may introduce new members !
transferRelatedFunctionDocumentation
();
transferRelatedFunctionDocumentation
();
msg
(
"Searching for members imported via using declarations...
\n
"
);
findUsingDeclImports
(
root
);
msg
(
"Building page list...
\n
"
);
msg
(
"Building page list...
\n
"
);
buildPageList
(
root
);
buildPageList
(
root
);
...
@@ -7833,7 +7920,7 @@ void generateOutput()
...
@@ -7833,7 +7920,7 @@ void generateOutput()
msg
(
"Resolving user defined references...
\n
"
);
msg
(
"Resolving user defined references...
\n
"
);
resolveUserReferences
();
resolveUserReferences
();
msg
(
"Finding anchor
and section
in the documentation...
\n
"
);
msg
(
"Finding anchor
s and sections
in the documentation...
\n
"
);
findSectionsInDocumentation
();
findSectionsInDocumentation
();
msg
(
"Generating index page...
\n
"
);
msg
(
"Generating index page...
\n
"
);
...
...
src/doxygen.h
View file @
6f118034
...
@@ -87,8 +87,9 @@ class Doxygen
...
@@ -87,8 +87,9 @@ class Doxygen
static
FormulaDict
formulaNameDict
;
static
FormulaDict
formulaNameDict
;
static
StringDict
tagDestinationDict
;
static
StringDict
tagDestinationDict
;
static
StringDict
aliasDict
;
static
StringDict
aliasDict
;
static
QIntDict
<
QCString
>
memberHeaderDict
;
// dictionary of the member groups heading
static
QIntDict
<
MemberGroupInfo
>
memGrpInfoDict
;
static
QIntDict
<
QCString
>
memberDocDict
;
// dictionary of the member groups heading
//static QIntDict<QCString> memberHeaderDict; // dictionary of the member groups heading
//static QIntDict<QCString> memberDocDict; // dictionary of the member groups heading
static
QDict
<
void
>
expandAsDefinedDict
;
static
QDict
<
void
>
expandAsDefinedDict
;
static
NamespaceDef
*
globalScope
;
static
NamespaceDef
*
globalScope
;
static
QDict
<
RefList
>
*
specialLists
;
// array of special lists: todo, test, bug, deprecated ...
static
QDict
<
RefList
>
*
specialLists
;
// array of special lists: todo, test, bug, deprecated ...
...
...
src/entry.h
View file @
6f118034
...
@@ -136,11 +136,9 @@ struct Grouping
...
@@ -136,11 +136,9 @@ struct Grouping
GROUPING_LOWEST
,
//!< membership in group was defined via \@weakgroup \@{ \@}
GROUPING_LOWEST
,
//!< membership in group was defined via \@weakgroup \@{ \@}
GROUPING_AUTO_ADD
,
//!< membership in group was defined via \@add[to]group \@{ \@}
GROUPING_AUTO_ADD
,
//!< membership in group was defined via \@add[to]group \@{ \@}
GROUPING_AUTO_DEF
,
//!< membership in group was defined via \@defgroup \@{ \@}
GROUPING_AUTO_DEF
,
//!< membership in group was defined via \@defgroup \@{ \@}
GROUPING_AUTO_HIGHEST
=
GROUPING_AUTO_HIGHEST
=
GROUPING_AUTO_DEF
,
GROUPING_AUTO_DEF
,
GROUPING_INGROUP
,
//!< membership in group was defined by \@ingroup
GROUPING_INGROUP
,
//!< membership in group was defined by \@ingroup
GROUPING_HIGHEST
=
GROUPING_HIGHEST
=
GROUPING_INGROUP
GROUPING_INGROUP
};
};
static
const
char
*
getGroupPriName
(
GroupPri_t
priority
)
static
const
char
*
getGroupPriName
(
GroupPri_t
priority
)
...
...
src/filedef.cpp
View file @
6f118034
...
@@ -100,7 +100,7 @@ void FileDef::distributeMemberGroupDocumentation()
...
@@ -100,7 +100,7 @@ void FileDef::distributeMemberGroupDocumentation()
void
FileDef
::
findSectionsInDocumentation
()
void
FileDef
::
findSectionsInDocumentation
()
{
{
docFindSections
(
documentation
(),
0
,
this
,
0
);
docFindSections
(
documentation
(),
0
,
this
,
0
,
docFile
()
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
...
...
src/groupdef.cpp
View file @
6f118034
...
@@ -106,7 +106,7 @@ void GroupDef::distributeMemberGroupDocumentation()
...
@@ -106,7 +106,7 @@ void GroupDef::distributeMemberGroupDocumentation()
void
GroupDef
::
findSectionsInDocumentation
()
void
GroupDef
::
findSectionsInDocumentation
()
{
{
docFindSections
(
documentation
(),
0
,
this
,
0
);
docFindSections
(
documentation
(),
0
,
this
,
0
,
docFile
()
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
...
...
src/htmldocvisitor.cpp
View file @
6f118034
...
@@ -91,6 +91,8 @@ void HtmlDocVisitor::visit(DocSymbol *s)
...
@@ -91,6 +91,8 @@ void HtmlDocVisitor::visit(DocSymbol *s)
case
DocSymbol
:
:
Hash
:
m_t
<<
"#"
;
break
;
case
DocSymbol
:
:
Hash
:
m_t
<<
"#"
;
break
;
case
DocSymbol
:
:
Percent
:
m_t
<<
"%"
;
break
;
case
DocSymbol
:
:
Percent
:
m_t
<<
"%"
;
break
;
case
DocSymbol
:
:
Copy
:
m_t
<<
"©"
;
break
;
case
DocSymbol
:
:
Copy
:
m_t
<<
"©"
;
break
;
case
DocSymbol
:
:
Tm
:
m_t
<<
"&tm;"
;
break
;
case
DocSymbol
:
:
Reg
:
m_t
<<
"®"
;
break
;
case
DocSymbol
:
:
Apos
:
m_t
<<
"'"
;
break
;
case
DocSymbol
:
:
Apos
:
m_t
<<
"'"
;
break
;
case
DocSymbol
:
:
Quot
:
m_t
<<
"
\"
"
;
break
;
case
DocSymbol
:
:
Quot
:
m_t
<<
"
\"
"
;
break
;
case
DocSymbol
:
:
Uml
:
m_t
<<
"&"
<<
s
->
letter
()
<<
"uml;"
;
break
;
case
DocSymbol
:
:
Uml
:
m_t
<<
"&"
<<
s
->
letter
()
<<
"uml;"
;
break
;
...
@@ -364,11 +366,12 @@ void HtmlDocVisitor::visitPre(DocSimpleSect *s)
...
@@ -364,11 +366,12 @@ void HtmlDocVisitor::visitPre(DocSimpleSect *s)
case
DocSimpleSect
:
:
Attention
:
case
DocSimpleSect
:
:
Attention
:
m_t
<<
theTranslator
->
trAttention
();
break
;
m_t
<<
theTranslator
->
trAttention
();
break
;
case
DocSimpleSect
:
:
User
:
break
;
case
DocSimpleSect
:
:
User
:
break
;
case
DocSimpleSect
:
:
Rcs
:
break
;
case
DocSimpleSect
:
:
Unknown
:
break
;
case
DocSimpleSect
:
:
Unknown
:
break
;
}
}
// special case 1: user defined title
// special case 1: user defined title
if
(
s
->
type
()
!=
DocSimpleSect
::
User
)
if
(
s
->
type
()
!=
DocSimpleSect
::
User
&&
s
->
type
()
!=
DocSimpleSect
::
Rcs
)
{
{
m_t
<<
":</b></dt><dd>"
;
m_t
<<
":</b></dt><dd>"
;
}
}
...
@@ -644,9 +647,13 @@ void HtmlDocVisitor::visitPre(DocDotFile *df)
...
@@ -644,9 +647,13 @@ void HtmlDocVisitor::visitPre(DocDotFile *df)
QString
outDir
=
Config_getString
(
"HTML_OUTPUT"
);
QString
outDir
=
Config_getString
(
"HTML_OUTPUT"
);
writeDotGraphFromFile
(
df
->
file
(),
outDir
,
baseName
,
BITMAP
);
writeDotGraphFromFile
(
df
->
file
(),
outDir
,
baseName
,
BITMAP
);
m_t
<<
"<div align=
\"
center
\"
>"
<<
endl
;
m_t
<<
"<div align=
\"
center
\"
>"
<<
endl
;
QString
mapName
=
baseName
+
".map"
;
QString
mapFile
=
df
->
file
()
+
".map"
;
m_t
<<
"<img src=
\"
"
<<
baseName
<<
"."
m_t
<<
"<img src=
\"
"
<<
baseName
<<
"."
<<
Config_getEnum
(
"DOT_IMAGE_FORMAT"
)
<<
"
\"
alt=
\"
"
<<
Config_getEnum
(
"DOT_IMAGE_FORMAT"
)
<<
"
\"
alt=
\"
"
<<
baseName
<<
"
\"
>"
<<
endl
;
<<
baseName
<<
"
\"
border=
\"
0
\"
usemap=
\"
#"
<<
mapName
<<
"
\"
>"
<<
endl
;
QString
imap
=
getDotImageMapFromFile
(
df
->
file
(),
outDir
);
m_t
<<
"<map name=
\"
"
<<
mapName
<<
"
\"
>"
<<
imap
<<
"</map>"
<<
endl
;
if
(
df
->
hasCaption
())
if
(
df
->
hasCaption
())
{
{
m_t
<<
"<p><strong>"
;
m_t
<<
"<p><strong>"
;
...
...
src/latexdocvisitor.cpp
View file @
6f118034
...
@@ -117,6 +117,8 @@ void LatexDocVisitor::visit(DocSymbol *s)
...
@@ -117,6 +117,8 @@ void LatexDocVisitor::visit(DocSymbol *s)
case
DocSymbol
:
:
Hash
:
m_t
<<
"
\\
#"
;
break
;
case
DocSymbol
:
:
Hash
:
m_t
<<
"
\\
#"
;
break
;
case
DocSymbol
:
:
Percent
:
m_t
<<
"
\\
%"
;
break
;
case
DocSymbol
:
:
Percent
:
m_t
<<
"
\\
%"
;
break
;
case
DocSymbol
:
:
Copy
:
m_t
<<
"
\\
copyright"
;
break
;
case
DocSymbol
:
:
Copy
:
m_t
<<
"
\\
copyright"
;
break
;
case
DocSymbol
:
:
Tm
:
m_t
<<
"
\\
texttrademark"
;
break
;
case
DocSymbol
:
:
Reg
:
m_t
<<
"
\\
textregistered"
;
break
;
case
DocSymbol
:
:
Apos
:
m_t
<<
"'"
;
break
;
case
DocSymbol
:
:
Apos
:
m_t
<<
"'"
;
break
;
case
DocSymbol
:
:
Quot
:
m_t
<<
"''"
;
break
;
case
DocSymbol
:
:
Quot
:
m_t
<<
"''"
;
break
;
case
DocSymbol
:
:
Uml
:
case
DocSymbol
:
:
Uml
:
...
@@ -406,11 +408,12 @@ void LatexDocVisitor::visitPre(DocSimpleSect *s)
...
@@ -406,11 +408,12 @@ void LatexDocVisitor::visitPre(DocSimpleSect *s)
case
DocSimpleSect
:
:
Attention
:
case
DocSimpleSect
:
:
Attention
:
m_t
<<
theTranslator
->
trAttention
();
break
;
m_t
<<
theTranslator
->
trAttention
();
break
;
case
DocSimpleSect
:
:
User
:
break
;
case
DocSimpleSect
:
:
User
:
break
;
case
DocSimpleSect
:
:
Rcs
:
break
;
case
DocSimpleSect
:
:
Unknown
:
break
;
case
DocSimpleSect
:
:
Unknown
:
break
;
}
}
// special case 1: user defined title
// special case 1: user defined title
if
(
s
->
type
()
!=
DocSimpleSect
::
User
)
if
(
s
->
type
()
!=
DocSimpleSect
::
User
&&
s
->
type
()
!=
DocSimpleSect
::
Rcs
)
{
{
m_t
<<
":]"
;
m_t
<<
":]"
;
}
}
...
@@ -729,8 +732,13 @@ void LatexDocVisitor::visitPre(DocDotFile *df)
...
@@ -729,8 +732,13 @@ void LatexDocVisitor::visitPre(DocDotFile *df)
{
{
baseName
=
baseName
.
left
(
baseName
.
length
()
-
4
);
baseName
=
baseName
.
left
(
baseName
.
length
()
-
4
);
}
}
if
(
baseName
.
right
(
4
)
==
".dot"
)
{
baseName
=
baseName
.
left
(
baseName
.
length
()
-
4
);
}
QString
outDir
=
Config_getString
(
"LATEX_OUTPUT"
);
QString
outDir
=
Config_getString
(
"LATEX_OUTPUT"
);
writeDotGraphFromFile
(
df
->
file
(),
outDir
,
baseName
,
EPS
);
QString
name
=
df
->
file
();
writeDotGraphFromFile
(
name
,
outDir
,
baseName
,
EPS
);
if
(
df
->
hasCaption
())
if
(
df
->
hasCaption
())
{
{
m_t
<<
"
\\
begin{figure}[H]"
<<
endl
;
m_t
<<
"
\\
begin{figure}[H]"
<<
endl
;
...
...
src/latexgen.cpp
View file @
6f118034
...
@@ -246,6 +246,7 @@ static void writeDefaultHeaderPart1(QTextStream &t)
...
@@ -246,6 +246,7 @@ static void writeDefaultHeaderPart1(QTextStream &t)
"
\\
usepackage{graphicx}
\n
"
"
\\
usepackage{graphicx}
\n
"
"
\\
usepackage{multicol}
\n
"
"
\\
usepackage{multicol}
\n
"
"
\\
usepackage{float}
\n
"
"
\\
usepackage{float}
\n
"
"
\\
usepackage{textcomp}
\n
"
"
\\
usepackage{alltt}
\n
"
;
"
\\
usepackage{alltt}
\n
"
;
if
(
Config_getBool
(
"PDF_HYPERLINKS"
))
if
(
Config_getBool
(
"PDF_HYPERLINKS"
))
{
{
...
...
src/mandocvisitor.cpp
View file @
6f118034
...
@@ -80,7 +80,9 @@ void ManDocVisitor::visit(DocSymbol *s)
...
@@ -80,7 +80,9 @@ void ManDocVisitor::visit(DocSymbol *s)
case
DocSymbol
:
:
Dollar
:
m_t
<<
"$"
;
break
;
case
DocSymbol
:
:
Dollar
:
m_t
<<
"$"
;
break
;
case
DocSymbol
:
:
Hash
:
m_t
<<
"#"
;
break
;
case
DocSymbol
:
:
Hash
:
m_t
<<
"#"
;
break
;
case
DocSymbol
:
:
Percent
:
m_t
<<
"%"
;
break
;
case
DocSymbol
:
:
Percent
:
m_t
<<
"%"
;
break
;
case
DocSymbol
:
:
Copy
:
m_t
<<
"(c)"
;
break
;
case
DocSymbol
:
:
Copy
:
m_t
<<
"(C)"
;
break
;
case
DocSymbol
:
:
Tm
:
m_t
<<
"(TM)"
;
break
;
case
DocSymbol
:
:
Reg
:
m_t
<<
"(R)"
;
break
;
case
DocSymbol
:
:
Apos
:
m_t
<<
"'"
;
break
;
case
DocSymbol
:
:
Apos
:
m_t
<<
"'"
;
break
;
case
DocSymbol
:
:
Quot
:
m_t
<<
"''"
;
break
;
case
DocSymbol
:
:
Quot
:
m_t
<<
"''"
;
break
;
case
DocSymbol
:
:
Uml
:
m_t
<<
s
->
letter
()
<<
"
\\
*(4"
;
break
;
case
DocSymbol
:
:
Uml
:
m_t
<<
s
->
letter
()
<<
"
\\
*(4"
;
break
;
...
@@ -379,11 +381,12 @@ void ManDocVisitor::visitPre(DocSimpleSect *s)
...
@@ -379,11 +381,12 @@ void ManDocVisitor::visitPre(DocSimpleSect *s)
case
DocSimpleSect
:
:
Attention
:
case
DocSimpleSect
:
:
Attention
:
m_t
<<
theTranslator
->
trAttention
();
break
;
m_t
<<
theTranslator
->
trAttention
();
break
;
case
DocSimpleSect
:
:
User
:
break
;
case
DocSimpleSect
:
:
User
:
break
;
case
DocSimpleSect
:
:
Rcs
:
break
;
case
DocSimpleSect
:
:
Unknown
:
break
;
case
DocSimpleSect
:
:
Unknown
:
break
;
}
}
// special case 1: user defined title
// special case 1: user defined title
if
(
s
->
type
()
!=
DocSimpleSect
::
User
)
if
(
s
->
type
()
!=
DocSimpleSect
::
User
&&
s
->
type
()
!=
DocSimpleSect
::
Rcs
)
{
{
m_t
<<
":
\\
fP"
<<
endl
;
m_t
<<
":
\\
fP"
<<
endl
;
m_t
<<
".RS 4"
<<
endl
;
m_t
<<
".RS 4"
<<
endl
;
...
...
src/memberdef.cpp
View file @
6f118034
...
@@ -567,10 +567,11 @@ bool MemberDef::isBriefSectionVisible() const
...
@@ -567,10 +567,11 @@ bool MemberDef::isBriefSectionVisible() const
// "", //getFileDef()->name().data(),
// "", //getFileDef()->name().data(),
// argsString());
// argsString());
QCString
*
pMemGrp
=
Doxygen
::
memberDocDict
[
grpId
];
MemberGroupInfo
*
info
=
Doxygen
::
memGrpInfoDict
[
grpId
];
//QCString *pMemGrp = Doxygen::memberDocDict[grpId];
bool
hasDocs
=
hasDocumentation
()
||
bool
hasDocs
=
hasDocumentation
()
||
// part of a documented member group
// part of a documented member group
(
grpId
!=-
1
&&
pMemGrp
&&
!
pMemGrp
->
isEmpty
());
(
grpId
!=-
1
&&
info
&&
!
info
->
doc
.
isEmpty
());
// only include static members with file/namespace scope if
// only include static members with file/namespace scope if
// explicitly enabled in the config file
// explicitly enabled in the config file
...
@@ -1969,6 +1970,6 @@ void MemberDef::setDeclArgumentList(ArgumentList *al)
...
@@ -1969,6 +1970,6 @@ void MemberDef::setDeclArgumentList(ArgumentList *al)
void
MemberDef
::
findSectionsInDocumentation
()
void
MemberDef
::
findSectionsInDocumentation
()
{
{
docFindSections
(
documentation
(),
0
,
this
,
0
);
docFindSections
(
documentation
(),
0
,
this
,
0
,
docFile
()
);
}
}
src/membergroup.cpp
View file @
6f118034
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
//}
//}
MemberGroup
::
MemberGroup
(
Definition
*
parent
,
MemberGroup
::
MemberGroup
(
Definition
*
parent
,
int
id
,
const
char
*
hdr
,
const
char
*
d
)
/* : Definition(idToName(id)) */
int
id
,
const
char
*
hdr
,
const
char
*
d
,
const
char
*
docFile
)
{
{
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
//printf("New member group id=%d header=%s desc=%s\n",id,hdr,d);
memberList
=
new
MemberList
;
memberList
=
new
MemberList
;
...
@@ -49,6 +49,7 @@ MemberGroup::MemberGroup(Definition *parent,
...
@@ -49,6 +49,7 @@ MemberGroup::MemberGroup(Definition *parent,
inDeclSection
=
0
;
inDeclSection
=
0
;
m_numDecMembers
=
-
1
;
m_numDecMembers
=
-
1
;
m_parent
=
parent
;
m_parent
=
parent
;
m_docFile
=
docFile
;
//printf("Member group docs=`%s'\n",doc.data());
//printf("Member group docs=`%s'\n",doc.data());
}
}
...
@@ -216,7 +217,7 @@ void MemberGroup::addListReferences(Definition *def)
...
@@ -216,7 +217,7 @@ void MemberGroup::addListReferences(Definition *def)
void
MemberGroup
::
findSectionsInDocumentation
()
void
MemberGroup
::
findSectionsInDocumentation
()
{
{
docFindSections
(
doc
,
0
,
0
,
this
);
docFindSections
(
doc
,
0
,
0
,
this
,
m_docFile
);
memberList
->
findSectionsInDocumentation
();
memberList
->
findSectionsInDocumentation
();
}
}
src/membergroup.h
View file @
6f118034
...
@@ -36,7 +36,8 @@ class Definition;
...
@@ -36,7 +36,8 @@ class Definition;
class
MemberGroup
class
MemberGroup
{
{
public
:
public
:
MemberGroup
(
Definition
*
parent
,
int
id
,
const
char
*
header
,
const
char
*
docs
);
MemberGroup
(
Definition
*
parent
,
int
id
,
const
char
*
header
,
const
char
*
docs
,
const
char
*
docFile
);
~
MemberGroup
();
~
MemberGroup
();
QCString
header
()
const
{
return
grpHeader
;
}
QCString
header
()
const
{
return
grpHeader
;
}
int
groupId
()
const
{
return
grpId
;
}
int
groupId
()
const
{
return
grpId
;
}
...
@@ -81,6 +82,7 @@ class MemberGroup
...
@@ -81,6 +82,7 @@ class MemberGroup
bool
inSameSection
;
bool
inSameSection
;
int
m_numDecMembers
;
int
m_numDecMembers
;
Definition
*
m_parent
;
Definition
*
m_parent
;
QCString
m_docFile
;
};
};
class
MemberGroupList
:
public
QList
<
MemberGroup
>
class
MemberGroupList
:
public
QList
<
MemberGroup
>
...
@@ -101,6 +103,13 @@ class MemberGroupSDict : public SIntDict<MemberGroup>
...
@@ -101,6 +103,13 @@ class MemberGroupSDict : public SIntDict<MemberGroup>
~
MemberGroupSDict
()
{}
~
MemberGroupSDict
()
{}
};
};
struct
MemberGroupInfo
{
QCString
header
;
QCString
doc
;
QCString
docFile
;
};
//class MemberGroupDict : public QIntDict<MemberGroup>
//class MemberGroupDict : public QIntDict<MemberGroup>
//{
//{
// public:
// public:
...
...
src/message.cpp
View file @
6f118034
...
@@ -103,16 +103,12 @@ void msg(const char *fmt, ...)
...
@@ -103,16 +103,12 @@ void msg(const char *fmt, ...)
}
}
}
}
void
warn
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...
)
static
void
do_warn
(
const
char
*
tag
,
const
char
*
file
,
int
line
,
const
char
*
fmt
,
va_list
args
)
{
{
if
(
Config_getBool
(
"WARNINGS"
))
if
(
!
Config_getBool
(
tag
))
return
;
// warning type disabled
{
if
(
file
==
0
)
file
=
"<unknown>"
;
char
text
[
4096
];
char
text
[
4096
];
va_list
args
;
va_start
(
args
,
fmt
);
vsprintf
(
text
,
fmt
,
args
);
vsprintf
(
text
,
fmt
,
args
);
va_end
(
args
);
if
(
file
==
0
)
file
=
"<unknown>"
;
switch
(
warnFormatOrder
)
switch
(
warnFormatOrder
)
{
{
case
1
:
fprintf
(
warnFile
,
outputFormat
,
file
,
line
,
text
);
break
;
case
1
:
fprintf
(
warnFile
,
outputFormat
,
file
,
line
,
text
);
break
;
...
@@ -124,42 +120,40 @@ void warn(const char *file,int line,const char *fmt, ...)
...
@@ -124,42 +120,40 @@ void warn(const char *file,int line,const char *fmt, ...)
default:
default:
printf
(
"Error: warning format has not been initialized!
\n
"
);
printf
(
"Error: warning format has not been initialized!
\n
"
);
}
}
}
}
void
warn
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...)
{
va_list
args
;
va_start
(
args
,
fmt
);
do_warn
(
"WARNINGS"
,
file
,
line
,
fmt
,
args
);
va_end
(
args
);
}
}
void
warn_cont
(
const
char
*
fmt
,
...)
void
warn_cont
(
const
char
*
fmt
,
...)
{
{
if
(
Config_getBool
(
"WARNINGS"
))
if
(
!
Config_getBool
(
"WARNINGS"
))
{
return
;
va_list
args
;
va_list
args
;
va_start
(
args
,
fmt
);
va_start
(
args
,
fmt
);
vfprintf
(
warnFile
,
fmt
,
args
);
vfprintf
(
warnFile
,
fmt
,
args
);
va_end
(
args
);
va_end
(
args
);
}
}
}
void
warn_undoc
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...)
void
warn_undoc
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...)
{
{
if
(
Config_getBool
(
"WARN_IF_UNDOCUMENTED"
))
{
if
(
file
==
0
)
file
=
"<unknwon>"
;
char
text
[
4096
];
va_list
args
;
va_list
args
;
va_start
(
args
,
fmt
);
va_start
(
args
,
fmt
);
vsprintf
(
text
,
fmt
,
args
);
do_warn
(
"WARN_IF_UNDOCUMENTED"
,
file
,
line
,
fmt
,
args
);
va_end
(
args
);
}
void
warn_doc_error
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...)
{
va_list
args
;
va_start
(
args
,
fmt
);
do_warn
(
"WARN_IF_DOC_ERROR"
,
file
,
line
,
fmt
,
args
);
va_end
(
args
);
va_end
(
args
);
switch
(
warnFormatOrder
)
{
case
1
:
fprintf
(
warnFile
,
outputFormat
,
file
,
line
,
text
);
break
;
case
2
:
fprintf
(
warnFile
,
outputFormat
,
text
,
line
,
file
);
break
;
case
3
:
fprintf
(
warnFile
,
outputFormat
,
line
,
text
,
file
);
break
;
case
4
:
fprintf
(
warnFile
,
outputFormat
,
file
,
text
,
line
);
break
;
case
5
:
fprintf
(
warnFile
,
outputFormat
,
text
,
file
,
line
);
break
;
case
6
:
fprintf
(
warnFile
,
outputFormat
,
line
,
file
,
text
);
break
;
default:
printf
(
"Error: warning format has not been initialized!
\n
"
);
}
}
}
}
void
err
(
const
char
*
fmt
,
...)
void
err
(
const
char
*
fmt
,
...)
...
...
src/message.h
View file @
6f118034
...
@@ -24,6 +24,7 @@ extern void msg(const char *fmt, ...);
...
@@ -24,6 +24,7 @@ extern void msg(const char *fmt, ...);
extern
void
warn
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...);
extern
void
warn
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...);
extern
void
warn_cont
(
const
char
*
fmt
,
...);
extern
void
warn_cont
(
const
char
*
fmt
,
...);
extern
void
warn_undoc
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...);
extern
void
warn_undoc
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...);
extern
void
warn_doc_error
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...);
extern
void
err
(
const
char
*
fmt
,
...);
extern
void
err
(
const
char
*
fmt
,
...);
void
initWarningFormat
();
void
initWarningFormat
();
...
...
src/namespacedef.cpp
View file @
6f118034
...
@@ -65,7 +65,7 @@ void NamespaceDef::distributeMemberGroupDocumentation()
...
@@ -65,7 +65,7 @@ void NamespaceDef::distributeMemberGroupDocumentation()
void
NamespaceDef
::
findSectionsInDocumentation
()
void
NamespaceDef
::
findSectionsInDocumentation
()
{
{
docFindSections
(
documentation
(),
0
,
this
,
0
);
docFindSections
(
documentation
(),
0
,
this
,
0
,
docFile
()
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroupSDict
::
Iterator
mgli
(
*
memberGroupSDict
);
MemberGroup
*
mg
;
MemberGroup
*
mg
;
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
for
(;(
mg
=
mgli
.
current
());
++
mgli
)
...
...
src/page.h
View file @
6f118034
...
@@ -80,7 +80,7 @@ class PageInfo
...
@@ -80,7 +80,7 @@ class PageInfo
}
}
void
findSectionsInDocumentation
()
void
findSectionsInDocumentation
()
{
{
docFindSections
(
doc
,
this
,
0
,
0
);
docFindSections
(
doc
,
this
,
0
,
0
,
defFileName
);
}
}
void
writeDocAnchorsToTagFile
()
void
writeDocAnchorsToTagFile
()
...
...
src/perlmodgen.cpp
View file @
6f118034
...
@@ -542,6 +542,8 @@ void PerlModDocVisitor::visit(DocSymbol *sy)
...
@@ -542,6 +542,8 @@ void PerlModDocVisitor::visit(DocSymbol *sy)
case
DocSymbol
:
:
Ring
:
accent
=
"ring"
;
break
;
case
DocSymbol
:
:
Ring
:
accent
=
"ring"
;
break
;
case
DocSymbol
:
:
BSlash
:
s
=
"
\\\\
"
;
break
;
case
DocSymbol
:
:
BSlash
:
s
=
"
\\\\
"
;
break
;
case
DocSymbol
:
:
Copy
:
symbol
=
"copyright"
;
break
;
case
DocSymbol
:
:
Copy
:
symbol
=
"copyright"
;
break
;
case
DocSymbol
:
:
Tm
:
symbol
=
"trademark"
;
break
;
case
DocSymbol
:
:
Reg
:
symbol
=
"registered"
;
break
;
case
DocSymbol
:
:
Szlig
:
symbol
=
"szlig"
;
break
;
case
DocSymbol
:
:
Szlig
:
symbol
=
"szlig"
;
break
;
case
DocSymbol
:
:
Apos
:
s
=
"
\\\'
"
;
break
;
case
DocSymbol
:
:
Apos
:
s
=
"
\\\'
"
;
break
;
case
DocSymbol
:
:
Unknown
:
case
DocSymbol
:
:
Unknown
:
...
@@ -770,6 +772,7 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s)
...
@@ -770,6 +772,7 @@ void PerlModDocVisitor::visitPre(DocSimpleSect *s)
case
DocSimpleSect
:
:
Remark
:
type
=
"remark"
;
break
;
case
DocSimpleSect
:
:
Remark
:
type
=
"remark"
;
break
;
case
DocSimpleSect
:
:
Attention
:
type
=
"attention"
;
break
;
case
DocSimpleSect
:
:
Attention
:
type
=
"attention"
;
break
;
case
DocSimpleSect
:
:
User
:
type
=
"par"
;
break
;
case
DocSimpleSect
:
:
User
:
type
=
"par"
;
break
;
case
DocSimpleSect
:
:
Rcs
:
type
=
"rcs"
;
break
;
case
DocSimpleSect
:
:
Unknown
:
case
DocSimpleSect
:
:
Unknown
:
err
(
"Error: unknown simple section found
\n
"
);
err
(
"Error: unknown simple section found
\n
"
);
break
;
break
;
...
...
src/printdocvisitor.h
View file @
6f118034
...
@@ -264,6 +264,7 @@ class PrintDocVisitor : public DocVisitor
...
@@ -264,6 +264,7 @@ class PrintDocVisitor : public DocVisitor
case
DocSimpleSect
:
:
Remark
:
printf
(
"remark"
);
break
;
case
DocSimpleSect
:
:
Remark
:
printf
(
"remark"
);
break
;
case
DocSimpleSect
:
:
Attention
:
printf
(
"attention"
);
break
;
case
DocSimpleSect
:
:
Attention
:
printf
(
"attention"
);
break
;
case
DocSimpleSect
:
:
User
:
printf
(
"user"
);
break
;
case
DocSimpleSect
:
:
User
:
printf
(
"user"
);
break
;
case
DocSimpleSect
:
:
Rcs
:
printf
(
"rcs"
);
break
;
case
DocSimpleSect
:
:
Unknown
:
printf
(
"unknown"
);
break
;
case
DocSimpleSect
:
:
Unknown
:
printf
(
"unknown"
);
break
;
}
}
printf
(
">
\n
"
);
printf
(
">
\n
"
);
...
...
src/rtfdocvisitor.cpp
View file @
6f118034
...
@@ -95,7 +95,9 @@ void RTFDocVisitor::visit(DocSymbol *s)
...
@@ -95,7 +95,9 @@ void RTFDocVisitor::visit(DocSymbol *s)
case
DocSymbol
:
:
Dollar
:
m_t
<<
"$"
;
break
;
case
DocSymbol
:
:
Dollar
:
m_t
<<
"$"
;
break
;
case
DocSymbol
:
:
Hash
:
m_t
<<
"#"
;
break
;
case
DocSymbol
:
:
Hash
:
m_t
<<
"#"
;
break
;
case
DocSymbol
:
:
Percent
:
m_t
<<
"%"
;
break
;
case
DocSymbol
:
:
Percent
:
m_t
<<
"%"
;
break
;
case
DocSymbol
:
:
Copy
:
m_t
<<
"
\251
"
;
break
;
case
DocSymbol
:
:
Copy
:
m_t
<<
"(C)"
;
break
;
case
DocSymbol
:
:
Tm
:
m_t
<<
"(TM)"
;
break
;
case
DocSymbol
:
:
Reg
:
m_t
<<
"(R)"
;
break
;
case
DocSymbol
:
:
Apos
:
m_t
<<
"'"
;
break
;
case
DocSymbol
:
:
Apos
:
m_t
<<
"'"
;
break
;
case
DocSymbol
:
:
Quot
:
m_t
<<
"
\"
"
;
break
;
case
DocSymbol
:
:
Quot
:
m_t
<<
"
\"
"
;
break
;
case
DocSymbol
:
:
Uml
:
switch
(
s
->
letter
())
case
DocSymbol
:
:
Uml
:
switch
(
s
->
letter
())
...
@@ -295,7 +297,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
...
@@ -295,7 +297,7 @@ void RTFDocVisitor::visit(DocVerbatim *s)
m_t
<<
"{"
<<
endl
;
m_t
<<
"{"
<<
endl
;
m_t
<<
"
\\
par"
<<
endl
;
m_t
<<
"
\\
par"
<<
endl
;
m_t
<<
rtf_Style_Reset
<<
getStyle
(
"CodeExample"
);
m_t
<<
rtf_Style_Reset
<<
getStyle
(
"CodeExample"
);
m_t
<<
s
->
text
(
);
filter
(
s
->
text
()
);
m_t
<<
"
\\
par"
<<
endl
;
m_t
<<
"
\\
par"
<<
endl
;
m_t
<<
"}"
<<
endl
;
m_t
<<
"}"
<<
endl
;
break
;
break
;
...
@@ -349,7 +351,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
...
@@ -349,7 +351,7 @@ void RTFDocVisitor::visit(DocInclude *inc)
m_t
<<
"{"
<<
endl
;
m_t
<<
"{"
<<
endl
;
m_t
<<
"
\\
par"
<<
endl
;
m_t
<<
"
\\
par"
<<
endl
;
m_t
<<
rtf_Style_Reset
<<
getStyle
(
"CodeExample"
);
m_t
<<
rtf_Style_Reset
<<
getStyle
(
"CodeExample"
);
m_t
<<
inc
->
text
(
);
filter
(
inc
->
text
()
);
m_t
<<
"
\\
par"
<<
endl
;
m_t
<<
"
\\
par"
<<
endl
;
m_t
<<
"}"
<<
endl
;
m_t
<<
"}"
<<
endl
;
break
;
break
;
...
@@ -491,11 +493,12 @@ void RTFDocVisitor::visitPre(DocSimpleSect *s)
...
@@ -491,11 +493,12 @@ void RTFDocVisitor::visitPre(DocSimpleSect *s)
case
DocSimpleSect
:
:
Attention
:
case
DocSimpleSect
:
:
Attention
:
m_t
<<
theTranslator
->
trAttention
();
break
;
m_t
<<
theTranslator
->
trAttention
();
break
;
case
DocSimpleSect
:
:
User
:
break
;
case
DocSimpleSect
:
:
User
:
break
;
case
DocSimpleSect
:
:
Rcs
:
break
;
case
DocSimpleSect
:
:
Unknown
:
break
;
case
DocSimpleSect
:
:
Unknown
:
break
;
}
}
// special case 1: user defined title
// special case 1: user defined title
if
(
s
->
type
()
!=
DocSimpleSect
::
User
)
if
(
s
->
type
()
!=
DocSimpleSect
::
User
&&
s
->
type
()
!=
DocSimpleSect
::
Rcs
)
{
{
m_t
<<
":}"
;
// end bold
m_t
<<
":}"
;
// end bold
m_t
<<
"
\\
par"
<<
endl
;
m_t
<<
"
\\
par"
<<
endl
;
...
...
src/scanner.l
View file @
6f118034
...
@@ -77,6 +77,7 @@ static int lastClassTemplSpecContext;
...
@@ -77,6 +77,7 @@ static int lastClassTemplSpecContext;
static int lastSkipHtmlCommentContext;
static int lastSkipHtmlCommentContext;
static int lastIfContext;
static int lastIfContext;
static int lastInternalDocContext;
static int lastInternalDocContext;
static int lastPreLineCtrlContext;
static int nextDefContext;
static int nextDefContext;
static int overloadContext;
static int overloadContext;
static Protection protection;
static Protection protection;
...
@@ -448,7 +449,8 @@ static void setContext()
...
@@ -448,7 +449,8 @@ static void setContext()
insideIDL = fileName.right(4)==".idl" || fileName.right(4)==".odl";
insideIDL = fileName.right(4)==".idl" || fileName.right(4)==".odl";
insideJava = fileName.right(5)==".java";
insideJava = fileName.right(5)==".java";
insideCS = fileName.right(3)==".cs";
insideCS = fileName.right(3)==".cs";
insidePHP = fileName.right(4)==".php" || fileName.right(4)==".inc";
insidePHP = fileName.right(4)==".php" || fileName.right(5)==".php4" ||
fileName.right(4)==".inc";
if ( insidePHP )
if ( insidePHP )
{
{
useOverrideCommands = TRUE;
useOverrideCommands = TRUE;
...
@@ -1366,8 +1368,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
...
@@ -1366,8 +1368,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->bodyLine = yyLineNr;
current->bodyLine = yyLineNr;
BEGIN( Define );
BEGIN( Define );
}
}
<FindMembers>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
<FindMembers
,ReadBody
>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
yyLineNr = atoi(&yytext[1]);
yyLineNr = atoi(&yytext[1]);
//printf("setting line number to %d\n",yyLineNr);
lastPreLineCtrlContext = YY_START;
BEGIN( PreLineCtrl );
BEGIN( PreLineCtrl );
}
}
<PreLineCtrl>"\""[^\n\"]*"\"" {
<PreLineCtrl>"\""[^\n\"]*"\"" {
...
@@ -1375,7 +1379,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
...
@@ -1375,7 +1379,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
<PreLineCtrl>. {}
<PreLineCtrl>. {}
<PreLineCtrl>\n {
<PreLineCtrl>\n {
BEGIN(FindMembers);
yyLineNr++;
BEGIN( lastPreLineCtrlContext );
}
}
<SkipCPP>.
<SkipCPP>.
<SkipCPP>\\[\r]*"\n"[\r]* { yyLineNr++ ; }
<SkipCPP>\\[\r]*"\n"[\r]* { yyLineNr++ ; }
...
@@ -1560,7 +1565,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
...
@@ -1560,7 +1565,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN( Doc );
BEGIN( Doc );
}
}
}
}
<FindMembers,FindFields,ReadInitializer>"//"([!/]?){B}*{CMD}"}"
|"/*"([!*]?){B}*{CMD}"}"{B}
*"*/" {
<FindMembers,FindFields,ReadInitializer>"//"([!/]?){B}*{CMD}"}"
.*|"/*"([!*]?){B}*{CMD}"}".
*"*/" {
if (memberGroupId==NOGROUP && autoGroupStack.isEmpty())
if (memberGroupId==NOGROUP && autoGroupStack.isEmpty())
{
{
warn(yyFileName,yyLineNr,
warn(yyFileName,yyLineNr,
...
@@ -1851,7 +1856,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
...
@@ -1851,7 +1856,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
/*
/*
<FindFieldArg>"," { unput(*yytext); BEGIN(FindFields); }
<FindFieldArg>"," { unput(*yytext); BEGIN(FindFields); }
*/
*/
<ReadBody>[^\r\n
{}"'/]*
{ current->program += yytext ; }
<ReadBody>[^\r\n
\#{}"'/]*
{ current->program += yytext ; }
<ReadBody>"//".* { current->program += yytext ; }
<ReadBody>"//".* { current->program += yytext ; }
<ReadBody>\" { current->program += yytext ;
<ReadBody>\" { current->program += yytext ;
pCopyQuotedString = ¤t->program;
pCopyQuotedString = ¤t->program;
...
@@ -3659,9 +3664,15 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
...
@@ -3659,9 +3664,15 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
memberGroupDocs+="\n\n";
memberGroupDocs+="\n\n";
}
}
memberGroupDocs+=current->doc;
memberGroupDocs+=current->doc;
Doxygen::memberDocDict.insert(memberGroupId,
//Doxygen::memberDocDict.insert(memberGroupId,
new QCString(memberGroupDocs)
// new QCString(memberGroupDocs)
);
// );
MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(memberGroupId);
if (info)
{
info->doc = memberGroupDocs;
info->docFile = yyFileName;
}
current->doc.resize(0);
current->doc.resize(0);
current->brief.resize(0);
current->brief.resize(0);
BEGIN(lastDocContext);
BEGIN(lastDocContext);
...
@@ -4583,9 +4594,13 @@ static void startGroup()
...
@@ -4583,9 +4594,13 @@ static void startGroup()
memberGroupHeader="[NOHEADER]";
memberGroupHeader="[NOHEADER]";
}
}
memberGroupId = newMemberGroupId();
memberGroupId = newMemberGroupId();
Doxygen::memberHeaderDict.insert(memberGroupId,
MemberGroupInfo *info = new MemberGroupInfo;
new QCString(memberGroupHeader.stripWhiteSpace())
info->header = memberGroupHeader.stripWhiteSpace();
);
Doxygen::memGrpInfoDict.insert(memberGroupId,info);
//Doxygen::memberHeaderDict.insert(memberGroupId,
// new QCString(memberGroupHeader.stripWhiteSpace())
// );
memberGroupRelates = current->relates.copy();
memberGroupRelates = current->relates.copy();
memberGroupInside = current->inside.copy();
memberGroupInside = current->inside.copy();
current->mGrpId = memberGroupId;
current->mGrpId = memberGroupId;
...
@@ -4609,9 +4624,12 @@ static void startGroupInDoc()
...
@@ -4609,9 +4624,12 @@ static void startGroupInDoc()
// endGroup();
// endGroup();
//}
//}
memberGroupId = newMemberGroupId();
memberGroupId = newMemberGroupId();
Doxygen::memberHeaderDict.insert(memberGroupId,
MemberGroupInfo *info = new MemberGroupInfo;
new QCString(memberGroupHeader.stripWhiteSpace())
info->header = memberGroupHeader.stripWhiteSpace();
);
Doxygen::memGrpInfoDict.insert(memberGroupId,info);
//Doxygen::memberHeaderDict.insert(memberGroupId,
// new QCString(memberGroupHeader.stripWhiteSpace())
// );
memberGroupRelates = current->relates.copy();
memberGroupRelates = current->relates.copy();
memberGroupInside = current->inside.copy();
memberGroupInside = current->inside.copy();
current->mGrpId = memberGroupId;
current->mGrpId = memberGroupId;
...
@@ -4627,9 +4645,15 @@ static void endGroup()
...
@@ -4627,9 +4645,15 @@ static void endGroup()
{
{
if (memberGroupId!=NOGROUP) // end of member group
if (memberGroupId!=NOGROUP) // end of member group
{
{
Doxygen::memberDocDict.insert(memberGroupId,
//Doxygen::memberDocDict.insert(memberGroupId,
new QCString(memberGroupDocs)
// new QCString(memberGroupDocs)
);
// );
MemberGroupInfo *info=Doxygen::memGrpInfoDict.find(memberGroupId);
if (info)
{
info->doc = memberGroupDocs;
info->docFile = yyFileName;
}
memberGroupId=NOGROUP;
memberGroupId=NOGROUP;
memberGroupRelates.resize(0);
memberGroupRelates.resize(0);
memberGroupInside.resize(0);
memberGroupInside.resize(0);
...
...
src/translator_it.h
View file @
6f118034
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
*
*
* Revision history
* Revision history
*
*
* 2002/11: translated new items used since version 1.2.18
* 2002/08: translated new items used since version 1.2.17
* 2002/08: translated new items used since version 1.2.17
* 2002/07: translated new items used since version 1.2.16
* 2002/07: translated new items used since version 1.2.16
* 2002/06: modified trRelatedPagesDescription() method
* 2002/06: modified trRelatedPagesDescription() method
...
@@ -57,7 +58,7 @@
...
@@ -57,7 +58,7 @@
*
*
* Il plurale dei termini inglesi non tradotti è stato reso con il singolare
* Il plurale dei termini inglesi non tradotti è stato reso con il singolare
* della parola inglese secondo una convenzione spesso ritrovata nella documentazione
* della parola inglese secondo una convenzione spesso ritrovata nella documentazione
* tecnica (ad es "lista dei file" e non "lista dei files")
* tecnica (ad es
.
"lista dei file" e non "lista dei files")
*
*
* Se avete suggerimenti sulla traduzione di alcuni termini o volete segnalare
* Se avete suggerimenti sulla traduzione di alcuni termini o volete segnalare
* eventuali sviste potete scrivermi all'indirizzo: alessandro@falappa.net
* eventuali sviste potete scrivermi all'indirizzo: alessandro@falappa.net
...
@@ -66,7 +67,7 @@
...
@@ -66,7 +67,7 @@
#ifndef TRANSLATOR_IT_H
#ifndef TRANSLATOR_IT_H
#define TRANSLATOR_IT_H
#define TRANSLATOR_IT_H
class
TranslatorItalian
:
public
Translator
Adapter_1_2_18
class
TranslatorItalian
:
public
Translator
{
{
public
:
public
:
...
@@ -1370,6 +1371,24 @@ class TranslatorItalian : public TranslatorAdapter_1_2_18
...
@@ -1370,6 +1371,24 @@ class TranslatorItalian : public TranslatorAdapter_1_2_18
{
{
return
"Lista degli elementi deprecati"
;
return
"Lista degli elementi deprecati"
;
}
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.18
//////////////////////////////////////////////////////////////////////////
/*! Used as a header for declaration section of the events found in
* a C# program
*/
virtual
QCString
trEvents
()
{
return
"Eventi"
;
}
/*! Header used for the documentation section of a class' events. */
virtual
QCString
trEventDocumentation
()
{
return
"Documentazione degli eventi"
;
}
};
};
#endif
#endif
src/util.cpp
View file @
6f118034
...
@@ -3132,7 +3132,8 @@ const char *getOverloadDocs()
...
@@ -3132,7 +3132,8 @@ const char *getOverloadDocs()
}
}
void
addMembersToMemberGroup
(
MemberList
*
ml
,
void
addMembersToMemberGroup
(
MemberList
*
ml
,
MemberGroupSDict
*
memberGroupSDict
,
Definition
*
context
)
MemberGroupSDict
*
memberGroupSDict
,
Definition
*
context
)
{
{
//printf("addMemberToMemberGroup()\n");
//printf("addMemberToMemberGroup()\n");
MemberListIterator
mli
(
*
ml
);
MemberListIterator
mli
(
*
ml
);
...
@@ -3151,14 +3152,21 @@ void addMembersToMemberGroup(MemberList *ml,
...
@@ -3151,14 +3152,21 @@ void addMembersToMemberGroup(MemberList *ml,
int
groupId
=
fmd
->
getMemberGroupId
();
int
groupId
=
fmd
->
getMemberGroupId
();
if
(
groupId
!=-
1
)
if
(
groupId
!=-
1
)
{
{
QCString
*
pGrpHeader
=
Doxygen
::
memberHeaderDict
[
groupId
];
MemberGroupInfo
*
info
=
Doxygen
::
memGrpInfoDict
[
groupId
];
QCString
*
pDocs
=
Doxygen
::
memberDocDict
[
groupId
];
//QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId];
if
(
pGrpHeader
)
//QCString *pDocs = Doxygen::memberDocDict[groupId];
if
(
info
)
{
{
MemberGroup
*
mg
=
memberGroupSDict
->
find
(
groupId
);
MemberGroup
*
mg
=
memberGroupSDict
->
find
(
groupId
);
if
(
mg
==
0
)
if
(
mg
==
0
)
{
{
mg
=
new
MemberGroup
(
context
,
groupId
,
*
pGrpHeader
,
pDocs
?
pDocs
->
data
()
:
0
);
mg
=
new
MemberGroup
(
context
,
groupId
,
info
->
header
,
info
->
doc
,
info
->
docFile
);
memberGroupSDict
->
append
(
groupId
,
mg
);
memberGroupSDict
->
append
(
groupId
,
mg
);
}
}
mg
->
insertMember
(
context
,
fmd
);
// insert in member group
mg
->
insertMember
(
context
,
fmd
);
// insert in member group
...
@@ -3172,14 +3180,21 @@ void addMembersToMemberGroup(MemberList *ml,
...
@@ -3172,14 +3180,21 @@ void addMembersToMemberGroup(MemberList *ml,
int
groupId
=
md
->
getMemberGroupId
();
int
groupId
=
md
->
getMemberGroupId
();
if
(
groupId
!=-
1
)
if
(
groupId
!=-
1
)
{
{
QCString
*
pGrpHeader
=
Doxygen
::
memberHeaderDict
[
groupId
];
MemberGroupInfo
*
info
=
Doxygen
::
memGrpInfoDict
[
groupId
];
QCString
*
pDocs
=
Doxygen
::
memberDocDict
[
groupId
];
//QCString *pGrpHeader = Doxygen::memberHeaderDict[groupId];
if
(
pGrpHeader
)
//QCString *pDocs = Doxygen::memberDocDict[groupId];
if
(
info
)
{
{
MemberGroup
*
mg
=
memberGroupSDict
->
find
(
groupId
);
MemberGroup
*
mg
=
memberGroupSDict
->
find
(
groupId
);
if
(
mg
==
0
)
if
(
mg
==
0
)
{
{
mg
=
new
MemberGroup
(
context
,
groupId
,
*
pGrpHeader
,
pDocs
?
pDocs
->
data
()
:
0
);
mg
=
new
MemberGroup
(
context
,
groupId
,
info
->
header
,
info
->
doc
,
info
->
docFile
);
memberGroupSDict
->
append
(
groupId
,
mg
);
memberGroupSDict
->
append
(
groupId
,
mg
);
}
}
md
=
ml
->
take
(
index
);
// remove from member list
md
=
ml
->
take
(
index
);
// remove from member list
...
...
src/xmldocvisitor.cpp
View file @
6f118034
...
@@ -76,6 +76,8 @@ void XmlDocVisitor::visit(DocSymbol *s)
...
@@ -76,6 +76,8 @@ void XmlDocVisitor::visit(DocSymbol *s)
case
DocSymbol
:
:
Hash
:
m_t
<<
"#"
;
break
;
case
DocSymbol
:
:
Hash
:
m_t
<<
"#"
;
break
;
case
DocSymbol
:
:
Percent
:
m_t
<<
"%"
;
break
;
case
DocSymbol
:
:
Percent
:
m_t
<<
"%"
;
break
;
case
DocSymbol
:
:
Copy
:
m_t
<<
"<copy/>"
;
break
;
case
DocSymbol
:
:
Copy
:
m_t
<<
"<copy/>"
;
break
;
case
DocSymbol
:
:
Tm
:
m_t
<<
"<trademark/>"
;
break
;
case
DocSymbol
:
:
Reg
:
m_t
<<
"<registered/>"
;
break
;
case
DocSymbol
:
:
Apos
:
m_t
<<
"'"
;
break
;
case
DocSymbol
:
:
Apos
:
m_t
<<
"'"
;
break
;
case
DocSymbol
:
:
Quot
:
m_t
<<
"
\"
"
;
break
;
case
DocSymbol
:
:
Quot
:
m_t
<<
"
\"
"
;
break
;
case
DocSymbol
:
:
Uml
:
m_t
<<
"<umlaut char=
\"
"
<<
s
->
letter
()
<<
"
\"
/>"
;
break
;
case
DocSymbol
:
:
Uml
:
m_t
<<
"<umlaut char=
\"
"
<<
s
->
letter
()
<<
"
\"
/>"
;
break
;
...
@@ -334,7 +336,7 @@ void XmlDocVisitor::visitPre(DocSimpleSect *s)
...
@@ -334,7 +336,7 @@ void XmlDocVisitor::visitPre(DocSimpleSect *s)
case
DocSimpleSect
:
:
Date
:
case
DocSimpleSect
:
:
Date
:
m_t
<<
"date"
;
break
;
m_t
<<
"date"
;
break
;
case
DocSimpleSect
:
:
Note
:
case
DocSimpleSect
:
:
Note
:
m_t
<<
"
bug
"
;
break
;
m_t
<<
"
note
"
;
break
;
case
DocSimpleSect
:
:
Warning
:
case
DocSimpleSect
:
:
Warning
:
m_t
<<
"warning"
;
break
;
m_t
<<
"warning"
;
break
;
case
DocSimpleSect
:
:
Pre
:
case
DocSimpleSect
:
:
Pre
:
...
@@ -349,6 +351,8 @@ void XmlDocVisitor::visitPre(DocSimpleSect *s)
...
@@ -349,6 +351,8 @@ void XmlDocVisitor::visitPre(DocSimpleSect *s)
m_t
<<
"attention"
;
break
;
m_t
<<
"attention"
;
break
;
case
DocSimpleSect
:
:
User
:
case
DocSimpleSect
:
:
User
:
m_t
<<
"par"
;
break
;
m_t
<<
"par"
;
break
;
case
DocSimpleSect
:
:
Rcs
:
m_t
<<
"rcs"
;
break
;
case
DocSimpleSect
:
:
Unknown
:
break
;
case
DocSimpleSect
:
:
Unknown
:
break
;
}
}
m_t
<<
"
\"
>"
;
m_t
<<
"
\"
>"
;
...
...
src/xmlgen.cpp
View file @
6f118034
...
@@ -479,6 +479,8 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
...
@@ -479,6 +479,8 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
case
Protected
:
t
<<
"protected"
;
break
;
case
Protected
:
t
<<
"protected"
;
break
;
case
Private
:
t
<<
"private"
;
break
;
case
Private
:
t
<<
"private"
;
break
;
}
}
t
<<
"
\"
static=
\"
"
;
if
(
md
->
isStatic
())
t
<<
"yes"
;
else
t
<<
"no"
;
t
<<
"
\"
"
;
t
<<
"
\"
"
;
if
(
isFunc
)
if
(
isFunc
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment