Commit 3102b81d authored by dimitri's avatar dimitri

Release-1.5.7.1

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