summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--addon/doxmlparser/src/dochandler.h2
-rw-r--r--addon/doxywizard/config_doxyw.l29
-rw-r--r--addon/doxywizard/wizard.cpp5
-rw-r--r--doc/arch.doc21
-rw-r--r--doc/changelog.doc12
-rw-r--r--doc/commands.doc2
-rw-r--r--doc/customize.doc4
-rw-r--r--doc/docblocks.doc8
-rw-r--r--doc/doxygen_usage.doc4
-rw-r--r--doc/extsearch.doc4
-rw-r--r--doc/faq.doc14
-rw-r--r--doc/formulas.doc2
-rw-r--r--doc/install.doc4
-rw-r--r--doc/markdown.doc5
-rw-r--r--doc/preprocessing.doc4
-rw-r--r--doc/searching.doc10
-rw-r--r--doc/starting.doc2
-rw-r--r--doc/trouble.doc2
-rw-r--r--examples/define.h4
-rw-r--r--examples/include.cpp2
-rw-r--r--examples/tclexample.tcl16
-rw-r--r--qtools/qgvector.cpp2
-rw-r--r--qtools/qstring.h6
-rw-r--r--src/CMakeLists.txt2
-rw-r--r--src/cite.cpp2
-rw-r--r--src/clangparser.h2
-rw-r--r--src/classdef.cpp4
-rw-r--r--src/classdef.h2
-rw-r--r--src/code.l9
-rw-r--r--src/commentcnv.l8
-rw-r--r--src/commentscan.l64
-rw-r--r--src/condparser.cpp2
-rw-r--r--src/config.xml21
-rw-r--r--src/context.cpp2
-rw-r--r--src/definition.cpp10
-rw-r--r--src/diagram.cpp2
-rw-r--r--src/dirdef.cpp4
-rw-r--r--src/docparser.cpp65
-rw-r--r--src/docparser.h4
-rw-r--r--src/doctokenizer.l7
-rw-r--r--src/dot.cpp98
-rw-r--r--src/dot.h28
-rw-r--r--src/doxygen.cpp2
-rw-r--r--src/filedef.cpp4
-rw-r--r--src/formula.cpp4
-rw-r--r--src/fortrancode.l83
-rw-r--r--src/fortranscanner.l49
-rw-r--r--src/ftvhelp.cpp4
-rw-r--r--src/htmldocvisitor.cpp14
-rw-r--r--src/htmlgen.cpp41
-rw-r--r--src/htmlgen.h5
-rw-r--r--src/index.cpp7
-rwxr-xr-xsrc/languages.py2
-rw-r--r--src/latexdocvisitor.cpp16
-rw-r--r--src/latexgen.cpp187
-rw-r--r--src/latexgen.h5
-rw-r--r--src/mangen.cpp8
-rw-r--r--src/mangen.h5
-rw-r--r--src/markdown.cpp8
-rw-r--r--src/memberdef.cpp9
-rw-r--r--src/namespacedef.cpp2
-rw-r--r--src/outputgen.h5
-rw-r--r--src/outputlist.h10
-rw-r--r--src/pyscanner.l39
-rw-r--r--src/rtfgen.cpp2
-rw-r--r--src/rtfgen.h5
-rw-r--r--src/scanner.l34
-rw-r--r--src/searchindex.cpp1
-rw-r--r--src/tclscanner.l17
-rw-r--r--src/template.h4
-rw-r--r--src/translator.h31
-rw-r--r--src/translator_am.h4
-rw-r--r--src/translator_cn.h14
-rw-r--r--src/translator_dk.h3
-rw-r--r--src/translator_gr.h4
-rw-r--r--src/translator_je.h14
-rw-r--r--src/translator_jp.h12
-rw-r--r--src/translator_ke.h12
-rw-r--r--src/translator_kr.h12
-rw-r--r--src/translator_lv.h2
-rw-r--r--src/translator_no.h3
-rw-r--r--src/translator_pl.h10
-rw-r--r--src/translator_pt.h5
-rw-r--r--src/translator_sc.h5
-rw-r--r--src/translator_si.h2
-rw-r--r--src/translator_tw.h12
-rw-r--r--src/translator_vi.h16
-rw-r--r--src/util.cpp13
-rw-r--r--src/vhdlcode.l68
-rw-r--r--src/vhdldocgen.cpp14
-rw-r--r--src/vhdljjparser.cpp111
-rw-r--r--src/xmlgen.cpp2
-rw-r--r--templates/html/search_functions.php4
-rw-r--r--templates/html/search_opensearch.php4
-rw-r--r--templates/latex/doxygen.sty77
-rw-r--r--testing/054/054__parblock_8cpp.xml92
-rw-r--r--testing/054_parblock.cpp32
-rw-r--r--testing/072/072__using_8cpp.xml (renamed from testing/067/067__using_8cpp.xml)10
-rw-r--r--testing/072_using.cpp (renamed from testing/067_using.cpp)2
-rw-r--r--testing/073/073__typed__enum_8cpp.xml (renamed from testing/068/068__typed__enum_8cpp.xml)10
-rw-r--r--testing/073_typed_enum.cpp (renamed from testing/068_typed_enum.cpp)2
-rw-r--r--testing/CMakeLists.txt4
-rw-r--r--testing/README.txt34
-rwxr-xr-xtesting/dtd/xhtml-lat1.ent196
-rwxr-xr-xtesting/dtd/xhtml-special.ent80
-rwxr-xr-xtesting/dtd/xhtml-symbol.ent237
-rwxr-xr-xtesting/dtd/xhtml1-strict.dtd978
-rwxr-xr-xtesting/dtd/xhtml1-transitional.dtd1201
-rw-r--r--testing/runtests.py206
-rw-r--r--vhdlparser/ErrorHandler.h2
-rw-r--r--vhdlparser/Makefile42
-rw-r--r--vhdlparser/ParseException.cc2
-rw-r--r--vhdlparser/ParseException.h2
-rw-r--r--vhdlparser/VhdlParserErrorHandler.hpp27
-rw-r--r--vhdlparser/VhdlParserIF.cpp2
-rw-r--r--vhdlparser/vhdlstring.h8
117 files changed, 4083 insertions, 614 deletions
diff --git a/.gitignore b/.gitignore
index 440769b..fa8ffb5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,4 +13,4 @@
/doxygen_docs
/doxygen.tag
-/build
+/build*
diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h
index 4340dbd..59af4e3 100644
--- a/addon/doxmlparser/src/dochandler.h
+++ b/addon/doxmlparser/src/dochandler.h
@@ -571,7 +571,7 @@ class EMailHandler : public DocEMailImpl, public BaseHandler<EMailHandler>
//-----------------------------------------------------------------------------
-/* \brief Node representing a link to an URL
+/* \brief Node representing a link to a URL
*
*/
class ULinkHandler : public DocULinkImpl, public BaseHandler<ULinkHandler>
diff --git a/addon/doxywizard/config_doxyw.l b/addon/doxywizard/config_doxyw.l
index 7874a19..960b7cb 100644
--- a/addon/doxywizard/config_doxyw.l
+++ b/addon/doxywizard/config_doxyw.l
@@ -540,22 +540,34 @@ void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s)
{
QChar c;
bool needsEscaping=false;
+ bool needsHashEscaping=false;
// convert the string back to it original encoding
//QByteArray se = codec->fromUnicode(s);
t.setCodec(codec);
const QChar *p=s.data();
if (!s.isEmpty() && !p->isNull())
{
- while (!(c=*p++).isNull() && !needsEscaping)
+ if (*p != QChar::fromLatin1('"'))
{
- needsEscaping = (c==QChar::fromLatin1(' ') ||
- c==QChar::fromLatin1('\n') ||
- c==QChar::fromLatin1('\t') ||
- c==QChar::fromLatin1('"'));
+ while (!(c=*p++).isNull() && !needsEscaping)
+ {
+ needsEscaping = (c==QChar::fromLatin1(' ') ||
+ c==QChar::fromLatin1('\n') ||
+ c==QChar::fromLatin1('\t') ||
+ c==QChar::fromLatin1('"'));
+ }
+ p=s.data();
+ while (!(c=*p++).isNull() && !needsHashEscaping)
+ {
+ needsHashEscaping = (c==QChar::fromLatin1('#'));
+ }
}
- if (needsEscaping)
+ if (needsHashEscaping || needsEscaping)
{
t << "\"";
+ }
+ if (needsEscaping)
+ {
p=s.data();
while (!p->isNull())
{
@@ -564,12 +576,15 @@ void writeStringValue(QTextStream &t,QTextCodec *codec,const QString &s)
if (*p ==QChar::fromLatin1('"')) t << "\\"; // escape quotes
t << *p++;
}
- t << "\"";
}
else
{
t << s;
}
+ if (needsHashEscaping || needsEscaping)
+ {
+ t << "\"";
+ }
}
}
diff --git a/addon/doxywizard/wizard.cpp b/addon/doxywizard/wizard.cpp
index b320aaa..ae8fa61 100644
--- a/addon/doxywizard/wizard.cpp
+++ b/addon/doxywizard/wizard.cpp
@@ -1210,18 +1210,23 @@ void Step4::setCallerGraphEnabled(int state)
void Step4::init()
{
+ int id = 0;
if (getBoolOption(m_modelData,STR_HAVE_DOT))
{
m_diagramModeGroup->button(2)->setChecked(true); // Dot
+ id = 2;
}
else if (getBoolOption(m_modelData,STR_CLASS_DIAGRAMS))
{
m_diagramModeGroup->button(1)->setChecked(true); // Builtin diagrams
+ id = 1;
}
else
{
m_diagramModeGroup->button(0)->setChecked(true); // no diagrams
+ id = 0;
}
+ m_dotGroup->setEnabled(id==2);
m_dotClass->setChecked(getBoolOption(m_modelData,STR_CLASS_GRAPH));
m_dotCollaboration->setChecked(getBoolOption(m_modelData,STR_COLLABORATION_GRAPH));
m_dotInheritance->setChecked(getBoolOption(m_modelData,STR_GRAPHICAL_HIERARCHY));
diff --git a/doc/arch.doc b/doc/arch.doc
index e5fbbdc..ed9d579 100644
--- a/doc/arch.doc
+++ b/doc/arch.doc
@@ -41,14 +41,14 @@ available through the global functions \c Config_getXXX(), where \c XXX is the
type of the option. The argument of these function is a string naming
the option as it appears in the configuration file. For instance:
\c Config_getBool("GENERATE_TESTLIST") returns a reference to a boolean
-value that is \c TRUE if the test list was enabled in the config file.
+value that is \c TRUE if the test list was enabled in the configuration file.
The function \c readConfiguration() in \c src/doxygen.cpp
reads the command line options and then calls the configuration parser.
<h3>C Preprocessor</h3>
-The input files mentioned in the config file are (by default) fed to the
+The input files mentioned in the configuration file are (by default) fed to the
C Preprocessor (after being piped through a user defined filter if available).
The way the preprocessor works differs somewhat from a standard C Preprocessor.
@@ -139,8 +139,8 @@ strings and executes the commands it finds in it (this is the second pass
in parsing the documentation). It writes the result directly to the output
generators.
-The parser is written in C++ and can be found in src/docparser.cpp. The
-tokens that are eaten by the parser come from src/doctokenizer.l.
+The parser is written in C++ and can be found in \c src/docparser.cpp. The
+tokens that are eaten by the parser come from \c src/doctokenizer.l.
Code fragments found in the comment blocks are passed on to the source parser.
The main entry point for the documentation parser is \c validatingParseDoc()
@@ -190,12 +190,12 @@ could extract information from the XML output. Possible tools could be:
Since doxygen uses a lot of \c flex code it is important to understand
how \c flex works (for this one should read the \c man page)
and to understand what it is doing when \c flex is parsing some input.
-Fortunately, when flex is used with the `-d` option it outputs what rules
+Fortunately, when \c flex is used with the `-d` option it outputs what rules
matched. This makes it quite easy to follow what is going on for a
particular input fragment.
-To make it easier to toggle debug information for a given flex file I
-wrote the following perl script, which automatically adds or removes `-d`
+To make it easier to toggle debug information for a given \c flex file I
+wrote the following \c perl script, which automatically adds or removes `-d`
from the correct line in the \c Makefile:
\verbatim
@@ -240,11 +240,16 @@ $now = time;
utime $now, $now, $file;
\endverbatim
Another way to get rules matching / debugging information
-from the \c flex code is setting LEX_FLAGS with \c make (`make LEX_FLAGS=-d`).
+from the \c flex code is setting \c LEX_FLAGS with \c make (`make LEX_FLAGS=-d`).
Note that by running doxygen with `-d lex` you get information about which
`flex codefile` is used.
+<h3>Testing</h3>
+
+Doxygen has a small set of tests available to test, some, code integrity.
+The tests can be run by means of the command `make tests`. When only one or a few tests are required one can set the variable \c TEST_FLAGS when running the test e.g. `make TEST_FLAGS="--id 5" tests` or for multiple tests `make TEST_FLAGS="--id 5 --id 7" tests`.
+
\htmlonly
Return to the <a href="index.html">index</a>.
\endhtmlonly
diff --git a/doc/changelog.doc b/doc/changelog.doc
index 0dcbfa9..50f2209 100644
--- a/doc/changelog.doc
+++ b/doc/changelog.doc
@@ -20,7 +20,7 @@
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=743367">743367</a> - Duplicate attribute (target=&quot;_top&quot; target=&quot;_top&quot;) generated in .SVG files [<a href="http://github.com/doxygen/doxygen/commit/97bfbfa6c4d4eb07ac8c60545086c3370e9683b8">view</a>]
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=775493">775493</a> - Usage of underscore&#39;s in parameter names [<a href="http://github.com/doxygen/doxygen/commit/c10af45c61a1f9b25c514f397ace16c94cc7c8df">view</a>]
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=776791">776791</a> - [1.8.13 Regression] Segfault building the breathe docs [<a href="http://github.com/doxygen/doxygen/commit/0f02761a158a5e9ddbd5801682482af8986dbc35">view</a>]
-<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=776870">776870</a> - XML Parsing Error for operator&lt;&lt; methods when outputing to XHTML [<a href="http://github.com/doxygen/doxygen/commit/0e8530e42b69c909ef2c26468b24dfb88cc0997f">view</a>]
+<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=776870">776870</a> - XML Parsing Error for operator&lt;&lt; methods when outputting to XHTML [<a href="http://github.com/doxygen/doxygen/commit/0e8530e42b69c909ef2c26468b24dfb88cc0997f">view</a>]
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=776964">776964</a> - Menu does not work without Javascript [<a href="http://github.com/doxygen/doxygen/commit/1be97720b7820361e85242d08d4cac3e46570bfe">view</a>]
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=776988">776988</a> - Too greedy behavior of @ref const matching [<a href="http://github.com/doxygen/doxygen/commit/04001c8926fb0f37dfcf284b3637b182125bba75">view</a>]
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=778730">778730</a> - doxygen build fails [<a href="http://github.com/doxygen/doxygen/commit/bb5c8dd29782ecbb05a4ef9788f2507e9a156848">view</a>]
@@ -153,7 +153,7 @@
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=773354">773354</a> - &quot;name&quot; attribute of image map not urlencoded, not working in Chrome [<a href="http://github.com/doxygen/doxygen/commit/6300c03b6201ca7981388a6d3c01486f8a8adba0">view</a>]
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=774138">774138</a> - Please add HTML classes to &quot;Definition at...&quot; &amp; &quot;Referenced by...&quot; for CSS [<a href="http://github.com/doxygen/doxygen/commit/d2593e56cd52ecee2424d844916f95e12fef27c8">view</a>]
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=774273">774273</a> - INLINE_SIMPLE_STRUCTS with enums in classes does not work [<a href="http://github.com/doxygen/doxygen/commit/71d7a9399db016cba83ccd63c6ba7e0fac1cd44d">view</a>]
-<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=774514">774514</a> - Modify in some pronounciation expression in Korean [<a href="http://github.com/doxygen/doxygen/commit/cd3e39d7db634d9e11afc8e46269eb509ae10e40">view</a>]
+<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=774514">774514</a> - Modify in some pronunciation expression in Korean [<a href="http://github.com/doxygen/doxygen/commit/cd3e39d7db634d9e11afc8e46269eb509ae10e40">view</a>]
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=774949">774949</a> - Unknown reference in manual [<a href="http://github.com/doxygen/doxygen/commit/dde15c9748053ecb68ba046ebd0fdfe625be0e2e">view</a>]
<li>Bug <a href="https://bugzilla.gnome.org/show_bug.cgi?id=775245">775245</a> - referencing Python files via tagfile broken [<a href="http://github.com/doxygen/doxygen/commit/dc02bb977ebc6c683012c106e16e0190ac72b454">view</a>]
<li>Add NVARCHAR as a SQL type [<a href="http://github.com/doxygen/doxygen/commit/6a85240e65bb5e3d59d2cd161eb8cf241e27ed7d">view</a>]
@@ -1073,7 +1073,7 @@
<li>Added support for \-- and \--- to prevent interpretation as ndash and mdash [<a href="http://github.com/doxygen/doxygen/commit/385b87e08c23b1392d0e6d6fbdb6ef463fa28477">view</a>]</li>
<li>Added support for elif to the template language [<a href="http://github.com/doxygen/doxygen/commit/ae3a22ba276a2e446a460274e0bff8a9bdf4af7d">view</a>]</li>
<li>Added support for range tag in the template language [<a href="http://github.com/doxygen/doxygen/commit/b98846d0b57b78cd45d34e0962a8bcdc2e643e18">view</a>]</li>
-<li>Alterative way to get rules information from flex [<a href="http://github.com/doxygen/doxygen/commit/224fa96dd9c9245bfdf68ee6f92160b7aa05f8d1">view</a>]</li>
+<li>Alternative way to get rules information from flex [<a href="http://github.com/doxygen/doxygen/commit/224fa96dd9c9245bfdf68ee6f92160b7aa05f8d1">view</a>]</li>
<li>Better message in case doxygen -u is used [<a href="http://github.com/doxygen/doxygen/commit/cfd8c2415e7d0744a00bf1990f26aab538940f20">view</a>]</li>
<li>Changed &quot;See Also&quot; back to &quot;See also&quot; [<a href="http://github.com/doxygen/doxygen/commit/0754c968a4a06c8217c9301a5ca82c6212c228ec">view</a>]</li>
<li>Chm don&#39;t add images multiple times [<a href="http://github.com/doxygen/doxygen/commit/3b339813794390bdce59fa1009cf71506e0cec2b">view</a>]</li>
@@ -1296,7 +1296,7 @@
<li> Small spelling correction to generate an rtf extensions file -&gt; to generate a rtf extensions file</li>
<li> Some texts can be independent of \htmlonly / \latexonly</li>
<li> Space missing in error message. the word 'in' and the vale of filesOption were concatenated</li>
-<li> This patch contains changes regarding the build system so that the *nix and Windows systems use the same information (consistency). Some use names routine names have been changed (from .l files with -P option) to reflect the file name that generated the routines, this makes it easier to create a general procedure. A number of include / header files are files are generated from different file types (html, xml, js), due some limitations of the windows build system the generated file names had to be changed (the extension in the windows build system is only available including the '.' so e.g. the file jquery_fx.js generates now jquery_fx.js.h instead of jquery_fx_js.h) In the windows version the creation of .cpp files from .l files has been adjusted to correct for the YY_BUF_SIZE problems. Furthermore on windows (and also used on *nix) some commends have been replaced with python scripts so that on windows only python is need (besides flex and bison). On *nix also perl is required for the generation using tmake.</li>
+<li> This patch contains changes regarding the build system so that the *nix and Windows systems use the same information (consistency). Some use names routine names have been changed (from .l files with -P option) to reflect the file name that generated the routines, this makes it easier to create a general procedure. A number of include / header files are files are generated from different file types (html, xml, js), due some limitations of the windows build system the generated file names had to be changed (the extension in the windows build system is only available including the '.' so e.g. the file jquery_fx.js generates now jquery_fx.js.h instead of jquery_fx_js.h) In the windows version the creation of .cpp files from .l files has been adjusted to correct for the YY_BUF_SIZE problems. Furthermore on windows (and also used on *nix) some commands have been replaced with python scripts so that on windows only python is need (besides flex and bison). On *nix also perl is required for the generation using tmake.</li>
<li> Updated Visual Studio project files to include new source files</li>
<li> Usage of the -d option corrected Giving an error when a wrong -d option is given. Made some error messages more consistent. Corrected usage of the exit call, in case of an error: exit(1) otherwise exit(0). A closer look should be made on exitDoxygen as it does not contain any exit statements and it is unclear (to me) when it is used.</li> <li> VHDL-2008 and arrays on unconstrained elements</li>
<li> consider currentFile when searching for global symbols</li>
@@ -2162,7 +2162,7 @@ make sure you add the following:
<h3>Changes</h3>
<ul>
<li> Auto list items can now consist of multiple paragraphs.
- The indentation of the (first line) of a new paragraph detemines
+ The indentation of the (first line) of a new paragraph determines
to which list item the paragraph belongs or if it marks the end of the
list. </li>
<li> When UML_LOOK is enabled, relations shown on the edge of a graph
@@ -2590,7 +2590,7 @@ make sure you add the following:
<li> id <a href="https://bugzilla.gnome.org/show_bug.cgi?id=655178">655178</a>: Fortran: Fixed parse issue when using variable name
starting with the word interface.</li>
<li> id <a href="https://bugzilla.gnome.org/show_bug.cgi?id=655591">655591</a>: Improved error handling for empty html style list.</li>
-<li> id <a href="https://bugzilla.gnome.org/show_bug.cgi?id=655935">655935</a>: Fixed case where %s could end up in a warning messge.</li>
+<li> id <a href="https://bugzilla.gnome.org/show_bug.cgi?id=655935">655935</a>: Fixed case where %s could end up in a warning message.</li>
<li> id <a href="https://bugzilla.gnome.org/show_bug.cgi?id=656005">656005</a>: Methods of Objective-C categories defined in an .m file are
now marked as private.</li>
</ul>
diff --git a/doc/commands.doc b/doc/commands.doc
index 12b85db..1c7e7cf 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -697,7 +697,7 @@ Structural indicators
command are considered to be internal as well. Only a new section at the
same level will end the fragment that is considered internal.
- You can use \ref cfg_internal_docs "INTERNAL_DOCS" in the config file
+ You can use \ref cfg_internal_docs "INTERNAL_DOCS" in the configuration file
to show (\c YES) or hide (\c NO) the internal documentation.
\sa section \ref cmdendinternal "\\endinternal".
diff --git a/doc/customize.doc b/doc/customize.doc
index 9ef3891..e2d53db 100644
--- a/doc/customize.doc
+++ b/doc/customize.doc
@@ -114,7 +114,7 @@ This will create 3 files:
referencing those extra files
via \ref cfg_html_extra_stylesheet "HTML_EXTRA_STYLESHEET".
-You should edit these files and then reference them from the config file.
+You should edit these files and then reference them from the configuration file.
- \ref cfg_html_header "HTML_HEADER" = \c header.html
- \ref cfg_html_footer "HTML_FOOTER" = \c footer.html
- \ref cfg_html_extra_stylesheet "HTML_EXTRA_STYLESHEET" = \c my_customdoxygen.css
@@ -158,7 +158,7 @@ doxygen -l
optionally the name of the layout file can be specified, if omitted
\c DoxygenLayout.xml will be used.
-The next step is to mention the layout file in the config file
+The next step is to mention the layout file in the configuration file
\verbatim
LAYOUT_FILE = DoxygenLayout.xml
\endverbatim
diff --git a/doc/docblocks.doc b/doc/docblocks.doc
index 81cfdd0..e72ce95 100644
--- a/doc/docblocks.doc
+++ b/doc/docblocks.doc
@@ -293,7 +293,7 @@ The brief descriptions are included in the member overview of a
class, namespace or file and are printed using a small italic font
(this description can be hidden by setting
\ref cfg_brief_member_desc "BRIEF_MEMBER_DESC" to \c NO in
-the config file). By default the brief descriptions become the first
+the configuration file). By default the brief descriptions become the first
sentence of the detailed descriptions
(but this can be changed by setting the \ref cfg_repeat_brief "REPEAT_BRIEF"
tag to \c NO). Both the brief and the detailed descriptions are optional
@@ -473,7 +473,7 @@ Here is the same example again but now using doxygen style comments:
Since python looks more like Java than like C or C++, you should set
\ref cfg_optimize_output_java "OPTIMIZE_OUTPUT_JAVA" to \c YES in the
-config file.
+configuration file.
\subsection vhdlblocks Comment blocks in VHDL
@@ -503,7 +503,7 @@ Here is an example VHDL file with doxygen comments:
To get proper looking output you need to set
\ref cfg_optimize_output_vhdl "OPTIMIZE_OUTPUT_VHDL" to \c YES in the
-config file. This will also affect a number of other settings. When they
+configuration file. This will also affect a number of other settings. When they
were not already set correctly doxygen will produce a warning telling which
settings where overruled.
@@ -595,7 +595,7 @@ before the command.
<!--
To use your own keywords you an map these keyword to the recognized commands
-using the \ref cfg_tcl_subs "TCL_SUBST" entry in the config file.
+using the \ref cfg_tcl_subs "TCL_SUBST" entry in the configuration file.
The entry contain a list of word-keyword mappings. To use the itcl::*
commands without the leading namespace use p.e.:
diff --git a/doc/doxygen_usage.doc b/doc/doxygen_usage.doc
index bcb14e8..20a5763 100644
--- a/doc/doxygen_usage.doc
+++ b/doc/doxygen_usage.doc
@@ -80,8 +80,8 @@ doxygen -w html header.html footer.html stylesheet.css <config_file>
doxygen -w latex header.tex footer.tex doxygen.sty <config_file>
\endverbatim
If you need non-default options (for instance to use extra \LaTeX packages)
-you need to make a config file with those options set correctly and then specify
-that config file after the generated files (make a backup of the configuration
+you need to make a configuration file with those options set correctly and then specify
+that configuration file after the generated files (make a backup of the configuration
file first so you don't loose it in case you forget to specify one of the
output files).
<li>For RTF output, you can generate the default style sheet file (see
diff --git a/doc/extsearch.doc b/doc/extsearch.doc
index 99a7219..36116ff 100644
--- a/doc/extsearch.doc
+++ b/doc/extsearch.doc
@@ -58,7 +58,7 @@ browser via an URL starting with http:)
How to setup a web server is outside the scope of this document,
but if you for instance have Apache installed, you could simply copy the
-`doxysearch.cgi` file from doxygen's `bin` dir to the `cgi-bin` of the
+`doxysearch.cgi` file from doxygen's `bin` directory to the `cgi-bin` directory of the
Apache web server. Read the <a href="http://httpd.apache.org/docs/2.2/howto/cgi.html">apache documentation</a> for details.
To test if `doxysearch.cgi` is accessible start your web browser and
@@ -73,7 +73,7 @@ You should get the following message:
If you use Internet Explorer you may be prompted to download a file,
which will then contain this message.
-Since we didn't create or install a doxysearch.db it is ok for the test to
+Since we didn't create or install a doxysearch.db it is OK for the test to
fail for this reason. How to correct this is discussed in the next section.
Before continuing with the next section add the above
diff --git a/doc/faq.doc b/doc/faq.doc
index bbad8c0..a91a2f5 100644
--- a/doc/faq.doc
+++ b/doc/faq.doc
@@ -43,14 +43,14 @@ You should use the \ref cmdmainpage "\\mainpage" command inside a comment block
<ol>
<li>Is your class / file / namespace documented? If not, it will not
be extracted from the sources unless \ref cfg_extract_all "EXTRACT_ALL" is set to \c YES
- in the config file.
+ in the configuration file.
<li>Are the members private? If so, you must set \ref cfg_extract_private "EXTRACT_PRIVATE" to \c YES
to make them appear in the documentation.
<li>Is there a function macro in your class that does not end with a
semicolon (e.g. MY_MACRO())? If so then you have to instruct
doxygen's preprocessor to remove it.
- This typically boils down to the following settings in the config file:
+ This typically boils down to the following settings in the configuration file:
\verbatim
ENABLE_PREPROCESSING = YES
@@ -110,10 +110,10 @@ around the blocks that should be hidden and put:
\verbatim
PREDEFINED = DOXYGEN_SHOULD_SKIP_THIS
\endverbatim
-in the config file then all blocks should be skipped by doxygen as long
+in the configuration file then all blocks should be skipped by doxygen as long
as \ref cfg_enable_preprocessing "ENABLE_PREPROCESSING" is set to `YES`.
-\section faq_code_inc How can I change what is after the <code>\#include</code> in the class documentation?
+\section faq_code_inc How can I change what is after the \#include in the class documentation?
In most cases you can use \ref cfg_strip_from_inc_path "STRIP_FROM_INC_PATH"
to strip a user defined part of a path.
@@ -210,7 +210,7 @@ remove the % and keep the word unlinked.
No, not as such; doxygen needs to understand the structure of what it reads.
If you don't mind spending some time on it, there are several options:
- If the grammar of X is close to C or C++, then it is probably not too hard to
- tweak src/scanner.l a bit so the language is supported. This is done
+ tweak \c src/scanner.l a bit so the language is supported. This is done
for all other languages directly supported by doxygen
(i.e. Java, IDL, C#, PHP).
- If the grammar of X is somewhat different than you can write an input
@@ -219,7 +219,7 @@ If you don't mind spending some time on it, there are several options:
Javascript, see http://www.stack.nl/~dimitri/doxygen/download.html#helpers).
- If the grammar is completely different one could write a parser for X and
write a backend that produces a similar syntax tree as is done by
- src/scanner.l (and also by src/tagreader.cpp while reading tag files).
+ \c src/scanner.l (and also by \c src/tagreader.cpp while reading tag files).
\section faq_lex Help! I get the cryptic message "input buffer overflow, can't enlarge buffer because scanner uses REJECT"
@@ -235,7 +235,7 @@ should send me a code fragment that triggers the message. To work around
the problem, put some line-breaks into your file, split it up into smaller
parts, or exclude it from the input using EXCLUDE.
-\section faq_latex When running make in the latex dir I get "TeX capacity exceeded". Now what?
+\section faq_latex When running make in the latex directory I get "TeX capacity exceeded". Now what?
You can edit the texmf.cfg file to increase the default values of the
various buffers and then run "texconfig init".
diff --git a/doc/formulas.doc b/doc/formulas.doc
index 1649c19..ee4ff61 100644
--- a/doc/formulas.doc
+++ b/doc/formulas.doc
@@ -32,7 +32,7 @@ have the following tools installed
For the HTML output there is also an alternative solution using
<a href="https://www.mathjax.org">MathJax</a> which does not
require the above tools. If you enable \ref cfg_use_mathjax "USE_MATHJAX" in
-the config then the latex formulas will be copied to the HTML "as is" and a
+the configuration then the latex formulas will be copied to the HTML "as is" and a
client side javascript will parse them and turn them into (interactive) images.
There are three ways to include formulas in the documentation.
diff --git a/doc/install.doc b/doc/install.doc
index 6db8102..f981431 100644
--- a/doc/install.doc
+++ b/doc/install.doc
@@ -203,13 +203,13 @@ of the GraphViz package to render nicer diagrams, see the
\ref cfg_have_dot "HAVE_DOT" option in the configuration file.
If you want to produce compressed HTML files (see \ref
-cfg_generate_htmlhelp "GENERATE_HTMLHELP") in the config file, then
+cfg_generate_htmlhelp "GENERATE_HTMLHELP") in the configuration file, then
you need the Microsoft HTML help workshop.
You can download it from
<a href="http://www.microsoft.com/en-us/download/details.aspx?id=21138">Microsoft</a>.
If you want to produce Qt Compressed Help files (see \ref
-cfg_qhg_location "QHG_LOCATION") in the config file, then
+cfg_qhg_location "QHG_LOCATION") in the configuration file, then
you need qhelpgenerator which is part of Qt.
You can download Qt from <a href="http://qt-project.org/downloads">Qt Software Downloads</a>.
diff --git a/doc/markdown.doc b/doc/markdown.doc
index e5aebd1..92612ca 100644
--- a/doc/markdown.doc
+++ b/doc/markdown.doc
@@ -300,6 +300,9 @@ to produce a table of contents at the start of the page, listing all sections.
Note that using `[TOC]` is the same as using a
\ref cmdtableofcontents "\\tableofcontents" command.
+Note that the \ref cfg_toc_include_headings "TOC_INCLUDE_HEADINGS" has to be set
+to a value > 0 otherwise no table of contents is shown when using \ref md_headers "Markdown Headers".
+
\subsection md_tables Tables
Of the features defined by "Markdown Extra" is support for
@@ -515,7 +518,7 @@ and in other sections that need to be processed without changes
Markdown allows both a single tab or 4 spaces to start a code block.
Since doxygen already replaces tabs by spaces before doing Markdown
-processing, the effect will only be same if TAB_SIZE in the config file
+processing, the effect will only be same if TAB_SIZE in the configuration file
has been set to 4. When it is set to a higher value spaces will be
present in the code block. A lower value will prevent a single tab to be
interpreted as the start of a code block.
diff --git a/doc/preprocessing.doc b/doc/preprocessing.doc
index 30d4cf3..882e60d 100644
--- a/doc/preprocessing.doc
+++ b/doc/preprocessing.doc
@@ -55,7 +55,7 @@ both statements, i.e.:
\endverbatim
In case you want to expand the \c CONST_STRING macro, you should set the
-\ref cfg_macro_expansion "MACRO_EXPANSION" tag in the config file
+\ref cfg_macro_expansion "MACRO_EXPANSION" tag in the configuration file
to \c YES. Then the result after preprocessing becomes:
\verbatim
@@ -130,7 +130,7 @@ without macro expansion doxygen will get confused, but we may not want to
expand the \c REFIID macro, because it is documented and the user that reads
the documentation should use it when implementing the interface.
-By setting the following in the config file:
+By setting the following in the configuration file:
\verbatim
ENABLE_PREPROCESSING = YES
diff --git a/doc/searching.doc b/doc/searching.doc
index 00c6141..cb6b84a 100644
--- a/doc/searching.doc
+++ b/doc/searching.doc
@@ -35,7 +35,7 @@ has its own advantages and disadvantages:
required to make it work.
To enable it set
- \ref cfg_searchengine "SEARCHENGINE" to \c YES in the config file
+ \ref cfg_searchengine "SEARCHENGINE" to \c YES in the configuration file
and make sure \ref cfg_server_based_search "SERVER_BASED_SEARCH" is set
to \c NO.
@@ -53,7 +53,7 @@ has its own advantages and disadvantages:
To enable this set both
\ref cfg_searchengine "SEARCHENGINE" and
- \ref cfg_server_based_search "SERVER_BASED_SEARCH" to \c YES in the config
+ \ref cfg_server_based_search "SERVER_BASED_SEARCH" to \c YES in the configuration
file and set \ref cfg_external_search "EXTERNAL_SEARCH" to \c NO.
Advantages over the client side search engine are that it provides full
@@ -100,9 +100,9 @@ has its own advantages and disadvantages:
and Windows even supports it natively.
To enable this set \ref cfg_generate_htmlhelp "GENERATE_HTMLHELP" to \c YES
- in the config file. To let doxygen compile the HTML Help file for you,
+ in the configuration file. To let doxygen compile the HTML Help file for you,
you also need to specify the path to the HTML compiler (hhc.exe) using the
- \ref cfg_hhc_location "HHC_LOCATION" config option and the name of the
+ \ref cfg_hhc_location "HHC_LOCATION" configuration option and the name of the
resulting CHM file using \ref cfg_chm_file "CHM_FILE".
An advantage of this method is that the result is a single file that can
@@ -122,7 +122,7 @@ has its own advantages and disadvantages:
provided by Apple).
To enable the creation of doc sets set \ref cfg_generate_docset "GENERATE_DOCSET"
- to \c YES in the config file. There are a couple of other doc set related
+ to \c YES in the configuration file. There are a couple of other doc set related
options you may want to set. After doxygen has finished you will find
a Makefile in the HTML output directory. Running "make install" on this
Makefile will compile and install the doc set.
diff --git a/doc/starting.doc b/doc/starting.doc
index c869867..e39aa25 100644
--- a/doc/starting.doc
+++ b/doc/starting.doc
@@ -77,7 +77,7 @@ You can probably leave the values of most tags in a generated template
configuration file to their default value. See section \ref config for
more details about the configuration file.
-If you do not wish to edit the config file with a text editor, you should
+If you do not wish to edit the configuration file with a text editor, you should
have a look at \ref doxywizard_usage "doxywizard", which is a GUI
front-end that can create, read and write doxygen configuration files,
and allows setting configuration options by entering them via dialogs.
diff --git a/doc/trouble.doc b/doc/trouble.doc
index 9584c0c..c99c407 100644
--- a/doc/trouble.doc
+++ b/doc/trouble.doc
@@ -113,7 +113,7 @@ always try to include the following information in your bug report:
- It is usually a good idea to send along the configuration file as well,
but please use doxygen with the <code>-s</code> flag while generating it
to keep it small (use <code>doxygen -s -u [configName]</code> to strip
- the comments from an existing config file).
+ the comments from an existing configuration file).
- The easiest (and often the only) way for me to fix bugs is if you can
attach a small example demonstrating the problem you have to the bug report, so I can
reproduce it on my machine. Please make sure the example is valid
diff --git a/examples/define.h b/examples/define.h
index c330447..0cd7ae3 100644
--- a/examples/define.h
+++ b/examples/define.h
@@ -10,7 +10,9 @@
*/
/*!
- Computes the absolute value of its argument \a x.
+ \brief Computes the absolute value of its argument \a x.
+ \param x input value.
+ \returns absolute value of \a x.
*/
#define ABS(x) (((x)>0)?(x):-(x))
#define MAX(x,y) ((x)>(y)?(x):(y))
diff --git a/examples/include.cpp b/examples/include.cpp
index ba8c054..d9ea5ea 100644
--- a/examples/include.cpp
+++ b/examples/include.cpp
@@ -8,7 +8,7 @@ class Include_Test
void example();
};
-/*! \page example
+/*! \page pag_example
* \dontinclude include_test.cpp
* Our main function starts like this:
* \skip main
diff --git a/examples/tclexample.tcl b/examples/tclexample.tcl
index 6edef66..e512aee 100644
--- a/examples/tclexample.tcl
+++ b/examples/tclexample.tcl
@@ -10,7 +10,7 @@ exec tclsh "$0" "$@"
#\code
namespace eval ns {
## Documented proc \c ns_proc .
- # param[in] arg some argument
+ # \param[in] arg some argument
proc ns_proc {arg} {}
## Documented var \c ns_var .
# Some documentation.
@@ -22,13 +22,13 @@ namespace eval ns {
## Destroy object.
destructor {exit}
## Documented itcl method \c itcl_method_x .
- # param[in] arg Argument
+ # \param[in] arg Argument
private method itcl_method_x {arg}
## Documented itcl method \c itcl_method_y .
- # param[in] arg Argument
+ # \param[in] arg Argument
protected method itcl_method_y {arg} {}
## Documented itcl method \c itcl_method_z .
- # param[in] arg Argument
+ # \param[in] arg Argument
public method itcl_method_z {arg} {}
## Documented common itcl var \c itcl_Var .
common itcl_Var
@@ -49,13 +49,13 @@ namespace eval ns {
# Defined inside class
variable oo_var
## \private Documented oo method \c oo_method_x .
- # param[in] arg Argument
+ # \param[in] arg Argument
method oo_method_x {arg} {}
## \protected Documented oo method \c oo_method_y .
- # param[in] arg Argument
+ # \param[in] arg Argument
method oo_method_y {arg} {}
## \public Documented oo method \c oo_method_z .
- # param[in] arg Argument
+ # \param[in] arg Argument
method oo_method_z {arg} {}
}
}
@@ -72,7 +72,7 @@ oo::define ns::oo_class {
}
## Documented global proc \c glob_proc .
-# param[in] arg Argument
+# \param[in] arg Argument
proc glob_proc {arg} {puts $arg}
variable glob_var;#< Documented global var \c glob_var\
diff --git a/qtools/qgvector.cpp b/qtools/qgvector.cpp
index 88409ce..63cce64 100644
--- a/qtools/qgvector.cpp
+++ b/qtools/qgvector.cpp
@@ -68,7 +68,7 @@
the QVector collection class.
QGVector has some virtual functions that may be reimplemented in
- subclasses to to customize behavior.
+ subclasses to customize behavior.
<ul>
<li> compareItems() compares two collection/vector items.
diff --git a/qtools/qstring.h b/qtools/qstring.h
index 5fcff29..d459132 100644
--- a/qtools/qstring.h
+++ b/qtools/qstring.h
@@ -384,7 +384,7 @@ public:
* - As return value for basicDirection(), it means that the first strong character
* of the source string has a left-to-right direction.
*/
- DirLTR = 0b01,
+ DirLTR = 0x1,
/// Right-to-left text.
/*!
* - As return value for direction(), it means that the source string
@@ -392,13 +392,13 @@ public:
* - As return value for basicDirection(), it means that the first strong character
* of the source string has a right-to-left direction.
*/
- DirRTL = 0b10,
+ DirRTL = 0x2,
/// Mixed-directional text
/*!
* As return value for direction(), it means that the source string
* contains both left-to-right and right-to-left characters.
*/
- DirMixed = 0b11
+ DirMixed = 0x3
};
//QT_STATIC_CONST QString null;
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 5c55efa..b57d360 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -119,7 +119,7 @@ FLEX_TARGET(xmlcode xmlcode.l ${GENERATED_SRC}/xmlcode.cpp
FLEX_TARGET(sqlcode sqlcode.l ${GENERATED_SRC}/sqlcode.cpp COMPILE_FLAGS "${LEX_FLAGS}")
FLEX_TARGET(configimpl configimpl.l ${GENERATED_SRC}/configimpl.cpp COMPILE_FLAGS "${LEX_FLAGS}")
-BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS ${YACC_FLAGS})
+BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "${YACC_FLAGS}")
add_library(doxycfg STATIC
${GENERATED_SRC}/lang_cfg.h
diff --git a/src/cite.cpp b/src/cite.cpp
index f86350b..b17800f 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -268,7 +268,7 @@ void CiteDict::generatePage() const
{
if (!bibFile.isEmpty())
{
- // bug_700510, multile times the same name were overwriting; creating new names
+ // bug_700510, multiple times the same name were overwriting; creating new names
// also for names with spaces
++i;
copyFile(bibFile,latexOutputDir + bibTmpFile + QCString().setNum(i) + ".bib");
diff --git a/src/clangparser.h b/src/clangparser.h
index 6072208..8bb9aba 100644
--- a/src/clangparser.h
+++ b/src/clangparser.h
@@ -19,7 +19,7 @@ class ClangParser
* @param[in,out] filesInTranslationUnit Other files that are
* part of the input and included by the file.
* The function will return a subset of the files,
- * only including the onces that were actually found
+ * only including the ones that were actually found
* during parsing.
*/
void start(const char *fileName,QStrList &filesInTranslationUnit);
diff --git a/src/classdef.cpp b/src/classdef.cpp
index f121e27..f810154 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -2687,7 +2687,7 @@ bool ClassDef::hasNonReferenceSuperClass()
return found;
}
-/*! called from MemberDef::writeDeclaration() to (recusively) write the
+/*! called from MemberDef::writeDeclaration() to (recursively) write the
* definition of an anonymous struct, union or class.
*/
void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup,
@@ -2873,7 +2873,7 @@ static bool isStandardFunc(MemberDef *md)
}
/*!
- * recusively merges the `all members' lists of a class base
+ * recursively merges the `all members' lists of a class base
* with that of this class. Must only be called for classes without
* subclasses!
*/
diff --git a/src/classdef.h b/src/classdef.h
index 23c5c5c..b169221 100644
--- a/src/classdef.h
+++ b/src/classdef.h
@@ -200,7 +200,7 @@ class ClassDef : public Definition
MemberDef *getMemberByName(const QCString &) const;
/** Returns TRUE iff \a bcd is a direct or indirect base class of this
- * class. This function will recusively traverse all branches of the
+ * class. This function will recursively traverse all branches of the
* inheritance tree.
*/
bool isBaseClass(ClassDef *bcd,bool followInstances,int level=0);
diff --git a/src/code.l b/src/code.l
index d7d5d74..74b360f 100644
--- a/src/code.l
+++ b/src/code.l
@@ -116,6 +116,7 @@ static int g_memCallContext;
static int g_lastCContext;
static int g_skipInlineInitContext;
+static bool g_insideCpp;
static bool g_insideObjC;
static bool g_insideJava;
static bool g_insideCS;
@@ -1823,7 +1824,7 @@ TEMPLIST "<"[^\"\}\{\(\)\/\n\>]*">"
SCOPETNAME (((({ID}{TEMPLIST}?){BN}*)?{SEP}{BN}*)*)((~{BN}*)?{ID})
SCOPEPREFIX ({ID}{TEMPLIST}?{BN}*{SEP}{BN}*)+
KEYWORD_OBJC ("@public"|"@private"|"@protected"|"@class"|"@implementation"|"@interface"|"@end"|"@selector"|"@protocol"|"@optional"|"@required"|"@throw"|"@synthesize"|"@property")
-KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|{KEYWORD_OBJC})
+KEYWORD ("asm"|"__assume"|"auto"|"class"|"const"|"delete"|"enum"|"explicit"|"extern"|"false"|"friend"|"gcnew"|"gcroot"|"set"|"get"|"inline"|"internal"|"mutable"|"namespace"|"new"|"null"|"nullptr"|"override"|"operator"|"pin_ptr"|"private"|"protected"|"public"|"raise"|"register"|"remove"|"self"|"sizeof"|"static"|"struct"|"__super"|"function"|"template"|"generic"|"this"|"true"|"typedef"|"typeid"|"typename"|"union"|"using"|"virtual"|"volatile"|"abstract"|"final"|"import"|"synchronized"|"transient"|"alignas"|"alignof"|{KEYWORD_OBJC})
FLOWKW ("break"|"catch"|"continue"|"default"|"do"|"else"|"finally"|"return"|"switch"|"throw"|"throws"|"@catch"|"@finally")
FLOWCONDITION ("case"|"for"|"foreach"|"for each"|"goto"|"if"|"try"|"while"|"@try")
TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"object"|"short"|"signed"|"unsigned"|"void"|"wchar_t"|"size_t"|"boolean"|"id"|"SEL"|"string"|"nullptr")
@@ -2415,6 +2416,8 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
g_prefixed_with_this_keyword = TRUE;
}
<Body>{KEYWORD}/([^a-z_A-Z0-9]) {
+ if (g_insideJava && qstrcmp("internal",yytext) ==0) REJECT;
+ if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
startFontClass("keyword");
codifyLines(yytext);
if (QCString(yytext)=="typedef")
@@ -2425,11 +2428,13 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
endFontClass();
}
<Body>{KEYWORD}/{B}* {
+ if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
}
<Body>{KEYWORD}/{BN}*"(" {
+ if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
@@ -2984,6 +2989,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
<MemberCall2,FuncCall>{KEYWORD}/([^a-z_A-Z0-9]) {
//addParmType();
//g_parmName=yytext;
+ if (g_insideCpp && (QCString(yytext) =="set" ||QCString(yytext) =="get")) REJECT;
startFontClass("keyword");
g_code->codify(yytext);
endFontClass();
@@ -3742,6 +3748,7 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
g_insideJava = lang==SrcLangExt_Java;
g_insideCS = lang==SrcLangExt_CSharp;
g_insidePHP = lang==SrcLangExt_PHP;
+ g_insideCpp = lang==SrcLangExt_Cpp;
if (g_sourceFileDef)
{
setCurrentDoc("l00001");
diff --git a/src/commentcnv.l b/src/commentcnv.l
index 44e2543..89d2fea 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -294,12 +294,12 @@ void replaceComment(int offset);
}
else
{
- /* check for fixed format; we might have some conditional as part of multilene if like C<5 .and. & */
+ /* check for fixed format; we might have some conditional as part of multiline if like C<5 .and. & */
if (isFixedForm && (g_col == 0))
{
copyToOutput(yytext,(int)yyleng);
g_nestingCount=0;
- g_commentStack.clear(); /* to be on the save side */
+ g_commentStack.clear(); /* to be on the safe side */
BEGIN(CComment);
g_commentStack.push(new CommentCtx(g_lineNr));
}
@@ -1093,7 +1093,9 @@ void convertCppComments(BufStr *inBuf,BufStr *outBuf,const char *fileName)
if (Debug::isFlagSet(Debug::CommentCnv))
{
g_outBuf->at(g_outBuf->curPos())='\0';
- msg("-------------\n%s\n-------------\n",g_outBuf->data());
+ Debug::print(Debug::CommentCnv,0,"-----------\nCommentCnv: %s\n"
+ "output=[\n%s]\n-----------\n",fileName,g_outBuf->data()
+ );
}
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
}
diff --git a/src/commentscan.l b/src/commentscan.l
index 588d40a..55c55a7 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -548,7 +548,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
if (docEntry->sli)
{
QListIterator<ListItemInfo> slii(*docEntry->sli);
- for (slii.toFirst();(lii=slii.current());++slii)
+ for (slii.toLast();(lii=slii.current());--slii)
{
if (qstrcmp(lii->type,listName)==0)
{
@@ -563,14 +563,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
RefItem *item = refList->getRefItem(lii->itemId);
ASSERT(item!=0);
item->text += " <p>";
- if (Doxygen::markdownSupport)
- {
- item->text += processMarkdown(yyFileName,yyLineNr,current,outputXRef);
- }
- else
- {
- item->text += outputXRef;
- }
+ item->text += outputXRef;
//printf("%s: text +=%s\n",listName,item->text.data());
}
else // new item
@@ -585,14 +578,7 @@ static void addXRefItem(const char *listName,const char *itemTitle,
sprintf(anchorLabel,"_%s%06d",listName,itemId);
RefItem *item = refList->getRefItem(itemId);
ASSERT(item!=0);
- if (Doxygen::markdownSupport)
- {
- item->text = processMarkdown(yyFileName,yyLineNr,current,outputXRef);
- }
- else
- {
- item->text = outputXRef;
- }
+ item->text = outputXRef;
item->listAnchor = anchorLabel;
docEntry->addSpecialListItem(listName,itemId);
QCString cmdString;
@@ -1517,14 +1503,16 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (*yytext=='\n') yyLineNr++;
BEGIN( Comment );
}
+<GroupDocArg1>. { // ignore other stuff
+ }
<GroupDocArg2>"\\"{B}*"\n" { // line continuation
yyLineNr++;
addOutput('\n');
}
-<GroupDocArg2>[^\n\\\*]+ { // title (stored in type)
+<GroupDocArg2>[^\n\*]+ { // title (stored in type)
current->type += yytext;
current->type = current->type.stripWhiteSpace();
- }
+ }
<GroupDocArg2>{DOCNL} {
if ( current->groupDocType==Entry::GROUPDOC_NORMAL &&
current->type.isEmpty()
@@ -1860,10 +1848,10 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
addOutput(*yytext);
}
<FormatBlock><<EOF>> {
- QCString endTag = "@end"+blockName;
+ QCString endTag = "end"+blockName;
if (blockName=="startuml") endTag="enduml";
warn(yyFileName,yyLineNr,
- "reached end of comment while inside a @%s block; check for missing @%s tag!",
+ "reached end of comment while inside a \\%s block; check for missing \\%s tag!",
blockName.data(),endTag.data()
);
yyterminate();
@@ -1944,7 +1932,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "found @endif without matching start command");
+ "found \\endif without matching start command");
}
else
{
@@ -1962,7 +1950,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "found @else without matching start command");
+ "found \\else without matching start command");
}
else
{
@@ -1979,7 +1967,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (guards.isEmpty())
{
warn(yyFileName,yyLineNr,
- "found @elseif without matching start command");
+ "found \\elseif without matching start command");
}
else
{
@@ -2943,7 +2931,19 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
langParser = parser;
current = curEntry;
if (comment.isEmpty()) return FALSE; // avoid empty strings
- inputString = comment;
+ if (Doxygen::markdownSupport)
+ {
+ inputString = processMarkdown(fileName,lineNr,NULL,comment);
+ QString qq(inputString);
+ while (qq.startsWith(" ")) qq = qq.mid(1);
+ while (qq.startsWith("\n")) qq = qq.mid(1);
+ if (qq.startsWith("<br>")) qq = qq.mid(4);
+ inputString = QCString(qq.data());
+ }
+ else
+ {
+ inputString = comment;
+ }
inputString.append(" ");
inputPosition = position;
yyLineNr = lineNr;
@@ -2970,7 +2970,7 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
}
Debug::print(Debug::CommentScan,0,"-----------\nCommentScanner: %s:%d\n"
- "input=[\n%s]\n",qPrint(fileName),lineNr,qPrint(comment)
+ "input=[\n%s]\n",qPrint(fileName),lineNr,qPrint(inputString)
);
commentscanYYrestart( commentscanYYin );
@@ -3008,15 +3008,9 @@ bool parseCommentBlock(/* in */ ParserInterface *parser,
openGroup(current,yyFileName,yyLineNr);
}
- if (Doxygen::markdownSupport)
- {
- current->brief = processMarkdown(fileName,lineNr,current,current->brief);
- current->doc = processMarkdown(fileName,lineNr,current,current->doc);
- current->inbodyDocs = processMarkdown(fileName,lineNr,current,current->inbodyDocs);
- }
-
- Debug::print(Debug::CommentScan,0,
- "brief=[line=%d\n%s]\ndocs=[line=%d\n%s]\ninbody=[line=%d\n%s]\n===========\n",
+ Debug::print(Debug::CommentScan,0,"-----------\nCommentScanner: %s:%d\noutput=[\n"
+ "brief=[line=%d\n%s]\ndocs=[line=%d\n%s]\ninbody=[line=%d\n%s]\n]\n===========\n",
+ qPrint(fileName),lineNr,
current->briefLine,qPrint(current->brief),
current->docLine,qPrint(current->doc),
current->inbodyLine,qPrint(current->inbodyDocs)
diff --git a/src/condparser.cpp b/src/condparser.cpp
index 6c5d787..ab33ae3 100644
--- a/src/condparser.cpp
+++ b/src/condparser.cpp
@@ -283,7 +283,7 @@ bool CondParser::parseVar()
}
/**
- * evaluate an operator for given valuess
+ * evaluate an operator for given values
*/
bool CondParser::evalOperator(int opId, bool lhs, bool rhs)
{
diff --git a/src/config.xml b/src/config.xml
index ca33470..2dcc0f4 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -125,7 +125,7 @@ SEARCHENGINE = YES
\endverbatim
To regenerate the Qt-1.44 documentation from the sources, you could use the
-following config file:
+following configuration file:
\verbatim
PROJECT_NAME = Qt
OUTPUT_DIRECTORY = qt_docs
@@ -212,7 +212,7 @@ Go to the <a href="commands.html">next</a> section or return to the
<option type='string' id='DOXYFILE_ENCODING' format='string' defval='UTF-8'>
<docs>
<![CDATA[
- This tag specifies the encoding used for all characters in the config file that
+ This tag specifies the encoding used for all characters in the configuration file that
follow. The default is UTF-8 which is also the encoding used for all text before
the first occurrence of this tag. Doxygen uses \c libiconv (or the iconv built into
\c libc) for the transcoding. See https://www.gnu.org/software/libiconv/ for the list of
@@ -1559,7 +1559,7 @@ FILE_VERSION_INFO = "cleartool desc -fmt \%Vn"
<docs>
<![CDATA[
If the \c REFERENCED_BY_RELATION tag is set to \c YES
- then for each documented function all documented
+ then for each documented entity all documented
functions referencing it will be listed.
]]>
</docs>
@@ -1606,7 +1606,7 @@ to disable this feature.
<br>
To use it do the following:
-# Install the latest version of \c global
- -# Enable \ref cfg_source_browser "SOURCE_BROWSER" and \c USE_HTAGS in the config file
+ -# Enable \ref cfg_source_browser "SOURCE_BROWSER" and \c USE_HTAGS in the configuration file
-# Make sure the \ref cfg_input "INPUT" points to the root of the source tree
-# Run \c doxygen as normal
<br>
@@ -2533,13 +2533,14 @@ EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
]]>
</docs>
</option>
- <option type='string' id='LATEX_CMD_NAME' format='file' defval='latex' depends='GENERATE_LATEX'>
+ <option type='string' id='LATEX_CMD_NAME' format='file' defval='' depends='GENERATE_LATEX'>
<docs>
<![CDATA[
The \c LATEX_CMD_NAME tag can be used to specify the \f$\mbox{\LaTeX}\f$ command name to be invoked.
- <br>Note that when enabling \ref cfg_use_pdflatex "USE_PDFLATEX" this option is only used for
- generating bitmaps for formulas in the HTML output, but not in the
- \c Makefile that is written to the output directory.
+ <br>Note that when not enabling \ref cfg_use_pdflatex "USE_PDFLATEX" the default is \c latex when
+ enabling \ref cfg_use_pdflatex "USE_PDFLATEX" the default is \c pdflatex and when in the later case
+ \c latex is chosen this is overwritten by \c pdflatex. For specific output languages the default can
+ have been set differently, this depends on the implementation of the output language.
]]>
</docs>
</option>
@@ -2772,7 +2773,7 @@ or
<docs>
<![CDATA[
Load stylesheet definitions from file. Syntax is similar to doxygen's
- config file, i.e. a series of assignments. You only have to provide
+ configuration file, i.e. a series of assignments. You only have to provide
replacements, missing definitions are set to their default value.
<br>
See also section \ref doxygen_usage for information on how to generate
@@ -2785,7 +2786,7 @@ or
<docs>
<![CDATA[
Set optional variables used in the generation of an RTF document.
- Syntax is similar to doxygen's config file.
+ Syntax is similar to doxygen's configuration file.
A template extensions file can be generated using
<code>doxygen -e rtf extensionFile</code>.
]]>
diff --git a/src/context.cpp b/src/context.cpp
index 063fb0e..c9a6bb3 100644
--- a/src/context.cpp
+++ b/src/context.cpp
@@ -246,7 +246,6 @@ class PropertyMapper
/** Add a property to the map
* @param[in] name The name of the property to add.
- * @param[in] obj The object handling access to the property.
* @param[in] handle The method to call when the property is accessed.
*/
void addProperty(const char *name,typename PropertyFunc::Handler handle)
@@ -262,6 +261,7 @@ class PropertyMapper
}
/** Gets the value of a property.
+ * @param[in] obj The object handling access to the property.
* @param[in] name The name of the property.
* @returns A variant representing the properties value or an
* invalid variant if it was not found.
diff --git a/src/definition.cpp b/src/definition.cpp
index ff30429..92baf0c 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -1034,15 +1034,15 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
ol.pushGeneratorState();
ol.disable(OutputGenerator::Man);
- if (!latexSourceCode)
+ ol.disableAllBut(OutputGenerator::Html);
+ if (latexSourceCode)
{
- ol.disable(OutputGenerator::Latex);
+ ol.enable(OutputGenerator::Latex);
}
- if (!rtfSourceCode)
+ if (rtfSourceCode)
{
- ol.disable(OutputGenerator::RTF);
+ ol.enable(OutputGenerator::RTF);
}
- ol.disableAllBut(OutputGenerator::Html);
// write line link (HTML only)
ol.writeObjectLink(0,fn,anchorStr,lineStr);
ol.enableAll();
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 42792ad..667aa85 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -833,7 +833,7 @@ void TreeDiagram::drawConnectors(FTextStream &t,Image *image,
}
++rit; di=rit.current();
}
- // add last horizonal line and a vertical connection line
+ // add last horizontal line and a vertical connection line
if (bitmap)
{
if (doBase) // base classes
diff --git a/src/dirdef.cpp b/src/dirdef.cpp
index b247ba7..6631ed7 100644
--- a/src/dirdef.cpp
+++ b/src/dirdef.cpp
@@ -930,14 +930,14 @@ void buildDirectories()
for (;(fd=fni.current());++fni)
{
//printf("buildDirectories %s\n",fd->name().data());
- if (fd->getReference().isEmpty() && !fd->isDocumentationFile())
+ if (fd->getReference().isEmpty())
{
DirDef *dir;
if ((dir=Doxygen::directories->find(fd->getPath()))==0) // new directory
{
dir = DirDef::mergeDirectoryInTree(fd->getPath());
}
- if (dir) dir->addFile(fd);
+ if (dir && !fd->isDocumentationFile()) dir->addFile(fd);
}
else
{
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 3d57c2e..29c6ca7 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -451,11 +451,12 @@ static void checkArgumentName(const QCString &name,bool isParam)
}
/*! Checks if the parameters that have been specified using \@param are
- * indeed all parameters.
+ * indeed all parameters and that a parameter does not have multiple
+ * \@param blocks.
* Must be called after checkArgumentName() has been called for each
* argument.
*/
-static void checkUndocumentedParams()
+static void checkUnOrMultipleDocumentedParams()
{
if (g_memberDef && g_hasParamCommand && Config_getBool(WARN_IF_DOC_ERROR))
{
@@ -470,18 +471,37 @@ static void checkUndocumentedParams()
bool found=FALSE;
for (ali.toFirst();(a=ali.current());++ali)
{
+ int count = 0;
QCString argName = g_memberDef->isDefine() ? a->type : a->name;
if (lang==SrcLangExt_Fortran) argName = argName.lower();
argName=argName.stripWhiteSpace();
+ QCString aName = argName;
if (argName.right(3)=="...") argName=argName.left(argName.length()-3);
- if (g_memberDef->getLanguage()==SrcLangExt_Python && (argName=="self" || argName=="cls"))
+ if (lang==SrcLangExt_Python && (argName=="self" || argName=="cls"))
{
// allow undocumented self / cls parameter for Python
}
else if (!argName.isEmpty() && g_paramsFound.find(argName)==0 && a->docs.isEmpty())
{
found = TRUE;
- break;
+ }
+ else
+ {
+ QDictIterator<void> it1(g_paramsFound);
+ void *item1;
+ for (;(item1=it1.current());++it1)
+ {
+ if (argName == it1.currentKey()) count++;
+ }
+ }
+ if (count > 1)
+ {
+ warn_doc_error(g_memberDef->getDefFileName(),
+ g_memberDef->getDefLine(),
+ "argument '" + aName +
+ "' from the argument list of " +
+ QCString(g_memberDef->qualifiedName()) +
+ " has muliple @param documentation sections");
}
}
if (found)
@@ -497,7 +517,7 @@ static void checkUndocumentedParams()
QCString argName = g_memberDef->isDefine() ? a->type : a->name;
if (lang==SrcLangExt_Fortran) argName = argName.lower();
argName=argName.stripWhiteSpace();
- if (g_memberDef->getLanguage()==SrcLangExt_Python && (argName=="self" || argName=="cls"))
+ if (lang==SrcLangExt_Python && (argName=="self" || argName=="cls"))
{
// allow undocumented self / cls parameter for Python
}
@@ -5017,25 +5037,27 @@ void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type
void DocPara::handleImage(const QCString &cmdName)
{
+ QCString saveCmdName = cmdName;
+
int tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ qPrint(saveCmdName));
return;
}
tok=doctokenizerYYlex();
if (tok!=TK_WORD && tok!=TK_LNKWORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
tok=doctokenizerYYlex();
if (tok!=TK_WHITESPACE)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command",
- qPrint(cmdName));
+ qPrint(saveCmdName));
return;
}
DocImage::Type t;
@@ -5046,9 +5068,9 @@ void DocPara::handleImage(const QCString &cmdName)
else if (imgType=="rtf") t=DocImage::Rtf;
else
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"image type %s specified as the first argument of "
- "%s is not valid",
- qPrint(imgType),qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"output format %s specified as the first argument of "
+ "%s command is not valid",
+ qPrint(imgType),qPrint(saveCmdName));
return;
}
doctokenizerYYsetStateFile();
@@ -5057,7 +5079,7 @@ void DocPara::handleImage(const QCString &cmdName)
if (tok!=TK_WORD)
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s",
- tokToString(tok),qPrint(cmdName));
+ tokToString(tok),qPrint(saveCmdName));
return;
}
HtmlAttribList attrList;
@@ -6125,16 +6147,15 @@ int DocPara::handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &ta
}
}
}
- else if (findAttribute(tagHtmlAttribs,"langword",&cref)) // <see langword="..."/> or <see langworld="..."></see>
+ else if (findAttribute(tagHtmlAttribs,"langword",&cref)) // <see langword="..."/> or <see langword="..."></see>
{
- doctokenizerYYsetStatePara();
- DocLink *lnk = new DocLink(this,cref);
- m_children.append(lnk);
- QCString leftOver = lnk->parse(FALSE,TRUE);
- if (!leftOver.isEmpty())
- {
- m_children.append(new DocWord(this,leftOver));
- }
+ bool inSeeBlock = g_inSeeBlock;
+ g_token->name = cref;
+ g_inSeeBlock = TRUE;
+ m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Code,TRUE));
+ handleLinkedWord(this,m_children,TRUE);
+ m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Code,FALSE));
+ g_inSeeBlock = inSeeBlock;
}
else
{
@@ -7541,7 +7562,7 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
delete v;
}
- checkUndocumentedParams();
+ checkUnOrMultipleDocumentedParams();
detectNoDocumentedParams();
// TODO: These should be called at the end of the program.
diff --git a/src/docparser.h b/src/docparser.h
index 8fcbed6..d7390c2 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -277,7 +277,7 @@ class DocLinkedWord : public DocNode
QCString m_tooltip;
};
-/** Node representing an URL (or email address) */
+/** Node representing a URL (or email address) */
class DocURL : public DocNode
{
public:
@@ -306,7 +306,7 @@ class DocLineBreak : public DocNode
private:
};
-/** Node representing a horizonal ruler */
+/** Node representing a horizontal ruler */
class DocHorRuler : public DocNode
{
public:
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 90a8c55..e6b8865 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -387,7 +387,8 @@ LNKWORD2 (({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("
LNKWORD3 ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+
CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
ESCWORD ("%"{ID}(("::"|"."){ID})*)|("%'")
-WORD1 {ESCWORD}|{CHARWORDQ}+|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"")
+CHARWORDQ1 [^ \-+0-9\t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
+WORD1 {ESCWORD}|{CHARWORDQ1}+|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"")
WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"="|"'"
WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}"
WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"="|"'"
@@ -554,7 +555,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
g_token->indent = computeIndent(text,dotPos);
return TK_ENDLIST;
}
-<St_Para>"{"{BLANK}*"@link" {
+<St_Para>"{"{BLANK}*"@link"/{BLANK}+ {
g_token->name = "javalink";
return TK_COMMAND;
}
@@ -696,6 +697,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
}
/********* patterns for normal words ******************/
+<St_Para,St_Text>[\-+0-9] |
<St_Para,St_Text>{WORD1} |
<St_Para,St_Text>{WORD2} { /* function call */
if (yytext[0]=='%') // strip % if present
@@ -931,6 +933,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
g_token->name = yytext;
return TK_WORD;
}
+<St_TitleN>[\-+0-9] |
<St_TitleN>{WORD1} |
<St_TitleN>{WORD2} { /* word */
if (yytext[0]=='%') // strip % if present
diff --git a/src/dot.cpp b/src/dot.cpp
index 80703b9..eeb8b8b 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -266,6 +266,7 @@ static void writeGraphHeader(FTextStream &t,const QCString &title=QCString())
{
t << " // INTERACTIVE_SVG=YES\n";
}
+ t << " // LATEX_PDF_SIZE\n"; // write placeholder for LaTeX PDF bounding box size repacement
if (Config_getBool(DOT_TRANSPARENT))
{
t << " bgcolor=\"transparent\";" << endl;
@@ -437,6 +438,55 @@ static void unsetDotFontPath()
g_dotFontPath="";
}
+static bool resetPDFSize(const int width,const int height, const char *base)
+{
+ QString tmpName = QString::fromUtf8(QCString(base)+".tmp");
+ QString patchFile = QString::fromUtf8(QCString(base)+".dot");
+ if (!QDir::current().rename(patchFile,tmpName))
+ {
+ err("Failed to rename file %s to %s!\n",patchFile.data(),tmpName.data());
+ return FALSE;
+ }
+ QFile fi(tmpName);
+ QFile fo(patchFile);
+ if (!fi.open(IO_ReadOnly))
+ {
+ err("problem opening file %s for patching!\n",tmpName.data());
+ QDir::current().rename(tmpName,patchFile);
+ return FALSE;
+ }
+ if (!fo.open(IO_WriteOnly))
+ {
+ err("problem opening file %s for patching!\n",patchFile.data());
+ QDir::current().rename(tmpName,patchFile);
+ fi.close();
+ return FALSE;
+ }
+ FTextStream t(&fo);
+ const int maxLineLen=100*1024;
+ while (!fi.atEnd()) // foreach line
+ {
+ QCString line(maxLineLen);
+ int numBytes = fi.readLine(line.rawData(),maxLineLen);
+ if (numBytes<=0)
+ {
+ break;
+ }
+ line.resize(numBytes+1);
+ if (line.find("LATEX_PDF_SIZE") != -1)
+ {
+ double scale = (width > height ? width : height)/double(MAX_LATEX_GRAPH_INCH);
+ t << " size=\""<<width/scale << "," <<height/scale <<"\";\n";
+ }
+ else
+ t << line;
+ }
+ fi.close();
+ fo.close();
+ // remove temporary file
+ QDir::current().remove(tmpName);
+ return TRUE;
+}
static bool readBoundingBox(const char *fileName,int *width,int *height,bool isEps)
{
QCString bb = isEps ? QCString("%%PageBoundingBox:") : QCString("/MediaBox [");
@@ -765,10 +815,10 @@ DotRunner::DotRunner(const QCString &file,const QCString &path,
m_jobs.setAutoDelete(TRUE);
}
-void DotRunner::addJob(const char *format,const char *output)
+void DotRunner::addJob(const char *format,const char *output, const char *base)
{
QCString args = QCString("-T")+format+" -o \""+output+"\"";
- m_jobs.append(new DotConstString(args));
+ m_jobs.append(new DotConstString(args, base));
}
void DotRunner::addPostProcessing(const char *cmd,const char *args)
@@ -780,6 +830,7 @@ void DotRunner::addPostProcessing(const char *cmd,const char *args)
bool DotRunner::run()
{
int exitCode=0;
+ int width=0,height=0;
QCString dotArgs;
QListIterator<DotConstString> li(m_jobs);
@@ -792,9 +843,26 @@ bool DotRunner::run()
dotArgs+=' ';
dotArgs+=s->data();
}
- if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0)
+ if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ dotArgs=QCString("\"")+m_file.data()+"\"";
+ bool redo = FALSE;
+ for (li.toFirst();(s=li.current());++li)
+ {
+ if (s->pdfData())
+ {
+ if (!readBoundingBox(QCString(s->pdfData())+".pdf",&width,&height,FALSE)) goto error;
+ if ((width > MAX_LATEX_GRAPH_SIZE) || (height > MAX_LATEX_GRAPH_SIZE))
+ {
+ if (!resetPDFSize(width,height,s->pdfData())) goto error;
+ dotArgs+=' ';
+ dotArgs+=s->data();
+ redo = TRUE;
+ }
+ }
+ }
+ if (redo)
{
- goto error;
+ if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
}
}
else
@@ -802,9 +870,15 @@ bool DotRunner::run()
for (li.toFirst();(s=li.current());++li)
{
dotArgs=QCString("\"")+m_file.data()+"\" "+s->data();
- if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0)
+ if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ if (s->pdfData())
{
- goto error;
+ if (!readBoundingBox(QCString(s->pdfData())+".pdf",&width,&height,FALSE)) goto error;
+ if ((width > MAX_LATEX_GRAPH_SIZE) || (height > MAX_LATEX_GRAPH_SIZE))
+ {
+ if (!resetPDFSize(width,height,s->pdfData())) goto error;
+ if ((exitCode=portable_system(m_dotExe.data(),dotArgs,FALSE))!=0) goto error;
+ }
}
}
}
@@ -3150,7 +3224,7 @@ QCString DotClassGraph::writeGraph(FTextStream &out,
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
if (usePDFLatex)
{
- dotRun->addJob("pdf",absPdfName);
+ dotRun->addJob("pdf",absPdfName,absBaseName);
}
else
{
@@ -3508,7 +3582,7 @@ QCString DotInclDepGraph::writeGraph(FTextStream &out,
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
if (usePDFLatex)
{
- dotRun->addJob("pdf",absPdfName);
+ dotRun->addJob("pdf",absPdfName,absBaseName);
}
else
{
@@ -3826,7 +3900,7 @@ QCString DotCallGraph::writeGraph(FTextStream &out, GraphOutputFormat graphForma
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
if (usePDFLatex)
{
- dotRun->addJob("pdf",absPdfName);
+ dotRun->addJob("pdf",absPdfName,absBaseName);
}
else
{
@@ -3992,7 +4066,7 @@ QCString DotDirDeps::writeGraph(FTextStream &out,
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
if (usePDFLatex)
{
- dotRun->addJob("pdf",absPdfName);
+ dotRun->addJob("pdf",absPdfName,absBaseName);
}
else
{
@@ -4170,7 +4244,7 @@ void writeDotGraphFromFile(const char *inFile,const char *outDir,
{
if (Config_getBool(USE_PDFLATEX))
{
- dotRun.addJob("pdf",absOutFile+".pdf");
+ dotRun.addJob("pdf",absOutFile+".pdf",absOutFile);
}
else
{
@@ -4555,7 +4629,7 @@ QCString DotGroupCollaboration::writeGraph( FTextStream &t,
DotRunner *dotRun = new DotRunner(absDotName,d.absPath().data(),FALSE);
if (usePDFLatex)
{
- dotRun->addJob("pdf",absPdfName);
+ dotRun->addJob("pdf",absPdfName,absBaseName);
}
else
{
diff --git a/src/dot.h b/src/dot.h
index dce1a3a..ab6a316 100644
--- a/src/dot.h
+++ b/src/dot.h
@@ -42,6 +42,12 @@ class DotRunnerQueue;
enum GraphOutputFormat { GOF_BITMAP, GOF_EPS };
enum EmbeddedOutputFormat { EOF_Html, EOF_LaTeX, EOF_Rtf, EOF_DocBook };
+// the graphicx LaTeX has a limitation of maximum size of 16384
+// To be on the save side we take it a little bit smaller i.e. 150 inch * 72 dpi
+// It is anyway hard to view these size of images
+#define MAX_LATEX_GRAPH_INCH 150
+#define MAX_LATEX_GRAPH_SIZE (MAX_LATEX_GRAPH_INCH * 72)
+
/** Attributes of an edge of a dot graph */
struct EdgeInfo
{
@@ -338,11 +344,12 @@ class DotGroupCollaboration
class DotConstString
{
public:
- DotConstString() { m_str=0; }
- ~DotConstString() { delete[] m_str; }
- DotConstString(const QCString &s) : m_str(0) { set(s); }
- DotConstString(const DotConstString &s) : m_str(0) { set(s.data()); }
+ DotConstString() { m_str=0; m_pdfstr=0;}
+ ~DotConstString() { delete[] m_str; delete[] m_pdfstr;}
+ DotConstString(const QCString &s, const QCString &p = NULL) : m_str(0), m_pdfstr(0) { set(s); setpdf(p);}
+ DotConstString(const DotConstString &s) : m_str(0), m_pdfstr(0) { set(s.data()); }
const char *data() const { return m_str; }
+ const char *pdfData() const { return m_pdfstr; }
bool isEmpty() const { return m_str==0 || m_str[0]=='\0'; }
void set(const QCString &s)
{
@@ -354,9 +361,20 @@ class DotConstString
qstrcpy(m_str,s.data());
}
}
+ void setpdf(const QCString &p)
+ {
+ delete[] m_pdfstr;
+ m_pdfstr=0;
+ if (!p.isEmpty())
+ {
+ m_pdfstr=new char[p.length()+1];
+ qstrcpy(m_pdfstr,p.data());
+ }
+ }
private:
DotConstString &operator=(const DotConstString &);
char *m_str;
+ char *m_pdfstr;
};
/** Helper class to run dot from doxygen.
@@ -377,7 +395,7 @@ class DotRunner
/** Adds an additional job to the run.
* Performing multiple jobs one file can be faster.
*/
- void addJob(const char *format,const char *output);
+ void addJob(const char *format,const char *output, const char *base = NULL);
void addPostProcessing(const char *cmd,const char *args);
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 00826d6..263b59f 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -10965,7 +10965,7 @@ void parseInput()
/**************************************************************************
- * Check/create output directorties *
+ * Check/create output directories *
**************************************************************************/
QCString htmlOutput;
diff --git a/src/filedef.cpp b/src/filedef.cpp
index 2cfe37a..e2df9be 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -1420,13 +1420,11 @@ bool FileDef::generateSourceFile() const
{
static bool sourceBrowser = Config_getBool(SOURCE_BROWSER);
static bool verbatimHeaders = Config_getBool(VERBATIM_HEADERS);
- QCString extension = name().right(4);
return !isReference() &&
(sourceBrowser ||
(verbatimHeaders && guessSection(name())==Entry::HEADER_SEC)
) &&
- extension!=".doc" && extension!=".txt" && extension!=".dox" &&
- extension!=".md" && name().right(9)!=".markdown";
+ !isDocumentationFile();
}
diff --git a/src/formula.cpp b/src/formula.cpp
index 6fe617d..9e48b2d 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -25,6 +25,7 @@
#include "util.h"
#include "message.h"
#include "config.h"
+#include "language.h"
#include "portable.h"
#include "index.h"
#include "doxygen.h"
@@ -96,8 +97,7 @@ void FormulaList::generateBitmaps(const char *path)
{
//printf("Running latex...\n");
//system("latex _formulas.tex </dev/null >/dev/null");
- QCString latexCmd = Config_getString(LATEX_CMD_NAME);
- if (latexCmd.isEmpty()) latexCmd="latex";
+ QCString latexCmd = theTranslator->latexCommandName();
portable_sysTimerStart();
if (portable_system(latexCmd,"_formulas.tex")!=0)
{
diff --git a/src/fortrancode.l b/src/fortrancode.l
index 501b492..14268cf 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -159,6 +159,9 @@ static char stringStartSymbol; // single or double quote
// declared from referenced names
static int bracketCount = 0;
+// signal when in type / class /procedure declaration
+static int inTypeDecl = 0;
+
static bool g_endComment;
static void endFontClass()
@@ -687,14 +690,14 @@ CHAR (CHARACTER{ARGS}?|CHARACTER{BS}"*"({BS}[0-9]+|{ARGS}))
TYPE_SPEC (({NUM_TYPE}({BS}"*"{BS}[0-9]+)?)|({NUM_TYPE}{KIND})|DOUBLE{BS}COMPLEX|DOUBLE{BS}PRECISION|{CHAR}|TYPE|CLASS|PROCEDURE)
INTENT_SPEC intent{BS}"("{BS}(in|out|in{BS}out){BS}")"
-ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|RECURSIVE|PURE|IMPURE|ELEMENTAL|VALUE|NOPASS|DEFERRED|CONTIGUOUS|VOLATILE)
+ATTR_SPEC (IMPLICIT|ALLOCATABLE|DIMENSION{ARGS}|EXTERNAL|{INTENT_SPEC}|INTRINSIC|OPTIONAL|PARAMETER|POINTER|PROTECTED|PRIVATE|PUBLIC|SAVE|TARGET|(NON_)?RECURSIVE|PURE|IMPURE|ELEMENTAL|VALUE|NOPASS|DEFERRED|CONTIGUOUS|VOLATILE)
ACCESS_SPEC (PROTECTED|PRIVATE|PUBLIC)
/* Assume that attribute statements are almost the same as attributes. */
ATTR_STMT {ATTR_SPEC}|DIMENSION
FLOW (DO|SELECT|CASE|SELECT{BS}(CASE|TYPE)|WHERE|IF|THEN|ELSE|WHILE|FORALL|ELSEWHERE|ELSEIF|RETURN|CONTINUE|EXIT|GO{BS}TO)
COMMANDS (FORMAT|CONTAINS|MODULE{BS_}PROCEDURE|WRITE|READ|ALLOCATE|ALLOCATED|ASSOCIATED|PRESENT|DEALLOCATE|NULLIFY|SIZE|INQUIRE|OPEN|CLOSE|FLUSH|DATA|COMMON)
IGNORE (CALL)
-PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|IMPURE|PURE|ELEMENTAL)?
+PREFIX ((NON_)?RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,4}((NON_)?RECURSIVE|IMPURE|PURE|ELEMENTAL)?
/* | */
@@ -813,7 +816,8 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
unput(*yytext);
yy_pop_state();YY_FTN_RESET
}
-<Start>"import"{BS_} {
+<*>"import"{BS}/"\n" |
+<*>"import"{BS_} {
startFontClass("keywordtype");
codifyLines(yytext);
endFontClass();
@@ -825,6 +829,11 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
generateLink(*g_code, yytext);
g_insideBody=FALSE;
}
+<Import>("ONLY"|"NONE"|"ALL") {
+ startFontClass("keywordtype");
+ codifyLines(yytext);
+ endFontClass();
+ }
/*-------- fortran module -----------------------------------------*/
<Start>("block"{BS}"data"|"program"|"module"|"interface")/{BS_}|({COMMA}{ACCESS_SPEC})|\n { //
startScope();
@@ -836,14 +845,14 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
if (!qstricmp(yytext,"module")) currentModule="module";
}
<Start>("type")/{BS_}|({COMMA}({ACCESS_SPEC}|ABSTRACT|EXTENDS))|\n { //
- startScope();
- startFontClass("keyword");
- codifyLines(yytext);
- endFontClass();
+ startScope();
+ startFontClass("keyword");
+ codifyLines(yytext);
+ endFontClass();
yy_push_state(YY_START);
- BEGIN(ClassName);
- currentClass="class";
- }
+ BEGIN(ClassName);
+ currentClass="class";
+ }
<ClassName>{ID} {
if (currentModule == "module")
{
@@ -853,7 +862,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
generateLink(*g_code,yytext);
yy_pop_state();
}
-<ClassName>({ACCESS_SPEC}|ABSTRACT|EXTENDS)/[,:( ] { //| variable deklaration
+<ClassName>({ACCESS_SPEC}|ABSTRACT|EXTENDS)/[,:( ] { //| variable declaration
startFontClass("keyword");
g_code->codify(yytext);
endFontClass();
@@ -876,7 +885,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
codifyLines(yytext);
endFontClass();
}
-<Start>({PREFIX}{BS_})?{SUBPROG}{BS_} { // Fortran subroutine or function found
+<Start>({PREFIX}{BS_})?{SUBPROG}{BS_} { // Fortran subroutine or function found
startFontClass("keyword");
codifyLines(yytext);
endFontClass();
@@ -922,7 +931,18 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
endFontClass();
}
/*-------- variable declaration ----------------------------------*/
+<Start>^{BS}"real"/[,:( ] { // real is a bit tricky as it is a data type but also a function.
+ yy_push_state(YY_START);
+ BEGIN(Declaration);
+ startFontClass("keywordtype");
+ g_code->codify(yytext);
+ endFontClass();
+ }
<Start>{TYPE_SPEC}/[,:( ] {
+ QCString typ = yytext;
+ typ = removeRedundantWhiteSpace(typ.lower());
+ if (QString(typ).startsWith("real")) YY_FTN_REJECT;
+ if (typ == "type" || typ == "class" || typ == "procedure") inTypeDecl = 1;
yy_push_state(YY_START);
BEGIN(Declaration);
startFontClass("keywordtype");
@@ -934,7 +954,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
g_code->codify(yytext);
endFontClass();
}
-<Declaration>({TYPE_SPEC}|{ATTR_SPEC})/[,:( ] { //| variable deklaration
+<Declaration>({TYPE_SPEC}|{ATTR_SPEC})/[,:( ] { //| variable declaration
startFontClass("keywordtype");
g_code->codify(yytext);
endFontClass();
@@ -946,7 +966,7 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
g_code->codify(yytext);
endFontClass();
}
- else if (g_currentMemberDef && ((g_currentMemberDef->isFunction() && (g_currentMemberDef->typeString() != QCString("subroutine"))) ||
+ else if (g_currentMemberDef && ((g_currentMemberDef->isFunction() && (g_currentMemberDef->typeString() != QCString("subroutine") || inTypeDecl)) ||
g_currentMemberDef->isVariable()))
{
generateLink(*g_code, yytext);
@@ -956,22 +976,23 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
g_code->codify(yytext);
addLocalVar(yytext);
}
- }
-<Declaration>{BS}("=>"|"="){BS} { // Procedure binding
- BEGIN(DeclarationBinding);
- g_code->codify(yytext);
- }
-<DeclarationBinding>{ID} { // Type bound procedure link
+ }
+<Declaration>{BS}("=>"|"="){BS} { // Procedure binding
+ BEGIN(DeclarationBinding);
+ g_code->codify(yytext);
+ }
+<DeclarationBinding>{ID} { // Type bound procedure link
generateLink(*g_code, yytext);
yy_pop_state();
- }
-<Declaration>[(] { // start of array specification
+ }
+<Declaration>[(] { // start of array or type / class specification
bracketCount++;
g_code->codify(yytext);
}
<Declaration>[)] { // end array specification
bracketCount--;
+ if (!bracketCount) inTypeDecl = 0;
g_code->codify(yytext);
}
@@ -1175,14 +1196,16 @@ PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|I
/*-----------------------------------------------------------------------------*/
<*>\n {
- if (g_endComment)
- {
- g_endComment=FALSE;
- }
- else
- {
- codifyLines(yytext);
- }
+ if (g_endComment)
+ {
+ g_endComment=FALSE;
+ }
+ else
+ {
+ codifyLines(yytext);
+ // comment cannot extend over the end of a line so should always be terminatd at the end of the line.
+ if (g_currentFontClass && !strcmp(g_currentFontClass,"comment")) endFontClass();
+ }
g_contLineNr++;
YY_FTN_RESET
}
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 85b6de9..774251b 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -198,6 +198,8 @@ static SymbolModifiers currentModifiers;
//! Holds program scope->symbol name->symbol modifiers.
static QMap<Entry*,QMap<QCString,SymbolModifiers> > modifiers;
+static Entry *global_scope = NULL;
+
//-----------------------------------------------------------------------------
static int yyread(char *buf,int max_size);
@@ -248,6 +250,7 @@ SUBPROG (subroutine|function)
B [ \t]
BS [ \t]*
BS_ [ \t]+
+BT_ ([ \t]+|[ \t]*"(")
COMMA {BS},{BS}
ARGS_L0 ("("[^)]*")")
ARGS_L1a [^()]*"("[^)]*")"[^)]*
@@ -271,7 +274,7 @@ ATTR_STMT {ATTR_SPEC}|DIMENSION|{ACCESS_SPEC}
EXTERNAL_STMT (EXTERNAL)
CONTAINS CONTAINS
-PREFIX (RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,3}(RECURSIVE|IMPURE|PURE|ELEMENTAL)?
+PREFIX ((NON_)?RECURSIVE{BS_}|IMPURE{BS_}|PURE{BS_}|ELEMENTAL{BS_}){0,4}((NON_)?RECURSIVE|IMPURE|PURE|ELEMENTAL)?
SCOPENAME ({ID}{BS}"::"{BS})*
%option noyywrap
@@ -558,7 +561,18 @@ SCOPENAME ({ID}{BS}"::"{BS})*
if (!endScope(current_root))
yyterminate();
defaultProtection = Public;
- yy_pop_state();
+ if (global_scope)
+ {
+ if (global_scope != (Entry *) -1)
+ yy_push_state(Start);
+ else
+ yy_pop_state(); // cannot pop artrificial entry
+ }
+ else
+ {
+ yy_push_state(Start);
+ global_scope = (Entry *)-1; // signal that the global_scope has already been used.
+ }
}
<Module>{ID} {
addModule(yytext, TRUE);
@@ -602,7 +616,7 @@ abstract {
current->spec |= Entry::AbstractClass;
}
extends{ARGS} {
- QCString basename = extractFromParens(yytext);
+ QCString basename = extractFromParens(yytext).lower();
current->extends->append(new BaseInfo(basename, Public, Normal));
}
public {
@@ -667,7 +681,8 @@ private {
addCurrentEntry(1);
}
{BS}"=>"[^(\n|\!)]* { /* Specific bindings come after the ID. */
- last_entry->args = yytext;
+ QCString args = yytext;
+ last_entry->args = args.lower();
}
"\n" {
currentModifiers = SymbolModifiers();
@@ -773,8 +788,10 @@ private {
}
{ID} {
}
-^{BS}"type"{BS_}"is"/{BS_} { }
+^{BS}"type"{BS_}"is"/{BT_} { }
^{BS}"type"{BS}"=" { }
+^{BS}"class"{BS_}"is"/{BT_} { }
+^{BS}"class"{BS_}"default" { }
}
<AttributeList>{
{COMMA} {}
@@ -1098,7 +1115,6 @@ private {
yy_push_state(YY_START);
BEGIN(StrIgnore);
debugStr="*!";
- //fprintf(stderr,"start comment %d\n",yyLineNr);
}
}
}
@@ -1552,7 +1568,10 @@ const char* prepassFixedForm(const char* contents, int *hasContLine)
}
// fallthrough
default:
- if(column==6 && emptyLabel) { // continuation
+ if ((column < 6) && ((c - '0') >= 0) && ((c - '0') <= 9)) { // remove numbers, i.e. labels from first 5 positions.
+ newContents[j]=' ';
+ }
+ else if(column==6 && emptyLabel) { // continuation
if (!commented) fullCommentLine=FALSE;
if (c != '0') { // 0 not allowed as continuation character, see f95 standard paragraph 3.3.2.3
newContents[j]=' ';
@@ -2017,14 +2036,23 @@ static void startScope(Entry *scope)
*/
static bool endScope(Entry *scope, bool isGlobalRoot)
{
+ if (global_scope == scope)
+ {
+ global_scope = NULL;
+ return TRUE;
+ }
+ if (global_scope == (Entry *) -1)
+ {
+ return TRUE;
+ }
//cout<<"end scope: "<<scope->name<<endl;
if (current_root->parent() || isGlobalRoot)
{
current_root= current_root->parent(); /* end substructure */
}
- else
+ else // if (current_root != scope)
{
- fprintf(stderr,"parse error in end <scopename>");
+ fprintf(stderr,"parse error in end <scopename>\n");
scanner_abort();
return FALSE;
}
@@ -2558,6 +2586,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, Fortra
yyFileName = fileName;
msg("Parsing file %s...\n",yyFileName.data());
+ global_scope = rt;
startScope(rt); // implies current_root = rt
initParser();
groupEnterFile(yyFileName,yyLineNr);
@@ -2579,7 +2608,7 @@ static void parseMain(const char *fileName,const char *fileBuf,Entry *rt, Fortra
fortranscannerYYlex();
groupLeaveFile(yyFileName,yyLineNr);
- endScope(current_root, TRUE); // TRUE - global root
+ if (global_scope && global_scope != (Entry *) -1) endScope(current_root, TRUE); // TRUE - global root
//debugCompounds(rt); //debug
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp
index b04da62..14c94a3 100644
--- a/src/ftvhelp.cpp
+++ b/src/ftvhelp.cpp
@@ -302,6 +302,10 @@ void FTVHelp::generateLink(FTextStream &t,FTVNode *n)
else
t << "\" target=\"_self\">";
}
+ else
+ {
+ t << ">";
+ }
t << convertToHtml(n->name);
t << "</a>";
if (!n->ref.isEmpty())
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 8b6d26c..6a9c142 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -126,21 +126,29 @@ static bool mustBeOutsideParagraph(DocNode *n)
return FALSE;
}
-static QString htmlAttribsToString(const HtmlAttribList &attribs)
+static QString htmlAttribsToString(const HtmlAttribList &attribs, const bool img_tag = FALSE)
{
QString result;
HtmlAttribListIterator li(attribs);
HtmlAttrib *att;
+ bool alt_set = FALSE;
+
for (li.toFirst();(att=li.current());++li)
{
if (!att->value.isEmpty()) // ignore attribute without values as they
- // are not XHTML compliant
+ // are not XHTML compliant, with the exception
+ // of the alt attribute with the img tag
{
result+=" ";
result+=att->name;
result+="=\""+convertToXML(att->value)+"\"";
+ if (att->name == "alt") alt_set = TRUE;
}
}
+ if (!alt_set && img_tag)
+ {
+ result+=" alt=\"\"";
+ }
return result;
}
@@ -1521,7 +1529,7 @@ void HtmlDocVisitor::visitPre(DocImage *img)
else
{
m_t << "<img src=\"" << correctURL(url,img->relPath()) << "\""
- << sizeAttribs << htmlAttribsToString(img->attribs())
+ << sizeAttribs << htmlAttribsToString(img->attribs(), TRUE)
<< "/>" << endl;
}
}
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index cc3e61d..740b2f5 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -375,7 +375,7 @@ static QCString substituteHtmlKeywords(const QCString &s,
mathJaxJs += "\n";
}
mathJaxJs += "</script>";
- mathJaxJs += "<script type=\"text/javascript\" async src=\"" + path + "MathJax.js\"></script>\n";
+ mathJaxJs += "<script type=\"text/javascript\" async=\"async\" src=\"" + path + "MathJax.js\"></script>\n";
}
// first substitute generic keywords
@@ -1428,13 +1428,7 @@ void HtmlGenerator::startMemberItem(const char *anchor,int annoType,const char *
t << " inherit " << inheritId;
}
t << "\">";
- switch(annoType)
- {
- case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
- case 1: t << "<td class=\"memItemLeft\" >"; break;
- case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
- default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
- }
+ insertMemberAlignLeft(annoType, true);
}
void HtmlGenerator::endMemberItem()
@@ -1466,7 +1460,19 @@ void HtmlGenerator::insertMemberAlign(bool templ)
t << "&#160;</td><td class=\"" << className << "\" valign=\"bottom\">";
}
-void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId)
+void HtmlGenerator::insertMemberAlignLeft(int annoType, bool initTag)
+{
+ if (!initTag) t << "&#160;</td>";
+ switch(annoType)
+ {
+ case 0: t << "<td class=\"memItemLeft\" align=\"right\" valign=\"top\">"; break;
+ case 1: t << "<td class=\"memItemLeft\" >"; break;
+ case 2: t << "<td class=\"memItemLeft\" valign=\"top\">"; break;
+ default: t << "<td class=\"memTemplParams\" colspan=\"2\">"; break;
+ }
+}
+
+void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheritId, bool typ)
{
DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
if (m_emptySection)
@@ -1479,7 +1485,10 @@ void HtmlGenerator::startMemberDescription(const char *anchor,const char *inheri
{
t << " inherit " << inheritId;
}
- t << "\"><td class=\"mdescLeft\">&#160;</td><td class=\"mdescRight\">";
+ t << "\">";
+ t << "<td class=\"mdescLeft\">&#160;</td>";
+ if (typ) t << "<td class=\"mdescLeft\">&#160;</td>";
+ t << "<td class=\"mdescRight\">";;
}
void HtmlGenerator::endMemberDescription()
@@ -1505,7 +1514,7 @@ void HtmlGenerator::endMemberSections()
}
}
-void HtmlGenerator::startMemberHeader(const char *anchor)
+void HtmlGenerator::startMemberHeader(const char *anchor, int typ)
{
DBG_HTML(t << "<!-- startMemberHeader -->" << endl)
if (!m_emptySection)
@@ -1518,7 +1527,7 @@ void HtmlGenerator::startMemberHeader(const char *anchor)
t << "<table class=\"memberdecls\">" << endl;
m_emptySection=FALSE;
}
- t << "<tr class=\"heading\"><td colspan=\"2\"><h2 class=\"groupheader\">";
+ t << "<tr class=\"heading\"><td colspan=\"" << typ << "\"><h2 class=\"groupheader\">";
if (anchor)
{
t << "<a name=\"" << anchor << "\"></a>" << endl;
@@ -2354,7 +2363,7 @@ void HtmlGenerator::writeSearchPage()
if (cf.open(IO_WriteOnly))
{
FTextStream t(&cf);
- t << "<script language=\"php\">\n\n";
+ t << "<?php\n\n";
t << "$config = array(\n";
t << " 'PROJECT_NAME' => \"" << convertToHtml(projectName) << "\",\n";
t << " 'GENERATE_TREEVIEW' => " << (generateTreeView?"true":"false") << ",\n";
@@ -2372,7 +2381,7 @@ void HtmlGenerator::writeSearchPage()
t << " 'split_bar' => \"" << substitute(substitute(writeSplitBarAsString("search",""), "\"","\\\""), "\n","\\n") << "\",\n";
t << " 'logo' => \"" << substitute(substitute(writeLogoAsString(""), "\"","\\\""), "\n","\\n") << "\",\n";
t << ");\n\n";
- t << "</script>\n";
+ t << "?>\n";
}
ResourceMgr::instance().copyResource("search_functions.php",htmlOutput);
@@ -2403,10 +2412,10 @@ void HtmlGenerator::writeSearchPage()
t << "</div>" << endl;
}
- t << "<script language=\"php\">\n";
+ t << "<?php\n";
t << "require_once \"search_functions.php\";\n";
t << "main();\n";
- t << "</script>\n";
+ t << "?>\n";
// Write empty navigation path, to make footer connect properly
if (generateTreeView)
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 82f0c17..2d8d6e0 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -175,7 +175,7 @@ class HtmlGenerator : public OutputGenerator
void endMemberSections();
void startHeaderSection();
void endHeaderSection();
- void startMemberHeader(const char *);
+ void startMemberHeader(const char *, int);
void endMemberHeader();
void startMemberSubtitle();
void endMemberSubtitle();
@@ -200,7 +200,8 @@ class HtmlGenerator : public OutputGenerator
void endMemberGroup(bool);
void insertMemberAlign(bool);
- void startMemberDescription(const char *anchor,const char *inheritId);
+ void insertMemberAlignLeft(int,bool);
+ void startMemberDescription(const char *anchor,const char *inheritId, bool typ);
void endMemberDescription();
void startMemberDeclaration() {}
void endMemberDeclaration(const char *anchor,const char *inheritId);
diff --git a/src/index.cpp b/src/index.cpp
index 0f12ca4..3706bbf 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -1638,10 +1638,15 @@ static void writeAnnotatedClassList(OutputList &ol)
ol.endIndexList();
}
+inline bool isId1(int c)
+{
+ return (c<127 && c>31); // printable ASCII character
+}
+
static QCString letterToLabel(uint startLetter)
{
char s[11]; // max 0x12345678 + '\0'
- if (isId(startLetter)) // printable ASCII character
+ if (isId1(startLetter)) // printable ASCII character
{
s[0]=(char)startLetter;
s[1]=0;
diff --git a/src/languages.py b/src/languages.py
index 2b02b3e..5bb65cf 100755
--- a/src/languages.py
+++ b/src/languages.py
@@ -1,5 +1,5 @@
#
-# This file is an aid to generated the Languages rules file.
+# This file is an aid to generate the Languages rules file.
# usage:
# python languages.py > ..\winbuild\Languages.rules
#
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 5a67c15..86ceade 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -526,7 +526,19 @@ void LatexDocVisitor::visit(DocIncOperator *op)
void LatexDocVisitor::visit(DocFormula *f)
{
if (m_hide) return;
- m_t << f->text();
+ const char *p=f->text();
+ char c;
+ if (p)
+ {
+ while ((c=*p++))
+ {
+ switch (c)
+ {
+ case '\'': m_t << "\\text{'}"; break;
+ default: m_t << c; break;
+ }
+ }
+ }
}
void LatexDocVisitor::visit(DocIndexEntry *i)
@@ -927,7 +939,7 @@ static void writeStartTableCommand(FTextStream &t,const DocNode *n,int cols)
}
else
{
- t << "\\tabulinesep=1mm\n\\begin{longtabu} spread 0pt [c]{*{" << cols << "}{|X[-1]}|}\n";
+ t << "\\tabulinesep=1mm\n\\begin{longtabu}spread 0pt [c]{*{" << cols << "}{|X[-1]}|}\n";
}
//return isNested ? "TabularNC" : "TabularC";
}
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index 1511dcb..7a2ea59 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -38,6 +38,7 @@
#include "filename.h"
#include "resourcemgr.h"
+static bool DoxyCodeOpen = FALSE;
//-------------------------------
LatexCodeGenerator::LatexCodeGenerator(FTextStream &t,const QCString &relPath,const QCString &sourceFileName)
@@ -77,8 +78,8 @@ void LatexCodeGenerator::codify(const char *str)
//char cs[5];
int spacesToNextTabStop;
static int tabSize = Config_getInt(TAB_SIZE);
- const int maxLineLen = 108;
- QCString result(4*maxLineLen+1); // worst case for 1 line of 4-byte chars
+ static char *result = NULL;
+ static int lresult = 0;
int i;
while ((c=*p))
{
@@ -86,9 +87,17 @@ void LatexCodeGenerator::codify(const char *str)
{
case 0x0c: p++; // remove ^L
break;
+ case ' ': m_t <<" ";
+ m_col++;
+ p++;
+ break;
+ case '^': m_t <<"\\string^";
+ m_col++;
+ p++;
+ break;
case '\t': spacesToNextTabStop =
tabSize - (m_col%tabSize);
- m_t << Doxygen::spaces.left(spacesToNextTabStop);
+ for (i = 0; i < spacesToNextTabStop; i++) m_t <<" ";
m_col+=spacesToNextTabStop;
p++;
break;
@@ -100,6 +109,11 @@ void LatexCodeGenerator::codify(const char *str)
#undef COPYCHAR
// helper macro to copy a single utf8 character, dealing with multibyte chars.
#define COPYCHAR() do { \
+ if (lresult < (i + 5)) \
+ { \
+ lresult += 512; \
+ result = (char *)realloc(result, lresult); \
+ } \
result[i++]=c; p++; \
if (c<0) /* multibyte utf-8 character */ \
{ \
@@ -116,30 +130,16 @@ void LatexCodeGenerator::codify(const char *str)
result[i++]=*p++; \
} \
} \
- m_col++; \
+ m_col++; \
} while(0)
- // gather characters until we find whitespace or are at
- // the end of a line
+ // gather characters until we find whitespace or another special character
COPYCHAR();
- if (m_col>=maxLineLen) // force line break
- {
- m_t << "\n ";
- m_col=0;
- }
- else // copy more characters
+ while ((c=*p) &&
+ c!=0x0c && c!='\t' && c!='\n' && c!=' ' && c!='^'
+ )
{
- while (m_col<maxLineLen && (c=*p) &&
- c!=0x0c && c!='\t' && c!='\n' && c!=' '
- )
- {
- COPYCHAR();
- }
- if (m_col>=maxLineLen) // force line break
- {
- m_t << "\n ";
- m_col=0;
- }
+ COPYCHAR();
}
result[i]=0; // add terminator
//if (m_prettyCode)
@@ -190,6 +190,11 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co
{
static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ if (!DoxyCodeOpen)
+ {
+ m_t << "\\DoxyCodeLine{";
+ DoxyCodeOpen = TRUE;
+ }
if (m_prettyCode)
{
QCString lineNumber;
@@ -223,10 +228,20 @@ void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,co
void LatexCodeGenerator::startCodeLine(bool)
{
m_col=0;
+ if (!DoxyCodeOpen)
+ {
+ m_t << "\\DoxyCodeLine{";
+ DoxyCodeOpen = TRUE;
+ }
}
void LatexCodeGenerator::endCodeLine()
{
+ if (DoxyCodeOpen)
+ {
+ m_t << "}";
+ DoxyCodeOpen = FALSE;
+ }
codify("\n");
}
@@ -271,13 +286,15 @@ static void writeLatexMakefile()
exit(1);
}
// inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05
- QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ QCString latex_command = theTranslator->latexCommandName();
QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
// end insertion by KONNO Akihisa <konno@researchers.jp> 2002-03-05
FTextStream t(&file);
if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
{
- t << "all: refman.dvi" << endl
+ t << "LATEX_CMD=" << latex_command << endl
+ << endl
+ << "all: refman.dvi" << endl
<< endl
<< "ps: refman.ps" << endl
<< endl
@@ -294,7 +311,7 @@ static void writeLatexMakefile()
t << "\tps2pdf refman.ps refman.pdf" << endl << endl;
t << "refman.dvi: clean refman.tex doxygen.sty" << endl
<< "\techo \"Running latex...\"" << endl
- << "\t" << latex_command << " refman.tex" << endl
+ << "\t$(LATEX_CMD) refman.tex" << endl
<< "\techo \"Running makeindex...\"" << endl
<< "\t" << mkidx_command << " refman.idx" << endl;
if (generateBib)
@@ -302,19 +319,19 @@ static void writeLatexMakefile()
t << "\techo \"Running bibtex...\"" << endl;
t << "\tbibtex refman" << endl;
t << "\techo \"Rerunning latex....\"" << endl;
- t << "\t" << latex_command << " refman.tex" << endl;
+ t << "\t$(LATEX_CMD) refman.tex" << endl;
}
t << "\techo \"Rerunning latex....\"" << endl
- << "\t" << latex_command << " refman.tex" << endl
+ << "\t$(LATEX_CMD) refman.tex" << endl
<< "\tlatex_count=8 ; \\" << endl
<< "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl
<< "\t do \\" << endl
<< "\t echo \"Rerunning latex....\" ;\\" << endl
- << "\t " << latex_command << " refman.tex ;\\" << endl
+ << "\t $(LATEX_CMD) refman.tex ; \\" << endl
<< "\t latex_count=`expr $$latex_count - 1` ;\\" << endl
<< "\t done" << endl
<< "\t" << mkidx_command << " refman.idx" << endl
- << "\t" << latex_command << " refman.tex" << endl << endl
+ << "\t$(LATEX_CMD) refman.tex" << endl << endl
<< "refman_2on1.ps: refman.ps" << endl
<< "\tpsnup -2 refman.ps >refman_2on1.ps" << endl
<< endl
@@ -323,26 +340,28 @@ static void writeLatexMakefile()
}
else // use pdflatex for higher quality output
{
+ t << "LATEX_CMD=" << latex_command << endl
+ << endl;
t << "all: refman.pdf" << endl << endl
<< "pdf: refman.pdf" << endl << endl;
t << "refman.pdf: clean refman.tex" << endl;
- t << "\tpdflatex refman" << endl;
+ t << "\t$(LATEX_CMD) refman" << endl;
t << "\t" << mkidx_command << " refman.idx" << endl;
if (generateBib)
{
t << "\tbibtex refman" << endl;
- t << "\tpdflatex refman" << endl;
+ t << "\t$(LATEX_CMD) refman" << endl;
}
- t << "\tpdflatex refman" << endl
+ t << "\t$(LATEX_CMD) refman" << endl
<< "\tlatex_count=8 ; \\" << endl
<< "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl
<< "\t do \\" << endl
<< "\t echo \"Rerunning latex....\" ;\\" << endl
- << "\t pdflatex refman ;\\" << endl
+ << "\t $(LATEX_CMD) refman ;\\" << endl
<< "\t latex_count=`expr $$latex_count - 1` ;\\" << endl
<< "\t done" << endl
<< "\t" << mkidx_command << " refman.idx" << endl
- << "\tpdflatex refman" << endl << endl;
+ << "\t$(LATEX_CMD) refman" << endl << endl;
}
t << endl
@@ -356,7 +375,7 @@ static void writeMakeBat()
#if defined(_MSC_VER)
QCString dir=Config_getString(LATEX_OUTPUT);
QCString fileName=dir+"/make.bat";
- QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ QCString latex_command = theTranslator->latexCommandName();
QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
QFile file(fileName);
bool generateBib = !Doxygen::citeDict->isEmpty();
@@ -371,14 +390,15 @@ static void writeMakeBat()
t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n\n";
if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
{
- t << latex_command << " refman.tex\n";
+ t << "set LATEX_CMD=" << latex_command << "\n";
+ t << "%LATEX_CMD% refman.tex\n";
t << "echo ----\n";
t << mkidx_command << " refman.idx\n";
if (generateBib)
{
t << "bibtex refman\n";
t << "echo ----\n";
- t << latex_command << " refman.tex\n";
+ t << "\t%LATEX_CMD% refman.tex\n";
}
t << "setlocal enabledelayedexpansion\n";
t << "set count=8\n";
@@ -390,28 +410,29 @@ static void writeMakeBat()
t << "set /a count-=1\n";
t << "if !count! EQU 0 goto :skip\n\n";
t << "echo ----\n";
- t << latex_command << " refman.tex\n";
+ t << "%LATEX_CMD% refman.tex\n";
t << "goto :repeat\n";
t << ":skip\n";
t << "endlocal\n";
t << mkidx_command << " refman.idx\n";
- t << latex_command << " refman.tex\n";
+ t << "%LATEX_CMD% refman.tex\n";
t << "dvips -o refman.ps refman.dvi\n";
t << "gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
"-sOutputFile=refman.pdf -c save pop -f refman.ps\n";
}
else // use pdflatex
{
- t << "pdflatex refman\n";
+ t << "set LATEX_CMD=" << latex_command << "\n";
+ t << "%LATEX_CMD% refman\n";
t << "echo ----\n";
t << mkidx_command << " refman.idx\n";
if (generateBib)
{
t << "bibtex refman" << endl;
- t << "pdflatex refman" << endl;
+ t << "%LATEX_CMD% refman" << endl;
}
t << "echo ----\n";
- t << "pdflatex refman\n\n";
+ t << "%LATEX_CMD% refman\n\n";
t << "setlocal enabledelayedexpansion\n";
t << "set count=8\n";
t << ":repeat\n";
@@ -422,12 +443,12 @@ static void writeMakeBat()
t << "set /a count-=1\n";
t << "if !count! EQU 0 goto :skip\n\n";
t << "echo ----\n";
- t << "pdflatex refman\n";
+ t << "%LATEX_CMD% refman\n";
t << "goto :repeat\n";
t << ":skip\n";
t << "endlocal\n";
t << mkidx_command << " refman.idx\n";
- t << "pdflatex refman\n";
+ t << "%LATEX_CMD% refman\n";
t << "cd /D %Dir_Old%\n";
t << "set Dir_Old=\n";
}
@@ -472,8 +493,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
t << "% Packages required by doxygen\n"
"\\usepackage{fixltx2e}\n" // for \textsubscript
"\\usepackage{calc}\n"
- "\\usepackage{doxygen}\n"
- "\\usepackage[export]{adjustbox} % also loads graphicx\n";
+ "\\usepackage{doxygen}\n";
QStrList extraLatexStyle = Config_getList(LATEX_EXTRA_STYLESHEET);
for (uint i=0; i<extraLatexStyle.count(); ++i)
{
@@ -504,6 +524,7 @@ static void writeDefaultHeaderPart1(FTextStream &t)
"\\usepackage{textcomp}\n"
"\\usepackage[nointegrals]{wasysym}\n"
"\\usepackage[table]{xcolor}\n"
+ "\\usepackage{ifpdf,ifxetex}\n"
"\n";
// Language support
@@ -516,9 +537,13 @@ static void writeDefaultHeaderPart1(FTextStream &t)
}
// Define default fonts
- t << "% Font selection\n"
- "\\usepackage[T1]{fontenc}\n"
- "\\usepackage[scaled=.90]{helvet}\n"
+ t << "% Font selection\n";
+ QCString fontenc = theTranslator->latexFontenc();
+ if (!fontenc.isEmpty())
+ {
+ t << "\\usepackage[" << fontenc << "]{fontenc}\n";
+ }
+ t << "\\usepackage[scaled=.90]{helvet}\n"
"\\usepackage{courier}\n"
"\\usepackage{amssymb}\n"
"\\usepackage{sectsty}\n"
@@ -625,13 +650,46 @@ static void writeDefaultHeaderPart1(FTextStream &t)
bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
if (pdfHyperlinks)
{
+ unsigned char minus[4]; // Superscript minus
+ char *pminus = (char *)minus;
+ unsigned char sup2[3]; // Superscript two
+ char *psup2 = (char *)sup2;
+ unsigned char sup3[3];
+ char *psup3 = (char *)sup3; // Superscript three
+ minus[0]= 0xE2;
+ minus[1]= 0x81;
+ minus[2]= 0xBB;
+ minus[3]= 0;
+ sup2[0]= 0xC2;
+ sup2[1]= 0xB2;
+ sup2[2]= 0;
+ sup3[0]= 0xC2;
+ sup3[1]= 0xB3;
+ sup3[2]= 0;
+
t << "% Hyperlinks (required, but should be loaded last)\n"
- "\\usepackage{ifpdf}\n"
"\\ifpdf\n"
" \\usepackage[pdftex,pagebackref=true]{hyperref}\n"
"\\else\n"
- " \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n"
+ " \\ifxetex\n"
+ " \\usepackage[pagebackref=true]{hyperref}\n"
+ " \\else\n"
+ " \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n"
+ " \\fi\n"
+ "\\fi\n"
+ "\\ifpdf\n"
+ " \\DeclareUnicodeCharacter{207B}{${}^{-}$}% Superscript minus\n"
+ " \\DeclareUnicodeCharacter{C2B2}{${}^{2}$}% Superscript two\n"
+ " \\DeclareUnicodeCharacter{C2B3}{${}^{3}$}% Superscript three\n"
+ "\\else\n"
+ " \\catcode`\\" << pminus << "=13% Superscript minus\n"
+ " \\def" << pminus << "{${}^{-}$}\n"
+ " \\catcode`\\" << psup2 << "=13% Superscript two\n"
+ " \\def" << psup2 << "{${}^{2}$}\n"
+ " \\catcode`\\"<<psup3<<"=13% Superscript three\n"
+ " \\def"<<psup3<<"{${}^{3}$}\n"
"\\fi\n"
+ "\n"
"\\hypersetup{%\n"
" colorlinks=true,%\n"
" linkcolor=blue,%\n"
@@ -652,12 +710,18 @@ static void writeDefaultHeaderPart1(FTextStream &t)
t << "\\usepackage{caption}\n"
<< "\\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}\n\n";
+ // prevent numbers overlap the titles in toc
+ t << "\\renewcommand{\\numberline}[1]{#1~}\n";
+
// End of preamble, now comes the document contents
t << "%===== C O N T E N T S =====\n"
"\n"
"\\begin{document}\n";
- if (theTranslator->idLanguage()=="greek")
- t << "\\selectlanguage{greek}\n";
+ QCString documentPre = theTranslator->latexDocumentPre();
+ if (!documentPre.isEmpty())
+ {
+ t << documentPre;
+ }
t << "\n";
// Front matter
@@ -748,10 +812,15 @@ static void writeDefaultFooter(FTextStream &t)
t << "\\newpage\n"
"\\phantomsection\n"
"\\clearemptydoublepage\n"
- "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trRTFGeneralIndex() << "}\n"
+ "\\addcontentsline{toc}{" << unit << "}{\\indexname}\n"
"\\printindex\n"
- "\n"
- "\\end{document}\n";
+ "\n";
+ QCString documentPost = theTranslator->latexDocumentPost();
+ if (!documentPost.isEmpty())
+ {
+ t << documentPost;
+ }
+ t << "\\end{document}\n";
}
void LatexGenerator::writeHeaderFile(QFile &f)
@@ -1505,7 +1574,7 @@ void LatexGenerator::endGroupHeader(int)
t << "}" << endl;
}
-void LatexGenerator::startMemberHeader(const char *)
+void LatexGenerator::startMemberHeader(const char *,int)
{
if (Config_getBool(COMPACT_LATEX))
{
@@ -1793,7 +1862,7 @@ void LatexGenerator::endMemberItem()
t << endl;
}
-void LatexGenerator::startMemberDescription(const char *,const char *)
+void LatexGenerator::startMemberDescription(const char *,const char *,bool)
{
if (!insideTabbing)
{
diff --git a/src/latexgen.h b/src/latexgen.h
index 430d250..469e411 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -169,7 +169,7 @@ class LatexGenerator : public OutputGenerator
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection() {}
- void startMemberHeader(const char *);
+ void startMemberHeader(const char *,int);
void endMemberHeader();
void startMemberSubtitle() {}
void endMemberSubtitle() {}
@@ -194,6 +194,7 @@ class LatexGenerator : public OutputGenerator
void endMemberGroup(bool);
void insertMemberAlign(bool) {}
+ void insertMemberAlignLeft(int,bool){}
void writeRuler() { t << endl << endl; }
void writeAnchor(const char *fileName,const char *name);
@@ -225,7 +226,7 @@ class LatexGenerator : public OutputGenerator
void endCenter() { t << "\\end{center}" << endl; }
void startSmall() { t << "\\footnotesize "; }
void endSmall() { t << "\\normalsize "; }
- void startMemberDescription(const char *,const char *);
+ void startMemberDescription(const char *,const char *,bool);
void endMemberDescription();
void startMemberDeclaration() {}
void endMemberDeclaration(const char *,const char *) {}
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 17e6003..d23b2fe 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -283,7 +283,7 @@ void ManGenerator::endGroupHeader(int)
upperCase=FALSE;
}
-void ManGenerator::startMemberHeader(const char *)
+void ManGenerator::startMemberHeader(const char *,int)
{
if (!firstCol) t << endl;
t << ".SS \"";
@@ -619,9 +619,9 @@ void ManGenerator::startSection(const char *,const char *,SectionInfo::SectionTy
{
case SectionInfo::Page: startGroupHeader(FALSE); break;
case SectionInfo::Section: startGroupHeader(FALSE); break;
- case SectionInfo::Subsection: startMemberHeader(0); break;
- case SectionInfo::Subsubsection: startMemberHeader(0); break;
- case SectionInfo::Paragraph: startMemberHeader(0); break;
+ case SectionInfo::Subsection: startMemberHeader(0, -1); break;
+ case SectionInfo::Subsubsection: startMemberHeader(0, -1); break;
+ case SectionInfo::Paragraph: startMemberHeader(0, -1); break;
default: ASSERT(0); break;
}
}
diff --git a/src/mangen.h b/src/mangen.h
index b3b9f76..0413ffd 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -99,9 +99,10 @@ class ManGenerator : public OutputGenerator
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection();
- void startMemberHeader(const char *);
+ void startMemberHeader(const char *,int);
void endMemberHeader();
void insertMemberAlign(bool) {}
+ void insertMemberAlignLeft(int,bool){}
void startMemberSubtitle() {}
void endMemberSubtitle() {}
//void writeListItem();
@@ -160,7 +161,7 @@ class ManGenerator : public OutputGenerator
void endCenter() {}
void startSmall() {}
void endSmall() {}
- void startMemberDescription(const char *,const char *) { t << "\n.RI \""; firstCol=FALSE; }
+ void startMemberDescription(const char *,const char *,bool) { t << "\n.RI \""; firstCol=FALSE; }
void endMemberDescription() { t << "\""; firstCol=FALSE; }
void startMemberDeclaration() {}
void endMemberDeclaration(const char *,const char *) {}
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 1cd06e5..f7526dc 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -240,7 +240,7 @@ static QCString isBlockCommand(const char *data,int offset,int size)
{
return "f]";
}
- else if (data[end]=='}')
+ else if (data[end]=='{')
{
return "f}";
}
@@ -483,6 +483,8 @@ static int processNmdash(GrowBuf &out,const char *data,int off,int size)
{
count++;
}
+ if (count==2 && off>=2 && qstrncmp(data-2,"<!",2)==0) return 0; // start HTML comment
+ if (count==2 && (data[2]=='>')) return 0; // end HTML comment
if (count==2 && (off<8 || qstrncmp(data-8,"operator",8)!=0)) // -- => ndash
{
out.addStr("&ndash;");
@@ -2061,7 +2063,7 @@ static int writeCodeBlock(GrowBuf &out,const char *data,int size,int refIndent)
}
// start searching for the end of the line start at offset \a i
-// keeping track of possible blocks that need to to skipped.
+// keeping track of possible blocks that need to be skipped.
static void findEndOfLine(GrowBuf &out,const char *data,int size,
int &pi,int&i,int &end)
{
@@ -2548,7 +2550,7 @@ QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,cons
// finally process the inline markup (links, emphasis and code spans)
processInline(out,s,s.length());
out.addChar(0);
- Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n---------\n",qPrint(input),qPrint(out.get()));
+ Debug::print(Debug::Markdown,0,"======== Markdown =========\n---- input ------- \n%s\n---- output -----\n%s\n=========\n",qPrint(input),qPrint(out.get()));
return out.get();
}
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index c9f9121..9be2ecb 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -101,7 +101,7 @@ static QCString addTemplateNames(const QCString &s,const QCString &n,const QCStr
// ol.endParameterName(last==FALSE)
// ...
// ol.startParameterType(first=FALSE)
-// ol.endParamtereType
+// ol.endParameterType
// ol.startParameterName
// ol.endParameterName(last==TRUE)
// ...
@@ -571,7 +571,7 @@ class MemberDefImpl
bool stat; // is it a static function?
bool proto; // is it a prototype;
bool docEnumValues; // is an enum with documented enum values.
- bool annScope; // member is part of an annoymous scope
+ bool annScope; // member is part of an anonymous scope
bool annUsed;
bool hasCallGraph;
bool hasCallerGraph;
@@ -3212,7 +3212,10 @@ QCString MemberDef::memberTypeName() const
void MemberDef::warnIfUndocumented()
{
- if (m_impl->memberGroup) return;
+ /*
+ * Removed bug_303020:
+ * if (m_impl->memberGroup) return;
+ */
ClassDef *cd = getClassDef();
NamespaceDef *nd = getNamespaceDef();
FileDef *fd = getFileDef();
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index c674760..d3eb0df 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -961,7 +961,7 @@ void NamespaceSDict::writeDeclaration(OutputList &ol,const char *title,
bool found=FALSE;
for (ni.toFirst();(nd=ni.current()) && !found;++ni)
{
- if (nd->isLinkable())
+ if (nd->isLinkable() && nd->hasDocumentation())
{
SrcLangExt lang = nd->getLanguage();
if (SrcLangExt_IDL==lang)
diff --git a/src/outputgen.h b/src/outputgen.h
index 68356b4..44d34b8 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -380,7 +380,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endMemberSections() = 0;
virtual void startHeaderSection() = 0;
virtual void endHeaderSection() = 0;
- virtual void startMemberHeader(const char *anchor) = 0;
+ virtual void startMemberHeader(const char *anchor, int typ) = 0;
virtual void endMemberHeader() = 0;
virtual void startMemberSubtitle() = 0;
virtual void endMemberSubtitle() = 0;
@@ -403,6 +403,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void startMemberGroup() = 0;
virtual void endMemberGroup(bool) = 0;
virtual void insertMemberAlign(bool) = 0;
+ virtual void insertMemberAlignLeft(int,bool) = 0;
virtual void startMemberDoc(const char *,const char *,
const char *,const char *,int,int,bool) = 0;
virtual void endMemberDoc(bool) = 0;
@@ -414,7 +415,7 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name) = 0;
virtual void writeEndAnnoItem(const char *name) = 0;
- virtual void startMemberDescription(const char *anchor,const char *inheritId) = 0;
+ virtual void startMemberDescription(const char *anchor,const char *inheritId, bool typ) = 0;
virtual void endMemberDescription() = 0;
virtual void startMemberDeclaration() = 0;
virtual void endMemberDeclaration(const char *anchor,const char *inheritId) = 0;
diff --git a/src/outputlist.h b/src/outputlist.h
index 0738ed1..2e89101 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -191,8 +191,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startHeaderSection); }
void endHeaderSection()
{ forall(&OutputGenerator::endHeaderSection); }
- void startMemberHeader(const char *anchor)
- { forall(&OutputGenerator::startMemberHeader,anchor); }
+ void startMemberHeader(const char *anchor, int typ = 2)
+ { forall(&OutputGenerator::startMemberHeader,anchor,typ); }
void endMemberHeader()
{ forall(&OutputGenerator::endMemberHeader); }
void startMemberSubtitle()
@@ -237,6 +237,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::endMemberGroup,last); }
void insertMemberAlign(bool templ=FALSE)
{ forall(&OutputGenerator::insertMemberAlign,templ); }
+ void insertMemberAlignLeft(int typ=0, bool templ=FALSE)
+ { forall(&OutputGenerator::insertMemberAlignLeft,typ,templ); }
void writeRuler()
{ forall(&OutputGenerator::writeRuler); }
void writeAnchor(const char *fileName,const char *name)
@@ -306,8 +308,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startBold); }
void endBold()
{ forall(&OutputGenerator::endBold); }
- void startMemberDescription(const char *anchor,const char *inheritId=0)
- { forall(&OutputGenerator::startMemberDescription,anchor,inheritId); }
+ void startMemberDescription(const char *anchor,const char *inheritId=0, bool typ = false)
+ { forall(&OutputGenerator::startMemberDescription,anchor,inheritId, typ); }
void endMemberDescription()
{ forall(&OutputGenerator::endMemberDescription); }
void startMemberDeclaration()
diff --git a/src/pyscanner.l b/src/pyscanner.l
index 9c21d41..5c9aef5 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -109,7 +109,7 @@ static QCString g_packageName;
//static bool g_hideClassDocs;
-static QCString g_defVal;
+static QGString g_defVal;
static int g_braceCount;
static bool g_lexInit = FALSE;
@@ -993,35 +993,49 @@ STARTDOCSYMS "##"
}
<FunctionParamDefVal>{
- "(" { // internal opening brace
+ "[" |
+ "(" { // internal opening brace, assumption is that we have correct code so braces do match
g_braceCount++;
g_defVal+=*yytext;
}
"," |
+ "]" |
")" {
if (g_braceCount==0) // end of default argument
{
if (current->argList->getLast())
{
- current->argList->getLast()->defval=g_defVal.stripWhiteSpace();
+ current->argList->getLast()->defval=QCString(g_defVal.data()).stripWhiteSpace();
}
- if (*yytext == ')')
+ if (*yytext != ',')
current->args = argListToString(current->argList);
BEGIN(FunctionParams);
}
else // continue
{
- if (*yytext == ')')g_braceCount--;
+ if (*yytext != ',')g_braceCount--;
g_defVal+=*yytext;
}
}
- . {
- g_defVal+=*yytext;
- }
+ "'" {
+ g_defVal+=*yytext;
+ g_copyString=&g_defVal;
+ g_stringContext=FunctionParamDefVal;
+ BEGIN( SingleQuoteString );
+ }
+ "\"" {
+ g_defVal+=*yytext;
+ g_copyString=&g_defVal;
+ g_stringContext=FunctionParamDefVal;
+ BEGIN( DoubleQuoteString );
+ }
\n {
g_defVal+=*yytext;
incLineNr();
}
+ . {
+ g_defVal+=*yytext;
+ }
}
@@ -1168,13 +1182,17 @@ STARTDOCSYMS "##"
current->program+=yytext;
BEGIN(TripleComment);
}
-
{TRISINGLEQUOTE} { // start of a comment block
initTriSingleQuoteBlock();
current->program+=yytext;
BEGIN(TripleComment);
}
-
+ {STARTDOCSYMS}[#]* { // start of a special comment
+ initSpecialBlock();
+ BEGIN(SpecialComment);
+ }
+ {POUNDCOMMENT} { // ignore comment with just one #
+ }
^{BB} {
current->program+=yytext;
//current->startLine = yyLineNr;
@@ -1187,7 +1205,6 @@ STARTDOCSYMS "##"
}
""/({NONEMPTY}|{EXPCHAR}) {
-
// Just pushback an empty class, and
// resume parsing the body.
newEntry();
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 70a4c78..e41700b 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1626,7 +1626,7 @@ void RTFGenerator::endDescItem()
newParagraph();
}
-void RTFGenerator::startMemberDescription(const char *,const char *)
+void RTFGenerator::startMemberDescription(const char *,const char *,bool)
{
DBG_RTF(t << "{\\comment (startMemberDescription)}" << endl)
t << "{" << endl;
diff --git a/src/rtfgen.h b/src/rtfgen.h
index d8f6ca7..1eb7db0 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -103,7 +103,7 @@ class RTFGenerator : public OutputGenerator
void endMemberSections() {}
void startHeaderSection() {}
void endHeaderSection() {}
- void startMemberHeader(const char *) { startGroupHeader(FALSE); }
+ void startMemberHeader(const char *,int) { startGroupHeader(FALSE); }
void endMemberHeader() { endGroupHeader(FALSE); }
void startMemberSubtitle();
void endMemberSubtitle();
@@ -120,6 +120,7 @@ class RTFGenerator : public OutputGenerator
void startMemberTemplateParams() {}
void endMemberTemplateParams(const char *,const char *) {}
void insertMemberAlign(bool) {}
+ void insertMemberAlignLeft(int,bool){}
void writeRuler() { rtfwriteRuler_thin(); }
@@ -156,7 +157,7 @@ class RTFGenerator : public OutputGenerator
void startSmall() { t << "{\\sub "; }
void endSmall() { t << "}"; }
- void startMemberDescription(const char *,const char *);
+ void startMemberDescription(const char *,const char *,bool);
void endMemberDescription();
void startMemberDeclaration() {}
void endMemberDeclaration(const char *,const char *) {}
diff --git a/src/scanner.l b/src/scanner.l
index fd1568b..3609d32 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -755,6 +755,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
%x CopyHereDocEnd
%x RawString
%x RawGString
+%x CSString
%x IDLAttribute
%x IDLProp
@@ -2381,10 +2382,6 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
{
current->protection = Protected;
}
- else if (javaLike && qstrcmp(yytext,"internal")==0)
- {
- current->protection = Package;
- }
else if (javaLike && qstrcmp(yytext,"private")==0)
{
current->protection = Private;
@@ -3638,7 +3635,10 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->startColumn = yyColNr;
- current->type = "@"; // enum marker
+ if (!(current_root->spec&Entry::Enum))
+ {
+ current->type = "@"; // enum marker
+ }
current->args = current->args.simplifyWhiteSpace();
current->name = current->name.stripWhiteSpace();
current->section = Entry::VARIABLE_SEC;
@@ -6235,8 +6235,14 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
<CSAccessorDecl>"add" { if (curlyCount==0) current->spec |= Entry::Addable; }
<CSAccessorDecl>"remove" { if (curlyCount==0) current->spec |= Entry::Removable; }
<CSAccessorDecl>"raise" { if (curlyCount==0) current->spec |= Entry::Raisable; }
-<CSAccessorDecl>. {}
+<CSAccessorDecl>"\"" { BEGIN(CSString);}
+<CSAccessorDecl>"." {}
<CSAccessorDecl>\n { lineCount(); }
+<CSString>"\"" { BEGIN(CSAccessorDecl);}
+<CSString>"//" {} // Otherwise the rule <*>"//" will kick in
+<CSString>"/*" {} // Otherwise the rule <*>"/*" will kick in
+<CSString>\n { lineCount(); }
+<CSString>"." {}
@@ -6611,6 +6617,22 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
BEGIN(SkipString);
}
}
+<*>\? {
+ if (insideCS)
+ {
+ if (current->type.isEmpty())
+ {
+ if (current->name.isEmpty())
+ current->name="?";
+ else
+ current->name+="?";
+ }
+ else
+ {
+ current->type+="?";
+ }
+ }
+ }
<*>.
<SkipComment>"//"|"/*"
<*>"/*" { lastCContext = YY_START ;
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index 6fb2432..6276eae 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -1180,6 +1180,7 @@ void writeJavascriptSearchIndex()
SearchIndexList *sl;
for (it.toFirst();(sl=it.current());++it) // for each letter
{
+ if ( sl->letter() == '"' ) t << QString( QChar( '\\' ) ).utf8();
t << QString( QChar( sl->letter() ) ).utf8();
}
t << "\"";
diff --git a/src/tclscanner.l b/src/tclscanner.l
index 791ecc4..56d2e3d 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -703,6 +703,7 @@ static void tcl_codify(const char *s,const char *str)
}
else
{
+ if (*(p-2)==0x1A) *(p-2) = '\0'; // remove ^Z
tcl.code->codify(sp);
done=TRUE;
}
@@ -3024,11 +3025,6 @@ void TclLanguageScanner::parseCode(CodeOutputInterface & codeOutIntf,
}
tcl_inf("%s (%d,%d) %d %d\n",myStr.ascii(),startLine,endLine,isExampleBlock,inlineFragment);
//tcl_inf("%s\n"input.data());
- if (isExampleBlock)
- {
- tcl_codify(NULL,input);
- return;
- }
tcl_init();
tcl.collectXRefs = collectXRefs;
tcl.memberdef = memberDef;
@@ -3047,8 +3043,15 @@ tcl_inf("%s (%d,%d) %d %d\n",myStr.ascii(),startLine,endLine,isExampleBlock,inli
}
tcl.file_name = "";
tcl.this_parser = NULL;
- tcl.entry_main = tcl_entry_new();
- tcl_parse(myNs,myCls);
+ if (isExampleBlock)
+ {
+ tcl_codify(NULL,input);
+ }
+ else
+ {
+ tcl.entry_main = tcl_entry_new();
+ tcl_parse(myNs,myCls);
+ }
tcl.code->endCodeLine();
tcl.scan.clear();
tcl.ns.clear();
diff --git a/src/template.h b/src/template.h
index 98ae7ed..4602c53 100644
--- a/src/template.h
+++ b/src/template.h
@@ -368,7 +368,7 @@ class TemplateListIntf
/** Increase object's reference count */
virtual int addRef() = 0;
- /** Decreases object's referenc count, destroy object if 0 */
+ /** Decreases object's reference count, destroy object if 0 */
virtual int release() = 0;
};
@@ -417,7 +417,7 @@ class TemplateStructIntf
/** Increase object's reference count */
virtual int addRef() = 0;
- /** Decreases object's referenc count, destroy object if 0 */
+ /** Decreases object's reference count, destroy object if 0 */
virtual int release() = 0;
};
diff --git a/src/translator.h b/src/translator.h
index 7ee49cf..9da2317 100644
--- a/src/translator.h
+++ b/src/translator.h
@@ -19,6 +19,7 @@
#define TRANSLATOR_H
#include "classdef.h"
+#include "config.h"
#include "vhdldocgen.h"
/** Abstract base class for all translatable text fragments. */
@@ -42,6 +43,36 @@ class Translator
virtual QCString idLanguage() = 0;
virtual QCString latexLanguageSupportCommand() = 0;
+ /*!
+ * Sets the LaTeX font encoding to be used. The default is set to `T1`,
+ * in case another font encoding has to be used this can be specified with
+ * this routine. In case no font encoding is required the empty string
+ * can be returned.
+ */
+ virtual QCString latexFontenc() { return "T1"; }
+ /*!
+ * Sets the commands to be insered directly after the `\\begin{document}`
+ * in the LaTeX document.
+ */
+ virtual QCString latexDocumentPre() { return ""; }
+ /*!
+ * Sets the commands to be insered directly before the `\\end{document}`
+ * in the LaTeX document.
+ */
+ virtual QCString latexDocumentPost() { return ""; }
+ /*!
+ * Set the name to be used as latex command.
+ */
+ virtual QCString latexCommandName()
+ {
+ QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ if (latex_command.isEmpty()) latex_command = "latex";
+ if (Config_getBool(USE_PDFLATEX))
+ {
+ if (latex_command == "latex") latex_command = "pdflatex";
+ }
+ return latex_command;
+ }
// --- Language translation methods -------------------
diff --git a/src/translator_am.h b/src/translator_am.h
index 6f5e671..5b4c446 100644
--- a/src/translator_am.h
+++ b/src/translator_am.h
@@ -32,8 +32,8 @@ class TranslatorArmenian : public TranslatorAdapter_1_8_0
/* Used to get the command(s) for the language support. */
virtual QCString latexLanguageSupportCommand()
{
- return "<pre>\\usepackage[latin]{armtex}\n"
- "\\usepackage[armscii8]{inputenc}\n</pre>";
+ return "\\usepackage[latin]{armtex}\n"
+ "\\usepackage[armscii8]{inputenc}\n";
}
// --- Language translation methods -------------------
diff --git a/src/translator_cn.h b/src/translator_cn.h
index ec39e11..0e559c1 100644
--- a/src/translator_cn.h
+++ b/src/translator_cn.h
@@ -53,8 +53,20 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
*/
virtual QCString latexLanguageSupportCommand()
{
+ return "\\usepackage{CJKutf8}\n";
+ }
+ virtual QCString latexFontenc()
+ {
return "";
}
+ virtual QCString latexDocumentPre()
+ {
+ return "\\begin{CJK}{UTF8}{min}\n";
+ }
+ virtual QCString latexDocumentPost()
+ {
+ return "\\end{CJK}\n";
+ }
/*! used in the compound documentation before a list of related functions.
*/
@@ -100,7 +112,7 @@ class TranslatorChinese : public TranslatorAdapter_1_8_15
virtual QCString trMore()
{ return "更多..."; }
- /*! put in the class documention */
+ /*! put in the class documentation */
virtual QCString trListOfAllMembers()
{ return "所有成员列表"; }
diff --git a/src/translator_dk.h b/src/translator_dk.h
index e98cfa8..70e9032 100644
--- a/src/translator_dk.h
+++ b/src/translator_dk.h
@@ -116,8 +116,7 @@ class TranslatorDanish : public TranslatorAdapter_1_8_0
virtual QCString latexLanguageSupportCommand()
{
return
- "\\usepackage[danish]{babel}\n"
- "\\usepackage[T1]{fontenc}\n";
+ "\\usepackage[danish]{babel}\n";
}
// --- Language translation methods -------------------
diff --git a/src/translator_gr.h b/src/translator_gr.h
index 2b60f3d..6ed43db 100644
--- a/src/translator_gr.h
+++ b/src/translator_gr.h
@@ -59,8 +59,8 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15
virtual QCString latexLanguageSupportCommand()
{
- //return "\\usepackage[greek,english]{babel}\n\\usepackage[iso-8859-7]{inputenc}\n";
- return "\\usepackage[greek,english]{babel}\n";
+ return "\\usepackage[greek,english]{babel}\n"
+ "\\usepackage{alphabeta}\n";
}
// --- Language translation methods -------------------
diff --git a/src/translator_je.h b/src/translator_je.h
index 835a516..d555421 100644
--- a/src/translator_je.h
+++ b/src/translator_je.h
@@ -36,7 +36,19 @@ class TranslatorJapaneseEn : public TranslatorEnglish
{ return "japanese-en"; }
virtual QCString latexLanguageSupportCommand()
{
- return "platex";
+ return "\\usepackage{CJKutf8}\n";
+ }
+ virtual QCString latexFontenc()
+ {
+ return "";
+ }
+ virtual QCString latexDocumentPre()
+ {
+ return "\\begin{CJK}{UTF8}{min}\n";
+ }
+ virtual QCString latexDocumentPost()
+ {
+ return "\\end{CJK}\n";
}
virtual QCString trRTFansicp()
{
diff --git a/src/translator_jp.h b/src/translator_jp.h
index b35a2b3..fc0d65d 100644
--- a/src/translator_jp.h
+++ b/src/translator_jp.h
@@ -77,8 +77,20 @@ class TranslatorJapanese : public TranslatorAdapter_1_8_15
virtual QCString latexLanguageSupportCommand()
{
+ return "\\usepackage{CJKutf8}\n";
+ }
+ virtual QCString latexFontenc()
+ {
return "";
}
+ virtual QCString latexDocumentPre()
+ {
+ return "\\begin{CJK}{UTF8}{min}\n";
+ }
+ virtual QCString latexDocumentPost()
+ {
+ return "\\end{CJK}\n";
+ }
/*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions()
diff --git a/src/translator_ke.h b/src/translator_ke.h
index 525cf84..c9f488c 100644
--- a/src/translator_ke.h
+++ b/src/translator_ke.h
@@ -35,12 +35,22 @@ class TranslatorKoreanEn : public TranslatorEnglish
{ return "korean-en"; }
virtual QCString latexLanguageSupportCommand()
{
- return "\\usepackage{hfont}\n";
+ return "\\usepackage{kotex}\n";
}
virtual QCString trRTFansicp()
{
return "949";
}
+ virtual QCString latexCommandName()
+ {
+ QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ if (latex_command.isEmpty()) latex_command = "latex";
+ if (Config_getBool(USE_PDFLATEX))
+ {
+ if (latex_command == "latex") latex_command = "xelatex";
+ }
+ return latex_command;
+ }
/*! Used as ansicpg for RTF fcharset
* \see trRTFansicp() for a table of possible values.
diff --git a/src/translator_kr.h b/src/translator_kr.h
index c60d1ac..fb1c356 100644
--- a/src/translator_kr.h
+++ b/src/translator_kr.h
@@ -86,7 +86,17 @@ class TranslatorKorean : public TranslatorAdapter_1_8_15
// I'm not sure what this should be.
// When I figure it out, I'll update this.
// see http://www.ktug.or.kr/jsboard/read.php?table=operate&no=4422&page=1
- return "\\usepackage{hfont}\n";
+ return "\\usepackage{kotex}\n";
+ }
+ virtual QCString latexCommandName()
+ {
+ QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ if (latex_command.isEmpty()) latex_command = "latex";
+ if (Config_getBool(USE_PDFLATEX))
+ {
+ if (latex_command == "latex") latex_command = "xelatex";
+ }
+ return latex_command;
}
// --- Language translation methods -------------------
diff --git a/src/translator_lv.h b/src/translator_lv.h
index 2736bb0..bd579da 100644
--- a/src/translator_lv.h
+++ b/src/translator_lv.h
@@ -76,7 +76,7 @@ class TranslatorLatvian : public TranslatorAdapter_1_8_4
*/
virtual QCString latexLanguageSupportCommand()
{
- return "\\usepackage[LV]{fontenc}\n"
+ return "\\usepackage[T2A]{fontenc}\n"
"\\usepackage[latvian]{babel}\n";
}
diff --git a/src/translator_no.h b/src/translator_no.h
index 58b596a..eccd952 100644
--- a/src/translator_no.h
+++ b/src/translator_no.h
@@ -72,8 +72,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_4_6
virtual QCString latexLanguageSupportCommand()
{
return
- "\\usepackage[norwegian]{babel}\n"
- "\\usepackage[T1]{fontenc}\n";
+ "\\usepackage[norsk]{babel}\n";
}
// --- Language translation methods -------------------
diff --git a/src/translator_pl.h b/src/translator_pl.h
index 421f407..e0ecc8f 100644
--- a/src/translator_pl.h
+++ b/src/translator_pl.h
@@ -44,8 +44,14 @@ class TranslatorPolish : public TranslatorAdapter_1_8_2
*/
QCString latexLanguageSupportCommand()
{
- return "\\usepackage{polski}\n"
- "\\usepackage[T1]{fontenc}\n";
+ return "\\usepackage[polish]{babel}\n"
+ "\\let\\lll\\undefined\n"; /* to overcome problems with the <<<
+ symbol as defined in the amssymb
+ package, and the Polish symbol
+ "Latin Small Letter L With Stroke"
+ &lstrok; or &#322; or &#x0142;
+ We take the amssymb symbol as leading.
+ */
}
// --- Language translation methods -------------------
diff --git a/src/translator_pt.h b/src/translator_pt.h
index 4251063..6bbe2bc 100644
--- a/src/translator_pt.h
+++ b/src/translator_pt.h
@@ -85,7 +85,10 @@ class TranslatorPortuguese : public TranslatorAdapter_1_8_15
* the empty string is returned in this implementation.
*/
virtual QCString latexLanguageSupportCommand()
- { return "Portuguese"; }
+ {
+ return
+ "\\usepackage[portuges]{babel}\n";
+ }
// --- Language translation methods -------------------
diff --git a/src/translator_sc.h b/src/translator_sc.h
index d2b3954..e8191df 100644
--- a/src/translator_sc.h
+++ b/src/translator_sc.h
@@ -71,6 +71,11 @@ class TranslatorSerbianCyrillic : public TranslatorAdapter_1_6_0
*/
virtual QCString latexLanguageSupportCommand()
{
+ return "\\usepackage[T2A]{fontenc}\n"
+ "\\usepackage[russian]{babel}\n";
+ }
+ virtual QCString latexFontenc()
+ {
return "";
}
diff --git a/src/translator_si.h b/src/translator_si.h
index 792053e..2dd7e5b 100644
--- a/src/translator_si.h
+++ b/src/translator_si.h
@@ -36,7 +36,7 @@ class TranslatorSlovene : public TranslatorAdapter_1_4_6
*/
QCString latexLanguageSupportCommand()
{
- return "\\usepackage[slovene]{babel}\n\\usepackage[T1]{fontenc}\n";
+ return "\\usepackage[slovene]{babel}\n";
}
QCString trRelatedFunctions()
{ return "Povezane funkcije"; }
diff --git a/src/translator_tw.h b/src/translator_tw.h
index 77627bf..9e9092d 100644
--- a/src/translator_tw.h
+++ b/src/translator_tw.h
@@ -72,8 +72,20 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_8_15
*/
virtual QCString latexLanguageSupportCommand()
{
+ return "\\usepackage{CJKutf8}\n";
+ }
+ virtual QCString latexFontenc()
+ {
return "";
}
+ virtual QCString latexDocumentPre()
+ {
+ return "\\begin{CJK}{UTF8}{min}\n";
+ }
+ virtual QCString latexDocumentPost()
+ {
+ return "\\end{CJK}\n";
+ }
// --- Language translation methods -------------------
diff --git a/src/translator_vi.h b/src/translator_vi.h
index a0046b0..b391b0c 100644
--- a/src/translator_vi.h
+++ b/src/translator_vi.h
@@ -78,9 +78,23 @@ class TranslatorVietnamese : public TranslatorAdapter_1_6_0
*/
virtual QCString latexLanguageSupportCommand()
{
+ return
+ "\\usepackage[vietnamese]{babel}\n";
+ }
+ virtual QCString latexFontenc()
+ {
return "";
}
-
+ virtual QCString latexCommandName()
+ {
+ QCString latex_command = Config_getString(LATEX_CMD_NAME);
+ if (latex_command.isEmpty()) latex_command = "latex";
+ if (Config_getBool(USE_PDFLATEX))
+ {
+ if (latex_command == "latex") latex_command = "xelatex";
+ }
+ return latex_command;
+ }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
diff --git a/src/util.cpp b/src/util.cpp
index 8e936b5..ff0d0c6 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -323,7 +323,6 @@ int guessSection(const char *name)
n.right(4)==".c++" ||
n.right(5)==".java" ||
n.right(2)==".m" ||
- n.right(2)==".M" ||
n.right(3)==".mm" ||
n.right(3)==".ii" || // inline
n.right(4)==".ixx" ||
@@ -1856,7 +1855,11 @@ QCString removeRedundantWhiteSpace(const QCString &s)
case '&':
if (i>0 && isId(pc))
{
- *dst++=' ';
+ if (nc != '=')
+ // avoid splitting operator&=
+ {
+ *dst++=' ';
+ }
}
*dst++=c;
break;
@@ -4191,7 +4194,7 @@ bool getDefs(const QCString &scName,
//}
}
}
- //printf(" >Succes=%d\n",mdist<maxInheritanceDepth);
+ //printf(" >Success=%d\n",mdist<maxInheritanceDepth);
if (mdist<maxInheritanceDepth)
{
if (!md->isLinkable() || md->isStrongEnumValue())
@@ -7913,7 +7916,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf,bool filter,bool isSourceC
int start=0;
if (size>=2 &&
- ((inBuf.at(0)==-1 && inBuf.at(1)==-2) || // Litte endian BOM
+ ((inBuf.at(0)==-1 && inBuf.at(1)==-2) || // Little endian BOM
(inBuf.at(0)==-2 && inBuf.at(1)==-1) // big endian BOM
)
) // UCS-2 encoded file
@@ -8077,7 +8080,7 @@ QCString externalRef(const QCString &relPath,const QCString &ref,bool href)
return result;
}
-/** Writes the intensity only bitmap representated by \a data as an image to
+/** Writes the intensity only bitmap represented by \a data as an image to
* directory \a dir using the colors defined by HTML_COLORSTYLE_*.
*/
void writeColoredImgData(const char *dir,ColoredImgDataItem data[])
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index ce1f92b..618258f 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -94,7 +94,7 @@ static QCString g_exampleFile;
static QCString g_classScope;
-static QCString g_CurrScope;
+static bool g_CurrARCH = FALSE;
static FileDef * g_sourceFileDef;
static Definition * g_currentDefinition;
@@ -109,7 +109,7 @@ static int g_braceCount=0;
static void writeFont(const char *s,const char* text);
static void generateMemLink(CodeOutputInterface &ol,QCString &clName,QCString& memberName);
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, const char *curr_class=0);
static void endFontClass();
static void startFontClass(const char *s);
//-------------------------------------------------------------------
@@ -291,7 +291,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F
}
else
{
- generateClassOrGlobalLink(*g_code,temp);
+ generateClassOrGlobalLink(*g_code,temp,FALSE,curr_class);
}
}
else
@@ -328,7 +328,7 @@ static void writeWord(const char *word,const char* curr_class=0,bool classLink=F
}
else
{
- generateClassOrGlobalLink(*g_code,temp);
+ generateClassOrGlobalLink(*g_code,temp,FALSE,curr_class);
}
}
else
@@ -383,7 +383,7 @@ static void codifyLines(const char *text,const char *cl=0,bool classlink=FALSE,b
if (comment)
writeFont("keyword",sp);
else
- writeWord(sp,cl,classlink);
+ writeWord(sp,cl,classlink);
done=TRUE;
}
}
@@ -510,7 +510,7 @@ static void generateMemLink(CodeOutputInterface &ol,QCString &clName,QCString& m
}// generateMemLink
-static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool /*typeOnly*/)
+static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName, bool /*typeOnly*/, const char *curr_class)
{
QCString className=clName;
@@ -521,6 +521,11 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,const char *clName
//bool isLocal=FALSE;
className.stripPrefix("_");
cd = getClass(className.data());
+ if (!cd && curr_class)
+ {
+ if (QCString(curr_class).contains(QRegExp("::"+QCString(clName)+"$"))) cd = getClass(curr_class);
+ }
+
while (cd)
{
//className.stripPrefix("_");
@@ -759,7 +764,7 @@ 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}
+ARCHITECTURE ^{B}*("architecture"){BN}+{FUNCNAME}{BN}+("of"){BN}+{FUNCNAME}{BN}+("is")
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"|"for")
@@ -768,7 +773,7 @@ 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")
+KEYWORD ("of"|"new"|"event"|"break"|"case"|"end"|"loop"|"else"|"for"|"goto"|"if"|"return"|"generate"|"is"|"while"|"in")
TYPEKW ^{B}*("type"|"subtype"|"constant"|"attribute"|"signal"|"variable","alias","configuration")
FUNC ^{B}*("function"|"procedure"){BN}*{FUNCNAME}{BN}*("(")
@@ -807,6 +812,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
%x ClassVar
%x ClassesName
%x Map
+%x End
%x Body
%%
@@ -1058,14 +1064,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
g_CurrClass.append(vhdlcodeYYtext);
g_CurrClass=g_CurrClass.stripWhiteSpace();
- if (!writeColoredWord(g_CurrScope))
- {
- generateClassOrGlobalLink(*g_code,vhdlcodeYYtext);
- }
- else
- {
- codifyLines(vhdlcodeYYtext,g_CurrClass.data());
- }
+ generateClassOrGlobalLink(*g_code,vhdlcodeYYtext);
BEGIN(Bases);
}
@@ -1284,6 +1283,7 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
//temp+=("-");
//temp+=VhdlDocGen::getIndexWord(vhdlcodeYYtext,3);
QCString temp = VhdlDocGen::getIndexWord(vhdlcodeYYtext,3);
+ g_CurrARCH = TRUE;
temp+="::";
temp+=VhdlDocGen::getIndexWord(vhdlcodeYYtext,1);
g_CurrClass=temp;
@@ -1291,7 +1291,6 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
codifyLines(vhdlcodeYYtext,temp.data(),TRUE);
//generateClassOrGlobalLink(*g_code,temp.data());
isPackageBody=FALSE;
- BEGIN(ClassName);
}
@@ -1371,6 +1370,41 @@ XILINX "INST"|"NET"|"PIN"|"BLKNM"|"BUFG"|"COLLAPSE"|"CPLD"|"COMPGRP"|"CONFI
}
+<Bases>"end"{BN}+"architecture"{BN}+{FUNCNAME} {
+ codifyLines(vhdlcodeYYtext,g_CurrClass.data(),TRUE);
+ g_CurrARCH = FALSE;
+ }
+<Bases>"end"{BN}+{FUNCNAME} {
+ if (g_CurrARCH)
+ {
+ codifyLines(vhdlcodeYYtext,g_CurrClass.data(),TRUE);
+ g_CurrARCH = FALSE;
+ }
+ else
+ REJECT;
+ }
+<Bases>"end" {
+ appStringLower(g_PrevString,vhdlcodeYYtext);
+ QCString temp(vhdlcodeYYtext);
+ temp=temp.stripWhiteSpace();
+
+ writeColoredWord(temp);
+ BEGIN(End);
+ }
+<End>{ID} {
+ appStringLower(g_PrevString,vhdlcodeYYtext);
+ QCString temp(vhdlcodeYYtext);
+ temp=temp.stripWhiteSpace();
+
+ if (!writeColoredWord(temp))
+ {
+ generateClassOrGlobalLink(*g_code,temp.data());
+ }
+ }
+<End>";" {
+ codifyLines(vhdlcodeYYtext);
+ BEGIN(Bases);
+ }
<Bases>{KEYWORD} { // found keyword
QCString qcs(vhdlcodeYYtext);
if (!writeColoredWord(qcs))
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index fd5e4d7..007c45f 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -2059,19 +2059,21 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
writeLink(mdef,ol);
ol.docify(" ");
- ol.insertMemberAlign();
if (mm==VhdlDocGen::GENERIC)
{
+ ol.insertMemberAlign();
ol.startBold();
VhdlDocGen::formatString(largs,ol,mdef);
ol.endBold();
}
else
{
+ ol.insertMemberAlignLeft(isAnonymous, false);
ol.docify(" ");
ol.startBold();
VhdlDocGen::formatString(ltype,ol,mdef);
ol.endBold();
+ ol.insertMemberAlign();
ol.docify(" ");
VhdlDocGen::formatString(largs,ol,mdef);
}
@@ -2226,11 +2228,11 @@ void VhdlDocGen::writeVHDLDeclaration(MemberDef* mdef,OutputList &ol,
ol.endMemberItem();
if (!mdef->briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC) /* && !annMemb */)
{
- QCString s=mdef->briefDescription();
- ol.startMemberDescription(mdef->anchor());
+ QCString s=mdef->briefDescription();
+ ol.startMemberDescription(mdef->anchor(), NULL, mm == VhdlDocGen::PORT);
ol.generateDoc(mdef->briefFile(),mdef->briefLine(),
- mdef->getOuterScope()?mdef->getOuterScope():d,
- mdef,s.data(),TRUE,FALSE,0,TRUE,FALSE);
+ mdef->getOuterScope()?mdef->getOuterScope():d,
+ mdef,s.data(),TRUE,FALSE,0,TRUE,FALSE);
if (detailsVisible)
{
ol.pushGeneratorState();
@@ -2327,7 +2329,7 @@ void VhdlDocGen::writeVHDLDeclarations(MemberList* ml,OutputList &ol,
if (title)
{
- ol.startMemberHeader(title);
+ ol.startMemberHeader(title,type == VhdlDocGen::PORT ? 3 : 2);
ol.parseText(title);
ol.endMemberHeader();
ol.docify(" ");
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index 953cd6b..706e8db 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -80,9 +80,9 @@ static struct
int iDocLine;
} str_doc;
-static bool doxComment=FALSE; // doxygen comment ?
static QCString strComment;
static int iCodeLen;
+static const char *vhdlFileName = 0;
bool checkMultiComment(QCString& qcs,int line);
QList<Entry>* getEntryAtLine(const Entry* ce,int line);
@@ -99,59 +99,6 @@ Entry* getVhdlCompound()
return NULL;
}
-void startCodeBlock(int index)
-{
- int ll=strComment.length();
- if (!gBlock) gBlock = new Entry;
- iCodeLen=inputString.findRev(strComment.data())+ll;
- // fprintf(stderr,"\n startin code..%d %d %d\n",iCodeLen,num_chars,ll);
- gBlock->reset();
- int len=strComment.length();
- QCString name=strComment.right(len-index);//
- name=VhdlDocGen::getIndexWord(name.data(),1);
- if (!name)
- gBlock->name="misc"+ VhdlDocGen::getRecordNumber();
- else
- gBlock->name=name;
-
- gBlock->startLine=yyLineNr;
- gBlock->bodyLine=yyLineNr;
-
- strComment=strComment.left(index);
- VhdlDocGen::prepareComment(strComment);
- gBlock->brief+=strComment;
-}
-
-void makeInlineDoc(int endCode)
-{
- int len=endCode-iCodeLen;
- if (!gBlock) gBlock = new Entry;
- QCString par=inputString.mid(iCodeLen,len);
- //fprintf(stderr,"\n inline code: \n<%s>",par.data());
- gBlock->doc=par;
- gBlock->inbodyDocs=par;
- gBlock->section=Entry::VARIABLE_SEC;
- gBlock->spec=VhdlDocGen::MISCELLANEOUS;
- gBlock->fileName = yyFileName;
- gBlock->endBodyLine=yyLineNr-1;
- gBlock->lang=SrcLangExt_VHDL;
- Entry *temp=new Entry(*gBlock);
- Entry* compound=getVhdlCompound();
-
- if (compound)
- {
- compound->addSubEntry(temp);
- }
- else
- {
- temp->type="misc"; // global code like library ieee...
- VhdlParser::current_root->addSubEntry(temp);
- }
- strComment.resize(0);
- gBlock->reset();
-}// makeInlineDoc
-
-
bool isConstraintFile(const QCString &fileName,const QCString &ext)
{
return fileName.right(ext.length())==ext;
@@ -200,6 +147,7 @@ void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,En
VhdlParser::current=new Entry();
VhdlParser::initEntry(VhdlParser::current);
groupEnterFile(fileName,yyLineNr);
+ vhdlFileName = fileName;
lineParse=new int[200]; // Dimitri: dangerous constant: should be bigger than largest token id in VhdlParserConstants.h
VhdlParserIF::parseVhdlfile(fileBuf,inLine);
@@ -213,6 +161,7 @@ void VHDLLanguageScanner::parseInput(const char *fileName,const char *fileBuf,En
yyFileName.resize(0);
libUse.clear();
VhdlDocGen::resetCodeVhdlParserState();
+ vhdlFileName = 0;
}
void VhdlParser::lineCount()
@@ -279,20 +228,6 @@ void VhdlParser::newEntry()
initEntry(current);
}
-bool checkInlineCode(QCString & doc)
-{
- int index=doc.find("\\code");
-
- if (index>0)
- {
- strComment+=doc;
- startCodeBlock(index);
- doxComment=TRUE;
- return true;
- }
- return false;
-}
-
void VhdlParser::handleFlowComment(const char* doc)
{
lineCount(doc);
@@ -310,7 +245,6 @@ void VhdlParser::handleFlowComment(const char* doc)
void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
{
int position=0;
- static bool isIn;
QCString doc;
doc.append(doc1);
// fprintf(stderr,"\n %s",doc.data());
@@ -322,22 +256,6 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
return;
}
- isIn=checkInlineCode(doc);
- bool isEndCode=doc.contains("\\endcode");
- // empty comment --!
- if (isEndCode)
- {
- int end=inputString.find(doc.data(),iCodeLen);
- makeInlineDoc(end);
- strComment.resize(0);
- isIn=false;
- }
- if (isIn)
- {
- isIn=false;
- return;
- }
-
VhdlDocGen::prepareComment(doc);
bool needsEntry=FALSE;
@@ -788,31 +706,12 @@ void VhdlParser::setMultCommentLine()
void VhdlParser::oneLineComment(QCString qcs)
{
- bool isEndCode=qcs.contains("\\endcode");
-
- int index = qcs.find("\\code");
- if (isEndCode)
- {
- int end = inputString.find(qcs.data(),iCodeLen);
- makeInlineDoc(end);
- }
- else if (index > 0)
- {
- // assert(false);
- strComment=qcs;
- startCodeBlock(index);
- strComment.resize(0);
- }
-
- if (!isEndCode && index==-1)
- {
int j=qcs.find("--!");
qcs=qcs.right(qcs.length()-3-j);
if (!checkMultiComment(qcs,iDocLine))
{
handleCommentBlock(qcs,TRUE);
}
- }
}
@@ -851,3 +750,7 @@ QList<Entry>* getEntryAtLine(const Entry* ce,int line)
return &lineEntry;
}
+const char *getVhdlFileName(void)
+{
+ return vhdlFileName;
+}
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 697a4d8..63fc8ad 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -175,7 +175,7 @@ static void writeCombineScript()
" <xsl:output method=\"xml\" version=\"1.0\" indent=\"no\" standalone=\"yes\" />\n"
" <xsl:template match=\"/\">\n"
" <doxygen version=\"{doxygenindex/@version}\">\n"
- " <!-- Load all doxgen generated xml files -->\n"
+ " <!-- Load all doxygen generated xml files -->\n"
" <xsl:for-each select=\"doxygenindex/compound\">\n"
" <xsl:copy-of select=\"document( concat( @refid, '.xml' ) )/doxygen/*\" />\n"
" </xsl:for-each>\n"
diff --git a/templates/html/search_functions.php b/templates/html/search_functions.php
index caa9e3b..7374de9 100644
--- a/templates/html/search_functions.php
+++ b/templates/html/search_functions.php
@@ -1,4 +1,4 @@
-<script language="PHP">
+<?php
require_once "search_config.php";
function end_form($value)
@@ -363,4 +363,4 @@ function main()
report_results($sorted);
end_page();
}
-</script>
+?>
diff --git a/templates/html/search_opensearch.php b/templates/html/search_opensearch.php
index 58ee4ab..95c1c2c 100644
--- a/templates/html/search_opensearch.php
+++ b/templates/html/search_opensearch.php
@@ -1,4 +1,4 @@
-<script language="PHP">
+<?php
require "search_functions.php";
$mode = array_key_exists('v', $_GET)?$_GET['v']:"";
@@ -125,4 +125,4 @@ function invalid_format($query, array $results)
print "Search results for '$query':\n\n";
print_r($results);
}
-</script>
+?>
diff --git a/templates/latex/doxygen.sty b/templates/latex/doxygen.sty
index e457acc..bee23c5 100644
--- a/templates/latex/doxygen.sty
+++ b/templates/latex/doxygen.sty
@@ -11,8 +11,15 @@
\RequirePackage[table]{xcolor}
\RequirePackage{longtable}
\RequirePackage{tabu}
+\RequirePackage{fancyvrb}
\RequirePackage{tabularx}
\RequirePackage{multirow}
+\RequirePackage{hanging}
+\RequirePackage{ifpdf}
+\RequirePackage{adjustbox}
+\RequirePackage{amssymb}
+\RequirePackage{stackengine}
+
%---------- Internal commands used in this style file ----------------
@@ -77,17 +84,49 @@
\end{alltt}%
\normalsize%
}
+% Necessary for redefining not defined charcaters, i.e. "Replacement Character" in tex output.
+\newlength{\CodeWidthChar}
+\newlength{\CodeHeightChar}
+% Necessary for hanging indent
+\newlength{\DoxyCodeWidth}
+
+\newcommand\DoxyCodeLine[1]{\hangpara{\DoxyCodeWidth}{1}{#1}\par}
+
+\newcommand\NiceSpace{%
+ \discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}%
+}
% Used by @code ... @endcode
\newenvironment{DoxyCode}{%
\par%
\scriptsize%
- \begin{alltt}%
+ \normalfont\ttfamily%
+ \rightskip0pt plus 1fil%
+ \settowidth{\DoxyCodeWidth}{000000}%
+ \settowidth{\CodeWidthChar}{?}%
+ \settoheight{\CodeHeightChar}{?}%
+ \setlength{\parskip}{0ex plus 0ex minus 0ex}%
+ {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces%
+
}{%
- \end{alltt}%
+ \normalfont%
\normalsize%
}
+% Redefining not defined charcaters, i.e. "Replacement Character" in tex output.
+\def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{%
+ \textcolor{white}{\sffamily\bfseries\small ?}}{%
+ \rotatebox{45}{$\blacksquare$}}}}
+
+% Choosing right setup for "Replacement character"
+\ifpdf
+ \RequirePackage[utf8]{inputenc}
+ \DeclareUnicodeCharacter{FFFD}{\ucr}
+\else
+ \catcode`\�=13
+ \def�{\ucr}
+\fi
+
% Used by @example, @include, @includelineno and @dontinclude
\newenvironment{DoxyCodeInclude}{%
\DoxyCode%
@@ -273,10 +312,10 @@
\tabulinesep=1mm%
\par%
\ifthenelse{\equal{#1}{}}%
- {\begin{longtabu} spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description
+ {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description
{\ifthenelse{\equal{#1}{1}}%
- {\begin{longtabu} spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc
- {\begin{longtabu} spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc
+ {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc
+ {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc
}
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
\hline%
@@ -285,7 +324,7 @@
\hline%
\endhead%
}{%
- \end{longtabu}%
+ \end{longtabu*}%
\vspace{6pt}%
}
@@ -293,7 +332,7 @@
\newenvironment{DoxyFields}[1]{%
\tabulinesep=1mm%
\par%
- \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}%
+ \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}%
\multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
@@ -301,7 +340,7 @@
\hline%
\endhead%
}{%
- \end{longtabu}%
+ \end{longtabu*}%
\vspace{6pt}%
}
@@ -309,7 +348,7 @@
\newenvironment{DoxyEnumFields}[1]{%
\tabulinesep=1mm%
\par%
- \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
+ \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
@@ -317,7 +356,7 @@
\hline%
\endhead%
}{%
- \end{longtabu}%
+ \end{longtabu*}%
\vspace{6pt}%
}
@@ -331,7 +370,7 @@
\newenvironment{DoxyRetVals}[1]{%
\tabulinesep=1mm%
\par%
- \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
+ \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
@@ -339,7 +378,7 @@
\hline%
\endhead%
}{%
- \end{longtabu}%
+ \end{longtabu*}%
\vspace{6pt}%
}
@@ -347,7 +386,7 @@
\newenvironment{DoxyExceptions}[1]{%
\tabulinesep=1mm%
\par%
- \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
+ \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
@@ -355,7 +394,7 @@
\hline%
\endhead%
}{%
- \end{longtabu}%
+ \end{longtabu*}%
\vspace{6pt}%
}
@@ -363,7 +402,7 @@
\newenvironment{DoxyTemplParams}[1]{%
\tabulinesep=1mm%
\par%
- \begin{longtabu} spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
+ \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
\multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
\hline%
\endfirsthead%
@@ -371,7 +410,7 @@
\hline%
\endhead%
}{%
- \end{longtabu}%
+ \end{longtabu*}%
\vspace{6pt}%
}
@@ -439,11 +478,11 @@
\newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}%
\newenvironment{TabularC}[1]%
{\tabulinesep=1mm
-\begin{longtabu} spread 0pt [c]{*#1{|X[-1]}|}}%
-{\end{longtabu}\par}%
+\begin{longtabu*}spread 0pt [c]{*#1{|X[-1]}|}}%
+{\end{longtabu*}\par}%
\newenvironment{TabularNC}[1]%
-{\begin{tabu} spread 0pt [l]{*#1{|X[-1]}|}}%
+{\begin{tabu}spread 0pt [l]{*#1{|X[-1]}|}}%
{\end{tabu}\par}%
% Used for member group headers
diff --git a/testing/054/054__parblock_8cpp.xml b/testing/054/054__parblock_8cpp.xml
index ae6e462..5567908 100644
--- a/testing/054/054__parblock_8cpp.xml
+++ b/testing/054/054__parblock_8cpp.xml
@@ -80,6 +80,96 @@
<parameterdescription>
<para>
<parblock>
+ <para>First paragraph of the param description.</para>
+ <para>Second paragraph of the param description. </para>
+ </parblock>
+ </para>
+ </parameterdescription>
+ </parameteritem>
+ </parameterlist>
+ </para>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="054_parblock.cpp" line="33" column="1"/>
+ </memberdef>
+ <memberdef kind="function" id="054__parblock_8cpp_1a5cded03ec9e6fd626da35ab05f624f39" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type>void</type>
+ <definition>void function_2</definition>
+ <argsstring>(int client, int *resource, int parblock, int *test, int p)</argsstring>
+ <name>function_2</name>
+ <param>
+ <type>int</type>
+ <declname>client</declname>
+ </param>
+ <param>
+ <type>int *</type>
+ <declname>resource</declname>
+ </param>
+ <param>
+ <type>int</type>
+ <declname>parblock</declname>
+ </param>
+ <param>
+ <type>int *</type>
+ <declname>test</declname>
+ </param>
+ <param>
+ <type>int</type>
+ <declname>p</declname>
+ </param>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ <para>call by target-specific code to manage resources required by the client.</para>
+ <para>
+ <parameterlist kind="param">
+ <parameteritem>
+ <parameternamelist>
+ <parametername direction="in">client</parametername>
+ </parameternamelist>
+ <parameterdescription>
+ <para>ID of client requesting resource. </para>
+ </parameterdescription>
+ </parameteritem>
+ <parameteritem>
+ <parameternamelist>
+ <parametername direction="out">resource</parametername>
+ </parameternamelist>
+ <parameterdescription>
+ <para>Requested resource </para>
+ </parameterdescription>
+ </parameteritem>
+ <parameteritem>
+ <parameternamelist>
+ <parametername direction="in">parblock</parametername>
+ </parameternamelist>
+ <parameterdescription>
+ <para>
+ <parblock>
+ <para>This is a test for the @parblock command.</para>
+ <para>A list if values for the parblock param:<itemizedlist><listitem><para>Item 1. This is short one-line description.</para></listitem><listitem><para>Item 2. This is a long bullet item; sometimes they wrap on multiple lines like this one.</para></listitem></itemizedlist>
+</para>
+ <para>This is the second paragraph description for the @parblock parameter. Always end the text inside the @parblock command with an @endparblock command. </para>
+ </parblock>
+ </para>
+ </parameterdescription>
+ </parameteritem>
+ <parameteritem>
+ <parameternamelist>
+ <parametername direction="out">test</parametername>
+ </parameternamelist>
+ <parameterdescription>
+ <para>This is a test parameter for this function to see if it is included in the parameter table </para>
+ </parameterdescription>
+ </parameteritem>
+ <parameteritem>
+ <parameternamelist>
+ <parametername direction="in">p</parametername>
+ </parameternamelist>
+ <parameterdescription>
+ <para>
+ <parblock>
<para>First paragraph of the param description. <verbatim> Second paragraph of the param description.
</verbatim> </para>
</parblock>
@@ -91,7 +181,7 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
- <location file="054_parblock.cpp" line="32" column="1"/>
+ <location file="054_parblock.cpp" line="60" column="1"/>
</memberdef>
</sectiondef>
<briefdescription>
diff --git a/testing/054_parblock.cpp b/testing/054_parblock.cpp
index 186feb5..4f303c6 100644
--- a/testing/054_parblock.cpp
+++ b/testing/054_parblock.cpp
@@ -24,9 +24,37 @@
@endparblock
@param[out] test This is a test parameter for this function to see if
it is included in the parameter table
+ @param[in] p
+ @parblock First paragraph of the param description.
+
+ Second paragraph of the param description.
+ @endparblock
+ */
+void function(int client,int *resource,int parblock,int *test,int p);
+/**
+ call by target-specific code to manage resources required by the client.
+
+ @param[in] client ID of client requesting resource.
+ @param[out] resource Requested resource
+ @param[in] parblock @parblock This is a test for the \@parblock
+ command.
+
+ A list if values for the parblock param:
+ - Item 1. This is short one-line description.
+ - Item 2. This is a long bullet item;
+ sometimes they wrap on multiple lines like this
+ one.
+
+ This is the second paragraph description for the
+ \@parblock parameter. Always end the text inside
+ the \@parblock command with an \@endparblock
+ command.
+ @endparblock
+ @param[out] test This is a test parameter for this function to see if
+ it is included in the parameter table
@param[in] p @parblock First paragraph of the param description.
Second paragraph of the param description.
- @endparblock
+ @endparblock
*/
-void function(int client,int *resource,int parblock,int *test,int p);
+void function_2(int client,int *resource,int parblock,int *test,int p);
diff --git a/testing/067/067__using_8cpp.xml b/testing/072/072__using_8cpp.xml
index c278161..e368966 100644
--- a/testing/067/067__using_8cpp.xml
+++ b/testing/072/072__using_8cpp.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
- <compounddef id="067__using_8cpp" kind="file" language="C++">
- <compoundname>067_using.cpp</compoundname>
+ <compounddef id="072__using_8cpp" kind="file" language="C++">
+ <compoundname>072_using.cpp</compoundname>
<sectiondef kind="typedef">
- <memberdef kind="typedef" id="067__using_8cpp_1a1b01c504448c96cd2191a5184dd31acf" prot="public" static="no">
+ <memberdef kind="typedef" id="072__using_8cpp_1a1b01c504448c96cd2191a5184dd31acf" prot="public" static="no">
<templateparamlist>
<param>
<type>class T</type>
@@ -20,13 +20,13 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
- <location file="067_using.cpp" line="7" column="1" bodyfile="067_using.cpp" bodystart="7" bodyend="-1"/>
+ <location file="072_using.cpp" line="7" column="1" bodyfile="072_using.cpp" bodystart="7" bodyend="-1"/>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
- <location file="067_using.cpp"/>
+ <location file="072_using.cpp"/>
</compounddef>
</doxygen>
diff --git a/testing/067_using.cpp b/testing/072_using.cpp
index eb2f5cc..ca02902 100644
--- a/testing/067_using.cpp
+++ b/testing/072_using.cpp
@@ -1,5 +1,5 @@
// objective: test template parameters for a type alias
-// check: 067__using_8cpp.xml
+// check: 072__using_8cpp.xml
/** \file */
diff --git a/testing/068/068__typed__enum_8cpp.xml b/testing/073/073__typed__enum_8cpp.xml
index 880bf14..9dda417 100644
--- a/testing/068/068__typed__enum_8cpp.xml
+++ b/testing/073/073__typed__enum_8cpp.xml
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
- <compounddef id="068__typed__enum_8cpp" kind="file" language="C++">
- <compoundname>068_typed_enum.cpp</compoundname>
+ <compounddef id="073__typed__enum_8cpp" kind="file" language="C++">
+ <compoundname>073_typed_enum.cpp</compoundname>
<sectiondef kind="enum">
- <memberdef kind="enum" id="068__typed__enum_8cpp_1aa72902e6181db009a6a84502f81612c2" prot="public" static="no" strong="yes">
+ <memberdef kind="enum" id="073__typed__enum_8cpp_1aa72902e6181db009a6a84502f81612c2" prot="public" static="no" strong="yes">
<type>unsigned short</type>
<name>E</name>
<briefdescription>
@@ -13,13 +13,13 @@
</detaileddescription>
<inbodydescription>
</inbodydescription>
- <location file="068_typed_enum.cpp" line="7" column="1" bodyfile="068_typed_enum.cpp" bodystart="7" bodyend="7"/>
+ <location file="073_typed_enum.cpp" line="7" column="1" bodyfile="073_typed_enum.cpp" bodystart="7" bodyend="7"/>
</memberdef>
</sectiondef>
<briefdescription>
</briefdescription>
<detaileddescription>
</detaileddescription>
- <location file="068_typed_enum.cpp"/>
+ <location file="073_typed_enum.cpp"/>
</compounddef>
</doxygen>
diff --git a/testing/068_typed_enum.cpp b/testing/073_typed_enum.cpp
index 44c4123..0818463 100644
--- a/testing/068_typed_enum.cpp
+++ b/testing/073_typed_enum.cpp
@@ -1,5 +1,5 @@
// objective: test underlying type and strongness for an enum
-// check: 068__typed__enum_8cpp.xml
+// check: 073__typed__enum_8cpp.xml
/** \file */
diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
index 97b4868..40cb40b 100644
--- a/testing/CMakeLists.txt
+++ b/testing/CMakeLists.txt
@@ -1,9 +1,9 @@
add_custom_target(tests
COMMENT "Running doxygen tests..."
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --all --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
DEPENDS doxygen
)
add_test(NAME suite
- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --all --doxygen $<TARGET_FILE:doxygen> --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --doxygen $<TARGET_FILE:doxygen> --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
)
diff --git a/testing/README.txt b/testing/README.txt
index ee3de59..a5a0ad9 100644
--- a/testing/README.txt
+++ b/testing/README.txt
@@ -7,19 +7,29 @@ has the same 3 digit number. The directory contains one or more reference
files that are compared against the XML output produced by doxygen. If the
result is the same, there is no regression and the test passes. If there is a
difference the test fails and the difference (in diff -u format) will be shown.
+It is also possible to see whether or not the test can be build to a xhtml set
+of files (and tested against a DTD), it is also possible to create a pdf file
+for each test to see if the LaTeX / pdf generation is possible.
The runtest.py script responsible for running the tests takes a number of
optional parameters:
--id n: run test with number n only (the option may be specified
- multiple times) default is to run all tests.
--updateref: update the reference files. Should be used in combination
- with -id to update the reference file(s) for the given test.
--all: can be used in combination with -updateref to update the
- reference files for all tests.
--doxygen exe: run the specified doxygen executable.
--xmllint exe: run the specified xmllint executable.
-
-The runtest.pl has the following dependenies on 3rd party tools:
+ --updateref update the reference data for a test
+ --doxygen [DOXYGEN] path/name of the doxygen executable
+ --xmllint [XMLLINT] path/name of the xmllint executable
+ --id IDS [IDS ...] id of the test to perform
+ --all perform all tests
+ --inputdir [INPUTDIR]
+ input directory containing the tests
+ --outputdir [OUTPUTDIR]
+ output directory to write the doxygen output to
+ --noredir disable redirection of doxygen warnings
+ --xml create xml output and check
+ --xhtml create xhtml output and check with xmllint
+ --pdf create LaTeX output and create pdf from it
+ --keep keep result directories
+In case neither --xml, --pdf or --xhtml is used the default is set to --xml.
+
+The runtest.pl has the following dependencies on 3rd party tools:
- python to run the script
- xmllint to normalize the XML output
- diff to show the differences in case a test fails
@@ -44,5 +54,7 @@ Example to update the reference files for a test
python runtest.py -updateref -id 10
There is also a CMakeLists.txt, which can be used from the build directory
-to run all tests by simply invoking 'make tests'.
+to run all tests by simply invoking 'make tests', to use the specific options use
+the flag TEST_FLAGS with make
+ e.g. make tests TEST_FLAGS="--id=5 --id=10 --pdf --xhtml"
diff --git a/testing/dtd/xhtml-lat1.ent b/testing/dtd/xhtml-lat1.ent
new file mode 100755
index 0000000..ffee223
--- /dev/null
+++ b/testing/dtd/xhtml-lat1.ent
@@ -0,0 +1,196 @@
+<!-- Portions (C) International Organization for Standardization 1986
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
+ %HTMLlat1;
+-->
+
+<!ENTITY nbsp "&#160;"> <!-- no-break space = non-breaking space,
+ U+00A0 ISOnum -->
+<!ENTITY iexcl "&#161;"> <!-- inverted exclamation mark, U+00A1 ISOnum -->
+<!ENTITY cent "&#162;"> <!-- cent sign, U+00A2 ISOnum -->
+<!ENTITY pound "&#163;"> <!-- pound sign, U+00A3 ISOnum -->
+<!ENTITY curren "&#164;"> <!-- currency sign, U+00A4 ISOnum -->
+<!ENTITY yen "&#165;"> <!-- yen sign = yuan sign, U+00A5 ISOnum -->
+<!ENTITY brvbar "&#166;"> <!-- broken bar = broken vertical bar,
+ U+00A6 ISOnum -->
+<!ENTITY sect "&#167;"> <!-- section sign, U+00A7 ISOnum -->
+<!ENTITY uml "&#168;"> <!-- diaeresis = spacing diaeresis,
+ U+00A8 ISOdia -->
+<!ENTITY copy "&#169;"> <!-- copyright sign, U+00A9 ISOnum -->
+<!ENTITY ordf "&#170;"> <!-- feminine ordinal indicator, U+00AA ISOnum -->
+<!ENTITY laquo "&#171;"> <!-- left-pointing double angle quotation mark
+ = left pointing guillemet, U+00AB ISOnum -->
+<!ENTITY not "&#172;"> <!-- not sign = angled dash,
+ U+00AC ISOnum -->
+<!ENTITY shy "&#173;"> <!-- soft hyphen = discretionary hyphen,
+ U+00AD ISOnum -->
+<!ENTITY reg "&#174;"> <!-- registered sign = registered trade mark sign,
+ U+00AE ISOnum -->
+<!ENTITY macr "&#175;"> <!-- macron = spacing macron = overline
+ = APL overbar, U+00AF ISOdia -->
+<!ENTITY deg "&#176;"> <!-- degree sign, U+00B0 ISOnum -->
+<!ENTITY plusmn "&#177;"> <!-- plus-minus sign = plus-or-minus sign,
+ U+00B1 ISOnum -->
+<!ENTITY sup2 "&#178;"> <!-- superscript two = superscript digit two
+ = squared, U+00B2 ISOnum -->
+<!ENTITY sup3 "&#179;"> <!-- superscript three = superscript digit three
+ = cubed, U+00B3 ISOnum -->
+<!ENTITY acute "&#180;"> <!-- acute accent = spacing acute,
+ U+00B4 ISOdia -->
+<!ENTITY micro "&#181;"> <!-- micro sign, U+00B5 ISOnum -->
+<!ENTITY para "&#182;"> <!-- pilcrow sign = paragraph sign,
+ U+00B6 ISOnum -->
+<!ENTITY middot "&#183;"> <!-- middle dot = Georgian comma
+ = Greek middle dot, U+00B7 ISOnum -->
+<!ENTITY cedil "&#184;"> <!-- cedilla = spacing cedilla, U+00B8 ISOdia -->
+<!ENTITY sup1 "&#185;"> <!-- superscript one = superscript digit one,
+ U+00B9 ISOnum -->
+<!ENTITY ordm "&#186;"> <!-- masculine ordinal indicator,
+ U+00BA ISOnum -->
+<!ENTITY raquo "&#187;"> <!-- right-pointing double angle quotation mark
+ = right pointing guillemet, U+00BB ISOnum -->
+<!ENTITY frac14 "&#188;"> <!-- vulgar fraction one quarter
+ = fraction one quarter, U+00BC ISOnum -->
+<!ENTITY frac12 "&#189;"> <!-- vulgar fraction one half
+ = fraction one half, U+00BD ISOnum -->
+<!ENTITY frac34 "&#190;"> <!-- vulgar fraction three quarters
+ = fraction three quarters, U+00BE ISOnum -->
+<!ENTITY iquest "&#191;"> <!-- inverted question mark
+ = turned question mark, U+00BF ISOnum -->
+<!ENTITY Agrave "&#192;"> <!-- latin capital letter A with grave
+ = latin capital letter A grave,
+ U+00C0 ISOlat1 -->
+<!ENTITY Aacute "&#193;"> <!-- latin capital letter A with acute,
+ U+00C1 ISOlat1 -->
+<!ENTITY Acirc "&#194;"> <!-- latin capital letter A with circumflex,
+ U+00C2 ISOlat1 -->
+<!ENTITY Atilde "&#195;"> <!-- latin capital letter A with tilde,
+ U+00C3 ISOlat1 -->
+<!ENTITY Auml "&#196;"> <!-- latin capital letter A with diaeresis,
+ U+00C4 ISOlat1 -->
+<!ENTITY Aring "&#197;"> <!-- latin capital letter A with ring above
+ = latin capital letter A ring,
+ U+00C5 ISOlat1 -->
+<!ENTITY AElig "&#198;"> <!-- latin capital letter AE
+ = latin capital ligature AE,
+ U+00C6 ISOlat1 -->
+<!ENTITY Ccedil "&#199;"> <!-- latin capital letter C with cedilla,
+ U+00C7 ISOlat1 -->
+<!ENTITY Egrave "&#200;"> <!-- latin capital letter E with grave,
+ U+00C8 ISOlat1 -->
+<!ENTITY Eacute "&#201;"> <!-- latin capital letter E with acute,
+ U+00C9 ISOlat1 -->
+<!ENTITY Ecirc "&#202;"> <!-- latin capital letter E with circumflex,
+ U+00CA ISOlat1 -->
+<!ENTITY Euml "&#203;"> <!-- latin capital letter E with diaeresis,
+ U+00CB ISOlat1 -->
+<!ENTITY Igrave "&#204;"> <!-- latin capital letter I with grave,
+ U+00CC ISOlat1 -->
+<!ENTITY Iacute "&#205;"> <!-- latin capital letter I with acute,
+ U+00CD ISOlat1 -->
+<!ENTITY Icirc "&#206;"> <!-- latin capital letter I with circumflex,
+ U+00CE ISOlat1 -->
+<!ENTITY Iuml "&#207;"> <!-- latin capital letter I with diaeresis,
+ U+00CF ISOlat1 -->
+<!ENTITY ETH "&#208;"> <!-- latin capital letter ETH, U+00D0 ISOlat1 -->
+<!ENTITY Ntilde "&#209;"> <!-- latin capital letter N with tilde,
+ U+00D1 ISOlat1 -->
+<!ENTITY Ograve "&#210;"> <!-- latin capital letter O with grave,
+ U+00D2 ISOlat1 -->
+<!ENTITY Oacute "&#211;"> <!-- latin capital letter O with acute,
+ U+00D3 ISOlat1 -->
+<!ENTITY Ocirc "&#212;"> <!-- latin capital letter O with circumflex,
+ U+00D4 ISOlat1 -->
+<!ENTITY Otilde "&#213;"> <!-- latin capital letter O with tilde,
+ U+00D5 ISOlat1 -->
+<!ENTITY Ouml "&#214;"> <!-- latin capital letter O with diaeresis,
+ U+00D6 ISOlat1 -->
+<!ENTITY times "&#215;"> <!-- multiplication sign, U+00D7 ISOnum -->
+<!ENTITY Oslash "&#216;"> <!-- latin capital letter O with stroke
+ = latin capital letter O slash,
+ U+00D8 ISOlat1 -->
+<!ENTITY Ugrave "&#217;"> <!-- latin capital letter U with grave,
+ U+00D9 ISOlat1 -->
+<!ENTITY Uacute "&#218;"> <!-- latin capital letter U with acute,
+ U+00DA ISOlat1 -->
+<!ENTITY Ucirc "&#219;"> <!-- latin capital letter U with circumflex,
+ U+00DB ISOlat1 -->
+<!ENTITY Uuml "&#220;"> <!-- latin capital letter U with diaeresis,
+ U+00DC ISOlat1 -->
+<!ENTITY Yacute "&#221;"> <!-- latin capital letter Y with acute,
+ U+00DD ISOlat1 -->
+<!ENTITY THORN "&#222;"> <!-- latin capital letter THORN,
+ U+00DE ISOlat1 -->
+<!ENTITY szlig "&#223;"> <!-- latin small letter sharp s = ess-zed,
+ U+00DF ISOlat1 -->
+<!ENTITY agrave "&#224;"> <!-- latin small letter a with grave
+ = latin small letter a grave,
+ U+00E0 ISOlat1 -->
+<!ENTITY aacute "&#225;"> <!-- latin small letter a with acute,
+ U+00E1 ISOlat1 -->
+<!ENTITY acirc "&#226;"> <!-- latin small letter a with circumflex,
+ U+00E2 ISOlat1 -->
+<!ENTITY atilde "&#227;"> <!-- latin small letter a with tilde,
+ U+00E3 ISOlat1 -->
+<!ENTITY auml "&#228;"> <!-- latin small letter a with diaeresis,
+ U+00E4 ISOlat1 -->
+<!ENTITY aring "&#229;"> <!-- latin small letter a with ring above
+ = latin small letter a ring,
+ U+00E5 ISOlat1 -->
+<!ENTITY aelig "&#230;"> <!-- latin small letter ae
+ = latin small ligature ae, U+00E6 ISOlat1 -->
+<!ENTITY ccedil "&#231;"> <!-- latin small letter c with cedilla,
+ U+00E7 ISOlat1 -->
+<!ENTITY egrave "&#232;"> <!-- latin small letter e with grave,
+ U+00E8 ISOlat1 -->
+<!ENTITY eacute "&#233;"> <!-- latin small letter e with acute,
+ U+00E9 ISOlat1 -->
+<!ENTITY ecirc "&#234;"> <!-- latin small letter e with circumflex,
+ U+00EA ISOlat1 -->
+<!ENTITY euml "&#235;"> <!-- latin small letter e with diaeresis,
+ U+00EB ISOlat1 -->
+<!ENTITY igrave "&#236;"> <!-- latin small letter i with grave,
+ U+00EC ISOlat1 -->
+<!ENTITY iacute "&#237;"> <!-- latin small letter i with acute,
+ U+00ED ISOlat1 -->
+<!ENTITY icirc "&#238;"> <!-- latin small letter i with circumflex,
+ U+00EE ISOlat1 -->
+<!ENTITY iuml "&#239;"> <!-- latin small letter i with diaeresis,
+ U+00EF ISOlat1 -->
+<!ENTITY eth "&#240;"> <!-- latin small letter eth, U+00F0 ISOlat1 -->
+<!ENTITY ntilde "&#241;"> <!-- latin small letter n with tilde,
+ U+00F1 ISOlat1 -->
+<!ENTITY ograve "&#242;"> <!-- latin small letter o with grave,
+ U+00F2 ISOlat1 -->
+<!ENTITY oacute "&#243;"> <!-- latin small letter o with acute,
+ U+00F3 ISOlat1 -->
+<!ENTITY ocirc "&#244;"> <!-- latin small letter o with circumflex,
+ U+00F4 ISOlat1 -->
+<!ENTITY otilde "&#245;"> <!-- latin small letter o with tilde,
+ U+00F5 ISOlat1 -->
+<!ENTITY ouml "&#246;"> <!-- latin small letter o with diaeresis,
+ U+00F6 ISOlat1 -->
+<!ENTITY divide "&#247;"> <!-- division sign, U+00F7 ISOnum -->
+<!ENTITY oslash "&#248;"> <!-- latin small letter o with stroke,
+ = latin small letter o slash,
+ U+00F8 ISOlat1 -->
+<!ENTITY ugrave "&#249;"> <!-- latin small letter u with grave,
+ U+00F9 ISOlat1 -->
+<!ENTITY uacute "&#250;"> <!-- latin small letter u with acute,
+ U+00FA ISOlat1 -->
+<!ENTITY ucirc "&#251;"> <!-- latin small letter u with circumflex,
+ U+00FB ISOlat1 -->
+<!ENTITY uuml "&#252;"> <!-- latin small letter u with diaeresis,
+ U+00FC ISOlat1 -->
+<!ENTITY yacute "&#253;"> <!-- latin small letter y with acute,
+ U+00FD ISOlat1 -->
+<!ENTITY thorn "&#254;"> <!-- latin small letter thorn,
+ U+00FE ISOlat1 -->
+<!ENTITY yuml "&#255;"> <!-- latin small letter y with diaeresis,
+ U+00FF ISOlat1 -->
diff --git a/testing/dtd/xhtml-special.ent b/testing/dtd/xhtml-special.ent
new file mode 100755
index 0000000..ca358b2
--- /dev/null
+++ b/testing/dtd/xhtml-special.ent
@@ -0,0 +1,80 @@
+<!-- Special characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent">
+ %HTMLspecial;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+ New names (i.e., not in ISO 8879 list) do not clash with any
+ existing ISO 8879 entity names. ISO 10646 character numbers
+ are given for each character, in hex. values are decimal
+ conversions of the ISO 10646 values and refer to the document
+ character set. Names are Unicode names.
+-->
+
+<!-- C0 Controls and Basic Latin -->
+<!ENTITY quot "&#34;"> <!-- quotation mark, U+0022 ISOnum -->
+<!ENTITY amp "&#38;#38;"> <!-- ampersand, U+0026 ISOnum -->
+<!ENTITY lt "&#38;#60;"> <!-- less-than sign, U+003C ISOnum -->
+<!ENTITY gt "&#62;"> <!-- greater-than sign, U+003E ISOnum -->
+<!ENTITY apos "&#39;"> <!-- apostrophe = APL quote, U+0027 ISOnum -->
+
+<!-- Latin Extended-A -->
+<!ENTITY OElig "&#338;"> <!-- latin capital ligature OE,
+ U+0152 ISOlat2 -->
+<!ENTITY oelig "&#339;"> <!-- latin small ligature oe, U+0153 ISOlat2 -->
+<!-- ligature is a misnomer, this is a separate character in some languages -->
+<!ENTITY Scaron "&#352;"> <!-- latin capital letter S with caron,
+ U+0160 ISOlat2 -->
+<!ENTITY scaron "&#353;"> <!-- latin small letter s with caron,
+ U+0161 ISOlat2 -->
+<!ENTITY Yuml "&#376;"> <!-- latin capital letter Y with diaeresis,
+ U+0178 ISOlat2 -->
+
+<!-- Spacing Modifier Letters -->
+<!ENTITY circ "&#710;"> <!-- modifier letter circumflex accent,
+ U+02C6 ISOpub -->
+<!ENTITY tilde "&#732;"> <!-- small tilde, U+02DC ISOdia -->
+
+<!-- General Punctuation -->
+<!ENTITY ensp "&#8194;"> <!-- en space, U+2002 ISOpub -->
+<!ENTITY emsp "&#8195;"> <!-- em space, U+2003 ISOpub -->
+<!ENTITY thinsp "&#8201;"> <!-- thin space, U+2009 ISOpub -->
+<!ENTITY zwnj "&#8204;"> <!-- zero width non-joiner,
+ U+200C NEW RFC 2070 -->
+<!ENTITY zwj "&#8205;"> <!-- zero width joiner, U+200D NEW RFC 2070 -->
+<!ENTITY lrm "&#8206;"> <!-- left-to-right mark, U+200E NEW RFC 2070 -->
+<!ENTITY rlm "&#8207;"> <!-- right-to-left mark, U+200F NEW RFC 2070 -->
+<!ENTITY ndash "&#8211;"> <!-- en dash, U+2013 ISOpub -->
+<!ENTITY mdash "&#8212;"> <!-- em dash, U+2014 ISOpub -->
+<!ENTITY lsquo "&#8216;"> <!-- left single quotation mark,
+ U+2018 ISOnum -->
+<!ENTITY rsquo "&#8217;"> <!-- right single quotation mark,
+ U+2019 ISOnum -->
+<!ENTITY sbquo "&#8218;"> <!-- single low-9 quotation mark, U+201A NEW -->
+<!ENTITY ldquo "&#8220;"> <!-- left double quotation mark,
+ U+201C ISOnum -->
+<!ENTITY rdquo "&#8221;"> <!-- right double quotation mark,
+ U+201D ISOnum -->
+<!ENTITY bdquo "&#8222;"> <!-- double low-9 quotation mark, U+201E NEW -->
+<!ENTITY dagger "&#8224;"> <!-- dagger, U+2020 ISOpub -->
+<!ENTITY Dagger "&#8225;"> <!-- double dagger, U+2021 ISOpub -->
+<!ENTITY permil "&#8240;"> <!-- per mille sign, U+2030 ISOtech -->
+<!ENTITY lsaquo "&#8249;"> <!-- single left-pointing angle quotation mark,
+ U+2039 ISO proposed -->
+<!-- lsaquo is proposed but not yet ISO standardized -->
+<!ENTITY rsaquo "&#8250;"> <!-- single right-pointing angle quotation mark,
+ U+203A ISO proposed -->
+<!-- rsaquo is proposed but not yet ISO standardized -->
+
+<!-- Currency Symbols -->
+<!ENTITY euro "&#8364;"> <!-- euro sign, U+20AC NEW -->
diff --git a/testing/dtd/xhtml-symbol.ent b/testing/dtd/xhtml-symbol.ent
new file mode 100755
index 0000000..63c2abf
--- /dev/null
+++ b/testing/dtd/xhtml-symbol.ent
@@ -0,0 +1,237 @@
+<!-- Mathematical, Greek and Symbolic characters for XHTML -->
+
+<!-- Character entity set. Typical invocation:
+ <!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent">
+ %HTMLsymbol;
+-->
+
+<!-- Portions (C) International Organization for Standardization 1986:
+ Permission to copy in any form is granted for use with
+ conforming SGML systems and applications as defined in
+ ISO 8879, provided this notice is included in all copies.
+-->
+
+<!-- Relevant ISO entity set is given unless names are newly introduced.
+ New names (i.e., not in ISO 8879 list) do not clash with any
+ existing ISO 8879 entity names. ISO 10646 character numbers
+ are given for each character, in hex. values are decimal
+ conversions of the ISO 10646 values and refer to the document
+ character set. Names are Unicode names.
+-->
+
+<!-- Latin Extended-B -->
+<!ENTITY fnof "&#402;"> <!-- latin small letter f with hook = function
+ = florin, U+0192 ISOtech -->
+
+<!-- Greek -->
+<!ENTITY Alpha "&#913;"> <!-- greek capital letter alpha, U+0391 -->
+<!ENTITY Beta "&#914;"> <!-- greek capital letter beta, U+0392 -->
+<!ENTITY Gamma "&#915;"> <!-- greek capital letter gamma,
+ U+0393 ISOgrk3 -->
+<!ENTITY Delta "&#916;"> <!-- greek capital letter delta,
+ U+0394 ISOgrk3 -->
+<!ENTITY Epsilon "&#917;"> <!-- greek capital letter epsilon, U+0395 -->
+<!ENTITY Zeta "&#918;"> <!-- greek capital letter zeta, U+0396 -->
+<!ENTITY Eta "&#919;"> <!-- greek capital letter eta, U+0397 -->
+<!ENTITY Theta "&#920;"> <!-- greek capital letter theta,
+ U+0398 ISOgrk3 -->
+<!ENTITY Iota "&#921;"> <!-- greek capital letter iota, U+0399 -->
+<!ENTITY Kappa "&#922;"> <!-- greek capital letter kappa, U+039A -->
+<!ENTITY Lambda "&#923;"> <!-- greek capital letter lamda,
+ U+039B ISOgrk3 -->
+<!ENTITY Mu "&#924;"> <!-- greek capital letter mu, U+039C -->
+<!ENTITY Nu "&#925;"> <!-- greek capital letter nu, U+039D -->
+<!ENTITY Xi "&#926;"> <!-- greek capital letter xi, U+039E ISOgrk3 -->
+<!ENTITY Omicron "&#927;"> <!-- greek capital letter omicron, U+039F -->
+<!ENTITY Pi "&#928;"> <!-- greek capital letter pi, U+03A0 ISOgrk3 -->
+<!ENTITY Rho "&#929;"> <!-- greek capital letter rho, U+03A1 -->
+<!-- there is no Sigmaf, and no U+03A2 character either -->
+<!ENTITY Sigma "&#931;"> <!-- greek capital letter sigma,
+ U+03A3 ISOgrk3 -->
+<!ENTITY Tau "&#932;"> <!-- greek capital letter tau, U+03A4 -->
+<!ENTITY Upsilon "&#933;"> <!-- greek capital letter upsilon,
+ U+03A5 ISOgrk3 -->
+<!ENTITY Phi "&#934;"> <!-- greek capital letter phi,
+ U+03A6 ISOgrk3 -->
+<!ENTITY Chi "&#935;"> <!-- greek capital letter chi, U+03A7 -->
+<!ENTITY Psi "&#936;"> <!-- greek capital letter psi,
+ U+03A8 ISOgrk3 -->
+<!ENTITY Omega "&#937;"> <!-- greek capital letter omega,
+ U+03A9 ISOgrk3 -->
+
+<!ENTITY alpha "&#945;"> <!-- greek small letter alpha,
+ U+03B1 ISOgrk3 -->
+<!ENTITY beta "&#946;"> <!-- greek small letter beta, U+03B2 ISOgrk3 -->
+<!ENTITY gamma "&#947;"> <!-- greek small letter gamma,
+ U+03B3 ISOgrk3 -->
+<!ENTITY delta "&#948;"> <!-- greek small letter delta,
+ U+03B4 ISOgrk3 -->
+<!ENTITY epsilon "&#949;"> <!-- greek small letter epsilon,
+ U+03B5 ISOgrk3 -->
+<!ENTITY zeta "&#950;"> <!-- greek small letter zeta, U+03B6 ISOgrk3 -->
+<!ENTITY eta "&#951;"> <!-- greek small letter eta, U+03B7 ISOgrk3 -->
+<!ENTITY theta "&#952;"> <!-- greek small letter theta,
+ U+03B8 ISOgrk3 -->
+<!ENTITY iota "&#953;"> <!-- greek small letter iota, U+03B9 ISOgrk3 -->
+<!ENTITY kappa "&#954;"> <!-- greek small letter kappa,
+ U+03BA ISOgrk3 -->
+<!ENTITY lambda "&#955;"> <!-- greek small letter lamda,
+ U+03BB ISOgrk3 -->
+<!ENTITY mu "&#956;"> <!-- greek small letter mu, U+03BC ISOgrk3 -->
+<!ENTITY nu "&#957;"> <!-- greek small letter nu, U+03BD ISOgrk3 -->
+<!ENTITY xi "&#958;"> <!-- greek small letter xi, U+03BE ISOgrk3 -->
+<!ENTITY omicron "&#959;"> <!-- greek small letter omicron, U+03BF NEW -->
+<!ENTITY pi "&#960;"> <!-- greek small letter pi, U+03C0 ISOgrk3 -->
+<!ENTITY rho "&#961;"> <!-- greek small letter rho, U+03C1 ISOgrk3 -->
+<!ENTITY sigmaf "&#962;"> <!-- greek small letter final sigma,
+ U+03C2 ISOgrk3 -->
+<!ENTITY sigma "&#963;"> <!-- greek small letter sigma,
+ U+03C3 ISOgrk3 -->
+<!ENTITY tau "&#964;"> <!-- greek small letter tau, U+03C4 ISOgrk3 -->
+<!ENTITY upsilon "&#965;"> <!-- greek small letter upsilon,
+ U+03C5 ISOgrk3 -->
+<!ENTITY phi "&#966;"> <!-- greek small letter phi, U+03C6 ISOgrk3 -->
+<!ENTITY chi "&#967;"> <!-- greek small letter chi, U+03C7 ISOgrk3 -->
+<!ENTITY psi "&#968;"> <!-- greek small letter psi, U+03C8 ISOgrk3 -->
+<!ENTITY omega "&#969;"> <!-- greek small letter omega,
+ U+03C9 ISOgrk3 -->
+<!ENTITY thetasym "&#977;"> <!-- greek theta symbol,
+ U+03D1 NEW -->
+<!ENTITY upsih "&#978;"> <!-- greek upsilon with hook symbol,
+ U+03D2 NEW -->
+<!ENTITY piv "&#982;"> <!-- greek pi symbol, U+03D6 ISOgrk3 -->
+
+<!-- General Punctuation -->
+<!ENTITY bull "&#8226;"> <!-- bullet = black small circle,
+ U+2022 ISOpub -->
+<!-- bullet is NOT the same as bullet operator, U+2219 -->
+<!ENTITY hellip "&#8230;"> <!-- horizontal ellipsis = three dot leader,
+ U+2026 ISOpub -->
+<!ENTITY prime "&#8242;"> <!-- prime = minutes = feet, U+2032 ISOtech -->
+<!ENTITY Prime "&#8243;"> <!-- double prime = seconds = inches,
+ U+2033 ISOtech -->
+<!ENTITY oline "&#8254;"> <!-- overline = spacing overscore,
+ U+203E NEW -->
+<!ENTITY frasl "&#8260;"> <!-- fraction slash, U+2044 NEW -->
+
+<!-- Letterlike Symbols -->
+<!ENTITY weierp "&#8472;"> <!-- script capital P = power set
+ = Weierstrass p, U+2118 ISOamso -->
+<!ENTITY image "&#8465;"> <!-- black-letter capital I = imaginary part,
+ U+2111 ISOamso -->
+<!ENTITY real "&#8476;"> <!-- black-letter capital R = real part symbol,
+ U+211C ISOamso -->
+<!ENTITY trade "&#8482;"> <!-- trade mark sign, U+2122 ISOnum -->
+<!ENTITY alefsym "&#8501;"> <!-- alef symbol = first transfinite cardinal,
+ U+2135 NEW -->
+<!-- alef symbol is NOT the same as hebrew letter alef,
+ U+05D0 although the same glyph could be used to depict both characters -->
+
+<!-- Arrows -->
+<!ENTITY larr "&#8592;"> <!-- leftwards arrow, U+2190 ISOnum -->
+<!ENTITY uarr "&#8593;"> <!-- upwards arrow, U+2191 ISOnum-->
+<!ENTITY rarr "&#8594;"> <!-- rightwards arrow, U+2192 ISOnum -->
+<!ENTITY darr "&#8595;"> <!-- downwards arrow, U+2193 ISOnum -->
+<!ENTITY harr "&#8596;"> <!-- left right arrow, U+2194 ISOamsa -->
+<!ENTITY crarr "&#8629;"> <!-- downwards arrow with corner leftwards
+ = carriage return, U+21B5 NEW -->
+<!ENTITY lArr "&#8656;"> <!-- leftwards double arrow, U+21D0 ISOtech -->
+<!-- Unicode does not say that lArr is the same as the 'is implied by' arrow
+ but also does not have any other character for that function. So lArr can
+ be used for 'is implied by' as ISOtech suggests -->
+<!ENTITY uArr "&#8657;"> <!-- upwards double arrow, U+21D1 ISOamsa -->
+<!ENTITY rArr "&#8658;"> <!-- rightwards double arrow,
+ U+21D2 ISOtech -->
+<!-- Unicode does not say this is the 'implies' character but does not have
+ another character with this function so rArr can be used for 'implies'
+ as ISOtech suggests -->
+<!ENTITY dArr "&#8659;"> <!-- downwards double arrow, U+21D3 ISOamsa -->
+<!ENTITY hArr "&#8660;"> <!-- left right double arrow,
+ U+21D4 ISOamsa -->
+
+<!-- Mathematical Operators -->
+<!ENTITY forall "&#8704;"> <!-- for all, U+2200 ISOtech -->
+<!ENTITY part "&#8706;"> <!-- partial differential, U+2202 ISOtech -->
+<!ENTITY exist "&#8707;"> <!-- there exists, U+2203 ISOtech -->
+<!ENTITY empty "&#8709;"> <!-- empty set = null set, U+2205 ISOamso -->
+<!ENTITY nabla "&#8711;"> <!-- nabla = backward difference,
+ U+2207 ISOtech -->
+<!ENTITY isin "&#8712;"> <!-- element of, U+2208 ISOtech -->
+<!ENTITY notin "&#8713;"> <!-- not an element of, U+2209 ISOtech -->
+<!ENTITY ni "&#8715;"> <!-- contains as member, U+220B ISOtech -->
+<!ENTITY prod "&#8719;"> <!-- n-ary product = product sign,
+ U+220F ISOamsb -->
+<!-- prod is NOT the same character as U+03A0 'greek capital letter pi' though
+ the same glyph might be used for both -->
+<!ENTITY sum "&#8721;"> <!-- n-ary summation, U+2211 ISOamsb -->
+<!-- sum is NOT the same character as U+03A3 'greek capital letter sigma'
+ though the same glyph might be used for both -->
+<!ENTITY minus "&#8722;"> <!-- minus sign, U+2212 ISOtech -->
+<!ENTITY lowast "&#8727;"> <!-- asterisk operator, U+2217 ISOtech -->
+<!ENTITY radic "&#8730;"> <!-- square root = radical sign,
+ U+221A ISOtech -->
+<!ENTITY prop "&#8733;"> <!-- proportional to, U+221D ISOtech -->
+<!ENTITY infin "&#8734;"> <!-- infinity, U+221E ISOtech -->
+<!ENTITY ang "&#8736;"> <!-- angle, U+2220 ISOamso -->
+<!ENTITY and "&#8743;"> <!-- logical and = wedge, U+2227 ISOtech -->
+<!ENTITY or "&#8744;"> <!-- logical or = vee, U+2228 ISOtech -->
+<!ENTITY cap "&#8745;"> <!-- intersection = cap, U+2229 ISOtech -->
+<!ENTITY cup "&#8746;"> <!-- union = cup, U+222A ISOtech -->
+<!ENTITY int "&#8747;"> <!-- integral, U+222B ISOtech -->
+<!ENTITY there4 "&#8756;"> <!-- therefore, U+2234 ISOtech -->
+<!ENTITY sim "&#8764;"> <!-- tilde operator = varies with = similar to,
+ U+223C ISOtech -->
+<!-- tilde operator is NOT the same character as the tilde, U+007E,
+ although the same glyph might be used to represent both -->
+<!ENTITY cong "&#8773;"> <!-- approximately equal to, U+2245 ISOtech -->
+<!ENTITY asymp "&#8776;"> <!-- almost equal to = asymptotic to,
+ U+2248 ISOamsr -->
+<!ENTITY ne "&#8800;"> <!-- not equal to, U+2260 ISOtech -->
+<!ENTITY equiv "&#8801;"> <!-- identical to, U+2261 ISOtech -->
+<!ENTITY le "&#8804;"> <!-- less-than or equal to, U+2264 ISOtech -->
+<!ENTITY ge "&#8805;"> <!-- greater-than or equal to,
+ U+2265 ISOtech -->
+<!ENTITY sub "&#8834;"> <!-- subset of, U+2282 ISOtech -->
+<!ENTITY sup "&#8835;"> <!-- superset of, U+2283 ISOtech -->
+<!ENTITY nsub "&#8836;"> <!-- not a subset of, U+2284 ISOamsn -->
+<!ENTITY sube "&#8838;"> <!-- subset of or equal to, U+2286 ISOtech -->
+<!ENTITY supe "&#8839;"> <!-- superset of or equal to,
+ U+2287 ISOtech -->
+<!ENTITY oplus "&#8853;"> <!-- circled plus = direct sum,
+ U+2295 ISOamsb -->
+<!ENTITY otimes "&#8855;"> <!-- circled times = vector product,
+ U+2297 ISOamsb -->
+<!ENTITY perp "&#8869;"> <!-- up tack = orthogonal to = perpendicular,
+ U+22A5 ISOtech -->
+<!ENTITY sdot "&#8901;"> <!-- dot operator, U+22C5 ISOamsb -->
+<!-- dot operator is NOT the same character as U+00B7 middle dot -->
+
+<!-- Miscellaneous Technical -->
+<!ENTITY lceil "&#8968;"> <!-- left ceiling = APL upstile,
+ U+2308 ISOamsc -->
+<!ENTITY rceil "&#8969;"> <!-- right ceiling, U+2309 ISOamsc -->
+<!ENTITY lfloor "&#8970;"> <!-- left floor = APL downstile,
+ U+230A ISOamsc -->
+<!ENTITY rfloor "&#8971;"> <!-- right floor, U+230B ISOamsc -->
+<!ENTITY lang "&#9001;"> <!-- left-pointing angle bracket = bra,
+ U+2329 ISOtech -->
+<!-- lang is NOT the same character as U+003C 'less than sign'
+ or U+2039 'single left-pointing angle quotation mark' -->
+<!ENTITY rang "&#9002;"> <!-- right-pointing angle bracket = ket,
+ U+232A ISOtech -->
+<!-- rang is NOT the same character as U+003E 'greater than sign'
+ or U+203A 'single right-pointing angle quotation mark' -->
+
+<!-- Geometric Shapes -->
+<!ENTITY loz "&#9674;"> <!-- lozenge, U+25CA ISOpub -->
+
+<!-- Miscellaneous Symbols -->
+<!ENTITY spades "&#9824;"> <!-- black spade suit, U+2660 ISOpub -->
+<!-- black here seems to mean filled as opposed to hollow -->
+<!ENTITY clubs "&#9827;"> <!-- black club suit = shamrock,
+ U+2663 ISOpub -->
+<!ENTITY hearts "&#9829;"> <!-- black heart suit = valentine,
+ U+2665 ISOpub -->
+<!ENTITY diams "&#9830;"> <!-- black diamond suit, U+2666 ISOpub -->
diff --git a/testing/dtd/xhtml1-strict.dtd b/testing/dtd/xhtml1-strict.dtd
new file mode 100755
index 0000000..2927b9e
--- /dev/null
+++ b/testing/dtd/xhtml1-strict.dtd
@@ -0,0 +1,978 @@
+<!--
+ Extensible HTML version 1.0 Strict DTD
+
+ This is the same as HTML 4 Strict except for
+ changes due to the differences between XML and SGML.
+
+ Namespace = http://www.w3.org/1999/xhtml
+
+ For further information, see: http://www.w3.org/TR/xhtml1
+
+ Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+ All Rights Reserved.
+
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+
+ $Revision: 1.1 $
+ $Date: 2002/08/01 13:56:03 $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+ <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+ <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+ <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+ <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+ <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+ <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+ <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+ <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+ <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+ <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+ <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+ <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+ <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+ <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+ <!-- used for titles etc. -->
+
+<!ENTITY % Length "CDATA">
+ <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+ <!-- pixel, percentage, or relative -->
+
+<!ENTITY % Pixels "CDATA">
+ <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+ <!-- comma separated list of lengths -->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+ id document-wide unique id
+ class space separated list of classes
+ style associated style info
+ title advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id ID #IMPLIED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED"
+ >
+
+<!-- internationalization attributes
+ lang language code (backwards compatible)
+ xml:lang language code (as per XML 1.0 spec)
+ dir direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #IMPLIED"
+ >
+
+<!-- attributes for common UI events
+ onclick a pointer button was clicked
+ ondblclick a pointer button was double clicked
+ onmousedown a pointer button was pressed down
+ onmouseup a pointer button was released
+ onmousemove a pointer was moved onto the element
+ onmouseout a pointer was moved away from the element
+ onkeypress a key was pressed and released
+ onkeydown a key was pressed down
+ onkeyup a key was released
+-->
+<!ENTITY % events
+ "onclick %Script; #IMPLIED
+ ondblclick %Script; #IMPLIED
+ onmousedown %Script; #IMPLIED
+ onmouseup %Script; #IMPLIED
+ onmouseover %Script; #IMPLIED
+ onmousemove %Script; #IMPLIED
+ onmouseout %Script; #IMPLIED
+ onkeypress %Script; #IMPLIED
+ onkeydown %Script; #IMPLIED
+ onkeyup %Script; #IMPLIED"
+ >
+
+<!-- attributes for elements that can get the focus
+ accesskey accessibility key character
+ tabindex position in tabbing order
+ onfocus the element got the focus
+ onblur the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey %Character; #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED"
+ >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.pre
+ "br | span | bdo | map">
+
+
+<!ENTITY % special
+ "%special.pre; | object | img ">
+
+<!ENTITY % fontstyle "tt | i | b | big | small ">
+
+<!ENTITY % phrase "em | strong | dfn | code | q |
+ samp | kbd | var | cite | abbr | acronym | sub | sup ">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl">
+<!ENTITY % blocktext "pre | hr | blockquote | address">
+
+<!ENTITY % block
+ "p | %heading; | div | %lists; | %blocktext; | fieldset | table">
+
+<!ENTITY % Block "(%block; | form | %misc;)*">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+ "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding big, small, sup or sup -->
+
+<!ENTITY % pre.content
+ "(#PCDATA | a | %fontstyle; | %phrase; | %special.pre; | %misc.inline;
+ | %inline.forms;)*">
+
+<!-- form uses %Block; excluding form -->
+
+<!ENTITY % form.content "(%block; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form and form controls -->
+
+<!ENTITY % button.content
+ "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+ table | %special; | %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+ %i18n;
+ id ID #IMPLIED
+ xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
+ >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object)*">
+
+<!-- content model is %head.misc; combined with a single
+ title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+ ((title, %head.misc;, (base, %head.misc;)?) |
+ (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+ %i18n;
+ id ID #IMPLIED
+ profile %URI; #IMPLIED
+ >
+
+<!-- The title element is not considered part of the flow of text.
+ It should be displayed, for example as the page header or
+ window title. Exactly one title is required per document.
+ -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title
+ %i18n;
+ id ID #IMPLIED
+ >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+ href %URI; #REQUIRED
+ id ID #IMPLIED
+ >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ %i18n;
+ id ID #IMPLIED
+ http-equiv CDATA #IMPLIED
+ name CDATA #IMPLIED
+ content CDATA #REQUIRED
+ scheme CDATA #IMPLIED
+ >
+
+<!--
+ Relationship values can be used in principle:
+
+ a) for document specific toolbars/menus when used
+ with the link element in document head e.g.
+ start, contents, previous, next, index, end, help
+ b) to link to a separate style sheet (rel="stylesheet")
+ c) to make a link to a script (rel="script")
+ d) by stylesheets to control how collections of
+ html nodes are rendered into printed documents
+ e) to make a link to a printable version of this document
+ e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+ %attrs;
+ charset %Charset; #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ type %ContentType; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ media %MediaDesc; #IMPLIED
+ >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+ %i18n;
+ id ID #IMPLIED
+ type %ContentType; #REQUIRED
+ media %MediaDesc; #IMPLIED
+ title %Text; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ id ID #IMPLIED
+ charset %Charset; #IMPLIED
+ type %ContentType; #REQUIRED
+ src %URI; #IMPLIED
+ defer (defer) #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Block;>
+<!ATTLIST noscript
+ %attrs;
+ >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Block;>
+<!ATTLIST body
+ %attrs;
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ >
+
+<!ELEMENT div %Flow;> <!-- generic language/style container -->
+<!ATTLIST div
+ %attrs;
+ >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+ %attrs;
+ >
+
+<!--=================== Headings =========================================-->
+
+<!--
+ There are six levels of headings from h1 (the most important)
+ to h6 (the least important).
+-->
+
+<!ELEMENT h1 %Inline;>
+<!ATTLIST h1
+ %attrs;
+ >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+ %attrs;
+ >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+ %attrs;
+ >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+ %attrs;
+ >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+ %attrs;
+ >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+ %attrs;
+ >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+ %attrs;
+ >
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+ %attrs;
+ >
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+ %attrs;
+ >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+ %attrs;
+ >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+ %attrs;
+ >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+ %attrs;
+ >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address %Inline;>
+<!ATTLIST address
+ %attrs;
+ >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+ %attrs;
+ >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding "img|object|big|small|sub|sup" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+ %attrs;
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Block;>
+<!ATTLIST blockquote
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+ ins/del are allowed in block and inline content, but its
+ inappropriate to include block content within an ins element
+ occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+ %attrs;
+ %focus;
+ charset %Charset; #IMPLIED
+ type %ContentType; #IMPLIED
+ name NMTOKEN #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+ %attrs;
+ >
+
+<!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+ %coreattrs;
+ %events;
+ lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #REQUIRED
+ >
+
+<!ELEMENT br EMPTY> <!-- forced line break -->
+<!ATTLIST br
+ %coreattrs;
+ >
+
+<!ELEMENT em %Inline;> <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;> <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;> <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;> <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;> <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;> <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;> <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;> <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;> <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;> <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;> <!-- inlined quote -->
+<!ATTLIST q
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;> <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;> <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;> <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;> <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;> <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!--==================== Object ======================================-->
+<!--
+ object is used to embed objects as part of HTML pages.
+ param elements should precede other content. Parameters
+ can also be expressed as attribute/value pairs on the
+ object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+ %attrs;
+ declare (declare) #IMPLIED
+ classid %URI; #IMPLIED
+ codebase %URI; #IMPLIED
+ data %URI; #IMPLIED
+ type %ContentType; #IMPLIED
+ codetype %ContentType; #IMPLIED
+ archive %UriList; #IMPLIED
+ standby %Text; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ tabindex %Number; #IMPLIED
+ >
+
+<!--
+ param is used to supply a named property value.
+ In XML it would seem natural to follow RDF and support an
+ abbreviated syntax where the param elements are replaced
+ by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ id ID #IMPLIED
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ valuetype (data|ref|object) "data"
+ type %ContentType; #IMPLIED
+ >
+
+<!--=================== Images ===========================================-->
+
+<!--
+ To avoid accessibility problems for people who aren't
+ able to see the image, you should provide a text
+ description using the alt and longdesc attributes.
+ In addition, avoid the use of server-side image maps.
+ Note that in this DTD there is no name attribute. That
+ is only available in the transitional and frameset DTD.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+ %attrs;
+ src %URI; #REQUIRED
+ alt %Text; #REQUIRED
+ longdesc %URI; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ ismap (ismap) #IMPLIED
+ >
+
+<!-- usemap points to a map element which may be in this document
+ or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+ separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+ %i18n;
+ %events;
+ id ID #REQUIRED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+ %attrs;
+ %focus;
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ href %URI; #IMPLIED
+ nohref (nohref) #IMPLIED
+ alt %Text; #REQUIRED
+ >
+
+<!--================ Forms ===============================================-->
+<!ELEMENT form %form.content;> <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+ %attrs;
+ action %URI; #REQUIRED
+ method (get|post) "get"
+ enctype %ContentType; "application/x-www-form-urlencoded"
+ onsubmit %Script; #IMPLIED
+ onreset %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ accept-charset %Charsets; #IMPLIED
+ >
+
+<!--
+ Each label must not contain more than ONE field
+ Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+ %attrs;
+ for IDREF #IMPLIED
+ accesskey %Character; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ >
+
+<!ENTITY % InputType
+ "(text | password | checkbox |
+ radio | submit | reset |
+ file | hidden | image | button)"
+ >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY> <!-- form control -->
+<!ATTLIST input
+ %attrs;
+ %focus;
+ type %InputType; "text"
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ checked (checked) #IMPLIED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ size CDATA #IMPLIED
+ maxlength %Number; #IMPLIED
+ src %URI; #IMPLIED
+ alt CDATA #IMPLIED
+ usemap %URI; #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ >
+
+<!ELEMENT select (optgroup|option)+> <!-- option selector -->
+<!ATTLIST select
+ %attrs;
+ name CDATA #IMPLIED
+ size %Number; #IMPLIED
+ multiple (multiple) #IMPLIED
+ disabled (disabled) #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!ELEMENT optgroup (option)+> <!-- option group -->
+<!ATTLIST optgroup
+ %attrs;
+ disabled (disabled) #IMPLIED
+ label %Text; #REQUIRED
+ >
+
+<!ELEMENT option (#PCDATA)> <!-- selectable choice -->
+<!ATTLIST option
+ %attrs;
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED
+ label %Text; #IMPLIED
+ value CDATA #IMPLIED
+ >
+
+<!ELEMENT textarea (#PCDATA)> <!-- multi-line text field -->
+<!ATTLIST textarea
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ rows %Number; #REQUIRED
+ cols %Number; #REQUIRED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!--
+ The fieldset element is used to group form fields.
+ Only one legend element should occur in the content
+ and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+ %attrs;
+ >
+
+<!ELEMENT legend %Inline;> <!-- fieldset label -->
+<!ATTLIST legend
+ %attrs;
+ accesskey %Character; #IMPLIED
+ >
+
+<!--
+ Content is %Flow; excluding a, form and form controls
+-->
+<!ELEMENT button %button.content;> <!-- push button -->
+<!ATTLIST button
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ type (button|submit|reset) "submit"
+ disabled (disabled) #IMPLIED
+ >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+ "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+
+<!-- horizontal alignment attributes for cell contents
+
+ char alignment char, e.g. char=':'
+ charoff offset for alignment char
+-->
+<!ENTITY % cellhalign
+ "align (left|center|right|justify|char) #IMPLIED
+ char %Character; #IMPLIED
+ charoff %Length; #IMPLIED"
+ >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+ "valign (top|middle|bottom|baseline) #IMPLIED"
+ >
+
+<!ELEMENT table
+ (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption %Inline;>
+<!ELEMENT thead (tr)+>
+<!ELEMENT tfoot (tr)+>
+<!ELEMENT tbody (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col EMPTY>
+<!ELEMENT tr (th|td)+>
+<!ELEMENT th %Flow;>
+<!ELEMENT td %Flow;>
+
+<!ATTLIST table
+ %attrs;
+ summary %Text; #IMPLIED
+ width %Length; #IMPLIED
+ border %Pixels; #IMPLIED
+ frame %TFrame; #IMPLIED
+ rules %TRules; #IMPLIED
+ cellspacing %Length; #IMPLIED
+ cellpadding %Length; #IMPLIED
+ >
+
+<!ATTLIST caption
+ %attrs;
+ >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ Use thead to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ tbody sections are rendered in scrolling panel.
+
+ Use tfoot to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ tbody sections are rendered in scrolling panel.
+
+ Use multiple tbody sections when rules are needed
+ between groups of table rows.
+-->
+<!ATTLIST thead
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tfoot
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tbody
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tr
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST td
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ >
+
diff --git a/testing/dtd/xhtml1-transitional.dtd b/testing/dtd/xhtml1-transitional.dtd
new file mode 100755
index 0000000..628f27a
--- /dev/null
+++ b/testing/dtd/xhtml1-transitional.dtd
@@ -0,0 +1,1201 @@
+<!--
+ Extensible HTML version 1.0 Transitional DTD
+
+ This is the same as HTML 4 Transitional except for
+ changes due to the differences between XML and SGML.
+
+ Namespace = http://www.w3.org/1999/xhtml
+
+ For further information, see: http://www.w3.org/TR/xhtml1
+
+ Copyright (c) 1998-2002 W3C (MIT, INRIA, Keio),
+ All Rights Reserved.
+
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
+
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ SYSTEM "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
+
+ $Revision: 1.2 $
+ $Date: 2002/08/01 18:37:55 $
+
+-->
+
+<!--================ Character mnemonic entities =========================-->
+
+<!ENTITY % HTMLlat1 PUBLIC
+ "-//W3C//ENTITIES Latin 1 for XHTML//EN"
+ "xhtml-lat1.ent">
+%HTMLlat1;
+
+<!ENTITY % HTMLsymbol PUBLIC
+ "-//W3C//ENTITIES Symbols for XHTML//EN"
+ "xhtml-symbol.ent">
+%HTMLsymbol;
+
+<!ENTITY % HTMLspecial PUBLIC
+ "-//W3C//ENTITIES Special for XHTML//EN"
+ "xhtml-special.ent">
+%HTMLspecial;
+
+<!--================== Imported Names ====================================-->
+
+<!ENTITY % ContentType "CDATA">
+ <!-- media type, as per [RFC2045] -->
+
+<!ENTITY % ContentTypes "CDATA">
+ <!-- comma-separated list of media types, as per [RFC2045] -->
+
+<!ENTITY % Charset "CDATA">
+ <!-- a character encoding, as per [RFC2045] -->
+
+<!ENTITY % Charsets "CDATA">
+ <!-- a space separated list of character encodings, as per [RFC2045] -->
+
+<!ENTITY % LanguageCode "NMTOKEN">
+ <!-- a language code, as per [RFC3066] -->
+
+<!ENTITY % Character "CDATA">
+ <!-- a single character, as per section 2.2 of [XML] -->
+
+<!ENTITY % Number "CDATA">
+ <!-- one or more digits -->
+
+<!ENTITY % LinkTypes "CDATA">
+ <!-- space-separated list of link types -->
+
+<!ENTITY % MediaDesc "CDATA">
+ <!-- single or comma-separated list of media descriptors -->
+
+<!ENTITY % URI "CDATA">
+ <!-- a Uniform Resource Identifier, see [RFC2396] -->
+
+<!ENTITY % UriList "CDATA">
+ <!-- a space separated list of Uniform Resource Identifiers -->
+
+<!ENTITY % Datetime "CDATA">
+ <!-- date and time information. ISO date format -->
+
+<!ENTITY % Script "CDATA">
+ <!-- script expression -->
+
+<!ENTITY % StyleSheet "CDATA">
+ <!-- style sheet data -->
+
+<!ENTITY % Text "CDATA">
+ <!-- used for titles etc. -->
+
+<!ENTITY % FrameTarget "NMTOKEN">
+ <!-- render in this frame -->
+
+<!ENTITY % Length "CDATA">
+ <!-- nn for pixels or nn% for percentage length -->
+
+<!ENTITY % MultiLength "CDATA">
+ <!-- pixel, percentage, or relative -->
+
+<!ENTITY % Pixels "CDATA">
+ <!-- integer representing length in pixels -->
+
+<!-- these are used for image maps -->
+
+<!ENTITY % Shape "(rect|circle|poly|default)">
+
+<!ENTITY % Coords "CDATA">
+ <!-- comma separated list of lengths -->
+
+<!-- used for object, applet, img, input and iframe -->
+<!ENTITY % ImgAlign "(top|middle|bottom|left|right)">
+
+<!-- a color using sRGB: #RRGGBB as Hex values -->
+<!ENTITY % Color "CDATA">
+
+<!-- There are also 16 widely known color names with their sRGB values:
+
+ Black = #000000 Green = #008000
+ Silver = #C0C0C0 Lime = #00FF00
+ Gray = #808080 Olive = #808000
+ White = #FFFFFF Yellow = #FFFF00
+ Maroon = #800000 Navy = #000080
+ Red = #FF0000 Blue = #0000FF
+ Purple = #800080 Teal = #008080
+ Fuchsia= #FF00FF Aqua = #00FFFF
+-->
+
+<!--=================== Generic Attributes ===============================-->
+
+<!-- core attributes common to most elements
+ id document-wide unique id
+ class space separated list of classes
+ style associated style info
+ title advisory title/amplification
+-->
+<!ENTITY % coreattrs
+ "id ID #IMPLIED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED"
+ >
+
+<!-- internationalization attributes
+ lang language code (backwards compatible)
+ xml:lang language code (as per XML 1.0 spec)
+ dir direction for weak/neutral text
+-->
+<!ENTITY % i18n
+ "lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #IMPLIED"
+ >
+
+<!-- attributes for common UI events
+ onclick a pointer button was clicked
+ ondblclick a pointer button was double clicked
+ onmousedown a pointer button was pressed down
+ onmouseup a pointer button was released
+ onmousemove a pointer was moved onto the element
+ onmouseout a pointer was moved away from the element
+ onkeypress a key was pressed and released
+ onkeydown a key was pressed down
+ onkeyup a key was released
+-->
+<!ENTITY % events
+ "onclick %Script; #IMPLIED
+ ondblclick %Script; #IMPLIED
+ onmousedown %Script; #IMPLIED
+ onmouseup %Script; #IMPLIED
+ onmouseover %Script; #IMPLIED
+ onmousemove %Script; #IMPLIED
+ onmouseout %Script; #IMPLIED
+ onkeypress %Script; #IMPLIED
+ onkeydown %Script; #IMPLIED
+ onkeyup %Script; #IMPLIED"
+ >
+
+<!-- attributes for elements that can get the focus
+ accesskey accessibility key character
+ tabindex position in tabbing order
+ onfocus the element got the focus
+ onblur the element lost the focus
+-->
+<!ENTITY % focus
+ "accesskey %Character; #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED"
+ >
+
+<!ENTITY % attrs "%coreattrs; %i18n; %events;">
+
+<!-- text alignment for p, div, h1-h6. The default is
+ align="left" for ltr headings, "right" for rtl -->
+
+<!ENTITY % TextAlign "align (left|center|right|justify) #IMPLIED">
+
+<!--=================== Text Elements ====================================-->
+
+<!ENTITY % special.extra
+ "object | applet | img | map | iframe">
+
+<!ENTITY % special.basic
+ "br | span | bdo">
+
+<!ENTITY % special
+ "%special.basic; | %special.extra;">
+
+<!ENTITY % fontstyle.extra "big | small | font | basefont">
+
+<!ENTITY % fontstyle.basic "tt | i | b | u
+ | s | strike ">
+
+<!ENTITY % fontstyle "%fontstyle.basic; | %fontstyle.extra;">
+
+<!ENTITY % phrase.extra "sub | sup">
+<!ENTITY % phrase.basic "em | strong | dfn | code | q |
+ samp | kbd | var | cite | abbr | acronym">
+
+<!ENTITY % phrase "%phrase.basic; | %phrase.extra;">
+
+<!ENTITY % inline.forms "input | select | textarea | label | button">
+
+<!-- these can occur at block or inline level -->
+<!ENTITY % misc.inline "ins | del | script">
+
+<!-- these can only occur at block level -->
+<!ENTITY % misc "noscript | %misc.inline;">
+
+<!ENTITY % inline "a | %special; | %fontstyle; | %phrase; | %inline.forms;">
+
+<!-- %Inline; covers inline or "text-level" elements -->
+<!ENTITY % Inline "(#PCDATA | %inline; | %misc.inline;)*">
+
+<!--================== Block level elements ==============================-->
+
+<!ENTITY % heading "h1|h2|h3|h4|h5|h6">
+<!ENTITY % lists "ul | ol | dl | menu | dir">
+<!ENTITY % blocktext "pre | hr | blockquote | address | center | noframes">
+
+<!ENTITY % block
+ "p | %heading; | div | %lists; | %blocktext; | isindex |fieldset | table">
+
+<!-- %Flow; mixes block and inline and is used for list items etc. -->
+<!ENTITY % Flow "(#PCDATA | %block; | form | %inline; | %misc;)*">
+
+<!--================== Content models for exclusions =====================-->
+
+<!-- a elements use %Inline; excluding a -->
+
+<!ENTITY % a.content
+ "(#PCDATA | %special; | %fontstyle; | %phrase; | %inline.forms; | %misc.inline;)*">
+
+<!-- pre uses %Inline excluding img, object, applet, big, small,
+ font, or basefont -->
+
+<!ENTITY % pre.content
+ "(#PCDATA | a | %special.basic; | %fontstyle.basic; | %phrase.basic; |
+ %inline.forms; | %misc.inline;)*">
+
+<!-- form uses %Flow; excluding form -->
+
+<!ENTITY % form.content "(#PCDATA | %block; | %inline; | %misc;)*">
+
+<!-- button uses %Flow; but excludes a, form, form controls, iframe -->
+
+<!ENTITY % button.content
+ "(#PCDATA | p | %heading; | div | %lists; | %blocktext; |
+ table | br | span | bdo | object | applet | img | map |
+ %fontstyle; | %phrase; | %misc;)*">
+
+<!--================ Document Structure ==================================-->
+
+<!-- the namespace URI designates the document profile -->
+
+<!ELEMENT html (head, body)>
+<!ATTLIST html
+ %i18n;
+ id ID #IMPLIED
+ xmlns %URI; #FIXED 'http://www.w3.org/1999/xhtml'
+ >
+
+<!--================ Document Head =======================================-->
+
+<!ENTITY % head.misc "(script|style|meta|link|object|isindex)*">
+
+<!-- content model is %head.misc; combined with a single
+ title and an optional base element in any order -->
+
+<!ELEMENT head (%head.misc;,
+ ((title, %head.misc;, (base, %head.misc;)?) |
+ (base, %head.misc;, (title, %head.misc;))))>
+
+<!ATTLIST head
+ %i18n;
+ id ID #IMPLIED
+ profile %URI; #IMPLIED
+ >
+
+<!-- The title element is not considered part of the flow of text.
+ It should be displayed, for example as the page header or
+ window title. Exactly one title is required per document.
+ -->
+<!ELEMENT title (#PCDATA)>
+<!ATTLIST title
+ %i18n;
+ id ID #IMPLIED
+ >
+
+<!-- document base URI -->
+
+<!ELEMENT base EMPTY>
+<!ATTLIST base
+ id ID #IMPLIED
+ href %URI; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!-- generic metainformation -->
+<!ELEMENT meta EMPTY>
+<!ATTLIST meta
+ %i18n;
+ id ID #IMPLIED
+ http-equiv CDATA #IMPLIED
+ name CDATA #IMPLIED
+ content CDATA #REQUIRED
+ scheme CDATA #IMPLIED
+ >
+
+<!--
+ Relationship values can be used in principle:
+
+ a) for document specific toolbars/menus when used
+ with the link element in document head e.g.
+ start, contents, previous, next, index, end, help
+ b) to link to a separate style sheet (rel="stylesheet")
+ c) to make a link to a script (rel="script")
+ d) by stylesheets to control how collections of
+ html nodes are rendered into printed documents
+ e) to make a link to a printable version of this document
+ e.g. a PostScript or PDF version (rel="alternate" media="print")
+-->
+
+<!ELEMENT link EMPTY>
+<!ATTLIST link
+ %attrs;
+ charset %Charset; #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ type %ContentType; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ media %MediaDesc; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!-- style info, which may include CDATA sections -->
+<!ELEMENT style (#PCDATA)>
+<!ATTLIST style
+ %i18n;
+ id ID #IMPLIED
+ type %ContentType; #REQUIRED
+ media %MediaDesc; #IMPLIED
+ title %Text; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- script statements, which may include CDATA sections -->
+<!ELEMENT script (#PCDATA)>
+<!ATTLIST script
+ id ID #IMPLIED
+ charset %Charset; #IMPLIED
+ type %ContentType; #REQUIRED
+ language CDATA #IMPLIED
+ src %URI; #IMPLIED
+ defer (defer) #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!-- alternate content container for non script-based rendering -->
+
+<!ELEMENT noscript %Flow;>
+<!ATTLIST noscript
+ %attrs;
+ >
+
+<!--======================= Frames =======================================-->
+
+<!-- inline subwindow -->
+
+<!ELEMENT iframe %Flow;>
+<!ATTLIST iframe
+ %coreattrs;
+ longdesc %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ src %URI; #IMPLIED
+ frameborder (1|0) "1"
+ marginwidth %Pixels; #IMPLIED
+ marginheight %Pixels; #IMPLIED
+ scrolling (yes|no|auto) "auto"
+ align %ImgAlign; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ >
+
+<!-- alternate content container for non frame-based rendering -->
+
+<!ELEMENT noframes %Flow;>
+<!ATTLIST noframes
+ %attrs;
+ >
+
+<!--=================== Document Body ====================================-->
+
+<!ELEMENT body %Flow;>
+<!ATTLIST body
+ %attrs;
+ onload %Script; #IMPLIED
+ onunload %Script; #IMPLIED
+ background %URI; #IMPLIED
+ bgcolor %Color; #IMPLIED
+ text %Color; #IMPLIED
+ link %Color; #IMPLIED
+ vlink %Color; #IMPLIED
+ alink %Color; #IMPLIED
+ >
+
+<!ELEMENT div %Flow;> <!-- generic language/style container -->
+<!ATTLIST div
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Paragraphs =======================================-->
+
+<!ELEMENT p %Inline;>
+<!ATTLIST p
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Headings =========================================-->
+
+<!--
+ There are six levels of headings from h1 (the most important)
+ to h6 (the least important).
+-->
+
+<!ELEMENT h1 %Inline;>
+<!ATTLIST h1
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h2 %Inline;>
+<!ATTLIST h2
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h3 %Inline;>
+<!ATTLIST h3
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h4 %Inline;>
+<!ATTLIST h4
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h5 %Inline;>
+<!ATTLIST h5
+ %attrs;
+ %TextAlign;
+ >
+
+<!ELEMENT h6 %Inline;>
+<!ATTLIST h6
+ %attrs;
+ %TextAlign;
+ >
+
+<!--=================== Lists ============================================-->
+
+<!-- Unordered list bullet styles -->
+
+<!ENTITY % ULStyle "(disc|square|circle)">
+
+<!-- Unordered list -->
+
+<!ELEMENT ul (li)+>
+<!ATTLIST ul
+ %attrs;
+ type %ULStyle; #IMPLIED
+ compact (compact) #IMPLIED
+ >
+
+<!-- Ordered list numbering style
+
+ 1 arabic numbers 1, 2, 3, ...
+ a lower alpha a, b, c, ...
+ A upper alpha A, B, C, ...
+ i lower roman i, ii, iii, ...
+ I upper roman I, II, III, ...
+
+ The style is applied to the sequence number which by default
+ is reset to 1 for the first list item in an ordered list.
+-->
+<!ENTITY % OLStyle "CDATA">
+
+<!-- Ordered (numbered) list -->
+
+<!ELEMENT ol (li)+>
+<!ATTLIST ol
+ %attrs;
+ type %OLStyle; #IMPLIED
+ compact (compact) #IMPLIED
+ start %Number; #IMPLIED
+ >
+
+<!-- single column list (DEPRECATED) -->
+<!ELEMENT menu (li)+>
+<!ATTLIST menu
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!-- multiple column list (DEPRECATED) -->
+<!ELEMENT dir (li)+>
+<!ATTLIST dir
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!-- LIStyle is constrained to: "(%ULStyle;|%OLStyle;)" -->
+<!ENTITY % LIStyle "CDATA">
+
+<!-- list item -->
+
+<!ELEMENT li %Flow;>
+<!ATTLIST li
+ %attrs;
+ type %LIStyle; #IMPLIED
+ value %Number; #IMPLIED
+ >
+
+<!-- definition lists - dt for term, dd for its definition -->
+
+<!ELEMENT dl (dt|dd)+>
+<!ATTLIST dl
+ %attrs;
+ compact (compact) #IMPLIED
+ >
+
+<!ELEMENT dt %Inline;>
+<!ATTLIST dt
+ %attrs;
+ >
+
+<!ELEMENT dd %Flow;>
+<!ATTLIST dd
+ %attrs;
+ >
+
+<!--=================== Address ==========================================-->
+
+<!-- information on author -->
+
+<!ELEMENT address (#PCDATA | %inline; | %misc.inline; | p)*>
+<!ATTLIST address
+ %attrs;
+ >
+
+<!--=================== Horizontal Rule ==================================-->
+
+<!ELEMENT hr EMPTY>
+<!ATTLIST hr
+ %attrs;
+ align (left|center|right) #IMPLIED
+ noshade (noshade) #IMPLIED
+ size %Pixels; #IMPLIED
+ width %Length; #IMPLIED
+ >
+
+<!--=================== Preformatted Text ================================-->
+
+<!-- content is %Inline; excluding
+ "img|object|applet|big|small|sub|sup|font|basefont" -->
+
+<!ELEMENT pre %pre.content;>
+<!ATTLIST pre
+ %attrs;
+ width %Number; #IMPLIED
+ xml:space (preserve) #FIXED 'preserve'
+ >
+
+<!--=================== Block-like Quotes ================================-->
+
+<!ELEMENT blockquote %Flow;>
+<!ATTLIST blockquote
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!--=================== Text alignment ===================================-->
+
+<!-- center content -->
+<!ELEMENT center %Flow;>
+<!ATTLIST center
+ %attrs;
+ >
+
+<!--=================== Inserted/Deleted Text ============================-->
+
+<!--
+ ins/del are allowed in block and inline content, but its
+ inappropriate to include block content within an ins element
+ occurring in inline content.
+-->
+<!ELEMENT ins %Flow;>
+<!ATTLIST ins
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!ELEMENT del %Flow;>
+<!ATTLIST del
+ %attrs;
+ cite %URI; #IMPLIED
+ datetime %Datetime; #IMPLIED
+ >
+
+<!--================== The Anchor Element ================================-->
+
+<!-- content is %Inline; except that anchors shouldn't be nested -->
+
+<!ELEMENT a %a.content;>
+<!ATTLIST a
+ %attrs;
+ %focus;
+ charset %Charset; #IMPLIED
+ type %ContentType; #IMPLIED
+ name NMTOKEN #IMPLIED
+ href %URI; #IMPLIED
+ hreflang %LanguageCode; #IMPLIED
+ rel %LinkTypes; #IMPLIED
+ rev %LinkTypes; #IMPLIED
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--===================== Inline Elements ================================-->
+
+<!ELEMENT span %Inline;> <!-- generic language/style container -->
+<!ATTLIST span
+ %attrs;
+ >
+
+<!ELEMENT bdo %Inline;> <!-- I18N BiDi over-ride -->
+<!ATTLIST bdo
+ %coreattrs;
+ %events;
+ lang %LanguageCode; #IMPLIED
+ xml:lang %LanguageCode; #IMPLIED
+ dir (ltr|rtl) #REQUIRED
+ >
+
+<!ELEMENT br EMPTY> <!-- forced line break -->
+<!ATTLIST br
+ %coreattrs;
+ clear (left|all|right|none) "none"
+ >
+
+<!ELEMENT em %Inline;> <!-- emphasis -->
+<!ATTLIST em %attrs;>
+
+<!ELEMENT strong %Inline;> <!-- strong emphasis -->
+<!ATTLIST strong %attrs;>
+
+<!ELEMENT dfn %Inline;> <!-- definitional -->
+<!ATTLIST dfn %attrs;>
+
+<!ELEMENT code %Inline;> <!-- program code -->
+<!ATTLIST code %attrs;>
+
+<!ELEMENT samp %Inline;> <!-- sample -->
+<!ATTLIST samp %attrs;>
+
+<!ELEMENT kbd %Inline;> <!-- something user would type -->
+<!ATTLIST kbd %attrs;>
+
+<!ELEMENT var %Inline;> <!-- variable -->
+<!ATTLIST var %attrs;>
+
+<!ELEMENT cite %Inline;> <!-- citation -->
+<!ATTLIST cite %attrs;>
+
+<!ELEMENT abbr %Inline;> <!-- abbreviation -->
+<!ATTLIST abbr %attrs;>
+
+<!ELEMENT acronym %Inline;> <!-- acronym -->
+<!ATTLIST acronym %attrs;>
+
+<!ELEMENT q %Inline;> <!-- inlined quote -->
+<!ATTLIST q
+ %attrs;
+ cite %URI; #IMPLIED
+ >
+
+<!ELEMENT sub %Inline;> <!-- subscript -->
+<!ATTLIST sub %attrs;>
+
+<!ELEMENT sup %Inline;> <!-- superscript -->
+<!ATTLIST sup %attrs;>
+
+<!ELEMENT tt %Inline;> <!-- fixed pitch font -->
+<!ATTLIST tt %attrs;>
+
+<!ELEMENT i %Inline;> <!-- italic font -->
+<!ATTLIST i %attrs;>
+
+<!ELEMENT b %Inline;> <!-- bold font -->
+<!ATTLIST b %attrs;>
+
+<!ELEMENT big %Inline;> <!-- bigger font -->
+<!ATTLIST big %attrs;>
+
+<!ELEMENT small %Inline;> <!-- smaller font -->
+<!ATTLIST small %attrs;>
+
+<!ELEMENT u %Inline;> <!-- underline -->
+<!ATTLIST u %attrs;>
+
+<!ELEMENT s %Inline;> <!-- strike-through -->
+<!ATTLIST s %attrs;>
+
+<!ELEMENT strike %Inline;> <!-- strike-through -->
+<!ATTLIST strike %attrs;>
+
+<!ELEMENT basefont EMPTY> <!-- base font size -->
+<!ATTLIST basefont
+ id ID #IMPLIED
+ size CDATA #REQUIRED
+ color %Color; #IMPLIED
+ face CDATA #IMPLIED
+ >
+
+<!ELEMENT font %Inline;> <!-- local change to font -->
+<!ATTLIST font
+ %coreattrs;
+ %i18n;
+ size CDATA #IMPLIED
+ color %Color; #IMPLIED
+ face CDATA #IMPLIED
+ >
+
+<!--==================== Object ======================================-->
+<!--
+ object is used to embed objects as part of HTML pages.
+ param elements should precede other content. Parameters
+ can also be expressed as attribute/value pairs on the
+ object element itself when brevity is desired.
+-->
+
+<!ELEMENT object (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST object
+ %attrs;
+ declare (declare) #IMPLIED
+ classid %URI; #IMPLIED
+ codebase %URI; #IMPLIED
+ data %URI; #IMPLIED
+ type %ContentType; #IMPLIED
+ codetype %ContentType; #IMPLIED
+ archive %UriList; #IMPLIED
+ standby %Text; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ name NMTOKEN #IMPLIED
+ tabindex %Number; #IMPLIED
+ align %ImgAlign; #IMPLIED
+ border %Pixels; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!--
+ param is used to supply a named property value.
+ In XML it would seem natural to follow RDF and support an
+ abbreviated syntax where the param elements are replaced
+ by attribute value pairs on the object start tag.
+-->
+<!ELEMENT param EMPTY>
+<!ATTLIST param
+ id ID #IMPLIED
+ name CDATA #REQUIRED
+ value CDATA #IMPLIED
+ valuetype (data|ref|object) "data"
+ type %ContentType; #IMPLIED
+ >
+
+<!--=================== Java applet ==================================-->
+<!--
+ One of code or object attributes must be present.
+ Place param elements before other content.
+-->
+<!ELEMENT applet (#PCDATA | param | %block; | form | %inline; | %misc;)*>
+<!ATTLIST applet
+ %coreattrs;
+ codebase %URI; #IMPLIED
+ archive CDATA #IMPLIED
+ code CDATA #IMPLIED
+ object CDATA #IMPLIED
+ alt %Text; #IMPLIED
+ name NMTOKEN #IMPLIED
+ width %Length; #REQUIRED
+ height %Length; #REQUIRED
+ align %ImgAlign; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!--=================== Images ===========================================-->
+
+<!--
+ To avoid accessibility problems for people who aren't
+ able to see the image, you should provide a text
+ description using the alt and longdesc attributes.
+ In addition, avoid the use of server-side image maps.
+-->
+
+<!ELEMENT img EMPTY>
+<!ATTLIST img
+ %attrs;
+ src %URI; #REQUIRED
+ alt %Text; #REQUIRED
+ name NMTOKEN #IMPLIED
+ longdesc %URI; #IMPLIED
+ height %Length; #IMPLIED
+ width %Length; #IMPLIED
+ usemap %URI; #IMPLIED
+ ismap (ismap) #IMPLIED
+ align %ImgAlign; #IMPLIED
+ border %Length; #IMPLIED
+ hspace %Pixels; #IMPLIED
+ vspace %Pixels; #IMPLIED
+ >
+
+<!-- usemap points to a map element which may be in this document
+ or an external document, although the latter is not widely supported -->
+
+<!--================== Client-side image maps ============================-->
+
+<!-- These can be placed in the same document or grouped in a
+ separate document although this isn't yet widely supported -->
+
+<!ELEMENT map ((%block; | form | %misc;)+ | area+)>
+<!ATTLIST map
+ %i18n;
+ %events;
+ id ID #REQUIRED
+ class CDATA #IMPLIED
+ style %StyleSheet; #IMPLIED
+ title %Text; #IMPLIED
+ name CDATA #IMPLIED
+ >
+
+<!ELEMENT area EMPTY>
+<!ATTLIST area
+ %attrs;
+ %focus;
+ shape %Shape; "rect"
+ coords %Coords; #IMPLIED
+ href %URI; #IMPLIED
+ nohref (nohref) #IMPLIED
+ alt %Text; #REQUIRED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--================ Forms ===============================================-->
+
+<!ELEMENT form %form.content;> <!-- forms shouldn't be nested -->
+
+<!ATTLIST form
+ %attrs;
+ action %URI; #REQUIRED
+ method (get|post) "get"
+ name NMTOKEN #IMPLIED
+ enctype %ContentType; "application/x-www-form-urlencoded"
+ onsubmit %Script; #IMPLIED
+ onreset %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ accept-charset %Charsets; #IMPLIED
+ target %FrameTarget; #IMPLIED
+ >
+
+<!--
+ Each label must not contain more than ONE field
+ Label elements shouldn't be nested.
+-->
+<!ELEMENT label %Inline;>
+<!ATTLIST label
+ %attrs;
+ for IDREF #IMPLIED
+ accesskey %Character; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ >
+
+<!ENTITY % InputType
+ "(text | password | checkbox |
+ radio | submit | reset |
+ file | hidden | image | button)"
+ >
+
+<!-- the name attribute is required for all but submit & reset -->
+
+<!ELEMENT input EMPTY> <!-- form control -->
+<!ATTLIST input
+ %attrs;
+ %focus;
+ type %InputType; "text"
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ checked (checked) #IMPLIED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ size CDATA #IMPLIED
+ maxlength %Number; #IMPLIED
+ src %URI; #IMPLIED
+ alt CDATA #IMPLIED
+ usemap %URI; #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ accept %ContentTypes; #IMPLIED
+ align %ImgAlign; #IMPLIED
+ >
+
+<!ELEMENT select (optgroup|option)+> <!-- option selector -->
+<!ATTLIST select
+ %attrs;
+ name CDATA #IMPLIED
+ size %Number; #IMPLIED
+ multiple (multiple) #IMPLIED
+ disabled (disabled) #IMPLIED
+ tabindex %Number; #IMPLIED
+ onfocus %Script; #IMPLIED
+ onblur %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!ELEMENT optgroup (option)+> <!-- option group -->
+<!ATTLIST optgroup
+ %attrs;
+ disabled (disabled) #IMPLIED
+ label %Text; #REQUIRED
+ >
+
+<!ELEMENT option (#PCDATA)> <!-- selectable choice -->
+<!ATTLIST option
+ %attrs;
+ selected (selected) #IMPLIED
+ disabled (disabled) #IMPLIED
+ label %Text; #IMPLIED
+ value CDATA #IMPLIED
+ >
+
+<!ELEMENT textarea (#PCDATA)> <!-- multi-line text field -->
+<!ATTLIST textarea
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ rows %Number; #REQUIRED
+ cols %Number; #REQUIRED
+ disabled (disabled) #IMPLIED
+ readonly (readonly) #IMPLIED
+ onselect %Script; #IMPLIED
+ onchange %Script; #IMPLIED
+ >
+
+<!--
+ The fieldset element is used to group form fields.
+ Only one legend element should occur in the content
+ and if present should only be preceded by whitespace.
+-->
+<!ELEMENT fieldset (#PCDATA | legend | %block; | form | %inline; | %misc;)*>
+<!ATTLIST fieldset
+ %attrs;
+ >
+
+<!ENTITY % LAlign "(top|bottom|left|right)">
+
+<!ELEMENT legend %Inline;> <!-- fieldset label -->
+<!ATTLIST legend
+ %attrs;
+ accesskey %Character; #IMPLIED
+ align %LAlign; #IMPLIED
+ >
+
+<!--
+ Content is %Flow; excluding a, form, form controls, iframe
+-->
+<!ELEMENT button %button.content;> <!-- push button -->
+<!ATTLIST button
+ %attrs;
+ %focus;
+ name CDATA #IMPLIED
+ value CDATA #IMPLIED
+ type (button|submit|reset) "submit"
+ disabled (disabled) #IMPLIED
+ >
+
+<!-- single-line text input control (DEPRECATED) -->
+<!ELEMENT isindex EMPTY>
+<!ATTLIST isindex
+ %coreattrs;
+ %i18n;
+ prompt %Text; #IMPLIED
+ >
+
+<!--======================= Tables =======================================-->
+
+<!-- Derived from IETF HTML table standard, see [RFC1942] -->
+
+<!--
+ The border attribute sets the thickness of the frame around the
+ table. The default units are screen pixels.
+
+ The frame attribute specifies which parts of the frame around
+ the table should be rendered. The values are not the same as
+ CALS to avoid a name clash with the valign attribute.
+-->
+<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)">
+
+<!--
+ The rules attribute defines which rules to draw between cells:
+
+ If rules is absent then assume:
+ "none" if border is absent or border="0" otherwise "all"
+-->
+
+<!ENTITY % TRules "(none | groups | rows | cols | all)">
+
+<!-- horizontal placement of table relative to document -->
+<!ENTITY % TAlign "(left|center|right)">
+
+<!-- horizontal alignment attributes for cell contents
+
+ char alignment char, e.g. char=':'
+ charoff offset for alignment char
+-->
+<!ENTITY % cellhalign
+ "align (left|center|right|justify|char) #IMPLIED
+ char %Character; #IMPLIED
+ charoff %Length; #IMPLIED"
+ >
+
+<!-- vertical alignment attributes for cell contents -->
+<!ENTITY % cellvalign
+ "valign (top|middle|bottom|baseline) #IMPLIED"
+ >
+
+<!ELEMENT table
+ (caption?, (col*|colgroup*), thead?, tfoot?, (tbody+|tr+))>
+<!ELEMENT caption %Inline;>
+<!ELEMENT thead (tr)+>
+<!ELEMENT tfoot (tr)+>
+<!ELEMENT tbody (tr)+>
+<!ELEMENT colgroup (col)*>
+<!ELEMENT col EMPTY>
+<!ELEMENT tr (th|td)+>
+<!ELEMENT th %Flow;>
+<!ELEMENT td %Flow;>
+
+<!ATTLIST table
+ %attrs;
+ summary %Text; #IMPLIED
+ width %Length; #IMPLIED
+ border %Pixels; #IMPLIED
+ frame %TFrame; #IMPLIED
+ rules %TRules; #IMPLIED
+ cellspacing %Length; #IMPLIED
+ cellpadding %Length; #IMPLIED
+ align %TAlign; #IMPLIED
+ bgcolor %Color; #IMPLIED
+ >
+
+<!ENTITY % CAlign "(top|bottom|left|right)">
+
+<!ATTLIST caption
+ %attrs;
+ align %CAlign; #IMPLIED
+ >
+
+<!--
+colgroup groups a set of col elements. It allows you to group
+several semantically related columns together.
+-->
+<!ATTLIST colgroup
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ col elements define the alignment properties for cells in
+ one or more columns.
+
+ The width attribute specifies the width of the columns, e.g.
+
+ width=64 width in screen pixels
+ width=0.5* relative width of 0.5
+
+ The span attribute causes the attributes of one
+ col element to apply to more than one column.
+-->
+<!ATTLIST col
+ %attrs;
+ span %Number; "1"
+ width %MultiLength; #IMPLIED
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!--
+ Use thead to duplicate headers when breaking table
+ across page boundaries, or for static headers when
+ tbody sections are rendered in scrolling panel.
+
+ Use tfoot to duplicate footers when breaking table
+ across page boundaries, or for static footers when
+ tbody sections are rendered in scrolling panel.
+
+ Use multiple tbody sections when rules are needed
+ between groups of table rows.
+-->
+<!ATTLIST thead
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tfoot
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tbody
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ >
+
+<!ATTLIST tr
+ %attrs;
+ %cellhalign;
+ %cellvalign;
+ bgcolor %Color; #IMPLIED
+ >
+
+<!-- Scope is simpler than headers attribute for common tables -->
+<!ENTITY % Scope "(row|col|rowgroup|colgroup)">
+
+<!-- th is for headers, td for data and for cells acting as both -->
+
+<!ATTLIST th
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ nowrap (nowrap) #IMPLIED
+ bgcolor %Color; #IMPLIED
+ width %Length; #IMPLIED
+ height %Length; #IMPLIED
+ >
+
+<!ATTLIST td
+ %attrs;
+ abbr %Text; #IMPLIED
+ axis CDATA #IMPLIED
+ headers IDREFS #IMPLIED
+ scope %Scope; #IMPLIED
+ rowspan %Number; "1"
+ colspan %Number; "1"
+ %cellhalign;
+ %cellvalign;
+ nowrap (nowrap) #IMPLIED
+ bgcolor %Color; #IMPLIED
+ width %Length; #IMPLIED
+ height %Length; #IMPLIED
+ >
+
diff --git a/testing/runtests.py b/testing/runtests.py
index 83647c6..9330d23 100644
--- a/testing/runtests.py
+++ b/testing/runtests.py
@@ -30,6 +30,19 @@ class Tester:
return (True,'Difference between generated output and reference:\n%s' % diff)
return (False,'')
+ def cleanup_xmllint(self,errmsg):
+ msg = errmsg.split('\n')
+ rtnmsg = ""
+ for o in msg:
+ if (o):
+ if (o.startswith("I/O error : Attempt")):
+ pass
+ else:
+ if (rtnmsg):
+ rtnmsg += '\n'
+ rtnmsg += o
+ return rtnmsg
+
def get_config(self):
config = {}
with open(self.args.inputdir+'/'+self.test,'r') as f:
@@ -52,11 +65,23 @@ class Tester:
with open(self.test_out+'/Doxyfile','a') as f:
print('INPUT=%s/%s' % (self.args.inputdir,self.test), file=f)
print('STRIP_FROM_PATH=%s' % self.args.inputdir, file=f)
- print('XML_OUTPUT=%s/out' % self.test_out, file=f)
print('EXAMPLE_PATH=%s' % self.args.inputdir, file=f)
if 'config' in self.config:
for option in self.config['config']:
print(option, file=f)
+ if (self.args.xml):
+ print('GENERATE_XML=YES', file=f)
+ print('XML_OUTPUT=%s/out' % self.test_out, file=f)
+ else:
+ print('GENERATE_XML=NO', file=f)
+ if (self.args.xhtml):
+ print('GENERATE_HTML=YES', file=f)
+ # HTML_OUTPUT can also be set locally
+ print('HTML_OUTPUT=%s/html' % self.test_out, file=f)
+ print('HTML_FILE_EXTENSION=.xhtml', file=f)
+ if (self.args.pdf):
+ print('GENERATE_LATEX=YES', file=f)
+ print('LATEX_OUTPUT=%s/latex' % self.test_out, file=f)
if 'check' not in self.config or not self.config['check']:
print('Test doesn\'t specify any files to check')
@@ -64,10 +89,14 @@ class Tester:
# run doxygen
if (sys.platform == 'win32'):
- redir=' > nul:'
+ redir=' > nul:'
else:
- redir=' 2> /dev/null'
- if os.system('%s %s/Doxyfile %s' % (self.args.doxygen,self.test_out, redir))!=0:
+ redir=' 2> /dev/null > /dev/null'
+
+ if (self.args.noredir):
+ redir=''
+
+ if os.system('%s %s/Doxyfile %s' % (self.args.doxygen,self.test_out,redir))!=0:
print('Error: failed to run %s on %s/Doxyfile' % (self.args.doxygen,self.test_out));
sys.exit(1)
@@ -98,32 +127,92 @@ class Tester:
# check the relevant files of a doxygen run with the reference material
def perform_test(self,testmgr):
+ if (sys.platform == 'win32'):
+ redir=' > nul:'
+ separ='&'
+ else:
+ redir=' 2> /dev/null'
+ separ=';'
+
+ if (self.args.noredir):
+ redir=''
+
+ failed_xml=False
+ failed_html=False
+ failed_latex=False
+ msg = ()
# look for files to check against the reference
- if 'check' in self.config:
- for check in self.config['check']:
- check_file='%s/out/%s' % (self.test_out,check)
- # check if the file we need to check is actually generated
- if not os.path.isfile(check_file):
- testmgr.ok(False,self.test_name,msg='Non-existing file %s after \'check:\' statement' % check_file)
- return
- # convert output to canonical form
- data = os.popen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read()
- if data:
- # strip version
- data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n')
- else:
- testmgr.ok(False,self.test_name,msg='Failed to run %s on the doxygen output file %s' % (self.args.xmllint,self.test_out))
- return
- out_file='%s/%s' % (self.test_out,check)
- with open(out_file,'w') as f:
- print(data,file=f)
- ref_file='%s/%s/%s' % (self.args.inputdir,self.test_id,check)
- (failed,msg) = self.compare_ok(out_file,ref_file,self.test_name)
- if failed:
- testmgr.ok(False,self.test_name,msg)
- return
- shutil.rmtree(self.test_out,ignore_errors=True)
+ if self.args.xml:
+ failed_xml=True
+ if 'check' in self.config:
+ for check in self.config['check']:
+ check_file='%s/out/%s' % (self.test_out,check)
+ # check if the file we need to check is actually generated
+ if not os.path.isfile(check_file):
+ msg += ('Non-existing file %s after \'check:\' statement' % check_file,)
+ break
+ # convert output to canonical form
+ data = os.popen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read()
+ if data:
+ # strip version
+ data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n')
+ else:
+ msg += ('Failed to run %s on the doxygen output file %s' % (self.args.xmllint,self.test_out),)
+ break
+ out_file='%s/%s' % (self.test_out,check)
+ with open(out_file,'w') as f:
+ print(data,file=f)
+ ref_file='%s/%s/%s' % (self.args.inputdir,self.test_id,check)
+ (failed_xml,xml_msg) = self.compare_ok(out_file,ref_file,self.test_name)
+ if failed_xml:
+ msg+= (xml_msg,)
+ break
+ if not failed_xml and not self.args.keep:
+ xml_output='%s/out' % self.test_out
+ shutil.rmtree(xml_output,ignore_errors=True)
+
+ if (self.args.xhtml):
+ html_output='%s/html' % self.test_out
+ if (sys.platform == 'win32'):
+ redirx=' 2> %s/temp >nul:'%html_output
+ else:
+ redirx='2>%s/temp >/dev/null'%html_output
+ exe_string = '%s --path dtd --nonet --postvalid %s/*xhtml %s %s ' % (self.args.xmllint,html_output,redirx,separ)
+ exe_string += 'more "%s/temp"' % (html_output)
+ failed_html=False
+ xmllint_out = os.popen(exe_string).read()
+ xmllint_out = self.cleanup_xmllint(xmllint_out)
+ if xmllint_out:
+ msg += (xmllint_out,)
+ failed_html=True
+ elif not self.args.keep:
+ shutil.rmtree(html_output,ignore_errors=True)
+ if (self.args.pdf):
+ failed_latex=False
+ latex_output='%s/latex' % self.test_out
+ if (sys.platform == 'win32'):
+ redirl='>nul: 2>temp'
+ else:
+ redirl='>/dev/null 2>temp'
+ exe_string = 'cd %s %s echo "q" | make %s %s' % (latex_output,separ,redirl,separ)
+ exe_string += 'more temp'
+ latex_out = os.popen(exe_string).read()
+ if latex_out.find("Error")!=-1:
+ msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",)
+ failed_html=True
+ elif open(latex_output + "/refman.log",'r').read().find("Emergency stop")!= -1:
+ msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",)
+ failed_html=True
+ elif not self.args.keep:
+ shutil.rmtree(latex_output,ignore_errors=True)
+
+ if failed_xml or failed_html or failed_latex:
+ testmgr.ok(False,self.test_name,msg)
+ return
+
testmgr.ok(True,self.test_name)
+ if not self.args.keep:
+ shutil.rmtree(self.test_out,ignore_errors=True)
def run(self,testmgr):
if self.update:
@@ -138,6 +227,8 @@ class TestManager:
self.num_tests = len(tests)
self.count=1
self.passed=0
+ if self.args.xhtml:
+ self.prepare_dtd()
print('1..%d' % self.num_tests)
def ok(self,result,test_name,msg='Ok'):
@@ -147,8 +238,9 @@ class TestManager:
else:
print('not ok %s - %s' % (self.count,test_name))
print('-------------------------------------')
- print(msg)
- print('-------------------------------------')
+ for o in msg:
+ print(o)
+ print('-------------------------------------')
self.count = self.count + 1
def result(self):
@@ -162,27 +254,57 @@ class TestManager:
for test in self.tests:
tester = Tester(self.args,test)
tester.run(self)
- return 0 if self.args.updateref else self.result()
+ res=self.result()
+ if self.args.xhtml and not res and not self.args.keep:
+ shutil.rmtree("dtd",ignore_errors=True)
+ return 0 if self.args.updateref else res
+
+ def prepare_dtd(self):
+ shutil.rmtree("dtd",ignore_errors=True)
+ shutil.copytree(self.args.inputdir+"/dtd", "dtd")
def main():
# argument handling
parser = argparse.ArgumentParser(description='run doxygen tests')
- parser.add_argument('--updateref',help='update the reference data for a test',action="store_true")
- parser.add_argument('--doxygen',nargs='?',default='doxygen',help='path/name of the doxygen executable')
- parser.add_argument('--xmllint',nargs='?',default='xmllint',help='path/name of the xmllint executable')
- parser.add_argument('--id',nargs='+',dest='ids',action='append',type=int,help='id of the test to perform')
- parser.add_argument('--all',help='perform all tests',action="store_true")
- parser.add_argument('--inputdir',nargs='?',default='.',help='input directory containing the tests')
- parser.add_argument('--outputdir',nargs='?',default='.',help='output directory to write the doxygen output to')
- args = parser.parse_args()
-
- # sanity check
+ parser.add_argument('--updateref',help=
+ 'update the reference files. Should be used in combination with -id to '
+ 'update the reference file(s) for the given test',action="store_true")
+ parser.add_argument('--doxygen',nargs='?',default='doxygen',help=
+ 'path/name of the doxygen executable')
+ parser.add_argument('--xmllint',nargs='?',default='xmllint',help=
+ 'path/name of the xmllint executable')
+ parser.add_argument('--id',nargs='+',dest='ids',action='append',type=int,help=
+ 'run test with number n only (the option may be specified run test with '
+ 'number n only (the option may be specified')
+ parser.add_argument('--all',help=
+ 'can be used in combination with -updateref to update the reference files '
+ 'for all tests.',action="store_true")
+ parser.add_argument('--inputdir',nargs='?',default='.',help=
+ 'input directory containing the tests')
+ parser.add_argument('--outputdir',nargs='?',default='.',help=
+ 'output directory to write the doxygen output to')
+ parser.add_argument('--noredir',help=
+ 'disable redirection of doxygen warnings',action="store_true")
+ parser.add_argument('--xml',help='create xml output and check',
+ action="store_true")
+ parser.add_argument('--xhtml',help=
+ 'create xhtml output and check with xmllint',action="store_true")
+ parser.add_argument('--pdf',help='create LaTeX output and create pdf from it',
+ action="store_true")
+ parser.add_argument('--keep',help='keep result directories',
+ action="store_true")
+ test_flags = os.getenv('TEST_FLAGS', default='').split()
+ args = parser.parse_args(test_flags + sys.argv[1:])
+
+ # sanity check
+ if (not args.xml) and (not args.pdf) and (not args.xhtml):
+ args.xml=True
if (not args.updateref is None) and (args.ids is None) and (args.all is None):
parser.error('--updateref requires either --id or --all')
starting_directory = os.getcwd()
os.chdir(args.inputdir)
- # find the tests to run
+ # find the tests to run
if args.ids: # test ids are given by user
tests = []
for id in list(itertools.chain.from_iterable(args.ids)):
diff --git a/vhdlparser/ErrorHandler.h b/vhdlparser/ErrorHandler.h
index 55286b4..7500a5f 100644
--- a/vhdlparser/ErrorHandler.h
+++ b/vhdlparser/ErrorHandler.h
@@ -30,7 +30,7 @@ JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str);
// Called when the parser cannot continue parsing.
// last - the last token successfully parsed.
// unexpected - the token at which the error occurs.
- // production - the production in which this error occurrs.
+ // production - the production in which this error occurs.
virtual void handleParseError(Token *last, Token *unexpected, JAVACC_SIMPLE_STRING production, VhdlParser *parser) {
error_count++;
fprintf(stderr, "Encountered: %s at: %d:%d while parsing: %s\n", addUnicodeEscapes(unexpected->image).c_str(), unexpected->beginLine, unexpected->beginColumn, production.c_str());
diff --git a/vhdlparser/Makefile b/vhdlparser/Makefile
index 4725470..84bdccf 100644
--- a/vhdlparser/Makefile
+++ b/vhdlparser/Makefile
@@ -7,16 +7,48 @@
# for any purpose. It is provided "as is" without express or implied warranty.
# See the GNU General Public License for more details.
#
-# Documents produced by Doxygen are derivative works derived from the
+# Documents produced by doxygen are derivative works derived from the
# input used in their production; they are not affected by this license.
#
-regenerate:
- rm -f CharStream.cc CharStream.h ErrorHandler.h ParseException.cc ParseException.h \
+#
+# Files generated by javacc
+#
+GEN_FILES=CharStream.cc CharStream.h ErrorHandler.h ParseException.cc ParseException.h \
Token.cc Token.h TokenManager.h TokenMgrError.cc TokenMgrError.h VhdlParser.cc VhdlParser.h \
VhdlParserConstants.h VhdlParserTokenManager.cc VhdlParserTokenManager.h \
JavaCC.h
- javacc vhdlparser.jj
- cp JavaCC.h.in JavaCC.h
+#
+# Generate parser (default target)
+#
+# when generating the parser with debug options it will look like:
+# make JAVACC_FLAGS=-debug_parser
+# or
+# make JAVACC_FLAGS="-debug_parser -debug_lookahead"
+#
+# Available debug options:
+# -debug_parser
+# -debug_token_manager
+# -debug_lookahead
+#
+# For other javacc settings / options consult the documentation of javacc.
+
+regenerate:
+ @rm -f $(GEN_FILES)
+ @javacc $(JAVACC_FLAGS) vhdlparser.jj
+ @cp JavaCC.h.in JavaCC.h
+
+#
+# reset the generated files back to their versions from git.
+#
+
+reset_gen_files:
+ @rm -f $(GEN_FILES)
+ @git checkout $(GEN_FILES)
+
+help:
+ @echo "Targets:"
+ @echo " regenerate (default)"
+ @echo " reset_gen_files"
FORCE:
diff --git a/vhdlparser/ParseException.cc b/vhdlparser/ParseException.cc
index 31ee7a3..99649af 100644
--- a/vhdlparser/ParseException.cc
+++ b/vhdlparser/ParseException.cc
@@ -53,7 +53,7 @@ namespace parser {
/**
* This is the last token that has been consumed successfully. If
* this object has been created due to a parse error, the token
- * followng this token will (therefore) be the first error token.
+ * following this token will (therefore) be the first error token.
*/
Token currentToken;
diff --git a/vhdlparser/ParseException.h b/vhdlparser/ParseException.h
index 1f3a3dc..b025912 100644
--- a/vhdlparser/ParseException.h
+++ b/vhdlparser/ParseException.h
@@ -50,7 +50,7 @@ class ParseException {
/**
* This is the last token that has been consumed successfully. If
* this object has been created due to a parse error, the token
- * followng this token will (therefore) be the first error token.
+ * following this token will (therefore) be the first error token.
*/
Token currentToken;
diff --git a/vhdlparser/VhdlParserErrorHandler.hpp b/vhdlparser/VhdlParserErrorHandler.hpp
index d98f029..9576ce6 100644
--- a/vhdlparser/VhdlParserErrorHandler.hpp
+++ b/vhdlparser/VhdlParserErrorHandler.hpp
@@ -7,32 +7,47 @@
#include "VhdlParser.h"
#include "ErrorHandler.h"
#include "vhdlstring.h"
+#include "message.h"
+
+const char *getVhdlFileName(void);
namespace vhdl { namespace parser {
-class VhdlErrorHandler: public ErrorHandler
+class VhdlErrorHandler: public ErrorHandler
{
- virtual void handleUnexpectedToken(int expectedKind, JAVACC_STRING_TYPE expectedToken, Token *actual, VhdlParser *parser)
+ virtual void handleUnexpectedToken(int expectedKind, JAVACC_STRING_TYPE expectedToken, Token *actual, VhdlParser *parser)
{
- fprintf(stderr,"\n\n syntax error at line: %d : %s\n", actual->beginLine,actual->image.data());
+ warn(getVhdlFileName(),actual->beginLine,"syntax error '%s'",actual->image.data());
error_count++;
throw std::exception();
}
- virtual void handleParseError(Token *last, Token *unexpected, JAVACC_SIMPLE_STRING production, VhdlParser *parser)
+ virtual void handleParseError(Token *last, Token *unexpected, JAVACC_SIMPLE_STRING production, VhdlParser *parser)
{
- fprintf(stderr,"\n\n unexpected token at line: %d %s\n", last->beginLine,unexpected->image.data());
+ warn(getVhdlFileName(),last->beginLine,"unexpected token: '%s'", unexpected->image.data());
error_count++;
throw std::exception();
}
virtual void handleOtherError(JAVACC_STRING_TYPE message, VhdlParser *parser)
{
- fprintf(stderr, "\n\n unexpected error: %s\n", (char*)message.c_str());
+ warn(getVhdlFileName(), -1, "unexpected error: '%s'", (char*)message.c_str());
error_count++;
throw std::exception();
}
};
+
+class VhdlTokenManagerErrorHandler: public TokenManagerErrorHandler {
+ virtual void lexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, VhdlParserTokenManager* token_manager)
+ {
+ warn(getVhdlFileName(),errorLine,"Lexical error, Encountered: '%c' after: '%s'",curChar, (EOFSeen? "EOF" : (const char*)errorAfter.c_str()));
+ }
+
+ virtual void lexicalError(JAVACC_STRING_TYPE errorMessage, VhdlParserTokenManager* token_manager)
+ {
+ warn(getVhdlFileName(),-1,"Unknown error: '%s'", (char*)errorMessage.c_str());
+ }
+ };
}
}
diff --git a/vhdlparser/VhdlParserIF.cpp b/vhdlparser/VhdlParserIF.cpp
index f9f689b..3a6746f 100644
--- a/vhdlparser/VhdlParserIF.cpp
+++ b/vhdlparser/VhdlParserIF.cpp
@@ -14,6 +14,8 @@ void VhdlParserIF::parseVhdlfile(const char* inputBuffer,bool inLine)
JAVACC_STRING_TYPE s =inputBuffer;
CharStream *stream = new CharStream(s.c_str(), (int)s.size(), 1, 1);
VhdlParserTokenManager *tokenManager = new VhdlParserTokenManager(stream);
+ VhdlTokenManagerErrorHandler *myTokErr=new VhdlTokenManagerErrorHandler();
+ tokenManager->setErrorHandler(myTokErr);
myParser=new VhdlParser(tokenManager);
VhdlErrorHandler *myErr=new VhdlErrorHandler();
myParser->setErrorHandler(myErr);
diff --git a/vhdlparser/vhdlstring.h b/vhdlparser/vhdlstring.h
index fde6ce4..4c64440 100644
--- a/vhdlparser/vhdlstring.h
+++ b/vhdlparser/vhdlstring.h
@@ -9,6 +9,7 @@
/** @brief Minimal string class with std::string like behaviour that fulfills the JavaCC
* string requirements.
*/
+
class VhdlString
{
public:
@@ -93,6 +94,8 @@ class VhdlString
void clear() { free(m_str); init(); }
VhdlString &operator+=(char c) { char s[2]; s[0]=c; s[1]=0; return append(s); }
VhdlString &operator+=(const char *s) { return append(s); }
+ VhdlString &operator+=(VhdlString s) { return append(s); }
+ VhdlString operator+ (const char *s) { return append(s); }
private:
void init() { m_str=(char*)calloc(1,1); m_len=0; }
@@ -100,4 +103,9 @@ class VhdlString
int m_len;
};
+// declare it static otherwise we will get:
+// multiple definition of `operator+(char const*, VhdlString)'
+// as we are in an include file
+static VhdlString operator+ (const char *s, VhdlString v) { return VhdlString(s).append(v); }
+
#endif