Commit 2b7214ab authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.5.7.1

parent 7b38eb9f
DOXYGEN Version 1.5.7
DOXYGEN Version 1.5.7.1
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (28 September 2008)
Dimitri van Heesch (04 October 2008)
......@@ -2,6 +2,8 @@
# cd qtools ; $(MAKE)
# cd src ; $(MAKE)
DESTDIR =
clean: FORCE
cd examples ; $(MAKE) clean
cd doc ; $(MAKE) clean
......@@ -53,25 +55,25 @@ DATE=$(shell date "+%B %Y")
MAN1DIR = man/man1
install: doxywizard_install
$(INSTTOOL) -d $(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxygen $(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxytag $(INSTALL)/bin
$(INSTTOOL) -d $(INSTALL)/$(MAN1DIR)
$(INSTTOOL) -d $(DESTDIR)/$(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxygen $(DESTDIR)/$(INSTALL)/bin
$(INSTTOOL) -m 755 bin/doxytag $(DESTDIR)/$(INSTALL)/bin
$(INSTTOOL) -d $(DESTDIR)/$(INSTALL)/$(MAN1DIR)
cat doc/doxygen.1 | sed -e "s/DATE/$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > doxygen.1
$(INSTTOOL) -m 644 doxygen.1 $(INSTALL)/$(MAN1DIR)/doxygen.1
$(INSTTOOL) -m 644 doxygen.1 $(DESTDIR)/$(INSTALL)/$(MAN1DIR)/doxygen.1
rm doxygen.1
cat doc/doxytag.1 | sed -e "s/DATE/$(DATE)/g" -e "s/VERSION/$(VERSION)/g" > doxytag.1
$(INSTTOOL) -m 644 doxytag.1 $(INSTALL)/$(MAN1DIR)/doxytag.1
$(INSTTOOL) -m 644 doxytag.1 $(DESTDIR)/$(INSTALL)/$(MAN1DIR)/doxytag.1
rm doxytag.1
install_docs:
$(INSTTOOL) -d $(DOCDIR)
$(INSTTOOL) -d $(DESTDIR)/$(DOCDIR)
$(MAKE) -C examples
$(MAKE) -C doc
$(MAKE) -C latex
$(INSTTOOL) -m 644 latex/doxygen_manual.pdf $(DOCDIR)
cp -r examples $(DOCDIR)
cp -r html $(DOCDIR)
$(INSTTOOL) -m 644 latex/doxygen_manual.pdf $(DESTDIR)/$(DOCDIR)
cp -r examples $(DESTDIR)/$(DOCDIR)
cp -r html $(DESTDIR)/$(DOCDIR)
docs: FORCE
cd examples ; $(MAKE)
......
DOXYGEN Version 1.5.7
DOXYGEN Version 1.5.7.1
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (28 September 2008)
Dimitri van Heesch (dimitri@stack.nl) (04 October 2008)
......@@ -49,12 +49,18 @@ QCString getResourcePath()
void setDotPath()
{
Config_getString("DOT_PATH")=getResourcePath();
// TODO: enable this if we ship dot with doxygen again...
// Config_getString("DOT_PATH")=getResourcePath();
}
void setMscgenPath()
bool setMscgenPath()
{
if (Config_getString("MSCGEN_PATH")!=getResourcePath())
{
Config_getString("MSCGEN_PATH")=getResourcePath();
return TRUE;
}
return FALSE;
}
#endif
......@@ -496,11 +502,11 @@ Step4::Step4(QWidget *parent) : QWidget(parent,"Step4")
m_dotOptions->setEnabled(FALSE);
gbox->addWidget(w,4,0);
#if defined(Q_OS_MACX) // we bundle dot with the mac package
m_diagramMode->setButton(2);
#else
//#if defined(Q_OS_MACX) // we bundle dot with the mac package
// m_diagramMode->setButton(2);
//#else
m_diagramMode->setButton(1);
#endif
//#endif
layout->addWidget(m_diagramMode);
layout->addStretch(1);
......@@ -1106,11 +1112,11 @@ void MainWidget::loadConfigFromFile(const QString &fn)
m_workingDir->setText(QFileInfo(fn).dirPath(TRUE));
m_configFileName = fn;
#if defined(Q_OS_MACX)
if (Config_getString("DOT_PATH").isEmpty())
{
setDotPath();
setConfigSaved(FALSE);
}
//if (Config_getString("DOT_PATH").isEmpty())
//{
// setDotPath();
// setConfigSaved(FALSE);
//}
if (Config_getString("MSCGEN_PATH").isEmpty())
{
setMscgenPath();
......
......@@ -17,7 +17,7 @@
doxygen_version_major=1
doxygen_version_minor=5
doxygen_version_revision=7
doxygen_version_revision=7.1
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=NO
......@@ -46,7 +46,7 @@ while test -n "$1"; do
shift; f_prefix=$1
;;
--docdir | -docdir)
shift; f_docdir=$1/doxygen
shift; f_docdir=$1
;;
--shared | -shared)
f_shared=YES
......@@ -136,8 +136,8 @@ Options:
--prefix dir Installation prefix directory (doxygen will be
put in PREFIX/bin/doxygen)
[default: $f_prefix]
--docdir dir Documentation is installed in DOCDIR/doxygen/
[default: PREFIX/share/doc/packages]
--docdir dir Documentation is installed in DOCDIR/
[default: PREFIX/share/doc/packages/doxygen]
--install name Use \`name' as the name of the GNU install tool
[default: autodetect]
--english-only Include support for English only.
......@@ -224,7 +224,7 @@ if test -z "$f_platform"; then
UNIX_SV:4.2*)
f_platform=unixware-g++
;;
Cygwin:*|CYGWIN:*)
Cygwin:*|CYGWIN*)
f_platform=win32-g++
;;
*MiNT:*)
......
......@@ -58,6 +58,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_abbreviate_brief ABBREVIATE_BRIEF
\refitem cfg_aliases ALIASES
\refitem cfg_allexternals ALLEXTERNALS
\refitem cfg_alphabetical_index ALPHABETICAL_INDEX
\refitem cfg_always_detailed_sec ALWAYS_DETAILED_SEC
\refitem cfg_binary_toc BINARY_TOC
\refitem cfg_builtin_stl_support BUILTIN_STL_SUPPORT
......@@ -81,6 +82,7 @@ followed by the descriptions of the tags grouped by category.
\refitem cfg_docset_feedname DOCSET_FEEDNAME
\refitem cfg_dot_fontname DOT_FONTNAME
\refitem cfg_dot_fontpath DOT_FONTPATH
\refitem cfg_dot_fontsize DOT_FONTSIZE
\refitem cfg_dot_graph_max_nodes DOT_GRAPH_MAX_NODES
\refitem cfg_dot_image_format DOT_IMAGE_FORMAT
\refitem cfg_dot_multi_targets DOT_MULTI_TARGETS
......@@ -1136,13 +1138,11 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
\anchor cfg_alphabetical_index
<dl>
<!--
<dt>\c ALPHABETICAL_INDEX <dd>
\addindex ALPHABETICAL_INDEX
If the \c ALPHABETICAL_INDEX tag is set to \c YES, an alphabetical index
of all compounds will be generated. Enable this if the project contains
a lot of classes, structs, unions or interfaces.
-->
<dt>\c COLS_IN_ALPHA_INDEX <dd>
\anchor cfg_cols_in_alpha_index
......@@ -1946,6 +1946,11 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
\c DOTFONTPATH environment variable or by setting \c DOT_FONTPATH to the directory
containing the font.
\anchor cfg_dot_fontsize
<dt>\c DOT_FONTSIZE <dd>
The \c DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
The default size is 10pt.
\anchor cfg_dot_fontpath
<dt>\c DOT_FONTPATH <dd>
\addindex DOT_FONTPATH
......
......@@ -1298,13 +1298,6 @@ void Config::check()
config_err("Warning: Specifying QCH_FILE requires QHG_LOCATION to be set.\n");
}
// check INDEXLOG creation requirements
if (!Config_getBool("GENERATE_HTML") &&
Config_getBool("GENERATE_INDEXLOG"))
{
config_err("Warning: GENERATE_INDEXLOG=YES requires GENERATE_HTML=YES.\n");
}
if (Config_getBool("HAVE_DOT"))
{
QCString curFontPath = Config_getString("DOT_FONTPATH");
......@@ -2079,7 +2072,6 @@ void Config::create()
);
cs->setWidgetType(ConfigString::File);
addObsolete("DETAILS_AT_TOP");
addObsolete("ALPHABETICAL_INDEX");
//-----------------------------------------------------------------------------------------------
......@@ -2326,13 +2318,13 @@ void Config::create()
addInfo( "Index","configuration options related to the alphabetical class index");
//-----------------------------------------------------------------------------------------------
//cb = addBool(
// "ALPHABETICAL_INDEX",
// "If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index \n"
// "of all compounds will be generated. Enable this if the project \n"
// "contains a lot of classes, structs, unions or interfaces. \n",
// FALSE
// );
cb = addBool(
"ALPHABETICAL_INDEX",
"If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index \n"
"of all compounds will be generated. Enable this if the project \n"
"contains a lot of classes, structs, unions or interfaces. \n",
FALSE
);
ci = addInt(
"COLS_IN_ALPHA_INDEX",
"If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then \n"
......@@ -2655,16 +2647,6 @@ void Config::create()
8,50,10
);
ci->addDependency("GENERATE_HTML");
#if 0
cb = addBool(
"GENERATE_INDEXLOG",
"If the GENERATE_INDEXLOG tag is set to YES, an additional log file \n"
"will be generated that can be used to create new index formats using XSLT \n"
"instead of writing C++ code. \n",
FALSE
);
cb->addDependency("GENERATE_HTML");
#endif
//-----------------------------------------------------------------------------------------------
addInfo( "LaTeX","configuration options related to the LaTeX output");
......@@ -3149,12 +3131,20 @@ void Config::create()
"containing the font. \n"
);
cs->setDefaultValue("FreeSans");
cb->addDependency("HAVE_DOT");
ci = addInt( "DOT_FONTSIZE",
"The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. \n"
"The default size is 10pt. \n",
4,24,10
);
ci->addDependency("HAVE_DOT");
cs = addString( "DOT_FONTPATH",
"By default doxygen will tell dot to use the output directory to look for the \n"
"FreeSans.ttf font (which doxygen will put there itself). If you specify a \n"
"different font using DOT_FONTNAME you can set the path where dot \n"
"can find it using this tag. \n"
);
cs->addDependency("HAVE_DOT");
cb = addBool(
"CLASS_GRAPH",
"If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen \n"
......
......@@ -45,6 +45,7 @@
//#define FONTNAME "FreeSans"
#define FONTNAME getDotFontName()
#define FONTSIZE getDotFontSize()
//--------------------------------------------------------------------
......@@ -84,6 +85,13 @@ static QCString getDotFontName()
return dotFontName;
}
static int getDotFontSize()
{
static int dotFontSize = Config_getInt("DOT_FONTSIZE");
if (dotFontSize<4) dotFontSize=4;
return dotFontSize;
}
static void writeGraphHeader(QTextStream &t)
{
t << "digraph G" << endl;
......@@ -92,9 +100,12 @@ static void writeGraphHeader(QTextStream &t)
{
t << " bgcolor=\"transparent\";" << endl;
}
t << " edge [fontname=\"" << FONTNAME << "\",fontsize=10,"
"labelfontname=\"" << FONTNAME << "\",labelfontsize=10];\n";
t << " node [fontname=\"" << FONTNAME << "\",fontsize=10,shape=record];\n";
t << " edge [fontname=\"" << FONTNAME << "\","
"fontsize=\"" << FONTSIZE << "\","
"labelfontname=\"" << FONTNAME << "\","
"labelfontsize=\"" << FONTSIZE << "\"];\n";
t << " node [fontname=\"" << FONTNAME << "\","
"fontsize=\"" << FONTSIZE << "\",shape=record];\n";
}
static void writeGraphFooter(QTextStream &t)
......@@ -713,7 +724,7 @@ void DotNode::writeArrow(QTextStream &t,
t << " [";
if (pointBack) t << "dir=back,";
t << "color=\"" << edgeColorMap[ei->m_color]
<< "\",fontsize=10,style=\"" << edgeStyleMap[ei->m_style] << "\"";
<< "\",fontsize=\"" << FONTSIZE << "\",style=\"" << edgeStyleMap[ei->m_style] << "\"";
if (!ei->m_label.isEmpty())
{
t << ",label=\"" << convertLabel(ei->m_label) << "\"";
......@@ -2731,23 +2742,23 @@ void generateGraphLegend(const char *path)
}
QTextStream dotText(&dotFile);
writeGraphHeader(dotText);
dotText << " Node9 [shape=\"box\",label=\"Inherited\",fontsize=10,height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",fillcolor=\"grey75\",style=\"filled\" fontcolor=\"black\"];\n";
dotText << " Node10 -> Node9 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node10 [shape=\"box\",label=\"PublicBase\",fontsize=10,height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classPublicBase" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node11 -> Node10 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node11 [shape=\"box\",label=\"Truncated\",fontsize=10,height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"red\",URL=\"$classTruncated" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node13 -> Node9 [dir=back,color=\"darkgreen\",fontsize=10,style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node13 [shape=\"box\",label=\"ProtectedBase\",fontsize=10,height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classProtectedBase" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node14 -> Node9 [dir=back,color=\"firebrick4\",fontsize=10,style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node14 [shape=\"box\",label=\"PrivateBase\",fontsize=10,height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classPrivateBase" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node15 -> Node9 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node15 [shape=\"box\",label=\"Undocumented\",fontsize=10,height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"grey75\"];\n";
dotText << " Node16 -> Node9 [dir=back,color=\"midnightblue\",fontsize=10,style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node16 [shape=\"box\",label=\"Templ< int >\",fontsize=10,height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classTempl" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node17 -> Node16 [dir=back,color=\"orange\",fontsize=10,style=\"dashed\",label=\"< int >\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node17 [shape=\"box\",label=\"Templ< T >\",fontsize=10,height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classTempl" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node18 -> Node9 [dir=back,color=\"darkorchid3\",fontsize=10,style=\"dashed\",label=\"m_usedClass\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node18 [shape=\"box\",label=\"Used\",fontsize=10,height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classUsed" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node9 [shape=\"box\",label=\"Inherited\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",fillcolor=\"grey75\",style=\"filled\" fontcolor=\"black\"];\n";
dotText << " Node10 -> Node9 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node10 [shape=\"box\",label=\"PublicBase\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classPublicBase" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node11 -> Node10 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node11 [shape=\"box\",label=\"Truncated\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"red\",URL=\"$classTruncated" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node13 -> Node9 [dir=back,color=\"darkgreen\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node13 [shape=\"box\",label=\"ProtectedBase\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classProtectedBase" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node14 -> Node9 [dir=back,color=\"firebrick4\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node14 [shape=\"box\",label=\"PrivateBase\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classPrivateBase" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node15 -> Node9 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node15 [shape=\"box\",label=\"Undocumented\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"grey75\"];\n";
dotText << " Node16 -> Node9 [dir=back,color=\"midnightblue\",fontsize=\"" << FONTSIZE << "\",style=\"solid\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node16 [shape=\"box\",label=\"Templ< int >\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classTempl" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node17 -> Node16 [dir=back,color=\"orange\",fontsize=\"" << FONTSIZE << "\",style=\"dashed\",label=\"< int >\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node17 [shape=\"box\",label=\"Templ< T >\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classTempl" << Doxygen::htmlFileExtension << "\"];\n";
dotText << " Node18 -> Node9 [dir=back,color=\"darkorchid3\",fontsize=\"" << FONTSIZE << "\",style=\"dashed\",label=\"m_usedClass\",fontname=\"" << FONTNAME << "\"];\n";
dotText << " Node18 [shape=\"box\",label=\"Used\",fontsize=\"" << FONTSIZE << "\",height=0.2,width=0.4,fontname=\"" << FONTNAME << "\",color=\"black\",URL=\"$classUsed" << Doxygen::htmlFileExtension << "\"];\n";
writeGraphFooter(dotText);
dotFile.close();
......@@ -3287,9 +3298,9 @@ void DotGroupCollaboration::writeGraphHeader(QTextStream &t) const
{
t << " bgcolor=\"transparent\";" << endl;
}
t << " edge [fontname=\"" << FONTNAME << "\",fontsize=8,"
"labelfontname=\"" << FONTNAME << "\",labelfontsize=8];\n";
t << " node [fontname=\"" << FONTNAME << "\",fontsize=10,shape=record];\n";
t << " edge [fontname=\"" << FONTNAME << "\",fontsize=\"" << FONTSIZE << "\","
"labelfontname=\"" << FONTNAME << "\",labelfontsize=\"" << FONTSIZE << "\"];\n";
t << " node [fontname=\"" << FONTNAME << "\",fontsize=\"" << FONTSIZE << "\",shape=record];\n";
t << " rankdir=LR;\n";
}
......@@ -3301,8 +3312,8 @@ void writeDotDirDepGraph(QTextStream &t,DirDef *dd)
t << " bgcolor=transparent;\n";
}
t << " compound=true\n";
t << " node [ fontsize=10, fontname=\"" << FONTNAME << "\"];\n";
t << " edge [ labelfontsize=9, labelfontname=\"" << FONTNAME << "\"];\n";
t << " node [ fontsize=\"" << FONTSIZE << "\", fontname=\"" << FONTNAME << "\"];\n";
t << " edge [ labelfontsize=\"" << FONTSIZE << "\", labelfontname=\"" << FONTNAME << "\"];\n";
QDict<DirDef> dirsInGraph(257);
......@@ -3312,7 +3323,7 @@ void writeDotDirDepGraph(QTextStream &t,DirDef *dd)
t << " subgraph cluster" << dd->parent()->getOutputFileBase() << " {\n";
t << " graph [ bgcolor=\"#ddddee\", pencolor=\"black\", label=\""
<< dd->parent()->shortName()
<< "\" fontname=\"" << FONTNAME << "\", fontsize=10, URL=\"";
<< "\" fontname=\"" << FONTNAME << "\", fontsize=\"" << FONTSIZE << "\", URL=\"";
t << dd->parent()->getOutputFileBase() << Doxygen::htmlFileExtension;
t << "\"]\n";
}
......
......@@ -383,7 +383,7 @@ static const char tabs_css[] =
" float : left;\n"
" background : url(\"tab_r.gif\") no-repeat right top;\n"
" border-bottom : 1px solid #84B0C7;\n"
" font-size : x-small;\n"
" font-size : 8px;\n"
" font-weight : bold;\n"
" text-decoration : none;\n"
"}\n"
......@@ -417,7 +417,7 @@ static const char tabs_css[] =
"\n"
"DIV.tabs TD\n"
"{\n"
" font-size : x-small;\n"
" font-size : 8px;\n"
" font-weight : bold;\n"
" text-decoration : none;\n"
"}\n"
......
......@@ -831,8 +831,7 @@ class LayoutParser : public QXmlDefaultHandler
}
QCString baseFile = mapping[i].baseFile;
QCString title = convertToQCString(attrib.value("title"));
QCString visible = convertToQCString(attrib.value("visible"));
bool isVisible = visible.isEmpty() || (visible!="no" && visible!="0");
bool isVisible = elemIsVisible(attrib);
if (title.isEmpty()) // use default title
{
title = mapping[i].mainName; // use title for main row
......
......@@ -10,7 +10,7 @@
" </tab>\n"
" <tab type=\"classes\" visible=\"yes\" title=\"\">\n"
" <tab type=\"classes\" visible=\"yes\" title=\"\"/>\n"
" <tab type=\"classindex\" visible=\"no\" title=\"\"/> \n"
" <tab type=\"classindex\" visible=\"$ALPHABETICAL_INDEX\" title=\"\"/> \n"
" <tab type=\"hierarchy\" visible=\"yes\" title=\"\"/>\n"
" <tab type=\"classmembers\" visible=\"yes\" title=\"\"/>\n"
" </tab>\n"
......
......@@ -10,7 +10,7 @@
</tab>
<tab type="classes" visible="yes" title="">
<tab type="classes" visible="yes" title=""/>
<tab type="classindex" visible="no" title=""/>
<tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/>
<tab type="hierarchy" visible="yes" title=""/>
<tab type="classmembers" visible="yes" title=""/>
</tab>
......
......@@ -111,7 +111,8 @@ DefineDict* getFileDefineDict() {
static void setFileName(const char *name)
{
bool ambig;
g_yyFileName=name;
QFileInfo fi(name);
g_yyFileName=convertToQCString(fi.absFilePath());
g_yyFileDef=findFileDef(Doxygen::inputNameDict,g_yyFileName,ambig);
if (g_yyFileDef && g_yyFileDef->isReference()) g_yyFileDef=0;
}
......
......@@ -37,8 +37,8 @@ static QCString makeRef(char const * withoutExtension, char const * anchor)
Qhp::Qhp() : m_prevSectionLevel(0), m_sectionLevel(0)
{
m_toc.setIndentLevel(0);
m_doc.setIndentLevel(2);
m_doc.setIndentLevel(0);
m_toc.setIndentLevel(2);
m_index.setIndentLevel(2);
m_files.setIndentLevel(2);
}
......
......@@ -6366,7 +6366,6 @@ SrcLangExt getLanguageFromFileName(const QCString fileName)
extLookup.insert(".idl", new int(SrcLangExt_IDL));
extLookup.insert(".ddl", new int(SrcLangExt_IDL));
extLookup.insert(".odl", new int(SrcLangExt_IDL));
extLookup.insert(".ddl", new int(SrcLangExt_IDL));
extLookup.insert(".java", new int(SrcLangExt_Java));
extLookup.insert(".as", new int(SrcLangExt_JS));
extLookup.insert(".js", new int(SrcLangExt_JS));
......
......@@ -16,8 +16,7 @@
* Parser for syntax hightlighting and references for vhdl subset
* written by M. Kreis
* supports VHDL-87
* does not support all keywords of VHDL '93 (impure function/shared variables grouping ..)
* and VHDL-AMS
* does not support VHDL-AMS
******************************************************************************/
%{
......@@ -56,10 +55,10 @@
// ----------------- <vhdl> ----------------------------------
//static bool isPackBody=FALSE;
//static bool isStartMap;
static bool isFuncProto=FALSE;
static bool isComponent=FALSE;
static bool isPackageBody=FALSE;
static bool isStartMap;
static bool isProto = FALSE;
static bool isStripCode = FALSE;
......@@ -109,7 +108,7 @@ static void generateMemLink(CodeOutputInterface &ol,QCString &clName,QCString& m
static bool writeColoredWord(QCString& word );
static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool typeOnly=FALSE);
static void endFontClass();
static void startFontClass(const char *s);
//-------------------------------------------------------------------
......@@ -122,6 +121,42 @@ static void setCurrentDoc(const QCString &name,const QCString &base,const QCStri
}
}
static bool checkString(QCString &name)
{
if (name.isEmpty()) return FALSE;
static QRegExp regg("[ \t\"]");
int len=name.length();
if (name.at(0)=='"' && name.at(len-1)=='"' && len > 2)
{
QStringList qrl=QStringList::split(regg,name,FALSE);
if (VhdlDocGen::isNumber((QCString)qrl[0]))
{
g_code->codify("\"");
startFontClass("vhdllogic");
QCString mid=name.mid(1,len-2); //" 1223 "
g_code->codify(mid.data());
endFontClass();
g_code->codify("\"");
}
else
{
startFontClass("keyword");
g_code->codify(name.data());
endFontClass();
}
return TRUE;
}
if (VhdlDocGen::isNumber(name))
{
startFontClass("vhdllogic");
g_code->codify(name.data());
endFontClass();
return TRUE;
}
return FALSE;
}
static void addToSearchIndex(const char *text)
{
......@@ -220,7 +255,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F
for (unsigned int j=0;j<ttt.length();j++)
{
char c=ttt.at(j);
if (c==' '|| c==',' || c==';' || c==':' || c=='(' || c==')' || c=='\r' || c=='\t')
if (c==' '|| c==',' || c==';' || c==':' || c=='(' || c==')' || c=='\r' || c=='\t' || c=='.')
{
if (found)
{
......@@ -242,6 +277,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F
}
else
{
if (!checkString(temp))
g_code->codify(temp.data());
}
}
......@@ -278,6 +314,13 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F
}
else
{
QCString qc(temp.data());
if (VhdlDocGen::isNumber(qc)){
startFontClass("vhdllogic");
g_code->codify(temp.data());
endFontClass();
}
else
g_code->codify(temp.data());
}
}
......@@ -558,8 +601,11 @@ static QCString g_temp;
/* writes and links a port map statement */
static void codifyMapLines(char *text)
{
if (text==NULL) return;
g_temp.resize(0);
bool dot=FALSE;
//bool dot=FALSE;
int wordCounter=0;
QCString ctemp;
//printf("codifyLines(%d,\"%s\")\n",g_yyLineNr,text);
char *p=text,*sp=p;
char c;
......@@ -567,110 +613,42 @@ static void codifyMapLines(char *text)
while (!done)
{
sp=p;
while ((c=*p++) && c!='\n' && c!=':' && c != ' ' && c != '(')
while ((c=*p++) && c!='\n' && c!=':' && c != ' ' && c != '(' && c!='\0' && c!='\t')
{
if (c!=0x9)
g_temp+=c;
}
//printf("--> g_temp='%s'\n",g_temp.data());
if (c=='\n')
{
g_yyLineNr++;
*(p-1)='\0';
//if (dot==TRUE)
//{
QCString tt=g_temp;
tt=tt.lower();
tt=tt.stripWhiteSpace();
QCString *ss;
if ((ss=VhdlDocGen::findKeyWord(tt)))
{
writeFont(ss->data(),g_temp);
}
else
{
generateClassOrGlobalLink(*g_code,sp);
if (dot) g_PortMapComp=tt;
}
dot=FALSE;
g_temp.resize(0);
//}
//else
//{
// g_code->codify(g_temp);
// g_temp.resize(0);
//}
endCodeLine();
if (g_yyLineNr<g_inputLines)
{
startCodeLine();
}
}
else
{
if (c==':')
{
dot = TRUE;
g_code->codify(g_temp);
g_code->codify(":");
g_temp.resize(0);
}
if (c=='\0') return;
if (!g_temp.isEmpty()) wordCounter++;
if (c==' ' && !g_temp.isEmpty())
if (!g_temp.isEmpty())
{
//if (dot==TRUE)
//{
QCString tt=g_temp;
// tt=tt.lower();
QCString *ss;
if ((ss=VhdlDocGen::findKeyWord(tt)))
// different kinds of component instantiations
// xxx:yyy (generic/port) map(
// xxx:(entity/component/configuration) yyy (generic/port) map(
// xxx: entity yyy(zzz) (generic/port) map(
if (wordCounter==2 || wordCounter==3)
{
writeFont(ss->data(),g_temp);
}
else
QCString q=g_temp.lower(); // consider (upper/lower) cases
if (q=="entity" || q=="component" || q=="configuration" || q=="port" || q=="generic")
{
g_PortMapComp=tt;
generateClassOrGlobalLink(*g_code,g_temp);
}
dot=FALSE;
g_temp.resize(0);
g_temp+=c;
//}
//else
//{
// g_temp+=c;
// g_code->codify(g_temp.data());
// g_temp.resize(0);
//}
}
else if (!g_temp.isEmpty())
{
if (c!='(' && c!=' ')
{
g_temp+=c;
}
QCString *ss;
if ((ss=VhdlDocGen::findKeyWord(g_temp.lower().stripWhiteSpace())))
{
writeFont(ss->data(),g_temp);
generateMemLink(*g_code,g_CurrClass,g_temp);
}
else
{
g_code->codify(g_temp);
g_PortMapComp=g_temp;
generateClassOrGlobalLink(*g_code,g_temp);
}
g_temp.resize(0);
}
else
{
g_code->codify(" ");
}
if (c=='(')
{
g_code->codify("(");
done=TRUE;
generateMemLink(*g_code,g_CurrClass,g_temp);
}
}
ctemp.fill(c,1);
codifyLines(ctemp.data());
ctemp.resize(0);
g_temp.resize(0);
}//while
}//codifymaplines
......@@ -686,13 +664,13 @@ static void writeFuncProto()
QStringList qlist=QStringList::split(name.data(),g_FuncProto,FALSE);
QCString temp=(QCString)qlist[0];
codifyLines(temp.data());
codifyLines(temp.data(),g_CurrClass.data());
g_FuncProto.stripPrefix(temp.data());
temp.resize(0);
temp=g_CurrClass;
if (isPackageBody)
{
temp.stripPrefix("_");
temp.stripPrefix("_");// _{package body name}
}
MemberDef *mdef=VhdlDocGen::findFunction(ql,name,temp,FALSE);
......@@ -700,11 +678,11 @@ static void writeFuncProto()
{
generateFuncLink(*g_code,mdef);
g_FuncProto.stripPrefix(name.data());
codifyLines(g_FuncProto.data());
codifyLines(g_FuncProto.data(),g_CurrClass.data());
}
else
{
codifyLines(g_FuncProto.data());
codifyLines(g_FuncProto.data(),g_CurrClass.data());
}
}// writeFuncProto
......@@ -748,26 +726,26 @@ static int yyread(char *buf,int max_size)
B [ \t]
BN [ \t\n\r]
STRING ["][^"\n]*["]
NAME [a-z_A-Z][ a-z_A-Z0-9]*
FUNCNAME [a-z_A-Z"][a-z_A-Z0-9+*"/=<>-]*
ID "$"?[a-z_A-Z][a-z_A-Z0-9]*
SPECSIGN [:;, "+*&\/=<>'\t]*
DIGITSS [0-9]+|[0-9]+"."[0-9]+|[0-9]+"#"[0-9_a-fA-F\+\.]+"#"
ALLTYPESMAP {B}*[_a-zA-Z0-9. ]+{B}*
ALLTYPESMAP1 {B}*[_a-zA-Z0-9.() ]+{B}*
SPECSIGN [:;, +*&\/=<>'\t]*
DIGITSS [0-9]+|[0-9]+("#")*[0-9_a-fA-F\+\.\-]+("#")*
ALLTYPESMAP {B}*[_a-zA-Z0-9. ]+{BN}*
ALLTYPESMAP1 {BN}*[_a-zA-Z0-9.() ]+{BN}*
ARCHITECTURE ^{B}*("architecture"){BN}+{FUNCNAME}{BN}+("of"){BN}+{FUNCNAME}
PROCESS ({BN}*{FUNCNAME}{B}*[:]+{BN}*("process"){BN}*[(]*)|[^a-zA-Z]("process "|"process("){BN}*[ (]*|[^a-zA-Z]("process"){BN}+
PROCESS ({BN}*{FUNCNAME}{BN}*[:]+{BN}*("process"){BN}*[(]*)|[^a-zA-Z]("process "|"process("){BN}*[ (]*|[^a-zA-Z]("process"){BN}+
END1 {B}*("end "){BN}+("if"|"case"|"loop"|"generate")
END1 {B}*("end "){BN}+("if"|"case"|"loop"|"generate"|"for")
END2 [^a-zA-Z_]("end"){BN}*[;]
END3 {BN}*[^a-zA-Z]("end"){BN}+{FUNCNAME}{BN}*[;]
END4 {B}*("end"){BN}+"function"{BN}+{FUNCNAME}{BN}*[;]
ENDEFUNC {END3}|{END4}|{END2}
KEYWORD ("new"|"event"|"break"|"case"|"end"|"loop"|"else"|"for"|"goto"|"if"|"return"|"generate"|"is"|"while"|"in")
TYPEKW ^{B}*("type"|"subtype"|"constant"|"attribute"|"signal"|"variable")
TYPEKW ^{B}*("type"|"subtype"|"constant"|"attribute"|"signal"|"variable","alias","configuration")
FUNC ^{B}*("function"|"procedure"){BN}*{FUNCNAME}{BN}*("(")
ARITHOP "+"|"-"|"/"|"*"|"%"|"/="|":="
......@@ -784,11 +762,10 @@ BRACECLOSE [)]{1}
TEXTT {B}*"--"[^\n]*
MAPCOMPONENT1 ({ALLTYPESMAP}[:]{ALLTYPESMAP}{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
MAPCOMPONENT1 ({ALLTYPESMAP}[:]{ALLTYPESMAP}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
MAPCOMPONENT2 {BN}*("port"|"generic"){BN}+("map"){BN}*("("){1}
MAPCOMPONENT3 ({ALLTYPESMAP}[:]{ALLTYPESMAP1}{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
MAPCOMPONENT3 ({ALLTYPESMAP}[:]{BN}*{ALLTYPESMAP1}{TEXTT}*{BN}+("port"|"generic"){BN}+("map"){BN}*("("){1})
MAPCOMPONENT4 ({ALLTYPESMAP}[:]{BN}*("entity"|"component"|"configuration"){BN}+{ALLTYPESMAP1}{TEXTT}*{BN}*("port"|"generic"){BN}*("map"){BN}*("("){1})
%option noyywrap
%option nounput
......@@ -814,12 +791,12 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<Map>{BRACEOPEN} {
g_braceCount++;
writeFont("vhdlchar",yytext);
writeFont("vhdlchar",vhdlcodeYYtext);
BEGIN(Map);
}
<Map>[^()\n,]* { /* write and link a port map lines */
QCString tt(yytext);
<Map>[^()\n,--]* { /* write and link a port map lines */
QCString tt(vhdlcodeYYtext);
VhdlDocGen::deleteAllChars(tt,',');
QRegExp r("=>");
QStringList ql=QStringList::split(r,tt,FALSE);
......@@ -871,6 +848,7 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
cc=t1.at(index);
}
s2=s2.stripWhiteSpace();
if (!checkString(s2))
generateMemLink(*g_code,g_CurrClass,s2);
while (index++<t1.size())
{
......@@ -882,19 +860,22 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
}
else
{
codifyLines(yytext,g_CurrClass.data());
codifyLines(vhdlcodeYYtext,g_CurrClass.data());
}
BEGIN(Map);
}
<Map>{TEXTT} {
writeFont("keyword",vhdlcodeYYtext);
}
<Map>"\n"|"," {
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
BEGIN(Map);
}
<Map>{BRACECLOSE} {
g_braceCount--;
writeFont("vhdlchar",yytext);
writeFont("vhdlchar",vhdlcodeYYtext);
if (g_braceCount==0)
{
BEGIN(Bases);
......@@ -902,9 +883,9 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
}
<ParseFuncProto>{NAME} {
QCString tmp(yytext);
QCString tmp(vhdlcodeYYtext);
tmp=tmp.stripWhiteSpace();
appStringLower(g_PrevString,yytext);
appStringLower(g_PrevString,vhdlcodeYYtext);
g_vhdlKeyDict.insert(g_PrevString,new QCString(g_PrevString.data()));
if (!writeColoredWord(tmp))
{
......@@ -913,11 +894,21 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
BEGIN(Bases);
}
<ParseType>{STRING} {
QCString qcs(vhdlcodeYYtext);
VhdlDocGen::deleteAllChars(qcs,'"');
VhdlDocGen::deleteAllChars(qcs,' ');
if (VhdlDocGen::isNumber(qcs))
writeFont("vhdllogic",vhdlcodeYYtext);
else
writeFont("keyword",vhdlcodeYYtext);
}
<ParseType>"\n" {
g_FuncProto.append(yytext);
g_FuncProto.append(vhdlcodeYYtext);
if (isProto)
{
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
}
BEGIN(ParseType);
}
......@@ -926,18 +917,18 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<ParseType>{TEXTT} {
if (!isStripCode)
{
g_FuncProto.append(yytext);
g_FuncProto.append(vhdlcodeYYtext);
if (isProto)
{
writeFont("keyword",yytext);
writeFont("keyword",vhdlcodeYYtext);
}
BEGIN(ParseType);
}
}
<ParseType>{ENDEFUNC} {
QCString tt(yytext);
codifyLines(yytext);
QCString tt(vhdlcodeYYtext);
codifyLines(vhdlcodeYYtext,g_CurrClass.data());
tt=tt.lower();
VhdlDocGen::deleteAllChars(tt,';');
tt.stripWhiteSpace();
......@@ -957,27 +948,27 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
}
<ParseType>{END1} {
codifyLines(yytext);
codifyLines(vhdlcodeYYtext,g_CurrClass.data());
g_vhdlKeyDict.clear();
}
<ParseType>^{B}*("begin "|"begin") {
codifyLines(yytext);
codifyLines(vhdlcodeYYtext,g_CurrClass.data());
isFuncProto=FALSE;
}
<ParseType>{SPECSIGN} {
g_FuncProto.append(yytext);
g_FuncProto.append(vhdlcodeYYtext);
if (isProto)
{
codifyLines(yytext);
codifyLines(vhdlcodeYYtext,g_CurrClass.data());
}
}
<ParseType>["_a-zA-Z0-9]* {
QCString val(yytext);
g_FuncProto.append(yytext);
appStringLower(g_PrevString,yytext);
QCString val(vhdlcodeYYtext);
g_FuncProto.append(vhdlcodeYYtext);
appStringLower(g_PrevString,vhdlcodeYYtext);
if (isFuncProto && g_braceCount==0)
{
......@@ -991,11 +982,18 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
if (!isFuncProto && !g_vhdlKeyDict.find(g_PrevString))
{
val=val.stripWhiteSpace();
if (VhdlDocGen::isNumber(val))
{
startFontClass("vhdllogic");
codifyLines(vhdlcodeYYtext,g_CurrClass.data());
endFontClass();
}
else
generateMemLink(*g_code,g_CurrClass,val);
}
else
{
codifyLines(yytext);
codifyLines(vhdlcodeYYtext,g_CurrClass.data());
}
}
}
......@@ -1007,7 +1005,7 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
g_FuncProto+='(';
if (isProto)
{
writeFont("vhdlchar",yytext);
writeFont("vhdlchar",vhdlcodeYYtext);
}
BEGIN(ParseType);
}
......@@ -1017,12 +1015,12 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
g_FuncProto+=')';
if (isProto)
{
writeFont("vhdlchar",yytext);
writeFont("vhdlchar",vhdlcodeYYtext);
}
if (g_braceCount==0 && !isProto)// && !isPackageBody)
{
isProto=TRUE;
appStringLower(g_PrevString,yytext);
appStringLower(g_PrevString,vhdlcodeYYtext);
writeFuncProto();
BEGIN(Bases);
}
......@@ -1035,18 +1033,18 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<ClassesName>{FUNCNAME} {
QDict<QCString> mem;
appStringLower(g_PrevString,yytext);
appStringLower(g_PrevString,vhdlcodeYYtext);
g_CurrClass.resize(0);
g_CurrClass.append(yytext);
g_CurrClass.append(vhdlcodeYYtext);
g_CurrClass=g_CurrClass.stripWhiteSpace();
if (!writeColoredWord(g_CurrScope))
{
generateClassOrGlobalLink(*g_code,yytext);
generateClassOrGlobalLink(*g_code,vhdlcodeYYtext);
}
else
{
g_code->codify(yytext);
codifyLines(vhdlcodeYYtext,g_CurrClass.data());
}
BEGIN(Bases);
}
......@@ -1054,13 +1052,13 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<ParseComponent>{BRACEOPEN} {
g_braceCount++;
g_code->codify(yytext);
g_code->codify(vhdlcodeYYtext);
}
<ParseComponent>{BRACECLOSE} {
g_braceCount--;
g_code->codify(yytext);
g_code->codify(vhdlcodeYYtext);
if (g_braceCount==0 && !isComponent)
{
g_tempComp.resize(0);
......@@ -1073,24 +1071,26 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
}
<ParseComponent>{B}*"-" {
if (strlen(yytext)>=2) // found text ?
if (strlen(vhdlcodeYYtext)>=2) // found text ?
{
writeFont("keyword",yytext);
writeFont("keyword",vhdlcodeYYtext);
}
else
{
writeFont("vhdlchar",yytext);
writeFont("vhdlchar",vhdlcodeYYtext);
}
}
<ParseComponent>{SPECSIGN} {
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
}
<ParseComponent>"\n"|" " {
if (!isStripCode)
{
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
}
else
{
......@@ -1099,50 +1099,61 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
}
<ParseComponent>{TEXTT} {
QCString text(yytext);
QCString text(vhdlcodeYYtext);
if (!isStripCode)
{
writeFont("keyword",yytext);
writeFont("keyword",vhdlcodeYYtext);
}
}
<ParseComponent>{DIGITSS} {
startFontClass("vhdllogic");
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
endFontClass();
}
<ParseComponent>{PORT} {
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
g_braceCount=1;
isComponent=FALSE;
}
<ParseComponent>{GENERIC} {
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
g_braceCount=1;
}
<ParseComponent>[_a-zA_Z][_a-zA-Z0-9]* {
QCString temp(yytext);
appStringLower(g_PrevString,yytext);
QCString temp(vhdlcodeYYtext);
appStringLower(g_PrevString,vhdlcodeYYtext);
if (!checkString(temp)){
if (!writeColoredWord(g_PrevString))
{
generateMemLink(*g_code,g_tempComp,temp);
}
}
}
<ParseComponent>{STRING} {
QCString temp(vhdlcodeYYtext);
if (!checkString(temp))
codifyLines(vhdlcodeYYtext);
}
<ParseProcessProto>[^()]* {
g_FuncProto.append(yytext);
g_FuncProto.append(vhdlcodeYYtext);
}
<ParseProcessProto>{BRACEOPEN} {
g_FuncProto.append(yytext);
g_FuncProto.append(vhdlcodeYYtext);
g_braceCount++;
}
<ParseProcessProto>{BRACECLOSE} {
g_FuncProto.append(yytext);
g_FuncProto.append(vhdlcodeYYtext);
g_braceCount--;
if (g_braceCount==0)
{
......@@ -1152,7 +1163,7 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
}
<ParsePackage>[^:;]* { //found package
QCString temp(yytext);
QCString temp(vhdlcodeYYtext);
QStringList strl=QStringList::split(".",temp,FALSE);
if (strl.count()>2)
......@@ -1162,7 +1173,7 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
QCString s3=(QCString)strl[2];
s1.append(".");
s3.prepend(".");
codifyLines(s1.data());
codifyLines(s1.data(),g_CurrClass.data());
ClassDef *cd=VhdlDocGen::getPackageName(s2);
if (cd)
{
......@@ -1176,13 +1187,14 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
}
else
{
writeFont("keywordflow",yytext);
writeFont("keywordflow",vhdlcodeYYtext);
}
BEGIN(Bases);
}
<Bases>{MAPCOMPONENT1}|{MAPCOMPONENT2}|{MAPCOMPONENT3} { // found port or generic map
QCString tt(yytext);
<Bases>{MAPCOMPONENT1}|{MAPCOMPONENT2}|{MAPCOMPONENT3}|{MAPCOMPONENT4} { // found port or generic map
QCString tt(vhdlcodeYYtext);
/*
if (tt.contains(':',FALSE))
{
isStartMap=TRUE;
......@@ -1191,6 +1203,7 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
{
isStartMap=FALSE;
}
*/
int j=tt.find('.');
if (j>0)
......@@ -1222,21 +1235,24 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
}
else
{
if (tt.contains(':',FALSE))
codifyMapLines(tt.data());
else
codifyLines(tt.data());
}
g_braceCount=1;
BEGIN(Map);
}
<Bases>^{B}*("component"){BN}+{FUNCNAME} { // found component
appStringLower(g_PrevString,yytext);
// writeFont("keywordflow",VhdlDocGen::getIndexWord(yytext,0).data());
appStringLower(g_PrevString,vhdlcodeYYtext);
// writeFont("keywordflow",VhdlDocGen::getIndexWord(vhdlcodeYYtext,0).data());
// writeFont("vhdlkeyword"," ");
QCString temp=VhdlDocGen::getIndexWord(yytext,1);
QCString temp=VhdlDocGen::getIndexWord(vhdlcodeYYtext,1);
temp=temp.stripWhiteSpace();
VhdlDocGen::deleteAllChars(temp,'\n');
g_tempComp=temp;
codifyLines(yytext,temp.data(),TRUE);
codifyLines(vhdlcodeYYtext,temp.data(),TRUE);
g_braceCount=0;
//if (getClass(temp.data()))
......@@ -1252,22 +1268,22 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<Bases>{ARCHITECTURE} { // found architecture
g_PortMapComp.resize(0);
// writeFont("vhdlkeyword",VhdlDocGen::getIndexWord(yytext,0).data());
// writeFont("vhdlkeyword",VhdlDocGen::getIndexWord(vhdlcodeYYtext,0).data());
// writeFont("vhdlkeyword"," ");
// writeFont("vhdlchar",VhdlDocGen::getIndexWord(yytext,1).data());
// writeFont("vhdlchar",VhdlDocGen::getIndexWord(vhdlcodeYYtext,1).data());
// writeFont("vhdlkeyword"," ");
// writeFont("vhdlkeyword",VhdlDocGen::getIndexWord(yytext,2).data());
// writeFont("vhdlkeyword",VhdlDocGen::getIndexWord(vhdlcodeYYtext,2).data());
// writeFont("vhdlkeyword"," ");
//QCString temp=VhdlDocGen::getIndexWord(yytext,1);
//QCString temp=VhdlDocGen::getIndexWord(vhdlcodeYYtext,1);
//temp=temp.stripWhiteSpace();
//temp+=("-");
//temp+=VhdlDocGen::getIndexWord(yytext,3);
QCString temp = VhdlDocGen::getIndexWord(yytext,3);
//temp+=VhdlDocGen::getIndexWord(vhdlcodeYYtext,3);
QCString temp = VhdlDocGen::getIndexWord(vhdlcodeYYtext,3);
temp+="::";
temp+=VhdlDocGen::getIndexWord(yytext,1);
temp+=VhdlDocGen::getIndexWord(vhdlcodeYYtext,1);
g_CurrClass=temp;
VhdlDocGen::deleteAllChars(temp,'\n');
codifyLines(yytext,temp.data(),TRUE);
codifyLines(vhdlcodeYYtext,temp.data(),TRUE);
//generateClassOrGlobalLink(*g_code,temp.data());
isPackageBody=FALSE;
BEGIN(ClassName);
......@@ -1275,13 +1291,13 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<Bases>^{B}*("package "){BN}*("body"){BN}*{FUNCNAME} { // found package body
QCString ss(yytext);
QCString temp=VhdlDocGen::getIndexWord(yytext,2);
QCString ss(vhdlcodeYYtext);
QCString temp=VhdlDocGen::getIndexWord(vhdlcodeYYtext,2);
QStringList ql=QStringList::split(temp,ss,FALSE);
QCString ll=(QCString)ql[0];
codifyLines(ll.data());
codifyLines(ll.data(),g_CurrClass.data());
temp=temp.stripWhiteSpace();
// temp.prepend("_");
temp.prepend("_");
generateClassOrGlobalLink(*g_code,temp.data());
g_CurrClass.resize(0);
g_CurrClass=temp;
......@@ -1293,9 +1309,9 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<Bases>{PROCESS} { // found process
isFuncProto=TRUE;
g_FuncProto.resize(0);
g_FuncProto.append(yytext);
g_FuncProto.append(vhdlcodeYYtext);
g_vhdlKeyDict.clear();
appStringLower(g_PrevString,yytext);
appStringLower(g_PrevString,vhdlcodeYYtext);
if (g_PrevString.contains('('))
{
g_braceCount=1;
......@@ -1309,28 +1325,33 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<Bases>("end"){BN}+("process") { // end of process
isFuncProto=FALSE;
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
BEGIN(Bases);
}
<Bases>^{B}*("begin "|"begin") {
isFuncProto=FALSE;
writeFont("vhdlkeyword",yytext);
writeFont("vhdlkeyword",vhdlcodeYYtext);
}
<Bases>^{B}*("use"|"library"){BN}+ { //found including package or library
writeFont("vhdlkeyword",yytext);
<Bases>^{B}*("use"|"library"){BN}+ { //found package or library
writeFont("vhdlkeyword",vhdlcodeYYtext);
BEGIN(ParsePackage);
}
<Bases>^{B}*("use"){BN}+("configuration")[^\n]* {
codifyLines(vhdlcodeYYtext);
}
<Bases>{FUNC} { // founc function|procedure
<Bases>{FUNC} { // found function|procedure
g_vhdlKeyDict.clear();
g_FuncProto.resize(0);
isProto=FALSE;
g_FuncProto.append(yytext);
g_FuncProto.append(vhdlcodeYYtext);
g_braceCount=1;
BEGIN(ParseType);
}
......@@ -1338,27 +1359,27 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<Bases>^{B}*("entity"|"package"){BN}+ {
appStringLower(g_PrevString,yytext);
writeFont("keywordflow",yytext);
appStringLower(g_PrevString,vhdlcodeYYtext);
writeFont("keywordflow",vhdlcodeYYtext);
isPackageBody=FALSE;
BEGIN(ClassesName);
}
<Bases>{KEYWORD} { // found keyword
QCString qcs(yytext);
QCString qcs(vhdlcodeYYtext);
if (!writeColoredWord(qcs))
{
startFontClass("vhdlchar");
g_code->codify(yytext);
g_code->codify(vhdlcodeYYtext);
endFontClass();
}
}
<Bases>{ID} {
appStringLower(g_PrevString,yytext);
QCString temp(yytext);
appStringLower(g_PrevString,vhdlcodeYYtext);
QCString temp(vhdlcodeYYtext);
temp=temp.stripWhiteSpace();
if (!writeColoredWord(temp))
......@@ -1371,14 +1392,17 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<Bases,ParseComponent>{DIGITSS} {
startFontClass("vhdllogic");
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
endFontClass();
}
<Bases>^{B}*("use"){BN}+("entity"|"component")[^\n]* {
codifyLines(vhdlcodeYYtext,g_CurrClass.data(),TRUE);
}
<Bases>{TYPEKW} {
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
if (isFuncProto)
{
BEGIN(ParseFuncProto);
......@@ -1391,23 +1415,31 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
<Bases>{OPERATOR} {
startFontClass("vhdlchar");
g_code->codify(yytext);
g_code->codify(vhdlcodeYYtext);
endFontClass();
}
<Bases>","|"."|":"|"'"|"("|")" {
startFontClass("vhdlchar");
g_code->codify(yytext);
g_code->codify(vhdlcodeYYtext);
endFontClass();
}
<Bases>{STRING} {
QCString qcs(vhdlcodeYYtext);
VhdlDocGen::deleteAllChars(qcs,'"');
VhdlDocGen::deleteAllChars(qcs,' ');
if (VhdlDocGen::isNumber(qcs))
writeFont("vhdllogic",vhdlcodeYYtext);
else
writeFont("keyword",vhdlcodeYYtext);
}
<*>\n {
if (!isStripCode)
{
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
}
else
{
......@@ -1417,12 +1449,12 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
}
<*>. {
g_code->codify(yytext);
g_code->codify(vhdlcodeYYtext);
}
<*>{TEXTT} { // found text
bool stripLine=FALSE;
QCString text(yytext);
QCString text(vhdlcodeYYtext);
if (Config_getBool("STRIP_CODE_COMMENTS"))
{
if (text.contains("--!"))
......@@ -1432,7 +1464,7 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
}
if (!isStripCode && !stripLine)
{
writeFont("keyword",yytext);
writeFont("keyword",vhdlcodeYYtext);
BEGIN(Bases);
}
}
......@@ -1441,7 +1473,7 @@ MAPPORT {BN}*("port"|"generic"){BN}*("map"){BN}*("("){1}
if (!Config_getBool("STRIP_CODE_COMMENTS"))
{
startFontClass("keyword");
codifyLines(yytext);
codifyLines(vhdlcodeYYtext);
endFontClass();
}
}
......
......@@ -75,7 +75,7 @@ static const char* g_vhdlKeyWordMap0[] =
"range", "record", "register", "reject", "report", "return","select",
"severity", "shared", "signal", "subtype", "then", "to", "transport",
"type","unaffected", "units", "until", "use","variable", "wait", "when",
"while", "with",0
"while", "with","true","false",0
};
// type
......@@ -302,11 +302,28 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem
(VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS)
{
Definition *d = cd->getOuterScope();
if (d && d->definitionType()==Definition::TypeClass)
// searching upper/lower case names
QCString tt=d->name();
ClassDef *ecd =getClass(tt);
if (!ecd)
{
tt=tt.upper();
ecd =getClass(tt);
}
else if (!ecd)
{
ClassDef *ecd = (ClassDef*)d;
tt=tt.lower();
ecd =getClass(tt);
}
if (ecd) //d && d->definitionType()==Definition::TypeClass)
{
//ClassDef *ecd = (ClassDef*)d;
mdef=VhdlDocGen::findMemberDef(ecd,memName,MemberList::variableMembers);
if (mdef) return mdef;
mdef=VhdlDocGen::findMemberDef(cd,memName,MemberList::pubMethods);
if (mdef) return mdef;
}
//cd=getClass(getClassName(cd));
//if (!cd) return 0;
......@@ -317,11 +334,23 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem
if ((VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::ARCHITECTURECLASS ||
(VhdlDocGen::VhdlClasses)cd->protection()==VhdlDocGen::PACKBODYCLASS)
{
//QCString tempClass=getClassName(cd);
Definition *d = cd->getOuterScope();
if (d && d->definitionType()==Definition::TypeClass)
QCString tt=d->name();
ClassDef *ecd =getClass(tt);
if (!ecd)
{
tt=tt.upper();
ecd =getClass(tt);
}
if (!ecd)
{
tt=tt.lower();
ecd =getClass(tt);
}
if (ecd) //d && d->definitionType()==Definition::TypeClass)
{
ClassDef *ecd = (ClassDef*)d;
VhdlDocGen::findAllPackages(ecd->className(),packages);
}
}
......@@ -333,6 +362,16 @@ MemberDef* VhdlDocGen::findMember(const QCString& className, const QCString& mem
if (curString)
{
cd=VhdlDocGen::getPackageName(*curString);
if (!cd)
{
*curString=curString->upper();
cd=VhdlDocGen::getPackageName(*curString);
}
if (!cd)
{
*curString=curString->lower();
cd=VhdlDocGen::getPackageName(*curString);
}
}
if (cd)
{
......@@ -1296,6 +1335,16 @@ void VhdlDocGen::writeFormatString(QCString& qcs,OutputList&ol,const MemberDef*
bool VhdlDocGen::isNumber(const QCString& s)
{
// static bool veriOpt=Config_getBool("OPTIMIZE_OUTPUT_VERILOG");
static QRegExp regg("[0-9][0-9eEfFbBcCdDaA_.#-]*");
if (s.isEmpty()) return false;
int j,len;
j = regg.match(s.data(),0,&len);
if ((j==0) && (len==(int)s.length())) return true;
return false;
#if 0
int len=s.length();
if (len==0) return FALSE;
for (int j=0;j<len;j++)
......@@ -1304,9 +1353,9 @@ bool VhdlDocGen::isNumber(const QCString& s)
return FALSE;
}
return TRUE;
#endif
}// isNumber
void VhdlDocGen::startFonts(const QCString& q, char *keyword,OutputList& ol)
{
ol.startFontClass(keyword);
......@@ -1485,7 +1534,7 @@ void VhdlDocGen::writeFunctionProto(OutputList& ol,const ArgumentList* al,const
ol.startBold();
ol.docify(" )");
const char *exp=mdef->excpString();
if(exp)
if (exp)
{
ol.insertMemberAlign();
ol.docify("[ ");
......@@ -1721,7 +1770,8 @@ void VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definit
if (memdef && memdef->isLinkable())
{
ol.startBold();
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,mdef->typeString());
//ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,mdef->typeString());
writeLink(memdef,ol);
ol.endBold();
ol.docify(" ");
}
......@@ -1736,7 +1786,8 @@ void VhdlDocGen::writeVHDLTypeDocumentation(const MemberDef* mdef, const Definit
if (mdef->isVariable())
{
ol.docify(mdef->name().data());
//ol.docify(mdef->name().data());
writeLink(mdef,ol);
ol.docify(" ");
QCString ttype=mdef->typeString();
VhdlDocGen::formatString(ttype,ol,mdef);
......
......@@ -358,7 +358,7 @@ static void parseProcessProto()
VhdlDocGen::deleteAllChars(qcs,'\n');
VhdlDocGen::parseProcessProto(qcs.data(),name,ql);
current->section=Entry::FUNCTION_SEC;
current->stat=TRUE;
//current->stat=TRUE;
current->spec=VhdlDocGen::PROCESS;
current->startLine=iFuncLine;
current->bodyLine=iFuncLine;
......@@ -517,7 +517,7 @@ void parserInit()
if (g_buf==0)
{
fprintf(stderr,"\n no enough memory");
fprintf(stderr,"\n not enough memory");
return;
}
g_buf[g_bufSize-1]='\0';
......@@ -601,7 +601,7 @@ TEXTT "--"[^\/\@\*\#][^\n]*
PROC ("function"|"procedure")
ENDE ({BR}*("end"){BR}*{PROC}*{BR}*[;]{1})
ENDEFF ("if"|"case"|"loop"|"generate"){BR}*[;]
ENDE3 ({BR}*("end"){BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;])|(ENDE)
ENDE3 ({BR}*("end"){BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;])|{ENDE}
ENDFUNC {B}*"end"{BR}*{PROC}*{BR}*{FUNCNAME}{BR}*[;]
FUNCIMPURE "impure"|"pure"
FUNCPROC ^{B}*{FUNCIMPURE}*{BR}*("function"|"procedure"){B}*
......@@ -620,9 +620,9 @@ SHARED ("shared"){BR}+("variable")
SIGTYPES ^{B}*({SHARED}|"alias"|"file"|"group"|"subtype"|"type"|"constant"|"attribute"|"signal"|"units"){BR}+
CONFIG ("configuration"){BR}+{NAME}{BR}*("of"){BR}+{NAME}{BR}+"is"
ALLTYPESMAP {B}*[_a-zA-ZA_Z0-9. ]*{B}*
MAPCOMPONENT ({ALLTYPESMAP}{BR}*[:]{BR}*{ALLTYPESMAP}{BR}*{TEXTT}*{BR}*("port"|"generic"){BR}+("map"){BR}*("("){1})
ALLTYPESMAP {B}*[_a-zA-ZA_Z0-9.() ]*{B}*
MAPCOMPONENT ({ALLTYPESMAP}{BR}*[:]{BR}*("component"|"configuration")*{ALLTYPESMAP}{BR}*{TEXTT}*{BR}*("port"|"generic"){BR}*("map"){BR}*("("){1})
MAPCOMPONENT1 ({ALLTYPESMAP}{BR}*[:]{BR}*("entity"){BR}*{ALLTYPESMAP}{BR}*("port"|"generic"){BR}*("map"){BR}*("("){1})
BRACEOPEN [(]{1}
BRACECLOSE [)]{1}
......@@ -787,7 +787,7 @@ ALLID [^;()\t ]
else if (strcmp(word.data(),"component")==0)
{
current->section=Entry::VARIABLE_SEC;
current->stat=TRUE;
// current->stat=TRUE;
current->spec=VhdlDocGen::COMPONENT;
current->bodyLine=yyLineNr;
scantype=1;
......@@ -809,18 +809,39 @@ ALLID [^;()\t ]
BEGIN(FindEntityName);
}
<Start>{MAPCOMPONENT} { // found new mapped component aaa: bbb port map
<Start>{MAPCOMPONENT}|{MAPCOMPONENT1} { // found new mapped component aaa: bbb port map
lineCount();
QCString type;
QCString tt(yytext);
QRegExp regg("[ \n\t:-]");
QRegExp regg("[ \n\t:.()-]");
QStringList qsl=QStringList::split(regg,tt,false);
// consider upper/lower-case letters
QStringList qsltemp=QStringList::split(regg,tt.lower(),false);
int index=qsltemp.findIndex(QCString("entity"))+1;
index+=qsltemp.findIndex(QCString("component"))+1;
index+=qsltemp.findIndex(QCString("configuration"))+1;
int len=qsltemp.count();
current->spec=VhdlDocGen::COMPONENT_INST;
current->section=Entry::VARIABLE_SEC;
current->startLine=yyLineNr;
current->bodyLine=yyLineNr;
current->type=QCString(qsl[1]);
if (index!=0 && tt.contains(')')==0) // found component instantiation xxx: configuration/component/entity yyy
{
current->type=(QCString)qsl[len-3];
}
else if (index!=0 && tt.contains(')')) // found component instantiation xxx: entity www.yyy(zzz)
{
current->type=(QCString)qsl[len-4];
}
else
{
current->type=(QCString)qsl[1]; // found component instantiation xxx:yyy
}
current->name=QCString(qsl[0]);
if (lastCompound)
{
......@@ -832,17 +853,8 @@ ALLID [^;()\t ]
{
newEntry();
}
lineCount();
#if 0
if (current && current->spec==VhdlDocGen::ARCHITECTURE)
{
if (!VhdlDocGen::foundInsertedComponent(name,current) && !name.isEmpty())
{
BaseInfo *bb=new BaseInfo(name,Private,Normal);
current->extends->append(bb);
}
}
#endif
}
<Start>{CR}* {
......@@ -890,19 +902,36 @@ ALLID [^;()\t ]
lineCount();
QCString qcs(yytext);
QCString qreal=QCString(yytext);
qcs=qcs.stripWhiteSpace();
if (current->spec==VhdlDocGen::USE)
if (current->spec==VhdlDocGen::USE || current->spec==VhdlDocGen::LIBRARY)
{
int j=qcs.length();
int i=qcs.find(".");
if (i>0)
qcs=qcs.right(j-i-1);
j=qcs.length();
i=qcs.find(".");
if (i>0)
qcs=qcs.left(i);
/*
-- Consider the case we have more than one entity in one file.Each entity has its own package/library
-- declaration. In this case package yyy will be added [with newEntry()] to architecture aaa !! instead to entity
-- bbb. We must place these constructs to current_root and the function mapLibPackage() will finish the rest.
-- package xxx;
-- entity aaa
-- ....
-- end entity aaa;
-- architecture aaa
-- ...
-- end architecture aaa;
-- package yyy;
-- entity bbb;
*/
current->name=qcs;
Entry *copy=new Entry(*current);
current->reset();
addSubEntry(current_root,copy); // insert into entry list with mapLibPackage()
}
else if (current->spec==VhdlDocGen::ARCHITECTURE)
{
......@@ -928,6 +957,7 @@ ALLID [^;()\t ]
{
current->name+=qcs;
}
if (!(current->spec==VhdlDocGen::USE || current->spec==VhdlDocGen::LIBRARY))
newEntry();
BEGIN(Start);
......@@ -976,6 +1006,7 @@ ALLID [^;()\t ]
lineCount();
QCString comment;
QCString zz(yytext);
VhdlDocGen::deleteAllChars(zz,';'); //delete ; in unit construct
if (zz.contains("--!"))
{
QStringList ql=QStringList::split("--!",zz,FALSE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment