summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml29
-rw-r--r--Doxyfile6
-rw-r--r--VERSION2
-rw-r--r--addon/doxmlparser/src/stringimpl.h24
-rw-r--r--addon/doxyparse/doxyparse.cpp29
-rw-r--r--addon/doxywizard/config_doxyw.l35
-rw-r--r--addon/doxywizard/inputstring.cpp12
-rw-r--r--addon/doxywizard/inputstring.h2
-rw-r--r--addon/doxywizard/wizard.h5
-rw-r--r--cmake/git_watcher.cmake1
-rwxr-xr-x[-rw-r--r--]doc/changelog.doc6
-rw-r--r--doc/commands.doc112
-rw-r--r--doc/docblocks.doc2
-rw-r--r--doc/index.hhp.txt8
-rw-r--r--doc/install.doc2
-rw-r--r--doc/starting.doc18
-rw-r--r--examples/CMakeLists.txt268
-rw-r--r--examples/templ.cfg2
-rw-r--r--libversion/CMakeLists.txt2
-rw-r--r--qtools/qcstring.h2
-rw-r--r--src/cite.cpp277
-rw-r--r--src/cite.h81
-rw-r--r--src/classdef.cpp2
-rw-r--r--src/cmdmapper.cpp4
-rw-r--r--src/cmdmapper.h6
-rw-r--r--src/code.l3
-rw-r--r--src/commentcnv.l37
-rw-r--r--src/commentscan.h126
-rw-r--r--src/commentscan.l3190
-rw-r--r--src/config.xml13
-rw-r--r--src/configimpl.h1
-rw-r--r--src/configimpl.l63
-rw-r--r--src/constexp.l3
-rw-r--r--src/declinfo.l3
-rw-r--r--src/defargs.l599
-rw-r--r--src/definition.cpp176
-rw-r--r--src/definition.h12
-rw-r--r--src/definitionimpl.h14
-rw-r--r--src/diagram.cpp2
-rw-r--r--src/docbookgen.cpp4
-rw-r--r--src/docbookgen.h4
-rw-r--r--src/docbookvisitor.cpp148
-rw-r--r--src/docbookvisitor.h14
-rw-r--r--src/docgroup.cpp11
-rw-r--r--src/docgroup.h2
-rw-r--r--src/docparser.cpp170
-rw-r--r--src/docparser.h3
-rw-r--r--src/doctokenizer.l33
-rw-r--r--src/dotfilepatcher.cpp2
-rw-r--r--src/dotrunner.cpp2
-rw-r--r--src/doxygen.cpp230
-rw-r--r--src/doxygen.h10
-rw-r--r--src/entry.cpp24
-rw-r--r--src/entry.h13
-rw-r--r--src/filedef.cpp2
-rw-r--r--src/formula.cpp511
-rw-r--r--src/formula.h58
-rw-r--r--src/fortrancode.h1
-rw-r--r--src/fortrancode.l5
-rw-r--r--src/fortranscanner.h6
-rw-r--r--src/fortranscanner.l2415
-rw-r--r--src/groupdef.cpp12
-rw-r--r--src/growbuf.h4
-rw-r--r--src/htmldocvisitor.cpp32
-rw-r--r--src/htmlgen.cpp34
-rw-r--r--src/htmlgen.h4
-rw-r--r--src/index.cpp13
-rw-r--r--src/latexdocvisitor.cpp7
-rw-r--r--src/latexgen.cpp34
-rw-r--r--src/latexgen.h4
-rw-r--r--src/linkedmap.h84
-rw-r--r--src/mandocvisitor.cpp6
-rw-r--r--src/mangen.cpp24
-rw-r--r--src/mangen.h4
-rw-r--r--src/markdown.cpp67
-rw-r--r--src/markdown.h18
-rw-r--r--src/memberdef.cpp39
-rw-r--r--src/membergroup.cpp4
-rw-r--r--src/membergroup.h10
-rw-r--r--src/memberlist.cpp11
-rw-r--r--src/message.cpp2
-rw-r--r--src/namespacedef.cpp2
-rw-r--r--src/outputgen.h4
-rw-r--r--src/outputlist.h5
-rw-r--r--src/pagedef.cpp30
-rw-r--r--src/parserintf.h10
-rw-r--r--src/perlmodgen.cpp8
-rw-r--r--src/plantuml.cpp44
-rw-r--r--src/plantuml.h18
-rw-r--r--src/portable.cpp74
-rw-r--r--src/portable.h2
-rw-r--r--src/pre.h4
-rw-r--r--src/pre.l34
-rw-r--r--src/printdocvisitor.h4
-rw-r--r--src/pycode.l3
-rw-r--r--src/pyscanner.h7
-rw-r--r--src/pyscanner.l1789
-rw-r--r--src/reflist.cpp225
-rw-r--r--src/reflist.h142
-rw-r--r--src/rtfdocvisitor.cpp8
-rw-r--r--src/rtfgen.cpp14
-rw-r--r--src/rtfgen.h4
-rw-r--r--src/scanner.l96
-rw-r--r--src/searchindex.cpp4
-rw-r--r--src/section.h162
-rw-r--r--src/sqlcode.l3
-rw-r--r--src/sqlite3gen.cpp4
-rw-r--r--src/tagreader.cpp8
-rw-r--r--src/tclscanner.l41
-rw-r--r--src/translator_fr.h1928
-rw-r--r--src/translator_sv.h296
-rw-r--r--src/types.h6
-rw-r--r--src/util.cpp109
-rw-r--r--src/util.h15
-rw-r--r--src/vhdlcode.l3
-rw-r--r--src/vhdldocgen.cpp121
-rw-r--r--src/vhdldocgen.h29
-rw-r--r--src/vhdljjparser.cpp608
-rwxr-xr-x[-rw-r--r--]src/vhdljjparser.h76
-rw-r--r--src/xmlcode.l3
-rw-r--r--src/xmldocvisitor.cpp99
-rw-r--r--src/xmlgen.cpp25
-rw-r--r--templates/html/doxygen.css41
-rw-r--r--templates/xml/compound.xsd14
-rw-r--r--testing/020/indexpage.xml16
-rw-r--r--testing/020_only.dox2
-rw-r--r--testing/024/indexpage.xml16
-rw-r--r--testing/024_if.dox20
-rw-r--r--testing/031/indexpage.xml28
-rwxr-xr-xtesting/runtests.py19
-rw-r--r--vhdlparser/CMakeLists.txt3
-rw-r--r--vhdlparser/CharStream.cc22
-rw-r--r--vhdlparser/CharStream.h106
-rw-r--r--vhdlparser/ErrorHandler.h24
-rw-r--r--vhdlparser/JavaCC.h4
-rw-r--r--vhdlparser/JavaCC.h.in47
-rw-r--r--vhdlparser/ParseException.cc52
-rw-r--r--vhdlparser/ParseException.h24
-rw-r--r--vhdlparser/Token.cc37
-rw-r--r--vhdlparser/Token.h18
-rw-r--r--vhdlparser/TokenManager.h15
-rw-r--r--vhdlparser/TokenMgrError.cc28
-rw-r--r--vhdlparser/TokenMgrError.h20
-rw-r--r--vhdlparser/VhdlParser.cc6826
-rw-r--r--vhdlparser/VhdlParser.h6439
-rw-r--r--vhdlparser/VhdlParserConstants.h389
-rw-r--r--vhdlparser/VhdlParserErrorHandler.hpp45
-rw-r--r--vhdlparser/VhdlParserIF.cpp56
-rw-r--r--vhdlparser/VhdlParserIF.h12
-rw-r--r--vhdlparser/VhdlParserTokenManager.cc981
-rw-r--r--vhdlparser/VhdlParserTokenManager.h83
-rwxr-xr-x[-rw-r--r--]vhdlparser/vhdlparser.jj1018
-rwxr-xr-x[-rw-r--r--]vhdlparser/vhdlstring.h20
153 files changed, 15676 insertions, 16076 deletions
diff --git a/.travis.yml b/.travis.yml
index 0f6a704..ced8d26 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,12 +34,37 @@ linux-ppc64le: &linux-ppc64le
- cmake
- cmake-data
+linux-s390x: &linux-s390x
+ os: linux
+ arch: s390x
+ dist: bionic
+ env:
+ - OS_NAME="linux-s390x"
+ addons:
+ apt:
+ update: true
+ packages:
+ - texlive
+ - texlive-generic-recommended
+ - texlive-extra-utils
+ - texlive-latex-extra
+ - texlive-font-utils
+ - ghostscript
+ - libxml2-utils
+ - cmake
+ - cmake-data
+ - qt5-default
+
jobs:
include:
- <<: *linux-ppc64le
compiler: gcc
- <<: *linux-ppc64le
compiler: clang
+ - <<: *linux-s390x
+ compiler: gcc
+ - <<: *linux-s390x
+ compiler: clang
# - os: osx
# compiler: clang
# addons:
@@ -53,7 +78,7 @@ jobs:
before_script:
- |
- if [ "${TRAVIS_OS_NAME}" == "linux" ] && [ ! "${OS_NAME}" == "linux-ppc64le" ]; then
+ if [ "${TRAVIS_OS_NAME}" == "linux" ] && [ ! "${OS_NAME}" == "linux-ppc64le" ] && [ ! "${OS_NAME}" == "linux-s390x" ]; then
printf "[requires]
libxml2/2.9.9@bincrafters/stable
libiconv/1.15@bincrafters/stable" >> conanfile.txt;
@@ -85,7 +110,7 @@ before_script:
export CMAKE_LIBRARY_PATH="/usr/local/opt/flex/lib;/usr/local/opt/bison/lib;$CMAKE_LIBRARY_PATH";
export PATH="/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:/Users/travis/Library/TeX/texbin:/Library/TeX/texbin:$PATH";
fi;
- - if [ ! "${OS_NAME}" == "linux-ppc64le" ]; then
+ - if [ ! "${OS_NAME}" == "linux-ppc64le" ] && [ ! "${OS_NAME}" == "linux-s390x" ]; then
conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan;
conan install . -g virtualrunenv --build missing --update;
source activate_run.sh;
diff --git a/Doxyfile b/Doxyfile
index aa0de73..9e86b1e 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -102,7 +102,7 @@ WARN_IF_DOC_ERROR = YES
WARN_NO_PARAMDOC = NO
WARN_AS_ERROR = NO
WARN_FORMAT = "$file:$line: $text "
-WARN_LOGFILE =
+WARN_LOGFILE = warnings.log
#---------------------------------------------------------------------------
# Configuration options related to the input files
#---------------------------------------------------------------------------
@@ -131,7 +131,7 @@ USE_MDFILE_AS_MAINPAGE =
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
-STRIP_CODE_COMMENTS = YES
+STRIP_CODE_COMMENTS = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
REFERENCES_LINK_SOURCE = YES
@@ -323,7 +323,7 @@ DIAFILE_DIRS =
PLANTUML_JAR_PATH =
PLANTUML_CFG_FILE =
PLANTUML_INCLUDE_PATH =
-DOT_GRAPH_MAX_NODES = 50
+DOT_GRAPH_MAX_NODES = 100
MAX_DOT_GRAPH_DEPTH = 0
DOT_TRANSPARENT = NO
DOT_MULTI_TARGETS = NO
diff --git a/VERSION b/VERSION
index f49e8ed..6476b3a 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.8.17
+1.8.18
diff --git a/addon/doxmlparser/src/stringimpl.h b/addon/doxmlparser/src/stringimpl.h
index 013858f..8931b42 100644
--- a/addon/doxmlparser/src/stringimpl.h
+++ b/addon/doxmlparser/src/stringimpl.h
@@ -4,26 +4,34 @@
#include <qstring.h>
#include "doxmlintf.h"
-class StringImpl : public QString, public IString
+class StringImpl : public IString
{
public:
StringImpl() {}
- StringImpl(const QString &str) : QString(str) {}
+ StringImpl(const QString &str) : m_str(str) {}
StringImpl &operator=(const QString &str)
- { QString::operator=(str); return *this; }
+ { m_str=str; return *this; }
virtual ~StringImpl() {}
+ const char *data() const
+ { return m_str.data(); }
// IString
const char *latin1() const
- { return QString::latin1(); }
+ { return m_str.latin1(); }
const char *utf8() const
- { return QString::utf8(); }
+ { m_cstr = m_str.utf8(); return m_cstr.data(); }
unsigned short unicodeCharAt(int index) const
- { return QString::unicode()[index].unicode(); }
+ { return m_str.unicode()[index].unicode(); }
bool isEmpty() const
- { return QString::isEmpty(); }
+ { return m_str.isEmpty(); }
int length() const
- { return QString::length(); }
+ { return m_str.length(); }
+
+ operator QString() const { return m_str; }
+
+ private:
+ QString m_str;
+ mutable QCString m_cstr; // used as a cache for m_str.utf8() to avoid returning a temporary
};
#endif
diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp
index 59b560f..78a91d3 100644
--- a/addon/doxyparse/doxyparse.cpp
+++ b/addon/doxyparse/doxyparse.cpp
@@ -44,6 +44,7 @@
#include <qcstring.h>
#include <qregexp.h>
#include "namespacedef.h"
+#include "portable.h"
class Doxyparse : public CodeOutputInterface
{
@@ -154,6 +155,9 @@ static void printDefinition(std::string type, std::string signature, int line) {
static void printProtection(std::string protection) {
printf(" protection: %s\n", protection.c_str());
}
+static void printPrototypeYes() {
+ printf(" prototype: yes\n");
+}
static void printNumberOfLines(int lines) {
printf(" lines_of_code: %d\n", lines);
}
@@ -295,6 +299,12 @@ void functionInformation(MemberDef* md) {
}
}
+void prototypeInformation(MemberDef* md) {
+ printPrototypeYes();
+ const ArgumentList &argList = md->argumentList();
+ printNumberOfArguments(argList.size());
+}
+
static void lookupSymbol(Definition *d) {
if (d->definitionType() == Definition::TypeMember) {
MemberDef *md = dynamic_cast<MemberDef*>(d);
@@ -304,7 +314,10 @@ static void lookupSymbol(Definition *d) {
if (md->protection() == Public) {
printProtection("public");
}
- if (md->isFunction()) {
+ if (md->isFunction() && md->isPrototype()) {
+ prototypeInformation(md);
+ }
+ else if (md->isFunction()) {
functionInformation(md);
}
}
@@ -437,12 +450,14 @@ int main(int argc,char **argv) {
// we need a place to put intermediate files
std::ostringstream tmpdir;
-#if !defined(_WIN32) || defined(__CYGWIN__)
- unsigned int pid = (uint)getpid();
-#else
- unsigned int pid = (uint)GetCurrentProcessId();
-#endif
- tmpdir << "/tmp/doxyparse-" << pid;
+ unsigned int pid = Portable::pid();
+ if (Portable::getenv("TMP"))
+ tmpdir << Portable::getenv("TMP") << "/doxyparse-" << pid;
+ else if (Portable::getenv("TEMP"))
+ tmpdir << Portable::getenv("TEMP") << "/doxyparse-" << pid;
+ else
+ tmpdir << "doxyparse-" << pid;
+
Config_getString(OUTPUT_DIRECTORY)= tmpdir.str().c_str();
// enable HTML (fake) output to omit warning about missing output format
Config_getBool(GENERATE_HTML)=TRUE;
diff --git a/addon/doxywizard/config_doxyw.l b/addon/doxywizard/config_doxyw.l
index 59fa427..4018af7 100644
--- a/addon/doxywizard/config_doxyw.l
+++ b/addon/doxywizard/config_doxyw.l
@@ -12,6 +12,10 @@
%option never-interactive
%option prefix="config_doxywYY"
+%top{
+#include <stdint.h>
+}
+
%{
/*
@@ -19,6 +23,7 @@
*/
#include "config.h"
#include "input.h"
+#include "inputstring.h"
#include <QString>
#include <QVariant>
@@ -29,6 +34,7 @@
#include <QStringList>
#include <QRegExp>
#include <QTextStream>
+#include <QMessageBox>
#define YY_NO_UNISTD_H 1
@@ -216,6 +222,7 @@ static void readIncludeFile(const QString &incName)
%x SkipComment
%x SkipInvalid
%x GetString
+%x GetEnum
%x GetStrList
%x GetQuotedString
%x GetEnvVar
@@ -224,7 +231,7 @@ static void readIncludeFile(const QString &incName)
%%
<*>\0x0d
-<Start,GetString,GetStrList,SkipInvalid>"#" { BEGIN(SkipComment); }
+<Start,GetString,GetEnum,GetStrList,SkipInvalid>"#" { BEGIN(SkipComment); }
<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QString cmd = g_codec->toUnicode(yytext);
cmd=cmd.left(cmd.length()-1).trimmed();
g_curOption = g_options->value(cmd);
@@ -246,7 +253,14 @@ static void readIncludeFile(const QString &incName)
BEGIN(GetStrList);
break;
case Input::String:
- BEGIN(GetString);
+ if (dynamic_cast<InputString *>(g_curOption)->stringMode() == InputString::StringFixed)
+ {
+ BEGIN(GetEnum);
+ }
+ else
+ {
+ BEGIN(GetString);
+ }
break;
case Input::Int:
BEGIN(GetString);
@@ -328,7 +342,7 @@ static void readIncludeFile(const QString &incName)
}
<Start>[a-z_A-Z0-9]+ { config_warn("ignoring unknown tag '%s' at line %d, file %s\n",yytext,yylineno,qPrintable(g_yyFileName)); }
-<GetString,SkipInvalid>\n { BEGIN(Start); }
+<GetString,GetEnum,SkipInvalid>\n { BEGIN(Start); }
<GetStrList>\n {
if (!g_elemStr.isEmpty())
{
@@ -345,11 +359,15 @@ static void readIncludeFile(const QString &incName)
}
g_elemStr = QString();
}
-<GetString>[^ \"\t\r\n]+ {
+<GetString>[^ \"\t\r\n]+ {
*g_arg = QVariant(g_codec->toUnicode(yytext));
checkEncoding();
}
-<GetString,GetStrList,SkipInvalid>"\"" { g_lastState=YY_START;
+<GetEnum>[^ \"\t\r\n]+ {
+ InputString *cur = dynamic_cast<InputString *>(g_curOption);
+ *g_arg = cur->checkEnumVal(g_codec->toUnicode(yytext));
+ }
+<GetString,GetEnum,GetStrList,SkipInvalid>"\"" { g_lastState=YY_START;
BEGIN(GetQuotedString);
g_tmpString="";
}
@@ -357,11 +375,16 @@ static void readIncludeFile(const QString &incName)
// we add a bogus space to signal that the string was quoted. This space will be stripped later on.
g_tmpString+=" ";
//printf("Quoted String = '%s'\n",qPrintable(tmpString));
- if (g_lastState==GetString)
+ if (g_lastState==GetString)
{
*g_arg = g_codec->toUnicode(g_tmpString);
checkEncoding();
}
+ else if (g_lastState==GetEnum)
+ {
+ InputString *cur = dynamic_cast<InputString *>(g_curOption);
+ *g_arg = cur->checkEnumVal(g_codec->toUnicode(g_tmpString));
+ }
else
{
g_elemStr+=g_codec->toUnicode(g_tmpString);
diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp
index 5c0f2c9..2f81b5b 100644
--- a/addon/doxywizard/inputstring.cpp
+++ b/addon/doxywizard/inputstring.cpp
@@ -253,3 +253,15 @@ void InputString::writeValue(QTextStream &t,QTextCodec *codec)
writeStringValue(t,codec,m_str);
}
+QString InputString::checkEnumVal(const QString &value)
+{
+ QString val = value.trimmed().toLower();
+ QStringList::Iterator it;
+ for ( it= m_values.begin(); it != m_values.end(); ++it )
+ {
+ QString enumVal = *it;
+ if (enumVal.toLower() == val) return enumVal;
+ }
+
+ return m_default;
+}
diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h
index 4f4a7f7..1520584 100644
--- a/addon/doxywizard/inputstring.h
+++ b/addon/doxywizard/inputstring.h
@@ -50,6 +50,7 @@ class InputString : public QObject, public Input
QVariant &value();
void update();
Kind kind() const { return String; }
+ StringMode stringMode() const { return m_sm; }
QString docs() const { return m_docs; }
QString id() const { return m_id; }
QString templateDocs() const { return m_tdocs; }
@@ -59,6 +60,7 @@ class InputString : public QObject, public Input
void writeValue(QTextStream &t,QTextCodec *codec);
void setTemplateDocs(const QString &docs) { m_tdocs = docs; }
bool isEmpty() { return m_str.isEmpty(); }
+ QString checkEnumVal(const QString &value);
public slots:
void reset();
diff --git a/addon/doxywizard/wizard.h b/addon/doxywizard/wizard.h
index 810ab95..8b877e1 100644
--- a/addon/doxywizard/wizard.h
+++ b/addon/doxywizard/wizard.h
@@ -31,11 +31,6 @@ class Wizard;
class QImage;
class QLabel;
-enum OptLang { Lang_Cpp, Lang_C, Lang_Java, Lang_CS };
-enum HtmlStyle { HS_Plain, HS_TreeView, HS_CHM };
-enum TexStyle { TS_PDFHyper, TS_PDF, TS_PS };
-enum DiagramMode { DM_None, DM_Builtin, DM_Dot };
-
class TuneColorDialog : public QDialog
{
Q_OBJECT
diff --git a/cmake/git_watcher.cmake b/cmake/git_watcher.cmake
index 6a50476..72b7852 100644
--- a/cmake/git_watcher.cmake
+++ b/cmake/git_watcher.cmake
@@ -178,6 +178,7 @@ function(SetupGitMonitoring)
ALL
DEPENDS ${PRE_CONFIGURE_GIT_VERSION_FILE}
BYPRODUCTS ${POST_CONFIGURE_GIT_VERSION_FILE}
+ BYPRODUCTS ${GIT_STATE_FILE}
COMMENT "Checking the git repository for changes..."
COMMAND
${CMAKE_COMMAND}
diff --git a/doc/changelog.doc b/doc/changelog.doc
index dca250a..6f98f47 100644..100755
--- a/doc/changelog.doc
+++ b/doc/changelog.doc
@@ -8,7 +8,7 @@
<a name="1.8.17"></a>
</p>
<ul>
-<li>issue #6715: Errorneous matching of the immediately following block command after @ref [<a href="https://github.com/doxygen/doxygen/commit/4908c39f8bd18556f868bcc70d3f2f6ff0296c8e">view</a>] and [<a href="https://github.com/doxygen/doxygen/commit/81da20ff839843634ee6db5f517bfcb7ef87d4b9">view</a>]</li>
+<li>issue #6715: Erroneous matching of the immediately following block command after @ref [<a href="https://github.com/doxygen/doxygen/commit/4908c39f8bd18556f868bcc70d3f2f6ff0296c8e">view</a>] and [<a href="https://github.com/doxygen/doxygen/commit/81da20ff839843634ee6db5f517bfcb7ef87d4b9">view</a>]</li>
<li>issue #7119 Doxygen does not link to C# snippets - regression [<a href="https://github.com/doxygen/doxygen/commit/4952c20194ab1b59e914cabdbe44d609a138b393">view</a>]</li>
<li>issue #7189: wrong warning on ambiguous image files [<a href="https://github.com/doxygen/doxygen/commit/752753c044af46cc4a22f83be8e4e1ae6be8f373">view</a>]</li>
<li>issue #7190 1.8.16: Blank FILE_PATTERNS =&gt; no files processed [<a href="https://github.com/doxygen/doxygen/commit/a27369dbf3cccbe4b96bfde1aca49d96d4b396f0">view</a>]</li>
@@ -240,7 +240,7 @@
, [<a href="https://github.com/doxygen/doxygen/commit/05aba97840b42f5a65ac4d71f75cb6c28a0d15b0">view</a>]
, [<a href="https://github.com/doxygen/doxygen/commit/3dcf2fbbfdd0167e43b8ddfd1147daf3789eecd5">view</a>]
, [<a href="https://github.com/doxygen/doxygen/commit/2e8eca2dc1733098dca42a8d1b14faa877844227">view</a>]
-and [<a href="https://github.com/doxygen/doxygen/commit/c9284a1aae6e876e0399c4757837bec3563751e2">view</a>]</li></ul>
+and [<a href="https://github.com/doxygen/doxygen/commit/c9284a1aae6e876e0399c4757837bec3563751e2">view</a>]</li>
</ul>
<p>
\endhtmlonly
@@ -8949,7 +8949,7 @@ make sure you add the following:
of course).</li>
<li> For member groups, where only the first member is documented, that
documentation is no longer automatically copied to all other
- members of the group. You can still enble this by setting
+ members of the group. You can still enable this by setting
DISTRIBUTE_GROUP_DOC to YES in the config file.</li>
<li> The \mainpage block now gets its own chapter in Latex/RTF</li>
</ul>
diff --git a/doc/commands.doc b/doc/commands.doc
index 9bd3f66..be526a0 100644
--- a/doc/commands.doc
+++ b/doc/commands.doc
@@ -72,6 +72,7 @@ documentation:
\refitem cmddetails \\details
\refitem cmddiafile \\diafile
\refitem cmddir \\dir
+\refitem cmddocbookinclude \\docbookinclude
\refitem cmddocbookonly \\docbookonly
\refitem cmddontinclude \\dontinclude
\refitem cmddot \\dot
@@ -135,6 +136,7 @@ documentation:
\refitem cmdline \\line
\refitem cmdlink \\link
\refitem cmdmainpage \\mainpage
+\refitem cmdmaninclude \\maninclude
\refitem cmdmanonly \\manonly
\refitem cmdmemberof \\memberof
\refitem cmdmsc \\msc
@@ -175,6 +177,7 @@ documentation:
\refitem cmdreturn \\return
\refitem cmdreturns \\returns
\refitem cmdretval \\retval
+\refitem cmdrtfinclude \\rtfinclude
\refitem cmdrtfonly \\rtfonly
\refitem cmdsa \\sa
\refitem cmdsecreflist \\secreflist
@@ -211,6 +214,7 @@ documentation:
\refitem cmdvhdlflow \\vhdlflow
\refitem cmdwarning \\warning
\refitem cmdweakgroup \\weakgroup
+\refitem cmdxmlinclude \\xmlinclude
\refitem cmdxmlonly \\xmlonly
\refitem cmdxrefitem \\xrefitem
\refitem cmddollar \\\$
@@ -2457,8 +2461,8 @@ Commands for displaying examples
\section cmdverbinclude \\verbinclude <file-name>
\addindex \\verbinclude
- This command includes the file \<file-name\> verbatim in the documentation.
- The command is equivalent to pasting the file in the documentation and
+ This command includes the contents of the file \<file-name\> verbatim in the documentation.
+ The command is equivalent to pasting the contents of the file in the documentation and
placing \ref cmdverbatim "\\verbatim" and \ref cmdendverbatim "\\endverbatim"
commands around it.
@@ -2469,8 +2473,9 @@ Commands for displaying examples
\section cmdhtmlinclude \\htmlinclude ["[block]"] <file-name>
\addindex \\htmlinclude
- This command includes the file \<file-name\> as is in the HTML documentation.
- The command is equivalent to pasting the file in the documentation and
+ This command includes the contents of the file \<file-name\> as is in the HTML documentation
+ and tagged with `<htmlonly>` in the generated XML output.
+ The command is equivalent to pasting the contents of the file in the documentation and
placing \ref cmdhtmlonly "\\htmlonly" and \ref cmdendhtmlonly "\\endhtmlonly"
commands around it.
@@ -2490,14 +2495,75 @@ Commands for displaying examples
\section cmdlatexinclude \\latexinclude <file-name>
\addindex \\latexinclude
- This command includes the file \<file-name\> as is in the \LaTeX documentation.
- The command is equivalent to pasting the file in the documentation and
+ This command includes the contents of the file \<file-name\> as is in the \LaTeX documentation
+ and tagged with `<latexonly>` in the generated XML output.
+ The command is equivalent to pasting the contents of the file in the documentation and
placing \ref cmdlatexonly "\\latexonly" and \ref cmdendlatexonly "\\endlatexonly"
commands around it.
Files or directories that doxygen should look for can be specified using the
\ref cfg_example_path "EXAMPLE_PATH" tag of doxygen's configuration file.
+ \sa section \ref cmdlatexonly "\\latexonly".
+<hr>
+
+\section cmdrtfinclude \\rtfinclude <file-name>
+
+ \addindex \\rtfinclude
+ This command includes the contents of the file \<file-name\> as is in the RTF documentation
+ and tagged with `<rtfonly>` in the generated XML output.
+ The command is equivalent to pasting the contents of the file in the documentation and
+ placing \ref cmdrtfonly "\\rtfonly" and \ref cmdendrtfonly "\\endrtfonly"
+ commands around it.
+
+ Files or directories that doxygen should look for can be specified using the
+ \ref cfg_example_path "EXAMPLE_PATH" tag of doxygen's configuration file.
+
+ \sa section \ref cmdrtfonly "\\rtfonly".
+<hr>
+
+\section cmdmaninclude \\maninclude <file-name>
+
+ \addindex \\maninclude
+ This command includes the contents of the file \<file-name\> as is in the MAN documentation
+ and tagged with `<manonly>` in the generated XML output.
+ The command is equivalent to pasting the contents of the file in the documentation and
+ placing \ref cmdmanonly "\\manonly" and \ref cmdendmanonly "\\endmanonly"
+ commands around it.
+
+ Files or directories that doxygen should look for can be specified using the
+ \ref cfg_example_path "EXAMPLE_PATH" tag of doxygen's configuration file.
+
+ \sa section \ref cmdmanonly "\\manonly".
+<hr>
+
+\section cmddocbookinclude \\docbookinclude <file-name>
+
+ \addindex \\docbookinclude
+ This command includes the contents of the file \<file-name\> as is in the DocBook documentation
+ and tagged with `<docbookonly>` in the generated XML output.
+ The command is equivalent to pasting the contents of the file in the documentation and
+ placing \ref cmddocbookonly "\\docbookonly" and \ref cmdenddocbookonly "\\enddocbookonly"
+ commands around it.
+
+ Files or directories that doxygen should look for can be specified using the
+ \ref cfg_example_path "EXAMPLE_PATH" tag of doxygen's configuration file.
+
+ \sa section \ref cmddocbookonly "\\docbookonly".
+<hr>
+
+\section cmdxmlinclude \\xmlinclude <file-name>
+
+ \addindex \\xmlinclude
+ This command includes contents of the the file \<file-name\> as is in the XML documentation.
+ The command is equivalent to pasting the contents of the file in the documentation and
+ placing \ref cmdxmlonly "\\xmlonly" and \ref cmdendxmlonly "\\endxmlonly"
+ commands around it.
+
+ Files or directories that doxygen should look for can be specified using the
+ \ref cfg_example_path "EXAMPLE_PATH" tag of doxygen's configuration file.
+
+ \sa section \ref cmdxmlonly "\\xmlonly".
<hr>
\htmlonly</p><center><p>\endhtmlonly
@@ -2697,8 +2763,9 @@ only copy the detailed documentation, not the brief description.
\section cmddocbookonly \\docbookonly
\addindex \\docbookonly
- Starts a block of text that will be verbatim included in the
- generated DocBook documentation only. The block ends with a
+ Starts a block of text that only will be verbatim included in the
+ generated DocBook documentation and tagged with `<docbookonly>` in the generated
+ XML output. The block ends with a
\ref cmdenddocbookonly "\\enddocbookonly" command.
\sa section \ref cmdmanonly "\\manonly",
@@ -3142,8 +3209,9 @@ class Receiver
\section cmdhtmlonly \\htmlonly ["[block]"]
\addindex \\htmlonly
- Starts a block of text that will be verbatim included in the
- generated HTML documentation only. The block ends with a
+ Starts a block of text that only will be verbatim included in the
+ generated HTML documentation and tagged with `<htmlonly>` in the generated
+ XML output. The block ends with a
\ref cmdendhtmlonly "\\endhtmlonly" command.
This command can be used to include HTML code that is too complex
@@ -3233,8 +3301,9 @@ class Receiver
\section cmdlatexonly \\latexonly
\addindex \\latexonly
- Starts a block of text that will be verbatim included in the
- generated \LaTeX documentation only. The block ends with a
+ Starts a block of text that only will be verbatim included in the
+ generated \LaTeX documentation and tagged with `<latexonly>` in the generated
+ XML output. The block ends with a
\ref cmdendlatexonly "\\endlatexonly" command.
This command can be used to include \LaTeX code that is too
@@ -3249,15 +3318,17 @@ class Receiver
\sa sections \ref cmdrtfonly "\\rtfonly",
\ref cmdxmlonly "\\xmlonly",
\ref cmdmanonly "\\manonly",
- \ref cmdhtmlonly "\\htmlonly", and
- \ref cmdhtmlonly "\\docbookonly".
+ \ref cmdhtmlonly "\\htmlonly",
+ \ref cmddocbookonly "\\docbookonly", and
+ \ref cmdlatexinclude "\\latexinclude".
<hr>
\section cmdmanonly \\manonly
\addindex \\manonly
- Starts a block of text that will be verbatim included in the
- generated MAN documentation only. The block ends with a
+ Starts a block of text that only will be verbatim included in the
+ generated MAN documentation and tagged with `<manonly>` in the generated
+ XML output. The block ends with a
\ref cmdendmanonly "\\endmanonly" command.
This command can be used to include groff code directly into
@@ -3334,8 +3405,9 @@ class Receiver
\section cmdrtfonly \\rtfonly
\addindex \\rtfonly
- Starts a block of text that will be verbatim included in the
- generated RTF documentation only. The block ends with a
+ Starts a block of text that only will be verbatim included in the
+ generated RTF documentation and tagged with `<rtfonly>` in the generated
+ XML output. The block ends with a
\ref cmdendrtfonly "\\endrtfonly" command.
This command can be used to include RTF code that is too complex
@@ -3371,8 +3443,8 @@ class Receiver
\section cmdxmlonly \\xmlonly
\addindex \\xmlonly
- Starts a block of text that will be verbatim included in the
- generated XML output only. The block ends with a
+ Starts a block of text that only will be verbatim included in the
+ generated XML output. The block ends with a
\ref cmdendxmlonly "\\endxmlonly" command.
This command can be used to include custom XML tags.
diff --git a/doc/docblocks.doc b/doc/docblocks.doc
index 8e99669..23933c7 100644
--- a/doc/docblocks.doc
+++ b/doc/docblocks.doc
@@ -653,7 +653,7 @@ syntax, including parts of the
extension.
Markdown is designed to be very easy to read and write.
-It's formatting is inspired by plain text mail.
+Its formatting is inspired by plain text mail.
Markdown works great for simple, generic formatting, like an introduction
page for your project. Doxygen also supports reading of markdown files
directly. For more details see chapter \ref markdown.
diff --git a/doc/index.hhp.txt b/doc/index.hhp.txt
index b676d83..3bf8701 100644
--- a/doc/index.hhp.txt
+++ b/doc/index.hhp.txt
@@ -102,7 +102,7 @@ examples/tag/html/tab_a.png
examples/tag/html/tab_b.png
examples/tag/html/tab_h.png
examples/tag/html/tab_s.png
-examples/template/html/tab_a.png
-examples/template/html/tab_b.png
-examples/template/html/tab_h.png
-examples/template/html/tab_s.png
+examples/templ/html/tab_a.png
+examples/templ/html/tab_b.png
+examples/templ/html/tab_h.png
+examples/templ/html/tab_s.png
diff --git a/doc/install.doc b/doc/install.doc
index b711cd4..5f15d8a 100644
--- a/doc/install.doc
+++ b/doc/install.doc
@@ -251,7 +251,7 @@ Ghostscript can be <a href="https://sourceforge.net/projects/ghostscript/">downl
from Sourceforge.
After installing \LaTeX and Ghostscript you'll need to make sure the tools
-latex.exe, pdflatex.exe, and gswin32c.exe are present in the search path of a
+latex.exe, pdflatex.exe, and gswin32c.exe (or gswin64c.exe) are present in the search path of a
command box. Follow <a href="https://www.computerhope.com/issues/ch000549.htm">these</a>
instructions if you are unsure and run the commands from a command box to verify it works.
diff --git a/doc/starting.doc b/doc/starting.doc
index 045f66c..d419e92 100644
--- a/doc/starting.doc
+++ b/doc/starting.doc
@@ -114,15 +114,15 @@ Extension | Language | Extension | Language | Extension | Language
.cc |C / C++ | .java |Java | .f95 |Fortran
.cxx |C / C++ | .cs |C# | .f03 |Fortran
.cpp |C / C++ | .d |D | .f08 |Fortran
-.c++ |C / C++ | .php |PHP | .vhd |VHDL
-.ii |C / C++ | .php4 |PHP | .vhdl |VHDL
-.ixx |C / C++ | .php5 |PHP | .ucf |VHDL
-.ipp |C / C++ | .inc |PHP | .qsf |VHDL
-.i++ |C / C++ | .phtml |PHP | .tcl |TCL
-.inl |C / C++ | .m |Objective-C | .md |Markdown
-.h |C / C++ | .M |Objective-C | .markdown |Markdown
-.H |C / C++ | .py |Python | .ice |Slice
-.hh |C / C++ | .pyw |Python | | |
+.c++ |C / C++ | .php |PHP | .f18 |Fortran
+.ii |C / C++ | .php4 |PHP | .vhd |VHDL
+.ixx |C / C++ | .php5 |PHP | .vhdl |VHDL
+.ipp |C / C++ | .inc |PHP | .ucf |VHDL
+.i++ |C / C++ | .phtml |PHP | .qsf |VHDL
+.inl |C / C++ | .m |Objective-C | .tcl |TCL
+.h |C / C++ | .M |Objective-C | .md |Markdown
+.H |C / C++ | .py |Python | .markdown |Markdown
+.hh |C / C++ | .pyw |Python | .ice |Slice
.HH |C / C++ | | | | |
.hxx |C / C++ | | | | |
.hpp |C / C++ | | | | |
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 967f3d4..c73d6f4 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -16,236 +16,56 @@ foreach (f ${EXAMPLE_FILES})
list(APPEND OUT_EXAMPLE_FILES "${PROJECT_BINARY_DIR}/examples/${f}")
endforeach()
+set(BASIC_EXAMPLES
+ class:h
+ define:h
+ enum:h
+ file:h
+ func:h
+ javadoc-banner:h
+ structcmd:h
+ afterdoc:h
+ relates:cpp
+ author:cpp
+ par:cpp
+ overload:cpp
+ example:cpp
+ include:cpp
+ qtstyle:cpp
+ jdstyle:cpp
+ autolink:cpp
+ restypedef:cpp
+ tag:cpp
+ group:cpp
+ memgrp:cpp
+ templ:cpp
+ page:doc
+ docstring:py
+ pyexample:py
+ tclexample:tcl
+ manual:c
+ mux:vhdl
+)
+
+foreach (f_inp ${BASIC_EXAMPLES})
+ string(REGEX REPLACE ".*:" "" f_ext ${f_inp})
+ string(REGEX REPLACE ":.*" "" f ${f_inp})
+ add_custom_command(
+ COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen ${f}.cfg
+ COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/${f}/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/${f}/latex/refman_doc.tex
+ DEPENDS doxygen ${f}.${f_ext} ${f}.cfg ${TOP}/examples/strip_example.py
+ OUTPUT ${PROJECT_BINARY_DIR}/html/examples/${f}/html/index.html ${PROJECT_BINARY_DIR}/html/examples/${f}/latex/refman_doc.tex
+ )
+ set(EXAMPLES_RES ${EXAMPLES_RES} "" ${PROJECT_BINARY_DIR}/html/examples/${f}/html/index.html)
+endforeach()
+
add_custom_target(examples
DEPENDS ${OUT_EXAMPLE_FILES}
- ${PROJECT_BINARY_DIR}/html/examples/class/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/define/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/enum/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/file/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/func/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/page/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/relates/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/author/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/par/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/overload/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/example/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/include/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/qtstyle/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/jdstyle/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/structcmd/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/autolink/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/restypedef/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/afterdoc/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/template/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/tag/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/group/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/memgrp/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/docstring/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/pyexample/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/tclexample/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/mux/html/index.html
- ${PROJECT_BINARY_DIR}/html/examples/manual/html/index.html
+ ${EXAMPLES_RES}
${DIAGRAM_EXAMPLE}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/examples
)
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen class.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/class/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/class/latex/refman_doc.tex
- DEPENDS doxygen class.h class.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/class/html/index.html ${PROJECT_BINARY_DIR}/html/examples/class/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen define.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/define/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/define/latex/refman_doc.tex
- DEPENDS doxygen define.h define.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/define/html/index.html ${PROJECT_BINARY_DIR}/html/examples/define/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen enum.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/enum/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/enum/latex/refman_doc.tex
- DEPENDS doxygen enum.h enum.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/enum/html/index.html ${PROJECT_BINARY_DIR}/html/examples/enum/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen file.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/file/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/file/latex/refman_doc.tex
- DEPENDS doxygen file.h file.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/file/html/index.html ${PROJECT_BINARY_DIR}/html/examples/file/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen func.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/func/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/func/latex/refman_doc.tex
- DEPENDS doxygen func.h func.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/func/html/index.html ${PROJECT_BINARY_DIR}/html/examples/func/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen javadoc-banner.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/latex/refman_doc.tex
- DEPENDS doxygen javadoc-banner.h javadoc-banner.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/html/index.html ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen page.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/page/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/page/latex/refman_doc.tex
- DEPENDS doxygen page.doc page.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/page/html/index.html ${PROJECT_BINARY_DIR}/html/examples/page/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen relates.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/relates/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/relates/latex/refman_doc.tex
- DEPENDS doxygen relates.cpp relates.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/relates/html/index.html ${PROJECT_BINARY_DIR}/html/examples/relates/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen author.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/author/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/author/latex/refman_doc.tex
- DEPENDS doxygen author.cpp author.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/author/html/index.html ${PROJECT_BINARY_DIR}/html/examples/author/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen par.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/par/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/par/latex/refman_doc.tex
- DEPENDS doxygen par.cpp par.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/par/html/index.html ${PROJECT_BINARY_DIR}/html/examples/par/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen overload.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/overload/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/overload/latex/refman_doc.tex
- DEPENDS doxygen overload.cpp overload.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/overload/html/index.html ${PROJECT_BINARY_DIR}/html/examples/overload/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen example.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/example/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/example/latex/refman_doc.tex
- DEPENDS doxygen example.cpp example_test.cpp example.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/example/html/index.html ${PROJECT_BINARY_DIR}/html/examples/example/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen include.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/include/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/include/latex/refman_doc.tex
- DEPENDS doxygen include.cpp include_test.cpp include.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/include/html/index.html ${PROJECT_BINARY_DIR}/html/examples/include/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen qtstyle.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/qtstyle/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/qtstyle/latex/refman_doc.tex
- DEPENDS doxygen qtstyle.cpp qtstyle.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/qtstyle/html/index.html ${PROJECT_BINARY_DIR}/html/examples/qtstyle/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen jdstyle.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/jdstyle/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/jdstyle/latex/refman_doc.tex
- DEPENDS doxygen jdstyle.cpp jdstyle.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/jdstyle/html/index.html ${PROJECT_BINARY_DIR}/html/examples/jdstyle/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen structcmd.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/structcmd/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/structcmd/latex/refman_doc.tex
- DEPENDS doxygen structcmd.h structcmd.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/structcmd/html/index.html ${PROJECT_BINARY_DIR}/html/examples/structcmd/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen autolink.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/autolink/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/autolink/latex/refman_doc.tex
- DEPENDS doxygen autolink.cpp autolink.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/autolink/html/index.html ${PROJECT_BINARY_DIR}/html/examples/autolink/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen tag.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/tag/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/tag/latex/refman_doc.tex
- DEPENDS doxygen tag.cpp tag.cfg ${PROJECT_BINARY_DIR}/html/examples/example/html/index.html ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/tag/html/index.html ${PROJECT_BINARY_DIR}/html/examples/tag/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen restypedef.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/restypedef/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/restypedef/latex/refman_doc.tex
- DEPENDS doxygen restypedef.cpp restypedef.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/restypedef/html/index.html ${PROJECT_BINARY_DIR}/html/examples/restypedef/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen afterdoc.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/afterdoc/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/afterdoc/latex/refman_doc.tex
- DEPENDS doxygen afterdoc.h afterdoc.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/afterdoc/html/index.html ${PROJECT_BINARY_DIR}/html/examples/afterdoc/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen templ.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/template/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/template/latex/refman_doc.tex
- DEPENDS doxygen templ.cpp templ.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/template/html/index.html ${PROJECT_BINARY_DIR}/html/examples/template/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen group.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/group/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/group/latex/refman_doc.tex
- DEPENDS doxygen group.cpp group.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/group/html/index.html ${PROJECT_BINARY_DIR}/html/examples/group/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen memgrp.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/memgrp/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/memgrp/latex/refman_doc.tex
- DEPENDS doxygen memgrp.cpp memgrp.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/memgrp/html/index.html ${PROJECT_BINARY_DIR}/html/examples/memgrp/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen pyexample.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/pyexample/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/pyexample/latex/refman_doc.tex
- DEPENDS doxygen pyexample.py pyexample.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/pyexample/html/index.html ${PROJECT_BINARY_DIR}/html/examples/pyexample/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen tclexample.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/tclexample/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/tclexample/latex/refman_doc.tex
- DEPENDS doxygen tclexample.tcl tclexample.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/tclexample/html/index.html ${PROJECT_BINARY_DIR}/html/examples/tclexample/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen mux.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/mux/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/mux/latex/refman_doc.tex
- DEPENDS doxygen mux.vhdl mux.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/mux/html/index.html ${PROJECT_BINARY_DIR}/html/examples/mux/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen manual.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/manual/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/manual/latex/refman_doc.tex
- DEPENDS doxygen manual.c manual.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/manual/html/index.html ${PROJECT_BINARY_DIR}/html/examples/manual/latex/refman_doc.tex
-)
-
-add_custom_command(
- COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen docstring.cfg
- COMMAND ${PYTHON_EXECUTABLE} ${TOP}/examples/strip_example.py < ${PROJECT_BINARY_DIR}/html/examples/docstring/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/docstring/latex/refman_doc.tex
- DEPENDS doxygen docstring.py docstring.cfg ${TOP}/examples/strip_example.py
- OUTPUT ${PROJECT_BINARY_DIR}/html/examples/docstring/html/index.html ${PROJECT_BINARY_DIR}/html/examples/docstring/latex/refman_doc.tex
-)
-
if (DOT)
add_custom_command(
COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen diagrams.cfg
diff --git a/examples/templ.cfg b/examples/templ.cfg
index 9d42e79..c34633f 100644
--- a/examples/templ.cfg
+++ b/examples/templ.cfg
@@ -1,5 +1,5 @@
PROJECT_NAME = "Template Test"
-OUTPUT_DIRECTORY = ../html/examples/template
+OUTPUT_DIRECTORY = ../html/examples/templ
GENERATE_LATEX = YES
GENERATE_MAN = NO
GENERATE_RTF = NO
diff --git a/libversion/CMakeLists.txt b/libversion/CMakeLists.txt
index 34e8655..6952cea 100644
--- a/libversion/CMakeLists.txt
+++ b/libversion/CMakeLists.txt
@@ -7,6 +7,7 @@ set(POST_CONFIGURE_DOXYGEN_VERSION_FILE "${GENERATED_SRC}/doxyversion.cpp")
# setup information for git version handling
set(PRE_CONFIGURE_GIT_VERSION_FILE "${CMAKE_SOURCE_DIR}/libversion/gitversion.cpp.in")
set(POST_CONFIGURE_GIT_VERSION_FILE "${GENERATED_SRC}/gitversion.cpp")
+set(GIT_STATE_FILE "${GENERATED_SRC}/git_state")
include(${CMAKE_SOURCE_DIR}/cmake/git_watcher.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/doxygen_version.cmake)
@@ -25,3 +26,4 @@ add_dependencies( doxygen_version check_doxygen_version )
set_source_files_properties(${POST_CONFIGURE_GIT_VERSION_FILE} PROPERTIES GENERATED 1)
set_source_files_properties(${POST_CONFIGURE_DOXYGEN_VERSION_FILE} PROPERTIES GENERATED 1)
+set_source_files_properties(${GIT_STATE_FILE} PROPERTIES GENERATED 1)
diff --git a/qtools/qcstring.h b/qtools/qcstring.h
index c2a5dc3..e1414b5 100644
--- a/qtools/qcstring.h
+++ b/qtools/qcstring.h
@@ -391,7 +391,7 @@ public:
// resizes LSData so it can hold size bytes (which includes the 0 terminator!)
// Since this is for long strings only, size should be > SHORT_STR_CAPACITY
- static LSData *resize(LSData *d,int size)
+ static LSData *resize(LSData *d,uint size)
{
if (d->len>0 && d->refCount==0) // non-const, non-empty
{
diff --git a/src/cite.cpp b/src/cite.cpp
index 797881f..612ddc1 100644
--- a/src/cite.cpp
+++ b/src/cite.cpp
@@ -1,6 +1,6 @@
/******************************************************************************
*
- * Copyright (C) 2011 by Dimitri van Heesch
+ * Copyright (C) 2020 by Dimitri van Heesch
* Based on a patch by David Munger
*
* Permission to use, copy, modify, and distribute this software and its
@@ -15,116 +15,112 @@
*/
#include "cite.h"
-#include "portable.h"
#include "config.h"
-#include "message.h"
-#include "util.h"
-#include "language.h"
#include "ftextstream.h"
+#include "language.h"
+#include "message.h"
+#include "portable.h"
#include "resourcemgr.h"
-#include "doxygen.h"
+#include "util.h"
+
+#include <qfile.h>
+#include <qfileinfo.h>
#include <qdir.h>
-//--------------------------------------------------------------------------
+#include <map>
+#include <string>
+
+// Remove the temporary files
+#define RM_TMP_FILES (true)
+//#define RM_TMP_FILES (false)
+
+const char *bibTmpFile = "bibTmpFile_";
+const char *bibTmpDir = "bibTmpDir/";
+
+class CiteInfoImpl : public CiteInfo
+{
+ public:
+ CiteInfoImpl(const char *label, const char *text=0)
+ : m_label(label), m_text(text) { }
+
+ virtual QCString label() const { return m_label; }
+ virtual QCString text() const { return m_text; }
+
+ void setText(const char *s) { m_text = s; }
-const QCString CiteConsts::fileName("citelist");
-/* when changing this also take doxygen.bst into account */
-const QCString CiteConsts::anchorPrefix("CITEREF_");
-const QCString bibTmpFile("bibTmpFile_");
-const QCString bibTmpDir("bibTmpDir/");
+ private:
+ QCString m_label;
+ QCString m_text;
+};
-//--------------------------------------------------------------------------
+struct CitationManager::Private
+{
+ std::map< std::string,std::unique_ptr<CiteInfoImpl> > entries;
+};
-CiteDict::CiteDict(int size) : m_entries(size, FALSE)
-{
- m_entries.setAutoDelete(TRUE);
+CitationManager &CitationManager::instance()
+{
+ static CitationManager ct;
+ return ct;
}
-void CiteDict::writeLatexBibliography(FTextStream &t)
+CitationManager::CitationManager() : p(new Private)
{
- if (m_entries.isEmpty())
- return;
+}
- QCString style = Config_getString(LATEX_BIB_STYLE);
- if (style.isEmpty())
- style="plain";
- QCString unit;
- if (Config_getBool(COMPACT_LATEX))
- unit = "section";
- else
- unit = "chapter";
- t << "% Bibliography\n"
- "\\newpage\n"
- "\\phantomsection\n";
- bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
- if (!pdfHyperlinks)
- {
- t << "\\clearemptydoublepage\n";
- t << "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trCiteReferences() << "}\n";
- }
- t << "\\bibliographystyle{" << style << "}\n"
- "\\bibliography{";
- QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
- int i = 0;
- const char *bibdata = citeDataList.first();
- while (bibdata)
- {
- QCString bibFile = bibdata;
- // Note: file can now have multiple dots
- if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
- QFileInfo fi(bibFile);
- if (fi.exists())
- {
- if (!bibFile.isEmpty())
- {
- if (i) t << ",";
- i++;
- t << bibTmpFile << QCString().setNum(i);
- }
- }
- bibdata = citeDataList.next();
- }
- t << "}\n";
- if (pdfHyperlinks)
+void CitationManager::insert(const char *label)
+{
+ p->entries.insert(
+ std::make_pair(
+ std::string(label),
+ std::make_unique<CiteInfoImpl>(label)
+ ));
+}
+
+const CiteInfo *CitationManager::find(const char *label) const
+{
+ auto it = p->entries.find(label);
+ if (it!=p->entries.end())
{
- t << "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trCiteReferences() << "}\n";
+ return it->second.get();
}
- t << "\n";
+ return 0;
}
-void CiteDict::insert(const char *label)
+void CitationManager::clear()
{
- m_entries.insert(label,new CiteInfo(label));
+ p->entries.clear();
}
-CiteInfo *CiteDict::find(const char *label) const
+bool CitationManager::isEmpty() const
{
- return label ? m_entries.find(label) : 0;
+ int numFiles = Config_getList(CITE_BIB_FILES).count();
+ return (numFiles==0 || p->entries.empty());
}
-void CiteDict::clear()
+const char *CitationManager::fileName() const
{
- m_entries.clear();
+ return "citelist";
}
-bool CiteDict::isEmpty() const
+const char *CitationManager::anchorPrefix() const
{
- QStrList &citeBibFiles = Config_getList(CITE_BIB_FILES);
- return (citeBibFiles.count()==0 || m_entries.isEmpty());
+ return "CITEREF_";
}
-void CiteDict::generatePage() const
+void CitationManager::generatePage()
{
- //printf("** CiteDict::generatePage() count=%d\n",m_ordering.count());
+ //printf("** CitationManager::generatePage() count=%d\n",m_ordering.count());
// do not generate an empty citations page
if (isEmpty()) return; // nothing to cite
// 0. add cross references from the bib files to the cite dictionary
QFile f;
- QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
- const char *bibdata = citeDataList.first();
- while (bibdata)
+ const QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
+ QStrListIterator li(citeDataList);
+ const char *bibdata = 0;
+ for (li.toFirst() ; (bibdata = li.current()) ; ++li)
{
QCString bibFile = bibdata;
if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
@@ -144,11 +140,11 @@ void CiteDict::generatePage() const
f.readBlock(input.rawData(),fi.size());
f.close();
input.at(fi.size())='\0';
- int p=0,s;
- while ((s=input.find('\n',p))!=-1)
+ int pos=0,s;
+ while ((s=input.find('\n',pos))!=-1)
{
- QCString line = input.mid(p,s-p);
- p=s+1;
+ QCString line = input.mid(pos,s-pos);
+ pos=s+1;
int i;
if ((i = line.find("crossref")) != -1) /* assumption cross reference is on one line and the only item */
@@ -158,7 +154,10 @@ void CiteDict::generatePage() const
if (j!=-1 && k!=-1)
{
QCString label = line.mid(j+1,k-j-1);
- if (!m_entries.find(label)) Doxygen::citeDict->insert(label.data());
+ if (p->entries.find(label.data())==p->entries.end()) // not found yet
+ {
+ insert(label);
+ }
}
}
}
@@ -168,7 +167,6 @@ void CiteDict::generatePage() const
{
err("bib file %s not found!\n",bibFile.data());
}
- bibdata = citeDataList.next();
}
// 1. generate file with markers and citations to OUTPUT_DIRECTORY
@@ -182,11 +180,9 @@ void CiteDict::generatePage() const
FTextStream t(&f);
t << "<!-- BEGIN CITATIONS -->" << endl;
t << "<!--" << endl;
- QDictIterator<CiteInfo> it(m_entries);
- CiteInfo *ci;
- for (it.toFirst();(ci=it.current());++it)
+ for (const auto &it : p->entries)
{
- t << "\\citation{" << ci->label << "}" << endl;
+ t << "\\citation{" << it.second->label() << "}" << endl;
}
t << "-->" << endl;
t << "<!-- END CITATIONS -->" << endl;
@@ -210,9 +206,8 @@ void CiteDict::generatePage() const
QCString bibOutputFiles = "";
QDir thisDir;
thisDir.mkdir(bibOutputDir);
- bibdata = citeDataList.first();
int i = 0;
- while (bibdata)
+ for (li.toFirst() ; (bibdata = li.current()) ; ++li)
{
QCString bibFile = bibdata;
if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
@@ -226,7 +221,6 @@ void CiteDict::generatePage() const
bibOutputFiles = bibOutputFiles + " " + bibTmpDir + bibTmpFile + QCString().setNum(i) + ".bib";
}
}
- bibdata = citeDataList.next();
}
QString oldDir = QDir::currentDirPath();
@@ -260,13 +254,13 @@ void CiteDict::generatePage() const
f.readBlock(input.rawData(),fi.size());
f.close();
input.at(fi.size())='\0';
- int p=0,s;
+ int pos=0,s;
//printf("input=[%s]\n",input.data());
- while ((s=input.find('\n',p))!=-1)
+ while ((s=input.find('\n',pos))!=-1)
{
- QCString line = input.mid(p,s-p);
- //printf("p=%d s=%d line=[%s]\n",p,s,line.data());
- p=s+1;
+ QCString line = input.mid(pos,s-pos);
+ //printf("pos=%d s=%d line=[%s]\n",pos,s,line.data());
+ pos=s+1;
if (line.find("<!-- BEGIN BIBLIOGRAPHY")!=-1) insideBib=TRUE;
else if (line.find("<!-- END BIBLIOGRAPH")!=-1) insideBib=FALSE;
@@ -281,12 +275,12 @@ void CiteDict::generatePage() const
QCString label = line.mid(i+14,j-i-14);
QCString number = line.mid(j+2,k-j-1);
label = substitute(substitute(label,"&ndash;","--"),"&mdash;","---");
- CiteInfo *ci = m_entries.find(label);
- //printf("label='%s' number='%s' => %p\n",label.data(),number.data(),ci);
line = line.left(i+14) + label + line.right(line.length()-j);
- if (ci)
+ auto it = p->entries.find(label.data());
+ //printf("label='%s' number='%s' => %p\n",label.data(),number.data(),it->second.get());
+ if (it!=p->entries.end())
{
- ci->text = number;
+ it->second->setText(number);
}
}
}
@@ -295,19 +289,17 @@ void CiteDict::generatePage() const
//printf("doc=[%s]\n",doc.data());
// 7. add it as a page
- addRelatedPage(CiteConsts::fileName,
- theTranslator->trCiteReferences(),doc,CiteConsts::fileName,1);
+ addRelatedPage(fileName(),theTranslator->trCiteReferences(),doc,fileName(),1);
// 8. for latex we just copy the bib files to the output and let
// latex do this work.
if (Config_getBool(GENERATE_LATEX))
{
// copy bib files to the latex output dir
- QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
+ const QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
QCString latexOutputDir = Config_getString(LATEX_OUTPUT)+"/";
int i = 0;
- const char *bibdata = citeDataList.first();
- while (bibdata)
+ for (li.toFirst() ; (bibdata = li.current()) ; ++li)
{
QCString bibFile = bibdata;
// Note: file can now have multiple dots
@@ -327,21 +319,80 @@ void CiteDict::generatePage() const
{
err("bib file %s not found!\n",bibFile.data());
}
- bibdata = citeDataList.next();
}
}
// 9. Remove temporary files
- thisDir.remove(citeListFile);
- thisDir.remove(doxygenBstFile);
- thisDir.remove(bib2xhtmlFile);
- // we might try to remove too many files as empty files didn't get a corresponding new file
- // but the remove function does not emit an error for it and we don't catch the error return
- // so no problem.
- for (unsigned int j = 1; j <= citeDataList.count(); j++)
+ if (RM_TMP_FILES)
+ {
+ thisDir.remove(citeListFile);
+ thisDir.remove(doxygenBstFile);
+ thisDir.remove(bib2xhtmlFile);
+ // we might try to remove too many files as empty files didn't get a corresponding new file
+ // but the remove function does not emit an error for it and we don't catch the error return
+ // so no problem.
+ for (unsigned int j = 1; j <= citeDataList.count(); j++)
+ {
+ thisDir.remove(bibOutputDir + bibTmpFile + QCString().setNum(j) + ".bib");
+ }
+ thisDir.rmdir(bibOutputDir);
+ }
+}
+
+void CitationManager::writeLatexBibliography(FTextStream &t) const
+{
+ if (p->entries.empty()) return;
+
+ QCString style = Config_getString(LATEX_BIB_STYLE);
+ if (style.isEmpty())
+ {
+ style="plain";
+ }
+ QCString unit;
+ if (Config_getBool(COMPACT_LATEX))
+ {
+ unit = "section";
+ }
+ else
+ {
+ unit = "chapter";
+ }
+ t << "% Bibliography\n"
+ "\\newpage\n"
+ "\\phantomsection\n";
+ bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
+ if (!pdfHyperlinks)
{
- thisDir.remove(bibOutputDir + bibTmpFile + QCString().setNum(j) + ".bib");
+ t << "\\clearemptydoublepage\n";
+ t << "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trCiteReferences() << "}\n";
}
- thisDir.rmdir(bibOutputDir);
+ t << "\\bibliographystyle{" << style << "}\n"
+ "\\bibliography{";
+ QStrList &citeDataList = Config_getList(CITE_BIB_FILES);
+ int i = 0;
+ QStrListIterator li(citeDataList);
+ const char *bibdata = 0;
+ for (li.toFirst() ; (bibdata = li.current()) ; ++li)
+ {
+ QCString bibFile = bibdata;
+ // Note: file can now have multiple dots
+ if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib";
+ QFileInfo fi(bibFile);
+ if (fi.exists())
+ {
+ if (!bibFile.isEmpty())
+ {
+ if (i) t << ",";
+ i++;
+ t << bibTmpFile << QCString().setNum(i);
+ }
+ }
+ }
+ t << "}\n";
+ if (pdfHyperlinks)
+ {
+ t << "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trCiteReferences() << "}\n";
+ }
+ t << "\n";
}
diff --git a/src/cite.h b/src/cite.h
index 1c59553..4666d5a 100644
--- a/src/cite.h
+++ b/src/cite.h
@@ -1,8 +1,6 @@
/******************************************************************************
*
- *
- *
- * Copyright (C) 2011 by Dimitri van Heesch
+ * Copyright (C) 2020 by Dimitri van Heesch
* Based on a patch by David Munger
*
* Permission to use, copy, modify, and distribute this software and its
@@ -16,83 +14,64 @@
*
*/
-#ifndef CITEDB_H
-#define CITEDB_H
+#ifndef CITE_H
+#define CITE_H
-#include <qdict.h>
+#include <memory>
-class FTextStream;
+#include <qcstring.h>
-/// String constants for citations
-struct CiteConsts
-{
- static const QCString fileName;
- static const QCString anchorPrefix;
-};
+class FTextStream;
/// Citation-related data.
struct CiteInfo
{
- CiteInfo(const char *label_, const char *text_=0, const char *fullText_=0,
- const char *ref_=0) :
- label(label_), text(text_), fullText(fullText_), ref(ref_)
- { }
-
- CiteInfo(const CiteInfo &o)
- { label=o.label.copy(); text=o.text.copy(); fullText=o.fullText.copy(); ref=o.ref.copy(); }
-
- QCString label;
- QCString text;
- QCString fullText;
- QCString ref;
-
+ virtual ~CiteInfo() {}
+ virtual QCString label() const = 0;
+ virtual QCString text() const = 0;
};
/**
- * @brief Cite database access class.
- * @details This class provides access do the database of bibliographic
+ * @brief Citation manager class.
+ * @details This class provides access do the database of bibliographic
* references through the bibtex backend.
*/
-class CiteDict
+class CitationManager
{
public:
- /** Create the database, with an expected maximum of \a size entries */
- CiteDict(int size);
-
-// /** Resolve references to citations */
-// void resolve();
+ static CitationManager &instance();
/** Insert a citation identified by \a label into the database */
void insert(const char *label);
- /** Return the citation info for a given \a label */
- CiteInfo *find(const char *label) const;
+ /** Return the citation info for a given \a label.
+ * Ownership of the info stays with the manager.
+ */
+ const CiteInfo *find(const char *label) const;
/** Generate the citations page */
- void generatePage() const;
+ void generatePage();
/** clears the database */
void clear();
- /** return TRUE if there are no citations.
- * Only valid after calling resolve()
+ /** return TRUE if there are no citations.
*/
bool isEmpty() const;
- /** writes the latex code for the standard bibliography
- * section to text stream \a t
+ /** writes the latex code for the standard bibliography
+ * section to text stream \a t
*/
- void writeLatexBibliography(FTextStream &t);
+ void writeLatexBibliography(FTextStream &t) const;
+
+ const char *fileName() const;
+ const char *anchorPrefix() const;
private:
-// bool writeAux();
-// bool writeBst();
-// bool execute();
-// void parse();
-// void clean();
- QDict<CiteInfo> m_entries;
-// QList<QCString> m_ordering;
- QCString m_baseFileName;
+ /** Create the database, with an expected maximum of \a size entries */
+ CitationManager();
+ struct Private;
+ std::unique_ptr<Private> p;
};
-#endif
+#endif // CITE_H
diff --git a/src/classdef.cpp b/src/classdef.cpp
index 61ae528..2124817 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -4424,7 +4424,7 @@ void ClassDefImpl::addListReferences()
if (!isLinkableInProject()) return;
//printf("ClassDef(%s)::addListReferences()\n",name().data());
{
- const std::vector<ListItemInfo> &xrefItems = xrefListItems();
+ const std::vector<RefItem*> &xrefItems = xrefListItems();
addRefItem(xrefItems,
qualifiedName(),
lang==SrcLangExt_Fortran ? theTranslator->trType(TRUE,TRUE)
diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp
index e62aa4f..372ba5b 100644
--- a/src/cmdmapper.cpp
+++ b/src/cmdmapper.cpp
@@ -149,6 +149,10 @@ CommandMap cmdMap[] =
{ "---", CMD_MDASH },
{ "_setscope", CMD_SETSCOPE },
{ "emoji", CMD_EMOJI },
+ { "rtfinclude", CMD_RTFINCLUDE },
+ { "docbookinclude",CMD_DOCBOOKINCLUDE },
+ { "maninclude", CMD_MANINCLUDE },
+ { "xmlinclude", CMD_XMLINCLUDE },
{ 0, 0 },
};
diff --git a/src/cmdmapper.h b/src/cmdmapper.h
index 246be9d..a86c20a 100644
--- a/src/cmdmapper.h
+++ b/src/cmdmapper.h
@@ -138,7 +138,11 @@ enum CommandType
CMD_SNIPPETDOC = 108,
CMD_SNIPWITHLINES= 109,
CMD_EMOJI = 110,
- CMD_EQUAL = 111
+ CMD_EQUAL = 111,
+ CMD_RTFINCLUDE = 112,
+ CMD_DOCBOOKINCLUDE= 113,
+ CMD_MANINCLUDE = 114,
+ CMD_XMLINCLUDE = 115
};
enum HtmlTagType
diff --git a/src/code.l b/src/code.l
index fb609e5..ee3876b 100644
--- a/src/code.l
+++ b/src/code.l
@@ -18,6 +18,9 @@
%option prefix="codeYY"
%option reentrant
%option extra-type="struct codeYY_state *"
+%top{
+#include <stdint.h>
+}
%{
diff --git a/src/commentcnv.l b/src/commentcnv.l
index f3367a4..279f428 100644
--- a/src/commentcnv.l
+++ b/src/commentcnv.l
@@ -18,6 +18,9 @@
%option prefix="commentcnvYY"
%option reentrant
%option extra-type="struct commentcnvYY_state *"
+%top{
+#include <stdint.h>
+}
%{
@@ -349,6 +352,17 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
yyextra->blockName=&yytext[1];
BEGIN(VerbatimCode);
}
+<CComment,ReadLine>^[ \t]*("```"[`]*|"~~~"[~]*) { /* start of markdown code block */
+ if (!Config_getBool(MARKDOWN_SUPPORT))
+ {
+ REJECT;
+ }
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ yyextra->lastCommentContext = YY_START;
+ yyextra->javaBlock=0;
+ yyextra->blockName=QCString(yytext).stripWhiteSpace().left(3);
+ BEGIN(VerbatimCode);
+ }
<CComment,ReadLine>[\\@]("dot"|"code"|"msc"|"startuml")/[^a-z_A-Z0-9] { /* start of a verbatim block */
copyToOutput(yyscanner,yytext,(int)yyleng);
yyextra->lastCommentContext = YY_START;
@@ -427,6 +441,13 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
}
}
}
+<VerbatimCode>("```"[`]*|"~~~"[~]*) { /* end of markdown code block */
+ copyToOutput(yyscanner,yytext,(int)yyleng);
+ if (yytext[0]==yyextra->blockName[0])
+ {
+ BEGIN(yyextra->lastCommentContext);
+ }
+ }
<VerbatimCode>[\\@]("enddot"|"endcode"|"endmsc"|"enduml") { /* end of verbatim block */
copyToOutput(yyscanner,yytext,(int)yyleng);
if (&yytext[4]==yyextra->blockName)
@@ -457,7 +478,7 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
}
}
}
-<Verbatim,VerbatimCode>[^@\/\\\n{}]* { /* any character not a backslash or new line or } */
+<Verbatim,VerbatimCode>[^`~@\/\\\n{}]* { /* any character not a backslash or new line or } */
copyToOutput(yyscanner,yytext,(int)yyleng);
}
<Verbatim,VerbatimCode>\n { /* new line in verbatim block */
@@ -526,7 +547,7 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
copyToOutput(yyscanner,yytext,(int)yyleng);
}
-<CComment>[^ <\\!@*\n{\"\/]* { /* anything that is not a '*' or command */
+<CComment>[^ `~<\\!@*\n{\"\/]* { /* anything that is not a '*' or command */
copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment>"*"+[^*/\\@\n{\"]* { /* stars without slashes */
@@ -546,7 +567,7 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
}
}
<CComment>\n { /* new line in comment */
- copyToOutput(yyscanner,yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
/* in case of Fortran always end of comment */
if (yyextra->lang==SrcLangExt_Fortran)
{
@@ -554,16 +575,20 @@ MAILADR ("mailto:")?[a-z_A-Z0-9.+-]+"@"[a-z_A-Z0-9-]+("."[a-z_A-Z0-9\-]+)+[a-z
}
}
<CComment>"/"+"*" { /* nested C comment */
- if ((yyextra->lang==SrcLangExt_Python) || (yyextra->lang==SrcLangExt_Tcl))
+ if (yyextra->lang==SrcLangExt_Python ||
+ yyextra->lang==SrcLangExt_Tcl ||
+ yyextra->lang==SrcLangExt_Markdown)
{
REJECT;
}
yyextra->nestingCount++;
yyextra->commentStack.push(new CommentCtx(yyextra->lineNr));
- copyToOutput(yyscanner,yytext,(int)yyleng);
+ copyToOutput(yyscanner,yytext,(int)yyleng);
}
<CComment>"*"+"/" { /* end of C comment */
- if ((yyextra->lang==SrcLangExt_Python) || (yyextra->lang==SrcLangExt_Tcl))
+ if (yyextra->lang==SrcLangExt_Python ||
+ yyextra->lang==SrcLangExt_Tcl ||
+ yyextra->lang==SrcLangExt_Markdown)
{
REJECT;
}
diff --git a/src/commentscan.h b/src/commentscan.h
index f471890..be92920 100644
--- a/src/commentscan.h
+++ b/src/commentscan.h
@@ -16,74 +16,78 @@
#ifndef COMMENTSCAN_H
#define COMMENTSCAN_H
+#include <memory>
#include "types.h"
class Entry;
class OutlineParserInterface;
/** @file
- * @brief Interface for the comment block parser */
+ * @brief Interface for the comment block scanner */
-/** Invokes the comment block parser with the request to preprocess a
- * single comment block.
- * @param[in] comment A string representing the actual comment block.
- * Note that leading *'s are already stripped from the comment block.
- * @param[in] fileName The name of the file in which the comment is found.
- * Mainly used for producing warnings.
- * @param[in] lineNr The line number at which the comment block was found.
- * @returns The prepocessed comment block
- */
-QCString preprocessCommentBlock(const QCString &comment,
- const QCString &fileName,
- int lineNr);
-
-/** Invokes the comment block parser with the request to parse a
- * single comment block.
- * @param[in] parser The language parse that invoked this function.
- * The comment block parse may invoke
- * ParserInterface::parsePrototype() in order to parse
- * the argument of a @@fn command.
- * @param[in] curEntry The Entry to which the comment block belongs.
- * Any information (like documentation) that is found in
- * the comment block will be stored in this entry.
- * @param[in] comment A string representing the actual comment block.
- * Note that leading *'s are already stripped from the comment block.
- * @param[in] fileName The name of the file in which the comment is found.
- * Mainly used for producing warnings.
- * @param[in,out] lineNr The line number at which the comment block was found.
- * When the function returns it will be set to the last line parsed.
- * @param[in] isBrief TRUE iff this comment block represents a brief description.
- * @param[in] isJavadocStyle TRUE iff this comment block is in "Javadoc" style.
- * This means that it starts as a brief description until the end of
- * the sentences is found and then proceeds as a detailed description.
- * @param[in] isInbody TRUE iff this comment block is located in the body of
- * a function.
- * @param[in,out] prot The protection level in which this comment block was
- * found. Commands in the comment block may override this.
- * @param[in,out] position The character position within \a comment where the
- * comment block starts. Typically used in case the comment block
- * contains multiple structural commands.
- * @param[out] newEntryNeeded Boolean that is TRUE if the comment block parser
- * finds that a the comment block finishes the entry and a new one
- * needs to be started.
- * @returns TRUE if the comment requires further processing. The
- * parameter \a newEntryNeeded will typically be true in this case and
- * \a position will indicate the offset inside the \a comment string
- * where to proceed parsing. FALSE indicates no further processing is
- * needed.
- */
-bool parseCommentBlock(OutlineParserInterface *parser,
- Entry *curEntry,
- const QCString &comment,
- const QCString &fileName,
- int &lineNr,
- bool isBrief,
- bool isJavadocStyle,
- bool isInbody,
- Protection &prot,
- int &position,
- bool &newEntryNeeded
- );
+class CommentScanner
+{
+ public:
+ CommentScanner();
+ ~CommentScanner();
+ /** Invokes the comment block parser with the request to parse a
+ * single comment block.
+ * @param[in] parser The language parse that invoked this function.
+ * The comment block parse may invoke
+ * ParserInterface::parsePrototype() in order to parse
+ * the argument of a @@fn command.
+ * @param[in] curEntry The Entry to which the comment block belongs.
+ * Any information (like documentation) that is found in
+ * the comment block will be stored in this entry.
+ * @param[in] comment A string representing the actual comment block.
+ * Note that leading *'s are already stripped from the comment block.
+ * @param[in] fileName The name of the file in which the comment is found.
+ * Mainly used for producing warnings.
+ * @param[in,out] lineNr The line number at which the comment block was found.
+ * When the function returns it will be set to the last line parsed.
+ * @param[in] isBrief TRUE iff this comment block represents a brief description.
+ * @param[in] isJavadocStyle TRUE iff this comment block is in "Javadoc" style.
+ * This means that it starts as a brief description until the end of
+ * the sentences is found and then proceeds as a detailed description.
+ * @param[in] isInbody TRUE iff this comment block is located in the body of
+ * a function.
+ * @param[in,out] prot The protection level in which this comment block was
+ * found. Commands in the comment block may override this.
+ * @param[in,out] position The character position within \a comment where the
+ * comment block starts. Typically used in case the comment block
+ * contains multiple structural commands.
+ * @param[out] newEntryNeeded Boolean that is TRUE if the comment block parser
+ * finds that a the comment block finishes the entry and a new one
+ * needs to be started.
+ * @returns TRUE if the comment requires further processing. The
+ * parameter \a newEntryNeeded will typically be true in this case and
+ * \a position will indicate the offset inside the \a comment string
+ * where to proceed parsing. FALSE indicates no further processing is
+ * needed.
+ */
+ bool parseCommentBlock(OutlineParserInterface *parser,
+ Entry *curEntry,
+ const QCString &comment,
+ const QCString &fileName,
+ int &lineNr,
+ bool isBrief,
+ bool isJavadocStyle,
+ bool isInbody,
+ Protection &prot,
+ int &position,
+ bool &newEntryNeeded
+ );
+ void initGroupInfo(Entry *entry);
+ void enterFile(const char *fileName,int lineNr);
+ void leaveFile(const char *fileName,int lineNr);
+ void enterCompound(const char *fileName,int line,const char *name);
+ void leaveCompound(const char *fileName,int line,const char *name);
+ void open(Entry *e,const char *fileName,int line,bool implicit=false);
+ void close(Entry *e,const char *fileName,int line,bool foundInline,bool implicit=false);
+ private:
+ struct Private;
+ std::unique_ptr<Private> p;
+};
#endif
diff --git a/src/commentscan.l b/src/commentscan.l
index d7cf3c8..053436c 100644
--- a/src/commentscan.l
+++ b/src/commentscan.l
@@ -1,6 +1,6 @@
/*****************************************************************************
*
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2020 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -15,340 +15,285 @@
%option never-interactive
%option prefix="commentscanYY"
+%option reentrant
+%option extra-type="struct commentscanYY_state *"
+%top{
+#include <stdint.h>
+}
%{
/*
* includes
*/
+
+#include <map>
+#include <stack>
+#include <string>
+
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <ctype.h>
-#include <qarray.h>
-#include <qstack.h>
-#include <qregexp.h>
-#include <qfile.h>
+#include <qcstring.h>
#include <qcstringlist.h>
-#include "scanner.h"
-#include "entry.h"
+
+#include "cite.h"
+#include "commentscan.h"
+#include "condparser.h"
+#include "config.h"
+#include "debug.h"
+#include "docgroup.h"
#include "doxygen.h"
+#include "entry.h"
+#include "formula.h"
+#include "language.h"
#include "message.h"
-#include "config.h"
+#include "parserintf.h"
+#include "reflist.h"
+#include "section.h"
#include "util.h"
-#include "index.h"
-#include "defargs.h"
-#include "language.h"
-#include "outputlist.h"
-#include "membergroup.h"
#include "reflist.h"
-#include "debug.h"
-#include "parserintf.h"
-#include "cite.h"
-#include "markdown.h"
-#include "condparser.h"
-#include "formula.h"
-
-#define YY_NO_INPUT 1
-#define YY_NO_UNISTD_H 1
// forward declarations
-static bool handleBrief(const QCString &, const QCStringList &);
-static bool handleFn(const QCString &, const QCStringList &);
-static bool handleDef(const QCString &, const QCStringList &);
-static bool handleOverload(const QCString &, const QCStringList &);
-static bool handleEnum(const QCString &, const QCStringList &);
-static bool handleDefGroup(const QCString &, const QCStringList &);
-static bool handleAddToGroup(const QCString &, const QCStringList &);
-static bool handleWeakGroup(const QCString &, const QCStringList &);
-static bool handleNamespace(const QCString &, const QCStringList &);
-static bool handlePackage(const QCString &, const QCStringList &);
-static bool handleClass(const QCString &, const QCStringList &);
-static bool handleHeaderFile(const QCString &, const QCStringList &);
-static bool handleProtocol(const QCString &, const QCStringList &);
-static bool handleCategory(const QCString &, const QCStringList &);
-static bool handleUnion(const QCString &, const QCStringList &);
-static bool handleStruct(const QCString &, const QCStringList &);
-static bool handleInterface(const QCString &, const QCStringList &);
-static bool handleIdlException(const QCString &, const QCStringList &);
-static bool handlePage(const QCString &, const QCStringList &);
-static bool handleMainpage(const QCString &, const QCStringList &);
-static bool handleFile(const QCString &, const QCStringList &);
-static bool handleDir(const QCString &, const QCStringList &);
-static bool handleExample(const QCString &, const QCStringList &);
-static bool handleDetails(const QCString &, const QCStringList &);
-static bool handleNoop(const QCString &, const QCStringList &);
-static bool handleName(const QCString &, const QCStringList &);
-static bool handleTodo(const QCString &, const QCStringList &);
-static bool handleTest(const QCString &, const QCStringList &);
-static bool handleBug(const QCString &, const QCStringList &);
-static bool handleSubpage(const QCString &s, const QCStringList &);
-static bool handleDeprecated(const QCString &, const QCStringList &);
-static bool handleXRefItem(const QCString &, const QCStringList &);
-static bool handleRelated(const QCString &, const QCStringList &);
-static bool handleRelatedAlso(const QCString &, const QCStringList &);
-static bool handleMemberOf(const QCString &, const QCStringList &);
-static bool handleRefItem(const QCString &, const QCStringList &);
-static bool handleSection(const QCString &, const QCStringList &);
-static bool handleAnchor(const QCString &, const QCStringList &);
-static bool handleCite(const QCString &, const QCStringList &);
-static bool handleFormatBlock(const QCString &, const QCStringList &);
-static bool handleAddIndex(const QCString &, const QCStringList &);
-static bool handleIf(const QCString &, const QCStringList &);
-static bool handleIfNot(const QCString &, const QCStringList &);
-static bool handleElseIf(const QCString &, const QCStringList &);
-static bool handleElse(const QCString &, const QCStringList &);
-static bool handleEndIf(const QCString &, const QCStringList &);
-static bool handleIngroup(const QCString &, const QCStringList &);
-static bool handleNoSubGrouping(const QCString &, const QCStringList &);
-static bool handleShowInitializer(const QCString &, const QCStringList &);
-static bool handleHideInitializer(const QCString &, const QCStringList &);
-static bool handleCallgraph(const QCString &, const QCStringList &);
-static bool handleHideCallgraph(const QCString &, const QCStringList &);
-static bool handleCallergraph(const QCString &, const QCStringList &);
-static bool handleHideCallergraph(const QCString &, const QCStringList &);
-static bool handleReferencedByRelation(const QCString &, const QCStringList &);
-static bool handleHideReferencedByRelation(const QCString &, const QCStringList &);
-static bool handleReferencesRelation(const QCString &, const QCStringList &);
-static bool handleHideReferencesRelation(const QCString &, const QCStringList &);
-static bool handleInternal(const QCString &, const QCStringList &);
-static bool handleLineBr(const QCString &, const QCStringList &);
-static bool handleStatic(const QCString &, const QCStringList &);
-static bool handlePure(const QCString &, const QCStringList &);
-static bool handlePrivate(const QCString &, const QCStringList &);
-static bool handlePrivateSection(const QCString &, const QCStringList &);
-static bool handleProtected(const QCString &, const QCStringList &);
-static bool handleProtectedSection(const QCString &, const QCStringList &);
-static bool handlePublic(const QCString &s, const QCStringList &);
-static bool handlePublicSection(const QCString &s, const QCStringList &);
-static bool handleToc(const QCString &s, const QCStringList &);
-static bool handleInherit(const QCString &, const QCStringList &);
-static bool handleExtends(const QCString &, const QCStringList &);
-static bool handleCopyDoc(const QCString &, const QCStringList &);
-static bool handleCopyBrief(const QCString &, const QCStringList &);
-static bool handleCopyDetails(const QCString &, const QCStringList &);
-static bool handleParBlock(const QCString &, const QCStringList &);
-static bool handleEndParBlock(const QCString &, const QCStringList &);
-static bool handleParam(const QCString &, const QCStringList &);
-static bool handleRetval(const QCString &, const QCStringList &);
+static bool handleBrief(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleFn(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleDef(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleOverload(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleEnum(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleNamespace(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handlePackage(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleClass(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleProtocol(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleCategory(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleUnion(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleStruct(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleInterface(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleIdlException(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handlePage(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleMainpage(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleFile(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleDir(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleExample(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleDetails(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleNoop(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleName(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleTodo(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleTest(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleBug(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const QCStringList &);
+static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleRelated(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleMemberOf(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleSection(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleAnchor(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleCite(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleFormatBlock(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleIf(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleIfNot(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleElseIf(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleElse(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleEndIf(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleIngroup(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleNoSubGrouping(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleShowInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleHideInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleHideCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleHideCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleLineBr(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handlePure(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handlePrivate(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handlePrivateSection(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleProtected(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleProtectedSection(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handlePublic(yyscan_t yyscanner,const QCString &s, const QCStringList &);
+static bool handlePublicSection(yyscan_t yyscanner,const QCString &s, const QCStringList &);
+static bool handleToc(yyscan_t yyscanner,const QCString &s, const QCStringList &);
+static bool handleInherit(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleExtends(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleCopyDoc(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleParam(yyscan_t yyscanner,const QCString &, const QCStringList &);
+static bool handleRetval(yyscan_t yyscanner,const QCString &, const QCStringList &);
static const char *stateToString(int state);
-typedef bool (*DocCmdFunc)(const QCString &name, const QCStringList &optList);
+typedef bool (*DocCmdFunc)(yyscan_t yyscanner,const QCString &name, const QCStringList &optList);
struct DocCmdMap
{
- const char *cmdName;
+ DocCmdMap(DocCmdFunc h,bool b) : handler(h), endsBrief(b) {}
DocCmdFunc handler;
bool endsBrief;
};
// map of command to handler function
-static DocCmdMap docCmdMap[] =
+static const std::map< std::string, DocCmdMap > docCmdMap =
{
// command name handler function ends brief description
- { "brief", &handleBrief, FALSE },
- { "short", &handleBrief, FALSE },
- { "fn", &handleFn, TRUE },
- { "var", &handleFn, TRUE },
- { "typedef", &handleFn, TRUE },
- { "property", &handleFn, TRUE },
- { "def", &handleDef, TRUE },
- { "overload", &handleOverload, FALSE },
- { "enum", &handleEnum, TRUE },
- { "defgroup", &handleDefGroup, TRUE },
- { "addtogroup", &handleAddToGroup, TRUE },
- { "weakgroup", &handleWeakGroup, TRUE },
- { "namespace", &handleNamespace, TRUE },
- { "package", &handlePackage, TRUE },
- { "class", &handleClass, TRUE },
- { "headerfile", &handleHeaderFile, FALSE },
- { "protocol", &handleProtocol, TRUE },
- { "category", &handleCategory, TRUE },
- { "union", &handleUnion, TRUE },
- { "struct", &handleStruct, TRUE },
- { "interface", &handleInterface, TRUE },
- { "idlexcept", &handleIdlException, TRUE },
- { "page", &handlePage, TRUE },
- { "mainpage", &handleMainpage, TRUE },
- { "file", &handleFile, TRUE },
- { "dir", &handleDir, TRUE },
- { "example", &handleExample, FALSE },
- { "details", &handleDetails, TRUE },
- { "name", &handleName, FALSE },
- { "todo", &handleTodo, FALSE }, // end brief will be done differently
- { "test", &handleTest, FALSE }, // end brief will be done differently
- { "bug", &handleBug, FALSE }, // end brief will be done differently
- { "deprecated", &handleDeprecated, FALSE }, // end brief will be done differently
- { "xrefitem", &handleXRefItem, FALSE }, // end brief will be done differently
- { "related", &handleRelated, TRUE },
- { "relates", &handleRelated, TRUE },
- { "relatedalso", &handleRelatedAlso, TRUE },
- { "relatesalso", &handleRelatedAlso, TRUE },
- { "parblock", &handleParBlock, TRUE },
- { "endparblock", &handleEndParBlock, TRUE },
- { "refitem", &handleRefItem, TRUE },
- { "cite", &handleCite, FALSE },
- { "subpage", &handleSubpage, TRUE },
- { "section", &handleSection, TRUE },
- { "subsection", &handleSection, TRUE },
- { "subsubsection", &handleSection, TRUE },
- { "paragraph", &handleSection, TRUE },
- { "anchor", &handleAnchor, TRUE },
- { "verbatim", &handleFormatBlock, TRUE },
- { "latexonly", &handleFormatBlock, FALSE },
- { "htmlonly", &handleFormatBlock, FALSE },
- { "xmlonly", &handleFormatBlock, FALSE },
- { "docbookonly", &handleFormatBlock, FALSE },
- { "rtfonly", &handleFormatBlock, FALSE },
- { "manonly", &handleFormatBlock, FALSE },
- { "dot", &handleFormatBlock, TRUE },
- { "msc", &handleFormatBlock, TRUE },
- { "startuml", &handleFormatBlock, TRUE },
- { "code", &handleFormatBlock, TRUE },
- { "addindex", &handleAddIndex, FALSE },
- { "if", &handleIf, FALSE },
- { "ifnot", &handleIfNot, FALSE },
- { "elseif", &handleElseIf, FALSE },
- { "else", &handleElse, FALSE },
- { "endif", &handleEndIf, FALSE },
- { "ingroup", &handleIngroup, TRUE },
- { "nosubgrouping", &handleNoSubGrouping, FALSE },
- { "showinitializer", &handleShowInitializer, FALSE },
- { "hideinitializer", &handleHideInitializer, FALSE },
- { "callgraph", &handleCallgraph, FALSE },
- { "hidecallgraph", &handleHideCallgraph, FALSE },
- { "callergraph", &handleCallergraph, FALSE },
- { "hidecallergraph", &handleHideCallergraph, FALSE },
- { "showrefby", &handleReferencedByRelation, FALSE },
- { "hiderefby", &handleHideReferencedByRelation, FALSE },
- { "showrefs", &handleReferencesRelation, FALSE },
- { "hiderefs", &handleHideReferencesRelation, FALSE },
- { "internal", &handleInternal, TRUE },
- { "_linebr", &handleLineBr, FALSE },
- { "static", &handleStatic, FALSE },
- { "pure", &handlePure, FALSE },
- { "private", &handlePrivate, FALSE },
- { "privatesection", &handlePrivateSection, FALSE },
- { "protected", &handleProtected, FALSE },
- { "protectedsection",&handleProtectedSection, FALSE },
- { "public", &handlePublic, FALSE },
- { "publicsection", &handlePublicSection, FALSE },
- { "tableofcontents", &handleToc, FALSE },
- { "inherit", &handleInherit, TRUE },
- { "extends", &handleExtends, TRUE },
- { "implements", &handleExtends, TRUE },
- { "memberof", &handleMemberOf, TRUE },
- { "arg", 0, TRUE },
- { "attention", 0, TRUE },
- { "author", 0, TRUE },
- { "authors", 0, TRUE },
- { "copydoc", &handleCopyDoc, TRUE },
- { "copybrief", &handleCopyBrief, FALSE },
- { "copydetails", &handleCopyDetails, TRUE },
- { "copyright", 0, TRUE },
- { "date", 0, TRUE },
- { "dotfile", 0, TRUE },
- { "htmlinclude", 0, FALSE },
- { "image", 0, TRUE },
- { "include", 0, TRUE },
- { "includelineno", 0, TRUE },
- { "invariant", 0, TRUE },
- { "latexinclude", 0, FALSE },
- { "li", 0, TRUE },
- { "line", 0, TRUE },
- { "note", 0, TRUE },
- { "par", 0, TRUE },
- { "param", &handleParam, TRUE },
- { "tparam", 0, TRUE },
- { "post", 0, TRUE },
- { "pre", 0, TRUE },
- { "remark", 0, TRUE },
- { "remarks", 0, TRUE },
- { "result", 0, TRUE },
- { "return", 0, TRUE },
- { "returns", 0, TRUE },
- { "exception", 0, TRUE },
- { "retval", &handleRetval, TRUE },
- { "sa", 0, TRUE },
- { "see", 0, TRUE },
- { "since", 0, TRUE },
- { "throw", 0, TRUE },
- { "throws", 0, TRUE },
- { "until", 0, TRUE },
- { "verbinclude", 0, FALSE },
- { "version", 0, TRUE },
- { "warning", 0, TRUE },
- { "snippet", 0, TRUE },
- { "snippetlineno", 0, TRUE },
- { "noop", &handleNoop, TRUE },
- { 0, 0, FALSE }
-};
-
-/** @brief Command mapper.
- *
- * Maps a command name (as found in a comment block) onto a
- * specific handler function.
- */
-class DocCmdMapper
-{
- public:
- struct Cmd
- {
- DocCmdFunc func;
- bool endsBrief;
- };
-
- /** maps a command name to a handler function */
- static Cmd *map(const char *name)
- {
- return instance()->find(name);
- }
-
- /** release the singleton */
- static void freeInstance()
- {
- delete s_instance; s_instance=0;
- }
-
- private:
- static DocCmdMapper *instance()
- {
- if (s_instance==0) s_instance = new DocCmdMapper;
- return s_instance;
- }
-
- DocCmdMapper() : m_map(113)
- {
- m_map.setAutoDelete(TRUE);
- DocCmdMap *p = docCmdMap;
- while (p->cmdName)
- {
- if (m_map.find(p->cmdName)!=0)
- {
- term("DocCmdMapper: command %s already added\n",p->cmdName);
- }
- Cmd *cmd = new Cmd;
- cmd->func = p->handler;
- cmd->endsBrief = p->endsBrief;
- m_map.insert(p->cmdName,cmd);
- p++;
- }
- }
-
- Cmd *find(const char *name)
- {
- return m_map.find(name);
- }
- QDict<Cmd> m_map;
- static DocCmdMapper *s_instance;
+ { "brief", { &handleBrief, FALSE }},
+ { "short", { &handleBrief, FALSE }},
+ { "fn", { &handleFn, TRUE }},
+ { "var", { &handleFn, TRUE }},
+ { "typedef", { &handleFn, TRUE }},
+ { "property", { &handleFn, TRUE }},
+ { "def", { &handleDef, TRUE }},
+ { "overload", { &handleOverload, FALSE }},
+ { "enum", { &handleEnum, TRUE }},
+ { "defgroup", { &handleDefGroup, TRUE }},
+ { "addtogroup", { &handleAddToGroup, TRUE }},
+ { "weakgroup", { &handleWeakGroup, TRUE }},
+ { "namespace", { &handleNamespace, TRUE }},
+ { "package", { &handlePackage, TRUE }},
+ { "class", { &handleClass, TRUE }},
+ { "headerfile", { &handleHeaderFile, FALSE }},
+ { "protocol", { &handleProtocol, TRUE }},
+ { "category", { &handleCategory, TRUE }},
+ { "union", { &handleUnion, TRUE }},
+ { "struct", { &handleStruct, TRUE }},
+ { "interface", { &handleInterface, TRUE }},
+ { "idlexcept", { &handleIdlException, TRUE }},
+ { "page", { &handlePage, TRUE }},
+ { "mainpage", { &handleMainpage, TRUE }},
+ { "file", { &handleFile, TRUE }},
+ { "dir", { &handleDir, TRUE }},
+ { "example", { &handleExample, FALSE }},
+ { "details", { &handleDetails, TRUE }},
+ { "name", { &handleName, FALSE }},
+ { "todo", { &handleTodo, FALSE }}, // end brief will be done differently
+ { "test", { &handleTest, FALSE }}, // end brief will be done differently
+ { "bug", { &handleBug, FALSE }}, // end brief will be done differently
+ { "deprecated", { &handleDeprecated, FALSE }}, // end brief will be done differently
+ { "xrefitem", { &handleXRefItem, FALSE }}, // end brief will be done differently
+ { "related", { &handleRelated, TRUE }},
+ { "relates", { &handleRelated, TRUE }},
+ { "relatedalso", { &handleRelatedAlso, TRUE }},
+ { "relatesalso", { &handleRelatedAlso, TRUE }},
+ { "parblock", { &handleParBlock, TRUE }},
+ { "endparblock", { &handleEndParBlock, TRUE }},
+ { "refitem", { &handleRefItem, TRUE }},
+ { "cite", { &handleCite, FALSE }},
+ { "subpage", { &handleSubpage, TRUE }},
+ { "section", { &handleSection, TRUE }},
+ { "subsection", { &handleSection, TRUE }},
+ { "subsubsection", { &handleSection, TRUE }},
+ { "paragraph", { &handleSection, TRUE }},
+ { "anchor", { &handleAnchor, TRUE }},
+ { "verbatim", { &handleFormatBlock, TRUE }},
+ { "latexonly", { &handleFormatBlock, FALSE }},
+ { "htmlonly", { &handleFormatBlock, FALSE }},
+ { "xmlonly", { &handleFormatBlock, FALSE }},
+ { "docbookonly", { &handleFormatBlock, FALSE }},
+ { "rtfonly", { &handleFormatBlock, FALSE }},
+ { "manonly", { &handleFormatBlock, FALSE }},
+ { "dot", { &handleFormatBlock, TRUE }},
+ { "msc", { &handleFormatBlock, TRUE }},
+ { "startuml", { &handleFormatBlock, TRUE }},
+ { "code", { &handleFormatBlock, TRUE }},
+ { "addindex", { &handleAddIndex, FALSE }},
+ { "if", { &handleIf, FALSE }},
+ { "ifnot", { &handleIfNot, FALSE }},
+ { "elseif", { &handleElseIf, FALSE }},
+ { "else", { &handleElse, FALSE }},
+ { "endif", { &handleEndIf, FALSE }},
+ { "ingroup", { &handleIngroup, TRUE }},
+ { "nosubgrouping", { &handleNoSubGrouping, FALSE }},
+ { "showinitializer", { &handleShowInitializer, FALSE }},
+ { "hideinitializer", { &handleHideInitializer, FALSE }},
+ { "callgraph", { &handleCallgraph, FALSE }},
+ { "hidecallgraph", { &handleHideCallgraph, FALSE }},
+ { "callergraph", { &handleCallergraph, FALSE }},
+ { "hidecallergraph", { &handleHideCallergraph, FALSE }},
+ { "showrefby", { &handleReferencedByRelation, FALSE }},
+ { "hiderefby", { &handleHideReferencedByRelation, FALSE }},
+ { "showrefs", { &handleReferencesRelation, FALSE }},
+ { "hiderefs", { &handleHideReferencesRelation, FALSE }},
+ { "internal", { &handleInternal, TRUE }},
+ { "_linebr", { &handleLineBr, FALSE }},
+ { "static", { &handleStatic, FALSE }},
+ { "pure", { &handlePure, FALSE }},
+ { "private", { &handlePrivate, FALSE }},
+ { "privatesection", { &handlePrivateSection, FALSE }},
+ { "protected", { &handleProtected, FALSE }},
+ { "protectedsection",{ &handleProtectedSection, FALSE }},
+ { "public", { &handlePublic, FALSE }},
+ { "publicsection", { &handlePublicSection, FALSE }},
+ { "tableofcontents", { &handleToc, FALSE }},
+ { "inherit", { &handleInherit, TRUE }},
+ { "extends", { &handleExtends, TRUE }},
+ { "implements", { &handleExtends, TRUE }},
+ { "memberof", { &handleMemberOf, TRUE }},
+ { "arg", { 0, TRUE }},
+ { "attention", { 0, TRUE }},
+ { "author", { 0, TRUE }},
+ { "authors", { 0, TRUE }},
+ { "copydoc", { &handleCopyDoc, TRUE }},
+ { "copybrief", { &handleCopyBrief, FALSE }},
+ { "copydetails", { &handleCopyDetails, TRUE }},
+ { "copyright", { 0, TRUE }},
+ { "date", { 0, TRUE }},
+ { "dotfile", { 0, TRUE }},
+ { "htmlinclude", { 0, FALSE }},
+ { "image", { 0, TRUE }},
+ { "include", { 0, TRUE }},
+ { "includelineno", { 0, TRUE }},
+ { "invariant", { 0, TRUE }},
+ { "latexinclude", { 0, FALSE }},
+ { "li", { 0, TRUE }},
+ { "line", { 0, TRUE }},
+ { "note", { 0, TRUE }},
+ { "par", { 0, TRUE }},
+ { "param", { &handleParam, TRUE }},
+ { "tparam", { 0, TRUE }},
+ { "post", { 0, TRUE }},
+ { "pre", { 0, TRUE }},
+ { "remark", { 0, TRUE }},
+ { "remarks", { 0, TRUE }},
+ { "result", { 0, TRUE }},
+ { "return", { 0, TRUE }},
+ { "returns", { 0, TRUE }},
+ { "exception", { 0, TRUE }},
+ { "retval", { &handleRetval, TRUE }},
+ { "sa", { 0, TRUE }},
+ { "see", { 0, TRUE }},
+ { "since", { 0, TRUE }},
+ { "throw", { 0, TRUE }},
+ { "throws", { 0, TRUE }},
+ { "until", { 0, TRUE }},
+ { "verbinclude", { 0, FALSE }},
+ { "version", { 0, TRUE }},
+ { "warning", { 0, TRUE }},
+ { "snippet", { 0, TRUE }},
+ { "snippetlineno", { 0, TRUE }},
+ { "noop", { &handleNoop, TRUE }},
+ { "rtfinclude", { 0, FALSE }},
+ { "docbookinclude", { 0, FALSE }},
+ { "maninclude", { 0, FALSE }},
+ { "xmlinclude", { 0, FALSE }}
};
-DocCmdMapper *DocCmdMapper::s_instance=0;
-
-bool inInternalDocs = FALSE;
-
+#define YY_NO_INPUT 1
+#define YY_NO_UNISTD_H 1
#define YY_NEVER_INTERACTIVE 1
enum XRefKind
@@ -394,522 +339,98 @@ class GuardedSection
* statics
*/
-static OutlineParserInterface *langParser; // the language parser that is calling us
-static QCString inputString; // input string
-static int inputPosition; // read pointer
-static QCString yyFileName; // file name that is read from
-static int yyLineNr; // line number in the input
-static bool inBody; // was the comment found inside the body of a function?
-static OutputContext inContext; // are we inside the brief, details or xref part
-static bool briefEndsAtDot; // does the brief description stop at a dot?
-static QCString formulaText; // Running text of a formula
-static QCString formulaEnv; // environment name
-static int formulaNewLines; // amount of new lines in the formula
-static QCString *pOutputString; // pointer to string to which the output is appended.
-static QCString outputXRef; // temp argument of todo/test/../xrefitem commands
-static QCString blockName; // preformatted block name (e.g. verbatim, latexonly,...)
-static XRefKind xrefKind; // kind of cross-reference command
-static XRefKind newXRefKind; //
-static GuardType guardType; // kind of guard for conditional section
-static bool enabledSectionFound;
-static QCString functionProto; // function prototype
-static QStack<GuardedSection> guards; // tracks nested conditional sections (if,ifnot,..)
-static Entry *current = 0; // working entry
-
-static bool needNewEntry;
-
-static QCString g_sectionLabel;
-static QCString g_sectionTitle;
-static int g_sectionLevel;
-static QCString xrefItemKey;
-static QCString newXRefItemKey;
-static QCString xrefItemTitle;
-static QCString xrefListTitle;
-static Protection protection;
-
-static bool xrefAppendFlag;
-static bool inGroupParamFound;
-static int braceCount;
-static bool insidePre;
-static bool parseMore;
-static int g_condCount;
-
-static int g_commentCount;
-static QCString g_spaceBeforeCmd;
-static QCString g_spaceBeforeIf;
-static QCString g_copyDocArg;
-
-static QCString g_guardExpr;
-static int g_roundCount;
-
-static bool g_insideParBlock;
-
-//-----------------------------------------------------------------------------
-
-static void initParser()
-{
- g_sectionLabel.resize(0);
- g_sectionTitle.resize(0);
- Doxygen::docGroup.clearHeader();
- g_insideParBlock = FALSE;
-}
-
-//-----------------------------------------------------------------------------
-
-static bool getDocSectionName(int s)
-{
- switch(s)
- {
- case Entry::CLASSDOC_SEC:
- case Entry::STRUCTDOC_SEC:
- case Entry::UNIONDOC_SEC:
- case Entry::EXCEPTIONDOC_SEC:
- case Entry::NAMESPACEDOC_SEC:
- case Entry::PROTOCOLDOC_SEC:
- case Entry::CATEGORYDOC_SEC:
- case Entry::ENUMDOC_SEC:
- case Entry::PAGEDOC_SEC:
- case Entry::VARIABLEDOC_SEC:
- case Entry::MEMBERDOC_SEC:
- case Entry::OVERLOADDOC_SEC:
- case Entry::FILEDOC_SEC:
- case Entry::DEFINEDOC_SEC:
- case Entry::GROUPDOC_SEC:
- case Entry::MAINPAGEDOC_SEC:
- case Entry::PACKAGEDOC_SEC:
- case Entry::DIRDOC_SEC:
- case Entry::EXAMPLE_SEC:
- case Entry::MEMBERGRP_SEC:
- return TRUE;
- default:
- return FALSE;
- }
-}
-
-//-----------------------------------------------------------------------------
-
-static bool makeStructuralIndicator(Entry::Sections s)
-{
- //printf("current->section=%x\n",current->section);
- if (getDocSectionName(current->section))
- {
- return TRUE;
- }
- else
- {
- needNewEntry = TRUE;
- current->section = s;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- return FALSE;
- }
-}
-
-static void lineCount()
-{
- for( const char* c = yytext ; *c ; ++c )
- yyLineNr += (*c == '\n') ;
-}
-
-
-static QCString stripQuotes(const char *s)
-{
- QCString name;
- if (s==0 || *s==0) return name;
- name=s;
- if (name.at(0)=='"' && name.at(name.length()-1)=='"')
- {
- name=name.mid(1,name.length()-2);
- }
- return name;
-}
-
-//-----------------------------------------------------------------
-
-static void addXRefItem(const char *listName,const char *itemTitle,
- const char *listTitle,bool append)
-{
- if (listName==0) return;
- //printf("addXRefItem(%s,%s,%s,%d)\n",listName,itemTitle,listTitle,append);
-
- const ListItemInfo *lii=0;
- RefList *refList = Doxygen::xrefLists->find(listName);
- if (refList==0) // new list
- {
- refList = new RefList(listName,listTitle,itemTitle);
- Doxygen::xrefLists->insert(listName,refList);
- //printf("new list!\n");
- }
- for (const ListItemInfo &item : current->sli)
- {
- if (qstrcmp(item.type,listName)==0)
- {
- //printf("found %s lii->type=%s\n",listName,lii->type);
- lii = &item;
- break;
- }
- }
- if (lii && append) // already found item of same type just before this one
- {
- //printf("listName=%s item id = %d existing\n",listName,lii->itemId);
- RefItem *item = refList->getRefItem(lii->itemId);
- ASSERT(item!=0);
- item->text += " <p>";
- item->text += outputXRef;
- //printf("%s: text +=%s\n",listName,item->text.data());
- }
- else // new item
- {
- int itemId = refList->addRefItem();
- //printf("listName=%s item id = %d new current=%p\n",listName,itemId,current);
-
- // if we have already an item from the same list type (e.g. a second @todo)
- // in the same Entry (i.e. lii!=0) then we reuse its link anchor.
- char anchorLabel[1024];
- //sprintf(anchorLabel,"_%s%06d",listName,lii ? lii->itemId : itemId);
- sprintf(anchorLabel,"_%s%06d",listName,itemId);
- RefItem *item = refList->getRefItem(itemId);
- ASSERT(item!=0);
- item->text = outputXRef;
- item->listAnchor = anchorLabel;
- current->addSpecialListItem(listName,itemId);
- QCString cmdString;
- cmdString.sprintf(" \\xrefitem %s %d.",listName,itemId);
- if (inBody)
- {
- current->inbodyDocs += cmdString;
- }
- else
- {
- current->doc += cmdString;
- }
- SectionInfo *si = Doxygen::sectionDict->find(anchorLabel);
- if (si)
- {
- if (si->lineNr != -1)
- {
- warn(listName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",anchorLabel,si->fileName.data(),si->lineNr);
- }
- else
- {
- warn(listName,yyLineNr,"multiple use of section label '%s', (first occurrence: %s)",anchorLabel,si->fileName.data());
- }
- }
- else
- {
- si=new SectionInfo(listName,yyLineNr,anchorLabel,
- g_sectionTitle,SectionInfo::Anchor,
- g_sectionLevel);
- Doxygen::sectionDict->append(anchorLabel,si);
- current->anchors.push_back(si);
- }
- }
- outputXRef.resize(0);
-}
-
-//-----------------------------------------------------------------------------
-
-// Adds a formula text to the list/dictionary of formulas if it was
-// not already added. Returns the label of the formula.
-static QCString addFormula()
-{
- QCString formLabel;
- QCString fText=formulaText.simplifyWhiteSpace();
- Formula *f=0;
- if ((f=Doxygen::formulaDict->find(fText))==0)
- {
- f = new Formula(fText);
- Doxygen::formulaList->append(f);
- Doxygen::formulaDict->insert(fText,f);
- formLabel.sprintf("\\_form#%d",f->getId());
- Doxygen::formulaNameDict->insert(formLabel,f);
- }
- else
- {
- formLabel.sprintf("\\_form#%d",f->getId());
- }
- int i;
- for (i=0;i<formulaNewLines;i++) formLabel+="@_fakenl"; // add fake newlines to
- // keep the warnings
- // correctly aligned.
- return formLabel;
-}
-
-//-----------------------------------------------------------------------------
-
-static void checkFormula();
-//-----------------------------------------------------------------------------
-
-static SectionInfo::SectionType sectionLevelToType(int level)
-{
- if (level>=0 && level<5) return (SectionInfo::SectionType)level;
- return SectionInfo::Anchor;
-}
-
-static void addSection()
-{
- SectionInfo *si = Doxygen::sectionDict->find(g_sectionLabel);
- if (si)
- {
- if (si->lineNr != -1)
- {
- warn(yyFileName,yyLineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s, line %d)",g_sectionLabel.data(),si->fileName.data(),si->lineNr);
- }
- else
- {
- warn(yyFileName,yyLineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s)",g_sectionLabel.data(),si->fileName.data());
- }
- }
- else
- {
- // create a new section element
- g_sectionTitle+=yytext;
- g_sectionTitle=g_sectionTitle.stripWhiteSpace();
- si = new SectionInfo(yyFileName,yyLineNr,g_sectionLabel,
- g_sectionTitle,sectionLevelToType(g_sectionLevel),g_sectionLevel);
-
- // add section to this entry
- current->anchors.push_back(si);
-
- // add section to the global dictionary
- Doxygen::sectionDict->append(g_sectionLabel,si);
- }
-}
+struct commentscanYY_state
+{
+ OutlineParserInterface *langParser = 0; // the language parser that is calling us
+ QCString inputString; // input string
+ int inputPosition = 0; // read pointer
+ QCString fileName; // file name that is read from
+ int lineNr = 0; // line number in the input
+ bool inBody = FALSE; // was the comment found inside the body of a function?
+ OutputContext inContext; // are we inside the brief, details or xref part
+ bool briefEndsAtDot = FALSE; // does the brief description stop at a dot?
+ QCString formulaText; // Running text of a formula
+ QCString formulaEnv; // environment name
+ int formulaNewLines = 0; // amount of new lines in the formula
+ QCString *pOutputString = 0; // pointer to string to which the output is appended.
+ QCString outputXRef; // temp argument of todo/test/../xrefitem commands
+ QCString blockName; // preformatted block name (e.g. verbatim, latexonly,...)
+ XRefKind xrefKind = XRef_Item; // kind of cross-reference command
+ XRefKind newXRefKind = XRef_Item; //
+ GuardType guardType = Guard_If; // kind of guards for conditional section
+ bool enabledSectionFound = FALSE;
+ QCString functionProto; // function prototype
+ std::stack<GuardedSection> guards; // tracks nested conditional sections (if,ifnot,..)
+ Entry *current = 0; // working entry
+
+ bool needNewEntry = FALSE;
+
+ QCString sectionLabel;
+ QCString sectionTitle;
+ int sectionLevel = 0;
+ QCString xrefItemKey;
+ QCString newXRefItemKey;
+ QCString xrefItemTitle;
+ QCString xrefListTitle;
+ Protection protection = Public;
+
+ bool xrefAppendFlag = FALSE;
+ bool inGroupParamFound = FALSE;
+ int braceCount = 0;
+ bool insidePre = FALSE;
+ bool parseMore = FALSE;
+ int condCount = 0;
+
+ int commentCount = 0;
+ QCString spaceBeforeCmd;
+ QCString spaceBeforeIf;
+ QCString copyDocArg;
+
+ QCString guardExpr;
+ int roundCount = 0;
+
+ bool insideParBlock = FALSE;
+ bool inInternalDocs = FALSE;
+ int prevPosition = 0;
+ DocGroup docGroup;
+};
//-----------------------------------------------------------------------------
-static void addCite()
-{
- QCString name=yytext;
- if (yytext[0] =='"')
- {
- name=yytext+1;
- name=name.left(yyleng-2);
- }
- Doxygen::citeDict->insert(name.data());
-}
+static QCString stripQuotes(const char *s);
+static bool getDocSectionName(int s);
+static SectionType sectionLevelToType(int level);
+static void stripTrailingWhiteSpace(QCString &s);
+
+static void initParser(yyscan_t yyscanner);
+static bool makeStructuralIndicator(yyscan_t yyscanner,Entry::Sections s);
+static void lineCount(yyscan_t yyscanner);
+static QCString stripQuotes(yyscan_t yyscanner,const char *s);
+static void addXRefItem(yyscan_t yyscanner,
+ const char *listName,const char *itemTitle,
+ const char *listTitle,bool append);
+static QCString addFormula(yyscan_t yyscanner);
+static void checkFormula(yyscan_t yyscanner);
+static void addSection(yyscan_t yyscanner);
+static inline void setOutput(yyscan_t yyscanner,OutputContext ctx);
+static void addAnchor(yyscan_t yyscanner,const char *anchor);
+static inline void addOutput(yyscan_t yyscanner,const char *s);
+static inline void addOutput(yyscan_t yyscanner,char c);
+static void endBrief(yyscan_t yyscanner,bool addToOutput=TRUE);
+static void handleGuard(yyscan_t yyscanner,const QCString &expr);
+static int yyread(yyscan_t yyscanner,char *buf,int max_size);
+static void addCite(yyscan_t yyscanner);
//-----------------------------------------------------------------------------
-// strip trailing whitespace (excluding newlines) from string s
-static void stripTrailingWhiteSpace(QCString &s)
-{
- uint len = s.length();
- int i = (int)len-1;
- char c;
- while (i>=0 && ((c = s.at(i))==' ' || c=='\t' || c=='\r')) i--;
- if (i!=(int)len-1)
- {
- s.resize(i+2); // string up to and including char at pos i and \0 terminator
- }
-}
-
-// selects the output to write to
-static inline void setOutput(OutputContext ctx)
-{
- bool xrefAppendToPrev = xrefAppendFlag;
- // determine append flag for the next item (i.e. the end of this item)
- xrefAppendFlag = !inBody &&
- inContext==OutputXRef && ctx==OutputXRef && // two consecutive xref items
- newXRefKind==xrefKind && // of the same kind
- (xrefKind!=XRef_Item ||
- newXRefItemKey==xrefItemKey); // with the same key if \xrefitem
- //printf("%d && %d && %d && (%d || %d)\n",
- // inContext==OutputXRef,
- // ctx==OutputXRef,
- // newXRefKind==xrefKind,
- // xrefKind!=XRef_Item,
- // newXRefItemKey==xrefItemKey);
-
- //printf("refKind=%d newXRefKind=%d xrefAppendToPrev=%d xrefAppendFlag=%d\n",
- // xrefKind,newXRefKind,xrefAppendToPrev,xrefAppendFlag);
-
- //printf("setOutput(inContext=%d ctx=%d)\n",inContext,ctx);
- if (inContext==OutputXRef) // end of XRef section => add the item
- {
- // See if we can append this new xref item to the previous one.
- // We know this at the start of the next item of the same
- // type and need to remember this until the end of that item.
- switch(xrefKind)
- {
- case XRef_Todo:
- addXRefItem("todo",
- theTranslator->trTodo(),
- theTranslator->trTodoList(),
- xrefAppendToPrev
- );
- break;
- case XRef_Test:
- addXRefItem("test",
- theTranslator->trTest(),
- theTranslator->trTestList(),
- xrefAppendToPrev
- );
- break;
- case XRef_Bug:
- addXRefItem("bug",
- theTranslator->trBug(),
- theTranslator->trBugList(),
- xrefAppendToPrev
- );
- break;
- case XRef_Deprecated:
- addXRefItem("deprecated",
- theTranslator->trDeprecated(),
- theTranslator->trDeprecatedList(),
- xrefAppendToPrev
- );
- break;
- case XRef_Item: // user defined list
- addXRefItem(xrefItemKey,
- xrefItemTitle,
- xrefListTitle,
- xrefAppendToPrev
- );
- break;
- case XRef_None:
- ASSERT(0);
- break;
- }
- }
- xrefItemKey = newXRefItemKey;
-
- int oldContext = inContext;
- inContext = ctx;
- if (inContext!=OutputXRef && inBody) inContext=OutputInbody;
- switch(inContext)
- {
- case OutputDoc:
- if (oldContext!=inContext)
- {
- stripTrailingWhiteSpace(current->doc);
- if (current->docFile.isEmpty())
- {
- current->docFile = yyFileName;
- current->docLine = yyLineNr;
- }
- }
- pOutputString = &current->doc;
- break;
- case OutputBrief:
- if (oldContext!=inContext)
- {
- if (current->briefFile.isEmpty())
- {
- current->briefFile = yyFileName;
- current->briefLine = yyLineNr;
- }
- }
- if (current->brief.stripWhiteSpace().isEmpty()) // we only want one brief
- // description even if multiple
- // are given...
- {
- pOutputString = &current->brief;
- }
- else
- {
- if (!current->doc.isEmpty()) // when appending parts add a new line
- {
- current->doc += "\n";
- }
- pOutputString = &current->doc;
- inContext = OutputDoc; // need to switch to detailed docs, see bug 631380
- }
- break;
- case OutputXRef:
- pOutputString = &outputXRef;
- // first item found, so can't append to previous
- //xrefAppendFlag = FALSE;
- break;
- case OutputInbody:
- pOutputString = &current->inbodyDocs;
- break;
- }
-}
-
-
-static void addAnchor(const char *anchor)
-{
- SectionInfo *si = Doxygen::sectionDict->find(anchor);
- if (si)
- {
- if (si->lineNr != -1)
- {
- warn(yyFileName,yyLineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s, line %d)",anchor,si->fileName.data(),si->lineNr);
- }
- else
- {
- warn(yyFileName,yyLineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s)",anchor,si->fileName.data());
- }
- }
- else
- {
- si = new SectionInfo(yyFileName,yyLineNr,anchor,0,SectionInfo::Anchor,0);
- Doxygen::sectionDict->append(anchor,si);
- current->anchors.push_back(si);
- }
-}
-
-// add a string to the output
-static inline void addOutput(const char *s)
-{
- //printf("addOutput(%s)\n",s);
- *pOutputString+=s;
-}
-
-// add a character to the output
-static inline void addOutput(char c)
-{
- *pOutputString+=c;
-}
-
-static void endBrief(bool addToOutput=TRUE)
-{
- if (!current->brief.stripWhiteSpace().isEmpty())
- { // only go to the detailed description if we have
- // found some brief description and not just whitespace
- briefEndsAtDot=FALSE;
- setOutput(OutputDoc);
- if (addToOutput) addOutput(yytext);
- }
-}
-static void handleGuard(const QCString &expr);
-/* ----------------------------------------------------------------- */
#undef YY_INPUT
-#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
-
-static int prevPosition=0;
-
-static int yyread(char *buf,int max_size)
-{
- prevPosition=inputPosition;
- int c=0;
- while( c < max_size && inputString[inputPosition] )
- {
- *buf = inputString[inputPosition++] ;
- //printf("%d (%c)\n",*buf,*buf);
- c++; buf++;
- }
- return c;
-}
+#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
%}
/* start command character */
CMD ("\\"|"@")
-DCMD1 ("arg"|"attention"|"author"|"cite"|"code")
-DCMD2 ("date"|"dot"|"msc"|"dotfile"|"example"|"startuml")
-DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include")
-DCMD4 ("includelineno"|"internal"|"invariant")
-DCMD5 ("latexinclude"|"latexonly"|"li"|"line"|"manonly"|"name")
-DCMD6 ("note"|"par"|"paragraph"|"param"|"post")
-DCMD7 ("pre"|"remarks"|(("relate"[sd])("also")?))
-DCMD8 ("remarks"|("return"[s]?)|"retval"|"sa"|"section")
-DCMD9 ("see"|"since"|"subsection"|"subsubsection")
-DCMD10 ("throw"|"until"|"verbatim")
-DCMD11 ("verbinclude"|"version"|"warning")
-DETAILEDCMD {CMD}({DCMD1}|{DCMD2}|{DCMD3}|{DCMD4}|{DCMD5}|{DCMD6}|{DCMD7}|{DCMD8}|{DCMD9}|{DCMD10}|{DCMD11})
XREFCMD {CMD}("bug"|"deprecated"|"test"|"todo"|"xrefitem")
PRE [pP][rR][eE]
TABLE [tT][aA][bB][lL][eE]
@@ -1016,50 +537,50 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
*/
<Comment>{CMD}{CMD}[a-z_A-Z]+{B}* { // escaped command
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>{CMD}{CMD}"~"[a-z_A-Z]* { // escaped command
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>{MAILADDR} { // mail address
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>"\""[^"\n]*"\"" { // quoted text
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!)
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>"<"{DETAILEDHTML}{ATTR}">" { // HTML command that ends a brief description
- setOutput(OutputDoc);
+ setOutput(yyscanner,OutputDoc);
// continue with the same input
REJECT;
}
<Comment>"<"{DETAILEDHTMLOPT}{ATTR}">" { // HTML command that ends a brief description
- if (current->lang==SrcLangExt_CSharp)
+ if (yyextra->current->lang==SrcLangExt_CSharp)
{
- setOutput(OutputDoc);
+ setOutput(yyscanner,OutputDoc);
}
// continue with the same input
REJECT;
}
<Comment>"<summary>" { // start of a .NET XML style brief description
- setOutput(OutputBrief);
- addOutput(yytext);
+ setOutput(yyscanner,OutputBrief);
+ addOutput(yyscanner,yytext);
}
<Comment>"<remarks>" { // start of a .NET XML style detailed description
- setOutput(OutputDoc);
- addOutput(yytext);
+ setOutput(yyscanner,OutputDoc);
+ addOutput(yyscanner,yytext);
}
<Comment>"</summary>" { // start of a .NET XML style detailed description
- setOutput(OutputBrief);
- addOutput(yytext);
- setOutput(OutputDoc);
+ setOutput(yyscanner,OutputBrief);
+ addOutput(yyscanner,yytext);
+ setOutput(yyscanner,OutputDoc);
}
<Comment>"</remarks>" { // end of a brief or detailed description
- setOutput(OutputDoc);
- addOutput(yytext);
+ setOutput(yyscanner,OutputDoc);
+ addOutput(yyscanner,yytext);
}
<Comment>"<"{CAPTION}{ATTR}">" {
QCString tag=yytext;
@@ -1073,22 +594,22 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
if (e!=-1) // found matching end
{
QCString id=tag.mid(s+4,e-s-4); // extract id
- addAnchor(id);
+ addAnchor(yyscanner,id);
}
}
}
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>"<"{PRE}{ATTR}">" {
- insidePre=TRUE;
- addOutput(yytext);
+ yyextra->insidePre=TRUE;
+ addOutput(yyscanner,yytext);
}
<Comment>"</"{PRE}">" {
- insidePre=FALSE;
- addOutput(yytext);
+ yyextra->insidePre=FALSE;
+ addOutput(yyscanner,yytext);
}
<Comment>{RCSTAG} { // RCS tag which end a brief description
- setOutput(OutputDoc);
+ setOutput(yyscanner,OutputDoc);
REJECT;
}
<Comment>"<!--" {
@@ -1098,12 +619,12 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
BEGIN(CdataSection);
}
<Comment>{B}*{CMD}"endinternal"{B}* {
- addOutput(" \\endinternal ");
- if (!inInternalDocs)
- warn(yyFileName,yyLineNr,
+ addOutput(yyscanner," \\endinternal ");
+ if (!yyextra->inInternalDocs)
+ warn(yyextra->fileName,yyextra->lineNr,
"found \\endinternal without matching \\internal"
);
- inInternalDocs = FALSE;
+ yyextra->inInternalDocs = FALSE;
}
<Comment>{B}*{CMD}[a-z_A-Z]+"{"[a-zA-Z_,:0-9\. ]*"}"{B}* |
<Comment>{B}*{CMD}[a-z_A-Z]+{B}* { // potentially interesting command
@@ -1125,51 +646,51 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace();
optList = QCStringList::split(',',optStr);
}
- DocCmdMapper::Cmd *cmdPtr = DocCmdMapper::map(cmdName);
- if (cmdPtr) // special action is required
+ auto it = docCmdMap.find(cmdName.data());
+ if (it!=docCmdMap.end()) // special action is required
{
int i=0;
while (yytext[i]==' ' || yytext[i]=='\t') i++;
- g_spaceBeforeCmd = QCString(yytext).left(i);
- if (cmdPtr->endsBrief && !(inContext==OutputXRef && cmdName=="parblock"))
+ yyextra->spaceBeforeCmd = QCString(yytext).left(i);
+ if (it->second.endsBrief && !(yyextra->inContext==OutputXRef && cmdName=="parblock"))
{
- briefEndsAtDot=FALSE;
+ yyextra->briefEndsAtDot=FALSE;
// this command forces the end of brief description
- setOutput(OutputDoc);
+ setOutput(yyscanner,OutputDoc);
}
- //if (i>0) addOutput(QCString(yytext).left(i)); // removed for bug 689341
- if (cmdPtr->func && cmdPtr->func(cmdName, optList))
+ //if (i>0) addOutput(yyscanner,QCString(yytext).left(i)); // removed for bug 689341
+ if (it->second.handler && it->second.handler(yyscanner, cmdName, optList))
{
// implicit split of the comment block into two
// entries. Restart the next block at the start
// of this command.
- parseMore=TRUE;
+ yyextra->parseMore=TRUE;
// yuk, this is probably not very portable across lex implementations,
// but we need to know the position in the input buffer where this
// rule matched.
// for flex 2.5.33+ we should use YY_CURRENT_BUFFER_LVALUE
#if YY_FLEX_MAJOR_VERSION>=2 && (YY_FLEX_MINOR_VERSION>5 || (YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33))
- inputPosition=prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);
+ yyextra->inputPosition=yyextra->prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf);
#else
- inputPosition=prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf);
+ yyextra->inputPosition=yyextra->prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf);
#endif
yyterminate();
}
- else if (cmdPtr->func==0)
+ else if (it->second.handler==0)
{
// command without handler, to be processed
// later by parsedoc.cpp
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
}
else // command not relevant
{
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
}
<Comment>{B}*({CMD}{CMD})"f"[$\[{] { // escaped formula command
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>{B}*{CMD}"~"[a-z_A-Z-]* { // language switch command
QCString langId = QCString(yytext).stripWhiteSpace().data()+2;
@@ -1180,54 +701,54 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
}
<Comment>{B}*{CMD}"f{"[^}\n]+"}"("{"?) { // start of a formula with custom environment
- setOutput(OutputDoc);
- formulaText="\\begin";
- formulaEnv=QCString(yytext).stripWhiteSpace().data()+2;
- if (formulaEnv.at(formulaEnv.length()-1)=='{')
+ setOutput(yyscanner,OutputDoc);
+ yyextra->formulaText="\\begin";
+ yyextra->formulaEnv=QCString(yytext).stripWhiteSpace().data()+2;
+ if (yyextra->formulaEnv.at(yyextra->formulaEnv.length()-1)=='{')
{
// remove trailing open brace
- formulaEnv=formulaEnv.left(formulaEnv.length()-1);
+ yyextra->formulaEnv=yyextra->formulaEnv.left(yyextra->formulaEnv.length()-1);
}
- formulaText+=formulaEnv;
- formulaNewLines=0;
+ yyextra->formulaText+=yyextra->formulaEnv;
+ yyextra->formulaNewLines=0;
BEGIN(ReadFormulaLong);
}
<Comment>{B}*{CMD}"f$" { // start of a inline formula
- formulaText="$";
- formulaNewLines=0;
+ yyextra->formulaText="$";
+ yyextra->formulaNewLines=0;
BEGIN(ReadFormulaShort);
}
<Comment>{B}*{CMD}"f[" { // start of a block formula
- setOutput(OutputDoc);
- formulaText="\\[";
- formulaNewLines=0;
+ setOutput(yyscanner,OutputDoc);
+ yyextra->formulaText="\\[";
+ yyextra->formulaNewLines=0;
BEGIN(ReadFormulaLong);
}
<Comment>{B}*{CMD}"{" { // begin of a group
- //langParser->handleGroupStartCommand(g_memberGroupHeader);
- Doxygen::docGroup.open(current,yyFileName,yyLineNr);
+ //yyextra->langParser->handleGroupStartCommand(yyextra->memberGroupHeader);
+ yyextra->docGroup.open(yyextra->current,yyextra->fileName,yyextra->lineNr);
}
<Comment>{B}*{CMD}"}" { // end of a group
- //langParser->handleGroupEndCommand();
- Doxygen::docGroup.close(current,yyFileName,yyLineNr,TRUE);
- Doxygen::docGroup.clearHeader();
- parseMore=TRUE;
- needNewEntry = TRUE;
+ //yyextra->langParser->handleGroupEndCommand();
+ yyextra->docGroup.close(yyextra->current,yyextra->fileName,yyextra->lineNr,TRUE);
+ yyextra->docGroup.clearHeader();
+ yyextra->parseMore=TRUE;
+ yyextra->needNewEntry = TRUE;
#if YY_FLEX_MAJOR_VERSION>=2 && (YY_FLEX_MINOR_VERSION>5 || (YY_FLEX_MINOR_VERSION==5 && YY_FLEX_SUBMINOR_VERSION>=33))
- inputPosition=prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + strlen(yytext);
+ yyextra->inputPosition=yyextra->prevPosition + (int)(yy_bp - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf) + strlen(yytext);
#else
- inputPosition=prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf) + strlen(yytext);
+ yyextra->inputPosition=yyextra->prevPosition + (int)(yy_bp - yy_current_buffer->yy_ch_buf) + strlen(yytext);
#endif
yyterminate();
}
<Comment>{B}*{CMD}[$@\\&~<>#%] { // escaped character
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>[a-z_A-Z]+ { // normal word
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>^{B}*"."{B}*/\n { // explicit end autolist: e.g " ."
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>^{B}*[1-9][0-9]*"."{B}+ |
<Comment>^{B}*[*+]{B}+ { // start of autolist
@@ -1237,106 +758,106 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
}
else
{
- if (inContext!=OutputXRef)
+ if (yyextra->inContext!=OutputXRef)
{
- briefEndsAtDot=FALSE;
- setOutput(OutputDoc);
+ yyextra->briefEndsAtDot=FALSE;
+ setOutput(yyscanner,OutputDoc);
}
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
}
<Comment>^{B}*"-"{B}+ { // start of autolist
- if (inContext!=OutputXRef)
+ if (yyextra->inContext!=OutputXRef)
{
- briefEndsAtDot=FALSE;
- setOutput(OutputDoc);
+ yyextra->briefEndsAtDot=FALSE;
+ setOutput(yyscanner,OutputDoc);
}
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>^{B}*([\-:|]{B}*)*("--"|"---")({B}*[\-:|])*{B}*/\n { // horizontal line (dashed)
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>{CMD}"---" { // escaped mdash
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>{CMD}"--" { // escaped mdash
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>"---" { // mdash
- addOutput(insidePre || Doxygen::markdownSupport ? yytext : "&mdash;");
+ addOutput(yyscanner,yyextra->insidePre || Doxygen::markdownSupport ? yytext : "&mdash;");
}
<Comment>"--" { // ndash
- addOutput(insidePre || Doxygen::markdownSupport ? yytext : "&ndash;");
+ addOutput(yyscanner,yyextra->insidePre || Doxygen::markdownSupport ? yytext : "&ndash;");
}
<Comment>"-#"{B}+ { // numbered item
- if (inContext!=OutputXRef)
+ if (yyextra->inContext!=OutputXRef)
{
- briefEndsAtDot=FALSE;
- setOutput(OutputDoc);
+ yyextra->briefEndsAtDot=FALSE;
+ setOutput(yyscanner,OutputDoc);
}
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>("."+)[a-z_A-Z0-9\)] { // . at start or in the middle of a word, or ellipsis
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>".\\"[ \t] { // . with escaped space.
- addOutput(yytext[0]);
- addOutput(yytext[2]);
+ addOutput(yyscanner,yytext[0]);
+ addOutput(yyscanner,yytext[2]);
}
<Comment>".," { // . with comma such as "e.g.,"
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>"...\\"[ \t] { // ellipsis with escaped space.
- addOutput("... ");
+ addOutput(yyscanner,"... ");
}
<Comment>".."[\.]?/[^ \t\n] { // internal ellipsis
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<Comment>(\n|\\_linebr)({B}*(\n|\\_linebr))+ { // at least one blank line (or blank line command)
- if (inContext==OutputXRef)
+ if (yyextra->inContext==OutputXRef)
{
// see bug 613024, we need to put the newlines after ending the XRef section.
- if (!g_insideParBlock) setOutput(OutputDoc);
+ if (!yyextra->insideParBlock) setOutput(yyscanner,OutputDoc);
int i;
for (i=0;i<yyleng;)
{
- if (yytext[i]=='\n') addOutput('\n'),i++;
- else if (strcmp(yytext+i,"\\_linebr")==0) addOutput('\n'),i+=8;
+ if (yytext[i]=='\n') addOutput(yyscanner,'\n'),i++;
+ else if (strcmp(yytext+i,"\\_linebr")==0) addOutput(yyscanner,'\n'),i+=8;
else i++;
}
}
- else if (inContext!=OutputBrief)
+ else if (yyextra->inContext!=OutputBrief)
{
int i;
for (i=0;i<yyleng;)
{
- if (yytext[i]=='\n') addOutput('\n'),i++;
- else if (strcmp(yytext+i,"\\_linebr")==0) addOutput('\n'),i+=8;
+ if (yytext[i]=='\n') addOutput(yyscanner,'\n'),i++;
+ else if (strcmp(yytext+i,"\\_linebr")==0) addOutput(yyscanner,'\n'),i+=8;
else i++;
}
- setOutput(OutputDoc);
+ setOutput(yyscanner,OutputDoc);
}
- else // inContext==OutputBrief
+ else // yyextra->inContext==OutputBrief
{ // only go to the detailed description if we have
// found some brief description and not just whitespace
- endBrief(FALSE);
+ endBrief(yyscanner,FALSE);
}
- lineCount();
+ lineCount(yyscanner);
}
<Comment>"." { // potential end of a JavaDoc style comment
- addOutput(*yytext);
- if (briefEndsAtDot)
+ addOutput(yyscanner,*yytext);
+ if (yyextra->briefEndsAtDot)
{
- setOutput(OutputDoc);
- briefEndsAtDot=FALSE;
+ setOutput(yyscanner,OutputDoc);
+ yyextra->briefEndsAtDot=FALSE;
}
}
<Comment>\n { // newline
- addOutput(*yytext);
- yyLineNr++;
+ addOutput(yyscanner,*yytext);
+ yyextra->lineNr++;
}
<Comment>. { // catch-all for anything else
- addOutput(*yytext);
+ addOutput(yyscanner,*yytext);
}
@@ -1344,7 +865,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<HtmlComment>"--"[!]?">"{B}* { BEGIN( Comment ); }
<HtmlComment>{DOCNL} {
- if (*yytext=='\n') yyLineNr++;
+ if (*yytext=='\n') yyextra->lineNr++;
}
<HtmlComment>[^\\\n\-]+ { // ignore unimportant characters
}
@@ -1355,66 +876,66 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
BEGIN( Comment );
}
<CdataSection>{DOCNL} {
- addOutput('\n');
- if (*yytext=='\n') yyLineNr++;
+ addOutput(yyscanner,'\n');
+ if (*yytext=='\n') yyextra->lineNr++;
}
<CdataSection>[<>&] { // the special XML characters for iwhich the CDATA section is especially used
- addOutput('\\');
- addOutput(*yytext);
+ addOutput(yyscanner,'\\');
+ addOutput(yyscanner,*yytext);
}
<CdataSection>[^\\\n\]<>&]+ {
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<CdataSection>. {
- addOutput(*yytext);
+ addOutput(yyscanner,*yytext);
}
/* -------------- Rules for handling formulas ---------------- */
<ReadFormulaShort>{CMD}"f$" { // end of inline formula
- formulaText+="$";
- addOutput(" "+addFormula());
+ yyextra->formulaText+="$";
+ addOutput(yyscanner," "+addFormula(yyscanner));
BEGIN(Comment);
}
<ReadFormulaLong>{CMD}"f]" { // end of block formula
- formulaText+="\\]";
- addOutput(" "+addFormula());
+ yyextra->formulaText+="\\]";
+ addOutput(yyscanner," "+addFormula(yyscanner));
BEGIN(Comment);
}
<ReadFormulaLong>{CMD}"f}" { // end of custom env formula
- formulaText+="\\end";
- formulaText+=formulaEnv;
- addOutput(" "+addFormula());
+ yyextra->formulaText+="\\end";
+ yyextra->formulaText+=yyextra->formulaEnv;
+ addOutput(yyscanner," "+addFormula(yyscanner));
BEGIN(Comment);
}
<ReadFormulaLong,ReadFormulaShort>[^\\@\n]+ { // any non-special character
- formulaText+=yytext;
+ yyextra->formulaText+=yytext;
}
<ReadFormulaLong,ReadFormulaShort>\n { // new line
- formulaNewLines++;
- formulaText+=*yytext;
- yyLineNr++;
+ yyextra->formulaNewLines++;
+ yyextra->formulaText+=*yytext;
+ yyextra->lineNr++;
}
<ReadFormulaLong,ReadFormulaShort>. { // any other character
- formulaText+=*yytext;
+ yyextra->formulaText+=*yytext;
}
/* ------------ handle argument of enum command --------------- */
<EnumDocArg1>{SCOPEID} { // handle argument
- current->name = yytext;
+ yyextra->current->name = yytext;
BEGIN( Comment );
}
<EnumDocArg1>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<EnumDocArg1>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"missing argument after \\enum."
);
- addOutput('\n');
- if (*yytext=='\n') yyLineNr++;
+ addOutput(yyscanner,'\n');
+ if (*yytext=='\n') yyextra->lineNr++;
BEGIN( Comment );
}
<EnumDocArg1>. { // ignore other stuff
@@ -1423,20 +944,20 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ------------ handle argument of namespace command --------------- */
<NameSpaceDocArg1>{SCOPENAME} { // handle argument
- current->name = substitute(yytext,".","::");
+ yyextra->current->name = substitute(yytext,".","::");
BEGIN( Comment );
}
<NameSpaceDocArg1>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<NameSpaceDocArg1>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"missing argument after "
"\\namespace."
);
- addOutput('\n');
- if (*yytext=='\n') yyLineNr++;
+ addOutput(yyscanner,'\n');
+ if (*yytext=='\n') yyextra->lineNr++;
BEGIN( Comment );
}
<NameSpaceDocArg1>. { // ignore other stuff
@@ -1445,20 +966,20 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ------------ handle argument of package command --------------- */
<PackageDocArg1>{ID}("."{ID})* { // handle argument
- current->name = yytext;
+ yyextra->current->name = yytext;
BEGIN( Comment );
}
<PackageDocArg1>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<PackageDocArg1>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"missing argument after "
"\\package."
);
- addOutput('\n');
- if (*yytext=='\n') yyLineNr++;
+ addOutput(yyscanner,'\n');
+ if (*yytext=='\n') yyextra->lineNr++;
BEGIN( Comment );
}
<PackageDocArg1>. { // ignore other stuff
@@ -1467,64 +988,64 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ------ handle argument of class/struct/union command --------------- */
<ClassDocArg1>{SCOPENAME}{TMPLSPEC} {
- current->name = substitute(removeRedundantWhiteSpace(yytext),".","::");
+ yyextra->current->name = substitute(removeRedundantWhiteSpace(yytext),".","::");
BEGIN( ClassDocArg2 );
}
<ClassDocArg1>{SCOPENAME} { // first argument
- current->name = substitute(yytext,".","::");
- if (current->section==Entry::PROTOCOLDOC_SEC)
+ yyextra->current->name = substitute(yytext,".","::");
+ if (yyextra->current->section==Entry::PROTOCOLDOC_SEC)
{
- current->name+="-p";
+ yyextra->current->name+="-p";
}
// prepend outer scope name
BEGIN( ClassDocArg2 );
}
<CategoryDocArg1>{SCOPENAME}{B}*"("[^\)]+")" {
- current->name = substitute(yytext,".","::");
+ yyextra->current->name = substitute(yytext,".","::");
BEGIN( ClassDocArg2 );
}
<ClassDocArg1,CategoryDocArg1>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<ClassDocArg1,CategoryDocArg1>{DOCNL} {
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"missing argument after "
"\\%s.",YY_START==ClassDocArg1?"class":"category"
);
- addOutput('\n');
- if (*yytext=='\n') yyLineNr++;
+ addOutput(yyscanner,'\n');
+ if (*yytext=='\n') yyextra->lineNr++;
BEGIN( Comment );
}
<ClassDocArg1,CategoryDocArg1>. { // ignore other stuff
}
<ClassDocArg2>{FILE}|"<>" { // second argument; include file
- current->includeFile = yytext;
+ yyextra->current->includeFile = yytext;
BEGIN( ClassDocArg3 );
}
<ClassDocArg2>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<ClassDocArg2>{DOCNL} {
- addOutput('\n');
- if (*yytext=='\n') yyLineNr++;
+ addOutput(yyscanner,'\n');
+ if (*yytext=='\n') yyextra->lineNr++;
BEGIN( Comment );
}
<ClassDocArg2>. { // ignore other stuff
}
<ClassDocArg3>[<"]?{FILE}?[">]? { // third argument; include file name
- current->includeName = yytext;
+ yyextra->current->includeName = yytext;
BEGIN( Comment );
}
<ClassDocArg3>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<ClassDocArg3>{DOCNL} {
- if (*yytext=='\n') yyLineNr++;
+ if (*yytext=='\n') yyextra->lineNr++;
BEGIN( Comment );
}
<ClassDocArg3>. { // ignore other stuff
@@ -1533,83 +1054,83 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* --------- handle arguments of {def,add,weak}group commands --------- */
<GroupDocArg1>{LABELID}(".html"?) { // group name
- current->name = yytext;
+ yyextra->current->name = yytext;
//lastDefGroup.groupname = yytext;
- //lastDefGroup.pri = current->groupingPri();
+ //lastDefGroup.pri = yyextra->current->groupingPri();
// the .html stuff is for Qt compatibility
- if (current->name.right(5)==".html")
+ if (yyextra->current->name.right(5)==".html")
{
- current->name=current->name.left(current->name.length()-5);
+ yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-5);
}
- current->type.resize(0);
+ yyextra->current->type.resize(0);
BEGIN(GroupDocArg2);
}
<GroupDocArg1>"\\"{B}*"\n" { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<GroupDocArg1>{DOCNL} { // missing argument!
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"missing group name after %s",
- current->groupDocCmd()
+ yyextra->current->groupDocCmd()
);
- addOutput('\n');
- if (*yytext=='\n') yyLineNr++;
+ addOutput(yyscanner,'\n');
+ if (*yytext=='\n') yyextra->lineNr++;
BEGIN( Comment );
}
<GroupDocArg1>. { // ignore other stuff
}
<GroupDocArg2>"\\"{B}*"\n" { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<GroupDocArg2>[^\n\\]+ { // title (stored in type)
- current->type += yytext;
- current->type = current->type.stripWhiteSpace();
+ yyextra->current->type += yytext;
+ yyextra->current->type = yyextra->current->type.stripWhiteSpace();
}
<GroupDocArg2>{DOCNL} {
- if ( current->groupDocType==Entry::GROUPDOC_NORMAL &&
- current->type.isEmpty()
+ if ( yyextra->current->groupDocType==Entry::GROUPDOC_NORMAL &&
+ yyextra->current->type.isEmpty()
) // defgroup requires second argument
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"missing title after "
- "\\defgroup %s", current->name.data()
+ "\\defgroup %s", yyextra->current->name.data()
);
}
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<GroupDocArg2>. { // title (stored in type)
- current->type += yytext;
- current->type = current->type.stripWhiteSpace();
+ yyextra->current->type += yytext;
+ yyextra->current->type = yyextra->current->type.stripWhiteSpace();
}
/* --------- handle arguments of page/mainpage command ------------------- */
<PageDocArg1>{FILE} { // first argument; page name
- current->name = stripQuotes(yytext);
- current->args = "";
+ yyextra->current->name = stripQuotes(yytext);
+ yyextra->current->args = "";
BEGIN( PageDocArg2 );
}
-<PageDocArg1>{LC} { yyLineNr++;
- addOutput('\n');
+<PageDocArg1>{LC} { yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<PageDocArg1>{DOCNL} {
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"missing argument after "
"\\page."
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<PageDocArg1>. { // ignore other stuff
}
<PageDocArg2>{DOCNL} { // second argument; page title
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<PageDocArg2>{CMD}[<>] {
@@ -1617,20 +1138,20 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
QCString tmp = yytext;
tmp = substitute(substitute(tmp,"@<","&lt;"),"@>","&gt;");
tmp = substitute(substitute(tmp,"\\<","&lt;"),"\\>","&gt;");
- current->args += tmp;
+ yyextra->current->args += tmp;
}
<PageDocArg2>. {
- current->args += yytext;
+ yyextra->current->args += yytext;
}
/* --------- handle arguments of the param command ------------ */
<ParamArg1>{ID}/{B}*"," {
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<ParamArg1>"," {
- addOutput(" , ");
+ addOutput(yyscanner," , ");
}
<ParamArg1>{ID} {
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
BEGIN( Comment );
}
<ParamArg1>. {
@@ -1641,16 +1162,16 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* --------- handle arguments of the file/dir/example command ------------ */
<FileDocArg1>{DOCNL} { // no file name specified
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<FileDocArg1>{FILE} { // first argument; name
- current->name = stripQuotes(yytext);
+ yyextra->current->name = stripQuotes(yytext);
BEGIN( Comment );
}
-<FileDocArg1>{LC} { yyLineNr++;
- addOutput('\n');
+<FileDocArg1>{LC} { yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<FileDocArg1>. { // ignore other stuff
}
@@ -1658,62 +1179,62 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* --------- handle arguments of the xrefitem command ------------ */
<XRefItemParam1>{LABELID} { // first argument
- newXRefItemKey=yytext;
- setOutput(OutputXRef);
+ yyextra->newXRefItemKey=yytext;
+ setOutput(yyscanner,OutputXRef);
BEGIN(XRefItemParam2);
}
<XRefItemParam1>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<XRefItemParam1>{DOCNL} { // missing arguments
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"Missing first argument of \\xrefitem"
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
- inContext = OutputDoc;
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
+ yyextra->inContext = OutputDoc;
BEGIN( Comment );
}
<XRefItemParam1>. { // ignore other stuff
}
<XRefItemParam2>"\""[^\n\"]*"\"" { // second argument
- xrefItemTitle = stripQuotes(yytext);
+ yyextra->xrefItemTitle = stripQuotes(yytext);
BEGIN(XRefItemParam3);
}
<XRefItemParam2>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<XRefItemParam2>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"Missing second argument of \\xrefitem"
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
- inContext = OutputDoc;
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
+ yyextra->inContext = OutputDoc;
BEGIN( Comment );
}
<XRefItemParam2>. { // ignore other stuff
}
<XRefItemParam3>"\""[^\n\"]*"\"" { // third argument
- xrefListTitle = stripQuotes(yytext);
- xrefKind = XRef_Item;
+ yyextra->xrefListTitle = stripQuotes(yytext);
+ yyextra->xrefKind = XRef_Item;
BEGIN( Comment );
}
<XRefItemParam2,XRefItemParam3>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<XRefItemParam3>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"Missing third argument of \\xrefitem"
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
- inContext = OutputDoc;
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
+ yyextra->inContext = OutputDoc;
BEGIN( Comment );
}
<XRefItemParam3>. { // ignore other stuff
@@ -1723,23 +1244,23 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of the relates(also)/memberof command ------- */
<RelatesParam1>({ID}("::"|"."))*{ID} { // argument
- current->relates = yytext;
- //if (current->mGrpId!=DOX_NOGROUP)
+ yyextra->current->relates = yytext;
+ //if (yyextra->current->mGrpId!=DOX_NOGROUP)
//{
// memberGroupRelates = yytext;
//}
BEGIN( Comment );
}
<RelatesParam1>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<RelatesParam1>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"Missing argument of \\relates or \\memberof command"
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<RelatesParam1>. { // ignore other stuff
@@ -1749,94 +1270,94 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of the relates(also)/addindex commands ----- */
<LineParam>{DOCNL} { // end of argument
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<LineParam>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<LineParam>. { // ignore other stuff
- addOutput(*yytext);
+ addOutput(yyscanner,*yytext);
}
/* ----- handle arguments of the section/subsection/.. commands ------- */
<SectionLabel>{LABELID} { // first argument
- g_sectionLabel=yytext;
- addOutput(yytext);
- g_sectionTitle.resize(0);
+ yyextra->sectionLabel=yytext;
+ addOutput(yyscanner,yytext);
+ yyextra->sectionTitle.resize(0);
BEGIN(SectionTitle);
}
<SectionLabel>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"\\section command has no label"
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<SectionLabel>. { // invalid character for section label
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"Invalid or missing section label"
);
BEGIN(Comment);
}
<SectionTitle>[^\n@\\*]*/"\n" { // end of section title
- addSection();
- addOutput(yytext);
+ addSection(yyscanner);
+ addOutput(yyscanner,yytext);
BEGIN( Comment );
}
<SectionTitle>[^\n@\\]*/"\\_linebr" { // end of section title
- addSection();
- addOutput(yytext);
+ addSection(yyscanner);
+ addOutput(yyscanner,yytext);
BEGIN( Comment );
}
<SectionTitle>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<SectionTitle>[^\n@\\]* { // any character without special meaning
- g_sectionTitle+=yytext;
- addOutput(yytext);
+ yyextra->sectionTitle+=yytext;
+ addOutput(yyscanner,yytext);
}
<SectionTitle>({CMD}{CMD}){ID} { // unescape escaped command
- g_sectionTitle+=&yytext[1];
- addOutput(yytext);
+ yyextra->sectionTitle+=&yytext[1];
+ addOutput(yyscanner,yytext);
}
<SectionTitle>{CMD}[$@\\&~<>#%] { // unescape escaped character
- g_sectionTitle+=yytext[1];
- addOutput(yytext);
+ yyextra->sectionTitle+=yytext[1];
+ addOutput(yyscanner,yytext);
}
<SectionTitle>. { // anything else
- g_sectionTitle+=yytext;
- addOutput(*yytext);
+ yyextra->sectionTitle+=yytext;
+ addOutput(yyscanner,*yytext);
}
/* ----- handle arguments of the subpage command ------- */
<SubpageLabel>{LABELID} { // first argument
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
// we add subpage labels as a kind of "inheritance" relation to prevent
// needing to add another list to the Entry class.
- current->extends.push_back(BaseInfo(yytext,Public,Normal));
+ yyextra->current->extends.push_back(BaseInfo(yytext,Public,Normal));
BEGIN(SubpageTitle);
}
<SubpageLabel>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"\\subpage command has no label"
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<SubpageTitle>{DOCNL} { // no title, end command
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
BEGIN( Comment );
}
<SubpageTitle>[ \t]*"\""[^\"\n]*"\"" { // add title, end of command
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
BEGIN( Comment );
}
<SubpageTitle>. { // no title, end of command
@@ -1847,20 +1368,20 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of the anchor command ------- */
<AnchorLabel>{LABELID} { // found argument
- addAnchor(yytext);
- addOutput(yytext);
+ addAnchor(yyscanner,yytext);
+ addOutput(yyscanner,yytext);
BEGIN( Comment );
}
<AnchorLabel>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"\\anchor command has no label"
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<AnchorLabel>. { // invalid character for anchor label
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"Invalid or missing anchor label"
);
BEGIN(Comment);
@@ -1870,51 +1391,51 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of the preformatted block commands ------- */
<FormatBlock>{CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc"|"endvhdlflow")/{NW} { // possible ends
- addOutput(yytext);
- if (&yytext[4]==blockName) // found end of the block
+ addOutput(yyscanner,yytext);
+ if (&yytext[4]==yyextra->blockName) // found end of the block
{
BEGIN(Comment);
}
}
<FormatBlock>{CMD}"enduml" {
- addOutput(yytext);
- if (blockName=="startuml") // found end of the block
+ addOutput(yyscanner,yytext);
+ if (yyextra->blockName=="startuml") // found end of the block
{
BEGIN(Comment);
}
}
<FormatBlock>[^ \@\*\/\\\n]* { // some word
- addOutput(yytext);
+ addOutput(yyscanner,yytext);
}
<FormatBlock>{DOCNL} { // new line
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<FormatBlock>"/*" { // start of a C-comment
- if (!(blockName=="code" || blockName=="verbatim")) g_commentCount++;
- addOutput(yytext);
+ if (!(yyextra->blockName=="code" || yyextra->blockName=="verbatim")) yyextra->commentCount++;
+ addOutput(yyscanner,yytext);
}
<FormatBlock>"*/" { // end of a C-comment
- addOutput(yytext);
- if (!(blockName=="code" || blockName=="verbatim"))
+ addOutput(yyscanner,yytext);
+ if (!(yyextra->blockName=="code" || yyextra->blockName=="verbatim"))
{
- g_commentCount--;
- if (g_commentCount<0)
+ yyextra->commentCount--;
+ if (yyextra->commentCount<0)
{
- warn(yyFileName,yyLineNr,
- "found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",blockName.data(),blockName.data());
+ warn(yyextra->fileName,yyextra->lineNr,
+ "found */ without matching /* while inside a \\%s block! Perhaps a missing \\end%s?\n",yyextra->blockName.data(),yyextra->blockName.data());
}
}
}
<FormatBlock>. {
- addOutput(*yytext);
+ addOutput(yyscanner,*yytext);
}
<FormatBlock><<EOF>> {
- QCString endTag = "end"+blockName;
- if (blockName=="startuml") endTag="enduml";
- warn(yyFileName,yyLineNr,
+ QCString endTag = "end"+yyextra->blockName;
+ if (yyextra->blockName=="startuml") endTag="enduml";
+ warn(yyextra->fileName,yyextra->lineNr,
"reached end of comment while inside a \\%s block; check for missing \\%s tag!",
- blockName.data(),endTag.data()
+ yyextra->blockName.data(),endTag.data()
);
yyterminate();
}
@@ -1922,58 +1443,58 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of if/ifnot commands ------- */
<GuardParam>{B}*"(" {
- g_guardExpr=yytext;
- g_roundCount=1;
+ yyextra->guardExpr=yytext;
+ yyextra->roundCount=1;
BEGIN(GuardExpr);
}
<GuardExpr>[^()]* {
- g_guardExpr+=yytext;
+ yyextra->guardExpr+=yytext;
}
<GuardExpr>"(" {
- g_guardExpr+=yytext;
- g_roundCount++;
+ yyextra->guardExpr+=yytext;
+ yyextra->roundCount++;
}
<GuardExpr>")" {
- g_guardExpr+=yytext;
- g_roundCount--;
- if (g_roundCount==0)
+ yyextra->guardExpr+=yytext;
+ yyextra->roundCount--;
+ if (yyextra->roundCount==0)
{
- handleGuard(g_guardExpr);
+ handleGuard(yyscanner,yyextra->guardExpr);
}
}
<GuardExpr>\n {
- warn(yyFileName,yyLineNr,
- "invalid expression '%s' for guard",g_guardExpr.data());
+ warn(yyextra->fileName,yyextra->lineNr,
+ "invalid expression '%s' for yyextra->guards",yyextra->guardExpr.data());
unput(*yytext);
BEGIN(GuardParam);
}
-<GuardParam>{B}*[a-z_A-Z0-9.\-]+ { // parameter of if/ifnot guard
- handleGuard(yytext);
+<GuardParam>{B}*[a-z_A-Z0-9.\-]+ { // parameter of if/ifnot yyextra->guards
+ handleGuard(yyscanner,yytext);
}
<GuardParam>{DOCNL} { // end of argument
- if (*yytext=='\n') yyLineNr++;
+ if (*yytext=='\n') yyextra->lineNr++;
//next line is commented out due to bug620924
- //addOutput('\n');
+ //addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<GuardParam>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<GuardParam>. { // ignore other stuff
- addOutput(*yytext);
+ addOutput(yyscanner,*yytext);
}
<GuardParamEnd>{B}*{DOCNL} {
- lineCount();
- g_spaceBeforeIf.resize(0);
+ lineCount(yyscanner);
+ yyextra->spaceBeforeIf.resize(0);
BEGIN(Comment);
}
<GuardParamEnd>{B}* {
- if (!g_spaceBeforeIf.isEmpty()) // needed for 665313 in combination with bug620924
+ if (!yyextra->spaceBeforeIf.isEmpty()) // needed for 665313 in combination with bug620924
{
- addOutput(g_spaceBeforeIf);
+ addOutput(yyscanner,yyextra->spaceBeforeIf);
}
- g_spaceBeforeIf.resize(0);
+ yyextra->spaceBeforeIf.resize(0);
BEGIN(Comment);
}
<GuardParamEnd>. {
@@ -1984,67 +1505,67 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle skipping of conditional sections ------- */
<SkipGuardedSection>{CMD}"ifnot"/{NW} {
- guardType = Guard_IfNot;
+ yyextra->guardType = Guard_IfNot;
BEGIN( GuardParam );
}
<SkipGuardedSection>{CMD}"if"/{NW} {
- guardType = Guard_If;
+ yyextra->guardType = Guard_If;
BEGIN( GuardParam );
}
<SkipGuardedSection>{CMD}"endif"/{NW} {
- if (guards.isEmpty())
+ if (yyextra->guards.empty())
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found \\endif without matching start command");
}
else
{
- GuardedSection *s = guards.pop();
- bool parentVisible = s->parentVisible();
- delete s;
+ GuardedSection s = yyextra->guards.top();
+ yyextra->guards.pop();
+ bool parentVisible = s.parentVisible();
if (parentVisible)
{
- enabledSectionFound=TRUE;
+ yyextra->enabledSectionFound=TRUE;
BEGIN( GuardParamEnd );
}
}
}
<SkipGuardedSection>{CMD}"else"/{NW} {
- if (guards.isEmpty())
+ if (yyextra->guards.empty())
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found \\else without matching start command");
}
else
{
- if (!enabledSectionFound && guards.top()->parentVisible())
+ if (!yyextra->enabledSectionFound && yyextra->guards.top().parentVisible())
{
- delete guards.pop();
- guards.push(new GuardedSection(TRUE,TRUE));
- enabledSectionFound=TRUE;
+ yyextra->guards.pop();
+ yyextra->guards.push(GuardedSection(TRUE,TRUE));
+ yyextra->enabledSectionFound=TRUE;
BEGIN( GuardParamEnd );
}
}
}
<SkipGuardedSection>{CMD}"elseif"/{NW} {
- if (guards.isEmpty())
+ if (yyextra->guards.empty())
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found \\elseif without matching start command");
}
else
{
- if (!enabledSectionFound && guards.top()->parentVisible())
+ if (!yyextra->enabledSectionFound && yyextra->guards.top().parentVisible())
{
- guardType=Guard_If;
- delete guards.pop();
+ yyextra->guardType=Guard_If;
+ yyextra->guards.pop();
BEGIN( GuardParam );
}
}
}
<SkipGuardedSection>{DOCNL} { // skip line
- if (*yytext=='\n') yyLineNr++;
- //addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ //addOutput(yyscanner,'\n');
}
<SkipGuardedSection>[^ \\@\n]+ { // skip non-special characters
}
@@ -2055,46 +1576,46 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle skipping of internal section ------- */
<SkipInternal>{DOCNL} { // skip line
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<SkipInternal>[@\\]"if"/[ \t] {
- g_condCount++;
+ yyextra->condCount++;
}
<SkipInternal>[@\\]"ifnot"/[ \t] {
- g_condCount++;
+ yyextra->condCount++;
}
<SkipInternal>[@\\]/"endif" {
- g_condCount--;
- if (g_condCount<0) // handle conditional section around of \internal, see bug607743
+ yyextra->condCount--;
+ if (yyextra->condCount<0) // handle conditional section around of \internal, see bug607743
{
unput('\\');
BEGIN(Comment);
}
}
<SkipInternal>[@\\]/"section"[ \t] {
- if (g_sectionLevel>0)
+ if (yyextra->sectionLevel>0)
{
unput('\\');
BEGIN(Comment);
}
}
<SkipInternal>[@\\]/"subsection"[ \t] {
- if (g_sectionLevel>1)
+ if (yyextra->sectionLevel>1)
{
unput('\\');
BEGIN(Comment);
}
}
<SkipInternal>[@\\]/"subsubsection"[ \t] {
- if (g_sectionLevel>2)
+ if (yyextra->sectionLevel>2)
{
unput('\\');
BEGIN(Comment);
}
}
<SkipInternal>[@\\]/"paragraph"[ \t] {
- if (g_sectionLevel>3)
+ if (yyextra->sectionLevel>3)
{
unput('\\');
BEGIN(Comment);
@@ -2112,24 +1633,24 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle argument of name command ------- */
<NameParam>{DOCNL} { // end of argument
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<NameParam>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
- Doxygen::docGroup.appendHeader(' ');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
+ yyextra->docGroup.appendHeader(' ');
}
<NameParam>. { // ignore other stuff
- Doxygen::docGroup.appendHeader(*yytext);
- current->name+=*yytext;
+ yyextra->docGroup.appendHeader(*yytext);
+ yyextra->current->name+=*yytext;
}
/* ----- handle argument of noop command ------- */
<Noop>{DOCNL} { // end of argument
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<Noop>. { // ignore other stuff
@@ -2137,58 +1658,58 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle argument of ingroup command ------- */
<InGroupParam>{LABELID} { // group id
- current->groups.push_back(
+ yyextra->current->groups.push_back(
Grouping(yytext, Grouping::GROUPING_INGROUP)
);
- inGroupParamFound=TRUE;
+ yyextra->inGroupParamFound=TRUE;
}
<InGroupParam>{DOCNL} { // missing argument
- if (!inGroupParamFound)
+ if (!yyextra->inGroupParamFound)
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"Missing group name for \\ingroup command"
);
}
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<InGroupParam>{LC} { // line continuation
- yyLineNr++;
- addOutput('\n');
+ yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
}
<InGroupParam>. { // ignore other stuff
- addOutput(*yytext);
+ addOutput(yyscanner,*yytext);
}
/* ----- handle argument of fn command ------- */
<FnParam>{DOCNL} { // end of argument
- if (braceCount==0)
+ if (yyextra->braceCount==0)
{
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
- langParser->parsePrototype(functionProto);
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
+ yyextra->langParser->parsePrototype(yyextra->functionProto);
BEGIN( Comment );
}
}
<FnParam>{LC} { // line continuation
- yyLineNr++;
- functionProto+=' ';
+ yyextra->lineNr++;
+ yyextra->functionProto+=' ';
}
<FnParam>[^@\\\n()]+ { // non-special characters
- functionProto+=yytext;
+ yyextra->functionProto+=yytext;
}
<FnParam>"(" {
- functionProto+=yytext;
- braceCount++;
+ yyextra->functionProto+=yytext;
+ yyextra->braceCount++;
}
<FnParam>")" {
- functionProto+=yytext;
- braceCount--;
+ yyextra->functionProto+=yytext;
+ yyextra->braceCount--;
}
<FnParam>. { // add other stuff
- functionProto+=*yytext;
+ yyextra->functionProto+=*yytext;
}
@@ -2196,45 +1717,45 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<OverloadParam>{DOCNL} { // end of argument
- if (*yytext=='\n') yyLineNr++;
- if (functionProto.stripWhiteSpace().isEmpty())
+ if (*yytext=='\n') yyextra->lineNr++;
+ if (yyextra->functionProto.stripWhiteSpace().isEmpty())
{ // plain overload command
- addOutput(getOverloadDocs());
- addOutput('\n');
+ addOutput(yyscanner,getOverloadDocs());
+ addOutput(yyscanner,'\n');
}
else // overload declaration
{
- makeStructuralIndicator(Entry::OVERLOADDOC_SEC);
- langParser->parsePrototype(functionProto);
+ makeStructuralIndicator(yyscanner,Entry::OVERLOADDOC_SEC);
+ yyextra->langParser->parsePrototype(yyextra->functionProto);
}
BEGIN( Comment );
}
<OverloadParam>{LC} { // line continuation
- yyLineNr++;
- functionProto+=' ';
+ yyextra->lineNr++;
+ yyextra->functionProto+=' ';
}
<OverloadParam>. { // add other stuff
- functionProto+=*yytext;
+ yyextra->functionProto+=*yytext;
}
/* ----- handle argument of inherit command ------- */
<InheritParam>({ID}("::"|"."))*{ID} { // found argument
- current->extends.push_back(
+ yyextra->current->extends.push_back(
BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
);
BEGIN( Comment );
}
<InheritParam>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"\\inherit command has no argument"
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<InheritParam>. { // invalid character for anchor label
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"Invalid or missing name for \\inherit command"
);
BEGIN(Comment);
@@ -2243,17 +1764,17 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle argument of extends and implements commands ------- */
<ExtendsParam>({ID}("::"|"."))*{ID} { // found argument
- current->extends.push_back(
+ yyextra->current->extends.push_back(
BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal)
);
BEGIN( Comment );
}
<ExtendsParam>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"\\extends or \\implements command has no argument"
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<ExtendsParam>. { // ignore other stuff
@@ -2272,7 +1793,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<SkipLang>[^*@\\\n]* { /* any character not a *, @, backslash or new line */
}
<SkipLang>{DOCNL} { /* new line in verbatim block */
- if (*yytext=='\n') yyLineNr++;
+ if (*yytext=='\n') yyextra->lineNr++;
}
<SkipLang>. { /* any other character */
}
@@ -2280,20 +1801,20 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
/* ----- handle arguments of the cite command ------- */
<CiteLabel>{CITEID} { // found argument
- addCite();
- addOutput(yytext);
+ addCite(yyscanner);
+ addOutput(yyscanner,yytext);
BEGIN(Comment);
}
<CiteLabel>{DOCNL} { // missing argument
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"\\cite command has no label"
);
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
BEGIN( Comment );
}
<CiteLabel>. { // invalid character for cite label
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"Invalid or missing cite label"
);
BEGIN(Comment);
@@ -2303,21 +1824,21 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
<CopyDoc><<EOF>> |
<CopyDoc>{DOCNL} {
- if (*yytext=='\n') yyLineNr++;
- addOutput('\n');
- setOutput(OutputDoc);
- addOutput(" \\copydetails ");
- addOutput(g_copyDocArg);
- addOutput("\n");
+ if (*yytext=='\n') yyextra->lineNr++;
+ addOutput(yyscanner,'\n');
+ setOutput(yyscanner,OutputDoc);
+ addOutput(yyscanner," \\copydetails ");
+ addOutput(yyscanner,yyextra->copyDocArg);
+ addOutput(yyscanner,"\n");
BEGIN(Comment);
}
<CopyDoc>[^\n\\]+ {
- g_copyDocArg+=yytext;
- addOutput(yytext);
+ yyextra->copyDocArg+=yytext;
+ addOutput(yyscanner,yytext);
}
<CopyDoc>. {
- g_copyDocArg+=yytext;
- addOutput(yytext);
+ yyextra->copyDocArg+=yytext;
+ addOutput(yyscanner,yytext);
}
@@ -2325,194 +1846,218 @@ RCSTAG "$"{ID}":"[^\n$]+"$"
//----------------------------------------------------------------------------
-static bool handleBrief(const QCString &, const QCStringList &)
+static bool handleBrief(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
//printf("handleBrief\n");
- setOutput(OutputBrief);
+ setOutput(yyscanner,OutputBrief);
return FALSE;
}
-static bool handleFn(const QCString &, const QCStringList &)
+static bool handleFn(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::MEMBERDOC_SEC);
- functionProto.resize(0);
- braceCount=0;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::MEMBERDOC_SEC);
+ yyextra->functionProto.resize(0);
+ yyextra->braceCount=0;
BEGIN(FnParam);
return stop;
}
-static bool handleDef(const QCString &, const QCStringList &)
+static bool handleDef(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::DEFINEDOC_SEC);
- functionProto.resize(0);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::DEFINEDOC_SEC);
+ yyextra->functionProto.resize(0);
BEGIN(FnParam);
return stop;
}
-static bool handleOverload(const QCString &, const QCStringList &)
+static bool handleOverload(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- functionProto.resize(0);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->functionProto.resize(0);
BEGIN(OverloadParam);
return FALSE;
}
-static bool handleEnum(const QCString &, const QCStringList &)
+static bool handleEnum(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::ENUMDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::ENUMDOC_SEC);
BEGIN(EnumDocArg1);
return stop;
}
-static bool handleDefGroup(const QCString &, const QCStringList &)
+static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC);
- current->groupDocType = Entry::GROUPDOC_NORMAL;
- setOutput(OutputBrief);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::GROUPDOC_SEC);
+ yyextra->current->groupDocType = Entry::GROUPDOC_NORMAL;
+ setOutput(yyscanner,OutputBrief);
BEGIN( GroupDocArg1 );
return stop;
}
-static bool handleAddToGroup(const QCString &, const QCStringList &)
+static bool handleAddToGroup(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC);
- current->groupDocType = Entry::GROUPDOC_ADD;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::GROUPDOC_SEC);
+ yyextra->current->groupDocType = Entry::GROUPDOC_ADD;
BEGIN( GroupDocArg1 );
return stop;
}
-static bool handleWeakGroup(const QCString &, const QCStringList &)
+static bool handleWeakGroup(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::GROUPDOC_SEC);
- current->groupDocType = Entry::GROUPDOC_WEAK;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::GROUPDOC_SEC);
+ yyextra->current->groupDocType = Entry::GROUPDOC_WEAK;
BEGIN( GroupDocArg1 );
return stop;
}
-static bool handleNamespace(const QCString &, const QCStringList &)
+static bool handleNamespace(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::NAMESPACEDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::NAMESPACEDOC_SEC);
BEGIN( NameSpaceDocArg1 );
return stop;
}
-static bool handlePackage(const QCString &, const QCStringList &)
+static bool handlePackage(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::PACKAGEDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::PACKAGEDOC_SEC);
BEGIN( PackageDocArg1 );
return stop;
}
-static bool handleClass(const QCString &, const QCStringList &)
+static bool handleClass(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::CLASSDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::CLASSDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleHeaderFile(const QCString &, const QCStringList &)
+static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
BEGIN( ClassDocArg2 );
return FALSE;
}
-static bool handleProtocol(const QCString &, const QCStringList &)
+static bool handleProtocol(yyscan_t yyscanner,const QCString &, const QCStringList &)
{ // Obj-C protocol
- bool stop=makeStructuralIndicator(Entry::PROTOCOLDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::PROTOCOLDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleCategory(const QCString &, const QCStringList &)
+static bool handleCategory(yyscan_t yyscanner,const QCString &, const QCStringList &)
{ // Obj-C category
- bool stop=makeStructuralIndicator(Entry::CATEGORYDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::CATEGORYDOC_SEC);
BEGIN( CategoryDocArg1 );
return stop;
}
-static bool handleUnion(const QCString &, const QCStringList &)
+static bool handleUnion(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::UNIONDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::UNIONDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleStruct(const QCString &, const QCStringList &)
+static bool handleStruct(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::STRUCTDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::STRUCTDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleInterface(const QCString &, const QCStringList &)
+static bool handleInterface(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::INTERFACEDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::INTERFACEDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handleIdlException(const QCString &, const QCStringList &)
+static bool handleIdlException(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::EXCEPTIONDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::EXCEPTIONDOC_SEC);
BEGIN( ClassDocArg1 );
return stop;
}
-static bool handlePage(const QCString &, const QCStringList &)
+static bool handlePage(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::PAGEDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::PAGEDOC_SEC);
BEGIN( PageDocArg1 );
return stop;
}
-static bool handleMainpage(const QCString &, const QCStringList &)
+static bool handleMainpage(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::MAINPAGEDOC_SEC);
- current->name = "";
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::MAINPAGEDOC_SEC);
+ yyextra->current->name = "";
if (!stop)
{
- current->name = "mainpage";
+ yyextra->current->name = "mainpage";
}
BEGIN( PageDocArg2 );
return stop;
}
-static bool handleFile(const QCString &, const QCStringList &)
+static bool handleFile(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::FILEDOC_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::FILEDOC_SEC);
if (!stop)
{
- current->name = yyFileName;
+ yyextra->current->name = yyextra->fileName;
}
BEGIN( FileDocArg1 );
return stop;
}
-static bool handleParam(const QCString &, const QCStringList &)
+static bool handleParam(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
// we need process param and retval arguments to escape leading underscores in case of
// markdown processing, see bug775493
- addOutput("@param ");
+ addOutput(yyscanner,"@param ");
BEGIN( ParamArg1 );
return FALSE;
}
-static bool handleRetval(const QCString &, const QCStringList &)
+static bool handleRetval(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- addOutput("@retval ");
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ addOutput(yyscanner,"@retval ");
BEGIN( ParamArg1 );
return FALSE;
}
-static bool handleDir(const QCString &, const QCStringList &)
+static bool handleDir(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::DIRDOC_SEC);
- if (!stop) current->name = yyFileName;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::DIRDOC_SEC);
+ if (!stop) yyextra->current->name = yyextra->fileName;
BEGIN( FileDocArg1 );
return stop;
}
-static bool handleExample(const QCString &cmd, const QCStringList &optList)
+static bool handleExample(yyscan_t yyscanner,const QCString &cmd, const QCStringList &optList)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
Entry::Sections section=Entry::EXAMPLE_SEC;
QCStringList::ConstIterator it;
for ( it = optList.begin(); it != optList.end(); ++it )
@@ -2524,458 +2069,508 @@ static bool handleExample(const QCString &cmd, const QCStringList &optList)
}
else
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"unsupported option '%s' for command '\\%s'",qPrint(opt),qPrint(cmd));
}
}
- bool stop=makeStructuralIndicator(section);
- if (!stop) current->name = yyFileName;
+ bool stop=makeStructuralIndicator(yyscanner,section);
+ if (!stop) yyextra->current->name = yyextra->fileName;
BEGIN( FileDocArg1 );
return stop;
}
-static bool handleDetails(const QCString &, const QCStringList &)
+static bool handleDetails(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- if (inContext!=OutputBrief)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->inContext!=OutputBrief)
{
- addOutput("\n\n"); // treat @details outside brief description
+ addOutput(yyscanner,"\n\n"); // treat @details outside brief description
// as a new paragraph
}
- setOutput(OutputDoc);
+ setOutput(yyscanner,OutputDoc);
return FALSE;
}
-static bool handleNoop(const QCString &, const QCStringList &)
+static bool handleNoop(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
BEGIN( Noop );
return FALSE;
}
-static bool handleName(const QCString &, const QCStringList &)
+static bool handleName(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- bool stop=makeStructuralIndicator(Entry::MEMBERGRP_SEC);
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool stop=makeStructuralIndicator(yyscanner,Entry::MEMBERGRP_SEC);
if (!stop)
{
- Doxygen::docGroup.clearHeader();
+ yyextra->docGroup.clearHeader();
BEGIN( NameParam );
- if (!Doxygen::docGroup.isEmpty()) // end of previous member group
+ if (!yyextra->docGroup.isEmpty()) // end of previous member group
{
- Doxygen::docGroup.close(current,yyFileName,yyLineNr,TRUE,true);
+ yyextra->docGroup.close(yyextra->current,yyextra->fileName,yyextra->lineNr,TRUE,true);
}
}
return stop;
}
-static bool handleTodo(const QCString &, const QCStringList &)
+static bool handleTodo(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- newXRefKind = XRef_Todo;
- setOutput(OutputXRef);
- xrefKind = XRef_Todo;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->newXRefKind = XRef_Todo;
+ setOutput(yyscanner,OutputXRef);
+ yyextra->xrefKind = XRef_Todo;
return FALSE;
}
-static bool handleTest(const QCString &, const QCStringList &)
+static bool handleTest(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- newXRefKind = XRef_Test;
- setOutput(OutputXRef);
- xrefKind = XRef_Test;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->newXRefKind = XRef_Test;
+ setOutput(yyscanner,OutputXRef);
+ yyextra->xrefKind = XRef_Test;
return FALSE;
}
-static bool handleBug(const QCString &, const QCStringList &)
+static bool handleBug(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- newXRefKind = XRef_Bug;
- setOutput(OutputXRef);
- xrefKind = XRef_Bug;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->newXRefKind = XRef_Bug;
+ setOutput(yyscanner,OutputXRef);
+ yyextra->xrefKind = XRef_Bug;
return FALSE;
}
-static bool handleDeprecated(const QCString &, const QCStringList &)
+static bool handleDeprecated(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- newXRefKind = XRef_Deprecated;
- setOutput(OutputXRef);
- xrefKind = XRef_Deprecated;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->newXRefKind = XRef_Deprecated;
+ setOutput(yyscanner,OutputXRef);
+ yyextra->xrefKind = XRef_Deprecated;
return FALSE;
}
-static bool handleXRefItem(const QCString &, const QCStringList &)
+static bool handleXRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- newXRefKind = XRef_Item;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->newXRefKind = XRef_Item;
BEGIN(XRefItemParam1);
return FALSE;
}
-static bool handleParBlock(const QCString &, const QCStringList &)
+static bool handleParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- if (g_insideParBlock)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->insideParBlock)
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found \\parblock command while already in a parblock!");
}
- if (!g_spaceBeforeCmd.isEmpty())
+ if (!yyextra->spaceBeforeCmd.isEmpty())
{
- addOutput(g_spaceBeforeCmd);
- g_spaceBeforeCmd.resize(0);
+ addOutput(yyscanner,yyextra->spaceBeforeCmd);
+ yyextra->spaceBeforeCmd.resize(0);
}
- addOutput("@parblock ");
- g_insideParBlock = TRUE;
+ addOutput(yyscanner,"@parblock ");
+ yyextra->insideParBlock = TRUE;
return FALSE;
}
-static bool handleEndParBlock(const QCString &, const QCStringList &)
+static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- if (!g_insideParBlock)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (!yyextra->insideParBlock)
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found \\endparblock command without matching \\parblock!");
}
- addOutput("@endparblock");
- setOutput(OutputDoc); // to end a parblock inside a xrefitem like context
- g_insideParBlock = FALSE;
+ addOutput(yyscanner,"@endparblock");
+ setOutput(yyscanner,OutputDoc); // to end a parblock inside a xrefitem like context
+ yyextra->insideParBlock = FALSE;
return FALSE;
}
-static bool handleRelated(const QCString &, const QCStringList &)
+static bool handleRelated(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- if (!current->relates.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (!yyextra->current->relates.isEmpty())
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
}
- current->relatesType = Simple;
+ yyextra->current->relatesType = Simple;
BEGIN(RelatesParam1);
return FALSE;
}
-static bool handleRelatedAlso(const QCString &, const QCStringList &)
+static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- if (!current->relates.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (!yyextra->current->relates.isEmpty())
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
}
- current->relatesType = Duplicate;
+ yyextra->current->relatesType = Duplicate;
BEGIN(RelatesParam1);
return FALSE;
}
-static bool handleMemberOf(const QCString &, const QCStringList &)
+static bool handleMemberOf(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- if (!current->relates.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (!yyextra->current->relates.isEmpty())
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition");
}
- current->relatesType = MemberOf;
+ yyextra->current->relatesType = MemberOf;
BEGIN(RelatesParam1);
return FALSE;
}
-static bool handleRefItem(const QCString &, const QCStringList &)
+static bool handleRefItem(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- addOutput("@refitem ");
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ addOutput(yyscanner,"@refitem ");
BEGIN(LineParam);
return FALSE;
}
-static bool handleSection(const QCString &s, const QCStringList &)
+static bool handleSection(yyscan_t yyscanner,const QCString &s, const QCStringList &)
{
- setOutput(OutputDoc);
- addOutput("@"+s+" ");
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ setOutput(yyscanner,OutputDoc);
+ addOutput(yyscanner,"@"+s+" ");
BEGIN(SectionLabel);
- if (s=="section") g_sectionLevel=1;
- else if (s=="subsection") g_sectionLevel=2;
- else if (s=="subsubsection") g_sectionLevel=3;
- else if (s=="paragraph") g_sectionLevel=4;
+ if (s=="section") yyextra->sectionLevel=1;
+ else if (s=="subsection") yyextra->sectionLevel=2;
+ else if (s=="subsubsection") yyextra->sectionLevel=3;
+ else if (s=="paragraph") yyextra->sectionLevel=4;
return FALSE;
}
-static bool handleSubpage(const QCString &s, const QCStringList &)
+static bool handleSubpage(yyscan_t yyscanner,const QCString &s, const QCStringList &)
{
- if (current->section!=Entry::EMPTY_SEC &&
- current->section!=Entry::PAGEDOC_SEC &&
- current->section!=Entry::MAINPAGEDOC_SEC
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->current->section!=Entry::EMPTY_SEC &&
+ yyextra->current->section!=Entry::PAGEDOC_SEC &&
+ yyextra->current->section!=Entry::MAINPAGEDOC_SEC
)
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found \\subpage command in a comment block that is not marked as a page!");
}
- if (!g_spaceBeforeCmd.isEmpty())
+ if (!yyextra->spaceBeforeCmd.isEmpty())
{
- addOutput(g_spaceBeforeCmd);
- g_spaceBeforeCmd.resize(0);
+ addOutput(yyscanner,yyextra->spaceBeforeCmd);
+ yyextra->spaceBeforeCmd.resize(0);
}
- addOutput("@"+s+" ");
+ addOutput(yyscanner,"@"+s+" ");
BEGIN(SubpageLabel);
return FALSE;
}
-static bool handleAnchor(const QCString &s, const QCStringList &)
+static bool handleAnchor(yyscan_t yyscanner,const QCString &s, const QCStringList &)
{
- addOutput("@"+s+" ");
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ addOutput(yyscanner,"@"+s+" ");
BEGIN(AnchorLabel);
return FALSE;
}
-static bool handleCite(const QCString &s, const QCStringList &)
+static bool handleCite(yyscan_t yyscanner,const QCString &s, const QCStringList &)
{
- if (!g_spaceBeforeCmd.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (!yyextra->spaceBeforeCmd.isEmpty())
{
- addOutput(g_spaceBeforeCmd);
- g_spaceBeforeCmd.resize(0);
+ addOutput(yyscanner,yyextra->spaceBeforeCmd);
+ yyextra->spaceBeforeCmd.resize(0);
}
- addOutput("@"+s+" ");
+ addOutput(yyscanner,"@"+s+" ");
BEGIN(CiteLabel);
return FALSE;
}
-static bool handleFormatBlock(const QCString &s, const QCStringList &optList)
+static bool handleFormatBlock(yyscan_t yyscanner,const QCString &s, const QCStringList &optList)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (optList.isEmpty())
{
- addOutput("@"+s+" ");
+ addOutput(yyscanner,"@"+s+" ");
}
else
{
- addOutput("@"+s+"{"+optList.join(",")+"} ");
+ addOutput(yyscanner,"@"+s+"{"+optList.join(",")+"} ");
}
//printf("handleFormatBlock(%s) with option(%s)\n",s.data(),opt.data());
- blockName=s;
- g_commentCount=0;
+ yyextra->blockName=s;
+ yyextra->commentCount=0;
BEGIN(FormatBlock);
return FALSE;
}
-static bool handleAddIndex(const QCString &, const QCStringList &)
+static bool handleAddIndex(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- addOutput("@addindex ");
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ addOutput(yyscanner,"@addindex ");
BEGIN(LineParam);
return FALSE;
}
-static bool handleIf(const QCString &, const QCStringList &)
+static bool handleIf(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- enabledSectionFound=FALSE;
- guardType = Guard_If;
- g_spaceBeforeIf = g_spaceBeforeCmd;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->enabledSectionFound=FALSE;
+ yyextra->guardType = Guard_If;
+ yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
BEGIN(GuardParam);
return FALSE;
}
-static bool handleIfNot(const QCString &, const QCStringList &)
+static bool handleIfNot(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- enabledSectionFound=FALSE;
- guardType = Guard_IfNot;
- g_spaceBeforeIf = g_spaceBeforeCmd;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->enabledSectionFound=FALSE;
+ yyextra->guardType = Guard_IfNot;
+ yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
BEGIN(GuardParam);
return FALSE;
}
-static bool handleElseIf(const QCString &, const QCStringList &)
+static bool handleElseIf(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- if (guards.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->guards.empty())
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found \\else without matching start command");
}
else
{
- guardType = enabledSectionFound ? Guard_Skip : Guard_If;
+ yyextra->guardType = yyextra->enabledSectionFound ? Guard_Skip : Guard_If;
+ yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
BEGIN(GuardParam);
}
return FALSE;
}
-static bool handleElse(const QCString &, const QCStringList &)
+static bool handleElse(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- if (guards.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->guards.empty())
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found \\else without matching start command");
}
else
{
+ yyextra->spaceBeforeIf = yyextra->spaceBeforeCmd;
BEGIN( SkipGuardedSection );
}
return FALSE;
}
-static bool handleEndIf(const QCString &, const QCStringList &)
+static bool handleEndIf(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- if (guards.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->guards.empty())
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"found \\endif without matching start command");
}
else
{
- delete guards.pop();
+ yyextra->guards.pop();
}
- enabledSectionFound=FALSE;
- if (!g_spaceBeforeCmd.isEmpty())
+ yyextra->enabledSectionFound=FALSE;
+ if (!yyextra->spaceBeforeCmd.isEmpty())
{
- addOutput(g_spaceBeforeCmd);
- g_spaceBeforeCmd.resize(0);
+ addOutput(yyscanner,yyextra->spaceBeforeCmd);
+ yyextra->spaceBeforeCmd.resize(0);
}
BEGIN( GuardParamEnd );
return FALSE;
}
-static bool handleIngroup(const QCString &, const QCStringList &)
+static bool handleIngroup(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- inGroupParamFound=FALSE;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->inGroupParamFound=FALSE;
BEGIN( InGroupParam );
return FALSE;
}
-static bool handleNoSubGrouping(const QCString &, const QCStringList &)
+static bool handleNoSubGrouping(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->subGrouping = FALSE;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->subGrouping = FALSE;
return FALSE;
}
-static bool handleShowInitializer(const QCString &, const QCStringList &)
+static bool handleShowInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->initLines = 100000; // ON
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->initLines = 100000; // ON
return FALSE;
}
-static bool handleHideInitializer(const QCString &, const QCStringList &)
+static bool handleHideInitializer(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->initLines = 0; // OFF
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->initLines = 0; // OFF
return FALSE;
}
-static bool handleCallgraph(const QCString &, const QCStringList &)
+static bool handleCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->callGraph = TRUE; // ON
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->callGraph = TRUE; // ON
return FALSE;
}
-static bool handleHideCallgraph(const QCString &, const QCStringList &)
+static bool handleHideCallgraph(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->callGraph = FALSE; // OFF
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->callGraph = FALSE; // OFF
return FALSE;
}
-static bool handleCallergraph(const QCString &, const QCStringList &)
+static bool handleCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->callerGraph = TRUE; // ON
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->callerGraph = TRUE; // ON
return FALSE;
}
-static bool handleHideCallergraph(const QCString &, const QCStringList &)
+static bool handleHideCallergraph(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->callerGraph = FALSE; // OFF
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->callerGraph = FALSE; // OFF
return FALSE;
}
-static bool handleReferencedByRelation(const QCString &, const QCStringList &)
+static bool handleReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->referencedByRelation = TRUE; // ON
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->referencedByRelation = TRUE; // ON
return FALSE;
}
-static bool handleHideReferencedByRelation(const QCString &, const QCStringList &)
+static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->referencedByRelation = FALSE; // OFF
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->referencedByRelation = FALSE; // OFF
return FALSE;
}
-static bool handleReferencesRelation(const QCString &, const QCStringList &)
+static bool handleReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->referencesRelation = TRUE; // ON
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->referencesRelation = TRUE; // ON
return FALSE;
}
-static bool handleHideReferencesRelation(const QCString &, const QCStringList &)
+static bool handleHideReferencesRelation(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->referencesRelation = FALSE; // OFF
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->referencesRelation = FALSE; // OFF
return FALSE;
}
-static bool handleInternal(const QCString &, const QCStringList &)
+static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (!Config_getBool(INTERNAL_DOCS))
{
// make sure some whitespace before a \internal command
// is not treated as "documentation"
- if (current->doc.stripWhiteSpace().isEmpty())
+ if (yyextra->current->doc.stripWhiteSpace().isEmpty())
{
- current->doc.resize(0);
+ yyextra->current->doc.resize(0);
}
- g_condCount=0;
+ yyextra->condCount=0;
BEGIN( SkipInternal );
}
else
{
// re-enabled for bug640828
- addOutput(" \\internal ");
- inInternalDocs = TRUE;
+ addOutput(yyscanner," \\internal ");
+ yyextra->inInternalDocs = TRUE;
}
return FALSE;
}
-static bool handleLineBr(const QCString &, const QCStringList &)
+static bool handleLineBr(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- addOutput('\n');
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ addOutput(yyscanner,'\n');
return FALSE;
}
-static bool handleStatic(const QCString &, const QCStringList &)
+static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- endBrief();
- current->stat = TRUE;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ endBrief(yyscanner);
+ yyextra->current->stat = TRUE;
return FALSE;
}
-static bool handlePure(const QCString &, const QCStringList &)
+static bool handlePure(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- endBrief();
- current->virt = Pure;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ endBrief(yyscanner);
+ yyextra->current->virt = Pure;
return FALSE;
}
-static bool handlePrivate(const QCString &, const QCStringList &)
+static bool handlePrivate(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->protection = Private;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->protection = Private;
return FALSE;
}
-static bool handlePrivateSection(const QCString &, const QCStringList &)
+static bool handlePrivateSection(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->protection = protection = Private;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->protection = yyextra->protection = Private;
return FALSE;
}
-static bool handleProtected(const QCString &, const QCStringList &)
+static bool handleProtected(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->protection = Protected;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->protection = Protected;
return FALSE;
}
-static bool handleProtectedSection(const QCString &, const QCStringList &)
+static bool handleProtectedSection(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->protection = protection = Protected ;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->protection = yyextra->protection = Protected ;
return FALSE;
}
-static bool handlePublic(const QCString &, const QCStringList &)
+static bool handlePublic(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->protection = Public;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->protection = Public;
return FALSE;
}
-static bool handlePublicSection(const QCString &, const QCStringList &)
+static bool handlePublicSection(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- current->protection = protection = Public;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->protection = yyextra->protection = Public;
return FALSE;
}
-static bool handleToc(const QCString &, const QCStringList &optList)
+static bool handleToc(yyscan_t yyscanner,const QCString &, const QCStringList &optList)
{
- if (current->section==Entry::PAGEDOC_SEC ||
- current->section==Entry::MAINPAGEDOC_SEC)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->current->section==Entry::PAGEDOC_SEC ||
+ yyextra->current->section==Entry::MAINPAGEDOC_SEC)
{
QCStringList::ConstIterator it;
for ( it = optList.begin(); it != optList.end(); ++it )
@@ -2988,7 +2583,7 @@ static bool handleToc(const QCString &, const QCStringList &optList)
{
if (sscanf(opt.right(opt.length() - i - 1).data(),"%d%c",&level,&dum) != 1)
{
- warn(yyFileName,yyLineNr,"Unknown option:level specified with \\tableofcontents: '%s'", (*it).stripWhiteSpace().data());
+ warn(yyextra->fileName,yyextra->lineNr,"Unknown option:level specified with \\tableofcontents: '%s'", (*it).stripWhiteSpace().data());
opt = "";
}
else
@@ -3002,131 +2597,560 @@ static bool handleToc(const QCString &, const QCStringList &optList)
{
if (opt == "html")
{
- current->localToc.enableHtml(level);
+ yyextra->current->localToc.enableHtml(level);
}
else if (opt == "latex")
{
- current->localToc.enableLatex(level);
+ yyextra->current->localToc.enableLatex(level);
}
else if (opt == "xml")
{
- current->localToc.enableXml(level);
+ yyextra->current->localToc.enableXml(level);
}
else if (opt == "docbook")
{
- current->localToc.enableDocbook(level);
+ yyextra->current->localToc.enableDocbook(level);
}
else
{
- warn(yyFileName,yyLineNr,"Unknown option specified with \\tableofcontents: '%s'", (*it).stripWhiteSpace().data());
+ warn(yyextra->fileName,yyextra->lineNr,"Unknown option specified with \\tableofcontents: '%s'", (*it).stripWhiteSpace().data());
}
}
}
- if (current->localToc.nothingEnabled())
+ if (yyextra->current->localToc.nothingEnabled())
{
// for backward compatibility
- current->localToc.enableHtml(5);
- current->localToc.enableXml(5);
+ yyextra->current->localToc.enableHtml(5);
+ yyextra->current->localToc.enableXml(5);
}
}
return FALSE;
}
-static bool handleInherit(const QCString &, const QCStringList &)
+static bool handleInherit(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
BEGIN(InheritParam);
return FALSE;
}
-static bool handleExtends(const QCString &, const QCStringList &)
+static bool handleExtends(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
BEGIN(ExtendsParam);
return FALSE;
}
-static bool handleCopyBrief(const QCString &, const QCStringList &)
+static bool handleCopyBrief(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- if (current->brief.isEmpty() && current->doc.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->current->brief.isEmpty() && yyextra->current->doc.isEmpty())
{ // if we don't have a brief or detailed description yet,
// then the @copybrief should end up in the brief description.
// otherwise it will be copied inline (see bug691315 & bug700788)
- setOutput(OutputBrief);
+ setOutput(yyscanner,OutputBrief);
}
- if (!g_spaceBeforeCmd.isEmpty())
+ if (!yyextra->spaceBeforeCmd.isEmpty())
{
- addOutput(g_spaceBeforeCmd);
- g_spaceBeforeCmd.resize(0);
+ addOutput(yyscanner,yyextra->spaceBeforeCmd);
+ yyextra->spaceBeforeCmd.resize(0);
}
- addOutput("\\copybrief ");
+ addOutput(yyscanner,"\\copybrief ");
return FALSE;
}
-static bool handleCopyDetails(const QCString &, const QCStringList &)
+static bool handleCopyDetails(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- setOutput(OutputDoc);
- if (!g_spaceBeforeCmd.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ setOutput(yyscanner,OutputDoc);
+ if (!yyextra->spaceBeforeCmd.isEmpty())
{
- addOutput(g_spaceBeforeCmd);
- g_spaceBeforeCmd.resize(0);
+ addOutput(yyscanner,yyextra->spaceBeforeCmd);
+ yyextra->spaceBeforeCmd.resize(0);
}
- addOutput("\\copydetails ");
+ addOutput(yyscanner,"\\copydetails ");
return FALSE;
}
-static bool handleCopyDoc(const QCString &, const QCStringList &)
+static bool handleCopyDoc(yyscan_t yyscanner,const QCString &, const QCStringList &)
{
- setOutput(OutputBrief);
- if (!g_spaceBeforeCmd.isEmpty())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ setOutput(yyscanner,OutputBrief);
+ if (!yyextra->spaceBeforeCmd.isEmpty())
{
- addOutput(g_spaceBeforeCmd);
- g_spaceBeforeCmd.resize(0);
+ addOutput(yyscanner,yyextra->spaceBeforeCmd);
+ yyextra->spaceBeforeCmd.resize(0);
}
- addOutput("\\copybrief ");
- g_copyDocArg.resize(0);
+ addOutput(yyscanner,"\\copybrief ");
+ yyextra->copyDocArg.resize(0);
BEGIN(CopyDoc);
return FALSE;
}
-//----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------
-static void checkFormula()
+static void initParser(yyscan_t yyscanner)
{
- if (YY_START==ReadFormulaShort || YY_START==ReadFormulaLong)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->sectionLabel.resize(0);
+ yyextra->sectionTitle.resize(0);
+ yyextra->docGroup.clearHeader();
+ yyextra->insideParBlock = FALSE;
+}
+
+
+static bool getDocSectionName(int s)
+{
+ switch(s)
+ {
+ case Entry::CLASSDOC_SEC:
+ case Entry::STRUCTDOC_SEC:
+ case Entry::UNIONDOC_SEC:
+ case Entry::EXCEPTIONDOC_SEC:
+ case Entry::NAMESPACEDOC_SEC:
+ case Entry::PROTOCOLDOC_SEC:
+ case Entry::CATEGORYDOC_SEC:
+ case Entry::ENUMDOC_SEC:
+ case Entry::PAGEDOC_SEC:
+ case Entry::VARIABLEDOC_SEC:
+ case Entry::MEMBERDOC_SEC:
+ case Entry::OVERLOADDOC_SEC:
+ case Entry::FILEDOC_SEC:
+ case Entry::DEFINEDOC_SEC:
+ case Entry::GROUPDOC_SEC:
+ case Entry::MAINPAGEDOC_SEC:
+ case Entry::PACKAGEDOC_SEC:
+ case Entry::DIRDOC_SEC:
+ case Entry::EXAMPLE_SEC:
+ case Entry::MEMBERGRP_SEC:
+ return TRUE;
+ default:
+ return FALSE;
+ }
+}
+
+//-----------------------------------------------------------------------------
+
+static bool makeStructuralIndicator(yyscan_t yyscanner,Entry::Sections s)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //printf("yyextra->current->section=%x\n",yyextra->current->section);
+ if (getDocSectionName(yyextra->current->section))
{
- warn(yyFileName,yyLineNr,"End of comment block while inside formula.");
+ return TRUE;
+ }
+ else
+ {
+ yyextra->needNewEntry = TRUE;
+ yyextra->current->section = s;
+ yyextra->current->fileName = yyextra->fileName;
+ yyextra->current->startLine = yyextra->lineNr;
+ return FALSE;
}
}
-//----------------------------------------------------------------------------
+//-----------------------------------------------------------------
+
+static void lineCount(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ for( const char* c = yytext ; *c ; ++c )
+ yyextra->lineNr += (*c == '\n') ;
+}
+
+//-----------------------------------------------------------------
+
+static QCString stripQuotes(const char *s)
+{
+ QCString name;
+ if (s==0 || *s==0) return name;
+ name=s;
+ if (name.at(0)=='"' && name.at(name.length()-1)=='"')
+ {
+ name=name.mid(1,name.length()-2);
+ }
+ return name;
+}
+
+//-----------------------------------------------------------------
+
+static void addXRefItem(yyscan_t yyscanner,
+ const char *listName,const char *itemTitle,
+ const char *listTitle,bool append)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (listName==0) return;
+ //printf("addXRefItem(%s,%s,%s,%d)\n",listName,itemTitle,listTitle,append);
+
+ RefList *refList = RefListManager::instance().add(listName,listTitle,itemTitle);
+ RefItem *item = 0;
+ for (RefItem *i : yyextra->current->sli)
+ {
+ if (i && qstrcmp(i->list()->listName(),listName)==0)
+ {
+ //printf("found %s lii->type=%s\n",listName,lii->type);
+ item = i;
+ break;
+ }
+ }
+ if (item && append) // already found item of same type just before this one
+ {
+ //printf("listName=%s item id = %d existing\n",listName,lii->itemId);
+ item->setText(item->text() + " <p>" + yyextra->outputXRef);
+ //printf("%s: text +=%s\n",listName,item->text.data());
+ }
+ else // new item
+ {
+ //printf("listName=%s item id = %d new yyextra->current=%p\n",listName,itemId,yyextra->current);
+
+ // if we have already an item from the same list type (e.g. a second @todo)
+ // in the same Entry (i.e. lii!=0) then we reuse its link anchor.
+ item = refList->add();
+ QCString anchorLabel;
+ anchorLabel.sprintf("_%s%06d",listName,item->id());
+ item->setText(yyextra->outputXRef);
+ item->setAnchor(anchorLabel);
+ yyextra->current->sli.push_back(item);
+ QCString cmdString;
+ cmdString.sprintf(" \\xrefitem %s %d.",listName,item->id());
+ if (yyextra->inBody)
+ {
+ yyextra->current->inbodyDocs += cmdString;
+ }
+ else
+ {
+ yyextra->current->doc += cmdString;
+ }
+
+ SectionManager &sm = SectionManager::instance();
+ const SectionInfo *si = sm.find(anchorLabel);
+ if (si)
+ {
+ if (si->lineNr() != -1)
+ {
+ warn(listName,yyextra->lineNr,"multiple use of section label '%s', (first occurrence: %s, line %d)",anchorLabel.data(),si->fileName().data(),si->lineNr());
+ }
+ else
+ {
+ warn(listName,yyextra->lineNr,"multiple use of section label '%s', (first occurrence: %s)",anchorLabel.data(),si->fileName().data());
+ }
+ }
+ else
+ {
+ si = sm.add(anchorLabel,listName,yyextra->lineNr,
+ yyextra->sectionTitle,SectionType::Anchor,
+ yyextra->sectionLevel);
+ yyextra->current->anchors.push_back(si);
+ }
+ }
+ yyextra->outputXRef.resize(0);
+}
+
+//-----------------------------------------------------------------------------
+
+// Adds a formula text to the list/dictionary of formulas if it was
+// not already added. Returns the label of the formula.
+static QCString addFormula(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ QCString formLabel;
+ QCString fText=yyextra->formulaText.simplifyWhiteSpace();
+ int id = FormulaManager::instance().addFormula(fText);
+ formLabel.sprintf("\\_form#%d",id);
+ for (int i=0;i<yyextra->formulaNewLines;i++) formLabel+="@_fakenl"; // add fake newlines to
+ // keep the warnings
+ // correctly aligned.
+ return formLabel;
+}
+
+//-----------------------------------------------------------------------------
+
+static SectionType sectionLevelToType(int level)
+{
+ if (level>=0 && level<5) return (SectionType)level;
+ return SectionType::Anchor;
+}
+
+static void addSection(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ SectionManager &sm = SectionManager::instance();
+ const SectionInfo *si = sm.find(yyextra->sectionLabel);
+ if (si)
+ {
+ if (si->lineNr() != -1)
+ {
+ warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s, line %d)",yyextra->sectionLabel.data(),si->fileName().data(),si->lineNr());
+ }
+ else
+ {
+ warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding section, (first occurrence: %s)",yyextra->sectionLabel.data(),si->fileName().data());
+ }
+ }
+ else
+ {
+ // create a new section element
+ yyextra->sectionTitle+=yytext;
+ yyextra->sectionTitle=yyextra->sectionTitle.stripWhiteSpace();
+ si = sm.add(yyextra->sectionLabel,yyextra->fileName,yyextra->lineNr,
+ yyextra->sectionTitle,sectionLevelToType(yyextra->sectionLevel),
+ yyextra->sectionLevel);
+
+ // add section to this entry
+ yyextra->current->anchors.push_back(si);
+ }
+}
-QCString preprocessCommentBlock(const QCString &comment,
- const QCString &fileName,
- int lineNr)
+//-----------------------------------------------------------------------------
+
+static void addCite(yyscan_t yyscanner)
{
- if (!comment.isEmpty() && Doxygen::markdownSupport)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ QCString name=yytext;
+ if (yytext[0] =='"')
+ {
+ name=yytext+1;
+ name=name.left(yyleng-2);
+ }
+ CitationManager::instance().insert(name.data());
+}
+
+//-----------------------------------------------------------------------------
+
+// strip trailing whitespace (excluding newlines) from string s
+static void stripTrailingWhiteSpace(QCString &s)
+{
+ uint len = s.length();
+ int i = (int)len-1;
+ char c;
+ while (i>=0 && ((c = s.at(i))==' ' || c=='\t' || c=='\r')) i--;
+ if (i!=(int)len-1)
+ {
+ s.resize(i+2); // string up to and including char at pos i and \0 terminator
+ }
+}
+
+// selects the output to write to
+static inline void setOutput(yyscan_t yyscanner,OutputContext ctx)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool xrefAppendToPrev = yyextra->xrefAppendFlag;
+ // determine append flag for the next item (i.e. the end of this item)
+ yyextra->xrefAppendFlag = !yyextra->inBody &&
+ yyextra->inContext==OutputXRef && ctx==OutputXRef && // two consecutive xref items
+ yyextra->newXRefKind==yyextra->xrefKind && // of the same kind
+ (yyextra->xrefKind!=XRef_Item ||
+ yyextra->newXRefItemKey==yyextra->xrefItemKey); // with the same key if \xrefitem
+ //printf("%d && %d && %d && (%d || %d)\n",
+ // yyextra->inContext==OutputXRef,
+ // ctx==OutputXRef,
+ // yyextra->newXRefKind==yyextra->xrefKind,
+ // yyextra->xrefKind!=XRef_Item,
+ // yyextra->newXRefItemKey==yyextra->xrefItemKey);
+ //printf("refKind=%d yyextra->newXRefKind=%d xrefAppendToPrev=%d yyextra->xrefAppendFlag=%d\n",
+ // yyextra->xrefKind,yyextra->newXRefKind,xrefAppendToPrev,yyextra->xrefAppendFlag);
+
+ //printf("setOutput(yyscanner,yyextra->inContext=%d ctx=%d)\n",yyextra->inContext,ctx);
+ if (yyextra->inContext==OutputXRef) // end of XRef section => add the item
{
- QCString result = processMarkdown(fileName,lineNr,0,comment);
- const char *p = result.data();
- if (p)
+ // See if we can append this new xref item to the previous one.
+ // We know this at the start of the next item of the same
+ // type and need to remember this until the end of that item.
+ switch(yyextra->xrefKind)
{
- while (*p==' ') p++; // skip over spaces
- while (*p=='\n') p++; // skip over newlines
- if (qstrncmp(p,"<br>",4)==0) p+=4; // skip over <br>
+ case XRef_Todo:
+ addXRefItem(yyscanner,"todo",
+ theTranslator->trTodo(),
+ theTranslator->trTodoList(),
+ xrefAppendToPrev
+ );
+ break;
+ case XRef_Test:
+ addXRefItem(yyscanner,"test",
+ theTranslator->trTest(),
+ theTranslator->trTestList(),
+ xrefAppendToPrev
+ );
+ break;
+ case XRef_Bug:
+ addXRefItem(yyscanner,"bug",
+ theTranslator->trBug(),
+ theTranslator->trBugList(),
+ xrefAppendToPrev
+ );
+ break;
+ case XRef_Deprecated:
+ addXRefItem(yyscanner,"deprecated",
+ theTranslator->trDeprecated(),
+ theTranslator->trDeprecatedList(),
+ xrefAppendToPrev
+ );
+ break;
+ case XRef_Item: // user defined list
+ addXRefItem(yyscanner,yyextra->xrefItemKey,
+ yyextra->xrefItemTitle,
+ yyextra->xrefListTitle,
+ xrefAppendToPrev
+ );
+ break;
+ case XRef_None:
+ ASSERT(0);
+ break;
}
- if (p>result.data())
+ }
+ yyextra->xrefItemKey = yyextra->newXRefItemKey;
+
+ int oldContext = yyextra->inContext;
+ yyextra->inContext = ctx;
+ if (yyextra->inContext!=OutputXRef && yyextra->inBody) yyextra->inContext=OutputInbody;
+ switch(yyextra->inContext)
+ {
+ case OutputDoc:
+ if (oldContext!=yyextra->inContext)
+ {
+ stripTrailingWhiteSpace(yyextra->current->doc);
+ if (yyextra->current->docFile.isEmpty())
+ {
+ yyextra->current->docFile = yyextra->fileName;
+ yyextra->current->docLine = yyextra->lineNr;
+ }
+ }
+ yyextra->pOutputString = &yyextra->current->doc;
+ break;
+ case OutputBrief:
+ if (oldContext!=yyextra->inContext)
+ {
+ if (yyextra->current->briefFile.isEmpty())
+ {
+ yyextra->current->briefFile = yyextra->fileName;
+ yyextra->current->briefLine = yyextra->lineNr;
+ }
+ }
+ if (yyextra->current->brief.stripWhiteSpace().isEmpty()) // we only want one brief
+ // description even if multiple
+ // are given...
+ {
+ yyextra->pOutputString = &yyextra->current->brief;
+ }
+ else
+ {
+ if (!yyextra->current->doc.isEmpty()) // when appending parts add a new line
+ {
+ yyextra->current->doc += "\n";
+ }
+ yyextra->pOutputString = &yyextra->current->doc;
+ yyextra->inContext = OutputDoc; // need to switch to detailed docs, see bug 631380
+ }
+ break;
+ case OutputXRef:
+ yyextra->pOutputString = &yyextra->outputXRef;
+ // first item found, so can't append to previous
+ //yyextra->xrefAppendFlag = FALSE;
+ break;
+ case OutputInbody:
+ yyextra->pOutputString = &yyextra->current->inbodyDocs;
+ break;
+ }
+}
+
+
+static void addAnchor(yyscan_t yyscanner,const char *anchor)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ SectionManager &sm = SectionManager::instance();
+ const SectionInfo *si = sm.find(anchor);
+ if (si)
+ {
+ if (si->lineNr() != -1)
{
- // strip part of the input
- result = result.mid(p-result.data());
+ warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s, line %d)",anchor,si->fileName().data(),si->lineNr());
+ }
+ else
+ {
+ warn(yyextra->fileName,yyextra->lineNr,"multiple use of section label '%s' while adding anchor, (first occurrence: %s)",anchor,si->fileName().data());
}
- return result;
}
else
{
- return comment;
+ si = sm.add(anchor,yyextra->fileName,yyextra->lineNr,nullptr,SectionType::Anchor,0);
+ yyextra->current->anchors.push_back(si);
}
}
-bool parseCommentBlock(/* in */ OutlineParserInterface *parser,
+// add a string to the output
+static inline void addOutput(yyscan_t yyscanner,const char *s)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //printf("addOutput(yyscanner,%s)\n",s);
+ *yyextra->pOutputString+=s;
+}
+
+// add a character to the output
+static inline void addOutput(yyscan_t yyscanner,char c)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ *yyextra->pOutputString+=c;
+}
+
+static void endBrief(yyscan_t yyscanner,bool addToOutput)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (!yyextra->current->brief.stripWhiteSpace().isEmpty())
+ { // only go to the detailed description if we have
+ // found some brief description and not just whitespace
+ yyextra->briefEndsAtDot=FALSE;
+ setOutput(yyscanner,OutputDoc);
+ if (addToOutput) addOutput(yyscanner,yytext);
+ }
+}
+
+static int yyread(yyscan_t yyscanner,char *buf,int max_size)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->prevPosition=yyextra->inputPosition;
+ int c=0;
+ while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
+ {
+ *buf = yyextra->inputString[yyextra->inputPosition++] ;
+ //printf("%d (%c)\n",*buf,*buf);
+ c++; buf++;
+ }
+ return c;
+}
+
+//----------------------------------------------------------------------------
+
+static void checkFormula(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (YY_START==ReadFormulaShort || YY_START==ReadFormulaLong)
+ {
+ warn(yyextra->fileName,yyextra->lineNr,"End of comment block while inside formula.");
+ }
+}
+
+//----------------------------------------------------------------------------
+
+struct CommentScanner::Private
+{
+ yyscan_t yyscanner;
+ commentscanYY_state extra;
+};
+
+CommentScanner::CommentScanner() : p(std::make_unique<Private>())
+{
+ commentscanYYlex_init_extra(&p->extra,&p->yyscanner);
+#ifdef FLEX_DEBUG
+ commentscanYYset_debug(1,p->yyscanner);
+#endif
+}
+
+CommentScanner::~CommentScanner()
+{
+ commentscanYYlex_destroy(p->yyscanner);
+}
+
+bool CommentScanner::parseCommentBlock(/* in */ OutlineParserInterface *parser,
/* in */ Entry *curEntry,
/* in */ const QCString &comment,
/* in */ const QCString &fileName,
@@ -3139,145 +3163,189 @@ bool parseCommentBlock(/* in */ OutlineParserInterface *parser,
/* out */ bool &newEntryNeeded
)
{
+ yyscan_t yyscanner = p->yyscanner;
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("parseCommentBlock() isBrief=%d isAutoBriefOn=%d lineNr=%d\n",
// isBrief,isAutoBriefOn,lineNr);
- initParser();
- guards.setAutoDelete(TRUE);
- guards.clear();
- langParser = parser;
- current = curEntry;
+ initParser(yyscanner);
+ yyextra->guards = std::stack<GuardedSection>();
+ yyextra->langParser = parser;
+ yyextra->current = curEntry;
if (comment.isEmpty()) return FALSE; // avoid empty strings
- inputString = comment;
- inputString.append(" ");
- inputPosition = position;
- yyLineNr = lineNr;
- yyFileName = fileName;
- protection = prot;
- needNewEntry = FALSE;
- xrefKind = XRef_None;
- xrefAppendFlag = FALSE;
- insidePre = FALSE;
- parseMore = FALSE;
- inBody = isInbody;
- outputXRef.resize(0);
- if (!isBrief && !isAutoBriefOn && !current->doc.isEmpty())
+ yyextra->inputString = comment;
+ yyextra->inputString.append(" ");
+ yyextra->inputPosition = position;
+ yyextra->lineNr = lineNr;
+ yyextra->fileName = fileName;
+ yyextra->protection = prot;
+ yyextra->needNewEntry = FALSE;
+ yyextra->xrefKind = XRef_None;
+ yyextra->xrefAppendFlag = FALSE;
+ yyextra->insidePre = FALSE;
+ yyextra->parseMore = FALSE;
+ yyextra->inBody = isInbody;
+ yyextra->outputXRef.resize(0);
+ if (!isBrief && !isAutoBriefOn && !yyextra->current->doc.isEmpty())
{ // add newline separator between detailed comment blocks
- current->doc += '\n';
+ yyextra->current->doc += '\n';
}
- setOutput( isBrief || isAutoBriefOn ? OutputBrief : OutputDoc );
- briefEndsAtDot = isAutoBriefOn;
- g_condCount = 0;
- g_sectionLevel = 0;
- g_spaceBeforeCmd.resize(0);
- g_spaceBeforeIf.resize(0);
+ setOutput(yyscanner, isBrief || isAutoBriefOn ? OutputBrief : OutputDoc );
+ yyextra->briefEndsAtDot = isAutoBriefOn;
+ yyextra->condCount = 0;
+ yyextra->sectionLevel = 0;
+ yyextra->spaceBeforeCmd.resize(0);
+ yyextra->spaceBeforeIf.resize(0);
printlex(yy_flex_debug, TRUE, __FILE__, fileName ? fileName.data(): NULL);
- if (!current->inbodyDocs.isEmpty() && isInbody) // separate in body fragments
+ if (!yyextra->current->inbodyDocs.isEmpty() && isInbody) // separate in body fragments
{
- current->inbodyDocs+="\n\n";
+ yyextra->current->inbodyDocs+="\n\n";
}
Debug::print(Debug::CommentScan,0,"-----------\nCommentScanner: %s:%d\n"
- "input=[\n%s]\n",qPrint(fileName),lineNr,qPrint(inputString)
+ "input=[\n%s]\n",qPrint(fileName),lineNr,qPrint(yyextra->inputString)
);
- commentscanYYrestart( commentscanYYin );
+ commentscanYYrestart( 0, yyscanner );
BEGIN( Comment );
- commentscanYYlex();
- setOutput( OutputDoc );
+ commentscanYYlex(yyscanner);
+ setOutput(yyscanner, OutputDoc );
if (YY_START==OverloadParam) // comment ended with \overload
{
- addOutput(getOverloadDocs());
+ addOutput(yyscanner,getOverloadDocs());
}
- if (!guards.isEmpty())
+ if (!yyextra->guards.empty())
{
- warn(yyFileName,yyLineNr,"Documentation block ended in the middle of a conditional section!");
+ warn(yyextra->fileName,yyextra->lineNr,"Documentation block ended in the middle of a conditional section!");
}
- if (g_insideParBlock)
+ if (yyextra->insideParBlock)
{
- warn(yyFileName,yyLineNr,
+ warn(yyextra->fileName,yyextra->lineNr,
"Documentation block ended while inside a \\parblock. Missing \\endparblock");
}
- current->doc=stripLeadingAndTrailingEmptyLines(current->doc,current->docLine);
+ yyextra->current->doc=stripLeadingAndTrailingEmptyLines(yyextra->current->doc,yyextra->current->docLine);
- if (current->section==Entry::FILEDOC_SEC && current->doc.isEmpty())
+ if (yyextra->current->section==Entry::FILEDOC_SEC && yyextra->current->doc.isEmpty())
{
// to allow a comment block with just a @file command.
- current->doc="\n\n";
+ yyextra->current->doc="\n\n";
}
- if (current->section==Entry::MEMBERGRP_SEC &&
- Doxygen::docGroup.isEmpty()) // @name section but no group started yet
+ if (yyextra->current->section==Entry::MEMBERGRP_SEC &&
+ yyextra->docGroup.isEmpty()) // @name section but no group started yet
{
- Doxygen::docGroup.open(current,yyFileName,yyLineNr,true);
+ yyextra->docGroup.open(yyextra->current,yyextra->fileName,yyextra->lineNr,true);
}
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)
+ yyextra->current->briefLine,qPrint(yyextra->current->brief),
+ yyextra->current->docLine,qPrint(yyextra->current->doc),
+ yyextra->current->inbodyLine,qPrint(yyextra->current->inbodyDocs)
);
- checkFormula();
- prot = protection;
+ checkFormula(yyscanner);
+ prot = yyextra->protection;
- Doxygen::docGroup.addDocs(curEntry);
+ yyextra->docGroup.addDocs(curEntry);
- newEntryNeeded = needNewEntry;
+ newEntryNeeded = yyextra->needNewEntry;
// if we did not proceed during this call, it does not make
// sense to continue, since we get stuck. See bug 567346 for situations
// were this happens
- if (parseMore && position==inputPosition) parseMore=FALSE;
+ if (yyextra->parseMore && position==yyextra->inputPosition) yyextra->parseMore=FALSE;
- if (parseMore) position=inputPosition; else position=0;
+ if (yyextra->parseMore) position=yyextra->inputPosition; else position=0;
- lineNr = yyLineNr;
- //printf("position=%d parseMore=%d newEntryNeeded=%d\n",
- // position,parseMore,newEntryNeeded);
+ lineNr = yyextra->lineNr;
+ //printf("position=%d yyextra->parseMore=%d newEntryNeeded=%d\n",
+ // position,yyextra->parseMore,newEntryNeeded);
printlex(yy_flex_debug, FALSE, __FILE__, fileName ? fileName.data(): NULL);
- return parseMore;
+ return yyextra->parseMore;
}
-static void handleGuard(const QCString &expr)
+static void handleGuard(yyscan_t yyscanner,const QCString &expr)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
CondParser prs;
- bool sectionEnabled=prs.parse(yyFileName,yyLineNr,expr.stripWhiteSpace());
+ bool sectionEnabled=prs.parse(yyextra->fileName,yyextra->lineNr,expr.stripWhiteSpace());
bool parentEnabled = TRUE;
- if (!guards.isEmpty()) parentEnabled = guards.top()->isEnabled();
+ if (!yyextra->guards.empty()) parentEnabled = yyextra->guards.top().isEnabled();
if (parentEnabled)
{
if (
- (sectionEnabled && guardType==Guard_If) ||
- (!sectionEnabled && guardType==Guard_IfNot)
+ (sectionEnabled && yyextra->guardType==Guard_If) ||
+ (!sectionEnabled && yyextra->guardType==Guard_IfNot)
) // section is visible
{
- guards.push(new GuardedSection(TRUE,TRUE));
- enabledSectionFound=TRUE;
+ yyextra->guards.push(GuardedSection(TRUE,TRUE));
+ yyextra->enabledSectionFound=TRUE;
BEGIN( GuardParamEnd );
}
else // section is invisible
{
- if (guardType!=Guard_Skip)
+ if (yyextra->guardType!=Guard_Skip)
{
- guards.push(new GuardedSection(FALSE,TRUE));
+ yyextra->guards.push(GuardedSection(FALSE,TRUE));
}
BEGIN( SkipGuardedSection );
}
}
else // invisible because of parent
{
- guards.push(new GuardedSection(FALSE,FALSE));
+ yyextra->guards.push(GuardedSection(FALSE,FALSE));
BEGIN( SkipGuardedSection );
}
}
+void CommentScanner::initGroupInfo(Entry *entry)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->docGroup.initGroupInfo(entry);
+}
+
+void CommentScanner::enterFile(const char *fileName,int lineNr)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->docGroup.enterFile(fileName,lineNr);
+}
+
+void CommentScanner::leaveFile(const char *fileName,int lineNr)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->docGroup.leaveFile(fileName,lineNr);
+}
+
+void CommentScanner::enterCompound(const char *fileName,int lineNr,const char *name)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->docGroup.enterCompound(fileName,lineNr,name);
+}
+
+void CommentScanner::leaveCompound(const char *fileName,int lineNr,const char *name)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->docGroup.leaveCompound(fileName,lineNr,name);
+}
+
+void CommentScanner::open(Entry *e,const char *fileName,int lineNr,bool implicit)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->docGroup.open(e,fileName,lineNr,implicit);
+}
+
+void CommentScanner::close(Entry *e,const char *fileName,int lineNr,bool foundInline,bool implicit)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->docGroup.close(e,fileName,lineNr,foundInline,implicit);
+}
+
#include "commentscan.l.h"
diff --git a/src/config.xml b/src/config.xml
index f40744d..8258415 100644
--- a/src/config.xml
+++ b/src/config.xml
@@ -1413,6 +1413,7 @@ FILE_VERSION_FILTER = "cleartool desc -fmt \%Vn"
<value name='*.f95'/>
<value name='*.f03'/>
<value name='*.f08'/>
+ <value name='*.f18'/>
<value name='*.f'/>
<value name='*.for'/>
<value name='*.tcl'/>
@@ -2357,6 +2358,18 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
]]>
</docs>
</option>
+ <option type='enum' id='HTML_FORMULA_FORMAT' defval='png' depends='GENERATE_HTML'>
+ <docs>
+<![CDATA[
+ If the \c HTML_FORMULA_FORMAT option is set to \c svg, doxygen will use the pdf2svg
+ tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see https://inkscape.org)
+ to generate formulas as SVG images instead of
+ PNGs for the HTML output. These images will generally look nicer at scaled resolutions.
+]]>
+ </docs>
+ <value name="png" desc="The default"/>
+ <value name="svg" desc="Looks nicer but requires the pdf2svg tool"/>
+ </option>
<option type='int' id='FORMULA_FONTSIZE' minval='8' maxval='50' defval='10' depends='GENERATE_HTML'>
<docs>
<![CDATA[
diff --git a/src/configimpl.h b/src/configimpl.h
index 6b85d8a..6134088 100644
--- a/src/configimpl.h
+++ b/src/configimpl.h
@@ -158,6 +158,7 @@ class ConfigEnum : public ConfigOption
QCString *valueRef() { return &m_value; }
void substEnvVars();
void writeTemplate(FTextStream &t,bool sl,bool);
+ void convertStrToVal();
void compareDoxyfile(FTextStream &t);
void init() { m_value = m_defValue.copy(); }
diff --git a/src/configimpl.l b/src/configimpl.l
index 4da1634..4ea877b 100644
--- a/src/configimpl.l
+++ b/src/configimpl.l
@@ -11,6 +11,9 @@
*/
%option never-interactive
%option prefix="configimplYY"
+%top{
+#include <stdint.h>
+}
%{
@@ -218,6 +221,25 @@ void ConfigBool::convertStrToVal()
}
}
+void ConfigEnum::convertStrToVal()
+{
+ QCString val = m_value.stripWhiteSpace().lower();
+ const char *s=m_valueRange.first();
+ while (s)
+ {
+ if (QCString(s).lower() == val)
+ {
+ m_value = s;
+ return;
+ }
+ s = m_valueRange.next();
+ }
+
+ config_warn("argument '%s' for option %s is not a valid enum value\n"
+ "Using the default: %s!\n",m_value.data(),m_name.data(),m_defValue.data());
+ m_value = m_defValue;
+}
+
QCString &ConfigImpl::getString(const char *fileName,int num,const char *name) const
{
ConfigOption *opt = m_dict->find(name);
@@ -691,6 +713,7 @@ static void readIncludeFile(const char *incName)
%x GetString
%x GetBool
%x GetStrList
+%x GetStrList1
%x GetQuotedString
%x GetEnvVar
%x Include
@@ -703,8 +726,8 @@ static void readIncludeFile(const char *incName)
BEGIN(Start);
unput(*yytext);
}
-<Start,GetString,GetStrList,GetBool,SkipInvalid>"##".*"\n" { config->appendUserComment(yytext);yyLineNr++;}
-<Start,GetString,GetStrList,GetBool,SkipInvalid>"#" { BEGIN(SkipComment); }
+<Start,GetString,GetStrList,GetStrList1,GetBool,SkipInvalid>"##".*"\n" { config->appendUserComment(yytext);yyLineNr++;}
+<Start,GetString,GetStrList,GetStrList1,GetBool,SkipInvalid>"#" { BEGIN(SkipComment); }
<Start>[a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QCString cmd=yytext;
cmd=cmd.left(cmd.length()-1).stripWhiteSpace();
ConfigOption *option = config->get(cmd);
@@ -728,7 +751,14 @@ static void readIncludeFile(const char *incName)
l = ((ConfigList *)option)->valueRef();
l->clear();
elemStr="";
- BEGIN(GetStrList);
+ if (cmd == "PREDEFINED")
+ {
+ BEGIN(GetStrList1);
+ }
+ else
+ {
+ BEGIN(GetStrList);
+ }
break;
case ConfigOption::O_Enum:
s = ((ConfigEnum *)option)->valueRef();
@@ -802,7 +832,14 @@ static void readIncludeFile(const char *incName)
case ConfigOption::O_List:
l = ((ConfigList *)option)->valueRef();
elemStr="";
- BEGIN(GetStrList);
+ if (cmd == "PREDEFINED")
+ {
+ BEGIN(GetStrList1);
+ }
+ else
+ {
+ BEGIN(GetStrList);
+ }
break;
case ConfigOption::O_Enum:
case ConfigOption::O_String:
@@ -858,7 +895,7 @@ static void readIncludeFile(const char *incName)
<Start>[a-z_A-Z0-9]+ { config_warn("ignoring unknown tag '%s' at line %d, file %s\n",yytext,yyLineNr,yyFileName.data()); }
<GetString,GetBool,SkipInvalid>\n { yyLineNr++; BEGIN(Start); }
-<GetStrList>\n {
+<GetStrList,GetStrList1>\n {
yyLineNr++;
if (!elemStr.isEmpty())
{
@@ -867,6 +904,14 @@ static void readIncludeFile(const char *incName)
}
BEGIN(Start);
}
+<GetStrList1>[ \t]+ {
+ if (!elemStr.isEmpty())
+ {
+ //printf("elemStr2='%s'\n",elemStr.data());
+ l->append(elemStr);
+ }
+ elemStr.resize(0);
+ }
<GetStrList>[ \t,]+ {
if (!elemStr.isEmpty())
{
@@ -878,7 +923,7 @@ static void readIncludeFile(const char *incName)
<GetString>[^ \"\t\r\n]+ { (*s)+=configStringRecode(yytext,encoding,"UTF-8");
checkEncoding();
}
-<GetString,GetStrList,SkipInvalid>"\"" { lastState=YY_START;
+<GetString,GetStrList,GetStrList1,SkipInvalid>"\"" { lastState=YY_START;
BEGIN(GetQuotedString);
tmpString.resize(0);
}
@@ -921,6 +966,9 @@ static void readIncludeFile(const char *incName)
bs.data(),yyLineNr,yyFileName.data());
}
}
+<GetStrList1>[^ \#\"\t\r\n]+ {
+ elemStr+=configStringRecode(yytext,encoding,"UTF-8");
+ }
<GetStrList>[^ \#\"\t\r\n,]+ {
elemStr+=configStringRecode(yytext,encoding,"UTF-8");
}
@@ -1541,6 +1589,9 @@ void Config::checkAndCorrect()
s=aliasList.next();
}
+ // check EXTENSION_MAPPING
+ checkList(Config_getList(EXTENSION_MAPPING),"EXTENSION_MAPPING",TRUE,TRUE);
+
// check FILTER_PATTERNS
checkList(Config_getList(FILTER_PATTERNS),"FILTER_PATTERNS",TRUE,TRUE);
diff --git a/src/constexp.l b/src/constexp.l
index eae8a3b..1c1678e 100644
--- a/src/constexp.l
+++ b/src/constexp.l
@@ -20,6 +20,9 @@
%option nounput
%option reentrant bison-bridge
%option extra-type="struct constexpYY_state *"
+%top{
+#include <stdint.h>
+}
%{
diff --git a/src/declinfo.l b/src/declinfo.l
index af94569..1660033 100644
--- a/src/declinfo.l
+++ b/src/declinfo.l
@@ -20,6 +20,9 @@
%option noyywrap
%option reentrant
%option extra-type="struct declinfoYY_state *"
+%top{
+#include <stdint.h>
+}
%{
diff --git a/src/defargs.l b/src/defargs.l
index 9745f44..e6f74c1 100644
--- a/src/defargs.l
+++ b/src/defargs.l
@@ -41,6 +41,11 @@
*/
%option never-interactive
%option prefix="defargsYY"
+%option reentrant
+%option extra-type="struct defargsYY_state *"
+%top{
+#include <stdint.h>
+}
%{
@@ -66,77 +71,42 @@
/* -----------------------------------------------------------------
* state variables
*/
-static const char *g_inputString;
-static int g_inputPosition;
-static ArgumentList *g_argList;
-static QCString *g_copyArgValue;
-static QCString g_curArgTypeName;
-static QCString g_curArgDefValue;
-static QCString g_curArgName;
-static QCString g_curArgDocs;
-static QCString g_curArgAttrib;
-static QCString g_curArgArray;
-static QCString g_curTypeConstraint;
-static QCString g_extraTypeChars;
-static int g_argRoundCount;
-static int g_argSharpCount;
-static int g_argCurlyCount;
-static int g_readArgContext;
-static int g_lastDocContext;
-static int g_lastDocChar;
-static int g_lastExtendsContext;
-static QCString g_delimiter;
-static SrcLangExt g_lang;
+struct defargsYY_state
+{
+ defargsYY_state(const char *inStr,ArgumentList &al,SrcLangExt l)
+ : inputString(inStr), argList(al), lang(l) {}
+ const char *inputString;
+ ArgumentList &argList;
+ SrcLangExt lang;
+ int inputPosition = 0;
+ QCString *copyArgValue = 0;
+ QCString curArgTypeName;
+ QCString curArgDefValue;
+ QCString curArgName;
+ QCString curArgDocs;
+ QCString curArgAttrib;
+ QCString curArgArray;
+ QCString curTypeConstraint;
+ QCString extraTypeChars;
+ int argRoundCount = 0;
+ int argSharpCount = 0;
+ int argCurlyCount = 0;
+ int readArgContext = 0;
+ int lastDocContext = 0;
+ int lastDocChar = 0;
+ int lastExtendsContext = 0;
+ QCString delimiter;
+};
static const char *stateToString(int state);
+static int yyread(yyscan_t yyscanner,char *buf,int max_size);
+static bool nameIsActuallyPartOfType(QCString &name);
+
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
-#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
+#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
-static int yyread(char *buf,int max_size)
-{
- int c=0;
- while( c < max_size && g_inputString[g_inputPosition] )
- {
- *buf = g_inputString[g_inputPosition++] ;
- c++; buf++;
- }
- return c;
-}
-
-/* bug_520975 */
-static bool nameIsActuallyPartOfType(QCString &name)
-{
- static bool first=TRUE;
- static QDict<void> keywords(17);
- if (first) // fill keyword dict first time
- {
- #define DUMMY_ADDR (void*)0x8
- keywords.insert("unsigned", DUMMY_ADDR); // foo(... unsigned)
- keywords.insert("signed", DUMMY_ADDR); // foo(... signed)
- keywords.insert("bool", DUMMY_ADDR); // foo(... bool)
- keywords.insert("char", DUMMY_ADDR); // foo(... char)
- keywords.insert("char8_t", DUMMY_ADDR); // foo(... char8_t)
- keywords.insert("char16_t", DUMMY_ADDR); // foo(... char16_t)
- keywords.insert("char32_t", DUMMY_ADDR); // foo(... char32_t)
- keywords.insert("int", DUMMY_ADDR); // foo(... int)
- keywords.insert("short", DUMMY_ADDR); // foo(... short)
- keywords.insert("long", DUMMY_ADDR); // foo(... long)
- keywords.insert("float", DUMMY_ADDR); // foo(... float)
- keywords.insert("double", DUMMY_ADDR); // foo(... double)
- keywords.insert("int8_t", DUMMY_ADDR); // foo(... int8_t)
- keywords.insert("uint8_t", DUMMY_ADDR); // foo(... uint8_t)
- keywords.insert("int16_t", DUMMY_ADDR); // foo(... int16_t)
- keywords.insert("uint16_t", DUMMY_ADDR); // foo(... uint16_t)
- keywords.insert("int32_t", DUMMY_ADDR); // foo(... int32_t)
- keywords.insert("uint32_t", DUMMY_ADDR); // foo(... uint32_t)
- keywords.insert("const", DUMMY_ADDR); // foo(... const)
- keywords.insert("volatile", DUMMY_ADDR); // foo(... volatile)
- first=FALSE;
- }
- return name.length()>0 && keywords.find(name)!=0;
-}
%}
B [ \t]
@@ -168,124 +138,124 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
<Start>[<(] { BEGIN(ReadFuncArgType); }
<ReadFuncArgType>{B}* {
- g_curArgTypeName+=" ";
+ yyextra->curArgTypeName+=" ";
}
<ReadFuncArgType>"["[^\]]*"]" {
- if (g_curArgTypeName.stripWhiteSpace().isEmpty())
+ if (yyextra->curArgTypeName.stripWhiteSpace().isEmpty())
{
- g_curArgAttrib=yytext; // for M$-IDL
+ yyextra->curArgAttrib=yytext; // for M$-IDL
}
else // array type
{
- g_curArgArray+=yytext;
+ yyextra->curArgArray+=yytext;
}
}
-<ReadFuncArgDef>"'"\\[0-7]{1,3}"'" { g_curArgDefValue+=yytext; }
-<ReadFuncArgDef>"'"\\."'" { g_curArgDefValue+=yytext; }
-<ReadFuncArgDef>"'"."'" { g_curArgDefValue+=yytext; }
-<ReadFuncArgDef>{RAWBEGIN} { g_curArgDefValue+=yytext;
+<ReadFuncArgDef>"'"\\[0-7]{1,3}"'" { yyextra->curArgDefValue+=yytext; }
+<ReadFuncArgDef>"'"\\."'" { yyextra->curArgDefValue+=yytext; }
+<ReadFuncArgDef>"'"."'" { yyextra->curArgDefValue+=yytext; }
+<ReadFuncArgDef>{RAWBEGIN} { yyextra->curArgDefValue+=yytext;
QCString text=yytext;
int i=text.find('"');
- g_delimiter = yytext+i+1;
- g_delimiter=g_delimiter.left(g_delimiter.length()-1);
+ yyextra->delimiter = yytext+i+1;
+ yyextra->delimiter=yyextra->delimiter.left(yyextra->delimiter.length()-1);
BEGIN( CopyRawString );
}
<ReadFuncArgDef>\" {
- g_curArgDefValue+=*yytext;
+ yyextra->curArgDefValue+=*yytext;
BEGIN( CopyArgString );
}
<ReadFuncArgType>"("([^:)]+{B}*"::")*{B}*[&*\^]+{B}*/{ID} {
// function pointer as argument
- g_curArgTypeName+=yytext;
- //g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace();
+ yyextra->curArgTypeName+=yytext;
+ //yyextra->curArgTypeName=yyextra->curArgTypeName.simplifyWhiteSpace();
BEGIN( ReadFuncArgPtr );
}
<ReadFuncArgPtr>{ID} {
- g_curArgName=yytext;
+ yyextra->curArgName=yytext;
}
<ReadFuncArgPtr>")"{B}*"(" { // function pointer
- g_curArgTypeName+=yytext;
- //g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace();
- g_readArgContext = ReadFuncArgType;
- g_copyArgValue=&g_curArgTypeName;
- g_argRoundCount=0;
+ yyextra->curArgTypeName+=yytext;
+ //yyextra->curArgTypeName=yyextra->curArgTypeName.simplifyWhiteSpace();
+ yyextra->readArgContext = ReadFuncArgType;
+ yyextra->copyArgValue=&yyextra->curArgTypeName;
+ yyextra->argRoundCount=0;
BEGIN( CopyArgRound2 );
}
<ReadFuncArgPtr>")"/{B}*"[" { // pointer to fixed size array
- g_curArgTypeName+=yytext;
- g_curArgTypeName+=g_curArgName;
- //g_curArgTypeName=g_curArgTypeName.simplifyWhiteSpace();
+ yyextra->curArgTypeName+=yytext;
+ yyextra->curArgTypeName+=yyextra->curArgName;
+ //yyextra->curArgTypeName=yyextra->curArgTypeName.simplifyWhiteSpace();
BEGIN( ReadFuncArgType );
}
<ReadFuncArgPtr>")" { // redundant braces detected / remove them
- int i=g_curArgTypeName.findRev('('),l=g_curArgTypeName.length();
+ int i=yyextra->curArgTypeName.findRev('('),l=yyextra->curArgTypeName.length();
if (i!=-1)
- g_curArgTypeName=g_curArgTypeName.left(i)+
- g_curArgTypeName.right(l-i-1);
- g_curArgTypeName+=g_curArgName;
+ yyextra->curArgTypeName=yyextra->curArgTypeName.left(i)+
+ yyextra->curArgTypeName.right(l-i-1);
+ yyextra->curArgTypeName+=yyextra->curArgName;
BEGIN( ReadFuncArgType );
}
<ReadFuncArgType>"<="|">="|"->"|">>"|"<<" { // handle operators in defargs
- g_curArgTypeName+=yytext;
+ yyextra->curArgTypeName+=yytext;
}
<ReadFuncArgType,ReadFuncArgDef>[({<] {
if (YY_START==ReadFuncArgType)
{
- g_curArgTypeName+=*yytext;
- g_copyArgValue=&g_curArgTypeName;
+ yyextra->curArgTypeName+=*yytext;
+ yyextra->copyArgValue=&yyextra->curArgTypeName;
}
else // YY_START==ReadFuncArgDef
{
- g_curArgDefValue+=*yytext;
- g_copyArgValue=&g_curArgDefValue;
+ yyextra->curArgDefValue+=*yytext;
+ yyextra->copyArgValue=&yyextra->curArgDefValue;
}
- g_readArgContext = YY_START;
+ yyextra->readArgContext = YY_START;
if (*yytext=='(')
{
- g_argRoundCount=0;
+ yyextra->argRoundCount=0;
BEGIN( CopyArgRound );
}
else if (*yytext=='{')
{
- g_argCurlyCount=0;
+ yyextra->argCurlyCount=0;
BEGIN( CopyArgCurly );
}
else // yytext=='<'
{
- g_argSharpCount=0;
- g_argRoundCount=0;
+ yyextra->argSharpCount=0;
+ yyextra->argRoundCount=0;
BEGIN( CopyArgSharp );
}
}
<CopyArgRound,CopyArgRound2>"(" {
- g_argRoundCount++;
- *g_copyArgValue += *yytext;
+ yyextra->argRoundCount++;
+ *yyextra->copyArgValue += *yytext;
}
<CopyArgRound,CopyArgRound2>")"({B}*{ID})* {
- *g_copyArgValue += yytext;
- if (g_argRoundCount>0)
+ *yyextra->copyArgValue += yytext;
+ if (yyextra->argRoundCount>0)
{
- g_argRoundCount--;
+ yyextra->argRoundCount--;
}
else
{
if (YY_START==CopyArgRound2)
{
- *g_copyArgValue+=" "+g_curArgName;
+ *yyextra->copyArgValue+=" "+yyextra->curArgName;
}
- BEGIN( g_readArgContext );
+ BEGIN( yyextra->readArgContext );
}
}
<CopyArgRound>")"/{B}* {
- *g_copyArgValue += *yytext;
- if (g_argRoundCount>0) g_argRoundCount--;
- else BEGIN( g_readArgContext );
+ *yyextra->copyArgValue += *yytext;
+ if (yyextra->argRoundCount>0) yyextra->argRoundCount--;
+ else BEGIN( yyextra->readArgContext );
}
<CopyArgSharp>"<<" {
- if (g_argRoundCount>0)
+ if (yyextra->argRoundCount>0)
{
// for e.g. < typename A = (i<<3) >
- *g_copyArgValue += yytext;
+ *yyextra->copyArgValue += yytext;
}
else
{
@@ -293,10 +263,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
}
<CopyArgSharp>">>" {
- if (g_argRoundCount>0)
+ if (yyextra->argRoundCount>0)
{
// for e.g. < typename A = (i>>3) >
- *g_copyArgValue += yytext;
+ *yyextra->copyArgValue += yytext;
}
else
{
@@ -305,66 +275,66 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
<CopyArgSharp>"<" {
// don't count < inside (, e.g. for things like: < typename A=(i<6) >
- if (g_argRoundCount==0) g_argSharpCount++;
- *g_copyArgValue += *yytext;
+ if (yyextra->argRoundCount==0) yyextra->argSharpCount++;
+ *yyextra->copyArgValue += *yytext;
}
<CopyArgSharp>">" {
- *g_copyArgValue += *yytext;
- if (g_argRoundCount>0 && g_argSharpCount==0)
+ *yyextra->copyArgValue += *yytext;
+ if (yyextra->argRoundCount>0 && yyextra->argSharpCount==0)
{
// don't count > inside )
}
else
{
- if (g_argSharpCount>0)
+ if (yyextra->argSharpCount>0)
{
- g_argSharpCount--;
+ yyextra->argSharpCount--;
}
else
{
- BEGIN( g_readArgContext );
+ BEGIN( yyextra->readArgContext );
}
}
}
<CopyArgSharp>"(" {
- g_argRoundCount++;
- *g_copyArgValue += *yytext;
+ yyextra->argRoundCount++;
+ *yyextra->copyArgValue += *yytext;
}
<CopyArgSharp>")" {
- g_argRoundCount--;
- *g_copyArgValue += *yytext;
+ yyextra->argRoundCount--;
+ *yyextra->copyArgValue += *yytext;
}
<CopyArgCurly>"{" {
- g_argCurlyCount++;
- *g_copyArgValue += *yytext;
+ yyextra->argCurlyCount++;
+ *yyextra->copyArgValue += *yytext;
}
<CopyArgCurly>"}" {
- *g_copyArgValue += *yytext;
- if (g_argCurlyCount>0) g_argCurlyCount--;
- else BEGIN( g_readArgContext );
+ *yyextra->copyArgValue += *yytext;
+ if (yyextra->argCurlyCount>0) yyextra->argCurlyCount--;
+ else BEGIN( yyextra->readArgContext );
}
<CopyArgString>\\. {
- g_curArgDefValue+=yytext;
+ yyextra->curArgDefValue+=yytext;
}
<CopyRawString>{RAWEND} {
- g_curArgDefValue+=yytext;
+ yyextra->curArgDefValue+=yytext;
QCString delimiter = yytext+1;
delimiter=delimiter.left(delimiter.length()-1);
- if (delimiter==g_delimiter)
+ if (delimiter==yyextra->delimiter)
{
BEGIN( ReadFuncArgDef );
}
}
<CopyArgString>\" {
- g_curArgDefValue+=*yytext;
+ yyextra->curArgDefValue+=*yytext;
BEGIN( ReadFuncArgDef );
}
<ReadFuncArgType>"=" {
BEGIN( ReadFuncArgDef );
}
<ReadFuncArgType,ReadFuncArgDef>[,)>]{B}*("/*"[*!]|"//"[/!])"<" {
- g_lastDocContext=YY_START;
- g_lastDocChar=*yytext;
+ yyextra->lastDocContext=YY_START;
+ yyextra->lastDocChar=*yytext;
QCString text=yytext;
if (text.find("//")!=-1)
BEGIN( ReadDocLine );
@@ -372,49 +342,49 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
BEGIN( ReadDocBlock );
}
<ReadFuncArgType,ReadFuncArgDef>[,)>] {
- if (*yytext==')' && g_curArgTypeName.stripWhiteSpace().isEmpty())
+ if (*yytext==')' && yyextra->curArgTypeName.stripWhiteSpace().isEmpty())
{
- g_curArgTypeName+=*yytext;
+ yyextra->curArgTypeName+=*yytext;
BEGIN(FuncQual);
}
else
{
- g_curArgTypeName=removeRedundantWhiteSpace(g_curArgTypeName);
- g_curArgDefValue=g_curArgDefValue.stripWhiteSpace();
- //printf("curArgType='%s' curArgDefVal='%s'\n",g_curArgTypeName.data(),g_curArgDefValue.data());
- int l=g_curArgTypeName.length();
+ yyextra->curArgTypeName=removeRedundantWhiteSpace(yyextra->curArgTypeName);
+ yyextra->curArgDefValue=yyextra->curArgDefValue.stripWhiteSpace();
+ //printf("curArgType='%s' curArgDefVal='%s'\n",yyextra->curArgTypeName.data(),yyextra->curArgDefValue.data());
+ int l=yyextra->curArgTypeName.length();
if (l>0)
{
int i=l-1;
- while (i>=0 && (isspace((uchar)g_curArgTypeName.at(i)) || g_curArgTypeName.at(i)=='.')) i--;
- while (i>=0 && (isId(g_curArgTypeName.at(i)) || g_curArgTypeName.at(i)=='$')) i--;
+ while (i>=0 && (isspace((uchar)yyextra->curArgTypeName.at(i)) || yyextra->curArgTypeName.at(i)=='.')) i--;
+ while (i>=0 && (isId(yyextra->curArgTypeName.at(i)) || yyextra->curArgTypeName.at(i)=='$')) i--;
Argument a;
- a.attrib = g_curArgAttrib.copy();
- a.typeConstraint = g_curTypeConstraint.stripWhiteSpace();
+ a.attrib = yyextra->curArgAttrib.copy();
+ a.typeConstraint = yyextra->curTypeConstraint.stripWhiteSpace();
//printf("a->type=%s a->name=%s i=%d l=%d\n",
// a->type.data(),a->name.data(),i,l);
a.array.resize(0);
- if (i==l-1 && g_curArgTypeName.at(i)==')') // function argument
+ if (i==l-1 && yyextra->curArgTypeName.at(i)==')') // function argument
{
- int bi=g_curArgTypeName.find('(');
+ int bi=yyextra->curArgTypeName.find('(');
int fi=bi-1;
//printf("func arg fi=%d\n",fi);
- while (fi>=0 && (isId(g_curArgTypeName.at(fi)) || g_curArgTypeName.at(fi)==':')) fi--;
+ while (fi>=0 && (isId(yyextra->curArgTypeName.at(fi)) || yyextra->curArgTypeName.at(fi)==':')) fi--;
if (fi>=0)
{
- a.type = g_curArgTypeName.left(fi+1);
- a.name = g_curArgTypeName.mid(fi+1,bi-fi-1).stripWhiteSpace();
- a.array = g_curArgTypeName.right(l-bi);
+ a.type = yyextra->curArgTypeName.left(fi+1);
+ a.name = yyextra->curArgTypeName.mid(fi+1,bi-fi-1).stripWhiteSpace();
+ a.array = yyextra->curArgTypeName.right(l-bi);
}
else
{
- a.type = g_curArgTypeName;
+ a.type = yyextra->curArgTypeName;
}
}
- else if (i>=0 && g_curArgTypeName.at(i)!=':')
+ else if (i>=0 && yyextra->curArgTypeName.at(i)!=':')
{ // type contains a name
- a.type = removeRedundantWhiteSpace(g_curArgTypeName.left(i+1)).stripWhiteSpace();
- a.name = g_curArgTypeName.right(l-i-1).stripWhiteSpace();
+ a.type = removeRedundantWhiteSpace(yyextra->curArgTypeName.left(i+1)).stripWhiteSpace();
+ a.name = yyextra->curArgTypeName.right(l-i-1).stripWhiteSpace();
// if the type becomes a type specifier only then we make a mistake
// and need to correct it to avoid seeing a nameless parameter
@@ -437,14 +407,14 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
else // assume only the type was specified, try to determine name later
{
- a.type = removeRedundantWhiteSpace(g_curArgTypeName);
+ a.type = removeRedundantWhiteSpace(yyextra->curArgTypeName);
}
if (!a.type.isEmpty() && a.type.at(0)=='$') // typeless PHP name?
{
a.name = a.type;
a.type = "";
}
- a.array += removeRedundantWhiteSpace(g_curArgArray);
+ a.array += removeRedundantWhiteSpace(yyextra->curArgArray);
//printf("array=%s\n",a->array.data());
int alen = a.array.length();
if (alen>2 && a.array.at(0)=='(' &&
@@ -458,18 +428,18 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
a.array = a.array.mid(i);
}
}
- a.defval = g_curArgDefValue.copy();
+ a.defval = yyextra->curArgDefValue.copy();
//printf("a->type=%s a->name=%s a->defval=\"%s\"\n",a->type.data(),a->name.data(),a->defval.data());
- a.docs = g_curArgDocs.stripWhiteSpace();
+ a.docs = yyextra->curArgDocs.stripWhiteSpace();
//printf("Argument '%s' '%s' adding docs='%s'\n",a->type.data(),a->name.data(),a->docs.data());
- g_argList->push_back(a);
+ yyextra->argList.push_back(a);
}
- g_curArgAttrib.resize(0);
- g_curArgTypeName.resize(0);
- g_curArgDefValue.resize(0);
- g_curArgArray.resize(0);
- g_curArgDocs.resize(0);
- g_curTypeConstraint.resize(0);
+ yyextra->curArgAttrib.resize(0);
+ yyextra->curArgTypeName.resize(0);
+ yyextra->curArgDefValue.resize(0);
+ yyextra->curArgArray.resize(0);
+ yyextra->curArgDocs.resize(0);
+ yyextra->curTypeConstraint.resize(0);
if (*yytext==')')
{
BEGIN(FuncQual);
@@ -482,72 +452,72 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
}
}
<ReadFuncArgType,ReadFuncArgPtr>"extends" {
- if (g_lang!=SrcLangExt_Java)
+ if (yyextra->lang!=SrcLangExt_Java)
{
REJECT;
}
else
{
- g_curTypeConstraint.resize(0);
- g_lastExtendsContext=YY_START;
+ yyextra->curTypeConstraint.resize(0);
+ yyextra->lastExtendsContext=YY_START;
BEGIN(ReadTypeConstraint);
}
}
<ReadFuncArgType,ReadFuncArgPtr>"$"?{ID} {
QCString name=yytext; //resolveDefines(yytext);
- if (YY_START==ReadFuncArgType && g_curArgArray=="[]") // Java style array
+ if (YY_START==ReadFuncArgType && yyextra->curArgArray=="[]") // Java style array
{
- g_curArgTypeName+=" []";
- g_curArgArray.resize(0);
+ yyextra->curArgTypeName+=" []";
+ yyextra->curArgArray.resize(0);
}
//printf("resolveName '%s'->'%s'\n",yytext,name.data());
- g_curArgTypeName+=name;
+ yyextra->curArgTypeName+=name;
}
<ReadFuncArgType,ReadFuncArgPtr>. {
- g_curArgTypeName+=*yytext;
+ yyextra->curArgTypeName+=*yytext;
}
<ReadFuncArgDef,CopyArgString>"<="|"->"|">="|">>"|"<<" {
- g_curArgDefValue+=yytext;
+ yyextra->curArgDefValue+=yytext;
}
<ReadFuncArgDef,CopyArgString,CopyRawString>. {
- g_curArgDefValue+=*yytext;
+ yyextra->curArgDefValue+=*yytext;
}
<CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>{ID} {
QCString name=yytext; //resolveDefines(yytext);
- *g_copyArgValue+=name;
+ *yyextra->copyArgValue+=name;
}
<CopyArgRound,CopyArgRound2,CopyArgSharp,CopyArgCurly>. {
- *g_copyArgValue += *yytext;
+ *yyextra->copyArgValue += *yytext;
}
<ReadTypeConstraint>[,)>] {
unput(*yytext);
- BEGIN(g_lastExtendsContext);
+ BEGIN(yyextra->lastExtendsContext);
}
<ReadTypeConstraint>. {
- g_curTypeConstraint+=yytext;
+ yyextra->curTypeConstraint+=yytext;
}
<ReadTypeConstraint>\n {
- g_curTypeConstraint+=' ';
+ yyextra->curTypeConstraint+=' ';
}
<FuncQual>"const" {
- g_argList->constSpecifier=TRUE;
+ yyextra->argList.constSpecifier=TRUE;
}
<FuncQual>"volatile" {
- g_argList->volatileSpecifier=TRUE;
+ yyextra->argList.volatileSpecifier=TRUE;
}
<FuncQual>"&" {
- g_argList->refQualifier=RefQualifierLValue;
+ yyextra->argList.refQualifier=RefQualifierLValue;
}
<FuncQual>"&&" {
- g_argList->refQualifier=RefQualifierRValue;
+ yyextra->argList.refQualifier=RefQualifierRValue;
}
<FuncQual,TrailingReturn>"="{B}*"0" {
- g_argList->pureSpecifier=TRUE;
+ yyextra->argList.pureSpecifier=TRUE;
BEGIN(FuncQual);
}
<FuncQual>"->" { // C++11 trailing return type
- g_argList->trailingReturnType=" -> ";
+ yyextra->argList.trailingReturnType=" -> ";
BEGIN(TrailingReturn);
}
<TrailingReturn>{B}/("final"|"override"){B}* {
@@ -555,40 +525,40 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
BEGIN(FuncQual);
}
<TrailingReturn>. {
- g_argList->trailingReturnType+=yytext;
+ yyextra->argList.trailingReturnType+=yytext;
}
<TrailingReturn>\n {
- g_argList->trailingReturnType+=yytext;
+ yyextra->argList.trailingReturnType+=yytext;
}
<FuncQual>")"{B}*"["[^]]*"]" { // for functions returning a pointer to an array,
// i.e. ")[]" in "int (*f(int))[4]" with argsString="(int))[4]"
- g_extraTypeChars=yytext;
+ yyextra->extraTypeChars=yytext;
}
<ReadDocBlock>[^\*\n]+ {
- g_curArgDocs+=yytext;
+ yyextra->curArgDocs+=yytext;
}
<ReadDocLine>[^\n]+ {
- g_curArgDocs+=yytext;
+ yyextra->curArgDocs+=yytext;
}
<ReadDocBlock>"*/" {
- if (g_lastDocChar!=0)
- unput(g_lastDocChar);
- BEGIN(g_lastDocContext);
+ if (yyextra->lastDocChar!=0)
+ unput(yyextra->lastDocChar);
+ BEGIN(yyextra->lastDocContext);
}
<ReadDocLine>\n {
- if (g_lastDocChar!=0)
- unput(g_lastDocChar);
- BEGIN(g_lastDocContext);
+ if (yyextra->lastDocChar!=0)
+ unput(yyextra->lastDocChar);
+ BEGIN(yyextra->lastDocContext);
}
<ReadDocBlock>\n {
- g_curArgDocs+=*yytext;
+ yyextra->curArgDocs+=*yytext;
}
<ReadDocBlock>. {
- g_curArgDocs+=*yytext;
+ yyextra->curArgDocs+=*yytext;
}
<*>("/*"[*!]|"//"[/!])("<"?) {
- g_lastDocContext=YY_START;
- g_lastDocChar=0;
+ yyextra->lastDocContext=YY_START;
+ yyextra->lastDocChar=0;
if (yytext[1]=='/')
BEGIN( ReadDocLine );
else
@@ -602,6 +572,190 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
/* ----------------------------------------------------------------------------
*/
+static int yyread(yyscan_t yyscanner,char *buf,int max_size)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ int c=0;
+ while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
+ {
+ *buf = yyextra->inputString[yyextra->inputPosition++] ;
+ c++; buf++;
+ }
+ return c;
+}
+
+/*
+The following code is generated using 'gperf keywords.txt'
+where keywords.txt has the following content
+
+---------------------------------
+%define class-name KeywordHash
+%define lookup-function-name find
+%readonly-tables
+%language=C++
+%%
+unsigned
+signed
+bool
+char
+char8_t
+char16_t
+char32_t
+wchar_t
+int
+short
+long
+float
+double
+int8_t
+int16_t
+int32_t
+int64_t
+intmax_t
+intptr_t
+uint8_t
+uint16_t
+uint32_t
+uint64_t
+uintmax_t
+uintptr_t
+const
+volatile
+void
+%%
+---------------------------------
+*/
+//--- begin gperf generated code ----------------------------------------------------------
+
+#define TOTAL_KEYWORDS 28
+#define MIN_WORD_LENGTH 3
+#define MAX_WORD_LENGTH 9
+#define MIN_HASH_VALUE 3
+#define MAX_HASH_VALUE 48
+/* maximum key range = 46, duplicates = 0 */
+
+class KeywordHash
+{
+ private:
+ static inline unsigned int hash (const char *str, size_t len);
+ public:
+ static const char *find (const char *str, size_t len);
+};
+
+inline unsigned int
+KeywordHash::hash (const char *str, size_t len)
+{
+ static const unsigned char asso_values[] =
+ {
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 5,
+ 5, 30, 0, 49, 25, 49, 10, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 0, 49, 0, 5, 49,
+ 15, 0, 49, 10, 49, 30, 49, 49, 0, 20,
+ 0, 49, 15, 49, 5, 10, 0, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
+ 49, 49, 49, 49, 49, 49
+ };
+ unsigned int hval = len;
+
+ switch (hval)
+ {
+ default:
+ hval += asso_values[static_cast<unsigned char>(str[4])];
+ /*FALLTHROUGH*/
+ case 4:
+ hval += asso_values[static_cast<unsigned char>(str[3])];
+ /*FALLTHROUGH*/
+ case 3:
+ break;
+ }
+ return hval;
+}
+
+const char *
+KeywordHash::find (const char *str, size_t len)
+{
+ static const char * const wordlist[] =
+ {
+ "", "", "",
+ "int",
+ "bool",
+ "float",
+ "signed",
+ "",
+ "volatile",
+ "char",
+ "short",
+ "double",
+ "wchar_t",
+ "uint16_t",
+ "long",
+ "const",
+ "int8_t",
+ "uint8_t",
+ "char16_t",
+ "void",
+ "", "",
+ "char8_t",
+ "intptr_t",
+ "uintptr_t",
+ "", "", "",
+ "intmax_t",
+ "uintmax_t",
+ "", "",
+ "int64_t",
+ "uint64_t",
+ "", "", "",
+ "int16_t",
+ "uint32_t",
+ "", "", "",
+ "int32_t",
+ "char32_t",
+ "", "", "", "",
+ "unsigned"
+ };
+
+ if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+ {
+ unsigned int key = hash (str, len);
+
+ if (key <= MAX_HASH_VALUE)
+ {
+ const char *s = wordlist[key];
+
+ if (*str == *s && !qstrcmp (str + 1, s + 1))
+ return s;
+ }
+ }
+ return 0;
+}
+
+//--- end gperf generated code ----------------------------------------------------------
+
+/* bug_520975 */
+static bool nameIsActuallyPartOfType(QCString &name)
+{
+ return KeywordHash::find(name.data(),name.length())!=0;
+}
+
/*! Converts an argument string into an ArgumentList.
* \param[in] argsString the list of Arguments.
* \param[out] al a reference to resulting argument list pointer.
@@ -612,36 +766,27 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\"
void stringToArgumentList(SrcLangExt lang, const char *argsString,ArgumentList& al,QCString *extraTypeChars)
{
if (argsString==0) return;
+
+ yyscan_t yyscanner;
+ defargsYY_state extra(argsString,al,lang);
+ defargsYYlex_init_extra(&extra,&yyscanner);
+#ifdef FLEX_DEBUG
+ defargsYYset_debug(1,yyscanner);
+#endif
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
printlex(yy_flex_debug, TRUE, __FILE__, NULL);
- g_copyArgValue=0;
- g_curArgDocs.resize(0);
- g_curArgAttrib.resize(0);
- g_curArgArray.resize(0);
- g_curTypeConstraint.resize(0);
- g_extraTypeChars.resize(0);
- g_argRoundCount = 0;
- g_argSharpCount = 0;
- g_argCurlyCount = 0;
- g_lastDocChar = 0;
-
- g_inputString = argsString;
- g_inputPosition = 0;
- g_curArgTypeName.resize(0);
- g_curArgDefValue.resize(0);
- g_curArgName.resize(0);
- g_argList = &al;
- g_lang = lang;
- defargsYYrestart( defargsYYin );
+ defargsYYrestart( 0, yyscanner );
BEGIN( Start );
- defargsYYlex();
- if (g_argList->empty())
+ defargsYYlex(yyscanner);
+ if (yyextra->argList.empty())
{
- g_argList->noParameters = TRUE;
+ yyextra->argList.noParameters = TRUE;
}
- if (extraTypeChars) *extraTypeChars=g_extraTypeChars;
+ if (extraTypeChars) *extraTypeChars=yyextra->extraTypeChars;
//printf("stringToArgumentList(%s) result=%s\n",argsString,argListToString(al).data());
printlex(yy_flex_debug, FALSE, __FILE__, NULL);
+ defargsYYlex_destroy(yyscanner);
}
#include "defargs.l.h"
diff --git a/src/definition.cpp b/src/definition.cpp
index 7540eff..043e210 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -44,6 +44,7 @@
#include "dirdef.h"
#include "pagedef.h"
#include "bufstr.h"
+#include "reflist.h"
//-----------------------------------------------------------------------------------------
@@ -55,11 +56,11 @@ class DefinitionImpl::IMPL
void init(const char *df, const char *n);
void setDefFileName(const QCString &df);
- SectionDict *sectionDict = 0; // dictionary of all sections, not accessible
+ SectionRefs sectionRefs;
MemberSDict *sourceRefByDict = 0;
MemberSDict *sourceRefsDict = 0;
- std::vector<ListItemInfo> xrefListItems;
+ std::vector<RefItem*> xrefListItems;
GroupList *partOfGroups = 0;
DocInfo *details = 0; // not exported
@@ -99,7 +100,6 @@ class DefinitionImpl::IMPL
DefinitionImpl::IMPL::~IMPL()
{
- delete sectionDict;
delete sourceRefByDict;
delete sourceRefsDict;
delete partOfGroups;
@@ -140,7 +140,6 @@ void DefinitionImpl::IMPL::init(const char *df, const char *n)
inbodyDocs = 0;
sourceRefByDict = 0;
sourceRefsDict = 0;
- sectionDict = 0,
outerScope = Doxygen::globalScope;
partOfGroups = 0;
hidden = FALSE;
@@ -315,7 +314,6 @@ DefinitionImpl::DefinitionImpl(const DefinitionImpl &d)
{
m_impl = new DefinitionImpl::IMPL;
*m_impl = *d.m_impl;
- m_impl->sectionDict = 0;
m_impl->sourceRefByDict = 0;
m_impl->sourceRefsDict = 0;
m_impl->partOfGroups = 0;
@@ -323,16 +321,6 @@ DefinitionImpl::DefinitionImpl(const DefinitionImpl &d)
m_impl->details = 0;
m_impl->body = 0;
m_impl->inbodyDocs = 0;
- if (d.m_impl->sectionDict)
- {
- m_impl->sectionDict = new SectionDict(17);
- SDict<SectionInfo>::Iterator it(*d.m_impl->sectionDict);
- SectionInfo *si;
- for (it.toFirst();(si=it.current());++it)
- {
- m_impl->sectionDict->append(si->label,si);
- }
- }
if (d.m_impl->sourceRefByDict)
{
m_impl->sourceRefByDict = new MemberSDict;
@@ -426,22 +414,18 @@ void DefinitionImpl::addSectionsToDefinition(const std::vector<const SectionInfo
for (const SectionInfo *si : anchorList)
{
//printf("Add section '%s' to definition '%s'\n",
- // si->label.data(),name().data());
- SectionInfo *gsi=Doxygen::sectionDict->find(si->label);
+ // si->label().data(),name().data());
+ SectionManager &sm = SectionManager::instance();
+ SectionInfo *gsi=sm.find(si->label());
//printf("===== label=%s gsi=%p\n",si->label.data(),gsi);
if (gsi==0)
{
- gsi = new SectionInfo(*si);
- Doxygen::sectionDict->append(si->label,gsi);
+ gsi = sm.add(*si);
}
- if (m_impl->sectionDict==0)
+ if (m_impl->sectionRefs.find(gsi->label())==0)
{
- m_impl->sectionDict = new SectionDict(17);
- }
- if (m_impl->sectionDict->find(gsi->label)==0)
- {
- m_impl->sectionDict->append(gsi->label,gsi);
- gsi->definition = this;
+ m_impl->sectionRefs.add(gsi);
+ gsi->setDefinition(this);
}
}
}
@@ -449,16 +433,11 @@ void DefinitionImpl::addSectionsToDefinition(const std::vector<const SectionInfo
bool DefinitionImpl::hasSections() const
{
//printf("DefinitionImpl::hasSections(%s) #sections=%d\n",name().data(),
- // m_impl->sectionDict ? m_impl->sectionDict->count() : 0);
- if (m_impl->sectionDict==0) return FALSE;
- SDict<SectionInfo>::Iterator li(*m_impl->sectionDict);
- SectionInfo *si;
- for (li.toFirst();(si=li.current());++li)
- {
- if (si->type==SectionInfo::Section ||
- si->type==SectionInfo::Subsection ||
- si->type==SectionInfo::Subsubsection ||
- si->type==SectionInfo::Paragraph)
+ // m_impl->sectionRefs.size());
+ if (m_impl->sectionRefs.empty()) return FALSE;
+ for (const SectionInfo *si : m_impl->sectionRefs)
+ {
+ if (isSection(si->type()))
{
return TRUE;
}
@@ -468,20 +447,17 @@ bool DefinitionImpl::hasSections() const
void DefinitionImpl::addSectionsToIndex()
{
- if (m_impl->sectionDict==0) return;
+ if (m_impl->sectionRefs.empty()) return;
//printf("DefinitionImpl::addSectionsToIndex()\n");
- SDict<SectionInfo>::Iterator li(*m_impl->sectionDict);
- SectionInfo *si;
int level=1;
- for (li.toFirst();(si=li.current());++li)
+ for (auto it = m_impl->sectionRefs.begin(); it!=m_impl->sectionRefs.end(); ++it)
{
- if (si->type==SectionInfo::Section ||
- si->type==SectionInfo::Subsection ||
- si->type==SectionInfo::Subsubsection ||
- si->type==SectionInfo::Paragraph)
+ const SectionInfo *si = *it;
+ SectionType type = si->type();
+ if (isSection(type))
{
//printf(" level=%d title=%s\n",level,si->title.data());
- int nextLevel = (int)si->type;
+ int nextLevel = (int)type;
int i;
if (nextLevel>level)
{
@@ -497,16 +473,16 @@ void DefinitionImpl::addSectionsToIndex()
Doxygen::indexList->decContentsDepth();
}
}
- QCString title = si->title;
- if (title.isEmpty()) title = si->label;
+ QCString title = si->title();
+ if (title.isEmpty()) title = si->label();
// determine if there is a next level inside this item
- ++li;
- bool isDir = ((li.current()) ? (int)(li.current()->type > nextLevel):FALSE);
- --li;
+ auto it_next = std::next(it);
+ bool isDir = (it_next!=m_impl->sectionRefs.end()) ?
+ ((int)((*it_next)->type()) > nextLevel) : FALSE;
Doxygen::indexList->addContentsItem(isDir,title,
getReference(),
getOutputFileBase(),
- si->label,
+ si->label(),
FALSE,
TRUE);
level = nextLevel;
@@ -521,23 +497,21 @@ void DefinitionImpl::addSectionsToIndex()
void DefinitionImpl::writeDocAnchorsToTagFile(FTextStream &tagFile) const
{
- if (m_impl->sectionDict)
+ if (!m_impl->sectionRefs.empty())
{
- //printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_impl->sectionDict->count());
- SDict<SectionInfo>::Iterator sdi(*m_impl->sectionDict);
- SectionInfo *si;
- for (;(si=sdi.current());++sdi)
+ //printf("%s: writeDocAnchorsToTagFile(%d)\n",name().data(),m_impl->sectionRef.size());
+ for (const SectionInfo *si : m_impl->sectionRefs)
{
- if (!si->generated && si->ref.isEmpty() && !si->label.startsWith("autotoc_md"))
+ if (!si->generated() && si->ref().isEmpty() && !si->label().startsWith("autotoc_md"))
{
//printf("write an entry!\n");
if (definitionType()==TypeMember) tagFile << " ";
- tagFile << " <docanchor file=\"" << addHtmlExtensionIfMissing(si->fileName) << "\"";
- if (!si->title.isEmpty())
+ tagFile << " <docanchor file=\"" << addHtmlExtensionIfMissing(si->fileName()) << "\"";
+ if (!si->title().isEmpty())
{
- tagFile << " title=\"" << convertToXML(si->title) << "\"";
+ tagFile << " title=\"" << convertToXML(si->title()) << "\"";
}
- tagFile << ">" << si->label << "</docanchor>" << endl;
+ tagFile << ">" << si->label() << "</docanchor>" << endl;
}
}
}
@@ -1604,7 +1578,7 @@ void DefinitionImpl::makePartOfGroup(GroupDef *gd)
m_impl->partOfGroups->append(gd);
}
-void DefinitionImpl::setRefItems(const std::vector<ListItemInfo> &sli)
+void DefinitionImpl::setRefItems(const std::vector<RefItem*> &sli)
{
m_impl->xrefListItems.insert(m_impl->xrefListItems.end(), sli.cbegin(), sli.cend());
}
@@ -1620,31 +1594,34 @@ void DefinitionImpl::mergeRefItems(Definition *d)
// sort results on itemId
std::sort(m_impl->xrefListItems.begin(),m_impl->xrefListItems.end(),
- [](const ListItemInfo &left,const ListItemInfo &right)
- { return left.itemId<right.itemId ||
- (left.itemId==right.itemId && qstrcmp(left.type,right.type)<0);
+ [](RefItem *left,RefItem *right)
+ { return left->id() <right->id() ||
+ (left->id()==right->id() &&
+ qstrcmp(left->list()->listName(),right->list()->listName())<0);
});
// filter out duplicates
auto last = std::unique(m_impl->xrefListItems.begin(),m_impl->xrefListItems.end(),
- [](const ListItemInfo &left,const ListItemInfo &right)
- { return left.itemId==right.itemId && left.type==right.type; });
+ [](const RefItem *left,const RefItem *right)
+ { return left->id()==right->id() &&
+ left->list()->listName()==right->list()->listName();
+ });
m_impl->xrefListItems.erase(last, m_impl->xrefListItems.end());
}
int DefinitionImpl::_getXRefListId(const char *listName) const
{
- for (const ListItemInfo &lii : m_impl->xrefListItems)
+ for (const RefItem *item : m_impl->xrefListItems)
{
- if (lii.type==listName)
+ if (item->list()->listName()==listName)
{
- return lii.itemId;
+ return item->id();
}
}
return -1;
}
-const std::vector<ListItemInfo> &DefinitionImpl::xrefListItems() const
+const std::vector<RefItem*> &DefinitionImpl::xrefListItems() const
{
return m_impl->xrefListItems;
}
@@ -1756,8 +1733,7 @@ void DefinitionImpl::writeNavigationPath(OutputList &ol) const
// TODO: move to htmlgen
void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
{
- SectionDict *sectionDict = m_impl->sectionDict;
- if (sectionDict==0) return;
+ if (m_impl->sectionRefs.empty()) return;
if (localToc.isHtmlEnabled())
{
int maxLevel = localToc.htmlLevel();
@@ -1768,21 +1744,17 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
ol.writeString(theTranslator->trRTFTableOfContents());
ol.writeString("</h3>\n");
ol.writeString("<ul>");
- SDict<SectionInfo>::Iterator li(*sectionDict);
- SectionInfo *si;
int level=1,l;
char cs[2];
cs[1]='\0';
bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE };
- for (li.toFirst();(si=li.current());++li)
+ for (const SectionInfo *si : m_impl->sectionRefs)
{
- if (si->type==SectionInfo::Section ||
- si->type==SectionInfo::Subsection ||
- si->type==SectionInfo::Subsubsection ||
- si->type==SectionInfo::Paragraph)
+ SectionType type = si->type();
+ if (isSection(type))
{
//printf(" level=%d title=%s\n",level,si->title.data());
- int nextLevel = (int)si->type;
+ int nextLevel = (int)type;
if (nextLevel>level)
{
for (l=level;l<nextLevel;l++)
@@ -1800,9 +1772,17 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
}
}
cs[0]='0'+nextLevel;
- if (nextLevel <= maxLevel && inLi[nextLevel]) ol.writeString("</li>\n");
- QCString titleDoc = convertToHtml(si->title);
- if (nextLevel <= maxLevel) ol.writeString("<li class=\"level"+QCString(cs)+"\"><a href=\"#"+si->label+"\">"+(si->title.isEmpty()?si->label:titleDoc)+"</a>");
+ if (nextLevel <= maxLevel && inLi[nextLevel])
+ {
+ ol.writeString("</li>\n");
+ }
+ QCString titleDoc = convertToHtml(si->title());
+ if (nextLevel <= maxLevel)
+ {
+ ol.writeString("<li class=\"level"+QCString(cs)+"\">"
+ "<a href=\"#"+si->label()+"\">"+
+ (si->title().isEmpty()?si->label():titleDoc)+"</a>");
+ }
inLi[nextLevel]=TRUE;
level = nextLevel;
}
@@ -1810,7 +1790,10 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
if (level > maxLevel) level = maxLevel;
while (level>1 && level <= maxLevel)
{
- if (inLi[level]) ol.writeString("</li>\n");
+ if (inLi[level])
+ {
+ ol.writeString("</li>\n");
+ }
inLi[level]=FALSE;
ol.writeString("</ul>\n");
level--;
@@ -1828,21 +1811,16 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
ol.disableAllBut(OutputGenerator::Docbook);
ol.writeString(" <toc>\n");
ol.writeString(" <title>" + theTranslator->trRTFTableOfContents() + "</title>\n");
- SectionDict *sectionDict = getSectionDict();
- SDict<SectionInfo>::Iterator li(*sectionDict);
- SectionInfo *si;
int level=1,l;
bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE };
int maxLevel = localToc.docbookLevel();
- for (li.toFirst();(si=li.current());++li)
+ for (const SectionInfo *si : m_impl->sectionRefs)
{
- if (si->type==SectionInfo::Section ||
- si->type==SectionInfo::Subsection ||
- si->type==SectionInfo::Subsubsection ||
- si->type==SectionInfo::Paragraph)
+ SectionType type = si->type();
+ if (isSection(type))
{
//printf(" level=%d title=%s\n",level,si->title.data());
- int nextLevel = (int)si->type;
+ int nextLevel = (int)type;
if (nextLevel>level)
{
for (l=level;l<nextLevel;l++)
@@ -1860,8 +1838,10 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
}
if (nextLevel <= maxLevel)
{
- QCString titleDoc = convertToDocBook(si->title);
- ol.writeString(" <tocentry>" + (si->title.isEmpty()?si->label:titleDoc) + "</tocentry>\n");
+ QCString titleDoc = convertToDocBook(si->title());
+ ol.writeString(" <tocentry>" +
+ (si->title().isEmpty()?si->label():titleDoc) +
+ "</tocentry>\n");
}
inLi[nextLevel]=TRUE;
level = nextLevel;
@@ -1894,9 +1874,9 @@ void DefinitionImpl::writeToc(OutputList &ol, const LocalToc &localToc) const
//----------------------------------------------------------------------------------------
-SectionDict * DefinitionImpl::getSectionDict() const
+const SectionRefs &DefinitionImpl::getSectionRefs() const
{
- return m_impl->sectionDict;
+ return m_impl->sectionRefs;
}
QCString DefinitionImpl::symbolName() const
diff --git a/src/definition.h b/src/definition.h
index b3ece2c..f28b47f 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -32,15 +32,15 @@
class FileDef;
class OutputList;
-class SectionDict;
+class SectionRefs;
class MemberSDict;
class MemberDef;
class GroupDef;
class GroupList;
-struct ListItemInfo;
-struct SectionInfo;
+class SectionInfo;
class Definition;
class FTextStream;
+class RefItem;
/** Data associated with a detailed description. */
struct DocInfo
@@ -263,7 +263,7 @@ class Definition : public DefinitionIntf
virtual GroupList *partOfGroups() const = 0;
virtual bool isLinkableViaGroup() const = 0;
- virtual const std::vector<ListItemInfo> &xrefListItems() const = 0;
+ virtual const std::vector<RefItem*> &xrefListItems() const = 0;
virtual Definition *findInnerCompound(const char *name) const = 0;
virtual Definition *getOuterScope() const = 0;
@@ -280,7 +280,7 @@ class Definition : public DefinitionIntf
virtual QCString id() const = 0;
/** returns the section dictionary, only of importance for pagedef */
- virtual SectionDict * getSectionDict() const = 0;
+ virtual const SectionRefs &getSectionRefs() const = 0;
virtual QCString navigationPathAsString() const = 0;
virtual QCString pathFragment() const = 0;
@@ -319,7 +319,7 @@ class Definition : public DefinitionIntf
virtual void setBodySegment(int bls,int ble) = 0;
virtual void setBodyDef(FileDef *fd) = 0;
- virtual void setRefItems(const std::vector<ListItemInfo> &sli) = 0;
+ virtual void setRefItems(const std::vector<RefItem*> &sli) = 0;
virtual void setOuterScope(Definition *d) = 0;
virtual void setHidden(bool b) = 0;
diff --git a/src/definitionimpl.h b/src/definitionimpl.h
index 2d8886d..d66ac93 100644
--- a/src/definitionimpl.h
+++ b/src/definitionimpl.h
@@ -67,7 +67,7 @@ class DefinitionImpl : virtual public Definition
virtual SrcLangExt getLanguage() const;
virtual GroupList *partOfGroups() const;
virtual bool isLinkableViaGroup() const;
- virtual const std::vector<ListItemInfo> &xrefListItems() const;
+ virtual const std::vector<RefItem*> &xrefListItems() const;
virtual Definition *findInnerCompound(const char *name) const;
virtual Definition *getOuterScope() const;
virtual MemberSDict *getReferencesMembers() const;
@@ -76,7 +76,7 @@ class DefinitionImpl : virtual public Definition
virtual bool hasSources() const;
virtual bool hasBriefDescription() const;
virtual QCString id() const;
- virtual SectionDict * getSectionDict() const;
+ virtual const SectionRefs &getSectionRefs() const;
virtual void setName(const char *name);
virtual void setId(const char *name);
virtual void setDefFile(const QCString& df,int defLine,int defColumn);
@@ -89,7 +89,7 @@ class DefinitionImpl : virtual public Definition
virtual void setBodyDef(FileDef *fd);
virtual void addSourceReferencedBy(const MemberDef *d);
virtual void addSourceReferences(const MemberDef *d);
- virtual void setRefItems(const std::vector<ListItemInfo> &sli);
+ virtual void setRefItems(const std::vector<RefItem*> &sli);
virtual void mergeRefItems(Definition *d);
virtual void addInnerCompound(const Definition *d);
virtual void setOuterScope(Definition *d);
@@ -213,7 +213,7 @@ class DefinitionAliasImpl : virtual public Definition
{ return m_def->partOfGroups(); }
virtual bool isLinkableViaGroup() const
{ return m_def->isLinkableViaGroup(); }
- virtual const std::vector<ListItemInfo> &xrefListItems() const
+ virtual const std::vector<RefItem*> &xrefListItems() const
{ return m_def->xrefListItems(); }
virtual Definition *findInnerCompound(const char *name) const
{ return m_def->findInnerCompound(name); }
@@ -231,8 +231,8 @@ class DefinitionAliasImpl : virtual public Definition
{ return m_def->hasBriefDescription(); }
virtual QCString id() const
{ return m_def->id(); }
- virtual SectionDict * getSectionDict() const
- { return m_def->getSectionDict(); }
+ virtual const SectionRefs &getSectionRefs() const
+ { return m_def->getSectionRefs(); }
virtual QCString navigationPathAsString() const
{ return m_def->navigationPathAsString(); }
virtual QCString pathFragment() const
@@ -249,7 +249,7 @@ class DefinitionAliasImpl : virtual public Definition
virtual void setBodyDef(FileDef *fd) {}
virtual void addSourceReferencedBy(const MemberDef *d) {}
virtual void addSourceReferences(const MemberDef *d) {}
- virtual void setRefItems(const std::vector<ListItemInfo> &sli) {}
+ virtual void setRefItems(const std::vector<RefItem*> &sli) {}
virtual void mergeRefItems(Definition *d) {}
virtual void addInnerCompound(const Definition *d) {}
virtual void setOuterScope(Definition *d) {}
diff --git a/src/diagram.cpp b/src/diagram.cpp
index 18817e9..25b2c06 100644
--- a/src/diagram.cpp
+++ b/src/diagram.cpp
@@ -261,7 +261,7 @@ static void writeMapArea(FTextStream &t,const ClassDef *cd,QCString relPath,
t << "<area ";
if (!ref.isEmpty())
{
- t << externalLinkTarget();
+ t << externalLinkTarget(true);
}
t << "href=\"";
t << externalRef(relPath,ref,TRUE);
diff --git a/src/docbookgen.cpp b/src/docbookgen.cpp
index fff9728..1799ed9 100644
--- a/src/docbookgen.cpp
+++ b/src/docbookgen.cpp
@@ -1025,13 +1025,13 @@ DB_GEN_C
t << "</para>";
t << "<para>";
}
-void DocbookGenerator::startSection(const char *lab,const char *,SectionInfo::SectionType type)
+void DocbookGenerator::startSection(const char *lab,const char *,SectionType type)
{
DB_GEN_C
t << " <section xml:id=\"_" << stripPath(lab) << "\">";
t << "<title>";
}
-void DocbookGenerator::endSection(const char *lab,SectionInfo::SectionType)
+void DocbookGenerator::endSection(const char *lab,SectionType)
{
DB_GEN_C
t << "</title>";
diff --git a/src/docbookgen.h b/src/docbookgen.h
index 64e9e67..d993312 100644
--- a/src/docbookgen.h
+++ b/src/docbookgen.h
@@ -204,8 +204,8 @@ class DocbookGenerator : public OutputGenerator
void startTitle(void){DB_GEN_NEW};
void endTitle(void){DB_GEN_NEW};
void writeAnchor(const char *,const char *){DB_GEN_EMPTY};
- void startSection(const char *,const char *,SectionInfo::SectionType);
- void endSection(const char *,SectionInfo::SectionType);
+ void startSection(const char *,const char *,SectionType);
+ void endSection(const char *,SectionType);
void lineBreak(const char *);
void addIndexItem(const char *,const char *);
void writeNonBreakableSpace(int);
diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp
index 9de0a16..9ae1c8f 100644
--- a/src/docbookvisitor.cpp
+++ b/src/docbookvisitor.cpp
@@ -1,9 +1,6 @@
/******************************************************************************
*
- *
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2020 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -16,6 +13,7 @@
*
*/
+
#include <qfileinfo.h>
#include "docbookvisitor.h"
@@ -69,6 +67,23 @@ static QCString filterId(const char *s)
return growBuf.get();
}
+static bool supportedHtmlAttribute(const QCString &name)
+{
+ return (name=="align" ||
+ name=="bgcolor" ||
+ name=="border" ||
+ name=="cellpadding" ||
+ name=="cellspacing" ||
+ name=="class" ||
+ name=="frame" ||
+ name=="label" ||
+ name=="style" ||
+ name=="width" ||
+ name=="tabstyle" ||
+ name=="title");
+}
+
+
void DocbookDocVisitor::visitCaption(const QList<DocNode> &children)
{
QListIterator<DocNode> cli(children);
@@ -138,7 +153,7 @@ void DocbookDocVisitor::visitPostEnd(FTextStream &t, bool hasCaption, bool inlin
}
DocbookDocVisitor::DocbookDocVisitor(FTextStream &t,CodeOutputInterface &ci)
- : DocVisitor(DocVisitor_Docbook), m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE)
+ : DocVisitor(DocVisitor_Docbook), m_t(t), m_ci(ci)
{
DB_VIS_C
// m_t << "<section>" << endl;
@@ -434,6 +449,12 @@ DB_VIS_C
case DocInclude::DontIncWithLines:
case DocInclude::HtmlInclude:
case DocInclude::LatexInclude:
+ case DocInclude::RtfInclude:
+ case DocInclude::ManInclude:
+ case DocInclude::XmlInclude:
+ break;
+ case DocInclude::DocbookInclude:
+ m_t << inc->text();
break;
case DocInclude::VerbInclude:
m_t << "<literallayout>";
@@ -983,12 +1004,10 @@ DB_VIS_C
m_t << "</listitem></varlistentry>\n";
}
-static int colCnt = 0;
-static bool bodySet = FALSE; // it is possible to have tables without a header
void DocbookDocVisitor::visitPre(DocHtmlTable *t)
{
DB_VIS_C
- bodySet = FALSE;
+ m_bodySet.push(false);
if (m_hide) return;
m_t << "<informaltable frame=\"all\">" << endl;
m_t << " <tgroup cols=\"" << t->numColumns() << "\" align=\"left\" colsep=\"1\" rowsep=\"1\">" << endl;
@@ -1003,8 +1022,8 @@ void DocbookDocVisitor::visitPost(DocHtmlTable *)
{
DB_VIS_C
if (m_hide) return;
- if (bodySet) m_t << " </tbody>" << endl;
- bodySet = FALSE;
+ if (m_bodySet.top()) m_t << " </tbody>" << endl;
+ m_bodySet.pop();
m_t << " </tgroup>" << endl;
m_t << "</informaltable>" << endl;
}
@@ -1012,13 +1031,18 @@ DB_VIS_C
void DocbookDocVisitor::visitPre(DocHtmlRow *tr)
{
DB_VIS_C
- colCnt = 0;
+ m_colCnt = 0;
if (m_hide) return;
- if (tr->isHeading()) m_t << "<thead>\n";
- else if (!bodySet)
+ if (tr->isHeading())
+ {
+ if (m_bodySet.top()) m_t << "</tbody>\n";
+ m_bodySet.top() = false;
+ m_t << "<thead>\n";
+ }
+ else if (!m_bodySet.top())
{
- bodySet = TRUE;
+ m_bodySet.top() = true;
m_t << "<tbody>\n";
}
@@ -1028,25 +1052,10 @@ DB_VIS_C
HtmlAttrib *opt;
for (li.toFirst();(opt=li.current());++li)
{
- if (opt->name=="class")
+ if (supportedHtmlAttribute(opt->name))
{
- // just skip it
- }
- else if (opt->name=="style")
- {
- // just skip it
- }
- else if (opt->name=="height")
- {
- // just skip it
- }
- else if (opt->name=="filter")
- {
- // just skip it
- }
- else
- {
- m_t << " " << opt->name << "='" << opt->value << "'";
+ // process supported attributes only
+ m_t << " " << opt->name << "='" << convertToDocBook(opt->value) << "'";
}
}
m_t << ">\n";
@@ -1059,15 +1068,15 @@ DB_VIS_C
m_t << "</row>\n";
if (tr->isHeading())
{
- bodySet = TRUE;
m_t << "</thead><tbody>\n";
+ m_bodySet.top() = true;
}
}
void DocbookDocVisitor::visitPre(DocHtmlCell *c)
{
DB_VIS_C
- colCnt++;
+ m_colCnt++;
if (m_hide) return;
m_t << "<entry";
@@ -1077,10 +1086,10 @@ DB_VIS_C
{
if (opt->name=="colspan")
{
- m_t << " namest='c" << colCnt << "'";
+ m_t << " namest='c" << m_colCnt << "'";
int cols = opt->value.toInt();
- colCnt += (cols - 1);
- m_t << " nameend='c" << colCnt << "'";
+ m_colCnt += (cols - 1);
+ m_t << " nameend='c" << m_colCnt << "'";
}
else if (opt->name=="rowspan")
{
@@ -1089,50 +1098,31 @@ DB_VIS_C
}
else if (opt->name=="class")
{
- if (opt->value == "markdownTableBodyRight")
- {
- m_t << " align='right'";
- }
- else if (opt->value == "markdownTableBodyLeftt")
+ if (opt->value.left(13)=="markdownTable") // handle markdown generated attributes
{
- m_t << " align='left'";
- }
- else if (opt->value == "markdownTableBodyCenter")
- {
- m_t << " align='center'";
- }
- else if (opt->value == "markdownTableHeadRight")
- {
- m_t << " align='right'";
- }
- else if (opt->value == "markdownTableHeadLeftt")
- {
- m_t << " align='left'";
+ if (opt->value.right(5)=="Right")
+ {
+ m_t << " align='right'";
+ }
+ else if (opt->value.right(4)=="Left")
+ {
+ m_t << " align='left'";
+ }
+ else if (opt->value.right(6)=="Center")
+ {
+ m_t << " align='center'";
+ }
+ // skip 'markdownTable*' value ending with "None"
}
- else if (opt->value == "markdownTableHeadCenter")
+ else
{
- m_t << " align='center'";
+ m_t << " class='" << convertToDocBook(opt->value) << "'";
}
}
- else if (opt->name=="style")
- {
- // just skip it
- }
- else if (opt->name=="width")
- {
- // just skip it
- }
- else if (opt->name=="height")
- {
- // just skip it
- }
- else if (opt->name=="nowrap" && opt->value.isEmpty())
- {
- m_t << " " << opt->name << "='nowrap'";
- }
- else
+ else if (supportedHtmlAttribute(opt->name))
{
- m_t << " " << opt->name << "='" << opt->value << "'";
+ // process supported attributes only
+ m_t << " " << opt->name << "='" << convertToDocBook(opt->value) << "'";
}
}
m_t << ">";
@@ -1632,16 +1622,14 @@ DB_VIS_C
void DocbookDocVisitor::pushEnabled()
{
DB_VIS_C
- m_enabled.push(new bool(m_hide));
+ m_enabled.push(m_hide);
}
void DocbookDocVisitor::popEnabled()
{
DB_VIS_C
- bool *v=m_enabled.pop();
- ASSERT(v!=0);
- m_hide = *v;
- delete v;
+ m_hide=m_enabled.top();
+ m_enabled.pop();
}
void DocbookDocVisitor::writeMscFile(const QCString &baseName, DocVerbatim *s)
diff --git a/src/docbookvisitor.h b/src/docbookvisitor.h
index 47275f7..a338bbf 100644
--- a/src/docbookvisitor.h
+++ b/src/docbookvisitor.h
@@ -1,8 +1,6 @@
/******************************************************************************
*
-*
-*
-* Copyright (C) 1997-2015 by Dimitri van Heesch.
+* Copyright (C) 1997-2020 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -18,6 +16,8 @@
#ifndef _DOCBOOKDOCVISITOR_H
#define _DOCBOOKDOCVISITOR_H
+#include <stack>
+
#include "docvisitor.h"
#include <qstack.h>
#include <qlist.h>
@@ -173,10 +173,12 @@ class DocbookDocVisitor : public DocVisitor
//--------------------------------------
FTextStream &m_t;
CodeOutputInterface &m_ci;
- bool m_insidePre;
- bool m_hide;
- QStack<bool> m_enabled;
+ bool m_insidePre = false;
+ bool m_hide = false;
+ std::stack<bool> m_enabled;
QCString m_langExt;
+ int m_colCnt = 0;
+ std::stack<bool> m_bodySet; // it is possible to have tables without a header, needs to be an array as we can have tables in tables
};
#endif
diff --git a/src/docgroup.cpp b/src/docgroup.cpp
index fbdb842..d82d1b3 100644
--- a/src/docgroup.cpp
+++ b/src/docgroup.cpp
@@ -13,12 +13,14 @@
*
*/
+#include <atomic>
#include "doxygen.h"
#include "util.h"
#include "entry.h"
#include "message.h"
#include "docgroup.h"
+static std::atomic_int g_groupId;
void DocGroup::enterFile(const char *fileName,int)
{
@@ -84,7 +86,7 @@ void DocGroup::leaveCompound(const char *,int,const char * /*name*/)
m_compoundName.resize(0);
}
-int DocGroup::findExistingGroup(int &groupId,const MemberGroupInfo *info)
+int DocGroup::findExistingGroup(const MemberGroupInfo *info)
{
//printf("findExistingGroup %s:%s\n",info->header.data(),info->compoundName.data());
QIntDictIterator<MemberGroupInfo> di(Doxygen::memGrpInfoDict);
@@ -100,8 +102,7 @@ int DocGroup::findExistingGroup(int &groupId,const MemberGroupInfo *info)
return (int)di.currentKey(); // put the item in this group
}
}
- groupId++; // start new group
- return groupId;
+ return ++g_groupId; // start new group
}
void DocGroup::open(Entry *e,const char *,int, bool implicit)
@@ -118,12 +119,10 @@ void DocGroup::open(Entry *e,const char *,int, bool implicit)
//printf(" membergroup id=%d %s\n",m_memberGroupId,m_memberGroupHeader.data());
if (m_memberGroupId==DOX_NOGROUP) // no group started yet
{
- static int curGroupId=0;
-
MemberGroupInfo *info = new MemberGroupInfo;
info->header = m_memberGroupHeader.stripWhiteSpace();
info->compoundName = m_compoundName;
- m_memberGroupId = findExistingGroup(curGroupId,info);
+ m_memberGroupId = findExistingGroup(info);
//printf(" use membergroup %d\n",m_memberGroupId);
Doxygen::memGrpInfoDict.insert(m_memberGroupId,info);
diff --git a/src/docgroup.h b/src/docgroup.h
index 3ccef0d..c724348 100644
--- a/src/docgroup.h
+++ b/src/docgroup.h
@@ -41,7 +41,7 @@ class DocGroup
void addDocs(Entry *e);
private:
- int findExistingGroup(int &groupId,const MemberGroupInfo *info);
+ int findExistingGroup(const MemberGroupInfo *info);
int m_openCount = 0;
QCString m_memberGroupHeader;
int m_memberGroupId = 0;
diff --git a/src/docparser.cpp b/src/docparser.cpp
index 5498adb..e26c2ac 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -106,7 +106,6 @@ static QDict<void> g_paramsFound;
static const MemberDef * g_memberDef;
static bool g_isExample;
static QCString g_exampleName;
-static SectionDict * g_sectionDict;
static QCString g_searchUrl;
static QCString g_includeFileName;
@@ -141,7 +140,6 @@ struct DocParserContext
QDict<void> paramsFound;
bool isExample;
QCString exampleName;
- SectionDict *sectionDict;
QCString searchUrl;
QCString includeFileText;
@@ -191,7 +189,6 @@ static void docParserPushContext(bool saveParamInfo=TRUE)
ctx->memberDef = g_memberDef;
ctx->isExample = g_isExample;
ctx->exampleName = g_exampleName;
- ctx->sectionDict = g_sectionDict;
ctx->searchUrl = g_searchUrl;
ctx->includeFileText = g_includeFileText;
@@ -232,7 +229,6 @@ static void docParserPopContext(bool keepParamInfo=FALSE)
g_memberDef = ctx->memberDef;
g_isExample = ctx->isExample;
g_exampleName = ctx->exampleName;
- g_sectionDict = ctx->sectionDict;
g_searchUrl = ctx->searchUrl;
g_includeFileText = ctx->includeFileText;
@@ -1919,12 +1915,14 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
return;
}
- if (id.left(CiteConsts::anchorPrefix.length()) == CiteConsts::anchorPrefix)
+ const CitationManager &ct = CitationManager::instance();
+ QCString anchorPrefix = ct.anchorPrefix();
+ if (id.left(anchorPrefix.length()) == anchorPrefix)
{
- CiteInfo *cite = Doxygen::citeDict->find(id.mid(CiteConsts::anchorPrefix.length()));
- if (cite)
+ const CiteInfo *cite = ct.find(id.mid(anchorPrefix.length()));
+ if (cite)
{
- m_file = convertNameToFile(CiteConsts::fileName,FALSE,TRUE);
+ m_file = convertNameToFile(ct.fileName(),FALSE,TRUE);
m_anchor = id;
}
else
@@ -1940,17 +1938,12 @@ DocAnchor::DocAnchor(DocNode *parent,const QCString &id,bool newAnchor)
}
else // found \anchor label
{
- SectionInfo *sec = Doxygen::sectionDict->find(id);
+ const SectionInfo *sec = SectionManager::instance().find(id);
if (sec)
{
//printf("Found anchor %s\n",id.data());
- m_file = sec->fileName;
- m_anchor = sec->label;
- if (g_sectionDict && g_sectionDict->find(id)==0)
- {
- //printf("Inserting in dictionary!\n");
- g_sectionDict->append(id,sec);
- }
+ m_file = sec->fileName();
+ m_anchor = sec->label();
}
else
{
@@ -2000,9 +1993,11 @@ void DocInclude::parse()
case VerbInclude:
// fall through
case HtmlInclude:
- readTextFileByName(m_file,m_text);
- break;
case LatexInclude:
+ case DocInclude::RtfInclude:
+ case DocInclude::ManInclude:
+ case DocInclude::XmlInclude:
+ case DocInclude::DocbookInclude:
readTextFileByName(m_file,m_text);
break;
case Snippet:
@@ -2175,18 +2170,18 @@ DocXRefItem::DocXRefItem(DocNode *parent,int id,const char *key) :
bool DocXRefItem::parse()
{
- RefList *refList = Doxygen::xrefLists->find(m_key);
- if (refList &&
+ RefList *refList = RefListManager::instance().find(m_key);
+ if (refList &&
(
// either not a built-in list or the list is enabled
- (m_key!="todo" || Config_getBool(GENERATE_TODOLIST)) &&
- (m_key!="test" || Config_getBool(GENERATE_TESTLIST)) &&
- (m_key!="bug" || Config_getBool(GENERATE_BUGLIST)) &&
+ (m_key!="todo" || Config_getBool(GENERATE_TODOLIST)) &&
+ (m_key!="test" || Config_getBool(GENERATE_TESTLIST)) &&
+ (m_key!="bug" || Config_getBool(GENERATE_BUGLIST)) &&
(m_key!="deprecated" || Config_getBool(GENERATE_DEPRECATEDLIST))
- )
+ )
)
{
- RefItem *item = refList->getRefItem(m_id);
+ RefItem *item = refList->find(m_id);
ASSERT(item!=0);
if (item)
{
@@ -2198,16 +2193,16 @@ bool DocXRefItem::parse()
else
{
m_file = refList->fileName();
- m_anchor = item->listAnchor;
+ m_anchor = item->anchor();
}
m_title = refList->sectionTitle();
//printf("DocXRefItem: file=%s anchor=%s title=%s\n",
// m_file.data(),m_anchor.data(),m_title.data());
- if (!item->text.isEmpty())
+ if (!item->text().isEmpty())
{
docParserPushContext();
- internalValidatingParseDoc(this,m_children,item->text);
+ internalValidatingParseDoc(this,m_children,item->text());
docParserPopContext();
}
}
@@ -2221,15 +2216,13 @@ bool DocXRefItem::parse()
DocFormula::DocFormula(DocNode *parent,int id) :
m_relPath(g_relPath)
{
- m_parent = parent;
- QCString formCmd;
- formCmd.sprintf("\\_form#%d",id);
- Formula *formula=Doxygen::formulaNameDict->find(formCmd);
- if (formula)
+ m_parent = parent;
+ QCString text = FormulaManager::instance().findFormula(id);
+ if (!text.isEmpty())
{
- m_id = formula->getId();
+ m_id = id;
m_name.sprintf("form_%d",m_id);
- m_text = formula->getFormulaText();
+ m_text = text;
}
else // wrong \_form#<n> command
{
@@ -2284,30 +2277,26 @@ void DocSecRefItem::parse()
doctokenizerYYsetStatePara();
handlePendingStyleCommands(this,m_children);
- SectionInfo *sec=0;
+ const SectionInfo *sec=0;
if (!m_target.isEmpty())
{
- sec=Doxygen::sectionDict->find(m_target);
+ const SectionInfo *sec = SectionManager::instance().find(m_target);
if (sec)
{
- m_file = sec->fileName;
- m_anchor = sec->label;
- if (g_sectionDict && g_sectionDict->find(m_target)==0)
- {
- g_sectionDict->append(m_target,sec);
- }
+ m_file = sec->fileName();
+ m_anchor = sec->label();
}
else
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"reference to unknown section %s",
qPrint(m_target));
}
- }
+ }
else
{
warn_doc_error(g_fileName,doctokenizerYYlineno,"reference to empty target");
}
-
+
DBG(("DocSecRefItem::parse() end\n"));
DocNode *n = g_nodeStack.pop();
ASSERT(n==this);
@@ -2429,28 +2418,28 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
ASSERT(!target.isEmpty());
SrcLangExt lang = getLanguageFromFileName(target);
m_relPath = g_relPath;
- SectionInfo *sec = Doxygen::sectionDict->find(target);
+ const SectionInfo *sec = SectionManager::instance().find(target);
if (sec==0 && lang==SrcLangExt_Markdown) // lookup as markdown file
{
- sec = Doxygen::sectionDict->find(markdownFileNameToId(target));
+ sec = SectionManager::instance().find(markdownFileNameToId(target));
}
if (sec) // ref to section or anchor
{
PageDef *pd = 0;
- if (sec->type==SectionInfo::Page)
+ if (sec->type()==SectionType::Page)
{
pd = Doxygen::pageSDict->find(target);
}
- m_text = sec->title;
- if (m_text.isEmpty()) m_text = sec->label;
+ m_text = sec->title();
+ if (m_text.isEmpty()) m_text = sec->label();
- m_ref = sec->ref;
- m_file = stripKnownExtensions(sec->fileName);
- if (sec->type==SectionInfo::Anchor)
+ m_ref = sec->ref();
+ m_file = stripKnownExtensions(sec->fileName());
+ if (sec->type()==SectionType::Anchor)
{
m_refType = Anchor;
}
- else if (sec->type==SectionInfo::Table)
+ else if (sec->type()==SectionType::Table)
{
m_refType = Table;
}
@@ -2459,7 +2448,7 @@ DocRef::DocRef(DocNode *parent,const QCString &target,const QCString &context) :
m_refType = Section;
}
m_isSubPage = pd && pd->hasParentPage();
- if (sec->type!=SectionInfo::Page || m_isSubPage) m_anchor = sec->label;
+ if (sec->type()!=SectionType::Page || m_isSubPage) m_anchor = sec->label();
//printf("m_text=%s,m_ref=%s,m_file=%s,m_refToAnchor=%d type=%d\n",
// m_text.data(),m_ref.data(),m_file.data(),m_refToAnchor,sec->type);
return;
@@ -2585,14 +2574,15 @@ DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //cont
//printf("DocCite::DocCite(target=%s)\n",target.data());
ASSERT(!target.isEmpty());
m_relPath = g_relPath;
- CiteInfo *cite = Doxygen::citeDict->find(target);
+ const CitationManager &ct = CitationManager::instance();
+ const CiteInfo *cite = ct.find(target);
//printf("cite=%p text='%s' numBibFiles=%d\n",cite,cite?cite->text.data():"<null>",numBibFiles);
- if (numBibFiles>0 && cite && !cite->text.isEmpty()) // ref to citation
+ if (numBibFiles>0 && cite && !cite->text().isEmpty()) // ref to citation
{
- m_text = cite->text;
- m_ref = cite->ref;
- m_anchor = CiteConsts::anchorPrefix+cite->label;
- m_file = convertNameToFile(CiteConsts::fileName,FALSE,TRUE);
+ m_text = cite->text();
+ m_ref = "";
+ m_anchor = ct.anchorPrefix()+cite->label();
+ m_file = convertNameToFile(ct.fileName(),FALSE,TRUE);
//printf("CITE ==> m_text=%s,m_ref=%s,m_file=%s,m_anchor=%s\n",
// m_text.data(),m_ref.data(),m_file.data(),m_anchor.data());
return;
@@ -3246,18 +3236,13 @@ DocHtmlCaption::DocHtmlCaption(DocNode *parent,const HtmlAttribList &attribs)
{
if (opt->name=="id" && !opt->value.isEmpty()) // interpret id attribute as an anchor
{
- SectionInfo *sec = Doxygen::sectionDict->find(opt->value);
+ const SectionInfo *sec = SectionManager::instance().find(opt->value);
if (sec)
{
//printf("Found anchor %s\n",id.data());
- m_file = sec->fileName;
- m_anchor = sec->label;
+ m_file = sec->fileName();
+ m_anchor = sec->label();
m_hasCaptionId = TRUE;
- if (g_sectionDict && g_sectionDict->find(opt->value)==0)
- {
- //printf("Inserting in dictionary!\n");
- g_sectionDict->append(opt->value,sec);
- }
}
else
{
@@ -5400,7 +5385,7 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok)
{
case CMD_UNKNOWN:
m_children.append(new DocWord(this,TK_COMMAND_CHAR(tok) + cmdName));
- warn_doc_error(g_fileName,doctokenizerYYlineno,"Found unknown command '\\%s'",qPrint(cmdName));
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"Found unknown command '%c%s'",TK_COMMAND_CHAR(tok),qPrint(cmdName));
break;
case CMD_EMPHASIS:
m_children.append(new DocStyleChange(this,g_nodeStack.count(),DocStyleChange::Italic,cmdName,TRUE));
@@ -5776,6 +5761,18 @@ int DocPara::handleCommand(const QCString &cmdName, const int tok)
case CMD_LATEXINCLUDE:
handleInclude(cmdName,DocInclude::LatexInclude);
break;
+ case CMD_RTFINCLUDE:
+ handleInclude(cmdName,DocInclude::RtfInclude);
+ break;
+ case CMD_MANINCLUDE:
+ handleInclude(cmdName,DocInclude::ManInclude);
+ break;
+ case CMD_XMLINCLUDE:
+ handleInclude(cmdName,DocInclude::XmlInclude);
+ break;
+ case CMD_DOCBOOKINCLUDE:
+ handleInclude(cmdName,DocInclude::DocbookInclude);
+ break;
case CMD_VERBINCLUDE:
handleInclude(cmdName,DocInclude::VerbInclude);
break;
@@ -6853,20 +6850,15 @@ int DocSection::parse()
int retval=RetVal_OK;
g_nodeStack.push(this);
- SectionInfo *sec;
if (!m_id.isEmpty())
{
- sec=Doxygen::sectionDict->find(m_id);
+ const SectionInfo *sec = SectionManager::instance().find(m_id);
if (sec)
{
- m_file = sec->fileName;
- m_anchor = sec->label;
- m_title = sec->title;
- if (m_title.isEmpty()) m_title = sec->label;
- if (g_sectionDict && g_sectionDict->find(m_id)==0)
- {
- g_sectionDict->append(m_id,sec);
- }
+ m_file = sec->fileName();
+ m_anchor = sec->label();
+ m_title = sec->title();
+ if (m_title.isEmpty()) m_title = sec->label();
}
}
@@ -6920,7 +6912,6 @@ int DocSection::parse()
// then parse any number of nested sections
while (retval==RetVal_Subsection) // more sections follow
{
- //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
DocSection *s=new DocSection(this,
QMIN(2+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.append(s);
@@ -6935,7 +6926,6 @@ int DocSection::parse()
// then parse any number of nested sections
while (retval==RetVal_Subsubsection) // more sections follow
{
- //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
DocSection *s=new DocSection(this,
QMIN(3+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.append(s);
@@ -6950,7 +6940,6 @@ int DocSection::parse()
// then parse any number of nested sections
while (retval==RetVal_Paragraph) // more sections follow
{
- //SectionInfo *sec=Doxygen::sectionDict[g_token->sectionId];
DocSection *s=new DocSection(this,
QMIN(4+Doxygen::subpageNestingLevel,5),g_token->sectionId);
m_children.append(s);
@@ -7119,13 +7108,13 @@ void DocRoot::parse()
{
if (!g_token->sectionId.startsWith("autotoc_md"))
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"found paragraph command outside of subsubsection context!");
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"found paragraph command (id: '%s') outside of subsubsection context!",qPrint(g_token->sectionId));
}
while (retval==RetVal_Paragraph)
{
if (!g_token->sectionId.isEmpty())
{
- SectionInfo *sec=Doxygen::sectionDict->find(g_token->sectionId);
+ const SectionInfo *sec=SectionManager::instance().find(g_token->sectionId);
if (sec)
{
DocSection *s=new DocSection(this,
@@ -7149,12 +7138,12 @@ void DocRoot::parse()
if (retval==RetVal_Subsubsection)
{
if (!(g_token->sectionId.startsWith("autotoc_md")))
- warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsubsection command outside of subsection context!");
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsubsection command (id: '%s') outside of subsection context!",qPrint(g_token->sectionId));
while (retval==RetVal_Subsubsection)
{
if (!g_token->sectionId.isEmpty())
{
- SectionInfo *sec=Doxygen::sectionDict->find(g_token->sectionId);
+ const SectionInfo *sec=SectionManager::instance().find(g_token->sectionId);
if (sec)
{
DocSection *s=new DocSection(this,
@@ -7179,13 +7168,13 @@ void DocRoot::parse()
{
if (!g_token->sectionId.startsWith("autotoc_md"))
{
- warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsection command outside of section context!");
+ warn_doc_error(g_fileName,doctokenizerYYlineno,"found subsection command (id: '%s') outside of section context!",qPrint(g_token->sectionId));
}
while (retval==RetVal_Subsection)
{
if (!g_token->sectionId.isEmpty())
{
- SectionInfo *sec=Doxygen::sectionDict->find(g_token->sectionId);
+ const SectionInfo *sec=SectionManager::instance().find(g_token->sectionId);
if (sec)
{
DocSection *s=new DocSection(this,
@@ -7225,7 +7214,7 @@ void DocRoot::parse()
{
if (!g_token->sectionId.isEmpty())
{
- SectionInfo *sec=Doxygen::sectionDict->find(g_token->sectionId);
+ const SectionInfo *sec=SectionManager::instance().find(g_token->sectionId);
if (sec)
{
DocSection *s=new DocSection(this,
@@ -7735,7 +7724,6 @@ DocRoot *validatingParseDoc(const char *fileName,int startLine,
g_retvalsFound.clear();
g_paramsFound.setAutoDelete(FALSE);
g_paramsFound.clear();
- g_sectionDict = 0; //sections;
//printf("Starting comment block at %s:%d\n",g_fileName.data(),startLine);
doctokenizerYYlineno=startLine;
diff --git a/src/docparser.h b/src/docparser.h
index b7164d7..b414d9b 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -32,7 +32,6 @@ class DocNode;
class MemberDef;
class Definition;
class MemberGroup;
-class SectionDict;
//---------------------------------------------------------------------------
QString::Direction getTextDirByConfig(const QString &text);
@@ -583,7 +582,7 @@ class DocInclude : public DocNode
public:
enum Type { Include, DontInclude, VerbInclude, HtmlInclude, LatexInclude,
IncWithLines, Snippet , IncludeDoc, SnippetDoc, SnipWithLines,
- DontIncWithLines};
+ DontIncWithLines, RtfInclude, ManInclude, DocbookInclude, XmlInclude};
DocInclude(DocNode *parent,const QCString &file,
const QCString context, Type t,
bool isExample,const QCString exampleFile,
diff --git a/src/doctokenizer.l b/src/doctokenizer.l
index 4882570..0f8cb1c 100644
--- a/src/doctokenizer.l
+++ b/src/doctokenizer.l
@@ -18,6 +18,9 @@
%option never-interactive
%option prefix="doctokenizerYY"
+%top{
+#include <stdint.h>
+}
%{
@@ -60,7 +63,7 @@ static int g_sharpCount=0;
static const Definition *g_definition;
static QCString g_secLabel;
static QCString g_secTitle;
-static SectionInfo::SectionType g_secType;
+static SectionType g_secType;
static QCString g_endMarker;
static int g_autoListLevel;
@@ -167,11 +170,11 @@ static void processSection()
{
warn(g_fileName,yylineno,"Found section/anchor %s without context\n",g_secLabel.data());
}
- SectionInfo *si=0;
- if ((si=Doxygen::sectionDict->find(g_secLabel)))
+ SectionInfo *si = SectionManager::instance().find(g_secLabel);
+ if (si)
{
- si->fileName = file;
- si->type = g_secType;
+ si->setFileName(file);
+ si->setType(g_secType);
}
}
@@ -1245,7 +1248,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
int e=tag.find(c,s+4);
if (e!=-1) // found matching end
{
- g_secType = SectionInfo::Table;
+ g_secType = SectionType::Table;
g_secLabel=tag.mid(s+4,e-s-4); // extract id
processSection();
}
@@ -1253,23 +1256,23 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
}
}
<St_Sections>{CMD}"anchor"{BLANK}+ {
- g_secType = SectionInfo::Anchor;
+ g_secType = SectionType::Anchor;
BEGIN(St_SecLabel1);
}
<St_Sections>{CMD}"section"{BLANK}+ {
- g_secType = SectionInfo::Section;
+ g_secType = SectionType::Section;
BEGIN(St_SecLabel2);
}
<St_Sections>{CMD}"subsection"{BLANK}+ {
- g_secType = SectionInfo::Subsection;
+ g_secType = SectionType::Subsection;
BEGIN(St_SecLabel2);
}
<St_Sections>{CMD}"subsubsection"{BLANK}+ {
- g_secType = SectionInfo::Subsubsection;
+ g_secType = SectionType::Subsubsection;
BEGIN(St_SecLabel2);
}
<St_Sections>{CMD}"paragraph"{BLANK}+ {
- g_secType = SectionInfo::Paragraph;
+ g_secType = SectionType::Paragraph;
BEGIN(St_SecLabel2);
}
<St_Sections>{CMD}"verbatim"/[^a-z_A-Z0-9] {
@@ -1296,6 +1299,14 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
g_endMarker="endlatexonly";
BEGIN(St_SecSkip);
}
+<St_Sections>{CMD}"manonly"/[^a-z_A-Z0-9] {
+ g_endMarker="endmanonly";
+ BEGIN(St_SecSkip);
+ }
+<St_Sections>{CMD}"rtfonly"/[^a-z_A-Z0-9] {
+ g_endMarker="endrtfonly";
+ BEGIN(St_SecSkip);
+ }
<St_Sections>{CMD}"xmlonly"/[^a-z_A-Z0-9] {
g_endMarker="endxmlonly";
BEGIN(St_SecSkip);
diff --git a/src/dotfilepatcher.cpp b/src/dotfilepatcher.cpp
index efc6341..7a65d89 100644
--- a/src/dotfilepatcher.cpp
+++ b/src/dotfilepatcher.cpp
@@ -173,7 +173,7 @@ static QCString replaceRef(const QCString &buf,const QCString relPath,
QCString url = link.mid(marker+1);
if (!ref.isEmpty())
{
- result = externalLinkTarget();
+ result = externalLinkTarget(true);
if (result != "") setTarget = TRUE;
}
result+= href+"=\"";
diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp
index fbfeaca..22a113a 100644
--- a/src/dotrunner.cpp
+++ b/src/dotrunner.cpp
@@ -114,7 +114,7 @@ static bool resetPDFSize(const int width,const int height, const char *base)
bool DotRunner::readBoundingBox(const char *fileName,int *width,int *height,bool isEps)
{
const char *bb = isEps ? "%%PageBoundingBox:" : "/MediaBox [";
- int bblen = strlen(bb);
+ int bblen = (int)strlen(bb);
FILE *f = Portable::fopen(fileName,"rb");
if (!f)
{
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 6388ce3..6a0f228 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -87,6 +87,7 @@
#include "portable.h"
#include "vhdljjparser.h"
#include "vhdldocgen.h"
+#include "vhdlcode.h"
#include "eclipsehelp.h"
#include "cite.h"
#include "markdown.h"
@@ -125,13 +126,8 @@ MemberNameSDict *Doxygen::functionNameSDict = 0;
FileNameList *Doxygen::inputNameList = 0; // all input files
FileNameDict *Doxygen::inputNameDict = 0;
GroupSDict *Doxygen::groupSDict = 0;
-FormulaList *Doxygen::formulaList = 0; // all formulas
-FormulaDict *Doxygen::formulaDict = 0; // all formulas
-FormulaDict *Doxygen::formulaNameDict = 0; // the label name of all formulas
PageSDict *Doxygen::pageSDict = 0;
PageSDict *Doxygen::exampleSDict = 0;
-SectionDict *Doxygen::sectionDict = 0; // all page sections
-CiteDict *Doxygen::citeDict=0; // database of bibliographic references
StringDict Doxygen::aliasDict(257); // aliases
QDict<void> Doxygen::inputPaths(1009);
FileNameDict *Doxygen::includeNameDict = 0; // include names
@@ -147,7 +143,6 @@ QIntDict<MemberGroupInfo> Doxygen::memGrpInfoDict(1009); // dictionary of the me
PageDef *Doxygen::mainPage = 0;
bool Doxygen::insideMainPage = FALSE; // are we generating docs for the main page?
NamespaceDef *Doxygen::globalScope = 0;
-QDict<RefList> *Doxygen::xrefLists = new QDict<RefList>; // dictionary of cross-referenced item lists
bool Doxygen::parseSourcesNeeded = FALSE;
QTime Doxygen::runningTime;
SearchIndexIntf *Doxygen::searchIndex=0;
@@ -165,7 +160,6 @@ bool Doxygen::suppressDocWarnings = FALSE;
QCString Doxygen::objDBFileName;
QCString Doxygen::entryDBFileName;
QCString Doxygen::filterDBFileName;
-bool Doxygen::gatherDefines = TRUE;
IndexList *Doxygen::indexList;
int Doxygen::subpageNestingLevel = 0;
bool Doxygen::userComments = FALSE;
@@ -173,7 +167,6 @@ QCString Doxygen::spaces;
bool Doxygen::generatingXmlOutput = FALSE;
bool Doxygen::markdownSupport = TRUE;
GenericsSDict *Doxygen::genericsDict;
-DocGroup Doxygen::docGroup;
Preprocessor *Doxygen::preprocessor = 0;
// locally accessible globals
@@ -197,8 +190,6 @@ void clearAll()
Doxygen::pageSDict->clear();
Doxygen::exampleSDict->clear();
Doxygen::inputNameList->clear();
- Doxygen::formulaList->clear();
- Doxygen::sectionDict->clear();
Doxygen::inputNameDict->clear();
Doxygen::includeNameDict->clear();
Doxygen::exampleNameDict->clear();
@@ -206,11 +197,11 @@ void clearAll()
Doxygen::dotFileNameDict->clear();
Doxygen::mscFileNameDict->clear();
Doxygen::diaFileNameDict->clear();
- Doxygen::formulaDict->clear();
- Doxygen::formulaNameDict->clear();
Doxygen::tagDestinationDict.clear();
- delete Doxygen::citeDict;
+ SectionManager::instance().clear();
+ CitationManager::instance().clear();
delete Doxygen::mainPage; Doxygen::mainPage=0;
+ FormulaManager::instance().clear();
}
class Statistics
@@ -281,10 +272,6 @@ void statistics()
fprintf(stderr,"--- typedefDict stats ----\n");
fprintf(stderr,"--- namespaceAliasDict stats ----\n");
Doxygen::namespaceAliasDict.statistics();
- fprintf(stderr,"--- formulaDict stats ----\n");
- Doxygen::formulaDict->statistics();
- fprintf(stderr,"--- formulaNameDict stats ----\n");
- Doxygen::formulaNameDict->statistics();
fprintf(stderr,"--- tagDestinationDict stats ----\n");
Doxygen::tagDestinationDict.statistics();
fprintf(stderr,"--- g_compoundKeywordDict stats ----\n");
@@ -2039,7 +2026,7 @@ static MemberDef *addVariableToClass(
}
else
{
- def=type+" "+name+root->args;
+ def=type+" "+name+args;
}
}
else
@@ -2612,11 +2599,13 @@ static void addVariable(const Entry *root,int isFuncPtr=-1)
type=name;
static const QRegExp reName("[a-z_A-Z][a-z_A-Z0-9]*");
int l=0;
+ int j=0;
int i=args.isEmpty() ? -1 : reName.match(args,0,&l);
if (i!=-1)
{
name=args.mid(i,l);
- args=args.mid(i+l,args.find(')',i+l)-i-l);
+ j=args.find(')',i+l)-i-l;
+ if (j >= 0) args=args.mid(i+l,j);
}
//printf("new: type='%s' name='%s' args='%s'\n",
// type.data(),name.data(),args.data());
@@ -3724,7 +3713,7 @@ static void transferFunctionDocumentation()
MemberNameIterator mni2(*mn);
for (;(mdef=mni2.current());++mni2)
{
- if (mdec!=mdef && !mdec->isAlias() && !mdef->isAlias())
+ if (mdec!=mdef && mdec->getNamespaceDef()==mdef->getNamespaceDef() && !mdec->isAlias() && !mdef->isAlias())
{
combineDeclarationAndDefinition(mdec,mdef);
}
@@ -4965,7 +4954,7 @@ static void addListReferences()
name = pd->getGroupDef()->getOutputFileBase();
}
{
- const std::vector<ListItemInfo> &xrefItems = pd->xrefListItems();
+ const std::vector<RefItem*> &xrefItems = pd->xrefListItems();
addRefItem(xrefItems,
name,
theTranslator->trPage(TRUE,TRUE),
@@ -4982,7 +4971,7 @@ static void addListReferences()
//{
// name = dd->getGroupDef()->getOutputFileBase();
//}
- const std::vector<ListItemInfo> &xrefItems = dd->xrefListItems();
+ const std::vector<RefItem*> &xrefItems = dd->xrefListItems();
addRefItem(xrefItems,
name,
theTranslator->trDir(TRUE,TRUE),
@@ -4994,9 +4983,7 @@ static void addListReferences()
static void generateXRefPages()
{
- QDictIterator<RefList> di(*Doxygen::xrefLists);
- RefList *rl;
- for (di.toFirst();(rl=di.current());++di)
+ for (RefListManager::Ptr &rl : RefListManager::instance())
{
rl->generatePage();
}
@@ -5890,7 +5877,6 @@ static void findMember(const Entry *root,
bool matching=
md->isVariable() || md->isTypedef() || // needed for function pointers
- (mdAl.empty() && root->argList.empty()) ||
matchArguments2(
md->getClassDef(),md->getFileDef(),argList,
cd,fd,root->argList,
@@ -8518,30 +8504,32 @@ static void findMainPage(Entry *root)
Doxygen::mainPage->setLocalToc(root->localToc);
addPageToContext(Doxygen::mainPage,root);
- SectionInfo *si = Doxygen::sectionDict->find(Doxygen::mainPage->name());
+ const SectionInfo *si = SectionManager::instance().find(Doxygen::mainPage->name());
if (si)
{
- if (si->lineNr != -1)
+ if (si->lineNr() != -1)
{
- warn(root->fileName,root->startLine,"multiple use of section label '%s' for main page, (first occurrence: %s, line %d)",Doxygen::mainPage->name().data(),si->fileName.data(),si->lineNr);
+ warn(root->fileName,root->startLine,"multiple use of section label '%s' for main page, (first occurrence: %s, line %d)",
+ Doxygen::mainPage->name().data(),si->fileName().data(),si->lineNr());
}
else
{
- warn(root->fileName,root->startLine,"multiple use of section label '%s' for main page, (first occurrence: %s)",Doxygen::mainPage->name().data(),si->fileName.data());
+ warn(root->fileName,root->startLine,"multiple use of section label '%s' for main page, (first occurrence: %s)",
+ Doxygen::mainPage->name().data(),si->fileName().data());
}
}
else
{
// a page name is a label as well! but should no be double either
- si=new SectionInfo(
- indexName, root->startLine,
+ SectionManager::instance().add(
Doxygen::mainPage->name(),
+ indexName,
+ root->startLine,
Doxygen::mainPage->title(),
- SectionInfo::Page,
+ SectionType::Page,
0); // level 0
- Doxygen::sectionDict->append(indexName,si);
- Doxygen::mainPage->addSectionsToDefinition(root->anchors);
}
+ Doxygen::mainPage->addSectionsToDefinition(root->anchors);
}
else if (root->tagInfo()==0)
{
@@ -8624,9 +8612,7 @@ static void checkPageRelations()
static void resolveUserReferences()
{
- SDict<SectionInfo>::Iterator sdi(*Doxygen::sectionDict);
- SectionInfo *si;
- for (;(si=sdi.current());++sdi)
+ for (auto &si : SectionManager::instance())
{
//printf("si->label='%s' si->definition=%s si->fileName='%s'\n",
// si->label.data(),si->definition?si->definition->name().data():"<none>",
@@ -8638,44 +8624,42 @@ static void resolveUserReferences()
// name (not from the todo/test/bug/deprecated list, but from the file in
// which they are defined). We correct this here by looking at the
// generated section labels!
- QDictIterator<RefList> rli(*Doxygen::xrefLists);
- RefList *rl;
- for (rli.toFirst();(rl=rli.current());++rli)
+ for (const RefListManager::Ptr &rl : RefListManager::instance())
{
QCString label="_"+rl->listName(); // "_todo", "_test", ...
- if (si->label.left(label.length())==label)
+ if (si->label().left(label.length())==label)
{
- si->fileName=rl->listName();
- si->generated=TRUE;
+ si->setFileName(rl->listName());
+ si->setGenerated(TRUE);
break;
}
}
//printf("start: si->label=%s si->fileName=%s\n",si->label.data(),si->fileName.data());
- if (!si->generated)
+ if (!si->generated())
{
// if this section is in a page and the page is in a group, then we
// have to adjust the link file name to point to the group.
- if (!si->fileName.isEmpty() &&
- (pd=Doxygen::pageSDict->find(si->fileName)) &&
+ if (!si->fileName().isEmpty() &&
+ (pd=Doxygen::pageSDict->find(si->fileName())) &&
pd->getGroupDef())
{
- si->fileName=pd->getGroupDef()->getOutputFileBase().copy();
+ si->setFileName(pd->getGroupDef()->getOutputFileBase());
}
- if (si->definition)
+ if (si->definition())
{
// TODO: there should be one function in Definition that returns
// the file to link to, so we can avoid the following tests.
const GroupDef *gd=0;
- if (si->definition->definitionType()==Definition::TypeMember)
+ if (si->definition()->definitionType()==Definition::TypeMember)
{
- gd = (dynamic_cast<MemberDef *>(si->definition))->getGroupDef();
+ gd = (dynamic_cast<MemberDef *>(si->definition()))->getGroupDef();
}
if (gd)
{
- si->fileName=gd->getOutputFileBase().copy();
+ si->setFileName(gd->getOutputFileBase());
}
else
{
@@ -9574,66 +9558,6 @@ int readFileOrDirectory(const char *s,
//----------------------------------------------------------------------------
-void readFormulaRepository(QCString dir, bool cmp)
-{
- static int current_repository = 0;
- int new_repository = 0;
- QFile f(dir+"/formula.repository");
- if (f.open(IO_ReadOnly)) // open repository
- {
- msg("Reading formula repository...\n");
- QTextStream t(&f);
- QCString line;
- Formula *f;
- while (!t.eof())
- {
- line=t.readLine().utf8();
- int se=line.find(':'); // find name and text separator.
- if (se==-1)
- {
- warn_uncond("formula.repository is corrupted!\n");
- break;
- }
- else
- {
- QCString formName = line.left(se);
- QCString formText = line.right(line.length()-se-1);
- if (cmp)
- {
- if ((f=Doxygen::formulaDict->find(formText))==0)
- {
- term("discrepancy between formula repositories! Remove "
- "formula.repository and from_* files from output directories.");
- }
- QCString formLabel;
- formLabel.sprintf("\\_form#%d",f->getId());
- if (formLabel != formName)
- {
- term("discrepancy between formula repositories! Remove "
- "formula.repository and from_* files from output directories.");
- }
- new_repository++;
- }
- else
- {
- f=new Formula(formText);
- Doxygen::formulaList->append(f);
- Doxygen::formulaDict->insert(formText,f);
- Doxygen::formulaNameDict->insert(formName,f);
- current_repository++;
- }
- }
- }
- }
- if (cmp && (current_repository != new_repository))
- {
- term("size discrepancy between formula repositories! Remove "
- "formula.repository and from_* files from output directories.");
- }
-}
-
-//----------------------------------------------------------------------------
-
static void expandAliases()
{
QDictIterator<QCString> adi(Doxygen::aliasDict);
@@ -9930,15 +9854,8 @@ void initDoxygen()
Doxygen::memGrpInfoDict.setAutoDelete(TRUE);
Doxygen::tagDestinationDict.setAutoDelete(TRUE);
Doxygen::dirRelations.setAutoDelete(TRUE);
- Doxygen::citeDict = new CiteDict(257);
Doxygen::genericsDict = new GenericsSDict;
Doxygen::indexList = new IndexList;
- Doxygen::formulaList = new FormulaList;
- Doxygen::formulaList->setAutoDelete(TRUE);
- Doxygen::formulaDict = new FormulaDict(1009);
- Doxygen::formulaNameDict = new FormulaDict(1009);
- Doxygen::sectionDict = new SectionDict(257);
- Doxygen::sectionDict->setAutoDelete(TRUE);
// initialisation of these globals depends on
// configuration switches so we need to postpone these
@@ -9966,10 +9883,9 @@ void initDoxygen()
void cleanUpDoxygen()
{
- delete Doxygen::sectionDict;
- delete Doxygen::formulaNameDict;
- delete Doxygen::formulaDict;
- delete Doxygen::formulaList;
+ FormulaManager::instance().clear();
+ SectionManager::instance().clear();
+
delete Doxygen::indexList;
delete Doxygen::genericsDict;
delete Doxygen::inputNameDict;
@@ -9983,7 +9899,6 @@ void cleanUpDoxygen()
delete Doxygen::pageSDict;
delete Doxygen::exampleSDict;
delete Doxygen::globalScope;
- delete Doxygen::xrefLists;
delete Doxygen::parserManager;
delete Doxygen::preprocessor;
delete theTranslator;
@@ -10472,8 +10387,6 @@ void adjustConfiguration()
Doxygen::htmlFileExtension = Config_getString(HTML_FILE_EXTENSION);
- Doxygen::xrefLists->setAutoDelete(TRUE);
-
Doxygen::parseSourcesNeeded = Config_getBool(CALL_GRAPH) ||
Config_getBool(CALLER_GRAPH) ||
Config_getBool(REFERENCES_RELATION) ||
@@ -11034,18 +10947,22 @@ void parseInput()
if (Config_getBool(GENERATE_HTML) && !Config_getBool(USE_MATHJAX))
{
- readFormulaRepository(Config_getString(HTML_OUTPUT));
+ FormulaManager::instance().readFormulas(Config_getString(HTML_OUTPUT));
}
if (Config_getBool(GENERATE_RTF))
{
// in case GENERRATE_HTML is set we just have to compare, both repositories should be identical
- readFormulaRepository(Config_getString(RTF_OUTPUT),Config_getBool(GENERATE_HTML) && !Config_getBool(USE_MATHJAX));
+ FormulaManager::instance().readFormulas(Config_getString(RTF_OUTPUT),
+ Config_getBool(GENERATE_HTML) &&
+ !Config_getBool(USE_MATHJAX));
}
if (Config_getBool(GENERATE_DOCBOOK))
{
// in case GENERRATE_HTML is set we just have to compare, both repositories should be identical
- readFormulaRepository(Config_getString(DOCBOOK_OUTPUT),
- (Config_getBool(GENERATE_HTML) && !Config_getBool(USE_MATHJAX)) || Config_getBool(GENERATE_RTF));
+ FormulaManager::instance().readFormulas(Config_getString(DOCBOOK_OUTPUT),
+ (Config_getBool(GENERATE_HTML) &&
+ !Config_getBool(USE_MATHJAX)) ||
+ Config_getBool(GENERATE_RTF));
}
/**************************************************************************
@@ -11073,10 +10990,6 @@ void parseInput()
parseFiles(root);
g_s.end();
- // we are done with input scanning now, so free up the buffers used by flex
- // (can be around 4MB)
- pyscanFreeScanner();
-
/**************************************************************************
* Gather information *
**************************************************************************/
@@ -11325,11 +11238,8 @@ void parseInput()
g_s.end();
}
- //g_s.begin("Resolving citations...\n");
- //Doxygen::citeDict->resolve();
-
g_s.begin("Generating citations page...\n");
- Doxygen::citeDict->generatePage();
+ CitationManager::instance().generatePage();
g_s.end();
g_s.begin("Counting members...\n");
@@ -11479,6 +11389,29 @@ void generateOutput()
}
g_s.end();
+ const FormulaManager &fm = FormulaManager::instance();
+ if (fm.hasFormulas() && generateHtml
+ && !Config_getBool(USE_MATHJAX))
+ {
+ g_s.begin("Generating images for formulas in HTML...\n");
+ fm.generateImages(Config_getString(HTML_OUTPUT), Config_getEnum(HTML_FORMULA_FORMAT)=="svg" ?
+ FormulaManager::Format::Vector : FormulaManager::Format::Bitmap, FormulaManager::HighDPI::On);
+ g_s.end();
+ }
+ if (fm.hasFormulas() && generateRtf)
+ {
+ g_s.begin("Generating images for formulas in RTF...\n");
+ fm.generateImages(Config_getString(RTF_OUTPUT),FormulaManager::Format::Bitmap);
+ g_s.end();
+ }
+
+ if (fm.hasFormulas() && generateDocbook)
+ {
+ g_s.begin("Generating images for formulas in Docbook...\n");
+ fm.generateImages(Config_getString(DOCBOOK_OUTPUT),FormulaManager::Format::Bitmap);
+ g_s.end();
+ }
+
g_s.begin("Generating example documentation...\n");
generateExampleDocs();
g_s.end();
@@ -11518,27 +11451,6 @@ void generateOutput()
generateDirDocs(*g_outputList);
g_s.end();
- if (Doxygen::formulaList->count()>0 && generateHtml
- && !Config_getBool(USE_MATHJAX))
- {
- g_s.begin("Generating bitmaps for formulas in HTML...\n");
- Doxygen::formulaList->generateBitmaps(Config_getString(HTML_OUTPUT));
- g_s.end();
- }
- if (Doxygen::formulaList->count()>0 && generateRtf)
- {
- g_s.begin("Generating bitmaps for formulas in RTF...\n");
- Doxygen::formulaList->generateBitmaps(Config_getString(RTF_OUTPUT));
- g_s.end();
- }
-
- if (Doxygen::formulaList->count()>0 && generateDocbook)
- {
- g_s.begin("Generating bitmaps for formulas in Docbook...\n");
- Doxygen::formulaList->generateBitmaps(Config_getString(DOCBOOK_OUTPUT));
- g_s.end();
- }
-
if (Config_getBool(SORT_GROUP_NAMES))
{
Doxygen::groupSDict->sort();
diff --git a/src/doxygen.h b/src/doxygen.h
index a23a678..635ac1d 100644
--- a/src/doxygen.h
+++ b/src/doxygen.h
@@ -27,7 +27,6 @@
#include "membergroup.h"
#include "dirdef.h"
#include "memberlist.h"
-#include "docgroup.h"
class RefList;
class PageSList;
@@ -59,7 +58,6 @@ class IndexList;
class FormulaList;
class FormulaDict;
class FormulaNameDict;
-class SectionDict;
class Preprocessor;
struct MemberGroupInfo;
@@ -113,19 +111,14 @@ class Doxygen
static QStrList tagfileList;
static MemberNameSDict *memberNameSDict;
static MemberNameSDict *functionNameSDict;
- static SectionDict *sectionDict;
static StringDict namespaceAliasDict;
static GroupSDict *groupSDict;
static NamespaceSDict *namespaceSDict;
- static FormulaList *formulaList;
- static FormulaDict *formulaDict;
- static FormulaDict *formulaNameDict;
static StringDict tagDestinationDict;
static StringDict aliasDict;
static QIntDict<MemberGroupInfo> memGrpInfoDict;
static QDict<void> expandAsDefinedDict;
static NamespaceDef *globalScope;
- static QDict<RefList> *xrefLists; // array of xref lists: todo, test, bug, deprecated ...
static QCString htmlFileExtension;
static bool parseSourcesNeeded;
static QTime runningTime;
@@ -143,8 +136,6 @@ class Doxygen
static QCString objDBFileName;
static QCString entryDBFileName;
static QCString filterDBFileName;
- static CiteDict *citeDict;
- static bool gatherDefines;
static bool userComments;
static IndexList *indexList;
static int subpageNestingLevel;
@@ -152,7 +143,6 @@ class Doxygen
static bool generatingXmlOutput;
static bool markdownSupport;
static GenericsSDict *genericsDict;
- static DocGroup docGroup;
static Preprocessor *preprocessor;
};
diff --git a/src/entry.cpp b/src/entry.cpp
index cc8cd1f..706488b 100644
--- a/src/entry.cpp
+++ b/src/entry.cpp
@@ -169,21 +169,6 @@ void Entry::copyToSubEntry(const std::shared_ptr<Entry> &current)
m_sublist.push_back(copy);
}
-void Entry::moveFromSubEntry(const Entry *child,std::shared_ptr<Entry> &moveTo)
-{
- auto it = std::find_if(m_sublist.begin(),m_sublist.end(),
- [child](const std::shared_ptr<Entry>&elem) { return elem.get()==child; });
- if (it!=m_sublist.end())
- {
- moveTo = *it;
- m_sublist.erase(it);
- }
- else
- {
- moveTo.reset();
- }
-}
-
void Entry::removeSubEntry(const Entry *e)
{
auto it = std::find_if(m_sublist.begin(),m_sublist.end(),
@@ -270,13 +255,4 @@ void Entry::setFileDef(FileDef *fd)
}
}
-void Entry::addSpecialListItem(const char *listName,int itemId)
-{
- ListItemInfo ili;
- ili.type = listName;
- ili.itemId = itemId;
- sli.push_back(ili);
-}
-
-
//------------------------------------------------------------------
diff --git a/src/entry.h b/src/entry.h
index 0391075..abd0a89 100644
--- a/src/entry.h
+++ b/src/entry.h
@@ -26,10 +26,10 @@
#include "types.h"
#include "arguments.h"
-struct SectionInfo;
+class SectionInfo;
class QFile;
class FileDef;
-struct ListItemInfo;
+class RefItem;
/** This class stores information about an inheritance relation
*/
@@ -194,8 +194,6 @@ class Entry
Entry(const Entry &);
~Entry();
- void addSpecialListItem(const char *listName,int index);
-
/*! Returns the parent for this Entry or 0 if this entry has no parent. */
Entry *parent() const { return m_parent; }
@@ -216,9 +214,6 @@ class Entry
void moveToSubEntryAndRefresh(Entry* &e);
void moveToSubEntryAndRefresh(std::shared_ptr<Entry> &e);
- /*! take \a child of of to list of children and move it into \a moveTo */
- void moveFromSubEntry(const Entry *child,std::shared_ptr<Entry> &moveTo);
-
/*! make a copy of \a e and add it as a child to this entry */
void copyToSubEntry (Entry* e);
void copyToSubEntry (const std::shared_ptr<Entry> &e);
@@ -292,7 +287,7 @@ class Entry
QCString fileName; //!< file this entry was extracted from
int startLine; //!< start line of entry in the source
int startColumn; //!< start column of entry in the source
- std::vector<ListItemInfo> sli; //!< special lists (test/todo/bug/deprecated/..) this entry is in
+ std::vector<RefItem*> sli; //!< special lists (test/todo/bug/deprecated/..) this entry is in
SrcLangExt lang; //!< programming language in which this entry was found
bool hidden; //!< does this represent an entity that is hidden from the output
bool artificial; //!< Artificially introduced item
@@ -337,4 +332,6 @@ class Entry
FileDef *m_fileDef;
};
+typedef std::vector< std::shared_ptr<Entry> > EntryList;
+
#endif
diff --git a/src/filedef.cpp b/src/filedef.cpp
index fb0e290..a60f4d8 100644
--- a/src/filedef.cpp
+++ b/src/filedef.cpp
@@ -1682,7 +1682,7 @@ bool FileDefImpl::generateSourceFile() const
void FileDefImpl::addListReferences()
{
{
- const std::vector<ListItemInfo> &xrefItems = xrefListItems();
+ const std::vector<RefItem*> &xrefItems = xrefListItems();
addRefItem(xrefItems,
getOutputFileBase(),
theTranslator->trFile(TRUE,TRUE),
diff --git a/src/formula.cpp b/src/formula.cpp
index 64555c9..de004ed 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -1,7 +1,6 @@
/******************************************************************************
- *
*
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2020 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -14,41 +13,135 @@
*
*/
-#include <stdlib.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qtextstream.h>
-#include <qdir.h>
-
#include "formula.h"
-#include "image.h"
-#include "util.h"
#include "message.h"
#include "config.h"
-#include "portable.h"
-#include "index.h"
-#include "doxygen.h"
#include "ftextstream.h"
+#include "util.h"
+#include "portable.h"
+#include "image.h"
+
+#include <qfile.h>
+#include <qtextstream.h>
+#include <qdir.h>
+
+#include <map>
+#include <vector>
+#include <string>
+#include <utility>
+
+// TODO: remove these dependencies
+#include "doxygen.h" // for Doxygen::indexList
+#include "index.h" // for Doxygen::indexList
-Formula::Formula(const char *text)
+// Remove the temporary files
+#define RM_TMP_FILES (true)
+//#define RM_TMP_FILES (false)
+
+struct FormulaManager::Private
+{
+ void storeDisplaySize(int id,int w,int h)
+ {
+ displaySizeMap.insert(std::make_pair(id,DisplaySize(w,h)));
+ }
+ DisplaySize getDisplaySize(int id)
+ {
+ auto it = displaySizeMap.find(id);
+ if (it!=displaySizeMap.end())
+ {
+ return it->second;
+ }
+ return DisplaySize(-1,-1);
+ }
+ std::vector<std::string> formulas;
+ std::map<std::string,int> formulaMap;
+ std::map<int,DisplaySize> displaySizeMap;
+};
+
+FormulaManager::FormulaManager() : p(new Private)
{
- static int count=0;
- number = count++;
- form=text;
}
-Formula::~Formula()
+FormulaManager &FormulaManager::instance()
{
+ static FormulaManager fm;
+ return fm;
}
-int Formula::getId()
+void FormulaManager::readFormulas(const char *dir,bool doCompare)
{
- return number;
+ QFile f(QCString(dir)+"/formula.repository");
+ if (f.open(IO_ReadOnly)) // open repository
+ {
+ int formulaCount=0;
+ msg("Reading formula repository...\n");
+ QTextStream t(&f);
+ QCString line;
+ int lineNr=1;
+ while (!t.eof())
+ {
+ line=t.readLine().utf8();
+ // old format: \_form#<digits>:formula
+ // new format: \_form#<digits>=<digits>x<digits>:formula
+ int hi=line.find('#');
+ int ei=line.find('=');
+ int se=line.find(':'); // find name and text separator.
+ if (hi==-1 || se==-1 || hi>se)
+ {
+ warn_uncond("%s/formula.repository is corrupted at line %d!\n",dir,lineNr);
+ break;
+ }
+ else
+ {
+ QCString formName = line.left(se);
+ QCString formText = line.right(line.length()-se-1);
+ int w=-1,h=-1;
+ if (ei!=-1 && ei>hi && ei<se) // new format
+ {
+ int xi=formName.find('x',hi);
+ if (xi!=-1)
+ {
+ w=formName.mid(hi+1,xi-hi-1).toInt();
+ h=formName.mid(xi+1).toInt();
+ }
+ formName = formName.left(ei);
+ }
+ else
+ {
+ ei=formName.length();
+ }
+ if (doCompare)
+ {
+ int formId = formName.mid(hi+1,ei-hi-1).toInt();
+ QCString storedFormText = FormulaManager::instance().findFormula(formId);
+ if (storedFormText!=formText)
+ {
+ term("discrepancy between formula repositories! Remove "
+ "formula.repository and from_* files from output directories.\n");
+ }
+ formulaCount++;
+ }
+ else
+ {
+ int id = addFormula(formText);
+ if (w!=-1 && h!=-1)
+ {
+ p->storeDisplaySize(id,w,h);
+ }
+ }
+ }
+ lineNr++;
+ }
+ if (doCompare && formulaCount!=p->formulas.size())
+ {
+ term("size discrepancy between formula repositories! Remove "
+ "formula.repository and from_* files from output directories.\n");
+ }
+ }
}
-void FormulaList::generateBitmaps(const char *path)
+void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) const
{
- int x1,y1,x2,y2;
QDir d(path);
// store the original directory
if (!d.exists())
@@ -70,10 +163,7 @@ void FormulaList::generateBitmaps(const char *path)
QDir thisDir;
// generate a latex file containing one formula per page.
QCString texName="_formulas.tex";
- QList<int> pagesToGenerate;
- pagesToGenerate.setAutoDelete(TRUE);
- FormulaListIterator fli(*this);
- Formula *formula;
+ std::vector<int> formulasToGenerate;
QFile f(texName);
bool formulaError=FALSE;
if (f.open(IO_WriteOnly))
@@ -93,32 +183,32 @@ void FormulaList::generateBitmaps(const char *path)
}
t << "\\pagestyle{empty}" << endl;
t << "\\begin{document}" << endl;
- int page=0;
- for (fli.toFirst();(formula=fli.current());++fli)
+ for (int i=0; i<(int)p->formulas.size(); i++)
{
QCString resultName;
- resultName.sprintf("form_%d.png",formula->getId());
+ resultName.sprintf("form_%d.%s",i,format==Format::Vector?"svg":"png");
// only formulas for which no image exists are generated
QFileInfo fi(resultName);
if (!fi.exists())
{
// we force a pagebreak after each formula
- t << formula->getFormulaText() << endl << "\\pagebreak\n\n";
- pagesToGenerate.append(new int(page));
+ t << p->formulas[i].c_str() << endl << "\\pagebreak\n\n";
+ formulasToGenerate.push_back(i);
}
Doxygen::indexList->addImageFile(resultName);
- page++;
}
t << "\\end{document}" << endl;
f.close();
}
- if (pagesToGenerate.count()>0) // there are new formulas
+ if (!formulasToGenerate.empty()) // there are new formulas
{
//printf("Running latex...\n");
//system("latex _formulas.tex </dev/null >/dev/null");
QCString latexCmd = "latex";
Portable::sysTimerStart();
- if (Portable::system(latexCmd,"_formulas.tex")!=0)
+ char args[4096];
+ sprintf(args,"-interaction=batchmode _formulas.tex >%s",Portable::devNull());
+ if (Portable::system(latexCmd,args)!=0)
{
err("Problems running latex. Check your installation or look "
"for typos in _formulas.tex and check _formulas.log!\n");
@@ -127,23 +217,18 @@ void FormulaList::generateBitmaps(const char *path)
}
Portable::sysTimerStop();
//printf("Running dvips...\n");
- QListIterator<int> pli(pagesToGenerate);
- int *pagePtr;
int pageIndex=1;
- for (;(pagePtr=pli.current());++pli,++pageIndex)
+ for (int pageNum : formulasToGenerate)
{
- int pageNum=*pagePtr;
msg("Generating image form_%d.png for formula\n",pageNum);
- char dviArgs[4096];
- char psArgs[4096];
QCString formBase;
formBase.sprintf("_form%d",pageNum);
// run dvips to convert the page with number pageIndex to an
// postscript file.
- sprintf(dviArgs,"-q -D 600 -n 1 -p %d -o %s_tmp.ps _formulas.dvi",
+ sprintf(args,"-q -D 600 -n 1 -p %d -o %s_tmp.ps _formulas.dvi",
pageIndex,formBase.data());
Portable::sysTimerStart();
- if (Portable::system("dvips",dviArgs)!=0)
+ if (Portable::system("dvips",args)!=0)
{
err("Problems running dvips. Check your installation!\n");
Portable::sysTimerStop();
@@ -151,179 +236,199 @@ void FormulaList::generateBitmaps(const char *path)
return;
}
Portable::sysTimerStop();
- // run ps2epsi to convert to an encapsulated postscript file with
- // boundingbox (dvips with -E has some problems here).
- sprintf(psArgs,"%s_tmp.ps %s.eps",formBase.data(),formBase.data());
+
+ // extract the bounding box for the postscript file
+ sprintf(args,"-q -dBATCH -dNOPAUSE -P- -dNOSAFER -sDEVICE=bbox %s_tmp.ps 2>%s_tmp.epsi",
+ formBase.data(),formBase.data());
Portable::sysTimerStart();
- if (Portable::system("ps2epsi",psArgs)!=0)
+ if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
- err("Problems running ps2epsi. Check your installation!\n");
+ err("Problems running %s. Check your installation!\n",Portable::ghostScriptCommand());
Portable::sysTimerStop();
QDir::setCurrent(oldDir);
return;
}
Portable::sysTimerStop();
- // now we read the generated postscript file to extract the bounding box
- QFileInfo fi(formBase+".eps");
+
+ // extract the bounding box info from the generate .epsi file
+ int x1=0,y1=0,x2=0,y2=0;
+ QFileInfo fi(formBase+"_tmp.epsi");
if (fi.exists())
{
- QCString eps = fileToString(formBase+".eps");
- int i=eps.find("%%BoundingBox:");
+ QString eps = fileToString(formBase+"_tmp.epsi");
+ int i = eps.find("%%BoundingBox:");
if (i!=-1)
{
sscanf(eps.data()+i,"%%%%BoundingBox:%d %d %d %d",&x1,&y1,&x2,&y2);
}
else
{
- err("Couldn't extract bounding box!\n");
+ err("Couldn't extract bounding box from %s_tmp.epsi",formBase.data());
}
- }
- // next we generate a postscript file which contains the eps
- // and displays it in the right colors and the right bounding box
- f.setName(formBase+".ps");
- if (f.open(IO_WriteOnly))
- {
- FTextStream t(&f);
- t << "1 1 1 setrgbcolor" << endl; // anti-alias to white background
- t << "newpath" << endl;
- t << "-1 -1 moveto" << endl;
- t << (x2-x1+2) << " -1 lineto" << endl;
- t << (x2-x1+2) << " " << (y2-y1+2) << " lineto" << endl;
- t << "-1 " << (y2-y1+2) << " lineto" <<endl;
- t << "closepath" << endl;
- t << "fill" << endl;
- t << -x1 << " " << -y1 << " translate" << endl;
- t << "0 0 0 setrgbcolor" << endl;
- t << "(" << formBase << ".eps) run" << endl;
- f.close();
}
- // scale the image so that it is four times larger than needed.
- // and the sizes are a multiple of four.
- double scaleFactor = 16.0/3.0;
+ //printf("Bounding box [%d %d %d %d]\n",x1,y1,x2,y2);
+
+ // convert the corrected EPS to a bitmap
+ double scaleFactor = 1.25;
int zoomFactor = Config_getInt(FORMULA_FONTSIZE);
if (zoomFactor<8 || zoomFactor>50) zoomFactor=10;
scaleFactor *= zoomFactor/10.0;
- int gx = (((int)((x2-x1)*scaleFactor))+3)&~1;
- int gy = (((int)((y2-y1)*scaleFactor))+3)&~1;
- // Then we run ghostscript to convert the postscript to a pixmap
- // The pixmap is a truecolor image, where only black and white are
- // used.
- char gsArgs[4096];
- sprintf(gsArgs,"-q -g%dx%d -r%dx%d -sDEVICE=ppmraw "
- "-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -dNOSAFER %s.ps",
- gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72),
- formBase.data(),formBase.data()
- );
- Portable::sysTimerStart();
- if (Portable::system(Portable::ghostScriptCommand(),gsArgs)!=0)
+ int width = (int)((x2-x1)*scaleFactor+0.5f);
+ int height = (int)((y2-y1)*scaleFactor+0.5f);
+ p->storeDisplaySize(pageNum,width,height);
+
+ if (format==Format::Vector)
{
- err("Problem running ghostscript %s %s. Check your installation!\n",Portable::ghostScriptCommand(),gsArgs);
+ // crop the image to its bounding box
+ sprintf(args,"-q -dBATCH -dNOPAUSE -P- -dNOSAFER -sDEVICE=pdfwrite"
+ " -o %s_tmp.pdf -c \"[/CropBox [%d %d %d %d] /PAGES pdfmark\" -f %s_tmp.ps",
+ formBase.data(),x1,y1,x2,y2,formBase.data());
+ Portable::sysTimerStart();
+ if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
+ {
+ err("Problems running %s. Check your installation!\n",Portable::ghostScriptCommand());
+ Portable::sysTimerStop();
+ QDir::setCurrent(oldDir);
+ return;
+ }
Portable::sysTimerStop();
- QDir::setCurrent(oldDir);
- return;
+
+ if (Portable::checkForExecutable("pdf2svg"))
+ {
+ sprintf(args,"%s_tmp.pdf form_%d.svg",formBase.data(),pageNum);
+ Portable::sysTimerStart();
+ if (Portable::system("pdf2svg",args)!=0)
+ {
+ err("Problems running pdf2svg. Check your installation!\n");
+ Portable::sysTimerStop();
+ QDir::setCurrent(oldDir);
+ return;
+ }
+ Portable::sysTimerStop();
+ }
+ else if (Portable::checkForExecutable("inkscape"))
+ {
+ sprintf(args,"-l form_%d.svg -z %s_tmp.pdf 2>%s",pageNum,formBase.data(),Portable::devNull());
+ Portable::sysTimerStart();
+ if (Portable::system("inkscape",args)!=0)
+ {
+ err("Problems running inkscape. Check your installation!\n");
+ Portable::sysTimerStop();
+ QDir::setCurrent(oldDir);
+ return;
+ }
+ Portable::sysTimerStop();
+ }
+ else
+ {
+ err("Neither 'pdf2svg' nor 'inkscape' present for conversion of formula to 'svg'\n");
+ return;
+ }
+
+ if (RM_TMP_FILES)
+ {
+ thisDir.remove(formBase+"_tmp.pdf");
+ }
}
- Portable::sysTimerStop();
- f.setName(formBase+".pnm");
- uint imageX=0,imageY=0;
- // we read the generated image again, to obtain the pixel data.
- if (f.open(IO_ReadOnly))
+ else // format==Format::Bitmap
{
- QTextStream t(&f);
- QCString s;
- if (!t.eof())
- s=t.readLine().utf8();
- if (s.length()<2 || s.left(2)!="P6")
- err("ghostscript produced an illegal image format!");
- else
+ // crop the image to its bounding box
+ sprintf(args,"-q -dBATCH -dNOPAUSE -P- -dNOSAFER -sDEVICE=eps2write"
+ " -o %s_tmp.eps -f %s_tmp.ps",formBase.data(),formBase.data());
+ Portable::sysTimerStart();
+ if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
{
- // assume the size is after the first line that does not start with
- // # excluding the first line of the file.
- while (!t.eof() && (s=t.readLine().utf8()) && !s.isEmpty() && s.at(0)=='#') { }
- sscanf(s,"%d %d",&imageX,&imageY);
+ err("Problems running %s. Check your installation!\n",Portable::ghostScriptCommand());
+ Portable::sysTimerStop();
+ QDir::setCurrent(oldDir);
+ return;
}
- if (imageX>0 && imageY>0)
+
+ // read back %s_tmp.eps and replace
+ // bounding box values with x1,y1,x2,y2 and remove the HiResBoundingBox
+ QFile epsIn(formBase+"_tmp.eps");
+ QFile epsOut(formBase+"_tmp_corr.eps");
+ if (epsIn.open(IO_ReadOnly) && epsOut.open(IO_WriteOnly))
{
- //printf("Converting image...\n");
- char *data = new char[imageX*imageY*3]; // rgb 8:8:8 format
- uint i,x,y,ix,iy;
- f.readBlock(data,imageX*imageY*3);
- Image srcImage(imageX,imageY),
- filteredImage(imageX,imageY),
- dstImage(imageX/4,imageY/4);
- uchar *ps=srcImage.getData();
- // convert image to black (1) and white (0) index.
- for (i=0;i<imageX*imageY;i++) *ps++= (data[i*3]==0 ? 1 : 0);
- // apply a simple box filter to the image
- static int filterMask[]={1,2,1,2,8,2,1,2,1};
- for (y=0;y<srcImage.getHeight();y++)
+ int maxLineLen=100*1024;
+ while (!epsIn.atEnd())
{
- for (x=0;x<srcImage.getWidth();x++)
+ QCString buf(maxLineLen);
+ FTextStream t(&epsOut);
+ int numBytes = epsIn.readLine(buf.rawData(),maxLineLen);
+ if (numBytes>0)
{
- int s=0;
- for (iy=0;iy<2;iy++)
+ buf.resize(numBytes+1);
+ if (buf.startsWith("%%BoundingBox"))
{
- for (ix=0;ix<2;ix++)
- {
- s+=srcImage.getPixel(x+ix-1,y+iy-1)*filterMask[iy*3+ix];
- }
+ t << "%%BoundingBox: " << x1 << " " << y1 << " " << x2 << " " << y2 << endl;
+ }
+ else if (buf.startsWith("%%HiResBoundingBox")) // skip this one
+ {
+ }
+ else
+ {
+ t << buf;
}
- filteredImage.setPixel(x,y,s);
- }
- }
- // down-sample the image to 1/16th of the area using 16 gray scale
- // colors.
- // TODO: optimize this code.
- for (y=0;y<dstImage.getHeight();y++)
- {
- for (x=0;x<dstImage.getWidth();x++)
- {
- int xp=x<<2;
- int yp=y<<2;
- int c=filteredImage.getPixel(xp+0,yp+0)+
- filteredImage.getPixel(xp+1,yp+0)+
- filteredImage.getPixel(xp+2,yp+0)+
- filteredImage.getPixel(xp+3,yp+0)+
- filteredImage.getPixel(xp+0,yp+1)+
- filteredImage.getPixel(xp+1,yp+1)+
- filteredImage.getPixel(xp+2,yp+1)+
- filteredImage.getPixel(xp+3,yp+1)+
- filteredImage.getPixel(xp+0,yp+2)+
- filteredImage.getPixel(xp+1,yp+2)+
- filteredImage.getPixel(xp+2,yp+2)+
- filteredImage.getPixel(xp+3,yp+2)+
- filteredImage.getPixel(xp+0,yp+3)+
- filteredImage.getPixel(xp+1,yp+3)+
- filteredImage.getPixel(xp+2,yp+3)+
- filteredImage.getPixel(xp+3,yp+3);
- // here we scale and clip the color value so the
- // resulting image has a reasonable contrast
- dstImage.setPixel(x,y,QMIN(15,(c*15)/(16*10)));
}
}
- // save the result as a bitmap
- QCString resultName;
- resultName.sprintf("form_%d.png",pageNum);
- // the option parameter 1 is used here as a temporary hack
- // to select the right color palette!
- dstImage.save(resultName,1);
- delete[] data;
+ epsIn.close();
+ epsOut.close();
}
- f.close();
- }
+ else
+ {
+ err("Problems correcting the eps files from %s_tmp.eps to %s_tmp_corr.eps\n",
+ formBase.data(),formBase.data());
+ QDir::setCurrent(oldDir);
+ return;
+ }
+
+ if (hd==HighDPI::On) // for high DPI display it looks much better if the
+ // image resolution is higher than the display resolution
+ {
+ scaleFactor*=2;
+ }
+
+ Portable::sysTimerStop();
+ sprintf(args,"-q -dNOSAFER -dBATCH -dNOPAUSE -dEPSCrop -sDEVICE=pnggray -dGraphicsAlphaBits=4 -dTextAlphaBits=4 "
+ "-r%d -sOutputFile=form_%d.png %s_tmp_corr.eps",(int)(scaleFactor*72),pageNum,formBase.data());
+ Portable::sysTimerStart();
+ if (Portable::system(Portable::ghostScriptCommand(),args)!=0)
+ {
+ err("Problems running %s. Check your installation!\n",Portable::ghostScriptCommand());
+ Portable::sysTimerStop();
+ QDir::setCurrent(oldDir);
+ return;
+ }
+ Portable::sysTimerStop();
+
+ if (RM_TMP_FILES)
+ {
+ thisDir.remove(formBase+"_tmp.eps");
+ thisDir.remove(formBase+"_tmp_corr.eps");
+ }
+ }
+
// remove intermediate image files
- thisDir.remove(formBase+"_tmp.ps");
- thisDir.remove(formBase+".eps");
- thisDir.remove(formBase+".pnm");
- thisDir.remove(formBase+".ps");
+ if (RM_TMP_FILES)
+ {
+ thisDir.remove(formBase+"_tmp.ps");
+ thisDir.remove(formBase+"_tmp.epsi");
+ }
+ pageIndex++;
}
// remove intermediate files produced by latex
- thisDir.remove("_formulas.dvi");
- if (!formulaError) thisDir.remove("_formulas.log"); // keep file in case of errors
- thisDir.remove("_formulas.aux");
+ if (RM_TMP_FILES)
+ {
+ thisDir.remove("_formulas.dvi");
+ if (!formulaError) thisDir.remove("_formulas.log"); // keep file in case of errors
+ thisDir.remove("_formulas.aux");
+ }
}
// remove the latex file itself
- if (!formulaError) thisDir.remove("_formulas.tex");
+ if (RM_TMP_FILES && !formulaError) thisDir.remove("_formulas.tex");
+
// write/update the formula repository so we know what text the
// generated images represent (we use this next time to avoid regeneration
// of the images, and to avoid forcing the user to delete all images in order
@@ -332,9 +437,15 @@ void FormulaList::generateBitmaps(const char *path)
if (f.open(IO_WriteOnly))
{
FTextStream t(&f);
- for (fli.toFirst();(formula=fli.current());++fli)
+ for (int i=0; i<(int)p->formulas.size(); i++)
{
- t << "\\_form#" << formula->getId() << ":" << formula->getFormulaText() << endl;
+ DisplaySize size = p->getDisplaySize(i);
+ t << "\\_form#" << i;
+ if (size.width!=-1 && size.height!=-1)
+ {
+ t << "=" << size.width << "x" << size.height;
+ }
+ t << ":" << p->formulas[i].c_str() << endl;
}
f.close();
}
@@ -342,15 +453,43 @@ void FormulaList::generateBitmaps(const char *path)
QDir::setCurrent(oldDir);
}
+void FormulaManager::clear()
+{
+ p->formulas.clear();
+ p->formulaMap.clear();
+}
+
+int FormulaManager::addFormula(const char *formulaText)
+{
+ std::string key = std::string(formulaText);
+ auto it = p->formulaMap.find(key);
+ if (it!=p->formulaMap.end()) // already stored
+ {
+ return it->second;
+ }
+ // store new formula
+ int id = p->formulas.size();
+ p->formulaMap.insert(std::pair<std::string,int>(key,id));
+ p->formulas.push_back(key);
+ return id;
+}
-#ifdef FORMULA_TEST
-int main()
+QCString FormulaManager::findFormula(int formulaId) const
{
- FormulaList fl;
- fl.append(new Formula("$x^2$"));
- fl.append(new Formula("$y^2$"));
- fl.append(new Formula("$\\sqrt{x_0^2+x_1^2+x_2^2}$"));
- fl.generateBitmaps("dest");
- return 0;
+ if (formulaId>=0 && formulaId<(int)p->formulas.size())
+ {
+ return p->formulas[formulaId].c_str();
+ }
+ return QCString();
}
-#endif
+
+bool FormulaManager::hasFormulas() const
+{
+ return !p->formulas.empty();
+}
+
+FormulaManager::DisplaySize FormulaManager::displaySize(int formulaId) const
+{
+ return p->getDisplaySize(formulaId);
+}
+
diff --git a/src/formula.h b/src/formula.h
index 422030c..4bd90af 100644
--- a/src/formula.h
+++ b/src/formula.h
@@ -18,45 +18,33 @@
#ifndef FORMULA_H
#define FORMULA_H
-#include <qlist.h>
-#include <qdict.h>
+#include <memory>
+#include <qcstring.h>
-/** Class representing a formula in the output. */
-class Formula
+/*! Manager class to handle formulas */
+class FormulaManager
{
public:
- Formula(const char *text);
- ~Formula();
- int getId();
- QCString getFormulaText() const { return form; }
-
+ struct DisplaySize
+ {
+ DisplaySize(int w,int h) : width(w), height(h) {}
+ int width;
+ int height;
+ };
+ enum class Format { Bitmap, Vector };
+ enum class HighDPI { On, Off };
+ static FormulaManager &instance();
+ void readFormulas(const char *dir,bool doCompare=false);
+ void clear();
+ int addFormula(const char *formulaText);
+ void generateImages(const char *outputDir,Format format,HighDPI hd = HighDPI::Off) const;
+ QCString findFormula(int formulaId) const;
+ bool hasFormulas() const;
+ DisplaySize displaySize(int formulaId) const;
private:
- int number;
- QCString form;
-};
-
-/** A list of Formula objects. */
-class FormulaList : public QList<Formula>
-{
- public:
- void generateBitmaps(const char *path);
-};
-
-/** Iterator for Formula objects in a FormulaList. */
-class FormulaListIterator : public QListIterator<Formula>
-{
- public:
- FormulaListIterator(const FormulaList &l) :
- QListIterator<Formula>(l) {}
-};
-
-/** Unsorted dictionary of Formula objects. */
-class FormulaDict : public QDict<Formula>
-{
- public:
- FormulaDict(uint size) :
- QDict<Formula>(size) {}
- ~FormulaDict() {}
+ FormulaManager();
+ struct Private;
+ std::unique_ptr<Private> p;
};
#endif
diff --git a/src/fortrancode.h b/src/fortrancode.h
index 8391a0b..7da6a61 100644
--- a/src/fortrancode.h
+++ b/src/fortrancode.h
@@ -28,7 +28,6 @@ class Definition;
void codeFreeScanner();
-const int fixedCommentAfter = 72;
class FortranCodeParser : public CodeParserInterface
{
diff --git a/src/fortrancode.l b/src/fortrancode.l
index c4532f3..4d8dc1c 100644
--- a/src/fortrancode.l
+++ b/src/fortrancode.l
@@ -26,6 +26,9 @@
%option never-interactive
%option case-insensitive
%option prefix="fortrancodeYY"
+%top{
+#include <stdint.h>
+}
%{
@@ -55,6 +58,8 @@
#include "tooltip.h"
#include "fortrancode.h"
+const int fixedCommentAfter = 72;
+
// Toggle for some debugging info
//#define DBG_CTX(x) fprintf x
#define DBG_CTX(x) do { } while(0)
diff --git a/src/fortranscanner.h b/src/fortranscanner.h
index 7a13f47..6ffcb1f 100644
--- a/src/fortranscanner.h
+++ b/src/fortranscanner.h
@@ -27,7 +27,8 @@
class FortranOutlineParser : public OutlineParserInterface
{
public:
- FortranOutlineParser(FortranFormat format=FortranFormat_Unknown) : m_format(format) { }
+ FortranOutlineParser(FortranFormat format=FortranFormat_Unknown);
+ ~FortranOutlineParser();
void startTranslationUnit(const char *) {}
void finishTranslationUnit() {}
void parseInput(const char *fileName,
@@ -39,7 +40,8 @@ class FortranOutlineParser : public OutlineParserInterface
void parsePrototype(const char *text);
private:
- FortranFormat m_format;
+ struct Private;
+ std::unique_ptr<Private> p;
};
class FortranOutlineParserFree : public FortranOutlineParser
diff --git a/src/fortranscanner.l b/src/fortranscanner.l
index 08c7a6a..3a5123c 100644
--- a/src/fortranscanner.l
+++ b/src/fortranscanner.l
@@ -21,8 +21,8 @@
* - Consider using startScope(), endScope() functions with module, program,
* subroutine or any other scope in fortran program.
*
- * - Symbol modifiers (attributes) are collected using SymbolModifiers |= operator during
- * substructure parsing. When substructure ends all modifiers are applied to actual
+ * - Symbol yyextra->modifiers (attributes) are collected using SymbolModifiers |= operator during
+ * substructure parsing. When substructure ends all yyextra->modifiers are applied to actual
* entries in applyModifiers() functions.
*
* - How case insensitiveness should be handled in code?
@@ -35,11 +35,16 @@
* "functionA" or "MyInterface". So constructs like '(^|[ \t])interface({BS_}{ID})?/[ \t\n]'
* are desired.
*
- * - Must track yyLineNr when using REJECT, unput() or similar commands.
+ * - Must track yyextra->lineNr when using REJECT, unput() or similar commands.
*/
%option never-interactive
%option case-insensitive
%option prefix="fortranscannerYY"
+%option reentrant
+%option extra-type="struct fortranscannerYY_state *"
+%top{
+#include <stdint.h>
+}
%{
@@ -63,10 +68,12 @@
#include "defargs.h"
#include "language.h"
#include "commentscan.h"
-#include "fortrancode.h"
#include "pre.h"
#include "arguments.h"
#include "debug.h"
+#include "markdown.h"
+
+const int fixedCommentAfter = 72;
// Toggle for some debugging info
//#define DBG_CTX(x) fprintf x
@@ -79,12 +86,13 @@ enum ScanVar { V_IGNORE, V_VARIABLE, V_PARAMETER, V_RESULT};
enum InterfaceType { IF_NONE, IF_SPECIFIC, IF_GENERIC, IF_ABSTRACT };
// {{{ ----- Helper structs -----
-//! Holds modifiers (ie attributes) for one symbol (variable, function, etc)
-struct SymbolModifiers {
+//! Holds yyextra->modifiers (ie attributes) for one symbol (variable, function, etc)
+struct SymbolModifiers
+{
enum Protection {NONE_P, PUBLIC, PRIVATE};
enum Direction {NONE_D, IN, OUT, INOUT};
- //!< This is only used with function return value.
+ //! This is only used with function return value.
QCString type, returnName;
Protection protection;
Direction direction;
@@ -132,115 +140,108 @@ static const char *directionParam[] =
// }}}
-/* -----------------------------------------------------------------
- *
- * statics
- */
-static OutlineParserInterface *g_thisParser;
-static const char * inputString;
-static int inputPosition;
-static bool isFixedForm;
-static QCString inputStringPrepass; ///< Input string for prepass of line cont. '&'
-static QCString inputStringSemi; ///< Input string after command separator ';'
-static unsigned int inputPositionPrepass;
-static int lineCountPrepass = 0;
-
-static std::vector< std::shared_ptr<Entry> > subrCurrent;
-
-struct CommentInPrepass {
+struct CommentInPrepass
+{
int column;
QCString str;
CommentInPrepass(int column, QCString str) : column(column), str(str) {}
};
-static QList<CommentInPrepass> comments;
-
-YY_BUFFER_STATE *include_stack = NULL;
-int include_stack_ptr = 0;
-int include_stack_cnt = 0;
-
-static QFile inputFile;
-static QCString yyFileName;
-static int yyLineNr = 1 ;
-static int yyColNr = 0 ;
-static Entry *current_root = 0;
-static Entry *global_scope = 0;
-static std::shared_ptr<Entry> global_root;
-static std::shared_ptr<Entry> file_root;
-static std::shared_ptr<Entry> last_entry;
-static std::shared_ptr<Entry> last_enum;
-static std::shared_ptr<Entry> current;
-static ScanVar v_type = V_IGNORE; // type of parsed variable
-static std::vector<std::shared_ptr<Entry> > moduleProcedures; // list of all interfaces which contain unresolved
- // module procedures
-static QCString docBlock;
-static bool docBlockInBody = FALSE;
-static bool docBlockJavaStyle;
-
-static MethodTypes mtype;
-static bool gstat;
-static Specifier virt;
-
-static QCString debugStr;
-static QCString result; // function result
-static Argument *parameter; // element of parameter list
-static QCString argType; // fortran type of an argument of a parameter list
-static QCString argName; // last identifier name in variable list
-static QCString initializer; // initial value of a variable
-static int initializerArrayScope; // number if nested array scopes in initializer
-static int initializerScope; // number if nested function calls in initializer
-static QCString useModuleName; // name of module in the use statement
-static Protection defaultProtection;
-static Protection typeProtection;
-static int typeMode = false;
-static InterfaceType ifType = IF_NONE;
-static bool functionLine = FALSE;
-
-static char stringStartSymbol; // single or double quote
-static bool parsingPrototype = FALSE; // see parsePrototype()
+
+/* -----------------------------------------------------------------
+ *
+ * statics
+ */
+
+struct fortranscannerYY_state
+{
+ OutlineParserInterface * thisParser;
+ CommentScanner commentScanner;
+ const char * inputString;
+ int inputPosition;
+ bool isFixedForm;
+ QCString inputStringPrepass; ///< Input string for prepass of line cont. '&'
+ QCString inputStringSemi; ///< Input string after command separator ';'
+ unsigned int inputPositionPrepass;
+ int lineCountPrepass = 0;
+ EntryList subrCurrent;
+ QList<CommentInPrepass> comments;
+ YY_BUFFER_STATE * includeStack = NULL;
+ int includeStackPtr = 0;
+ int includeStackCnt = 0;
+ QCString fileName;
+ int lineNr = 1 ;
+ int colNr = 0 ;
+ Entry *current_root = 0;
+ Entry *global_scope = 0;
+ std::shared_ptr<Entry> global_root;
+ std::shared_ptr<Entry> file_root;
+ std::shared_ptr<Entry> last_entry;
+ std::shared_ptr<Entry> last_enum;
+ std::shared_ptr<Entry> current;
+ ScanVar vtype = V_IGNORE; // type of parsed variable
+ EntryList moduleProcedures; // list of all interfaces which contain unresolved module procedures
+ QCString docBlock;
+ bool docBlockInBody = FALSE;
+ bool docBlockJavaStyle;
+ QCString debugStr;
+// Argument *parameter; // element of parameter list
+ QCString argType; // fortran type of an argument of a parameter list
+ QCString argName; // last identifier name in variable list
+ QCString initializer; // initial value of a variable
+ int initializerArrayScope; // number if nested array scopes in initializer
+ int initializerScope; // number if nested function calls in initializer
+ QCString useModuleName; // name of module in the use statement
+ Protection defaultProtection;
+ Protection typeProtection;
+ bool typeMode = false;
+ InterfaceType ifType = IF_NONE;
+ bool functionLine = FALSE;
+ char stringStartSymbol; // single or double quote
+ bool parsingPrototype = FALSE; // see parsePrototype()
//! Accumulated modifiers of current statement, eg variable declaration.
-static SymbolModifiers currentModifiers;
+ SymbolModifiers currentModifiers;
//! Holds program scope->symbol name->symbol modifiers.
-static QMap<Entry*,QMap<QCString,SymbolModifiers> > modifiers;
+ QMap<Entry*,QMap<QCString,SymbolModifiers> > modifiers;
+ int anonCount = 0 ;
+};
-static int anonCount = 0 ;
//-----------------------------------------------------------------------------
-
-static int yyread(char *buf,int max_size);
-static void startCommentBlock(bool);
-static void handleCommentBlock(const QCString &doc,bool brief);
-static void subrHandleCommentBlock(const QCString &doc,bool brief);
-static void subrHandleCommentBlockResult(const QCString &doc,bool brief);
-static void addCurrentEntry(bool case_insens);
-static void addModule(const char *name, bool isModule=FALSE);
-static void addSubprogram(const char *text);
-static void addInterface(QCString name, InterfaceType type);
-static Argument *getParameter(const QCString &name);
-static void scanner_abort();
-
-static void startScope(Entry *scope);
-static bool endScope(Entry *scope, bool isGlobalRoot=FALSE);
-//static bool isTypeName(QCString name);
-static void resolveModuleProcedures(Entry *current_root);
static int getAmpersandAtTheStart(const char *buf, int length);
static int getAmpOrExclAtTheEnd(const char *buf, int length, char ch);
-static void truncatePrepass(int index);
-static void pushBuffer(QCString &buffer);
-static void popBuffer();
-//static void extractPrefix(QCString& text);
static QCString extractFromParens(const QCString name);
static QCString extractBind(const QCString name);
-static CommentInPrepass* locatePrepassComment(int from, int to);
-static void updateVariablePrepassComment(int from, int to);
-static void newLine();
-static void initEntry();
+
+
+static int yyread(yyscan_t yyscanner,char *buf,int max_size);
+static void startCommentBlock(yyscan_t yyscanner,bool);
+static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief);
+static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief);
+static void subrHandleCommentBlockResult(yyscan_t yyscanner,const QCString &doc,bool brief);
+static void addCurrentEntry(yyscan_t yyscanner,bool case_insens);
+static void addModule(yyscan_t yyscanner,const char *name, bool isModule=FALSE);
+static void addSubprogram(yyscan_t yyscanner,const char *text);
+static void addInterface(yyscan_t yyscanner,QCString name, InterfaceType type);
+static Argument *getParameter(yyscan_t yyscanner,const QCString &name);
+static void scanner_abort(yyscan_t yyscanner);
+
+static void startScope(yyscan_t yyscanner,Entry *scope);
+static bool endScope(yyscan_t yyscanner,Entry *scope, bool isGlobalRoot=FALSE);
+static void resolveModuleProcedures(yyscan_t yyscanner,Entry *current_root);
+static void truncatePrepass(yyscan_t yyscanner,int index);
+static void pushBuffer(yyscan_t yyscanner,QCString &buffer);
+static void popBuffer(yyscan_t yyscanner);
+static CommentInPrepass* locatePrepassComment(yyscan_t yyscanner,int from, int to);
+static void updateVariablePrepassComment(yyscan_t yyscanner,int from, int to);
+static void newLine(yyscan_t yyscanner);
+static void initEntry(yyscan_t yyscanner);
static const char *stateToString(int state);
//-----------------------------------------------------------------------------
-#undef YY_INPUT
-#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
-#define YY_USER_ACTION yyColNr+=(int)yyleng;
+#undef YY_INPUT
+#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
+#define YY_USER_ACTION yyextra->colNr+=(int)yyleng;
#define INVALID_ENTRY ((Entry*)0x8)
//-----------------------------------------------------------------------------
@@ -248,7 +249,7 @@ static const char *stateToString(int state);
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
-IDSYM [a-z_A-Z0-9]
+IDSYM [a-z_A-Z0-9]
NOTIDSYM [^a-z_A-Z0-9]
SEPARATE [:, \t]
ID [a-z_A-Z%]+{IDSYM}*
@@ -294,18 +295,18 @@ SCOPENAME ({ID}{BS}"::"{BS})*
//---------------------------------------------------------------------------------
/** fortran parsing states */
-%x Subprog
-%x SubprogPrefix
-%x Parameterlist
-%x SubprogBody
-%x SubprogBodyContains
-%x Start
-%x Comment
+%x Subprog
+%x SubprogPrefix
+%x Parameterlist
+%x SubprogBody
+%x SubprogBodyContains
+%x Start
+%x Comment
%x Module
%x Program
%x ModuleBody
-%x ModuleBodyContains
-%x AttributeList
+%x ModuleBodyContains
+%x AttributeList
%x Variable
%x Initialization
%x ArrayInitializer
@@ -323,289 +324,325 @@ SCOPENAME ({ID}{BS}"::"{BS})*
%x Prepass
/** comment parsing states */
-%x DocBlock
-%x DocBackLine
-%x EndDoc
+%x DocBlock
+%x DocBackLine
+%x EndDoc
%x BlockData
/** prototype parsing */
-%x Prototype
-%x PrototypeSubprog
-%x PrototypeArgs
+%x Prototype
+%x PrototypeSubprog
+%x PrototypeArgs
%%
/*-----------------------------------------------------------------------------------*/
<Prepass>^{BS}[&]*{BS}!.*\n { /* skip lines with just comment. Note code was in free format or has been converted to it */
- lineCountPrepass ++;
+ yyextra->lineCountPrepass ++;
}
<Prepass>^{BS}\n { /* skip empty lines */
- lineCountPrepass ++;
+ yyextra->lineCountPrepass ++;
}
<*>^.*\n { // prepass: look for line continuations
- functionLine = FALSE;
+ yyextra->functionLine = FALSE;
DBG_CTX((stderr, "---%s", yytext));
- int indexStart = getAmpersandAtTheStart(yytext, (int)yyleng);
- int indexEnd = getAmpOrExclAtTheEnd(yytext, (int)yyleng, '\0');
- if (indexEnd>=0 && yytext[indexEnd]!='&') //we are only interested in amp
- indexEnd=-1;
+ int indexStart = getAmpersandAtTheStart(yytext, (int)yyleng);
+ int indexEnd = getAmpOrExclAtTheEnd(yytext, (int)yyleng, '\0');
+ if (indexEnd>=0 && yytext[indexEnd]!='&') //we are only interested in amp
+ {
+ indexEnd=-1;
+ }
- if(indexEnd<0){ // ----- no ampersand as line continuation
- if(YY_START == Prepass) { // last line in "continuation"
+ if (indexEnd<0)
+ { // ----- no ampersand as line continuation
+ if (YY_START == Prepass)
+ { // last line in "continuation"
- // Only take input after initial ampersand
- inputStringPrepass+=(const char*)(yytext+(indexStart+1));
-
- //printf("BUFFER:%s\n", (const char*)inputStringPrepass);
- pushBuffer(inputStringPrepass);
- yyColNr = 0;
- yy_pop_state();
- } else { // simple line
- yyColNr = 0;
- REJECT;
- }
-
- } else { // ----- line with continuation
- if(YY_START != Prepass) {
- comments.setAutoDelete(TRUE);
- comments.clear();
- yy_push_state(Prepass);
- }
+ // Only take input after initial ampersand
+ yyextra->inputStringPrepass+=(const char*)(yytext+(indexStart+1));
+
+ //printf("BUFFER:%s\n", (const char*)yyextra->inputStringPrepass);
+ pushBuffer(yyscanner,yyextra->inputStringPrepass);
+ yyextra->colNr = 0;
+ yy_pop_state(yyscanner);
+ }
+ else
+ { // simple line
+ yyextra->colNr = 0;
+ REJECT;
+ }
+ }
+ else
+ { // ----- line with continuation
+ if (YY_START != Prepass)
+ {
+ yyextra->comments.setAutoDelete(TRUE);
+ yyextra->comments.clear();
+ yy_push_state(Prepass,yyscanner);
+ }
- int length = inputStringPrepass.length();
+ int length = yyextra->inputStringPrepass.length();
- // Only take input after initial ampersand
- inputStringPrepass+=(const char*)(yytext+(indexStart+1));
- lineCountPrepass ++;
-
- // cut off & and remove following comment if present
- truncatePrepass(length+indexEnd-(indexStart+1));
- }
+ // Only take input after initial ampersand
+ yyextra->inputStringPrepass+=(const char*)(yytext+(indexStart+1));
+ yyextra->lineCountPrepass ++;
+ // cut off & and remove following comment if present
+ truncatePrepass(yyscanner,length+indexEnd-(indexStart+1));
+ }
}
/*------ ignore strings that are not initialization strings */
<String>\"|\' { // string ends with next quote without previous backspace
- if (yytext[0]!=stringStartSymbol) { yyColNr -= (int)yyleng; REJECT; } // single vs double quote
- if (yy_top_state() == Initialization
- || yy_top_state() == ArrayInitializer)
- initializer+=yytext;
- yy_pop_state();
- }
-<String>. { if (yy_top_state() == Initialization
- || yy_top_state() == ArrayInitializer)
- initializer+=yytext;
- }
+ if (yytext[0]!=yyextra->stringStartSymbol)
+ {
+ yyextra->colNr -= (int)yyleng;
+ REJECT;
+ } // single vs double quote
+ if (yy_top_state(yyscanner) == Initialization ||
+ yy_top_state(yyscanner) == ArrayInitializer)
+ {
+ yyextra->initializer+=yytext;
+ }
+ yy_pop_state(yyscanner);
+ }
+<String>. { if (yy_top_state(yyscanner) == Initialization ||
+ yy_top_state(yyscanner) == ArrayInitializer)
+ {
+ yyextra->initializer+=yytext;
+ }
+ }
<*>\"|\' { /* string starts */
- if (YY_START == StrIgnore) { yyColNr -= (int)yyleng; REJECT; }; // ignore in simple comments
- yy_push_state(YY_START);
- if (yy_top_state() == Initialization
- || yy_top_state() == ArrayInitializer)
- initializer+=yytext;
- stringStartSymbol=yytext[0]; // single or double quote
+ if (YY_START == StrIgnore)
+ { yyextra->colNr -= (int)yyleng;
+ REJECT;
+ }; // ignore in simple yyextra->comments
+ yy_push_state(YY_START,yyscanner);
+ if (yy_top_state(yyscanner) == Initialization ||
+ yy_top_state(yyscanner) == ArrayInitializer)
+ {
+ yyextra->initializer+=yytext;
+ }
+ yyextra->stringStartSymbol=yytext[0]; // single or double quote
BEGIN(String);
}
- /*------ ignore simple comment (not documentation comments) */
+ /*------ ignore simple comment (not documentation yyextra->comments) */
-<*>"!"/[^<>\n] { if (YY_START == String) { yyColNr -= (int)yyleng; REJECT; } // "!" is ignored in strings
- // skip comment line (without docu comments "!>" "!<" )
- /* ignore further "!" and ignore comments in Strings */
+<*>"!"/[^<>\n] { if (YY_START == String)
+ { yyextra->colNr -= (int)yyleng;
+ REJECT;
+ } // "!" is ignored in strings
+ // skip comment line (without docu yyextra->comments "!>" "!<" )
+ /* ignore further "!" and ignore yyextra->comments in Strings */
if ((YY_START != StrIgnore) && (YY_START != String))
- {
- yy_push_state(YY_START);
+ {
+ yy_push_state(YY_START,yyscanner);
BEGIN(StrIgnore);
- debugStr="*!";
- DBG_CTX((stderr,"start comment %d\n",yyLineNr));
+ yyextra->debugStr="*!";
+ DBG_CTX((stderr,"start comment %d\n",yyextra->lineNr));
}
}
-<StrIgnore>.?/\n { yy_pop_state(); // comment ends with endline character
- DBG_CTX((stderr,"end comment %d %s\n",yyLineNr,debugStr.data()));
+<StrIgnore>.?/\n { yy_pop_state(yyscanner); // comment ends with endline character
+ DBG_CTX((stderr,"end comment %d %s\n",yyextra->lineNr,yyextra->debugStr.data()));
} // comment line ends
-<StrIgnore>. { debugStr+=yytext; }
+<StrIgnore>. { yyextra->debugStr+=yytext; }
/*------ use handling ------------------------------------------------------------*/
<Start,ModuleBody,SubprogBody>"use"{BS_} {
- if(YY_START == Start)
+ if (YY_START == Start)
{
- addModule(NULL);
- yy_push_state(ModuleBody); //anon program
+ addModule(yyscanner,NULL);
+ yy_push_state(ModuleBody,yyscanner); //anon program
}
- yy_push_state(Use);
+ yy_push_state(Use,yyscanner);
}
<Use>{ID} {
DBG_CTX((stderr,"using dir %s\n",yytext));
- current->name=yytext;
- current->fileName = yyFileName;
- current->section=Entry::USINGDIR_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- current->lang = SrcLangExt_Fortran;
- yy_pop_state();
+ yyextra->current->name=yytext;
+ yyextra->current->fileName = yyextra->fileName;
+ yyextra->current->section=Entry::USINGDIR_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ yyextra->current->lang = SrcLangExt_Fortran;
+ yy_pop_state(yyscanner);
}
<Use>{ID}/, {
- useModuleName=yytext;
+ yyextra->useModuleName=yytext;
}
<Use>,{BS}"ONLY" { BEGIN(UseOnly);
}
<UseOnly>{BS},{BS} {}
<UseOnly>{ID} {
- current->name= useModuleName+"::"+yytext;
- current->fileName = yyFileName;
- current->section=Entry::USINGDECL_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- current->lang = SrcLangExt_Fortran;
- }
+ yyextra->current->name= yyextra->useModuleName+"::"+yytext;
+ yyextra->current->fileName = yyextra->fileName;
+ yyextra->current->section=Entry::USINGDECL_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ yyextra->current->lang = SrcLangExt_Fortran;
+ }
<Use,UseOnly>"\n" {
- yyColNr -= 1;
+ yyextra->colNr -= 1;
unput(*yytext);
- yy_pop_state();
+ yy_pop_state(yyscanner);
}
/* INTERFACE definitions */
<Start,ModuleBody,SubprogBody>{
-^{BS}interface{IDSYM}+ { /* variable with interface prefix */ }
-^{BS}interface { ifType = IF_SPECIFIC;
- yy_push_state(InterfaceBody);
+^{BS}interface{IDSYM}+ { /* variable with interface prefix */ }
+^{BS}interface { yyextra->ifType = IF_SPECIFIC;
+ yy_push_state(InterfaceBody,yyscanner);
// do not start a scope here, every
// interface body is a scope of its own
}
-^{BS}abstract{BS_}interface { ifType = IF_ABSTRACT;
- yy_push_state(InterfaceBody);
+^{BS}abstract{BS_}interface { yyextra->ifType = IF_ABSTRACT;
+ yy_push_state(InterfaceBody,yyscanner);
// do not start a scope here, every
// interface body is a scope of its own
}
-^{BS}interface{BS_}{ID}{ARGS}? { ifType = IF_GENERIC;
- current->bodyLine = yyLineNr + lineCountPrepass + 1; // we have to be at the line after the definition and we have to take continuation lines into account.
- yy_push_state(InterfaceBody);
+^{BS}interface{BS_}{ID}{ARGS}? { yyextra->ifType = IF_GENERIC;
+ yyextra->current->bodyLine = yyextra->lineNr + yyextra->lineCountPrepass + 1; // we have to be at the line after the definition and we have to take continuation lines into account.
+ yy_push_state(InterfaceBody,yyscanner);
// extract generic name
QCString name = QCString(yytext).stripWhiteSpace();
name = name.right(name.length() - 9).stripWhiteSpace().lower();
- addInterface(name, ifType);
- startScope(last_entry.get());
+ addInterface(yyscanner,name, yyextra->ifType);
+ startScope(yyscanner,yyextra->last_entry.get());
}
}
<InterfaceBody>^{BS}end{BS}interface({BS_}{ID})? {
// end scope only if GENERIC interface
- if (ifType == IF_GENERIC) last_entry->parent()->endBodyLine = yyLineNr - 1;
- if (ifType == IF_GENERIC && !endScope(current_root))
+ if (yyextra->ifType == IF_GENERIC)
+ {
+ yyextra->last_entry->parent()->endBodyLine = yyextra->lineNr - 1;
+ }
+ if (yyextra->ifType == IF_GENERIC && !endScope(yyscanner,yyextra->current_root))
+ {
yyterminate();
-
- ifType = IF_NONE;
- yy_pop_state();
+ }
+ yyextra->ifType = IF_NONE;
+ yy_pop_state(yyscanner);
}
-<InterfaceBody>module{BS}procedure { yy_push_state(YY_START);
+<InterfaceBody>module{BS}procedure { yy_push_state(YY_START,yyscanner);
BEGIN(ModuleProcedure);
}
-<ModuleProcedure>{ID} { if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
+<ModuleProcedure>{ID} { if (yyextra->ifType == IF_ABSTRACT || yyextra->ifType == IF_SPECIFIC)
{
- addInterface(yytext, ifType);
- startScope(last_entry.get());
+ addInterface(yyscanner,yytext, yyextra->ifType);
+ startScope(yyscanner,yyextra->last_entry.get());
}
- current->section = Entry::FUNCTION_SEC ;
- current->name = yytext;
- moduleProcedures.push_back(current);
- addCurrentEntry(true);
+ yyextra->current->section = Entry::FUNCTION_SEC ;
+ yyextra->current->name = yytext;
+ yyextra->moduleProcedures.push_back(yyextra->current);
+ addCurrentEntry(yyscanner,true);
}
-<ModuleProcedure>"\n" { yyColNr -= 1;
- unput(*yytext);
- yy_pop_state();
+<ModuleProcedure>"\n" { yyextra->colNr -= 1;
+ unput(*yytext);
+ yy_pop_state(yyscanner);
}
<InterfaceBody>. {}
/*-- Contains handling --*/
-<Start>^{BS}{CONTAINS}/({BS}|\n|!|;) {
- if(YY_START == Start)
+<Start>^{BS}{CONTAINS}/({BS}|\n|!|;) {
+ if (YY_START == Start)
{
- addModule(NULL);
- yy_push_state(ModuleBodyContains); //anon program
- }
+ addModule(yyscanner,NULL);
+ yy_push_state(ModuleBodyContains,yyscanner); //anon program
+ }
}
<ModuleBody>^{BS}{CONTAINS}/({BS}|\n|!|;) { BEGIN(ModuleBodyContains); }
<SubprogBody>^{BS}{CONTAINS}/({BS}|\n|!|;) { BEGIN(SubprogBodyContains); }
<TypedefBody>^{BS}{CONTAINS}/({BS}|\n|!|;) { BEGIN(TypedefBodyContains); }
/*------ module handling ------------------------------------------------------------*/
-<Start>block{BS}data{BS}{ID_} { //
- v_type = V_IGNORE;
- yy_push_state(BlockData);
- defaultProtection = Public;
- }
-<Start>module|program{BS_} { //
- v_type = V_IGNORE;
- if(yytext[0]=='m' || yytext[0]=='M')
- yy_push_state(Module);
- else
- yy_push_state(Program);
- defaultProtection = Public;
- }
+<Start>block{BS}data{BS}{ID_} { //
+ yyextra->vtype = V_IGNORE;
+ yy_push_state(BlockData,yyscanner);
+ yyextra->defaultProtection = Public;
+ }
+<Start>module|program{BS_} { //
+ yyextra->vtype = V_IGNORE;
+ if (yytext[0]=='m' || yytext[0]=='M')
+ {
+ yy_push_state(Module,yyscanner);
+ }
+ else
+ {
+ yy_push_state(Program,yyscanner);
+ }
+ yyextra->defaultProtection = Public;
+ }
<BlockData>^{BS}"end"({BS}(block{BS}data)({BS_}{ID})?)?{BS}/(\n|!|;) { // end block data
- //if (!endScope(current_root))
- // yyterminate();
- defaultProtection = Public;
- yy_pop_state();
- }
+ //if (!endScope(yyscanner,yyextra->current_root))
+ // yyterminate();
+ yyextra->defaultProtection = Public;
+ yy_pop_state(yyscanner);
+ }
<Start,ModuleBody,ModuleBodyContains>"end"({BS}(module|program)({BS_}{ID})?)?{BS}/(\n|!|;) { // end module
- resolveModuleProcedures(current_root);
- if (!endScope(current_root))
- yyterminate();
- defaultProtection = Public;
- if (global_scope)
+ resolveModuleProcedures(yyscanner,yyextra->current_root);
+ if (!endScope(yyscanner,yyextra->current_root))
+ {
+ yyterminate();
+ }
+ yyextra->defaultProtection = Public;
+ if (yyextra->global_scope)
+ {
+ if (yyextra->global_scope != INVALID_ENTRY)
{
- if (global_scope != INVALID_ENTRY)
- yy_push_state(Start);
- else
- yy_pop_state(); // cannot pop artrificial entry
+ yy_push_state(Start,yyscanner);
}
else
{
- yy_push_state(Start);
- global_scope = INVALID_ENTRY; // signal that the global_scope has already been used.
+ yy_pop_state(yyscanner); // cannot pop artrificial entry
}
- }
-<Module>{ID} {
- addModule(yytext, TRUE);
- BEGIN(ModuleBody);
- }
-
+ }
+ else
+ {
+ yy_push_state(Start,yyscanner);
+ yyextra->global_scope = INVALID_ENTRY; // signal that the yyextra->global_scope has already been used.
+ }
+ }
+<Module>{ID} {
+ addModule(yyscanner,yytext, TRUE);
+ BEGIN(ModuleBody);
+ }
<Program>{ID} {
- addModule(yytext, FALSE);
- BEGIN(ModuleBody);
- }
+ addModule(yyscanner,yytext, FALSE);
+ BEGIN(ModuleBody);
+ }
/*------- access specification --------------------------------------------------------------------------*/
-<ModuleBody>private/{BS}(\n|"!") { defaultProtection = Private;
- current->protection = defaultProtection ;
- }
-<ModuleBody>public/{BS}(\n|"!") { defaultProtection = Public;
- current->protection = defaultProtection ;
- }
+<ModuleBody>private/{BS}(\n|"!") { yyextra->defaultProtection = Private;
+ yyextra->current->protection = yyextra->defaultProtection ;
+ }
+<ModuleBody>public/{BS}(\n|"!") { yyextra->defaultProtection = Public;
+ yyextra->current->protection = yyextra->defaultProtection ;
+ }
/*------- type definition -------------------------------------------------------------------------------*/
-<Start,ModuleBody>^{BS}type/[^a-z0-9_] {
- if(YY_START == Start)
+<Start,ModuleBody>^{BS}type/[^a-z0-9_] {
+ if (YY_START == Start)
{
- addModule(NULL);
- yy_push_state(ModuleBody); //anon program
+ addModule(yyscanner,NULL);
+ yy_push_state(ModuleBody,yyscanner); //anon program
}
- yy_push_state(Typedef);
- current->protection = defaultProtection;
- typeProtection = defaultProtection;
- typeMode = true;
+ yy_push_state(Typedef,yyscanner);
+ yyextra->current->protection = yyextra->defaultProtection;
+ yyextra->typeProtection = yyextra->defaultProtection;
+ yyextra->typeMode = true;
}
<Typedef>{
{COMMA} {}
@@ -613,100 +650,104 @@ SCOPENAME ({ID}{BS}"::"{BS})*
{BS}"::"{BS} {}
abstract {
- current->spec |= Entry::AbstractClass;
+ yyextra->current->spec |= Entry::AbstractClass;
}
extends{ARGS} {
QCString basename = extractFromParens(yytext).lower();
- current->extends.push_back(BaseInfo(basename, Public, Normal));
+ yyextra->current->extends.push_back(BaseInfo(basename, Public, Normal));
}
public {
- current->protection = Public;
- typeProtection = Public;
+ yyextra->current->protection = Public;
+ yyextra->typeProtection = Public;
}
private {
- current->protection = Private;
- typeProtection = Private;
+ yyextra->current->protection = Private;
+ yyextra->typeProtection = Private;
}
{LANGUAGE_BIND_SPEC} {
/* ignored for now */
}
{ID} { /* type name found */
- current->section = Entry::CLASS_SEC;
- current->spec |= Entry::Struct;
- current->name = yytext;
- current->fileName = yyFileName;
- current->bodyLine = yyLineNr;
- current->startLine = yyLineNr;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->spec |= Entry::Struct;
+ yyextra->current->name = yytext;
+ yyextra->current->fileName = yyextra->fileName;
+ yyextra->current->bodyLine = yyextra->lineNr;
+ yyextra->current->startLine = yyextra->lineNr;
/* if type is part of a module, mod name is necessary for output */
- if (current_root &&
- (current_root->section == Entry::CLASS_SEC
- || current_root->section == Entry::NAMESPACE_SEC))
+ if (yyextra->current_root &&
+ (yyextra->current_root->section == Entry::CLASS_SEC ||
+ yyextra->current_root->section == Entry::NAMESPACE_SEC))
{
- current->name = current_root->name + "::" + current->name;
+ yyextra->current->name = yyextra->current_root->name + "::" + yyextra->current->name;
}
- addCurrentEntry(true);
- startScope(last_entry.get());
+ addCurrentEntry(yyscanner,true);
+ startScope(yyscanner,yyextra->last_entry.get());
BEGIN(TypedefBody);
}
}
<TypedefBodyContains>{ /* Type Bound Procedures */
^{BS}PROCEDURE{ARGS}? {
- current->type = QCString(yytext).simplifyWhiteSpace();
+ yyextra->current->type = QCString(yytext).simplifyWhiteSpace();
}
^{BS}final {
- current->spec |= Entry::Final;
- current->type = QCString(yytext).simplifyWhiteSpace();
+ yyextra->current->spec |= Entry::Final;
+ yyextra->current->type = QCString(yytext).simplifyWhiteSpace();
}
^{BS}generic {
- current->type = QCString(yytext).simplifyWhiteSpace();
+ yyextra->current->type = QCString(yytext).simplifyWhiteSpace();
}
{COMMA} {
}
{ATTR_SPEC} {
- currentModifiers |= QCString(yytext);
+ yyextra->currentModifiers |= QCString(yytext);
}
{BS}"::"{BS} {
}
{ID} {
QCString name = yytext;
- modifiers[current_root][name.lower()] |= currentModifiers;
- current->section = Entry::FUNCTION_SEC;
- current->name = name;
- current->fileName = yyFileName;
- current->bodyLine = yyLineNr;
- current->startLine = yyLineNr;
- addCurrentEntry(true);
+ yyextra->modifiers[yyextra->current_root][name.lower()] |= yyextra->currentModifiers;
+ yyextra->current->section = Entry::FUNCTION_SEC;
+ yyextra->current->name = name;
+ yyextra->current->fileName = yyextra->fileName;
+ yyextra->current->bodyLine = yyextra->lineNr;
+ yyextra->current->startLine = yyextra->lineNr;
+ addCurrentEntry(yyscanner,true);
}
{BS}"=>"[^(\n|\!)]* { /* Specific bindings come after the ID. */
QCString args = yytext;
- last_entry->args = args.lower();
+ yyextra->last_entry->args = args.lower();
}
"\n" {
- currentModifiers = SymbolModifiers();
- newLine();
- docBlock.resize(0);
+ yyextra->currentModifiers = SymbolModifiers();
+ newLine(yyscanner);
+ yyextra->docBlock.resize(0);
}
}
<TypedefBody,TypedefBodyContains>{
^{BS}"end"{BS}"type"({BS_}{ID})?{BS}/(\n|!|;) { /* end type definition */
- last_entry->parent()->endBodyLine = yyLineNr;
- if (!endScope(current_root))
+ yyextra->last_entry->parent()->endBodyLine = yyextra->lineNr;
+ if (!endScope(yyscanner,yyextra->current_root))
+ {
yyterminate();
- typeMode = false;
- yy_pop_state();
+ }
+ yyextra->typeMode = false;
+ yy_pop_state(yyscanner);
}
^{BS}"end"{BS}/(\n|!|;) { /* incorrect end type definition */
- warn(yyFileName,yyLineNr, "Found 'END' instead of 'END TYPE'");
- last_entry->parent()->endBodyLine = yyLineNr;
- if (!endScope(current_root))
+ warn(yyextra->fileName,yyextra->lineNr, "Found 'END' instead of 'END TYPE'");
+ yyextra->last_entry->parent()->endBodyLine = yyextra->lineNr;
+ if (!endScope(yyscanner,yyextra->current_root))
+ {
yyterminate();
- typeMode = false;
- yy_pop_state();
+ }
+ yyextra->typeMode = false;
+ yy_pop_state(yyscanner);
}
}
@@ -718,603 +759,594 @@ private {
// in a scope of their own, even if multiple
// are group in one INTERFACE/END INTERFACE block.
//
- if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
+ if (yyextra->ifType == IF_ABSTRACT || yyextra->ifType == IF_SPECIFIC)
{
- endScope(current_root);
- last_entry->endBodyLine = yyLineNr - 1;
+ endScope(yyscanner,yyextra->current_root);
+ yyextra->last_entry->endBodyLine = yyextra->lineNr - 1;
}
- current_root->endBodyLine = yyLineNr - 1;
+ yyextra->current_root->endBodyLine = yyextra->lineNr - 1;
- if (!endScope(current_root))
- yyterminate();
- subrCurrent.pop_back();
- yy_pop_state() ;
- }
+ if (!endScope(yyscanner,yyextra->current_root))
+ {
+ yyterminate();
+ }
+ yyextra->subrCurrent.pop_back();
+ yy_pop_state(yyscanner) ;
+ }
<BlockData>{
{ID} {
}
}
<Start,ModuleBody,TypedefBody,SubprogBody,Enum>{
^{BS}{TYPE_SPEC}/{SEPARATE} {
- last_enum.reset();
+ yyextra->last_enum.reset();
if (YY_START == Enum)
{
- argType = "@"; // enum marker
+ yyextra->argType = "@"; // enum marker
}
else
{
- argType = QCString(yytext).simplifyWhiteSpace().lower();
+ yyextra->argType = QCString(yytext).simplifyWhiteSpace().lower();
}
- current->bodyLine = yyLineNr + 1;
- current->endBodyLine = yyLineNr + lineCountPrepass;
+ yyextra->current->bodyLine = yyextra->lineNr + 1;
+ yyextra->current->endBodyLine = yyextra->lineNr + yyextra->lineCountPrepass;
/* variable declaration starts */
- if(YY_START == Start)
+ if (YY_START == Start)
{
- addModule(NULL);
- yy_push_state(ModuleBody); //anon program
+ addModule(yyscanner,NULL);
+ yy_push_state(ModuleBody,yyscanner); //anon program
}
- yy_push_state(AttributeList);
- }
- /* Dimitri: macro expansion should already be done during preprocessing not here!
-^{BS}{PP_ID}{KIND}? { // check for preprocessor symbol expand to type
- QCString str = yytext;
- str = str.stripWhiteSpace();
- //DefineDict* defines = getGlobalDefineDict();
- QCString name;
- int index = str.find("(");
- if (index != -1)
- name = str.left(index).stripWhiteSpace();
- else
- name = str;
-
- Define *define = 0; //(*defines)[name];
- if (define != 0 && isTypeName(define->definition))
- {
- argType = str;
- yy_push_state(AttributeList);
- }
- else
- {
- yyColNr -= (int)yyleng;
- REJECT;
- }
- }
- */
-{EXTERNAL_STMT}/({BS}"::"|{BS_}{ID}) {
+ yy_push_state(AttributeList,yyscanner);
+ }
+{EXTERNAL_STMT}/({BS}"::"|{BS_}{ID}) {
/* external can be a "type" or an attribute */
- if(YY_START == Start)
+ if (YY_START == Start)
{
- addModule(NULL);
- yy_push_state(ModuleBody); //anon program
+ addModule(yyscanner,NULL);
+ yy_push_state(ModuleBody,yyscanner); //anon program
}
QCString tmp = yytext;
- currentModifiers |= tmp.stripWhiteSpace();
- argType = QCString(yytext).simplifyWhiteSpace().lower();
- yy_push_state(AttributeList);
- }
-{ATTR_STMT}/{BS_}{ID} |
-{ATTR_STMT}/{BS}"::" {
+ yyextra->currentModifiers |= tmp.stripWhiteSpace();
+ yyextra->argType = QCString(yytext).simplifyWhiteSpace().lower();
+ yy_push_state(AttributeList,yyscanner);
+ }
+{ATTR_STMT}/{BS_}{ID} |
+{ATTR_STMT}/{BS}"::" {
/* attribute statement starts */
DBG_CTX((stderr,"5=========> Attribute statement: %s\n", yytext));
QCString tmp = yytext;
- currentModifiers |= tmp.stripWhiteSpace();
- argType="";
- yy_push_state(YY_START);
- BEGIN( AttributeList ) ;
- }
-{ID} {
- }
-^{BS}"type"{BS_}"is"/{BT_} { }
-^{BS}"type"{BS}"=" { }
-^{BS}"class"{BS_}"is"/{BT_} { }
-^{BS}"class"{BS_}"default" { }
+ yyextra->currentModifiers |= tmp.stripWhiteSpace();
+ yyextra->argType="";
+ yy_push_state(YY_START,yyscanner);
+ BEGIN( AttributeList ) ;
+ }
+{ID} {
+ }
+^{BS}"type"{BS_}"is"/{BT_} {}
+^{BS}"type"{BS}"=" {}
+^{BS}"class"{BS_}"is"/{BT_} {}
+^{BS}"class"{BS_}"default" {}
}
<AttributeList>{
-{COMMA} {}
-{BS} {}
+{COMMA} {}
+{BS} {}
{LANGUAGE_BIND_SPEC} {
- currentModifiers |= yytext;
+ yyextra->currentModifiers |= yytext;
}
-{ATTR_SPEC}. { /* update current modifiers when it is an ATTR_SPEC and not a variable name */
- /* bug_625519 */
+{ATTR_SPEC}. { /* update yyextra->current yyextra->modifiers when it is an ATTR_SPEC and not a variable name */
+ /* buyyextra->625519 */
QChar chr = yytext[(int)yyleng-1];
if (chr.isLetter() || chr.isDigit() || (chr == '_'))
{
- yyColNr -= (int)yyleng;
+ yyextra->colNr -= (int)yyleng;
REJECT;
}
else
{
QCString tmp = yytext;
tmp = tmp.left(tmp.length() - 1);
- yyColNr -= 1;
+ yyextra->colNr -= 1;
unput(yytext[(int)yyleng-1]);
- currentModifiers |= (tmp);
+ yyextra->currentModifiers |= (tmp);
}
- }
-"::" { /* end attribute list */
- BEGIN( Variable );
- }
-. { /* unknown attribute, consider variable name */
- //cout<<"start variables, unput "<<*yytext<<endl;
- yyColNr -= 1;
- unput(*yytext);
- BEGIN( Variable );
- }
+ }
+"::" { /* end attribute list */
+ BEGIN( Variable );
+ }
+. { /* unknown attribute, consider variable name */
+ //cout<<"start variables, unput "<<*yytext<<endl;
+ yyextra->colNr -= 1;
+ unput(*yytext);
+ BEGIN( Variable );
+ }
}
-<Variable>{BS} { }
-<Variable>{ID} { /* parse variable declaration */
- //cout << "5=========> got variable: " << argType << "::" << yytext << endl;
- /* work around for bug in QCString.replace (QCString works) */
- QCString name=yytext;
+<Variable>{BS} {}
+<Variable>{ID} { /* parse variable declaration */
+ //cout << "5=========> got variable: " << yyextra->argType << "::" << yytext << endl;
+ /* work around for bug in QCString.replace (QCString works) */
+ QCString name=yytext;
name = name.lower();
- /* remember attributes for the symbol */
- modifiers[current_root][name.lower()] |= currentModifiers;
- argName= name;
+ /* remember attributes for the symbol */
+ yyextra->modifiers[yyextra->current_root][name.lower()] |= yyextra->currentModifiers;
+ yyextra->argName= name;
- v_type= V_IGNORE;
- if (!argType.isEmpty() && current_root->section!=Entry::FUNCTION_SEC)
+ yyextra->vtype= V_IGNORE;
+ if (!yyextra->argType.isEmpty() && yyextra->current_root->section!=Entry::FUNCTION_SEC)
{ // new variable entry
- v_type = V_VARIABLE;
- current->section = Entry::VARIABLE_SEC;
- current->name = argName;
- current->type = argType;
- current->fileName = yyFileName;
- current->bodyLine = yyLineNr; // used for source reference
- current->startLine = yyLineNr;
- if (argType == "@")
+ yyextra->vtype = V_VARIABLE;
+ yyextra->current->section = Entry::VARIABLE_SEC;
+ yyextra->current->name = yyextra->argName;
+ yyextra->current->type = yyextra->argType;
+ yyextra->current->fileName = yyextra->fileName;
+ yyextra->current->bodyLine = yyextra->lineNr; // used for source reference
+ yyextra->current->startLine = yyextra->lineNr;
+ if (yyextra->argType == "@")
{
- current_root->copyToSubEntry(current);
+ yyextra->current_root->copyToSubEntry(yyextra->current);
// add to the scope surrounding the enum (copy!)
- last_enum = current;
- current_root->parent()->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->last_enum = yyextra->current;
+ yyextra->current_root->parent()->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
}
else
{
- addCurrentEntry(true);
+ addCurrentEntry(yyscanner,true);
+ }
+ }
+ else if (!yyextra->argType.isEmpty())
+ { // declaration of parameter list: add type for corr. parameter
+ Argument *parameter = getParameter(yyscanner,yyextra->argName);
+ if (parameter)
+ {
+ yyextra->vtype= V_PARAMETER;
+ if (!yyextra->argType.isNull()) parameter->type=yyextra->argType.stripWhiteSpace();
+ if (!yyextra->docBlock.isNull())
+ {
+ subrHandleCommentBlock(yyscanner,yyextra->docBlock,TRUE);
+ }
+ }
+ // save, it may be function return type
+ if (parameter)
+ {
+ yyextra->modifiers[yyextra->current_root][name.lower()].type = yyextra->argType;
+ }
+ else
+ {
+ if ((yyextra->current_root->name.lower() == yyextra->argName.lower()) ||
+ (yyextra->modifiers[yyextra->current_root->parent()][yyextra->current_root->name.lower()].returnName.lower() == yyextra->argName.lower()))
+ {
+ int strt = yyextra->current_root->type.find("function");
+ QCString lft;
+ QCString rght;
+ if (strt != -1)
+ {
+ yyextra->vtype = V_RESULT;
+ lft = "";
+ rght = "";
+ if (strt != 0) lft = yyextra->current_root->type.left(strt).stripWhiteSpace();
+ if ((yyextra->current_root->type.length() - strt - strlen("function"))!= 0)
+ {
+ rght = yyextra->current_root->type.right(yyextra->current_root->type.length() - strt - strlen("function")).stripWhiteSpace();
+ }
+ yyextra->current_root->type = lft;
+ if (rght.length() > 0)
+ {
+ if (yyextra->current_root->type.length() > 0) yyextra->current_root->type += " ";
+ yyextra->current_root->type += rght;
+ }
+ if (yyextra->argType.stripWhiteSpace().length() > 0)
+ {
+ if (yyextra->current_root->type.length() > 0) yyextra->current_root->type += " ";
+ yyextra->current_root->type += yyextra->argType.stripWhiteSpace();
+ }
+ if (yyextra->current_root->type.length() > 0) yyextra->current_root->type += " ";
+ yyextra->current_root->type += "function";
+ if (!yyextra->docBlock.isNull())
+ {
+ subrHandleCommentBlockResult(yyscanner,yyextra->docBlock,TRUE);
+ }
+ }
+ else
+ {
+ yyextra->current_root->type += " " + yyextra->argType.stripWhiteSpace();
+ }
+ yyextra->current_root->type = yyextra->current_root->type.stripWhiteSpace();
+ yyextra->modifiers[yyextra->current_root][name.lower()].type = yyextra->current_root->type;
+ }
+ else
+ {
+ yyextra->modifiers[yyextra->current_root][name.lower()].type = yyextra->argType;
+ }
}
+ // any accumulated doc for argument should be emptied,
+ // because it is handled other way and this doc can be
+ // unexpectedly passed to the next member.
+ yyextra->current->doc.resize(0);
+ yyextra->current->brief.resize(0);
}
- else if (!argType.isEmpty())
- { // declaration of parameter list: add type for corr. parameter
- parameter = getParameter(argName);
- if (parameter)
- {
- v_type= V_PARAMETER;
- if (!argType.isNull()) parameter->type=argType.stripWhiteSpace();
- if (!docBlock.isNull())
- {
- subrHandleCommentBlock(docBlock,TRUE);
- }
- }
- // save, it may be function return type
- if (parameter)
- {
- modifiers[current_root][name.lower()].type = argType;
- }
- else
- {
- if ((current_root->name.lower() == argName.lower()) ||
- (modifiers[current_root->parent()][current_root->name.lower()].returnName.lower() == argName.lower()))
- {
- int strt = current_root->type.find("function");
- QCString lft;
- QCString rght;
- if (strt != -1)
- {
- v_type = V_RESULT;
- lft = "";
- rght = "";
- if (strt != 0) lft = current_root->type.left(strt).stripWhiteSpace();
- if ((current_root->type.length() - strt - strlen("function"))!= 0)
- {
- rght = current_root->type.right(current_root->type.length() - strt - strlen("function")).stripWhiteSpace();
- }
- current_root->type = lft;
- if (rght.length() > 0)
- {
- if (current_root->type.length() > 0) current_root->type += " ";
- current_root->type += rght;
- }
- if (argType.stripWhiteSpace().length() > 0)
- {
- if (current_root->type.length() > 0) current_root->type += " ";
- current_root->type += argType.stripWhiteSpace();
- }
- if (current_root->type.length() > 0) current_root->type += " ";
- current_root->type += "function";
- if (!docBlock.isNull())
- {
- subrHandleCommentBlockResult(docBlock,TRUE);
- }
- }
- else
- {
- current_root->type += " " + argType.stripWhiteSpace();
- }
- current_root->type = current_root->type.stripWhiteSpace();
- modifiers[current_root][name.lower()].type = current_root->type;
- }
- else
- {
- modifiers[current_root][name.lower()].type = argType;
- }
- }
- // any accumulated doc for argument should be emptied,
- // because it is handled other way and this doc can be
- // unexpectedly passed to the next member.
- current->doc.resize(0);
- current->brief.resize(0);
- }
- }
-<Variable>{ARGS} { /* dimension of the previous entry. */
- QCString name(argName);
- QCString attr("dimension");
- attr += yytext;
- modifiers[current_root][name.lower()] |= attr;
- }
-<Variable>{COMMA} { //printf("COMMA: %d<=..<=%d\n", yyColNr-(int)yyleng, yyColNr);
- // locate !< comment
- updateVariablePrepassComment(yyColNr-(int)yyleng, yyColNr);
- }
+ }
+<Variable>{ARGS} { /* dimension of the previous entry. */
+ QCString name(yyextra->argName);
+ QCString attr("dimension");
+ attr += yytext;
+ yyextra->modifiers[yyextra->current_root][name.lower()] |= attr;
+ }
+<Variable>{COMMA} { //printf("COMMA: %d<=..<=%d\n", yyextra->colNr-(int)yyleng, yyextra->colNr);
+ // locate !< comment
+ updateVariablePrepassComment(yyscanner,yyextra->colNr-(int)yyleng, yyextra->colNr);
+ }
<Variable>{BS}"=" {
- yy_push_state(YY_START);
- initializer="=";
- initializerScope = initializerArrayScope = 0;
- BEGIN(Initialization);
- }
-<Variable>"\n" { currentModifiers = SymbolModifiers();
- yy_pop_state(); // end variable declaration list
- newLine();
- docBlock.resize(0);
- }
-<Variable>";".*"\n" { currentModifiers = SymbolModifiers();
- yy_pop_state(); // end variable declaration list
- docBlock.resize(0);
- inputStringSemi =(const char*)(QCString(" \n") + QCString(yytext+1)).data();
- yyLineNr--;
- pushBuffer(inputStringSemi);
+ yy_push_state(YY_START,yyscanner);
+ yyextra->initializer="=";
+ yyextra->initializerScope = yyextra->initializerArrayScope = 0;
+ BEGIN(Initialization);
+ }
+<Variable>"\n" { yyextra->currentModifiers = SymbolModifiers();
+ yy_pop_state(yyscanner); // end variable declaration list
+ newLine(yyscanner);
+ yyextra->docBlock.resize(0);
+ }
+<Variable>";".*"\n" { yyextra->currentModifiers = SymbolModifiers();
+ yy_pop_state(yyscanner); // end variable declaration list
+ yyextra->docBlock.resize(0);
+ yyextra->inputStringSemi =(const char*)(QCString(" \n") + QCString(yytext+1)).data();
+ yyextra->lineNr--;
+ pushBuffer(yyscanner,yyextra->inputStringSemi);
}
<*>";".*"\n" {
- if (YY_START == Variable) REJECT; // Just be on the safe side
+ if (YY_START == Variable) REJECT; // Just be on the safe side
if (YY_START == String) REJECT; // ";" ignored in strings
- if (YY_START == StrIgnore) REJECT; // ";" ignored in regular comments
- inputStringSemi =(const char*)(QCString(" \n") + QCString(yytext+1)).data();
- yyLineNr--;
- pushBuffer(inputStringSemi);
+ if (YY_START == StrIgnore) REJECT; // ";" ignored in regular yyextra->comments
+ yyextra->inputStringSemi =(const char*)(QCString(" \n") + QCString(yytext+1)).data();
+ yyextra->lineNr--;
+ pushBuffer(yyscanner,yyextra->inputStringSemi);
}
<Initialization,ArrayInitializer>"[" |
-<Initialization,ArrayInitializer>"(/" { initializer+=yytext;
- initializerArrayScope++;
- BEGIN(ArrayInitializer); // initializer may contain comma
+<Initialization,ArrayInitializer>"(/" { yyextra->initializer+=yytext;
+ yyextra->initializerArrayScope++;
+ BEGIN(ArrayInitializer); // initializer may contain comma
}
<ArrayInitializer>"]" |
-<ArrayInitializer>"/)" { initializer+=yytext;
- initializerArrayScope--;
- if(initializerArrayScope<=0)
- {
- initializerArrayScope = 0; // just in case
- BEGIN(Initialization);
- }
+<ArrayInitializer>"/)" { yyextra->initializer+=yytext;
+ yyextra->initializerArrayScope--;
+ if (yyextra->initializerArrayScope<=0)
+ {
+ yyextra->initializerArrayScope = 0; // just in case
+ BEGIN(Initialization);
+ }
+ }
+<ArrayInitializer>. { yyextra->initializer+=yytext; }
+<Initialization>"(" { yyextra->initializerScope++;
+ yyextra->initializer+=yytext;
}
-<ArrayInitializer>. { initializer+=yytext; }
-<Initialization>"(" { initializerScope++;
- initializer+=yytext;
- }
-<Initialization>")" { initializerScope--;
- initializer+=yytext;
- }
-<Initialization>{COMMA} { if (initializerScope == 0)
- {
- updateVariablePrepassComment(yyColNr-(int)yyleng, yyColNr);
- yy_pop_state(); // end initialization
- if (last_enum)
+<Initialization>")" { yyextra->initializerScope--;
+ yyextra->initializer+=yytext;
+ }
+<Initialization>{COMMA} { if (yyextra->initializerScope == 0)
+ {
+ updateVariablePrepassComment(yyscanner,yyextra->colNr-(int)yyleng, yyextra->colNr);
+ yy_pop_state(yyscanner); // end initialization
+ if (yyextra->last_enum)
{
- last_enum->initializer= initializer;
+ yyextra->last_enum->initializer= yyextra->initializer;
}
else
{
- if (v_type == V_VARIABLE) last_entry->initializer= initializer;
+ if (yyextra->vtype == V_VARIABLE) yyextra->last_entry->initializer= yyextra->initializer;
}
- }
- else
- initializer+=", ";
- }
+ }
+ else
+ {
+ yyextra->initializer+=", ";
+ }
+ }
<Initialization>"\n"|"!" { //|
- yy_pop_state(); // end initialization
- if (last_enum)
+ yy_pop_state(yyscanner); // end initialization
+ if (yyextra->last_enum)
{
- last_enum->initializer= initializer;
+ yyextra->last_enum->initializer= yyextra->initializer;
}
else
{
- if (v_type == V_VARIABLE) last_entry->initializer= initializer;
+ if (yyextra->vtype == V_VARIABLE) yyextra->last_entry->initializer= yyextra->initializer;
}
- yyColNr -= 1;
- unput(*yytext);
+ yyextra->colNr -= 1;
+ unput(*yytext);
}
-<Initialization>. { initializer+=yytext; }
+<Initialization>. { yyextra->initializer+=yytext; }
<*>{BS}"enum"{BS}","{BS}"bind"{BS}"("{BS}"c"{BS}")"{BS} {
- if(YY_START == Start)
+ if (YY_START == Start)
{
- addModule(NULL);
- yy_push_state(ModuleBody); //anon program
+ addModule(yyscanner,NULL);
+ yy_push_state(ModuleBody,yyscanner); //anon program
}
- yy_push_state(Enum);
- current->protection = defaultProtection;
- typeProtection = defaultProtection;
- typeMode = true;
-
- current->spec |= Entry::Struct;
- current->name.resize(0);
- current->args.resize(0);
- current->name.sprintf("@%d",anonCount++);
-
- current->section = Entry::ENUM_SEC;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
- if ((current_root) &&
- (current_root->section == Entry::CLASS_SEC
- || current_root->section == Entry::NAMESPACE_SEC))
+ yy_push_state(Enum,yyscanner);
+ yyextra->current->protection = yyextra->defaultProtection;
+ yyextra->typeProtection = yyextra->defaultProtection;
+ yyextra->typeMode = true;
+
+ yyextra->current->spec |= Entry::Struct;
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->name.sprintf("@%d",yyextra->anonCount++);
+
+ yyextra->current->section = Entry::ENUM_SEC;
+ yyextra->current->fileName = yyextra->fileName;
+ yyextra->current->startLine = yyextra->lineNr;
+ yyextra->current->bodyLine = yyextra->lineNr;
+ if ((yyextra->current_root) &&
+ (yyextra->current_root->section == Entry::CLASS_SEC ||
+ yyextra->current_root->section == Entry::NAMESPACE_SEC))
{
- current->name = current_root->name + "::" + current->name;
+ yyextra->current->name = yyextra->current_root->name + "::" + yyextra->current->name;
}
- addCurrentEntry(true);
- startScope(last_entry.get());
- BEGIN( Enum ) ;
+ addCurrentEntry(yyscanner,true);
+ startScope(yyscanner,yyextra->last_entry.get());
+ BEGIN( Enum ) ;
}
<Enum>"end"{BS}"enum" {
- last_entry->parent()->endBodyLine = yyLineNr;
- if (!endScope(current_root))
+ yyextra->last_entry->parent()->endBodyLine = yyextra->lineNr;
+ if (!endScope(yyscanner,yyextra->current_root))
+ {
yyterminate();
- typeMode = false;
- yy_pop_state();
+ }
+ yyextra->typeMode = false;
+ yy_pop_state(yyscanner);
}
/*------ fortran subroutine/function handling ------------------------------------------------------------*/
/* Start is initial condition */
<Start,ModuleBody,SubprogBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains>^{BS}({PREFIX}{BS_})?{TYPE_SPEC}{BS}({PREFIX}{BS_})?/{SUBPROG}{BS_} {
- if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
- {
- addInterface("$interface$", ifType);
- startScope(last_entry.get());
- }
+ if (yyextra->ifType == IF_ABSTRACT || yyextra->ifType == IF_SPECIFIC)
+ {
+ addInterface(yyscanner,"$interface$", yyextra->ifType);
+ startScope(yyscanner,yyextra->last_entry.get());
+ }
- // TYPE_SPEC is for old function style function result
- result = QCString(yytext).stripWhiteSpace().lower();
- current->type = result;
- yy_push_state(SubprogPrefix);
- }
-
-<SubprogPrefix>{BS}{SUBPROG}{BS_} {
- // Fortran subroutine or function found
- v_type = V_IGNORE;
- result=yytext;
- result=result.stripWhiteSpace();
- addSubprogram(result);
- BEGIN(Subprog);
- current->bodyLine = yyLineNr + lineCountPrepass + 1; // we have to be at the line after the definition and we have to take continuation lines into account.
- current->startLine = yyLineNr;
- }
+ // TYPE_SPEC is for old function style function result
+ QCString result = QCString(yytext).stripWhiteSpace().lower();
+ yyextra->current->type = result;
+ yy_push_state(SubprogPrefix,yyscanner);
+ }
+
+<SubprogPrefix>{BS}{SUBPROG}{BS_} {
+ // Fortran subroutine or function found
+ yyextra->vtype = V_IGNORE;
+ QCString result=yytext;
+ result=result.stripWhiteSpace();
+ addSubprogram(yyscanner,result);
+ BEGIN(Subprog);
+ yyextra->current->bodyLine = yyextra->lineNr + yyextra->lineCountPrepass + 1; // we have to be at the line after the definition and we have to take continuation lines into account.
+ yyextra->current->startLine = yyextra->lineNr;
+ }
<Start,ModuleBody,SubprogBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains>^{BS}({PREFIX}{BS_})?{SUBPROG}{BS_} {
- // Fortran subroutine or function found
- v_type = V_IGNORE;
- if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
- {
- addInterface("$interface$", ifType);
- startScope(last_entry.get());
- }
+ // Fortran subroutine or function found
+ yyextra->vtype = V_IGNORE;
+ if (yyextra->ifType == IF_ABSTRACT || yyextra->ifType == IF_SPECIFIC)
+ {
+ addInterface(yyscanner,"$interface$", yyextra->ifType);
+ startScope(yyscanner,yyextra->last_entry.get());
+ }
+
+ QCString result = QCString(yytext).stripWhiteSpace();
+ addSubprogram(yyscanner,result);
+ yy_push_state(Subprog,yyscanner);
+ yyextra->current->bodyLine = yyextra->lineNr + yyextra->lineCountPrepass + 1; // we have to be at the line after the definition and we have to take continuation lines into account.
+ yyextra->current->startLine = yyextra->lineNr;
+ }
+
+<Subprog>{BS} { /* ignore white space */ }
+<Subprog>{ID} { yyextra->current->name = yytext;
+ //cout << "1a==========> got " << yyextra->current->type << " " << yytext << " " << yyextra->lineNr << endl;
+ yyextra->modifiers[yyextra->current_root][yyextra->current->name.lower()].returnName = yyextra->current->name.lower();
+
+ if (yyextra->ifType == IF_ABSTRACT || yyextra->ifType == IF_SPECIFIC)
+ {
+ yyextra->current_root->name.replace(QRegExp("\\$interface\\$"), yytext);
+ }
- result = QCString(yytext).stripWhiteSpace();
- addSubprogram(result);
- yy_push_state(Subprog);
- current->bodyLine = yyLineNr + lineCountPrepass + 1; // we have to be at the line after the definition and we have to take continuation lines into account.
- current->startLine = yyLineNr;
- }
-
-<Subprog>{BS} { /* ignore white space */ }
-<Subprog>{ID} { current->name = yytext;
- //cout << "1a==========> got " << current->type << " " << yytext << " " << yyLineNr << endl;
- modifiers[current_root][current->name.lower()].returnName = current->name.lower();
-
- if (ifType == IF_ABSTRACT || ifType == IF_SPECIFIC)
- {
- current_root->name.replace(QRegExp("\\$interface\\$"), yytext);
+ BEGIN(Parameterlist);
+ }
+<Parameterlist>"(" { yyextra->current->args = "("; }
+<Parameterlist>")" {
+ yyextra->current->args += ")";
+ yyextra->current->args = removeRedundantWhiteSpace(yyextra->current->args);
+ addCurrentEntry(yyscanner,true);
+ startScope(yyscanner,yyextra->last_entry.get());
+ BEGIN(SubprogBody);
+ }
+<Parameterlist>{COMMA}|{BS} { yyextra->current->args += yytext;
+ CommentInPrepass *c = locatePrepassComment(yyscanner,yyextra->colNr-(int)yyleng, yyextra->colNr);
+ if (c!=NULL)
+ {
+ if (!yyextra->current->argList.empty())
+ {
+ yyextra->current->argList.back().docs = c->str;
+ }
+ }
+ }
+<Parameterlist>{ID} {
+ //yyextra->current->type not yet available
+ QCString param = yytext;
+ // std::cout << "3=========> got parameter " << param << std::endl;
+ yyextra->current->args += param;
+ Argument arg;
+ arg.name = param;
+ yyextra->current->argList.push_back(arg);
+ }
+<Parameterlist>{NOARGS} {
+ newLine(yyscanner);
+ //printf("3=========> without parameterlist \n");
+ addCurrentEntry(yyscanner,true);
+ startScope(yyscanner,yyextra->last_entry.get());
+ BEGIN(SubprogBody);
+ }
+<SubprogBody>result{BS}\({BS}{ID} {
+ if (yyextra->functionLine)
+ {
+ QCString result= yytext;
+ result= result.right(result.length()-result.find("(")-1);
+ result= result.stripWhiteSpace();
+ yyextra->modifiers[yyextra->current_root->parent()][yyextra->current_root->name.lower()].returnName = result;
+ }
+ //cout << "=====> got result " << result << endl;
}
- BEGIN(Parameterlist);
- }
-<Parameterlist>"(" { current->args = "("; }
-<Parameterlist>")" {
- current->args += ")";
- current->args = removeRedundantWhiteSpace(current->args);
- addCurrentEntry(true);
- startScope(last_entry.get());
- BEGIN(SubprogBody);
- }
-<Parameterlist>{COMMA}|{BS} { current->args += yytext;
- CommentInPrepass *c = locatePrepassComment(yyColNr-(int)yyleng, yyColNr);
- if (c!=NULL)
- {
- if (!current->argList.empty())
- {
- current->argList.back().docs = c->str;
- }
- }
- }
-<Parameterlist>{ID} {
- //current->type not yet available
- QCString param = yytext;
- // std::cout << "3=========> got parameter " << param << std::endl;
- current->args += param;
- Argument arg;
- arg.name = param;
- current->argList.push_back(arg);
- }
-<Parameterlist>{NOARGS} {
- newLine();
- //printf("3=========> without parameterlist \n");
- addCurrentEntry(true);
- startScope(last_entry.get());
- BEGIN(SubprogBody);
-}
-<SubprogBody>result{BS}\({BS}{ID} {
- if (functionLine)
- {
- result= yytext;
- result= result.right(result.length()-result.find("(")-1);
- result= result.stripWhiteSpace();
- modifiers[current_root->parent()][current_root->name.lower()].returnName = result;
- }
- //cout << "=====> got result " << result << endl;
- }
-
- /*---- documentation comments --------------------------------------------------------------------*/
+ /*---- documentation yyextra->comments --------------------------------------------------------------------*/
<Variable,SubprogBody,ModuleBody,TypedefBody,TypedefBodyContains>"!<" { /* backward docu comment */
- if (v_type != V_IGNORE) {
- current->docLine = yyLineNr;
- docBlockJavaStyle = FALSE;
- docBlock.resize(0);
- docBlockJavaStyle = Config_getBool(JAVADOC_AUTOBRIEF);
- startCommentBlock(TRUE);
- yy_push_state(DocBackLine);
+ if (yyextra->vtype != V_IGNORE)
+ {
+ yyextra->current->docLine = yyextra->lineNr;
+ yyextra->docBlockJavaStyle = FALSE;
+ yyextra->docBlock.resize(0);
+ yyextra->docBlockJavaStyle = Config_getBool(JAVADOC_AUTOBRIEF);
+ startCommentBlock(yyscanner,TRUE);
+ yy_push_state(DocBackLine,yyscanner);
}
else
{
/* handle out of place !< comment as a normal comment */
- if (YY_START == String) { yyColNr -= (int)yyleng; REJECT; } // "!" is ignored in strings
- // skip comment line (without docu comments "!>" "!<" )
- /* ignore further "!" and ignore comments in Strings */
- if ((YY_START != StrIgnore) && (YY_START != String))
- {
- yy_push_state(YY_START);
- BEGIN(StrIgnore);
- debugStr="*!";
- }
+ if (YY_START == String)
+ {
+ yyextra->colNr -= (int)yyleng;
+ REJECT;
+ } // "!" is ignored in strings
+ // skip comment line (without docu yyextra->comments "!>" "!<" )
+ /* ignore further "!" and ignore yyextra->comments in Strings */
+ if ((YY_START != StrIgnore) && (YY_START != String))
+ {
+ yy_push_state(YY_START,yyscanner);
+ BEGIN(StrIgnore);
+ yyextra->debugStr="*!";
+ }
}
- }
-<DocBackLine>.* { // contents of current comment line
- docBlock+=yytext;
- }
-<DocBackLine>"\n"{BS}"!"("<"|"!"+) { // comment block (next line is also comment line)
- docBlock+="\n"; // \n is necessary for lists
- newLine();
- }
-<DocBackLine>"\n" { // comment block ends at the end of this line
- //cout <<"3=========> comment block : "<< docBlock << endl;
- yyColNr -= 1;
- unput(*yytext);
- if (v_type == V_VARIABLE)
- {
- std::shared_ptr<Entry> tmp_entry = current;
+ }
+<DocBackLine>.* { // contents of yyextra->current comment line
+ yyextra->docBlock+=yytext;
+ }
+<DocBackLine>"\n"{BS}"!"("<"|"!"+) { // comment block (next line is also comment line)
+ yyextra->docBlock+="\n"; // \n is necessary for lists
+ newLine(yyscanner);
+ }
+<DocBackLine>"\n" { // comment block ends at the end of this line
+ //cout <<"3=========> comment block : "<< yyextra->docBlock << endl;
+ yyextra->colNr -= 1;
+ unput(*yytext);
+ if (yyextra->vtype == V_VARIABLE)
+ {
+ std::shared_ptr<Entry> tmp_entry = yyextra->current;
// temporarily switch to the previous entry
- if (last_enum)
+ if (yyextra->last_enum)
{
- current = last_enum;
+ yyextra->current = yyextra->last_enum;
}
else
{
- current = last_entry;
+ yyextra->current = yyextra->last_entry;
}
- handleCommentBlock(docBlock,TRUE);
+ handleCommentBlock(yyscanner,yyextra->docBlock,TRUE);
// switch back
- current = tmp_entry;
+ yyextra->current = tmp_entry;
}
- else if (v_type == V_PARAMETER)
- {
- subrHandleCommentBlock(docBlock,TRUE);
+ else if (yyextra->vtype == V_PARAMETER)
+ {
+ subrHandleCommentBlock(yyscanner,yyextra->docBlock,TRUE);
}
- else if (v_type == V_RESULT)
- {
- subrHandleCommentBlockResult(docBlock,TRUE);
+ else if (yyextra->vtype == V_RESULT)
+ {
+ subrHandleCommentBlockResult(yyscanner,yyextra->docBlock,TRUE);
}
- yy_pop_state();
- docBlock.resize(0);
+ yy_pop_state(yyscanner);
+ yyextra->docBlock.resize(0);
}
<Start,SubprogBody,ModuleBody,TypedefBody,InterfaceBody,ModuleBodyContains,SubprogBodyContains,TypedefBodyContains,Enum>"!>" {
- yy_push_state(YY_START);
- current->docLine = yyLineNr;
- docBlockJavaStyle = FALSE;
- if (YY_START==SubprogBody) docBlockInBody = TRUE;
- docBlock.resize(0);
- docBlockJavaStyle = Config_getBool(JAVADOC_AUTOBRIEF);
- startCommentBlock(TRUE);
- BEGIN(DocBlock);
+ yy_push_state(YY_START,yyscanner);
+ yyextra->current->docLine = yyextra->lineNr;
+ yyextra->docBlockJavaStyle = FALSE;
+ if (YY_START==SubprogBody) yyextra->docBlockInBody = TRUE;
+ yyextra->docBlock.resize(0);
+ yyextra->docBlockJavaStyle = Config_getBool(JAVADOC_AUTOBRIEF);
+ startCommentBlock(yyscanner,TRUE);
+ BEGIN(DocBlock);
//cout << "start DocBlock " << endl;
- }
-
-<DocBlock>.* { // contents of current comment line
- docBlock+=yytext;
- }
-<DocBlock>"\n"{BS}"!"(">"|"!"+) { // comment block (next line is also comment line)
- docBlock+="\n"; // \n is necessary for lists
- newLine();
- }
-<DocBlock>"\n" { // comment block ends at the end of this line
- //cout <<"3=========> comment block : "<< docBlock << endl;
- yyColNr -= 1;
- unput(*yytext);
- handleCommentBlock(docBlock,TRUE);
- yy_pop_state();
- }
+ }
+
+<DocBlock>.* { // contents of yyextra->current comment line
+ yyextra->docBlock+=yytext;
+ }
+<DocBlock>"\n"{BS}"!"(">"|"!"+) { // comment block (next line is also comment line)
+ yyextra->docBlock+="\n"; // \n is necessary for lists
+ newLine(yyscanner);
+ }
+<DocBlock>"\n" { // comment block ends at the end of this line
+ //cout <<"3=========> comment block : "<< yyextra->docBlock << endl;
+ yyextra->colNr -= 1;
+ unput(*yytext);
+ handleCommentBlock(yyscanner,yyextra->docBlock,TRUE);
+ yy_pop_state(yyscanner);
+ }
/*-----Prototype parsing -------------------------------------------------------------------------*/
-<Prototype>{BS}{SUBPROG}{BS_} {
- BEGIN(PrototypeSubprog);
- }
+<Prototype>{BS}{SUBPROG}{BS_} {
+ BEGIN(PrototypeSubprog);
+ }
<Prototype,PrototypeSubprog>{BS}{SCOPENAME}?{BS}{ID} {
- current->name = QCString(yytext).lower();
- current->name.stripWhiteSpace();
- BEGIN(PrototypeArgs);
- }
+ yyextra->current->name = QCString(yytext).lower();
+ yyextra->current->name.stripWhiteSpace();
+ BEGIN(PrototypeArgs);
+ }
<PrototypeArgs>{
-"("|")"|","|{BS_} { current->args += yytext; }
-{ID} { current->args += yytext;
- Argument a;
- a.name = QCString(yytext).lower();
- current->argList.push_back(a);
- }
+"("|")"|","|{BS_} { yyextra->current->args += yytext; }
+{ID} { yyextra->current->args += yytext;
+ Argument a;
+ a.name = QCString(yytext).lower();
+ yyextra->current->argList.push_back(a);
+ }
}
/*------------------------------------------------------------------------------------------------*/
<*>"\n" {
- newLine();
- //if (debugStr.stripWhiteSpace().length() > 0) cout << "ignored text: " << debugStr << " state: " <<YY_START << endl;
- debugStr="";
+ newLine(yyscanner);
+ //if (yyextra->debugStr.stripWhiteSpace().length() > 0) cout << "ignored text: " << yyextra->debugStr << " state: " <<YY_START << endl;
+ yyextra->debugStr="";
}
/*---- error: EOF in wrong state --------------------------------------------------------------------*/
<*><<EOF>> {
- if (parsingPrototype) {
- yyterminate();
-
- } else if ( include_stack_ptr <= 0 ) {
- if (YY_START!=INITIAL && YY_START!=Start) {
+ if (yyextra->parsingPrototype)
+ {
+ yyterminate();
+ }
+ else if ( yyextra->includeStackPtr <= 0 )
+ {
+ if (YY_START!=INITIAL && YY_START!=Start)
+ {
DBG_CTX((stderr,"==== Error: EOF reached in wrong state (end missing)"));
- scanner_abort();
+ scanner_abort(yyscanner);
}
yyterminate();
- } else {
- popBuffer();
+ }
+ else
+ {
+ popBuffer(yyscanner);
}
}
<*>{LOG_OPER} { // Fortran logical comparison keywords
}
-<*>. {
- //debugStr+=yytext;
- //printf("I:%c\n", *yytext);
+<*>. {
+ //yyextra->debugStr+=yytext;
+ //printf("I:%c\n", *yytext);
} // ignore remaining text
/**********************************************************************************/
@@ -1323,63 +1355,53 @@ private {
%%
//----------------------------------------------------------------------------
-#if 0
-static void extractPrefix(QCString &text)
+static void newLine(yyscan_t yyscanner)
{
- int prefixIndex = 0;
- int curIndex = 0;
- bool cont = TRUE;
- const char* pre[] = {"RECURSIVE","IMPURE","PURE","ELEMENTAL"};
- while(cont)
- {
- cont = FALSE;
- for(unsigned int i=0; i<4; i++)
- {
- if((prefixIndex=text.find(pre[i], curIndex, FALSE))==0)
- {
- text.remove(0,strlen(pre[i]));
- text.stripWhiteSpace();
- cont = TRUE;
- }
- }
- }
-}
-#endif
-
-static void newLine() {
- yyLineNr++;
- yyLineNr+=lineCountPrepass;
- lineCountPrepass=0;
- comments.clear();
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->lineNr++;
+ yyextra->lineNr+=yyextra->lineCountPrepass;
+ yyextra->lineCountPrepass=0;
+ yyextra->comments.clear();
}
-static CommentInPrepass* locatePrepassComment(int from, int to) {
+static CommentInPrepass* locatePrepassComment(yyscan_t yyscanner,int from, int to)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("Locate %d-%d\n", from, to);
- for(uint i=0; i<comments.count(); i++) { // todo: optimize
- int c = comments.at(i)->column;
+ for (uint i=0; i<yyextra->comments.count(); i++)
+ { // todo: optimize
+ int c = yyextra->comments.at(i)->column;
//printf("Candidate %d\n", c);
- if (c>=from && c<=to) {
+ if (c>=from && c<=to)
+ {
// comment for previous variable or parameter
- return comments.at(i);
+ return yyextra->comments.at(i);
}
}
return NULL;
}
-static void updateVariablePrepassComment(int from, int to) {
- CommentInPrepass *c = locatePrepassComment(from, to);
- if (c!=NULL && v_type == V_VARIABLE) {
- last_entry->brief = c->str;
- } else if (c!=NULL && v_type == V_PARAMETER) {
- Argument *parameter = getParameter(argName);
+static void updateVariablePrepassComment(yyscan_t yyscanner,int from, int to)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ CommentInPrepass *c = locatePrepassComment(yyscanner,from, to);
+ if (c!=NULL && yyextra->vtype == V_VARIABLE)
+ {
+ yyextra->last_entry->brief = c->str;
+ }
+ else if (c!=NULL && yyextra->vtype == V_PARAMETER)
+ {
+ Argument *parameter = getParameter(yyscanner,yyextra->argName);
if (parameter) parameter->docs = c->str;
}
}
static int getAmpersandAtTheStart(const char *buf, int length)
{
- for(int i=0; i<length; i++) {
- switch(buf[i]) {
+ for(int i=0; i<length; i++)
+ {
+ switch(buf[i])
+ {
case ' ':
case '\t':
break;
@@ -1395,7 +1417,7 @@ static int getAmpersandAtTheStart(const char *buf, int length)
/* Returns ampersand index, comment start index or -1 if neither exist.*/
static int getAmpOrExclAtTheEnd(const char *buf, int length, char ch)
{
- // Avoid ampersands in string and comments
+ // Avoid ampersands in string and yyextra->comments
int parseState = Start;
char quoteSymbol = 0;
int ampIndex = -1;
@@ -1407,9 +1429,9 @@ static int getAmpOrExclAtTheEnd(const char *buf, int length, char ch)
{
// When in string, skip backslashes
// Legacy code, not sure whether this is correct?
- if(parseState==String)
+ if (parseState==String)
{
- if(buf[i]=='\\') i++;
+ if (buf[i]=='\\') i++;
}
switch(buf[i])
@@ -1418,13 +1440,13 @@ static int getAmpOrExclAtTheEnd(const char *buf, int length, char ch)
case '"':
// Close string, if quote symbol matches.
// Quote symbol is set iff parseState==String
- if(buf[i]==quoteSymbol)
+ if (buf[i]==quoteSymbol)
{
parseState = Start;
quoteSymbol = 0;
}
// Start new string, if not already in string or comment
- else if(parseState==Start)
+ else if (parseState==Start)
{
parseState = String;
quoteSymbol = buf[i];
@@ -1433,7 +1455,7 @@ static int getAmpOrExclAtTheEnd(const char *buf, int length, char ch)
break;
case '!':
// When in string or comment, ignore exclamation mark
- if(parseState==Start)
+ if (parseState==Start)
{
parseState = Comment;
commentIndex = i;
@@ -1457,19 +1479,20 @@ static int getAmpOrExclAtTheEnd(const char *buf, int length, char ch)
return commentIndex;
}
-/* Although comments at the end of continuation line are grabbed by this function,
+/* Although yyextra->comments at the end of continuation line are grabbed by this function,
* we still do not know how to use them later in parsing.
*/
-void truncatePrepass(int index)
+void truncatePrepass(yyscan_t yyscanner,int index)
{
- int length = inputStringPrepass.length();
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ int length = yyextra->inputStringPrepass.length();
for (int i=index+1; i<length; i++) {
- if (inputStringPrepass[i]=='!' && i<length-1 && inputStringPrepass[i+1]=='<') { // save comment
- struct CommentInPrepass *c=new CommentInPrepass(index, inputStringPrepass.right(length-i-2));
- comments.append(c);
+ if (yyextra->inputStringPrepass[i]=='!' && i<length-1 && yyextra->inputStringPrepass[i+1]=='<') { // save comment
+ struct CommentInPrepass *c=new CommentInPrepass(index, yyextra->inputStringPrepass.right(length-i-2));
+ yyextra->comments.append(c);
}
}
- inputStringPrepass.truncate(index);
+ yyextra->inputStringPrepass.truncate(index);
}
// simplified way to know if this is fixed form
@@ -1500,16 +1523,16 @@ bool recognizeFixedForm(const char* contents, FortranFormat format)
case 'C':
case 'c':
case '*':
- if(column==1) return TRUE;
- if(skipLine) break;
+ if (column==1) return TRUE;
+ if (skipLine) break;
return FALSE;
case '!':
- if(column>1 && column<7) return FALSE;
+ if (column>1 && column<7) return FALSE;
skipLine=TRUE;
break;
default:
- if(skipLine) break;
- if(column==7) return TRUE;
+ if (skipLine) break;
+ if (column==7) return TRUE;
return FALSE;
}
}
@@ -1526,7 +1549,7 @@ static void insertCharacter(char *contents, int length, int pos, char c)
contents[pos] = c;
}
-/* change comments and bring line continuation character to previous line */
+/* change yyextra->comments and bring line continuation character to previous line */
/* also used to set continuation marks in case of fortran code usage, done here as it is quite complicated code */
const char* prepassFixedForm(const char* contents, int *hasContLine)
{
@@ -1572,7 +1595,7 @@ const char* prepassFixedForm(const char* contents, int *hasContLine)
}
j++;
- if(j>=newContentsSize-3) { // check for spare characters, which may be eventually used below (by & and '! ')
+ if (j>=newContentsSize-3) { // check for spare characters, which may be eventually used below (by & and '! ')
newContents = (char*)realloc(newContents, newContentsSize+1000);
newContentsSize = newContentsSize+1000;
}
@@ -1603,7 +1626,7 @@ const char* prepassFixedForm(const char* contents, int *hasContLine)
spaces=TRUE;
fullCommentLine=TRUE;
column=0;
- emptyLabel=TRUE;
+ emptyLabel=TRUE;
commented=FALSE;
newContents[j]=c;
prevQuote = thisQuote;
@@ -1633,10 +1656,10 @@ const char* prepassFixedForm(const char* contents, int *hasContLine)
case '\'':
case '\\':
if ((column <= fixedCommentAfter) && (column!=6) && !commented)
- {
+ {
// we have some special cases in respect to strings and escaped string characters
fullCommentLine=FALSE;
- newContents[j]=c;
+ newContents[j]=c;
if (c == '\\')
{
inBackslash = !inBackslash;
@@ -1671,71 +1694,89 @@ const char* prepassFixedForm(const char* contents, int *hasContLine)
case '*':
case '!':
if ((column <= fixedCommentAfter) && (column!=6))
- {
- emptyLabel=FALSE;
- if(column==1)
+ {
+ emptyLabel=FALSE;
+ if (column==1)
{
- newContents[j]='!';
+ newContents[j]='!';
commented = TRUE;
}
- else if ((c == '!') && !inDouble && !inSingle)
+ else if ((c == '!') && !inDouble && !inSingle)
{
- newContents[j]=c;
+ newContents[j]=c;
commented = TRUE;
}
- else
+ else
{
if (!commented) fullCommentLine=FALSE;
- newContents[j]=c;
+ newContents[j]=c;
}
- break;
- }
+ break;
+ }
// fallthrough
default:
- if (!commented && (column < 6) && ((c - '0') >= 0) && ((c - '0') <= 9)) { // remove numbers, i.e. labels from first 5 positions.
+ if (!commented && (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
+ 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
+ if (c != '0')
+ { // 0 not allowed as continuation character, see f95 standard paragraph 3.3.2.3
newContents[j]=' ';
- if(prevLineAmpOrExclIndex==-1) { // add & just before end of previous line
+ if (prevLineAmpOrExclIndex==-1)
+ { // add & just before end of previous line
/* first line is not a continuation line in code, just in snippets etc. */
if (curLine != 1) insertCharacter(newContents, j+1, (j+1)-6-1, '&');
j++;
- } else { // add & just before end of previous line comment
+ }
+ else
+ { // add & just before end of previous line comment
/* first line is not a continuation line in code, just in snippets etc. */
if (curLine != 1) insertCharacter(newContents, j+1, (j+1)-6-prevLineLength+prevLineAmpOrExclIndex+skipped, '&');
skipped = 0;
j++;
}
- if (hasContLine) hasContLine[curLine - 1] = 1;
- } else {
- newContents[j]=c; // , just handle like space
+ if (hasContLine)
+ {
+ hasContLine[curLine - 1] = 1;
+ }
+ }
+ else
+ {
+ newContents[j]=c; // , just handle like space
}
prevLineLength=0;
- } else if ((column > fixedCommentAfter) && !commented) {
+ }
+ else if ((column > fixedCommentAfter) && !commented)
+ {
// first non commented non blank character after position fixedCommentAfter
- if (c == '&') {
- newContents[j]=' ';
+ if (c == '&')
+ {
+ newContents[j]=' ';
}
- else if (c != '!') {
+ else if (c != '!')
+ {
// I'm not a possible start of doxygen comment
- newContents[j]=' ';
+ newContents[j]=' ';
artificialComment = TRUE;
spaces=TRUE;
skipped = 0;
}
- else {
- newContents[j]=c;
+ else
+ {
+ newContents[j]=c;
commented = TRUE;
}
- } else {
+ }
+ else
+ {
if (!commented) fullCommentLine=FALSE;
- newContents[j]=c;
- emptyLabel=FALSE;
- }
+ newContents[j]=c;
+ emptyLabel=FALSE;
+ }
break;
}
}
@@ -1756,25 +1797,28 @@ const char* prepassFixedForm(const char* contents, int *hasContLine)
return newContents;
}
-static void pushBuffer(QCString& buffer)
+static void pushBuffer(yyscan_t yyscanner,QCString& buffer)
{
- if (include_stack_cnt <= include_stack_ptr)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->includeStackCnt <= yyextra->includeStackPtr)
{
- include_stack_cnt++;
- include_stack = (YY_BUFFER_STATE *)realloc(include_stack, include_stack_cnt * sizeof(YY_BUFFER_STATE));
+ yyextra->includeStackCnt++;
+ yyextra->includeStack = (YY_BUFFER_STATE *)realloc(yyextra->includeStack, yyextra->includeStackCnt * sizeof(YY_BUFFER_STATE));
}
- include_stack[include_stack_ptr++] = YY_CURRENT_BUFFER;
- yy_switch_to_buffer(yy_scan_string(buffer));
+ yyextra->includeStack[yyextra->includeStackPtr++] = YY_CURRENT_BUFFER;
+ yy_switch_to_buffer(yy_scan_string(buffer,yyscanner),yyscanner);
DBG_CTX((stderr, "--PUSH--%s", (const char *)buffer));
buffer = NULL;
}
-static void popBuffer() {
+static void popBuffer(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
DBG_CTX((stderr, "--POP--"));
- include_stack_ptr --;
- yy_delete_buffer( YY_CURRENT_BUFFER );
- yy_switch_to_buffer( include_stack[include_stack_ptr] );
+ yyextra->includeStackPtr --;
+ yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
+ yy_switch_to_buffer( yyextra->includeStack[yyextra->includeStackPtr], yyscanner );
}
/** used to copy entry to an interface module procedure */
@@ -1795,9 +1839,10 @@ static void copyEntry(std::shared_ptr<Entry> dest, const std::shared_ptr<Entry>
corresponding module subprogs
@TODO: handle procedures in used modules
*/
-void resolveModuleProcedures(Entry *current_root)
+void resolveModuleProcedures(yyscan_t yyscanner,Entry *current_root)
{
- for (const auto &ce1 : moduleProcedures)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ for (const auto &ce1 : yyextra->moduleProcedures)
{
// check all entries in this module
for (const auto &ce2 : current_root->children())
@@ -1806,19 +1851,10 @@ void resolveModuleProcedures(Entry *current_root)
{
copyEntry(ce1, ce2);
}
- } // for procedures in current module
+ } // for procedures in yyextra->current module
} // for all interface module procedures
- moduleProcedures.clear();
-}
-
-#if 0
-static bool isTypeName(QCString name)
-{
- name = name.lower();
- return name=="integer" || name == "real" ||
- name=="complex" || name == "logical";
+ yyextra->moduleProcedures.clear();
}
-#endif
/*! Extracts string which resides within parentheses of provided string. */
static QCString extractFromParens(const QCString name)
@@ -1863,7 +1899,7 @@ static QCString extractBind(const QCString name)
}
}
-/*! Adds passed modifiers to these modifiers.*/
+/*! Adds passed yyextra->modifiers to these yyextra->modifiers.*/
SymbolModifiers& SymbolModifiers::operator|=(const SymbolModifiers &mdfs)
{
if (mdfs.protection!=NONE_P) protection = mdfs.protection;
@@ -1890,7 +1926,7 @@ SymbolModifiers& SymbolModifiers::operator|=(const SymbolModifiers &mdfs)
return *this;
}
-/*! Extracts and adds passed modifier to these modifiers.*/
+/*! Extracts and adds passed modifier to these yyextra->modifiers.*/
SymbolModifiers& SymbolModifiers::operator|=(QCString mdfStringArg)
{
QCString mdfString = mdfStringArg.lower();
@@ -2012,7 +2048,7 @@ static Argument *findArgument(Entry* subprog, QCString name, bool byTypeName = F
for (Argument &arg : subprog->argList)
{
if ((!byTypeName && arg.name.lower() == cname) ||
- (byTypeName && arg.type.lower() == cname)
+ (byTypeName && arg.type.lower() == cname)
)
{
return &arg;
@@ -2022,7 +2058,7 @@ static Argument *findArgument(Entry* subprog, QCString name, bool byTypeName = F
}
-/*! Apply modifiers stored in \a mdfs to the \a typeName string. */
+/*! Apply yyextra->modifiers stored in \a mdfs to the \a typeName string. */
static QCString applyModifiers(QCString typeName, SymbolModifiers& mdfs)
{
if (!mdfs.dimension.isNull())
@@ -2139,14 +2175,14 @@ static QCString applyModifiers(QCString typeName, SymbolModifiers& mdfs)
return typeName;
}
-/*! Apply modifiers stored in \a mdfs to the \a arg argument. */
+/*! Apply yyextra->modifiers stored in \a mdfs to the \a arg argument. */
static void applyModifiers(Argument *arg, SymbolModifiers& mdfs)
{
QCString tmp = arg->type;
arg->type = applyModifiers(tmp, mdfs);
}
-/*! Apply modifiers stored in \a mdfs to the \a ent entry. */
+/*! Apply yyextra->modifiers stored in \a mdfs to the \a ent entry. */
static void applyModifiers(Entry *ent, SymbolModifiers& mdfs)
{
QCString tmp = ent->type;
@@ -2162,47 +2198,49 @@ static void applyModifiers(Entry *ent, SymbolModifiers& mdfs)
* starting module, interface, function or other program block.
* \see endScope()
*/
-static void startScope(Entry *scope)
+static void startScope(yyscan_t yyscanner,Entry *scope)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//cout<<"start scope: "<<scope->name<<endl;
- current_root= scope; /* start substructure */
+ yyextra->current_root= scope; /* start substructure */
QMap<QCString,SymbolModifiers> mdfMap;
- modifiers.insert(scope, mdfMap);
+ yyextra->modifiers.insert(scope, mdfMap);
}
/*! Ends scope in fortran program: may update subprogram arguments or module variable attributes.
* \see startScope()
*/
-static bool endScope(Entry *scope, bool isGlobalRoot)
+static bool endScope(yyscan_t yyscanner,Entry *scope, bool isGlobalRoot)
{
- if (global_scope == scope)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->global_scope == scope)
{
- global_scope = 0;
+ yyextra->global_scope = 0;
return TRUE;
}
- if (global_scope == INVALID_ENTRY)
+ if (yyextra->global_scope == INVALID_ENTRY)
{
return TRUE;
}
//cout<<"end scope: "<<scope->name<<endl;
- if (current_root->parent() || isGlobalRoot)
+ if (yyextra->current_root->parent() || isGlobalRoot)
{
- current_root= current_root->parent(); /* end substructure */
+ yyextra->current_root= yyextra->current_root->parent(); /* end substructure */
}
- else // if (current_root != scope)
+ else // if (yyextra->current_root != scope)
{
fprintf(stderr,"parse error in end <scopename>\n");
- scanner_abort();
+ scanner_abort(yyscanner);
return FALSE;
}
- // update variables or subprogram arguments with modifiers
- QMap<QCString,SymbolModifiers>& mdfsMap = modifiers[scope];
+ // update variables or subprogram arguments with yyextra->modifiers
+ QMap<QCString,SymbolModifiers>& mdfsMap = yyextra->modifiers[scope];
if (scope->section == Entry::FUNCTION_SEC)
{
- // iterate all symbol modifiers of the scope
+ // iterate all symbol yyextra->modifiers of the scope
for (QMap<QCString,SymbolModifiers>::Iterator it=mdfsMap.begin(); it!=mdfsMap.end(); it++)
{
//cout<<it.key()<<": "<<it.data()<<endl;
@@ -2215,12 +2253,12 @@ static bool endScope(Entry *scope, bool isGlobalRoot)
}
// find return type for function
- //cout<<"RETURN NAME "<<modifiers[current_root][scope->name.lower()].returnName<<endl;
- QCString returnName = modifiers[current_root][scope->name.lower()].returnName.lower();
- if (modifiers[scope].contains(returnName))
+ //cout<<"RETURN NAME "<<yyextra->modifiers[yyextra->current_root][scope->name.lower()].returnName<<endl;
+ QCString returnName = yyextra->modifiers[yyextra->current_root][scope->name.lower()].returnName.lower();
+ if (yyextra->modifiers[scope].contains(returnName))
{
- scope->type = modifiers[scope][returnName].type; // returning type works
- applyModifiers(scope, modifiers[scope][returnName]); // returning array works
+ scope->type = yyextra->modifiers[scope][returnName].type; // returning type works
+ applyModifiers(scope, yyextra->modifiers[scope][returnName]); // returning array works
}
}
@@ -2241,17 +2279,17 @@ static bool endScope(Entry *scope, bool isGlobalRoot)
Argument *arg = findArgument(scope->parent(), ce->name, TRUE);
if (arg != 0)
- {
+ {
// set type of dummy procedure argument to interface
- arg->name = arg->type;
+ arg->name = arg->type;
arg->type = scope->name;
}
if (ce->name.lower() == scope->name.lower()) found = TRUE;
}
if ((count == 1) && found)
{
- // clear all modifiers of the scope
- modifiers.remove(scope);
+ // clear all yyextra->modifiers of the scope
+ yyextra->modifiers.remove(scope);
scope->parent()->removeSubEntry(scope);
scope = 0;
return TRUE;
@@ -2260,7 +2298,7 @@ static bool endScope(Entry *scope, bool isGlobalRoot)
}
if (scope->section!=Entry::FUNCTION_SEC)
{ // not function section
- // iterate variables: get and apply modifiers
+ // iterate variables: get and apply yyextra->modifiers
for (const auto &ce : scope->children())
{
if (ce->section != Entry::VARIABLE_SEC && ce->section != Entry::FUNCTION_SEC)
@@ -2272,165 +2310,156 @@ static bool endScope(Entry *scope, bool isGlobalRoot)
}
}
- // clear all modifiers of the scope
- modifiers.remove(scope);
+ // clear all yyextra->modifiers of the scope
+ yyextra->modifiers.remove(scope);
return TRUE;
}
-#if 0
-//! Return full name of the entry. Sometimes we must combine several names recursively.
-static QCString getFullName(Entry *e)
-{
- QCString name = e->name;
- if (e->section == Entry::CLASS_SEC // || e->section == Entry::INTERFACE_SEC
- || !e->parent() || e->parent()->name.isEmpty())
- return name;
-
- return getFullName(e->parent())+"::"+name;
-}
-#endif
-
-static int yyread(char *buf,int max_size)
+static int yyread(yyscan_t yyscanner,char *buf,int max_size)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
int c=0;
-
- while ( c < max_size && inputString[inputPosition] )
+ while ( c < max_size && yyextra->inputString[yyextra->inputPosition] )
{
- *buf = inputString[inputPosition++] ;
+ *buf = yyextra->inputString[yyextra->inputPosition++] ;
c++; buf++;
}
return c;
}
-static void initParser()
+static void initParser(yyscan_t yyscanner)
{
- last_entry.reset();
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->last_entry.reset();
}
-static void initEntry()
+static void initEntry(yyscan_t yyscanner)
{
- if (typeMode)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->typeMode)
{
- current->protection = typeProtection;
+ yyextra->current->protection = yyextra->typeProtection;
}
else
{
- current->protection = defaultProtection;
+ yyextra->current->protection = yyextra->defaultProtection;
}
- current->mtype = mtype;
- current->virt = virt;
- current->stat = gstat;
- current->lang = SrcLangExt_Fortran;
- Doxygen::docGroup.initGroupInfo(current.get());
+ yyextra->current->mtype = Method;
+ yyextra->current->virt = Normal;
+ yyextra->current->stat = FALSE;
+ yyextra->current->lang = SrcLangExt_Fortran;
+ yyextra->commentScanner.initGroupInfo(yyextra->current.get());
}
/**
- adds current entry to current_root and creates new current
+ adds yyextra->current entry to yyextra->current_root and creates new yyextra->current
*/
-static void addCurrentEntry(bool case_insens)
+static void addCurrentEntry(yyscan_t yyscanner,bool case_insens)
{
- if (case_insens) current->name = current->name.lower();
- //printf("===Adding entry %s to %s\n", current->name.data(), current_root->name.data());
- last_entry = current;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (case_insens) yyextra->current->name = yyextra->current->name.lower();
+ //printf("===Adding entry %s to %s\n", yyextra->current->name.data(), yyextra->current_root->name.data());
+ yyextra->last_entry = yyextra->current;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
}
-static int max(int a, int b) {return a>b?a:b;}
-
-static void addModule(const char *name, bool isModule)
+static void addModule(yyscan_t yyscanner,const char *name, bool isModule)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
DBG_CTX((stderr, "0=========> got module %s\n", name));
if (isModule)
- current->section = Entry::NAMESPACE_SEC;
+ yyextra->current->section = Entry::NAMESPACE_SEC;
else
- current->section = Entry::FUNCTION_SEC;
+ yyextra->current->section = Entry::FUNCTION_SEC;
if (name!=NULL)
{
- current->name = name;
+ yyextra->current->name = name;
}
else
{
- QCString fname = yyFileName;
- int index = max(fname.findRev('/'), fname.findRev('\\'));
+ QCString fname = yyextra->fileName;
+ int index = QMAX(fname.findRev('/'), fname.findRev('\\'));
fname = fname.right(fname.length()-index-1);
fname = fname.prepend("__").append("__");
- current->name = fname;
- }
- current->type = "program";
- current->fileName = yyFileName;
- current->bodyLine = yyLineNr; // used for source reference
- current->startLine = yyLineNr;
- current->protection = Public ;
- addCurrentEntry(true);
- startScope(last_entry.get());
+ yyextra->current->name = fname;
+ }
+ yyextra->current->type = "program";
+ yyextra->current->fileName = yyextra->fileName;
+ yyextra->current->bodyLine = yyextra->lineNr; // used for source reference
+ yyextra->current->startLine = yyextra->lineNr;
+ yyextra->current->protection = Public ;
+ addCurrentEntry(yyscanner,true);
+ startScope(yyscanner,yyextra->last_entry.get());
}
-static void addSubprogram(const char *text)
+static void addSubprogram(yyscan_t yyscanner,const char *text)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
DBG_CTX((stderr,"1=========> got subprog, type: %s\n",text));
- subrCurrent.push_back(current);
- current->section = Entry::FUNCTION_SEC ;
+ yyextra->subrCurrent.push_back(yyextra->current);
+ yyextra->current->section = Entry::FUNCTION_SEC ;
QCString subtype = text; subtype=subtype.lower().stripWhiteSpace();
- functionLine = (subtype.find("function") != -1);
- current->type += " " + subtype;
- current->type = current->type.stripWhiteSpace();
- current->fileName = yyFileName;
- current->bodyLine = yyLineNr; // used for source reference start of body of routine
- current->startLine = yyLineNr; // used for source reference start of definition
- current->args.resize(0);
- current->argList.clear();
- docBlock.resize(0);
+ yyextra->functionLine = (subtype.find("function") != -1);
+ yyextra->current->type += " " + subtype;
+ yyextra->current->type = yyextra->current->type.stripWhiteSpace();
+ yyextra->current->fileName = yyextra->fileName;
+ yyextra->current->bodyLine = yyextra->lineNr; // used for source reference start of body of routine
+ yyextra->current->startLine = yyextra->lineNr; // used for source reference start of definition
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ yyextra->docBlock.resize(0);
}
/*! Adds interface to the root entry.
* \note Code was brought to this procedure from the parser,
* because there was/is idea to use it in several parts of the parser.
*/
-static void addInterface(QCString name, InterfaceType type)
+static void addInterface(yyscan_t yyscanner,QCString name, InterfaceType type)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (YY_START == Start)
{
- addModule(NULL);
- yy_push_state(ModuleBody); //anon program
+ addModule(yyscanner,NULL);
+ yy_push_state(ModuleBody,yyscanner); //anon program
}
- current->section = Entry::CLASS_SEC; // was Entry::INTERFACE_SEC;
- current->spec = Entry::Interface;
- current->name = name;
+ yyextra->current->section = Entry::CLASS_SEC; // was Entry::INTERFACE_SEC;
+ yyextra->current->spec = Entry::Interface;
+ yyextra->current->name = name;
switch (type)
{
case IF_ABSTRACT:
- current->type = "abstract";
+ yyextra->current->type = "abstract";
break;
case IF_GENERIC:
- current->type = "generic";
+ yyextra->current->type = "generic";
break;
case IF_SPECIFIC:
case IF_NONE:
default:
- current->type = "";
+ yyextra->current->type = "";
}
/* if type is part of a module, mod name is necessary for output */
- if ((current_root) &&
- (current_root->section == Entry::CLASS_SEC ||
- current_root->section == Entry::NAMESPACE_SEC))
+ if ((yyextra->current_root) &&
+ (yyextra->current_root->section == Entry::CLASS_SEC ||
+ yyextra->current_root->section == Entry::NAMESPACE_SEC))
{
- current->name= current_root->name + "::" + current->name;
+ yyextra->current->name= yyextra->current_root->name + "::" + yyextra->current->name;
}
- current->fileName = yyFileName;
- current->bodyLine = yyLineNr;
- current->startLine = yyLineNr;
- addCurrentEntry(true);
+ yyextra->current->fileName = yyextra->fileName;
+ yyextra->current->bodyLine = yyextra->lineNr;
+ yyextra->current->startLine = yyextra->lineNr;
+ addCurrentEntry(yyscanner,true);
}
@@ -2438,11 +2467,12 @@ static void addInterface(QCString name, InterfaceType type)
/*! Get the argument \a name.
*/
-static Argument *getParameter(const QCString &name)
+static Argument *getParameter(yyscan_t yyscanner,const QCString &name)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
// std::cout<<"addFortranParameter(): "<<name<<" DOCS:"<<(docs.isNull()?QCString("null"):docs)<<std::endl;
Argument *ret = 0;
- for (Argument &a:current_root->argList)
+ for (Argument &a:yyextra->current_root->argList)
{
if (a.name.lower()==name.lower())
{
@@ -2455,70 +2485,73 @@ static Argument *getParameter(const QCString &name)
}
//----------------------------------------------------------------------------
-static void startCommentBlock(bool brief)
+static void startCommentBlock(yyscan_t yyscanner,bool brief)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
if (brief)
{
- current->briefFile = yyFileName;
- current->briefLine = yyLineNr;
+ yyextra->current->briefFile = yyextra->fileName;
+ yyextra->current->briefLine = yyextra->lineNr;
}
else
{
- current->docFile = yyFileName;
- current->docLine = yyLineNr;
+ yyextra->current->docFile = yyextra->fileName;
+ yyextra->current->docLine = yyextra->lineNr;
}
}
//----------------------------------------------------------------------------
-static void handleCommentBlock(const QCString &doc,bool brief)
+static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief)
{
- static bool hideInBodyDocs = Config_getBool(HIDE_IN_BODY_DOCS);
- if (docBlockInBody && hideInBodyDocs)
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ bool hideInBodyDocs = Config_getBool(HIDE_IN_BODY_DOCS);
+ if (yyextra->docBlockInBody && hideInBodyDocs)
{
- docBlockInBody = FALSE;
+ yyextra->docBlockInBody = FALSE;
return;
}
DBG_CTX((stderr,"call parseCommentBlock [%s]\n",doc.data()));
- int lineNr = brief ? current->briefLine : current->docLine;
+ int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
int position=0;
bool needsEntry = FALSE;
- QCString processedDoc = preprocessCommentBlock(doc,yyFileName,lineNr);
- while (parseCommentBlock(
- g_thisParser,
- docBlockInBody ? subrCurrent.back().get() : current.get(),
- processedDoc, // text
- yyFileName, // file
- lineNr,
- docBlockInBody ? FALSE : brief,
- docBlockInBody ? FALSE : docBlockJavaStyle,
- docBlockInBody,
- defaultProtection,
+ QCString processedDoc = processMarkdownForCommentBlock(doc,yyextra->fileName,lineNr);
+ while (yyextra->commentScanner.parseCommentBlock(
+ yyextra->thisParser,
+ yyextra->docBlockInBody ? yyextra->subrCurrent.back().get() : yyextra->current.get(),
+ processedDoc, // text
+ yyextra->fileName, // file
+ lineNr,
+ yyextra->docBlockInBody ? FALSE : brief,
+ yyextra->docBlockInBody ? FALSE : yyextra->docBlockJavaStyle,
+ yyextra->docBlockInBody,
+ yyextra->defaultProtection,
position,
needsEntry
))
{
- DBG_CTX((stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry));
- if (needsEntry) addCurrentEntry(false);
+ DBG_CTX((stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry));
+ if (needsEntry) addCurrentEntry(yyscanner,false);
}
DBG_CTX((stderr,"parseCommentBlock position=%d [%s] needsEntry=%d\n",position,doc.data()+position,needsEntry));
- if (needsEntry) addCurrentEntry(false);
- docBlockInBody = FALSE;
+ if (needsEntry) addCurrentEntry(yyscanner,false);
+ yyextra->docBlockInBody = FALSE;
}
//----------------------------------------------------------------------------
/// Handle parameter description as defined after the declaration of the parameter
-static void subrHandleCommentBlock(const QCString &doc,bool brief)
+static void subrHandleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString loc_doc;
loc_doc = doc.stripWhiteSpace();
- std::shared_ptr<Entry> tmp_entry = current;
- current = subrCurrent.back(); // temporarily switch to the entry of the subroutine / function
+ std::shared_ptr<Entry> tmp_entry = yyextra->current;
+ yyextra->current = yyextra->subrCurrent.back(); // temporarily switch to the entry of the subroutine / function
// Still in the specification section so no inbodyDocs yet, but parameter documentation
- current->inbodyDocs = "";
+ yyextra->current->inbodyDocs = "";
// strip \\param or @param, so we can do some extra checking. We will add it later on again.
if (!loc_doc.stripPrefix("\\param") &&
@@ -2527,7 +2560,7 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
loc_doc.stripWhiteSpace();
// direction as defined with the declaration of the parameter
- int dir1 = modifiers[current_root][argName.lower()].direction;
+ int dir1 = yyextra->modifiers[yyextra->current_root][yyextra->argName.lower()].direction;
// in description [in] is specified
if (loc_doc.lower().find(directionParam[SymbolModifiers::IN]) == 0)
{
@@ -2539,19 +2572,19 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::IN]));
loc_doc.stripWhiteSpace();
// in case of empty documentation or (now) just name, consider it as no documentation
- if (!loc_doc.isEmpty() && (loc_doc.lower() != argName.lower()))
+ if (!loc_doc.isEmpty() && (loc_doc.lower() != yyextra->argName.lower()))
{
- handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::IN] + " " +
- argName + " " + loc_doc,brief);
+ handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[SymbolModifiers::IN] + " " +
+ yyextra->argName + " " + loc_doc,brief);
}
}
else
{
// something different specified, give warning and leave error.
- warn(yyFileName,yyLineNr, "Routine: " + current->name + current->args +
- " inconsistency between intent attribute and documentation for parameter: " + argName);
- handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " +
- argName + " " + loc_doc,brief);
+ warn(yyextra->fileName,yyextra->lineNr, "Routine: " + yyextra->current->name + yyextra->current->args +
+ " inconsistency between intent attribute and documentation for parameter: " + yyextra->argName);
+ handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[dir1] + " " +
+ yyextra->argName + " " + loc_doc,brief);
}
}
// analogous to the [in] case, here [out] direction specified
@@ -2562,20 +2595,20 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
{
loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::OUT]));
loc_doc.stripWhiteSpace();
- if (loc_doc.isEmpty() || (loc_doc.lower() == argName.lower()))
+ if (loc_doc.isEmpty() || (loc_doc.lower() == yyextra->argName.lower()))
{
- current = tmp_entry;
+ yyextra->current = tmp_entry;
return;
}
- handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::OUT] + " " +
- argName + " " + loc_doc,brief);
+ handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[SymbolModifiers::OUT] + " " +
+ yyextra->argName + " " + loc_doc,brief);
}
else
{
- warn(yyFileName,yyLineNr, "Routine: " + current->name + current->args +
- " inconsistency between intent attribute and documentation for parameter: " + argName);
- handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " +
- argName + " " + loc_doc,brief);
+ warn(yyextra->fileName,yyextra->lineNr, "Routine: " + yyextra->current->name + yyextra->current->args +
+ " inconsistency between intent attribute and documentation for parameter: " + yyextra->argName);
+ handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[dir1] + " " +
+ yyextra->argName + " " + loc_doc,brief);
}
}
// analogous to the [in] case, here [in,out] direction specified
@@ -2586,42 +2619,43 @@ static void subrHandleCommentBlock(const QCString &doc,bool brief)
{
loc_doc = loc_doc.right(loc_doc.length()-strlen(directionParam[SymbolModifiers::INOUT]));
loc_doc.stripWhiteSpace();
- if (!loc_doc.isEmpty() && (loc_doc.lower() != argName.lower()))
+ if (!loc_doc.isEmpty() && (loc_doc.lower() != yyextra->argName.lower()))
{
- handleCommentBlock(QCString("\n\n@param ") + directionParam[SymbolModifiers::INOUT] + " " +
- argName + " " + loc_doc,brief);
+ handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[SymbolModifiers::INOUT] + " " +
+ yyextra->argName + " " + loc_doc,brief);
}
}
else
{
- warn(yyFileName,yyLineNr, "Routine: " + current->name + current->args +
- " inconsistency between intent attribute and documentation for parameter: " + argName);
- handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " +
- argName + " " + loc_doc,brief);
+ warn(yyextra->fileName,yyextra->lineNr, "Routine: " + yyextra->current->name + yyextra->current->args +
+ " inconsistency between intent attribute and documentation for parameter: " + yyextra->argName);
+ handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[dir1] + " " +
+ yyextra->argName + " " + loc_doc,brief);
}
}
// analogous to the [in] case; here no direction specified
- else if (!loc_doc.isEmpty() && (loc_doc.lower() != argName.lower()))
+ else if (!loc_doc.isEmpty() && (loc_doc.lower() != yyextra->argName.lower()))
{
- handleCommentBlock(QCString("\n\n@param ") + directionParam[dir1] + " " +
- argName + " " + loc_doc,brief);
+ handleCommentBlock(yyscanner,QCString("\n\n@param ") + directionParam[dir1] + " " +
+ yyextra->argName + " " + loc_doc,brief);
}
- // reset current back to the part inside the routine
- current = tmp_entry;
+ // reset yyextra->current back to the part inside the routine
+ yyextra->current = tmp_entry;
}
//----------------------------------------------------------------------------
/// Handle result description as defined after the declaration of the parameter
-static void subrHandleCommentBlockResult(const QCString &doc,bool brief)
+static void subrHandleCommentBlockResult(yyscan_t yyscanner,const QCString &doc,bool brief)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
QCString loc_doc;
loc_doc = doc.stripWhiteSpace();
- std::shared_ptr<Entry> tmp_entry = current;
- current = subrCurrent.back(); // temporarily switch to the entry of the subroutine / function
+ std::shared_ptr<Entry> tmp_entry = yyextra->current;
+ yyextra->current = yyextra->subrCurrent.back(); // temporarily switch to the entry of the subroutine / function
// Still in the specification section so no inbodyDocs yet, but parameter documentation
- current->inbodyDocs = "";
+ yyextra->current->inbodyDocs = "";
// strip \\returns or @returns. We will add it later on again.
if (!loc_doc.stripPrefix("\\returns") &&
@@ -2631,140 +2665,152 @@ static void subrHandleCommentBlockResult(const QCString &doc,bool brief)
) (void)loc_doc; // Do nothing work has been done by stripPrefix; (void)loc_doc: to overcome 'empty controlled statement' warning
loc_doc.stripWhiteSpace();
- if (!loc_doc.isEmpty() && (loc_doc.lower() != argName.lower()))
+ if (!loc_doc.isEmpty() && (loc_doc.lower() != yyextra->argName.lower()))
{
- handleCommentBlock(QCString("\n\n@returns ") + loc_doc,brief);
+ handleCommentBlock(yyscanner,QCString("\n\n@returns ") + loc_doc,brief);
}
- // reset current back to the part inside the routine
- current = tmp_entry;
+ // reset yyextra->current back to the part inside the routine
+ yyextra->current = tmp_entry;
}
//----------------------------------------------------------------------------
-#if 0
-static int level=0;
-static void debugCompounds(Entry *rt) // print Entry structure (for debugging)
+static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileBuf,
+ const std::shared_ptr<Entry> &rt, FortranFormat format)
{
- level++;
- printf("%d) debugCompounds(%s) line %d\n",level, rt->name.data(), rt->bodyLine);
- for (const auto &ce : rt->children())
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ char *tmpBuf = NULL;
+ initParser(yyscanner);
+
+ yyextra->defaultProtection = Public;
+ yyextra->inputString = fileBuf;
+ yyextra->inputPosition = 0;
+ yyextra->inputStringPrepass = NULL;
+ yyextra->inputPositionPrepass = 0;
+
+ //yyextra->anonCount = 0; // don't reset per file
+ yyextra->current_root = rt.get();
+ yyextra->global_root = rt;
+
+ yyextra->isFixedForm = recognizeFixedForm(fileBuf,format);
+
+ if (yyextra->isFixedForm)
{
- debugCompounds(ce.get());
+ msg("Prepassing fixed form of %s\n", fileName);
+ //printf("---strlen=%d\n", strlen(fileBuf));
+ //clock_t start=clock();
+
+ //printf("Input fixed form string:\n%s\n", fileBuf);
+ //printf("===========================\n");
+ yyextra->inputString = prepassFixedForm(fileBuf, NULL);
+ Debug::print(Debug::FortranFixed2Free,0,"======== Fixed to Free format =========\n---- Input fixed form string ------- \n%s\n", fileBuf);
+ Debug::print(Debug::FortranFixed2Free,0,"---- Resulting free form string ------- \n%s\n", yyextra->inputString);
+ //printf("Resulting free form string:\n%s\n", yyextra->inputString);
+ //printf("===========================\n");
+
+ //clock_t end=clock();
+ //printf("CPU time used=%f\n", ((double) (end-start))/CLOCKS_PER_SEC);
+ }
+ else if (yyextra->inputString[strlen(fileBuf)-1] != '\n')
+ {
+ tmpBuf = (char *)malloc(strlen(fileBuf)+2);
+ strcpy(tmpBuf,fileBuf);
+ tmpBuf[strlen(fileBuf)]= '\n';
+ tmpBuf[strlen(fileBuf)+1]= '\000';
+ yyextra->inputString = tmpBuf;
}
-level--;
-}
-#endif
+ yyextra->lineNr= 1 ;
+ yyextra->fileName = fileName;
+ msg("Parsing file %s...\n",yyextra->fileName.data());
-static void parseMain(const char *fileName,const char *fileBuf,
- const std::shared_ptr<Entry> &rt, FortranFormat format)
-{
- char *tmpBuf = NULL;
- initParser();
-
- defaultProtection = Public;
- inputString = fileBuf;
- inputPosition = 0;
- inputStringPrepass = NULL;
- inputPositionPrepass = 0;
-
- //anonCount = 0; // don't reset per file
- mtype = Method;
- gstat = FALSE;
- virt = Normal;
- current_root = rt.get();
- global_root = rt;
- inputFile.setName(fileName);
- if (inputFile.open(IO_ReadOnly))
- {
- isFixedForm = recognizeFixedForm(fileBuf,format);
-
- if (isFixedForm)
- {
- msg("Prepassing fixed form of %s\n", fileName);
- //printf("---strlen=%d\n", strlen(fileBuf));
- //clock_t start=clock();
-
- //printf("Input fixed form string:\n%s\n", fileBuf);
- //printf("===========================\n");
- inputString = prepassFixedForm(fileBuf, NULL);
- Debug::print(Debug::FortranFixed2Free,0,"======== Fixed to Free format =========\n---- Input fixed form string ------- \n%s\n", fileBuf);
- Debug::print(Debug::FortranFixed2Free,0,"---- Resulting free form string ------- \n%s\n", inputString);
- //printf("Resulting free form string:\n%s\n", inputString);
- //printf("===========================\n");
-
- //clock_t end=clock();
- //printf("CPU time used=%f\n", ((double) (end-start))/CLOCKS_PER_SEC);
- }
- else if (inputString[strlen(fileBuf)-1] != '\n')
- {
- tmpBuf = (char *)malloc(strlen(fileBuf)+2);
- strcpy(tmpBuf,fileBuf);
- tmpBuf[strlen(fileBuf)]= '\n';
- tmpBuf[strlen(fileBuf)+1]= '\000';
- inputString = tmpBuf;
- }
+ yyextra->global_scope = rt.get();
+ startScope(yyscanner,rt.get()); // implies yyextra->current_root = rt
+ initParser(yyscanner);
+ yyextra->commentScanner.enterFile(yyextra->fileName,yyextra->lineNr);
- yyLineNr= 1 ;
- yyFileName = fileName;
- msg("Parsing file %s...\n",yyFileName.data());
-
- global_scope = rt.get();
- startScope(rt.get()); // implies current_root = rt
- initParser();
- Doxygen::docGroup.enterFile(yyFileName,yyLineNr);
-
- // add entry for the file
- current = std::make_shared<Entry>();
- current->lang = SrcLangExt_Fortran;
- current->name = yyFileName;
- current->section = Entry::SOURCE_SEC;
- file_root = current;
- current_root->moveToSubEntryAndRefresh(current);
- current->lang = SrcLangExt_Fortran;
-
- fortranscannerYYrestart( fortranscannerYYin );
- {
- BEGIN( Start );
- }
+ // add entry for the file
+ yyextra->current = std::make_shared<Entry>();
+ yyextra->current->lang = SrcLangExt_Fortran;
+ yyextra->current->name = yyextra->fileName;
+ yyextra->current->section = Entry::SOURCE_SEC;
+ yyextra->file_root = yyextra->current;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ yyextra->current->lang = SrcLangExt_Fortran;
- fortranscannerYYlex();
- Doxygen::docGroup.leaveFile(yyFileName,yyLineNr);
+ fortranscannerYYrestart( 0, yyscanner );
+ {
+ BEGIN( Start );
+ }
- if (global_scope && global_scope != INVALID_ENTRY) endScope(current_root, TRUE); // TRUE - global root
+ fortranscannerYYlex(yyscanner);
+ yyextra->commentScanner.leaveFile(yyextra->fileName,yyextra->lineNr);
- //debugCompounds(rt); //debug
+ if (yyextra->global_scope && yyextra->global_scope != INVALID_ENTRY)
+ {
+ endScope(yyscanner,yyextra->current_root, TRUE); // TRUE - global root
+ }
- rt->program.resize(0);
- //delete current; current=0;
- moduleProcedures.clear();
- if (tmpBuf) {
- free((char*)tmpBuf);
- inputString=NULL;
- }
- if (isFixedForm) {
- free((char*)inputString);
- inputString=NULL;
- }
+ //debugCompounds(rt); //debug
- inputFile.close();
+ rt->program.resize(0);
+ //delete yyextra->current; yyextra->current=0;
+ yyextra->moduleProcedures.clear();
+ if (tmpBuf)
+ {
+ free((char*)tmpBuf);
+ yyextra->inputString=NULL;
}
+ if (yyextra->isFixedForm)
+ {
+ free((char*)yyextra->inputString);
+ yyextra->inputString=NULL;
+ }
+
}
//----------------------------------------------------------------------------
+struct FortranOutlineParser::Private
+{
+ yyscan_t yyscanner;
+ fortranscannerYY_state extra;
+ FortranFormat format;
+ Private(FortranFormat fmt) : format(fmt)
+ {
+ fortranscannerYYlex_init_extra(&extra,&yyscanner);
+#ifdef FLEX_DEBUG
+ fortranscannerYYset_debug(1,yyscanner);
+#endif
+ }
+ ~Private()
+ {
+ fortranscannerYYlex_destroy(yyscanner);
+ }
+};
+
+FortranOutlineParser::FortranOutlineParser(FortranFormat format)
+ : p(std::make_unique<Private>(format))
+{
+}
+
+FortranOutlineParser::~FortranOutlineParser()
+{
+}
+
void FortranOutlineParser::parseInput(const char *fileName,
const char *fileBuf,
const std::shared_ptr<Entry> &root,
bool /*sameTranslationUnit*/,
QStrList & /*filesInSameTranslationUnit*/)
{
- g_thisParser = this;
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->thisParser = this;
printlex(yy_flex_debug, TRUE, __FILE__, fileName);
- ::parseMain(fileName,fileBuf,root,m_format);
+ ::parseMain(p->yyscanner,fileName,fileBuf,root,p->format);
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
}
@@ -2773,35 +2819,38 @@ bool FortranOutlineParser::needsPreprocessing(const QCString &extension) const
{
return extension!=extension.lower(); // use preprocessor only for upper case extensions
}
+
void FortranOutlineParser::parsePrototype(const char *text)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
QCString buffer = QCString(text);
- pushBuffer(buffer);
- parsingPrototype = TRUE;
+ pushBuffer(p->yyscanner,buffer);
+ yyextra->parsingPrototype = TRUE;
BEGIN(Prototype);
- fortranscannerYYlex();
- parsingPrototype = FALSE;
- popBuffer();
+ fortranscannerYYlex(p->yyscanner);
+ yyextra->parsingPrototype = FALSE;
+ popBuffer(p->yyscanner);
}
//----------------------------------------------------------------------------
-static void scanner_abort()
+static void scanner_abort(yyscan_t yyscanner)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
fprintf(stderr,"********************************************************************\n");
- fprintf(stderr,"Error in file %s line: %d, state: %d(%s)\n",yyFileName.data(),yyLineNr,YY_START,stateToString(YY_START));
+ fprintf(stderr,"Error in file %s line: %d, state: %d(%s)\n",yyextra->fileName.data(),yyextra->lineNr,YY_START,stateToString(YY_START));
fprintf(stderr,"********************************************************************\n");
bool start=FALSE;
- for (const auto &ce : global_root->children())
+ for (const auto &ce : yyextra->global_root->children())
{
- if (ce == file_root) start=TRUE;
+ if (ce == yyextra->file_root) start=TRUE;
if (start) ce->reset();
}
// dummy call to avoid compiler warning
- (void)yy_top_state();
+ (void)yy_top_state(yyscanner);
return;
//exit(-1);
diff --git a/src/groupdef.cpp b/src/groupdef.cpp
index 0d6d43f..960252d 100644
--- a/src/groupdef.cpp
+++ b/src/groupdef.cpp
@@ -1101,13 +1101,13 @@ void GroupDefImpl::writePageDocumentation(OutputList &ol)
{
if (!pd->isReference())
{
- SectionInfo *si=0;
+ const SectionInfo *si=0;
if (pd->hasTitle() && !pd->name().isEmpty() &&
- (si=Doxygen::sectionDict->find(pd->name()))!=0)
+ (si=SectionManager::instance().find(pd->name()))!=0)
{
- ol.startSection(si->label,si->title,SectionInfo::Subsection);
- ol.docify(si->title);
- ol.endSection(si->label,SectionInfo::Subsection);
+ ol.startSection(si->label(),si->title(),SectionType::Subsection);
+ ol.docify(si->title());
+ ol.endSection(si->label(),SectionType::Subsection);
}
ol.startTextBlock();
ol.generateDoc(pd->docFile(),pd->docLine(),pd,0,pd->documentation()+pd->inbodyDocumentation(),TRUE,FALSE,0,TRUE,FALSE);
@@ -1659,7 +1659,7 @@ QCString GroupDefImpl::getOutputFileBase() const
void GroupDefImpl::addListReferences()
{
{
- const std::vector<ListItemInfo> &xrefItems = xrefListItems();
+ const std::vector<RefItem*> &xrefItems = xrefListItems();
addRefItem(xrefItems,
getOutputFileBase(),
theTranslator->trGroup(TRUE,TRUE),
diff --git a/src/growbuf.h b/src/growbuf.h
index bf6d74e..2d0d503 100644
--- a/src/growbuf.h
+++ b/src/growbuf.h
@@ -29,7 +29,7 @@ class GrowBuf
void addStr(const char *s) {
if (s)
{
- int l=strlen(s);
+ int l=(int)strlen(s);
if (pos+l>=len) { len+=l+GROW_AMOUNT; str = (char*)realloc(str,len); }
strcpy(&str[pos],s);
pos+=l;
@@ -38,7 +38,7 @@ class GrowBuf
void addStr(const char *s,int n) {
if (s)
{
- int l=strlen(s);
+ int l=(int)strlen(s);
if (n<l) l=n;
if (pos+l>=len) { len+=l+GROW_AMOUNT; str = (char*)realloc(str,len); }
strncpy(&str[pos],s,n);
diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp
index 424fead..f220646 100644
--- a/src/htmldocvisitor.cpp
+++ b/src/htmldocvisitor.cpp
@@ -36,6 +36,7 @@
#include "htmlentity.h"
#include "emoji.h"
#include "plantuml.h"
+#include "formula.h"
static const int NUM_HTML_LIST_TYPES = 4;
static const char types[][NUM_HTML_LIST_TYPES] = {"1", "a", "i", "A"};
@@ -180,6 +181,10 @@ static bool isDocIncludeVisible(DocInclude *s)
{
case DocInclude::DontInclude:
case DocInclude::LatexInclude:
+ case DocInclude::RtfInclude:
+ case DocInclude::ManInclude:
+ case DocInclude::XmlInclude:
+ case DocInclude::DocbookInclude:
return FALSE;
default:
return TRUE;
@@ -715,6 +720,10 @@ void HtmlDocVisitor::visit(DocInclude *inc)
break;
case DocInclude::DontInclude:
case DocInclude::LatexInclude:
+ case DocInclude::RtfInclude:
+ case DocInclude::ManInclude:
+ case DocInclude::XmlInclude:
+ case DocInclude::DocbookInclude:
case DocInclude::DontIncWithLines:
break;
case DocInclude::HtmlInclude:
@@ -880,10 +889,25 @@ void HtmlDocVisitor::visit(DocFormula *f)
m_t << "\" alt=\"";
filterQuotedCdataAttr(f->text());
m_t << "\"";
- // TODO: cache image dimensions on formula generation and give height/width
- // for faster preloading and better rendering of the page
- m_t << " src=\"" << f->relPath() << f->name() << ".png\"/>";
-
+ m_t << " src=\"" << f->relPath() << f->name();
+ if (Config_getEnum(HTML_FORMULA_FORMAT)=="svg")
+ {
+ m_t << ".svg";
+ }
+ else
+ {
+ m_t << ".png";
+ }
+ FormulaManager::DisplaySize size = FormulaManager::instance().displaySize(f->id());
+ if (size.width!=-1)
+ {
+ m_t << "\" width=\"" << size.width;
+ }
+ if (size.height!=-1)
+ {
+ m_t << "\" height=\"" << size.height;
+ }
+ m_t << "\"/>";
}
if (bDisplay)
{
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index bf52eed..2dc62fa 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -114,20 +114,28 @@ static void writeServerSearchBox(FTextStream &t,const char *relPath,bool highlig
}
//------------------------------------------------------------------------
-/// Convert a set of LaTeX `\(re)newcommand` to a form readable by MathJax
+/// Convert a set of LaTeX commands `\(re)newcommand` to a form readable by MathJax
/// LaTeX syntax:
+/// ```
/// \newcommand{\cmd}{replacement}
/// or
/// \renewcommand{\cmd}{replacement}
+/// ```
/// MathJax syntax:
+/// ```
/// cmd: "{replacement}"
+/// ```
///
/// LaTeX syntax:
+/// ```
/// \newcommand{\cmd}[nr]{replacement}
/// or
/// \renewcommand{\cmd}[nr]{replacement}
+/// ```
/// MathJax syntax:
+/// ```
/// cmd: ["{replacement}",nr]
+/// ```
static QCString getConvertLatexMacro()
{
QCString macrofile = Config_getString(FORMULA_MACROFILE);
@@ -1435,29 +1443,29 @@ void HtmlGenerator::endGroupHeader(int extraIndentLevel)
}
}
-void HtmlGenerator::startSection(const char *lab,const char *,SectionInfo::SectionType type)
+void HtmlGenerator::startSection(const char *lab,const char *,SectionType type)
{
switch(type)
{
- case SectionInfo::Page: t << "\n\n<h1>"; break;
- case SectionInfo::Section: t << "\n\n<h2>"; break;
- case SectionInfo::Subsection: t << "\n\n<h3>"; break;
- case SectionInfo::Subsubsection: t << "\n\n<h4>"; break;
- case SectionInfo::Paragraph: t << "\n\n<h5>"; break;
+ case SectionType::Page: t << "\n\n<h1>"; break;
+ case SectionType::Section: t << "\n\n<h2>"; break;
+ case SectionType::Subsection: t << "\n\n<h3>"; break;
+ case SectionType::Subsubsection: t << "\n\n<h4>"; break;
+ case SectionType::Paragraph: t << "\n\n<h5>"; break;
default: ASSERT(0); break;
}
t << "<a id=\"" << lab << "\"></a>";
}
-void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type)
+void HtmlGenerator::endSection(const char *,SectionType type)
{
switch(type)
{
- case SectionInfo::Page: t << "</h1>"; break;
- case SectionInfo::Section: t << "</h2>"; break;
- case SectionInfo::Subsection: t << "</h3>"; break;
- case SectionInfo::Subsubsection: t << "</h4>"; break;
- case SectionInfo::Paragraph: t << "</h5>"; break;
+ case SectionType::Page: t << "</h1>"; break;
+ case SectionType::Section: t << "</h2>"; break;
+ case SectionType::Subsection: t << "</h3>"; break;
+ case SectionType::Subsubsection: t << "</h4>"; break;
+ case SectionType::Paragraph: t << "</h5>"; break;
default: ASSERT(0); break;
}
}
diff --git a/src/htmlgen.h b/src/htmlgen.h
index fe84061..a8268da 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -250,8 +250,8 @@ class HtmlGenerator : public OutputGenerator
void endExamples();
void startParamList(ParamListTypes,const char *);
void endParamList();
- void startSection(const char *,const char *,SectionInfo::SectionType);
- void endSection(const char *,SectionInfo::SectionType);
+ void startSection(const char *,const char *,SectionType);
+ void endSection(const char *,SectionType);
void addIndexItem(const char *,const char *);
void startIndent();
void endIndent();
diff --git a/src/index.cpp b/src/index.cpp
index edc302b..5552ff0 100644
--- a/src/index.cpp
+++ b/src/index.cpp
@@ -2847,9 +2847,9 @@ static void writeMemberList(OutputList &ol,bool useSections,int page,
QCString cl = letterToString(ml->letter());
QCString anchor=(QCString)"index_"+convertToId(cs);
QCString title=(QCString)"- "+cl+" -";
- ol.startSection(anchor,title,SectionInfo::Subsection);
+ ol.startSection(anchor,title,SectionType::Subsection);
ol.docify(title);
- ol.endSection(anchor,SectionInfo::Subsection);
+ ol.endSection(anchor,SectionType::Subsection);
ol.startItemList();
firstSection=FALSE;
firstItem=TRUE;
@@ -4160,8 +4160,8 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp*
PageDef *pd;
for (;(pd=it.current());++it)
{
- SectionInfo *si=0;
- if (!pd->name().isEmpty()) si=Doxygen::sectionDict->find(pd->name());
+ const SectionInfo *si=0;
+ if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
bool hasSubPages = pd->hasSubPages();
bool hasSections = pd->hasSections();
Doxygen::indexList->addContentsItem(
@@ -4169,7 +4169,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp*
convertToHtml(pd->title(),TRUE),
gd->getReference(),
gd->getOutputFileBase(),
- si ? si->label.data() : 0,
+ si ? si->label().data() : 0,
hasSubPages || hasSections,
TRUE); // addToNavIndex
if (hasSections || hasSubPages)
@@ -4556,8 +4556,7 @@ static void writeIndex(OutputList &ol)
ol.startTextBlock();
ol.generateDoc(defFileName,defLine,Doxygen::mainPage,0,
- Doxygen::mainPage->documentation(),TRUE,FALSE
- /*,Doxygen::mainPage->sectionDict*/);
+ Doxygen::mainPage->documentation(),TRUE,FALSE);
ol.endTextBlock();
ol.endPageDoc();
diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp
index 730f083..b899935 100644
--- a/src/latexdocvisitor.cpp
+++ b/src/latexdocvisitor.cpp
@@ -503,6 +503,10 @@ void LatexDocVisitor::visit(DocInclude *inc)
case DocInclude::DontInclude:
case DocInclude::DontIncWithLines:
case DocInclude::HtmlInclude:
+ case DocInclude::RtfInclude:
+ case DocInclude::ManInclude:
+ case DocInclude::XmlInclude:
+ case DocInclude::DocbookInclude:
break;
case DocInclude::LatexInclude:
m_t << inc->text();
@@ -653,7 +657,8 @@ void LatexDocVisitor::visit(DocCite *cite)
{
//startLink(cite->ref(),cite->file(),cite->anchor());
QCString anchor = cite->anchor();
- anchor = anchor.mid(CiteConsts::anchorPrefix.length()); // strip prefix
+ QCString anchorPrefix = CitationManager::instance().anchorPrefix();
+ anchor = anchor.mid(anchorPrefix.length()); // strip prefix
m_t << "\\cite{" << anchor << "}";
}
else
diff --git a/src/latexgen.cpp b/src/latexgen.cpp
index cdda22c..392e839 100644
--- a/src/latexgen.cpp
+++ b/src/latexgen.cpp
@@ -42,6 +42,7 @@
#include "namespacedef.h"
#include "filename.h"
#include "resourcemgr.h"
+#include "portable.h"
static bool DoxyCodeOpen = FALSE;
static bool DoxyCodeLineOpen = FALSE;
@@ -282,7 +283,7 @@ LatexGenerator::~LatexGenerator()
static void writeLatexMakefile()
{
- bool generateBib = !Doxygen::citeDict->isEmpty();
+ bool generateBib = !CitationManager::instance().isEmpty();
QCString dir=Config_getString(LATEX_OUTPUT);
QCString fileName=dir+"/Makefile";
QFile file(fileName);
@@ -383,7 +384,7 @@ static void writeMakeBat()
QCString latex_command = theTranslator->latexCommandName();
QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
QFile file(fileName);
- bool generateBib = !Doxygen::citeDict->isEmpty();
+ bool generateBib = !CitationManager::instance().isEmpty();
if (!file.open(IO_WriteOnly))
{
term("Could not open file %s for writing\n",fileName.data());
@@ -421,7 +422,8 @@ static void writeMakeBat()
t << mkidx_command << " refman.idx\n";
t << "%LATEX_CMD% refman.tex\n";
t << "dvips -o refman.ps refman.dvi\n";
- t << "gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
+ t << Portable::ghostScriptCommand();
+ t << " -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
"-sOutputFile=refman.pdf -c save pop -f refman.ps\n";
}
else // use pdflatex
@@ -827,7 +829,7 @@ static void writeDefaultFooter(FTextStream &t)
"\n";
// Bibliography
- Doxygen::citeDict->writeLatexBibliography(t);
+ CitationManager::instance().writeLatexBibliography(t);
// Index
t << "% Index\n";
@@ -1777,7 +1779,7 @@ void LatexGenerator::addIndexItem(const char *s1,const char *s2)
}
-void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::SectionType type)
+void LatexGenerator::startSection(const char *lab,const char *,SectionType type)
{
static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
static bool usePDFLatex = Config_getBool(USE_PDFLATEX);
@@ -1790,11 +1792,11 @@ void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::Sect
{
switch(type)
{
- case SectionInfo::Page: t << "doxysubsection"; break;
- case SectionInfo::Section: t << "doxysubsubsection"; break;
- case SectionInfo::Subsection: t << "doxyparagraph"; break;
- case SectionInfo::Subsubsection: t << "doxysubparagraph"; break;
- case SectionInfo::Paragraph: t << "doxysubparagraph"; break;
+ case SectionType::Page: t << "doxysubsection"; break;
+ case SectionType::Section: t << "doxysubsubsection"; break;
+ case SectionType::Subsection: t << "doxyparagraph"; break;
+ case SectionType::Subsubsection: t << "doxysubparagraph"; break;
+ case SectionType::Paragraph: t << "doxysubparagraph"; break;
default: ASSERT(0); break;
}
t << "{";
@@ -1803,18 +1805,18 @@ void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::Sect
{
switch(type)
{
- case SectionInfo::Page: t << "doxysection"; break;
- case SectionInfo::Section: t << "doxysubsection"; break;
- case SectionInfo::Subsection: t << "doxysubsubsection"; break;
- case SectionInfo::Subsubsection: t << "doxyparagraph"; break;
- case SectionInfo::Paragraph: t << "doxysubparagraph"; break;
+ case SectionType::Page: t << "doxysection"; break;
+ case SectionType::Section: t << "doxysubsection"; break;
+ case SectionType::Subsection: t << "doxysubsubsection"; break;
+ case SectionType::Subsubsection: t << "doxyparagraph"; break;
+ case SectionType::Paragraph: t << "doxysubparagraph"; break;
default: ASSERT(0); break;
}
t << "{";
}
}
-void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
+void LatexGenerator::endSection(const char *lab,SectionType)
{
t << "}\\label{" << lab << "}" << endl;
}
diff --git a/src/latexgen.h b/src/latexgen.h
index 7d4cae8..6bd1e17 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -241,8 +241,8 @@ class LatexGenerator : public OutputGenerator
void endParamList();
void startDescForItem() { t << "\\par" << endl; }
void endDescForItem() {}
- void startSection(const char *,const char *,SectionInfo::SectionType);
- void endSection(const char *,SectionInfo::SectionType);
+ void startSection(const char *,const char *,SectionType);
+ void endSection(const char *,SectionType);
void addIndexItem(const char *,const char *);
void startIndent() {}
void endIndent() {}
diff --git a/src/linkedmap.h b/src/linkedmap.h
new file mode 100644
index 0000000..76d906d
--- /dev/null
+++ b/src/linkedmap.h
@@ -0,0 +1,84 @@
+/******************************************************************************
+ *
+ * Copyright (C) 1997-2020 by Dimitri van Heesch.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation under the terms of the GNU General Public License is hereby
+ * granted. No representations are made about the suitability of this software
+ * 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
+ * input used in their production; they are not affected by this license.
+ *
+ */
+
+#ifndef LINKEDMAP_H
+#define LINKEDMAP_H
+
+#include <unordered_map>
+#include <vector>
+#include <memory>
+#include <string>
+
+//! @brief Container class representing a vector of objects with unique keys.
+//! @details Elements can be quickly looked up given the key.
+//! When adding objects the order of addition is kept, and used while iterating.
+template<class T>
+class LinkedMap
+{
+ public:
+ using Ptr = std::unique_ptr<T>;
+ using Vec = std::vector<Ptr>;
+ using Map = std::unordered_map<std::string,T*>;
+ using iterator = typename Vec::iterator;
+
+ //! find an element given the key.
+ //! Returns a pointer to the element if found or nullptr if it is not found.
+ const T *find(const char *key) const
+ {
+ auto it = m_lookup.find(key);
+ return it!=m_lookup.end() ? it->second : nullptr;
+ }
+
+ //! non-const wrapper for find() const
+ T* find(const char *key)
+ {
+ return const_cast<T*>(static_cast<const LinkedMap&>(*this).find(key));
+ }
+
+ //! Adds a new element to the ordered set if it was not added already.
+ //! Return a non-owning pointer to the newly added item, or to the existing item if it was
+ //! already inserted before.
+ template<class...Args>
+ T *add(const char *key, Args&&... args)
+ {
+ T *result = find(key);
+ if (result==nullptr)
+ {
+ Ptr ptr = std::make_unique<T>(key,std::forward<Args>(args)...);
+ result = ptr.get();
+ m_lookup.insert({std::string(key),result});
+ m_entries.push_back(std::move(ptr));
+ }
+ return result;
+ }
+
+ iterator begin() { return m_entries.begin(); }
+ iterator end() { return m_entries.end(); }
+ bool empty() const { return m_entries.empty(); }
+ int size() const { return m_entries.size(); }
+
+ void clear()
+ {
+ m_entries.clear();
+ m_lookup.clear();
+ }
+
+ private:
+ Map m_lookup;
+ Vec m_entries;
+};
+
+
+#endif
diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp
index 6b76008..fef857e 100644
--- a/src/mandocvisitor.cpp
+++ b/src/mandocvisitor.cpp
@@ -304,6 +304,12 @@ void ManDocVisitor::visit(DocInclude *inc)
case DocInclude::DontIncWithLines:
case DocInclude::HtmlInclude:
case DocInclude::LatexInclude:
+ case DocInclude::RtfInclude:
+ case DocInclude::XmlInclude:
+ case DocInclude::DocbookInclude:
+ break;
+ case DocInclude::ManInclude:
+ m_t << inc->text();
break;
case DocInclude::VerbInclude:
if (!m_firstCol) m_t << endl;
diff --git a/src/mangen.cpp b/src/mangen.cpp
index 5f07932..6709748 100644
--- a/src/mangen.cpp
+++ b/src/mangen.cpp
@@ -593,33 +593,33 @@ void ManGenerator::endMemberGroup(bool)
m_firstCol=FALSE;
}
-void ManGenerator::startSection(const char *,const char *,SectionInfo::SectionType type)
+void ManGenerator::startSection(const char *,const char *,SectionType type)
{
if( !m_inHeader )
{
switch(type)
{
- case SectionInfo::Page: startGroupHeader(FALSE); break;
- case SectionInfo::Section: startGroupHeader(FALSE); break;
- case SectionInfo::Subsection: startMemberHeader(0, -1); break;
- case SectionInfo::Subsubsection: startMemberHeader(0, -1); break;
- case SectionInfo::Paragraph: startMemberHeader(0, -1); break;
+ case SectionType::Page: startGroupHeader(FALSE); break;
+ case SectionType::Section: startGroupHeader(FALSE); break;
+ case SectionType::Subsection: startMemberHeader(0, -1); break;
+ case SectionType::Subsubsection: startMemberHeader(0, -1); break;
+ case SectionType::Paragraph: startMemberHeader(0, -1); break;
default: ASSERT(0); break;
}
}
}
-void ManGenerator::endSection(const char *,SectionInfo::SectionType type)
+void ManGenerator::endSection(const char *,SectionType type)
{
if( !m_inHeader )
{
switch(type)
{
- case SectionInfo::Page: endGroupHeader(0); break;
- case SectionInfo::Section: endGroupHeader(0); break;
- case SectionInfo::Subsection: endMemberHeader(); break;
- case SectionInfo::Subsubsection: endMemberHeader(); break;
- case SectionInfo::Paragraph: endMemberHeader(); break;
+ case SectionType::Page: endGroupHeader(0); break;
+ case SectionType::Section: endGroupHeader(0); break;
+ case SectionType::Subsection: endMemberHeader(); break;
+ case SectionType::Subsubsection: endMemberHeader(); break;
+ case SectionType::Paragraph: endMemberHeader(); break;
default: ASSERT(0); break;
}
}
diff --git a/src/mangen.h b/src/mangen.h
index eba6c8d..a3a2a33 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -176,8 +176,8 @@ class ManGenerator : public OutputGenerator
//void writeDescItem();
void startDescForItem();
void endDescForItem();
- void startSection(const char *,const char *,SectionInfo::SectionType);
- void endSection(const char *,SectionInfo::SectionType);
+ void startSection(const char *,const char *,SectionType);
+ void endSection(const char *,SectionType);
void addIndexItem(const char *,const char *) {}
void startIndent() {}
void endIndent() {}
diff --git a/src/markdown.cpp b/src/markdown.cpp
index 8594a15..b9b92c3 100644
--- a/src/markdown.cpp
+++ b/src/markdown.cpp
@@ -1957,20 +1957,20 @@ void writeOneLineHeaderOrRuler(GrowBuf &out,const char *data,int size)
QCString hTag;
if (level<5 && !id.isEmpty())
{
- SectionInfo::SectionType type = SectionInfo::Anchor;
+ SectionType type = SectionType::Anchor;
switch(level)
{
- case 1: out.addStr("@section ");
- type=SectionInfo::Section;
+ case 1: out.addStr("@section ");
+ type=SectionType::Section;
break;
- case 2: out.addStr("@subsection ");
- type=SectionInfo::Subsection;
+ case 2: out.addStr("@subsection ");
+ type=SectionType::Subsection;
break;
- case 3: out.addStr("@subsubsection ");
- type=SectionInfo::Subsubsection;
+ case 3: out.addStr("@subsubsection ");
+ type=SectionType::Subsubsection;
break;
- default: out.addStr("@paragraph ");
- type=SectionInfo::Paragraph;
+ default: out.addStr("@paragraph ");
+ type=SectionType::Paragraph;
break;
}
out.addStr(id);
@@ -2588,6 +2588,49 @@ QCString markdownFileNameToId(const QCString &fileName)
return "md_"+baseName;
}
+//---------------------------------------------------------------------------
+
+QCString processMarkdownForCommentBlock(const QCString &comment,
+ const QCString &fileName,
+ int lineNr)
+{
+ if (!comment.isEmpty() && Doxygen::markdownSupport)
+ {
+ QCString result = processMarkdown(fileName,lineNr,0,comment);
+ const char *p = result.data();
+ if (p)
+ {
+ while (*p==' ') p++; // skip over spaces
+ while (*p=='\n') p++; // skip over newlines
+ if (qstrncmp(p,"<br>",4)==0) p+=4; // skip over <br>
+ }
+ if (p>result.data())
+ {
+ // strip part of the input
+ result = result.mid(p-result.data());
+ }
+ return result;
+ }
+ else
+ {
+ return comment;
+ }
+}
+
+//---------------------------------------------------------------------------
+
+struct MarkdownOutlineParser::Private
+{
+ CommentScanner commentScanner;
+};
+
+MarkdownOutlineParser::MarkdownOutlineParser() : p(std::make_unique<Private>())
+{
+}
+
+MarkdownOutlineParser::~MarkdownOutlineParser()
+{
+}
void MarkdownOutlineParser::parseInput(const char *fileName,
const char *fileBuf,
@@ -2617,11 +2660,13 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
QFileInfo(mdfileAsMainPage).absFilePath()) // file reference with path
)
{
+ docs.prepend("@anchor " + id + "\n");
docs.prepend("@mainpage "+title+"\n");
}
else if (id=="mainpage" || id=="index")
{
if (title.isEmpty()) title = titleFn;
+ docs.prepend("@anchor " + id + "\n");
docs.prepend("@mainpage "+title+"\n");
}
else
@@ -2640,8 +2685,8 @@ void MarkdownOutlineParser::parseInput(const char *fileName,
Protection prot=Public;
bool needsEntry = FALSE;
int position=0;
- QCString processedDocs = preprocessCommentBlock(docs,fileName,lineNr);
- while (parseCommentBlock(
+ QCString processedDocs = processMarkdownForCommentBlock(docs,fileName,lineNr);
+ while (p->commentScanner.parseCommentBlock(
this,
current.get(),
processedDocs,
diff --git a/src/markdown.h b/src/markdown.h
index 3ffd155..bc1e9bb 100644
--- a/src/markdown.h
+++ b/src/markdown.h
@@ -25,10 +25,23 @@ class Entry;
QCString processMarkdown(const QCString &fileName,const int lineNr,Entry *e,const QCString &s);
QCString markdownFileNameToId(const QCString &fileName);
+/** Performs markdown processing for a comment block if markdown processing is enabled.
+ * @param[in] comment A string representing the actual comment block.
+ * Note that leading *'s should already be stripped from the comment block.
+ * @param[in] fileName The name of the file in which the comment is found.
+ * Mainly used for producing warnings.
+ * @param[in] lineNr The line number at which the comment block was found.
+ * @returns The processed comment block
+ */
+QCString processMarkdownForCommentBlock(const QCString &comment,
+ const QCString &fileName,
+ int lineNr);
+
class MarkdownOutlineParser : public OutlineParserInterface
{
public:
- virtual ~MarkdownOutlineParser() {}
+ MarkdownOutlineParser();
+ virtual ~MarkdownOutlineParser();
void startTranslationUnit(const char *) {}
void finishTranslationUnit() {}
void parseInput(const char *fileName,
@@ -38,6 +51,9 @@ class MarkdownOutlineParser : public OutlineParserInterface
QStrList &filesInSameTranslationUnit);
bool needsPreprocessing(const QCString &) const { return FALSE; }
void parsePrototype(const char *text);
+ private:
+ struct Private;
+ std::unique_ptr<Private> p;
};
diff --git a/src/memberdef.cpp b/src/memberdef.cpp
index 1c935ac..1d2a54e 100644
--- a/src/memberdef.cpp
+++ b/src/memberdef.cpp
@@ -4073,11 +4073,34 @@ void MemberDefImpl::warnIfUndocumented() const
}
}
+static QCString removeReturnTypeKeywords(const QCString &s)
+{
+ QCString result = s;
+ bool done;
+ do
+ {
+ done=true;
+ if (result.stripPrefix("constexpr ") ||
+ result.stripPrefix("consteval ") ||
+ result.stripPrefix("virtual ") ||
+ result.stripPrefix("static ") ||
+ result.stripPrefix("volatile "))
+ {
+ done=false;
+ }
+ }
+ while (!done);
+ return result;
+}
+
void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturnCommand) const
{
if (!Config_getBool(WARN_NO_PARAMDOC)) return;
- QCString returnType = typeString();
+ QCString returnType = removeReturnTypeKeywords(typeString());
bool isPython = getLanguage()==SrcLangExt_Python;
+ bool isFortran = getLanguage()==SrcLangExt_Fortran;
+ bool isFortranSubroutine = isFortran && returnType.find("subroutine")!=-1;
+ bool isVoidReturn = returnType=="void";
if (!m_impl->hasDocumentedParams && hasParamCommand)
{
@@ -4139,8 +4162,8 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
else if ( // see if return type is documented in a function w/o return type
hasReturnCommand &&
(
- returnType=="void" || // void return type
- returnType.find("subroutine")!=-1 || // fortran subroutine
+ isVoidReturn || // void return type
+ isFortranSubroutine || // fortran subroutine
isConstructor() || // a constructor
isDestructor() // or destructor
)
@@ -4151,10 +4174,10 @@ void MemberDefImpl::detectUndocumentedParams(bool hasParamCommand,bool hasReturn
}
else if ( // see if return needs to documented
m_impl->hasDocumentedReturnType ||
- returnType=="void" || // void return type
- returnType.find("subroutine")!=-1 || // fortran subroutine
- isConstructor() || // a constructor
- isDestructor() // or destructor
+ isVoidReturn || // void return type
+ isFortranSubroutine || // fortran subroutine
+ isConstructor() || // a constructor
+ isDestructor() // or destructor
)
{
m_impl->hasDocumentedReturnType = TRUE;
@@ -4456,7 +4479,7 @@ void MemberDefImpl::addListReference(Definition *)
memArgs = argsString();
}
}
- const std::vector<ListItemInfo> &xrefItems = xrefListItems();
+ const std::vector<RefItem*> &xrefItems = xrefListItems();
addRefItem(xrefItems,
qualifiedName()+argsString(), // argsString is needed for overloaded functions (see bug 609624)
memLabel,
diff --git a/src/membergroup.cpp b/src/membergroup.cpp
index 05c38c3..ee46ced 100644
--- a/src/membergroup.cpp
+++ b/src/membergroup.cpp
@@ -356,7 +356,7 @@ void MemberGroup::findSectionsInDocumentation(const Definition *d)
memberList->findSectionsInDocumentation(d);
}
-void MemberGroup::setRefItems(const std::vector<ListItemInfo> &sli)
+void MemberGroup::setRefItems(const std::vector<RefItem*> &sli)
{
m_xrefListItems.insert(m_xrefListItems.end(), sli.cbegin(), sli.cend());
}
@@ -368,7 +368,7 @@ void MemberGroup::writeTagFile(FTextStream &tagFile)
//--------------------------------------------------------------------------
-void MemberGroupInfo::setRefItems(const std::vector<ListItemInfo> &sli)
+void MemberGroupInfo::setRefItems(const std::vector<RefItem*> &sli)
{
m_sli.insert(m_sli.end(), sli.cbegin(), sli.cend());
}
diff --git a/src/membergroup.h b/src/membergroup.h
index aa30063..dee998b 100644
--- a/src/membergroup.h
+++ b/src/membergroup.h
@@ -35,7 +35,7 @@ class GroupDef;
class OutputList;
class Definition;
class FTextStream;
-struct ListItemInfo;
+class RefItem;
/** A class representing a group of members. */
class MemberGroup
@@ -81,7 +81,7 @@ class MemberGroup
int countInheritableMembers(const ClassDef *inheritedFrom) const;
void setInGroup(bool b);
void addListReferences(Definition *d);
- void setRefItems(const std::vector<ListItemInfo> &sli);
+ void setRefItems(const std::vector<RefItem*> &sli);
MemberList *members() const { return memberList; }
QCString anchor() const;
@@ -101,7 +101,7 @@ class MemberGroup
const Definition *m_parent = 0;
QCString m_docFile;
int m_docLine = 0;
- std::vector<ListItemInfo> m_xrefListItems;
+ std::vector<RefItem*> m_xrefListItems;
};
/** A list of MemberGroup objects. */
@@ -133,13 +133,13 @@ class MemberGroupSDict : public SIntDict<MemberGroup>
/** Data collected for a member group */
struct MemberGroupInfo
{
- void setRefItems(const std::vector<ListItemInfo> &sli);
+ void setRefItems(const std::vector<RefItem*> &sli);
QCString header;
QCString doc;
QCString docFile;
int docLine = -1;
QCString compoundName;
- std::vector<ListItemInfo> m_sli;
+ std::vector<RefItem*> m_sli;
};
#endif
diff --git a/src/memberlist.cpp b/src/memberlist.cpp
index 278023b..edd164b 100644
--- a/src/memberlist.cpp
+++ b/src/memberlist.cpp
@@ -75,8 +75,15 @@ int MemberList::compareValues(const MemberDef *c1, const MemberDef *c2) const
return 1;
}
int cmp = qstricmp(c1->name(),c2->name());
- if (cmp==0) cmp = qstricmp(c1->argsString(),c2->argsString());
- return cmp!=0 ? cmp : c1->getDefLine()-c2->getDefLine();
+ if (cmp==0 && c1->argsString() && c2->argsString())
+ {
+ cmp = qstricmp(c1->argsString(),c2->argsString());
+ }
+ if (cmp==0)
+ {
+ cmp = c1->getDefLine()-c2->getDefLine();
+ }
+ return cmp;
}
int MemberList::countInheritableMembers(const ClassDef *inheritedFrom) const
diff --git a/src/message.cpp b/src/message.cpp
index d8f83ef..9a5eaca 100644
--- a/src/message.cpp
+++ b/src/message.cpp
@@ -259,7 +259,7 @@ void term(const char *fmt, ...)
va_end(args);
if (warnFile != stderr)
{
- for (int i = 0; i < strlen(error_str); i++) fprintf(warnFile, " ");
+ for (int i = 0; i < (int)strlen(error_str); i++) fprintf(warnFile, " ");
fprintf(warnFile, "%s\n", "Exiting...");
}
exit(1);
diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp
index 220f300..ee2d878 100644
--- a/src/namespacedef.cpp
+++ b/src/namespacedef.cpp
@@ -1269,7 +1269,7 @@ void NamespaceDefImpl::addListReferences()
{
//bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
{
- const std::vector<ListItemInfo> &xrefItems = xrefListItems();
+ const std::vector<RefItem*> &xrefItems = xrefListItems();
addRefItem(xrefItems,
qualifiedName(),
getLanguage()==SrcLangExt_Fortran ?
diff --git a/src/outputgen.h b/src/outputgen.h
index 576e950..2b4da98 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -290,8 +290,8 @@ class BaseOutputDocInterface : public CodeOutputInterface
virtual void endTitle() = 0;
virtual void writeAnchor(const char *fileName,const char *name) = 0;
- virtual void startSection(const char *,const char *,SectionInfo::SectionType) = 0;
- virtual void endSection(const char *,SectionInfo::SectionType) = 0;
+ virtual void startSection(const char *,const char *,SectionType) = 0;
+ virtual void endSection(const char *,SectionType) = 0;
virtual void lineBreak(const char *style) = 0;
virtual void addIndexItem(const char *s1,const char *s2) = 0;
diff --git a/src/outputlist.h b/src/outputlist.h
index cfd3773..a944e5c 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -45,7 +45,6 @@ class DotClassGraph;
class DotDirDeps;
class DotInclDepGraph;
class DotGfxHierarchyTable;
-class SectionDict;
class DotGroupCollaboration;
class DocRoot;
@@ -329,9 +328,9 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startIndent); }
void endIndent()
{ forall(&OutputGenerator::endIndent); }
- void startSection(const char *lab,const char *title,SectionInfo::SectionType t)
+ void startSection(const char *lab,const char *title,SectionType t)
{ forall(&OutputGenerator::startSection,lab,title,t); }
- void endSection(const char *lab,SectionInfo::SectionType t)
+ void endSection(const char *lab,SectionType t)
{ forall(&OutputGenerator::endSection,lab,t); }
void addIndexItem(const char *s1,const char *s2)
{ forall(&OutputGenerator::addIndexItem,s1,s2); }
diff --git a/src/pagedef.cpp b/src/pagedef.cpp
index 8b6228f..3f96a4b 100644
--- a/src/pagedef.cpp
+++ b/src/pagedef.cpp
@@ -148,9 +148,7 @@ bool PageDefImpl::hasParentPage() const
void PageDefImpl::writeTagFile(FTextStream &tagFile)
{
bool found = name()=="citelist";
- QDictIterator<RefList> rli(*Doxygen::xrefLists);
- RefList *rl;
- for (rli.toFirst();(rl=rli.current()) && !found;++rli)
+ for (RefListManager::Ptr &rl : RefListManager::instance())
{
if (rl->listName()==name())
{
@@ -213,7 +211,7 @@ void PageDefImpl::writeDocumentation(OutputList &ol)
}
ol.endQuickIndices();
}
- SectionInfo *si=Doxygen::sectionDict->find(name());
+ const SectionInfo *si=SectionManager::instance().find(name());
// save old generator state and write title only to Man generator
ol.pushGeneratorState();
@@ -228,10 +226,10 @@ void PageDefImpl::writeDocumentation(OutputList &ol)
ol.writeString(" - ");
ol.popGeneratorState();
- if (si->title != manPageName)
+ if (si->title() != manPageName)
{
- ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE);
- ol.endSection(si->label,si->type);
+ ol.generateDoc(docFile(),docLine(),this,0,si->title(),TRUE,FALSE,0,TRUE,FALSE);
+ ol.endSection(si->label(),si->type());
}
}
ol.popGeneratorState();
@@ -246,10 +244,10 @@ void PageDefImpl::writeDocumentation(OutputList &ol)
ol.disable(OutputGenerator::Man);
if (hasTitle() && !name().isEmpty() && si!=0)
{
- ol.startPageDoc(si->title);
+ ol.startPageDoc(si->title());
//ol.startSection(si->label,si->title,si->type);
startTitle(ol,getOutputFileBase(),this);
- ol.generateDoc(docFile(),docLine(),this,0,si->title,TRUE,FALSE,0,TRUE,FALSE);
+ ol.generateDoc(docFile(),docLine(),this,0,si->title(),TRUE,FALSE,0,TRUE,FALSE);
//stringToSearchIndex(getOutputFileBase(),
// theTranslator->trPage(TRUE,TRUE)+" "+si->title,
// si->title);
@@ -297,7 +295,7 @@ void PageDefImpl::writePageDocumentation(OutputList &ol)
ol.startTextBlock();
QCString docStr = documentation()+inbodyDocumentation();
- if (hasBriefDescription() && !Doxygen::sectionDict->find(name()))
+ if (hasBriefDescription() && !SectionManager::instance().find(name()))
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Man);
@@ -331,14 +329,14 @@ void PageDefImpl::writePageDocumentation(OutputList &ol)
PageDef *subPage=pdi.toFirst();
for (pdi.toFirst();(subPage=pdi.current());++pdi)
{
- SectionInfo::SectionType sectionType = SectionInfo::Paragraph;
+ SectionType sectionType = SectionType::Paragraph;
switch (m_nestingLevel)
{
- case 0: sectionType = SectionInfo::Page; break;
- case 1: sectionType = SectionInfo::Section; break;
- case 2: sectionType = SectionInfo::Subsection; break;
- case 3: sectionType = SectionInfo::Subsubsection; break;
- default: sectionType = SectionInfo::Paragraph; break;
+ case 0: sectionType = SectionType::Page; break;
+ case 1: sectionType = SectionType::Section; break;
+ case 2: sectionType = SectionType::Subsection; break;
+ case 3: sectionType = SectionType::Subsubsection; break;
+ default: sectionType = SectionType::Paragraph; break;
}
QCString title = subPage->title();
if (title.isEmpty()) title = subPage->name();
diff --git a/src/parserintf.h b/src/parserintf.h
index 5095a1e..6dc9569 100644
--- a/src/parserintf.h
+++ b/src/parserintf.h
@@ -178,10 +178,12 @@ class ParserManager
}
/** Registers an additional parser.
- * @param[in] name A symbolic name of the parser, i.e. "c",
- * "python", "fortran", "vhdl", ...
- * @param[in] parser The parser that is to be used for the
- * given name.
+ * @param[in] name A symbolic name of the parser, i.e. "c",
+ * "python", "fortran", "vhdl", ...
+ * @param[in] outlineParser The language parser (scanner) that is to be used for the
+ * given name.
+ * @param[in] codeParser The code parser that is to be used for the
+ * given name.
*/
void registerParser(const char *name,std::unique_ptr<OutlineParserInterface> outlineParser,
std::unique_ptr<CodeParserInterface> codeParser)
diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp
index d0c1e32..c19d7c4 100644
--- a/src/perlmodgen.cpp
+++ b/src/perlmodgen.cpp
@@ -733,6 +733,10 @@ void PerlModDocVisitor::visit(DocInclude *inc)
case DocInclude::DontIncWithLines: return;
case DocInclude::HtmlInclude: type = "htmlonly"; break;
case DocInclude::LatexInclude: type = "latexonly"; break;
+ case DocInclude::RtfInclude: type = "rtfonly"; break;
+ case DocInclude::ManInclude: type = "manonly"; break;
+ case DocInclude::XmlInclude: type = "xmlonly"; break;
+ case DocInclude::DocbookInclude: type = "docbookonly"; break;
case DocInclude::VerbInclude: type = "preformatted"; break;
case DocInclude::Snippet: return;
case DocInclude::SnipWithLines: return;
@@ -2193,9 +2197,9 @@ void PerlModGenerator::generatePerlModForPage(PageDef *pd)
m_output.openHash()
.addFieldQuotedString("name", pd->name());
- SectionInfo *si = Doxygen::sectionDict->find(pd->name());
+ const SectionInfo *si = SectionManager::instance().find(pd->name());
if (si)
- m_output.addFieldQuotedString("title4", filterTitle(si->title));
+ m_output.addFieldQuotedString("title4", filterTitle(si->title()));
addPerlModDocBlock(m_output,"detailed",pd->docFile(),pd->docLine(),0,0,pd->documentation());
m_output.closeHash();
diff --git a/src/plantuml.cpp b/src/plantuml.cpp
index fa50f2d..7d60e32 100644
--- a/src/plantuml.cpp
+++ b/src/plantuml.cpp
@@ -76,7 +76,7 @@ QCString PlantumlManager::writePlantUMLSource(const QCString &outDir,const QCStr
uint pos = qcOutDir.findRev("/");
QCString generateType(qcOutDir.right(qcOutDir.length() - (pos + 1)) );
Debug::print(Debug::Plantuml,0,"*** %s generateType: %s\n","writePlantUMLSource",qPrint(generateType));
- PlantumlManager::instance()->insert(generateType,puName,format,text);
+ PlantumlManager::instance()->insert(generateType,puName,outDir,format,text);
Debug::print(Debug::Plantuml,0,"*** %s generateType: %s\n","writePlantUMLSource",qPrint(generateType));
return baseName;
@@ -178,7 +178,7 @@ PlantumlManager::~PlantumlManager()
}
static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
- const QDict< QCString > &plantumlContent,
+ const QDict< PlantumlContent > &plantumlContent,
PlantumlManager::OutputFormat format)
{
/* example : running: java -Djava.awt.headless=true
@@ -244,25 +244,21 @@ static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
}
{
- QDictIterator< QCString > it( plantumlContent); // See QDictIterator
- QCString *nb;
+ QDictIterator< PlantumlContent > it( plantumlContent); // See QDictIterator
+ PlantumlContent *nb;
for (it.toFirst();(nb=it.current());++it)
{
QCString pumlArguments(pumlArgs);
msg("Generating PlantUML %s Files in %s\n",qPrint(pumlType),qPrint(it.currentKey()));
pumlArguments+="-o \"";
- pumlArguments+=Config_getString(OUTPUT_DIRECTORY);
- pumlArguments+="/";
- pumlArguments+=it.currentKey();
+ pumlArguments+=nb->outDir.data();
pumlArguments+="\" ";
pumlArguments+="-charset UTF-8 -t";
pumlArguments+=pumlType;
pumlArguments+=" ";
QCString puFileName("");
- puFileName+=Config_getString(OUTPUT_DIRECTORY);
- puFileName+="/";
- puFileName+=it.currentKey();
+ puFileName+=nb->outDir.data();
puFileName+="/";
pumlOutDir=puFileName;
puFileName+="inline_umlgraph_";
@@ -279,7 +275,7 @@ static void runPlantumlContent(const QDict< QList <QCString> > &plantumlFiles,
{
err("Could not open file %s for writing\n",puFileName.data());
}
- file.writeBlock( *nb, nb->length() );
+ file.writeBlock( nb->content, nb->content.length() );
file.close();
Debug::print(Debug::Plantuml,0,"*** %s Running Plantuml arguments:%s\n","PlantumlManager::runPlantumlContent",qPrint(pumlArguments));
@@ -358,16 +354,16 @@ static void print(const QDict< QList <QCString> > &plantumlFiles)
}
}
-static void print(const QDict<QCString> &plantumlContent)
+static void print(const QDict<PlantumlContent> &plantumlContent)
{
if (Debug::isFlagSet(Debug::Plantuml))
{
- QDictIterator< QCString > it( plantumlContent); // See QDictIterator
- QCString *nb;
+ QDictIterator< PlantumlContent > it( plantumlContent); // See QDictIterator
+ PlantumlContent *nb;
for (it.toFirst();(nb=it.current());++it)
{
Debug::print(Debug::Plantuml,0,"*** %s PlantumlContent key:%s\n","PlantumlManager::print Content",qPrint(it.currentKey()));
- Debug::print(Debug::Plantuml,0,"*** %s Content :%s\n","PlantumlManager::print",qPrint(*nb));
+ Debug::print(Debug::Plantuml,0,"*** %s Content :%s\n","PlantumlManager::print",qPrint(nb->content));
}
}
}
@@ -384,22 +380,22 @@ static void addPlantumlFiles(QDict< QList<QCString> > &plantumlFiles,
list->append(new QCString(value));
}
-static void addPlantumlContent(QDict< QCString > &plantumlContent,
- const QCString &key, const QCString &puContent)
+static void addPlantumlContent(QDict< PlantumlContent > &plantumlContent,
+ const QCString &key, const QCString &outDir, const QCString &puContent)
{
- QCString* content = plantumlContent.find(key);
+ PlantumlContent* content = plantumlContent.find(key);
if (content == 0)
{
- content = new QCString("");
+ content = new PlantumlContent("",outDir);
plantumlContent.insert(key,content);
}
- (*content)+=puContent;
+ (content->content)+=puContent;
}
void PlantumlManager::insert(const QCString &key, const QCString &value,
- OutputFormat format,const QCString &puContent)
+ const QCString &outDir,OutputFormat format,const QCString &puContent)
{
int find;
@@ -419,19 +415,19 @@ void PlantumlManager::insert(const QCString &key, const QCString &value,
case PUML_BITMAP:
addPlantumlFiles(m_pngPlantumlFiles,key,value);
print(m_pngPlantumlFiles);
- addPlantumlContent(m_pngPlantumlContent,key,puContent);
+ addPlantumlContent(m_pngPlantumlContent,key,outDir,puContent);
print(m_pngPlantumlContent);
break;
case PUML_EPS:
addPlantumlFiles(m_epsPlantumlFiles,key,value);
print(m_epsPlantumlFiles);
- addPlantumlContent(m_epsPlantumlContent,key,puContent);
+ addPlantumlContent(m_epsPlantumlContent,key,outDir,puContent);
print(m_epsPlantumlContent);
break;
case PUML_SVG:
addPlantumlFiles(m_svgPlantumlFiles,key,value);
print(m_svgPlantumlFiles);
- addPlantumlContent(m_svgPlantumlContent,key,puContent);
+ addPlantumlContent(m_svgPlantumlContent,key,outDir,puContent);
print(m_svgPlantumlContent);
break;
}
diff --git a/src/plantuml.h b/src/plantuml.h
index d3a01f5..f2e9dec 100644
--- a/src/plantuml.h
+++ b/src/plantuml.h
@@ -24,6 +24,17 @@
#define MIN_PLANTUML_COUNT 8
class QCString;
+struct PlantumlContent
+{
+ QCString outDir;
+ QCString content;
+ PlantumlContent(const QCString Content, const QCString OutDir)
+ {
+ outDir = OutDir;
+ content = Content;
+ };
+ ~PlantumlContent(){};
+};
/** Singleton that manages plantuml relation actions */
class PlantumlManager
@@ -58,15 +69,16 @@ class PlantumlManager
~PlantumlManager();
void insert(const QCString &key,
const QCString &value,
+ const QCString &outDir,
OutputFormat format,
const QCString &puContent);
static PlantumlManager *m_theInstance;
QDict< QList<QCString> > m_pngPlantumlFiles;
QDict< QList<QCString> > m_svgPlantumlFiles;
QDict< QList<QCString> > m_epsPlantumlFiles;
- QDict< QCString > m_pngPlantumlContent; // use circular queue for using multi-processor (multi threading)
- QDict< QCString > m_svgPlantumlContent;
- QDict< QCString > m_epsPlantumlContent;
+ QDict< PlantumlContent > m_pngPlantumlContent; // use circular queue for using multi-processor (multi threading)
+ QDict< PlantumlContent > m_svgPlantumlContent;
+ QDict< PlantumlContent > m_epsPlantumlContent;
QCString m_cachedPlantumlAllContent; // read from CACHE_FILENAME file
QCString m_currentPlantumlAllContent; // processing plantuml then write it into CACHE_FILENAME to reuse the next time as cache information
};
diff --git a/src/portable.cpp b/src/portable.cpp
index 3ee1081..8c941b6 100644
--- a/src/portable.cpp
+++ b/src/portable.cpp
@@ -251,7 +251,7 @@ void Portable::setenv(const char *name,const char *value)
loadEnvironment();
}
- proc_env[name] = std::string(value); // create or replace exisiting value
+ proc_env[name] = std::string(value); // create or replace existing value
#endif
}
@@ -348,10 +348,71 @@ char Portable::pathListSeparator(void)
#endif
}
+static const bool ExistsOnPath(const char *fileName)
+{
+ QFileInfo fi1(fileName);
+ if (fi1.exists()) return true;
+
+ const char *p = Portable::getenv("PATH");
+ char listSep = Portable::pathListSeparator();
+ char pathSep = Portable::pathSeparator();
+ QCString paths(p);
+ int strt = 0;
+ int idx;
+ while ((idx = paths.find(listSep,strt)) != -1)
+ {
+ QCString locFile(paths.mid(strt,idx-strt));
+ locFile += pathSep;
+ locFile += fileName;
+ QFileInfo fi(locFile);
+ if (fi.exists()) return true;
+ strt = idx + 1;
+ }
+ // to be sure the last path component is checked as well
+ QCString locFile(paths.mid(strt));
+ if (!locFile.isEmpty())
+ {
+ locFile += pathSep;
+ locFile += fileName;
+ QFileInfo fi(locFile);
+ if (fi.exists()) return true;
+ }
+ return false;
+}
+
+const bool Portable::checkForExecutable(const char *fileName)
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ char *extensions[] = {".bat",".com",".exe"};
+ for (int i = 0; i < sizeof(extensions) / sizeof(*extensions); i++)
+ {
+ if (ExistsOnPath(QCString(fileName) + extensions[i])) return true;
+ }
+ return false;
+#else
+ return ExistsOnPath(fileName);
+#endif
+}
+
const char *Portable::ghostScriptCommand(void)
{
#if defined(_WIN32) && !defined(__CYGWIN__)
- return "gswin32c.exe";
+ static char *gsexe = NULL;
+ if (!gsexe)
+ {
+ char *gsExec[] = {"gswin32c.exe","gswin64c.exe"};
+ for (int i = 0; i < sizeof(gsExec) / sizeof(*gsExec); i++)
+ {
+ if (ExistsOnPath(gsExec[i]))
+ {
+ gsexe = gsExec[i];
+ return gsexe;
+ }
+ }
+ gsexe = gsExec[0];
+ return gsexe;
+ }
+ return gsexe;
#else
return "gs";
#endif
@@ -518,3 +579,12 @@ const char *Portable::strnstr(const char *haystack, const char *needle, size_t h
}
return 0;
}
+
+const char *Portable::devNull()
+{
+#if defined(_WIN32) && !defined(__CYGWIN__)
+ return "NUL";
+#else
+ return "/dev/null";
+#endif
+}
diff --git a/src/portable.h b/src/portable.h
index 771108e..6c215a8 100644
--- a/src/portable.h
+++ b/src/portable.h
@@ -43,6 +43,8 @@ namespace Portable
void correct_path(void);
void setShortDir(void);
const char * strnstr(const char *haystack, const char *needle, size_t haystack_len);
+ const char * devNull();
+ const bool checkForExecutable(const char *fileName);
}
diff --git a/src/pre.h b/src/pre.h
index 137b397..47f6652 100644
--- a/src/pre.h
+++ b/src/pre.h
@@ -18,6 +18,8 @@
#ifndef PRE_H
#define PRE_H
+#include <memory>
+
class BufStr;
class Preprocessor
@@ -29,7 +31,7 @@ class Preprocessor
void addSearchDir(const char *dir);
private:
struct Private;
- Private *p;
+ std::unique_ptr<Private> p;
};
#endif
diff --git a/src/pre.l b/src/pre.l
index 7685853..fbf7bde 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -18,6 +18,9 @@
%option prefix="preYY"
%option reentrant
%option extra-type="struct preYY_state *"
+%top{
+#include <stdint.h>
+}
%{
@@ -2379,6 +2382,8 @@ static int getNextId(const QCString &expr,int p,int *l)
return -1;
}
+#define MAX_EXPANSION_DEPTH 50
+
/*! performs recursive macro expansion on the string \a expr
* starting at position \a pos.
* May read additional characters from the input while re-scanning!
@@ -2392,7 +2397,7 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
//printf("<expandExpression: empty\n");
return TRUE;
}
- if (state->expansionDict.find(expr)!=0) // check for recursive expansions
+ if (state->expansionDict.find(expr)!=0 && level>MAX_EXPANSION_DEPTH) // check for too deep recursive expansions
{
//printf("<expandExpression: already expanded expr='%s'\n",expr.data());
return FALSE;
@@ -2405,6 +2410,8 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
QCString expMacro;
bool definedTest=FALSE;
int i=pos,l,p,len;
+ int startPos = pos;
+ int samePosCount=0;
while ((p=getNextId(expr,i,&l))!=-1) // search for an macro name
{
bool replaced=FALSE;
@@ -2492,6 +2499,20 @@ static bool expandExpression(yyscan_t yyscanner,QCString &expr,QCString *rest,in
i=p+l+2;
//i=p+l;
}
+ // check for too many inplace expansions without making progress
+ if (i==startPos)
+ {
+ samePosCount++;
+ }
+ else
+ {
+ startPos=i;
+ samePosCount=0;
+ }
+ if (samePosCount>MAX_EXPANSION_DEPTH)
+ {
+ break;
+ }
}
else // no re-scan marker found, skip the macro name
{
@@ -2780,7 +2801,6 @@ static void addDefine(yyscan_t yyscanner)
YY_EXTRA_TYPE state = preYYget_extra(yyscanner);
if (state->skip) return; // do not add this define as it is inside a
// conditional section (cond command) that is disabled.
- if (!Doxygen::gatherDefines) return;
//printf("addDefine '%s' '%s'\n",state->defName.data(),state->defArgsStr.data());
//ArgumentList *al = new ArgumentList;
@@ -3194,9 +3214,8 @@ void Preprocessor::addSearchDir(const char *dir)
if (fi.isDir()) state->pathList->append(fi.absFilePath().utf8());
}
-Preprocessor::Preprocessor()
+Preprocessor::Preprocessor() : p(std::make_unique<Private>())
{
- p = new Private;
preYYlex_init_extra(&p->state,&p->yyscanner);
YY_EXTRA_TYPE state = preYYget_extra(p->yyscanner);
state->pathList = new QStrList;
@@ -3212,7 +3231,6 @@ Preprocessor::~Preprocessor()
delete state->pathList;
state->pathList=0;
preYYlex_destroy(p->yyscanner);
- delete p;
}
void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output)
@@ -3417,7 +3435,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
{
char *orgPos=output.data()+orgOffset;
char *newPos=output.data()+output.curPos();
- Debug::print(Debug::Preprocessor,0,"Preprocessor output (size: %d bytes):\n",newPos-orgPos);
+ Debug::print(Debug::Preprocessor,0,"Preprocessor output of %s (size: %d bytes):\n",fileName,newPos-orgPos);
int line=1;
Debug::print(Debug::Preprocessor,0,"---------\n00001 ");
while (orgPos<newPos)
@@ -3429,7 +3447,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
Debug::print(Debug::Preprocessor,0,"\n---------\n");
if (state->defineManager.defineContext().count()>0)
{
- Debug::print(Debug::Preprocessor,0,"Macros accessible in this file:\n");
+ Debug::print(Debug::Preprocessor,0,"Macros accessible in this file (%s):\n", fileName);
Debug::print(Debug::Preprocessor,0,"---------\n");
QDictIterator<Define> di(state->defineManager.defineContext());
Define *def;
@@ -3441,7 +3459,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output
}
else
{
- Debug::print(Debug::Preprocessor,0,"No macros accessible in this file.\n");
+ Debug::print(Debug::Preprocessor,0,"No macros accessible in this file (%s).\n", fileName);
}
}
state->defineManager.endContext();
diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h
index ed4e76b..7bc5821 100644
--- a/src/printdocvisitor.h
+++ b/src/printdocvisitor.h
@@ -202,6 +202,10 @@ class PrintDocVisitor : public DocVisitor
if (inc->isBlock()) printf(" block=\"yes\"");
break;
case DocInclude::LatexInclude: printf("latexinclude"); break;
+ case DocInclude::RtfInclude: printf("rtfinclude"); break;
+ case DocInclude::DocbookInclude: printf("docbookinclude"); break;
+ case DocInclude::ManInclude: printf("maninclude"); break;
+ case DocInclude::XmlInclude: printf("xmlinclude"); break;
case DocInclude::VerbInclude: printf("verbinclude"); break;
case DocInclude::Snippet: printf("snippet"); break;
case DocInclude::SnipWithLines: printf("snipwithlines"); break;
diff --git a/src/pycode.l b/src/pycode.l
index f7e255f..9dee2e8 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -23,6 +23,9 @@
%option never-interactive
%option prefix="pycodeYY"
+%top{
+#include <stdint.h>
+}
%{
diff --git a/src/pyscanner.h b/src/pyscanner.h
index 6cfadf6..d6e8672 100644
--- a/src/pyscanner.h
+++ b/src/pyscanner.h
@@ -34,6 +34,8 @@
class PythonOutlineParser : public OutlineParserInterface
{
public:
+ PythonOutlineParser();
+ virtual ~PythonOutlineParser();
void startTranslationUnit(const char *) {}
void finishTranslationUnit() {}
void parseInput(const char * fileName,
@@ -43,8 +45,9 @@ class PythonOutlineParser : public OutlineParserInterface
QStrList &filesInSameTranslationUnit);
bool needsPreprocessing(const QCString &extension) const;
void parsePrototype(const char *text);
+ private:
+ struct Private;
+ std::unique_ptr<Private> p;
};
-void pyscanFreeScanner();
-
#endif
diff --git a/src/pyscanner.l b/src/pyscanner.l
index efdc943..0abaae1 100644
--- a/src/pyscanner.l
+++ b/src/pyscanner.l
@@ -23,6 +23,11 @@
%option never-interactive
%option prefix="pyscannerYY"
+%option reentrant
+%option extra-type="struct pyscannerYY_state *"
+%top{
+#include <stdint.h>
+}
%{
@@ -49,8 +54,8 @@
#include "defargs.h"
#include "language.h"
#include "commentscan.h"
-#include "pycode.h"
#include "arguments.h"
+#include "markdown.h"
// Toggle for some debugging info
//#define DBG_CTX(x) fprintf x
@@ -59,358 +64,84 @@
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
-/* -----------------------------------------------------------------
- *
- * statics
- */
-
-
-static OutlineParserInterface *g_thisParser;
-static const char * inputString;
-static int inputPosition;
-static QFile inputFile;
-
-static Protection protection;
-
-static std::shared_ptr<Entry> current_root;
-static std::shared_ptr<Entry> current;
-static std::shared_ptr<Entry> previous;
-static std::shared_ptr<Entry> bodyEntry;
-static int yyLineNr = 1 ;
-static QCString yyFileName;
-static MethodTypes mtype;
-static bool gstat;
-static Specifier virt;
-
-static int docBlockContext;
-static QCString docBlock;
-static bool docBlockInBody;
-static bool docBlockJavaStyle;
-static bool docBrief;
-static bool docBlockSpecial;
-
-static bool g_doubleQuote;
-static bool g_specialBlock;
-static int g_stringContext;
-static QGString * g_copyString;
-static int g_indent = 0;
-static int g_curIndent = 0;
-static bool g_importTuple;
-
-static QDict<QCString> g_packageNameCache(257);
-
-static char g_atomStart;
-static char g_atomEnd;
-static int g_atomCount;
-
-
-//static bool g_insideConstructor;
-
-static QCString g_moduleScope;
-static QCString g_packageName;
-
-//static bool g_hideClassDocs;
-
-static QGString g_defVal;
-static int g_braceCount;
-
-static bool g_lexInit = FALSE;
-static bool g_packageCommentAllowed;
-
-static bool g_start_init = FALSE;
-static int g_search_count = 0;
-
-static QCString g_argType = "";
-static bool g_funcParamsEnd;
-//-----------------------------------------------------------------------------
-static const char *stateToString(int state);
-
-
-static void initParser()
-{
- protection = Public;
- mtype = Method;
- gstat = FALSE;
- virt = Normal;
- previous = 0;
- g_packageCommentAllowed = TRUE;
- g_packageNameCache.setAutoDelete(TRUE);
-}
-
-static void initEntry()
-{
- //current->python = TRUE;
- current->protection = protection ;
- current->mtype = mtype;
- current->virt = virt;
- current->stat = gstat;
- current->lang = SrcLangExt_Python;
- Doxygen::docGroup.initGroupInfo(current.get());
- gstat = FALSE;
-}
-
-static void newEntry()
-{
- previous = current;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
-}
-
-static void newVariable()
-{
- if (!current->name.isEmpty() && current->name.at(0)=='_') // mark as private
- {
- current->protection=Private;
- }
- if (current_root->section&Entry::COMPOUND_MASK) // mark as class variable
- {
- current->stat = TRUE;
- }
- newEntry();
-}
-
-static void newFunction()
-{
- if (current->name.left(2)=="__" && current->name.right(2)=="__")
- {
- // special method name, see
- // http://docs.python.org/ref/specialnames.html
- current->protection=Public;
- }
- else if (current->name.at(0)=='_')
- {
- current->protection=Private;
- }
-}
-
-static inline int computeIndent(const char *s)
-{
- int col=0;
- static int tabSize=Config_getInt(TAB_SIZE);
- const char *p=s;
- char c;
- while ((c=*p++))
- {
- if (c==' ') col++;
- else if (c=='\t') col+=tabSize-(col%tabSize);
- else break;
- }
- return col;
-}
+/* ----------------------------------------------------------------- */
-static QCString findPackageScopeFromPath(const QCString &path)
-{
- QCString *pScope = g_packageNameCache.find(path);
- if (pScope)
- {
- return *pScope;
- }
- QFileInfo pf(path+"/__init__.py"); // found package initialization file
- if (pf.exists())
- {
- int i=path.findRev('/');
- if (i!=-1)
- {
- QCString scope = findPackageScopeFromPath(path.left(i));
- if (!scope.isEmpty())
- {
- scope+="::";
- }
- scope+=path.mid(i+1);
- g_packageNameCache.insert(path,new QCString(scope));
- return scope;
- }
- }
- return "";
-}
-
-static QCString findPackageScope(const char *fileName)
+struct pyscannerYY_state
{
- if (fileName==0) return "";
- QFileInfo fi(fileName);
- return findPackageScopeFromPath(fi.dirPath(TRUE).data());
-}
+ pyscannerYY_state() : packageNameCache(257) {}
+ CommentScanner commentScanner;
+ OutlineParserInterface *thisParser = 0;
+ const char * inputString = 0;
+ int inputPosition = 0;
+ Protection protection = Public;
+ std::shared_ptr<Entry> current_root;
+ std::shared_ptr<Entry> current;
+ std::shared_ptr<Entry> previous;
+ std::shared_ptr<Entry> bodyEntry;
+ int yyLineNr = 1 ;
+ QCString yyFileName;
+ MethodTypes mtype = Method;
+ bool stat = FALSE;
+ Specifier virt = Normal;
+ int docBlockContext = 0;
+ QCString docBlock;
+ bool docBlockInBody = FALSE;
+ bool docBlockJavaStyle = FALSE;
+ bool docBrief = FALSE;
+ bool docBlockSpecial = FALSE;
+ bool doubleQuote = FALSE;
+ bool specialBlock = FALSE;
+ int stringContext = 0;
+ QGString * copyString = 0;
+ int indent = 0;
+ int curIndent = 0;
+ bool importTuple = FALSE;
+ QDict<QCString> packageNameCache;
+ char atomStart = 0;
+ char atomEnd = 0;
+ int atomCount = 0;
+ QCString moduleScope;
+ QCString packageName;
+ QGString defVal;
+ int braceCount = 0;
+ bool lexInit = FALSE;
+ bool packageCommentAllowed = FALSE;
+ bool start_init = FALSE;
+ int search_count = 0;
+ QCString argType;
+ bool funcParamsEnd = FALSE;
+};
-static void addFrom(bool all)
-{
- QCString item=all ? g_packageName : g_packageName+"."+yytext;
- current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
- current->fileName = yyFileName;
- //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
- current->section=all ? Entry::USINGDIR_SEC : Entry::USINGDECL_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
-}
//-----------------------------------------------------------------------------
+static const char *stateToString(int state);
-static void lineCount()
-{
- DBG_CTX((stderr,"yyLineNr=%d\n",yyLineNr));
- for (const char *p = yytext; *p; ++p)
- {
- yyLineNr += (*p == '\n') ;
- }
-}
-
-static void incLineNr()
-{
- DBG_CTX((stderr,"yyLineNr=%d\n",yyLineNr));
- yyLineNr++;
-}
-
-//-----------------------------------------------------------------
-static void startCommentBlock(bool brief)
-{
- if (brief)
- {
- current->briefFile = yyFileName;
- current->briefLine = yyLineNr;
- }
- else
- {
- current->docFile = yyFileName;
- current->docLine = yyLineNr;
- }
-}
-
-static void handleCommentBlock(const QCString &doc,bool brief)
-{
- //printf("handleCommentBlock(doc=[%s] brief=%d docBlockInBody=%d docBlockJavaStyle=%d\n",
- // doc.data(),brief,docBlockInBody,docBlockJavaStyle);
-
- // TODO: Fix me
- docBlockInBody=FALSE;
-
- if (docBlockInBody && previous && !previous->doc.isEmpty())
- {
- previous->doc=previous->doc.stripWhiteSpace()+"\n\n";
- }
-
- int position = 0;
- bool needsEntry;
- int lineNr = brief ? current->briefLine : current->docLine;
- QCString processedDoc = preprocessCommentBlock(doc,yyFileName,lineNr);
- while (parseCommentBlock(
- g_thisParser,
- (docBlockInBody && previous) ? previous.get() : current.get(),
- processedDoc, // text
- yyFileName, // file
- lineNr,
- docBlockInBody ? FALSE : brief,
- docBlockJavaStyle, // javadoc style // or FALSE,
- docBlockInBody,
- protection,
- position,
- needsEntry)
- ) // need to start a new entry
- {
- if (needsEntry)
- {
- newEntry();
- }
- }
- if (needsEntry)
- {
- newEntry();
- }
-
-}
-
-static void endOfDef(int correction=0)
-{
- //printf("endOfDef at=%d\n",yyLineNr);
- if (bodyEntry)
- {
- bodyEntry->endBodyLine = yyLineNr-correction;
- bodyEntry = 0;
- }
- newEntry();
- //g_insideConstructor = FALSE;
-}
-
-static inline void addToString(const char *s)
-{
- if (g_copyString) (*g_copyString)+=s;
-}
-
-static void initTriDoubleQuoteBlock()
-{
- docBlockContext = YY_START;
- docBlockInBody = FALSE;
- docBlockJavaStyle = TRUE;
- docBlockSpecial = yytext[strlen(yytext) - 1]=='!';
- docBlock.resize(0);
- g_doubleQuote = TRUE;
- startCommentBlock(FALSE);
-}
-
-static void initTriSingleQuoteBlock()
-{
- docBlockContext = YY_START;
- docBlockInBody = FALSE;
- docBlockJavaStyle = TRUE;
- docBlockSpecial = yytext[strlen(yytext) - 1]=='!';
- docBlock.resize(0);
- g_doubleQuote = FALSE;
- startCommentBlock(FALSE);
-}
-
-static void initSpecialBlock()
-{
- docBlockContext = YY_START;
- docBlockInBody = FALSE;
- docBlockJavaStyle = TRUE;
- docBrief = TRUE;
- docBlock.resize(0);
- startCommentBlock(TRUE);
-}
-
-static void searchFoundDef()
-{
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
- current->section = Entry::FUNCTION_SEC;
- current->lang = SrcLangExt_Python;
- current->virt = Normal;
- current->stat = gstat;
- current->mtype = mtype = Method;
- current->type.resize(0);
- current->name.resize(0);
- current->args.resize(0);
- current->argList.clear();
- g_packageCommentAllowed = FALSE;
- gstat=FALSE;
- //printf("searchFoundDef at=%d\n",yyLineNr);
-}
-
-static void searchFoundClass()
-{
- current->section = Entry::CLASS_SEC;
- current->argList.clear();
- current->type += "class" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
- g_packageCommentAllowed = FALSE;
-}
+static inline int computeIndent(const char *s);
+
+static void initParser(yyscan_t yyscanner);
+static void initEntry(yyscan_t yyscanner);
+static void newEntry(yyscan_t yyscanner);
+static void newVariable(yyscan_t yyscanner);
+static void newFunction(yyscan_t yyscanner);
+static QCString findPackageScopeFromPath(yyscan_t yyscanner,const QCString &path);
+static void addFrom(yyscan_t yyscanner,bool all);
+static void lineCount(yyscan_t yyscanner);
+static void incLineNr(yyscan_t yyscanner);
+static void startCommentBlock(yyscan_t yyscanner,bool brief);
+static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief);
+static void endOfDef(yyscan_t yyscanner,int correction=0);
+static inline void addToString(yyscan_t yyscanner,const char *s);
+static void initTriDoubleQuoteBlock(yyscan_t yyscanner);
+static void initTriSingleQuoteBlock(yyscan_t yyscanner);
+static void initSpecialBlock(yyscan_t yyscanner);
+static void searchFoundDef(yyscan_t yyscanner);
+static void searchFoundClass(yyscan_t yyscanner);
+static QCString findPackageScope(yyscan_t yyscanner,const char *fileName);
+static int yyread(yyscan_t yyscanner,char *buf,int max_size);
//-----------------------------------------------------------------------------
/* ----------------------------------------------------------------- */
#undef YY_INPUT
-#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size);
-
-static int yyread(char *buf,int max_size)
-{
- int c=0;
- while ( c < max_size && inputString[inputPosition] )
- {
- *buf = inputString[inputPosition++] ;
- //printf("%d (%c)\n",*buf,*buf);
- c++; buf++;
- }
- return c;
-}
+#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
%}
@@ -517,125 +248,125 @@ STARTDOCSYMS "##"
<Search>{
^{B}"def"{BB} { // start of a function/method definition with indent
- DBG_CTX((stderr,"Found def at %d\n",yyLineNr));
- g_indent=computeIndent(yytext);
- searchFoundDef();
+ DBG_CTX((stderr,"Found def at %d\n",yyextra->yyLineNr));
+ yyextra->indent=computeIndent(yytext);
+ searchFoundDef(yyscanner);
BEGIN( FunctionDec );
}
"def"{BB} { // start of a function/method definition
- searchFoundDef();
+ searchFoundDef(yyscanner);
BEGIN( FunctionDec );
}
^{B}"class"{BB} { // start of a class definition with indent
- DBG_CTX((stderr,"Found class at %d\n",yyLineNr));
- g_indent=computeIndent(yytext);
- searchFoundClass();
+ DBG_CTX((stderr,"Found class at %d\n",yyextra->yyLineNr));
+ yyextra->indent=computeIndent(yytext);
+ searchFoundClass(yyscanner);
BEGIN( ClassDec ) ;
}
"class"{BB} { // start of a class definition
- searchFoundClass();
+ searchFoundClass(yyscanner);
BEGIN( ClassDec ) ;
}
^{B}"from"{BB} |
"from"{BB} { // start of an from import
- g_packageCommentAllowed = FALSE;
+ yyextra->packageCommentAllowed = FALSE;
BEGIN( FromMod );
}
^{B}"import"{BB} |
"import"{BB} { // start of an import statement
- g_packageCommentAllowed = FALSE;
+ yyextra->packageCommentAllowed = FALSE;
BEGIN( Import );
}
^{B}{IDENTIFIER}/{B}"="{B}"property" { // property
- current->section = Entry::VARIABLE_SEC;
- current->mtype = Property;
- current->name = QCString(yytext).stripWhiteSpace();
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
- g_packageCommentAllowed = FALSE;
+ yyextra->current->section = Entry::VARIABLE_SEC;
+ yyextra->current->mtype = Property;
+ yyextra->current->name = QCString(yytext).stripWhiteSpace();
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->packageCommentAllowed = FALSE;
BEGIN(VariableDec);
}
^{B}{IDENTIFIER}/{B}"="[^=] { // variable
- if (g_search_count) REJECT;
- g_indent=computeIndent(yytext);
- current->section = Entry::VARIABLE_SEC;
- current->name = QCString(yytext).stripWhiteSpace();
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
- g_packageCommentAllowed = FALSE;
+ if (yyextra->search_count) REJECT;
+ yyextra->indent=computeIndent(yytext);
+ yyextra->current->section = Entry::VARIABLE_SEC;
+ yyextra->current->name = QCString(yytext).stripWhiteSpace();
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->packageCommentAllowed = FALSE;
BEGIN(VariableDec);
}
{B}{IDENTIFIER}/({B},{B}{IDENTIFIER})*{B}")"*{B}"="[^=] { // list of variables, we cannot place the default value
// so we will skip it later on in a general rule
// Also note ")" this is to catch also (a,b). the "("
// is caught in the rule: [(], the ")" will be handled in [)]
- if (g_search_count > 1) REJECT;
- g_indent=computeIndent(yytext);
- current->section = Entry::VARIABLE_SEC;
- current->name = QCString(yytext).stripWhiteSpace();
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
- g_packageCommentAllowed = FALSE;
- newVariable();
+ if (yyextra->search_count > 1) REJECT;
+ yyextra->indent=computeIndent(yytext);
+ yyextra->current->section = Entry::VARIABLE_SEC;
+ yyextra->current->name = QCString(yytext).stripWhiteSpace();
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->packageCommentAllowed = FALSE;
+ newVariable(yyscanner);
}
"'" { // start of a single quoted string
- g_stringContext=YY_START;
- g_copyString=0;
- g_packageCommentAllowed = FALSE;
+ yyextra->stringContext=YY_START;
+ yyextra->copyString=0;
+ yyextra->packageCommentAllowed = FALSE;
BEGIN( SingleQuoteString );
}
"\"" { // start of a double quoted string
- g_stringContext=YY_START;
- g_copyString=0;
- g_packageCommentAllowed = FALSE;
+ yyextra->stringContext=YY_START;
+ yyextra->copyString=0;
+ yyextra->packageCommentAllowed = FALSE;
BEGIN( DoubleQuoteString );
}
"@staticmethod" {
- gstat=TRUE;
+ yyextra->stat=TRUE;
}
{SCRIPTCOMMENT} { // Unix type script comment
- if (yyLineNr != 1) REJECT;
+ if (yyextra->yyLineNr != 1) REJECT;
}
{POUNDCOMMENT} { // normal comment
- g_packageCommentAllowed = FALSE;
+ yyextra->packageCommentAllowed = FALSE;
}
{IDENTIFIER} { // some other identifier
- g_packageCommentAllowed = FALSE;
+ yyextra->packageCommentAllowed = FALSE;
}
^{BB} {
- g_curIndent=computeIndent(yytext);
+ yyextra->curIndent=computeIndent(yytext);
}
{NEWLINE}+ { // new line
- lineCount();
+ lineCount(yyscanner);
}
{TRIDOUBLEQUOTE} { // start of a comment block
- initTriDoubleQuoteBlock();
+ initTriDoubleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{TRISINGLEQUOTE} { // start of a comment block
- initTriSingleQuoteBlock();
+ initTriSingleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{STARTDOCSYMS}/[^#] { // start of a special comment
- g_curIndent=computeIndent(yytext);
- g_packageCommentAllowed = FALSE;
- initSpecialBlock();
+ yyextra->curIndent=computeIndent(yytext);
+ yyextra->packageCommentAllowed = FALSE;
+ initSpecialBlock(yyscanner);
BEGIN(SpecialComment);
}
[(] { // we have to do something with (
- g_search_count += 1;
+ yyextra->search_count += 1;
}
[)] { // we have to do something with )
- g_search_count -= 1;
+ yyextra->search_count -= 1;
}
[^\n] { // any other character...
// This is the major default
@@ -648,13 +379,13 @@ STARTDOCSYMS "##"
"." { // python3 style imports
}
{IDENTIFIER}({B}"."{B}{IDENTIFIER})* { // from package import
- g_packageName=yytext;
+ yyextra->packageName=yytext;
}
"import"{B} {
BEGIN(FromModItem);
}
\n {
- incLineNr();
+ incLineNr(yyscanner);
BEGIN(Search);
}
{B} {
@@ -667,25 +398,25 @@ STARTDOCSYMS "##"
<FromModItem>{
"*" { // import all
- addFrom(TRUE);
+ addFrom(yyscanner,TRUE);
BEGIN(Search);
}
{IDENTIFIER}/{B}","{B} {
- addFrom(FALSE);
+ addFrom(yyscanner,FALSE);
}
{IDENTIFIER}/{B}")" {
- addFrom(FALSE);
+ addFrom(yyscanner,FALSE);
}
{IDENTIFIER} {
- addFrom(FALSE);
- if (!g_importTuple)
+ addFrom(yyscanner,FALSE);
+ if (!yyextra->importTuple)
{
BEGIN(Search);
}
}
\n {
- incLineNr();
- if (!g_importTuple)
+ incLineNr(yyscanner);
+ if (!yyextra->importTuple)
{
BEGIN(Search);
}
@@ -693,16 +424,16 @@ STARTDOCSYMS "##"
{B} {
}
"(" {
- g_importTuple=TRUE;
+ yyextra->importTuple=TRUE;
}
")" {
- g_importTuple=FALSE;
+ yyextra->importTuple=FALSE;
BEGIN(Search);
}
"," {
}
"\\"{B}\n { // line continuation
- incLineNr();
+ incLineNr(yyscanner);
}
. {
unput(*yytext);
@@ -712,16 +443,16 @@ STARTDOCSYMS "##"
<Import>{
{IDENTIFIER}({B}"."{B}{IDENTIFIER})* {
- current->name=removeRedundantWhiteSpace(substitute(yytext,".","::"));
- current->fileName = yyFileName;
- //printf("Adding using declaration: found:%s:%d name=%s\n",yyFileName.data(),yyLineNr,current->name.data());
- current->section=Entry::USINGDECL_SEC;
- current_root->moveToSubEntryAndRefresh(current);
- initEntry();
+ yyextra->current->name=removeRedundantWhiteSpace(substitute(yytext,".","::"));
+ yyextra->current->fileName = yyextra->yyFileName;
+ //printf("Adding using declaration: found:%s:%d name=%s\n",yyextra->yyFileName.data(),yyextra->yyLineNr,yyextra->current->name.data());
+ yyextra->current->section=Entry::USINGDECL_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
BEGIN(Search);
}
\n {
- incLineNr();
+ incLineNr(yyscanner);
BEGIN(Search);
}
{B} {
@@ -734,60 +465,60 @@ STARTDOCSYMS "##"
<SearchMemVars>{
"self."{IDENTIFIER}/{B}"=" {
- DBG_CTX((stderr,"Found instance method variable %s in %s at %d\n",&yytext[5],current_root->name.data(),yyLineNr));
- current->name=&yytext[5];
- current->section=Entry::VARIABLE_SEC;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
- current->type.resize(0);
- if (current->name.at(0)=='_') // mark as private
+ DBG_CTX((stderr,"Found instance method variable %s in %s at %d\n",&yytext[5],yyextra->current_root->name.data(),yyextra->yyLineNr));
+ yyextra->current->name=&yytext[5];
+ yyextra->current->section=Entry::VARIABLE_SEC;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->type.resize(0);
+ if (yyextra->current->name.at(0)=='_') // mark as private
{
- current->protection=Private;
+ yyextra->current->protection=Private;
}
- newEntry();
+ newEntry(yyscanner);
}
"cls."{IDENTIFIER}/{B}"=" {
- DBG_CTX((stderr,"Found class method variable %s in %s at %d\n",&yytext[4],current_root->name.data(),yyLineNr));
- current->name=&yytext[4];
- current->section=Entry::VARIABLE_SEC;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
- current->type.resize(0);
- if (current->name.at(0)=='_') // mark as private
+ DBG_CTX((stderr,"Found class method variable %s in %s at %d\n",&yytext[4],yyextra->current_root->name.data(),yyextra->yyLineNr));
+ yyextra->current->name=&yytext[4];
+ yyextra->current->section=Entry::VARIABLE_SEC;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->type.resize(0);
+ if (yyextra->current->name.at(0)=='_') // mark as private
{
- current->protection=Private;
+ yyextra->current->protection=Private;
}
- newEntry();
+ newEntry(yyscanner);
}
{TRIDOUBLEQUOTE} { // start of a comment block
- initTriDoubleQuoteBlock();
+ initTriDoubleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{TRISINGLEQUOTE} { // start of a comment block
- initTriSingleQuoteBlock();
+ initTriSingleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{STARTDOCSYMS}/[^#] { // start of a special comment
- initSpecialBlock();
+ initSpecialBlock(yyscanner);
BEGIN(SpecialComment);
}
{POUNDCOMMENT} { // #
}
"'" { // start of a single quoted string
- g_stringContext=YY_START;
- g_copyString=0;
+ yyextra->stringContext=YY_START;
+ yyextra->copyString=0;
BEGIN( SingleQuoteString );
}
"\"" { // start of a double quoted string
- g_stringContext=YY_START;
- g_copyString=0;
+ yyextra->stringContext=YY_START;
+ yyextra->copyString=0;
BEGIN( DoubleQuoteString );
}
- \n { incLineNr(); }
+ \n { incLineNr(yyscanner); }
{IDENTIFIER} // identifiers
[^'"\.#a-z_A-Z\n]+ // other uninteresting stuff
. // anything else
@@ -795,106 +526,106 @@ STARTDOCSYMS "##"
<FunctionBody>{
\n{B}/{IDENTIFIER}{BB} {
- DBG_CTX((stderr,"indent %d<=%d\n",computeIndent(&yytext[1]),g_indent));
- if (computeIndent(&yytext[1])<=g_indent)
+ DBG_CTX((stderr,"indent %d<=%d\n",computeIndent(&yytext[1]),yyextra->indent));
+ if (computeIndent(&yytext[1])<=yyextra->indent)
{
int i;
for (i=(int)yyleng-1;i>=0;i--)
{
unput(yytext[i]);
}
- endOfDef();
+ endOfDef(yyscanner);
//YY_CURRENT_BUFFER->yy_at_bol=TRUE;
BEGIN(Search);
}
else
{
- incLineNr();
- current->program+=yytext;
+ incLineNr(yyscanner);
+ yyextra->current->program+=yytext;
}
}
\n{B}/"##" {
- if (computeIndent(&yytext[1])<=g_indent)
+ if (computeIndent(&yytext[1])<=yyextra->indent)
{
int i;
for (i=(int)yyleng-1;i>=0;i--)
{
unput(yytext[i]);
}
- endOfDef();
+ endOfDef(yyscanner);
//YY_CURRENT_BUFFER->yy_at_bol=TRUE;
BEGIN(Search);
}
else
{
- incLineNr();
- current->program+=yytext;
+ incLineNr(yyscanner);
+ yyextra->current->program+=yytext;
}
}
<<EOF>> {
- endOfDef();
+ endOfDef(yyscanner);
yyterminate();
}
^{BB}/\n { // skip empty line
- current->program+=yytext;
+ yyextra->current->program+=yytext;
}
^{BB} { // something at indent >0
- current->program+=yytext;
- g_curIndent = computeIndent(yytext);
- if (g_curIndent<=g_indent)
+ yyextra->current->program+=yytext;
+ yyextra->curIndent = computeIndent(yytext);
+ if (yyextra->curIndent<=yyextra->indent)
// jumped out of the function
{
- endOfDef(1);
+ endOfDef(yyscanner,1);
BEGIN(Search);
}
}
"'" { // start of a single quoted string
- current->program+=yytext;
- g_stringContext=YY_START;
- g_specialBlock = FALSE;
- g_copyString=&current->program;
+ yyextra->current->program+=yytext;
+ yyextra->stringContext=YY_START;
+ yyextra->specialBlock = FALSE;
+ yyextra->copyString=&yyextra->current->program;
BEGIN( SingleQuoteString );
}
"\"" { // start of a double quoted string
- current->program+=yytext;
- g_stringContext=YY_START;
- g_specialBlock = FALSE;
- g_copyString=&current->program;
+ yyextra->current->program+=yytext;
+ yyextra->stringContext=YY_START;
+ yyextra->specialBlock = FALSE;
+ yyextra->copyString=&yyextra->current->program;
BEGIN( DoubleQuoteString );
}
[^ \t\n#'".]+ { // non-special stuff
- current->program+=yytext;
- g_specialBlock = FALSE;
+ yyextra->current->program+=yytext;
+ yyextra->specialBlock = FALSE;
}
^{POUNDCOMMENT} { // normal comment
- current->program+=yytext;
+ yyextra->current->program+=yytext;
}
"#".* { // comment half way
- current->program+=yytext;
+ yyextra->current->program+=yytext;
}
{NEWLINE} {
- incLineNr();
- current->program+=yytext;
+ incLineNr(yyscanner);
+ yyextra->current->program+=yytext;
}
. { // any character
- current->program+=*yytext;
- g_specialBlock = FALSE;
+ yyextra->current->program+=*yytext;
+ yyextra->specialBlock = FALSE;
}
{TRIDOUBLEQUOTE} { // start of a comment block
- current->program+=yytext;
- initTriDoubleQuoteBlock();
+ yyextra->current->program+=yytext;
+ initTriDoubleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{TRISINGLEQUOTE} { // start of a comment block
- current->program+=yytext;
- initTriSingleQuoteBlock();
+ yyextra->current->program+=yytext;
+ initTriSingleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{STARTDOCSYMS}/[^#] { // start of a special comment
- initSpecialBlock();
+ initSpecialBlock(yyscanner);
BEGIN(SpecialComment);
}
@@ -903,37 +634,37 @@ STARTDOCSYMS "##"
<FunctionDec>{
{IDENTIFIER} {
//found function name
- if (current->type.isEmpty())
+ if (yyextra->current->type.isEmpty())
{
- current->type = "def";
+ yyextra->current->type = "def";
}
- current->name = yytext;
- current->name = current->name.stripWhiteSpace();
- newFunction();
+ yyextra->current->name = yytext;
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ newFunction(yyscanner);
}
{B}":"{B} { // function without arguments
- g_specialBlock = TRUE; // expecting a docstring
- bodyEntry = current;
+ yyextra->specialBlock = TRUE; // expecting a docstring
+ yyextra->bodyEntry = yyextra->current;
BEGIN(FunctionBody);
}
"->" {
- g_defVal.resize(0);
- g_braceCount = 0;
+ yyextra->defVal.resize(0);
+ yyextra->braceCount = 0;
BEGIN(FunctionTypeAnnotation);
}
{B}"(" {
- g_funcParamsEnd = FALSE;
- current->bodyLine = yyLineNr;
+ yyextra->funcParamsEnd = FALSE;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
BEGIN(FunctionParams);
}
")" { // end of parameter list
- if (current->argList.empty())
+ if (yyextra->current->argList.empty())
{
- current->argList.noParameters=TRUE;
+ yyextra->current->argList.noParameters=TRUE;
}
- current->args = argListToString(current->argList);
- g_funcParamsEnd = TRUE;
+ yyextra->current->args = argListToString(yyextra->current->argList);
+ yyextra->funcParamsEnd = TRUE;
}
}
@@ -942,21 +673,21 @@ STARTDOCSYMS "##"
}
[\*]+ {
- g_argType = yytext;
+ yyextra->argType = yytext;
}
{IDENTIFIER} { // Name of parameter
- lineCount();
+ lineCount(yyscanner);
Argument a;
a.name = QCString(yytext).stripWhiteSpace();
- a.type = g_argType;
- current->argList.push_back(a);
- g_argType = "";
+ a.type = yyextra->argType;
+ yyextra->current->argList.push_back(a);
+ yyextra->argType = "";
}
"=" { // default value
// TODO: this rule is too simple, need to be able to
// match things like =")" as well!
- g_defVal.resize(0);
- g_braceCount = 0;
+ yyextra->defVal.resize(0);
+ yyextra->braceCount = 0;
BEGIN(FunctionParamDefVal);
}
")" {
@@ -964,8 +695,8 @@ STARTDOCSYMS "##"
BEGIN(FunctionDec);
}
":"{B} {
- g_defVal.resize(0);
- g_braceCount = 0;
+ yyextra->defVal.resize(0);
+ yyextra->braceCount = 0;
BEGIN(FunctionAnnotation);
}
{POUNDCOMMENT} { // a comment
@@ -979,43 +710,43 @@ STARTDOCSYMS "##"
"{" |
"[" |
"(" {
- ++g_braceCount;
- g_defVal+=*yytext;
+ ++yyextra->braceCount;
+ yyextra->defVal+=*yytext;
}
"}" |
"]" |
")" {
- --g_braceCount;
- g_defVal+=*yytext;
+ --yyextra->braceCount;
+ yyextra->defVal+=*yytext;
}
":" {
- if (g_braceCount == 0)
+ if (yyextra->braceCount == 0)
{
- current->type = g_defVal.data();
+ yyextra->current->type = yyextra->defVal.data();
unput(*yytext);
BEGIN(FunctionDec);
}
else
- g_defVal+=*yytext;
+ yyextra->defVal+=*yytext;
}
"'" {
- g_defVal+=*yytext;
- g_copyString=&g_defVal;
- g_stringContext=FunctionTypeAnnotation;
+ yyextra->defVal+=*yytext;
+ yyextra->copyString=&yyextra->defVal;
+ yyextra->stringContext=FunctionTypeAnnotation;
BEGIN(SingleQuoteString);
}
"\"" {
- g_defVal+=*yytext;
- g_copyString=&g_defVal;
- g_stringContext=FunctionTypeAnnotation;
+ yyextra->defVal+=*yytext;
+ yyextra->copyString=&yyextra->defVal;
+ yyextra->stringContext=FunctionTypeAnnotation;
BEGIN(DoubleQuoteString);
}
\n {
- g_defVal+=*yytext;
- incLineNr();
+ yyextra->defVal+=*yytext;
+ incLineNr(yyscanner);
}
. {
- g_defVal+=*yytext;
+ yyextra->defVal+=*yytext;
}
}
@@ -1023,21 +754,21 @@ STARTDOCSYMS "##"
"{" |
"[" |
"(" {
- ++g_braceCount;
- g_defVal+=*yytext;
+ ++yyextra->braceCount;
+ yyextra->defVal+=*yytext;
}
"}" |
"]" {
- --g_braceCount;
- g_defVal+=*yytext;
+ --yyextra->braceCount;
+ yyextra->defVal+=*yytext;
}
")" |
"=" |
"," {
- if (g_braceCount == 0)
+ if (yyextra->braceCount == 0)
{
- if (!current->argList.empty())
- current->argList.back().type += g_defVal;
+ if (!yyextra->current->argList.empty())
+ yyextra->current->argList.back().type += yyextra->defVal;
if (*yytext != ',')
unput(*yytext);
BEGIN(FunctionParams);
@@ -1045,28 +776,28 @@ STARTDOCSYMS "##"
else
{
if (*yytext == ')')
- --g_braceCount;
- g_defVal += *yytext;
+ --yyextra->braceCount;
+ yyextra->defVal += *yytext;
}
}
"'" {
- g_defVal+=*yytext;
- g_copyString=&g_defVal;
- g_stringContext=FunctionAnnotation;
+ yyextra->defVal+=*yytext;
+ yyextra->copyString=&yyextra->defVal;
+ yyextra->stringContext=FunctionAnnotation;
BEGIN(SingleQuoteString);
}
"\"" {
- g_defVal+=*yytext;
- g_copyString=&g_defVal;
- g_stringContext=FunctionAnnotation;
+ yyextra->defVal+=*yytext;
+ yyextra->copyString=&yyextra->defVal;
+ yyextra->stringContext=FunctionAnnotation;
BEGIN(DoubleQuoteString);
}
\n {
- g_defVal+=*yytext;
- incLineNr();
+ yyextra->defVal+=*yytext;
+ incLineNr(yyscanner);
}
. {
- g_defVal+=*yytext;
+ yyextra->defVal+=*yytext;
}
}
@@ -1074,20 +805,20 @@ STARTDOCSYMS "##"
"{" |
"[" |
"(" { // internal opening brace, assumption is that we have correct code so braces do match
- ++g_braceCount;
- g_defVal+=*yytext;
+ ++yyextra->braceCount;
+ yyextra->defVal+=*yytext;
}
"}" |
"]" {
- --g_braceCount;
- g_defVal+=*yytext;
+ --yyextra->braceCount;
+ yyextra->defVal+=*yytext;
}
")" |
"," {
- if (g_braceCount == 0)
+ if (yyextra->braceCount == 0)
{
- if (!current->argList.empty())
- current->argList.back().defval=QCString(g_defVal).stripWhiteSpace();
+ if (!yyextra->current->argList.empty())
+ yyextra->current->argList.back().defval=QCString(yyextra->defVal).stripWhiteSpace();
if (*yytext == ')')
unput(*yytext);
BEGIN(FunctionParams);
@@ -1095,140 +826,140 @@ STARTDOCSYMS "##"
else
{
if (*yytext == ')')
- --g_braceCount;
- g_defVal += *yytext;
+ --yyextra->braceCount;
+ yyextra->defVal += *yytext;
}
}
"'" {
- g_defVal+=*yytext;
- g_copyString=&g_defVal;
- g_stringContext=FunctionParamDefVal;
+ yyextra->defVal+=*yytext;
+ yyextra->copyString=&yyextra->defVal;
+ yyextra->stringContext=FunctionParamDefVal;
BEGIN( SingleQuoteString );
}
"\"" {
- g_defVal+=*yytext;
- g_copyString=&g_defVal;
- g_stringContext=FunctionParamDefVal;
+ yyextra->defVal+=*yytext;
+ yyextra->copyString=&yyextra->defVal;
+ yyextra->stringContext=FunctionParamDefVal;
BEGIN( DoubleQuoteString );
}
\n {
- g_defVal+=*yytext;
- incLineNr();
+ yyextra->defVal+=*yytext;
+ incLineNr(yyscanner);
}
. {
- g_defVal+=*yytext;
+ yyextra->defVal+=*yytext;
}
}
<ClassBody>{
\n/{IDENTIFIER}{BB} { // new def at indent 0
- incLineNr();
- endOfDef();
- //g_hideClassDocs = FALSE;
+ incLineNr(yyscanner);
+ endOfDef(yyscanner);
+ //yyextra->hideClassDocs = FALSE;
//YY_CURRENT_BUFFER->yy_at_bol=TRUE;
BEGIN(Search);
}
\n/"##"[^#] { // start of a special comment at indent 0
- incLineNr();
- endOfDef();
- //g_hideClassDocs = FALSE;
+ incLineNr(yyscanner);
+ endOfDef(yyscanner);
+ //yyextra->hideClassDocs = FALSE;
//YY_CURRENT_BUFFER->yy_at_bol=TRUE;
BEGIN(Search);
}
^{BB}/\n { // skip empty line
- current->program+=yytext;
+ yyextra->current->program+=yytext;
}
<<EOF>> {
- endOfDef();
+ endOfDef(yyscanner);
yyterminate();
}
^{BB} { // something at indent >0
- g_curIndent=computeIndent(yytext);
- DBG_CTX((stderr,"g_curIndent=%d g_indent=%d\n",g_curIndent,g_indent));
- if (g_curIndent<=g_indent)
+ yyextra->curIndent=computeIndent(yytext);
+ DBG_CTX((stderr,"yyextra->curIndent=%d yyextra->indent=%d\n",yyextra->curIndent,yyextra->indent));
+ if (yyextra->curIndent<=yyextra->indent)
// jumped out of the class/method
{
- endOfDef(1);
- g_indent=g_curIndent;
+ endOfDef(yyscanner,1);
+ yyextra->indent=yyextra->curIndent;
// make sure the next rule matches ^...
//YY_CURRENT_BUFFER->yy_at_bol=TRUE;
- //g_hideClassDocs = FALSE;
+ //yyextra->hideClassDocs = FALSE;
BEGIN(Search);
}
else
{
- current->program+=yytext;
+ yyextra->current->program+=yytext;
}
}
"'" { // start of a single quoted string
- current->program+=*yytext;
- g_stringContext=YY_START;
- g_specialBlock = FALSE;
- g_copyString=&current->program;
+ yyextra->current->program+=*yytext;
+ yyextra->stringContext=YY_START;
+ yyextra->specialBlock = FALSE;
+ yyextra->copyString=&yyextra->current->program;
BEGIN( SingleQuoteString );
}
"\"" { // start of a double quoted string
- current->program+=*yytext;
- g_stringContext=YY_START;
- g_specialBlock = FALSE;
- g_copyString=&current->program;
+ yyextra->current->program+=*yytext;
+ yyextra->stringContext=YY_START;
+ yyextra->specialBlock = FALSE;
+ yyextra->copyString=&yyextra->current->program;
BEGIN( DoubleQuoteString );
}
[^ \t\n#'"]+ { // non-special stuff
- current->program+=yytext;
- g_specialBlock = FALSE;
- //g_hideClassDocs = FALSE;
+ yyextra->current->program+=yytext;
+ yyextra->specialBlock = FALSE;
+ //yyextra->hideClassDocs = FALSE;
}
{NEWLINE} {
- current->program+=*yytext;
- incLineNr();
+ yyextra->current->program+=*yytext;
+ incLineNr(yyscanner);
}
{POUNDCOMMENT} { // normal comment
- current->program+=yytext;
+ yyextra->current->program+=yytext;
}
. { // any character
- g_specialBlock = FALSE;
- current->program+=*yytext;
+ yyextra->specialBlock = FALSE;
+ yyextra->current->program+=*yytext;
}
{TRIDOUBLEQUOTE} { // start of a comment block
- //if (!g_hideClassDocs)
- current->program+=yytext;
- initTriDoubleQuoteBlock();
+ //if (!yyextra->hideClassDocs)
+ yyextra->current->program+=yytext;
+ initTriDoubleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{TRISINGLEQUOTE} { // start of a comment block
- //if (!g_hideClassDocs)
- current->program+=yytext;
- initTriSingleQuoteBlock();
+ //if (!yyextra->hideClassDocs)
+ yyextra->current->program+=yytext;
+ initTriSingleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
}
<ClassDec>{IDENTIFIER} {
- if (current->type.isEmpty())
+ if (yyextra->current->type.isEmpty())
{
- current->type = "class";
+ yyextra->current->type = "class";
}
- current->section = Entry::CLASS_SEC;
- current->name = yytext;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->name = yytext;
// prepend scope in case of nested classes
- if (current_root->section&Entry::SCOPE_MASK)
+ if (yyextra->current_root->section&Entry::SCOPE_MASK)
{
- //printf("*** Prepending scope %s to class %s\n",current_root->name.data(),current->name.data());
- current->name.prepend(current_root->name+"::");
+ //printf("*** Prepending scope %s to class %s\n",yyextra->current_root->name.data(),yyextra->current->name.data());
+ yyextra->current->name.prepend(yyextra->current_root->name+"::");
}
- current->name = current->name.stripWhiteSpace();
- current->fileName = yyFileName;
- docBlockContext = YY_START;
- docBlockInBody = FALSE;
- docBlockJavaStyle = FALSE;
- docBlock.resize(0);
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockJavaStyle = FALSE;
+ yyextra->docBlock.resize(0);
BEGIN(ClassInheritance);
}
@@ -1238,37 +969,37 @@ STARTDOCSYMS "##"
}
":" { // begin of the class definition
- g_specialBlock = TRUE; // expecting a docstring
- current->bodyLine = yyLineNr;
- current->program.resize(0);
+ yyextra->specialBlock = TRUE; // expecting a docstring
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->program.resize(0);
BEGIN(ClassCaptureIndent);
}
{SCOPE} {
- current->extends.push_back(
+ yyextra->current->extends.push_back(
BaseInfo(substitute(yytext,".","::"),Public,Normal)
);
//Has base class-do stuff
}
"'" { // start of a single quoted string
- g_stringContext=YY_START;
+ yyextra->stringContext=YY_START;
BEGIN( SingleQuoteStringIgnore );
}
"\"" { // start of a double quoted string
- g_stringContext=YY_START;
+ yyextra->stringContext=YY_START;
BEGIN( DoubleQuoteStringIgnore );
}
}
<SingleQuoteStringIgnore>{
"'" { // end of a single quoted string
- BEGIN(g_stringContext);
+ BEGIN(yyextra->stringContext);
}
. { }
}
<DoubleQuoteStringIgnore>{
"\"" { // end of a double quoted string
- BEGIN(g_stringContext);
+ BEGIN(yyextra->stringContext);
}
. { }
}
@@ -1276,42 +1007,42 @@ STARTDOCSYMS "##"
<ClassCaptureIndent>{
"\n"|({BB}"\n") {
// Blankline - ignore, keep looking for indentation.
- lineCount();
- current->program+=yytext;
+ lineCount(yyscanner);
+ yyextra->current->program+=yytext;
}
{TRIDOUBLEQUOTE} { // start of a comment block
- initTriDoubleQuoteBlock();
- current->program+=yytext;
+ initTriDoubleQuoteBlock(yyscanner);
+ yyextra->current->program+=yytext;
BEGIN(TripleComment);
}
{TRISINGLEQUOTE} { // start of a comment block
- initTriSingleQuoteBlock();
- current->program+=yytext;
+ initTriSingleQuoteBlock(yyscanner);
+ yyextra->current->program+=yytext;
BEGIN(TripleComment);
}
{STARTDOCSYMS}[#]* { // start of a special comment
- initSpecialBlock();
+ initSpecialBlock(yyscanner);
BEGIN(SpecialComment);
}
{POUNDCOMMENT} { // ignore comment with just one #
}
^{BB} {
- current->program+=yytext;
- //current->startLine = yyLineNr;
- g_curIndent=computeIndent(yytext);
- bodyEntry = current;
- DBG_CTX((stderr,"setting indent %d\n",g_curIndent));
- //printf("current->program=[%s]\n",current->program.data());
- //g_hideClassDocs = TRUE;
+ yyextra->current->program+=yytext;
+ //yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->curIndent=computeIndent(yytext);
+ yyextra->bodyEntry = yyextra->current;
+ DBG_CTX((stderr,"setting indent %d\n",yyextra->curIndent));
+ //printf("yyextra->current->program=[%s]\n",yyextra->current->program.data());
+ //yyextra->hideClassDocs = TRUE;
BEGIN(ClassBody);
}
""/({NONEMPTY}|{EXPCHAR}) {
// Just pushback an empty class, and
// resume parsing the body.
- newEntry();
- current->program+=yytext;
+ newEntry(yyscanner);
+ yyextra->current->program+=yytext;
// printf("Failed to find indent - skipping!");
BEGIN( Search );
@@ -1321,82 +1052,82 @@ STARTDOCSYMS "##"
<VariableDec>{
"=" { // the assignment operator
- //printf("====== VariableDec at line %d\n",yyLineNr);
- g_start_init = TRUE;
- current->initializer = yytext;
- current->initializer += " ";
+ //printf("====== VariableDec at line %d\n",yyextra->yyLineNr);
+ yyextra->start_init = TRUE;
+ yyextra->current->initializer = yytext;
+ yyextra->current->initializer += " ";
}
{B} { // spaces
- current->initializer += yytext;
+ yyextra->current->initializer += yytext;
}
{INTNUMBER} { // integer value
- if (current-> type.isEmpty()) current->type = "int";
- current->initializer += yytext;
+ if (yyextra->current-> type.isEmpty()) yyextra->current->type = "int";
+ yyextra->current->initializer += yytext;
}
{FLOATNUMBER} { // floating point value
- if (current->type.isEmpty()) current->type = "float";
- current->initializer += yytext;
+ if (yyextra->current->type.isEmpty()) yyextra->current->type = "float";
+ yyextra->current->initializer += yytext;
}
{BOOL} { // boolean value
- if (current->type.isEmpty()) current->type = "bool";
- current->initializer += yytext;
+ if (yyextra->current->type.isEmpty()) yyextra->current->type = "bool";
+ yyextra->current->initializer += yytext;
}
{STRINGPREFIX}?"'" { // string
- if (current->type.isEmpty()) current->type = "string";
- current->initializer += yytext;
- g_copyString=&current->initializer;
- g_stringContext=VariableDec;
+ if (yyextra->current->type.isEmpty()) yyextra->current->type = "string";
+ yyextra->current->initializer += yytext;
+ yyextra->copyString=&yyextra->current->initializer;
+ yyextra->stringContext=VariableDec;
BEGIN( SingleQuoteString );
}
{STRINGPREFIX}?"\"" { // string
- if (current->type.isEmpty()) current->type = "string";
- current->initializer += yytext;
- g_copyString=&current->initializer;
- g_stringContext=VariableDec;
+ if (yyextra->current->type.isEmpty()) yyextra->current->type = "string";
+ yyextra->current->initializer += yytext;
+ yyextra->copyString=&yyextra->current->initializer;
+ yyextra->stringContext=VariableDec;
BEGIN( DoubleQuoteString );
}
{TRIDOUBLEQUOTE} { // start of a comment block
- if (current->type.isEmpty()) current->type = "string";
- current->initializer += yytext;
- g_doubleQuote=TRUE;
- g_copyString=&current->initializer;
- g_stringContext=VariableDec;
+ if (yyextra->current->type.isEmpty()) yyextra->current->type = "string";
+ yyextra->current->initializer += yytext;
+ yyextra->doubleQuote=TRUE;
+ yyextra->copyString=&yyextra->current->initializer;
+ yyextra->stringContext=VariableDec;
BEGIN(TripleString);
}
{TRISINGLEQUOTE} { // start of a comment block
- if (current->type.isEmpty()) current->type = "string";
- current->initializer += yytext;
- g_doubleQuote=FALSE;
- g_copyString=&current->initializer;
- g_stringContext=VariableDec;
+ if (yyextra->current->type.isEmpty()) yyextra->current->type = "string";
+ yyextra->current->initializer += yytext;
+ yyextra->doubleQuote=FALSE;
+ yyextra->copyString=&yyextra->current->initializer;
+ yyextra->stringContext=VariableDec;
BEGIN(TripleString);
}
"(" { // tuple, only when direct after =
- if (current->mtype!=Property && g_start_init)
+ if (yyextra->current->mtype!=Property && yyextra->start_init)
{
- current->type = "tuple";
+ yyextra->current->type = "tuple";
}
- current->initializer+=*yytext;
- g_atomStart='(';
- g_atomEnd=')';
- g_atomCount=1;
+ yyextra->current->initializer+=*yytext;
+ yyextra->atomStart='(';
+ yyextra->atomEnd=')';
+ yyextra->atomCount=1;
BEGIN( VariableAtom );
}
"[" { // list
- if (g_start_init) current->type = "list";
- current->initializer+=*yytext;
- g_atomStart='[';
- g_atomEnd=']';
- g_atomCount=1;
+ if (yyextra->start_init) yyextra->current->type = "list";
+ yyextra->current->initializer+=*yytext;
+ yyextra->atomStart='[';
+ yyextra->atomEnd=']';
+ yyextra->atomCount=1;
BEGIN( VariableAtom );
}
"{" { // dictionary
- if (g_start_init) current->type = "dictionary";
- current->initializer+=*yytext;
- g_atomStart='{';
- g_atomEnd='}';
- g_atomCount=1;
+ if (yyextra->start_init) yyextra->current->type = "dictionary";
+ yyextra->current->initializer+=*yytext;
+ yyextra->atomStart='{';
+ yyextra->atomEnd='}';
+ yyextra->atomCount=1;
BEGIN( VariableAtom );
}
"#".* { // comment
@@ -1404,26 +1135,26 @@ STARTDOCSYMS "##"
}
{IDENTIFIER} {
// do something based on the type of the IDENTIFIER
- if (current->type.isEmpty())
+ if (yyextra->current->type.isEmpty())
{
- //QListIterator<Entry> eli(*(current_root->children()));
+ //QListIterator<Entry> eli(*(yyextra->current_root->children()));
//Entry *child;
- //for (eli.toFirst();(child=eli.current());++eli)
- for (const auto &child : current_root->children())
+ //for (eli.toFirst();(child=eli.yyextra->current());++eli)
+ for (const auto &child : yyextra->current_root->children())
{
if (child->name == QCString(yytext))
{
- current->type = child->type;
+ yyextra->current->type = child->type;
break;
}
}
}
- g_start_init = FALSE;
- current->initializer+=yytext;
+ yyextra->start_init = FALSE;
+ yyextra->current->initializer+=yytext;
}
. {
- g_start_init = FALSE;
- current->initializer+=*yytext;
+ yyextra->start_init = FALSE;
+ yyextra->current->initializer+=*yytext;
}
\n {
unput('\n');
@@ -1433,71 +1164,71 @@ STARTDOCSYMS "##"
<VariableAtom>{
[\(\[\{] {
- current->initializer+=*yytext;
- if (g_atomStart==*yytext)
+ yyextra->current->initializer+=*yytext;
+ if (yyextra->atomStart==*yytext)
{
- g_atomCount++;
+ yyextra->atomCount++;
}
}
[\)\]\}] {
- current->initializer+=*yytext;
- if (g_atomEnd==*yytext)
+ yyextra->current->initializer+=*yytext;
+ if (yyextra->atomEnd==*yytext)
{
- g_atomCount--;
+ yyextra->atomCount--;
}
- if (g_atomCount==0)
+ if (yyextra->atomCount==0)
{
- g_start_init = FALSE;
+ yyextra->start_init = FALSE;
BEGIN(VariableDec);
}
}
{TRIDOUBLEQUOTE} { // start of a comment block
- g_specialBlock = FALSE;
- current->program+=yytext;
- initTriDoubleQuoteBlock();
+ yyextra->specialBlock = FALSE;
+ yyextra->current->program+=yytext;
+ initTriDoubleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
{TRISINGLEQUOTE} { // start of a comment block
- g_specialBlock = FALSE;
- current->program+=yytext;
- initTriSingleQuoteBlock();
+ yyextra->specialBlock = FALSE;
+ yyextra->current->program+=yytext;
+ initTriSingleQuoteBlock(yyscanner);
BEGIN(TripleComment);
}
"'" {
- g_stringContext=YY_START;
- current->initializer+="'";
- g_copyString=&current->initializer;
+ yyextra->stringContext=YY_START;
+ yyextra->current->initializer+="'";
+ yyextra->copyString=&yyextra->current->initializer;
BEGIN( SingleQuoteString );
}
"\"" {
- g_stringContext=YY_START;
- current->initializer+="\"";
- g_copyString=&current->initializer;
+ yyextra->stringContext=YY_START;
+ yyextra->current->initializer+="\"";
+ yyextra->copyString=&yyextra->current->initializer;
BEGIN( DoubleQuoteString );
}
{IDENTIFIER} {
- current->initializer+=yytext;
+ yyextra->current->initializer+=yytext;
}
. {
- current->initializer+=*yytext;
+ yyextra->current->initializer+=*yytext;
}
\n {
- current->initializer+=*yytext;
- incLineNr();
+ yyextra->current->initializer+=*yytext;
+ incLineNr(yyscanner);
}
}
<VariableEnd>{
\n {
- incLineNr();
- newVariable();
+ incLineNr(yyscanner);
+ newVariable(yyscanner);
BEGIN(Search);
}
. {
unput(*yytext);
- newVariable();
+ newVariable(yyscanner);
BEGIN(Search);
}
<<EOF>> { yyterminate();
@@ -1507,78 +1238,78 @@ STARTDOCSYMS "##"
<TripleComment>{
{ENDTRIDOUBLEQUOTE} |
{ENDTRISINGLEQUOTE} {
- // printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock);
- if (g_doubleQuote==(yytext[0]=='"'))
+ // printf("Expected module block %d special=%d\n",yyextra->expectModuleDocs,yyextra->specialBlock);
+ if (yyextra->doubleQuote==(yytext[0]=='"'))
{
- if (g_specialBlock) // expecting a docstring
+ if (yyextra->specialBlock) // expecting a docstring
{
- QCString actualDoc=docBlock;
- if (!docBlockSpecial) // legacy unformatted docstring
+ QCString actualDoc=yyextra->docBlock;
+ if (!yyextra->docBlockSpecial) // legacy unformatted docstring
{
actualDoc.prepend("\\verbatim ");
actualDoc.append("\\endverbatim ");
}
- //printf("-------> current=%p bodyEntry=%p\n",current,bodyEntry);
- handleCommentBlock(actualDoc, FALSE);
+ //printf("-------> yyextra->current=%p yyextra->bodyEntry=%p\n",yyextra->current,yyextra->bodyEntry);
+ handleCommentBlock(yyscanner, actualDoc, FALSE);
}
- else if (g_packageCommentAllowed) // expecting module docs
+ else if (yyextra->packageCommentAllowed) // expecting module docs
{
- QCString actualDoc=docBlock;
- if (!docBlockSpecial) // legacy unformatted docstring
+ QCString actualDoc=yyextra->docBlock;
+ if (!yyextra->docBlockSpecial) // legacy unformatted docstring
{
actualDoc.prepend("\\verbatim ");
actualDoc.append("\\endverbatim ");
}
- actualDoc.prepend("\\namespace "+g_moduleScope+" ");
- handleCommentBlock(actualDoc, FALSE);
+ actualDoc.prepend("\\namespace "+yyextra->moduleScope+" ");
+ handleCommentBlock(yyscanner, actualDoc, FALSE);
}
- if ((docBlockContext==ClassBody /*&& !g_hideClassDocs*/) ||
- docBlockContext==FunctionBody)
+ if ((yyextra->docBlockContext==ClassBody /*&& !yyextra->hideClassDocs*/) ||
+ yyextra->docBlockContext==FunctionBody)
{
- current->program+=docBlock;
- current->program+=yytext;
+ yyextra->current->program+=yyextra->docBlock;
+ yyextra->current->program+=yytext;
}
- //if (g_hideClassDocs)
+ //if (yyextra->hideClassDocs)
//{
- // current->startLine = yyLineNr;
+ // yyextra->current->startLine = yyextra->yyLineNr;
//}
- //g_hideClassDocs=FALSE;
- BEGIN(docBlockContext);
+ //yyextra->hideClassDocs=FALSE;
+ BEGIN(yyextra->docBlockContext);
}
else
{
- docBlock += yytext;
+ yyextra->docBlock += yytext;
}
- g_packageCommentAllowed = FALSE;
+ yyextra->packageCommentAllowed = FALSE;
}
^{BB} { // leading whitespace
int indent = computeIndent(yytext);
- if (indent>=g_curIndent)
- { // strip g_curIndent amount of whitespace
+ if (indent>=yyextra->curIndent)
+ { // strip yyextra->curIndent amount of whitespace
int i;
- for (i=0;i<indent-g_curIndent;i++) docBlock+=' ';
- DBG_CTX((stderr,"stripping indent %d\n",g_curIndent));
+ for (i=0;i<indent-yyextra->curIndent;i++) yyextra->docBlock+=' ';
+ DBG_CTX((stderr,"stripping indent %d\n",yyextra->curIndent));
}
else
{
- DBG_CTX((stderr,"not stripping: %d<%d\n",indent,g_curIndent));
- docBlock += yytext;
+ DBG_CTX((stderr,"not stripping: %d<%d\n",indent,yyextra->curIndent));
+ yyextra->docBlock += yytext;
}
}
[^"'\n \t\\]+ {
- docBlock += yytext;
+ yyextra->docBlock += yytext;
}
\n {
- incLineNr();
- docBlock += yytext;
+ incLineNr(yyscanner);
+ yyextra->docBlock += yytext;
}
\\. { // escaped char
- docBlock += yytext;
+ yyextra->docBlock += yytext;
}
. {
- docBlock += yytext;
+ yyextra->docBlock += yytext;
}
}
@@ -1586,91 +1317,91 @@ STARTDOCSYMS "##"
^{B}"#"("#")* { // skip leading hashes
}
\n/{B}"#" { // continuation of the comment on the next line
- docBlock+='\n';
- docBrief = FALSE;
- startCommentBlock(FALSE);
- incLineNr();
+ yyextra->docBlock+='\n';
+ yyextra->docBrief = FALSE;
+ startCommentBlock(yyscanner,FALSE);
+ incLineNr(yyscanner);
}
[^#\n]+ { // any other stuff
- docBlock+=yytext;
+ yyextra->docBlock+=yytext;
}
\n { // new line that ends the comment
- handleCommentBlock(docBlock, docBrief);
- incLineNr();
- BEGIN(docBlockContext);
+ handleCommentBlock(yyscanner, yyextra->docBlock, yyextra->docBrief);
+ incLineNr(yyscanner);
+ BEGIN(yyextra->docBlockContext);
}
. { // anything we missed
- docBlock+=*yytext;
+ yyextra->docBlock+=*yytext;
}
}
<SingleQuoteString>{
\\{B}\n { // line continuation
- addToString(yytext);
- incLineNr();
+ addToString(yyscanner,yytext);
+ incLineNr(yyscanner);
}
\\. { // escaped char
- addToString(yytext);
+ addToString(yyscanner,yytext);
}
"\"\"\"" { // triple double quotes
- addToString(yytext);
+ addToString(yyscanner,yytext);
}
"'" { // end of the string
- addToString(yytext);
- BEGIN(g_stringContext);
+ addToString(yyscanner,yytext);
+ BEGIN(yyextra->stringContext);
}
[^"'\n\\]+ { // normal chars
- addToString(yytext);
+ addToString(yyscanner,yytext);
}
. { // normal char
- addToString(yytext);
+ addToString(yyscanner,yytext);
}
}
<DoubleQuoteString>{
\\{B}\n { // line continuation
- addToString(yytext);
- incLineNr();
+ addToString(yyscanner,yytext);
+ incLineNr(yyscanner);
}
\\. { // escaped char
- addToString(yytext);
+ addToString(yyscanner,yytext);
}
"'''" { // triple single quotes
- addToString(yytext);
+ addToString(yyscanner,yytext);
}
"\"" { // end of the string
- addToString(yytext);
- BEGIN(g_stringContext);
+ addToString(yyscanner,yytext);
+ BEGIN(yyextra->stringContext);
}
[^"'\n\\]+ { // normal chars
- addToString(yytext);
+ addToString(yyscanner,yytext);
}
. { // normal char
- addToString(yytext);
+ addToString(yyscanner,yytext);
}
}
<TripleString>{
{ENDTRIDOUBLEQUOTE} |
{ENDTRISINGLEQUOTE} {
- *g_copyString += yytext;
- if (g_doubleQuote==(yytext[0]=='"'))
+ *yyextra->copyString += yytext;
+ if (yyextra->doubleQuote==(yytext[0]=='"'))
{
- BEGIN(g_stringContext);
+ BEGIN(yyextra->stringContext);
}
}
({LONGSTRINGBLOCK}) {
- lineCount();
- *g_copyString += yytext;
+ lineCount(yyscanner);
+ *yyextra->copyString += yytext;
}
\n {
- incLineNr();
- *g_copyString += yytext;
+ incLineNr(yyscanner);
+ *yyextra->copyString += yytext;
}
. {
- *g_copyString += *yytext;
+ *yyextra->copyString += *yytext;
}
}
@@ -1679,16 +1410,16 @@ STARTDOCSYMS "##"
/*
<*>({NONEMPTY}|{EXPCHAR}|{BB}) { // This should go one character at a time.
// printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n",
- // yytext, YY_START, yyLineNr);
+ // yytext, YY_START, yyextra->yyLineNr);
}
*/
<*>{NEWLINE} {
//printf("[pyscanner] %d NEWLINE [line %d] no match\n",
- // YY_START, yyLineNr);
+ // YY_START, yyextra->yyLineNr);
- lineCount();
+ lineCount(yyscanner);
}
<*>"'" {
@@ -1697,7 +1428,7 @@ STARTDOCSYMS "##"
<*>. {
//printf("[pyscanner] '%s' [ state %d ] [line %d] no match\n",
- // yytext, YY_START, yyLineNr);
+ // yytext, YY_START, yyextra->yyLineNr);
}
@@ -1706,8 +1437,308 @@ STARTDOCSYMS "##"
//----------------------------------------------------------------------------
-static void parseCompounds(std::shared_ptr<Entry> rt)
+static int yyread(yyscan_t yyscanner,char *buf,int max_size)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ int c=0;
+ const char *p = yyextra->inputString + yyextra->inputPosition;
+ while ( c < max_size && *p ) { *buf++ = *p++; c++; }
+ yyextra->inputPosition+=c;
+ return c;
+}
+
+static void initParser(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->protection = Public;
+ yyextra->mtype = Method;
+ yyextra->stat = FALSE;
+ yyextra->virt = Normal;
+ yyextra->previous = 0;
+ yyextra->packageCommentAllowed = TRUE;
+ yyextra->packageNameCache.setAutoDelete(TRUE);
+}
+
+static void initEntry(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //yyextra->current->python = TRUE;
+ yyextra->current->protection = yyextra->protection ;
+ yyextra->current->mtype = yyextra->mtype;
+ yyextra->current->virt = yyextra->virt;
+ yyextra->current->stat = yyextra->stat;
+ yyextra->current->lang = SrcLangExt_Python;
+ yyextra->commentScanner.initGroupInfo(yyextra->current.get());
+ yyextra->stat = FALSE;
+}
+
+static void newEntry(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->previous = yyextra->current;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
+}
+
+static void newVariable(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (!yyextra->current->name.isEmpty() && yyextra->current->name.at(0)=='_') // mark as private
+ {
+ yyextra->current->protection=Private;
+ }
+ if (yyextra->current_root->section&Entry::COMPOUND_MASK) // mark as class variable
+ {
+ yyextra->current->stat = TRUE;
+ }
+ newEntry(yyscanner);
+}
+
+static void newFunction(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->current->name.left(2)=="__" && yyextra->current->name.right(2)=="__")
+ {
+ // special method name, see
+ // http://docs.python.org/ref/specialnames.html
+ yyextra->current->protection=Public;
+ }
+ else if (yyextra->current->name.at(0)=='_')
+ {
+ yyextra->current->protection=Private;
+ }
+}
+
+static inline int computeIndent(const char *s)
+{
+ int col=0;
+ static int tabSize=Config_getInt(TAB_SIZE);
+ const char *p=s;
+ char c;
+ while ((c=*p++))
+ {
+ if (c==' ') col++;
+ else if (c=='\t') col+=tabSize-(col%tabSize);
+ else break;
+ }
+ return col;
+}
+
+static QCString findPackageScopeFromPath(yyscan_t yyscanner,const QCString &path)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ QCString *pScope = yyextra->packageNameCache.find(path);
+ if (pScope)
+ {
+ return *pScope;
+ }
+ QFileInfo pf(path+"/__init__.py"); // found package initialization file
+ if (pf.exists())
+ {
+ int i=path.findRev('/');
+ if (i!=-1)
+ {
+ QCString scope = findPackageScopeFromPath(yyscanner,path.left(i));
+ if (!scope.isEmpty())
+ {
+ scope+="::";
+ }
+ scope+=path.mid(i+1);
+ yyextra->packageNameCache.insert(path,new QCString(scope));
+ return scope;
+ }
+ }
+ return "";
+}
+
+static QCString findPackageScope(yyscan_t yyscanner,const char *fileName)
+{
+ if (fileName==0) return "";
+ QFileInfo fi(fileName);
+ return findPackageScopeFromPath(yyscanner,fi.dirPath(TRUE).data());
+}
+
+static void addFrom(yyscan_t yyscanner,bool all)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ QCString item=all ? yyextra->packageName : yyextra->packageName+"."+yytext;
+ yyextra->current->name=removeRedundantWhiteSpace(substitute(item,".","::"));
+ yyextra->current->fileName = yyextra->yyFileName;
+ //printf("Adding using declaration: found:%s:%d name=%s\n",yyextra->yyFileName.data(),yyextra->yyLineNr,yyextra->current->name.data());
+ yyextra->current->section=all ? Entry::USINGDIR_SEC : Entry::USINGDECL_SEC;
+ yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
+ initEntry(yyscanner);
+}
+//-----------------------------------------------------------------------------
+
+static void lineCount(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ DBG_CTX((stderr,"yyextra->yyLineNr=%d\n",yyextra->yyLineNr));
+ for (const char *p = yytext; *p; ++p)
+ {
+ yyextra->yyLineNr += (*p == '\n') ;
+ }
+}
+
+static void incLineNr(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ DBG_CTX((stderr,"yyextra->yyLineNr=%d\n",yyextra->yyLineNr));
+ yyextra->yyLineNr++;
+}
+
+//-----------------------------------------------------------------
+static void startCommentBlock(yyscan_t yyscanner,bool brief)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (brief)
+ {
+ yyextra->current->briefFile = yyextra->yyFileName;
+ yyextra->current->briefLine = yyextra->yyLineNr;
+ }
+ else
+ {
+ yyextra->current->docFile = yyextra->yyFileName;
+ yyextra->current->docLine = yyextra->yyLineNr;
+ }
+}
+
+static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //printf("handleCommentBlock(doc=[%s] brief=%d yyextra->docBlockInBody=%d yyextra->docBlockJavaStyle=%d\n",
+ // doc.data(),brief,yyextra->docBlockInBody,yyextra->docBlockJavaStyle);
+
+ // TODO: Fix me
+ yyextra->docBlockInBody=FALSE;
+
+ if (yyextra->docBlockInBody && yyextra->previous && !yyextra->previous->doc.isEmpty())
+ {
+ yyextra->previous->doc=yyextra->previous->doc.stripWhiteSpace()+"\n\n";
+ }
+
+ int position = 0;
+ bool needsEntry;
+ int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine;
+ QCString processedDoc = processMarkdownForCommentBlock(doc,yyextra->yyFileName,lineNr);
+ while (yyextra->commentScanner.parseCommentBlock(
+ yyextra->thisParser,
+ (yyextra->docBlockInBody && yyextra->previous) ? yyextra->previous.get() : yyextra->current.get(),
+ processedDoc, // text
+ yyextra->yyFileName, // file
+ lineNr,
+ yyextra->docBlockInBody ? FALSE : brief,
+ yyextra->docBlockJavaStyle, // javadoc style // or FALSE,
+ yyextra->docBlockInBody,
+ yyextra->protection,
+ position,
+ needsEntry)
+ ) // need to start a new entry
+ {
+ if (needsEntry)
+ {
+ newEntry(yyscanner);
+ }
+ }
+ if (needsEntry)
+ {
+ newEntry(yyscanner);
+ }
+
+}
+
+static void endOfDef(yyscan_t yyscanner,int correction)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ //printf("endOfDef at=%d\n",yyextra->yyLineNr);
+ if (yyextra->bodyEntry)
+ {
+ yyextra->bodyEntry->endBodyLine = yyextra->yyLineNr-correction;
+ yyextra->bodyEntry = 0;
+ }
+ newEntry(yyscanner);
+ //yyextra->insideConstructor = FALSE;
+}
+
+static inline void addToString(yyscan_t yyscanner,const char *s)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ if (yyextra->copyString) (*yyextra->copyString)+=s;
+}
+
+static void initTriDoubleQuoteBlock(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockJavaStyle = TRUE;
+ yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!';
+ yyextra->docBlock.resize(0);
+ yyextra->doubleQuote = TRUE;
+ startCommentBlock(yyscanner,FALSE);
+}
+
+static void initTriSingleQuoteBlock(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockJavaStyle = TRUE;
+ yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!';
+ yyextra->docBlock.resize(0);
+ yyextra->doubleQuote = FALSE;
+ startCommentBlock(yyscanner,FALSE);
+}
+
+static void initSpecialBlock(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->docBlockContext = YY_START;
+ yyextra->docBlockInBody = FALSE;
+ yyextra->docBlockJavaStyle = TRUE;
+ yyextra->docBrief = TRUE;
+ yyextra->docBlock.resize(0);
+ startCommentBlock(yyscanner,TRUE);
+}
+
+static void searchFoundDef(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->current->section = Entry::FUNCTION_SEC;
+ yyextra->current->lang = SrcLangExt_Python;
+ yyextra->current->virt = Normal;
+ yyextra->current->stat = yyextra->stat;
+ yyextra->current->mtype = yyextra->mtype = Method;
+ yyextra->current->type.resize(0);
+ yyextra->current->name.resize(0);
+ yyextra->current->args.resize(0);
+ yyextra->current->argList.clear();
+ yyextra->packageCommentAllowed = FALSE;
+ yyextra->stat=FALSE;
+ //printf("searchFoundDef at=%d\n",yyextra->yyLineNr);
+}
+
+static void searchFoundClass(yyscan_t yyscanner)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ yyextra->current->section = Entry::CLASS_SEC;
+ yyextra->current->argList.clear();
+ yyextra->current->type += "class" ;
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
+ yyextra->packageCommentAllowed = FALSE;
+}
+
+//----------------------------------------------------------------------------
+
+static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
+{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("parseCompounds(%s)\n",rt->name.data());
for (int i=0; i<rt->children().size(); ++i)
{
@@ -1717,126 +1748,121 @@ static void parseCompounds(std::shared_ptr<Entry> rt)
//printf("-- %s ---------\n%s\n---------------\n",
// ce->name.data(),ce->program.data());
// init scanner state
- inputString = ce->program;
- inputPosition = 0;
- pyscannerYYrestart( pyscannerYYin ) ;
+ yyextra->inputString = ce->program;
+ yyextra->inputPosition = 0;
+ pyscannerYYrestart( 0, yyscanner );
if (ce->section&Entry::COMPOUND_MASK)
{
- current_root = ce;
+ yyextra->current_root = ce;
BEGIN( Search );
}
else if (ce->parent())
{
- current_root = rt;
+ yyextra->current_root = rt;
//printf("Searching for member variables in %s parent=%s\n",
// ce->name.data(),ce->parent->name.data());
BEGIN( SearchMemVars );
}
- yyFileName = ce->fileName;
- yyLineNr = ce->bodyLine ;
- current = std::make_shared<Entry>();
- initEntry();
+ yyextra->yyFileName = ce->fileName;
+ yyextra->yyLineNr = ce->bodyLine ;
+ yyextra->current = std::make_shared<Entry>();
+ initEntry(yyscanner);
QCString name = ce->name;
- Doxygen::docGroup.enterCompound(yyFileName,yyLineNr,name);
+ yyextra->commentScanner.enterCompound(yyextra->yyFileName,yyextra->yyLineNr,name);
- pyscannerYYlex() ;
- g_lexInit=TRUE;
+ pyscannerYYlex(yyscanner) ;
+ yyextra->lexInit=TRUE;
ce->program.resize(0);
- Doxygen::docGroup.leaveCompound(yyFileName,yyLineNr,name);
+ yyextra->commentScanner.leaveCompound(yyextra->yyFileName,yyextra->yyLineNr,name);
}
- parseCompounds(ce);
+ parseCompounds(yyscanner,ce);
}
}
//----------------------------------------------------------------------------
-static void parseMain(const char *fileName,const char *fileBuf,const std::shared_ptr<Entry> &rt)
+static void parseMain(yyscan_t yyscanner, const char *fileName,const char *fileBuf,const std::shared_ptr<Entry> &rt)
{
- initParser();
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
+ initParser(yyscanner);
+
+ yyextra->inputString = fileBuf;
+ yyextra->inputPosition = 0;
- inputString = fileBuf;
- inputPosition = 0;
+ yyextra->protection = Public;
+ yyextra->mtype = Method;
+ yyextra->stat = FALSE;
+ yyextra->virt = Normal;
+ yyextra->current_root = rt;
+ yyextra->specialBlock = FALSE;
- protection = Public;
- mtype = Method;
- gstat = FALSE;
- virt = Normal;
- current_root = rt;
- g_specialBlock = FALSE;
+ yyextra->yyLineNr= 1 ;
+ yyextra->yyFileName = fileName;
+ //setContext();
+ msg("Parsing file %s...\n",yyextra->yyFileName.data());
- inputFile.setName(fileName);
- if (inputFile.open(IO_ReadOnly))
+ QFileInfo fi(fileName);
+ yyextra->moduleScope = findPackageScope(yyscanner,fileName);
+ QCString baseName=fi.baseName().utf8();
+ if (baseName!="__init__") // package initializer file is not a package itself
{
- yyLineNr= 1 ;
- yyFileName = fileName;
- //setContext();
- msg("Parsing file %s...\n",yyFileName.data());
-
- QFileInfo fi(fileName);
- g_moduleScope = findPackageScope(fileName);
- QCString baseName=fi.baseName().utf8();
- if (baseName!="__init__") // package initializer file is not a package itself
+ if (!yyextra->moduleScope.isEmpty())
{
- if (!g_moduleScope.isEmpty())
- {
- g_moduleScope+="::";
- }
- g_moduleScope+=baseName;
+ yyextra->moduleScope+="::";
}
+ yyextra->moduleScope+=baseName;
+ }
- current = std::make_shared<Entry>();
- initEntry();
- current->name = g_moduleScope;
- current->section = Entry::NAMESPACE_SEC;
- current->type = "namespace";
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
+ yyextra->current = std::make_shared<Entry>();
+ initEntry(yyscanner);
+ yyextra->current->name = yyextra->moduleScope;
+ yyextra->current->section = Entry::NAMESPACE_SEC;
+ yyextra->current->type = "namespace";
+ yyextra->current->fileName = yyextra->yyFileName;
+ yyextra->current->startLine = yyextra->yyLineNr;
+ yyextra->current->bodyLine = yyextra->yyLineNr;
- current_root = current;
+ yyextra->current_root = yyextra->current;
- rt->moveToSubEntryAndRefresh(current);
+ rt->moveToSubEntryAndRefresh(yyextra->current);
- initParser();
+ initParser(yyscanner);
- Doxygen::docGroup.enterFile(yyFileName,yyLineNr);
-
- current->reset();
- initEntry();
- pyscannerYYrestart( pyscannerYYin );
- BEGIN( Search );
- pyscannerYYlex();
- g_lexInit=TRUE;
+ yyextra->commentScanner.enterFile(yyextra->yyFileName,yyextra->yyLineNr);
- Doxygen::docGroup.leaveFile(yyFileName,yyLineNr);
+ yyextra->current->reset();
+ initEntry(yyscanner);
+ pyscannerYYrestart(0,yyscanner);
+ BEGIN( Search );
+ pyscannerYYlex(yyscanner);
+ yyextra->lexInit=TRUE;
- current_root->program.resize(0);
+ yyextra->commentScanner.leaveFile(yyextra->yyFileName,yyextra->yyLineNr);
- parseCompounds(current_root);
+ yyextra->current_root->program.resize(0);
- inputFile.close();
- }
-
+ parseCompounds(yyscanner, yyextra->current_root);
}
//----------------------------------------------------------------------------
-static void parsePrototype(const QCString &text)
+static void parsePrototype(yyscan_t yyscanner,const QCString &text)
{
+ struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
//printf("**** parsePrototype(%s) begin\n",text.data());
if (text.isEmpty())
{
- warn(yyFileName,yyLineNr,"Empty prototype found!");
+ warn(yyextra->yyFileName,yyextra->yyLineNr,"Empty prototype found!");
return;
}
- g_specialBlock = FALSE;
- g_packageCommentAllowed = FALSE;
+ yyextra->specialBlock = FALSE;
+ yyextra->packageCommentAllowed = FALSE;
const char *orgInputString;
int orgInputPosition;
@@ -1844,47 +1870,57 @@ static void parsePrototype(const QCString &text)
// save scanner state
orgState = YY_CURRENT_BUFFER;
- yy_switch_to_buffer(yy_create_buffer(pyscannerYYin, YY_BUF_SIZE));
- orgInputString = inputString;
- orgInputPosition = inputPosition;
+ yy_switch_to_buffer(yy_create_buffer(0, YY_BUF_SIZE, yyscanner), yyscanner);
+ orgInputString = yyextra->inputString;
+ orgInputPosition = yyextra->inputPosition;
// set new string
- inputString = text;
- inputPosition = 0;
- pyscannerYYrestart( pyscannerYYin );
+ yyextra->inputString = text;
+ yyextra->inputPosition = 0;
+ pyscannerYYrestart( 0, yyscanner );
BEGIN( FunctionDec );
- pyscannerYYlex();
- g_lexInit=TRUE;
+ pyscannerYYlex(yyscanner);
+ yyextra->lexInit=TRUE;
- current->name = current->name.stripWhiteSpace();
- if (current->section == Entry::MEMBERDOC_SEC && current->args.isEmpty())
- current->section = Entry::VARIABLEDOC_SEC;
+ yyextra->current->name = yyextra->current->name.stripWhiteSpace();
+ if (yyextra->current->section == Entry::MEMBERDOC_SEC && yyextra->current->args.isEmpty())
+ yyextra->current->section = Entry::VARIABLEDOC_SEC;
// restore original scanner state
YY_BUFFER_STATE tmpBuf = YY_CURRENT_BUFFER;
- yy_switch_to_buffer(orgState);
- yy_delete_buffer(tmpBuf);
+ yy_switch_to_buffer(orgState, yyscanner);
+ yy_delete_buffer(tmpBuf, yyscanner);
- inputString = orgInputString;
- inputPosition = orgInputPosition;
+ yyextra->inputString = orgInputString;
+ yyextra->inputPosition = orgInputPosition;
//printf("**** parsePrototype end\n");
}
-void pyscanFreeScanner()
+//----------------------------------------------------------------------------
+
+struct PythonOutlineParser::Private
{
-#if defined(YY_FLEX_SUBMINOR_VERSION)
- if (g_lexInit)
- {
- pyscannerYYlex_destroy();
- }
+ yyscan_t yyscanner;
+ pyscannerYY_state state;
+};
+
+PythonOutlineParser::PythonOutlineParser() : p(std::make_unique<PythonOutlineParser::Private>())
+{
+ pyscannerYYlex_init_extra(&p->state,&p->yyscanner);
+#ifdef FLEX_DEBUG
+ pyscannerYYset_debug(1,p->yyscanner);
#endif
}
-//----------------------------------------------------------------------------
+PythonOutlineParser::~PythonOutlineParser()
+{
+ pyscannerYYlex_destroy(p->yyscanner);
+}
+
void PythonOutlineParser::parseInput(const char *fileName,
const char *fileBuf,
@@ -1892,9 +1928,10 @@ void PythonOutlineParser::parseInput(const char *fileName,
bool /*sameTranslationUnit*/,
QStrList & /*filesInSameTranslationUnit*/)
{
- g_thisParser = this;
+ struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner;
+ yyextra->thisParser = this;
printlex(yy_flex_debug, TRUE, __FILE__, fileName);
- ::parseMain(fileName,fileBuf,root);
+ ::parseMain(p->yyscanner, fileName,fileBuf,root);
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
// May print the AST for debugging purposes
@@ -1908,7 +1945,7 @@ bool PythonOutlineParser::needsPreprocessing(const QCString &) const
void PythonOutlineParser::parsePrototype(const char *text)
{
- ::parsePrototype(text);
+ ::parsePrototype(p->yyscanner,text);
}
diff --git a/src/reflist.cpp b/src/reflist.cpp
index 016ef49..b04c494 100644
--- a/src/reflist.cpp
+++ b/src/reflist.cpp
@@ -1,9 +1,6 @@
/******************************************************************************
*
- *
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2020 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -16,196 +13,76 @@
*
*/
+#include <algorithm>
+
#include <stdio.h>
#include "reflist.h"
-#include "util.h"
#include "ftextstream.h"
#include "definition.h"
-
-/*! Create a list of items that are cross referenced with documentation blocks
- * @param listName String representing the name of the list.
- * @param pageTitle String representing the title of the list page.
- * @param secTitle String representing the title of the section.
- */
-RefList::RefList(const char *listName,
- const char *pageTitle,
- const char *secTitle
- )
-{
- m_itemList = 0;
- m_dict = 0;
- m_dictIterator = 0;
- m_id = 0;
- m_listName = listName;
- m_fileName = convertNameToFile(listName,FALSE,TRUE);
- m_pageTitle = pageTitle;
- m_secTitle = secTitle;
-}
-
-/*! Destroy the todo list. Currently not called! */
-RefList::~RefList()
-{
- delete m_dictIterator;
- delete m_dict;
- delete m_itemList;
-}
-
-/*! Adds a new item to the list.
- * \returns A unique id for this item.
- */
-int RefList::addRefItem()
-{
- if (m_dict==0)
- {
- m_dict = new QIntDict<RefItem>(1009);
- m_dict->setAutoDelete(TRUE);
- m_dictIterator = new QIntDictIterator<RefItem>(*m_dict);
- }
- RefItem *item = new RefItem;
- m_id++;
- m_dict->insert(m_id,item);
- return m_id;
-}
-
-/*! Returns an item given it's id that is obtained with addRefItem()
- * \param itemId item's identifier.
- * \returns A pointer to the todo item's structure.
- */
-RefItem *RefList::getRefItem(int itemId)
-{
- return m_dict ? m_dict->find(itemId) : 0;
-}
-
-/*! Returns the first item in the dictionary or 0 if
- * non is available.
- * Items are not sorted.
- */
-RefItem *RefList::getFirstRefItem()
-{
- return m_dictIterator ? m_dictIterator->toFirst() : 0;
-}
-
-/*! Returns the next item in the dictionary or 0 if
- * we are at the end of the list.
- * Items are not sorted.
- */
-RefItem *RefList::getNextRefItem()
-{
- return m_dictIterator ? m_dictIterator->operator++() : 0;
-}
-
-/*! Returns the name of the list as set in the constructor. */
-QCString RefList::listName() const
-{
- return m_listName;
-}
-
-QCString RefList::fileName() const
-{
- return m_fileName;
-}
-
-QCString RefList::pageTitle() const
-{
- return m_pageTitle;
-}
-
-QCString RefList::sectionTitle() const
-{
- return m_secTitle;
-}
-
-void RefList::insertIntoList(const char *key,RefItem *item)
-{
- if (m_itemList==0)
- {
- m_itemList = new SortedRefItems(1009);
- }
- RefItem *ri = m_itemList->find(key);
- if (ri==0)
- {
- m_itemList->append(key,item);
- }
- else // item already added to the list (i.e. multiple item for the same
- // entity)
- {
- if (ri!=item)
- {
- // We also have to check if the item is not already in the "extra" list
- QListIterator<RefItem> li(ri->extraItems);
- RefItem *extraItem;
- bool doubleItem = false;
- for (li.toFirst();(extraItem=li.current());++li)
- {
- if (item == extraItem) doubleItem = true;
- }
- if (!doubleItem) ri->extraItems.append(item);
- }
- }
-}
-
+#include "sortdict.h"
void RefList::generatePage()
{
- if (m_itemList==0) return;
- m_itemList->sort();
- SDict<RefItem>::Iterator it(*m_itemList);
- RefItem *item;
+ std::sort(m_entries.begin(),m_entries.end(),
+ [](std::unique_ptr<RefItem> &left,std::unique_ptr<RefItem> &right)
+ { return qstricmp(left->title(),left->title()); });
+ //RefItem *item;
QCString doc;
doc += "<dl class=\"reflist\">";
- for (it.toFirst();(item=it.current());++it)
+ QCString lastGroup;
+ bool first=true;
+ for (const std::unique_ptr<RefItem> &item : m_entries)
{
- doc += " <dt>";
- doc += "\n";
- if (item->scope)
+ bool startNewGroup = item->group()!=lastGroup;
+ if (startNewGroup)
{
- if (item->scope->name() != "<globalScope>")
+ if (!first)
{
- doc += "\\_setscope ";
- doc += item->scope->name();
- doc += " ";
+ doc += "</dd>";
+ first=false;
}
+ doc += " <dt>";
+ doc += "\n";
+ if (item->scope())
+ {
+ if (item->scope()->name() != "<globalScope>")
+ {
+ doc += "\\_setscope ";
+ doc += item->scope()->name();
+ doc += " ";
+ }
+ }
+ doc += item->prefix();
+ doc += " \\_internalref ";
+ doc += item->name();
+ // escape \'s in title, see issue #5901
+ QCString escapedTitle = substitute(item->title(),"\\","\\\\");
+ doc += " \""+escapedTitle+"\" ";
+ // write declaration in case a function with arguments
+ if (!item->args().isEmpty())
+ {
+ // escape @'s in argument list, needed for Java annotations (see issue #6208)
+ // escape \'s in argument list (see issue #6533)
+ doc += substitute(substitute(item->args(),"@","@@"),"\\","\\\\");
+ }
+ doc += "</dt><dd>";
}
- doc += item->prefix;
- doc += " \\_internalref ";
- doc += item->name;
- // escape \'s in title, see issue #5901
- QCString escapedTitle = substitute(item->title,"\\","\\\\");
- if (item->scope &&
- (item->scope->definitionType()==Definition::TypeClass ||
- item->scope->definitionType()==Definition::TypeNamespace ||
- item->scope->definitionType()==Definition::TypeMember ||
- item->scope->definitionType()==Definition::TypePackage)
- )
- {
- // prevent Obj-C names in e.g. todo list are seen as emoji
- escapedTitle = substitute(escapedTitle,":","&Colon;");
- }
- doc += " \""+escapedTitle+"\" ";
- // write declaration in case a function with arguments
- if (!item->args.isEmpty())
+ else
{
- // escape @'s in argument list, needed for Java annotations (see issue #6208)
- // escape \'s in argument list (see issue #6533)
- doc += substitute(substitute(item->args,"@","@@"),"\\","\\\\");
+ doc += "<p>";
}
- doc += "</dt><dd> \\anchor ";
- doc += item->listAnchor;
+ doc += " \\anchor ";
+ doc += item->anchor();
doc += " ";
- doc += item->text;
- QListIterator<RefItem> li(item->extraItems);
- RefItem *extraItem;
- for (li.toFirst();(extraItem=li.current());++li)
- {
- doc += "<p> \\anchor ";
- doc += extraItem->listAnchor;
- doc += " ";
- doc += extraItem->text;
- }
+ doc += item->text();
+ lastGroup = item->group();
+ }
+ if (!first)
+ {
doc += "</dd>";
}
doc += "</dl>\n";
//printf("generatePage('%s')\n",doc.data());
- addRelatedPage(m_listName,m_pageTitle,doc,m_fileName,1,std::vector<ListItemInfo>(),0,0,TRUE);
+ addRelatedPage(m_listName,m_pageTitle,doc,m_fileName,1,std::vector<RefItem*>(),0,0,TRUE);
}
diff --git a/src/reflist.h b/src/reflist.h
index d064c58..49c3036 100644
--- a/src/reflist.h
+++ b/src/reflist.h
@@ -1,9 +1,6 @@
/******************************************************************************
*
- *
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2020 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -19,39 +16,55 @@
#ifndef _REFLIST_H
#define _REFLIST_H
+#include <vector>
+#include <unordered_map>
+#include <memory>
+
#include <qintdict.h>
#include <qlist.h>
-#include "sortdict.h"
+#include "util.h"
+#include "linkedmap.h"
class Definition;
+class RefList;
/** This struct represents an item in the list of references. */
-struct RefItem
-{
- RefItem() : scope(0) {}
- QCString text; //!< text of the item.
- QCString listAnchor; //!< anchor in the list
-
- QCString prefix; //!< type prefix for the name
- Definition *scope; //!< scope to use for references.
- QCString name; //!< name of the entity containing the reference
- QCString title; //!< display name of the entity
- QCString args; //!< optional arguments for the entity (if function)
- //bool written;
- QList<RefItem> extraItems; //!< more items belonging to the same entity
-};
-
-/** List of items sorted by title */
-class SortedRefItems : public SDict<RefItem>
+class RefItem
{
public:
- SortedRefItems(int size=17) : SDict<RefItem>(size) {}
- virtual ~SortedRefItems() {}
+ RefItem(int id,RefList *list) : m_id(id), m_list(list) {}
+
+ void setText (const char *text) { m_text = text; }
+ void setAnchor(const char *anchor) { m_anchor = anchor; }
+ void setPrefix(const char *prefix) { m_prefix = prefix; }
+ void setName (const char *name) { m_name = name; }
+ void setTitle (const char *title) { m_title = title; }
+ void setArgs (const char *args) { m_args = args; }
+ void setGroup (const char *group) { m_group = group; }
+ void setScope (const Definition *scope) { m_scope = scope; }
+
+ QCString text() const { return m_text; }
+ QCString anchor() const { return m_anchor; }
+ QCString prefix() const { return m_prefix; }
+ QCString name() const { return m_name; }
+ QCString title() const { return m_title; }
+ QCString args() const { return m_args; }
+ QCString group() const { return m_group; }
+ int id() const { return m_id; }
+ RefList *list() const { return m_list; }
+ const Definition *scope() const { return m_scope; }
+
private:
- int compareValues(const RefItem *r1,const RefItem *r2) const
- {
- return qstricmp(r1->title,r2->title);
- }
+ int m_id = 0; //!< unique identifier for this item within its list
+ RefList *m_list; //!< list owning this item
+ QCString m_text; //!< text of the item.
+ QCString m_anchor; //!< anchor in the list
+ QCString m_prefix; //!< type prefix for the name
+ QCString m_name; //!< name of the entity containing the reference
+ QCString m_title; //!< display name of the entity
+ QCString m_args; //!< optional arguments for the entity (if function)
+ QCString m_group; //!< group id used to combine item under a single header
+ const Definition *m_scope = 0; //!< scope to use for references.
};
/** List of cross-referenced items
@@ -67,31 +80,68 @@ class SortedRefItems : public SDict<RefItem>
class RefList
{
public:
- int addRefItem();
- RefItem *getRefItem(int todoItemId);
- RefItem *getFirstRefItem();
- RefItem *getNextRefItem();
- QCString listName() const;
- QCString fileName() const;
- QCString pageTitle() const;
- QCString sectionTitle() const;
-
- RefList(const char *listName,
- const char *pageTitle,const char *secTitle
- );
- ~RefList();
- void insertIntoList(const char *key,RefItem *item);
+ /*! Create a list of items that are cross referenced with documentation blocks
+ * @param listName String representing the name of the list.
+ * @param pageTitle String representing the title of the list page.
+ * @param secTitle String representing the title of the section.
+ */
+ RefList(const char *listName, const char *pageTitle, const char *secTitle) :
+ m_listName(listName), m_fileName(convertNameToFile(listName,FALSE,TRUE)),
+ m_pageTitle(pageTitle), m_secTitle(secTitle) {}
+
+ /*! Adds a new item to the list.
+ * @returns A unique id for this item.
+ */
+ RefItem *add()
+ {
+ m_id++;
+ std::unique_ptr<RefItem> item = std::make_unique<RefItem>(m_id,this);
+ RefItem *result = item.get();
+ m_entries.push_back(std::move(item));
+ m_lookup.insert({m_id,result});
+ return result;
+ }
+
+ /*! Returns an item given it's id that is obtained with addRefItem()
+ * @param itemId item's identifier.
+ * @returns A pointer to the todo item's structure.
+ */
+ RefItem *find(int itemId)
+ {
+ auto it = m_lookup.find(itemId);
+ return it!=m_lookup.end() ? it->second : nullptr;
+ }
+
+ QCString listName() const { return m_listName; }
+ QCString fileName() const { return m_fileName; }
+ QCString pageTitle() const { return m_pageTitle; }
+ QCString sectionTitle() const { return m_secTitle; }
+
void generatePage();
private:
- int m_id;
+ int m_id = 0;
QCString m_listName;
QCString m_fileName;
QCString m_pageTitle;
QCString m_secTitle;
- SortedRefItems *m_itemList;
- QIntDict<RefItem> *m_dict;
- QIntDictIterator<RefItem> *m_dictIterator;
+ std::vector< std::unique_ptr< RefItem > > m_entries;
+ std::unordered_map< int, RefItem* > m_lookup;
+};
+
+class RefListManager : public LinkedMap<RefList>
+{
+ public:
+ static RefListManager &instance()
+ {
+ static RefListManager rlm;
+ return rlm;
+ }
+
+ private:
+ RefListManager() {}
+ RefListManager(const RefListManager &other) = delete;
+ RefListManager &operator=(const RefListManager &other) = delete;
};
#endif
diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp
index 471cf85..e1a9e31 100644
--- a/src/rtfdocvisitor.cpp
+++ b/src/rtfdocvisitor.cpp
@@ -473,6 +473,12 @@ void RTFDocVisitor::visit(DocInclude *inc)
case DocInclude::DontIncWithLines:
case DocInclude::HtmlInclude:
case DocInclude::LatexInclude:
+ case DocInclude::ManInclude:
+ case DocInclude::XmlInclude:
+ case DocInclude::DocbookInclude:
+ break;
+ case DocInclude::RtfInclude:
+ m_t << inc->text();
break;
case DocInclude::VerbInclude:
m_t << "{" << endl;
@@ -671,7 +677,7 @@ void RTFDocVisitor::visitPost(DocAutoList *)
if (!m_lastIsPara) m_t << "\\par";
m_t << "}" << endl;
m_lastIsPara=TRUE;
- if (!m_indentLevel) m_t << "\\par";
+ if (!m_indentLevel) m_t << "\\par" << endl;
}
void RTFDocVisitor::visitPre(DocAutoListItem *)
diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp
index 79411c6..39741dc 100644
--- a/src/rtfgen.cpp
+++ b/src/rtfgen.cpp
@@ -1686,7 +1686,7 @@ void RTFGenerator::endDescForItem()
//}
-void RTFGenerator::startSection(const char *,const char *title,SectionInfo::SectionType type)
+void RTFGenerator::startSection(const char *,const char *title,SectionType type)
{
DBG_RTF(t << "{\\comment (startSection)}" << endl)
t << "{";
@@ -1694,11 +1694,11 @@ void RTFGenerator::startSection(const char *,const char *title,SectionInfo::Sect
int num=4;
switch(type)
{
- case SectionInfo::Page: num=2; break;
- case SectionInfo::Section: num=3; break;
- case SectionInfo::Subsection: num=4; break;
- case SectionInfo::Subsubsection: num=4; break;
- case SectionInfo::Paragraph: num=4; break;
+ case SectionType::Page: num=2; break;
+ case SectionType::Section: num=3; break;
+ case SectionType::Subsection: num=4; break;
+ case SectionType::Subsubsection: num=4; break;
+ case SectionType::Paragraph: num=4; break;
default: ASSERT(0); break;
}
QCString heading;
@@ -1711,7 +1711,7 @@ void RTFGenerator::startSection(const char *,const char *title,SectionInfo::Sect
t << "}" << endl;
}
-void RTFGenerator::endSection(const char *lab,SectionInfo::SectionType)
+void RTFGenerator::endSection(const char *lab,SectionType)
{
DBG_RTF(t << "{\\comment (endSection)}" << endl)
// make bookmark
diff --git a/src/rtfgen.h b/src/rtfgen.h
index c6cb76b..1750a7b 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -171,8 +171,8 @@ class RTFGenerator : public OutputGenerator
//void writeDescItem();
void startDescForItem();
void endDescForItem();
- void startSection(const char *,const char *,SectionInfo::SectionType);
- void endSection(const char *,SectionInfo::SectionType);
+ void startSection(const char *,const char *,SectionType);
+ void endSection(const char *,SectionType);
void addIndexItem(const char *,const char *);
void startIndent();
void endIndent();
diff --git a/src/scanner.l b/src/scanner.l
index 7b24d39..2342795 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -18,6 +18,9 @@
%option prefix="scannerYY"
%option reentrant
%option extra-type="struct scannerYY_state *"
+%top{
+#include <stdint.h>
+}
%{
@@ -48,10 +51,10 @@
#include "defargs.h"
#include "language.h"
#include "commentscan.h"
-#include "code.h"
#include "arguments.h"
#include "clangparser.h"
+#include "markdown.h"
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
@@ -59,6 +62,7 @@
struct scannerYY_state
{
OutlineParserInterface *thisParser;
+ CommentScanner commentScanner;
const char * inputString = 0;
int inputPosition = 0;
int lastContext = 0;
@@ -1025,9 +1029,16 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
yyextra->current->explicitExternal = TRUE;
lineCount(yyscanner);
}
-<FindMembers>{B}*"const"{BN}+ { yyextra->current->type += " const ";
- if (yyextra->insideCS) yyextra->current->stat = TRUE;
- lineCount(yyscanner);
+<FindMembers>{B}*"const"{BN}+ { if (yyextra->insideCS)
+ {
+ yyextra->current->type += " const ";
+ if (yyextra->insideCS) yyextra->current->stat = TRUE;
+ lineCount(yyscanner);
+ }
+ else
+ {
+ REJECT;
+ }
}
<FindMembers>{B}*"virtual"{BN}+ { yyextra->current->type += " virtual ";
yyextra->current->virt = Virtual;
@@ -1426,7 +1437,6 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
yyextra->isTypedef=decl.find("typedef")!=-1;
bool isConst=decl.find("const")!=-1;
bool isVolatile=decl.find("volatile")!=-1;
- uint64 spec = yyextra->current->spec;
yyextra->current->section = Entry::CLASS_SEC ;
// preserve UNO IDL & Inline attributes, Slice local
yyextra->current->spec = Entry::Struct |
@@ -2483,12 +2493,12 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
if (yyextra->previous && yyextra->previous->section==Entry::GROUPDOC_SEC)
{
// link open command to the group defined in the yyextra->previous entry
- Doxygen::docGroup.open(yyextra->previous.get(),yyextra->yyFileName,yyextra->yyLineNr);
+ yyextra->commentScanner.open(yyextra->previous.get(),yyextra->yyFileName,yyextra->yyLineNr);
}
else
{
// link open command to the yyextra->current entry
- Doxygen::docGroup.open(yyextra->current.get(),yyextra->yyFileName,yyextra->yyLineNr);
+ yyextra->commentScanner.open(yyextra->current.get(),yyextra->yyFileName,yyextra->yyLineNr);
}
//yyextra->current = tmp;
initEntry(yyscanner);
@@ -2532,7 +2542,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<FindMembers,FindFields,ReadInitializer>"//"([!/]){B}*{CMD}"}".*|"/*"([!*]){B}*{CMD}"}"[^*]*"*/" {
bool insideEnum = YY_START==FindFields || (YY_START==ReadInitializer && yyextra->lastInitializerContext==FindFields); // see bug746226
- Doxygen::docGroup.close(yyextra->current.get(),yyextra->yyFileName,yyextra->yyLineNr,insideEnum);
+ yyextra->commentScanner.close(yyextra->current.get(),yyextra->yyFileName,yyextra->yyLineNr,insideEnum);
lineCount(yyscanner);
}
<FindMembers>"=" { // in PHP code this could also be due to "<?="
@@ -3614,10 +3624,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
yyextra->current->name = yyextra->current->name.left(split_point);
if (!yyextra->current_root->name.isEmpty()) yyextra->current->name.prepend(yyextra->current_root->name+"::");
- std::shared_ptr<Entry> tmp = yyextra->current;
yyextra->current_root->moveToSubEntryAndKeep(yyextra->current);
- yyextra->current_root = tmp;
-
+ yyextra->current_root = yyextra->current;
yyextra->current = new_current;
}
// restore documentation values
@@ -3661,7 +3669,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
else
{
yyextra->memspecEntry = yyextra->current;
- yyextra->current_root->copyToSubEntry( yyextra->current ) ;
+ yyextra->current_root->moveToSubEntryAndKeep( yyextra->current ) ;
+ yyextra->current = std::make_shared<Entry>(*yyextra->current);
if (yyextra->current->section==Entry::NAMESPACE_SEC ||
(yyextra->current->spec==Entry::Interface) ||
yyextra->insideJava || yyextra->insidePHP || yyextra->insideCS || yyextra->insideD || yyextra->insideJS ||
@@ -4272,7 +4281,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
unput(yyextra->lastCopyArgChar);
BEGIN( yyextra->lastCommentInArgContext );
}
-<CopyArgCommentLine>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
+<CopyArgCommentLine>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
yyextra->docBlockName=&yytext[1];
yyextra->fullArgString+=yytext;
BEGIN(CopyArgVerbatim);
@@ -4290,7 +4299,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
yyextra->fullArgString+=yytext;
BEGIN(CopyArgVerbatim);
}
-<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9\-] { // end of verbatim block
+<CopyArgVerbatim>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode"|"f$"|"f]"|"f}")/[^a-z_A-Z0-9\-] { // end of verbatim block
yyextra->fullArgString+=yytext;
if (yytext[1]=='f') // end of formula
{
@@ -4743,23 +4752,25 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
yyextra->current->startLine = yyextra->yyBegLineNr;
yyextra->current->startColumn = yyextra->yyBegColNr;
static QRegExp re("([^)]*[*&][^)]*)"); // (...*...)
+ int ts=yyextra->current->type.find('<');
+ int te=yyextra->current->type.findRev('>');
+ int ti=yyextra->current->type.find(re,0);
+
+ // bug677315: A<int(void *, char *)> get(); is not a function pointer
+ bool isFunction = ti==-1 || // not a (...*...) pattern
+ (ts!=-1 && ts<te && ts<ti && ti<te); // (...*...) is part of a template argument list
+ bool isVariable = (!yyextra->current->type.isEmpty() &&
+ (!isFunction || yyextra->current->type.left(8)=="typedef "));
+
+ //printf("type=%s ts=%d te=%d ti=%d isFunction=%d\n",
+ // yyextra->current->type.data(),ts,te,ti,isFunction);
+
if (*yytext!=';' || (yyextra->current_root->section&Entry::COMPOUND_MASK) )
{
int tempArg=yyextra->current->name.find('<');
- int ts=yyextra->current->type.find('<');
- int te=yyextra->current->type.findRev('>');
- int ti=yyextra->current->type.find(re,0);
-
- // bug677315: A<int(void *, char *)> get(); is not a function pointer
- bool isFunction = ti==-1 || // not a (...*...) pattern
- (ts!=-1 && ts<te && ts<ti && ti<te); // (...*...) is part of a template argument list
-
- //printf("type=%s ts=%d te=%d ti=%d isFunction=%d\n",
- // yyextra->current->type.data(),ts,te,ti,isFunction);
QCString tempName;
if (tempArg==-1) tempName=yyextra->current->name; else tempName=yyextra->current->name.left(tempArg);
- if (!yyextra->current->type.isEmpty() &&
- (!isFunction || yyextra->current->type.left(8)=="typedef "))
+ if (isVariable)
{
//printf("Scanner.l: found in class variable: '%s' '%s' '%s'\n", yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
if (yyextra->isTypedef && yyextra->current->type.left(8)!="typedef ")
@@ -4768,7 +4779,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
yyextra->current->section = Entry::VARIABLE_SEC ;
}
- else
+ else
{
//printf("Scanner.l: found in class function: '%s' '%s' '%s'\n", yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
yyextra->current->section = Entry::FUNCTION_SEC ;
@@ -4778,8 +4789,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
else // a global function prototype or function variable
{
//printf("Scanner.l: prototype? type='%s' name='%s' args='%s'\n",yyextra->current->type.data(),yyextra->current->name.data(),yyextra->current->args.data());
- if (!yyextra->current->type.isEmpty() &&
- (yyextra->current->type.find(re,0)!=-1 || yyextra->current->type.left(8)=="typedef "))
+ if (isVariable)
{
if (yyextra->isTypedef && yyextra->current->type.left(8)!="typedef ")
{
@@ -4912,7 +4922,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
}
<SkipCurly>"}"{BN}*("/*!"|"/**"|"//!"|"///")"<" {
lineCount(yyscanner);
- if ( yyextra->curlyCount )
+ if ( yyextra->curlyCount )
{
//addToBody(yytext);
--yyextra->curlyCount ;
@@ -4920,10 +4930,8 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
else
{
yyextra->current->endBodyLine=yyextra->yyLineNr;
- // take yyextra->previous out of yyextra->current_root and move it into yyextra->current
- yyextra->tempEntry = yyextra->current; // remember yyextra->current
- yyextra->current_root->moveFromSubEntry(yyextra->previous.get(),yyextra->current);
- yyextra->previous.reset();
+ yyextra->tempEntry = yyextra->current; // temporarily switch to the previous entry
+ yyextra->current = yyextra->previous;
yyextra->docBlockContext = SkipCurlyEndDoc;
yyextra->docBlockInBody = FALSE;
@@ -6252,7 +6260,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
yyextra->nestedComment=FALSE;
BEGIN(DocCopyBlock);
}
-<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
+<DocBlock>{CMD}("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
yyextra->docBlock+=yytext;
yyextra->docBlockName=&yytext[1];
yyextra->fencedSize=0;
@@ -6320,7 +6328,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP})
yyextra->docBlock+=yytext;
BEGIN(DocBlock);
}
-<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
+<DocCopyBlock>[\\@]("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
yyextra->docBlock+=yytext;
if (&yytext[4]==yyextra->docBlockName)
{
@@ -6639,7 +6647,7 @@ static void initEntry(yyscan_t yyscanner)
yyextra->current->stat = yyextra->stat;
yyextra->current->lang = yyextra->language;
//printf("*** initEntry(yyscanner) yyextra->language=%d\n",yyextra->language);
- Doxygen::docGroup.initGroupInfo(yyextra->current.get());
+ yyextra->commentScanner.initGroupInfo(yyextra->current.get());
yyextra->isTypedef=FALSE;
}
@@ -6965,8 +6973,8 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief
int position=0;
bool needsEntry=FALSE;
- QCString processedDoc = preprocessCommentBlock(stripIndentation(doc),yyextra->yyFileName,lineNr);
- while (parseCommentBlock(
+ QCString processedDoc = processMarkdownForCommentBlock(stripIndentation(doc),yyextra->yyFileName,lineNr);
+ while (yyextra->commentScanner.parseCommentBlock(
yyextra->thisParser,
yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(),
processedDoc, // text
@@ -7025,7 +7033,7 @@ static void handleParametersCommentBlocks(yyscan_t yyscanner,ArgumentList &al)
yyextra->current->brief.resize(0);
//printf("handleParametersCommentBlock [%s]\n",doc.data());
- while (parseCommentBlock(
+ while (yyextra->commentScanner.parseCommentBlock(
yyextra->thisParser,
yyextra->current.get(),
a.docs, // text
@@ -7151,13 +7159,13 @@ static void parseCompounds(yyscan_t yyscanner,const std::shared_ptr<Entry> &rt)
//memberGroupRelates.resize(0);
//memberGroupInside.resize(0);
QCString name = ce->name;
- Doxygen::docGroup.enterCompound(yyextra->yyFileName,yyextra->yyLineNr,name);
+ yyextra->commentScanner.enterCompound(yyextra->yyFileName,yyextra->yyLineNr,name);
scannerYYlex(yyscanner);
yyextra->lexInit=TRUE;
//forceEndGroup();
- Doxygen::docGroup.leaveCompound(yyextra->yyFileName,yyextra->yyLineNr,name);
+ yyextra->commentScanner.leaveCompound(yyextra->yyFileName,yyextra->yyLineNr,name);
ce->program.resize(0);
@@ -7217,7 +7225,7 @@ static void parseMain(yyscan_t yyscanner,
yyextra->current_root = rt;
initParser(yyscanner);
- Doxygen::docGroup.enterFile(yyextra->yyFileName,yyextra->yyLineNr);
+ yyextra->commentScanner.enterFile(yyextra->yyFileName,yyextra->yyLineNr);
yyextra->current = std::make_shared<Entry>();
//printf("yyextra->current=%p yyextra->current_root=%p\n",yyextra->current,yyextra->current_root);
int sec=guessSection(yyextra->yyFileName);
@@ -7247,7 +7255,7 @@ static void parseMain(yyscan_t yyscanner,
}
//forceEndGroup();
- Doxygen::docGroup.leaveFile(yyextra->yyFileName,yyextra->yyLineNr);
+ yyextra->commentScanner.leaveFile(yyextra->yyFileName,yyextra->yyLineNr);
rt->program.resize(0);
diff --git a/src/searchindex.cpp b/src/searchindex.cpp
index eee1aa1..329b123 100644
--- a/src/searchindex.cpp
+++ b/src/searchindex.cpp
@@ -1052,7 +1052,7 @@ void writeJavaScriptSearchIndex()
QCString anchor = d->anchor();
ti << "'" << externalRef("../",d->getReference(),TRUE)
- << d->getOutputFileBase() << Doxygen::htmlFileExtension;
+ << addHtmlExtensionIfMissing(d->getOutputFileBase());
if (!anchor.isEmpty())
{
ti << "#" << anchor;
@@ -1109,7 +1109,7 @@ void writeJavaScriptSearchIndex()
ti << "],[";
}
ti << "'" << externalRef("../",d->getReference(),TRUE)
- << d->getOutputFileBase() << Doxygen::htmlFileExtension;
+ << addHtmlExtensionIfMissing(d->getOutputFileBase());
if (!anchor.isEmpty())
{
ti << "#" << anchor;
diff --git a/src/section.h b/src/section.h
index 9e6c695..9bdfb3b 100644
--- a/src/section.h
+++ b/src/section.h
@@ -1,9 +1,6 @@
/******************************************************************************
*
- *
- *
- *
- * Copyright (C) 1997-2015 by Dimitri van Heesch.
+ * Copyright (C) 1997-2020 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
@@ -19,42 +16,143 @@
#ifndef SECTION_H
#define SECTION_H
-#include "sortdict.h"
+#include <unordered_map>
+
+#include <qcstring.h>
+
+#include "linkedmap.h"
class Definition;
-/** Class representing a section in a page */
-struct SectionInfo
+//! enum representing the various types of sections and entities that can be referred to.
+enum class SectionType
{
- enum SectionType { Page = 0,
- Section = 1,
- Subsection = 2,
- Subsubsection = 3,
- Paragraph = 4,
- Anchor = 5,
- Table = 6
- };
- SectionInfo(const char *f,const int lin,const char *l,const char *t,
- SectionType st,int lev,const char *r=0) :
- label(l), title(t), type(st), ref(r), definition(0),
- fileName(f), lineNr(lin), generated(FALSE), level(lev) {}
- QCString label;
- QCString title;
- SectionType type;
- QCString ref;
- Definition *definition;
- QCString fileName;
- int lineNr;
- bool generated;
- int level;
+ Page = 0,
+ Section = 1,
+ Subsection = 2,
+ Subsubsection = 3,
+ Paragraph = 4,
+ Anchor = 5,
+ Table = 6
};
-/** Unsorted dictionary of SectionInfo objects. */
-class SectionDict : public SDict<SectionInfo>
+//! return true if type is a section, and false if it is a page, anchor or table.
+inline constexpr bool isSection(SectionType type)
+{
+ return (type==SectionType::Section ||
+ type==SectionType::Subsection ||
+ type==SectionType::Subsubsection ||
+ type==SectionType::Paragraph);
+}
+
+//! class that provide information about a section.
+class SectionInfo
{
public:
- SectionDict(int size) : SDict<SectionInfo>(size) {}
- ~SectionDict() {}
+ SectionInfo(const char *label, const char *fileName, int lineNr,
+ const char *title, SectionType type, int level,const char *ref) :
+ m_label(label), m_title(title), m_type(type), m_ref(ref),
+ m_lineNr(lineNr), m_fileName(fileName), m_level(level)
+ {
+ //printf("SectionInfo(%p)\n",this);
+ }
+ ~SectionInfo()
+ {
+ //printf("~SectionInfo(%p)\n",this);
+ }
+
+ // getters
+ QCString label() const { return m_label; }
+ QCString title() const { return m_title; }
+ SectionType type() const { return m_type; }
+ QCString ref() const { return m_ref; }
+ int lineNr() const { return m_lineNr; }
+ QCString fileName() const { return m_fileName; }
+ bool generated() const { return m_generated; }
+ int level() const { return m_level; }
+ Definition *definition() const { return m_definition; }
+
+ // setters
+ void setFileName(const char *fn) { m_fileName = fn; }
+ void setType(SectionType t) { m_type = t; }
+ void setGenerated(bool b) { m_generated = b; }
+ void setDefinition(Definition *d) { m_definition = d; }
+
+ private:
+ QCString m_label;
+ QCString m_title;
+ SectionType m_type;
+ QCString m_ref;
+ int m_lineNr;
+ QCString m_fileName;
+ bool m_generated = false;
+ int m_level;
+ Definition *m_definition = 0;
};
+//! class that represents a list of constant references to sections.
+class SectionRefs
+{
+ using SectionInfoVec = std::vector<const SectionInfo*>;
+ public:
+ using const_iterator = SectionInfoVec::const_iterator;
+
+ //! Returns a constant pointer to the section info given a section label or nullptr
+ //! if no section with the given label can be found.
+ const SectionInfo *find(const char *label) const
+ {
+ auto it = m_lookup.find(label);
+ return it!=m_lookup.end() ? it->second : nullptr;
+ }
+
+ //! Adds a non-owning section reference.
+ void add(const SectionInfo *si)
+ {
+ m_lookup.insert({std::string(si->label()),si});
+ m_entries.push_back(si);
+ }
+
+ const_iterator begin() const { return m_entries.cbegin(); }
+ const_iterator end() const { return m_entries.cend(); }
+ bool empty() const { return m_entries.empty(); }
+ int size() const { return m_entries.size(); }
+
+ private:
+ SectionInfoVec m_entries;
+ std::unordered_map< std::string, const SectionInfo* > m_lookup;
+};
+
+//! singleton class that owns the list of all sections
+class SectionManager : public LinkedMap<SectionInfo>
+{
+ public:
+ //! Add a new section given the data of an existing section.
+ //! Returns a non-owning pointer to the newly added section.
+ SectionInfo *add(const SectionInfo &si)
+ {
+ return LinkedMap<SectionInfo>::add(si.label(),si.fileName(),si.lineNr(),si.title(),si.type(),si.level(),si.ref());
+ }
+
+ //! Add a new section
+ //! Return a non-owning pointer to the newly added section
+ SectionInfo *add(const char *label, const char *fileName, int lineNr,
+ const char *title, SectionType type, int level,const char *ref=0)
+ {
+ return LinkedMap<SectionInfo>::add(label,fileName,lineNr,title,type,level,ref);
+ }
+
+ //! returns a reference to the singleton
+ static SectionManager &instance()
+ {
+ static SectionManager sm;
+ return sm;
+ }
+
+ private:
+ SectionManager() {}
+ SectionManager(const SectionManager &other) = delete;
+ SectionManager &operator=(const SectionManager &other) = delete;
+};
+
+
#endif
diff --git a/src/sqlcode.l b/src/sqlcode.l
index 02c2c14..e73fe4c 100644
--- a/src/sqlcode.l
+++ b/src/sqlcode.l
@@ -19,6 +19,9 @@
%option nounput
%option reentrant
%option extra-type="struct sqlcodeYY_state *"
+%top{
+#include <stdint.h>
+}
%{
diff --git a/src/sqlite3gen.cpp b/src/sqlite3gen.cpp
index 14a73d8..1ab81fc 100644
--- a/src/sqlite3gen.cpp
+++ b/src/sqlite3gen.cpp
@@ -2486,10 +2486,10 @@ static void generateSqlite3ForPage(const PageDef *pd,bool isExample)
}
else
{
- SectionInfo *si = Doxygen::sectionDict->find(pd->name());
+ SectionInfo *si = SectionManager::instance().find(pd->name());
if (si)
{
- title = si->title;
+ title = si->title();
}
if(!title){title = pd->title();}
diff --git a/src/tagreader.cpp b/src/tagreader.cpp
index 3f9a7a1..3640f0e 100644
--- a/src/tagreader.cpp
+++ b/src/tagreader.cpp
@@ -1162,13 +1162,13 @@ void TagFileParser::addDocAnchors(const std::shared_ptr<Entry> &e,const TagAncho
TagAnchorInfo *ta;
for (tli.toFirst();(ta=tli.current());++tli)
{
- if (Doxygen::sectionDict->find(ta->label)==0)
+ if (SectionManager::instance().find(ta->label)==0)
{
//printf("New sectionInfo file=%s anchor=%s\n",
// ta->fileName.data(),ta->label.data());
- SectionInfo *si=new SectionInfo(ta->fileName,-1,ta->label,ta->title,
- SectionInfo::Anchor,0,m_tagName);
- Doxygen::sectionDict->append(ta->label,si);
+ SectionInfo *si=SectionManager::instance().add(
+ ta->label,ta->fileName,-1,ta->title,
+ SectionType::Anchor,0,m_tagName);
e->anchors.push_back(si);
}
else
diff --git a/src/tclscanner.l b/src/tclscanner.l
index a4709ce..7f776ca 100644
--- a/src/tclscanner.l
+++ b/src/tclscanner.l
@@ -17,6 +17,9 @@
%option never-interactive
%option case-insensitive
%option prefix="tclscannerYY"
+%top{
+#include <stdint.h>
+}
%{
#include <stdio.h>
@@ -53,6 +56,7 @@
#include "arguments.h"
#include "namespacedef.h"
#include "filedef.h"
+#include "markdown.h"
#define YY_NO_INPUT 1
#define YY_NO_UNISTD_H 1
@@ -418,7 +422,7 @@ typedef struct
} tcl_scan;
//* Structure containing all internal global variables.
-static struct
+struct tcl_struct
{
CodeOutputInterface * code; // if set then we are codifying the file
int code_line; // current line of code
@@ -430,6 +434,7 @@ static struct
int input_position; // position in file
QCString file_name; // name of used file
OutlineParserInterface *this_parser; // myself
+ CommentScanner commentScanner;
int command; // true if command was found
int comment; // set true if comment was scanned
int brace_level; // bookkeeping of braces
@@ -460,7 +465,9 @@ static struct
Protection protection; // current protections state
const MemberDef *memberdef; // contain current MemberDef when codifying
bool collectXRefs;
-} tcl;
+};
+
+static tcl_struct tcl;
// scanner functions
static int yyread(char *buf,int max_size);
@@ -490,7 +497,7 @@ Entry* tcl_entry_new()
myEntry->inbodyFile = tcl.file_name;
myEntry->fileName = tcl.file_name;
myEntry->lang = SrcLangExt_Tcl;
- Doxygen::docGroup.initGroupInfo(myEntry);
+ tcl.commentScanner.initGroupInfo(myEntry);
// collect entries
if (!tcl.code)
{
@@ -1538,16 +1545,16 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment);
myPos0=myPos;
myLine0=myLine;
- processedDoc = preprocessCommentBlock(myDoc,tcl.file_name,myLine);
- while (parseCommentBlock(tcl.this_parser, &myEntry0, processedDoc, tcl.file_name,
+ processedDoc = processMarkdownForCommentBlock(myDoc,tcl.file_name,myLine);
+ while (tcl.commentScanner.parseCommentBlock(tcl.this_parser, &myEntry0, processedDoc, tcl.file_name,
myLine, FALSE, tcl.config_autobrief, FALSE, myProt, myPos, myNew))
{
if (myNew)
{ // we need a new entry in this case
myNew=0;
myEntry = tcl_entry_new();
- processedDoc = preprocessCommentBlock(myDoc,tcl.file_name,myLine0);
- parseCommentBlock(tcl.this_parser, myEntry, processedDoc, tcl.file_name,
+ processedDoc = processMarkdownForCommentBlock(myDoc,tcl.file_name,myLine0);
+ tcl.commentScanner.parseCommentBlock(tcl.this_parser, myEntry, processedDoc, tcl.file_name,
myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew);
tcl.entry_inside->moveToSubEntryAndRefresh(myEntry);
}
@@ -1557,8 +1564,8 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment);
{
myEntry1=tcl_entry_namespace(tcl.scan.at(0)->ns);
}
- processedDoc = preprocessCommentBlock(myDoc,tcl.file_name,myLine0);
- parseCommentBlock(tcl.this_parser, myEntry1, processedDoc, tcl.file_name,
+ processedDoc = processMarkdownForCommentBlock(myDoc,tcl.file_name,myLine0);
+ tcl.commentScanner.parseCommentBlock(tcl.this_parser, myEntry1, processedDoc, tcl.file_name,
myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew);
}
myPos0=myPos;
@@ -1568,8 +1575,8 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment);
{ // we need a new entry
myNew=0;
myEntry = tcl_entry_new();
- processedDoc = preprocessCommentBlock(myDoc,tcl.file_name,myLine0);
- parseCommentBlock(tcl.this_parser, myEntry, processedDoc, tcl.file_name,
+ processedDoc = processMarkdownForCommentBlock(myDoc,tcl.file_name,myLine0);
+ tcl.commentScanner.parseCommentBlock(tcl.this_parser, myEntry, processedDoc, tcl.file_name,
myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew);
tcl.entry_inside->moveToSubEntryAndKeep(myEntry);
}
@@ -1579,16 +1586,16 @@ tcl_inf("-> %s\n",(const char *)tcl.string_comment);
{
myEntry1=tcl_entry_namespace(tcl.scan.at(0)->ns);
}
- processedDoc = preprocessCommentBlock(myDoc,tcl.file_name,myLine0);
- parseCommentBlock(tcl.this_parser, myEntry1, processedDoc, tcl.file_name,
+ processedDoc = processMarkdownForCommentBlock(myDoc,tcl.file_name,myLine0);
+ tcl.commentScanner.parseCommentBlock(tcl.this_parser, myEntry1, processedDoc, tcl.file_name,
myLine0, FALSE, tcl.config_autobrief, FALSE, myProt, myPos0, myNew);
}
}
else
{ // new entry
tcl.entry_current = tcl_entry_new();
- processedDoc = preprocessCommentBlock(myDoc,tcl.file_name,myLine);
- while (parseCommentBlock(tcl.this_parser, tcl.entry_current, processedDoc,
+ processedDoc = processMarkdownForCommentBlock(myDoc,tcl.file_name,myLine);
+ while (tcl.commentScanner.parseCommentBlock(tcl.this_parser, tcl.entry_current, processedDoc,
tcl.file_name, myLine, FALSE, tcl.config_autobrief, FALSE,
myProt, myPos, myNew))
{
@@ -2981,7 +2988,7 @@ tcl_inf("%s\n",fileName);
printlex(yy_flex_debug, TRUE, __FILE__, fileName);
msg("Parsing %s...\n",fileName);
- Doxygen::docGroup.enterFile(fileName,yylineno);
+ tcl.commentScanner.enterFile(fileName,yylineno);
tcl_init();
tcl.code = NULL;
@@ -2989,7 +2996,7 @@ tcl_inf("%s\n",fileName);
tcl.this_parser = this;
tcl.entry_main = root.get(); /* toplevel entry */
tcl_parse("","");
- Doxygen::docGroup.leaveFile(tcl.file_name,yylineno);
+ tcl.commentScanner.leaveFile(tcl.file_name,yylineno);
root->program.resize(0);
myFile.close();
printlex(yy_flex_debug, FALSE, __FILE__, fileName);
diff --git a/src/translator_fr.h b/src/translator_fr.h
index f355619..0035e23 100644
--- a/src/translator_fr.h
+++ b/src/translator_fr.h
@@ -129,1077 +129,1088 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
* "\\usepackage[T1]{fontenc}\n"
* </pre>
*/
- virtual QCString latexLanguageSupportCommand()
- {
- return "\\usepackage[french]{babel}\n"
- "\\NoAutoSpaceBeforeFDP\n";
- }
+ virtual QCString latexLanguageSupportCommand()
+ {
+ return "\\usepackage[french]{babel}\n"
+ "\\NoAutoSpaceBeforeFDP\n";
+ }
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
- virtual QCString trRelatedFunctions()
- { return "Fonctions associées"; }
+ virtual QCString trRelatedFunctions()
+ { return "Fonctions associées"; }
/*! subscript for the related functions. */
- virtual QCString trRelatedSubscript()
- { return "(Notez que ce ne sont pas des fonctions membres)"; }
+ virtual QCString trRelatedSubscript()
+ { return "(Notez que ce ne sont pas des fonctions membres)"; }
/*! header that is put before the detailed description of files, classes and namespaces. */
- virtual QCString trDetailedDescription()
- { return "Description détaillée"; }
+ virtual QCString trDetailedDescription()
+ { return "Description détaillée"; }
/*! header that is put before the list of typedefs. */
- virtual QCString trMemberTypedefDocumentation()
- { return "Documentation des définitions de type membres"; }
+ virtual QCString trMemberTypedefDocumentation()
+ { return "Documentation des définitions de type membres"; }
/*! header that is put before the list of enumerations. */
- virtual QCString trMemberEnumerationDocumentation()
- { return "Documentation des énumérations membres"; }
+ virtual QCString trMemberEnumerationDocumentation()
+ { return "Documentation des énumérations membres"; }
/*! header that is put before the list of member functions. */
- virtual QCString trMemberFunctionDocumentation()
- { return "Documentation des fonctions membres"; }
+ virtual QCString trMemberFunctionDocumentation()
+ { return "Documentation des fonctions membres"; }
/*! header that is put before the list of member attributes. */
- virtual QCString trMemberDataDocumentation()
+ virtual QCString trMemberDataDocumentation()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Documentation des champs";
- }
- else
- {
- return "Documentation des données membres";
- }
+ return "Documentation des champs";
}
+ else
+ {
+ return "Documentation des données membres";
+ }
+ }
/*! this is the text of a link put after brief descriptions. */
- virtual QCString trMore()
- { return "Plus de détails..."; }
+ virtual QCString trMore()
+ { return "Plus de détails..."; }
/*! put in the class documentation */
- virtual QCString trListOfAllMembers()
- { return "Liste de tous les membres"; }
+ virtual QCString trListOfAllMembers()
+ { return "Liste de tous les membres"; }
/*! used as the title of the "list of all members" page of a class */
- virtual QCString trMemberList()
- { return "Liste des membres"; }
+ virtual QCString trMemberList()
+ { return "Liste des membres"; }
/*! this is the first part of a sentence that is followed by a class name */
- virtual QCString trThisIsTheListOfAllMembers()
- { return "Liste complète des membres de "; }
+ virtual QCString trThisIsTheListOfAllMembers()
+ { return "Liste complète des membres de "; }
/*! this is the remainder of the sentence after the class name */
- virtual QCString trIncludingInheritedMembers()
- { return ", y compris les membres hérités :"; }
+ virtual QCString trIncludingInheritedMembers()
+ { return ", y compris les membres hérités :"; }
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
- virtual QCString trGeneratedAutomatically(const char *s)
- { QCString result="Généré automatiquement par Doxygen";
- if (s) result+=(QCString)" pour "+s;
- result+=" à partir du code source.";
- return result;
- }
+ virtual QCString trGeneratedAutomatically(const char *s)
+ { QCString result="Généré automatiquement par Doxygen";
+ if (s) result+=(QCString)" pour "+s;
+ result+=" à partir du code source.";
+ return result;
+ }
/*! put after an enum name in the list of all members */
- virtual QCString trEnumName()
- { return "énumération"; }
+ virtual QCString trEnumName()
+ { return "énumération"; }
/*! put after an enum value in the list of all members */
- virtual QCString trEnumValue()
- { return "valeur énumérée"; }
+ virtual QCString trEnumValue()
+ { return "valeur énumérée"; }
/*! put after an undocumented member in the list of all members */
- virtual QCString trDefinedIn()
- { return "défini dans"; }
+ virtual QCString trDefinedIn()
+ { return "défini dans"; }
// quick reference sections
/*! This is put above each page as a link to the list of all groups of
* compounds or files (see the \\group command).
*/
- virtual QCString trModules()
- { return "Modules"; }
+ virtual QCString trModules()
+ { return "Modules"; }
/*! This is put above each page as a link to the class hierarchy */
- virtual QCString trClassHierarchy()
- { return "Hiérarchie des classes"; }
+ virtual QCString trClassHierarchy()
+ { return "Hiérarchie des classes"; }
/*! This is put above each page as a link to the list of annotated classes */
- virtual QCString trCompoundList()
+ virtual QCString trCompoundList()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Structures de données";
- }
- else
- {
- return "Liste des classes";
- }
+ return "Structures de données";
}
+ else
+ {
+ return "Liste des classes";
+ }
+ }
/*! This is put above each page as a link to the list of documented files */
- virtual QCString trFileList()
- { return "Liste des fichiers"; }
+ virtual QCString trFileList()
+ { return "Liste des fichiers"; }
/*! This is put above each page as a link to all members of compounds. */
- virtual QCString trCompoundMembers()
+ virtual QCString trCompoundMembers()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Champs de donnée";
- }
- else
- {
- return "Membres de classe";
- }
+ return "Champs de donnée";
}
+ else
+ {
+ return "Membres de classe";
+ }
+ }
/*! This is put above each page as a link to all members of files. */
- virtual QCString trFileMembers()
+ virtual QCString trFileMembers()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Variables globale";
- }
- else
- {
- return "Membres de fichier";
- }
+ return "Variables globale";
}
+ else
+ {
+ return "Membres de fichier";
+ }
+ }
/*! This is put above each page as a link to all related pages. */
- virtual QCString trRelatedPages()
- { return "Pages associées"; }
+ virtual QCString trRelatedPages()
+ { return "Pages associées"; }
/*! This is put above each page as a link to all examples. */
- virtual QCString trExamples()
- { return "Exemples"; }
+ virtual QCString trExamples()
+ { return "Exemples"; }
/*! This is put above each page as a link to the search engine. */
- virtual QCString trSearch()
- { return "Recherche"; }
+ virtual QCString trSearch()
+ { return "Recherche"; }
/*! This is an introduction to the class hierarchy. */
- virtual QCString trClassHierarchyDescription()
- { return "Cette liste d'héritage est classée "
- "approximativement par ordre alphabétique :";
+ virtual QCString trClassHierarchyDescription()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_VHDL))
+ {
+ return "Liste hiérarchique de toutes les entités :";
}
-
- /*! This is an introduction to the list with all files. */
- virtual QCString trFileListDescription(bool extractAll)
+ else
{
- QCString result="Liste de tous les fichiers ";
- if (!extractAll) result+="documentés ";
- result+="avec une brève description :";
- return result;
+ return "Cette liste d'héritage est classée "
+ "approximativement par ordre alphabétique :";
}
+ }
+
+ /*! This is an introduction to the list with all files. */
+ virtual QCString trFileListDescription(bool extractAll)
+ {
+ QCString result="Liste de tous les fichiers ";
+ if (!extractAll) result+="documentés ";
+ result+="avec une brève description :";
+ return result;
+ }
/*! This is an introduction to the annotated compound list. */
- virtual QCString trCompoundListDescription()
+ virtual QCString trCompoundListDescription()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
-
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Liste des structures de données avec une brève description :";
- }
- else
- {
- return "Liste des classes, structures, "
+ return "Liste des structures de données avec une brève description :";
+ }
+ else if (Config_getBool(OPTIMIZE_OUTPUT_SLICE))
+ {
+ return "Liste des classes avec une brève description :";
+ }
+ else
+ {
+ return "Liste des classes, structures, "
"unions et interfaces avec une brève description :";
- }
}
+ }
/*! This is an introduction to the page with all class members. */
- virtual QCString trCompoundMembersDescription(bool extractAll)
+ virtual QCString trCompoundMembersDescription(bool extractAll)
+ {
+ QCString result="Liste de tous les ";
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ result+="champs de structure et d'union ";
+ }
+ else
{
- QCString result="Liste de tous les ";
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- result+="champs de structure et d'union ";
- }
- else
- {
- result+="membres de classe ";
- }
- if (!extractAll)
- {
- result+="documentés ";
- }
- result+="avec des liens vers ";
- if (!extractAll)
- {
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- result+="la documentation de structure/union de chaque champ :";
- }
- else
- {
- result+="la documentation de classe de chaque membre :";
- }
- }
- else
- {
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- result+="les structures/unions auxquelles ils appartiennent :";
- }
- else
- {
- result+="les classes auxquelles ils appartiennent :";
- }
- }
- return result;
+ result+="membres de classe ";
+ }
+ if (!extractAll)
+ {
+ result+="documentés ";
}
+ result+="avec des liens vers ";
+ if (!extractAll)
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ result+="la documentation de structure/union de chaque champ :";
+ }
+ else
+ {
+ result+="la documentation de classe de chaque membre :";
+ }
+ }
+ else
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ result+="les structures/unions auxquelles ils appartiennent :";
+ }
+ else
+ {
+ result+="les classes auxquelles ils appartiennent :";
+ }
+ }
+ return result;
+ }
/*! This is an introduction to the page with all file members. */
- virtual QCString trFileMembersDescription(bool extractAll)
+ virtual QCString trFileMembersDescription(bool extractAll)
+ {
+ QCString result="Liste ";
+
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ result+="de toutes les fonctions, variables, macros, enumérations, et définitions de type ";
+ }
+ else
{
- QCString result="Liste ";
-
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- result+="de toutes les fonctions, variables, macros, enumérations, et définitions de type ";
- }
- else
- {
- result+="de tous les membres de fichier ";
- }
- if (!extractAll) result+="documentés ";
- result+="avec des liens vers ";
- if (extractAll)
- result+="les fichiers auxquels ils appartiennent :";
- else
- result+="la documentation :";
- return result;
+ result+="de tous les membres de fichier ";
}
+ if (!extractAll) result+="documentés ";
+ result+="avec des liens vers ";
+ if (extractAll)
+ result+="les fichiers auxquels ils appartiennent :";
+ else
+ result+="la documentation :";
+ return result;
+ }
/*! This is an introduction to the page with the list of all examples */
- virtual QCString trExamplesDescription()
- { return "Liste de tous les exemples :"; }
+ virtual QCString trExamplesDescription()
+ { return "Liste de tous les exemples :"; }
/*! This is an introduction to the page with the list of related pages */
- virtual QCString trRelatedPagesDescription()
- { return "Liste de toutes les pages de documentation associées :"; }
+ virtual QCString trRelatedPagesDescription()
+ { return "Liste de toutes les pages de documentation associées :"; }
/*! This is an introduction to the page with the list of class/file groups */
- virtual QCString trModulesDescription()
- { return "Liste de tous les modules :"; }
+ virtual QCString trModulesDescription()
+ { return "Liste de tous les modules :"; }
/*! This is used in HTML as the title of index.html. */
- virtual QCString trDocumentation()
- { return "Documentation"; }
+ virtual QCString trDocumentation()
+ { return "Documentation"; }
/*! This is used in LaTeX as the title of the chapter with the
* index of all groups.
*/
- virtual QCString trModuleIndex()
- { return "Index des modules"; }
+ virtual QCString trModuleIndex()
+ { return "Index des modules"; }
/*! This is used in LaTeX as the title of the chapter with the
* class hierarchy.
*/
- virtual QCString trHierarchicalIndex()
- { return "Index hiérarchique"; }
+ virtual QCString trHierarchicalIndex()
+ { return "Index hiérarchique"; }
/*! This is used in LaTeX as the title of the chapter with the
* annotated compound index.
*/
- virtual QCString trCompoundIndex()
+ virtual QCString trCompoundIndex()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
+ {
+ return "Index des structures de données";
+ }
+ else
{
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Index des structures de données";
- }
- else
- {
- return "Index des classes";
- }
+ return "Index des classes";
}
+ }
/*! This is used in LaTeX as the title of the chapter with the
* list of all files.
*/
- virtual QCString trFileIndex()
- { return "Index des fichiers"; }
+ virtual QCString trFileIndex()
+ { return "Index des fichiers"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all groups.
*/
- virtual QCString trModuleDocumentation()
- { return "Documentation des modules"; }
+ virtual QCString trModuleDocumentation()
+ { return "Documentation des modules"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all classes, structs and unions.
*/
- virtual QCString trClassDocumentation()
+ virtual QCString trClassDocumentation()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Documentation des structures de données";
- }
- else
- {
- return "Documentation des classes";
- }
+ return "Documentation des structures de données";
}
+ else
+ {
+ return "Documentation des classes";
+ }
+ }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all files.
*/
- virtual QCString trFileDocumentation()
- { return "Documentation des fichiers"; }
+ virtual QCString trFileDocumentation()
+ { return "Documentation des fichiers"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all examples.
*/
- virtual QCString trExampleDocumentation()
- { return "Documentation des exemples"; }
+ virtual QCString trExampleDocumentation()
+ { return "Documentation des exemples"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all related pages.
*/
- virtual QCString trPageDocumentation()
- { return "Documentation des pages associées"; }
+ virtual QCString trPageDocumentation()
+ { return "Documentation des pages associées"; }
/*! This is used in LaTeX as the title of the document */
- virtual QCString trReferenceManual()
- { return "Manuel de référence"; }
+ virtual QCString trReferenceManual()
+ { return "Manuel de référence"; }
/*! This is used in the documentation of a file as a header before the
* list of defines
*/
- virtual QCString trDefines()
- { return "Macros"; }
+ virtual QCString trDefines()
+ { return "Macros"; }
/*! This is used in the documentation of a file as a header before the
* list of typedefs
*/
- virtual QCString trTypedefs()
- { return "Définitions de type"; }
+ virtual QCString trTypedefs()
+ { return "Définitions de type"; }
/*! This is used in the documentation of a file as a header before the
* list of enumerations
*/
- virtual QCString trEnumerations()
- { return "Énumérations"; }
+ virtual QCString trEnumerations()
+ { return "Énumérations"; }
/*! This is used in the documentation of a file as a header before the
* list of (global) functions
*/
- virtual QCString trFunctions()
- { return "Fonctions"; }
+ virtual QCString trFunctions()
+ { return "Fonctions"; }
/*! This is used in the documentation of a file as a header before the
* list of (global) variables
*/
- virtual QCString trVariables()
- { return "Variables"; }
+ virtual QCString trVariables()
+ { return "Variables"; }
/*! This is used in the documentation of a file as a header before the
* list of (global) variables
*/
- virtual QCString trEnumerationValues()
- { return "Valeurs énumérées"; }
+ virtual QCString trEnumerationValues()
+ { return "Valeurs énumérées"; }
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
- virtual QCString trDefineDocumentation()
- { return "Documentation des macros"; }
+ virtual QCString trDefineDocumentation()
+ { return "Documentation des macros"; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for typedefs
*/
- virtual QCString trTypedefDocumentation()
- { return "Documentation des définitions de type"; }
+ virtual QCString trTypedefDocumentation()
+ { return "Documentation des définitions de type"; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration types
*/
- virtual QCString trEnumerationTypeDocumentation()
- { return "Documentation du type de l'énumération"; }
+ virtual QCString trEnumerationTypeDocumentation()
+ { return "Documentation du type de l'énumération"; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
*/
- virtual QCString trFunctionDocumentation()
- { return "Documentation des fonctions"; }
+ virtual QCString trFunctionDocumentation()
+ { return "Documentation des fonctions"; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for variables
*/
- virtual QCString trVariableDocumentation()
- { return "Documentation des variables"; }
+ virtual QCString trVariableDocumentation()
+ { return "Documentation des variables"; }
/*! This is used in the documentation of a file/namespace/group before
* the list of links to documented compounds
*/
- virtual QCString trCompounds()
+ virtual QCString trCompounds()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Structures de données";
- }
- else
- {
- return "Classes";
- }
+ return "Structures de données";
}
+ else
+ {
+ return "Classes";
+ }
+ }
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
- virtual QCString trGeneratedAt(const char *date,const char *projName)
- {
- QCString result=(QCString)"Généré le "+date;
- if (projName) result+=(QCString)" pour "+projName;
- result+=(QCString)" par";
- return result;
- }
+ virtual QCString trGeneratedAt(const char *date,const char *projName)
+ {
+ QCString result=(QCString)"Généré le "+date;
+ if (projName) result+=(QCString)" pour "+projName;
+ result+=(QCString)" par";
+ return result;
+ }
/*! this text is put before a class diagram */
- virtual QCString trClassDiagram(const char *clName)
- {
- return (QCString)"Graphe d'héritage de "+clName+":";
- }
+ virtual QCString trClassDiagram(const char *clName)
+ {
+ return (QCString)"Graphe d'héritage de "+clName+":";
+ }
/*! this text is generated when the \\internal command is used. */
- virtual QCString trForInternalUseOnly()
- { return "Pour un usage interne uniquement."; }
+ virtual QCString trForInternalUseOnly()
+ { return "Pour un usage interne uniquement."; }
/*! this text is generated when the \\warning command is used. */
- virtual QCString trWarning()
- { return "Avertissement"; }
+ virtual QCString trWarning()
+ { return "Avertissement"; }
/*! this text is generated when the \\version command is used. */
- virtual QCString trVersion()
- { return "Version"; }
+ virtual QCString trVersion()
+ { return "Version"; }
/*! this text is generated when the \\date command is used. */
- virtual QCString trDate()
- { return "Date"; }
+ virtual QCString trDate()
+ { return "Date"; }
/*! this text is generated when the \\return command is used. */
- virtual QCString trReturns()
- { return "Renvoie"; }
+ virtual QCString trReturns()
+ { return "Renvoie"; }
/*! this text is generated when the \\sa command is used. */
- virtual QCString trSeeAlso()
- { return "Voir également"; }
+ virtual QCString trSeeAlso()
+ { return "Voir également"; }
/*! this text is generated when the \\param command is used. */
- virtual QCString trParameters()
- { return "Paramètres"; }
+ virtual QCString trParameters()
+ { return "Paramètres"; }
/*! this text is generated when the \\exception command is used. */
- virtual QCString trExceptions()
- { return "Exceptions"; }
+ virtual QCString trExceptions()
+ { return "Exceptions"; }
/*! this text is used in the title page of a LaTeX document. */
- virtual QCString trGeneratedBy()
- { return "Généré par"; }
+ virtual QCString trGeneratedBy()
+ { return "Généré par"; }
- //////////////////////////////////////////////////////////////////////////
- // new since 0.49-990307
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990307
+//////////////////////////////////////////////////////////////////////////
/*! used as the title of page containing all the index of all namespaces. */
- virtual QCString trNamespaceList()
- { return "Liste des espaces de nommage"; }
+ virtual QCString trNamespaceList()
+ { return "Liste des espaces de nommage"; }
/*! used as an introduction to the namespace list */
- virtual QCString trNamespaceListDescription(bool extractAll)
- {
- QCString result="Liste de tous les espaces de nommage ";
- if (!extractAll) result+="documentés ";
- result+="avec une brève description:";
- return result;
- }
+ virtual QCString trNamespaceListDescription(bool extractAll)
+ {
+ QCString result="Liste de tous les espaces de nommage ";
+ if (!extractAll) result+="documentés ";
+ result+="avec une brève description:";
+ return result;
+ }
/*! used in the class documentation as a header before the list of all
* friends of a class
*/
- virtual QCString trFriends()
- { return "Amis"; }
+ virtual QCString trFriends()
+ { return "Amis"; }
- //////////////////////////////////////////////////////////////////////////
- // new since 0.49-990405
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990405
+//////////////////////////////////////////////////////////////////////////
/*! used in the class documentation as a header before the list of all
* related classes
*/
- virtual QCString trRelatedFunctionDocumentation()
- { return "Documentation des fonctions amies et associées"; }
+ virtual QCString trRelatedFunctionDocumentation()
+ { return "Documentation des fonctions amies et associées"; }
- //////////////////////////////////////////////////////////////////////////
- // new since 0.49-990425
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990425
+//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
- virtual QCString trCompoundReference(const char *clName,
+ virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType,
bool isTemplate)
+ {
+ QCString result="Référence ";
+ if (isTemplate) result+="du modèle ";
+ result+="de ";
+ switch(compType)
{
- QCString result="Référence ";
- if (isTemplate) result+="du modèle ";
- result+="de ";
- switch(compType)
- {
- case ClassDef::Class: result+="la classe "; break;
- case ClassDef::Struct: result+="la structure "; break;
- case ClassDef::Union: result+="l'union "; break;
- case ClassDef::Interface: result+="l'interface "; break;
- case ClassDef::Protocol: result+="le protocol "; break;
- case ClassDef::Category: result+="la catégorie "; break;
- case ClassDef::Exception: result+="l'exception "; break;
- default: break;
- }
- result+=(QCString)clName;
- return result;
+ case ClassDef::Class: result+="la classe "; break;
+ case ClassDef::Struct: result+="la structure "; break;
+ case ClassDef::Union: result+="l'union "; break;
+ case ClassDef::Interface: result+="l'interface "; break;
+ case ClassDef::Protocol: result+="le protocol "; break;
+ case ClassDef::Category: result+="la catégorie "; break;
+ case ClassDef::Exception: result+="l'exception "; break;
+ default: break;
}
+ result+=(QCString)clName;
+ return result;
+ }
/*! used as the title of the HTML page of a file */
- virtual QCString trFileReference(const char *fileName)
- {
- QCString result= "Référence du fichier ";
- result+=fileName;
- return result;
- }
+ virtual QCString trFileReference(const char *fileName)
+ {
+ QCString result= "Référence du fichier ";
+ result+=fileName;
+ return result;
+ }
/*! used as the title of the HTML page of a namespace */
- virtual QCString trNamespaceReference(const char *namespaceName)
- {
- QCString result= "Référence de l'espace de nommage ";
- result+=namespaceName;
- return result;
- }
+ virtual QCString trNamespaceReference(const char *namespaceName)
+ {
+ QCString result= "Référence de l'espace de nommage ";
+ result+=namespaceName;
+ return result;
+ }
- virtual QCString trPublicMembers()
- { return "Fonctions membres publiques"; }
- virtual QCString trPublicSlots()
- { return "Connecteurs publics"; }
- virtual QCString trSignals()
- { return "Signaux"; }
- virtual QCString trStaticPublicMembers()
- { return "Fonctions membres publiques statiques"; }
- virtual QCString trProtectedMembers()
- { return "Fonctions membres protégées"; }
- virtual QCString trProtectedSlots()
- { return "Connecteurs protégés"; }
- virtual QCString trStaticProtectedMembers()
- { return "Fonctions membres protégées statiques"; }
- virtual QCString trPrivateMembers()
- { return "Fonctions membres privées"; }
- virtual QCString trPrivateSlots()
- { return "Connecteurs privés"; }
- virtual QCString trStaticPrivateMembers()
- { return "Fonctions membres privées statiques"; }
+ virtual QCString trPublicMembers()
+ { return "Fonctions membres publiques"; }
+ virtual QCString trPublicSlots()
+ { return "Connecteurs publics"; }
+ virtual QCString trSignals()
+ { return "Signaux"; }
+ virtual QCString trStaticPublicMembers()
+ { return "Fonctions membres publiques statiques"; }
+ virtual QCString trProtectedMembers()
+ { return "Fonctions membres protégées"; }
+ virtual QCString trProtectedSlots()
+ { return "Connecteurs protégés"; }
+ virtual QCString trStaticProtectedMembers()
+ { return "Fonctions membres protégées statiques"; }
+ virtual QCString trPrivateMembers()
+ { return "Fonctions membres privées"; }
+ virtual QCString trPrivateSlots()
+ { return "Connecteurs privés"; }
+ virtual QCString trStaticPrivateMembers()
+ { return "Fonctions membres privées statiques"; }
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
*/
- virtual QCString trWriteList(int numEntries)
- {
- QCString result;
- int i;
+ virtual QCString trWriteList(int numEntries)
+ {
+ QCString result;
+ int i;
// the inherits list contain `numEntries' classes
- for (i=0;i<numEntries;i++)
- {
- // use generateMarker to generate placeholders for the class links!
- result+=generateMarker(i); // generate marker for entry i in the list
+ for (i=0;i<numEntries;i++)
+ {
+ // use generateMarker to generate placeholders for the class links!
+ result+=generateMarker(i); // generate marker for entry i in the list
// (order is left to right)
- if (i!=numEntries-1) // not the last entry, so we need a separator
- {
- if (i<numEntries-2) // not the fore last entry
- result+=", ";
- else // the fore last entry
- result+=", et ";
- }
- }
- return result;
+ if (i!=numEntries-1) // not the last entry, so we need a separator
+ {
+ if (i<numEntries-2) // not the fore last entry
+ result+=", ";
+ else // the fore last entry
+ result+=", et ";
+ }
}
+ return result;
+ }
/*! used in class documentation to produce a list of base classes,
* if class diagrams are disabled.
*/
- virtual QCString trInheritsList(int numEntries)
- {
- return "Est dérivée de "+trWriteList(numEntries)+".";
- }
+ virtual QCString trInheritsList(int numEntries)
+ {
+ return "Est dérivée de "+trWriteList(numEntries)+".";
+ }
/*! used in class documentation to produce a list of super classes,
* if class diagrams are disabled.
*/
- virtual QCString trInheritedByList(int numEntries)
- {
- return "Dérivée par "+trWriteList(numEntries)+".";
- }
+ virtual QCString trInheritedByList(int numEntries)
+ {
+ return "Dérivée par "+trWriteList(numEntries)+".";
+ }
/*! used in member documentation blocks to produce a list of
* members that are hidden by this one.
*/
- virtual QCString trReimplementedFromList(int numEntries)
- {
- return "Réimplémentée à partir de "+trWriteList(numEntries)+".";
- }
+ virtual QCString trReimplementedFromList(int numEntries)
+ {
+ return "Réimplémentée à partir de "+trWriteList(numEntries)+".";
+ }
/*! used in member documentation blocks to produce a list of
* all member that overwrite the implementation of this member.
*/
- virtual QCString trReimplementedInList(int numEntries)
- {
- return "Réimplémentée dans "+trWriteList(numEntries)+".";
- }
+ virtual QCString trReimplementedInList(int numEntries)
+ {
+ return "Réimplémentée dans "+trWriteList(numEntries)+".";
+ }
/*! This is put above each page as a link to all members of namespaces. */
- virtual QCString trNamespaceMembers()
- { return "Membres de l'espace de nommage"; }
+ virtual QCString trNamespaceMembers()
+ { return "Membres de l'espace de nommage"; }
/*! This is an introduction to the page with all namespace members */
- virtual QCString trNamespaceMemberDescription(bool extractAll)
- {
- QCString result="Liste de tous les membres des espaces de nommage ";
- if (!extractAll) result+="documentés ";
- result+="avec des liens vers ";
- if (extractAll)
- result+="la documentation de namespace de chaque membre :";
- else
- result+="les espaces de nommage auxquels ils appartiennent :";
- return result;
- }
+ virtual QCString trNamespaceMemberDescription(bool extractAll)
+ {
+ QCString result="Liste de tous les membres des espaces de nommage ";
+ if (!extractAll) result+="documentés ";
+ result+="avec des liens vers ";
+ if (extractAll)
+ result+="la documentation de namespace de chaque membre :";
+ else
+ result+="les espaces de nommage auxquels ils appartiennent :";
+ return result;
+ }
/*! This is used in LaTeX as the title of the chapter with the
* index of all namespaces.
*/
- virtual QCString trNamespaceIndex()
- { return "Index des espaces de nommage"; }
+ virtual QCString trNamespaceIndex()
+ { return "Index des espaces de nommage"; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all namespaces.
*/
- virtual QCString trNamespaceDocumentation()
- { return "Documentation des espaces de nommage"; }
+ virtual QCString trNamespaceDocumentation()
+ { return "Documentation des espaces de nommage"; }
- //////////////////////////////////////////////////////////////////////////
- // new since 0.49-990522
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990522
+//////////////////////////////////////////////////////////////////////////
/*! This is used in the documentation before the list of all
* namespaces in a file.
*/
- virtual QCString trNamespaces()
- { return "Espaces de nommage"; }
+ virtual QCString trNamespaces()
+ { return "Espaces de nommage"; }
- //////////////////////////////////////////////////////////////////////////
- // new since 0.49-990728
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990728
+//////////////////////////////////////////////////////////////////////////
/*! This is put at the bottom of a class documentation page and is
* followed by a list of files that were used to generate the page.
*/
- virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
+ virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
- { // here s is one of " Class", " Struct" or " Union"
+ { // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
- bool female = true;
- QCString result=(QCString)"La documentation de ";
- switch(compType)
- {
- case ClassDef::Class: result+="cette classe"; break;
- case ClassDef::Struct: result+="cette structure"; break;
- case ClassDef::Union: result+="cette union"; break;
- case ClassDef::Interface: result+="cette interface"; break;
- case ClassDef::Protocol: result+="ce protocol"; female = false; break;
- case ClassDef::Category: result+="cette catégorie"; break;
- case ClassDef::Exception: result+="cette exception"; break;
- default: break;
- }
- if (female) result+= " a été générée à partir ";
- else result+=" a été généré à partir ";
- if (single) result+="du fichier suivant :";
- else result+="des fichiers suivants :";
- return result;
+ bool feminine = true;
+ QCString result=(QCString)"La documentation de ";
+ switch(compType)
+ {
+ case ClassDef::Class: result+="cette classe"; break;
+ case ClassDef::Struct: result+="cette structure"; break;
+ case ClassDef::Union: result+="cette union"; break;
+ case ClassDef::Interface: result+="cette interface"; break;
+ case ClassDef::Protocol: result+="ce protocol"; feminine = false; break;
+ case ClassDef::Category: result+="cette catégorie"; break;
+ case ClassDef::Exception: result+="cette exception"; break;
+ default: break;
}
+ if (feminine) result+= " a été générée à partir ";
+ else result+=" a été généré à partir ";
+ if (feminine) result+="du fichier suivant :";
+ else result+="des fichiers suivants :";
+ return result;
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 0.49-990901
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-990901
+//////////////////////////////////////////////////////////////////////////
/*! This is used as the heading text for the retval command. */
- virtual QCString trReturnValues()
- { return "Valeurs retournées"; }
+ virtual QCString trReturnValues()
+ { return "Valeurs retournées"; }
/*! This is in the (quick) index as a link to the main page (index.html)
*/
- virtual QCString trMainPage()
- { return "Page principale"; }
+ virtual QCString trMainPage()
+ { return "Page principale"; }
/*! This is used in references to page that are put in the LaTeX
* documentation. It should be an abbreviation of the word page.
*/
- virtual QCString trPageAbbreviation()
- { return "p."; }
+ virtual QCString trPageAbbreviation()
+ { return "p."; }
- //////////////////////////////////////////////////////////////////////////
- // new since 0.49-991003
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-991003
+//////////////////////////////////////////////////////////////////////////
- virtual QCString trDefinedAtLineInSourceFile()
- {
- return "Définition à la ligne @0 du fichier @1.";
- }
- virtual QCString trDefinedInSourceFile()
- {
- return "Définition dans le fichier @0.";
- }
+ virtual QCString trDefinedAtLineInSourceFile()
+ {
+ return "Définition à la ligne @0 du fichier @1.";
+ }
+ virtual QCString trDefinedInSourceFile()
+ {
+ return "Définition dans le fichier @0.";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 0.49-991205
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 0.49-991205
+//////////////////////////////////////////////////////////////////////////
- virtual QCString trDeprecated()
- {
- return "Obsolète";
- }
+ virtual QCString trDeprecated()
+ {
+ return "Obsolète";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.0.0
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.0.0
+//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
- virtual QCString trCollaborationDiagram(const char *clName)
- {
- return (QCString)"Graphe de collaboration de "+clName+":";
- }
+ virtual QCString trCollaborationDiagram(const char *clName)
+ {
+ return (QCString)"Graphe de collaboration de "+clName+":";
+ }
/*! this text is put before an include dependency graph */
- virtual QCString trInclDepGraph(const char *fName)
- {
- return (QCString)"Graphe des dépendances par inclusion de "+fName+":";
- }
+ virtual QCString trInclDepGraph(const char *fName)
+ {
+ return (QCString)"Graphe des dépendances par inclusion de "+fName+":";
+ }
/*! header that is put before the list of constructor/destructors. */
- virtual QCString trConstructorDocumentation()
- {
- return "Documentation des constructeurs et destructeur";
- }
+ virtual QCString trConstructorDocumentation()
+ {
+ return "Documentation des constructeurs et destructeur";
+ }
/*! Used in the file documentation to point to the corresponding sources. */
- virtual QCString trGotoSourceCode()
- {
- return "Aller au code source de ce fichier.";
- }
+ virtual QCString trGotoSourceCode()
+ {
+ return "Aller au code source de ce fichier.";
+ }
/*! Used in the file sources to point to the corresponding documentation. */
- virtual QCString trGotoDocumentation()
- {
- return "Aller à la documentation de ce fichier.";
- }
+ virtual QCString trGotoDocumentation()
+ {
+ return "Aller à la documentation de ce fichier.";
+ }
/*! Text for the \\pre command */
- virtual QCString trPrecondition()
- {
- return "Précondition";
- }
+ virtual QCString trPrecondition()
+ {
+ return "Précondition";
+ }
/*! Text for the \\post command */
- virtual QCString trPostcondition()
- {
- return "Postcondition";
- }
+ virtual QCString trPostcondition()
+ {
+ return "Postcondition";
+ }
/*! Text for the \\invariant command */
- virtual QCString trInvariant()
- {
- return "Invariant";
- }
+ virtual QCString trInvariant()
+ {
+ return "Invariant";
+ }
/*! Text shown before a multi-line variable/enum initialization */
- virtual QCString trInitialValue()
- {
- return "Valeur initiale :";
- }
+ virtual QCString trInitialValue()
+ {
+ return "Valeur initiale :";
+ }
/*! Text used the source code in the file index */
- virtual QCString trCode()
- {
- return "code";
- }
- virtual QCString trGraphicalHierarchy()
- {
- return "Graphe hiérarchique des classes";
- }
- virtual QCString trGotoGraphicalHierarchy()
- {
- return "Aller au graphe hiérarchique des classes";
- }
- virtual QCString trGotoTextualHierarchy()
- {
- return "Aller à la hiérarchie des classes en mode texte";
- }
- virtual QCString trPageIndex()
- {
- return "Index des pages";
- }
+ virtual QCString trCode()
+ {
+ return "code";
+ }
+ virtual QCString trGraphicalHierarchy()
+ {
+ return "Graphe hiérarchique des classes";
+ }
+ virtual QCString trGotoGraphicalHierarchy()
+ {
+ return "Aller au graphe hiérarchique des classes";
+ }
+ virtual QCString trGotoTextualHierarchy()
+ {
+ return "Aller à la hiérarchie des classes en mode texte";
+ }
+ virtual QCString trPageIndex()
+ {
+ return "Index des pages";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.1.0
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.0
+//////////////////////////////////////////////////////////////////////////
- virtual QCString trNote()
- {
- return "Note";
- }
- virtual QCString trPublicTypes()
- {
- return "Types publics";
- }
- virtual QCString trPublicAttribs()
- {
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Champs de données";
- }
- else
- {
- return "Attributs publics";
- }
- }
- virtual QCString trStaticPublicAttribs()
- {
- return "Attributs publics statiques";
- }
- virtual QCString trProtectedTypes()
- {
- return "Types protégés";
- }
- virtual QCString trProtectedAttribs()
- {
- return "Attributs protégés";
- }
- virtual QCString trStaticProtectedAttribs()
- {
- return "Attributs protégés statiques";
- }
- virtual QCString trPrivateTypes()
- {
- return "Types privés";
- }
- virtual QCString trPrivateAttribs()
+ virtual QCString trNote()
+ {
+ return "Note";
+ }
+ virtual QCString trPublicTypes()
+ {
+ return "Types publics";
+ }
+ virtual QCString trPublicAttribs()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- return "Attributs privés";
+ return "Champs de données";
}
- virtual QCString trStaticPrivateAttribs()
+ else
{
- return "Attributs privés statiques";
+ return "Attributs publics";
}
+ }
+ virtual QCString trStaticPublicAttribs()
+ {
+ return "Attributs publics statiques";
+ }
+ virtual QCString trProtectedTypes()
+ {
+ return "Types protégés";
+ }
+ virtual QCString trProtectedAttribs()
+ {
+ return "Attributs protégés";
+ }
+ virtual QCString trStaticProtectedAttribs()
+ {
+ return "Attributs protégés statiques";
+ }
+ virtual QCString trPrivateTypes()
+ {
+ return "Types privés";
+ }
+ virtual QCString trPrivateAttribs()
+ {
+ return "Attributs privés";
+ }
+ virtual QCString trStaticPrivateAttribs()
+ {
+ return "Attributs privés statiques";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.1.3
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.3
+//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a \\todo item */
- virtual QCString trTodo()
- {
- return "A faire";
- }
+ virtual QCString trTodo()
+ {
+ return "A faire";
+ }
/*! Used as the header of the todo list */
- virtual QCString trTodoList()
- {
- return "Liste des choses à faire";
- }
+ virtual QCString trTodoList()
+ {
+ return "Liste des choses à faire";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.1.4
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.4
+//////////////////////////////////////////////////////////////////////////
- virtual QCString trReferencedBy()
- {
- return "Référencé par";
- }
- virtual QCString trRemarks()
- {
- return "Remarques";
- }
- virtual QCString trAttention()
- {
- return "Attention";
- }
- virtual QCString trInclByDepGraph()
- {
- return "Ce graphe montre quels fichiers incluent directement "
+ virtual QCString trReferencedBy()
+ {
+ return "Référencé par";
+ }
+ virtual QCString trRemarks()
+ {
+ return "Remarques";
+ }
+ virtual QCString trAttention()
+ {
+ return "Attention";
+ }
+ virtual QCString trInclByDepGraph()
+ {
+ return "Ce graphe montre quels fichiers incluent directement "
"ou indirectement ce fichier :";
- }
- virtual QCString trSince()
- {
- return "Depuis";
- }
+ }
+ virtual QCString trSince()
+ {
+ return "Depuis";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.1.5
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.1.5
+//////////////////////////////////////////////////////////////////////////
/*! title of the graph legend page */
- virtual QCString trLegendTitle()
- {
- return "Légende du graphe";
- }
+ virtual QCString trLegendTitle()
+ {
+ return "Légende du graphe";
+ }
/*! page explaining how the dot graph's should be interpreted
* The %A in the text below are to prevent link to classes called "A".
*/
- virtual QCString trLegendDocs()
- {
- return
- "Cette page explique comment interpréter les graphes générés "
- "par doxygen.<p>\n"
- "Considérez l'exemple suivant :\n"
- "\\code\n"
- "/*! Classe invisible à cause d'une troncature */\n"
- "class Invisible { };\n\n"
- "/*! Classe tronquée, la relation d'héritage est masquée */\n"
- "class Truncated : public Invisible { };\n\n"
- "/*! Classe non documentée avec des commentaires Doxygen */\n"
- "class Undocumented { };\n\n"
- "/*! Classe dérivée par héritage public */\n"
- "class PublicBase : public Truncated { };\n\n"
- "/*! Un modèle de classe */\n"
- "template<class T> class Templ { };\n\n"
- "/*! Classe dérivée par héritage protégé */\n"
- "class ProtectedBase { };\n\n"
- "/*! Classe dérivée par héritage privé */\n"
- "class PrivateBase { };\n\n"
- "/*! Classe utilisée par la classe dérivée */\n"
- "class Used { };\n\n"
- "/*! Super-classe qui hérite de plusieurs autres classes */\n"
- "class Inherited : public PublicBase,\n"
- " protected ProtectedBase,\n"
- " private PrivateBase,\n"
- " public Undocumented,\n"
- " public Templ<int>\n"
- "{\n"
- " private:\n"
- " Used *m_usedClass;\n"
- "};\n"
- "\\endcode\n"
- "Cela aboutira au graphe suivant :"
- "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n"
- "<p>\n"
- "Les rectangles du graphe ci-dessus ont la signification suivante :\n"
- "<ul>\n"
- "<li>Un rectangle plein noir représente la structure ou la classe pour laquelle "
- "le graphe est généré.\n"
- "<li>Un rectangle avec un bord noir indique une classe ou une structure documentée.\n"
- "<li>Un rectangle avec un bord gris indique une classe ou une structure non documentée.\n"
- "<li>Un rectangle avec un bord rouge indique une structure ou une classe documentée\n"
- "pour laquelle des relations d'héritage ou de collaboration manquent. Un graphe est "
- "tronqué s'il n'entre pas dans les limites spécifiées."
- "</ul>\n"
- "Les flèches ont la signification suivante :\n"
- "<ul>\n"
- "<li>Une flèche bleu foncé est utilisée pour visualiser une relation d'héritage publique "
- "entre deux classes.\n"
- "<li>Une flèche vert foncé est utilisée pour une relation d'héritage protégée.\n"
- "<li>Une flèche rouge foncé est utilisée pour une relation d'héritage privée.\n"
- "<li>Une flèche violette en pointillés est utilisée si une classe est contenue ou "
- "utilisée par une autre classe. La flèche est étiquetée avec la ou les variable(s) "
- "qui permettent d'accéder à la classe ou structure pointée. \n"
- "<li>Une flèche jaune en pointillés indique une relation entre un modèle d'instance et "
- "le modèle de classe duquel il est instancié. La flèche est étiquetée avec "
- "les paramètres de modèle de l'instance.\n"
- "</ul>\n";
- }
+ virtual QCString trLegendDocs()
+ {
+ return
+ "Cette page explique comment interpréter les graphes générés "
+ "par doxygen.<p>\n"
+ "Considérez l'exemple suivant :\n"
+ "\\code\n"
+ "/*! Classe invisible à cause d'une troncature */\n"
+ "class Invisible { };\n\n"
+ "/*! Classe tronquée, la relation d'héritage est masquée */\n"
+ "class Truncated : public Invisible { };\n\n"
+ "/*! Classe non documentée avec des commentaires Doxygen */\n"
+ "class Undocumented { };\n\n"
+ "/*! Classe dérivée par héritage public */\n"
+ "class PublicBase : public Truncated { };\n\n"
+ "/*! Un modèle de classe */\n"
+ "template<class T> class Templ { };\n\n"
+ "/*! Classe dérivée par héritage protégé */\n"
+ "class ProtectedBase { };\n\n"
+ "/*! Classe dérivée par héritage privé */\n"
+ "class PrivateBase { };\n\n"
+ "/*! Classe utilisée par la classe dérivée */\n"
+ "class Used { };\n\n"
+ "/*! Super-classe qui hérite de plusieurs autres classes */\n"
+ "class Inherited : public PublicBase,\n"
+ " protected ProtectedBase,\n"
+ " private PrivateBase,\n"
+ " public Undocumented,\n"
+ " public Templ<int>\n"
+ "{\n"
+ " private:\n"
+ " Used *m_usedClass;\n"
+ "};\n"
+ "\\endcode\n"
+ "Cela aboutira au graphe suivant :"
+ "<p><center><img alt=\"\" src=\"graph_legend."+getDotImageExtension()+"\"></center></p>\n"
+ "<p>\n"
+ "Les rectangles du graphe ci-dessus ont la signification suivante :\n"
+ "<ul>\n"
+ "<li>Un rectangle plein noir représente la structure ou la classe pour laquelle "
+ "le graphe est généré.\n"
+ "<li>Un rectangle avec un bord noir indique une classe ou une structure documentée.\n"
+ "<li>Un rectangle avec un bord gris indique une classe ou une structure non documentée.\n"
+ "<li>Un rectangle avec un bord rouge indique une structure ou une classe documentée\n"
+ "pour laquelle des relations d'héritage ou de collaboration manquent. Un graphe est "
+ "tronqué s'il n'entre pas dans les limites spécifiées."
+ "</ul>\n"
+ "Les flèches ont la signification suivante :\n"
+ "<ul>\n"
+ "<li>Une flèche bleu foncé est utilisée pour visualiser une relation d'héritage publique "
+ "entre deux classes.\n"
+ "<li>Une flèche vert foncé est utilisée pour une relation d'héritage protégée.\n"
+ "<li>Une flèche rouge foncé est utilisée pour une relation d'héritage privée.\n"
+ "<li>Une flèche violette en pointillés est utilisée si une classe est contenue ou "
+ "utilisée par une autre classe. La flèche est étiquetée avec la ou les variable(s) "
+ "qui permettent d'accéder à la classe ou structure pointée. \n"
+ "<li>Une flèche jaune en pointillés indique une relation entre un modèle d'instance et "
+ "le modèle de classe duquel il est instancié. La flèche est étiquetée avec "
+ "les paramètres de modèle de l'instance.\n"
+ "</ul>\n";
+ }
/*! text for the link to the legend page */
- virtual QCString trLegend()
- {
- return "légende";
- }
+ virtual QCString trLegend()
+ {
+ return "légende";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.0
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.0
+//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a test item */
- virtual QCString trTest()
- {
- return "Test";
- }
+ virtual QCString trTest()
+ {
+ return "Test";
+ }
/*! Used as the header of the test list */
- virtual QCString trTestList()
- {
- return "Liste des tests";
- }
+ virtual QCString trTestList()
+ {
+ return "Liste des tests";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.2
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.2
+//////////////////////////////////////////////////////////////////////////
/*! Used as a section header for IDL properties */
- virtual QCString trProperties()
- {
- return "Propriétés";
- }
+ virtual QCString trProperties()
+ {
+ return "Propriétés";
+ }
/*! Used as a section header for IDL property documentation */
- virtual QCString trPropertyDocumentation()
- {
- return "Documentation des propriétés";
- }
+ virtual QCString trPropertyDocumentation()
+ {
+ return "Documentation des propriétés";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.4
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.4
+//////////////////////////////////////////////////////////////////////////
/*! Used for Java classes in the summary section of Java packages */
- virtual QCString trClasses()
+ virtual QCString trClasses()
+ {
+ if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
{
- if (Config_getBool(OPTIMIZE_OUTPUT_FOR_C))
- {
- return "Structures de données";
- }
- else
- {
- return "Classes";
- }
+ return "Structures de données";
}
- /*! Used as the title of a Java package */
- virtual QCString trPackage(const char *name)
+ else
{
- return (QCString)"Paquetage "+name;
+ return "Classes";
}
+ }
+ /*! Used as the title of a Java package */
+ virtual QCString trPackage(const char *name)
+ {
+ return (QCString)"Paquetage "+name;
+ }
/*! Title of the package index page */
- virtual QCString trPackageList()
- {
- return "Liste des paquetages";
- }
+ virtual QCString trPackageList()
+ {
+ return "Liste des paquetages";
+ }
/*! The description of the package index page */
- virtual QCString trPackageListDescription()
- {
- return "Liste des paquetages avec une brève description (si disponible) :";
- }
+ virtual QCString trPackageListDescription()
+ {
+ return "Liste des paquetages avec une brève description (si disponible) :";
+ }
/*! The link name in the Quick links header for each page */
- virtual QCString trPackages()
- {
- return "Paquetages";
- }
+ virtual QCString trPackages()
+ {
+ return "Paquetages";
+ }
/*! Text shown before a multi-line define */
- virtual QCString trDefineValue()
- {
- return "Valeur :";
- }
+ virtual QCString trDefineValue()
+ {
+ return "Valeur :";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.5
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.5
+//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a \\bug item */
- virtual QCString trBug()
- {
- return "Bogue";
- }
+ virtual QCString trBug()
+ {
+ return "Bogue";
+ }
/*! Used as the header of the bug list */
- virtual QCString trBugList()
- {
- return "Liste des bogues";
- }
+ virtual QCString trBugList()
+ {
+ return "Liste des bogues";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.6
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.6
+//////////////////////////////////////////////////////////////////////////
/*! Used as ansicpg for RTF file
*
@@ -1226,256 +1237,256 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
* </pre>
*
*/
- virtual QCString trRTFansicp()
- {
- return "1252";
- }
+ virtual QCString trRTFansicp()
+ {
+ return "1252";
+ }
/*! Used as ansicpg for RTF fcharset
* \see trRTFansicp() for a table of possible values.
*/
- virtual QCString trRTFCharSet()
- {
- return "0";
- }
+ virtual QCString trRTFCharSet()
+ {
+ return "0";
+ }
/*! Used as header RTF general index */
- virtual QCString trRTFGeneralIndex()
- {
- return "Index";
- }
+ virtual QCString trRTFGeneralIndex()
+ {
+ return "Index";
+ }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trClass(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Classe" : "classe"));
- if (!singular) result+="s";
- return result;
- }
+ virtual QCString trClass(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Classe" : "classe"));
+ if (!singular) result+="s";
+ return result;
+ }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trFile(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Fichier" : "fichier"));
- if (!singular) result+="s";
- return result;
- }
+ virtual QCString trFile(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Fichier" : "fichier"));
+ if (!singular) result+="s";
+ return result;
+ }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trNamespace(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Espace" : "espace"));
- if (!singular) result+="s";
- result+=" de nommage";
- return result;
- }
+ virtual QCString trNamespace(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Espace" : "espace"));
+ if (!singular) result+="s";
+ result+=" de nommage";
+ return result;
+ }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trGroup(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Groupe" : "groupe"));
- if (!singular) result+="s";
- return result;
- }
+ virtual QCString trGroup(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Groupe" : "groupe"));
+ if (!singular) result+="s";
+ return result;
+ }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trPage(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Page" : "page"));
- if (!singular) result+="s";
- return result;
- }
+ virtual QCString trPage(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Page" : "page"));
+ if (!singular) result+="s";
+ return result;
+ }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trMember(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Membre" : "membre"));
- if (!singular) result+="s";
- return result;
- }
+ virtual QCString trMember(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Membre" : "membre"));
+ if (!singular) result+="s";
+ return result;
+ }
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
- virtual QCString trGlobal(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Globa" : "globa"));
- if (!singular) result+="ux(ales)"; else result+="l(e)";
- return result;
- }
+ virtual QCString trGlobal(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Globa" : "globa"));
+ if (!singular) result+="ux(ales)"; else result+="l(e)";
+ return result;
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.7
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.7
+//////////////////////////////////////////////////////////////////////////
/*! This text is generated when the \\author command is used and
* for the author section in man pages. */
- virtual QCString trAuthor(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Auteur" : "auteur"));
- if (!singular) result+="s";
- return result;
- }
+ virtual QCString trAuthor(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Auteur" : "auteur"));
+ if (!singular) result+="s";
+ return result;
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.11
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.11
+//////////////////////////////////////////////////////////////////////////
/*! This text is put before the list of members referenced by a member
*/
- virtual QCString trReferences()
- {
- return "Références";
- }
+ virtual QCString trReferences()
+ {
+ return "Références";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.13
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.13
+//////////////////////////////////////////////////////////////////////////
/*! used in member documentation blocks to produce a list of
* members that are implemented by this one.
*/
- virtual QCString trImplementedFromList(int numEntries)
- {
- return "Implémente "+trWriteList(numEntries)+".";
- }
+ virtual QCString trImplementedFromList(int numEntries)
+ {
+ return "Implémente "+trWriteList(numEntries)+".";
+ }
/*! used in member documentation blocks to produce a list of
* all members that implement this abstract member.
*/
- virtual QCString trImplementedInList(int numEntries)
- {
- return "Implémenté dans "+trWriteList(numEntries)+".";
- }
+ virtual QCString trImplementedInList(int numEntries)
+ {
+ return "Implémenté dans "+trWriteList(numEntries)+".";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.16
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.16
+//////////////////////////////////////////////////////////////////////////
/*! used in RTF documentation as a heading for the Table
* of Contents.
*/
- virtual QCString trRTFTableOfContents()
- {
- return "Table des matières";
- }
+ virtual QCString trRTFTableOfContents()
+ {
+ return "Table des matières";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.17
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.17
+//////////////////////////////////////////////////////////////////////////
/*! Used as the header of the list of item that have been
* flagged deprecated
*/
- virtual QCString trDeprecatedList()
- {
- return "Liste des éléments obsolètes";
- }
+ virtual QCString trDeprecatedList()
+ {
+ return "Liste des éléments obsolètes";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.2.18
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.18
+//////////////////////////////////////////////////////////////////////////
/*! Used as a header for declaration section of the events found in
* a C# program
*/
- virtual QCString trEvents()
- {
- return "Événements";
- }
+ virtual QCString trEvents()
+ {
+ return "Événements";
+ }
/*! Header used for the documentation section of a class' events. */
- virtual QCString trEventDocumentation()
- {
- return "Documentation des événements";
- }
+ virtual QCString trEventDocumentation()
+ {
+ return "Documentation des événements";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.3
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3
+//////////////////////////////////////////////////////////////////////////
/*! Used as a heading for a list of Java class types with package scope.
*/
- virtual QCString trPackageTypes()
- {
- return "Types de paquetage";
- }
+ virtual QCString trPackageTypes()
+ {
+ return "Types de paquetage";
+ }
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
- virtual QCString trPackageMembers()
- {
- return "Fonctions de paquetage";
- }
+ virtual QCString trPackageMembers()
+ {
+ return "Fonctions de paquetage";
+ }
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
- virtual QCString trStaticPackageMembers()
- {
- return "Fonctions statiques de paquetage";
- }
+ virtual QCString trStaticPackageMembers()
+ {
+ return "Fonctions statiques de paquetage";
+ }
/*! Used as a heading for a list of Java class variables with package
* scope.
*/
- virtual QCString trPackageAttribs()
- {
- return "Attributs de paquetage";
- }
+ virtual QCString trPackageAttribs()
+ {
+ return "Attributs de paquetage";
+ }
/*! Used as a heading for a list of static Java class variables with
* package scope.
*/
- virtual QCString trStaticPackageAttribs()
- {
- return "Attributs statiques de paquetage";
- }
+ virtual QCString trStaticPackageAttribs()
+ {
+ return "Attributs statiques de paquetage";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.3.1
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.1
+//////////////////////////////////////////////////////////////////////////
/*! Used in the quick index of a class/file/namespace member list page
* to link to the unfiltered list of all members.
*/
- virtual QCString trAll()
- {
- return "Tout";
- }
+ virtual QCString trAll()
+ {
+ return "Tout";
+ }
/*! Put in front of the call graph for a function. */
- virtual QCString trCallGraph()
- {
- return "Voici le graphe d'appel pour cette fonction :";
- }
+ virtual QCString trCallGraph()
+ {
+ return "Voici le graphe d'appel pour cette fonction :";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.3.3
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.3
+//////////////////////////////////////////////////////////////////////////
/*! This string is used as the title for the page listing the search
* results.
*/
- virtual QCString trSearchResultsTitle()
- {
- return "Résultats de la recherche";
- }
+ virtual QCString trSearchResultsTitle()
+ {
+ return "Résultats de la recherche";
+ }
/*! This string is put just before listing the search results. The
* text can be different depending on the number of documents found.
* Inside the text you can put the special marker $num to insert
@@ -1484,104 +1495,104 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
* value 2 represents 2 or more matches. HTML markup is allowed inside
* the returned string.
*/
- virtual QCString trSearchResults(int numDocuments)
+ virtual QCString trSearchResults(int numDocuments)
+ {
+ if (numDocuments==0)
{
- if (numDocuments==0)
- {
- return "Désolé, aucun document ne correspond à votre requête.";
- }
- else if (numDocuments==1)
- {
- return "Trouvé <b>1</b> document correspondant à votre requête.";
- }
- else
- {
- return "Trouvé <b>$num</b> documents correspondant à votre requête. "
+ return "Désolé, aucun document ne correspond à votre requête.";
+ }
+ else if (numDocuments==1)
+ {
+ return "Trouvé <b>1</b> document correspondant à votre requête.";
+ }
+ else
+ {
+ return "Trouvé <b>$num</b> documents correspondant à votre requête. "
"Classé par ordre de pertinence décroissant.";
- }
}
+ }
/*! This string is put before the list of matched words, for each search
* result. What follows is the list of words that matched the query.
*/
- virtual QCString trSearchMatches()
- {
- return "Correspondances :";
- }
+ virtual QCString trSearchMatches()
+ {
+ return "Correspondances :";
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.3.8
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.8
+//////////////////////////////////////////////////////////////////////////
- /*! This is used in HTML as the title of page with source code for file filename
- */
- virtual QCString trSourceFile(QCString& filename)
- {
- return " Fichier source de " + filename;
- }
+ /*! This is used in HTML as the title of page with source code for file filename
+ */
+ virtual QCString trSourceFile(QCString& filename)
+ {
+ return " Fichier source de " + filename;
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.3.9
- //////////////////////////////////////////////////////////////////////////
-
- /*! This is used as the name of the chapter containing the directory
- * hierarchy.
- */
- virtual QCString trDirIndex()
- { return "Hiérarchie de répertoires"; }
-
- /*! This is used as the name of the chapter containing the documentation
- * of the directories.
- */
- virtual QCString trDirDocumentation()
- { return "Documentation des répertoires"; }
-
- /*! This is used as the title of the directory index and also in the
- * Quick links of a HTML page, to link to the directory hierarchy.
- */
- virtual QCString trDirectories()
- { return "Répertoires"; }
-
- /*! This returns a sentences that introduces the directory hierarchy.
- * and the fact that it is sorted alphabetically per level
- */
- virtual QCString trDirDescription()
- { return "Cette hiérarchie de répertoire est triée approximativement, "
- "mais pas complètement, par ordre alphabétique :";
- }
+//////////////////////////////////////////////////////////////////////////
+// new since 1.3.9
+//////////////////////////////////////////////////////////////////////////
- /*! This returns the title of a directory page. The name of the
- * directory is passed via \a dirName.
- */
- virtual QCString trDirReference(const char *dirName)
- { QCString result="Répertoire de référence de "; result+=dirName; return result; }
+ /*! This is used as the name of the chapter containing the directory
+ * hierarchy.
+ */
+ virtual QCString trDirIndex()
+ { return "Hiérarchie de répertoires"; }
- /*! This returns the word directory with or without starting capital
- * (\a first_capital) and in sigular or plural form (\a singular).
- */
- virtual QCString trDir(bool first_capital, bool singular)
- {
- QCString result((first_capital ? "Répertoire" : "répertoire"));
- if (singular) result+=""; else result+="s";
- return result;
- }
+ /*! This is used as the name of the chapter containing the documentation
+ * of the directories.
+ */
+ virtual QCString trDirDocumentation()
+ { return "Documentation des répertoires"; }
+
+ /*! This is used as the title of the directory index and also in the
+ * Quick links of an HTML page, to link to the directory hierarchy.
+ */
+ virtual QCString trDirectories()
+ { return "Répertoires"; }
+
+ /*! This returns a sentences that introduces the directory hierarchy.
+ * and the fact that it is sorted alphabetically per level
+ */
+ virtual QCString trDirDescription()
+ { return "Cette hiérarchie de répertoire est triée approximativement, "
+ "mais pas complètement, par ordre alphabétique :";
+ }
+
+ /*! This returns the title of a directory page. The name of the
+ * directory is passed via \a dirName.
+ */
+ virtual QCString trDirReference(const char *dirName)
+ { QCString result="Répertoire de référence de "; result+=dirName; return result; }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.4.1
- //////////////////////////////////////////////////////////////////////////
+ /*! This returns the word directory with or without starting capital
+ * (\a first_capital) and in singular or plural form (\a singular).
+ */
+ virtual QCString trDir(bool first_capital, bool singular)
+ {
+ QCString result((first_capital ? "Répertoire" : "répertoire"));
+ if (singular) result+=""; else result+="s";
+ return result;
+ }
+
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.1
+//////////////////////////////////////////////////////////////////////////
/*! This text is added to the documentation when the \\overload command
* is used for a overloaded function.
*/
- virtual QCString trOverloadText()
- {
- return "Ceci est une fonction membre surchargée, "
+ virtual QCString trOverloadText()
+ {
+ return "Ceci est une fonction membre surchargée, "
"proposée par commodité. Elle diffère de la fonction "
"ci-dessus uniquement par le(s) argument(s) qu'elle accepte.";
- }
+ }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.4.6
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.4.6
+//////////////////////////////////////////////////////////////////////////
/*! This is used to introduce a caller (or called-by) graph */
virtual QCString trCallerGraph()
@@ -1595,9 +1606,9 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
virtual QCString trEnumerationValueDocumentation()
{ return "Documentation des énumérations"; }
- //////////////////////////////////////////////////////////////////////////
- // new since 1.5.4 (mainly for Fortran)
- //////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////
+// new since 1.5.4 (mainly for Fortran)
+//////////////////////////////////////////////////////////////////////////
/*! header that is put before the list of member subprograms (Fortran). */
virtual QCString trMemberFunctionDocumentationFortran()
@@ -1832,7 +1843,7 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
//////////////////////////////////////////////////////////////////////////
-// new since 1.6.3
+// new since 1.6.3 (missing items for the directory pages)
//////////////////////////////////////////////////////////////////////////
/*! when clicking a directory dependency label, a page with a
@@ -2269,20 +2280,23 @@ class TranslatorFrench : public TranslatorAdapter_1_8_15
}
virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
{
- QCString result = "Référence de ";
-
+ QCString result = "Référence ";
+ bool feminine = true;
switch(compType)
{
- case ClassDef::Class: result+="la classe "; break;
- case ClassDef::Struct: result+="la structure "; break;
- case ClassDef::Interface: result+="l'interface "; break;
- case ClassDef::Exception: result+="l'exception "; break;
+ case ClassDef::Class: result+="de la classe "; break;
+ case ClassDef::Struct: result+="de la structure "; break;
+ case ClassDef::Union: result+="de l'union "; break;
+ case ClassDef::Interface: result+="de l'interface "; break;
+ case ClassDef::Protocol: result+="du protocole "; feminine=false; break;
+ case ClassDef::Category: result+="de la catégorie "; break;
+ case ClassDef::Exception: result+="de l'exception "; break;
default: break;
}
if(isLocal)
{
- result += "locale ";
+ result += (feminine) ? "locale " : "local ";
}
result += (QCString)clName;
diff --git a/src/translator_sv.h b/src/translator_sv.h
index 5da89df..6277445 100644
--- a/src/translator_sv.h
+++ b/src/translator_sv.h
@@ -23,6 +23,7 @@ Xet Erixon <xet@xeqt.com>
Mikael Hallin <mikaelhallin@yahoo.se> 2003-07-28
Björn Palmqvist <bjorn@aidium.se> 2014-02-01
Magnus Österlund <magnus.osterlund@capgemini.com> 2016-09-12
+Björn Palmqvist <bjorn@aidium.se> 2020-01-08
==================================================================================
Uppdateringar.
1999/04/29
@@ -70,16 +71,34 @@ Problem!
* Uppdaterat den till senaste versionen 1.8.9.1
2015/09/12
* Fixat lite särksirvningar och inkonsekvenser
+2020/01/08
+* Uppdaterat den till senaste språkversionen 1.8.15
+
+Bytte ut Deprecated från Föråldrad till Obsolet
+
+VHDL översättningarna är kanske inte perfekta, då jag endast använt de en gång tidigare.
+Jag lämnade use clause orörd, då jag inte hittade en lämplig översättning för den.
+
+English:
+* Updated the language translation to 1.8.15
+
+Changed Deprecated from Föråldrad to Obsolet
+
+The VHDL translations may not perfect, as I only used it once before.
+I left use clause untouched as I didn't find a suitable translation for it.
+
===================================================================================
Ordlista
===================================================================================
ENGELSKA SVENSKA
* Attribute Attribut
-* Category Lategori
+* Category Kategori
* Class Klass
* Compound Sammansatt
-* Deprecated Föråldrad
+* Deprecated Obsolet
* Directory Katalog
+* Dictionary Uppslagsverk // Frågan om de är de som menas i de fallet
+* Entity Entitet
* Enum Enum
* Enumeration Egenuppräknande
* Event Händelse
@@ -89,6 +108,7 @@ Problem!
* Function Funktion
* Inherited Ärvd
* Interface Gränssnitt
+* Library Biblotek
* Macro Makro
* Member Medlem
* Member Data Medlemsdata
@@ -103,16 +123,19 @@ Problem!
* Protected Skyddad
* Protocol Protokoll
* Public Publik
+* Record Post // Ge gärna exempel på bättre översättning
* Service Tjänst
* Signal Signal
-* Slot Slot //Ge gärna exempel på bättre översättning
+* Slot Slot // Ge gärna exempel på bättre översättning
* Static Statisk
* Struct Struktur
* Subprogram Underprogram
* Subroutine Subrutin
+* Subtype Undertyp
* Template Mall
* Typedef Typdefinition
* Union Union
+* Unit Enhet // Lämplig översättning i VHDL kontextet?
* Variable Variabel
===================================================================================
*/
@@ -120,7 +143,7 @@ Problem!
#ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H
-class TranslatorSwedish : public TranslatorAdapter_1_8_15
+class TranslatorSwedish : public Translator
{
public:
@@ -881,7 +904,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_8_15
virtual QCString trDeprecated()
{
- return "Föråldrad";
+ return "Obsolet";
}
//////////////////////////////////////////////////////////////////////////
@@ -1041,7 +1064,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_8_15
virtual QCString trInclByDepGraph()
{
return "Den här grafen visar vilka filer som direkt eller "
- "indirekt inkluderar denna filen:";
+ "indirekt inkluderar denna filen:";
}
virtual QCString trSince()
{
@@ -1152,7 +1175,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_8_15
/*! Used as a section header for IDL properties */
virtual QCString trProperties()
{
- return "Egenskaper";
+ return "Egenskaper";
}
/*! Used as a section header for IDL property documentation */
virtual QCString trPropertyDocumentation()
@@ -1230,8 +1253,8 @@ class TranslatorSwedish : public TranslatorAdapter_1_8_15
* Charset Name Charset Value(hex) Codepage number
* ------------------------------------------------------
* ANSI_CHARSET 0 (x00) 1252
- * </pre>
- */
+ * </pre>
+ */
virtual QCString trRTFansicp()
{
return "1252";
@@ -1552,7 +1575,7 @@ class TranslatorSwedish : public TranslatorAdapter_1_8_15
* and the fact that it is sorted alphabetically per level
*/
virtual QCString trDirDescription()
- { return "Den här katalogen är grovt sorterad, "
+ { return "Den här katalogen är grovt sorterad, "
"men inte helt, i alfabetisk ordning:";
}
@@ -2055,13 +2078,264 @@ class TranslatorSwedish : public TranslatorAdapter_1_8_15
virtual QCString trSingletonGeneratedFromFiles(bool single)
{
// single is true implies a single file
- QCString result=(QCString)"Dokumentationen för denna singleton"
+ QCString result=(QCString)"Dokumentationen för denna singleton "
"genererades från följande fil";
if (single) result+=":"; else result+="er:";
return result;
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.8.15
+//////////////////////////////////////////////////////////////////////////
+ /** VHDL design unit hierarchy */
+ virtual QCString trDesignUnitHierarchy()
+ { return "Designenhetshirarki"; }
+ /** VHDL design unit list */
+ virtual QCString trDesignUnitList()
+ { return "Designenhetslista"; }
+ /** VHDL design unit members */
+ virtual QCString trDesignUnitMembers()
+ { return "Designenhetsmedlemmar"; }
+ /** VHDL design unit list description
+ * Orginal: Here is a list of all design unit members with links to
+ * the Entities they belong to:
+ */
+ virtual QCString trDesignUnitListDescription()
+ {
+ return "Här är en lista av alla designenhetsmedlemmar med länkar till "
+ "entiteterna som de hör till:";
+ }
+ /** VHDL design unit index */
+ virtual QCString trDesignUnitIndex()
+ { return "Designenhetsindex"; }
+ /** VHDL design units */
+ virtual QCString trDesignUnits()
+ { return "Designenheter"; }
+ /** VHDL functions/procedures/processes */
+ virtual QCString trFunctionAndProc()
+ { return "Funktioner/Procedurer/Processer"; }
+ /** VHDL type */
+ virtual QCString trVhdlType(uint64 type,bool single)
+ {
+ switch(type)
+ {
+ case VhdlDocGen::LIBRARY:
+ return "Biblotek";
+ case VhdlDocGen::PACKAGE:
+ return "Paket";
+ case VhdlDocGen::SIGNAL:
+ if (single) return "Signal";
+ else return "Signaler";
+ case VhdlDocGen::COMPONENT:
+ if (single) return "Komponent";
+ else return "Komponenter";
+ case VhdlDocGen::CONSTANT:
+ if (single) return "Konstant";
+ else return "Konstanter";
+ case VhdlDocGen::ENTITY:
+ if (single) return "Entitet";
+ else return "Entiteter";
+ case VhdlDocGen::TYPE:
+ if (single) return "Typ";
+ else return "Typer";
+ case VhdlDocGen::SUBTYPE:
+ if (single) return "Undertyp";
+ else return "Undertyper";
+ case VhdlDocGen::FUNCTION:
+ if (single) return "Funktion";
+ else return "Funktioner";
+ case VhdlDocGen::RECORD:
+ if (single) return "Post";
+ else return "Poster";
+ case VhdlDocGen::PROCEDURE:
+ if (single) return "Procedur";
+ else return "Procedurer";
+ case VhdlDocGen::ARCHITECTURE:
+ if (single) return "Arkitektur";
+ else return "Arkitekturer";
+ case VhdlDocGen::ATTRIBUTE:
+ return "Attribut";
+ case VhdlDocGen::PROCESS:
+ if (single) return "Process";
+ else return "Processer";
+ case VhdlDocGen::PORT:
+ if (single) return "Port";
+ else return "Portar";
+ case VhdlDocGen::USE:
+ if (single) return "use clause";
+ else return "Use Clauses";
+ case VhdlDocGen::GENERIC:
+ if (single) return "Generisk";
+ else return "Generiska";
+ case VhdlDocGen::PACKAGE_BODY:
+ return "Paketinehåll";
+ case VhdlDocGen::UNITS:
+ return "Enheter";
+ case VhdlDocGen::SHAREDVARIABLE:
+ if (single) return "Delad Variabel";
+ else return "Delade Variabler";
+ case VhdlDocGen::VFILE:
+ if (single) return "Fil";
+ else return "Filer";
+ case VhdlDocGen::GROUP:
+ if (single) return "Grupp";
+ else return "Grupper";
+ case VhdlDocGen::INSTANTIATION:
+ if (single) return "Instantiation";
+ else return "Instantiations";
+ case VhdlDocGen::ALIAS:
+ return "Alias";
+ case VhdlDocGen::CONFIG:
+ if (single) return "Konfiguration";
+ else return "Konfigurationer";
+ case VhdlDocGen::MISCELLANEOUS:
+ return "Diverse";
+ case VhdlDocGen::UCF_CONST:
+ return "Begränsningar";
+ default:
+ return "Klass";
+ }
+ }
+ virtual QCString trCustomReference(const char *name)
+ { return QCString(name)+"referens"; }
+
+ /* Slice */
+ virtual QCString trConstants()
+ {
+ return "Konstanter";
+ }
+ virtual QCString trConstantDocumentation()
+ {
+ return "Konstantdokumentation";
+ }
+ virtual QCString trSequences()
+ {
+ return "Sekvenser";
+ }
+ virtual QCString trSequenceDocumentation()
+ {
+ return "Sekvensdokumentation";
+ }
+ virtual QCString trDictionaries()
+ {
+ return "Uppslagsverk";
+ }
+ virtual QCString trDictionaryDocumentation()
+ {
+ return "Uppslagsverksdokumentation";
+ }
+ virtual QCString trSliceInterfaces()
+ {
+ return "Gränssnitt";
+ }
+ virtual QCString trInterfaceIndex()
+ {
+ return "Gränssnittsindex";
+ }
+ virtual QCString trInterfaceList()
+ {
+ return "Gränssnittslist";
+ }
+ /** Orginal: Here are the interfaces with brief descriptions: */
+ virtual QCString trInterfaceListDescription()
+ {
+ return "Här är gränssnitten med en kort beskrivning";
+ }
+ virtual QCString trInterfaceHierarchy()
+ {
+ return "Gränssnittshirarkin";
+ }
+ /** Orginal: This inheritance list is sorted roughly, but not completely, alphabetically: */
+ virtual QCString trInterfaceHierarchyDescription()
+ {
+ return "Denna arvslista är grovt sorterad, men inte helt, i alfabetisk ordning:";
+ }
+ virtual QCString trInterfaceDocumentation()
+ {
+ return "Gränssnittsdokumentation";
+ }
+ virtual QCString trStructs()
+ {
+ return "Strukturer";
+ }
+ virtual QCString trStructIndex()
+ {
+ return "Strukturindex";
+ }
+ virtual QCString trStructList()
+ {
+ return "Strukturlist";
+ }
+ /** Orginal: Here are the structs with brief descriptions: */
+ virtual QCString trStructListDescription()
+ {
+ return "Här är strukturerna med en kort beskrivning:";
+ }
+ virtual QCString trStructDocumentation()
+ {
+ return "Strukturdokumentation";
+ }
+ virtual QCString trExceptionIndex()
+ {
+ return "Undantagsindex";
+ }
+ virtual QCString trExceptionList()
+ {
+ return "Undantagslista";
+ }
+ /** Orginal: Here are the exceptions with brief descriptions: */
+ virtual QCString trExceptionListDescription()
+ {
+ return "Här är undantagen med en kort beskrivning:";
+ }
+ virtual QCString trExceptionHierarchy()
+ {
+ return "Undantagshirarki";
+ }
+ /** Orginal: This inheritance list is sorted roughly, but not completely, alphabetically: */
+ virtual QCString trExceptionHierarchyDescription()
+ {
+ return "Denna arvslista är grovt sorterad, men inte helt, i alfabetisk ordning:";
+ }
+ virtual QCString trExceptionDocumentation()
+ {
+ return "Undantagsdokumentation";
+ }
+ virtual QCString trCompoundReferenceSlice(const char *clName, ClassDef::CompoundType compType, bool isLocal)
+ {
+ QCString result=(QCString)clName;
+ if (isLocal) result+=" Lokal";
+ switch(compType)
+ {
+ case ClassDef::Class: result+=" Klass"; break;
+ case ClassDef::Struct: result+=" Struktur"; break;
+ case ClassDef::Union: result+=" Unions"; break;
+ case ClassDef::Interface: result+=" Gränssnitts"; break;
+ case ClassDef::Protocol: result+=" Protokoll"; break;
+ case ClassDef::Category: result+=" Kategori"; break;
+ case ClassDef::Exception: result+=" Undantags"; break;
+ default: break;
+ }
+ result+="referens";
+ return result;
+ }
+ virtual QCString trOperations()
+ {
+ return "Operationer";
+ }
+ virtual QCString trOperationDocumentation()
+ {
+ return "Operationsdokumentation";
+ }
+ virtual QCString trDataMembers()
+ {
+ return "Datamedlemmar";
+ }
+ virtual QCString trDataMemberDocumentation()
+ {
+ return "Datamedlemsdokumentation";
+ }
};
#endif
diff --git a/src/types.h b/src/types.h
index 189a93d..d503c58 100644
--- a/src/types.h
+++ b/src/types.h
@@ -97,12 +97,6 @@ struct Grouping
};
-struct ListItemInfo
-{
- QCString type;
- int itemId;
-};
-
enum MemberListType
{
MemberListType_privateLists = 0x0800,
diff --git a/src/util.cpp b/src/util.cpp
index abcd910..fae2e90 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -4752,7 +4752,7 @@ bool resolveLink(/* in */ const char *scName,
const ClassDef *cd;
const DirDef *dir;
const NamespaceDef *nd;
- SectionInfo *si=0;
+ const SectionInfo *si=0;
bool ambig;
if (linkRef.isEmpty()) // no reference name!
{
@@ -4763,9 +4763,9 @@ bool resolveLink(/* in */ const char *scName,
const GroupDef *gd = pd->getGroupDef();
if (gd)
{
- if (!pd->name().isEmpty()) si=Doxygen::sectionDict->find(pd->name());
+ if (!pd->name().isEmpty()) si=SectionManager::instance().find(pd->name());
*resContext=gd;
- if (si) resAnchor = si->label;
+ if (si) resAnchor = si->label();
}
else
{
@@ -4773,10 +4773,10 @@ bool resolveLink(/* in */ const char *scName,
}
return TRUE;
}
- else if ((si=Doxygen::sectionDict->find(linkRef)))
+ else if ((si=SectionManager::instance().find(linkRef)))
{
- *resContext=si->definition;
- resAnchor = si->label;
+ *resContext=si->definition();
+ resAnchor = si->label();
return TRUE;
}
else if ((pd=Doxygen::exampleSDict->find(linkRef))) // link to an example
@@ -6340,7 +6340,7 @@ QCString substituteTemplateArgumentsInString(
// name.data(),argListToString(formalArgs).data(),argListToString(actualArgs).data());
if (formalArgs.empty()) return name;
QCString result;
- static QRegExp re("[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9\\x80-\\xFF]*");
+ static QRegExp re("[a-z_A-Z\\x80-\\xFF][a-z_A-Z0-9:\\x80-\\xFF]*");
int p=0,l,i;
// for each identifier in the base class name (e.g. B<T> -> B and T)
while ((i=re.match(name,p,&l))!=-1)
@@ -6378,8 +6378,8 @@ QCString substituteTemplateArgumentsInString(
{
//printf("n=%s formArg->type='%s' formArg->name='%s' formArg->defval='%s'\n",
// n.data(),formArg->type.data(),formArg->name.data(),formArg->defval.data());
- //printf(">> formArg->name='%s' actArg->type='%s' actArg->name='%s'\n",
- // formArg->name.data(),actArg ? actArg->type.data() : "",actArg ? actArg->name.data() : ""
+ //printf(">> n='%s' formArg->name='%s' actArg->type='%s' actArg->name='%s'\n",
+ // n.data(),formArg.name.data(),actIt!=actualArgs.end() ? actIt->type.data() : "",actIt!=actualArgs.end() ? actIt->name.data() : ""
// );
if (formArg.name==n && actIt!=actualArgs.end() && !actArg.type.isEmpty()) // base class is a template argument
{
@@ -6441,31 +6441,13 @@ QCString substituteTemplateArgumentsInString(
return result.stripWhiteSpace();
}
-#if 0
-/*! Makes a deep copy of the list of argument lists \a srcLists.
- * Will allocate memory, that is owned by the caller.
- */
-QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists)
-{
- ASSERT(srcLists!=0);
- QList<ArgumentList> *dstLists = new QList<ArgumentList>;
- dstLists->setAutoDelete(TRUE);
- QListIterator<ArgumentList> sli(*srcLists);
- ArgumentList *sl;
- for (;(sl=sli.current());++sli)
- {
- dstLists->append(sl->deepCopy());
- }
- return dstLists;
-}
-#endif
/*! Strips template specifiers from scope \a fullName, except those
* that make up specialized classes. The switch \a parentOnly
* determines whether or not a template "at the end" of a scope
- * should be considered, e.g. with \a parentOnly is \c TRUE, A<T>::B<S> will
- * try to strip \<T\> and not \<S\>, while \a parentOnly is \c FALSE will
- * strip both unless A<T> or B<S> are specialized template classes.
+ * should be considered, e.g. with \a parentOnly is \c TRUE, \c A<T>::B<S> will
+ * try to strip `<T>` and not `<S>`, while \a parentOnly is \c FALSE will
+ * strip both unless `A<T>` or `B<S>` are specialized template classes.
*/
QCString stripTemplateSpecifiersFromScope(const QCString &fullName,
bool parentOnly,
@@ -6613,7 +6595,7 @@ found:
PageDef *addRelatedPage(const char *name,const QCString &ptitle,
const QCString &doc,
const char *fileName,int startLine,
- const std::vector<ListItemInfo> &sli,
+ const std::vector<RefItem*> &sli,
GroupDef *gd,
const TagInfo *tagInfo,
bool xref,
@@ -6671,28 +6653,27 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
{
file=pd->getOutputFileBase();
}
- SectionInfo *si = Doxygen::sectionDict->find(pd->name());
+ const SectionInfo *si = SectionManager::instance().find(pd->name());
if (si)
{
- if (si->lineNr != -1)
+ if (si->lineNr() != -1)
{
- warn(file,-1,"multiple use of section label '%s', (first occurrence: %s, line %d)",pd->name().data(),si->fileName.data(),si->lineNr);
+ warn(file,-1,"multiple use of section label '%s', (first occurrence: %s, line %d)",pd->name().data(),si->fileName().data(),si->lineNr());
}
else
{
- warn(file,-1,"multiple use of section label '%s', (first occurrence: %s)",pd->name().data(),si->fileName.data());
+ warn(file,-1,"multiple use of section label '%s', (first occurrence: %s)",pd->name().data(),si->fileName().data());
}
}
else
{
- si=new SectionInfo(
- file,-1,pd->name(),pd->title(),SectionInfo::Page,0,pd->getReference());
+ SectionManager::instance().add(pd->name(),
+ file,-1,pd->title(),SectionType::Page,0,pd->getReference());
//printf("si->label='%s' si->definition=%s si->fileName='%s'\n",
// si->label.data(),si->definition?si->definition->name().data():"<none>",
// si->fileName.data());
//printf(" SectionInfo: sec=%p sec->fileName=%s\n",si,si->fileName.data());
//printf("Adding section key=%s si->fileName=%s\n",pageName.data(),si->fileName.data());
- Doxygen::sectionDict->append(pd->name(),si);
}
}
}
@@ -6701,39 +6682,21 @@ PageDef *addRelatedPage(const char *name,const QCString &ptitle,
//----------------------------------------------------------------------------
-void addRefItem(const std::vector<ListItemInfo> &sli,
+void addRefItem(const std::vector<RefItem*> &sli,
const char *key,
- const char *prefix, const char *name,const char *title,const char *args,Definition *scope)
+ const char *prefix, const char *name,const char *title,const char *args,const Definition *scope)
{
- //printf("addRefItem(sli=%p,key=%s,prefix=%s,name=%s,title=%s,args=%s)\n",sli,key,prefix,name,title,args);
+ //printf("addRefItem(sli=%d,key=%s,prefix=%s,name=%s,title=%s,args=%s)\n",(int)sli.size(),key,prefix,name,title,args);
if (key && key[0]!='@') // check for @ to skip anonymous stuff (see bug427012)
{
- for (const ListItemInfo &lii : sli)
- {
- RefList *refList = Doxygen::xrefLists->find(lii.type);
- if (refList
- &&
- (
- // either not a built-in list or the list is enabled
- (lii.type!="todo" || Config_getBool(GENERATE_TODOLIST)) &&
- (lii.type!="test" || Config_getBool(GENERATE_TESTLIST)) &&
- (lii.type!="bug" || Config_getBool(GENERATE_BUGLIST)) &&
- (lii.type!="deprecated" || Config_getBool(GENERATE_DEPRECATEDLIST))
- )
- )
- {
- RefItem *item = refList->getRefItem(lii.itemId);
- ASSERT(item!=0);
-
- item->prefix = prefix;
- item->scope = scope;
- item->name = name;
- item->title = title;
- item->args = args;
-
- refList->insertIntoList(key,item);
-
- }
+ for (RefItem *item : sli)
+ {
+ item->setPrefix(prefix);
+ item->setScope(scope);
+ item->setName(name);
+ item->setTitle(title);
+ item->setArgs(args);
+ item->setGroup(key);
}
}
}
@@ -6754,11 +6717,11 @@ bool recursivelyAddGroupListToTitle(OutputList &ol,const Definition *d,bool root
bool first=true;
for (gli.toFirst();(gd=gli.current());++gli)
{
+ if (!first) { ol.writeString(" &#124; "); } else first=false;
if (recursivelyAddGroupListToTitle(ol, gd, FALSE))
{
ol.writeString(" &raquo; ");
}
- if (!first) { ol.writeString(" &#124; "); } else first=FALSE;
ol.writeObjectLink(gd->getReference(),gd->getOutputFileBase(),0,gd->groupTitle());
}
if (root)
@@ -7361,6 +7324,7 @@ void initDefaultExtensionMapping()
updateLanguageMapping(".f95", "fortran");
updateLanguageMapping(".f03", "fortran");
updateLanguageMapping(".f08", "fortran");
+ updateLanguageMapping(".f18", "fortran");
updateLanguageMapping(".vhd", "vhdl");
updateLanguageMapping(".vhdl", "vhdl");
updateLanguageMapping(".tcl", "tcl");
@@ -8181,10 +8145,15 @@ void writeSummaryLink(OutputList &ol,const char *label,const char *title,
}
#endif
-QCString externalLinkTarget()
+QCString externalLinkTarget(const bool parent)
{
static bool extLinksInWindow = Config_getBool(EXT_LINKS_IN_WINDOW);
- if (extLinksInWindow) return "target=\"_blank\" "; else return "";
+ if (extLinksInWindow)
+ return "target=\"_blank\" ";
+ else if (parent)
+ return "target=\"_parent\" ";
+ else
+ return "";
}
QCString externalRef(const QCString &relPath,const QCString &ref,bool href)
diff --git a/src/util.h b/src/util.h
index 76c0522..9586f78 100644
--- a/src/util.h
+++ b/src/util.h
@@ -49,9 +49,8 @@ class ClassList;
class MemberGroupSDict;
struct TagInfo;
class MemberNameInfoSDict;
-struct ListItemInfo;
class PageDef;
-struct SectionInfo;
+class SectionInfo;
class QDir;
class Definition;
class BufStr;
@@ -327,15 +326,19 @@ int getScopeFragment(const QCString &s,int p,int *l);
int filterCRLF(char *buf,int len);
-void addRefItem(const std::vector<ListItemInfo> &sli,const char *prefix,
+void addRefItem(const std::vector<RefItem*> &sli,
const char *key,
- const char *name,const char *title,const char *args,Definition *scope);
+ const char *prefix,
+ const char *name,
+ const char *title,
+ const char *args,
+ const Definition *scope);
PageDef *addRelatedPage(const char *name,
const QCString &ptitle,
const QCString &doc,
const char *fileName,int startLine,
- const std::vector<ListItemInfo> &sli = std::vector<ListItemInfo>(),
+ const std::vector<RefItem*> &sli = std::vector<RefItem*>(),
GroupDef *gd=0,
const TagInfo *tagInfo=0,
bool xref=FALSE,
@@ -437,7 +440,7 @@ QCString filterTitle(const QCString &title);
bool patternMatch(const QFileInfo &fi,const QStrList *patList);
-QCString externalLinkTarget();
+QCString externalLinkTarget(const bool parent = false);
QCString externalRef(const QCString &relPath,const QCString &ref,bool href);
int nextUtf8CharPosition(const QCString &utf8Str,int len,int startPos);
const char *writeUtf8Char(FTextStream &t,const char *s);
diff --git a/src/vhdlcode.l b/src/vhdlcode.l
index fe5a8d9..7350bfe 100644
--- a/src/vhdlcode.l
+++ b/src/vhdlcode.l
@@ -20,6 +20,9 @@
%option never-interactive
%option case-insensitive
%option prefix="vhdlcodeYY"
+%top{
+#include <stdint.h>
+}
%{
diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp
index 3c30174..c54bf78 100644
--- a/src/vhdldocgen.cpp
+++ b/src/vhdldocgen.cpp
@@ -58,7 +58,7 @@
#include "plantuml.h"
#include "vhdljjparser.h"
#include "VhdlParser.h"
-#include "vhdlcode.h"
+//#include "vhdlcode.h"
#include "plantuml.h"
//#define DEBUGFLOW
#define theTranslator_vhdlType theTranslator->trVhdlType
@@ -200,7 +200,7 @@ void VhdlDocGen::writeOverview()
if (!f.open(IO_WriteOnly))
{
- fprintf(stderr,"Warning: Cannot open file %s for writing\n",fileName.data());
+ err("Warning: Cannot open file %s for writing\n",fileName.data());
return;
}
@@ -1956,9 +1956,10 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDef* mdef,OutputList &ol,
}
// *** write type
/*VHDL CHANGE */
- bool bRec,bUnit;
+
QCString ltype(mdef->typeString());
QCString largs(mdef->argsString());
+
ClassDef *kl=0;
const ArgumentList &al = mdef->argumentList();
QCString nn;
@@ -2014,7 +2015,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDef* mdef,OutputList &ol,
ol.insertMemberAlign();
if (largs=="context")
{
- VhdlDocGen::writeRecorUnit(ltype,ol,mdef);
+ VhdlDocGen::writeRecordUnit(ltype,largs,ol,mdef);
}
break;
@@ -2079,7 +2080,6 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDef* mdef,OutputList &ol,
ol.insertMemberAlign();
ol.docify(" ");
-
ol.startBold();
ol.docify(ltype);
ol.endBold();
@@ -2128,6 +2128,7 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDef* mdef,OutputList &ol,
case VhdlDocGen::SHAREDVARIABLE:
case VhdlDocGen::VFILE:
case VhdlDocGen::GROUP:
+ case VhdlDocGen::TYPE:
writeLink(mdef,ol);
ol.docify(" ");
ol.insertMemberAlign();
@@ -2135,34 +2136,9 @@ void VhdlDocGen::writeVHDLDeclaration(const MemberDef* mdef,OutputList &ol,
break;
case VhdlDocGen::RECORD:
case VhdlDocGen::UNITS:
- writeLink(mdef,ol);
- ol.docify(" ");
- ol.startBold();
- if (ltype.isEmpty()) {
- ol.docify(" ");
- }
- ol.insertMemberAlign();
- if (!ltype.isEmpty())
- VhdlDocGen::formatString(ltype,ol,mdef);
- ol.endBold();
- break;
- case VhdlDocGen::TYPE:
- bRec=largs.stripPrefix("record") ;
- bUnit=largs.stripPrefix("units") ;
- ol.startBold();
- if (bRec) ol.docify("record: ");
- if (bUnit) ol.docify("units: ");
- writeLink(mdef,ol);
- ol.insertMemberAlign();
- if (!bRec && !bUnit) VhdlDocGen::formatString(ltype,ol,mdef);
- if (bUnit) ol.lineBreak();
- if (bRec || bUnit)
- {
- writeRecorUnit(largs,ol,mdef);
- }
- ol.endBold();
+ writeRecordUnit(largs,ltype,ol,mdef);
break;
-
+
default: break;
}
@@ -2727,29 +2703,7 @@ void assignBinding(VhdlConfNode * conf)
entBind=conf->binding;
QCString conf2=VhdlDocGen::parseForBinding(entBind,arcBind);
- if (qstricmp(conf2,"configuration")==0)
- {
- QList<VhdlConfNode> confList = getVhdlConfiguration();
- VhdlConfNode* vconf;
- // bool found=false;
- for (uint iter=0;iter<confList.count(); iter++)
- {
- vconf= (VhdlConfNode *)confList.at(iter);
- QCString n=VhdlDocGen::getIndexWord(vconf->confVhdl.data(),0);
- if (n==entBind)
- {
- // found=true;
- entBind=VhdlDocGen::getIndexWord(vconf->confVhdl.data(),1);
- QCString a=VhdlDocGen::getIndexWord(conf->compSpec.data(),0);
- QCString e=VhdlDocGen::getIndexWord(conf->confVhdl.data(),1);
- a=e+"::"+a;
- archClass= VhdlDocGen::findVhdlClass(a.data());//Doxygen::classSDict->find(a.data());
- entClass= VhdlDocGen::findVhdlClass(e.data());//Doxygen::classSDict->find(e.data());
- break;
- }
- }
- }
- else // conf2!=configuration
+ if (conf2!="configuration")
{
QCString a,c,e;
if (conf->isInlineConf)
@@ -2852,17 +2806,6 @@ void VhdlDocGen::computeVhdlComponentRelations()
{
QCString entity,arch,inst;
- QList<VhdlConfNode> confList = getVhdlConfiguration();
-
- for (uint iter=0;iter<confList.count(); iter++)
- {
- VhdlConfNode* conf= (VhdlConfNode *)confList.at(iter);
- if (!(conf->isInlineConf || conf->isLeaf))
- {
- continue;
- }
- assignBinding(conf);
- }
for (const auto &cur : getVhdlInstList())
{
@@ -2963,33 +2906,35 @@ ferr:
md->setDocumentation(cur->doc.data(),cur->docFile.data(),cur->docLine);
FileDef *fd=ar->getFileDef();
md->setBodyDef(fd);
-
-
- QCString info="Info: Elaborating entity "+n1;
- fd=ar->getFileDef();
- info+=" for hierarchy ";
- QRegExp epr("[|]");
- QCString label=cur->type+":"+cur->write+":"+cur->name;
- label.replace(epr,":");
- info+=label;
- fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data());
-
-
+ //QCString info="Info: Elaborating entity "+n1;
+ //fd=ar->getFileDef();
+ //info+=" for hierarchy ";
+ //QRegExp epr("[|]");
+ //QCString label=cur->type+":"+cur->write+":"+cur->name;
+ //label.replace(epr,":");
+ //info+=label;
+ //fprintf(stderr,"\n[%s:%d:%s]\n",fd->fileName().data(),cur->startLine,info.data());
ar->insertMember(md);
}
-void VhdlDocGen::writeRecorUnit(QCString & largs,OutputList& ol ,const MemberDef *mdef)
+void VhdlDocGen::writeRecordUnit(QCString & largs,QCString & ltype,OutputList& ol ,const MemberDef *mdef)
{
- QCStringList ql=QCStringList::split("#",largs,FALSE);
- uint len=ql.count();
- for(uint i=0;i<len;i++)
- {
- QCString n=ql[i];
- VhdlDocGen::formatString(n,ol,mdef);
- if ((len-i)>1) ol.lineBreak();
- }
+ int i=mdef->name().find('~');
+ if(i>0){
+ //sets the real record member name
+ const_cast<MemberDef*>(mdef)->setName(mdef->name().left(i).data());
+ }
+
+ writeLink(mdef,ol);
+ ol.startBold();
+ ol.insertMemberAlign();
+ if (!ltype.isEmpty()){
+ VhdlDocGen::formatString(ltype,ol,mdef);
+ }
+ ol.endBold();
+
}
@@ -3630,7 +3575,7 @@ void FlowChart::addFlowChart(int type,const char* text,const char* exp, const ch
FlowChart *fl=new FlowChart(type,typeString.data(),expression.data(),label);
- fl->line=vhdl::parser::VhdlParser::getLine();
+ fl->line=1; // TODO: use getLine(); of the parser
if (type & (START_NO | VARIABLE_NO))
{
diff --git a/src/vhdldocgen.h b/src/vhdldocgen.h
index 6203196..1e43a67 100644
--- a/src/vhdldocgen.h
+++ b/src/vhdldocgen.h
@@ -39,6 +39,33 @@ class FileDef;
class NamespaceDef;
struct Argument;
+
+
+struct VhdlConfNode
+{
+ VhdlConfNode(const char* a,const char* b,const char* config,const char* cs,bool leaf)
+ {
+ arch=a; // architecture e.g. for iobuffer
+ arch=arch.lower();
+ binding=b; // binding e.g. use entity work.xxx(bev)
+ binding=binding.lower();
+ confVhdl=config; // configuration foo is bar
+ compSpec=cs;
+ isInlineConf=false; // primary configuration?
+ isLeaf=leaf;
+ };
+
+ QCString confVhdl;
+ QCString arch;
+ QCString binding;
+ QCString compSpec;
+ int level = 0;
+ bool isLeaf = false;
+ bool isInlineConf = false;
+
+};
+
+
/** Class for generating documentation specific for VHDL */
class VhdlDocGen
{
@@ -226,7 +253,7 @@ class VhdlDocGen
static void writeVhdlLink(const ClassDef* cdd ,OutputList& ol,QCString& type,QCString& name,QCString& beh);
static void writeStringLink(const MemberDef *mdef,QCString mem,OutputList& ol);
static void writeRecUnitDocu( const MemberDef *md, OutputList& ol,QCString largs);
- static void writeRecorUnit(QCString & largs,OutputList& ol ,const MemberDef *mdef);
+ static void writeRecordUnit(QCString & largs,QCString & ltype,OutputList& ol ,const MemberDef *mdef);
};
//-------------------------------------------------------------------------------------------------------------------
diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp
index 5dfa9f6..22e2e01 100644
--- a/src/vhdljjparser.cpp
+++ b/src/vhdljjparser.cpp
@@ -14,7 +14,6 @@
#include <qfileinfo.h>
#include <qcstringlist.h>
#include "vhdljjparser.h"
-#include "vhdlcode.h"
#include "vhdldocgen.h"
#include "message.h"
#include "config.h"
@@ -28,205 +27,232 @@
#include "outputlist.h"
#include "arguments.h"
#include "types.h"
-#include "VhdlParserIF.h"
#include "growbuf.h"
+#include "markdown.h"
+#include "VhdlParserTokenManager.h"
+#include "VhdlParserErrorHandler.hpp"
using namespace vhdl::parser;
-using namespace std;
-static OutlineParserInterface *g_thisParser;
-
-static QCString yyFileName;
-static int yyLineNr = 1;
-static int* lineParse;
-static int iDocLine = -1;
-static QCString inputString;
-static Entry* gBlock = 0;
-static Entry* previous = 0;
-//-------------------------------------------------------
+struct VHDLDocInfo
+{
+ QCString doc;
+ bool brief;
+ bool pending = false;
+ int iDocLine = 1;
+};
-static Entry* oldEntry;
-static bool varr=FALSE;
-static QCString varName;
-static std::vector< std::shared_ptr<Entry> > instFiles;
-static std::vector< std::shared_ptr<Entry> > libUse;
-static std::vector<Entry*> lineEntry;
+static bool isConstraintFile(const QCString &fileName,const QCString &ext)
+{
+ return fileName.right(ext.length())==ext;
+}
-Entry* VhdlParser::tempEntry=0;
-Entry* VhdlParser::lastEntity=0 ;
-Entry* VhdlParser::lastCompound=0 ;
-Entry* VhdlParser::current_root = 0;
-std::shared_ptr<Entry> VhdlParser::current=0;
-QCString VhdlParser::compSpec;
-QCString VhdlParser::currName;
-QCString VhdlParser::confName;
-QCString VhdlParser::genLabels;
-QCString VhdlParser::lab;
-QCString VhdlParser::forL;
-int VhdlParser::param_sec = 0;
-int VhdlParser::parse_sec=0;
-int VhdlParser::currP=0;
-int VhdlParser::levelCounter;
+//-------------------------------------
-static QList<VhdlConfNode> configL;
+static EntryList g_instFiles;
-static struct
+struct VHDLOutlineParser::Private
{
- QCString doc;
- bool brief;
- bool pending;
- int iDocLine;
-} str_doc;
+ void parseVhdlfile(const char *fileName,const char* inputBuffer,bool inLine);
-static QCString strComment;
-static int iCodeLen;
-static const char *vhdlFileName = 0;
+ VHDLOutlineParser *thisParser = 0;
+ VhdlParser *vhdlParser = 0;
+ CommentScanner commentScanner;
-static bool checkMultiComment(QCString& qcs,int line);
-static void insertEntryAtLine(const Entry* ce,int line);
-
-//-------------------------------------
+ QCString yyFileName;
+ int yyLineNr = 1;
+ std::vector<int> lineParse;
+ int iDocLine = -1;
+ QCString inputString;
+ Entry* gBlock = 0;
+ Entry* previous = 0;
+//-------------------------------------------------------
-const QList<VhdlConfNode>& getVhdlConfiguration() { return configL; }
-const std::vector<std::shared_ptr<Entry> > &getVhdlInstList() { return instFiles; }
+ Entry* oldEntry = 0;
+ bool varr = FALSE;
+ QCString varName;
+ EntryList libUse;
+ EntryList lineEntry;
+ QCString strComment;
+ int iCodeLen;
+ VHDLDocInfo str_doc;
+ VhdlParser::SharedState shared;
+ QCString forL;
+
+};
+
+void VHDLOutlineParser::Private::parseVhdlfile(const char *fileName,
+ 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 *tokErrHandler=new VhdlTokenManagerErrorHandler(fileName);
+ vhdlParser=new VhdlParser(tokenManager);
+ vhdlParser->setOutlineParser(thisParser);
+ vhdlParser->setSharedState(&shared);
+ tokenManager->setLexParser(vhdlParser);
+ tokenManager->ReInit(stream,0);
+ tokenManager->setErrorHandler(tokErrHandler);
+ VhdlErrorHandler *parserErrHandler=new VhdlErrorHandler(fileName);
+ vhdlParser->setErrorHandler(parserErrHandler);
+ try
+ {
+ if(inLine)
+ {
+ vhdlParser->parseInline();
+ }
+ else
+ {
+ vhdlParser->design_file();
+ }
+ }
+ catch( std::exception &){ /* fprintf(stderr,"\n[%s]",e.what()); */ }
+ // fprintf(stderr,"\n\nparsed lines: %d\n",yyLineNr);
+ // fprintf(stderr,"\n\nerrors : %d\n\n",myErr->getErrorCount());
+ delete vhdlParser;
+}
-Entry* getVhdlCompound()
+VHDLOutlineParser::VHDLOutlineParser() : p(std::make_unique<Private>())
{
- if (VhdlParser::lastEntity) return VhdlParser::lastEntity;
- if (VhdlParser::lastCompound) return VhdlParser::lastCompound;
- return NULL;
}
-bool isConstraintFile(const QCString &fileName,const QCString &ext)
+VHDLOutlineParser::~VHDLOutlineParser()
{
- return fileName.right(ext.length())==ext;
}
-
void VHDLOutlineParser::parseInput(const char *fileName,const char *fileBuf,
- const std::shared_ptr<Entry> &root, bool ,QStrList&)
+ const std::shared_ptr<Entry> &root, bool ,QStrList&)
{
- g_thisParser=this;
- bool inLine=false;
- inputString=fileBuf;
+ VhdlParser::SharedState *s = &p->shared;
+ p->thisParser=this;
+ p->inputString=fileBuf;
// fprintf(stderr,"\n ============= %s\n ==========\n",fileBuf);
- if (strlen(fileName)==0)
- {
- inLine=true;
- }
+ bool inLine = (fileName==0 || strlen(fileName)==0);
- yyFileName+=fileName;
+ p->yyFileName=fileName;
- bool xilinx_ucf=isConstraintFile(yyFileName,".ucf");
- bool altera_qsf=isConstraintFile(yyFileName,".qsf");
+ bool xilinx_ucf=isConstraintFile(p->yyFileName,".ucf");
+ bool altera_qsf=isConstraintFile(p->yyFileName,".qsf");
// support XILINX(ucf) and ALTERA (qsf) file
if (xilinx_ucf)
{
- VhdlDocGen::parseUCF(fileBuf,root.get(),yyFileName,FALSE);
+ VhdlDocGen::parseUCF(fileBuf,root.get(),p->yyFileName,FALSE);
return;
}
if (altera_qsf)
{
- VhdlDocGen::parseUCF(fileBuf,root.get(),yyFileName,TRUE);
+ VhdlDocGen::parseUCF(fileBuf,root.get(),p->yyFileName,TRUE);
return;
}
- yyLineNr=1;
- VhdlParser::current_root=root.get();
- VhdlParser::lastCompound=0;
- VhdlParser::lastEntity=0;
- VhdlParser::lastEntity=0;
- oldEntry = 0;
- VhdlParser::current=std::make_shared<Entry>();
- VhdlParser::initEntry(VhdlParser::current.get());
- Doxygen::docGroup.enterFile(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);
-
- VhdlParser::current.reset();
+ p->yyLineNr=1;
+ s->current_root=root;
+ s->lastCompound=0;
+ s->lastEntity=0;
+ s->lastEntity=0;
+ p->oldEntry = 0;
+ s->current=std::make_shared<Entry>();
+ initEntry(s->current.get());
+ p->commentScanner.enterFile(fileName,p->yyLineNr);
+ p->lineParse.reserve(200);
+ p->parseVhdlfile(fileName,fileBuf,inLine);
+ p->commentScanner.leaveFile(fileName,p->yyLineNr);
+
+ s->current.reset();
if (!inLine)
- VhdlParser::mapLibPackage(root.get());
+ mapLibPackage(root.get());
- delete[] lineParse;
- yyFileName.resize(0);
- libUse.clear();
- VhdlDocGen::resetCodeVhdlParserState();
- vhdlFileName = 0;
+ p->yyFileName.resize(0);
+ p->libUse.clear();
}
-void VhdlParser::lineCount()
+void VHDLOutlineParser::lineCount()
{
- yyLineNr++;
+ p->yyLineNr++;
}
-void VhdlParser::lineCount(const char* text)
+void VHDLOutlineParser::lineCount(const char* text)
{
for (const char* c=text ; *c ; ++c )
{
- if (*c == '\n') yyLineNr++;
+ if (*c == '\n') p->yyLineNr++;
}
}
-void isVhdlDocPending()
+void VHDLOutlineParser::initEntry(Entry *e)
{
- if (!str_doc.pending) return;
-
- str_doc.pending=FALSE;
- oldEntry=0; // prevents endless recursion
- iDocLine=str_doc.iDocLine;
- VhdlParser::handleCommentBlock(str_doc.doc,str_doc.brief);
- iDocLine=-1;
-}
-
-void VhdlParser::initEntry(Entry *e)
-{
- e->fileName = yyFileName;
+ e->fileName = p->yyFileName;
e->lang = SrcLangExt_VHDL;
- isVhdlDocPending();
- Doxygen::docGroup.initGroupInfo(e);
+ if (p->str_doc.pending)
+ {
+ p->str_doc.pending=FALSE;
+ p->oldEntry=0; // prevents endless recursion
+ p->iDocLine=p->str_doc.iDocLine;
+ handleCommentBlock(p->str_doc.doc,p->str_doc.brief);
+ p->iDocLine=-1;
+ }
+ p->commentScanner.initGroupInfo(e);
}
-void VhdlParser::newEntry()
+void VHDLOutlineParser::newEntry()
{
- previous = current.get();
- if (current->spec==VhdlDocGen::ENTITY ||
- current->spec==VhdlDocGen::PACKAGE ||
- current->spec==VhdlDocGen::ARCHITECTURE ||
- current->spec==VhdlDocGen::PACKAGE_BODY)
+ VhdlParser::SharedState *s = &p->shared;
+ p->previous = s->current.get();
+ if (s->current->spec==VhdlDocGen::ENTITY ||
+ s->current->spec==VhdlDocGen::PACKAGE ||
+ s->current->spec==VhdlDocGen::ARCHITECTURE ||
+ s->current->spec==VhdlDocGen::PACKAGE_BODY)
{
- current_root->moveToSubEntryAndRefresh(current);
+ s->current_root->moveToSubEntryAndRefresh(s->current);
}
else
{
- if (lastCompound)
+ if (s->lastCompound)
{
- lastCompound->moveToSubEntryAndRefresh(current);
+ s->lastCompound->moveToSubEntryAndRefresh(s->current);
}
else
{
- if (lastEntity)
+ if (s->lastEntity)
{
- lastEntity->moveToSubEntryAndRefresh(current);
+ s->lastEntity->moveToSubEntryAndRefresh(s->current);
}
else
{
- current_root->moveToSubEntryAndRefresh(current);
+ s->current_root->moveToSubEntryAndRefresh(s->current);
}
}
}
- initEntry(current.get());
+ initEntry(s->current.get());
+}
+
+static int idCounter;
+
+/** returns a unique id for each record member.
+*
+* type first_rec is record
+* RE: data_type;
+* end;
+*
+* type second_rec is record
+* RE: data_type;
+* end;
+*/
+
+QString VHDLOutlineParser::getNameID(){
+ return QString::number(idCounter++,10);
}
-void VhdlParser::handleFlowComment(const char* doc)
+void VHDLOutlineParser::handleFlowComment(const char* doc)
{
- lineCount(doc);
+ lineCount(doc);
if (VhdlDocGen::getFlowMember())
{
@@ -238,16 +264,15 @@ void VhdlParser::handleFlowComment(const char* doc)
}
-void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
+void VHDLOutlineParser::handleCommentBlock(const char* doc1,bool brief)
{
- QCString doc;
- doc.append(doc1);
- // fprintf(stderr,"\n %s",doc.data());
+ VhdlParser::SharedState *s = &p->shared;
+ QCString doc = doc1;
if (doc.isEmpty()) return;
- if (checkMultiComment(doc,yyLineNr))
+ if (checkMultiComment(doc,p->yyLineNr))
{
- strComment.resize(0);
+ p->strComment.resize(0);
return;
}
@@ -255,44 +280,43 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
Protection protection=Public;
- if (oldEntry==current.get())
+ if (p->oldEntry==s->current.get())
{
//printf("\n find pending message < %s > at line: %d \n ",doc.data(),iDocLine);
- str_doc.doc=doc;
- str_doc.iDocLine=iDocLine;
- str_doc.brief=brief;
- str_doc.pending=TRUE;
+ p->str_doc.doc=doc;
+ p->str_doc.iDocLine=p->iDocLine;
+ p->str_doc.brief=brief;
+ p->str_doc.pending=TRUE;
return;
}
- oldEntry=current.get();
+ p->oldEntry=s->current.get();
if (brief)
{
- current->briefLine = yyLineNr;
+ s->current->briefLine = p->yyLineNr;
}
else
{
- current->docLine = yyLineNr;
+ s->current->docLine = p->yyLineNr;
}
- // printf("parseCommentBlock file<%s>\n [%s]\n at line [%d] \n ",yyFileName.data(),doc.data(),iDocLine);
-
+
int j=doc.find("[plant]");
if (j>=0)
{
doc=doc.remove(j,7);
- current->stat=true;
+ s->current->stat=true;
}
int position=0;
bool needsEntry=FALSE;
- QCString processedDoc = preprocessCommentBlock(doc,yyFileName,iDocLine);
- while (parseCommentBlock(
- g_thisParser,
- current.get(),
+ QCString processedDoc = processMarkdownForCommentBlock(doc,p->yyFileName,p->iDocLine);
+ while (p->commentScanner.parseCommentBlock(
+ p->thisParser,
+ s->current.get(),
processedDoc, // text
- yyFileName, // file
- iDocLine, // line of block start
+ p->yyFileName, // file
+ p->iDocLine, // line of block start
brief,
0,
FALSE,
@@ -302,62 +326,64 @@ void VhdlParser::handleCommentBlock(const char* doc1,bool brief)
)
)
{
- //printf("parseCommentBlock position=%d [%s]\n",position,doc.data()+position);
if (needsEntry) newEntry();
}
if (needsEntry)
{
- if (varr)
+ if (p->varr)
{
- varr=FALSE;
- current->name=varName;
- current->section=Entry::VARIABLEDOC_SEC;
- varName="";
+ p->varr=FALSE;
+ s->current->name=p->varName;
+ s->current->section=Entry::VARIABLEDOC_SEC;
+ p->varName="";
}
newEntry();
}
- iDocLine=-1;
- strComment.resize(0);
+ p->iDocLine=-1;
+ p->strComment.resize(0);
}
void VHDLOutlineParser::parsePrototype(const char *text)
{
- varName=text;
- varr=TRUE;
+ p->varName=text;
+ p->varr=TRUE;
}
-void VhdlParser::addCompInst(const char *n, const char* instName, const char* comp,int iLine)
+void VHDLOutlineParser::addCompInst(const char *n, const char* instName, const char* comp,int iLine)
{
- current->spec=VhdlDocGen::INSTANTIATION;
- current->section=Entry::VARIABLE_SEC;
- current->startLine=iLine;
- current->bodyLine=iLine;
- current->type=instName; // foo:instname e.g proto or work. proto(ttt)
- current->exception=genLabels.lower(); // |arch|label1:label2...
- current->name=n; // foo
- if (lastCompound)
+ VhdlParser::SharedState *s = &p->shared;
+ s->current->spec=VhdlDocGen::INSTANTIATION;
+ s->current->section=Entry::VARIABLE_SEC;
+ s->current->startLine=iLine;
+ s->current->bodyLine=iLine;
+ s->current->type=instName; // foo:instname e.g proto or work. proto(ttt)
+ s->current->exception=s->genLabels.lower(); // |arch|label1:label2...
+ s->current->name=n; // foo
+ if (s->lastCompound)
{
- current->args=lastCompound->name; // architecture name
+ s->current->args=s->lastCompound->name; // architecture name
}
- current->includeName=comp; // component/entity/configuration
- int u=genLabels.find("|",1);
+ s->current->includeName=comp; // component/entity/configuration
+ int u=s->genLabels.find("|",1);
if (u>0)
{
- current->write=genLabels.right(genLabels.length()-u);
- current->read=genLabels.left(u);
+ s->current->write=s->genLabels.right(s->genLabels.length()-u);
+ s->current->read=s->genLabels.left(u);
}
//printf (" \n genlabel: [%s] inst: [%s] name: [%s] %d\n",n,instName,comp,iLine);
- if (lastCompound)
+ if (s->lastCompound)
{
- current->args=lastCompound->name;
+ s->current->args=s->lastCompound->name;
if (true) // !findInstant(current->type))
{
- initEntry(current.get());
- instFiles.emplace_back(std::make_shared<Entry>(*current));
+ initEntry(s->current.get());
+ // TODO: protect with mutex
+ g_instFiles.emplace_back(std::make_shared<Entry>(*s->current));
+ // TODO: end protect with mutex
}
- current=std::make_shared<Entry>();
+ s->current=std::make_shared<Entry>();
}
else
{
@@ -365,13 +391,14 @@ void VhdlParser::addCompInst(const char *n, const char* instName, const char* co
}
}
-void VhdlParser::addVhdlType(const char *n,int startLine,int section,
+void VHDLOutlineParser::addVhdlType(const char *n,int startLine,int section,
uint64 spec,const char* args,const char* type,Protection prot)
{
+ VhdlParser::SharedState *s = &p->shared;
QCString name(n);
if (isFuncProcProced() || VhdlDocGen::getFlowMember()) return;
- if (parse_sec==GEN_SEC)
+ if (s->parse_sec==GEN_SEC)
{
spec= VhdlDocGen::GENERIC;
}
@@ -380,61 +407,62 @@ void VhdlParser::addVhdlType(const char *n,int startLine,int section,
for (uint u=0;u<ql.count();u++)
{
- current->name=ql[u];
- current->startLine=startLine;
- current->bodyLine=startLine;
- current->section=section;
- current->spec=spec;
- current->fileName=yyFileName;
- if (current->args.isEmpty())
+ s->current->name=ql[u];
+ s->current->startLine=startLine;
+ s->current->bodyLine=startLine;
+ s->current->section=section;
+ s->current->spec=spec;
+ s->current->fileName=p->yyFileName;
+ if (s->current->args.isEmpty())
{
- current->args=args;
+ s->current->args=args;
}
- current->type=type;
- current->protection=prot;
+ s->current->type=type;
+ s->current->protection=prot;
- if (!lastCompound && (section==Entry::VARIABLE_SEC) && (spec == VhdlDocGen::USE || spec == VhdlDocGen::LIBRARY) )
+ if (!s->lastCompound && (section==Entry::VARIABLE_SEC) && (spec == VhdlDocGen::USE || spec == VhdlDocGen::LIBRARY) )
{
- libUse.emplace_back(std::make_shared<Entry>(*current));
- current->reset();
+ p->libUse.emplace_back(std::make_shared<Entry>(*s->current));
+ s->current->reset();
}
newEntry();
}
}
-void VhdlParser::createFunction(const char *imp,uint64 spec,const char *fn)
+void VHDLOutlineParser::createFunction(const char *imp,uint64 spec,const char *fn)
{
+ VhdlParser::SharedState *s = &p->shared;
QCString impure(imp);
QCString fname(fn);
- current->spec=spec;
- current->section=Entry::FUNCTION_SEC;
+ s->current->spec=spec;
+ s->current->section=Entry::FUNCTION_SEC;
if (impure=="impure" || impure=="pure")
{
- current->exception=impure;
+ s->current->exception=impure;
}
- if (parse_sec==GEN_SEC)
+ if (s->parse_sec==GEN_SEC)
{
- current->spec= VhdlDocGen::GENERIC;
- current->section=Entry::FUNCTION_SEC;
+ s->current->spec= VhdlDocGen::GENERIC;
+ s->current->section=Entry::FUNCTION_SEC;
}
- if (currP==VhdlDocGen::PROCEDURE)
+ if (s->currP==VhdlDocGen::PROCEDURE)
{
- current->name=impure;
- current->exception="";
+ s->current->name=impure;
+ s->current->exception="";
}
else
{
- current->name=fname;
+ s->current->name=fname;
}
if (spec==VhdlDocGen::PROCESS)
{
- current->args=fname;
- current->name=impure;
- VhdlDocGen::deleteAllChars(current->args,' ');
+ s->current->args=fname;
+ s->current->name=impure;
+ VhdlDocGen::deleteAllChars(s->current->args,' ');
if (!fname.isEmpty())
{
QCStringList q1=QCStringList::split(",",fname);
@@ -442,19 +470,19 @@ void VhdlParser::createFunction(const char *imp,uint64 spec,const char *fn)
{
Argument arg;
arg.name=q1[ii];
- current->argList.push_back(arg);
+ s->current->argList.push_back(arg);
}
}
- return;
}
- }
+}
-bool VhdlParser::isFuncProcProced()
+bool VHDLOutlineParser::isFuncProcProced()
{
- if (currP==VhdlDocGen::FUNCTION ||
- currP==VhdlDocGen::PROCEDURE ||
- currP==VhdlDocGen::PROCESS
+ VhdlParser::SharedState *s = &p->shared;
+ if (s->currP==VhdlDocGen::FUNCTION ||
+ s->currP==VhdlDocGen::PROCEDURE ||
+ s->currP==VhdlDocGen::PROCESS
)
{
return TRUE;
@@ -462,13 +490,13 @@ bool VhdlParser::isFuncProcProced()
return FALSE;
}
-void VhdlParser::pushLabel( QCString &label,QCString & val)
+void VHDLOutlineParser::pushLabel( QCString &label,QCString & val)
{
label+="|";
label+=val;
}
- QCString VhdlParser::popLabel(QCString & q)
+QCString VHDLOutlineParser::popLabel(QCString & q)
{
int i=q.findRev("|");
if (i<0) return "";
@@ -476,63 +504,12 @@ void VhdlParser::pushLabel( QCString &label,QCString & val)
return q;
}
-void VhdlParser::addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool inlineConf)
-{
- VhdlConfNode* co=0;
- QCString ent;
- ent=a;
- if (b)
- {
- ent=b;
- }
- int level=0;
- if (!configL.isEmpty())
- {
- VhdlConfNode* vc=configL.getLast();
- level=vc->level;
- if (levelCounter==0)
- {
- pushLabel(forL,ent);
- }
- else if (level<levelCounter)
- {
- if (!isLeaf)
- {
- pushLabel(forL,ent);
- }
- }
- else if (level>levelCounter)
- {
- forL=popLabel(forL);
- }
- }
- else
- {
- pushLabel(forL,ent);
- }
-
- if (inlineConf)
- {
- confName=lastCompound->name;
- }
-
- //fprintf(stderr,"\n[%s %d %d]\n",forL.data(),levelCounter,level);
- co=new VhdlConfNode(a,b,confName.lower().data(),forL.lower().data(),isLeaf);
-
- if (inlineConf)
- {
- co->isInlineConf=TRUE;
- }
-
- configL.append(co);
-}
-
-
-void VhdlParser::addProto(const char *s1,const char *s2,const char *s3,
+void VHDLOutlineParser::addProto(const char *s1,const char *s2,const char *s3,
const char *s4,const char *s5,const char *s6)
{
+ VhdlParser::SharedState *s = &p->shared;
(void)s5; // avoid unused warning
QCString name=s2;
QCStringList ql=QCStringList::split(",",name);
@@ -551,12 +528,12 @@ void VhdlParser::addProto(const char *s1,const char *s2,const char *s3,
{
arg.type+=s6;
}
- if (parse_sec==GEN_SEC && param_sec==0)
+ if (s->parse_sec==GEN_SEC && s->param_sec==0)
{
arg.defval="gen!";
}
- if (parse_sec==PARAM_SEC)
+ if (s->parse_sec==PARAM_SEC)
{
// assert(false);
}
@@ -564,9 +541,9 @@ void VhdlParser::addProto(const char *s1,const char *s2,const char *s3,
arg.defval+=s1;
arg.attrib="";//s6;
- current->argList.push_back(arg);
- current->args+=s2;
- current->args+=",";
+ s->current->argList.push_back(arg);
+ s->current->args+=s2;
+ s->current->args+=",";
}
}
@@ -582,13 +559,13 @@ void VhdlParser::addProto(const char *s1,const char *s2,const char *s3,
* .....
* and so on..
*/
-void VhdlParser::mapLibPackage( Entry* root)
+void VHDLOutlineParser::mapLibPackage( Entry* root)
{
//QList<Entry> epp=libUse;
//EntryListIterator eli(epp);
//Entry *rt;
//for (;(rt=eli.current());++eli)
- for (const auto &rt : libUse)
+ for (const auto &rt : p->libUse)
{
if (addLibUseClause(rt->name))
{
@@ -613,7 +590,7 @@ void VhdlParser::mapLibPackage( Entry* root)
}// for
}//MapLib
-bool VhdlParser::addLibUseClause(const QCString &type)
+bool VHDLOutlineParser::addLibUseClause(const QCString &type)
{
static bool showIEEESTD=Config_getBool(FORCE_LOCAL_INCLUDES);
@@ -625,48 +602,50 @@ bool VhdlParser::addLibUseClause(const QCString &type)
return TRUE;
}
-int VhdlParser::getLine()
+int VHDLOutlineParser::getLine()
{
- return yyLineNr;
+ return p->yyLineNr;
}
-void VhdlParser::setLineParsed(int tok)
+void VHDLOutlineParser::setLineParsed(int tok)
{
- lineParse[tok]=yyLineNr;
+ if ((int)p->lineParse.size()<=tok) p->lineParse.resize(tok+1);
+ p->lineParse[tok]=p->yyLineNr;
}
-int VhdlParser::getLine(int tok)
+int VHDLOutlineParser::getLine(int tok)
{
- int val=lineParse[tok];
+ int val=p->lineParse[tok];
if (val<0) val=0;
//assert(val>=0 && val<=yyLineNr);
return val;
}
-void VhdlParser::createFlow()
+void VHDLOutlineParser::createFlow()
{
+ VhdlParser::SharedState *s = &p->shared;
if (!VhdlDocGen::getFlowMember())
{
return;
}
QCString q,ret;
- if (currP==VhdlDocGen::FUNCTION)
+ if (s->currP==VhdlDocGen::FUNCTION)
{
q=":function( ";
- FlowChart::alignFuncProc(q,tempEntry->argList,true);
+ FlowChart::alignFuncProc(q,s->tempEntry->argList,true);
q+=")";
}
- else if (currP==VhdlDocGen::PROCEDURE)
+ else if (s->currP==VhdlDocGen::PROCEDURE)
{
q=":procedure (";
- FlowChart::alignFuncProc(q,tempEntry->argList,false);
+ FlowChart::alignFuncProc(q,s->tempEntry->argList,false);
q+=")";
}
else
{
- q=":process( "+tempEntry->args;
+ q=":process( "+s->tempEntry->args;
q+=")";
}
@@ -674,11 +653,11 @@ void VhdlParser::createFlow()
FlowChart::addFlowChart(FlowChart::START_NO,q,0);
- if (currP==VhdlDocGen::FUNCTION)
+ if (s->currP==VhdlDocGen::FUNCTION)
{
ret="end function ";
}
- else if (currP==VhdlDocGen::PROCEDURE)
+ else if (s->currP==VhdlDocGen::PROCEDURE)
{
ret="end procedure";
}
@@ -690,60 +669,79 @@ void VhdlParser::createFlow()
FlowChart::addFlowChart(FlowChart::END_NO,ret,0);
// FlowChart::printFlowList();
FlowChart::writeFlowChart();
- currP=0;
+ s->currP=0;
}
-void VhdlParser::setMultCommentLine()
+void VHDLOutlineParser::setMultCommentLine()
{
- iDocLine=yyLineNr;
+ p->iDocLine=p->yyLineNr;
}
-void VhdlParser::oneLineComment(QCString qcs)
+void VHDLOutlineParser::oneLineComment(QCString qcs)
{
int j=qcs.find("--!");
qcs=qcs.right(qcs.length()-3-j);
- if (!checkMultiComment(qcs,iDocLine))
+ if (!checkMultiComment(qcs,p->iDocLine))
{
handleCommentBlock(qcs,TRUE);
}
}
-bool checkMultiComment(QCString& qcs,int line)
+bool VHDLOutlineParser::checkMultiComment(QCString& qcs,int line)
{
- insertEntryAtLine(VhdlParser::current_root,line);
+ VhdlParser::SharedState *s = &p->shared;
+ insertEntryAtLine(s->current_root,line);
- if (lineEntry.empty()) return false;
+ if (p->lineEntry.empty()) return false;
VhdlDocGen::prepareComment(qcs);
- while (!lineEntry.empty())
+ while (!p->lineEntry.empty())
{
- Entry *e=lineEntry.back();
+ std::shared_ptr<Entry> e=p->lineEntry.back();
e->briefLine=line;
e->brief+=qcs;
- lineEntry.pop_back();
+ p->lineEntry.pop_back();
}
return true;
}
// returns the vhdl parsed types at line xxx
-void insertEntryAtLine(const Entry* ce,int line)
+void VHDLOutlineParser::insertEntryAtLine(std::shared_ptr<Entry> ce,int line)
{
for (const auto &rt : ce->children())
{
if (rt->bodyLine==line)
{
- lineEntry.push_back(rt.get());
+ p->lineEntry.push_back(rt);
}
- insertEntryAtLine(rt.get(),line);
+ insertEntryAtLine(rt,line);
}
}
-const char *getVhdlFileName(void)
+const EntryList &getVhdlInstList()
{
- return vhdlFileName;
+ return g_instFiles;
+}
+
+void VHDLOutlineParser::error_skipto(int kind)
+{
+ Token *op;
+ do
+ {
+ Token *t = p->vhdlParser->getNextToken();// step to next token
+ op=p->vhdlParser->getToken(1); // get first token
+ if (op==0) break;
+ //fprintf(stderr,"\n %s",t->image.data());
+ } while (op->kind != kind);
+ p->vhdlParser->clearError();
+ // The above loop consumes tokens all the way up to a token of
+ // "kind". We use a do-while loop rather than a while because the
+ // current token is the one immediately before the erroneous token
+ // (in our case the token immediately before what should have been
+ // "if"/"while".
}
QCString filter2008VhdlComment(const char *s)
diff --git a/src/vhdljjparser.h b/src/vhdljjparser.h
index f3e7d70..c4a55de 100644..100755
--- a/src/vhdljjparser.h
+++ b/src/vhdljjparser.h
@@ -18,22 +18,10 @@
#include "types.h"
#include "entry.h"
#include "vhdldocgen.h"
-#include "vhdlcode.h"
-#include "memberlist.h"
#include "config.h"
-
-
-
enum { GEN_SEC=0x1, PARAM_SEC,CONTEXT_SEC,PROTECTED_SEC } ;
-void parserVhdlfile(const char* inputBuffer);
-
-class Entry;
-class ClassSDict;
-class ClassDef;
-class MemberDef;
-struct VhdlConfNode;
-
+//void parserVhdlfile(const char* inputBuffer);
/** \brief VHDL parser using state-based lexical scanning.
*
@@ -42,7 +30,8 @@ struct VhdlConfNode;
class VHDLOutlineParser : public OutlineParserInterface
{
public:
- virtual ~VHDLOutlineParser() {}
+ VHDLOutlineParser();
+ virtual ~VHDLOutlineParser();
void startTranslationUnit(const char *) {}
void finishTranslationUnit() {}
void parseInput(const char * fileName,
@@ -53,35 +42,44 @@ class VHDLOutlineParser : public OutlineParserInterface
bool needsPreprocessing(const QCString &) const { return TRUE; }
void parsePrototype(const char *text);
-};
-
-struct VhdlConfNode
-{
- VhdlConfNode(const char* a,const char* b,const char* config,const char* cs,bool leaf)
- {
- arch=a; // architecture e.g. for iobuffer
- arch=arch.lower();
- binding=b; // binding e.g. use entity work.xxx(bev)
- binding=binding.lower();
- confVhdl=config; // configuration foo is bar
- compSpec=cs;
- isInlineConf=false; // primary configuration?
- isLeaf=leaf;
- };
- QCString confVhdl;
- QCString arch;
- QCString binding;
- QCString compSpec;
- int level = 0;
- bool isLeaf = false;
- bool isInlineConf = false;
+ // interface for generated parser code
+
+ void setLineParsed(int tok);
+ int getLine(int tok);
+ int getLine();
+ void lineCount(const char*);
+ void lineCount();
+ void addProto(const char *s1,const char *s2,const char *s3,const char *s4,const char *s5,const char *s6);
+ //void addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool inlineConf);
+ void createFunction(const char *impure,uint64 spec,const char *fname);
+ void addVhdlType(const char *n,int startLine,int section, uint64 spec,const char* args,const char* type,Protection prot);
+ void addCompInst(const char *n, const char* instName, const char* comp,int iLine);
+ void handleCommentBlock(const char* doc,bool brief);
+ void handleFlowComment(const char*);
+ void initEntry(Entry *e);
+ void newEntry();
+ bool isFuncProcProced();
+ void pushLabel(QCString &,QCString&);
+ QCString popLabel(QCString & q);
+ bool addLibUseClause(const QCString &type);
+ void mapLibPackage( Entry* root);
+ void createFlow();
+ void error_skipto(int kind);
+ void oneLineComment(QCString qcs);
+ void setMultCommentLine();
+ bool checkMultiComment(QCString& qcs,int line);
+ void insertEntryAtLine(std::shared_ptr<Entry> ce,int line);
+ QString getNameID();
+ private:
+ struct Private;
+ std::unique_ptr<Private> p;
};
-void vhdlscanFreeScanner();
-const QList<VhdlConfNode>& getVhdlConfiguration();
-const std::vector<std::shared_ptr<Entry> >&getVhdlInstList();
+const EntryList &getVhdlInstList();
+
QCString filter2008VhdlComment(const char *s);
+
#endif
diff --git a/src/xmlcode.l b/src/xmlcode.l
index 94548f8..edc98d5 100644
--- a/src/xmlcode.l
+++ b/src/xmlcode.l
@@ -19,6 +19,9 @@
%option never-interactive
%option prefix="xmlcodeYY"
+%top{
+#include <stdint.h>
+}
%{
diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp
index 409c2fe..21fa77e 100644
--- a/src/xmldocvisitor.cpp
+++ b/src/xmldocvisitor.cpp
@@ -265,11 +265,36 @@ void XmlDocVisitor::visit(DocVerbatim *s)
m_t << "</verbatim>";
break;
case DocVerbatim::HtmlOnly:
+ if (s->isBlock())
+ {
+ m_t << "<htmlonly block=\"yes\">";
+ }
+ else
+ {
+ m_t << "<htmlonly>";
+ }
+ filter(s->text());
+ m_t << "</htmlonly>";
+ break;
case DocVerbatim::RtfOnly:
+ m_t << "<rtfonly>";
+ filter(s->text());
+ m_t << "</rtfonly>";
+ break;
case DocVerbatim::ManOnly:
+ m_t << "<manonly>";
+ filter(s->text());
+ m_t << "</manonly>";
+ break;
case DocVerbatim::LatexOnly:
+ m_t << "<latexonly>";
+ filter(s->text());
+ m_t << "</latexonly>";
+ break;
case DocVerbatim::DocbookOnly:
- /* nothing */
+ m_t << "<docbookonly>";
+ filter(s->text());
+ m_t << "</docbookonly>";
break;
case DocVerbatim::XmlOnly:
m_t << s->text();
@@ -363,6 +388,24 @@ void XmlDocVisitor::visit(DocInclude *inc)
filter(inc->text());
m_t << "</latexonly>";
break;
+ case DocInclude::RtfInclude:
+ m_t << "<rtfonly>";
+ filter(inc->text());
+ m_t << "</rtfonly>";
+ break;
+ case DocInclude::ManInclude:
+ m_t << "<manonly>";
+ filter(inc->text());
+ m_t << "</manonly>";
+ break;
+ case DocInclude::XmlInclude:
+ filter(inc->text());
+ break;
+ case DocInclude::DocbookInclude:
+ m_t << "<docbookonly>";
+ filter(inc->text());
+ m_t << "</docbookonly>";
+ break;
case DocInclude::VerbInclude:
m_t << "<verbatim>";
filter(inc->text());
@@ -763,7 +806,45 @@ void XmlDocVisitor::visitPost(DocHtmlRow *)
void XmlDocVisitor::visitPre(DocHtmlCell *c)
{
if (m_hide) return;
- if (c->isHeading()) m_t << "<entry thead=\"yes\">"; else m_t << "<entry thead=\"no\">";
+ if (c->isHeading()) m_t << "<entry thead=\"yes\""; else m_t << "<entry thead=\"no\"";
+ HtmlAttribListIterator li(c->attribs());
+ HtmlAttrib *opt;
+ for (li.toFirst();(opt=li.current());++li)
+ {
+ if (opt->name=="colspan" || opt->name=="rowspan")
+ {
+ m_t << " " << opt->name << "=\"" << opt->value.toInt() << "\"";
+ }
+ else if (opt->name=="align" &&
+ (opt->value=="right" || opt->value=="left" || opt->value=="center"))
+ {
+ m_t << " align=\"" << opt->value << "\"";
+ }
+ else if (opt->name=="class") // handle markdown generated attributes
+ {
+ if (opt->value.left(13)=="markdownTable") // handle markdown generated attributes
+ {
+ if (opt->value.right(5)=="Right")
+ {
+ m_t << " align='right'";
+ }
+ else if (opt->value.right(4)=="Left")
+ {
+ m_t << " align='left'";
+ }
+ else if (opt->value.right(6)=="Center")
+ {
+ m_t << " align='center'";
+ }
+ // skip 'markdownTable*' value ending with "None"
+ }
+ else if (!opt->value.isEmpty())
+ {
+ m_t << " class=\"" << convertToXML(opt->value) << "\"";
+ }
+ }
+ }
+ m_t << ">";
}
void XmlDocVisitor::visitPost(DocHtmlCell *)
@@ -824,18 +905,22 @@ void XmlDocVisitor::visitPre(DocImage *img)
{
if (m_hide) return;
- QCString baseName=img->name();
- int i;
- if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
+ QCString url = img->url();
+ QCString baseName;
+ if (url.isEmpty())
+ {
+ baseName = img->relPath()+img->name();
+ }
+ else
{
- baseName=baseName.right(baseName.length()-i-1);
+ baseName = correctURL(url,img->relPath());
}
visitPreStart(m_t, "image", FALSE, this, img->children(), baseName, TRUE, img->type(), img->width(), img->height(), img ->isInlineImage());
// copy the image to the output dir
FileDef *fd;
bool ambig;
- if ((fd=findFileDef(Doxygen::imageNameDict,img->name(),ambig)))
+ if (url.isEmpty() && (fd=findFileDef(Doxygen::imageNameDict,img->name(),ambig)))
{
QFile inImage(fd->absFilePath());
QFile outImage(Config_getString(XML_OUTPUT)+"/"+baseName.data());
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index bf5af84..d674ed8 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -1823,32 +1823,27 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
}
else
{
- SectionInfo *si = Doxygen::sectionDict->find(pd->name());
+ const SectionInfo *si = SectionManager::instance().find(pd->name());
if (si)
{
- t << " <title>" << convertToXML(convertCharEntitiesToUTF8(filterTitle(si->title)))
+ t << " <title>" << convertToXML(convertCharEntitiesToUTF8(filterTitle(si->title())))
<< "</title>" << endl;
}
}
writeInnerPages(pd->getSubPages(),t);
- SectionDict *sectionDict = pd->getSectionDict();
- if (pd->localToc().isXmlEnabled() && sectionDict)
+ const SectionRefs &sectionRefs = pd->getSectionRefs();
+ if (pd->localToc().isXmlEnabled() && !sectionRefs.empty())
{
t << " <tableofcontents>" << endl;
- SDict<SectionInfo>::Iterator li(*sectionDict);
- SectionInfo *si;
int level=1,l;
bool inLi[5]={ FALSE, FALSE, FALSE, FALSE, FALSE };
int maxLevel = pd->localToc().xmlLevel();
- for (li.toFirst();(si=li.current());++li)
+ for (const SectionInfo *si : sectionRefs)
{
- if (si->type==SectionInfo::Section ||
- si->type==SectionInfo::Subsection ||
- si->type==SectionInfo::Subsubsection ||
- si->type==SectionInfo::Paragraph)
+ if (isSection(si->type()))
{
//printf(" level=%d title=%s\n",level,si->title.data());
- int nextLevel = (int)si->type;
+ int nextLevel = (int)si->type();
if (nextLevel>level)
{
for (l=level;l<nextLevel;l++)
@@ -1868,10 +1863,10 @@ static void generateXMLForPage(PageDef *pd,FTextStream &ti,bool isExample)
if (nextLevel <= maxLevel)
{
if (inLi[nextLevel]) t << " </tocsect>" << endl;
- QCString titleDoc = convertToXML(si->title);
+ QCString titleDoc = convertToXML(si->title());
t << " <tocsect>" << endl;
- t << " <name>" << (si->title.isEmpty()?si->label:titleDoc) << "</name>" << endl;
- t << " <reference>" << convertToXML(pageName) << "_1" << convertToXML(si -> label) << "</reference>" << endl;
+ t << " <name>" << (si->title().isEmpty()?si->label():titleDoc) << "</name>" << endl;
+ t << " <reference>" << convertToXML(pageName) << "_1" << convertToXML(si->label()) << "</reference>" << endl;
inLi[nextLevel]=TRUE;
level = nextLevel;
}
diff --git a/templates/html/doxygen.css b/templates/html/doxygen.css
index 2c9dfd5..8f2c213 100644
--- a/templates/html/doxygen.css
+++ b/templates/html/doxygen.css
@@ -1661,47 +1661,6 @@ tr.heading h2 {
/* @group Markdown */
-/*
-table.markdownTable {
- border-collapse:collapse;
- margin-top: 4px;
- margin-bottom: 4px;
-}
-
-table.markdownTable td, table.markdownTable th {
- border: 1px solid ##37;
- padding: 3px 7px 2px;
-}
-
-table.markdownTableHead tr {
-}
-
-table.markdownTableBodyLeft td, table.markdownTable th {
- border: 1px solid ##37;
- padding: 3px 7px 2px;
-}
-
-th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone {
- background-color: ##47;
- color: ##ff;
- font-size: 110%;
- padding-bottom: 4px;
- padding-top: 5px;
-}
-
-th.markdownTableHeadLeft {
- text-align: left
-}
-
-th.markdownTableHeadRight {
- text-align: right
-}
-
-th.markdownTableHeadCenter {
- text-align: center
-}
-*/
-
table.markdownTable {
border-collapse:collapse;
margin-top: 4px;
diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd
index ef1374f..c7d872a 100644
--- a/templates/xml/compound.xsd
+++ b/templates/xml/compound.xsd
@@ -426,6 +426,7 @@
<xsd:element name="xmlonly" type="xsd:string" />
<xsd:element name="rtfonly" type="xsd:string" />
<xsd:element name="latexonly" type="xsd:string" />
+ <xsd:element name="docbookonly" type="xsd:string" />
<xsd:element name="image" type="docImageType" />
<xsd:element name="dot" type="docImageType" />
<xsd:element name="msc" type="docImageType" />
@@ -569,6 +570,11 @@
<xsd:element name="para" type="docParaType" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
<xsd:attribute name="thead" type="DoxBool" />
+ <xsd:attribute name="colspan" type="xsd:integer" />
+ <xsd:attribute name="rowspan" type="xsd:integer" />
+ <xsd:attribute name="align" type="DoxAlign" />
+ <xsd:attribute name="class" type="xsd:string" />
+ <xsd:anyAttribute processContents="skip"/>
</xsd:complexType>
<xsd:complexType name="docCaptionType" mixed="true">
@@ -935,5 +941,13 @@
</xsd:restriction>
</xsd:simpleType>
+ <xsd:simpleType name="DoxAlign">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="left"/>
+ <xsd:enumeration value="right"/>
+ <xsd:enumeration value="center"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+
</xsd:schema>
diff --git a/testing/020/indexpage.xml b/testing/020/indexpage.xml
index 8bfb472..8820cf7 100644
--- a/testing/020/indexpage.xml
+++ b/testing/020/indexpage.xml
@@ -6,9 +6,21 @@
<briefdescription>
</briefdescription>
<detaileddescription>
- <para>Text.
+ <para>Text. <htmlonly>
+HTML
+</htmlonly> <htmlonly block="yes">
+HTML with block
+</htmlonly> <rtfonly>
+RTF
+</rtfonly> <manonly>
+Man
+</manonly> <latexonly>
+LaTeX
+</latexonly>
XML
- More text. </para>
+ <docbookonly>
+DocBook
+</docbookonly> More text. </para>
</detaileddescription>
</compounddef>
</doxygen>
diff --git a/testing/020_only.dox b/testing/020_only.dox
index f8e2ce1..fc5afc8 100644
--- a/testing/020_only.dox
+++ b/testing/020_only.dox
@@ -1,4 +1,4 @@
-// objective: test the \*only and \*endonly commands
+// objective: test the \*only and \end*only commands
// check: indexpage.xml
/** \mainpage
* Text.
diff --git a/testing/024/indexpage.xml b/testing/024/indexpage.xml
index 7396177..fd94e77 100644
--- a/testing/024/indexpage.xml
+++ b/testing/024/indexpage.xml
@@ -6,7 +6,21 @@
<briefdescription>
</briefdescription>
<detaileddescription>
- <para>Unconditional (start) Enabled (if). Enabled (else). Unconditional (middle) Enabled (else). Unconditional (end) </para>
+ <para>Unconditional (start) Enabled (if). Enabled (else). Unconditional (middle) Enabled (else). Unconditional (end)</para>
+ <sect1 id="index_1autotoc_md0">
+ <title>with spaces</title>
+ <para>test1 test3 test4.</para>
+ <para>test1 test2 test4.</para>
+ <para>test1 test2 test3.</para>
+ <para>test1 test3.</para>
+ </sect1>
+ <sect1 id="index_1autotoc_md1">
+ <title>without spaces</title>
+ <para>test1test3test4.</para>
+ <para>test1test2test4.</para>
+ <para>test1test2test3.</para>
+ <para>test1test3. </para>
+ </sect1>
</detaileddescription>
</compounddef>
</doxygen>
diff --git a/testing/024_if.dox b/testing/024_if.dox
index f24be43..281ffe5 100644
--- a/testing/024_if.dox
+++ b/testing/024_if.dox
@@ -18,4 +18,24 @@
* Enabled (else).
* \endif
* Unconditional (end)
+ *
+ * # with spaces
+ *
+ * test1 \ifnot GUARD_ENABLED test2 \else test3 \endif test4.
+ *
+ * test1 \if GUARD_ENABLED test2 \else test3 \endif test4.
+ *
+ * test1 \if GUARD_ENABLED test2 \endif test3.
+ *
+ * test1 \if NOT_ENABLED test2 \endif test3.
+ *
+ * # without spaces
+ *
+ * test1\ifnot GUARD_ENABLED test2\else test3\endif test4.
+ *
+ * test1\if GUARD_ENABLED test2\else test3\endif test4.
+ *
+ * test1\if GUARD_ENABLED test2\endif test3.
+ *
+ * test1\if NOT_ENABLED test2\endif test3.
*/
diff --git a/testing/031/indexpage.xml b/testing/031/indexpage.xml
index 2d74510..eaf374b 100644
--- a/testing/031/indexpage.xml
+++ b/testing/031/indexpage.xml
@@ -11,42 +11,42 @@
<image type="docbook" name="sample.png"/>
More text.</para>
<para>SVG image with caption:<linebreak/>
-<image type="html" name="license-MIT-brightgreen.svg">A caption</image>
+<image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.svg">A caption</image>
</para>
<para>PNG image with caption:<linebreak/>
-<image type="html" name="license-MIT-brightgreen.png">A caption</image>
+<image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.png">A caption</image>
</para>
<para>SVG image without caption:<linebreak/>
-<image type="html" name="license-MIT-brightgreen.svg"/>
+<image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.svg"/>
</para>
<para>PNG image without caption:<linebreak/>
-<image type="html" name="license-MIT-brightgreen.png"/>
+<image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.png"/>
</para>
<para>Inline SVG image with caption:<linebreak/>
-This image is inline <image type="html" name="license-MIT-brightgreen.svg" inline="yes">MIT license</image>
+This image is inline <image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.svg" inline="yes">MIT license</image>
within the text.</para>
<para>Inline PNG image with caption:<linebreak/>
-This image is inline <image type="html" name="license-MIT-brightgreen.png" inline="yes">MIT license</image>
+This image is inline <image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.png" inline="yes">MIT license</image>
within the text.</para>
<para>Markdown style linked SVG image:<linebreak/>
-<ulink url="http://opensource.org/licenses/MIT"><image type="html" name="license-MIT-brightgreen.svg" inline="yes"/></ulink></para>
+<ulink url="http://opensource.org/licenses/MIT"><image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.svg" inline="yes"/></ulink></para>
<para>Markdown style linked PNG image:<linebreak/>
-<ulink url="http://opensource.org/licenses/MIT"><image type="html" name="license-MIT-brightgreen.png" inline="yes"/></ulink></para>
+<ulink url="http://opensource.org/licenses/MIT"><image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.png" inline="yes"/></ulink></para>
<para>HTML style linked SVG image:<linebreak/>
-<ulink url="http://opensource.org/licenses/MIT"><image type="html" name="license-MIT-brightgreen.svg" inline="yes"/></ulink></para>
+<ulink url="http://opensource.org/licenses/MIT"><image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.svg" inline="yes"/></ulink></para>
<para>HTML style linked PNG image:<linebreak/>
-<ulink url="http://opensource.org/licenses/MIT"><image type="html" name="license-MIT-brightgreen.png" inline="yes"/></ulink></para>
+<ulink url="http://opensource.org/licenses/MIT"><image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.png" inline="yes"/></ulink></para>
<para>HTML style unlinked SVG image:<linebreak/>
-<image type="html" name="license-MIT-brightgreen.svg" inline="yes"/>
+<image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.svg" inline="yes"/>
</para>
<para>HTML style unlinked PNG image:<linebreak/>
-<image type="html" name="license-MIT-brightgreen.png" inline="yes"/>
+<image type="html" name="http://img.shields.io/badge/license-MIT-brightgreen.png" inline="yes"/>
</para>
<para>Some markdown image tests<linebreak/>
-<image type="html" name="docs-Doxygen-blue.svg?foo&amp;bar" inline="yes"/>
+<image type="html" name="https://img.shields.io/badge/docs-Doxygen-blue.svg?foo&amp;bar" inline="yes"/>
<ulink url="http://www.doxygen.nl?foo&amp;bar">Some normal link</ulink></para>
<para>
- <image type="html" name="docs-Doxygen-blue.svg?foo&amp;bar" inline="yes"/>
+ <image type="html" name="https://img.shields.io/badge/docs-Doxygen-blue.svg?foo&amp;bar" inline="yes"/>
<ulink url="http://www.doxygen.nl?foo&amp;bar">Some normal link</ulink>
</para>
</detaileddescription>
diff --git a/testing/runtests.py b/testing/runtests.py
index a4118b8..10fe502 100755
--- a/testing/runtests.py
+++ b/testing/runtests.py
@@ -3,6 +3,7 @@
from __future__ import print_function
import argparse, glob, itertools, re, shutil, os, sys
import subprocess
+import shlex
config_reg = re.compile('.*\/\/\s*(?P<name>\S+):\s*(?P<value>.*)$')
@@ -28,10 +29,10 @@ def xpopen(cmd, cmd1="",encoding='utf-8-sig', getStderr=False):
return os.popen(cmd).read() # Python 2 without encoding
else:
if (getStderr):
- proc = subprocess.run(cmd1,encoding=encoding,capture_output=True) # Python 3 with encoding
- return proc.stderr
+ proc = subprocess.Popen(shlex.split(cmd1),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
+ return proc.stderr.read()
else:
- proc = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
+ proc = subprocess.Popen(shlex.split(cmd),stdout=subprocess.PIPE,stderr=subprocess.PIPE,encoding=encoding) # Python 3 with encoding
return proc.stdout.read()
class Tester:
@@ -137,7 +138,7 @@ class Tester:
print('GENERATE_DOCBOOK=NO', file=f)
if (self.args.xhtml):
print('GENERATE_HTML=YES', file=f)
- # HTML_OUTPUT can also be set locally
+ # HTML_OUTPUT can also have been set locally
print('HTML_OUTPUT=%s/html' % self.test_out, file=f)
print('HTML_FILE_EXTENSION=.xhtml', file=f)
if (self.args.pdf):
@@ -184,7 +185,7 @@ class Tester:
print('Non-existing file %s after \'check:\' statement' % check_file)
return
# convert output to canonical form
- data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)).read()
+ data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file))
if data:
# strip version
data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n')
@@ -326,7 +327,7 @@ class Tester:
tests.append(glob.glob('%s/*.xml' % (docbook_output)))
tests.append(glob.glob('%s/*/*/*.xml' % (docbook_output)))
tests = ' '.join(list(itertools.chain.from_iterable(tests))).replace(self.args.outputdir +'/','').replace('\\','/')
- exe_string = '%s --nonet --postvalid %s' % (self.args.xmllint,tests)
+ exe_string = '%s --noout --nonet --postvalid %s' % (self.args.xmllint,tests)
exe_string1 = exe_string
exe_string += ' %s' % (redirx)
exe_string += ' %s more "%s/temp"' % (separ,docbook_output)
@@ -346,7 +347,11 @@ class Tester:
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' % (self.args.xmllint,html_output)
+ check_file = []
+ check_file.append(glob.glob('%s/*.xhtml' % (html_output)))
+ check_file.append(glob.glob('%s/*/*/*.xhtml' % (html_output)))
+ check_file = ' '.join(list(itertools.chain.from_iterable(check_file))).replace(self.args.outputdir +'/','').replace('\\','/')
+ exe_string = '%s --noout --path dtd --nonet --postvalid %s' % (self.args.xmllint,check_file)
exe_string1 = exe_string
exe_string += ' %s' % (redirx)
exe_string += ' %s more "%s/temp"' % (separ,html_output)
diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt
index 43dc74d..3e52817 100644
--- a/vhdlparser/CMakeLists.txt
+++ b/vhdlparser/CMakeLists.txt
@@ -3,7 +3,7 @@ if (JAVACC_FOUND)
add_custom_command(
COMMAND ${JAVACC_EXECUTABLE} ${JAVACC_FLAGS} -OUTPUT_DIRECTORY=${CMAKE_SOURCE_DIR}/vhdlparser ${CMAKE_SOURCE_DIR}/vhdlparser/vhdlparser.jj
DEPENDS ${CMAKE_SOURCE_DIR}/vhdlparser/vhdlparser.jj
- OUTPUT ${CMAKE_SOURCE_DIR}/vhdlparser/CharStream.cc ${CMAKE_SOURCE_DIR}/vhdlparser/CharStream.h ${CMAKE_SOURCE_DIR}/vhdlparser/ErrorHandler.h ${CMAKE_SOURCE_DIR}/vhdlparser/JavaCC.h ${CMAKE_SOURCE_DIR}/vhdlparser/ParseException.cc ${CMAKE_SOURCE_DIR}/vhdlparser/ParseException.h ${CMAKE_SOURCE_DIR}/vhdlparser/Token.cc ${CMAKE_SOURCE_DIR}/vhdlparser/Token.h ${CMAKE_SOURCE_DIR}/vhdlparser/TokenManager.h ${CMAKE_SOURCE_DIR}/vhdlparser/TokenMgrError.cc ${CMAKE_SOURCE_DIR}/vhdlparser/TokenMgrError.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParser.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserConstants.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.cc ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.h
+ OUTPUT ${CMAKE_SOURCE_DIR}/vhdlparser/CharStream.cc ${CMAKE_SOURCE_DIR}/vhdlparser/CharStream.h ${CMAKE_SOURCE_DIR}/vhdlparser/ErrorHandler.h ${CMAKE_SOURCE_DIR}/vhdlparser/ParseException.cc ${CMAKE_SOURCE_DIR}/vhdlparser/ParseException.h ${CMAKE_SOURCE_DIR}/vhdlparser/Token.cc ${CMAKE_SOURCE_DIR}/vhdlparser/Token.h ${CMAKE_SOURCE_DIR}/vhdlparser/TokenManager.h ${CMAKE_SOURCE_DIR}/vhdlparser/TokenMgrError.cc ${CMAKE_SOURCE_DIR}/vhdlparser/TokenMgrError.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParser.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserConstants.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.cc ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.h
)
endif()
@@ -16,7 +16,6 @@ Token.cc
TokenMgrError.cc
VhdlParser.cc
VhdlParserTokenManager.cc
-VhdlParserIF.cpp
)
add_dependencies(vhdlparser
generate_configvalues_header
diff --git a/vhdlparser/CharStream.cc b/vhdlparser/CharStream.cc
index 65179f5..05003ef 100644
--- a/vhdlparser/CharStream.cc
+++ b/vhdlparser/CharStream.cc
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. CharStream.cc Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. CharStream.cc Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
#include "CharStream.h"
@@ -12,8 +12,8 @@ void ArrayCopy(T* src, int src_offset, T* dest, int dest_offset, int len) {
class StringReaderStream : public ReaderStream {
public:
- StringReaderStream(const JAVACC_STRING_TYPE& str) : str_(str), cur_(0), max_(str.size()) {}
- virtual size_t read(JAVACC_CHAR_TYPE *bufptr, int offset, size_t len) {
+ StringReaderStream(const JJString& str) : str_(str), cur_(0), max_(str.size()) {}
+ virtual size_t read(JJChar *bufptr, int offset, size_t len) {
size_t count = str_.copy(bufptr + offset, len > max_ ? max_ : len, cur_);
cur_ += count;
max_ -= count;
@@ -25,7 +25,7 @@ class StringReaderStream : public ReaderStream {
}
private:
- const JAVACC_STRING_TYPE str_;
+ const JJString str_;
size_t cur_;
size_t max_;
};
@@ -33,7 +33,7 @@ class StringReaderStream : public ReaderStream {
namespace vhdl {
namespace parser {
-void CharStream::ReInit(const JAVACC_STRING_TYPE& str, int startline,
+void CharStream::ReInit(const JJString& str, int startline,
int startcolumn, int buffersize) {
StringReaderStream *stream = new StringReaderStream(str);
ReInit(stream, startline, startcolumn, buffersize);
@@ -46,12 +46,12 @@ void CharStream::ReInit(ReaderStream *input_stream, int startline,
delete inputStream;
}
- if (buffer != NULL) {
+ if (buffer) {
DeleteBuffers();
}
available = bufsize = buffersize;
- buffer = new JAVACC_CHAR_TYPE[buffersize];
+ buffer = new JJChar[buffersize];
bufline = new int[buffersize];
bufcolumn = new int[buffersize];
@@ -111,7 +111,7 @@ void CharStream::adjustBeginLineColumn(int newLine, int newCol) {
}
void CharStream::ExpandBuff(bool wrapAround) {
- JAVACC_CHAR_TYPE *newbuffer = new JAVACC_CHAR_TYPE[bufsize + 2048];
+ JJChar *newbuffer = new JJChar[bufsize + 2048];
int *newbufline = new int[bufsize + 2048];
int *newbufcolumn = new int[bufsize + 2048];
@@ -160,7 +160,7 @@ void CharStream::FillBuff() {
}
}
- int i = inputStream->read(buffer, maxNextCharInd, available - maxNextCharInd);
+ size_t i = inputStream->read(buffer, maxNextCharInd, available - maxNextCharInd);
if (i > 0) {
maxNextCharInd += i;
} else {
@@ -172,7 +172,7 @@ void CharStream::FillBuff() {
}
}
-void CharStream::UpdateLineColumn(JAVACC_CHAR_TYPE c) {
+void CharStream::UpdateLineColumn(JJChar c) {
column++;
if (prevCharIsLF) {
prevCharIsLF = false;
@@ -209,4 +209,4 @@ void CharStream::UpdateLineColumn(JAVACC_CHAR_TYPE c) {
}
}
-/* JavaCC - OriginalChecksum=ade3c1b57a731a003629de593814ffa6 (do not edit this line) */
+/* JavaCC - OriginalChecksum=0ba78d6c493d812eba61de6fa794fd15 (do not edit this line) */
diff --git a/vhdlparser/CharStream.h b/vhdlparser/CharStream.h
index 69b8ab5..a955d8e 100644
--- a/vhdlparser/CharStream.h
+++ b/vhdlparser/CharStream.h
@@ -1,7 +1,8 @@
-/* Generated By:JavaCC: Do not edit this line. CharStream.h Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. CharStream.h Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef CHARSTREAM_H
-#define CHARSTREAM_H
+#ifndef JAVACC_CHARSTREAM_H_
+#define JAVACC_CHARSTREAM_H_
+
#include "JavaCC.h"
#ifndef INITIAL_BUFFER_SIZE
@@ -29,9 +30,10 @@ namespace parser {
class CharStream {
public:
- void setTabSize(int i) { tabSize = i; }
- int getTabSize(int i) { return tabSize; }
- private:
+ void setTabSize(int i) { tabSize = i; }
+ int getTabSize(int i) { return tabSize; }
+
+private:
int getBufcolumn(int pos) {
if (trackLineColumn && pos>=0) {
return bufcolumn[pos];
@@ -46,13 +48,14 @@ public:
return -1;
}
}
- public:
- virtual int getColumn() { return getBufcolumn(bufpos); }
- virtual int getLine() { return getBufline(bufpos); }
- virtual int getEndColumn() { return getBufcolumn(bufpos); }
- virtual int getEndLine() { return getBufline(bufpos); }
- virtual int getBeginColumn() { return getBufcolumn(tokenBegin); }
- virtual int getBeginLine() { return getBufline(tokenBegin); }
+
+public:
+ virtual int getColumn() { return getBufcolumn(bufpos); }
+ virtual int getLine() { return getBufline(bufpos); }
+ virtual int getEndColumn() { return getBufcolumn(bufpos); }
+ virtual int getEndLine() { return getBufline(bufpos); }
+ virtual int getBeginColumn() { return getBufcolumn(tokenBegin); }
+ virtual int getBeginLine() { return getBufline(tokenBegin); }
virtual bool getTrackLineColumn() { return trackLineColumn; }
virtual void setTrackLineColumn(bool val) { trackLineColumn = val; }
@@ -61,7 +64,7 @@ public:
* Backs up the input stream by amount steps. Lexer calls this method if it
* had already read some characters, but could not use them to match a
* (longer) token. So, they will be used again as the prefix of the next
- * token and it is the implementation's responsibility to do this right.
+ * token and it is the implemetation's responsibility to do this right.
*/
virtual inline void backup(int amount) {
inBuf += amount;
@@ -76,9 +79,9 @@ public:
* All characters must remain in the buffer between two successive calls
* to this method to implement backup correctly.
*/
- virtual inline JAVACC_CHAR_TYPE BeginToken() {
+ virtual inline JJChar BeginToken() {
tokenBegin = -1;
- JAVACC_CHAR_TYPE c = readChar();
+ JJChar c = readChar();
tokenBegin = bufpos;
return c;
}
@@ -89,7 +92,7 @@ public:
* of selecting the input is the responsibility of the class
* implementing this class.
*/
- virtual inline JAVACC_CHAR_TYPE readChar() {
+ virtual inline JJChar readChar() {
if (inBuf > 0) {
--inBuf;
++bufpos;
@@ -104,7 +107,7 @@ public:
FillBuff();
}
- JAVACC_CHAR_TYPE c = buffer[bufpos];
+ JJChar c = buffer[bufpos];
if (trackLineColumn) {
UpdateLineColumn(c);
@@ -123,11 +126,11 @@ public:
* anything that they want to. For example, for efficiency, one might decide
* to just return NULL, which is a valid implementation.
*/
- virtual JAVACC_STRING_TYPE GetImage() {
+ virtual JJString GetImage() {
if (bufpos >= tokenBegin)
- return JAVACC_STRING_TYPE(buffer + tokenBegin, bufpos - tokenBegin + 1);
+ return JJString(buffer + tokenBegin, bufpos - tokenBegin + 1);
else
- return JAVACC_STRING_TYPE(buffer + tokenBegin, bufsize - tokenBegin).append(buffer, bufpos + 1);
+ return JJString(buffer + tokenBegin, bufsize - tokenBegin).append(buffer, bufpos + 1);
}
/**
@@ -136,11 +139,11 @@ public:
* for use in actions in the case of MORE. A simple and inefficient
* implementation of this is as follows :
*/
- virtual JAVACC_STRING_TYPE GetSuffix(int len) {
+ virtual JJString GetSuffix(int len) {
if ((bufpos + 1) >= len) {
- return JAVACC_STRING_TYPE(buffer + bufpos - len + 1, len);
+ return JJString(buffer + bufpos - len + 1, len);
}
- return JAVACC_STRING_TYPE(buffer + bufsize - (len - bufpos - 1), len - bufpos - 1).append(buffer, bufpos + 1);
+ return JJString(buffer + bufsize - (len - bufpos - 1), len - bufpos - 1).append(buffer, bufpos + 1);
}
/**
@@ -160,62 +163,62 @@ public:
return inBuf == 0 && bufpos + 1 >= maxNextCharInd && inputStream->endOfInput();
}
- CharStream(const JAVACC_CHAR_TYPE *buf, int sz, int startline,
+ CharStream(const JJChar *buf, int sz, int startline,
int startcolumn, int buffersize) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
- ReInit(JAVACC_STRING_TYPE(buf, sz), startline, startcolumn, buffersize);
+ inputStream(nullptr), deleteStream(false) {
+ ReInit(JJString(buf, sz), startline, startcolumn, buffersize);
}
- CharStream(const JAVACC_CHAR_TYPE *buf, int sz, int startline, int startcolumn) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ CharStream(const JJChar *buf, int sz, int startline, int startcolumn) :
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
- ReInit(JAVACC_STRING_TYPE(buf, sz), startline, startcolumn, INITIAL_BUFFER_SIZE);
+ inputStream(nullptr), deleteStream(false) {
+ ReInit(JJString(buf, sz), startline, startcolumn, INITIAL_BUFFER_SIZE);
}
- CharStream(const JAVACC_STRING_TYPE& str, int startline,
+ CharStream(const JJString& str, int startline,
int startcolumn, int buffersize) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
+ inputStream(nullptr), deleteStream(false) {
ReInit(str, startline, startcolumn, buffersize);
}
- CharStream(const JAVACC_STRING_TYPE& str, int startline, int startcolumn) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ CharStream(const JJString& str, int startline, int startcolumn) :
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
+ inputStream(nullptr), deleteStream(false) {
ReInit(str, startline, startcolumn, INITIAL_BUFFER_SIZE);
}
CharStream(ReaderStream *input_stream, int startline,
int startcolumn, int buffersize) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
- ReInit(input_stream, startline, startcolumn, INITIAL_BUFFER_SIZE);
+ inputStream(nullptr), deleteStream(false) {
+ ReInit(input_stream, startline, startcolumn, buffersize);
}
CharStream(ReaderStream *input_stream, int startline, int startcolumn) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
+ inputStream(nullptr), deleteStream(false) {
ReInit(input_stream, startline, startcolumn, INITIAL_BUFFER_SIZE);
}
CharStream(ReaderStream *input_stream) :
- bufline(NULL), bufcolumn(NULL), buffer(NULL), bufpos(0), bufsize(0),
+ bufline(nullptr), bufcolumn(nullptr), buffer(nullptr), bufpos(0), bufsize(0),
tokenBegin(0), column(0), line(0), prevCharIsCR(false), prevCharIsLF(false),
available(0), maxNextCharInd(0), inBuf(0), tabSize(1), trackLineColumn(true),
- inputStream(NULL), deleteStream(false) {
+ inputStream(nullptr), deleteStream(false) {
ReInit(input_stream, 1, 1, INITIAL_BUFFER_SIZE);
}
@@ -229,22 +232,22 @@ public:
ReInit(input_stream, 1, 1, INITIAL_BUFFER_SIZE);
}
- virtual void ReInit(const JAVACC_STRING_TYPE& str, int startline,
+ virtual void ReInit(const JJString& str, int startline,
int startcolumn, int buffersize);
- virtual void ReInit(const JAVACC_STRING_TYPE& str, int startline,
+ virtual void ReInit(const JJString& str, int startline,
int startcolumn) {
ReInit(str, startline, startcolumn, INITIAL_BUFFER_SIZE);
}
virtual void adjustBeginLineColumn(int newLine, int newCol);
- protected:
- virtual void UpdateLineColumn(JAVACC_CHAR_TYPE c);
+protected:
+ virtual void UpdateLineColumn(JJChar c);
int* bufline;
int* bufcolumn;
- JAVACC_CHAR_TYPE* buffer;
+ JJChar* buffer;
int bufpos;
int bufsize;
int tokenBegin;
@@ -263,5 +266,6 @@ public:
}
}
+
#endif
-/* JavaCC - OriginalChecksum=3f0e693d1617236429891c8c95713d73 (do not edit this line) */
+/* JavaCC - OriginalChecksum=c5b4b2e72393f865547f405cc9def169 (do not edit this line) */
diff --git a/vhdlparser/ErrorHandler.h b/vhdlparser/ErrorHandler.h
index 224500e..d5535e8 100644
--- a/vhdlparser/ErrorHandler.h
+++ b/vhdlparser/ErrorHandler.h
@@ -1,7 +1,8 @@
-/* Generated By:JavaCC: Do not edit this line. ErrorHandler.h Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. ErrorHandler.h Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,BUILD_PARSER=true,BUILD_TOKEN_MANAGER=true */
-#ifndef ERRORHANDLER_H
-#define ERRORHANDLER_H
+#ifndef JAVACC_ERRORHANDLER_H
+#define JAVACC_ERRORHANDLER_H
+
#include <stdio.h>
#include <string>
#include "JavaCC.h"
@@ -10,7 +11,7 @@
namespace vhdl {
namespace parser {
-JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str);
+JJSimpleString addUnicodeEscapes(const JJString& str);
class VhdlParser;
class ErrorHandler {
@@ -24,22 +25,22 @@ JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str);
// expectedKind - token kind that the parser was trying to consume.
// expectedToken - the image of the token - tokenImages[expectedKind].
// actual - the actual token that the parser got instead.
- virtual void handleUnexpectedToken(int expectedKind, JAVACC_STRING_TYPE expectedToken, Token *actual, VhdlParser *parser) {
+ virtual void handleUnexpectedToken(int expectedKind, const JJString& expectedToken, Token *actual, VhdlParser *parser) {
error_count++;
fprintf(stderr, "Expecting %s at: %d:%d but got %s\n", addUnicodeEscapes(expectedToken).c_str(), actual->beginLine, actual->beginColumn, addUnicodeEscapes(actual->image).c_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 occurs.
- virtual void handleParseError(Token *last, Token *unexpected, JAVACC_SIMPLE_STRING production, VhdlParser *parser) {
+ // production - the production in which this error occurrs.
+ virtual void handleParseError(Token *last, Token *unexpected, const JJSimpleString& 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());
}
virtual int getErrorCount() {
return error_count;
}
- virtual void handleOtherError(JAVACC_STRING_TYPE message, VhdlParser *parser) {
+ virtual void handleOtherError(const JJString& message, VhdlParser *parser) {
fprintf(stderr, "Error: %s\n", (char*)message.c_str());
}
virtual ~ErrorHandler() {}
@@ -62,11 +63,11 @@ JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str);
// errorAfter : prefix that was seen before this error occurred
// curchar : the offending character
//
- virtual void lexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, VhdlParserTokenManager* token_manager) {
+ virtual void lexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar, VhdlParserTokenManager* token_manager) {
// by default, we just print an error message and return.
fprintf(stderr, "Lexical error at: %d:%d. Encountered: %c after: %s.\n", errorLine, errorColumn, curChar, (EOFSeen? "EOF" : (const char*)errorAfter.c_str()));
}
- virtual void lexicalError(JAVACC_STRING_TYPE errorMessage, VhdlParserTokenManager* token_manager) {
+ virtual void lexicalError(const JJString& errorMessage, VhdlParserTokenManager* token_manager) {
fprintf(stderr, "%s\n", (char*)errorMessage.c_str());
}
virtual ~TokenManagerErrorHandler() {}
@@ -76,4 +77,5 @@ JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str);
}
#endif
-/* JavaCC - OriginalChecksum=c18f1105ba178be8e21cc9f279f94496 (do not edit this line) */
+
+/* JavaCC - OriginalChecksum=5361b31ac6530c6c23511012deb15394 (do not edit this line) */
diff --git a/vhdlparser/JavaCC.h b/vhdlparser/JavaCC.h
index 2d34634..5889e93 100644
--- a/vhdlparser/JavaCC.h
+++ b/vhdlparser/JavaCC.h
@@ -35,10 +35,10 @@ public:
const JAVACC_CHAR_TYPE EMPTY[] = { 0 };
#ifndef MAX
-#define MAX(a,b) (a>=b?a:b)
+#define MAX(a,b) ((a)>=(b)?(a):(b))
#endif
#ifndef MIN
-#define MIN(a,b) (a<=b?a:b)
+#define MIN(a,b) ((a)<=(b)?(a):(b))
#endif
template<typename T>
diff --git a/vhdlparser/JavaCC.h.in b/vhdlparser/JavaCC.h.in
index 224b2b5..5889e93 100644
--- a/vhdlparser/JavaCC.h.in
+++ b/vhdlparser/JavaCC.h.in
@@ -1,31 +1,33 @@
-/* Generated By:JavaCC: Do not edit this line. JavaCC.h Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. JavaCC.h Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef JAVACC_H_
-#define JAVACC_H_
-#include <stdio.h>
+#ifndef JAVACC_JAVACC_H_
+#define JAVACC_JAVACC_H_
+
#include <string>
-#include <memory.h>
-#include <assert.h>
-#include "vhdlstring.h"
+#include <memory>
+#include <cassert>
+#include <functional>
#ifndef JAVACC_CHAR_TYPE
#define JAVACC_CHAR_TYPE char
#endif
#ifndef JAVACC_STRING_TYPE
-#define JAVACC_STRING_TYPE VhdlString
+#define JAVACC_STRING_TYPE std::basic_string<JAVACC_CHAR_TYPE>
#endif
-#define JAVACC_SIMPLE_STRING VhdlString
+#define JAVACC_SIMPLE_STRING std::basic_string<char>
-typedef JAVACC_STRING_TYPE StringBuffer;
-typedef JAVACC_STRING_TYPE String;
+typedef JAVACC_CHAR_TYPE JJChar;
+typedef JAVACC_STRING_TYPE JJString;
+typedef JAVACC_STRING_TYPE JJStringBuffer;
+typedef JAVACC_SIMPLE_STRING JJSimpleString;
// Abstraction on stream classes to read a block of data into a buffer.
class ReaderStream {
public:
// Read block of data into a buffer and return the actual number read.
- virtual size_t read(JAVACC_CHAR_TYPE * /*bufptr*/, int /*offset*/, size_t /*len*/) { return 0; }
+ virtual size_t read(JAVACC_CHAR_TYPE *buffer, int offset, size_t len) { return 0; }
virtual bool endOfInput() { return true; }
virtual ~ReaderStream() {}
};
@@ -33,11 +35,26 @@ public:
const JAVACC_CHAR_TYPE EMPTY[] = { 0 };
#ifndef MAX
-#define MAX(a,b) ((a)>(b)?(a):(b))
+#define MAX(a,b) ((a)>=(b)?(a):(b))
#endif
#ifndef MIN
-#define MIN(a,b) ((a)<(b)?(a):(b))
+#define MIN(a,b) ((a)<=(b)?(a):(b))
#endif
+template<typename T>
+struct JJEnter
+{
+ JJEnter(T f_) : f{f_} {f();}
+ ~JJEnter(){}
+ T f;
+};
+template<typename T>
+struct JJExit
+{
+ JJExit(T f_) : f{f_} {}
+ ~JJExit(){f();}
+ T f;
+};
+
#endif
-/* JavaCC - OriginalChecksum=eb066370c81bb58bb68713327da9719f (do not edit this line) */
+/* JavaCC - OriginalChecksum=b719dd5e5f87efc5315d14df0b701850 (do not edit this line) */
diff --git a/vhdlparser/ParseException.cc b/vhdlparser/ParseException.cc
index 375ff6c..9f256d9 100644
--- a/vhdlparser/ParseException.cc
+++ b/vhdlparser/ParseException.cc
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.cc Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. ParseException.cc Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
#include "ParseException.h"
@@ -23,7 +23,7 @@ namespace parser {
*/
ParseException::ParseException(Token currentTokenVal,
int** expectedTokenSequencesVal,
- JAVACC_STRING_TYPE* tokenImageVal
+ JJString* tokenImageVal
)
{
initialise(currentTokenVal, expectedTokenSequencesVal, tokenImageVal);
@@ -46,14 +46,14 @@ namespace parser {
}
/** Constructor with message. */
- ParseException::ParseException(JAVACC_STRING_TYPE message) {
+ ParseException::ParseException(const JJString& message) {
}
/**
* This is the last token that has been consumed successfully. If
* this object has been created due to a parse error, the token
- * following this token will (therefore) be the first error token.
+ * followng this token will (therefore) be the first error token.
*/
Token currentToken;
@@ -69,7 +69,7 @@ namespace parser {
* parser within which the parse error occurred. This array is
* defined in the generated ...Constants class.
*/
- JAVACC_STRING_TYPE* tokenImage;
+ JJString* tokenImage;
/**
* It uses "currentToken" and "expectedTokenSequences" to generate a parse
@@ -78,12 +78,12 @@ namespace parser {
* from the parser) the correct error message
* gets displayed.
*/
- JAVACC_STRING_TYPE ParseException::initialise(Token currentToken,
+ JJString ParseException::initialise(Token currentToken,
int** expectedTokenSequences,
- JAVACC_STRING_TYPE* tokenImage) {
+ JJString* tokenImage) {
#if 0
- //JAVACC_STRING_TYPE eol = System.getProperty("line.separator", "\n");
- expected = new JAVACC_STRING_TYPE();
+ //JJString eol = System.getProperty("line.separator", "\n");
+ expected = new JJString();
int maxSize = 0;
for (int i = 0; i < expectedTokenSequences.length; i++) {
if (maxSize < expectedTokenSequences[i].length) {
@@ -93,39 +93,39 @@ namespace parser {
expected.append(tokenImage[expectedTokenSequences[i][j]]).append(' ');
}
if (expectedTokenSequences[i][expectedTokenSequences[i].length - 1] != 0) {
- expected.append((JAVACC_CHAR_TYPE*)"...");
+ expected.append((JJChar*)"...");
}
expected.append(eol).append(" ");
}
- JAVACC_STRING_TYPE retval = (JAVACC_CHAR_TYPE*)"Encountered \"";
+ JJString retval = (JJChar*)"Encountered \"";
Token tok = currentToken.next;
for (int i = 0; i < maxSize; i++) {
- if (i != 0) retval += (JAVACC_CHAR_TYPE*)" ";
+ if (i != 0) retval += (JJChar*)" ";
if (tok.kind == 0) {
retval += tokenImage[0];
break;
}
- retval += (JAVACC_CHAR_TYPE*)" " + tokenImage[tok.kind];
- retval += (JAVACC_CHAR_TYPE*)" \"";
+ retval += (JJChar*)" " + tokenImage[tok.kind];
+ retval += (JJChar*)" \"";
retval += add_escapes(tok.image);
- retval += (JAVACC_CHAR_TYPE*)" \"";
+ retval += (JJChar*)" \"";
tok = tok.next;
}
- retval += (JAVACC_CHAR_TYPE*)"\" at line " + currentToken.next.beginLine + (JAVACC_CHAR_TYPE*)", column " + currentToken.next.beginColumn;
- retval += (JAVACC_CHAR_TYPE*)"." + eol;
+ retval += (JJChar*)"\" at line " + currentToken.next.beginLine + (JJChar*)", column " + currentToken.next.beginColumn;
+ retval += (JJChar*)"." + eol;
if (expectedTokenSequences.length == 1) {
- retval += (JAVACC_CHAR_TYPE*)"Was expecting:" + eol + (JAVACC_CHAR_TYPE*)" ";
+ retval += (JJChar*)"Was expecting:" + eol + (JJChar*)" ";
} else {
- retval += (JAVACC_CHAR_TYPE*)"Was expecting one of:" + eol + (JAVACC_CHAR_TYPE*)" ";
+ retval += (JJChar*)"Was expecting one of:" + eol + (JJChar*)" ";
}
retval += expected.toString();
return retval;
#endif
- return (JAVACC_CHAR_TYPE*)"Parse exception";
+ return (JJChar*)"Parse exception";
}
/**
- * The end of line JAVACC_STRING_TYPE for this machine.
+ * The end of line JJString for this machine.
*/
#define eol "\n"
@@ -134,10 +134,10 @@ namespace parser {
* when these raw version cannot be used as part of an ASCII
* string literal.
*/
- JAVACC_STRING_TYPE ParseException::add_escapes(JAVACC_STRING_TYPE str) {
+ JJString ParseException::add_escapes(const JJString& str) {
/*
- JAVACC_STRING_TYPE *retval = new JAVACC_STRING_TYPE();
- JAVACC_CHAR_TYPE ch;
+ JJString *retval = new JJString();
+ JJChar ch;
for (int i = 0; i < str.length(); i++) {
switch (str.charAt(i))
{
@@ -167,7 +167,7 @@ namespace parser {
continue;
default:
if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
- JAVACC_STRING_TYPE s = "0000" + Integer.toString(ch, 16);
+ JJString s = "0000" + Integer.toString(ch, 16);
retval.append("\\u" + s.substring(s.length() - 4, s.length()));
} else {
retval.append(ch);
@@ -181,4 +181,4 @@ namespace parser {
}
}
-/* JavaCC - OriginalChecksum=9f6af8fd72f5fe3e4210cf02acbd8387 (do not edit this line) */
+/* JavaCC - OriginalChecksum=7a72405661a136830ccf7f3cab0fffdc (do not edit this line) */
diff --git a/vhdlparser/ParseException.h b/vhdlparser/ParseException.h
index 4a22772..c4afc27 100644
--- a/vhdlparser/ParseException.h
+++ b/vhdlparser/ParseException.h
@@ -1,7 +1,8 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.h Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. ParseException.h Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef _PARSE_EXCEPTION_H
-#define _PARSE_EXCEPTION_H
+#ifndef JAVACC_PARSE_EXCEPTION_H
+#define JAVACC_PARSE_EXCEPTION_H
+
#include "JavaCC.h"
#include "Token.h"
@@ -28,7 +29,7 @@ class ParseException {
*/
ParseException(Token currentTokenVal,
int** expectedTokenSequencesVal,
- JAVACC_STRING_TYPE* tokenImageVal
+ JJString* tokenImageVal
);
/**
@@ -44,13 +45,13 @@ class ParseException {
ParseException();
/** Constructor with message. */
- ParseException(JAVACC_STRING_TYPE message);
+ ParseException(const JJString& message);
/**
* This is the last token that has been consumed successfully. If
* this object has been created due to a parse error, the token
- * following this token will (therefore) be the first error token.
+ * followng this token will (therefore) be the first error token.
*/
Token currentToken;
@@ -66,7 +67,7 @@ class ParseException {
* parser within which the parse error occurred. This array is
* defined in the generated ...Constants class.
*/
- JAVACC_STRING_TYPE* tokenImage;
+ JJString* tokenImage;
/**
* It uses "currentToken" and "expectedTokenSequences" to generate a parse
@@ -75,9 +76,9 @@ class ParseException {
* from the parser) the correct error message
* gets displayed.
*/
- private: JAVACC_STRING_TYPE initialise(Token currentToken,
+ private: JJString initialise(Token currentToken,
int** expectedTokenSequences,
- JAVACC_STRING_TYPE* tokenImage);
+ JJString* tokenImage);
/**
* The end of line string for this machine.
@@ -89,11 +90,12 @@ class ParseException {
* when these raw version cannot be used as part of an ASCII
* string literal.
*/
- JAVACC_STRING_TYPE add_escapes(JAVACC_STRING_TYPE str);
+ JJString add_escapes(const JJString& str);
};
}
}
+
#endif
-/* JavaCC - OriginalChecksum=bd87c2fc11a4306bd2c2482fd1025b7c (do not edit this line) */
+/* JavaCC - OriginalChecksum=6705523c0ea4e83f3c38da57253c0aea (do not edit this line) */
diff --git a/vhdlparser/Token.cc b/vhdlparser/Token.cc
index 735091d..d47dc68 100644
--- a/vhdlparser/Token.cc
+++ b/vhdlparser/Token.cc
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. Token.cc Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. Token.cc Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDES=,TOKEN_EXTENDS= */
#include "Token.h"
@@ -18,42 +18,46 @@ namespace parser {
* override this method as appropriate.
*/
void * Token::getValue() {
- return NULL;
+ return nullptr;
}
/**
* No-argument constructor
*/
- Token::Token() {
- this->next = NULL;
- this->specialToken = NULL;
+ Token::Token() :
+ beginLine(0), beginColumn(0), endLine(0), endColumn(0)
+ {
+ this->next = nullptr;
+ this->specialToken = nullptr;
}
/**
* Constructs a new token for the specified Image.
*/
- Token::Token(int kind)
+ Token::Token(int kind) :
+ beginLine(0), beginColumn(0), endLine(0), endColumn(0)
{
this->kind = kind;
- this->next = NULL;
- this->specialToken = NULL;
+ this->next = nullptr;
+ this->specialToken = nullptr;
}
/**
* Constructs a new token for the specified Image and Kind.
*/
- Token::Token(int kind, JAVACC_STRING_TYPE image)
+ Token::Token(int kind, const JJString& image)
+ : beginLine(0), beginColumn(0), endLine(0), endColumn(0)
{
this->kind = kind;
this->image = image;
- this->next = NULL;
- this->specialToken = NULL;
+ this->next = nullptr;
+ this->specialToken = nullptr;
}
/**
* Returns the image.
*/
- JAVACC_STRING_TYPE Token::toString()
+ const JJString& Token::toString()
{
return image;
}
@@ -70,7 +74,7 @@ namespace parser {
* to the following switch statement. Then you can cast matchedToken
* variable to the appropriate type and use sit in your lexical actions.
*/
- Token *Token::newToken(int ofKind, JAVACC_STRING_TYPE image)
+ Token *Token::newToken(int ofKind, const JJString& image)
{
switch(ofKind)
{
@@ -80,13 +84,16 @@ namespace parser {
Token *Token::newToken(int ofKind)
{
- return newToken(ofKind, JAVACC_STRING_TYPE((JAVACC_CHAR_TYPE*)""));
+ return newToken(ofKind, JJString());
}
Token::~Token() {
if (specialToken) delete specialToken;
+ this->kind = 0;
+ this->next = nullptr;
+ this->specialToken = nullptr;
}
}
}
-/* JavaCC - OriginalChecksum=dcb0f64486aa6455ae5af05d6bb539ec (do not edit this line) */
+/* JavaCC - OriginalChecksum=01131f3b3906a670aa8fee6224233701 (do not edit this line) */
diff --git a/vhdlparser/Token.h b/vhdlparser/Token.h
index 040899e..3575005 100644
--- a/vhdlparser/Token.h
+++ b/vhdlparser/Token.h
@@ -1,7 +1,8 @@
-/* Generated By:JavaCC: Do not edit this line. Token.h Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. Token.h Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true,TOKEN_INCLUDES=,TOKEN_EXTENDS= */
-#ifndef TOKEN_H
-#define TOKEN_H
+#ifndef JAVACC_TOKEN_H
+#define JAVACC_TOKEN_H
+
#include "JavaCC.h"
@@ -35,7 +36,7 @@ class Token
/**
* The string image of the token.
*/
- JAVACC_STRING_TYPE image;
+ JJString image;
/**
* A reference to the next regular (non-special) token from the input
@@ -84,14 +85,14 @@ class Token
/**
* Constructs a new token for the specified Image and Kind.
*/
- Token(int kind, JAVACC_STRING_TYPE image);
+ Token(int kind, const JJString& image);
virtual ~Token();
/**
* Returns the image.
*/
- JAVACC_STRING_TYPE toString();
+ const JJString& toString();
/**
@@ -106,12 +107,13 @@ class Token
* to the following switch statement. Then you can cast matchedToken
* variable to the appropriate type and use sit in your lexical actions.
*/
- static Token *newToken(int ofKind, JAVACC_STRING_TYPE image);
+ static Token *newToken(int ofKind, const JJString& image);
static Token *newToken(int ofKind);
};
}
}
+
#endif
-/* JavaCC - OriginalChecksum=4748c3d6443aa3445d3c95ab54f14c2a (do not edit this line) */
+/* JavaCC - OriginalChecksum=8c237423e3d9695c3bfcf539bcf92375 (do not edit this line) */
diff --git a/vhdlparser/TokenManager.h b/vhdlparser/TokenManager.h
index 0c2caa6..6b158ae 100644
--- a/vhdlparser/TokenManager.h
+++ b/vhdlparser/TokenManager.h
@@ -1,13 +1,12 @@
-/* Generated By:JavaCC: Do not edit this line. TokenManager.h Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. TokenManager.h Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef TOKENMANAGER_H
-#define TOKENMANAGER_H
+#ifndef JAVACC_TOKENMANAGER_H
+#define JAVACC_TOKENMANAGER_H
+
#include <iostream>
#include "JavaCC.h"
#include "Token.h"
-using namespace std;
-
namespace vhdl {
namespace parser {
/**
@@ -23,13 +22,15 @@ public:
*/
virtual ~TokenManager() { }
virtual Token *getNextToken() = 0;
+ virtual void setParser(void* parser) {};
virtual void lexicalError() {
- cerr << "Lexical error encountered." << endl;
+ std::cerr << "Lexical error encountered." << std::endl;
}
};
}
}
+
#endif
-/* JavaCC - OriginalChecksum=918e2eba53e028d6c4142283ce3f498f (do not edit this line) */
+/* JavaCC - OriginalChecksum=c5e389e7ee25f48da34e517ae429ac2a (do not edit this line) */
diff --git a/vhdlparser/TokenMgrError.cc b/vhdlparser/TokenMgrError.cc
index 74908f0..3560805 100644
--- a/vhdlparser/TokenMgrError.cc
+++ b/vhdlparser/TokenMgrError.cc
@@ -1,4 +1,4 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.cc Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.cc Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
#include "TokenMgrError.h"
@@ -14,17 +14,17 @@ namespace parser {
* errorLine : line number when the error occurred
* errorColumn : column number when the error occurred
* errorAfter : prefix that was seen before this error occurred
- * curJAVACC_CHAR_TYPE : the offending character
+ * curJJChar : the offending character
* Note: You can customize the lexical error message by modifying this method.
*/
- JAVACC_STRING_TYPE TokenMgrError::LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar) {
+ JJString TokenMgrError::LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar) {
#if 0
- JAVACC_STRING_TYPE s;
- stringstream<JAVACC_STRING_TYPE> ss;
+ JJString s;
+ stringstream<JJString> ss;
ss << "Lexical error at line " << errorLine << " column " << errorColumn
<< ". Encountered: " << curChar << "(" << (int)curChar
<< ") after : \"" << errorAfter.c_str() << "\"";
- return (JAVACC_STRING_TYPE)ss.rdbuf()->str();
+ return (JJString)ss.rdbuf()->str();
#endif
return EMPTY;
}
@@ -38,7 +38,7 @@ namespace parser {
*
* from this method for such cases in the release version of your parser.
*/
- JAVACC_STRING_TYPE TokenMgrError::getMessage() {
+ JJString TokenMgrError::getMessage() {
return message;
}
@@ -51,12 +51,12 @@ namespace parser {
}
/** Constructor with message and reason. */
- TokenMgrError::TokenMgrError(JAVACC_STRING_TYPE message, int reason) {
+ TokenMgrError::TokenMgrError(const JJString& message, int reason) {
errorCode = reason;
}
/** Full Constructor. */
- TokenMgrError::TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, int reason) {
+ TokenMgrError::TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar, int reason) {
message = LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter, curChar);
errorCode = reason;
}
@@ -64,7 +64,7 @@ namespace parser {
// i < 16 - guaranteed
char hexChar(int i) {
if (i < 10) {
- return i + '0';
+ return i - '0';
}
return 'a' + (i - 10);
}
@@ -73,10 +73,10 @@ char hexChar(int i) {
* Replaces unprintable characters by their escaped (or unicode escaped)
* equivalents in the given string
*/
-JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str) {
- JAVACC_SIMPLE_STRING retval;
+JJSimpleString addUnicodeEscapes(const JJString& str) {
+ JJSimpleString retval;
for (size_t i = 0; i < str.size(); i++) {
- JAVACC_CHAR_TYPE ch = str[i];
+ JJChar ch = str[i];
switch (ch)
{
case '\b':
@@ -115,4 +115,4 @@ JAVACC_SIMPLE_STRING addUnicodeEscapes(JAVACC_STRING_TYPE str) {
}
}
-/* JavaCC - OriginalChecksum=72f292bc267bd0602e63291bf864f942 (do not edit this line) */
+/* JavaCC - OriginalChecksum=ed66d80b94c73435ce2644e44f7b4d49 (do not edit this line) */
diff --git a/vhdlparser/TokenMgrError.h b/vhdlparser/TokenMgrError.h
index abb305d..90c7530 100644
--- a/vhdlparser/TokenMgrError.h
+++ b/vhdlparser/TokenMgrError.h
@@ -1,7 +1,8 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.h Version 6.2 */
+/* Generated By:JavaCC: Do not edit this line. TokenMgrError.h Version 7.0 */
/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
-#ifndef _TOKENMGRERROR_H
-#define _TOKENMGRERROR_H
+#ifndef JAVACC_TOKENMGRERROR_H
+#define JAVACC_TOKENMGRERROR_H
+
#include "JavaCC.h"
@@ -54,10 +55,10 @@ public:
* curchar : the offending character
* Note: You can customize the lexical error message by modifying this method.
*/
- JAVACC_STRING_TYPE LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar);
+ JJString LexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar);
private:
- JAVACC_STRING_TYPE message;
+ JJString message;
/**
* You can also modify the body of this method to customize your error messages.
@@ -69,7 +70,7 @@ private:
* from this method for such cases in the release version of your parser.
*/
public:
- JAVACC_STRING_TYPE getMessage() ;
+ JJString getMessage() ;
/*
* Constructors of various flavors follow.
@@ -79,13 +80,14 @@ public:
TokenMgrError() ;
/** Constructor with message and reason. */
- TokenMgrError(JAVACC_STRING_TYPE message, int reason) ;
+ TokenMgrError(const JJString& message, int reason) ;
/** Full Constructor. */
- TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, JAVACC_STRING_TYPE errorAfter, JAVACC_CHAR_TYPE curChar, int reason) ;
+ TokenMgrError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar, int reason) ;
};
}
}
+
#endif
-/* JavaCC - OriginalChecksum=c22a1b25630ec91deb47dcba22b6b39d (do not edit this line) */
+/* JavaCC - OriginalChecksum=4ab4cdcdef6a3feec22fd9c00ba86e07 (do not edit this line) */
diff --git a/vhdlparser/VhdlParser.cc b/vhdlparser/VhdlParser.cc
index b360217..ab38310 100644
--- a/vhdlparser/VhdlParser.cc
+++ b/vhdlparser/VhdlParser.cc
@@ -4,17 +4,17 @@
namespace vhdl {
namespace parser {
unsigned int jj_la1_0[] = {
-0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x0,0x90404000,0x20080000,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x90004000,0x400000,0x0,0x90404000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20080000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x40000000,0x0,0x400000,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x40020000,0x40020001,0x0,0x0,0x0,0x40000000,0xd0020000,0x0,0x0,0x800000,0x0,0x0,0x80004000,0x400000,0x0,0x0,0x80404000,0x0,0x0,0x0,0x0,0x8000,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x10000,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x10000000,0x0,0x50000000,0x8000,0x0,0x80000000,0x0,0x80000000,0x80000000,0x4000000,0x8000000,0x0,0x0,0x20000,0x0,0x0,0x0,0x0,0x800,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x80004000,0x0,0x80004000,0x0,0x0,0x0,0x0,0x90004000,0x400000,0x0,0x0,0x90404000,0x0,0x0,0x0,0x40000000,0x0,0x0,0x80004000,0x400000,0x0,0x80404000,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x20080000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x8000000,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80004000,0x400000,0x0,0x80404000,0x0,0x0,0x0,0x0,0x0,0x0,0x20080000,0x8000,0x0,0x0,0x41000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x2000,0x0,0x80004000,0x400000,0x0,0x80404000,0x0,0x400000,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x90c04000,0x20080000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
+0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x0,0x90404000,0x20080000,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x90004000,0x400000,0x0,0x90404000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20080000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x40000000,0x0,0x400000,0x400000,0x0,0x0,0x0,0x0,0x0,0x40020000,0x40020001,0x0,0x0,0x0,0x40000000,0xd0020000,0x0,0x0,0x800000,0x0,0x0,0x80004000,0x400000,0x0,0x0,0x80404000,0x0,0x0,0x0,0x0,0x8000,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x10000,0x0,0x10800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10800,0x10000000,0x0,0x50000000,0x8000,0x80000000,0x0,0x80000000,0x80000000,0x4000000,0x8000000,0x0,0x0,0x20000,0x0,0x0,0x0,0x0,0x800,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x80004000,0x0,0x80004000,0x0,0x0,0x0,0x0,0x0,0x0,0x90004000,0x400000,0x0,0x0,0x90404000,0x0,0x0,0x0,0x40000000,0x0,0x0,0x80004000,0x400000,0x0,0x80404000,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x20080000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10800,0x0,0x0,0x20000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x8000000,0x0,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x80004000,0x400000,0x0,0x80404000,0x0,0x0,0x0,0x0,0x0,0x0,0x20080000,0x0,0x8000,0x0,0x0,0x41000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10800,0x2000,0x0,0x80004000,0x400000,0x0,0x80404000,0x0,0x400000,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x90c04000,0x20080000,0x0,0x0,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
unsigned int jj_la1_1[] = {
-0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x125808,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x0,0x0,0x1000,0x104800,0x1008,0x20000,0x125808,0x10000,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x1000,0x1000000,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x20000,0x1000,0x0,0x4000000,0x4000000,0x0,0x400000,0x4000101,0x4000101,0x0,0x10,0x0,0x100,0x12024900,0x0,0x0,0x0,0x100,0x0,0x104800,0x8,0x20000,0x0,0x124808,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x0,0x0,0x81000,0x0,0x0,0x0,0x0,0x0,0x40,0x20,0x0,0x0,0x0,0x0,0x0,0x100,0x0,0x0,0x800,0x0,0x0,0x0,0x8a00000,0x0,0x0,0x1000,0x1,0x0,0x0,0x1000,0x0,0x0,0x8a00000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x40000,0x400000,0x0,0x0,0x104800,0x20000,0x124800,0x0,0x0,0x10000,0x10000,0x104800,0x8,0x20000,0x0,0x124808,0x0,0x0,0x0,0x100,0x0,0x0,0x104800,0x0,0x20000,0x124800,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x20081200,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x104000,0x1000000,0x1104800,0x0,0x20000,0x1124800,0x4000,0x0,0x100000,0x100000,0x0,0x104000,0x20081200,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x1104800,0x0,0x20000,0x1124800,0x0,0x104000,0x104000,0x4000001,0x1,0x0,0x4000001,0x10000,0x10000,0x10000,0x0,0x0,0x125808,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x20,0x0,0x200000,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x200000,0x0,0x0,0x0,0x200000,0x0,0x20,0x104000,0x100000,0x100000,0x0,0x1000000,0x0,0x0,0x104000,};
+0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x125808,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x0,0x0,0x1000,0x104800,0x1008,0x20000,0x125808,0x10000,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x10000,0x1000,0x1000000,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x20000,0x1000,0x0,0x4000001,0x0,0x400000,0x4000101,0x4000101,0x0,0x10,0x0,0x100,0x12024900,0x0,0x0,0x0,0x100,0x0,0x104800,0x8,0x20000,0x0,0x124808,0x0,0x10000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x200000,0x0,0x0,0x0,0x81000,0x0,0x0,0x0,0x0,0x0,0x40,0x20,0x0,0x0,0x0,0x0,0x0,0x100,0x0,0x800,0x0,0x0,0x0,0x8a00000,0x0,0x0,0x1000,0x0,0x0,0x0,0x1000,0x0,0x0,0x8a00000,0x80000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x800,0x40000,0x400000,0x0,0x0,0x104800,0x20000,0x124800,0x10000,0x10000,0x0,0x0,0x10000,0x10000,0x104800,0x8,0x20000,0x0,0x124808,0x0,0x0,0x0,0x100,0x1,0x0,0x104800,0x0,0x20000,0x124800,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x20081200,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x104000,0x1000000,0x1104800,0x0,0x20000,0x1124800,0x4000,0x0,0x100000,0x100000,0x0,0x104000,0x20081200,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000,0x0,0x0,0x0,0x0,0x1104800,0x0,0x20000,0x1124800,0x0,0x104000,0x104000,0x4000001,0x1,0x0,0x4000001,0x10000,0x10000,0x10000,0x0,0x0,0x125808,0x0,0x20,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x400000,0x20,0x0,0x200000,0x0,0x0,0x0,0x0,0x0,0x400000,0x0,0x200000,0x0,0x0,0x0,0x200000,0x0,0x20,0x104000,0x100000,0x100000,0x0,0x1000000,0x0,0x0,0x104000,};
unsigned int jj_la1_2[] = {
-0x0,0x100,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x110000,0x28000,0x0,0x20000000,0x0,0x0,0x0,0x200000,0x0,0x0,0x0,0x4000,0x0,0x0,0x110000,0x0,0x0,0x110000,0x0,0x4000,0x4000,0x0,0x0,0x0,0x0,0x28000,0x0,0x0,0x0,0x400,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x4000,0x400000,0x8000,0x8000,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x1000000,0x1000,0x1000,0x0,0x0,0x0,0x100,0x11000,0x0,0x0,0x0,0x0,0x0,0x110000,0x0,0x0,0x1000,0x111000,0x0,0x0,0x4000,0x0,0x400,0x8000,0x28000,0x0,0x0,0x0,0x0,0x0,0x0,0x209,0x209,0x0,0x32,0x100,0x100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x32,0x0,0x0,0x0,0x400,0x1000,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x1000,0x20,0x0,0x0,0x0,0x10,0x800,0x10000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x1000,0x0,0x110000,0x0,0x110000,0x1000,0x0,0x0,0x0,0x110000,0x0,0x0,0x1000,0x111000,0x0,0x0,0x2,0x0,0x1000,0x0,0x110000,0x0,0x0,0x110000,0x0,0x8000,0x0,0x0,0x0,0x8000,0x0,0x20000024,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x32,0x200000,0x1000,0x0,0x0,0x20,0xc0000000,0xc0000000,0x0,0x1000000,0x0,0x800000,0x0,0x800000,0x0,0x400,0x0,0x0,0x0,0x0,0x10000,0x0,0x110000,0x0,0x110000,0x0,0x0,0x110000,0x10000,0x0,0x100000,0x100000,0x0,0x110000,0x20000024,0x0,0x0,0x0,0x600000,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x32,0x0,0x0,0x110000,0x0,0x0,0x110000,0x0,0x110000,0x110000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x110000,0x28000,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x800,0x32,0x0,0x0,0x0,0x0,0x1000000,0x0,0x800,0x0,0x0,0x0,0x800,0x0,0x0,0x110000,0x100000,0x100000,0x0,0x0,0x2000,0x0,0x138000,};
+0x0,0x100,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2,0x0,0x0,0x110000,0x28000,0x0,0x20000000,0x0,0x0,0x0,0x200000,0x200000,0x0,0x0,0x0,0x4000,0x0,0x0,0x110000,0x0,0x0,0x110000,0x0,0x4000,0x4000,0x0,0x0,0x0,0x0,0x28000,0x0,0x0,0x0,0x0,0x400,0x0,0x4000,0x0,0x0,0x0,0x4000,0x0,0x4000,0x400000,0x8000,0x8000,0x8000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x1000000,0x1000,0x1000,0x0,0x0,0x0,0x100,0x11000,0x0,0x0,0x0,0x0,0x0,0x110000,0x0,0x0,0x1000,0x111000,0x0,0x0,0x4000,0x0,0x400,0x8000,0x28000,0x0,0x0,0x0,0x0,0x0,0x0,0x209,0x209,0x0,0x23b,0x100,0x100,0x800,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x23b,0x0,0x0,0x0,0x400,0x0,0x0,0x0,0x0,0x800,0x0,0x0,0x0,0x1000,0x20,0x0,0x0,0x0,0x10,0x800,0x10000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x1000,0x0,0x110000,0x0,0x110000,0x0,0x0,0x1000,0x0,0x0,0x0,0x110000,0x0,0x0,0x1000,0x111000,0x0,0x0,0x0,0x0,0x1000,0x0,0x110000,0x0,0x0,0x110000,0x0,0x8000,0x0,0x0,0x0,0x8000,0x0,0x20000024,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x23b,0x0,0x200000,0x1000,0x0,0x0,0x20,0xc0000000,0xc0000000,0x0,0x1000000,0x0,0x800000,0x0,0x800000,0x0,0x400,0x0,0x0,0x0,0x0,0x10000,0x0,0x110000,0x0,0x110000,0x0,0x0,0x110000,0x10000,0x0,0x100000,0x100000,0x0,0x110000,0x20000024,0x0,0x0,0x0,0x0,0x600000,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x23b,0x0,0x0,0x110000,0x0,0x0,0x110000,0x0,0x110000,0x110000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x110000,0x28000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1000000,0x0,0x0,0x800,0x23b,0x0,0x0,0x0,0x0,0x1000000,0x0,0x800,0x0,0x0,0x0,0x800,0x0,0x0,0x110000,0x100000,0x100000,0x0,0x0,0x2000,0x0,0x138000,};
unsigned int jj_la1_3[] = {
-0x0,0x0,0x0,0x40000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x188830,0x8000000,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x80000,0x0,0x108830,0x80000,0x0,0x188830,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x2000000,0x0,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x2000000,0x0,0x0,0x80000,0x80000,0x0,0x0,0x80000,0x80000,0x0,0x4000,0x80000,0x80000,0x0,0x2000,0x0,0x0,0x128810,0x0,0x0,0x0,0x0,0x0,0x108830,0x80000,0x0,0x0,0x188830,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x30000000,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x108030,0x0,0x100030,0x100030,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0x108030,0x0,0x4000,0x0,0x0,0x188820,0x0,0x188820,0x0,0x0,0x0,0x0,0x108830,0x80000,0x0,0x0,0x188830,0x0,0x0,0x0,0x0,0x0,0x0,0x108820,0x80000,0x0,0x188820,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xd000001,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3c0,0x3c0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x108820,0x80000,0x0,0x188820,0x0,0x0,0x0,0x0,0x0,0x0,0xd000001,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x8000000,0x20,0x0,0x0,0x0,0x40000,0x0,0x0,0x10000,0x0,0x0,0x108820,0x80000,0x0,0x188820,0x0,0x80000,0x80000,0x80000,0x0,0x0,0x80000,0x0,0x0,0x0,0x2000000,0x0,0x188830,0x8000000,0x100010,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x2000000,0x0,0x0,0x8000000,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
+0x0,0x0,0x0,0x0,0x40000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x188830,0x8000000,0x0,0x0,0x8,0x0,0x0,0x0,0x0,0x0,0x80000,0x0,0x0,0x80000,0x0,0x108830,0x80000,0x0,0x188830,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x2000000,0x0,0x0,0x0,0x80000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x8000000,0x0,0x0,0x2000000,0x0,0x0,0x80000,0x80000,0x0,0x0,0x80000,0x0,0x4000,0x80000,0x80000,0x0,0x2000,0x0,0x0,0x128810,0x0,0x0,0x0,0x0,0x0,0x108830,0x80000,0x0,0x0,0x188830,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x30000000,0x30000000,0x0,0x30000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x30000000,0x0,0x0,0x0,0x0,0x108030,0x0,0x100030,0x100030,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x4000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0x108030,0x0,0x4000,0x0,0x0,0x188820,0x0,0x188820,0x0,0x0,0x0,0x0,0x0,0x0,0x108830,0x80000,0x0,0x0,0x188830,0x0,0x0,0x0,0x0,0x0,0x0,0x108820,0x80000,0x0,0x188820,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xd000001,0x0,0x0,0x0,0x0,0x0,0x0,0x8,0x0,0x30000000,0x20000,0x0,0x0,0x0,0x0,0x0,0x3c0,0x3c0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x108820,0x80000,0x0,0x188820,0x0,0x0,0x0,0x0,0x0,0x0,0xd000001,0x0,0x0,0x0,0x8000,0x0,0x0,0x0,0x0,0x8000000,0x20,0x0,0x0,0x0,0x40000,0x0,0x0,0x30010000,0x0,0x0,0x108820,0x80000,0x0,0x188820,0x0,0x80000,0x80000,0x80000,0x0,0x0,0x80000,0x0,0x0,0x0,0x2000000,0x0,0x188830,0x8000000,0x0,0x0,0x100010,0x0,0x0,0x0,0x0,0x0,0x4000,0x0,0x2000000,0x0,0x30000000,0x8000000,0x0,0x0,0x0,0x4000,0x0,0x0,0x0,0x0,0x0,0x0,0x2000000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,};
unsigned int jj_la1_4[] = {
-0x0,0x0,0x60000,0x30,0x40,0x100,0x0,0x0,0x0,0x0,0x40000,0x0,0x40001,0x0,0x0,0x0,0x0,0x40,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x40001,0x0,0x0,0x0,0x0,0x10000000,0x200,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x20000,0x40,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x40000,0x40000,0x40000,0x40000,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x4,0x40001,0x0,0x0,0x40000,0x1,0x0,0x0,0x40000,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x40,0x40031,0x0,0x1,0x0,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x40000008,0x40000,0x40,0x1,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x1,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x1,0x0,0x0,0x0,0x40001,0x1,0x0,0x40000,0xfc00,0xfc00,0x0,0x0,0x0,0x40031,0x1,0x0,0x40,0x40,0x0,0x0,0x0,0x30,0x0,0x40001,0x0,0x80,0x0,0x40,0x40000,0x40,0x40000,0x0,0x30,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0x0,0x40001,0x0,0x40001,0x0,0x1,0x0,0x40,0x40,0x40001,0x0,0x80,0x0,0x0,0x0,0x0,0x40,0x40031,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40001,0x0,0xa0000000,0x20000000,0x0,0x1,0x40001,0x0,0x0,0x0,0x0,0x40031,0x0,0x8000000,0x40000,0x8000000,0x0,0x8000000,0x0,0x240,0x240,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x0,0x0,0x1,0x0,};
+0x0,0x0,0x0,0x20000,0x30,0x40,0x100,0x0,0x0,0x0,0x0,0x40000,0x0,0x40001,0x0,0x0,0x0,0x0,0x40,0x0,0x40000,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x1,0x0,0x0,0x40001,0x8000000,0x0,0x0,0x0,0x0,0x10000000,0x200,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x20000,0x40,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x40000,0x40000,0x40000,0x40000,0x0,0x40,0x0,0x0,0x0,0x0,0x0,0x4,0x140001,0x0,0x0,0x0,0x40000,0x1,0x0,0x0,0x40000,0x40,0x0,0x40,0x0,0x0,0x0,0x0,0x40,0x140031,0x0,0x1,0x0,0x40000,0x0,0x200,0x0,0x0,0x0,0x0,0x80,0x0,0x0,0x0,0x0,0x0,0x0,0x4,0x0,0x40000008,0x40000,0x40,0x1,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x1,0x0,0x0,0x1,0x0,0x0,0x0,0x0,0x0,0x0,0x40000,0x1,0x0,0x0,0x0,0x40001,0x1,0x40000,0x40000,0x7e0fc00,0x7e0fc00,0x0,0x0,0x0,0x140031,0x0,0x0,0x0,0x40,0x40,0x0,0x0,0x0,0x30,0x0,0x40001,0x0,0x80,0x0,0x40,0x40000,0x40,0x40000,0x0,0x30,0x0,0x0,0x0,0x200,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x0,0x1,0x0,0x40001,0x40000,0x0,0x40001,0x0,0x1,0x0,0x40,0x40,0x40001,0x0,0x80,0x0,0x0,0x0,0x0,0x40,0x140031,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40001,0x0,0x0,0x0,0xa0000000,0x20000000,0x0,0x1,0x40001,0x0,0x0,0x0,0x0,0x140031,0x0,0x8000000,0x40000,0x8000000,0x0,0x8000000,0x0,0x240,0x240,0x40,0x0,0x0,0x0,0x0,0x0,0x0,0x20000,0x0,0x0,0x1,0x0,};
unsigned int jj_la1_5[] = {
-0x1420,0x0,0x1c0,0x0,0x0,0x0,0x2,0x3c0,0x0,0x0,0x1c0,0x0,0x200001c0,0x0,0x0,0x0,0x180,0x0,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x200001c0,0x180,0x0,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x20000000,0x20000000,0x2,0x0,0x0,0x3c0,0x3c0,0x1c0,0x1c0,0x3c0,0x380,0x0,0x180,0x180,0x0,0x0,0x0,0x0,0x1017e0,0x0,0x0,0x1e0,0x0,0x180,0x0,0x3c0,0x0,0x180,0x0,0x180,0x0,0x0,0x180,0x0,0x1017e0,0x0,0x0,0x180,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x180,0x0,0x180,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x180,0x180,0x0,0x180,0x1420,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x1c0,0x0,0x0,0x0,0x180,0x1c0,0x0,0x180,0x1c0,0x0,0x0,0x180,0x0,0x180,0x1017e0,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x1c0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x240,0x1c0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x1017e0,0x0,0x180,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x200001c0,0x0,0x1,0x0,0x1,0x0,0x1c0,0x0,0x0,0x0,0x0,0x1017e0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x180,};
+0x1420,0x0,0x180,0x0,0x0,0x0,0x0,0x2,0x3c0,0x0,0x0,0x1c0,0x0,0x200001c0,0x0,0x0,0x0,0x180,0x0,0x180,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x200001c0,0x0,0x180,0x0,0x180,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x20000000,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x20000000,0x20000000,0x2,0x0,0x0,0x0,0x3c0,0x1c0,0x1c0,0x3c0,0x380,0x0,0x180,0x180,0x0,0x0,0x0,0x0,0x1017e0,0x0,0x0,0x0,0x1e0,0x0,0x180,0x0,0x3c0,0x0,0x180,0x0,0x180,0x0,0x0,0x180,0x0,0x1017e0,0x0,0x0,0x180,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x40,0x180,0x0,0x180,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x180,0x180,0x0,0x180,0x1420,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x1c0,0x0,0x0,0x0,0x180,0x1c0,0x0,0x1c0,0x1c0,0x0,0x0,0x180,0x0,0x180,0x1017e0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x1c0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x1c0,0x240,0x1c0,0x0,0x0,0x0,0x0,0x0,0x1c0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x1017e0,0x0,0x180,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x200001c0,0x0,0x0,0x0,0x1,0x0,0x1,0x0,0x1c0,0x0,0x0,0x0,0x0,0x1017e0,0x0,0x0,0x1c0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x180,0x0,0x0,0x0,0x180,};
/** Constructor with user supplied TokenManager. */
@@ -23,37 +23,31 @@ namespace parser {
QCString VhdlParser::abstract_literal() {Token *tok;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case DECIMAL_LITERAL:{if (!hasError) {
-
+ case DECIMAL_LITERAL:{
+ if (!hasError) {
tok = jj_consume_token(DECIMAL_LITERAL);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
- case INTEGER:{if (!hasError) {
-
+ case INTEGER:{
+ if (!hasError) {
tok = jj_consume_token(INTEGER);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
- case BASED_LITERAL:{if (!hasError) {
-
+ case BASED_LITERAL:{
+ if (!hasError) {
tok = jj_consume_token(BASED_LITERAL);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
default:
@@ -65,15 +59,13 @@ assert(false);
}
-QCString VhdlParser::access_type_definition() {Token *tok=0;QCString str,str1;if (!hasError) {
-
+QCString VhdlParser::access_type_definition() {Token *tok=0;QCString str,str1;
+ if (!hasError) {
tok = jj_consume_token(ACCESS_T);
}
if (!hasError) {
-
str1 = subtype_indication();
}
-
str=tok->image.c_str(); return str+str1;
assert(false);
}
@@ -81,109 +73,97 @@ assert(false);
QCString VhdlParser::actual_designator() {QCString str;Token *t=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case OPEN_T:{if (!hasError) {
-
+ case OPEN_T:{
+ if (!hasError) {
t = jj_consume_token(OPEN_T);
}
if (!hasError) {
-
return t->image.c_str();
}
-
break;
}
default:
jj_la1[1] = jj_gen;
- if (jj_2_1(2147483647)) {if (!hasError) {
-
+ if (jj_2_1(2147483647)) {
+ if (!hasError) {
str = expression();
}
if (!hasError) {
-
return str;
}
-
- } else if (jj_2_2(2147483647)) {if (!hasError) {
-
- str = name();
- }
- if (!hasError) {
-
+ } else {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case BASIC_IDENTIFIER:
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
+ str = identifier();
+ }
+ if (!hasError) {
return str;
+ }
+ break;
+ }
+ default:
+ jj_la1[2] = jj_gen;
+ jj_consume_token(-1);
+ errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
-
- } else {
- jj_consume_token(-1);
- errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
assert(false);
}
-QCString VhdlParser::actual_parameter_part() {QCString s;if (!hasError) {
-
+QCString VhdlParser::actual_parameter_part() {QCString s;
+ if (!hasError) {
s = association_list();
}
-
return s;
assert(false);
}
QCString VhdlParser::actual_part() {QCString s,s1;
- if (jj_2_3(2147483647)) {if (!hasError) {
-
+ if (jj_2_2(2147483647)) {
+ if (!hasError) {
s = actual_designator();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case BOX_T:{if (!hasError) {
-
+ case BOX_T:{
+ if (!hasError) {
jj_consume_token(BOX_T);
}
if (!hasError) {
-
return "<>";
}
-
break;
}
- case SLSL_T:
- case STRINGLITERAL:
- case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
- s = name();
- }
- if (!hasError) {
-
- jj_consume_token(LPAREN_T);
- }
- if (!hasError) {
-
- s1 = actual_designator();
- }
- if (!hasError) {
-
- jj_consume_token(RPAREN_T);
- }
- if (!hasError) {
-
+ default:
+ jj_la1[3] = jj_gen;
+ if (jj_2_3(2147483647)) {
+ if (!hasError) {
+ s = name();
+ }
+ if (!hasError) {
+ jj_consume_token(LPAREN_T);
+ }
+ if (!hasError) {
+ s1 = actual_designator();
+ }
+ if (!hasError) {
+ jj_consume_token(RPAREN_T);
+ }
+ if (!hasError) {
s+="(";s+=s1+")";return s;
+ }
+ } else {
+ jj_consume_token(-1);
+ errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
-
- break;
- }
- default:
- jj_la1[2] = jj_gen;
- jj_consume_token(-1);
- errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
assert(false);
@@ -192,41 +172,35 @@ assert(false);
QCString VhdlParser::adding_operator() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PLUS_T:{if (!hasError) {
-
+ case PLUS_T:{
+ if (!hasError) {
jj_consume_token(PLUS_T);
}
if (!hasError) {
-
return "+";
}
-
break;
}
- case MINUS_T:{if (!hasError) {
-
+ case MINUS_T:{
+ if (!hasError) {
jj_consume_token(MINUS_T);
}
if (!hasError) {
-
return "-";
}
-
break;
}
- case AMPERSAND_T:{if (!hasError) {
-
+ case AMPERSAND_T:{
+ if (!hasError) {
jj_consume_token(AMPERSAND_T);
}
if (!hasError) {
-
return "&";
}
-
break;
}
default:
- jj_la1[3] = jj_gen;
+ jj_la1[4] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -234,16 +208,14 @@ assert(false);
}
-QCString VhdlParser::aggregate() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::aggregate() {QCString s,s1,s2;
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s = element_association();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -251,110 +223,90 @@ QCString VhdlParser::aggregate() {QCString s,s1,s2;if (!hasError) {
break;
}
default:
- jj_la1[4] = jj_gen;
+ jj_la1[5] = jj_gen;
goto end_label_1;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = element_association();
}
if (!hasError) {
-
s+=","+s1;
}
-
}
end_label_1: ;
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
return "("+s+")";
assert(false);
}
-QCString VhdlParser::alias_declaration() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::alias_declaration() {QCString s,s1,s2;
+ if (!hasError) {
jj_consume_token(ALIAS_T);
}
if (!hasError) {
-
s2 = alias_designator();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case COLON_T:{if (!hasError) {
-
+ case COLON_T:{
+ if (!hasError) {
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s+=":";
}
if (!hasError) {
-
s1 = subtype_indication();
}
if (!hasError) {
-
s+=s1;
}
-
break;
}
default:
- jj_la1[5] = jj_gen;
+ jj_la1[6] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
s+=" is ";
}
if (!hasError) {
-
s1 = name();
}
if (!hasError) {
-
s+=s1;
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LBRACKET_T:{if (!hasError) {
-
+ case LBRACKET_T:{
+ if (!hasError) {
s1 = signature();
}
if (!hasError) {
-
s+=s1;
}
-
break;
}
default:
- jj_la1[6] = jj_gen;
+ jj_la1[7] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-addVhdlType(s2.data(),getLine(ALIAS_T),Entry::VARIABLE_SEC,VhdlDocGen::ALIAS,0,s.data(),Public);
+outlineParser()->addVhdlType(s2.data(),outlineParser()->getLine(ALIAS_T),Entry::VARIABLE_SEC,VhdlDocGen::ALIAS,0,s.data(),Public);
return s2+" "+s+";";
assert(false);
@@ -364,41 +316,35 @@ assert(false);
QCString VhdlParser::alias_designator() {Token *tok=0;QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case CHARACTER_LITERAL:{if (!hasError) {
-
+ case CHARACTER_LITERAL:{
+ if (!hasError) {
tok = jj_consume_token(CHARACTER_LITERAL);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
- case STRINGLITERAL:{if (!hasError) {
-
+ case STRINGLITERAL:{
+ if (!hasError) {
s = operator_symbol();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[7] = jj_gen;
+ jj_la1[8] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -407,30 +353,26 @@ assert(false);
void VhdlParser::allocator() {
- if (jj_2_4(3)) {if (!hasError) {
-
+ if (jj_2_4(3)) {
+ if (!hasError) {
jj_consume_token(NEW_T);
}
if (!hasError) {
-
qualified_expression();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case NEW_T:{if (!hasError) {
-
+ case NEW_T:{
+ if (!hasError) {
jj_consume_token(NEW_T);
}
if (!hasError) {
-
subtype_indication();
}
-
break;
}
default:
- jj_la1[8] = jj_gen;
+ jj_la1[9] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -438,101 +380,85 @@ void VhdlParser::allocator() {
}
-void VhdlParser::architecture_body() {QCString s,s1;if (!hasError) {
-
+void VhdlParser::architecture_body() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(ARCHITECTURE_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(OF_T);
}
if (!hasError) {
-
s1 = name();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
QCString t=s1+"::"+s;
- genLabels.resize(0);
- pushLabel(genLabels,s1);
- lastCompound=current.get();
- addVhdlType(t,getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
+ m_sharedState->genLabels.resize(0);
+ outlineParser()->pushLabel(m_sharedState->genLabels,s1);
+ m_sharedState->lastCompound=m_sharedState->current;
+ outlineParser()->addVhdlType(t,outlineParser()->getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
}
if (!hasError) {
-
- try {if (!hasError) {
-
+ try {
+ if (!hasError) {
architecture_declarative_part();
}
-
} catch ( ...) {
-error_skipto(BEGIN_T);
+outlineParser()->error_skipto(BEGIN_T);
}
}
if (!hasError) {
-
jj_consume_token(BEGIN_T);
}
if (!hasError) {
-
architecture_statement_part();
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ARCHITECTURE_T:{if (!hasError) {
-
+ case ARCHITECTURE_T:{
+ if (!hasError) {
jj_consume_token(ARCHITECTURE_T);
}
-
break;
}
default:
- jj_la1[9] = jj_gen;
+ jj_la1[10] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
name();
}
-
break;
}
default:
- jj_la1[10] = jj_gen;
+ jj_la1[11] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-lastEntity=0;lastCompound=0; genLabels.resize(0);
+m_sharedState->lastEntity=0;m_sharedState->lastCompound=0; m_sharedState->genLabels.resize(0);
}
-void VhdlParser::architecture_declarative_part() {if (!hasError) {
-
+void VhdlParser::architecture_declarative_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -557,22 +483,20 @@ void VhdlParser::architecture_declarative_part() {if (!hasError) {
break;
}
default:
- jj_la1[11] = jj_gen;
+ jj_la1[12] = jj_gen;
goto end_label_2;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
block_declarative_item();
}
-
}
end_label_2: ;
}
-
}
-void VhdlParser::architecture_statement_part() {if (!hasError) {
-
+void VhdlParser::architecture_statement_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -590,45 +514,39 @@ void VhdlParser::architecture_statement_part() {if (!hasError) {
break;
}
default:
- jj_la1[12] = jj_gen;
+ jj_la1[13] = jj_gen;
goto end_label_3;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
concurrent_statement();
}
-
}
end_label_3: ;
}
-
}
QCString VhdlParser::array_type_definition() {QCString s;
- if (jj_2_5(2147483647)) {if (!hasError) {
-
- s = unconstraint_array_definition();
+ if (jj_2_5(2147483647)) {
+ if (!hasError) {
+ s = constraint_array_definition();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ARRAY_T:{if (!hasError) {
-
- s = constraint_array_definition();
+ case ARRAY_T:{
+ if (!hasError) {
+ s = unconstraint_array_definition();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[13] = jj_gen;
+ jj_la1[14] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -637,53 +555,45 @@ assert(false);
}
-QCString VhdlParser::assertion() {QCString s,s1,s2;Token *t=0;Token *t1=0;if (!hasError) {
-
+QCString VhdlParser::assertion() {QCString s,s1,s2;Token *t=0;Token *t1=0;
+ if (!hasError) {
jj_consume_token(ASSERT_T);
}
if (!hasError) {
-
s = condition();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case REPORT_T:{if (!hasError) {
-
+ case REPORT_T:{
+ if (!hasError) {
t = jj_consume_token(REPORT_T);
}
if (!hasError) {
-
s1 = expression();
}
-
break;
}
default:
- jj_la1[14] = jj_gen;
+ jj_la1[15] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case SEVERITY_T:{if (!hasError) {
-
+ case SEVERITY_T:{
+ if (!hasError) {
t1 = jj_consume_token(SEVERITY_T);
}
if (!hasError) {
-
s2 = expression();
}
-
break;
}
default:
- jj_la1[15] = jj_gen;
+ jj_la1[16] = jj_gen;
;
}
}
-
s.prepend("assert ");
if(t) s1.prepend(" report ");
if(t1) s2.prepend(" report ");
@@ -692,72 +602,62 @@ assert(false);
}
-QCString VhdlParser::assertion_statement() {QCString s,s1,s2;Token *t=0;if (!hasError) {
-
+QCString VhdlParser::assertion_statement() {QCString s,s1,s2;Token *t=0;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = label();
}
if (!hasError) {
-
t = jj_consume_token(COLON_T);
}
-
break;
}
default:
- jj_la1[16] = jj_gen;
+ jj_la1[17] = jj_gen;
;
}
}
if (!hasError) {
-
s1 = assertion();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
if(t) s+=":";
return s+s1+";";
assert(false);
}
-QCString VhdlParser::association_element() {QCString s,s1;if (!hasError) {
-
- if (jj_2_6(2147483647)) {if (!hasError) {
-
+QCString VhdlParser::association_element() {QCString s,s1;
+ if (!hasError) {
+ if (jj_2_6(2147483647)) {
+ if (!hasError) {
s = formal_part();
}
if (!hasError) {
-
jj_consume_token(ARROW_T);
}
-
} else {
;
}
}
if (!hasError) {
-
s1 = actual_part();
}
-
return s+" => "+s1;
assert(false);
}
-QCString VhdlParser::association_list() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::association_list() {QCString s,s1;
+ if (!hasError) {
s = association_element();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -765,52 +665,43 @@ QCString VhdlParser::association_list() {QCString s,s1;if (!hasError) {
break;
}
default:
- jj_la1[17] = jj_gen;
+ jj_la1[18] = jj_gen;
goto end_label_4;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = association_element();
}
if (!hasError) {
-
s+=","+s1;
}
-
}
end_label_4: ;
}
-
return s;
assert(false);
}
-QCString VhdlParser::attribute_declaration() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::attribute_declaration() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(ATTRIBUTE_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s1 = type_mark();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-addVhdlType(s.data(),getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,s1.data(),Public);
+outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,s1.data(),Public);
return " attribute "+s+":"+s1+";";
assert(false);
}
@@ -819,30 +710,26 @@ assert(false);
QCString VhdlParser::attribute_designator() {QCString s;Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case RANGE_T:{if (!hasError) {
-
+ case RANGE_T:{
+ if (!hasError) {
tok = jj_consume_token(RANGE_T);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
default:
- jj_la1[18] = jj_gen;
+ jj_la1[19] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -850,234 +737,221 @@ assert(false);
}
-QCString VhdlParser::attribute_name() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::attribute_name() {QCString s,s1;
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(APOSTROPHE_T);
}
if (!hasError) {
-
- s1 = name();
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case RANGE_T:{
+ if (!hasError) {
+ jj_consume_token(RANGE_T);
+ }
+ break;
+ }
+ case SLSL_T:
+ case STRINGLITERAL:
+ case BASIC_IDENTIFIER:
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
+ s1 = name();
+ }
+ break;
+ }
+ default:
+ jj_la1[20] = jj_gen;
+ jj_consume_token(-1);
+ errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
+ }
}
if (!hasError) {
-
-s+="'"+s1;
+s+=s1;
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
-s+"("+s1+")";
+s+=s1;
}
-
break;
}
default:
- jj_la1[19] = jj_gen;
+ jj_la1[21] = jj_gen;
;
}
}
-
return s;
assert(false);
}
-QCString VhdlParser::attribute_specification() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::attribute_specification() {QCString s,s1,s2;
+ if (!hasError) {
jj_consume_token(ATTRIBUTE_T);
}
if (!hasError) {
-
s = attribute_designator();
}
if (!hasError) {
-
jj_consume_token(OF_T);
}
if (!hasError) {
-
s1 = entity_specification();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
s2 = expression();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
QCString t= s1+" is "+s2;
- addVhdlType(s.data(),getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,t.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,t.data(),Public);
return " attribute "+s+" of "+s1+ " is "+s2+";";
assert(false);
}
-QCString VhdlParser::base() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::base() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(INTEGER);
}
-
return tok->image.c_str();
assert(false);
}
-QCString VhdlParser::base_specifier() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::base_specifier() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-
return tok->image.c_str();
assert(false);
}
-QCString VhdlParser::base_unit_declaration() {QCString s;if (!hasError) {
-
+QCString VhdlParser::base_unit_declaration() {QCString s;
+ if (!hasError) {
s = identifier();
}
-
return s;
assert(false);
}
-QCString VhdlParser::based_integer() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::based_integer() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-
return tok->image.c_str();
assert(false);
}
-QCString VhdlParser::based_literal() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::based_literal() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(BASED_LITERAL);
}
-
return tok->image.c_str();
assert(false);
}
-QCString VhdlParser::basic_identifier() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::basic_identifier() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-
return tok->image.c_str();
assert(false);
}
-void VhdlParser::binding_indication() {if (!hasError) {
-
+void VhdlParser::binding_indication() {
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
jj_consume_token(USE_T);
}
if (!hasError) {
-
entity_aspect();
}
-
break;
}
default:
- jj_la1[20] = jj_gen;
+ jj_la1[22] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{if (!hasError) {
-
+ case GENERIC_T:{
+ if (!hasError) {
generic_map_aspect();
}
-
break;
}
default:
- jj_la1[21] = jj_gen;
+ jj_la1[23] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{if (!hasError) {
-
+ case PORT_T:{
+ if (!hasError) {
port_map_aspect();
}
-
break;
}
default:
- jj_la1[22] = jj_gen;
+ jj_la1[24] = jj_gen;
;
}
}
-
}
-QCString VhdlParser::bit_string_literal() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::bit_string_literal() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(BIT_STRING_LITERAL);
}
-
return tok->image.c_str();
assert(false);
}
-QCString VhdlParser::bit_value() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::bit_value() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
-
return tok->image.c_str();
assert(false);
}
-void VhdlParser::block_configuration() {if (!hasError) {
-
+void VhdlParser::block_configuration() {
+ if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
-
block_specification();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case USE_T:{
@@ -1085,18 +959,16 @@ void VhdlParser::block_configuration() {if (!hasError) {
break;
}
default:
- jj_la1[23] = jj_gen;
+ jj_la1[25] = jj_gen;
goto end_label_5;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
use_clause();
}
-
}
end_label_5: ;
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FOR_T:{
@@ -1104,29 +976,24 @@ void VhdlParser::block_configuration() {if (!hasError) {
break;
}
default:
- jj_la1[24] = jj_gen;
+ jj_la1[26] = jj_gen;
goto end_label_6;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
configuration_item();
}
-
}
end_label_6: ;
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(FOR_T);
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
@@ -1135,125 +1002,109 @@ void VhdlParser::block_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
subprogram_declaration();
}
-
break;
}
- case TYPE_T:{if (!hasError) {
-
+ case TYPE_T:{
+ if (!hasError) {
type_declaration();
}
-
break;
}
- case SUBTYPE_T:{if (!hasError) {
-
+ case SUBTYPE_T:{
+ if (!hasError) {
subtype_declaration();
}
-
break;
}
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
constant_declaration();
}
-
break;
}
- case SIGNAL_T:{if (!hasError) {
-
+ case SIGNAL_T:{
+ if (!hasError) {
signal_declaration();
}
-
break;
}
case SHARED_T:
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
variable_declaration();
}
-
break;
}
- case FILE_T:{if (!hasError) {
-
+ case FILE_T:{
+ if (!hasError) {
file_declaration();
}
-
break;
}
- case ALIAS_T:{if (!hasError) {
-
+ case ALIAS_T:{
+ if (!hasError) {
alias_declaration();
}
-
break;
}
- case COMPONENT_T:{if (!hasError) {
-
+ case COMPONENT_T:{
+ if (!hasError) {
component_declaration();
}
-
break;
}
default:
- jj_la1[25] = jj_gen;
- if (jj_2_7(2147483647)) {if (!hasError) {
-
+ jj_la1[27] = jj_gen;
+ if (jj_2_7(2147483647)) {
+ if (!hasError) {
attribute_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{if (!hasError) {
-
+ case ATTRIBUTE_T:{
+ if (!hasError) {
attribute_specification();
}
-
break;
}
- case FOR_T:{if (!hasError) {
-
+ case FOR_T:{
+ if (!hasError) {
configuration_specification();
}
-
break;
}
- case DISCONNECT_T:{if (!hasError) {
-
+ case DISCONNECT_T:{
+ if (!hasError) {
disconnection_specification();
}
-
break;
}
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
use_clause();
}
-
break;
}
default:
- jj_la1[26] = jj_gen;
- if (jj_2_8(3)) {if (!hasError) {
-
+ jj_la1[28] = jj_gen;
+ if (jj_2_8(3)) {
+ if (!hasError) {
group_template_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{if (!hasError) {
-
+ case GROUP_T:{
+ if (!hasError) {
group_declaration();
}
-
break;
}
default:
- jj_la1[27] = jj_gen;
+ jj_la1[29] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -1264,8 +1115,8 @@ void VhdlParser::block_declarative_item() {
}
-void VhdlParser::block_declarative_part() {if (!hasError) {
-
+void VhdlParser::block_declarative_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -1290,224 +1141,188 @@ void VhdlParser::block_declarative_part() {if (!hasError) {
break;
}
default:
- jj_la1[28] = jj_gen;
+ jj_la1[30] = jj_gen;
goto end_label_7;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
block_declarative_item();
}
-
}
end_label_7: ;
}
-
}
-void VhdlParser::block_header() {if (!hasError) {
-
- if (jj_2_9(2147483647)) {if (!hasError) {
-
+void VhdlParser::block_header() {
+ if (!hasError) {
+ if (jj_2_9(2147483647)) {
+ if (!hasError) {
generic_clause();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{if (!hasError) {
-
+ case GENERIC_T:{
+ if (!hasError) {
generic_map_aspect();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
break;
}
default:
- jj_la1[29] = jj_gen;
+ jj_la1[31] = jj_gen;
;
}
}
-
} else {
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{if (!hasError) {
-
+ case PORT_T:{
+ if (!hasError) {
port_clause();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{if (!hasError) {
-
+ case PORT_T:{
+ if (!hasError) {
port_map_aspect();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
break;
}
default:
- jj_la1[30] = jj_gen;
+ jj_la1[32] = jj_gen;
;
}
}
-
break;
}
default:
- jj_la1[31] = jj_gen;
+ jj_la1[33] = jj_gen;
;
}
}
-
}
-void VhdlParser::block_specification() {if (!hasError) {
-
+void VhdlParser::block_specification() {
+ if (!hasError) {
name();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
index_specification();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
break;
}
default:
- jj_la1[32] = jj_gen;
+ jj_la1[34] = jj_gen;
;
}
}
-
}
-void VhdlParser::block_statement() {QCString s;if (!hasError) {
-
+void VhdlParser::block_statement() {QCString s;
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
jj_consume_token(BLOCK_T);
}
if (!hasError) {
-
-pushLabel(genLabels,s);
+outlineParser()->pushLabel(m_sharedState->genLabels,s);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
break;
}
default:
- jj_la1[33] = jj_gen;
+ jj_la1[35] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IS_T:{if (!hasError) {
-
+ case IS_T:{
+ if (!hasError) {
jj_consume_token(IS_T);
}
-
break;
}
default:
- jj_la1[34] = jj_gen;
+ jj_la1[36] = jj_gen;
;
}
}
if (!hasError) {
-
block_header();
}
if (!hasError) {
-
block_declarative_part();
}
if (!hasError) {
-
jj_consume_token(BEGIN_T);
}
if (!hasError) {
-
block_statement_part();
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(BLOCK_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
-
break;
}
default:
- jj_la1[35] = jj_gen;
+ jj_la1[37] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-genLabels=popLabel(genLabels);
+m_sharedState->genLabels=outlineParser()->popLabel(m_sharedState->genLabels);
}
-void VhdlParser::block_statement_part() {if (!hasError) {
-
+void VhdlParser::block_statement_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -1525,63 +1340,66 @@ void VhdlParser::block_statement_part() {if (!hasError) {
break;
}
default:
- jj_la1[36] = jj_gen;
+ jj_la1[38] = jj_gen;
goto end_label_8;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
concurrent_statement();
}
-
}
end_label_8: ;
}
-
}
-void VhdlParser::case_statement() {QCString s;if (!hasError) {
-
+void VhdlParser::case_statement() {QCString s;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
if (!hasError) {
-
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case Q_T:{
+ if (!hasError) {
+ jj_consume_token(Q_T);
+ }
+ break;
+ }
+ default:
+ jj_la1[39] = jj_gen;
+ ;
+ }
+ }
+ if (!hasError) {
jj_consume_token(COLON_T);
}
-
break;
}
default:
- jj_la1[37] = jj_gen;
+ jj_la1[40] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(CASE_T);
}
if (!hasError) {
-
s = expression();
}
if (!hasError) {
-
QCString ca="case "+s;
FlowChart::addFlowChart(FlowChart::CASE_NO,0,ca);
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
case_statement_alternative();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case WHEN_T:{
@@ -1589,130 +1407,119 @@ QCString ca="case "+s;
break;
}
default:
- jj_la1[38] = jj_gen;
+ jj_la1[41] = jj_gen;
goto end_label_9;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
case_statement_alternative();
}
-
}
end_label_9: ;
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(CASE_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
-
break;
}
default:
- jj_la1[39] = jj_gen;
+ jj_la1[42] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
FlowChart::moveToPrevLevel();
FlowChart::addFlowChart(FlowChart::END_CASE,"end case",0);
}
-void VhdlParser::case_statement_alternative() {QCString s;if (!hasError) {
-
+void VhdlParser::case_statement_alternative() {QCString s;
+ if (!hasError) {
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
s = choices();
}
if (!hasError) {
-
jj_consume_token(ARROW_T);
}
if (!hasError) {
-
QCString t="when ";
t+=s+"=> ";
FlowChart::addFlowChart(FlowChart::WHEN_NO,s.data(),t);
}
if (!hasError) {
-
sequence_of_statement();
}
-
FlowChart::moveToPrevLevel();
}
-QCString VhdlParser::character_literal() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::character_literal() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(CHARACTER_LITERAL);
}
-
return tok->image.c_str();
assert(false);
}
QCString VhdlParser::choice() {QCString s;
- if (jj_2_10(2147483647)) {if (!hasError) {
-
- s = discrete_range();
+ if (jj_2_10(2147483647)) {
+ if (!hasError) {
+ s = range();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_11(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_11(2147483647)) {
+ if (!hasError) {
s = simple_expression();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_12(2147483647)) {if (!hasError) {
-
- s = identifier();
+ } else if (jj_2_12(2147483647)) {
+ if (!hasError) {
+ s = discrete_range();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case OTHER_T:{if (!hasError) {
-
+ case BASIC_IDENTIFIER:
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
+ s = identifier();
+ }
+ if (!hasError) {
+return s;
+ }
+ break;
+ }
+ case OTHER_T:{
+ if (!hasError) {
jj_consume_token(OTHER_T);
}
if (!hasError) {
-
return " others ";
}
-
break;
}
default:
- jj_la1[40] = jj_gen;
+ jj_la1[43] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -1721,12 +1528,11 @@ assert(false);
}
-QCString VhdlParser::choices() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::choices() {QCString s,s1;
+ if (!hasError) {
s = choice();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BAR_T:{
@@ -1734,283 +1540,238 @@ QCString VhdlParser::choices() {QCString s,s1;if (!hasError) {
break;
}
default:
- jj_la1[41] = jj_gen;
+ jj_la1[44] = jj_gen;
goto end_label_10;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(BAR_T);
}
if (!hasError) {
-
s1 = choice();
}
if (!hasError) {
-
s+="|";s+=s1;
}
-
}
end_label_10: ;
}
-
return s;
assert(false);
}
-void VhdlParser::component_configuration() {if (!hasError) {
-
+void VhdlParser::component_configuration() {
+ if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
-
component_specification();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case GENERIC_T:
case PORT_T:
case USE_T:
- case SEMI_T:{if (!hasError) {
-
+ case SEMI_T:{
+ if (!hasError) {
binding_indication();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
break;
}
default:
- jj_la1[42] = jj_gen;
+ jj_la1[45] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case FOR_T:{if (!hasError) {
-
+ case FOR_T:{
+ if (!hasError) {
block_configuration();
}
-
break;
}
default:
- jj_la1[43] = jj_gen;
+ jj_la1[46] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(FOR_T);
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::component_declaration() {QCString s;if (!hasError) {
-
+void VhdlParser::component_declaration() {QCString s;
+ if (!hasError) {
jj_consume_token(COMPONENT_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IS_T:{if (!hasError) {
-
+ case IS_T:{
+ if (!hasError) {
jj_consume_token(IS_T);
}
-
break;
}
default:
- jj_la1[44] = jj_gen;
+ jj_la1[47] = jj_gen;
;
}
}
if (!hasError) {
-
-currP=VhdlDocGen::COMPONENT;
+m_sharedState->currP=VhdlDocGen::COMPONENT;
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{if (!hasError) {
-
+ case GENERIC_T:{
+ if (!hasError) {
generic_clause();
}
-
break;
}
default:
- jj_la1[45] = jj_gen;
+ jj_la1[48] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{if (!hasError) {
-
+ case PORT_T:{
+ if (!hasError) {
port_clause();
}
-
break;
}
default:
- jj_la1[46] = jj_gen;
+ jj_la1[49] = jj_gen;
;
}
}
if (!hasError) {
-
-addVhdlType(s.data(),getLine(COMPONENT_T),Entry::VARIABLE_SEC,VhdlDocGen::COMPONENT,0,0,Public);
- currP=0;
+outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(COMPONENT_T),Entry::VARIABLE_SEC,VhdlDocGen::COMPONENT,0,0,Public);
+ m_sharedState->currP=0;
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(COMPONENT_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
-
break;
}
default:
- jj_la1[47] = jj_gen;
+ jj_la1[50] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::component_instantiation_statement() {QCString s,s1;if (!hasError) {
-
+void VhdlParser::component_instantiation_statement() {QCString s,s1;
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s1 = instantiation_unit();
}
if (!hasError) {
-
QCString s3;
if (s1.contains("|")) {
s3=VhdlDocGen::getIndexWord(s1.data(),0);
s1=VhdlDocGen::getIndexWord(s1.data(),1);
}
- addCompInst(s.lower().data(),s1.lower().data(),s3.data(),getLine());
+ outlineParser()->addCompInst(s.lower().data(),s1.lower().data(),s3.data(),outlineParser()->getLine());
}
if (!hasError) {
-
- if (jj_2_13(2147483647)) {if (!hasError) {
-
+ if (jj_2_13(2147483647)) {
+ if (!hasError) {
generic_map_aspect();
}
-
} else {
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{if (!hasError) {
-
+ case PORT_T:{
+ if (!hasError) {
port_map_aspect();
}
-
break;
}
default:
- jj_la1[48] = jj_gen;
+ jj_la1[51] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::component_specification() {if (!hasError) {
-
+void VhdlParser::component_specification() {
+ if (!hasError) {
instantiation_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
name();
}
-
}
QCString VhdlParser::composite_type_definition() {QCString s,s1;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ARRAY_T:{if (!hasError) {
-
+ case ARRAY_T:{
+ if (!hasError) {
s = array_type_definition();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case RECORD_T:{if (!hasError) {
-
+ case RECORD_T:{
+ if (!hasError) {
record_type_definition();
}
if (!hasError) {
-
return s+"#";
}
-
break;
}
default:
- jj_la1[49] = jj_gen;
+ jj_la1[52] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -2018,205 +1779,174 @@ assert(false);
}
-void VhdlParser::concurrent_assertion_statement() {if (!hasError) {
-
- if (jj_2_14(2)) {if (!hasError) {
-
+void VhdlParser::concurrent_assertion_statement() {
+ if (!hasError) {
+ if (jj_2_14(2)) {
+ if (!hasError) {
identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
-
} else {
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case POSTPONED_T:{if (!hasError) {
-
+ case POSTPONED_T:{
+ if (!hasError) {
jj_consume_token(POSTPONED_T);
}
-
break;
}
default:
- jj_la1[50] = jj_gen;
+ jj_la1[53] = jj_gen;
;
}
}
if (!hasError) {
-
assertion();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::concurrent_procedure_call_statement() {if (!hasError) {
-
- if (jj_2_15(2)) {if (!hasError) {
-
+void VhdlParser::concurrent_procedure_call_statement() {
+ if (!hasError) {
+ if (jj_2_15(2)) {
+ if (!hasError) {
identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
-
} else {
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case POSTPONED_T:{if (!hasError) {
-
+ case POSTPONED_T:{
+ if (!hasError) {
jj_consume_token(POSTPONED_T);
}
-
break;
}
default:
- jj_la1[51] = jj_gen;
+ jj_la1[54] = jj_gen;
;
}
}
if (!hasError) {
-
procedure_call();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::concurrent_signal_assignment_statement() {if (!hasError) {
-
- if (jj_2_16(2)) {if (!hasError) {
-
+void VhdlParser::concurrent_signal_assignment_statement() {
+ if (!hasError) {
+ if (jj_2_16(2)) {
+ if (!hasError) {
identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
-
} else {
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case POSTPONED_T:{if (!hasError) {
-
+ case POSTPONED_T:{
+ if (!hasError) {
jj_consume_token(POSTPONED_T);
}
-
break;
}
default:
- jj_la1[52] = jj_gen;
+ jj_la1[55] = jj_gen;
;
}
}
if (!hasError) {
-
- if (jj_2_17(2147483647)) {if (!hasError) {
-
+ if (jj_2_17(2147483647)) {
+ if (!hasError) {
conditional_signal_assignment();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WITH_T:{if (!hasError) {
-
+ case WITH_T:{
+ if (!hasError) {
selected_signal_assignment();
}
-
break;
}
default:
- jj_la1[53] = jj_gen;
+ jj_la1[56] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
}
-
}
void VhdlParser::concurrent_statement() {
- if (jj_2_18(2147483647)) {if (!hasError) {
-
+ if (jj_2_18(2147483647)) {
+ if (!hasError) {
block_statement();
}
-
- } else if (jj_2_19(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_19(2147483647)) {
+ if (!hasError) {
process_statement();
}
-
- } else if (jj_2_20(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_20(2147483647)) {
+ if (!hasError) {
generate_statement();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CASE_T:{if (!hasError) {
-
+ case CASE_T:{
+ if (!hasError) {
case_scheme();
}
-
break;
}
default:
- jj_la1[54] = jj_gen;
- if (jj_2_21(2147483647)) {if (!hasError) {
-
+ jj_la1[57] = jj_gen;
+ if (jj_2_21(2147483647)) {
+ if (!hasError) {
concurrent_assertion_statement();
}
-
- } else if (jj_2_22(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_22(2147483647)) {
+ if (!hasError) {
concurrent_signal_assignment_statement();
}
-
- } else if (jj_2_23(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_23(2147483647)) {
+ if (!hasError) {
component_instantiation_statement();
}
-
- } else if (jj_2_24(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_24(2147483647)) {
+ if (!hasError) {
concurrent_procedure_call_statement();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VHDL2008TOOLDIR:{if (!hasError) {
-
+ case VHDL2008TOOLDIR:{
+ if (!hasError) {
jj_consume_token(VHDL2008TOOLDIR);
}
-
break;
}
default:
- jj_la1[55] = jj_gen;
+ jj_la1[58] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -2226,220 +1956,186 @@ void VhdlParser::concurrent_statement() {
}
-QCString VhdlParser::condition() {QCString s;if (!hasError) {
-
+QCString VhdlParser::condition() {QCString s;
+ if (!hasError) {
s = expression();
}
-
return s;
assert(false);
}
-QCString VhdlParser::condition_clause() {QCString s;if (!hasError) {
-
+QCString VhdlParser::condition_clause() {QCString s;
+ if (!hasError) {
jj_consume_token(UNTIL_T);
}
if (!hasError) {
-
s = condition();
}
-
return " until "+s;
assert(false);
}
-void VhdlParser::conditional_signal_assignment() {if (!hasError) {
-
+void VhdlParser::conditional_signal_assignment() {
+ if (!hasError) {
target();
}
if (!hasError) {
-
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
-
options();
}
if (!hasError) {
-
conditional_waveforms();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::conditional_waveforms() {if (!hasError) {
-
+void VhdlParser::conditional_waveforms() {
+ if (!hasError) {
waveform();
}
if (!hasError) {
-
while (!hasError) {
if (jj_2_25(2147483647)) {
;
} else {
goto end_label_11;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
condition();
}
if (!hasError) {
-
jj_consume_token(ELSE_T);
}
if (!hasError) {
-
waveform();
}
-
}
end_label_11: ;
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHEN_T:{if (!hasError) {
-
+ case WHEN_T:{
+ if (!hasError) {
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
condition();
}
-
break;
}
default:
- jj_la1[56] = jj_gen;
+ jj_la1[59] = jj_gen;
;
}
}
-
}
-void VhdlParser::configuration_declaration() {QCString s,s1;if (!hasError) {
-
+void VhdlParser::configuration_declaration() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(OF_T);
}
if (!hasError) {
-
s1 = name();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
-confName=s+"::"+s1;
- addVhdlType(s.data(),getLine(CONFIGURATION_T),Entry::VARIABLE_SEC,VhdlDocGen::CONFIG,"configuration",s1.data(),Public);
+m_sharedState->confName=s+"::"+s1;
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(CONFIGURATION_T),Entry::VARIABLE_SEC,VhdlDocGen::CONFIG,"configuration",s1.data(),Public);
}
if (!hasError) {
-
configuration_declarative_part();
}
if (!hasError) {
-
block_configuration();
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CONFIGURATION_T:{if (!hasError) {
-
+ case CONFIGURATION_T:{
+ if (!hasError) {
jj_consume_token(CONFIGURATION_T);
}
-
break;
}
default:
- jj_la1[57] = jj_gen;
+ jj_la1[60] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
name();
}
-
break;
}
default:
- jj_la1[58] = jj_gen;
+ jj_la1[61] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-genLabels.resize(0); confName="";
+m_sharedState->genLabels.resize(0); m_sharedState->confName="";
}
void VhdlParser::configuration_declarative_item() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
use_clause();
}
-
break;
}
- case ATTRIBUTE_T:{if (!hasError) {
-
+ case ATTRIBUTE_T:{
+ if (!hasError) {
attribute_specification();
}
-
break;
}
- case GROUP_T:{if (!hasError) {
-
+ case GROUP_T:{
+ if (!hasError) {
group_declaration();
}
-
break;
}
default:
- jj_la1[59] = jj_gen;
+ jj_la1[62] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-void VhdlParser::configuration_declarative_part() {if (!hasError) {
-
+void VhdlParser::configuration_declarative_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ATTRIBUTE_T:
@@ -2449,37 +2145,33 @@ void VhdlParser::configuration_declarative_part() {if (!hasError) {
break;
}
default:
- jj_la1[60] = jj_gen;
+ jj_la1[63] = jj_gen;
goto end_label_12;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
configuration_declarative_item();
}
-
}
end_label_12: ;
}
-
}
void VhdlParser::configuration_item() {
- if (jj_2_26(2147483647)) {if (!hasError) {
-
+ if (jj_2_26(2147483647)) {
+ if (!hasError) {
component_configuration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case FOR_T:{if (!hasError) {
-
+ case FOR_T:{
+ if (!hasError) {
block_configuration();
}
-
break;
}
default:
- jj_la1[61] = jj_gen;
+ jj_la1[64] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -2487,141 +2179,114 @@ void VhdlParser::configuration_item() {
}
-void VhdlParser::configuration_specification() {if (!hasError) {
-
+void VhdlParser::configuration_specification() {
+ if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
-
component_specification();
}
if (!hasError) {
-
binding_indication();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-QCString VhdlParser::constant_declaration() {QCString s,s1,s2;Token *t=0;if (!hasError) {
-
+QCString VhdlParser::constant_declaration() {QCString s,s1,s2;Token *t=0;
+ if (!hasError) {
jj_consume_token(CONSTANT_T);
}
if (!hasError) {
-
s = identifier_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s1 = subtype_indication();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VARASSIGN_T:{if (!hasError) {
-
+ case VARASSIGN_T:{
+ if (!hasError) {
t = jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
-
s2 = expression();
}
-
break;
}
default:
- jj_la1[62] = jj_gen;
+ jj_la1[65] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
if(t)
s2.prepend(":=");
QCString it=s1+s2;
- addVhdlType(s.data(),getLine(CONSTANT_T),Entry::VARIABLE_SEC,VhdlDocGen::CONSTANT,0,it.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(CONSTANT_T),Entry::VARIABLE_SEC,VhdlDocGen::CONSTANT,0,it.data(),Public);
it.prepend("constant ");
return it;
assert(false);
}
-QCString VhdlParser::constraint_array_definition() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::constraint_array_definition() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(ARRAY_T);
}
if (!hasError) {
-
s = index_constraint();
}
if (!hasError) {
-
jj_consume_token(OF_T);
}
if (!hasError) {
-
s1 = subtype_indication();
}
-
return s+" "+s1;
assert(false);
}
-void VhdlParser::context_clause() {if (!hasError) {
-
+void VhdlParser::context_clause() {
+ if (!hasError) {
while (!hasError) {
- switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LIBRARY_T:
- case USE_T:{
+ if (jj_2_27(3)) {
;
- break;
- }
- default:
- jj_la1[63] = jj_gen;
+ } else {
goto end_label_13;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
context_item();
}
-
}
end_label_13: ;
}
-
}
QCString VhdlParser::constraint() {QCString s;
- if (jj_2_27(2147483647)) {if (!hasError) {
-
+ if (jj_2_28(2147483647)) {
+ if (!hasError) {
s = range_constraint();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_28(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_29(2147483647)) {
+ if (!hasError) {
s = index_constraint();
}
if (!hasError) {
-
return s;
}
-
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
@@ -2632,33 +2297,36 @@ assert(false);
void VhdlParser::context_item() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LIBRARY_T:{if (!hasError) {
-
+ case LIBRARY_T:{
+ if (!hasError) {
library_clause();
}
-
break;
}
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
use_clause();
}
-
+ break;
+ }
+ case CONTEXT_T:{
+ if (!hasError) {
+ context_ref();
+ }
break;
}
default:
- jj_la1[64] = jj_gen;
+ jj_la1[66] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-QCString VhdlParser::decimal_literal() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::decimal_literal() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(DECIMAL_LITERAL);
}
-
return tok->image.c_str();
assert(false);
}
@@ -2666,54 +2334,46 @@ assert(false);
QCString VhdlParser::delay_mechanism() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case TRANSPORT_T:{if (!hasError) {
-
+ case TRANSPORT_T:{
+ if (!hasError) {
jj_consume_token(TRANSPORT_T);
}
if (!hasError) {
-
return " transport ";
}
-
break;
}
case INERTIAL_T:
- case REJECT_T:{if (!hasError) {
-
+ case REJECT_T:{
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case REJECT_T:{if (!hasError) {
-
+ case REJECT_T:{
+ if (!hasError) {
jj_consume_token(REJECT_T);
}
if (!hasError) {
-
s = expression();
}
if (!hasError) {
-
s.prepend(" reject ");
}
-
break;
}
default:
- jj_la1[65] = jj_gen;
+ jj_la1[67] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(INERTIAL_T);
}
if (!hasError) {
-
return s+" inertial ";
}
-
break;
}
default:
- jj_la1[66] = jj_gen;
+ jj_la1[68] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -2729,13 +2389,12 @@ void VhdlParser::design_file() {
case ENTITY_T:
case LIBRARY_T:
case PACKAGE_T:
- case USE_T:{if (!hasError) {
-
- while (!hasError) {if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
+ while (!hasError) {
+ if (!hasError) {
design_unit();
}
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ARCHITECTURE_T:
case CONFIGURATION_T:
@@ -2748,73 +2407,64 @@ void VhdlParser::design_file() {
break;
}
default:
- jj_la1[67] = jj_gen;
+ jj_la1[69] = jj_gen;
goto end_label_14;
}
}
end_label_14: ;
}
if (!hasError) {
-
}
-
break;
}
- case 0:{if (!hasError) {
-
+ case 0:{
+ if (!hasError) {
jj_consume_token(0);
}
-
break;
}
default:
- jj_la1[68] = jj_gen;
+ jj_la1[70] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-void VhdlParser::design_unit() {if (!hasError) {
-
+void VhdlParser::design_unit() {
+ if (!hasError) {
context_clause();
}
if (!hasError) {
-
library_unit();
}
-
}
QCString VhdlParser::designator() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case STRINGLITERAL:{if (!hasError) {
-
+ case STRINGLITERAL:{
+ if (!hasError) {
s = operator_symbol();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[69] = jj_gen;
+ jj_la1[71] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -2824,30 +2474,26 @@ assert(false);
QCString VhdlParser::direction() {Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case TO_T:{if (!hasError) {
-
+ case TO_T:{
+ if (!hasError) {
tok = jj_consume_token(TO_T);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
- case DOWNTO_T:{if (!hasError) {
-
+ case DOWNTO_T:{
+ if (!hasError) {
tok = jj_consume_token(DOWNTO_T);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
default:
- jj_la1[70] = jj_gen;
+ jj_la1[72] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -2855,65 +2501,53 @@ assert(false);
}
-void VhdlParser::disconnection_specification() {if (!hasError) {
-
+void VhdlParser::disconnection_specification() {
+ if (!hasError) {
jj_consume_token(DISCONNECT_T);
}
if (!hasError) {
-
guarded_signal_specificatio();
}
if (!hasError) {
-
jj_consume_token(AFTER_T);
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::guarded_signal_specificatio() {if (!hasError) {
-
+void VhdlParser::guarded_signal_specificatio() {
+ if (!hasError) {
signal_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
name();
}
-
}
QCString VhdlParser::discrete_range() {QCString s;
- if (jj_2_29(2147483647)) {if (!hasError) {
-
+ if (jj_2_30(2147483647)) {
+ if (!hasError) {
s = range();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_30(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_31(2147483647)) {
+ if (!hasError) {
s = subtype_indication();
}
if (!hasError) {
-
return s;
}
-
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
@@ -2922,26 +2556,22 @@ assert(false);
}
-QCString VhdlParser::element_association() {QCString s,s1;if (!hasError) {
-
- if (jj_2_31(2147483647)) {if (!hasError) {
-
+QCString VhdlParser::element_association() {QCString s,s1;
+ if (!hasError) {
+ if (jj_2_32(2147483647)) {
+ if (!hasError) {
s = choices();
}
if (!hasError) {
-
jj_consume_token(ARROW_T);
}
-
} else {
;
}
}
if (!hasError) {
-
s1 = expression();
}
-
if(!s.isEmpty())
return s+"=>"+s1;
return s1;
@@ -2949,102 +2579,92 @@ assert(false);
}
-QCString VhdlParser::element_declaration() {QCString s,s1;if (!hasError) {
-
- s = identifier_list();
+QCString VhdlParser::element_declaration() {QCString rec_name,s1,s2;
+ if (!hasError) {
+ rec_name = identifier_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s1 = subtype_indication();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s1.data(),Public);
- //addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
- return s+":"+s1;
+QCString name;
+ QCStringList ql=QCStringList::split(",",rec_name);
+ for (uint j=0;j<ql.count();j++)
+ {
+ name=ql[j]+"~";
+ name+=outlineParser()->getNameID().data();;
+ outlineParser()->addVhdlType(name.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s1.data(),Public);
+ }
+ s2=rec_name+":"+s1;
+ return s2;
assert(false);
}
QCString VhdlParser::entity_aspect() {Token *tok=0;QCString s,s1;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ENTITY_T:{if (!hasError) {
-
+ case ENTITY_T:{
+ if (!hasError) {
tok = jj_consume_token(ENTITY_T);
}
if (!hasError) {
-
s = name();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = identifier();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
s+="("+s1+")";
}
-
break;
}
default:
- jj_la1[71] = jj_gen;
+ jj_la1[73] = jj_gen;
;
}
}
if (!hasError) {
-
return s;
}
-
break;
}
- case CONFIGURATION_T:{if (!hasError) {
-
+ case CONFIGURATION_T:{
+ if (!hasError) {
tok = jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
-
s = name();
}
if (!hasError) {
-
return tok->image.c_str()+s;
}
-
break;
}
- case OPEN_T:{if (!hasError) {
-
+ case OPEN_T:{
+ if (!hasError) {
tok = jj_consume_token(OPEN_T);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
default:
- jj_la1[72] = jj_gen;
+ jj_la1[74] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -3054,195 +2674,161 @@ assert(false);
QCString VhdlParser::entity_class() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ENTITY_T:{if (!hasError) {
-
+ case ENTITY_T:{
+ if (!hasError) {
jj_consume_token(ENTITY_T);
}
if (!hasError) {
-
return "entity";
}
-
break;
}
- case ARCHITECTURE_T:{if (!hasError) {
-
+ case ARCHITECTURE_T:{
+ if (!hasError) {
jj_consume_token(ARCHITECTURE_T);
}
if (!hasError) {
-
return "architecture";
}
-
break;
}
- case CONFIGURATION_T:{if (!hasError) {
-
+ case CONFIGURATION_T:{
+ if (!hasError) {
jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
-
return "configuration";
}
-
break;
}
- case PROCEDURE_T:{if (!hasError) {
-
+ case PROCEDURE_T:{
+ if (!hasError) {
jj_consume_token(PROCEDURE_T);
}
if (!hasError) {
-
return "procedure";
}
-
break;
}
- case FUNCTION_T:{if (!hasError) {
-
+ case FUNCTION_T:{
+ if (!hasError) {
jj_consume_token(FUNCTION_T);
}
if (!hasError) {
-
return "function";
}
-
break;
}
- case PACKAGE_T:{if (!hasError) {
-
+ case PACKAGE_T:{
+ if (!hasError) {
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
-
return "package";
}
-
break;
}
- case TYPE_T:{if (!hasError) {
-
+ case TYPE_T:{
+ if (!hasError) {
jj_consume_token(TYPE_T);
}
if (!hasError) {
-
return "type";
}
-
break;
}
- case SUBTYPE_T:{if (!hasError) {
-
+ case SUBTYPE_T:{
+ if (!hasError) {
jj_consume_token(SUBTYPE_T);
}
if (!hasError) {
-
return "subtype";
}
-
break;
}
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
jj_consume_token(CONSTANT_T);
}
if (!hasError) {
-
return "constant";
}
-
break;
}
- case SIGNAL_T:{if (!hasError) {
-
+ case SIGNAL_T:{
+ if (!hasError) {
jj_consume_token(SIGNAL_T);
}
if (!hasError) {
-
return "signal";
}
-
break;
}
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
jj_consume_token(VARIABLE_T);
}
if (!hasError) {
-
return "variable";
}
-
break;
}
- case COMPONENT_T:{if (!hasError) {
-
+ case COMPONENT_T:{
+ if (!hasError) {
jj_consume_token(COMPONENT_T);
}
if (!hasError) {
-
return "component";
}
-
break;
}
- case LABEL_T:{if (!hasError) {
-
+ case LABEL_T:{
+ if (!hasError) {
jj_consume_token(LABEL_T);
}
if (!hasError) {
-
return "label";
}
-
break;
}
- case LITERAL_T:{if (!hasError) {
-
+ case LITERAL_T:{
+ if (!hasError) {
jj_consume_token(LITERAL_T);
}
if (!hasError) {
-
return "literal";
}
-
break;
}
- case UNITS_T:{if (!hasError) {
-
+ case UNITS_T:{
+ if (!hasError) {
jj_consume_token(UNITS_T);
}
if (!hasError) {
-
return "units";
}
-
break;
}
- case GROUP_T:{if (!hasError) {
-
+ case GROUP_T:{
+ if (!hasError) {
jj_consume_token(GROUP_T);
}
if (!hasError) {
-
return "group";
}
-
break;
}
- case FILE_T:{if (!hasError) {
-
+ case FILE_T:{
+ if (!hasError) {
jj_consume_token(FILE_T);
}
if (!hasError) {
-
return "file";
}
-
break;
}
default:
- jj_la1[73] = jj_gen;
+ jj_la1[75] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -3250,48 +2836,41 @@ assert(false);
}
-QCString VhdlParser::entity_class_entry() {QCString s;if (!hasError) {
-
+QCString VhdlParser::entity_class_entry() {QCString s;
+ if (!hasError) {
s = entity_class();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case BOX_T:{if (!hasError) {
-
+ case BOX_T:{
+ if (!hasError) {
jj_consume_token(BOX_T);
}
if (!hasError) {
-
s+="<>";
}
-
break;
}
default:
- jj_la1[74] = jj_gen;
+ jj_la1[76] = jj_gen;
;
}
}
-
return s;
assert(false);
}
-QCString VhdlParser::entity_class_entry_list() {QCString s,s1,s2;if (!hasError) {
+QCString VhdlParser::entity_class_entry_list() {QCString s,s1,s2;
+ if (!hasError) {
if (!hasError) {
-
s1 = entity_class_entry();
}
if (!hasError) {
-
s+=s1;
}
-
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -3299,118 +2878,99 @@ s+=s1;
break;
}
default:
- jj_la1[75] = jj_gen;
+ jj_la1[77] = jj_gen;
goto end_label_15;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s = entity_class_entry();
}
if (!hasError) {
-
s2+=",";s2+=s;
}
-
}
end_label_15: ;
}
-
return s1+s2;
assert(false);
}
-void VhdlParser::entity_declaration() {QCString s;if (!hasError) {
-
+void VhdlParser::entity_declaration() {QCString s;
+ if (!hasError) {
jj_consume_token(ENTITY_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
-lastEntity=current.get();
- lastCompound=0;
- addVhdlType(s.data(),getLine(ENTITY_T),Entry::CLASS_SEC,VhdlDocGen::ENTITY,0,0,Public);
+m_sharedState->lastEntity=m_sharedState->current;
+ m_sharedState->lastCompound=0;
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(ENTITY_T),Entry::CLASS_SEC,VhdlDocGen::ENTITY,0,0,Public);
}
if (!hasError) {
-
entity_header();
}
if (!hasError) {
-
entity_declarative_part();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case BEGIN_T:{if (!hasError) {
-
+ case BEGIN_T:{
+ if (!hasError) {
jj_consume_token(BEGIN_T);
}
if (!hasError) {
-
entity_statement_part();
}
-
break;
}
default:
- jj_la1[76] = jj_gen;
+ jj_la1[78] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ENTITY_T:{if (!hasError) {
-
+ case ENTITY_T:{
+ if (!hasError) {
jj_consume_token(ENTITY_T);
}
-
break;
}
default:
- jj_la1[77] = jj_gen;
+ jj_la1[79] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
name();
}
-
break;
}
default:
- jj_la1[78] = jj_gen;
+ jj_la1[80] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-lastEntity=0;lastCompound=0; genLabels.resize(0);
+m_sharedState->lastEntity=0;m_sharedState->lastCompound=0; m_sharedState->genLabels.resize(0);
}
@@ -3419,134 +2979,117 @@ void VhdlParser::entity_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
subprogram_declaration();
}
-
break;
}
- case TYPE_T:{if (!hasError) {
-
+ case TYPE_T:{
+ if (!hasError) {
type_declaration();
}
-
break;
}
- case SUBTYPE_T:{if (!hasError) {
-
+ case SUBTYPE_T:{
+ if (!hasError) {
subtype_declaration();
}
-
break;
}
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
constant_declaration();
}
-
break;
}
- case SIGNAL_T:{if (!hasError) {
-
+ case SIGNAL_T:{
+ if (!hasError) {
signal_declaration();
}
-
break;
}
case SHARED_T:
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
variable_declaration();
}
-
break;
}
- case FILE_T:{if (!hasError) {
-
+ case FILE_T:{
+ if (!hasError) {
file_declaration();
}
-
break;
}
- case ALIAS_T:{if (!hasError) {
-
+ case ALIAS_T:{
+ if (!hasError) {
alias_declaration();
}
-
break;
}
default:
- jj_la1[79] = jj_gen;
- if (jj_2_32(2147483647)) {if (!hasError) {
-
+ jj_la1[81] = jj_gen;
+ if (jj_2_33(2147483647)) {
+ if (!hasError) {
attribute_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{if (!hasError) {
-
+ case ATTRIBUTE_T:{
+ if (!hasError) {
attribute_specification();
}
-
break;
}
- case DISCONNECT_T:{if (!hasError) {
-
+ case DISCONNECT_T:{
+ if (!hasError) {
disconnection_specification();
}
-
break;
}
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
use_clause();
}
-
break;
}
default:
- jj_la1[80] = jj_gen;
- if (jj_2_33(3)) {if (!hasError) {
-
+ jj_la1[82] = jj_gen;
+ if (jj_2_34(3)) {
+ if (!hasError) {
group_template_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{if (!hasError) {
-
+ case GROUP_T:{
+ if (!hasError) {
group_declaration();
}
-
break;
}
default:
- jj_la1[81] = jj_gen;
- if (jj_2_34(5)) {if (!hasError) {
-
+ jj_la1[83] = jj_gen;
+ if (jj_2_35(5)) {
+ if (!hasError) {
package_instantiation_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{if (!hasError) {
-
+ case PACKAGE_T:{
+ if (!hasError) {
package_declaration();
}
-
break;
}
- case VHDL2008TOOLDIR:{if (!hasError) {
-
+ case VHDL2008TOOLDIR:{
+ if (!hasError) {
jj_consume_token(VHDL2008TOOLDIR);
}
-
break;
}
default:
- jj_la1[82] = jj_gen;
+ jj_la1[84] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -3559,8 +3102,8 @@ void VhdlParser::entity_declarative_item() {
}
-void VhdlParser::entity_declarative_part() {if (!hasError) {
-
+void VhdlParser::entity_declarative_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -3585,151 +3128,136 @@ void VhdlParser::entity_declarative_part() {if (!hasError) {
break;
}
default:
- jj_la1[83] = jj_gen;
+ jj_la1[85] = jj_gen;
goto end_label_16;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
entity_declarative_item();
}
-
}
end_label_16: ;
}
-
}
-QCString VhdlParser::entity_designator() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::entity_designator() {QCString s,s1;
+ if (!hasError) {
s = entity_tag();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LBRACKET_T:{if (!hasError) {
-
+ case LBRACKET_T:{
+ if (!hasError) {
s1 = signature();
}
-
break;
}
default:
- jj_la1[84] = jj_gen;
+ jj_la1[86] = jj_gen;
;
}
}
-
return s+s1;
assert(false);
}
-void VhdlParser::entity_header() {if (!hasError) {
-
+void VhdlParser::entity_header() {
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{if (!hasError) {
-
-currP=VhdlDocGen::GENERIC;parse_sec=GEN_SEC;
+ case GENERIC_T:{
+ if (!hasError) {
+m_sharedState->currP=VhdlDocGen::GENERIC;m_sharedState->parse_sec=GEN_SEC;
}
if (!hasError) {
-
generic_clause();
}
-
break;
}
default:
- jj_la1[85] = jj_gen;
+ jj_la1[87] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PORT_T:{if (!hasError) {
-
-currP=VhdlDocGen::PORT;
+ case PORT_T:{
+ if (!hasError) {
+m_sharedState->currP=VhdlDocGen::PORT;
}
if (!hasError) {
-
port_clause();
}
-
break;
}
default:
- jj_la1[86] = jj_gen;
+ jj_la1[88] = jj_gen;
;
}
}
-
}
-QCString VhdlParser::entity_name_list() {QCString s,s1;
+QCString VhdlParser::entity_name_list() {QCString s,s1,s2;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:
- case CHARACTER_LITERAL:{if (!hasError) {
-
- while (!hasError) {if (!hasError) {
-
- s1 = entity_designator();
- }
- if (!hasError) {
-
-s+=s1;
- }
-
+ case CHARACTER_LITERAL:{
+ if (!hasError) {
+ if (!hasError) {
+ s1 = entity_designator();
+ }
+ }
+ if (!hasError) {
+ while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case SLSL_T:
- case STRINGLITERAL:
- case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:
- case CHARACTER_LITERAL:{
+ case COMMA_T:{
;
break;
}
default:
- jj_la1[87] = jj_gen;
+ jj_la1[89] = jj_gen;
goto end_label_17;
}
+ if (!hasError) {
+ jj_consume_token(COMMA_T);
+ }
+ if (!hasError) {
+ s = entity_designator();
+ }
+ if (!hasError) {
+s2+=s;
+ }
}
end_label_17: ;
}
if (!hasError) {
-
-return s;
+return s2;
}
-
break;
}
- case OTHER_T:{if (!hasError) {
-
+ case OTHER_T:{
+ if (!hasError) {
jj_consume_token(OTHER_T);
}
if (!hasError) {
-
return "other";
}
-
break;
}
- case ALL_T:{if (!hasError) {
-
+ case ALL_T:{
+ if (!hasError) {
jj_consume_token(ALL_T);
}
if (!hasError) {
-
return "all";
}
-
break;
}
default:
- jj_la1[88] = jj_gen;
+ jj_la1[90] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -3737,50 +3265,44 @@ assert(false);
}
-QCString VhdlParser::entity_specification() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::entity_specification() {QCString s,s1;
+ if (!hasError) {
s = entity_name_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s1 = entity_class();
}
-
return s+":"+s1;
assert(false);
}
void VhdlParser::entity_statement() {
- if (jj_2_35(2147483647)) {if (!hasError) {
-
+ if (jj_2_36(2147483647)) {
+ if (!hasError) {
concurrent_assertion_statement();
}
-
- } else if (jj_2_36(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_37(2147483647)) {
+ if (!hasError) {
process_statement();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case POSTPONED_T:
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
concurrent_procedure_call_statement();
}
-
break;
}
default:
- jj_la1[89] = jj_gen;
+ jj_la1[91] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -3788,8 +3310,8 @@ void VhdlParser::entity_statement() {
}
-void VhdlParser::entity_statement_part() {if (!hasError) {
-
+void VhdlParser::entity_statement_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -3803,17 +3325,15 @@ void VhdlParser::entity_statement_part() {if (!hasError) {
break;
}
default:
- jj_la1[90] = jj_gen;
+ jj_la1[92] = jj_gen;
goto end_label_18;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
entity_statement();
}
-
}
end_label_18: ;
}
-
}
@@ -3822,30 +3342,26 @@ QCString VhdlParser::entity_tag() {QCString s;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case CHARACTER_LITERAL:{if (!hasError) {
-
+ case CHARACTER_LITERAL:{
+ if (!hasError) {
s = character_literal();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[91] = jj_gen;
+ jj_la1[93] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -3856,30 +3372,26 @@ assert(false);
QCString VhdlParser::enumeration_literal() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case CHARACTER_LITERAL:{if (!hasError) {
-
+ case CHARACTER_LITERAL:{
+ if (!hasError) {
s = character_literal();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[92] = jj_gen;
+ jj_la1[94] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -3887,16 +3399,14 @@ assert(false);
}
-QCString VhdlParser::enumeration_type_definition() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::enumeration_type_definition() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s = enumeration_literal();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -3904,99 +3414,84 @@ QCString VhdlParser::enumeration_type_definition() {QCString s,s1;if (!hasError)
break;
}
default:
- jj_la1[93] = jj_gen;
+ jj_la1[95] = jj_gen;
goto end_label_19;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = enumeration_literal();
}
if (!hasError) {
-
s+=",";s+=s1;
}
-
}
end_label_19: ;
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
return "("+s+")";
assert(false);
}
-QCString VhdlParser::exit_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;if (!hasError) {
-
+QCString VhdlParser::exit_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
t = jj_consume_token(COLON_T);
}
-
break;
}
default:
- jj_la1[94] = jj_gen;
+ jj_la1[96] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(EXIT_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s1 = identifier();
}
-
break;
}
default:
- jj_la1[95] = jj_gen;
+ jj_la1[97] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHEN_T:{if (!hasError) {
-
+ case WHEN_T:{
+ if (!hasError) {
t1 = jj_consume_token(WHEN_T);
}
if (!hasError) {
-
s2 = condition();
}
-
break;
}
default:
- jj_la1[96] = jj_gen;
+ jj_la1[98] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-lab.resize(0);
+m_sharedState->lab.resize(0);
if(t) s+=":";
if(t1) s2.prepend(" when ");
FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2.data(),s1.data());
@@ -4006,12 +3501,11 @@ assert(false);
}
-QCString VhdlParser::expression() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::expression() {QCString s,s1,s2;
+ if (!hasError) {
s = relation();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case AND_T:
@@ -4024,25 +3518,21 @@ QCString VhdlParser::expression() {QCString s,s1,s2;if (!hasError) {
break;
}
default:
- jj_la1[97] = jj_gen;
+ jj_la1[99] = jj_gen;
goto end_label_20;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
s1 = logop();
}
if (!hasError) {
-
s2 = relation();
}
if (!hasError) {
-
s+=s1;s+=s2;
}
-
}
end_label_20: ;
}
-
return s;
assert(false);
}
@@ -4050,74 +3540,62 @@ assert(false);
QCString VhdlParser::logop() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case AND_T:{if (!hasError) {
-
+ case AND_T:{
+ if (!hasError) {
jj_consume_token(AND_T);
}
if (!hasError) {
-
return "and" ;
}
-
break;
}
- case NAND_T:{if (!hasError) {
-
+ case NAND_T:{
+ if (!hasError) {
jj_consume_token(NAND_T);
}
if (!hasError) {
-
return "nand" ;
}
-
break;
}
- case NOR_T:{if (!hasError) {
-
+ case NOR_T:{
+ if (!hasError) {
jj_consume_token(NOR_T);
}
if (!hasError) {
-
return "nor" ;
}
-
break;
}
- case XNOR_T:{if (!hasError) {
-
+ case XNOR_T:{
+ if (!hasError) {
jj_consume_token(XNOR_T);
}
if (!hasError) {
-
return "xnor" ;
}
-
break;
}
- case XOR_T:{if (!hasError) {
-
+ case XOR_T:{
+ if (!hasError) {
jj_consume_token(XOR_T);
}
if (!hasError) {
-
return "xor" ;
}
-
break;
}
- case OR_T:{if (!hasError) {
-
+ case OR_T:{
+ if (!hasError) {
jj_consume_token(OR_T);
}
if (!hasError) {
-
return "or" ;
}
-
break;
}
default:
- jj_la1[98] = jj_gen;
+ jj_la1[100] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -4125,11 +3603,10 @@ assert(false);
}
-QCString VhdlParser::extended_identifier() {Token *t;if (!hasError) {
-
+QCString VhdlParser::extended_identifier() {Token *t;
+ if (!hasError) {
t = jj_consume_token(EXTENDED_CHARACTER);
}
-
return t->image.c_str();
assert(false);
}
@@ -4148,72 +3625,89 @@ QCString VhdlParser::factor() {QCString s,s1;
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
- case BIT_STRING_LITERAL:{if (!hasError) {
-
+ case BIT_STRING_LITERAL:{
+ if (!hasError) {
s = primary();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case DOUBLEMULT_T:{if (!hasError) {
-
+ case DOUBLEMULT_T:{
+ if (!hasError) {
jj_consume_token(DOUBLEMULT_T);
}
if (!hasError) {
-
s1 = primary();
}
if (!hasError) {
-
s+="**";s+=s1;
}
-
break;
}
default:
- jj_la1[99] = jj_gen;
+ jj_la1[101] = jj_gen;
;
}
}
if (!hasError) {
-
return s;
}
-
break;
}
- case ABS_T:{if (!hasError) {
-
+ case ABS_T:{
+ if (!hasError) {
jj_consume_token(ABS_T);
}
if (!hasError) {
-
s = primary();
}
if (!hasError) {
-
s1 = "abs "; return s1+s;
}
-
break;
}
- case NOT_T:{if (!hasError) {
-
+ case NOT_T:{
+ if (!hasError) {
jj_consume_token(NOT_T);
}
if (!hasError) {
-
s = primary();
}
if (!hasError) {
-
s1="not ";return s1+s;
}
-
+ break;
+ }
+ case QQ_T:{
+ if (!hasError) {
+ jj_consume_token(QQ_T);
+ }
+ if (!hasError) {
+ s = primary();
+ }
+ if (!hasError) {
+s1="?? ";return s1;
+ }
+ break;
+ }
+ case AND_T:
+ case NAND_T:
+ case NOR_T:
+ case OR_T:
+ case XOR_T:
+ case XNOR_T:{
+ if (!hasError) {
+ s = logop();
+ }
+ if (!hasError) {
+ s1 = primary();
+ }
+ if (!hasError) {
+return s;
+ }
break;
}
default:
- jj_la1[100] = jj_gen;
+ jj_la1[102] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -4221,116 +3715,113 @@ assert(false);
}
-QCString VhdlParser::file_declaration() {QCString s,s1,s2,s3;if (!hasError) {
-
+QCString VhdlParser::file_declaration() {QCString s,s1,s2,s3;
+ if (!hasError) {
jj_consume_token(FILE_T);
}
if (!hasError) {
-
s = identifier_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s2 = subtype_indication();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IS_T:
- case OPEN_T:{if (!hasError) {
-
+ case OPEN_T:{
+ if (!hasError) {
s3 = file_open_information();
}
-
break;
}
default:
- jj_la1[101] = jj_gen;
+ jj_la1[103] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
QCString t1=s2+" "+s3;
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,t1.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,t1.data(),Public);
return " file "+s+":"+s2+" "+s3+";";
assert(false);
}
-QCString VhdlParser::file_logical_name() {QCString s;if (!hasError) {
-
+QCString VhdlParser::file_logical_name() {QCString s;
+ if (!hasError) {
s = expression();
}
-
return s;
assert(false);
}
-QCString VhdlParser::file_open_information() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::file_open_information() {QCString s,s1,s2;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case OPEN_T:{if (!hasError) {
-
+ case OPEN_T:{
+ if (!hasError) {
jj_consume_token(OPEN_T);
}
if (!hasError) {
-
s = expression();
}
-
break;
}
default:
- jj_la1[102] = jj_gen;
+ jj_la1[104] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case IN_T:
+ case OUT_T:{
+ if (!hasError) {
+ inout_stat();
+ }
+ break;
+ }
+ default:
+ jj_la1[105] = jj_gen;
+ ;
+ }
+ }
+ if (!hasError) {
s1 = file_logical_name();
}
-
s2="open "+s+" is "+s1; return s2;
assert(false);
}
-QCString VhdlParser::file_type_definition() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::file_type_definition() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(FILE_T);
}
if (!hasError) {
-
jj_consume_token(OF_T);
}
if (!hasError) {
-
s = type_mark();
}
-
s1=" file of "+s; return s1;
assert(false);
}
-QCString VhdlParser::floating_type_definition() {QCString s;if (!hasError) {
-
+QCString VhdlParser::floating_type_definition() {QCString s;
+ if (!hasError) {
s = range_constraint();
}
-
return s;
assert(false);
}
@@ -4341,30 +3832,26 @@ QCString VhdlParser::formal_designator() {QCString s;Token *tok=0;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case INTEGER:{if (!hasError) {
-
+ case INTEGER:{
+ if (!hasError) {
tok = jj_consume_token(INTEGER);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
default:
- jj_la1[103] = jj_gen;
+ jj_la1[106] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -4372,287 +3859,245 @@ assert(false);
}
-QCString VhdlParser::formal_parameter_list() {QCString s;if (!hasError) {
-
+QCString VhdlParser::formal_parameter_list() {QCString s;
+ if (!hasError) {
s = interface_list();
}
-
return s;
assert(false);
}
-QCString VhdlParser::formal_part() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::formal_part() {QCString s,s1;
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
formal_designator();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
s+"("+s1+")";
}
-
break;
}
default:
- jj_la1[104] = jj_gen;
+ jj_la1[107] = jj_gen;
;
}
}
-
return s;
assert(false);
}
-QCString VhdlParser::full_type_declaration() {Entry *tmpEntry;QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::full_type_declaration() {std::shared_ptr<Entry> tmpEntry;QCString s,s1,s2;
+ if (!hasError) {
jj_consume_token(TYPE_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
-tmpEntry=current.get();
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,0,Public);
+tmpEntry=m_sharedState->current;
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,0,Public);
}
if (!hasError) {
-
- try {if (!hasError) {
-
- s2 = type_definition();
- }
-
- } catch ( ...) {
-error_skipto(SEMI_T);
- }
+ s2 = type_definition();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
if (s2.contains("#")) {
- VhdlDocGen::deleteAllChars(s2,'#');
- tmpEntry->spec=VhdlDocGen::RECORD;
- tmpEntry->type=s2.data();
- //addVhdlType(s.data(),getLine(TYPE_T),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s2.data(),Public);
- }
- else if (s2.contains("%")) {
- VhdlDocGen::deleteAllChars(s2,'%');
- tmpEntry->spec=VhdlDocGen::UNITS;
- tmpEntry->type=s2.data();
- //addVhdlType(s.data(),getLine(TYPE_T),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,s2.data(),s2.data(),Public);
- }
- else {
- tmpEntry->spec=VhdlDocGen::TYPE;
- tmpEntry->type=s2.data();
- //addVhdlType(s.data(),getLine(TYPE_T),Entry::VARIABLE_SEC,VhdlDocGen::TYPE,0,s2.data(),Public);
- }
- tmpEntry=0;
- return "type "+s+" is "+s2+";";
+ VhdlDocGen::deleteAllChars(s2,'#');
+ tmpEntry->spec=VhdlDocGen::RECORD;
+ tmpEntry->type=s2.data();
+ }
+ else if (s2.contains("%")) {
+ VhdlDocGen::deleteAllChars(s2,'%');
+ tmpEntry->spec=VhdlDocGen::UNITS;
+ tmpEntry->type=s2.data();
+ }
+ else {
+ tmpEntry->spec=VhdlDocGen::TYPE;
+ tmpEntry->type=s2.data();
+ }
+
+ tmpEntry.reset();
+ return "type "+s+" is "+s2+";";
assert(false);
}
-QCString VhdlParser::function_call() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::function_call() {QCString s,s1;
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = actual_parameter_part();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
return s+"("+s1+")";
assert(false);
}
-void VhdlParser::generate_statement() {QCString s;if (!hasError) {
-
+void VhdlParser::generate_statement() {QCString s;
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
- try {if (!hasError) {
-
+ try {
+ if (!hasError) {
generate_scheme();
}
if (!hasError) {
-
jj_consume_token(GENERATE_T);
}
if (!hasError) {
-
-pushLabel(genLabels,s);
+outlineParser()->pushLabel(m_sharedState->genLabels,s);
}
if (!hasError) {
-
generate_statement_body1();
}
if (!hasError) {
-
jj_consume_token(END_T);
}
-
} catch ( ...) {
-error_skipto(GENERATE_T);
+outlineParser()->error_skipto(GENERATE_T);
}
}
if (!hasError) {
-
jj_consume_token(GENERATE_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
-
break;
}
default:
- jj_la1[105] = jj_gen;
+ jj_la1[108] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-genLabels=popLabel(genLabels);
+m_sharedState->genLabels=outlineParser()->popLabel(m_sharedState->genLabels);
}
void VhdlParser::generate_scheme() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case FOR_T:{if (!hasError) {
-
+ case FOR_T:{
+ if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
-
parameter_specification();
}
-
break;
}
- case IF_T:{if (!hasError) {
-
+ case IF_T:{
+ if (!hasError) {
jj_consume_token(IF_T);
}
if (!hasError) {
-
+ if (jj_2_38(2)) {
+ if (!hasError) {
+ identifier();
+ }
+ if (!hasError) {
+ jj_consume_token(COLON_T);
+ }
+ } else {
+ ;
+ }
+ }
+ if (!hasError) {
condition();
}
-
break;
}
default:
- jj_la1[106] = jj_gen;
+ jj_la1[109] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-void VhdlParser::generic_clause() {QCString s;if (!hasError) {
-
+void VhdlParser::generic_clause() {QCString s;
+ if (!hasError) {
jj_consume_token(GENERIC_T);
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
-parse_sec=GEN_SEC;
+m_sharedState->parse_sec=GEN_SEC;
}
if (!hasError) {
-
s = generic_list();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-parse_sec=0;
+m_sharedState->parse_sec=0;
}
-QCString VhdlParser::generic_list() {QCString s;if (!hasError) {
-
+QCString VhdlParser::generic_list() {QCString s;
+ if (!hasError) {
s = interface_list();
}
-
return s;
assert(false);
}
-void VhdlParser::generic_map_aspect() {if (!hasError) {
-
+void VhdlParser::generic_map_aspect() {
+ if (!hasError) {
jj_consume_token(GENERIC_T);
}
if (!hasError) {
-
jj_consume_token(MAP_T);
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
association_list();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
}
@@ -4661,30 +4106,26 @@ QCString VhdlParser::group_constituent() {QCString s;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case CHARACTER_LITERAL:{if (!hasError) {
-
+ case CHARACTER_LITERAL:{
+ if (!hasError) {
s = character_literal();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[107] = jj_gen;
+ jj_la1[110] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -4692,15 +4133,13 @@ assert(false);
}
-QCString VhdlParser::group_constituent_list() {QCString s,s1,s2;if (!hasError) {
+QCString VhdlParser::group_constituent_list() {QCString s,s1,s2;
+ if (!hasError) {
if (!hasError) {
-
s1 = group_constituent();
}
-
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -4708,144 +4147,118 @@ QCString VhdlParser::group_constituent_list() {QCString s,s1,s2;if (!hasError) {
break;
}
default:
- jj_la1[108] = jj_gen;
+ jj_la1[111] = jj_gen;
goto end_label_21;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s = group_constituent();
}
if (!hasError) {
-
s2+=",";s2+=s1;
}
-
}
end_label_21: ;
}
-
return s+s2;
assert(false);
}
-QCString VhdlParser::group_declaration() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::group_declaration() {QCString s,s1,s2;
+ if (!hasError) {
jj_consume_token(GROUP_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s1 = identifier();
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s2 = group_constituent_list();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
return "group "+s+":"+s1+"("+s2+");";
assert(false);
}
-QCString VhdlParser::group_template_declaration() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::group_template_declaration() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(GROUP_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = entity_class_entry_list();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
return "group "+s+ "is ("+s1+");";
assert(false);
}
-void VhdlParser::guarded_signal_specification() {if (!hasError) {
-
+void VhdlParser::guarded_signal_specification() {
+ if (!hasError) {
signal_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
type_mark();
}
-
}
QCString VhdlParser::identifier() {Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
tok = jj_consume_token(EXTENDED_CHARACTER);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
- case BASIC_IDENTIFIER:{if (!hasError) {
-
+ case BASIC_IDENTIFIER:{
+ if (!hasError) {
tok = jj_consume_token(BASIC_IDENTIFIER);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
default:
- jj_la1[109] = jj_gen;
+ jj_la1[112] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -4853,12 +4266,11 @@ assert(false);
}
-QCString VhdlParser::identifier_list() {QCString str,str1;if (!hasError) {
-
- str = identifier();
+QCString VhdlParser::identifier_list() {QCString str,str1;
+ if (!hasError) {
+ str = name();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -4866,73 +4278,61 @@ QCString VhdlParser::identifier_list() {QCString str,str1;if (!hasError) {
break;
}
default:
- jj_la1[110] = jj_gen;
+ jj_la1[113] = jj_gen;
goto end_label_22;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
- str1 = identifier();
+ str1 = name();
}
if (!hasError) {
-
str+=",";str+=str1;
}
-
}
end_label_22: ;
}
-
return str;
assert(false);
}
-void VhdlParser::if_statement() {QCString s,s1;if (!hasError) {
-
+void VhdlParser::if_statement() {QCString s,s1;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
-
break;
}
default:
- jj_la1[111] = jj_gen;
+ jj_la1[114] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(IF_T);
}
if (!hasError) {
-
s = condition();
}
if (!hasError) {
-
jj_consume_token(THEN_T);
}
if (!hasError) {
-
s.prepend("if ");
- FlowChart::addFlowChart(FlowChart::IF_NO,0,s);
+ FlowChart::addFlowChart(FlowChart::IF_NO,0,s);
}
if (!hasError) {
-
sequence_of_statement();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ELSIF_T:{
@@ -4940,122 +4340,101 @@ s.prepend("if ");
break;
}
default:
- jj_la1[112] = jj_gen;
+ jj_la1[115] = jj_gen;
goto end_label_23;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(ELSIF_T);
}
if (!hasError) {
-
s1 = condition();
}
if (!hasError) {
-
jj_consume_token(THEN_T);
}
if (!hasError) {
-
s1.prepend("elsif ");
- FlowChart::addFlowChart(FlowChart::ELSIF_NO,0,s1.data());
+ FlowChart::addFlowChart(FlowChart::ELSIF_NO,0,s1.data());
}
if (!hasError) {
-
sequence_of_statement();
}
-
}
end_label_23: ;
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ELSE_T:{if (!hasError) {
-
+ case ELSE_T:{
+ if (!hasError) {
jj_consume_token(ELSE_T);
}
if (!hasError) {
-
FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
}
if (!hasError) {
-
sequence_of_statement();
}
-
break;
}
default:
- jj_la1[113] = jj_gen;
+ jj_la1[116] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(IF_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
-
break;
}
default:
- jj_la1[114] = jj_gen;
+ jj_la1[117] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::ENDIF_NO,0,0);
+ FlowChart::addFlowChart(FlowChart::ENDIF_NO,0,0);
}
-QCString VhdlParser::incomplete_type_declaration() {QCString s;if (!hasError) {
-
+QCString VhdlParser::incomplete_type_declaration() {QCString s;
+ if (!hasError) {
jj_consume_token(TYPE_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
return "type "+s+";";
assert(false);
}
-QCString VhdlParser::index_constraint() {QCString s="("; QCString s1,s2;if (!hasError) {
-
+QCString VhdlParser::index_constraint() {QCString s="("; QCString s1,s2;
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s2 = discrete_range();
}
if (!hasError) {
-
s+=s2;
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -5063,54 +4442,54 @@ s+=s2;
break;
}
default:
- jj_la1[115] = jj_gen;
+ jj_la1[118] = jj_gen;
goto end_label_24;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = discrete_range();
}
if (!hasError) {
-
s+=",";s+=s1;
}
-
}
end_label_24: ;
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
return s+")";
assert(false);
}
QCString VhdlParser::index_specification() {QCString s;
- if (jj_2_37(2147483647)) {if (!hasError) {
-
+ if (jj_2_39(2147483647)) {
+ if (!hasError) {
s = discrete_range();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ABS_T:
+ case AND_T:
+ case NAND_T:
case NEW_T:
+ case NOR_T:
case NOT_T:
case NULL_T:
+ case OR_T:
+ case XOR_T:
+ case XNOR_T:
case LPAREN_T:
case PLUS_T:
case MINUS_T:
case SLSL_T:
+ case QQ_T:
case INTEGER:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
@@ -5118,19 +4497,17 @@ return s;
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
- case BIT_STRING_LITERAL:{if (!hasError) {
-
+ case BIT_STRING_LITERAL:{
+ if (!hasError) {
s = expression();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[116] = jj_gen;
+ jj_la1[119] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -5139,19 +4516,16 @@ assert(false);
}
-QCString VhdlParser::index_subtype_definition() {QCString s;if (!hasError) {
-
+QCString VhdlParser::index_subtype_definition() {QCString s;
+ if (!hasError) {
s = type_mark();
}
if (!hasError) {
-
jj_consume_token(RANGE_T);
}
if (!hasError) {
-
jj_consume_token(BOX_T);
}
-
return s+" range <> ";
assert(false);
}
@@ -5161,110 +4535,91 @@ QCString VhdlParser::instantiation_unit() {QCString s,s1,s2;Token *tok;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMPONENT_T:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case COMPONENT_T:{if (!hasError) {
-
+ case COMPONENT_T:{
+ if (!hasError) {
jj_consume_token(COMPONENT_T);
}
-
break;
}
default:
- jj_la1[117] = jj_gen;
+ jj_la1[120] = jj_gen;
;
}
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
s1="component "; return s;
}
-
break;
}
- case ENTITY_T:{if (!hasError) {
-
+ case ENTITY_T:{
+ if (!hasError) {
jj_consume_token(ENTITY_T);
}
if (!hasError) {
-
- if (jj_2_38(2)) {if (!hasError) {
-
+ if (jj_2_40(2)) {
+ if (!hasError) {
jj_consume_token(BASIC_IDENTIFIER);
}
if (!hasError) {
-
jj_consume_token(DOT_T);
}
-
} else {
;
}
}
if (!hasError) {
-
s2 = name();
}
if (!hasError) {
-
s="entity|"+s2;
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = identifier();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
s+="(";s+=s1;s+=")" ;
}
-
break;
}
default:
- jj_la1[118] = jj_gen;
+ jj_la1[121] = jj_gen;
;
}
}
if (!hasError) {
-
return s;
}
-
break;
}
- case CONFIGURATION_T:{if (!hasError) {
-
+ case CONFIGURATION_T:{
+ if (!hasError) {
jj_consume_token(CONFIGURATION_T);
}
if (!hasError) {
-
s = name();
}
if (!hasError) {
-
s1="configuration ";return s;
}
-
break;
}
default:
- jj_la1[119] = jj_gen;
+ jj_la1[122] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -5274,42 +4629,38 @@ assert(false);
QCString VhdlParser::instantiation_list() {QCString s;Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case SLSL_T:
+ case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier_list();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case OTHER_T:{if (!hasError) {
-
+ case OTHER_T:{
+ if (!hasError) {
tok = jj_consume_token(OTHER_T);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
- case ALL_T:{if (!hasError) {
-
+ case ALL_T:{
+ if (!hasError) {
tok = jj_consume_token(ALL_T);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
default:
- jj_la1[120] = jj_gen;
+ jj_la1[123] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -5317,154 +4668,124 @@ assert(false);
}
-QCString VhdlParser::integer() {Token *t;if (!hasError) {
-
+QCString VhdlParser::integer() {Token *t;
+ if (!hasError) {
t = jj_consume_token(INTEGER);
}
-
return t->image.c_str();
assert(false);
}
-QCString VhdlParser::integer_type_definition() {QCString s;if (!hasError) {
-
+QCString VhdlParser::integer_type_definition() {QCString s;
+ if (!hasError) {
s = range_constraint();
}
-
return s;
assert(false);
}
QCString VhdlParser::interface_declaration() {QCString s,s1;
- if (jj_2_39(5)) {if (!hasError) {
-
+ if (jj_2_41(5)) {
+ if (!hasError) {
s = interface_subprogram_declaration();
}
if (!hasError) {
-
return s;
}
-
+ } else if (jj_2_42(5)) {
+ if (!hasError) {
+ interface_package_declaration();
+ }
+ if (!hasError) {
+return s;
+ }
+ } else if (jj_2_43(5)) {
+ if (!hasError) {
+ s = interface_variable_declaration();
+ }
+ if (!hasError) {
+return s;
+ }
+ } else if (jj_2_44(5)) {
+ if (!hasError) {
+ interface_file_declaration();
+ }
+ if (!hasError) {
+return s;
+ }
+ } else if (jj_2_45(2147483647)) {
+ if (!hasError) {
+ subprogram_declaration();
+ }
+ if (!hasError) {
+return s;
+ }
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{if (!hasError) {
-
- interface_package_declaration();
+ case CONSTANT_T:
+ case FILE_T:
+ case SIGNAL_T:
+ case SHARED_T:
+ case TYPE_T:
+ case VARIABLE_T:{
+ if (!hasError) {
+ s = object_class();
}
if (!hasError) {
-
-return s;
+ s1 = identifier();
+ }
+ if (!hasError) {
+if (m_sharedState->parse_sec==GEN_SEC)
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,m_sharedState->currP,s1.data(),0,Public);
+ return s;
}
-
break;
}
default:
- jj_la1[121] = jj_gen;
- if (jj_2_40(5)) {if (!hasError) {
-
- s = interface_variable_declaration();
- }
- if (!hasError) {
-
-return s;
- }
-
- } else if (jj_2_41(5)) {if (!hasError) {
-
- interface_file_declaration();
- }
- if (!hasError) {
-
-return s;
- }
-
- } else if (jj_2_42(2147483647)) {if (!hasError) {
-
- subprogram_declaration();
- }
- if (!hasError) {
-
-return s;
- }
-
- } else {
- switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CONSTANT_T:
- case FILE_T:
- case SIGNAL_T:
- case SHARED_T:
- case TYPE_T:
- case VARIABLE_T:{if (!hasError) {
-
- s = object_class();
- }
- if (!hasError) {
-
- s1 = identifier();
- }
- if (!hasError) {
-
-if (parse_sec==GEN_SEC)
-
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,currP,s1.data(),0,Public);
- return s;
- }
-
- break;
- }
- default:
- jj_la1[122] = jj_gen;
- jj_consume_token(-1);
- errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
- }
- }
+ jj_la1[124] = jj_gen;
+ jj_consume_token(-1);
+ errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
assert(false);
}
-QCString VhdlParser::interface_element() {QCString s;if (!hasError) {
-
+QCString VhdlParser::interface_element() {QCString s;
+ if (!hasError) {
s = interface_declaration();
}
-
return s;
assert(false);
}
-QCString VhdlParser::interface_file_declaration() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::interface_file_declaration() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(FILE_T);
}
if (!hasError) {
-
s = identifier_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s1 = subtype_indication();
}
-
-addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
- return " file "+s+":"+s1;
+outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
+ return " file "+s+":"+s1;
assert(false);
}
-QCString VhdlParser::interface_list() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::interface_list() {QCString s,s1,s2;
+ if (!hasError) {
s = interface_element();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SEMI_T:{
@@ -5472,218 +4793,192 @@ QCString VhdlParser::interface_list() {QCString s,s1,s2;if (!hasError) {
break;
}
default:
- jj_la1[123] = jj_gen;
+ jj_la1[125] = jj_gen;
goto end_label_25;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(SEMI_T);
}
if (!hasError) {
-
s1 = interface_element();
}
if (!hasError) {
-
s2+=";";s2+=s1;
}
-
}
end_label_25: ;
}
-
return s+s2;
assert(false);
}
-QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=0;Token *tok2=0;QCString s,s1,s2,s3,s4,s5;if (!hasError) {
-
+QCString VhdlParser::interface_variable_declaration() {Token *tok=0;Token *tok1=0;Token *tok2=0;QCString s,s1,s2,s3,s4,s5;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case CONSTANT_T:
case SIGNAL_T:
case SHARED_T:
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
tok = jj_consume_token(VARIABLE_T);
}
-
break;
}
- case SIGNAL_T:{if (!hasError) {
-
+ case SIGNAL_T:{
+ if (!hasError) {
tok = jj_consume_token(SIGNAL_T);
}
-
break;
}
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
tok = jj_consume_token(CONSTANT_T);
}
-
break;
}
- case SHARED_T:{if (!hasError) {
-
+ case SHARED_T:{
+ if (!hasError) {
tok = jj_consume_token(SHARED_T);
}
-
break;
}
default:
- jj_la1[124] = jj_gen;
+ jj_la1[126] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-
break;
}
default:
- jj_la1[125] = jj_gen;
+ jj_la1[127] = jj_gen;
;
}
}
if (!hasError) {
-
s = identifier_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BUFFER_T:
case IN_T:
case INOUT_T:
case LINKAGE_T:
- case OUT_T:{if (!hasError) {
-
+ case OUT_T:{
+ if (!hasError) {
s1 = mode();
}
-
break;
}
default:
- jj_la1[126] = jj_gen;
+ jj_la1[128] = jj_gen;
;
}
}
if (!hasError) {
-
s2 = subtype_indication();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case BUS_T:{if (!hasError) {
-
+ case BUS_T:{
+ if (!hasError) {
tok1 = jj_consume_token(BUS_T);
}
-
break;
}
default:
- jj_la1[127] = jj_gen;
+ jj_la1[129] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VARASSIGN_T:{if (!hasError) {
-
+ case VARASSIGN_T:{
+ if (!hasError) {
tok2 = jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
-
s4 = expression();
}
-
break;
}
default:
- jj_la1[128] = jj_gen;
+ jj_la1[130] = jj_gen;
;
}
}
-
if(tok)
- s5=tok->image.c_str();
+ s5=tok->image.c_str();
- if(tok1)
- s3=tok1->image.data();
+ if(tok1)
+ s3=tok1->image.data();
- if(tok2)
- s3+=":=";
+ if(tok2)
+ s3+=":=";
- QCString it=s+":"+s1+" "+s2+" "+s3+" "+s4;
- if (currP!=VhdlDocGen::COMPONENT)
- {
- if (currP==VhdlDocGen::FUNCTION || currP==VhdlDocGen::PROCEDURE)
- {
- addProto(s5.data(),s.data(),s1.data(),s2.data(),s3.data(),s4.data());
- }
- else
- {
- QCString i=s2+s3+s4;
- if (currP==VhdlDocGen::GENERIC && param_sec==0)
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,currP,i.data(),s1.data(),Public);
- else if(parse_sec != GEN_SEC)
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,currP,i.data(),s1.data(),Public);
- }
- // fprintf(stderr,"\n\n <<port %s >>\n",$$.data());
- } // if component
- return it;
+ QCString it=s+":"+s1+" "+s2+" "+s3+" "+s4;
+ if (m_sharedState->currP!=VhdlDocGen::COMPONENT)
+ {
+ if (m_sharedState->currP==VhdlDocGen::FUNCTION || m_sharedState->currP==VhdlDocGen::PROCEDURE)
+ {
+ outlineParser()->addProto(s5.data(),s.data(),s1.data(),s2.data(),s3.data(),s4.data());
+ }
+ else
+ {
+ QCString i=s2+s3+s4;
+ if (m_sharedState->currP==VhdlDocGen::GENERIC && m_sharedState->param_sec==0)
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,m_sharedState->currP,i.data(),s1.data(),Public);
+ else if(m_sharedState->parse_sec != GEN_SEC)
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,m_sharedState->currP,i.data(),s1.data(),Public);
+ }
+ // fprintf(stderr,"\n\n <<port %s >>\n",$$.data());
+ } // if component
+ return it;
assert(false);
}
QCString VhdlParser::iteration_scheme() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHILE_T:{if (!hasError) {
-
+ case WHILE_T:{
+ if (!hasError) {
jj_consume_token(WHILE_T);
}
if (!hasError) {
-
s = condition();
}
if (!hasError) {
-
s.prepend("while ");
- FlowChart::addFlowChart(FlowChart::WHILE_NO,0,s.data(),lab.data());
- lab="";
+ FlowChart::addFlowChart(FlowChart::WHILE_NO,0,s.data(),m_sharedState->lab.data());
+ m_sharedState->lab="";
return s;
}
-
break;
}
- case FOR_T:{if (!hasError) {
-
+ case FOR_T:{
+ if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
-
s = parameter_specification();
}
if (!hasError) {
-
-QCString q=lab+" for "+s;
- FlowChart::addFlowChart(FlowChart::FOR_NO,0,q.data(),lab.data());
- lab="";
+QCString q=m_sharedState->lab+" for "+s;
+ FlowChart::addFlowChart(FlowChart::FOR_NO,0,q.data(),m_sharedState->lab.data());
+ m_sharedState->lab="";
return q;
}
-
break;
}
default:
- jj_la1[129] = jj_gen;
+ jj_la1[131] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -5691,35 +4986,30 @@ assert(false);
}
-QCString VhdlParser::label() {QCString s;if (!hasError) {
-
+QCString VhdlParser::label() {QCString s;
+ if (!hasError) {
s = identifier();
}
-
return s;
assert(false);
}
-QCString VhdlParser::library_clause() {QCString s;if (!hasError) {
+QCString VhdlParser::library_clause() {QCString s;
+ if (!hasError) {
if (!hasError) {
-
jj_consume_token(LIBRARY_T);
}
if (!hasError) {
-
s = identifier_list();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-
-if ( parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
+if ( m_sharedState->parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
{
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,s.data(),"_library_",Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,s.data(),"_library_",Public);
}
QCString s1="library "+s;
return s1;
@@ -5728,38 +5018,27 @@ assert(false);
QCString VhdlParser::library_unit() {QCString s;
- if (jj_2_43(2)) {if (!hasError) {
-
+ if (jj_2_46(2)) {
+ if (!hasError) {
primary_unit();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ARCHITECTURE_T:
- case PACKAGE_T:{if (!hasError) {
-
+ case PACKAGE_T:{
+ if (!hasError) {
secondary_unit();
}
if (!hasError) {
-
return s;
}
-
- break;
- }
- case CONTEXT_T:{if (!hasError) {
-
- context_declaration();
- }
-
break;
}
default:
- jj_la1[130] = jj_gen;
+ jj_la1[132] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -5769,59 +5048,49 @@ assert(false);
QCString VhdlParser::literal() {QCString s;
- if (jj_2_44(2147483647)) {if (!hasError) {
-
+ if (jj_2_47(2147483647)) {
+ if (!hasError) {
s = bit_string_literal();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_45(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_48(2147483647)) {
+ if (!hasError) {
s = numeric_literal();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_46(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_49(2147483647)) {
+ if (!hasError) {
s = enumeration_literal();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case STRINGLITERAL:{if (!hasError) {
-
+ case STRINGLITERAL:{
+ if (!hasError) {
s = string_literal();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case NULL_T:{if (!hasError) {
-
+ case NULL_T:{
+ if (!hasError) {
jj_consume_token(NULL_T);
}
if (!hasError) {
-
return "null";
}
-
break;
}
default:
- jj_la1[131] = jj_gen;
+ jj_la1[133] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -5830,98 +5099,83 @@ assert(false);
}
-QCString VhdlParser::logical_operator() {QCString s;if (!hasError) {
-
+QCString VhdlParser::logical_operator() {QCString s;
+ if (!hasError) {
s = logop();
}
-
return s;
assert(false);
}
-QCString VhdlParser::loop_statement() {QCString s,s1,s2,s3;if (!hasError) {
-
+QCString VhdlParser::loop_statement() {QCString s,s1,s2,s3;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s+=":";
}
-
break;
}
default:
- jj_la1[132] = jj_gen;
+ jj_la1[134] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FOR_T:
- case WHILE_T:{if (!hasError) {
-
+ case WHILE_T:{
+ if (!hasError) {
s1 = iteration_scheme();
}
-
break;
}
default:
- jj_la1[133] = jj_gen;
+ jj_la1[135] = jj_gen;
;
}
}
if (!hasError) {
-
if(s1.isEmpty())
FlowChart::addFlowChart(FlowChart::LOOP_NO,0,"infinite");
}
if (!hasError) {
-
jj_consume_token(LOOP_T);
}
if (!hasError) {
-
s2 = sequence_of_statement();
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(LOOP_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s3 = identifier();
}
-
break;
}
default:
- jj_la1[134] = jj_gen;
+ jj_la1[136] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
QCString q = s+" loop "+s2+" end loop" +s3;
QCString endLoop="end loop" + s3;
FlowChart::moveToPrevLevel();
@@ -5933,41 +5187,35 @@ assert(false);
QCString VhdlParser::miscellaneous_operator() {Token *t=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case DOUBLEMULT_T:{if (!hasError) {
-
+ case DOUBLEMULT_T:{
+ if (!hasError) {
jj_consume_token(DOUBLEMULT_T);
}
if (!hasError) {
-
return "**";
}
-
break;
}
- case ABS_T:{if (!hasError) {
-
+ case ABS_T:{
+ if (!hasError) {
jj_consume_token(ABS_T);
}
if (!hasError) {
-
return "abs";
}
-
break;
}
- case NOT_T:{if (!hasError) {
-
+ case NOT_T:{
+ if (!hasError) {
jj_consume_token(NOT_T);
}
if (!hasError) {
-
return "not";
}
-
break;
}
default:
- jj_la1[135] = jj_gen;
+ jj_la1[137] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -5977,63 +5225,53 @@ assert(false);
QCString VhdlParser::mode() {Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IN_T:{if (!hasError) {
-
+ case IN_T:{
+ if (!hasError) {
tok = jj_consume_token(IN_T);
}
if (!hasError) {
-
return "in";
}
-
break;
}
- case OUT_T:{if (!hasError) {
-
+ case OUT_T:{
+ if (!hasError) {
tok = jj_consume_token(OUT_T);
}
if (!hasError) {
-
return "out";
}
-
break;
}
- case INOUT_T:{if (!hasError) {
-
+ case INOUT_T:{
+ if (!hasError) {
tok = jj_consume_token(INOUT_T);
}
if (!hasError) {
-
return "inout";
}
-
break;
}
- case BUFFER_T:{if (!hasError) {
-
+ case BUFFER_T:{
+ if (!hasError) {
tok = jj_consume_token(BUFFER_T);
}
if (!hasError) {
-
return "buffer";
}
-
break;
}
- case LINKAGE_T:{if (!hasError) {
-
+ case LINKAGE_T:{
+ if (!hasError) {
tok = jj_consume_token(LINKAGE_T);
}
if (!hasError) {
-
return "linkage";
}
-
break;
}
default:
- jj_la1[136] = jj_gen;
+ jj_la1[138] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -6043,52 +5281,44 @@ assert(false);
QCString VhdlParser::multiplying_operation() {Token *tok=0;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case MULT_T:{if (!hasError) {
-
+ case MULT_T:{
+ if (!hasError) {
tok = jj_consume_token(MULT_T);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
- case SLASH_T:{if (!hasError) {
-
+ case SLASH_T:{
+ if (!hasError) {
tok = jj_consume_token(SLASH_T);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
- case MOD_T:{if (!hasError) {
-
+ case MOD_T:{
+ if (!hasError) {
tok = jj_consume_token(MOD_T);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
- case REM_T:{if (!hasError) {
-
+ case REM_T:{
+ if (!hasError) {
tok = jj_consume_token(REM_T);
}
if (!hasError) {
-
return tok->image.c_str();
}
-
break;
}
default:
- jj_la1[137] = jj_gen;
+ jj_la1[139] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -6096,155 +5326,161 @@ assert(false);
}
-QCString VhdlParser::name() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::name() {QCString s,s1;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case STRINGLITERAL:{if (!hasError) {
-
+ case STRINGLITERAL:{
+ if (!hasError) {
s = operator_symbol();
}
-
- break;
+ if (!hasError) {
+ if (jj_2_50(2147483647)) {
+ if (!hasError) {
+ s1 = name_ext1();
+ }
+ if (!hasError) {
+s+=s1;
+ }
+ } else {
+ ;
}
- case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
- s = identifier();
}
-
+ if (!hasError) {
+return s;
+ }
break;
}
- case SLSL_T:{if (!hasError) {
-
+ case SLSL_T:{
+ if (!hasError) {
s = external_name();
}
-
+ if (!hasError) {
+ if (jj_2_51(2147483647)) {
+ if (!hasError) {
+ s1 = name_ext1();
+ }
+ if (!hasError) {
+s+=s1;
+ }
+ } else {
+ ;
+ }
+ }
+ if (!hasError) {
+return s;
+ }
break;
}
- default:
- jj_la1[138] = jj_gen;
- jj_consume_token(-1);
- errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
- }
- }
- if (!hasError) {
-
- if (jj_2_47(2147483647)) {if (!hasError) {
-
- s1 = name_ext1();
+ case BASIC_IDENTIFIER:
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
+ s = identifier();
}
if (!hasError) {
-
+ if (jj_2_52(2147483647)) {
+ if (!hasError) {
+ s1 = name_ext1();
+ }
+ if (!hasError) {
s+=s1;
+ }
+ } else {
+ ;
}
-
- } else {
- ;
+ }
+ if (!hasError) {
+return s;
+ }
+ break;
+ }
+ default:
+ jj_la1[140] = jj_gen;
+ jj_consume_token(-1);
+ errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-
-return s;
assert(false);
}
-QCString VhdlParser::name_ext1() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::name_ext1() {QCString s,s1,s2;
+ if (!hasError) {
s = name_ext();
}
if (!hasError) {
-
while (!hasError) {
- if (jj_2_48(2147483647)) {
+ if (jj_2_53(2147483647)) {
;
} else {
goto end_label_26;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
s1 = name_ext();
}
if (!hasError) {
-
s+=s1;
}
-
}
end_label_26: ;
}
-
return s;
assert(false);
}
-QCString VhdlParser::name_ext() {QCString s,s1,s2;if (!hasError) {
-
- if (jj_2_49(2147483647)) {if (!hasError) {
-
+QCString VhdlParser::name_ext() {QCString s,s1,s2;
+ if (!hasError) {
+ if (jj_2_54(2147483647)) {
+ if (!hasError) {
jj_consume_token(APOSTROPHE_T);
}
if (!hasError) {
-
jj_consume_token(SUBTYPE_T);
}
if (!hasError) {
-
-s+="'subtype";
+s+="'subtype"; return s;
}
-
- } else if (jj_2_50(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_55(2147483647)) {
+ if (!hasError) {
jj_consume_token(DOT_T);
}
if (!hasError) {
-
s1 = suffix();
}
if (!hasError) {
-
-s+=".";s+=s1;
+s+=".";s+=s1; return s;
}
-
- } else if (jj_2_51(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_56(2147483647)) {
+ if (!hasError) {
s1 = test_att_name();
}
if (!hasError) {
-
-s+=s1;
+s+=s1;return s;
}
-
- } else if (jj_2_52(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_57(2147483647)) {
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = discrete_range();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
-s+="(";s+=s1;s+=")";
+s+="(";s+=s1;s+=")";return s;
}
-
- } else if (jj_2_53(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_58(2147483647)) {
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
s+="(";s+=s1;
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -6252,122 +5488,99 @@ s+="(";s+=s1;
break;
}
default:
- jj_la1[139] = jj_gen;
+ jj_la1[141] = jj_gen;
goto end_label_27;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
s+=",";s+=s1;
}
-
}
end_label_27: ;
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
-s+=")";
+s+=")";return s;
}
-
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-
-return s;
assert(false);
}
-QCString VhdlParser::test_att_name() {QCString s,s1;if (!hasError) {
-
- if (jj_2_54(2147483647)) {if (!hasError) {
-
+QCString VhdlParser::test_att_name() {QCString s,s1;
+ if (!hasError) {
+ if (jj_2_59(2147483647)) {
+ if (!hasError) {
s1 = signature();
}
if (!hasError) {
-
s=s1;
}
-
} else {
;
}
}
if (!hasError) {
-
jj_consume_token(APOSTROPHE_T);
}
if (!hasError) {
-
s1 = attribute_designator();
}
if (!hasError) {
-
s+="'";s+=s1;
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
s+="(";s+=s1;s+=")";
}
-
break;
}
default:
- jj_la1[140] = jj_gen;
+ jj_la1[142] = jj_gen;
;
}
}
-
return s;
assert(false);
}
-QCString VhdlParser::indexed_name() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::indexed_name() {QCString s,s1,s2;
+ if (!hasError) {
s2 = identifier();
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
s=s2+"("+s1;
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -6375,172 +5588,147 @@ s=s2+"("+s1;
break;
}
default:
- jj_la1[141] = jj_gen;
+ jj_la1[143] = jj_gen;
goto end_label_28;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
s+=",";s+=s1;
}
-
}
end_label_28: ;
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
return s+")";
assert(false);
}
-QCString VhdlParser::next_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;if (!hasError) {
-
+QCString VhdlParser::next_statement() {QCString s,s1,s2;Token *t=0;Token *t1=0;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
t = jj_consume_token(COLON_T);
}
-
break;
}
default:
- jj_la1[142] = jj_gen;
+ jj_la1[144] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(NEXT_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s1 = identifier();
}
-
break;
}
default:
- jj_la1[143] = jj_gen;
+ jj_la1[145] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHEN_T:{if (!hasError) {
-
+ case WHEN_T:{
+ if (!hasError) {
t1 = jj_consume_token(WHEN_T);
}
if (!hasError) {
-
s2 = condition();
}
-
break;
}
default:
- jj_la1[144] = jj_gen;
+ jj_la1[146] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
if(t) s+=":";
FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2.data(),s1.data());
- lab.resize(0);
+ m_sharedState->lab.resize(0);
if(t1) s2.prepend("when ");
return s+s1+s2+";";
assert(false);
}
-QCString VhdlParser::null_statement() {QCString s;if (!hasError) {
-
+QCString VhdlParser::null_statement() {QCString s;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s+=":";
}
-
break;
}
default:
- jj_la1[145] = jj_gen;
+ jj_la1[147] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(NULL_T);
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
return s+="null";
assert(false);
}
QCString VhdlParser::numeric_literal() {QCString s;
- if (jj_2_55(2147483647)) {if (!hasError) {
-
+ if (jj_2_60(2147483647)) {
+ if (!hasError) {
s = physical_literal();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case INTEGER:
case DECIMAL_LITERAL:
- case BASED_LITERAL:{if (!hasError) {
-
+ case BASED_LITERAL:{
+ if (!hasError) {
s = abstract_literal();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[146] = jj_gen;
+ jj_la1[148] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -6551,78 +5739,65 @@ assert(false);
QCString VhdlParser::object_class() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
jj_consume_token(CONSTANT_T);
}
if (!hasError) {
-
return "constant";
}
-
break;
}
- case SIGNAL_T:{if (!hasError) {
-
+ case SIGNAL_T:{
+ if (!hasError) {
jj_consume_token(SIGNAL_T);
}
if (!hasError) {
-
return "signal";
}
-
break;
}
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
jj_consume_token(VARIABLE_T);
}
if (!hasError) {
-
return "variable";
}
-
break;
}
- case SHARED_T:{if (!hasError) {
-
+ case SHARED_T:{
+ if (!hasError) {
jj_consume_token(SHARED_T);
}
if (!hasError) {
-
jj_consume_token(VARIABLE_T);
}
if (!hasError) {
-
return "shared variable";
}
-
break;
}
- case FILE_T:{if (!hasError) {
-
+ case FILE_T:{
+ if (!hasError) {
jj_consume_token(FILE_T);
}
if (!hasError) {
-
return "file";
}
-
break;
}
- case TYPE_T:{if (!hasError) {
-
+ case TYPE_T:{
+ if (!hasError) {
jj_consume_token(TYPE_T);
}
if (!hasError) {
-
return "type";
}
-
break;
}
default:
- jj_la1[147] = jj_gen;
+ jj_la1[149] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -6630,125 +5805,107 @@ assert(false);
}
-QCString VhdlParser::operator_symbol() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::operator_symbol() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(STRINGLITERAL);
}
-
return tok->image.c_str();
assert(false);
}
-void VhdlParser::options() {if (!hasError) {
-
+void VhdlParser::options() {
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GUARDED_T:{if (!hasError) {
-
+ case GUARDED_T:{
+ if (!hasError) {
jj_consume_token(GUARDED_T);
}
-
break;
}
default:
- jj_la1[148] = jj_gen;
+ jj_la1[150] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case INERTIAL_T:
case REJECT_T:
- case TRANSPORT_T:{if (!hasError) {
-
+ case TRANSPORT_T:{
+ if (!hasError) {
delay_mechanism();
}
-
break;
}
default:
- jj_la1[149] = jj_gen;
+ jj_la1[151] = jj_gen;
;
}
}
-
}
-void VhdlParser::package_body() {QCString s;if (!hasError) {
-
+void VhdlParser::package_body() {QCString s;
+ if (!hasError) {
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
-
jj_consume_token(BODY_T);
}
if (!hasError) {
-
s = name();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
-lastCompound=current.get();
+m_sharedState->lastCompound=m_sharedState->current;
s.prepend("_");
- addVhdlType(s,getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
+ outlineParser()->addVhdlType(s,outlineParser()->getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
}
if (!hasError) {
-
package_body_declarative_part();
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{if (!hasError) {
-
+ case PACKAGE_T:{
+ if (!hasError) {
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
-
jj_consume_token(BODY_T);
}
-
break;
}
default:
- jj_la1[150] = jj_gen;
+ jj_la1[152] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
name();
}
-
break;
}
default:
- jj_la1[151] = jj_gen;
+ jj_la1[153] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-lastCompound=0; genLabels.resize(0);
+m_sharedState->lastCompound=0; m_sharedState->genLabels.resize(0);
}
@@ -6757,81 +5914,71 @@ void VhdlParser::package_body_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
subprogram_declaration();
}
-
break;
}
- case TYPE_T:{if (!hasError) {
-
+ case TYPE_T:{
+ if (!hasError) {
type_declaration();
}
-
break;
}
- case SUBTYPE_T:{if (!hasError) {
-
+ case SUBTYPE_T:{
+ if (!hasError) {
subtype_declaration();
}
-
break;
}
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
constant_declaration();
}
-
break;
}
case SHARED_T:
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
variable_declaration();
}
-
break;
}
- case FILE_T:{if (!hasError) {
-
+ case FILE_T:{
+ if (!hasError) {
file_declaration();
}
-
break;
}
- case ALIAS_T:{if (!hasError) {
-
+ case ALIAS_T:{
+ if (!hasError) {
alias_declaration();
}
-
break;
}
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
use_clause();
}
-
break;
}
default:
- jj_la1[152] = jj_gen;
- if (jj_2_56(3)) {if (!hasError) {
-
+ jj_la1[154] = jj_gen;
+ if (jj_2_61(3)) {
+ if (!hasError) {
group_template_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{if (!hasError) {
-
+ case GROUP_T:{
+ if (!hasError) {
group_declaration();
}
-
break;
}
default:
- jj_la1[153] = jj_gen;
+ jj_la1[155] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -6840,8 +5987,8 @@ void VhdlParser::package_body_declarative_item() {
}
-void VhdlParser::package_body_declarative_part() {if (!hasError) {
-
+void VhdlParser::package_body_declarative_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -6861,134 +6008,151 @@ void VhdlParser::package_body_declarative_part() {if (!hasError) {
break;
}
default:
- jj_la1[154] = jj_gen;
+ jj_la1[156] = jj_gen;
goto end_label_29;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
package_body_declarative_item();
}
-
}
end_label_29: ;
}
-
}
-void VhdlParser::package_declaration() {QCString s;if (!hasError) {
-
+void VhdlParser::package_header() {QCString s;
+ if (!hasError) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case GENERIC_T:{
+ if (!hasError) {
+ generic_clause();
+ }
+ if (!hasError) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case GENERIC_T:{
+ if (!hasError) {
+ generic_map_aspect();
+ }
+ if (!hasError) {
+ jj_consume_token(SEMI_T);
+ }
+ break;
+ }
+ default:
+ jj_la1[157] = jj_gen;
+ ;
+ }
+ }
+ break;
+ }
+ default:
+ jj_la1[158] = jj_gen;
+ ;
+ }
+ }
+}
+
+
+void VhdlParser::package_declaration() {QCString s;
+ if (!hasError) {
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
-lastCompound=current.get();
- std::shared_ptr<Entry> clone=std::make_shared<Entry>(*current);
+m_sharedState->lastCompound=m_sharedState->current;
+ std::shared_ptr<Entry> clone=std::make_shared<Entry>(*m_sharedState->current);
clone->section=Entry::NAMESPACE_SEC;
clone->spec=VhdlDocGen::PACKAGE;
clone->name=s;
- clone->startLine=getLine(PACKAGE_T);
- clone->bodyLine=getLine(PACKAGE_T);
+ clone->startLine=outlineParser()->getLine(PACKAGE_T);
+ clone->bodyLine=outlineParser()->getLine(PACKAGE_T);
clone->protection=Package;
- current_root->moveToSubEntryAndKeep(clone);
- addVhdlType(s,getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
+ m_sharedState->current_root->moveToSubEntryAndKeep(clone);
+ outlineParser()->addVhdlType(s,outlineParser()->getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
+ }
+ if (!hasError) {
+ package_header();
}
if (!hasError) {
-
package_declarative_part();
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{if (!hasError) {
-
+ case PACKAGE_T:{
+ if (!hasError) {
jj_consume_token(PACKAGE_T);
}
-
break;
}
default:
- jj_la1[155] = jj_gen;
+ jj_la1[159] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
name();
}
-
break;
}
default:
- jj_la1[156] = jj_gen;
+ jj_la1[160] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-lastEntity=0;lastCompound=0; genLabels.resize(0);
+m_sharedState->lastEntity=0;m_sharedState->lastCompound=0; m_sharedState->genLabels.resize(0);
}
-void VhdlParser::geninter() {if (!hasError) {
-
+void VhdlParser::geninter() {
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{if (!hasError) {
-
+ case GENERIC_T:{
+ if (!hasError) {
gen_interface_list();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{if (!hasError) {
-
+ case GENERIC_T:{
+ if (!hasError) {
gen_assoc_list();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
break;
}
default:
- jj_la1[157] = jj_gen;
+ jj_la1[161] = jj_gen;
;
}
}
-
break;
}
default:
- jj_la1[158] = jj_gen;
+ jj_la1[162] = jj_gen;
;
}
}
-
}
@@ -6997,134 +6161,117 @@ void VhdlParser::package_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
subprogram_declaration();
}
-
break;
}
- case TYPE_T:{if (!hasError) {
-
+ case TYPE_T:{
+ if (!hasError) {
type_declaration();
}
-
break;
}
- case SUBTYPE_T:{if (!hasError) {
-
+ case SUBTYPE_T:{
+ if (!hasError) {
subtype_declaration();
}
-
break;
}
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
constant_declaration();
}
-
break;
}
- case SIGNAL_T:{if (!hasError) {
-
+ case SIGNAL_T:{
+ if (!hasError) {
signal_declaration();
}
-
break;
}
case SHARED_T:
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
variable_declaration();
}
-
break;
}
- case FILE_T:{if (!hasError) {
-
+ case FILE_T:{
+ if (!hasError) {
file_declaration();
}
-
break;
}
- case ALIAS_T:{if (!hasError) {
-
+ case ALIAS_T:{
+ if (!hasError) {
alias_declaration();
}
-
break;
}
- case COMPONENT_T:{if (!hasError) {
-
+ case COMPONENT_T:{
+ if (!hasError) {
component_declaration();
}
-
break;
}
default:
- jj_la1[159] = jj_gen;
- if (jj_2_57(2147483647)) {if (!hasError) {
-
+ jj_la1[163] = jj_gen;
+ if (jj_2_62(2147483647)) {
+ if (!hasError) {
attribute_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{if (!hasError) {
-
+ case ATTRIBUTE_T:{
+ if (!hasError) {
attribute_specification();
}
-
break;
}
- case DISCONNECT_T:{if (!hasError) {
-
+ case DISCONNECT_T:{
+ if (!hasError) {
disconnection_specification();
}
-
break;
}
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
use_clause();
}
-
break;
}
default:
- jj_la1[160] = jj_gen;
- if (jj_2_58(3)) {if (!hasError) {
-
+ jj_la1[164] = jj_gen;
+ if (jj_2_63(3)) {
+ if (!hasError) {
group_template_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{if (!hasError) {
-
+ case GROUP_T:{
+ if (!hasError) {
group_declaration();
}
-
break;
}
default:
- jj_la1[161] = jj_gen;
- if (jj_2_59(5)) {if (!hasError) {
-
+ jj_la1[165] = jj_gen;
+ if (jj_2_64(5)) {
+ if (!hasError) {
package_instantiation_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{if (!hasError) {
-
+ case PACKAGE_T:{
+ if (!hasError) {
package_declaration();
}
-
break;
}
default:
- jj_la1[162] = jj_gen;
+ jj_la1[166] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -7137,8 +6284,8 @@ void VhdlParser::package_declarative_item() {
}
-void VhdlParser::package_declarative_part() {if (!hasError) {
-
+void VhdlParser::package_declarative_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -7163,77 +6310,65 @@ void VhdlParser::package_declarative_part() {if (!hasError) {
break;
}
default:
- jj_la1[163] = jj_gen;
+ jj_la1[167] = jj_gen;
goto end_label_30;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
package_declarative_item();
}
-
}
end_label_30: ;
}
-
}
-QCString VhdlParser::parameter_specification() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::parameter_specification() {QCString s,s1;
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(IN_T);
}
if (!hasError) {
-
s1 = discrete_range();
}
-
return s+" in "+s1;
assert(false);
}
-QCString VhdlParser::physical_literal() {QCString s,s1;if (!hasError) {
-
- if (jj_2_60(2147483647)) {if (!hasError) {
-
+QCString VhdlParser::physical_literal() {QCString s,s1;
+ if (!hasError) {
+ if (jj_2_65(2147483647)) {
+ if (!hasError) {
s = abstract_literal();
}
-
} else {
;
}
}
if (!hasError) {
-
s1 = name();
}
-
s+=" ";s+=s1;s.prepend(" "); return s;
assert(false);
}
-QCString VhdlParser::physical_type_definition() {QCString s,s1,s2;if (!hasError) {
-
- jj_consume_token(UNITS_T);
+QCString VhdlParser::physical_type_definition() {QCString s,s1,s2;Token *t=0;
+ if (!hasError) {
+ t = jj_consume_token(UNITS_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
if (!hasError) {
-
-addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,0,Public);
+outlineParser()->addVhdlType(s.data(),t->beginLine,Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,0,Public);
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
@@ -7242,196 +6377,159 @@ addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,0,Public)
break;
}
default:
- jj_la1[164] = jj_gen;
+ jj_la1[168] = jj_gen;
goto end_label_31;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
s1 = secondary_unit_declaration();
}
-
}
end_label_31: ;
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(UNITS_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
name();
}
-
break;
}
default:
- jj_la1[165] = jj_gen;
+ jj_la1[169] = jj_gen;
;
}
}
-
-return s+"%";
+return s;
assert(false);
}
-void VhdlParser::port_clause() {if (!hasError) {
-
+void VhdlParser::port_clause() {
+ if (!hasError) {
jj_consume_token(PORT_T);
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
port_list();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-currP=0;
+m_sharedState->currP=0;
}
-QCString VhdlParser::port_list() {QCString s;if (!hasError) {
-
+QCString VhdlParser::port_list() {QCString s;
+ if (!hasError) {
s = interface_list();
}
-
return s;
assert(false);
}
-void VhdlParser::port_map_aspect() {if (!hasError) {
-
+void VhdlParser::port_map_aspect() {
+ if (!hasError) {
jj_consume_token(PORT_T);
}
if (!hasError) {
-
jj_consume_token(MAP_T);
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
association_list();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
}
QCString VhdlParser::primary() {QCString s,s1;
- if (jj_2_61(2147483647)) {if (!hasError) {
-
+ if (jj_2_66(2147483647)) {
+ if (!hasError) {
s = function_call();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_62(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_67(2147483647)) {
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
s="("+s1+")"; return s;
}
-
- } else if (jj_2_63(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_68(2147483647)) {
+ if (!hasError) {
s = qualified_expression();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_64(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_69(2147483647)) {
+ if (!hasError) {
s = type_conversion();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_65(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_70(2147483647)) {
+ if (!hasError) {
s = literal();
}
if (!hasError) {
-
s.prepend(" ");return s;
}
-
- } else if (jj_2_66(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_71(2147483647)) {
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
return s;
}
-
+ } else if (jj_2_72(2147483647)) {
+ if (!hasError) {
+ allocator();
+ }
+ if (!hasError) {
+return "";
+ }
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case NEW_T:{if (!hasError) {
-
- allocator();
- }
+ case LPAREN_T:{
if (!hasError) {
-
-return "";
- }
-
- break;
- }
- case LPAREN_T:{if (!hasError) {
-
s = aggregate();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[166] = jj_gen;
+ jj_la1[170] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -7442,43 +6540,44 @@ assert(false);
void VhdlParser::primary_unit() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ENTITY_T:{if (!hasError) {
-
+ case ENTITY_T:{
+ if (!hasError) {
entity_declaration();
}
-
break;
}
- case CONFIGURATION_T:{if (!hasError) {
-
+ case CONFIGURATION_T:{
+ if (!hasError) {
configuration_declaration();
}
-
break;
}
default:
- jj_la1[167] = jj_gen;
- if (jj_2_67(2147483647)) {if (!hasError) {
-
+ jj_la1[171] = jj_gen;
+ if (jj_2_73(2147483647)) {
+ if (!hasError) {
package_instantiation_declaration();
}
-
- } else if (jj_2_68(4)) {if (!hasError) {
-
+ } else if (jj_2_74(4)) {
+ if (!hasError) {
interface_package_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PACKAGE_T:{if (!hasError) {
-
+ case PACKAGE_T:{
+ if (!hasError) {
package_declaration();
}
-
+ break;
+ }
+ case CONTEXT_T:{
+ if (!hasError) {
+ context_declaration();
+ }
break;
}
default:
- jj_la1[168] = jj_gen;
+ jj_la1[172] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -7487,71 +6586,59 @@ void VhdlParser::primary_unit() {
}
-QCString VhdlParser::procedure_call() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::procedure_call() {QCString s,s1;
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = actual_parameter_part();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
s1.prepend("("); s1.append(")");
}
-
break;
}
default:
- jj_la1[169] = jj_gen;
+ jj_la1[173] = jj_gen;
;
}
}
-
return s+s1;
assert(false);
}
-QCString VhdlParser::procedure_call_statement() {QCString s,s1;if (!hasError) {
-
- if (jj_2_69(2)) {if (!hasError) {
-
+QCString VhdlParser::procedure_call_statement() {QCString s,s1;
+ if (!hasError) {
+ if (jj_2_75(2)) {
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s+=":";
}
-
} else {
;
}
}
if (!hasError) {
-
s1 = procedure_call();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
return s+s1+";";
assert(false);
}
@@ -7562,145 +6649,121 @@ QCString VhdlParser::process_declarative_item() {QCString s;
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
subprogram_declaration();
}
if (!hasError) {
-
return "";
}
-
break;
}
- case TYPE_T:{if (!hasError) {
-
+ case TYPE_T:{
+ if (!hasError) {
s = type_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case SUBTYPE_T:{if (!hasError) {
-
+ case SUBTYPE_T:{
+ if (!hasError) {
s = subtype_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
s = constant_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
case SHARED_T:
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
s = variable_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case FILE_T:{if (!hasError) {
-
+ case FILE_T:{
+ if (!hasError) {
s = file_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case ALIAS_T:{if (!hasError) {
-
+ case ALIAS_T:{
+ if (!hasError) {
s = alias_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[170] = jj_gen;
- if (jj_2_70(3)) {if (!hasError) {
-
+ jj_la1[174] = jj_gen;
+ if (jj_2_76(3)) {
+ if (!hasError) {
s = attribute_declaration();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{if (!hasError) {
-
+ case ATTRIBUTE_T:{
+ if (!hasError) {
s = attribute_specification();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
s = use_clause();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[171] = jj_gen;
- if (jj_2_71(3)) {if (!hasError) {
-
+ jj_la1[175] = jj_gen;
+ if (jj_2_77(3)) {
+ if (!hasError) {
s = group_template_declaration();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{if (!hasError) {
-
+ case GROUP_T:{
+ if (!hasError) {
s = group_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[172] = jj_gen;
+ jj_la1[176] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -7712,8 +6775,8 @@ assert(false);
}
-QCString VhdlParser::process_declarative_part() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::process_declarative_part() {QCString s,s1;
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -7734,213 +6797,184 @@ QCString VhdlParser::process_declarative_part() {QCString s,s1;if (!hasError) {
break;
}
default:
- jj_la1[173] = jj_gen;
+ jj_la1[177] = jj_gen;
goto end_label_32;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
s1 = process_declarative_item();
}
if (!hasError) {
-
s+=s1;
}
-
}
end_label_32: ;
}
-
return s;
assert(false);
}
-void VhdlParser::process_statement() {QCString s,s1,s2;Token *tok=0;if (!hasError) {
-
+void VhdlParser::process_statement() {QCString s,s1,s2;Token *tok=0;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
-
break;
}
default:
- jj_la1[174] = jj_gen;
+ jj_la1[178] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case POSTPONED_T:{if (!hasError) {
-
+ case POSTPONED_T:{
+ if (!hasError) {
jj_consume_token(POSTPONED_T);
}
-
break;
}
default:
- jj_la1[175] = jj_gen;
+ jj_la1[179] = jj_gen;
;
}
}
if (!hasError) {
-
-currP=VhdlDocGen::PROCESS;
- current->startLine=getLine();
- current->bodyLine=getLine();
+m_sharedState->currP=VhdlDocGen::PROCESS;
+ m_sharedState->current->startLine=outlineParser()->getLine();
+ m_sharedState->current->bodyLine=outlineParser()->getLine();
}
if (!hasError) {
-
jj_consume_token(PROCESS_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ALL_T:{if (!hasError) {
-
+ case ALL_T:{
+ if (!hasError) {
tok = jj_consume_token(ALL_T);
}
-
break;
}
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s1 = sensitivity_list();
}
-
break;
}
default:
- jj_la1[176] = jj_gen;
+ jj_la1[180] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
break;
}
default:
- jj_la1[177] = jj_gen;
+ jj_la1[181] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IS_T:{if (!hasError) {
-
+ case IS_T:{
+ if (!hasError) {
jj_consume_token(IS_T);
}
-
break;
}
default:
- jj_la1[178] = jj_gen;
+ jj_la1[182] = jj_gen;
;
}
}
if (!hasError) {
-
s2 = process_declarative_part();
}
if (!hasError) {
-
if (s2.data())
FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s2.data(),0);
FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
}
if (!hasError) {
-
jj_consume_token(BEGIN_T);
}
if (!hasError) {
-
process_statement_part();
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case POSTPONED_T:{if (!hasError) {
-
+ case POSTPONED_T:{
+ if (!hasError) {
jj_consume_token(POSTPONED_T);
}
-
break;
}
default:
- jj_la1[179] = jj_gen;
+ jj_la1[183] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(PROCESS_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
-
break;
}
default:
- jj_la1[180] = jj_gen;
+ jj_la1[184] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
if(s.isEmpty())
- currName=VhdlDocGen::getProcessNumber();
- else
- currName=s;
+ m_sharedState->currName=VhdlDocGen::getProcessNumber();
+ else
+ m_sharedState->currName=s;
- current->name=currName;
- tempEntry=current.get();
- current->endBodyLine=getLine();
- currP=0;
- if(tok)
- s1=tok->image.data();
- createFunction(currName,VhdlDocGen::PROCESS,s1.data());
- createFlow();
- currName="";
- newEntry();
+ m_sharedState->current->name=m_sharedState->currName;
+ m_sharedState->tempEntry=m_sharedState->current;
+ m_sharedState->current->endBodyLine=outlineParser()->getLine();
+ m_sharedState->currP=0;
+ if(tok)
+ s1=tok->image.data();
+ outlineParser()->createFunction(m_sharedState->currName,VhdlDocGen::PROCESS,s1.data());
+ outlineParser()->createFlow();
+ m_sharedState->currName="";
+ outlineParser()->newEntry();
}
-void VhdlParser::process_statement_part() {if (!hasError) {
-
+void VhdlParser::process_statement_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -7965,104 +6999,86 @@ void VhdlParser::process_statement_part() {if (!hasError) {
break;
}
default:
- jj_la1[181] = jj_gen;
+ jj_la1[185] = jj_gen;
goto end_label_33;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
sequential_statement();
}
-
}
end_label_33: ;
}
-
}
-QCString VhdlParser::qualified_expression() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::qualified_expression() {QCString s,s1;
+ if (!hasError) {
s1 = identifier();
}
if (!hasError) {
-
jj_consume_token(APOSTROPHE_T);
}
if (!hasError) {
-
s=s1+"'";
}
if (!hasError) {
-
- if (jj_2_72(2147483647)) {if (!hasError) {
-
+ if (jj_2_78(2147483647)) {
+ if (!hasError) {
s1 = aggregate();
}
if (!hasError) {
-
s+=s1;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
s+="(";s+=s1;s+=")";
}
-
break;
}
default:
- jj_la1[182] = jj_gen;
+ jj_la1[186] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
}
-
return s;
assert(false);
}
QCString VhdlParser::range() {QCString s,s1,s2;
- if (jj_2_73(2147483647)) {if (!hasError) {
-
+ if (jj_2_79(2147483647)) {
+ if (!hasError) {
s = simple_expression();
}
if (!hasError) {
-
s1 = direction();
}
if (!hasError) {
-
s2 = simple_expression();
}
if (!hasError) {
-
return s+" "+s1+" "+s2;
}
-
- } else if (jj_2_74(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_80(2147483647)) {
+ if (!hasError) {
s = attribute_name();
}
if (!hasError) {
-
return s;
}
-
} else {
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
@@ -8071,103 +7087,98 @@ assert(false);
}
-QCString VhdlParser::range_constraint() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::range_constraint() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(RANGE_T);
}
if (!hasError) {
-
s = range();
}
-
return " range "+s;
assert(false);
}
-void VhdlParser::record_type_definition() {if (!hasError) {
-
+void VhdlParser::record_type_definition() {
+ if (!hasError) {
jj_consume_token(RECORD_T);
}
if (!hasError) {
-
- while (!hasError) {if (!hasError) {
-
+ while (!hasError) {
+ if (!hasError) {
element_declaration();
}
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case SLSL_T:
+ case STRINGLITERAL:
case BASIC_IDENTIFIER:
case EXTENDED_CHARACTER:{
;
break;
}
default:
- jj_la1[183] = jj_gen;
+ jj_la1[187] = jj_gen;
goto end_label_34;
}
}
end_label_34: ;
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(RECORD_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
name();
}
-
break;
}
default:
- jj_la1[184] = jj_gen;
+ jj_la1[188] = jj_gen;
;
}
}
-
}
-QCString VhdlParser::relation() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::relation() {QCString s,s1,s2;
+ if (!hasError) {
s = shift_expression();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LESSTHAN_T:
case GREATERTHAN_T:
case LT_T:
case GT_T:
case EQU_T:
- case NOTEQU_T:{if (!hasError) {
-
+ case NOTEQU_T:
+ case QGT_T:
+ case QLT_T:
+ case QG_T:
+ case QL_T:
+ case QEQU_T:
+ case QNEQU_T:{
+ if (!hasError) {
s1 = relation_operator();
}
if (!hasError) {
-
s2 = shift_expression();
}
-
break;
}
default:
- jj_la1[185] = jj_gen;
+ jj_la1[189] = jj_gen;
;
}
}
-
return s+s1+s2;
assert(false);
}
@@ -8175,74 +7186,116 @@ assert(false);
QCString VhdlParser::relation_operator() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LT_T:{if (!hasError) {
-
+ case LT_T:{
+ if (!hasError) {
jj_consume_token(LT_T);
}
if (!hasError) {
-
return "<";
}
-
break;
}
- case GT_T:{if (!hasError) {
-
+ case GT_T:{
+ if (!hasError) {
jj_consume_token(GT_T);
}
if (!hasError) {
-
return ">";
}
-
break;
}
- case EQU_T:{if (!hasError) {
-
+ case EQU_T:{
+ if (!hasError) {
jj_consume_token(EQU_T);
}
if (!hasError) {
-
return "=";
}
-
break;
}
- case GREATERTHAN_T:{if (!hasError) {
-
+ case GREATERTHAN_T:{
+ if (!hasError) {
jj_consume_token(GREATERTHAN_T);
}
if (!hasError) {
-
return ">=";
}
-
break;
}
- case LESSTHAN_T:{if (!hasError) {
-
+ case LESSTHAN_T:{
+ if (!hasError) {
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
-
return "<=";
}
-
break;
}
- case NOTEQU_T:{if (!hasError) {
-
+ case NOTEQU_T:{
+ if (!hasError) {
jj_consume_token(NOTEQU_T);
}
if (!hasError) {
-
return "/=";
}
-
+ break;
+ }
+ case QGT_T:{
+ if (!hasError) {
+ jj_consume_token(QGT_T);
+ }
+ if (!hasError) {
+return "?>=";
+ }
+ break;
+ }
+ case QLT_T:{
+ if (!hasError) {
+ jj_consume_token(QLT_T);
+ }
+ if (!hasError) {
+return "?<=";
+ }
+ break;
+ }
+ case QG_T:{
+ if (!hasError) {
+ jj_consume_token(QG_T);
+ }
+ if (!hasError) {
+return "?>";
+ }
+ break;
+ }
+ case QL_T:{
+ if (!hasError) {
+ jj_consume_token(QL_T);
+ }
+ if (!hasError) {
+return "?<";
+ }
+ break;
+ }
+ case QEQU_T:{
+ if (!hasError) {
+ jj_consume_token(QEQU_T);
+ }
+ if (!hasError) {
+return "?=";
+ }
+ break;
+ }
+ case QNEQU_T:{
+ if (!hasError) {
+ jj_consume_token(QNEQU_T);
+ }
+ if (!hasError) {
+return "?/=";
+ }
break;
}
default:
- jj_la1[186] = jj_gen;
+ jj_la1[190] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -8250,58 +7303,49 @@ assert(false);
}
-QCString VhdlParser::report_statement() {Token *t=0;Token *t1=0;QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::report_statement() {Token *t=0;Token *t1=0;QCString s,s1,s2;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
t = jj_consume_token(COLON_T);
}
-
break;
}
default:
- jj_la1[187] = jj_gen;
+ jj_la1[191] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(REPORT_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case SEVERITY_T:{if (!hasError) {
-
+ case SEVERITY_T:{
+ if (!hasError) {
t1 = jj_consume_token(SEVERITY_T);
}
if (!hasError) {
-
s2 = expression();
}
-
break;
}
default:
- jj_la1[188] = jj_gen;
+ jj_la1[192] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
if(t) s.append(":");
s1.prepend(" report ");
if(t1) s2.prepend(" severity ");
@@ -8310,45 +7354,47 @@ assert(false);
}
-QCString VhdlParser::return_statement() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::return_statement() {QCString s,s1;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s+=":";
}
-
break;
}
default:
- jj_la1[189] = jj_gen;
+ jj_la1[193] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(RETURN_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ABS_T:
+ case AND_T:
+ case NAND_T:
case NEW_T:
+ case NOR_T:
case NOT_T:
case NULL_T:
+ case OR_T:
+ case XOR_T:
+ case XNOR_T:
case LPAREN_T:
case PLUS_T:
case MINUS_T:
case SLSL_T:
+ case QQ_T:
case INTEGER:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
@@ -8356,67 +7402,62 @@ s+=":";
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
- case BIT_STRING_LITERAL:{if (!hasError) {
-
+ case BIT_STRING_LITERAL:{
+ if (!hasError) {
s1 = expression();
}
-
break;
}
default:
- jj_la1[190] = jj_gen;
+ jj_la1[194] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
return s+" return "+s1+";";
assert(false);
}
QCString VhdlParser::scalar_type_definition() {QCString s,s1;
- switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ if (jj_2_81(2147483647)) {
+ if (!hasError) {
s = enumeration_type_definition();
}
if (!hasError) {
-
return s;
}
-
- break;
- }
- case RANGE_T:{if (!hasError) {
-
- s = range_constraint();
- }
- if (!hasError) {
-
- if (jj_2_75(2147483647)) {if (!hasError) {
-
- s1 = physical_type_definition();
+ } else {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case RANGE_T:{
+ if (!hasError) {
+ s = range_constraint();
}
-
- } else {
- ;
- }
- }
- if (!hasError) {
-
-return s+" "+s1+"%";
- }
-
- break;
+ if (!hasError) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case UNITS_T:{
+ if (!hasError) {
+ s1 = physical_type_definition();
+ }
+ break;
+ }
+ default:
+ jj_la1[195] = jj_gen;
+ ;
+ }
+ }
+ if (!hasError) {
+return s+" "+s1;
+ }
+ break;
+ }
+ default:
+ jj_la1[196] = jj_gen;
+ jj_consume_token(-1);
+ errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
- default:
- jj_la1[191] = jj_gen;
- jj_consume_token(-1);
- errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
assert(false);
}
@@ -8424,121 +7465,99 @@ assert(false);
void VhdlParser::secondary_unit() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ARCHITECTURE_T:{if (!hasError) {
-
+ case ARCHITECTURE_T:{
+ if (!hasError) {
architecture_body();
}
-
break;
}
- case PACKAGE_T:{if (!hasError) {
-
+ case PACKAGE_T:{
+ if (!hasError) {
package_body();
}
-
break;
}
default:
- jj_la1[192] = jj_gen;
+ jj_la1[197] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-QCString VhdlParser::secondary_unit_declaration() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::secondary_unit_declaration() {QCString s,s1;Token *t1=0;
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
- jj_consume_token(EQU_T);
+ t1 = jj_consume_token(EQU_T);
}
if (!hasError) {
-
s1 = physical_literal();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-//printf("\n %s %s [%d]",s.data(),s1.data(),getLine());
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,s1.data(),Public);
-
- return s+"="+s1;
+outlineParser()->addVhdlType(s.data(),t1->beginLine,Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,s1.data(),Public);
+ return s+"="+s1;
assert(false);
}
-QCString VhdlParser::selected_name() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::selected_name() {QCString s,s1;
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(DOT_T);
}
if (!hasError) {
-
s1 = suffix();
}
-
return s+"."+s1;
assert(false);
}
-void VhdlParser::selected_signal_assignment() {if (!hasError) {
-
+void VhdlParser::selected_signal_assignment() {
+ if (!hasError) {
jj_consume_token(WITH_T);
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
jj_consume_token(SELECT_T);
}
if (!hasError) {
-
target();
}
if (!hasError) {
-
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
-
options();
}
if (!hasError) {
-
selected_waveforms();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::selected_waveforms() {if (!hasError) {
-
+void VhdlParser::selected_waveforms() {
+ if (!hasError) {
waveform();
}
if (!hasError) {
-
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
choices();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -8546,53 +7565,45 @@ void VhdlParser::selected_waveforms() {if (!hasError) {
break;
}
default:
- jj_la1[193] = jj_gen;
+ jj_la1[198] = jj_gen;
goto end_label_35;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
waveform();
}
if (!hasError) {
-
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
choices();
}
-
}
end_label_35: ;
}
-
}
-QCString VhdlParser::sensitivity_clause() {QCString s;if (!hasError) {
-
+QCString VhdlParser::sensitivity_clause() {QCString s;
+ if (!hasError) {
jj_consume_token(ON_T);
}
if (!hasError) {
-
s = sensitivity_list();
}
-
s.prepend(" on ");
return s;
assert(false);
}
-QCString VhdlParser::sensitivity_list() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::sensitivity_list() {QCString s,s1;
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -8600,181 +7611,148 @@ QCString VhdlParser::sensitivity_list() {QCString s,s1;if (!hasError) {
break;
}
default:
- jj_la1[194] = jj_gen;
+ jj_la1[199] = jj_gen;
goto end_label_36;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = name();
}
if (!hasError) {
-
s+=",";s+=s1;
}
-
}
end_label_36: ;
}
-
return s;
assert(false);
}
-QCString VhdlParser::sequence_of_statement() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::sequence_of_statement() {QCString s,s1;
+ if (!hasError) {
while (!hasError) {
- if (jj_2_76(3)) {
+ if (jj_2_82(3)) {
;
} else {
goto end_label_37;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
s1 = sequential_statement();
}
if (!hasError) {
-
s+=s1;
}
-
}
end_label_37: ;
}
-
return s;
assert(false);
}
QCString VhdlParser::sequential_statement() {QCString s;
- if (jj_2_77(2147483647)) {if (!hasError) {
-
+ if (jj_2_83(2147483647)) {
+ if (!hasError) {
s = signal_assignment_statement();
}
if (!hasError) {
-
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
-
- } else if (jj_2_78(3)) {if (!hasError) {
-
+ } else if (jj_2_84(3)) {
+ if (!hasError) {
s = assertion_statement();
}
if (!hasError) {
-
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
-
- } else if (jj_2_79(3)) {if (!hasError) {
-
+ } else if (jj_2_85(3)) {
+ if (!hasError) {
s = report_statement();
}
if (!hasError) {
-
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
-
- } else if (jj_2_80(3)) {if (!hasError) {
-
+ } else if (jj_2_86(3)) {
+ if (!hasError) {
s = wait_statement();
}
if (!hasError) {
-
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
-
- } else if (jj_2_81(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_87(2147483647)) {
+ if (!hasError) {
s = variable_assignment_statement();
}
if (!hasError) {
-
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
-
- } else if (jj_2_82(3)) {if (!hasError) {
-
+ } else if (jj_2_88(3)) {
+ if (!hasError) {
s = procedure_call_statement();
}
if (!hasError) {
-
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
-
- } else if (jj_2_83(3)) {if (!hasError) {
-
+ } else if (jj_2_89(3)) {
+ if (!hasError) {
if_statement();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_84(3)) {if (!hasError) {
-
+ } else if (jj_2_90(3)) {
+ if (!hasError) {
case_statement();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_85(3)) {if (!hasError) {
-
+ } else if (jj_2_91(3)) {
+ if (!hasError) {
loop_statement();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_86(3)) {if (!hasError) {
-
+ } else if (jj_2_92(3)) {
+ if (!hasError) {
s = next_statement();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_87(3)) {if (!hasError) {
-
+ } else if (jj_2_93(3)) {
+ if (!hasError) {
s = exit_statement();
}
if (!hasError) {
-
return s;
}
-
- } else if (jj_2_88(3)) {if (!hasError) {
-
+ } else if (jj_2_94(3)) {
+ if (!hasError) {
s = return_statement();
}
if (!hasError) {
-
FlowChart::addFlowChart(FlowChart::RETURN_NO,s.data(),0);return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case NULL_T:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = null_statement();
}
if (!hasError) {
-
FlowChart::addFlowChart(FlowChart::TEXT_NO,s.data(),0);return s;
}
-
break;
}
default:
- jj_la1[195] = jj_gen;
+ jj_la1[200] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -8783,35 +7761,31 @@ assert(false);
}
-QCString VhdlParser::shift_expression() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::shift_expression() {QCString s,s1,s2;
+ if (!hasError) {
s = simple_expression();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ROL_T:
case ROR_T:
case SLA_T:
case SLL_T:
case SRA_T:
- case SRL_T:{if (!hasError) {
-
+ case SRL_T:{
+ if (!hasError) {
s1 = shift_operator();
}
if (!hasError) {
-
s2 = simple_expression();
}
-
break;
}
default:
- jj_la1[196] = jj_gen;
+ jj_la1[201] = jj_gen;
;
}
}
-
return s+s1+s2;
assert(false);
}
@@ -8819,74 +7793,62 @@ assert(false);
QCString VhdlParser::shift_operator() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case SLL_T:{if (!hasError) {
-
+ case SLL_T:{
+ if (!hasError) {
jj_consume_token(SLL_T);
}
if (!hasError) {
-
return "sll";
}
-
break;
}
- case SRL_T:{if (!hasError) {
-
+ case SRL_T:{
+ if (!hasError) {
jj_consume_token(SRL_T);
}
if (!hasError) {
-
return "srl";
}
-
break;
}
- case SLA_T:{if (!hasError) {
-
+ case SLA_T:{
+ if (!hasError) {
jj_consume_token(SLA_T);
}
if (!hasError) {
-
return "sla";
}
-
break;
}
- case SRA_T:{if (!hasError) {
-
+ case SRA_T:{
+ if (!hasError) {
jj_consume_token(SRA_T);
}
if (!hasError) {
-
return "sra";
}
-
break;
}
- case ROL_T:{if (!hasError) {
-
+ case ROL_T:{
+ if (!hasError) {
jj_consume_token(ROL_T);
}
if (!hasError) {
-
return "rol";
}
-
break;
}
- case ROR_T:{if (!hasError) {
-
+ case ROR_T:{
+ if (!hasError) {
jj_consume_token(ROR_T);
}
if (!hasError) {
-
return "ror";
}
-
break;
}
default:
- jj_la1[197] = jj_gen;
+ jj_la1[202] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -8896,30 +7858,26 @@ assert(false);
QCString VhdlParser::sign() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PLUS_T:{if (!hasError) {
-
+ case PLUS_T:{
+ if (!hasError) {
jj_consume_token(PLUS_T);
}
if (!hasError) {
-
return "+";
}
-
break;
}
- case MINUS_T:{if (!hasError) {
-
+ case MINUS_T:{
+ if (!hasError) {
jj_consume_token(MINUS_T);
}
if (!hasError) {
-
return "-";
}
-
break;
}
default:
- jj_la1[198] = jj_gen;
+ jj_la1[203] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -8928,91 +7886,76 @@ assert(false);
QCString VhdlParser::signal_assignment_statement() {QCString s,s1,s2,s3;
- if (jj_2_90(2147483647)) {if (!hasError) {
-
+ if (jj_2_96(2147483647)) {
+ if (!hasError) {
conditional_signal_assignment_wave();
}
if (!hasError) {
-
return "";
}
-
- } else if (jj_2_91(2147483647)) {if (!hasError) {
-
+ } else if (jj_2_97(2147483647)) {
+ if (!hasError) {
selected_signal_assignment_wave();
}
if (!hasError) {
-
return "";
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LPAREN_T:
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
- if (jj_2_89(2)) {if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
+ if (jj_2_95(2)) {
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s+=":";
}
-
} else {
;
}
}
if (!hasError) {
-
s1 = target();
}
if (!hasError) {
-
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case INERTIAL_T:
case REJECT_T:
- case TRANSPORT_T:{if (!hasError) {
-
+ case TRANSPORT_T:{
+ if (!hasError) {
s2 = delay_mechanism();
}
-
break;
}
default:
- jj_la1[199] = jj_gen;
+ jj_la1[204] = jj_gen;
;
}
}
if (!hasError) {
-
s3 = waveform();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
if (!hasError) {
-
return s+s1+"<="+s2+s3+";";
}
-
break;
}
default:
- jj_la1[200] = jj_gen;
+ jj_la1[205] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -9021,103 +7964,88 @@ assert(false);
}
-void VhdlParser::semi() {if (!hasError) {
-
+void VhdlParser::semi() {
+ if (!hasError) {
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::signal_declaration() {Token* tok=0;QCString s,s1,s2,s3,s4;if (!hasError) {
-
+void VhdlParser::signal_declaration() {Token* tok=0;QCString s,s1,s2,s3,s4;
+ if (!hasError) {
jj_consume_token(SIGNAL_T);
}
if (!hasError) {
-
s = identifier_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s1 = subtype_indication();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BUS_T:
- case REGISTER_T:{if (!hasError) {
-
+ case REGISTER_T:{
+ if (!hasError) {
s2 = signal_kind();
}
-
break;
}
default:
- jj_la1[201] = jj_gen;
+ jj_la1[206] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VARASSIGN_T:{if (!hasError) {
-
+ case VARASSIGN_T:{
+ if (!hasError) {
tok = jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
-
s3 = expression();
}
-
break;
}
default:
- jj_la1[202] = jj_gen;
+ jj_la1[207] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
if(tok)
s3.prepend(":=");
s4=s1+s2+s3;
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::SIGNAL,0,s4.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::SIGNAL,0,s4.data(),Public);
}
QCString VhdlParser::signal_kind() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case REGISTER_T:{if (!hasError) {
-
+ case REGISTER_T:{
+ if (!hasError) {
jj_consume_token(REGISTER_T);
}
if (!hasError) {
-
return "register";
}
-
break;
}
- case BUS_T:{if (!hasError) {
-
+ case BUS_T:{
+ if (!hasError) {
jj_consume_token(BUS_T);
}
if (!hasError) {
-
return "bus";
}
-
break;
}
default:
- jj_la1[203] = jj_gen;
+ jj_la1[208] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -9130,12 +8058,11 @@ QCString VhdlParser::signal_list() {QCString s,s1;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -9143,51 +8070,43 @@ QCString VhdlParser::signal_list() {QCString s,s1;
break;
}
default:
- jj_la1[204] = jj_gen;
+ jj_la1[209] = jj_gen;
goto end_label_38;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = name();
}
if (!hasError) {
-
s+=",";s+=s1;
}
-
}
end_label_38: ;
}
-
break;
}
- case OTHER_T:{if (!hasError) {
-
+ case OTHER_T:{
+ if (!hasError) {
jj_consume_token(OTHER_T);
}
if (!hasError) {
-
return "other";
}
-
break;
}
- case ALL_T:{if (!hasError) {
-
+ case ALL_T:{
+ if (!hasError) {
jj_consume_token(ALL_T);
}
if (!hasError) {
-
return "all";
}
-
break;
}
default:
- jj_la1[205] = jj_gen;
+ jj_la1[210] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -9195,22 +8114,20 @@ assert(false);
}
-QCString VhdlParser::signature() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::signature() {QCString s,s1,s2;
+ if (!hasError) {
jj_consume_token(LBRACKET_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -9218,169 +8135,143 @@ QCString VhdlParser::signature() {QCString s,s1,s2;if (!hasError) {
break;
}
default:
- jj_la1[206] = jj_gen;
+ jj_la1[211] = jj_gen;
goto end_label_39;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = name();
}
if (!hasError) {
-
s+=",";s+=s1;
}
-
}
end_label_39: ;
}
-
break;
}
default:
- jj_la1[207] = jj_gen;
+ jj_la1[212] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case RETURN_T:{if (!hasError) {
-
+ case RETURN_T:{
+ if (!hasError) {
jj_consume_token(RETURN_T);
}
if (!hasError) {
-
s1 = name();
}
if (!hasError) {
-
s+="return ";s+=s1;
}
-
break;
}
default:
- jj_la1[208] = jj_gen;
+ jj_la1[213] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(RBRACKET_T);
}
-
s1="["+s+"]";return s1;
assert(false);
}
-QCString VhdlParser::simple_expression() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::simple_expression() {QCString s,s1,s2;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case PLUS_T:
- case MINUS_T:{if (!hasError) {
-
+ case MINUS_T:{
+ if (!hasError) {
s = sign();
}
-
break;
}
default:
- jj_la1[209] = jj_gen;
+ jj_la1[214] = jj_gen;
;
}
}
if (!hasError) {
-
s1 = term();
}
if (!hasError) {
-
s+=s1;
}
if (!hasError) {
-
while (!hasError) {
- if (jj_2_92(2147483647)) {
+ if (jj_2_98(2147483647)) {
;
} else {
goto end_label_40;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
s1 = adding_operator();
}
if (!hasError) {
-
s2 = term();
}
if (!hasError) {
-
s+=s1;s+=s2;
}
-
}
end_label_40: ;
}
-
return s;
assert(false);
}
-void VhdlParser::simple_name() {if (!hasError) {
-
+void VhdlParser::simple_name() {
+ if (!hasError) {
name();
}
-
}
-QCString VhdlParser::slice_name() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::slice_name() {QCString s,s1;
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = discrete_range();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
return s+"("+s1+")";
assert(false);
}
-QCString VhdlParser::string_literal() {Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::string_literal() {Token *tok=0;
+ if (!hasError) {
tok = jj_consume_token(STRINGLITERAL);
}
-
return tok->image.c_str();
assert(false);
}
-void VhdlParser::subprogram_body() {QCString s;if (!hasError) {
-
+void VhdlParser::subprogram_body() {QCString s;
+ if (!hasError) {
jj_consume_token(IS_T);
}
if (!hasError) {
-
//try{
s = subprogram_declarative_part();
}
if (!hasError) {
-
if (s.data())
{
FlowChart::addFlowChart(FlowChart::VARIABLE_NO,s,0);
@@ -9388,89 +8279,76 @@ if (s.data())
FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
}
if (!hasError) {
-
jj_consume_token(BEGIN_T);
}
if (!hasError) {
-
subprogram_statement_part();
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FUNCTION_T:
- case PROCEDURE_T:{if (!hasError) {
-
+ case PROCEDURE_T:{
+ if (!hasError) {
subprogram_kind();
}
-
break;
}
default:
- jj_la1[210] = jj_gen;
+ jj_la1[215] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
designator();
}
-
break;
}
default:
- jj_la1[211] = jj_gen;
+ jj_la1[216] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-tempEntry->endBodyLine=getLine(END_T);
- createFlow();
- currP=0;
+m_sharedState->tempEntry->endBodyLine=outlineParser()->getLine(END_T);
+ outlineParser()->createFlow();
+ m_sharedState->currP=0;
}
void VhdlParser::subprogram_declaration() {
- if (jj_2_93(2147483647)) {if (!hasError) {
-
+ if (jj_2_99(2147483647)) {
+ if (!hasError) {
subprogram_instantiation_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
subprogram_specification();
}
if (!hasError) {
-
subprogram_1();
}
if (!hasError) {
-
-currP=0;
+m_sharedState->currP=0;
}
-
break;
}
default:
- jj_la1[212] = jj_gen;
+ jj_la1[217] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -9480,22 +8358,20 @@ currP=0;
void VhdlParser::subprogram_1() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IS_T:{if (!hasError) {
-
+ case IS_T:{
+ if (!hasError) {
subprogram_body();
}
-
break;
}
- case SEMI_T:{if (!hasError) {
-
+ case SEMI_T:{
+ if (!hasError) {
jj_consume_token(SEMI_T);
}
-
break;
}
default:
- jj_la1[213] = jj_gen;
+ jj_la1[218] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -9507,156 +8383,130 @@ QCString VhdlParser::subprogram_declarative_item() {QCString s;
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
subprogram_declaration();
}
if (!hasError) {
-
return "";
}
-
break;
}
- case TYPE_T:{if (!hasError) {
-
+ case TYPE_T:{
+ if (!hasError) {
s = type_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case IS_T:{if (!hasError) {
-
+ case IS_T:{
+ if (!hasError) {
subprogram_body();
}
if (!hasError) {
-
return "";
}
-
break;
}
- case SUBTYPE_T:{if (!hasError) {
-
+ case SUBTYPE_T:{
+ if (!hasError) {
s = subtype_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
s = constant_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
case SHARED_T:
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
s = variable_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case FILE_T:{if (!hasError) {
-
+ case FILE_T:{
+ if (!hasError) {
s = file_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case ALIAS_T:{if (!hasError) {
-
+ case ALIAS_T:{
+ if (!hasError) {
s = alias_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[214] = jj_gen;
- if (jj_2_94(2147483647)) {if (!hasError) {
-
+ jj_la1[219] = jj_gen;
+ if (jj_2_100(2147483647)) {
+ if (!hasError) {
s = attribute_declaration();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{if (!hasError) {
-
+ case ATTRIBUTE_T:{
+ if (!hasError) {
s = attribute_specification();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
s = use_clause();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[215] = jj_gen;
- if (jj_2_95(3)) {if (!hasError) {
-
+ jj_la1[220] = jj_gen;
+ if (jj_2_101(3)) {
+ if (!hasError) {
s = group_template_declaration();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{if (!hasError) {
-
+ case GROUP_T:{
+ if (!hasError) {
s = group_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[216] = jj_gen;
+ jj_la1[221] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -9668,8 +8518,8 @@ assert(false);
}
-QCString VhdlParser::subprogram_declarative_part() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::subprogram_declarative_part() {QCString s,s1;
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -9691,21 +8541,18 @@ QCString VhdlParser::subprogram_declarative_part() {QCString s,s1;if (!hasError)
break;
}
default:
- jj_la1[217] = jj_gen;
+ jj_la1[222] = jj_gen;
goto end_label_41;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
s1 = subprogram_declarative_item();
}
if (!hasError) {
-
s+=s1;
}
-
}
end_label_41: ;
}
-
return s;
assert(false);
}
@@ -9713,22 +8560,20 @@ assert(false);
void VhdlParser::subprogram_kind() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case FUNCTION_T:{if (!hasError) {
-
+ case FUNCTION_T:{
+ if (!hasError) {
jj_consume_token(FUNCTION_T);
}
-
break;
}
- case PROCEDURE_T:{if (!hasError) {
-
+ case PROCEDURE_T:{
+ if (!hasError) {
jj_consume_token(PROCEDURE_T);
}
-
break;
}
default:
- jj_la1[218] = jj_gen;
+ jj_la1[223] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -9737,200 +8582,169 @@ void VhdlParser::subprogram_kind() {
void VhdlParser::subprogram_specification() {QCString s;Token *tok=0;Token *t;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PROCEDURE_T:{if (!hasError) {
-
+ case PROCEDURE_T:{
+ if (!hasError) {
jj_consume_token(PROCEDURE_T);
}
if (!hasError) {
-
s = designator();
}
if (!hasError) {
-
-currP=VhdlDocGen::PROCEDURE;
- createFunction(s.data(),currP,0);
- tempEntry=current.get();
- current->startLine=getLine(PROCEDURE_T);
- current->bodyLine=getLine(PROCEDURE_T);
+m_sharedState->currP=VhdlDocGen::PROCEDURE;
+ outlineParser()->createFunction(s.data(),m_sharedState->currP,0);
+ m_sharedState->tempEntry=m_sharedState->current;
+ m_sharedState->current->startLine=outlineParser()->getLine(PROCEDURE_T);
+ m_sharedState->current->bodyLine=outlineParser()->getLine(PROCEDURE_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
-param_sec=PARAM_SEC;
+m_sharedState->param_sec=PARAM_SEC;
}
if (!hasError) {
-
interface_list();
}
if (!hasError) {
-
-param_sec=0;
+m_sharedState->param_sec=0;
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
break;
}
default:
- jj_la1[219] = jj_gen;
+ jj_la1[224] = jj_gen;
;
}
}
if (!hasError) {
-
- if (jj_2_96(2)) {if (!hasError) {
-
+ if (jj_2_102(2)) {
+ if (!hasError) {
gen_interface_list();
}
-
} else {
;
}
}
if (!hasError) {
-
- if (jj_2_97(2)) {if (!hasError) {
-
+ if (jj_2_103(2)) {
+ if (!hasError) {
gen_assoc_list();
}
-
} else {
;
}
}
if (!hasError) {
-
param();
}
if (!hasError) {
-
-newEntry();
+outlineParser()->newEntry();
}
-
break;
}
case FUNCTION_T:
case IMPURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IMPURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
tok = jj_consume_token(PURE_T);
}
-
break;
}
- case IMPURE_T:{if (!hasError) {
-
+ case IMPURE_T:{
+ if (!hasError) {
tok = jj_consume_token(IMPURE_T);
}
-
break;
}
default:
- jj_la1[220] = jj_gen;
+ jj_la1[225] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-
break;
}
default:
- jj_la1[221] = jj_gen;
+ jj_la1[226] = jj_gen;
;
}
}
if (!hasError) {
-
t = jj_consume_token(FUNCTION_T);
}
if (!hasError) {
-
s = designator();
}
if (!hasError) {
-
-currP=VhdlDocGen::FUNCTION;
- if(tok)
- createFunction(tok->image.c_str(),currP,s.data());
- else
- createFunction(0,currP,s.data());
- tempEntry=current.get();
- current->startLine=getLine(FUNCTION_T);
- current->bodyLine=getLine(FUNCTION_T);
+m_sharedState->currP=VhdlDocGen::FUNCTION;
+ if(tok)
+ outlineParser()->createFunction(tok->image.c_str(),m_sharedState->currP,s.data());
+ else
+ outlineParser()->createFunction(0,m_sharedState->currP,s.data());
+ m_sharedState->tempEntry=m_sharedState->current;
+ m_sharedState->current->startLine=outlineParser()->getLine(FUNCTION_T);
+ m_sharedState->current->bodyLine=outlineParser()->getLine(FUNCTION_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
-param_sec=PARAM_SEC;
+ case LPAREN_T:{
+ if (!hasError) {
+m_sharedState->param_sec=PARAM_SEC;
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
formal_parameter_list();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
-param_sec=0;
+m_sharedState->param_sec=0;
}
-
break;
}
default:
- jj_la1[222] = jj_gen;
+ jj_la1[227] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(RETURN_T);
}
if (!hasError) {
-
s = type_mark();
}
if (!hasError) {
-
-tempEntry=current.get();
- current->type=s;
- newEntry();
+m_sharedState->tempEntry=m_sharedState->current;
+ m_sharedState->current->type=s;
+ outlineParser()->newEntry();
}
-
break;
}
default:
- jj_la1[223] = jj_gen;
+ jj_la1[228] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-void VhdlParser::subprogram_statement_part() {if (!hasError) {
-
+void VhdlParser::subprogram_statement_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -9955,126 +8769,138 @@ void VhdlParser::subprogram_statement_part() {if (!hasError) {
break;
}
default:
- jj_la1[224] = jj_gen;
+ jj_la1[229] = jj_gen;
goto end_label_42;
- }if (!hasError) {
-
+ }
+ if (!hasError) {
sequential_statement();
}
-
}
end_label_42: ;
}
-
}
-QCString VhdlParser::subtype_declaration() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::subtype_declaration() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(SUBTYPE_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
s1 = subtype_indication();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::SUBTYPE,0,s1.data(),Public);
+outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::SUBTYPE,0,s1.data(),Public);
return " subtype "+s+" is "+s1+";";
assert(false);
}
-QCString VhdlParser::subtype_indication() {QCString s,s1,s2;if (!hasError) {
-
- s = name();
+QCString VhdlParser::reslution_indication() {QCString s;
+ if (!hasError) {
+ jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
- if (jj_2_98(2147483647)) {if (!hasError) {
-
- s1 = name();
+ s = expression();
+ }
+ if (!hasError) {
+ jj_consume_token(RPAREN_T);
+ }
+return "("+s+")";
+assert(false);
+}
+
+
+QCString VhdlParser::subtype_indication() {QCString s,s1,s2;
+ if (!hasError) {
+ if (jj_2_104(5)) {
+ if (!hasError) {
+ s = reslution_indication();
}
-
} else {
;
}
}
if (!hasError) {
-
- if (jj_2_99(2147483647)) {if (!hasError) {
-
+ while (!hasError) {
+ if (!hasError) {
+ s1 = name();
+ }
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case SLSL_T:
+ case STRINGLITERAL:
+ case BASIC_IDENTIFIER:
+ case EXTENDED_CHARACTER:{
+ ;
+ break;
+ }
+ default:
+ jj_la1[230] = jj_gen;
+ goto end_label_43;
+ }
+ }
+ end_label_43: ;
+ }
+ if (!hasError) {
+ if (jj_2_105(2147483647)) {
+ if (!hasError) {
s2 = constraint();
}
-
} else {
;
}
}
-
return s+" "+s1+" "+s2;
assert(false);
}
QCString VhdlParser::suffix() {QCString s;
- if (jj_2_100(2147483647)) {if (!hasError) {
-
+ if (jj_2_106(2147483647)) {
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CHARACTER_LITERAL:{if (!hasError) {
-
+ case CHARACTER_LITERAL:{
+ if (!hasError) {
s = character_literal();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case STRINGLITERAL:{if (!hasError) {
-
+ case STRINGLITERAL:{
+ if (!hasError) {
s = operator_symbol();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case ALL_T:{if (!hasError) {
-
+ case ALL_T:{
+ if (!hasError) {
jj_consume_token(ALL_T);
}
if (!hasError) {
-
return " all ";
}
-
break;
}
default:
- jj_la1[225] = jj_gen;
+ jj_la1[231] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -10088,30 +8914,26 @@ QCString VhdlParser::target() {QCString s;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
s = aggregate();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[226] = jj_gen;
+ jj_la1[232] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -10119,100 +8941,85 @@ assert(false);
}
-QCString VhdlParser::term() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::term() {QCString s,s1,s2;
+ if (!hasError) {
s = factor();
}
if (!hasError) {
-
while (!hasError) {
- if (jj_2_101(2)) {
+ if (jj_2_107(2)) {
;
} else {
- goto end_label_43;
- }if (!hasError) {
-
+ goto end_label_44;
+ }
+ if (!hasError) {
s1 = multiplying_operation();
}
if (!hasError) {
-
s2 = factor();
}
if (!hasError) {
-
s+=s1;s+=s2;
}
-
}
- end_label_43: ;
+ end_label_44: ;
}
-
return s;
assert(false);
}
-QCString VhdlParser::timeout_clause() {QCString s;if (!hasError) {
-
+QCString VhdlParser::timeout_clause() {QCString s;
+ if (!hasError) {
jj_consume_token(FOR_T);
}
if (!hasError) {
-
s = expression();
}
-
return " for "+s;
assert(false);
}
-QCString VhdlParser::type_conversion() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::type_conversion() {QCString s,s1;
+ if (!hasError) {
s = name();
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
return s+"("+s1+")";
assert(false);
}
QCString VhdlParser::type_declaration() {QCString s;
- if (jj_2_102(3)) {if (!hasError) {
-
+ if (jj_2_108(3)) {
+ if (!hasError) {
s = full_type_declaration();
}
if (!hasError) {
-
return s;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case TYPE_T:{if (!hasError) {
-
+ case TYPE_T:{
+ if (!hasError) {
s = incomplete_type_declaration();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[227] = jj_gen;
+ jj_la1[233] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -10224,78 +9031,66 @@ assert(false);
QCString VhdlParser::type_definition() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case RANGE_T:
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
//try{
s = scalar_type_definition();
}
if (!hasError) {
-
return s;
}
-
break;
}
case ARRAY_T:
- case RECORD_T:{if (!hasError) {
-
+ case RECORD_T:{
+ if (!hasError) {
s = composite_type_definition();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case ACCESS_T:{if (!hasError) {
-
+ case ACCESS_T:{
+ if (!hasError) {
s = access_type_definition();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case FILE_T:{if (!hasError) {
-
+ case FILE_T:{
+ if (!hasError) {
s = file_type_definition();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[228] = jj_gen;
- if (jj_2_103(2)) {if (!hasError) {
-
+ jj_la1[234] = jj_gen;
+ if (jj_2_109(2)) {
+ if (!hasError) {
protected_type_body();
}
if (!hasError) {
-
return "";
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PROTECTED_T:{if (!hasError) {
-
+ case PROTECTED_T:{
+ if (!hasError) {
protected_type_declaration();
}
if (!hasError) {
-
return "";
}
-
break;
}
default:
- jj_la1[229] = jj_gen;
+ jj_la1[235] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -10305,30 +9100,26 @@ assert(false);
}
-QCString VhdlParser::type_mark() {QCString s;if (!hasError) {
-
+QCString VhdlParser::type_mark() {QCString s;
+ if (!hasError) {
s = name();
}
-
return s;
assert(false);
}
-QCString VhdlParser::unconstraint_array_definition() {QCString s,s1,s2,s3;if (!hasError) {
-
+QCString VhdlParser::unconstraint_array_definition() {QCString s,s1,s2,s3;
+ if (!hasError) {
jj_consume_token(ARRAY_T);
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s = index_subtype_definition();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -10336,52 +9127,43 @@ QCString VhdlParser::unconstraint_array_definition() {QCString s,s1,s2,s3;if (!h
break;
}
default:
- jj_la1[230] = jj_gen;
- goto end_label_44;
- }if (!hasError) {
-
+ jj_la1[236] = jj_gen;
+ goto end_label_45;
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = index_subtype_definition();
}
if (!hasError) {
-
s3+=",";s3+=s1;
}
-
}
- end_label_44: ;
+ end_label_45: ;
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
if (!hasError) {
-
jj_consume_token(OF_T);
}
if (!hasError) {
-
s2 = subtype_indication();
}
-
return "array("+s+s3+") of "+s2;
assert(false);
}
-QCString VhdlParser::use_clause() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::use_clause() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(USE_T);
}
if (!hasError) {
-
s = selected_name();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -10389,37 +9171,32 @@ QCString VhdlParser::use_clause() {QCString s,s1;if (!hasError) {
break;
}
default:
- jj_la1[231] = jj_gen;
- goto end_label_45;
- }if (!hasError) {
-
+ jj_la1[237] = jj_gen;
+ goto end_label_46;
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = selected_name();
}
if (!hasError) {
-
s+=",";s+=s1;
}
-
}
- end_label_45: ;
+ end_label_46: ;
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
QCStringList ql1=QCStringList::split(",",s);
for (uint j=0;j<ql1.count();j++)
{
QCStringList ql=QCStringList::split(".",ql1[j]);
QCString it=ql[1];
- if ( parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
+ if ( m_sharedState->parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
{
- VhdlParser::addVhdlType(it.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::USE,it.data(),"_use_",Public);
+ outlineParser()->addVhdlType(it.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::USE,it.data(),"_use_",Public);
}
}
s1="use "+s;
@@ -10434,61 +9211,50 @@ QCString VhdlParser::variable_assignment_statement() {QCString s,s1,s2;
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
- if (jj_2_104(2)) {if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
+ if (jj_2_110(2)) {
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s+=":";
}
-
} else {
;
}
}
if (!hasError) {
-
s1 = target();
}
if (!hasError) {
-
jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
-
s2 = expression();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
if (!hasError) {
-
return s+s1+":="+s2+";";
}
-
break;
}
- case WITH_T:{if (!hasError) {
-
+ case WITH_T:{
+ if (!hasError) {
selected_variable_assignment();
}
if (!hasError) {
-
return "";
}
-
break;
}
default:
- jj_la1[232] = jj_gen;
+ jj_la1[238] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -10496,159 +9262,139 @@ assert(false);
}
-QCString VhdlParser::variable_declaration() {Token *tok=0;Token *t1=0;QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::variable_declaration() {Token *tok=0;Token *t1=0;QCString s,s1,s2;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case SHARED_T:{if (!hasError) {
-
+ case SHARED_T:{
+ if (!hasError) {
tok = jj_consume_token(SHARED_T);
}
-
break;
}
default:
- jj_la1[233] = jj_gen;
+ jj_la1[239] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(VARIABLE_T);
}
if (!hasError) {
-
s = identifier_list();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s1 = subtype_indication();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case VARASSIGN_T:{if (!hasError) {
-
+ case VARASSIGN_T:{
+ if (!hasError) {
t1 = jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
-
s2 = expression();
}
-
break;
}
default:
- jj_la1[234] = jj_gen;
+ jj_la1[240] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
int spec;
- if(t1)
- s2.prepend(":=");
- QCString val=" variable "+s+":"+s1+s2+";";
- QCString it=s1;
- if(tok != 0)
- {
- it.prepend(" shared ");
- val.prepend(" shared");
- spec=VhdlDocGen::SHAREDVARIABLE;
- }
- else
- spec=VhdlDocGen::SHAREDVARIABLE;
+ if(t1)
+ s2.prepend(":=");
+ QCString val=" variable "+s+":"+s1+s2+";";
+ QCString it=s1;
+ if(tok != 0)
+ {
+ it.prepend(" shared ");
+ val.prepend(" shared");
+ spec=VhdlDocGen::SHAREDVARIABLE;
+ }
+ else
+ spec=VhdlDocGen::SHAREDVARIABLE;
- if(t1){
- it+=":=";
- it+=s2;
- }
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,spec,0,it.data(),Public);
- return val;
+ if(t1)
+ {
+ it+=":=";
+ it+=s2;
+ }
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,spec,0,it.data(),Public);
+ return val;
assert(false);
}
-QCString VhdlParser::wait_statement() {QCString s,s1,s2,s3;Token *t=0;if (!hasError) {
-
+QCString VhdlParser::wait_statement() {QCString s,s1,s2,s3;Token *t=0;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
t = jj_consume_token(COLON_T);
}
-
break;
}
default:
- jj_la1[235] = jj_gen;
+ jj_la1[241] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(WAIT_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ON_T:{if (!hasError) {
-
+ case ON_T:{
+ if (!hasError) {
s1 = sensitivity_clause();
}
-
break;
}
default:
- jj_la1[236] = jj_gen;
+ jj_la1[242] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case UNTIL_T:{if (!hasError) {
-
+ case UNTIL_T:{
+ if (!hasError) {
s2 = condition_clause();
}
-
break;
}
default:
- jj_la1[237] = jj_gen;
+ jj_la1[243] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case FOR_T:{if (!hasError) {
-
+ case FOR_T:{
+ if (!hasError) {
s3 = timeout_clause();
}
-
break;
}
default:
- jj_la1[238] = jj_gen;
+ jj_la1[244] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
if(t) s.append(":");
return s+" wait "+s1+s2+s3+";";
assert(false);
@@ -10658,13 +9404,20 @@ assert(false);
QCString VhdlParser::waveform() {QCString s,s1;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ABS_T:
+ case AND_T:
+ case NAND_T:
case NEW_T:
+ case NOR_T:
case NOT_T:
case NULL_T:
+ case OR_T:
+ case XOR_T:
+ case XNOR_T:
case LPAREN_T:
case PLUS_T:
case MINUS_T:
case SLSL_T:
+ case QQ_T:
case INTEGER:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
@@ -10672,12 +9425,11 @@ QCString VhdlParser::waveform() {QCString s,s1;
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
- case BIT_STRING_LITERAL:{if (!hasError) {
-
+ case BIT_STRING_LITERAL:{
+ if (!hasError) {
s = waveform_element();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -10685,44 +9437,37 @@ QCString VhdlParser::waveform() {QCString s,s1;
break;
}
default:
- jj_la1[239] = jj_gen;
- goto end_label_46;
- }if (!hasError) {
-
+ jj_la1[245] = jj_gen;
+ goto end_label_47;
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
s1 = waveform_element();
}
if (!hasError) {
-
s+=","; s+=s1;
}
-
}
- end_label_46: ;
+ end_label_47: ;
}
if (!hasError) {
-
return s;
}
-
break;
}
- case UNAFFECTED_T:{if (!hasError) {
-
+ case UNAFFECTED_T:{
+ if (!hasError) {
jj_consume_token(UNAFFECTED_T);
}
if (!hasError) {
-
return " unaffected ";
}
-
break;
}
default:
- jj_la1[240] = jj_gen;
+ jj_la1[246] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -10730,80 +9475,67 @@ assert(false);
}
-QCString VhdlParser::waveform_element() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::waveform_element() {QCString s,s1;
+ if (!hasError) {
s = expression();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case AFTER_T:{if (!hasError) {
-
+ case AFTER_T:{
+ if (!hasError) {
jj_consume_token(AFTER_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
s1.prepend(" after ");
}
-
break;
}
default:
- jj_la1[241] = jj_gen;
+ jj_la1[247] = jj_gen;
;
}
}
-
return s+s1;
assert(false);
}
-QCString VhdlParser::protected_type_body() {if (!hasError) {
-
+QCString VhdlParser::protected_type_body() {
+ if (!hasError) {
jj_consume_token(PROTECTED_T);
}
if (!hasError) {
-
jj_consume_token(BODY_T);
}
if (!hasError) {
-
protected_type_body_declarative_part();
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(PROTECTED_T);
}
if (!hasError) {
-
jj_consume_token(BODY_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
-
break;
}
default:
- jj_la1[242] = jj_gen;
+ jj_la1[248] = jj_gen;
;
}
}
-
return "";
assert(false);
}
@@ -10814,104 +9546,91 @@ void VhdlParser::protected_type_body_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
subprogram_declaration();
}
-
break;
}
- case IS_T:{if (!hasError) {
-
+ case IS_T:{
+ if (!hasError) {
subprogram_body();
}
-
break;
}
- case TYPE_T:{if (!hasError) {
-
+ case TYPE_T:{
+ if (!hasError) {
type_declaration();
}
-
break;
}
- case SUBTYPE_T:{if (!hasError) {
-
+ case SUBTYPE_T:{
+ if (!hasError) {
subtype_declaration();
}
-
break;
}
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
constant_declaration();
}
-
break;
}
case SHARED_T:
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
variable_declaration();
}
-
break;
}
- case FILE_T:{if (!hasError) {
-
+ case FILE_T:{
+ if (!hasError) {
file_declaration();
}
-
break;
}
- case ALIAS_T:{if (!hasError) {
-
+ case ALIAS_T:{
+ if (!hasError) {
alias_declaration();
}
-
break;
}
default:
- jj_la1[243] = jj_gen;
- if (jj_2_105(2147483647)) {if (!hasError) {
-
+ jj_la1[249] = jj_gen;
+ if (jj_2_111(2147483647)) {
+ if (!hasError) {
attribute_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ATTRIBUTE_T:{if (!hasError) {
-
+ case ATTRIBUTE_T:{
+ if (!hasError) {
attribute_specification();
}
-
break;
}
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
use_clause();
}
-
break;
}
default:
- jj_la1[244] = jj_gen;
- if (jj_2_106(3)) {if (!hasError) {
-
+ jj_la1[250] = jj_gen;
+ if (jj_2_112(3)) {
+ if (!hasError) {
group_template_declaration();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GROUP_T:{if (!hasError) {
-
+ case GROUP_T:{
+ if (!hasError) {
group_declaration();
}
-
break;
}
default:
- jj_la1[245] = jj_gen;
+ jj_la1[251] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -10922,8 +9641,8 @@ void VhdlParser::protected_type_body_declarative_item() {
}
-void VhdlParser::protected_type_body_declarative_part() {if (!hasError) {
-
+void VhdlParser::protected_type_body_declarative_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
@@ -10945,60 +9664,51 @@ void VhdlParser::protected_type_body_declarative_part() {if (!hasError) {
break;
}
default:
- jj_la1[246] = jj_gen;
- goto end_label_47;
- }if (!hasError) {
-
+ jj_la1[252] = jj_gen;
+ goto end_label_48;
+ }
+ if (!hasError) {
protected_type_body_declarative_item();
}
-
}
- end_label_47: ;
+ end_label_48: ;
}
-
}
-QCString VhdlParser::protected_type_declaration() {if (!hasError) {
-
+QCString VhdlParser::protected_type_declaration() {
+ if (!hasError) {
jj_consume_token(PROTECTED_T);
}
if (!hasError) {
-
- try {if (!hasError) {
-
+ try {
+ if (!hasError) {
protected_type_declarative_part();
}
-
} catch ( ...) {
-error_skipto(END_T);
+outlineParser()->error_skipto(END_T);
}
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(PROTECTED_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
-
break;
}
default:
- jj_la1[247] = jj_gen;
+ jj_la1[253] = jj_gen;
;
}
}
-
return "";
assert(false);
}
@@ -11009,37 +9719,34 @@ void VhdlParser::protected_type_declarative_item() {
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
subprogram_specification();
}
-
break;
}
- case ATTRIBUTE_T:{if (!hasError) {
-
+ case ATTRIBUTE_T:{
+ if (!hasError) {
attribute_specification();
}
-
break;
}
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
use_clause();
}
-
break;
}
default:
- jj_la1[248] = jj_gen;
+ jj_la1[254] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-void VhdlParser::protected_type_declarative_part() {if (!hasError) {
-
+void VhdlParser::protected_type_declarative_part() {
+ if (!hasError) {
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ATTRIBUTE_T:
@@ -11052,60 +9759,50 @@ void VhdlParser::protected_type_declarative_part() {if (!hasError) {
break;
}
default:
- jj_la1[249] = jj_gen;
- goto end_label_48;
- }if (!hasError) {
-
+ jj_la1[255] = jj_gen;
+ goto end_label_49;
+ }
+ if (!hasError) {
protected_type_declarative_item();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
- end_label_48: ;
+ end_label_49: ;
}
-
}
-QCString VhdlParser::context_ref() {QCString s;if (!hasError) {
-
+QCString VhdlParser::context_ref() {QCString s;
+ if (!hasError) {
jj_consume_token(CONTEXT_T);
}
if (!hasError) {
-
- s = identifier_list();
+ s = name();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
return "context "+s ;
assert(false);
}
-void VhdlParser::context_declaration() {QCString s,s1;if (!hasError) {
-
+void VhdlParser::context_declaration() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(CONTEXT_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
-parse_sec=CONTEXT_SEC;
+m_sharedState->parse_sec=CONTEXT_SEC;
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case CONTEXT_T:
@@ -11115,98 +9812,84 @@ parse_sec=CONTEXT_SEC;
break;
}
default:
- jj_la1[250] = jj_gen;
- goto end_label_49;
- }if (!hasError) {
-
+ jj_la1[256] = jj_gen;
+ goto end_label_50;
+ }
+ if (!hasError) {
s1 = libustcont_stats();
}
-
}
- end_label_49: ;
+ end_label_50: ;
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CONTEXT_T:{if (!hasError) {
-
+ case CONTEXT_T:{
+ if (!hasError) {
jj_consume_token(CONTEXT_T);
}
-
break;
}
default:
- jj_la1[251] = jj_gen;
+ jj_la1[257] = jj_gen;
;
}
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
-
break;
}
default:
- jj_la1[252] = jj_gen;
+ jj_la1[258] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
-parse_sec=0;
- addVhdlType(s.data(),getLine(LIBRARY_T),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,"context",s1.data(),Public);
+m_sharedState->parse_sec=0;
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(LIBRARY_T),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,"context",s1.data(),Public);
}
QCString VhdlParser::libustcont_stats() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case USE_T:{if (!hasError) {
-
+ case USE_T:{
+ if (!hasError) {
s = use_clause();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case LIBRARY_T:{if (!hasError) {
-
+ case LIBRARY_T:{
+ if (!hasError) {
s = library_clause();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case CONTEXT_T:{if (!hasError) {
-
+ case CONTEXT_T:{
+ if (!hasError) {
s = context_ref();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[253] = jj_gen;
+ jj_la1[259] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -11214,341 +9897,271 @@ assert(false);
}
-void VhdlParser::package_instantiation_declaration() {QCString s,s1,s2;if (!hasError) {
-
+void VhdlParser::package_instantiation_declaration() {QCString s,s1,s2;
+ if (!hasError) {
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
jj_consume_token(NEW_T);
}
if (!hasError) {
-
s1 = name();
}
if (!hasError) {
-
s2 = signature();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{if (!hasError) {
-
+ case GENERIC_T:{
+ if (!hasError) {
gen_assoc_list();
}
-
break;
}
default:
- jj_la1[254] = jj_gen;
+ jj_la1[260] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
QCString q=" is new "+s1+s2;
- addVhdlType(s.data(),getLine(PACKAGE_T),Entry::VARIABLE_SEC,VhdlDocGen::INSTANTIATION,"package",q.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(PACKAGE_T),Entry::VARIABLE_SEC,VhdlDocGen::INSTANTIATION,"package",q.data(),Public);
}
-QCString VhdlParser::interface_package_declaration() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::interface_package_declaration() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(PACKAGE_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
jj_consume_token(NEW_T);
}
if (!hasError) {
-
s1 = name();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{if (!hasError) {
-
+ case GENERIC_T:{
+ if (!hasError) {
gen_assoc_list();
}
-
break;
}
default:
- jj_la1[255] = jj_gen;
+ jj_la1[261] = jj_gen;
;
}
}
-
-current->name=s;
+m_sharedState->current->name=s;
return "package "+s+" is new "+s1;
assert(false);
}
-QCString VhdlParser::subprogram_instantiation_declaration() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::subprogram_instantiation_declaration() {QCString s,s1,s2;
+ if (!hasError) {
jj_consume_token(FUNCTION_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
jj_consume_token(IS_T);
}
if (!hasError) {
-
jj_consume_token(NEW_T);
}
if (!hasError) {
-
s1 = name();
}
if (!hasError) {
-
s2 = signature();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case GENERIC_T:{if (!hasError) {
-
+ case GENERIC_T:{
+ if (!hasError) {
gen_assoc_list();
}
-
break;
}
default:
- jj_la1[256] = jj_gen;
+ jj_la1[262] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
QCString q= " is new "+s1+s2;
- addVhdlType(s.data(),getLine(FUNCTION_T),Entry::VARIABLE_SEC,VhdlDocGen::INSTANTIATION,"function ",q.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(FUNCTION_T),Entry::VARIABLE_SEC,VhdlDocGen::INSTANTIATION,"function ",q.data(),Public);
return q;
assert(false);
}
-void VhdlParser::gen_assoc_list() {if (!hasError) {
-
+void VhdlParser::gen_assoc_list() {
+ if (!hasError) {
jj_consume_token(GENERIC_T);
}
if (!hasError) {
-
jj_consume_token(MAP_T);
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
association_list();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
}
-void VhdlParser::gen_interface_list() {if (!hasError) {
-
+void VhdlParser::gen_interface_list() {
+ if (!hasError) {
jj_consume_token(GENERIC_T);
}
if (!hasError) {
-
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
//int u=s_str.iLine;
- parse_sec=GEN_SEC;
+ m_sharedState->parse_sec=GEN_SEC;
}
if (!hasError) {
-
interface_list();
}
if (!hasError) {
-
// QCString vo=$3;
- parse_sec=0;
+ m_sharedState->parse_sec=0;
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
}
-void VhdlParser::case_scheme() {if (!hasError) {
-
+void VhdlParser::case_scheme() {
+ if (!hasError) {
jj_consume_token(CASE_T);
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
jj_consume_token(GENERATE_T);
}
if (!hasError) {
-
when_stats();
}
if (!hasError) {
-
- if (jj_2_107(3)) {if (!hasError) {
-
+ if (jj_2_113(3)) {
+ if (!hasError) {
ttend();
}
-
} else {
;
}
}
if (!hasError) {
-
jj_consume_token(END_T);
}
if (!hasError) {
-
jj_consume_token(GENERATE_T);
}
if (!hasError) {
-
generate_statement_body();
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::when_stats() {if (!hasError) {
-
- while (!hasError) {if (!hasError) {
-
+void VhdlParser::when_stats() {
+ if (!hasError) {
+ while (!hasError) {
+ if (!hasError) {
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
- if (jj_2_108(2)) {if (!hasError) {
-
+ if (jj_2_114(2)) {
+ if (!hasError) {
label();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
-
} else {
;
}
}
if (!hasError) {
-
choices();
}
if (!hasError) {
-
jj_consume_token(ARROW_T);
}
if (!hasError) {
-
generate_statement_body();
}
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case WHEN_T:{
;
break;
}
default:
- jj_la1[257] = jj_gen;
- goto end_label_50;
+ jj_la1[263] = jj_gen;
+ goto end_label_51;
}
}
- end_label_50: ;
+ end_label_51: ;
}
-
}
-void VhdlParser::ttend() {if (!hasError) {
-
+void VhdlParser::ttend() {
+ if (!hasError) {
jj_consume_token(END_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
identifier();
}
-
break;
}
default:
- jj_la1[258] = jj_gen;
+ jj_la1[264] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::generate_statement_body() {if (!hasError) {
-
- jj_consume_token(BEGIN_T);
- }
+void VhdlParser::generate_statement_body() {
if (!hasError) {
-
- generate_statement_body();
- }
-
-}
-
-
-void VhdlParser::generate_statement_body1() {if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ALIAS_T:
case ATTRIBUTE_T:
@@ -11568,35 +10181,31 @@ void VhdlParser::generate_statement_body1() {if (!hasError) {
case SUBTYPE_T:
case TYPE_T:
case USE_T:
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
while (!hasError) {
- if (jj_2_109(2147483647)) {
+ if (jj_2_115(2147483647)) {
;
} else {
- goto end_label_51;
- }if (!hasError) {
-
+ goto end_label_52;
+ }
+ if (!hasError) {
block_declarative_item();
}
-
}
- end_label_51: ;
+ end_label_52: ;
}
if (!hasError) {
-
jj_consume_token(BEGIN_T);
}
-
break;
}
default:
- jj_la1[259] = jj_gen;
+ jj_la1[265] = jj_gen;
;
}
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ASSERT_T:
@@ -11614,45 +10223,134 @@ void VhdlParser::generate_statement_body1() {if (!hasError) {
break;
}
default:
- jj_la1[260] = jj_gen;
- goto end_label_52;
- }if (!hasError) {
-
+ jj_la1[266] = jj_gen;
+ goto end_label_53;
+ }
+ if (!hasError) {
concurrent_statement();
}
-
}
- end_label_52: ;
+ end_label_53: ;
}
-
}
-QCString VhdlParser::external_name() {QCString s,s1,s2;if (!hasError) {
-
+void VhdlParser::generate_statement_body1() {
+ if (!hasError) {
+ generate_statement_body();
+ }
+ if (!hasError) {
+ generate_scheme_1();
+ }
+ if (!hasError) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case ELSE_T:{
+ if (!hasError) {
+ generate_scheme_2();
+ }
+ break;
+ }
+ default:
+ jj_la1[267] = jj_gen;
+ ;
+ }
+ }
+}
+
+
+void VhdlParser::generate_scheme_1() {
+ if (!hasError) {
+ while (!hasError) {
+ switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
+ case ELSIF_T:{
+ ;
+ break;
+ }
+ default:
+ jj_la1[268] = jj_gen;
+ goto end_label_54;
+ }
+ if (!hasError) {
+ generate_scheme_3();
+ }
+ }
+ end_label_54: ;
+ }
+}
+
+
+void VhdlParser::generate_scheme_2() {
+ if (!hasError) {
+ jj_consume_token(ELSE_T);
+ }
+ if (!hasError) {
+ if (jj_2_116(2)) {
+ if (!hasError) {
+ identifier();
+ }
+ if (!hasError) {
+ jj_consume_token(COLON_T);
+ }
+ } else {
+ ;
+ }
+ }
+ if (!hasError) {
+ jj_consume_token(GENERATE_T);
+ }
+ if (!hasError) {
+ generate_statement_body();
+ }
+}
+
+
+void VhdlParser::generate_scheme_3() {
+ if (!hasError) {
+ jj_consume_token(ELSIF_T);
+ }
+ if (!hasError) {
+ if (jj_2_117(2)) {
+ if (!hasError) {
+ identifier();
+ }
+ if (!hasError) {
+ jj_consume_token(COLON_T);
+ }
+ } else {
+ ;
+ }
+ }
+ if (!hasError) {
+ expression();
+ }
+ if (!hasError) {
+ jj_consume_token(GENERATE_T);
+ }
+ if (!hasError) {
+ generate_statement_body();
+ }
+}
+
+
+QCString VhdlParser::external_name() {QCString s,s1,s2;
+ if (!hasError) {
jj_consume_token(SLSL_T);
}
if (!hasError) {
-
s = sig_stat();
}
if (!hasError) {
-
s1 = external_pathname();
}
if (!hasError) {
-
jj_consume_token(COLON_T);
}
if (!hasError) {
-
s2 = subtype_indication();
}
if (!hasError) {
-
jj_consume_token(RSRS_T);
}
-
QCString t="<<"+s;
QCString t1=s1+":"+s2+">>";
return s+s1;
@@ -11662,41 +10360,35 @@ assert(false);
QCString VhdlParser::sig_stat() {Token *t;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case CONSTANT_T:{if (!hasError) {
-
+ case CONSTANT_T:{
+ if (!hasError) {
t = jj_consume_token(CONSTANT_T);
}
if (!hasError) {
-
return t->image.data();
}
-
break;
}
- case SIGNAL_T:{if (!hasError) {
-
+ case SIGNAL_T:{
+ if (!hasError) {
t = jj_consume_token(SIGNAL_T);
}
if (!hasError) {
-
return t->image.data();
}
-
break;
}
- case VARIABLE_T:{if (!hasError) {
-
+ case VARIABLE_T:{
+ if (!hasError) {
t = jj_consume_token(VARIABLE_T);
}
if (!hasError) {
-
return t->image.data();
}
-
break;
}
default:
- jj_la1[261] = jj_gen;
+ jj_la1[269] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -11706,41 +10398,35 @@ assert(false);
QCString VhdlParser::external_pathname() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case DOT_T:{if (!hasError) {
-
+ case DOT_T:{
+ if (!hasError) {
s = absolute_pathname();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case NEG_T:{if (!hasError) {
-
+ case NEG_T:{
+ if (!hasError) {
s = relative_pathname();
}
if (!hasError) {
-
return s;
}
-
break;
}
- case AT_T:{if (!hasError) {
-
+ case AT_T:{
+ if (!hasError) {
s = package_path_name();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[262] = jj_gen;
+ jj_la1[270] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -11749,42 +10435,35 @@ assert(false);
QCString VhdlParser::absolute_pathname() {QCString s,s1;
- if (jj_2_110(2147483647)) {if (!hasError) {
-
+ if (jj_2_118(2147483647)) {
+ if (!hasError) {
jj_consume_token(DOT_T);
}
if (!hasError) {
-
s = pathname_element_list();
}
if (!hasError) {
-
s1 = identifier();
}
if (!hasError) {
-
return "."+s+s1;
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case DOT_T:{if (!hasError) {
-
+ case DOT_T:{
+ if (!hasError) {
jj_consume_token(DOT_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
return "."+s;
}
-
break;
}
default:
- jj_la1[263] = jj_gen;
+ jj_la1[271] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -11793,92 +10472,79 @@ assert(false);
}
-QCString VhdlParser::relative_pathname() {QCString s,s1,s2;if (!hasError) {
-
+QCString VhdlParser::relative_pathname() {QCString s,s1,s2;
+ if (!hasError) {
s = neg_list();
}
if (!hasError) {
-
- if (jj_2_111(2147483647)) {if (!hasError) {
-
+ if (jj_2_119(2147483647)) {
+ if (!hasError) {
s1 = pathname_element_list();
}
-
} else {
;
}
}
if (!hasError) {
-
s2 = identifier();
}
-
return s+s1+s2;
assert(false);
}
-QCString VhdlParser::neg_list() {QCString s;if (!hasError) {
-
- while (!hasError) {if (!hasError) {
-
+QCString VhdlParser::neg_list() {QCString s;
+ if (!hasError) {
+ while (!hasError) {
+ if (!hasError) {
jj_consume_token(NEG_T);
}
if (!hasError) {
-
jj_consume_token(DOT_T);
}
if (!hasError) {
-
s+="^.";
}
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case NEG_T:{
;
break;
}
default:
- jj_la1[264] = jj_gen;
- goto end_label_53;
+ jj_la1[272] = jj_gen;
+ goto end_label_55;
}
}
- end_label_53: ;
+ end_label_55: ;
}
-
return s;
assert(false);
}
-QCString VhdlParser::pathname_element() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::pathname_element() {QCString s,s1;
+ if (!hasError) {
s = identifier();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = expression();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
break;
}
default:
- jj_la1[265] = jj_gen;
+ jj_la1[273] = jj_gen;
;
}
}
-
if(!s1.isEmpty())
return s+"("+s1+")";
@@ -11887,85 +10553,73 @@ assert(false);
}
-QCString VhdlParser::pathname_element_list() {QCString s,s1,s2;if (!hasError) {
+QCString VhdlParser::pathname_element_list() {QCString s,s1,s2;
+ if (!hasError) {
if (!hasError) {
-
s = pathname_element();
}
if (!hasError) {
-
jj_consume_token(DOT_T);
}
-
}
if (!hasError) {
-
s+=".";
}
if (!hasError) {
-
while (!hasError) {
- if (jj_2_112(2147483647)) {
+ if (jj_2_120(2147483647)) {
;
} else {
- goto end_label_54;
- }if (!hasError) {
-
+ goto end_label_56;
+ }
+ if (!hasError) {
s1 = pathname_element();
}
if (!hasError) {
-
jj_consume_token(DOT_T);
}
if (!hasError) {
-
s2+=s1;s2+=".";
}
-
}
- end_label_54: ;
+ end_label_56: ;
}
-
return s+s2;
assert(false);
}
-QCString VhdlParser::package_path_name() {QCString s;if (!hasError) {
-
+QCString VhdlParser::package_path_name() {QCString s;
+ if (!hasError) {
jj_consume_token(AT_T);
}
if (!hasError) {
-
s = name();
}
-
return "@"+s;
assert(false);
}
void VhdlParser::conditional_signal_assignment_wave() {
- if (jj_2_113(2147483647)) {if (!hasError) {
-
+ if (jj_2_121(2147483647)) {
+ if (!hasError) {
conditional_force_assignment();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case LPAREN_T:
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
conditional_waveform_assignment();
}
-
break;
}
default:
- jj_la1[266] = jj_gen;
+ jj_la1[274] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -11973,144 +10627,129 @@ void VhdlParser::conditional_signal_assignment_wave() {
}
-void VhdlParser::conditional_waveform_assignment() {if (!hasError) {
-
+void VhdlParser::conditional_waveform_assignment() {
+ if (!hasError) {
target();
}
if (!hasError) {
-
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case INERTIAL_T:
case REJECT_T:
- case TRANSPORT_T:{if (!hasError) {
-
+ case TRANSPORT_T:{
+ if (!hasError) {
delay_mechanism();
}
-
break;
}
default:
- jj_la1[267] = jj_gen;
+ jj_la1[275] = jj_gen;
;
}
}
if (!hasError) {
-
waveform_element();
}
if (!hasError) {
-
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case ELSE_T:{if (!hasError) {
-
+ case ELSE_T:{
+ if (!hasError) {
else_wave_list();
}
-
break;
}
default:
- jj_la1[268] = jj_gen;
+ jj_la1[276] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
-void VhdlParser::else_wave_list() {if (!hasError) {
-
+void VhdlParser::else_wave_list() {
+ if (!hasError) {
jj_consume_token(ELSE_T);
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHEN_T:{if (!hasError) {
-
+ case WHEN_T:{
+ if (!hasError) {
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
expression();
}
-
break;
}
default:
- jj_la1[269] = jj_gen;
+ jj_la1[277] = jj_gen;
;
}
}
-
}
-void VhdlParser::conditional_force_assignment() {if (!hasError) {
-
+void VhdlParser::conditional_force_assignment() {
+ if (!hasError) {
target();
}
if (!hasError) {
-
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
-
jj_consume_token(FORCE_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IN_T:
- case OUT_T:{if (!hasError) {
-
+ case OUT_T:{
+ if (!hasError) {
inout_stat();
}
-
break;
}
default:
- jj_la1[270] = jj_gen;
+ jj_la1[278] = jj_gen;
;
}
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ABS_T:
+ case AND_T:
+ case NAND_T:
case NEW_T:
+ case NOR_T:
case NOT_T:
case NULL_T:
+ case OR_T:
+ case XOR_T:
+ case XNOR_T:
case LPAREN_T:
case PLUS_T:
case MINUS_T:
case SLSL_T:
+ case QQ_T:
case INTEGER:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
@@ -12118,47 +10757,41 @@ void VhdlParser::conditional_force_assignment() {if (!hasError) {
case CHARACTER_LITERAL:
case DECIMAL_LITERAL:
case BASED_LITERAL:
- case BIT_STRING_LITERAL:{if (!hasError) {
-
+ case BIT_STRING_LITERAL:{
+ if (!hasError) {
expression();
}
if (!hasError) {
-
else_stat();
}
-
break;
}
default:
- jj_la1[271] = jj_gen;
+ jj_la1[279] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
void VhdlParser::selected_signal_assignment_wave() {
- if (jj_2_114(2147483647)) {if (!hasError) {
-
+ if (jj_2_122(2147483647)) {
+ if (!hasError) {
selected_force_assignment();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WITH_T:{if (!hasError) {
-
+ case WITH_T:{
+ if (!hasError) {
selected_waveform_assignment();
}
-
break;
}
default:
- jj_la1[272] = jj_gen;
+ jj_la1[280] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -12166,69 +10799,59 @@ void VhdlParser::selected_signal_assignment_wave() {
}
-void VhdlParser::selected_variable_assignment() {if (!hasError) {
-
+void VhdlParser::selected_variable_assignment() {
+ if (!hasError) {
jj_consume_token(WITH_T);
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
jj_consume_token(SELECT_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case Q_T:{if (!hasError) {
-
+ case Q_T:{
+ if (!hasError) {
jj_consume_token(Q_T);
}
-
break;
}
default:
- jj_la1[273] = jj_gen;
+ jj_la1[281] = jj_gen;
;
}
}
if (!hasError) {
-
select_name();
}
if (!hasError) {
-
jj_consume_token(VARASSIGN_T);
}
if (!hasError) {
-
sel_var_list();
}
-
}
void VhdlParser::select_name() {
- if (jj_2_115(2147483647)) {if (!hasError) {
-
+ if (jj_2_123(2147483647)) {
+ if (!hasError) {
aggregate();
}
-
} else {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case SLSL_T:
case STRINGLITERAL:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
name();
}
-
break;
}
default:
- jj_la1[274] = jj_gen;
+ jj_la1[282] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -12236,231 +10859,193 @@ void VhdlParser::select_name() {
}
-void VhdlParser::selected_waveform_assignment() {if (!hasError) {
-
+void VhdlParser::selected_waveform_assignment() {
+ if (!hasError) {
jj_consume_token(WITH_T);
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
jj_consume_token(SELECT_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case Q_T:{if (!hasError) {
-
+ case Q_T:{
+ if (!hasError) {
jj_consume_token(Q_T);
}
-
break;
}
default:
- jj_la1[275] = jj_gen;
+ jj_la1[283] = jj_gen;
;
}
}
if (!hasError) {
-
target();
}
if (!hasError) {
-
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case INERTIAL_T:
case REJECT_T:
- case TRANSPORT_T:{if (!hasError) {
-
+ case TRANSPORT_T:{
+ if (!hasError) {
delay_mechanism();
}
-
break;
}
default:
- jj_la1[276] = jj_gen;
+ jj_la1[284] = jj_gen;
;
}
}
if (!hasError) {
-
sel_wave_list();
}
-
}
-void VhdlParser::selected_force_assignment() {if (!hasError) {
-
+void VhdlParser::selected_force_assignment() {
+ if (!hasError) {
jj_consume_token(WITH_T);
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
jj_consume_token(SELECT_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case Q_T:{if (!hasError) {
-
+ case Q_T:{
+ if (!hasError) {
jj_consume_token(Q_T);
}
-
break;
}
default:
- jj_la1[277] = jj_gen;
+ jj_la1[285] = jj_gen;
;
}
}
if (!hasError) {
-
target();
}
if (!hasError) {
-
jj_consume_token(LESSTHAN_T);
}
if (!hasError) {
-
jj_consume_token(FORCE_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IN_T:
- case OUT_T:{if (!hasError) {
-
+ case OUT_T:{
+ if (!hasError) {
inout_stat();
}
-
break;
}
default:
- jj_la1[278] = jj_gen;
+ jj_la1[286] = jj_gen;
;
}
}
if (!hasError) {
-
sel_var_list();
}
-
}
-void VhdlParser::sel_var_list() {if (!hasError) {
+void VhdlParser::sel_var_list() {
+ if (!hasError) {
if (!hasError) {
-
expression();
}
if (!hasError) {
-
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
choices();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case COMMA_T:{if (!hasError) {
-
+ case COMMA_T:{
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
-
break;
}
- case SEMI_T:{if (!hasError) {
-
+ case SEMI_T:{
+ if (!hasError) {
jj_consume_token(SEMI_T);
}
-
break;
}
default:
- jj_la1[279] = jj_gen;
+ jj_la1[287] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-
}
if (!hasError) {
-
while (!hasError) {
- if (jj_2_116(2147483647)) {
+ if (jj_2_124(2147483647)) {
;
} else {
- goto end_label_55;
- }if (!hasError) {
-
+ goto end_label_57;
+ }
+ if (!hasError) {
expression();
}
if (!hasError) {
-
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
choices();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case COMMA_T:{if (!hasError) {
-
+ case COMMA_T:{
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
-
break;
}
- case SEMI_T:{if (!hasError) {
-
+ case SEMI_T:{
+ if (!hasError) {
jj_consume_token(SEMI_T);
}
-
break;
}
default:
- jj_la1[280] = jj_gen;
+ jj_la1[288] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-
}
- end_label_55: ;
+ end_label_57: ;
}
-
}
-void VhdlParser::sel_wave_list() {if (!hasError) {
-
+void VhdlParser::sel_wave_list() {
+ if (!hasError) {
waveform_element();
}
if (!hasError) {
-
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
choices();
}
if (!hasError) {
-
while (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case COMMA_T:{
@@ -12468,126 +11053,110 @@ void VhdlParser::sel_wave_list() {if (!hasError) {
break;
}
default:
- jj_la1[281] = jj_gen;
- goto end_label_56;
- }if (!hasError) {
-
+ jj_la1[289] = jj_gen;
+ goto end_label_58;
+ }
+ if (!hasError) {
jj_consume_token(COMMA_T);
}
if (!hasError) {
-
sel_wave_list();
}
-
}
- end_label_56: ;
+ end_label_58: ;
}
if (!hasError) {
-
jj_consume_token(SEMI_T);
}
-
}
void VhdlParser::inout_stat() {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IN_T:{if (!hasError) {
-
+ case IN_T:{
+ if (!hasError) {
jj_consume_token(IN_T);
}
-
break;
}
- case OUT_T:{if (!hasError) {
-
+ case OUT_T:{
+ if (!hasError) {
jj_consume_token(OUT_T);
}
-
break;
}
default:
- jj_la1[282] = jj_gen;
+ jj_la1[290] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-void VhdlParser::else_stat() {if (!hasError) {
-
- while (!hasError) {if (!hasError) {
-
+void VhdlParser::else_stat() {
+ if (!hasError) {
+ while (!hasError) {
+ if (!hasError) {
jj_consume_token(ELSE_T);
}
if (!hasError) {
-
expression();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case WHEN_T:{if (!hasError) {
-
+ case WHEN_T:{
+ if (!hasError) {
jj_consume_token(WHEN_T);
}
if (!hasError) {
-
expression();
}
-
break;
}
default:
- jj_la1[283] = jj_gen;
+ jj_la1[291] = jj_gen;
;
}
}
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case ELSE_T:{
;
break;
}
default:
- jj_la1[284] = jj_gen;
- goto end_label_57;
+ jj_la1[292] = jj_gen;
+ goto end_label_59;
}
}
- end_label_57: ;
+ end_label_59: ;
}
-
}
QCString VhdlParser::interface_subprogram_declaration() {QCString s;
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PROCEDURE_T:{if (!hasError) {
-
+ case PROCEDURE_T:{
+ if (!hasError) {
s = iproc();
}
if (!hasError) {
-
return s;
}
-
break;
}
case FUNCTION_T:
case IMPURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
s = ifunc();
}
if (!hasError) {
-
return s;
}
-
break;
}
default:
- jj_la1[285] = jj_gen;
+ jj_la1[293] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
@@ -12595,189 +11164,165 @@ assert(false);
}
-QCString VhdlParser::iproc() {QCString s,s1;if (!hasError) {
-
+QCString VhdlParser::iproc() {QCString s,s1;
+ if (!hasError) {
jj_consume_token(PROCEDURE_T);
}
if (!hasError) {
-
s = identifier();
}
if (!hasError) {
-
s1 = param();
}
-
-current->name=s;
- return "procedure "+s+s1;
+m_sharedState->current->name=s;
+ return "procedure "+s+s1;
assert(false);
}
-QCString VhdlParser::ifunc() {QCString s,s1,s2,s3;Token *t=0;Token *t1=0;Token *t2=0;if (!hasError) {
-
+QCString VhdlParser::ifunc() {QCString s,s1,s2,s3;Token *t=0;Token *t1=0;Token *t2=0;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case IMPURE_T:
case PURE_T:{
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
t = jj_consume_token(PURE_T);
}
-
break;
}
- case IMPURE_T:{if (!hasError) {
-
+ case IMPURE_T:{
+ if (!hasError) {
t = jj_consume_token(IMPURE_T);
}
-
break;
}
default:
- jj_la1[286] = jj_gen;
+ jj_la1[294] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
break;
}
default:
- jj_la1[287] = jj_gen;
+ jj_la1[295] = jj_gen;
;
}
}
if (!hasError) {
-
jj_consume_token(FUNCTION_T);
}
if (!hasError) {
-
s = name();
}
if (!hasError) {
-
s1 = param();
}
if (!hasError) {
-
jj_consume_token(RETURN_T);
}
if (!hasError) {
-
s2 = name();
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case IS_T:{if (!hasError) {
-
+ case IS_T:{
+ if (!hasError) {
t1 = jj_consume_token(IS_T);
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
s3 = identifier();
}
-
break;
}
- case BOX_T:{if (!hasError) {
-
+ case BOX_T:{
+ if (!hasError) {
t2 = jj_consume_token(BOX_T);
}
-
break;
}
default:
- jj_la1[288] = jj_gen;
+ jj_la1[296] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
-
break;
}
default:
- jj_la1[289] = jj_gen;
+ jj_la1[297] = jj_gen;
;
}
}
-
QCString q;
- if(t) q=t->image.data();
- if(t2) s3="<>";
- if (!s3.isEmpty())
- {
- s3.prepend(" is ");
- }
- current->name=s;
- if (parse_sec==GEN_SEC)
- {
- QCString ss=q+" function "+s1+" return "+s2+s3;
- int a=getLine(FUNCTION_T);
- int b=getLine(PROCEDURE_T);
-
- if (a>b) b=a;
- addVhdlType(current->name.data(),b,Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,ss.data(),0,Public);
- }
- currP=0;return "";
+ if(t) q=t->image.data();
+ if(t2) s3="<>";
+ if (!s3.isEmpty())
+ {
+ s3.prepend(" is ");
+ }
+ m_sharedState->current->name=s;
+ if (m_sharedState->parse_sec==GEN_SEC)
+ {
+ QCString ss=q+" function "+s1+" return "+s2+s3;
+ int a=outlineParser()->getLine(FUNCTION_T);
+ int b=outlineParser()->getLine(PROCEDURE_T);
+
+ if (a>b) b=a;
+ outlineParser()->addVhdlType(m_sharedState->current->name.data(),b,Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,ss.data(),0,Public);
+ }
+ m_sharedState->currP=0;return "";
assert(false);
}
-QCString VhdlParser::param() {QCString s,s1;Token *tok=0;if (!hasError) {
-
+QCString VhdlParser::param() {QCString s,s1;Token *tok=0;
+ if (!hasError) {
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case PARAMETER_T:{if (!hasError) {
-
+ case PARAMETER_T:{
+ if (!hasError) {
tok = jj_consume_token(PARAMETER_T);
}
-
break;
}
default:
- jj_la1[290] = jj_gen;
+ jj_la1[298] = jj_gen;
;
}
}
if (!hasError) {
-
-param_sec=PARAM_SEC;
+m_sharedState->param_sec=PARAM_SEC;
}
if (!hasError) {
-
switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {
- case LPAREN_T:{if (!hasError) {
-
+ case LPAREN_T:{
+ if (!hasError) {
jj_consume_token(LPAREN_T);
}
if (!hasError) {
-
s1 = interface_list();
}
if (!hasError) {
-
jj_consume_token(RPAREN_T);
}
-
break;
}
default:
- jj_la1[291] = jj_gen;
+ jj_la1[299] = jj_gen;
;
}
}
-
if(tok)
- {
- s = tok->image.data();
-
- }
- param_sec=0;
- return s+"("+s1+")";
+ {
+ s = tok->image.data();
+ }
+ m_sharedState->param_sec=0;
+ return s+"("+s1+")";
assert(false);
}
@@ -12787,61 +11332,57 @@ void VhdlParser::parseInline() {
case POSTPONED_T:
case PROCESS_T:
case BASIC_IDENTIFIER:
- case EXTENDED_CHARACTER:{if (!hasError) {
-
+ case EXTENDED_CHARACTER:{
+ if (!hasError) {
process_statement();
}
-
break;
}
case FUNCTION_T:
case IMPURE_T:
case PROCEDURE_T:
- case PURE_T:{if (!hasError) {
-
+ case PURE_T:{
+ if (!hasError) {
subprogram_declaration();
}
-
break;
}
default:
- jj_la1[292] = jj_gen;
+ jj_la1[300] = jj_gen;
jj_consume_token(-1);
errorHandler->handleParseError(token, getToken(1), __FUNCTION__, this), hasError = true;
}
}
- VhdlParser::VhdlParser(TokenManager *tm){
- head = NULL;
- errorHandlerCreated = false;
- ReInit(tm);
+ VhdlParser::VhdlParser(TokenManager *tokenManager){
+ head = nullptr;
+ ReInit(tokenManager);
}
VhdlParser::~VhdlParser()
{
clear();
}
-void VhdlParser::ReInit(TokenManager *tm){
+void VhdlParser::ReInit(TokenManager* tokenManager){
clear();
errorHandler = new ErrorHandler();
- errorHandlerCreated = true;
hasError = false;
- token_source = tm;
+ token_source = tokenManager;
head = token = new Token();
token->kind = 0;
- token->next = NULL;
+ token->next = nullptr;
jj_lookingAhead = false;
jj_rescan = false;
jj_done = false;
- jj_scanpos = jj_lastpos = NULL;
+ jj_scanpos = jj_lastpos = nullptr;
jj_gc = 0;
jj_kind = -1;
- trace_indent = 0;
- trace_enabled = false;
+ indent = 0;
+ trace = false;
jj_ntk = -1;
jj_gen = 0;
- for (int i = 0; i < 293; i++) jj_la1[i] = -1;
+ for (int i = 0; i < 301; i++) jj_la1[i] = -1;
}
@@ -12857,25 +11398,25 @@ void VhdlParser::clear(){
t = next;
}
}
- if (errorHandlerCreated) {
- delete errorHandler;
+ if (errorHandler) {
+ delete errorHandler, errorHandler = nullptr;
}
}
Token * VhdlParser::jj_consume_token(int kind) {
Token *oldToken;
- if ((oldToken = token)->next != NULL) token = token->next;
+ if ((oldToken = token)->next != nullptr) token = token->next;
else token = token->next = token_source->getNextToken();
jj_ntk = -1;
if (token->kind == kind) {
jj_gen++;
if (++jj_gc > 100) {
jj_gc = 0;
- for (int i = 0; i < 116; i++) {
+ for (int i = 0; i < 124; i++) {
JJCalls *c = &jj_2_rtns[i];
- while (c != NULL) {
- if (c->gen < jj_gen) c->first = NULL;
+ while (c != nullptr) {
+ if (c->gen < jj_gen) c->first = nullptr;
c = c->next;
}
}
@@ -12884,7 +11425,7 @@ Token * VhdlParser::jj_consume_token(int kind) {
}
token = oldToken;
jj_kind = kind;
- JAVACC_STRING_TYPE image = kind >= 0 ? tokenImage[kind] : tokenImage[0];
+ JJString image = kind >= 0 ? tokenImage[kind] : tokenImage[0];
errorHandler->handleUnexpectedToken(kind, image.substr(1, image.size() - 2), getToken(1), this);
hasError = true;
return token;
@@ -12894,7 +11435,7 @@ Token * VhdlParser::jj_consume_token(int kind) {
bool VhdlParser::jj_scan_token(int kind){
if (jj_scanpos == jj_lastpos) {
jj_la--;
- if (jj_scanpos->next == NULL) {
+ if (jj_scanpos->next == nullptr) {
jj_lastpos = jj_scanpos = jj_scanpos->next = token_source->getNextToken();
} else {
jj_lastpos = jj_scanpos = jj_scanpos->next;
@@ -12904,8 +11445,8 @@ bool VhdlParser::jj_scan_token(int kind){
}
if (jj_rescan) {
int i = 0; Token *tok = token;
- while (tok != NULL && tok != jj_scanpos) { i++; tok = tok->next; }
- if (tok != NULL) jj_add_error_token(kind, i);
+ while (tok != nullptr && tok != jj_scanpos) { i++; tok = tok->next; }
+ if (tok != nullptr) jj_add_error_token(kind, i);
}
if (jj_scanpos->kind != kind) return true;
if (jj_la == 0 && jj_scanpos == jj_lastpos) { return jj_done = true; }
@@ -12916,7 +11457,7 @@ bool VhdlParser::jj_scan_token(int kind){
/** Get the next Token. */
Token * VhdlParser::getNextToken(){
- if (token->next != NULL) token = token->next;
+ if (token->next != nullptr) token = token->next;
else token = token->next = token_source->getNextToken();
jj_ntk = -1;
jj_gen++;
@@ -12928,7 +11469,7 @@ Token * VhdlParser::getNextToken(){
Token * VhdlParser::getToken(int index){
Token *t = token;
for (int i = 0; i < index; i++) {
- if (t->next != NULL) t = t->next;
+ if (t->next != nullptr) t = t->next;
else t = t->next = token_source->getNextToken();
}
return t;
@@ -12936,7 +11477,7 @@ Token * VhdlParser::getToken(int index){
int VhdlParser::jj_ntk_f(){
- if ((jj_nt=token->next) == NULL)
+ if ((jj_nt=token->next) == nullptr)
return (jj_ntk = (token->next=token_source->getNextToken())->kind);
else
return (jj_ntk = jj_nt->kind);
@@ -12952,6 +11493,11 @@ int VhdlParser::jj_ntk_f(){
}
+ bool VhdlParser::trace_enabled() {
+ return trace;
+ }
+
+
void VhdlParser::enable_tracing() {
}
@@ -12961,7 +11507,7 @@ int VhdlParser::jj_ntk_f(){
void VhdlParser::jj_rescan_token(){
jj_rescan = true;
- for (int i = 0; i < 116; i++) {
+ for (int i = 0; i < 124; i++) {
JJCalls *p = &jj_2_rtns[i];
do {
if (p->gen > jj_gen) {
@@ -13083,10 +11629,18 @@ int VhdlParser::jj_ntk_f(){
case 113: jj_3_114(); break;
case 114: jj_3_115(); break;
case 115: jj_3_116(); break;
+ case 116: jj_3_117(); break;
+ case 117: jj_3_118(); break;
+ case 118: jj_3_119(); break;
+ case 119: jj_3_120(); break;
+ case 120: jj_3_121(); break;
+ case 121: jj_3_122(); break;
+ case 122: jj_3_123(); break;
+ case 123: jj_3_124(); break;
}
}
p = p->next;
- } while (p != NULL);
+ } while (p != nullptr);
}
jj_rescan = false;
}
@@ -13095,7 +11649,7 @@ int VhdlParser::jj_ntk_f(){
void VhdlParser::jj_save(int index, int xla){
JJCalls *p = &jj_2_rtns[index];
while (p->gen > jj_gen) {
- if (p->next == NULL) { p = p->next = new JJCalls(); break; }
+ if (p->next == nullptr) { p = p->next = new JJCalls(); break; }
p = p->next;
}
p->gen = jj_gen + xla - jj_la; p->first = token; p->arg = xla;
diff --git a/vhdlparser/VhdlParser.h b/vhdlparser/VhdlParser.h
index efdfe33..c1d6a0c 100644
--- a/vhdlparser/VhdlParser.h
+++ b/vhdlparser/VhdlParser.h
@@ -4,9 +4,7 @@
#include "CharStream.h"
#include "Token.h"
#include "TokenManager.h"
-#include "VhdlParserTokenManager.h"
#include "vhdljjparser.h"
-
#include "VhdlParserConstants.h"
#include "ErrorHandler.h"
namespace vhdl {
@@ -17,566 +15,293 @@ namespace parser {
JJCalls* next;
Token* first;
~JJCalls() { if (next) delete next; }
- JJCalls() { next = NULL; arg = 0; gen = -1; first = NULL; }
+ JJCalls() { next = nullptr; arg = 0; gen = -1; first = nullptr; }
};
class VhdlParser {
- public:
-
+public:
QCString abstract_literal();
-
QCString access_type_definition();
-
QCString actual_designator();
-
QCString actual_parameter_part();
-
QCString actual_part();
-
QCString adding_operator();
-
QCString aggregate();
-
QCString alias_declaration();
-
QCString alias_designator();
-
void allocator();
-
void architecture_body();
-
void architecture_declarative_part();
-
void architecture_statement_part();
-
QCString array_type_definition();
-
QCString assertion();
-
QCString assertion_statement();
-
QCString association_element();
-
QCString association_list();
-
QCString attribute_declaration();
-
QCString attribute_designator();
-
QCString attribute_name();
-
QCString attribute_specification();
-
QCString base();
-
QCString base_specifier();
-
QCString base_unit_declaration();
-
QCString based_integer();
-
QCString based_literal();
-
QCString basic_identifier();
-
void binding_indication();
-
QCString bit_string_literal();
-
QCString bit_value();
-
void block_configuration();
-
void block_declarative_item();
-
void block_declarative_part();
-
void block_header();
-
void block_specification();
-
void block_statement();
-
void block_statement_part();
-
void case_statement();
-
void case_statement_alternative();
-
QCString character_literal();
-
QCString choice();
-
QCString choices();
-
void component_configuration();
-
void component_declaration();
-
void component_instantiation_statement();
-
void component_specification();
-
QCString composite_type_definition();
-
void concurrent_assertion_statement();
-
void concurrent_procedure_call_statement();
-
void concurrent_signal_assignment_statement();
-
void concurrent_statement();
-
QCString condition();
-
QCString condition_clause();
-
void conditional_signal_assignment();
-
void conditional_waveforms();
-
void configuration_declaration();
-
void configuration_declarative_item();
-
void configuration_declarative_part();
-
void configuration_item();
-
void configuration_specification();
-
QCString constant_declaration();
-
QCString constraint_array_definition();
-
void context_clause();
-
QCString constraint();
-
void context_item();
-
QCString decimal_literal();
-
QCString delay_mechanism();
-
void design_file();
-
void design_unit();
-
QCString designator();
-
QCString direction();
-
void disconnection_specification();
-
void guarded_signal_specificatio();
-
QCString discrete_range();
-
QCString element_association();
-
QCString element_declaration();
-
QCString entity_aspect();
-
QCString entity_class();
-
QCString entity_class_entry();
-
QCString entity_class_entry_list();
-
void entity_declaration();
-
void entity_declarative_item();
-
void entity_declarative_part();
-
QCString entity_designator();
-
void entity_header();
-
QCString entity_name_list();
-
QCString entity_specification();
-
void entity_statement();
-
void entity_statement_part();
-
QCString entity_tag();
-
QCString enumeration_literal();
-
QCString enumeration_type_definition();
-
QCString exit_statement();
-
QCString expression();
-
QCString logop();
-
QCString extended_identifier();
-
QCString factor();
-
QCString file_declaration();
-
QCString file_logical_name();
-
QCString file_open_information();
-
QCString file_type_definition();
-
QCString floating_type_definition();
-
QCString formal_designator();
-
QCString formal_parameter_list();
-
QCString formal_part();
-
QCString full_type_declaration();
-
QCString function_call();
-
void generate_statement();
-
void generate_scheme();
-
void generic_clause();
-
QCString generic_list();
-
void generic_map_aspect();
-
QCString group_constituent();
-
QCString group_constituent_list();
-
QCString group_declaration();
-
QCString group_template_declaration();
-
void guarded_signal_specification();
-
QCString identifier();
-
QCString identifier_list();
-
void if_statement();
-
QCString incomplete_type_declaration();
-
QCString index_constraint();
-
QCString index_specification();
-
QCString index_subtype_definition();
-
QCString instantiation_unit();
-
QCString instantiation_list();
-
QCString integer();
-
QCString integer_type_definition();
-
QCString interface_declaration();
-
QCString interface_element();
-
QCString interface_file_declaration();
-
QCString interface_list();
-
QCString interface_variable_declaration();
-
QCString iteration_scheme();
-
QCString label();
-
QCString library_clause();
-
QCString library_unit();
-
QCString literal();
-
QCString logical_operator();
-
QCString loop_statement();
-
QCString miscellaneous_operator();
-
QCString mode();
-
QCString multiplying_operation();
-
QCString name();
-
QCString name_ext1();
-
QCString name_ext();
-
QCString test_att_name();
-
QCString indexed_name();
-
QCString next_statement();
-
QCString null_statement();
-
QCString numeric_literal();
-
QCString object_class();
-
QCString operator_symbol();
-
void options();
-
void package_body();
-
void package_body_declarative_item();
-
void package_body_declarative_part();
-
+void package_header();
void package_declaration();
-
void geninter();
-
void package_declarative_item();
-
void package_declarative_part();
-
QCString parameter_specification();
-
QCString physical_literal();
-
QCString physical_type_definition();
-
void port_clause();
-
QCString port_list();
-
void port_map_aspect();
-
QCString primary();
-
void primary_unit();
-
QCString procedure_call();
-
QCString procedure_call_statement();
-
QCString process_declarative_item();
-
QCString process_declarative_part();
-
void process_statement();
-
void process_statement_part();
-
QCString qualified_expression();
-
QCString range();
-
QCString range_constraint();
-
void record_type_definition();
-
QCString relation();
-
QCString relation_operator();
-
QCString report_statement();
-
QCString return_statement();
-
QCString scalar_type_definition();
-
void secondary_unit();
-
QCString secondary_unit_declaration();
-
QCString selected_name();
-
void selected_signal_assignment();
-
void selected_waveforms();
-
QCString sensitivity_clause();
-
QCString sensitivity_list();
-
QCString sequence_of_statement();
-
QCString sequential_statement();
-
QCString shift_expression();
-
QCString shift_operator();
-
QCString sign();
-
QCString signal_assignment_statement();
-
void semi();
-
void signal_declaration();
-
QCString signal_kind();
-
QCString signal_list();
-
QCString signature();
-
QCString simple_expression();
-
void simple_name();
-
QCString slice_name();
-
QCString string_literal();
-
void subprogram_body();
-
void subprogram_declaration();
-
void subprogram_1();
-
QCString subprogram_declarative_item();
-
QCString subprogram_declarative_part();
-
void subprogram_kind();
-
void subprogram_specification();
-
void subprogram_statement_part();
-
QCString subtype_declaration();
-
+QCString reslution_indication();
QCString subtype_indication();
-
QCString suffix();
-
QCString target();
-
QCString term();
-
QCString timeout_clause();
-
QCString type_conversion();
-
QCString type_declaration();
-
QCString type_definition();
-
QCString type_mark();
-
QCString unconstraint_array_definition();
-
QCString use_clause();
-
QCString variable_assignment_statement();
-
QCString variable_declaration();
-
QCString wait_statement();
-
QCString waveform();
-
QCString waveform_element();
-
QCString protected_type_body();
-
void protected_type_body_declarative_item();
-
void protected_type_body_declarative_part();
-
QCString protected_type_declaration();
-
void protected_type_declarative_item();
-
void protected_type_declarative_part();
-
QCString context_ref();
-
void context_declaration();
-
QCString libustcont_stats();
-
void package_instantiation_declaration();
-
QCString interface_package_declaration();
-
QCString subprogram_instantiation_declaration();
-
void gen_assoc_list();
-
void gen_interface_list();
-
void case_scheme();
-
void when_stats();
-
void ttend();
-
void generate_statement_body();
-
void generate_statement_body1();
-
+void generate_scheme_1();
+void generate_scheme_2();
+void generate_scheme_3();
QCString external_name();
-
QCString sig_stat();
-
QCString external_pathname();
-
QCString absolute_pathname();
-
QCString relative_pathname();
-
QCString neg_list();
-
QCString pathname_element();
-
QCString pathname_element_list();
-
QCString package_path_name();
-
void conditional_signal_assignment_wave();
-
void conditional_waveform_assignment();
-
void else_wave_list();
-
void conditional_force_assignment();
-
void selected_signal_assignment_wave();
-
void selected_variable_assignment();
-
void select_name();
-
void selected_waveform_assignment();
-
void selected_force_assignment();
-
void sel_var_list();
-
void sel_wave_list();
-
void inout_stat();
-
void else_stat();
-
QCString interface_subprogram_declaration();
-
QCString iproc();
-
QCString ifunc();
-
QCString param();
-
void parseInline();
inline bool jj_2_1(int xla)
{
@@ -1506,2078 +1231,2266 @@ void parseInline();
{ jj_save(115, xla); }
}
- inline bool jj_3_43()
+ inline bool jj_2_117(int xla)
{
- if (jj_done) return true;
- if (jj_3R_93()) return true;
- return false;
+ jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_done = false;
+ return (!jj_3_117() || jj_done);
+ { jj_save(116, xla); }
}
- inline bool jj_3R_139()
+ inline bool jj_2_118(int xla)
{
- if (jj_done) return true;
- if (jj_3R_69()) return true;
- return false;
+ jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_done = false;
+ return (!jj_3_118() || jj_done);
+ { jj_save(117, xla); }
}
- inline bool jj_3R_198()
+ inline bool jj_2_119(int xla)
+ {
+ jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_done = false;
+ return (!jj_3_119() || jj_done);
+ { jj_save(118, xla); }
+ }
+
+ inline bool jj_2_120(int xla)
+ {
+ jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_done = false;
+ return (!jj_3_120() || jj_done);
+ { jj_save(119, xla); }
+ }
+
+ inline bool jj_2_121(int xla)
+ {
+ jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_done = false;
+ return (!jj_3_121() || jj_done);
+ { jj_save(120, xla); }
+ }
+
+ inline bool jj_2_122(int xla)
+ {
+ jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_done = false;
+ return (!jj_3_122() || jj_done);
+ { jj_save(121, xla); }
+ }
+
+ inline bool jj_2_123(int xla)
+ {
+ jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_done = false;
+ return (!jj_3_123() || jj_done);
+ { jj_save(122, xla); }
+ }
+
+ inline bool jj_2_124(int xla)
+ {
+ jj_la = xla; jj_lastpos = jj_scanpos = token;
+ jj_done = false;
+ return (!jj_3_124() || jj_done);
+ { jj_save(123, xla); }
+ }
+
+ inline bool jj_3R_204()
{
if (jj_done) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_443()
+ inline bool jj_3R_461()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_408()) return true;
+ if (jj_3R_423()) return true;
return false;
}
- inline bool jj_3R_367()
+ inline bool jj_3R_203()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_442()) {
- jj_scanpos = xsp;
- if (jj_3R_443()) return true;
- }
+ if (jj_3R_362()) return true;
return false;
}
- inline bool jj_3R_442()
+ inline bool jj_3R_383()
{
if (jj_done) return true;
- if (jj_scan_token(WHILE_T)) return true;
- if (jj_3R_79()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_460()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_461()) return true;
return false;
}
- inline bool jj_3R_197()
+ inline bool jj_3R_460()
{
if (jj_done) return true;
- if (jj_3R_346()) return true;
+ if (jj_scan_token(WHILE_T)) return true;
+ if (jj_3R_82()) return true;
return false;
}
- inline bool jj_3R_400()
+ inline bool jj_3R_415()
{
if (jj_done) return true;
if (jj_scan_token(SEMI_T)) return true;
- if (jj_3R_399()) return true;
+ if (jj_3R_414()) return true;
return false;
}
- inline bool jj_3R_412()
+ inline bool jj_3R_429()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_195()
+ inline bool jj_3R_201()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_scan_token(116)) {
+ if (!jj_scan_token(116)) return false;
jj_scanpos = xsp;
- if (jj_scan_token(100)) {
+ if (!jj_scan_token(100)) return false;
jj_scanpos = xsp;
- if (jj_scan_token(31)) {
+ if (!jj_scan_token(31)) return false;
jj_scanpos = xsp;
if (jj_scan_token(101)) return true;
- }
- }
- }
return false;
}
- inline bool jj_3R_90()
+ inline bool jj_3R_94()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_195()) jj_scanpos = xsp;
- if (jj_3R_196()) return true;
+ if (jj_3R_201()) jj_scanpos = xsp;
+ if (jj_3R_202()) return true;
if (jj_scan_token(COLON_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_197()) jj_scanpos = xsp;
- if (jj_3R_84()) return true;
+ if (jj_3R_203()) jj_scanpos = xsp;
+ if (jj_3R_87()) return true;
xsp = jj_scanpos;
if (jj_scan_token(27)) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_198()) jj_scanpos = xsp;
+ if (jj_3R_204()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_313()
+ inline bool jj_3R_324()
{
if (jj_done) return true;
- if (jj_3R_399()) return true;
+ if (jj_3R_414()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_400()) { jj_scanpos = xsp; break; }
+ if (jj_3R_415()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_91()
+ inline bool jj_3R_95()
{
if (jj_done) return true;
if (jj_scan_token(FILE_T)) return true;
- if (jj_3R_196()) return true;
+ if (jj_3R_202()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_87()) return true;
return false;
}
- inline bool jj_3R_399()
+ inline bool jj_3R_718()
{
if (jj_done) return true;
- if (jj_3R_490()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3_42()
+ inline bool jj_3R_414()
{
if (jj_done) return true;
- if (jj_3R_92()) return true;
+ if (jj_3R_513()) return true;
return false;
}
- inline bool jj_3R_558()
+ inline bool jj_3_45()
{
if (jj_done) return true;
- if (jj_3R_613()) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_96()) return true;
return false;
}
- inline bool jj_3R_557()
+ inline bool jj_3R_444()
{
if (jj_done) return true;
- if (jj_3R_92()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_718()) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(145)) return true;
return false;
}
- inline bool jj_3_41()
+ inline bool jj_3R_574()
{
if (jj_done) return true;
- if (jj_3R_91()) return true;
+ if (jj_3R_635()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3_40()
+ inline bool jj_3R_573()
{
if (jj_done) return true;
- if (jj_3R_90()) return true;
+ if (jj_3R_96()) return true;
return false;
}
- inline bool jj_3R_556()
+ inline bool jj_3_44()
{
if (jj_done) return true;
- if (jj_3R_107()) return true;
+ if (jj_3R_95()) return true;
return false;
}
- inline bool jj_3_39()
+ inline bool jj_3_43()
{
if (jj_done) return true;
- if (jj_3R_89()) return true;
+ if (jj_3R_94()) return true;
return false;
}
- inline bool jj_3R_490()
+ inline bool jj_3_42()
+ {
+ if (jj_done) return true;
+ if (jj_3R_93()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_513()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3_39()) {
+ if (!jj_3_41()) return false;
jj_scanpos = xsp;
- if (jj_3R_556()) {
+ if (!jj_3_42()) return false;
jj_scanpos = xsp;
- if (jj_3_40()) {
+ if (!jj_3_43()) return false;
jj_scanpos = xsp;
- if (jj_3_41()) {
+ if (!jj_3_44()) return false;
jj_scanpos = xsp;
- if (jj_3R_557()) {
+ if (!jj_3R_573()) return false;
jj_scanpos = xsp;
- if (jj_3R_558()) return true;
- }
- }
- }
- }
- }
+ if (jj_3R_574()) return true;
return false;
}
- inline bool jj_3R_180()
+ inline bool jj_3_41()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_92()) return true;
return false;
}
- inline bool jj_3_38()
+ inline bool jj_3R_157()
{
if (jj_done) return true;
- if (jj_scan_token(BASIC_IDENTIFIER)) return true;
- if (jj_scan_token(DOT_T)) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_71()) return true;
return false;
}
- inline bool jj_3R_625()
+ inline bool jj_3_40()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_scan_token(BASIC_IDENTIFIER)) return true;
+ if (jj_scan_token(DOT_T)) return true;
return false;
}
- inline bool jj_3R_696()
+ inline bool jj_3R_432()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_415()
+ inline bool jj_3R_431()
{
if (jj_done) return true;
- if (jj_scan_token(ALL_T)) return true;
+ if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_414()
+ inline bool jj_3R_643()
{
if (jj_done) return true;
- if (jj_scan_token(OTHER_T)) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_331()
+ inline bool jj_3R_343()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_413()) {
+ if (!jj_3R_430()) return false;
jj_scanpos = xsp;
- if (jj_3R_414()) {
+ if (!jj_3R_431()) return false;
jj_scanpos = xsp;
- if (jj_3R_415()) return true;
- }
- }
+ if (jj_3R_432()) return true;
return false;
}
- inline bool jj_3R_413()
+ inline bool jj_3R_430()
{
if (jj_done) return true;
- if (jj_3R_196()) return true;
+ if (jj_3R_202()) return true;
return false;
}
- inline bool jj_3R_328()
+ inline bool jj_3R_340()
{
if (jj_done) return true;
if (jj_scan_token(CONFIGURATION_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_327()
+ inline bool jj_3R_339()
{
if (jj_done) return true;
if (jj_scan_token(ENTITY_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3_38()) jj_scanpos = xsp;
- if (jj_3R_59()) return true;
- xsp = jj_scanpos;
- if (jj_3R_412()) jj_scanpos = xsp;
- return false;
- }
-
- inline bool jj_3R_426()
- {
- if (jj_done) return true;
- if (jj_scan_token(IS_T)) return true;
- Token * xsp;
+ if (jj_3_40()) jj_scanpos = xsp;
+ if (jj_3R_62()) return true;
xsp = jj_scanpos;
- if (jj_3R_696()) {
- jj_scanpos = xsp;
- if (jj_scan_token(145)) return true;
- }
+ if (jj_3R_429()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_173()
+ inline bool jj_3R_177()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_326()) {
+ if (!jj_3R_338()) return false;
jj_scanpos = xsp;
- if (jj_3R_327()) {
+ if (!jj_3R_339()) return false;
jj_scanpos = xsp;
- if (jj_3R_328()) return true;
- }
- }
+ if (jj_3R_340()) return true;
return false;
}
- inline bool jj_3_37()
+ inline bool jj_3_39()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_71()) return true;
return false;
}
- inline bool jj_3R_326()
+ inline bool jj_3R_338()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_scan_token(28)) jj_scanpos = xsp;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_154()
+ inline bool jj_3R_747()
{
if (jj_done) return true;
- if (jj_3R_157()) return true;
+ if (jj_3R_159()) return true;
if (jj_scan_token(RANGE_T)) return true;
if (jj_scan_token(BOX_T)) return true;
return false;
}
- inline bool jj_3R_622()
+ inline bool jj_3R_640()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_621()
+ inline bool jj_3R_639()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_71()) return true;
return false;
}
- inline bool jj_3R_565()
+ inline bool jj_3R_587()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_621()) {
+ if (!jj_3R_639()) return false;
jj_scanpos = xsp;
- if (jj_3R_622()) return true;
- }
+ if (jj_3R_640()) return true;
return false;
}
- inline bool jj_3R_82()
+ inline bool jj_3R_538()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_324()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3_124()
+ {
+ if (jj_done) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_442()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(77)) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_538()) jj_scanpos = xsp;
+ return false;
+ }
+
+ inline bool jj_3R_64()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_71()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_180()) { jj_scanpos = xsp; break; }
+ if (jj_3R_157()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_532()
+ inline bool jj_3R_549()
{
if (jj_done) return true;
if (jj_scan_token(TYPE_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_624()
+ inline bool jj_3R_401()
+ {
+ if (jj_done) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_88()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_scan_token(134)) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(137)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_548()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_466()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_642()
{
if (jj_done) return true;
if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_259()) return true;
+ if (jj_3R_265()) return true;
return false;
}
- inline bool jj_3R_623()
+ inline bool jj_3R_313()
+ {
+ if (jj_done) return true;
+ if (jj_3R_399()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_563()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_60()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_443()
+ {
+ if (jj_done) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_scan_token(84)) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(52)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_641()
{
if (jj_done) return true;
if (jj_scan_token(ELSIF_T)) return true;
- if (jj_3R_79()) return true;
+ if (jj_3R_82()) return true;
if (jj_scan_token(THEN_T)) return true;
- if (jj_3R_259()) return true;
+ if (jj_3R_265()) return true;
return false;
}
- inline bool jj_3R_520()
+ inline bool jj_3R_360()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_313()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_443()) jj_scanpos = xsp;
+ if (jj_scan_token(FUNCTION_T)) return true;
+ if (jj_3R_62()) return true;
+ if (jj_3R_442()) return true;
+ if (jj_scan_token(RETURN_T)) return true;
+ if (jj_3R_62()) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_444()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_345()
+ inline bool jj_3R_361()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_255()
+ inline bool jj_3R_359()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_scan_token(PROCEDURE_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_3R_442()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_261()
+ {
+ if (jj_done) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_120()
+ inline bool jj_3R_123()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_255()) jj_scanpos = xsp;
+ if (jj_3R_261()) jj_scanpos = xsp;
if (jj_scan_token(IF_T)) return true;
- if (jj_3R_79()) return true;
+ if (jj_3R_82()) return true;
if (jj_scan_token(THEN_T)) return true;
- if (jj_3R_259()) return true;
+ if (jj_3R_265()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_623()) { jj_scanpos = xsp; break; }
+ if (jj_3R_641()) { jj_scanpos = xsp; break; }
}
xsp = jj_scanpos;
- if (jj_3R_624()) jj_scanpos = xsp;
+ if (jj_3R_642()) jj_scanpos = xsp;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(IF_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_625()) jj_scanpos = xsp;
+ if (jj_3R_643()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_196()
+ inline bool jj_3R_200()
+ {
+ if (jj_done) return true;
+ if (jj_3R_360()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_199()
+ {
+ if (jj_done) return true;
+ if (jj_3R_359()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_92()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_199()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_200()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_202()
+ {
+ if (jj_done) return true;
+ if (jj_3R_62()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_345()) { jj_scanpos = xsp; break; }
+ if (jj_3R_361()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_424()
+ inline bool jj_3R_493()
{
if (jj_done) return true;
+ if (jj_scan_token(ELSE_T)) return true;
+ if (jj_3R_60()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_scan_token(77)) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_520()) jj_scanpos = xsp;
+ if (jj_3R_563()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_116()
+ inline bool jj_3R_169()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(WHEN_T)) return true;
+ if (jj_scan_token(BASIC_IDENTIFIER)) return true;
return false;
}
- inline bool jj_3R_164()
+ inline bool jj_3R_400()
{
if (jj_done) return true;
- if (jj_scan_token(BASIC_IDENTIFIER)) return true;
+ Token * xsp;
+ if (jj_3R_493()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_493()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_163()
+ inline bool jj_3R_168()
{
if (jj_done) return true;
if (jj_scan_token(EXTENDED_CHARACTER)) return true;
return false;
}
- inline bool jj_3R_69()
+ inline bool jj_3R_73()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_163()) {
+ if (!jj_3R_168()) return false;
jj_scanpos = xsp;
- if (jj_3R_164()) return true;
- }
+ if (jj_3R_169()) return true;
return false;
}
- inline bool jj_3R_545()
+ inline bool jj_3R_562()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_544()) return true;
+ if (jj_3R_561()) return true;
return false;
}
- inline bool jj_3R_386()
+ inline bool jj_3R_399()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_85()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_scan_token(134)) {
+ if (!jj_scan_token(53)) return false;
jj_scanpos = xsp;
- if (jj_scan_token(137)) return true;
- }
+ if (jj_scan_token(75)) return true;
return false;
}
- inline bool jj_3R_446()
+ inline bool jj_3R_466()
{
if (jj_done) return true;
- if (jj_3R_529()) return true;
+ if (jj_3R_463()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_88()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_548()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_530()
+ inline bool jj_3R_465()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_448()) return true;
+ if (jj_3R_420()) return true;
return false;
}
- inline bool jj_3R_65()
+ inline bool jj_3R_67()
{
if (jj_done) return true;
if (jj_scan_token(GROUP_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(IS_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_474()) return true;
+ if (jj_3R_491()) return true;
if (jj_scan_token(RPAREN_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_546()
+ inline bool jj_3R_314()
{
if (jj_done) return true;
+ if (jj_3R_60()) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_88()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_scan_token(134)) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(137)) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_401()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_305()
+ inline bool jj_3R_398()
{
if (jj_done) return true;
- if (jj_3R_384()) return true;
+ if (jj_scan_token(GROUP_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_492()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_425()
+ inline bool jj_3R_148()
{
if (jj_done) return true;
+ if (jj_scan_token(WITH_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(SELECT_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_scan_token(84)) {
- jj_scanpos = xsp;
- if (jj_scan_token(52)) return true;
+ if (jj_scan_token(155)) jj_scanpos = xsp;
+ if (jj_3R_117()) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
+ if (jj_scan_token(FORCE_T)) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_313()) jj_scanpos = xsp;
+ if (jj_3R_314()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_492()
+ {
+ if (jj_done) return true;
+ if (jj_3R_561()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_562()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_344()
+ inline bool jj_3_123()
{
if (jj_done) return true;
+ if (jj_3R_112()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_385()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(WITH_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(SELECT_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_425()) jj_scanpos = xsp;
- if (jj_scan_token(FUNCTION_T)) return true;
- if (jj_3R_59()) return true;
- if (jj_3R_424()) return true;
- if (jj_scan_token(RETURN_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_scan_token(155)) jj_scanpos = xsp;
+ if (jj_3R_117()) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_426()) jj_scanpos = xsp;
+ if (jj_3R_465()) jj_scanpos = xsp;
+ if (jj_3R_466()) return true;
return false;
}
- inline bool jj_3R_383()
+ inline bool jj_3R_630()
{
if (jj_done) return true;
- if (jj_scan_token(GROUP_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_475()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_369()) return true;
return false;
}
- inline bool jj_3R_475()
+ inline bool jj_3R_629()
{
if (jj_done) return true;
- if (jj_3R_544()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_545()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_304()
+ inline bool jj_3R_561()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
- if (jj_3R_385()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_629()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_630()) return true;
return false;
}
- inline bool jj_3R_343()
+ inline bool jj_3R_712()
{
if (jj_done) return true;
- if (jj_scan_token(PROCEDURE_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_3R_424()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_608()
+ inline bool jj_3R_72()
{
if (jj_done) return true;
- if (jj_3R_352()) return true;
+ if (jj_scan_token(GENERIC_T)) return true;
+ if (jj_scan_token(MAP_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_167()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_607()
+ inline bool jj_3R_711()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_112()) return true;
return false;
}
- inline bool jj_3R_544()
+ inline bool jj_3R_686()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_607()) {
+ if (!jj_3R_711()) return false;
jj_scanpos = xsp;
- if (jj_3R_608()) return true;
- }
+ if (jj_3R_712()) return true;
return false;
}
- inline bool jj_3R_194()
+ inline bool jj_3_120()
{
if (jj_done) return true;
- if (jj_3R_344()) return true;
+ if (jj_3R_146()) return true;
+ if (jj_scan_token(DOT_T)) return true;
return false;
}
- inline bool jj_3R_70()
+ inline bool jj_3R_174()
{
if (jj_done) return true;
- if (jj_scan_token(GENERIC_T)) return true;
- if (jj_scan_token(MAP_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_165()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_193()
+ inline bool jj_3R_597()
{
if (jj_done) return true;
- if (jj_3R_343()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_89()
+ inline bool jj_3_122()
+ {
+ if (jj_done) return true;
+ if (jj_3R_148()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_545()
{
if (jj_done) return true;
+ if (jj_scan_token(WITH_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(SELECT_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_193()) {
- jj_scanpos = xsp;
- if (jj_3R_194()) return true;
- }
+ if (jj_scan_token(155)) jj_scanpos = xsp;
+ if (jj_3R_686()) return true;
+ if (jj_scan_token(VARASSIGN_T)) return true;
+ if (jj_3R_314()) return true;
return false;
}
- inline bool jj_3R_170()
+ inline bool jj_3R_160()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_324()) return true;
return false;
}
- inline bool jj_3R_476()
+ inline bool jj_3_38()
{
if (jj_done) return true;
- if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_58()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_546()) jj_scanpos = xsp;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_385()
+ inline bool jj_3R_311()
{
if (jj_done) return true;
- Token * xsp;
- if (jj_3R_476()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_476()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_399()) return true;
return false;
}
- inline bool jj_3R_158()
+ inline bool jj_3R_309()
{
if (jj_done) return true;
- if (jj_3R_313()) return true;
+ if (jj_3R_146()) return true;
+ if (jj_scan_token(DOT_T)) return true;
return false;
}
- inline bool jj_3R_66()
+ inline bool jj_3R_312()
+ {
+ if (jj_done) return true;
+ if (jj_3R_60()) return true;
+ if (jj_3R_400()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_464()
+ {
+ if (jj_done) return true;
+ if (jj_3R_547()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_68()
{
if (jj_done) return true;
if (jj_scan_token(GENERIC_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_158()) return true;
+ if (jj_3R_160()) return true;
if (jj_scan_token(RPAREN_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_384()
+ inline bool jj_3R_277()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(53)) {
- jj_scanpos = xsp;
- if (jj_scan_token(75)) return true;
- }
+ if (jj_3R_385()) return true;
return false;
}
- inline bool jj_3R_447()
+ inline bool jj_3R_130()
{
if (jj_done) return true;
- if (jj_3R_405()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_276()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_277()) return true;
return false;
}
- inline bool jj_3R_322()
+ inline bool jj_3R_276()
{
if (jj_done) return true;
- if (jj_scan_token(IF_T)) return true;
- if (jj_3R_79()) return true;
+ if (jj_3R_148()) return true;
return false;
}
- inline bool jj_3R_448()
+ inline bool jj_3R_333()
{
if (jj_done) return true;
- if (jj_3R_445()) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_85()) return true;
+ if (jj_scan_token(IF_T)) return true;
Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_530()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(SEMI_T)) return true;
+ xsp = jj_scanpos;
+ if (jj_3_38()) jj_scanpos = xsp;
+ if (jj_3R_82()) return true;
return false;
}
- inline bool jj_3R_168()
+ inline bool jj_3R_172()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_321()) {
+ if (!jj_3R_332()) return false;
jj_scanpos = xsp;
- if (jj_3R_322()) return true;
- }
+ if (jj_3R_333()) return true;
return false;
}
- inline bool jj_3R_321()
+ inline bool jj_3R_332()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_408()) return true;
+ if (jj_3R_423()) return true;
return false;
}
- inline bool jj_3R_306()
+ inline bool jj_3R_462()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_85()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(134)) {
- jj_scanpos = xsp;
- if (jj_scan_token(137)) return true;
- }
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_386()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_420()) return true;
return false;
}
- inline bool jj_3R_303()
+ inline bool jj_3R_147()
{
if (jj_done) return true;
- if (jj_3R_384()) return true;
+ if (jj_3R_117()) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
+ if (jj_scan_token(FORCE_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_311()) jj_scanpos = xsp;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_312()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3_112()
+ inline bool jj_3R_547()
{
if (jj_done) return true;
- if (jj_3R_142()) return true;
- if (jj_scan_token(DOT_T)) return true;
+ if (jj_scan_token(ELSE_T)) return true;
+ if (jj_3R_60()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_597()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_74()
+ inline bool jj_3R_77()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_168()) return true;
+ if (jj_3R_172()) return true;
if (jj_scan_token(GENERATE_T)) return true;
- if (jj_3R_169()) return true;
+ if (jj_3R_173()) return true;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(GENERATE_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_170()) jj_scanpos = xsp;
+ if (jj_3R_174()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_144()
+ inline bool jj_3_121()
{
if (jj_done) return true;
- if (jj_scan_token(WITH_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(SELECT_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(155)) jj_scanpos = xsp;
- if (jj_3R_114()) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
- if (jj_scan_token(FORCE_T)) return true;
- xsp = jj_scanpos;
- if (jj_3R_305()) jj_scanpos = xsp;
- if (jj_3R_306()) return true;
+ if (jj_3R_147()) return true;
return false;
}
- inline bool jj_3R_104()
+ inline bool jj_3R_108()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_226()) return true;
+ if (jj_3R_233()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_115()
+ inline bool jj_3R_384()
{
if (jj_done) return true;
- if (jj_3R_108()) return true;
+ if (jj_3R_117()) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_462()) jj_scanpos = xsp;
+ if (jj_3R_463()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_60()) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_464()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_369()
+ inline bool jj_3R_275()
+ {
+ if (jj_done) return true;
+ if (jj_3R_384()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_129()
{
if (jj_done) return true;
- if (jj_scan_token(WITH_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(SELECT_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_scan_token(155)) jj_scanpos = xsp;
- if (jj_3R_114()) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
- xsp = jj_scanpos;
- if (jj_3R_447()) jj_scanpos = xsp;
- if (jj_3R_448()) return true;
+ if (!jj_3R_274()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_275()) return true;
return false;
}
- inline bool jj_3R_301()
+ inline bool jj_3R_274()
{
if (jj_done) return true;
- if (jj_3R_142()) return true;
- if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_147()) return true;
return false;
}
- inline bool jj_3R_687()
+ inline bool jj_3R_572()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_scan_token(AT_T)) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_575()
+ inline bool jj_3R_481()
{
if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_551()) return true;
return false;
}
- inline bool jj_3R_686()
+ inline bool jj_3R_310()
{
if (jj_done) return true;
- if (jj_3R_108()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_663()
+ inline bool jj_3_119()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_686()) {
- jj_scanpos = xsp;
- if (jj_3R_687()) return true;
- }
+ if (jj_3R_145()) return true;
return false;
}
- inline bool jj_3_114()
+ inline bool jj_3R_425()
{
if (jj_done) return true;
- if (jj_3R_144()) return true;
+ if (jj_3R_521()) return true;
return false;
}
- inline bool jj_3R_527()
+ inline bool jj_3R_145()
{
if (jj_done) return true;
- if (jj_scan_token(WITH_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(SELECT_T)) return true;
+ if (jj_3R_146()) return true;
+ if (jj_scan_token(DOT_T)) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(155)) jj_scanpos = xsp;
- if (jj_3R_663()) return true;
- if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_306()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_309()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_444()
+ inline bool jj_3R_634()
{
if (jj_done) return true;
- if (jj_3R_405()) return true;
+ if (jj_3R_145()) return true;
return false;
}
- inline bool jj_3R_463()
+ inline bool jj_3R_602()
{
if (jj_done) return true;
- if (jj_3R_534()) return true;
+ if (jj_3R_399()) return true;
return false;
}
- inline bool jj_3R_271()
+ inline bool jj_3R_158()
{
if (jj_done) return true;
- if (jj_3R_369()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_323()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_127()
+ inline bool jj_3R_146()
{
if (jj_done) return true;
+ if (jj_3R_73()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_270()) {
- jj_scanpos = xsp;
- if (jj_3R_271()) return true;
- }
+ if (jj_3R_310()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_270()
+ inline bool jj_3R_140()
{
if (jj_done) return true;
- if (jj_3R_144()) return true;
+ if (jj_scan_token(TYPE_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_3R_598()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_143()
+ inline bool jj_3R_659()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(NEG_T)) return true;
+ if (jj_scan_token(DOT_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_633()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
- if (jj_scan_token(FORCE_T)) return true;
+ Token * xsp;
+ if (jj_3R_659()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_659()) { jj_scanpos = xsp; break; }
+ }
+ return false;
+ }
+
+ inline bool jj_3R_65()
+ {
+ if (jj_done) return true;
+ if (jj_3R_62()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_303()) jj_scanpos = xsp;
- if (jj_3R_58()) return true;
- if (jj_scan_token(WHEN_T)) return true;
- xsp = jj_scanpos;
- if (jj_3R_304()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_158()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_156()
+ inline bool jj_3_118()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_312()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_145()) return true;
return false;
}
- inline bool jj_3R_529()
+ inline bool jj_3R_571()
{
if (jj_done) return true;
- if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_633()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_575()) jj_scanpos = xsp;
+ if (jj_3R_634()) jj_scanpos = xsp;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3_113()
+ inline bool jj_3R_592()
{
if (jj_done) return true;
- if (jj_3R_143()) return true;
+ if (jj_3R_324()) return true;
return false;
}
- inline bool jj_3R_136()
+ inline bool jj_3R_336()
{
if (jj_done) return true;
- if (jj_scan_token(TYPE_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_3R_577()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_427()) return true;
return false;
}
- inline bool jj_3R_324()
+ inline bool jj_3R_413()
{
if (jj_done) return true;
- if (jj_3R_410()) return true;
+ if (jj_scan_token(INTEGER)) return true;
return false;
}
- inline bool jj_3R_368()
+ inline bool jj_3R_632()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_444()) jj_scanpos = xsp;
- if (jj_3R_445()) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_58()) return true;
- xsp = jj_scanpos;
- if (jj_3R_446()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_63()
+ inline bool jj_3R_323()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_156()) jj_scanpos = xsp;
+ if (!jj_3R_412()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_413()) return true;
return false;
}
- inline bool jj_3R_269()
+ inline bool jj_3R_412()
{
if (jj_done) return true;
- if (jj_3R_368()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_570()
+ inline bool jj_3R_631()
{
if (jj_done) return true;
- if (jj_3R_313()) return true;
+ if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_145()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_126()
+ inline bool jj_3R_570()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_268()) {
+ if (!jj_3R_631()) return false;
jj_scanpos = xsp;
- if (jj_3R_269()) return true;
- }
+ if (jj_3R_632()) return true;
return false;
}
- inline bool jj_3R_268()
+ inline bool jj_3R_512()
{
if (jj_done) return true;
- if (jj_3R_143()) return true;
+ if (jj_3R_572()) return true;
return false;
}
- inline bool jj_3R_398()
+ inline bool jj_3R_511()
{
if (jj_done) return true;
- if (jj_scan_token(INTEGER)) return true;
+ if (jj_3R_571()) return true;
return false;
}
- inline bool jj_3R_312()
+ inline bool jj_3R_411()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_397()) {
+ if (!jj_3R_510()) return false;
jj_scanpos = xsp;
- if (jj_3R_398()) return true;
- }
+ if (!jj_3R_511()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_512()) return true;
return false;
}
- inline bool jj_3R_397()
+ inline bool jj_3R_510()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_570()) return true;
return false;
}
- inline bool jj_3R_141()
+ inline bool jj_3R_509()
{
if (jj_done) return true;
- if (jj_3R_142()) return true;
- if (jj_scan_token(DOT_T)) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_301()) { jj_scanpos = xsp; break; }
- }
+ if (jj_scan_token(VARIABLE_T)) return true;
return false;
}
- inline bool jj_3R_555()
+ inline bool jj_3R_677()
{
if (jj_done) return true;
- if (jj_scan_token(AT_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_scan_token(FILE_T)) return true;
+ if (jj_scan_token(OF_T)) return true;
+ if (jj_3R_159()) return true;
return false;
}
- inline bool jj_3R_302()
+ inline bool jj_3R_508()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(SIGNAL_T)) return true;
return false;
}
- inline bool jj_3_111()
+ inline bool jj_3R_601()
{
if (jj_done) return true;
- if (jj_3R_141()) return true;
+ if (jj_scan_token(OPEN_T)) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_657()
+ inline bool jj_3R_410()
{
if (jj_done) return true;
- if (jj_scan_token(FILE_T)) return true;
- if (jj_scan_token(OF_T)) return true;
- if (jj_3R_157()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_507()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_508()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_509()) return true;
return false;
}
- inline bool jj_3R_612()
+ inline bool jj_3R_507()
{
if (jj_done) return true;
- if (jj_3R_141()) return true;
+ if (jj_scan_token(CONSTANT_T)) return true;
return false;
}
- inline bool jj_3R_580()
+ inline bool jj_3R_551()
{
if (jj_done) return true;
- if (jj_scan_token(OPEN_T)) return true;
- if (jj_3R_58()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_601()) jj_scanpos = xsp;
+ if (jj_scan_token(IS_T)) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_602()) jj_scanpos = xsp;
+ if (jj_3R_603()) return true;
return false;
}
- inline bool jj_3R_534()
+ inline bool jj_3R_603()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_580()) jj_scanpos = xsp;
- if (jj_scan_token(IS_T)) return true;
- if (jj_3R_581()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_142()
+ inline bool jj_3_113()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_302()) jj_scanpos = xsp;
+ if (jj_3R_142()) return true;
return false;
}
- inline bool jj_3R_640()
+ inline bool jj_3_117()
{
if (jj_done) return true;
- if (jj_scan_token(NEG_T)) return true;
- if (jj_scan_token(DOT_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_581()
+ inline bool jj_3R_320()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
+ if (jj_scan_token(SLSL_T)) return true;
+ if (jj_3R_410()) return true;
+ if (jj_3R_411()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_87()) return true;
+ if (jj_scan_token(RSRS_T)) return true;
return false;
}
- inline bool jj_3R_611()
+ inline bool jj_3_116()
{
if (jj_done) return true;
- Token * xsp;
- if (jj_3R_640()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_640()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3_110()
+ inline bool jj_3R_467()
{
if (jj_done) return true;
- if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_141()) return true;
+ if (jj_scan_token(DOUBLEMULT_T)) return true;
+ if (jj_3R_386()) return true;
return false;
}
- inline bool jj_3R_554()
+ inline bool jj_3R_392()
{
if (jj_done) return true;
- if (jj_3R_611()) return true;
+ if (jj_scan_token(FILE_T)) return true;
+ if (jj_3R_202()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_87()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_612()) jj_scanpos = xsp;
- if (jj_3R_69()) return true;
+ if (jj_3R_481()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_449()
+ inline bool jj_3R_281()
{
if (jj_done) return true;
- if (jj_scan_token(DOUBLEMULT_T)) return true;
- if (jj_3R_370()) return true;
+ if (jj_3R_135()) return true;
return false;
}
- inline bool jj_3R_610()
+ inline bool jj_3R_522()
{
if (jj_done) return true;
- if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_scan_token(ELSIF_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_117()) jj_scanpos = xsp;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(GENERATE_T)) return true;
+ if (jj_3R_334()) return true;
return false;
}
- inline bool jj_3R_376()
+ inline bool jj_3R_270()
{
if (jj_done) return true;
- if (jj_scan_token(FILE_T)) return true;
- if (jj_3R_196()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_84()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_463()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_264()
+ inline bool jj_3_115()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_144()) return true;
return false;
}
- inline bool jj_3R_609()
+ inline bool jj_3R_292()
{
if (jj_done) return true;
- if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_141()) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_317()) return true;
+ if (jj_3R_386()) return true;
return false;
}
- inline bool jj_3R_553()
+ inline bool jj_3R_291()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_609()) {
- jj_scanpos = xsp;
- if (jj_3R_610()) return true;
- }
+ if (jj_scan_token(QQ_T)) return true;
+ if (jj_3R_386()) return true;
return false;
}
- inline bool jj_3R_284()
+ inline bool jj_3R_290()
{
if (jj_done) return true;
if (jj_scan_token(NOT_T)) return true;
- if (jj_3R_370()) return true;
+ if (jj_3R_386()) return true;
return false;
}
- inline bool jj_3R_283()
+ inline bool jj_3R_427()
{
if (jj_done) return true;
- if (jj_scan_token(ABS_T)) return true;
- if (jj_3R_370()) return true;
+ if (jj_scan_token(ELSE_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_116()) jj_scanpos = xsp;
+ if (jj_scan_token(GENERATE_T)) return true;
+ if (jj_3R_334()) return true;
return false;
}
- inline bool jj_3R_489()
+ inline bool jj_3R_289()
{
if (jj_done) return true;
- if (jj_3R_555()) return true;
+ if (jj_scan_token(ABS_T)) return true;
+ if (jj_3R_386()) return true;
return false;
}
- inline bool jj_3R_488()
+ inline bool jj_3R_426()
{
if (jj_done) return true;
- if (jj_3R_554()) return true;
+ if (jj_3R_522()) return true;
return false;
}
- inline bool jj_3R_135()
+ inline bool jj_3R_139()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_282()) {
+ if (!jj_3R_288()) return false;
jj_scanpos = xsp;
- if (jj_3R_283()) {
+ if (!jj_3R_289()) return false;
jj_scanpos = xsp;
- if (jj_3R_284()) return true;
- }
- }
+ if (!jj_3R_290()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_291()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_292()) return true;
return false;
}
- inline bool jj_3R_282()
+ inline bool jj_3R_288()
{
if (jj_done) return true;
- if (jj_3R_370()) return true;
+ if (jj_3R_386()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_449()) jj_scanpos = xsp;
+ if (jj_3R_467()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_396()
+ inline bool jj_3R_335()
{
if (jj_done) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_487()) {
- jj_scanpos = xsp;
- if (jj_3R_488()) {
- jj_scanpos = xsp;
- if (jj_3R_489()) return true;
- }
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_426()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_487()
+ inline bool jj_3R_520()
{
if (jj_done) return true;
- if (jj_3R_553()) return true;
+ if (jj_3R_144()) return true;
return false;
}
- inline bool jj_3_107()
+ inline bool jj_3R_173()
{
if (jj_done) return true;
- if (jj_3R_138()) return true;
+ if (jj_3R_334()) return true;
+ if (jj_3R_335()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_336()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_697()
+ inline bool jj_3R_248()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_96()) return true;
+ if (jj_3R_100()) return true;
return false;
}
- inline bool jj_3R_486()
+ inline bool jj_3R_424()
{
if (jj_done) return true;
- if (jj_scan_token(VARIABLE_T)) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_520()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(BEGIN_T)) return true;
return false;
}
- inline bool jj_3R_146()
+ inline bool jj_3R_334()
{
if (jj_done) return true;
- if (jj_3R_309()) return true;
- if (jj_3R_145()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_424()) jj_scanpos = xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_425()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_485()
+ inline bool jj_3R_150()
{
if (jj_done) return true;
- if (jj_scan_token(SIGNAL_T)) return true;
+ if (jj_3R_317()) return true;
+ if (jj_3R_149()) return true;
return false;
}
- inline bool jj_3R_394()
+ inline bool jj_3R_293()
{
if (jj_done) return true;
- if (jj_scan_token(OR_T)) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_393()
+ inline bool jj_3R_409()
{
if (jj_done) return true;
- if (jj_scan_token(XOR_T)) return true;
+ if (jj_scan_token(OR_T)) return true;
return false;
}
- inline bool jj_3R_392()
+ inline bool jj_3R_408()
{
if (jj_done) return true;
- if (jj_scan_token(XNOR_T)) return true;
+ if (jj_scan_token(XOR_T)) return true;
return false;
}
- inline bool jj_3R_395()
+ inline bool jj_3R_407()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_484()) {
- jj_scanpos = xsp;
- if (jj_3R_485()) {
- jj_scanpos = xsp;
- if (jj_3R_486()) return true;
- }
- }
+ if (jj_scan_token(XNOR_T)) return true;
return false;
}
- inline bool jj_3R_484()
+ inline bool jj_3R_243()
{
if (jj_done) return true;
- if (jj_scan_token(CONSTANT_T)) return true;
+ if (jj_3R_135()) return true;
return false;
}
- inline bool jj_3R_391()
+ inline bool jj_3R_406()
{
if (jj_done) return true;
if (jj_scan_token(NOR_T)) return true;
return false;
}
- inline bool jj_3R_390()
- {
- if (jj_done) return true;
- if (jj_scan_token(NAND_T)) return true;
- return false;
- }
-
- inline bool jj_3_109()
+ inline bool jj_3_114()
{
if (jj_done) return true;
- if (jj_3R_140()) return true;
+ if (jj_3R_143()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_275()
+ inline bool jj_3R_405()
{
if (jj_done) return true;
- if (jj_3R_132()) return true;
+ if (jj_scan_token(NAND_T)) return true;
return false;
}
- inline bool jj_3R_309()
+ inline bool jj_3R_317()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_389()) {
+ if (!jj_3R_404()) return false;
jj_scanpos = xsp;
- if (jj_3R_390()) {
+ if (!jj_3R_405()) return false;
jj_scanpos = xsp;
- if (jj_3R_391()) {
+ if (!jj_3R_406()) return false;
jj_scanpos = xsp;
- if (jj_3R_392()) {
+ if (!jj_3R_407()) return false;
jj_scanpos = xsp;
- if (jj_3R_393()) {
+ if (!jj_3R_408()) return false;
jj_scanpos = xsp;
- if (jj_3R_394()) return true;
- }
- }
- }
- }
- }
+ if (jj_3R_409()) return true;
return false;
}
- inline bool jj_3R_389()
+ inline bool jj_3R_404()
{
if (jj_done) return true;
if (jj_scan_token(AND_T)) return true;
return false;
}
- inline bool jj_3R_311()
+ inline bool jj_3R_142()
{
if (jj_done) return true;
- if (jj_scan_token(SLSL_T)) return true;
- if (jj_3R_395()) return true;
- if (jj_3R_396()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_84()) return true;
- if (jj_scan_token(RSRS_T)) return true;
+ if (jj_scan_token(END_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_293()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_58()
+ inline bool jj_3R_660()
{
if (jj_done) return true;
- if (jj_3R_145()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_146()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_135()) return true;
return false;
}
- inline bool jj_3R_409()
+ inline bool jj_3R_685()
{
if (jj_done) return true;
- if (jj_3R_140()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_114()) jj_scanpos = xsp;
+ if (jj_3R_88()) return true;
+ if (jj_scan_token(ARROW_T)) return true;
+ if (jj_3R_334()) return true;
return false;
}
- inline bool jj_3R_323()
+ inline bool jj_3R_60()
{
if (jj_done) return true;
+ if (jj_3R_149()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_409()) { jj_scanpos = xsp; break; }
+ if (jj_3R_150()) { jj_scanpos = xsp; break; }
}
- if (jj_scan_token(BEGIN_T)) return true;
return false;
}
- inline bool jj_3R_169()
+ inline bool jj_3R_672()
{
if (jj_done) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_323()) jj_scanpos = xsp;
+ if (jj_3R_685()) return true;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_324()) { jj_scanpos = xsp; break; }
+ if (jj_3R_685()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_285()
- {
- if (jj_done) return true;
- if (jj_3R_69()) return true;
- return false;
- }
-
- inline bool jj_3R_662()
+ inline bool jj_3R_637()
{
if (jj_done) return true;
- if (jj_scan_token(BEGIN_T)) return true;
- if (jj_3R_662()) return true;
+ if (jj_scan_token(CASE_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(GENERATE_T)) return true;
+ if (jj_3R_672()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_113()) jj_scanpos = xsp;
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(GENERATE_T)) return true;
+ if (jj_3R_334()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_265()
+ inline bool jj_3R_271()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_79()) return true;
- return false;
- }
-
- inline bool jj_3R_235()
- {
- if (jj_done) return true;
- if (jj_3R_132()) return true;
- return false;
- }
-
- inline bool jj_3R_263()
- {
- if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_82()) return true;
return false;
}
- inline bool jj_3_108()
+ inline bool jj_3R_269()
{
if (jj_done) return true;
- if (jj_3R_139()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_124()
+ inline bool jj_3R_127()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_263()) jj_scanpos = xsp;
+ if (jj_3R_269()) jj_scanpos = xsp;
if (jj_scan_token(EXIT_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_264()) jj_scanpos = xsp;
+ if (jj_3R_270()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_265()) jj_scanpos = xsp;
+ if (jj_3R_271()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_138()
+ inline bool jj_3R_114()
{
if (jj_done) return true;
- if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_100()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_285()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_248()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_688()
+ inline bool jj_3R_134()
{
if (jj_done) return true;
+ if (jj_scan_token(GENERIC_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_96()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_697()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_324()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_641()
+ inline bool jj_3R_215()
{
if (jj_done) return true;
- if (jj_3R_132()) return true;
+ if (jj_3R_369()) return true;
return false;
}
- inline bool jj_3R_652()
+ inline bool jj_3R_214()
+ {
+ if (jj_done) return true;
+ if (jj_3R_73()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_100()
{
if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3_108()) jj_scanpos = xsp;
- if (jj_3R_85()) return true;
- if (jj_scan_token(ARROW_T)) return true;
- if (jj_3R_662()) return true;
+ if (!jj_3R_214()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_215()) return true;
return false;
}
- inline bool jj_3R_208()
+ inline bool jj_3R_135()
{
if (jj_done) return true;
- if (jj_3R_352()) return true;
+ if (jj_scan_token(GENERIC_T)) return true;
+ if (jj_scan_token(MAP_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_167()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_619()
+ inline bool jj_3R_708()
{
if (jj_done) return true;
- Token * xsp;
- if (jj_3R_652()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_652()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_369()) return true;
return false;
}
- inline bool jj_3R_207()
+ inline bool jj_3R_707()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_96()
+ inline bool jj_3R_679()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_207()) {
+ if (!jj_3R_707()) return false;
jj_scanpos = xsp;
- if (jj_3R_208()) return true;
- }
+ if (jj_3R_708()) return true;
return false;
}
- inline bool jj_3R_695()
+ inline bool jj_3R_657()
{
if (jj_done) return true;
- if (jj_3R_352()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_656()) return true;
return false;
}
- inline bool jj_3R_561()
+ inline bool jj_3_37()
{
if (jj_done) return true;
- if (jj_scan_token(CASE_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(GENERATE_T)) return true;
- if (jj_3R_619()) return true;
+ if (jj_3R_91()) return true;
return false;
}
- inline bool jj_3R_694()
+ inline bool jj_3_36()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_90()) return true;
return false;
}
- inline bool jj_3R_684()
+ inline bool jj_3R_133()
{
if (jj_done) return true;
+ if (jj_scan_token(FUNCTION_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_scan_token(NEW_T)) return true;
+ if (jj_3R_62()) return true;
+ if (jj_3R_242()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_694()) {
- jj_scanpos = xsp;
- if (jj_3R_695()) return true;
- }
+ if (jj_3R_281()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3_36()
+ inline bool jj_3R_93()
{
if (jj_done) return true;
- if (jj_3R_88()) return true;
+ if (jj_scan_token(PACKAGE_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_scan_token(NEW_T)) return true;
+ if (jj_3R_62()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_660()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_35()
+ inline bool jj_3R_488()
{
if (jj_done) return true;
- if (jj_3R_87()) return true;
+ if (jj_3R_556()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_557()) return true;
return false;
}
- inline bool jj_3R_131()
+ inline bool jj_3R_680()
{
if (jj_done) return true;
- if (jj_scan_token(GENERIC_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_313()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_242()) return true;
return false;
}
- inline bool jj_3R_132()
+ inline bool jj_3R_89()
{
if (jj_done) return true;
- if (jj_scan_token(GENERIC_T)) return true;
- if (jj_scan_token(MAP_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_165()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(PACKAGE_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_scan_token(NEW_T)) return true;
+ if (jj_3R_62()) return true;
+ if (jj_3R_242()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_243()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_470()
+ inline bool jj_3R_607()
{
if (jj_done) return true;
- if (jj_3R_539()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_540()) return true;
+ if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_685()
+ inline bool jj_3R_606()
{
if (jj_done) return true;
- if (jj_3R_234()) return true;
+ if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_585()
+ inline bool jj_3R_605()
{
if (jj_done) return true;
- if (jj_scan_token(ALL_T)) return true;
+ if (jj_3R_656()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_657()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_584()
+ inline bool jj_3R_556()
{
if (jj_done) return true;
- if (jj_scan_token(OTHER_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_605()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_606()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_607()) return true;
return false;
}
- inline bool jj_3R_638()
+ inline bool jj_3R_368()
{
if (jj_done) return true;
- if (jj_3R_659()) return true;
+ if (jj_scan_token(CONTEXT_T)) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_583()
+ inline bool jj_3R_706()
{
if (jj_done) return true;
- Token * xsp;
- if (jj_3R_638()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_638()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_539()
+ inline bool jj_3R_656()
{
if (jj_done) return true;
+ if (jj_3R_679()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_583()) {
- jj_scanpos = xsp;
- if (jj_3R_584()) {
- jj_scanpos = xsp;
- if (jj_3R_585()) return true;
- }
- }
+ if (jj_3R_680()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_130()
+ inline bool jj_3R_260()
{
if (jj_done) return true;
- if (jj_scan_token(FUNCTION_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_59()) return true;
- if (jj_3R_234()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_275()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_382()) return true;
return false;
}
- inline bool jj_3R_107()
+ inline bool jj_3R_348()
{
if (jj_done) return true;
- if (jj_scan_token(PACKAGE_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_59()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_641()) jj_scanpos = xsp;
+ if (jj_scan_token(CONTEXT_T)) return true;
+ if (jj_3R_62()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_659()
+ inline bool jj_3R_717()
{
if (jj_done) return true;
- if (jj_3R_684()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_685()) jj_scanpos = xsp;
+ if (jj_3R_725()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_86()
+ inline bool jj_3R_705()
{
if (jj_done) return true;
- if (jj_scan_token(PACKAGE_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_59()) return true;
- if (jj_3R_234()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_235()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_717()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3_32()
+ inline bool jj_3_33()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_66()) return true;
return false;
}
- inline bool jj_3_34()
+ inline bool jj_3_35()
{
if (jj_done) return true;
- if (jj_3R_86()) return true;
+ if (jj_3R_89()) return true;
return false;
}
- inline bool jj_3_33()
+ inline bool jj_3R_745()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_347()) return true;
return false;
}
- inline bool jj_3R_543()
+ inline bool jj_3R_744()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_542()) return true;
+ if (jj_3R_395()) return true;
return false;
}
- inline bool jj_3R_683()
+ inline bool jj_3_34()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3R_254()
+ inline bool jj_3R_560()
{
if (jj_done) return true;
- if (jj_3R_366()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_559()) return true;
return false;
}
- inline bool jj_3R_693()
+ inline bool jj_3R_743()
{
if (jj_done) return true;
- if (jj_3R_703()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_363()) return true;
return false;
}
- inline bool jj_3R_682()
+ inline bool jj_3R_725()
{
if (jj_done) return true;
Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_693()) { jj_scanpos = xsp; break; }
- }
+ xsp = jj_scanpos;
+ if (!jj_3R_743()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_744()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_745()) return true;
return false;
}
- inline bool jj_3R_720()
+ inline bool jj_3R_704()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_606()
+ inline bool jj_3R_259()
{
if (jj_done) return true;
- if (jj_scan_token(BOX_T)) return true;
+ if (jj_3R_381()) return true;
return false;
}
- inline bool jj_3R_719()
+ inline bool jj_3R_678()
{
if (jj_done) return true;
- if (jj_3R_379()) return true;
+ if (jj_scan_token(PROTECTED_T)) return true;
+ if (jj_3R_705()) return true;
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(PROTECTED_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_706()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_718()
+ inline bool jj_3R_716()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
+ if (jj_3R_724()) return true;
+ return false;
+ }
+
+ inline bool jj_3_111()
+ {
+ if (jj_done) return true;
+ if (jj_3R_66()) return true;
return false;
}
@@ -3585,2104 +3498,1962 @@ void parseInline();
{
if (jj_done) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_718()) {
- jj_scanpos = xsp;
- if (jj_3R_719()) {
- jj_scanpos = xsp;
- if (jj_3R_720()) return true;
- }
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_716()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_349()
+ inline bool jj_3R_742()
{
if (jj_done) return true;
- if (jj_scan_token(ENTITY_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_398()) return true;
return false;
}
- inline bool jj_3R_681()
+ inline bool jj_3R_628()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_scan_token(BOX_T)) return true;
return false;
}
- inline bool jj_3R_253()
+ inline bool jj_3_112()
{
if (jj_done) return true;
- if (jj_3R_365()) return true;
+ if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3R_474()
+ inline bool jj_3R_741()
{
if (jj_done) return true;
- if (jj_3R_542()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_543()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_347()) return true;
return false;
}
- inline bool jj_3R_658()
+ inline bool jj_3R_740()
{
if (jj_done) return true;
- if (jj_scan_token(PROTECTED_T)) return true;
- if (jj_3R_682()) return true;
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(PROTECTED_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_683()) jj_scanpos = xsp;
+ if (jj_3R_395()) return true;
return false;
}
- inline bool jj_3R_692()
+ inline bool jj_3R_739()
{
if (jj_done) return true;
- if (jj_3R_702()) return true;
+ if (jj_3R_66()) return true;
return false;
}
- inline bool jj_3R_542()
+ inline bool jj_3R_365()
{
if (jj_done) return true;
- if (jj_3R_540()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_606()) jj_scanpos = xsp;
+ if (jj_scan_token(ENTITY_T)) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3_105()
+ inline bool jj_3R_738()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_393()) return true;
return false;
}
- inline bool jj_3R_680()
+ inline bool jj_3R_737()
{
if (jj_done) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_692()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_392()) return true;
return false;
}
- inline bool jj_3R_620()
+ inline bool jj_3R_736()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_391()) return true;
return false;
}
- inline bool jj_3R_602()
+ inline bool jj_3R_735()
{
if (jj_done) return true;
- if (jj_scan_token(FILE_T)) return true;
+ if (jj_3R_389()) return true;
return false;
}
- inline bool jj_3R_717()
+ inline bool jj_3R_734()
{
if (jj_done) return true;
- if (jj_3R_383()) return true;
+ if (jj_3R_388()) return true;
return false;
}
- inline bool jj_3R_601()
+ inline bool jj_3R_733()
{
if (jj_done) return true;
- if (jj_scan_token(GROUP_T)) return true;
+ if (jj_3R_387()) return true;
return false;
}
- inline bool jj_3R_600()
+ inline bool jj_3R_732()
{
if (jj_done) return true;
- if (jj_scan_token(UNITS_T)) return true;
+ if (jj_3R_543()) return true;
return false;
}
- inline bool jj_3R_599()
+ inline bool jj_3R_491()
{
if (jj_done) return true;
- if (jj_scan_token(LITERAL_T)) return true;
+ if (jj_3R_559()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_560()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3_106()
+ inline bool jj_3R_731()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_96()) return true;
return false;
}
- inline bool jj_3R_716()
+ inline bool jj_3R_724()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_731()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_732()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_733()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_734()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_735()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_736()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_737()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_738()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_739()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_740()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_741()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3_112()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_742()) return true;
return false;
}
- inline bool jj_3R_598()
+ inline bool jj_3R_258()
{
if (jj_done) return true;
- if (jj_scan_token(LABEL_T)) return true;
+ if (jj_3R_380()) return true;
return false;
}
- inline bool jj_3R_715()
+ inline bool jj_3R_559()
{
if (jj_done) return true;
- if (jj_3R_379()) return true;
+ if (jj_3R_557()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_628()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_597()
+ inline bool jj_3R_638()
{
if (jj_done) return true;
- if (jj_scan_token(COMPONENT_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_596()
+ inline bool jj_3R_624()
{
if (jj_done) return true;
- if (jj_scan_token(VARIABLE_T)) return true;
+ if (jj_scan_token(FILE_T)) return true;
return false;
}
- inline bool jj_3R_714()
+ inline bool jj_3R_546()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_scan_token(AFTER_T)) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_595()
+ inline bool jj_3R_623()
{
if (jj_done) return true;
- if (jj_scan_token(SIGNAL_T)) return true;
+ if (jj_scan_token(GROUP_T)) return true;
return false;
}
- inline bool jj_3R_594()
+ inline bool jj_3R_622()
{
if (jj_done) return true;
- if (jj_scan_token(CONSTANT_T)) return true;
+ if (jj_scan_token(UNITS_T)) return true;
return false;
}
- inline bool jj_3R_713()
+ inline bool jj_3R_621()
{
if (jj_done) return true;
- if (jj_3R_377()) return true;
+ if (jj_scan_token(LITERAL_T)) return true;
return false;
}
- inline bool jj_3R_593()
+ inline bool jj_3R_141()
{
if (jj_done) return true;
- if (jj_scan_token(SUBTYPE_T)) return true;
+ if (jj_scan_token(PROTECTED_T)) return true;
+ if (jj_scan_token(BODY_T)) return true;
+ if (jj_3R_703()) return true;
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(PROTECTED_T)) return true;
+ if (jj_scan_token(BODY_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_704()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_712()
+ inline bool jj_3R_620()
{
if (jj_done) return true;
- if (jj_3R_376()) return true;
+ if (jj_scan_token(LABEL_T)) return true;
return false;
}
- inline bool jj_3R_592()
+ inline bool jj_3R_519()
{
if (jj_done) return true;
- if (jj_scan_token(TYPE_T)) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_463()) return true;
return false;
}
- inline bool jj_3R_711()
+ inline bool jj_3R_619()
{
if (jj_done) return true;
- if (jj_3R_375()) return true;
+ if (jj_scan_token(COMPONENT_T)) return true;
return false;
}
- inline bool jj_3R_591()
+ inline bool jj_3R_618()
{
if (jj_done) return true;
- if (jj_scan_token(PACKAGE_T)) return true;
+ if (jj_scan_token(VARIABLE_T)) return true;
return false;
}
- inline bool jj_3R_710()
+ inline bool jj_3R_617()
{
if (jj_done) return true;
- if (jj_3R_373()) return true;
+ if (jj_scan_token(SIGNAL_T)) return true;
return false;
}
- inline bool jj_3R_590()
+ inline bool jj_3R_616()
{
if (jj_done) return true;
- if (jj_scan_token(FUNCTION_T)) return true;
+ if (jj_scan_token(CONSTANT_T)) return true;
return false;
}
- inline bool jj_3R_709()
+ inline bool jj_3R_615()
{
if (jj_done) return true;
- if (jj_3R_372()) return true;
+ if (jj_scan_token(SUBTYPE_T)) return true;
return false;
}
- inline bool jj_3R_589()
+ inline bool jj_3R_614()
{
if (jj_done) return true;
- if (jj_scan_token(PROCEDURE_T)) return true;
+ if (jj_scan_token(TYPE_T)) return true;
return false;
}
- inline bool jj_3R_708()
+ inline bool jj_3R_613()
{
if (jj_done) return true;
- if (jj_3R_371()) return true;
+ if (jj_scan_token(PACKAGE_T)) return true;
return false;
}
- inline bool jj_3R_588()
+ inline bool jj_3R_612()
{
if (jj_done) return true;
- if (jj_scan_token(CONFIGURATION_T)) return true;
+ if (jj_scan_token(FUNCTION_T)) return true;
return false;
}
- inline bool jj_3R_707()
+ inline bool jj_3R_611()
{
if (jj_done) return true;
- if (jj_3R_525()) return true;
+ if (jj_scan_token(PROCEDURE_T)) return true;
return false;
}
- inline bool jj_3R_587()
+ inline bool jj_3R_610()
{
if (jj_done) return true;
- if (jj_scan_token(ARCHITECTURE_T)) return true;
+ if (jj_scan_token(CONFIGURATION_T)) return true;
return false;
}
- inline bool jj_3R_706()
+ inline bool jj_3R_609()
{
if (jj_done) return true;
- if (jj_3R_92()) return true;
+ if (jj_scan_token(ARCHITECTURE_T)) return true;
return false;
}
- inline bool jj_3R_702()
+ inline bool jj_3R_463()
{
if (jj_done) return true;
+ if (jj_3R_60()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_706()) {
- jj_scanpos = xsp;
- if (jj_3R_707()) {
- jj_scanpos = xsp;
- if (jj_3R_708()) {
- jj_scanpos = xsp;
- if (jj_3R_709()) {
- jj_scanpos = xsp;
- if (jj_3R_710()) {
- jj_scanpos = xsp;
- if (jj_3R_711()) {
- jj_scanpos = xsp;
- if (jj_3R_712()) {
- jj_scanpos = xsp;
- if (jj_3R_713()) {
- jj_scanpos = xsp;
- if (jj_3R_714()) {
- jj_scanpos = xsp;
- if (jj_3R_715()) {
- jj_scanpos = xsp;
- if (jj_3R_716()) {
- jj_scanpos = xsp;
- if (jj_3_106()) {
- jj_scanpos = xsp;
- if (jj_3R_717()) return true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
+ if (jj_3R_546()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_586()
+ inline bool jj_3R_608()
{
if (jj_done) return true;
if (jj_scan_token(ENTITY_T)) return true;
return false;
}
- inline bool jj_3R_540()
+ inline bool jj_3R_557()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_586()) {
+ if (!jj_3R_608()) return false;
jj_scanpos = xsp;
- if (jj_3R_587()) {
+ if (!jj_3R_609()) return false;
jj_scanpos = xsp;
- if (jj_3R_588()) {
+ if (!jj_3R_610()) return false;
jj_scanpos = xsp;
- if (jj_3R_589()) {
+ if (!jj_3R_611()) return false;
jj_scanpos = xsp;
- if (jj_3R_590()) {
+ if (!jj_3R_612()) return false;
jj_scanpos = xsp;
- if (jj_3R_591()) {
+ if (!jj_3R_613()) return false;
jj_scanpos = xsp;
- if (jj_3R_592()) {
+ if (!jj_3R_614()) return false;
jj_scanpos = xsp;
- if (jj_3R_593()) {
+ if (!jj_3R_615()) return false;
jj_scanpos = xsp;
- if (jj_3R_594()) {
+ if (!jj_3R_616()) return false;
jj_scanpos = xsp;
- if (jj_3R_595()) {
+ if (!jj_3R_617()) return false;
jj_scanpos = xsp;
- if (jj_3R_596()) {
+ if (!jj_3R_618()) return false;
jj_scanpos = xsp;
- if (jj_3R_597()) {
+ if (!jj_3R_619()) return false;
jj_scanpos = xsp;
- if (jj_3R_598()) {
+ if (!jj_3R_620()) return false;
jj_scanpos = xsp;
- if (jj_3R_599()) {
+ if (!jj_3R_621()) return false;
jj_scanpos = xsp;
- if (jj_3R_600()) {
+ if (!jj_3R_622()) return false;
jj_scanpos = xsp;
- if (jj_3R_601()) {
+ if (!jj_3R_623()) return false;
jj_scanpos = xsp;
- if (jj_3R_602()) return true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
+ if (jj_3R_624()) return true;
return false;
}
- inline bool jj_3R_252()
+ inline bool jj_3R_586()
{
if (jj_done) return true;
- if (jj_3R_364()) return true;
+ if (jj_scan_token(OPEN_T)) return true;
return false;
}
- inline bool jj_3R_564()
+ inline bool jj_3R_585()
{
if (jj_done) return true;
- if (jj_scan_token(OPEN_T)) return true;
+ if (jj_scan_token(CONFIGURATION_T)) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_563()
+ inline bool jj_3R_422()
{
if (jj_done) return true;
- if (jj_scan_token(CONFIGURATION_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_scan_token(UNAFFECTED_T)) return true;
return false;
}
- inline bool jj_3R_562()
+ inline bool jj_3R_584()
{
if (jj_done) return true;
if (jj_scan_token(ENTITY_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_620()) jj_scanpos = xsp;
+ if (jj_3R_638()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_528()
+ inline bool jj_3R_524()
{
if (jj_done) return true;
- if (jj_scan_token(AFTER_T)) return true;
- if (jj_3R_58()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_584()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_585()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_586()) return true;
return false;
}
- inline bool jj_3R_506()
+ inline bool jj_3R_329()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_562()) {
- jj_scanpos = xsp;
- if (jj_3R_563()) {
+ if (!jj_3R_421()) return false;
jj_scanpos = xsp;
- if (jj_3R_564()) return true;
- }
- }
+ if (jj_3R_422()) return true;
return false;
}
- inline bool jj_3R_137()
+ inline bool jj_3R_421()
{
if (jj_done) return true;
- if (jj_scan_token(PROTECTED_T)) return true;
- if (jj_scan_token(BODY_T)) return true;
- if (jj_3R_680()) return true;
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(PROTECTED_T)) return true;
- if (jj_scan_token(BODY_T)) return true;
+ if (jj_3R_463()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_681()) jj_scanpos = xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_519()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_496()
+ inline bool jj_3R_257()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_445()) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3_31()
+ inline bool jj_3R_120()
{
if (jj_done) return true;
- if (jj_3R_85()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_257()) jj_scanpos = xsp;
+ if (jj_scan_token(WAIT_T)) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_258()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_259()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_260()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3_32()
+ {
+ if (jj_done) return true;
+ if (jj_3R_88()) return true;
if (jj_scan_token(ARROW_T)) return true;
return false;
}
- inline bool jj_3R_705()
+ inline bool jj_3R_730()
{
if (jj_done) return true;
- if (jj_3R_196()) return true;
+ if (jj_3R_202()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_87()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3_30()
+ inline bool jj_3_31()
{
if (jj_done) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_87()) return true;
return false;
}
- inline bool jj_3R_445()
+ inline bool jj_3R_748()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_528()) jj_scanpos = xsp;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_747()) return true;
return false;
}
- inline bool jj_3_29()
+ inline bool jj_3_30()
{
if (jj_done) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_86()) return true;
return false;
}
- inline bool jj_3R_359()
+ inline bool jj_3R_376()
{
if (jj_done) return true;
- if (jj_3R_85()) return true;
+ if (jj_3R_88()) return true;
if (jj_scan_token(ARROW_T)) return true;
return false;
}
- inline bool jj_3R_236()
+ inline bool jj_3R_244()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_359()) jj_scanpos = xsp;
- if (jj_3R_58()) return true;
+ if (jj_3R_376()) jj_scanpos = xsp;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_407()
+ inline bool jj_3R_166()
{
if (jj_done) return true;
- if (jj_scan_token(UNAFFECTED_T)) return true;
+ if (jj_3R_87()) return true;
return false;
}
- inline bool jj_3R_160()
+ inline bool jj_3R_165()
{
if (jj_done) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_86()) return true;
return false;
}
- inline bool jj_3R_318()
+ inline bool jj_3R_71()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_406()) {
+ if (!jj_3R_165()) return false;
jj_scanpos = xsp;
- if (jj_3R_407()) return true;
- }
+ if (jj_3R_166()) return true;
return false;
}
- inline bool jj_3R_406()
+ inline bool jj_3R_480()
{
if (jj_done) return true;
- if (jj_3R_445()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_496()) { jj_scanpos = xsp; break; }
- }
+ if (jj_scan_token(VARASSIGN_T)) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_159()
+ inline bool jj_3R_489()
{
if (jj_done) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_558()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_67()
+ inline bool jj_3R_391()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_159()) {
- jj_scanpos = xsp;
- if (jj_3R_160()) return true;
- }
+ if (jj_scan_token(101)) jj_scanpos = xsp;
+ if (jj_scan_token(VARIABLE_T)) return true;
+ if (jj_3R_202()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_87()) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_480()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_251()
+ inline bool jj_3R_490()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_439()) return true;
return false;
}
- inline bool jj_3R_471()
+ inline bool jj_3R_458()
{
if (jj_done) return true;
- if (jj_3R_541()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_545()) return true;
return false;
}
- inline bool jj_3R_117()
+ inline bool jj_3R_397()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_251()) jj_scanpos = xsp;
- if (jj_scan_token(WAIT_T)) return true;
- xsp = jj_scanpos;
- if (jj_3R_252()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_253()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_254()) jj_scanpos = xsp;
+ if (jj_scan_token(DISCONNECT_T)) return true;
+ if (jj_3R_489()) return true;
+ if (jj_scan_token(AFTER_T)) return true;
+ if (jj_3R_60()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_381()
+ inline bool jj_3_110()
{
if (jj_done) return true;
- if (jj_scan_token(DISCONNECT_T)) return true;
- if (jj_3R_471()) return true;
- if (jj_scan_token(AFTER_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_459()
+ inline bool jj_3R_164()
{
if (jj_done) return true;
- if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_scan_token(DOWNTO_T)) return true;
return false;
}
- inline bool jj_3R_239()
+ inline bool jj_3R_477()
{
if (jj_done) return true;
- if (jj_scan_token(DOWNTO_T)) return true;
+ if (jj_scan_token(VARASSIGN_T)) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_109()
+ inline bool jj_3R_378()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_238()) {
+ if (!jj_3R_457()) return false;
jj_scanpos = xsp;
- if (jj_3R_239()) return true;
- }
+ if (jj_3R_458()) return true;
return false;
}
- inline bool jj_3R_238()
+ inline bool jj_3R_457()
{
if (jj_done) return true;
- if (jj_scan_token(TO_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_110()) jj_scanpos = xsp;
+ if (jj_3R_117()) return true;
+ if (jj_scan_token(VARASSIGN_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_155()
+ inline bool jj_3R_163()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_154()) return true;
+ if (jj_scan_token(TO_T)) return true;
return false;
}
- inline bool jj_3R_569()
+ inline bool jj_3R_70()
{
if (jj_done) return true;
- if (jj_3R_310()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_163()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_164()) return true;
return false;
}
- inline bool jj_3R_568()
+ inline bool jj_3R_591()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_318()) return true;
return false;
}
- inline bool jj_3R_521()
+ inline bool jj_3R_590()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_568()) {
- jj_scanpos = xsp;
- if (jj_3R_569()) return true;
- }
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_462()
+ inline bool jj_3R_539()
{
if (jj_done) return true;
- if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_58()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_590()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_591()) return true;
return false;
}
- inline bool jj_3R_375()
+ inline bool jj_3R_347()
{
if (jj_done) return true;
+ if (jj_scan_token(USE_T)) return true;
+ if (jj_3R_439()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(101)) jj_scanpos = xsp;
- if (jj_scan_token(VARIABLE_T)) return true;
- if (jj_3R_196()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_84()) return true;
- xsp = jj_scanpos;
- if (jj_3R_462()) jj_scanpos = xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_490()) { jj_scanpos = xsp; break; }
+ }
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_559()
+ inline bool jj_3R_575()
{
if (jj_done) return true;
if (jj_scan_token(REJECT_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_473()
+ inline bool jj_3_105()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_472()) return true;
+ if (jj_3R_137()) return true;
return false;
}
- inline bool jj_3R_495()
+ inline bool jj_3R_518()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_559()) jj_scanpos = xsp;
+ if (jj_3R_575()) jj_scanpos = xsp;
if (jj_scan_token(INERTIAL_T)) return true;
return false;
}
- inline bool jj_3R_440()
- {
- if (jj_done) return true;
- if (jj_3R_527()) return true;
- return false;
- }
-
- inline bool jj_3R_405()
+ inline bool jj_3R_729()
{
if (jj_done) return true;
+ if (jj_scan_token(ARRAY_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_747()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_494()) {
- jj_scanpos = xsp;
- if (jj_3R_495()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_748()) { jj_scanpos = xsp; break; }
}
+ if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(OF_T)) return true;
+ if (jj_3R_87()) return true;
return false;
}
- inline bool jj_3R_494()
+ inline bool jj_3R_517()
{
if (jj_done) return true;
if (jj_scan_token(TRANSPORT_T)) return true;
return false;
}
- inline bool jj_3_104()
- {
- if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
- return false;
- }
-
- inline bool jj_3R_362()
+ inline bool jj_3R_420()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_439()) {
+ if (!jj_3R_517()) return false;
jj_scanpos = xsp;
- if (jj_3R_440()) return true;
- }
+ if (jj_3R_518()) return true;
return false;
}
- inline bool jj_3R_439()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_104()) jj_scanpos = xsp;
- if (jj_3R_114()) return true;
- if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(SEMI_T)) return true;
- return false;
- }
-
- inline bool jj_3_28()
- {
- if (jj_done) return true;
- if (jj_3R_82()) return true;
- return false;
- }
-
- inline bool jj_3_27()
+ inline bool jj_3R_159()
{
if (jj_done) return true;
- if (jj_3R_81()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_277()
+ inline bool jj_3_29()
{
if (jj_done) return true;
- if (jj_3R_82()) return true;
+ if (jj_3R_64()) return true;
return false;
}
- inline bool jj_3R_133()
+ inline bool jj_3R_190()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_276()) {
- jj_scanpos = xsp;
- if (jj_3R_277()) return true;
- }
+ if (jj_3R_137()) return true;
return false;
}
- inline bool jj_3R_276()
+ inline bool jj_3R_655()
{
if (jj_done) return true;
- if (jj_3R_81()) return true;
+ if (jj_3R_678()) return true;
return false;
}
- inline bool jj_3R_382()
+ inline bool jj_3_28()
{
if (jj_done) return true;
- if (jj_scan_token(USE_T)) return true;
- if (jj_3R_472()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_473()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_85()) return true;
return false;
}
- inline bool jj_3R_62()
+ inline bool jj_3R_186()
{
if (jj_done) return true;
- if (jj_scan_token(ARRAY_T)) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_154()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_155()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(RPAREN_T)) return true;
- if (jj_scan_token(OF_T)) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_348()) return true;
return false;
}
- inline bool jj_3R_704()
+ inline bool jj_3R_185()
{
if (jj_done) return true;
- if (jj_scan_token(ARRAY_T)) return true;
- if (jj_3R_82()) return true;
- if (jj_scan_token(OF_T)) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_347()) return true;
return false;
}
- inline bool jj_3R_157()
+ inline bool jj_3_109()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_141()) return true;
return false;
}
- inline bool jj_3R_637()
+ inline bool jj_3R_654()
{
if (jj_done) return true;
- if (jj_3R_658()) return true;
+ if (jj_3R_677()) return true;
return false;
}
- inline bool jj_3_103()
+ inline bool jj_3R_653()
{
if (jj_done) return true;
- if (jj_3R_137()) return true;
+ if (jj_3R_676()) return true;
return false;
}
- inline bool jj_3R_636()
+ inline bool jj_3R_184()
{
if (jj_done) return true;
- if (jj_3R_657()) return true;
+ if (jj_3R_346()) return true;
return false;
}
- inline bool jj_3R_373()
+ inline bool jj_3R_84()
{
if (jj_done) return true;
- if (jj_scan_token(CONSTANT_T)) return true;
- if (jj_3R_196()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_84()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_459()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (!jj_3R_184()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_185()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_186()) return true;
return false;
}
- inline bool jj_3R_635()
+ inline bool jj_3R_652()
{
if (jj_done) return true;
- if (jj_3R_656()) return true;
+ if (jj_3R_675()) return true;
return false;
}
- inline bool jj_3R_634()
+ inline bool jj_3R_283()
{
if (jj_done) return true;
- if (jj_3R_655()) return true;
+ if (jj_3R_64()) return true;
return false;
}
- inline bool jj_3R_633()
+ inline bool jj_3R_651()
{
if (jj_done) return true;
- if (jj_3R_654()) return true;
+ if (jj_3R_674()) return true;
return false;
}
- inline bool jj_3R_577()
+ inline bool jj_3R_598()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_633()) {
+ if (!jj_3R_651()) return false;
jj_scanpos = xsp;
- if (jj_3R_634()) {
+ if (!jj_3R_652()) return false;
jj_scanpos = xsp;
- if (jj_3R_635()) {
+ if (!jj_3R_653()) return false;
jj_scanpos = xsp;
- if (jj_3R_636()) {
+ if (!jj_3R_654()) return false;
jj_scanpos = xsp;
- if (jj_3_103()) {
+ if (!jj_3_109()) return false;
jj_scanpos = xsp;
- if (jj_3R_637()) return true;
- }
- }
- }
- }
- }
- return false;
- }
-
- inline bool jj_3_26()
- {
- if (jj_done) return true;
- if (jj_3R_80()) return true;
- return false;
- }
-
- inline bool jj_3R_380()
- {
- if (jj_done) return true;
- if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_177()) return true;
- if (jj_3R_332()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_655()) return true;
return false;
}
- inline bool jj_3_99()
+ inline bool jj_3R_137()
{
if (jj_done) return true;
- if (jj_3R_133()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_282()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_283()) return true;
return false;
}
- inline bool jj_3R_458()
+ inline bool jj_3R_282()
{
if (jj_done) return true;
- if (jj_3R_532()) return true;
+ if (jj_3R_85()) return true;
return false;
}
- inline bool jj_3R_567()
+ inline bool jj_3R_189()
{
if (jj_done) return true;
- if (jj_3R_333()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3_102()
+ inline bool jj_3R_476()
{
if (jj_done) return true;
- if (jj_3R_136()) return true;
+ if (jj_3R_549()) return true;
return false;
}
- inline bool jj_3R_371()
+ inline bool jj_3_27()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_102()) {
- jj_scanpos = xsp;
- if (jj_3R_458()) return true;
- }
+ if (jj_3R_84()) return true;
return false;
}
- inline bool jj_3R_566()
+ inline bool jj_3_108()
{
if (jj_done) return true;
- if (jj_3R_80()) return true;
+ if (jj_3R_140()) return true;
return false;
}
- inline bool jj_3R_508()
+ inline bool jj_3R_387()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_566()) {
+ if (!jj_3_108()) return false;
jj_scanpos = xsp;
- if (jj_3R_567()) return true;
- }
+ if (jj_3R_476()) return true;
return false;
}
- inline bool jj_3R_105()
+ inline bool jj_3R_109()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_101()
+ inline bool jj_3_107()
{
if (jj_done) return true;
- if (jj_3R_134()) return true;
- if (jj_3R_135()) return true;
+ if (jj_3R_138()) return true;
+ if (jj_3R_139()) return true;
return false;
}
- inline bool jj_3R_184()
+ inline bool jj_3R_728()
{
if (jj_done) return true;
- if (jj_3R_133()) return true;
+ if (jj_scan_token(ARRAY_T)) return true;
+ if (jj_3R_64()) return true;
+ if (jj_scan_token(OF_T)) return true;
+ if (jj_3R_87()) return true;
return false;
}
- inline bool jj_3R_366()
+ inline bool jj_3R_382()
{
if (jj_done) return true;
if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_129()
+ inline bool jj_3R_132()
{
if (jj_done) return true;
- if (jj_3R_135()) return true;
+ if (jj_3R_139()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3_101()) { jj_scanpos = xsp; break; }
+ if (jj_3_107()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_247()
+ inline bool jj_3R_389()
{
if (jj_done) return true;
- if (jj_3R_108()) return true;
+ if (jj_scan_token(CONSTANT_T)) return true;
+ if (jj_3R_202()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_87()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_477()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_114()
+ inline bool jj_3R_253()
+ {
+ if (jj_done) return true;
+ if (jj_3R_112()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_117()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_246()) {
+ if (!jj_3R_252()) return false;
jj_scanpos = xsp;
- if (jj_3R_247()) return true;
- }
+ if (jj_3R_253()) return true;
return false;
}
- inline bool jj_3_100()
+ inline bool jj_3_106()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_246()
+ inline bool jj_3R_252()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3_98()
+ inline bool jj_3_26()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_83()) return true;
return false;
}
- inline bool jj_3R_218()
+ inline bool jj_3R_396()
{
if (jj_done) return true;
- if (jj_scan_token(ALL_T)) return true;
+ if (jj_scan_token(FOR_T)) return true;
+ if (jj_3R_181()) return true;
+ if (jj_3R_344()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3_25()
+ inline bool jj_3R_225()
{
if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_79()) return true;
- if (jj_scan_token(ELSE_T)) return true;
+ if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_350()
+ inline bool jj_3R_224()
{
if (jj_done) return true;
- if (jj_scan_token(CONFIGURATION_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_318()) return true;
return false;
}
- inline bool jj_3R_217()
+ inline bool jj_3R_223()
{
if (jj_done) return true;
- if (jj_3R_310()) return true;
+ if (jj_3R_369()) return true;
return false;
}
- inline bool jj_3R_216()
+ inline bool jj_3R_589()
{
if (jj_done) return true;
- if (jj_3R_352()) return true;
+ if (jj_3R_345()) return true;
return false;
}
- inline bool jj_3R_215()
+ inline bool jj_3R_222()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_99()
+ inline bool jj_3R_103()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_215()) {
+ if (!jj_3R_222()) return false;
jj_scanpos = xsp;
- if (jj_3R_216()) {
+ if (!jj_3R_223()) return false;
jj_scanpos = xsp;
- if (jj_3R_217()) {
+ if (!jj_3R_224()) return false;
jj_scanpos = xsp;
- if (jj_3R_218()) return true;
- }
- }
- }
+ if (jj_3R_225()) return true;
return false;
}
- inline bool jj_3R_320()
+ inline bool jj_3R_588()
{
if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_79()) return true;
+ if (jj_3R_83()) return true;
return false;
}
- inline bool jj_3R_183()
+ inline bool jj_3R_526()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_588()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_589()) return true;
return false;
}
- inline bool jj_3R_319()
+ inline bool jj_3_104()
{
if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_79()) return true;
- if (jj_scan_token(ELSE_T)) return true;
- if (jj_3R_318()) return true;
+ if (jj_3R_136()) return true;
return false;
}
- inline bool jj_3R_84()
+ inline bool jj_3R_87()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_183()) jj_scanpos = xsp;
+ if (jj_3_104()) jj_scanpos = xsp;
+ if (jj_3R_189()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_189()) { jj_scanpos = xsp; break; }
+ }
xsp = jj_scanpos;
- if (jj_3R_184()) jj_scanpos = xsp;
+ if (jj_3R_190()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_167()
+ inline bool jj_3R_136()
{
if (jj_done) return true;
- if (jj_3R_318()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_319()) { jj_scanpos = xsp; break; }
- }
- xsp = jj_scanpos;
- if (jj_3R_320()) jj_scanpos = xsp;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_71()
+ inline bool jj_3_25()
{
if (jj_done) return true;
- if (jj_3R_114()) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
- if (jj_3R_166()) return true;
- if (jj_3R_167()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_82()) return true;
+ if (jj_scan_token(ELSE_T)) return true;
return false;
}
- inline bool jj_3R_372()
+ inline bool jj_3R_388()
{
if (jj_done) return true;
if (jj_scan_token(SUBTYPE_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(IS_T)) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_87()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_631()
+ inline bool jj_3R_649()
{
if (jj_done) return true;
- if (jj_3R_112()) return true;
+ if (jj_3R_115()) return true;
return false;
}
- inline bool jj_3R_572()
+ inline bool jj_3R_594()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_631()) { jj_scanpos = xsp; break; }
+ if (jj_3R_649()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_365()
+ inline bool jj_3R_366()
{
if (jj_done) return true;
- if (jj_scan_token(UNTIL_T)) return true;
- if (jj_3R_79()) return true;
+ if (jj_scan_token(CONFIGURATION_T)) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_79()
+ inline bool jj_3R_331()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_82()) return true;
return false;
}
- inline bool jj_3R_524()
+ inline bool jj_3R_330()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_570()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_82()) return true;
+ if (jj_scan_token(ELSE_T)) return true;
+ if (jj_3R_329()) return true;
return false;
}
- inline bool jj_3R_522()
+ inline bool jj_3R_542()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_313()) return true;
+ if (jj_3R_592()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_97()
- {
- if (jj_done) return true;
- if (jj_3R_132()) return true;
- return false;
- }
-
- inline bool jj_3_24()
- {
- if (jj_done) return true;
- if (jj_3R_78()) return true;
- return false;
- }
-
- inline bool jj_3_96()
+ inline bool jj_3R_171()
{
if (jj_done) return true;
- if (jj_3R_131()) return true;
+ if (jj_3R_329()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_330()) { jj_scanpos = xsp; break; }
+ }
+ xsp = jj_scanpos;
+ if (jj_3R_331()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_23()
+ inline bool jj_3R_74()
{
if (jj_done) return true;
- if (jj_3R_77()) return true;
+ if (jj_3R_117()) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
+ if (jj_3R_170()) return true;
+ if (jj_3R_171()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_523()
+ inline bool jj_3R_541()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_scan_token(84)) {
+ if (!jj_scan_token(84)) return false;
jj_scanpos = xsp;
if (jj_scan_token(52)) return true;
- }
return false;
}
- inline bool jj_3_22()
- {
- if (jj_done) return true;
- if (jj_3R_76()) return true;
- return false;
- }
-
- inline bool jj_3R_75()
+ inline bool jj_3_103()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_135()) return true;
return false;
}
- inline bool jj_3R_433()
+ inline bool jj_3R_451()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_523()) jj_scanpos = xsp;
+ if (jj_3R_541()) jj_scanpos = xsp;
if (jj_scan_token(FUNCTION_T)) return true;
- if (jj_3R_521()) return true;
+ if (jj_3R_539()) return true;
xsp = jj_scanpos;
- if (jj_3R_524()) jj_scanpos = xsp;
+ if (jj_3R_542()) jj_scanpos = xsp;
if (jj_scan_token(RETURN_T)) return true;
- if (jj_3R_157()) return true;
+ if (jj_3R_159()) return true;
return false;
}
- inline bool jj_3_21()
+ inline bool jj_3R_381()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_75()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(79)) jj_scanpos = xsp;
- if (jj_scan_token(ASSERT_T)) return true;
+ if (jj_scan_token(UNTIL_T)) return true;
+ if (jj_3R_82()) return true;
return false;
}
- inline bool jj_3R_504()
+ inline bool jj_3_102()
{
if (jj_done) return true;
- if (jj_3R_78()) return true;
+ if (jj_3R_134()) return true;
return false;
}
- inline bool jj_3R_503()
+ inline bool jj_3R_540()
{
if (jj_done) return true;
- if (jj_3R_77()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_324()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_20()
+ inline bool jj_3R_82()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_73()
+ inline bool jj_3_24()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_81()) return true;
return false;
}
- inline bool jj_3R_502()
+ inline bool jj_3_23()
{
if (jj_done) return true;
- if (jj_3R_76()) return true;
+ if (jj_3R_80()) return true;
return false;
}
- inline bool jj_3_19()
+ inline bool jj_3_22()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_73()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(79)) jj_scanpos = xsp;
- if (jj_scan_token(PROCESS_T)) return true;
+ if (jj_3R_79()) return true;
return false;
}
- inline bool jj_3R_72()
+ inline bool jj_3R_363()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_450()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_451()) return true;
return false;
}
- inline bool jj_3R_501()
+ inline bool jj_3R_450()
{
if (jj_done) return true;
- if (jj_3R_87()) return true;
+ if (jj_scan_token(PROCEDURE_T)) return true;
+ if (jj_3R_539()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_540()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3_102()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3_103()) jj_scanpos = xsp;
+ if (jj_3R_442()) return true;
return false;
}
- inline bool jj_3_18()
+ inline bool jj_3R_78()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_72()) jj_scanpos = xsp;
- if (jj_scan_token(BLOCK_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_500()
+ inline bool jj_3_21()
{
if (jj_done) return true;
- if (jj_3R_561()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_78()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(79)) jj_scanpos = xsp;
+ if (jj_scan_token(ASSERT_T)) return true;
return false;
}
- inline bool jj_3R_347()
+ inline bool jj_3R_583()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_432()) {
- jj_scanpos = xsp;
- if (jj_3R_433()) return true;
- }
+ if (jj_3R_81()) return true;
return false;
}
- inline bool jj_3R_432()
+ inline bool jj_3R_650()
{
if (jj_done) return true;
- if (jj_scan_token(PROCEDURE_T)) return true;
- if (jj_3R_521()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_522()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3_96()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3_97()) jj_scanpos = xsp;
- if (jj_3R_424()) return true;
+ if (!jj_scan_token(46)) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(80)) return true;
return false;
}
- inline bool jj_3R_499()
+ inline bool jj_3R_582()
{
if (jj_done) return true;
- if (jj_3R_74()) return true;
+ if (jj_3R_80()) return true;
return false;
}
- inline bool jj_3R_498()
+ inline bool jj_3_20()
{
if (jj_done) return true;
- if (jj_3R_88()) return true;
+ if (jj_3R_77()) return true;
return false;
}
- inline bool jj_3R_632()
+ inline bool jj_3R_648()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(46)) {
- jj_scanpos = xsp;
- if (jj_scan_token(80)) return true;
- }
+ if (jj_3R_673()) return true;
return false;
}
- inline bool jj_3R_410()
+ inline bool jj_3R_581()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_497()) {
- jj_scanpos = xsp;
- if (jj_3R_498()) {
- jj_scanpos = xsp;
- if (jj_3R_499()) {
- jj_scanpos = xsp;
- if (jj_3R_500()) {
- jj_scanpos = xsp;
- if (jj_3R_501()) {
- jj_scanpos = xsp;
- if (jj_3R_502()) {
- jj_scanpos = xsp;
- if (jj_3R_503()) {
- jj_scanpos = xsp;
- if (jj_3R_504()) {
- jj_scanpos = xsp;
- if (jj_scan_token(189)) return true;
- }
- }
- }
- }
- }
- }
- }
- }
+ if (jj_3R_79()) return true;
return false;
}
- inline bool jj_3R_497()
+ inline bool jj_3R_76()
{
if (jj_done) return true;
- if (jj_3R_560()) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_630()
+ inline bool jj_3R_593()
{
if (jj_done) return true;
- if (jj_3R_653()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_648()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3_17()
+ inline bool jj_3_19()
{
if (jj_done) return true;
- if (jj_3R_71()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_76()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(79)) jj_scanpos = xsp;
+ if (jj_scan_token(PROCESS_T)) return true;
return false;
}
- inline bool jj_3R_571()
+ inline bool jj_3R_580()
{
if (jj_done) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_630()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_90()) return true;
return false;
}
- inline bool jj_3_94()
+ inline bool jj_3R_75()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_675()
+ inline bool jj_3_18()
{
if (jj_done) return true;
- if (jj_3R_383()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_75()) jj_scanpos = xsp;
+ if (jj_scan_token(BLOCK_T)) return true;
return false;
}
- inline bool jj_3R_172()
+ inline bool jj_3R_579()
{
if (jj_done) return true;
- if (jj_3R_325()) return true;
+ if (jj_3R_637()) return true;
return false;
}
- inline bool jj_3R_674()
+ inline bool jj_3_100()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ if (jj_3R_66()) return true;
return false;
}
- inline bool jj_3R_171()
+ inline bool jj_3R_698()
{
if (jj_done) return true;
- if (jj_3R_71()) return true;
+ if (jj_3R_398()) return true;
return false;
}
- inline bool jj_3_16()
+ inline bool jj_3R_578()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_77()) return true;
return false;
}
- inline bool jj_3_95()
+ inline bool jj_3R_697()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_347()) return true;
return false;
}
- inline bool jj_3R_673()
+ inline bool jj_3_101()
{
if (jj_done) return true;
- if (jj_3R_379()) return true;
+ if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3R_76()
+ inline bool jj_3R_696()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_16()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(79)) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_171()) {
- jj_scanpos = xsp;
- if (jj_3R_172()) return true;
- }
+ if (jj_3R_395()) return true;
return false;
}
- inline bool jj_3_15()
+ inline bool jj_3R_577()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_91()) return true;
return false;
}
- inline bool jj_3R_672()
+ inline bool jj_3R_576()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_636()) return true;
return false;
}
- inline bool jj_3R_671()
+ inline bool jj_3R_521()
{
if (jj_done) return true;
- if (jj_3R_377()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_576()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_577()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_578()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_579()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_580()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_581()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_582()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_583()) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(189)) return true;
return false;
}
- inline bool jj_3R_670()
+ inline bool jj_3R_695()
{
if (jj_done) return true;
- if (jj_3R_376()) return true;
+ if (jj_3R_66()) return true;
return false;
}
- inline bool jj_3R_669()
+ inline bool jj_3R_694()
{
if (jj_done) return true;
- if (jj_3R_375()) return true;
+ if (jj_3R_393()) return true;
return false;
}
- inline bool jj_3R_574()
+ inline bool jj_3_17()
{
if (jj_done) return true;
- if (jj_3R_521()) return true;
+ if (jj_3R_74()) return true;
return false;
}
- inline bool jj_3R_78()
+ inline bool jj_3R_693()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_15()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(79)) jj_scanpos = xsp;
- if (jj_3R_176()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_392()) return true;
return false;
}
- inline bool jj_3R_668()
+ inline bool jj_3R_692()
{
if (jj_done) return true;
- if (jj_3R_373()) return true;
+ if (jj_3R_391()) return true;
return false;
}
- inline bool jj_3R_667()
+ inline bool jj_3R_596()
{
if (jj_done) return true;
- if (jj_3R_372()) return true;
+ if (jj_3R_539()) return true;
return false;
}
- inline bool jj_3R_666()
+ inline bool jj_3R_691()
{
if (jj_done) return true;
- if (jj_3R_525()) return true;
+ if (jj_3R_389()) return true;
return false;
}
- inline bool jj_3_14()
+ inline bool jj_3R_690()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_388()) return true;
return false;
}
- inline bool jj_3_13()
+ inline bool jj_3R_689()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
+ if (jj_3R_543()) return true;
return false;
}
- inline bool jj_3R_665()
+ inline bool jj_3R_176()
{
if (jj_done) return true;
- if (jj_3R_371()) return true;
+ if (jj_3R_337()) return true;
return false;
}
- inline bool jj_3R_87()
+ inline bool jj_3R_688()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_14()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(79)) jj_scanpos = xsp;
- if (jj_3R_187()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_387()) return true;
return false;
}
- inline bool jj_3R_664()
+ inline bool jj_3R_687()
{
if (jj_done) return true;
- if (jj_3R_92()) return true;
+ if (jj_3R_96()) return true;
return false;
}
- inline bool jj_3R_653()
+ inline bool jj_3R_673()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_664()) {
+ if (!jj_3R_687()) return false;
jj_scanpos = xsp;
- if (jj_3R_665()) {
+ if (!jj_3R_688()) return false;
jj_scanpos = xsp;
- if (jj_3R_666()) {
+ if (!jj_3R_689()) return false;
jj_scanpos = xsp;
- if (jj_3R_667()) {
+ if (!jj_3R_690()) return false;
jj_scanpos = xsp;
- if (jj_3R_668()) {
+ if (!jj_3R_691()) return false;
jj_scanpos = xsp;
- if (jj_3R_669()) {
+ if (!jj_3R_692()) return false;
jj_scanpos = xsp;
- if (jj_3R_670()) {
+ if (!jj_3R_693()) return false;
jj_scanpos = xsp;
- if (jj_3R_671()) {
+ if (!jj_3R_694()) return false;
jj_scanpos = xsp;
- if (jj_3R_672()) {
+ if (!jj_3R_695()) return false;
jj_scanpos = xsp;
- if (jj_3R_673()) {
+ if (!jj_3R_696()) return false;
jj_scanpos = xsp;
- if (jj_3R_674()) {
+ if (!jj_3R_697()) return false;
jj_scanpos = xsp;
- if (jj_3_95()) {
+ if (!jj_3_101()) return false;
jj_scanpos = xsp;
- if (jj_3R_675()) return true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
+ if (jj_3R_698()) return true;
return false;
}
- inline bool jj_3R_679()
+ inline bool jj_3R_175()
{
if (jj_done) return true;
- if (jj_3R_691()) return true;
+ if (jj_3R_74()) return true;
return false;
}
- inline bool jj_3R_678()
+ inline bool jj_3_16()
{
if (jj_done) return true;
- if (jj_3R_690()) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_655()
+ inline bool jj_3R_79()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_678()) {
+ if (jj_3_16()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(79)) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_175()) return false;
jj_scanpos = xsp;
- if (jj_3R_679()) return true;
- }
+ if (jj_3R_176()) return true;
return false;
}
- inline bool jj_3R_461()
+ inline bool jj_3R_479()
{
if (jj_done) return true;
if (jj_scan_token(VARASSIGN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_175()
+ inline bool jj_3_99()
{
if (jj_done) return true;
- if (jj_3R_329()) return true;
+ if (jj_3R_133()) return true;
return false;
}
- inline bool jj_3R_174()
+ inline bool jj_3R_364()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_452()) return false;
+ jj_scanpos = xsp;
+ if (jj_scan_token(137)) return true;
return false;
}
- inline bool jj_3_93()
+ inline bool jj_3R_452()
{
if (jj_done) return true;
- if (jj_3R_130()) return true;
+ if (jj_3R_543()) return true;
return false;
}
- inline bool jj_3R_348()
+ inline bool jj_3_15()
+ {
+ if (jj_done) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_81()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_434()) {
- jj_scanpos = xsp;
- if (jj_scan_token(137)) return true;
- }
+ if (jj_3_15()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(79)) jj_scanpos = xsp;
+ if (jj_3R_180()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_434()
+ inline bool jj_3_14()
{
if (jj_done) return true;
- if (jj_3R_525()) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_469()
+ inline bool jj_3_13()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_72()) return true;
return false;
}
- inline bool jj_3R_177()
+ inline bool jj_3R_206()
{
if (jj_done) return true;
- if (jj_3R_331()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_363()) return true;
+ if (jj_3R_364()) return true;
return false;
}
- inline bool jj_3R_200()
+ inline bool jj_3R_90()
{
if (jj_done) return true;
- if (jj_3R_347()) return true;
- if (jj_3R_348()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_14()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(79)) jj_scanpos = xsp;
+ if (jj_3R_193()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_573()
+ inline bool jj_3R_595()
{
if (jj_done) return true;
- if (jj_3R_632()) return true;
+ if (jj_3R_650()) return true;
return false;
}
- inline bool jj_3R_199()
+ inline bool jj_3R_205()
{
if (jj_done) return true;
- if (jj_3R_130()) return true;
+ if (jj_3R_133()) return true;
return false;
}
- inline bool jj_3R_92()
+ inline bool jj_3R_96()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_199()) {
+ if (!jj_3R_205()) return false;
jj_scanpos = xsp;
- if (jj_3R_200()) return true;
- }
+ if (jj_3R_206()) return true;
return false;
}
- inline bool jj_3_92()
+ inline bool jj_3_98()
{
if (jj_done) return true;
- if (jj_3R_128()) return true;
- if (jj_3R_129()) return true;
+ if (jj_3R_131()) return true;
+ if (jj_3R_132()) return true;
return false;
}
- inline bool jj_3R_460()
+ inline bool jj_3R_702()
{
if (jj_done) return true;
- if (jj_3R_533()) return true;
+ if (jj_3R_715()) return true;
return false;
}
- inline bool jj_3R_162()
+ inline bool jj_3R_701()
{
if (jj_done) return true;
- if (jj_3R_128()) return true;
- if (jj_3R_129()) return true;
+ if (jj_3R_714()) return true;
return false;
}
- inline bool jj_3R_77()
+ inline bool jj_3R_675()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_173()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_174()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_175()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (!jj_3R_701()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_702()) return true;
return false;
}
- inline bool jj_3R_468()
+ inline bool jj_3R_179()
{
if (jj_done) return true;
- if (jj_3R_538()) return true;
+ if (jj_3R_341()) return true;
return false;
}
- inline bool jj_3R_467()
+ inline bool jj_3R_178()
{
if (jj_done) return true;
- if (jj_3R_66()) return true;
+ if (jj_3R_72()) return true;
return false;
}
- inline bool jj_3R_179()
+ inline bool jj_3R_487()
{
if (jj_done) return true;
- if (jj_3R_333()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_178()
+ inline bool jj_3R_181()
{
if (jj_done) return true;
- if (jj_3R_332()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_343()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_525()
+ inline bool jj_3R_478()
{
if (jj_done) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_3R_571()) return true;
- if (jj_scan_token(BEGIN_T)) return true;
- if (jj_3R_572()) return true;
- if (jj_scan_token(END_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_573()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_574()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_550()) return true;
return false;
}
- inline bool jj_3R_186()
+ inline bool jj_3R_162()
{
if (jj_done) return true;
- if (jj_scan_token(BAR_T)) return true;
- if (jj_3R_185()) return true;
+ if (jj_3R_131()) return true;
+ if (jj_3R_132()) return true;
return false;
}
- inline bool jj_3R_378()
+ inline bool jj_3R_543()
{
if (jj_done) return true;
- if (jj_scan_token(COMPONENT_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_3R_593()) return true;
+ if (jj_scan_token(BEGIN_T)) return true;
+ if (jj_3R_594()) return true;
+ if (jj_scan_token(END_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_scan_token(56)) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_467()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_468()) jj_scanpos = xsp;
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(COMPONENT_T)) return true;
+ if (jj_3R_595()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_469()) jj_scanpos = xsp;
+ if (jj_3R_596()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
@@ -5690,95 +5461,129 @@ void parseInline();
inline bool jj_3R_80()
{
if (jj_done) return true;
- if (jj_scan_token(FOR_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
if (jj_3R_177()) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_3R_178()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_3R_179()) jj_scanpos = xsp;
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(FOR_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_356()
+ inline bool jj_3R_373()
{
if (jj_done) return true;
if (jj_scan_token(STRINGLITERAL)) return true;
return false;
}
- inline bool jj_3_12()
+ inline bool jj_3R_486()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_555()) return true;
return false;
}
- inline bool jj_3_11()
+ inline bool jj_3R_485()
{
if (jj_done) return true;
if (jj_3R_68()) return true;
return false;
}
- inline bool jj_3R_85()
+ inline bool jj_3R_183()
{
if (jj_done) return true;
- if (jj_3R_185()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_186()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_345()) return true;
return false;
}
- inline bool jj_3R_435()
+ inline bool jj_3R_182()
+ {
+ if (jj_done) return true;
+ if (jj_3R_344()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_453()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3_10()
+ inline bool jj_3R_192()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_scan_token(BAR_T)) return true;
+ if (jj_3R_191()) return true;
return false;
}
- inline bool jj_3R_337()
+ inline bool jj_3R_394()
{
if (jj_done) return true;
- if (jj_scan_token(OTHER_T)) return true;
+ if (jj_scan_token(COMPONENT_T)) return true;
+ if (jj_3R_73()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(56)) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_485()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_486()) jj_scanpos = xsp;
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(COMPONENT_T)) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_487()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_667()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
inline bool jj_3R_161()
{
if (jj_done) return true;
- if (jj_3R_314()) return true;
+ if (jj_3R_325()) return true;
return false;
}
- inline bool jj_3R_336()
+ inline bool jj_3R_83()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_scan_token(FOR_T)) return true;
+ if (jj_3R_181()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_182()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_183()) jj_scanpos = xsp;
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(FOR_T)) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_68()
+ inline bool jj_3R_69()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
if (jj_3R_161()) jj_scanpos = xsp;
- if (jj_3R_129()) return true;
+ if (jj_3R_132()) return true;
while (true) {
xsp = jj_scanpos;
if (jj_3R_162()) { jj_scanpos = xsp; break; }
@@ -5786,2517 +5591,2566 @@ void parseInline();
return false;
}
- inline bool jj_3R_335()
- {
- if (jj_done) return true;
- if (jj_3R_68()) return true;
- return false;
- }
-
- inline bool jj_3R_358()
+ inline bool jj_3R_375()
{
if (jj_done) return true;
if (jj_scan_token(RETURN_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_639()
+ inline bool jj_3R_658()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_59()) return true;
- return false;
- }
-
- inline bool jj_3R_628()
- {
- if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_185()
+ inline bool jj_3R_374()
{
if (jj_done) return true;
+ if (jj_3R_62()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_334()) {
- jj_scanpos = xsp;
- if (jj_3R_335()) {
- jj_scanpos = xsp;
- if (jj_3R_336()) {
- jj_scanpos = xsp;
- if (jj_3R_337()) return true;
- }
- }
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_453()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_334()
+ inline bool jj_3_12()
{
if (jj_done) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_71()) return true;
return false;
}
- inline bool jj_3R_357()
+ inline bool jj_3R_88()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_191()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_435()) { jj_scanpos = xsp; break; }
+ if (jj_3R_192()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_234()
+ inline bool jj_3_11()
+ {
+ if (jj_done) return true;
+ if (jj_3R_69()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_242()
{
if (jj_done) return true;
if (jj_scan_token(LBRACKET_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_357()) jj_scanpos = xsp;
+ if (jj_3R_374()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_358()) jj_scanpos = xsp;
+ if (jj_3R_375()) jj_scanpos = xsp;
if (jj_scan_token(RBRACKET_T)) return true;
return false;
}
- inline bool jj_3R_352()
+ inline bool jj_3R_353()
{
if (jj_done) return true;
- if (jj_scan_token(CHARACTER_LITERAL)) return true;
+ if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_614()
+ inline bool jj_3R_627()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(ALL_T)) return true;
return false;
}
- inline bool jj_3R_605()
+ inline bool jj_3_10()
{
if (jj_done) return true;
- if (jj_scan_token(ALL_T)) return true;
+ if (jj_3R_69()) return true;
+ if (jj_3R_70()) return true;
return false;
}
- inline bool jj_3R_604()
+ inline bool jj_3R_626()
{
if (jj_done) return true;
if (jj_scan_token(OTHER_T)) return true;
return false;
}
- inline bool jj_3R_603()
+ inline bool jj_3R_352()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_73()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_625()
+ {
+ if (jj_done) return true;
+ if (jj_3R_62()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_639()) { jj_scanpos = xsp; break; }
+ if (jj_3R_658()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_541()
+ inline bool jj_3R_558()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_603()) {
+ if (!jj_3R_625()) return false;
jj_scanpos = xsp;
- if (jj_3R_604()) {
+ if (!jj_3R_626()) return false;
jj_scanpos = xsp;
- if (jj_3R_605()) return true;
- }
- }
+ if (jj_3R_627()) return true;
return false;
}
- inline bool jj_3R_579()
+ inline bool jj_3R_351()
+ {
+ if (jj_done) return true;
+ if (jj_3R_71()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_600()
{
if (jj_done) return true;
if (jj_scan_token(BUS_T)) return true;
return false;
}
- inline bool jj_3R_578()
+ inline bool jj_3R_350()
+ {
+ if (jj_done) return true;
+ if (jj_3R_69()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_599()
{
if (jj_done) return true;
if (jj_scan_token(REGISTER_T)) return true;
return false;
}
- inline bool jj_3R_533()
+ inline bool jj_3R_550()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_578()) {
+ if (!jj_3R_599()) return false;
jj_scanpos = xsp;
- if (jj_3R_579()) return true;
- }
+ if (jj_3R_600()) return true;
return false;
}
- inline bool jj_3R_626()
+ inline bool jj_3R_191()
{
if (jj_done) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_85()) return true;
- if (jj_scan_token(ARROW_T)) return true;
- if (jj_3R_259()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_349()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_350()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_351()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_352()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_353()) return true;
return false;
}
- inline bool jj_3R_618()
+ inline bool jj_3R_349()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_86()) return true;
return false;
}
- inline bool jj_3R_627()
+ inline bool jj_3R_646()
{
if (jj_done) return true;
- if (jj_3R_626()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_660()
+ inline bool jj_3R_369()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_scan_token(CHARACTER_LITERAL)) return true;
return false;
}
- inline bool jj_3R_374()
+ inline bool jj_3R_390()
{
if (jj_done) return true;
if (jj_scan_token(SIGNAL_T)) return true;
- if (jj_3R_196()) return true;
+ if (jj_3R_202()) return true;
if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_87()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_460()) jj_scanpos = xsp;
+ if (jj_3R_478()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_461()) jj_scanpos = xsp;
+ if (jj_3R_479()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_256()
+ inline bool jj_3R_644()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_88()) return true;
+ if (jj_scan_token(ARROW_T)) return true;
+ if (jj_3R_265()) return true;
return false;
}
- inline bool jj_3_91()
+ inline bool jj_3R_671()
{
if (jj_done) return true;
- if (jj_3R_127()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_121()
+ inline bool jj_3_97()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_256()) jj_scanpos = xsp;
- if (jj_scan_token(CASE_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_3R_626()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_627()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(CASE_T)) return true;
- xsp = jj_scanpos;
- if (jj_3R_628()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_130()) return true;
return false;
}
- inline bool jj_3R_651()
+ inline bool jj_3R_645()
{
if (jj_done) return true;
- if (jj_3R_410()) return true;
+ if (jj_3R_644()) return true;
return false;
}
- inline bool jj_3_90()
+ inline bool jj_3R_709()
{
if (jj_done) return true;
- if (jj_3R_126()) return true;
+ if (jj_3R_72()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_617()
+ inline bool jj_3_96()
{
if (jj_done) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_651()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_129()) return true;
return false;
}
- inline bool jj_3R_526()
+ inline bool jj_3R_544()
{
if (jj_done) return true;
- if (jj_3R_405()) return true;
+ if (jj_3R_420()) return true;
return false;
}
- inline bool jj_3_89()
+ inline bool jj_3_95()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_438()
+ inline bool jj_3R_456()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3_89()) jj_scanpos = xsp;
- if (jj_3R_114()) return true;
+ if (jj_3_95()) jj_scanpos = xsp;
+ if (jj_3R_117()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_526()) jj_scanpos = xsp;
- if (jj_3R_318()) return true;
+ if (jj_3R_544()) jj_scanpos = xsp;
+ if (jj_3R_329()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_437()
+ inline bool jj_3R_455()
{
if (jj_done) return true;
- if (jj_3R_127()) return true;
+ if (jj_3R_130()) return true;
return false;
}
- inline bool jj_3R_387()
+ inline bool jj_3R_402()
{
if (jj_done) return true;
- if (jj_3R_477()) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_494()) return true;
+ if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_661()
+ inline bool jj_3R_377()
{
if (jj_done) return true;
- if (jj_3R_329()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_454()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_455()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_456()) return true;
return false;
}
- inline bool jj_3R_361()
+ inline bool jj_3R_454()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_436()) {
- jj_scanpos = xsp;
- if (jj_3R_437()) {
- jj_scanpos = xsp;
- if (jj_3R_438()) return true;
- }
- }
+ if (jj_3R_129()) return true;
return false;
}
- inline bool jj_3R_436()
+ inline bool jj_3R_262()
{
if (jj_done) return true;
- if (jj_3R_126()) return true;
+ if (jj_3R_73()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(155)) jj_scanpos = xsp;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_507()
+ inline bool jj_3R_417()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_565()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(MINUS_T)) return true;
return false;
}
- inline bool jj_3R_560()
+ inline bool jj_3R_124()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_scan_token(BLOCK_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_614()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(56)) jj_scanpos = xsp;
- if (jj_3R_615()) return true;
- if (jj_3R_616()) return true;
- if (jj_scan_token(BEGIN_T)) return true;
- if (jj_3R_617()) return true;
+ if (jj_3R_262()) jj_scanpos = xsp;
+ if (jj_scan_token(CASE_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_3R_644()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_645()) { jj_scanpos = xsp; break; }
+ }
if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(BLOCK_T)) return true;
+ if (jj_scan_token(CASE_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_618()) jj_scanpos = xsp;
+ if (jj_3R_646()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_402()
- {
- if (jj_done) return true;
- if (jj_scan_token(MINUS_T)) return true;
- return false;
- }
-
- inline bool jj_3_9()
+ inline bool jj_3R_684()
{
if (jj_done) return true;
- if (jj_3R_66()) return true;
+ if (jj_3R_521()) return true;
return false;
}
- inline bool jj_3R_314()
+ inline bool jj_3R_325()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_401()) {
+ if (!jj_3R_416()) return false;
jj_scanpos = xsp;
- if (jj_3R_402()) return true;
- }
+ if (jj_3R_417()) return true;
return false;
}
- inline bool jj_3R_401()
+ inline bool jj_3R_416()
{
if (jj_done) return true;
if (jj_scan_token(PLUS_T)) return true;
return false;
}
- inline bool jj_3R_552()
+ inline bool jj_3R_670()
{
if (jj_done) return true;
- if (jj_scan_token(ROR_T)) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_684()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_419()
+ inline bool jj_3R_569()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_507()) jj_scanpos = xsp;
+ if (jj_scan_token(ROR_T)) return true;
return false;
}
- inline bool jj_3R_551()
+ inline bool jj_3R_568()
{
if (jj_done) return true;
if (jj_scan_token(ROL_T)) return true;
return false;
}
- inline bool jj_3R_550()
+ inline bool jj_3R_567()
{
if (jj_done) return true;
if (jj_scan_token(SRA_T)) return true;
return false;
}
- inline bool jj_3R_549()
+ inline bool jj_3R_566()
{
if (jj_done) return true;
if (jj_scan_token(SLA_T)) return true;
return false;
}
- inline bool jj_3R_548()
+ inline bool jj_3R_565()
{
if (jj_done) return true;
if (jj_scan_token(SRL_T)) return true;
return false;
}
- inline bool jj_3R_649()
+ inline bool jj_3R_710()
{
if (jj_done) return true;
- if (jj_3R_538()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_661()) jj_scanpos = xsp;
+ if (jj_3R_341()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_648()
+ inline bool jj_3R_564()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(SLL_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_494()
{
if (jj_done) return true;
- if (jj_3R_66()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_660()) jj_scanpos = xsp;
+ if (!jj_3R_564()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_565()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_566()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_567()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_568()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_569()) return true;
return false;
}
- inline bool jj_3R_547()
+ inline bool jj_3R_525()
{
if (jj_done) return true;
- if (jj_scan_token(SLL_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_587()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_477()
+ inline bool jj_3R_315()
{
if (jj_done) return true;
+ if (jj_3R_69()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_547()) {
- jj_scanpos = xsp;
- if (jj_3R_548()) {
- jj_scanpos = xsp;
- if (jj_3R_549()) {
- jj_scanpos = xsp;
- if (jj_3R_550()) {
- jj_scanpos = xsp;
- if (jj_3R_551()) {
- jj_scanpos = xsp;
- if (jj_3R_552()) return true;
- }
- }
- }
- }
- }
+ if (jj_3R_402()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_615()
+ inline bool jj_3R_636()
{
if (jj_done) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_scan_token(BLOCK_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_648()) jj_scanpos = xsp;
+ if (jj_3R_667()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_649()) jj_scanpos = xsp;
+ if (jj_scan_token(56)) jj_scanpos = xsp;
+ if (jj_3R_668()) return true;
+ if (jj_3R_669()) return true;
+ if (jj_scan_token(BEGIN_T)) return true;
+ if (jj_3R_670()) return true;
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(BLOCK_T)) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_671()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_650()
+ inline bool jj_3R_251()
{
if (jj_done) return true;
- if (jj_3R_140()) return true;
+ if (jj_3R_379()) return true;
return false;
}
- inline bool jj_3R_616()
+ inline bool jj_3_9()
{
if (jj_done) return true;
+ if (jj_3R_68()) return true;
+ return false;
+ }
+
+ inline bool jj_3_94()
+ {
+ if (jj_done) return true;
+ if (jj_3R_128()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_436()
+ {
+ if (jj_done) return true;
+ if (jj_3R_62()) return true;
Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_650()) { jj_scanpos = xsp; break; }
- }
+ xsp = jj_scanpos;
+ if (jj_3R_525()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_307()
+ inline bool jj_3_93()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_127()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_682()
+ {
+ if (jj_done) return true;
+ if (jj_3R_555()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_387()) jj_scanpos = xsp;
+ if (jj_3R_710()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_245()
+ inline bool jj_3_92()
{
if (jj_done) return true;
- if (jj_3R_363()) return true;
+ if (jj_3R_126()) return true;
return false;
}
- inline bool jj_3R_300()
+ inline bool jj_3R_121()
{
if (jj_done) return true;
- if (jj_3R_383()) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3_88()
+ inline bool jj_3R_681()
{
if (jj_done) return true;
- if (jj_3R_125()) return true;
+ if (jj_3R_68()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_709()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_7()
+ inline bool jj_3R_668()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_681()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_682()) jj_scanpos = xsp;
return false;
}
inline bool jj_3_87()
{
if (jj_done) return true;
- if (jj_3R_124()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_121()) jj_scanpos = xsp;
+ if (jj_3R_117()) return true;
+ if (jj_scan_token(VARASSIGN_T)) return true;
return false;
}
- inline bool jj_3_8()
+ inline bool jj_3_91()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_125()) return true;
return false;
}
- inline bool jj_3R_299()
+ inline bool jj_3R_683()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ if (jj_3R_144()) return true;
return false;
}
- inline bool jj_3R_298()
+ inline bool jj_3R_669()
{
if (jj_done) return true;
- if (jj_3R_381()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_683()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_297()
+ inline bool jj_3_90()
{
if (jj_done) return true;
- if (jj_3R_380()) return true;
+ if (jj_3R_124()) return true;
return false;
}
- inline bool jj_3_86()
+ inline bool jj_3_89()
{
if (jj_done) return true;
if (jj_3R_123()) return true;
return false;
}
- inline bool jj_3R_296()
+ inline bool jj_3R_308()
{
if (jj_done) return true;
- if (jj_3R_379()) return true;
+ if (jj_3R_398()) return true;
return false;
}
- inline bool jj_3R_118()
+ inline bool jj_3_88()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_122()) return true;
return false;
}
- inline bool jj_3_81()
+ inline bool jj_3_7()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_118()) jj_scanpos = xsp;
- if (jj_3R_114()) return true;
- if (jj_scan_token(VARASSIGN_T)) return true;
+ if (jj_3R_66()) return true;
return false;
}
- inline bool jj_3_85()
+ inline bool jj_3R_116()
{
if (jj_done) return true;
- if (jj_3R_122()) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_294()
+ inline bool jj_3R_250()
{
if (jj_done) return true;
if (jj_3R_378()) return true;
return false;
}
- inline bool jj_3R_295()
+ inline bool jj_3_8()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3_84()
+ inline bool jj_3R_307()
{
if (jj_done) return true;
- if (jj_3R_121()) return true;
+ if (jj_3R_347()) return true;
return false;
}
- inline bool jj_3R_293()
+ inline bool jj_3_83()
{
if (jj_done) return true;
- if (jj_3R_377()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_116()) jj_scanpos = xsp;
+ if (jj_3R_117()) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
return false;
}
- inline bool jj_3R_292()
+ inline bool jj_3R_306()
{
if (jj_done) return true;
- if (jj_3R_376()) return true;
+ if (jj_3R_397()) return true;
return false;
}
- inline bool jj_3R_291()
+ inline bool jj_3R_305()
{
if (jj_done) return true;
- if (jj_3R_375()) return true;
+ if (jj_3R_396()) return true;
return false;
}
- inline bool jj_3_83()
+ inline bool jj_3_86()
{
if (jj_done) return true;
if (jj_3R_120()) return true;
return false;
}
- inline bool jj_3R_290()
+ inline bool jj_3R_304()
{
if (jj_done) return true;
- if (jj_3R_374()) return true;
+ if (jj_3R_395()) return true;
return false;
}
- inline bool jj_3R_289()
+ inline bool jj_3_85()
{
if (jj_done) return true;
- if (jj_3R_373()) return true;
+ if (jj_3R_119()) return true;
return false;
}
- inline bool jj_3R_288()
+ inline bool jj_3R_302()
{
if (jj_done) return true;
- if (jj_3R_372()) return true;
+ if (jj_3R_394()) return true;
return false;
}
- inline bool jj_3R_287()
+ inline bool jj_3R_303()
{
if (jj_done) return true;
- if (jj_3R_371()) return true;
+ if (jj_3R_66()) return true;
return false;
}
- inline bool jj_3R_421()
+ inline bool jj_3R_523()
{
if (jj_done) return true;
- if (jj_3R_508()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_329()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_88()) return true;
return false;
}
- inline bool jj_3_82()
+ inline bool jj_3R_301()
{
if (jj_done) return true;
- if (jj_3R_119()) return true;
+ if (jj_3R_393()) return true;
return false;
}
- inline bool jj_3R_420()
+ inline bool jj_3_84()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ if (jj_3R_118()) return true;
return false;
}
- inline bool jj_3R_140()
+ inline bool jj_3R_300()
+ {
+ if (jj_done) return true;
+ if (jj_3R_392()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_299()
+ {
+ if (jj_done) return true;
+ if (jj_3R_391()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_298()
+ {
+ if (jj_done) return true;
+ if (jj_3R_390()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_115()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_286()) {
- jj_scanpos = xsp;
- if (jj_3R_287()) {
- jj_scanpos = xsp;
- if (jj_3R_288()) {
+ if (!jj_3R_249()) return false;
jj_scanpos = xsp;
- if (jj_3R_289()) {
+ if (!jj_3_84()) return false;
jj_scanpos = xsp;
- if (jj_3R_290()) {
+ if (!jj_3_85()) return false;
jj_scanpos = xsp;
- if (jj_3R_291()) {
+ if (!jj_3_86()) return false;
jj_scanpos = xsp;
- if (jj_3R_292()) {
+ if (!jj_3R_250()) return false;
jj_scanpos = xsp;
- if (jj_3R_293()) {
+ if (!jj_3_88()) return false;
jj_scanpos = xsp;
- if (jj_3R_294()) {
+ if (!jj_3_89()) return false;
jj_scanpos = xsp;
- if (jj_3R_295()) {
+ if (!jj_3_90()) return false;
jj_scanpos = xsp;
- if (jj_3R_296()) {
+ if (!jj_3_91()) return false;
jj_scanpos = xsp;
- if (jj_3R_297()) {
+ if (!jj_3_92()) return false;
jj_scanpos = xsp;
- if (jj_3R_298()) {
+ if (!jj_3_93()) return false;
jj_scanpos = xsp;
- if (jj_3R_299()) {
+ if (!jj_3_94()) return false;
jj_scanpos = xsp;
- if (jj_3_8()) {
- jj_scanpos = xsp;
- if (jj_3R_300()) return true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return false;
- }
-
- inline bool jj_3R_286()
- {
- if (jj_done) return true;
- if (jj_3R_92()) return true;
+ if (jj_3R_251()) return true;
return false;
}
- inline bool jj_3R_113()
- {
- if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
- return false;
- }
-
- inline bool jj_3R_244()
+ inline bool jj_3R_249()
{
if (jj_done) return true;
- if (jj_3R_362()) return true;
+ if (jj_3R_377()) return true;
return false;
}
- inline bool jj_3_77()
+ inline bool jj_3R_297()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_113()) jj_scanpos = xsp;
- if (jj_3R_114()) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
+ if (jj_3R_389()) return true;
return false;
}
- inline bool jj_3_80()
+ inline bool jj_3R_296()
{
if (jj_done) return true;
- if (jj_3R_117()) return true;
+ if (jj_3R_388()) return true;
return false;
}
- inline bool jj_3R_333()
+ inline bool jj_3R_438()
{
if (jj_done) return true;
- if (jj_scan_token(FOR_T)) return true;
- if (jj_3R_419()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_420()) { jj_scanpos = xsp; break; }
- }
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_421()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(FOR_T)) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_526()) return true;
return false;
}
- inline bool jj_3_79()
+ inline bool jj_3R_527()
{
if (jj_done) return true;
- if (jj_3R_116()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3_78()
+ inline bool jj_3R_295()
{
if (jj_done) return true;
- if (jj_3R_115()) return true;
+ if (jj_3R_387()) return true;
return false;
}
- inline bool jj_3R_505()
+ inline bool jj_3R_437()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_318()) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_85()) return true;
+ if (jj_3R_347()) return true;
return false;
}
- inline bool jj_3R_112()
+ inline bool jj_3R_144()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_243()) {
+ if (!jj_3R_294()) return false;
jj_scanpos = xsp;
- if (jj_3_78()) {
+ if (!jj_3R_295()) return false;
jj_scanpos = xsp;
- if (jj_3_79()) {
+ if (!jj_3R_296()) return false;
jj_scanpos = xsp;
- if (jj_3_80()) {
+ if (!jj_3R_297()) return false;
jj_scanpos = xsp;
- if (jj_3R_244()) {
+ if (!jj_3R_298()) return false;
jj_scanpos = xsp;
- if (jj_3_82()) {
+ if (!jj_3R_299()) return false;
jj_scanpos = xsp;
- if (jj_3_83()) {
+ if (!jj_3R_300()) return false;
jj_scanpos = xsp;
- if (jj_3_84()) {
+ if (!jj_3R_301()) return false;
jj_scanpos = xsp;
- if (jj_3_85()) {
+ if (!jj_3R_302()) return false;
jj_scanpos = xsp;
- if (jj_3_86()) {
+ if (!jj_3R_303()) return false;
jj_scanpos = xsp;
- if (jj_3_87()) {
+ if (!jj_3R_304()) return false;
jj_scanpos = xsp;
- if (jj_3_88()) {
+ if (!jj_3R_305()) return false;
jj_scanpos = xsp;
- if (jj_3R_245()) return true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
+ if (!jj_3R_306()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_307()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3_8()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_308()) return true;
return false;
}
- inline bool jj_3R_243()
+ inline bool jj_3R_294()
{
if (jj_done) return true;
- if (jj_3R_361()) return true;
+ if (jj_3R_96()) return true;
return false;
}
- inline bool jj_3R_509()
+ inline bool jj_3_82()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_115()) return true;
return false;
}
- inline bool jj_3R_94()
+ inline bool jj_3R_265()
{
if (jj_done) return true;
- if (jj_scan_token(BIT_STRING_LITERAL)) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3_82()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_240()
+ inline bool jj_3R_345()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_scan_token(FOR_T)) return true;
+ if (jj_3R_436()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_437()) { jj_scanpos = xsp; break; }
+ }
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_438()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(FOR_T)) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3_76()
+ inline bool jj_3R_247()
{
if (jj_done) return true;
- if (jj_3R_112()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_259()
+ inline bool jj_3R_440()
{
if (jj_done) return true;
+ if (jj_3R_62()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3_76()) { jj_scanpos = xsp; break; }
+ if (jj_3R_527()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_418()
+ inline bool jj_3R_273()
{
if (jj_done) return true;
- if (jj_3R_329()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_417()
+ inline bool jj_3R_380()
{
if (jj_done) return true;
- if (jj_3R_70()) return true;
+ if (jj_scan_token(ON_T)) return true;
+ if (jj_3R_440()) return true;
return false;
}
- inline bool jj_3R_416()
+ inline bool jj_3R_98()
{
if (jj_done) return true;
- if (jj_scan_token(USE_T)) return true;
- if (jj_3R_506()) return true;
+ if (jj_scan_token(BIT_STRING_LITERAL)) return true;
return false;
}
- inline bool jj_3R_422()
+ inline bool jj_3R_435()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_509()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_341()) return true;
return false;
}
- inline bool jj_3R_332()
+ inline bool jj_3R_428()
{
if (jj_done) return true;
+ if (jj_3R_329()) return true;
+ if (jj_scan_token(WHEN_T)) return true;
+ if (jj_3R_88()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_416()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_417()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_418()) jj_scanpos = xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_523()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_267()
+ inline bool jj_3R_434()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_72()) return true;
return false;
}
- inline bool jj_3R_364()
+ inline bool jj_3R_433()
{
if (jj_done) return true;
- if (jj_scan_token(ON_T)) return true;
- if (jj_3R_422()) return true;
+ if (jj_scan_token(USE_T)) return true;
+ if (jj_3R_524()) return true;
return false;
}
- inline bool jj_3_75()
+ inline bool jj_3R_344()
{
if (jj_done) return true;
- if (jj_3R_111()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_433()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_434()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_435()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_411()
+ inline bool jj_3R_246()
{
if (jj_done) return true;
- if (jj_3R_318()) return true;
- if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_85()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_505()) { jj_scanpos = xsp; break; }
- }
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_325()
+ inline bool jj_3R_337()
{
if (jj_done) return true;
if (jj_scan_token(WITH_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
if (jj_scan_token(SELECT_T)) return true;
- if (jj_3R_114()) return true;
+ if (jj_3R_117()) return true;
if (jj_scan_token(LESSTHAN_T)) return true;
- if (jj_3R_166()) return true;
- if (jj_3R_411()) return true;
+ if (jj_3R_170()) return true;
+ if (jj_3R_428()) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_689()
+ inline bool jj_3R_713()
{
if (jj_done) return true;
- if (jj_3R_111()) return true;
+ if (jj_3R_719()) return true;
return false;
}
- inline bool jj_3R_472()
+ inline bool jj_3R_439()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_99()) return true;
+ if (jj_3R_103()) return true;
return false;
}
- inline bool jj_3R_339()
+ inline bool jj_3R_746()
{
if (jj_done) return true;
- if (jj_scan_token(SEVERITY_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(EQU_T)) return true;
+ if (jj_3R_106()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_360()
+ inline bool jj_3_81()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(EQU_T)) return true;
- if (jj_3R_102()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_114()) return true;
return false;
}
- inline bool jj_3R_379()
+ inline bool jj_3R_700()
{
if (jj_done) return true;
- if (jj_scan_token(ATTRIBUTE_T)) return true;
- if (jj_3R_220()) return true;
- if (jj_scan_token(OF_T)) return true;
- if (jj_3R_470()) return true;
- if (jj_scan_token(IS_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_85()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_713()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_316()
+ inline bool jj_3R_699()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_315()) return true;
+ if (jj_3R_114()) return true;
return false;
}
- inline bool jj_3R_677()
+ inline bool jj_3R_674()
{
if (jj_done) return true;
- if (jj_3R_81()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_689()) jj_scanpos = xsp;
+ if (!jj_3R_699()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_700()) return true;
return false;
}
- inline bool jj_3R_110()
+ inline bool jj_3R_355()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(APOSTROPHE_T)) return true;
- if (jj_3R_59()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_240()) jj_scanpos = xsp;
+ if (jj_scan_token(SEVERITY_T)) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_676()
+ inline bool jj_3R_272()
{
if (jj_done) return true;
- if (jj_3R_688()) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_654()
+ inline bool jj_3R_128()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_676()) {
- jj_scanpos = xsp;
- if (jj_3R_677()) return true;
- }
+ if (jj_3R_272()) jj_scanpos = xsp;
+ if (jj_scan_token(RETURN_T)) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_273()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_355()
+ inline bool jj_3R_256()
{
if (jj_done) return true;
- if (jj_scan_token(RANGE_T)) return true;
+ if (jj_scan_token(SEVERITY_T)) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_220()
+ inline bool jj_3R_395()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(ATTRIBUTE_T)) return true;
+ if (jj_3R_227()) return true;
+ if (jj_scan_token(OF_T)) return true;
+ if (jj_3R_488()) return true;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_327()
{
if (jj_done) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_326()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_113()
+ {
+ if (jj_done) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(APOSTROPHE_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_354()) {
+ if (!jj_scan_token(85)) return false;
jj_scanpos = xsp;
- if (jj_3R_355()) return true;
- }
+ if (jj_3R_246()) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_247()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_354()
+ inline bool jj_3R_255()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_266()
+ inline bool jj_3R_316()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_403()) return true;
+ if (jj_3R_315()) return true;
return false;
}
- inline bool jj_3R_125()
+ inline bool jj_3R_372()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(RANGE_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_119()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_266()) jj_scanpos = xsp;
- if (jj_scan_token(RETURN_T)) return true;
+ if (jj_3R_255()) jj_scanpos = xsp;
+ if (jj_scan_token(REPORT_T)) return true;
+ if (jj_3R_60()) return true;
xsp = jj_scanpos;
- if (jj_3R_267()) jj_scanpos = xsp;
+ if (jj_3R_256()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_250()
+ inline bool jj_3R_227()
{
if (jj_done) return true;
- if (jj_scan_token(SEVERITY_T)) return true;
- if (jj_3R_58()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_371()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_372()) return true;
return false;
}
- inline bool jj_3R_308()
+ inline bool jj_3R_371()
{
if (jj_done) return true;
- if (jj_3R_388()) return true;
- if (jj_3R_307()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3_6()
+ inline bool jj_3R_506()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
- if (jj_scan_token(ARROW_T)) return true;
+ if (jj_scan_token(QNEQU_T)) return true;
return false;
}
- inline bool jj_3R_64()
+ inline bool jj_3R_505()
{
if (jj_done) return true;
- if (jj_scan_token(ATTRIBUTE_T)) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_157()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_scan_token(QEQU_T)) return true;
return false;
}
- inline bool jj_3R_338()
+ inline bool jj_3R_504()
{
if (jj_done) return true;
- if (jj_scan_token(REPORT_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_scan_token(QL_T)) return true;
return false;
}
- inline bool jj_3R_249()
+ inline bool jj_3R_723()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_165()
+ inline bool jj_3R_503()
{
if (jj_done) return true;
- if (jj_3R_315()) return true;
- Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_316()) { jj_scanpos = xsp; break; }
- }
+ if (jj_scan_token(QG_T)) return true;
return false;
}
- inline bool jj_3R_116()
+ inline bool jj_3R_502()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_249()) jj_scanpos = xsp;
- if (jj_scan_token(REPORT_T)) return true;
- if (jj_3R_58()) return true;
- xsp = jj_scanpos;
- if (jj_3R_250()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_scan_token(QLT_T)) return true;
return false;
}
- inline bool jj_3R_701()
+ inline bool jj_3R_501()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_scan_token(QGT_T)) return true;
return false;
}
- inline bool jj_3R_403()
+ inline bool jj_3R_500()
{
if (jj_done) return true;
- if (jj_3R_63()) return true;
- if (jj_scan_token(ARROW_T)) return true;
+ if (jj_scan_token(NOTEQU_T)) return true;
return false;
}
- inline bool jj_3R_483()
+ inline bool jj_3R_499()
{
if (jj_done) return true;
- if (jj_scan_token(NOTEQU_T)) return true;
+ if (jj_scan_token(LESSTHAN_T)) return true;
return false;
}
- inline bool jj_3R_315()
+ inline bool jj_3_6()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_403()) jj_scanpos = xsp;
- if (jj_3R_404()) return true;
+ if (jj_3R_65()) return true;
+ if (jj_scan_token(ARROW_T)) return true;
return false;
}
- inline bool jj_3R_482()
+ inline bool jj_3R_66()
{
if (jj_done) return true;
- if (jj_scan_token(LESSTHAN_T)) return true;
+ if (jj_scan_token(ATTRIBUTE_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_159()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_481()
+ inline bool jj_3R_498()
{
if (jj_done) return true;
if (jj_scan_token(GREATERTHAN_T)) return true;
return false;
}
- inline bool jj_3R_480()
+ inline bool jj_3R_354()
{
if (jj_done) return true;
- if (jj_scan_token(EQU_T)) return true;
+ if (jj_scan_token(REPORT_T)) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_479()
+ inline bool jj_3R_497()
{
if (jj_done) return true;
- if (jj_scan_token(GT_T)) return true;
+ if (jj_scan_token(EQU_T)) return true;
return false;
}
- inline bool jj_3R_248()
+ inline bool jj_3R_496()
{
if (jj_done) return true;
- if (jj_3R_139()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_scan_token(GT_T)) return true;
return false;
}
- inline bool jj_3R_388()
+ inline bool jj_3R_403()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_478()) {
+ if (!jj_3R_495()) return false;
jj_scanpos = xsp;
- if (jj_3R_479()) {
+ if (!jj_3R_496()) return false;
jj_scanpos = xsp;
- if (jj_3R_480()) {
+ if (!jj_3R_497()) return false;
jj_scanpos = xsp;
- if (jj_3R_481()) {
+ if (!jj_3R_498()) return false;
jj_scanpos = xsp;
- if (jj_3R_482()) {
+ if (!jj_3R_499()) return false;
jj_scanpos = xsp;
- if (jj_3R_483()) return true;
- }
- }
- }
- }
- }
+ if (!jj_3R_500()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_501()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_502()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_503()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_504()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_505()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_506()) return true;
return false;
}
- inline bool jj_3R_478()
+ inline bool jj_3R_495()
{
if (jj_done) return true;
if (jj_scan_token(LT_T)) return true;
return false;
}
- inline bool jj_3R_115()
+ inline bool jj_3R_167()
{
if (jj_done) return true;
+ if (jj_3R_326()) return true;
Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_248()) jj_scanpos = xsp;
- if (jj_3R_187()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_327()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_145()
+ inline bool jj_3R_149()
{
if (jj_done) return true;
- if (jj_3R_307()) return true;
+ if (jj_3R_315()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_308()) jj_scanpos = xsp;
+ if (jj_3R_316()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_700()
+ inline bool jj_3R_722()
{
if (jj_done) return true;
- if (jj_3R_705()) return true;
+ if (jj_3R_730()) return true;
return false;
}
- inline bool jj_3R_691()
+ inline bool jj_3R_418()
+ {
+ if (jj_done) return true;
+ if (jj_3R_65()) return true;
+ if (jj_scan_token(ARROW_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_326()
{
if (jj_done) return true;
- if (jj_scan_token(RECORD_T)) return true;
Token * xsp;
- if (jj_3R_700()) return true;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_700()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(END_T)) return true;
- if (jj_scan_token(RECORD_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_701()) jj_scanpos = xsp;
+ if (jj_3R_418()) jj_scanpos = xsp;
+ if (jj_3R_419()) return true;
return false;
}
- inline bool jj_3R_187()
+ inline bool jj_3R_715()
{
if (jj_done) return true;
- if (jj_scan_token(ASSERT_T)) return true;
- if (jj_3R_79()) return true;
+ if (jj_scan_token(RECORD_T)) return true;
Token * xsp;
+ if (jj_3R_722()) return true;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_722()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(END_T)) return true;
+ if (jj_scan_token(RECORD_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_338()) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_339()) jj_scanpos = xsp;
+ if (jj_3R_723()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_5()
+ inline bool jj_3R_254()
{
if (jj_done) return true;
- if (jj_3R_62()) return true;
+ if (jj_3R_143()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3_73()
+ inline bool jj_3R_118()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
- if (jj_3R_109()) return true;
- if (jj_3R_68()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_254()) jj_scanpos = xsp;
+ if (jj_3R_193()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3_74()
+ inline bool jj_3_79()
{
if (jj_done) return true;
- if (jj_3R_110()) return true;
+ if (jj_3R_69()) return true;
+ if (jj_3R_70()) return true;
+ if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_699()
+ inline bool jj_3_80()
{
if (jj_done) return true;
- if (jj_3R_704()) return true;
+ if (jj_3R_113()) return true;
return false;
}
- inline bool jj_3R_81()
+ inline bool jj_3R_85()
{
if (jj_done) return true;
if (jj_scan_token(RANGE_T)) return true;
- if (jj_3R_83()) return true;
+ if (jj_3R_86()) return true;
return false;
}
- inline bool jj_3R_698()
+ inline bool jj_3R_193()
{
if (jj_done) return true;
- if (jj_3R_62()) return true;
+ if (jj_scan_token(ASSERT_T)) return true;
+ if (jj_3R_82()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_354()) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_355()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_690()
+ inline bool jj_3_5()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_698()) {
- jj_scanpos = xsp;
- if (jj_3R_699()) return true;
- }
+ if (jj_scan_token(ARRAY_T)) return true;
+ if (jj_3R_64()) return true;
+ if (jj_scan_token(OF_T)) return true;
return false;
}
- inline bool jj_3_72()
+ inline bool jj_3_78()
{
if (jj_done) return true;
- if (jj_3R_108()) return true;
+ if (jj_3R_112()) return true;
return false;
}
- inline bool jj_3R_182()
+ inline bool jj_3R_188()
{
if (jj_done) return true;
- if (jj_3R_110()) return true;
+ if (jj_3R_113()) return true;
return false;
}
- inline bool jj_3R_181()
+ inline bool jj_3R_187()
{
if (jj_done) return true;
- if (jj_3R_68()) return true;
- if (jj_3R_109()) return true;
- if (jj_3R_68()) return true;
+ if (jj_3R_69()) return true;
+ if (jj_3R_70()) return true;
+ if (jj_3R_69()) return true;
return false;
}
- inline bool jj_3R_83()
+ inline bool jj_3R_86()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_181()) {
+ if (!jj_3R_187()) return false;
jj_scanpos = xsp;
- if (jj_3R_182()) return true;
- }
+ if (jj_3R_188()) return true;
return false;
}
- inline bool jj_3R_228()
+ inline bool jj_3R_721()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_58()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_729()) return true;
return false;
}
- inline bool jj_3R_227()
+ inline bool jj_3R_235()
{
if (jj_done) return true;
- if (jj_3R_108()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_60()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_466()
+ inline bool jj_3R_720()
{
if (jj_done) return true;
- if (jj_3R_234()) return true;
+ if (jj_3R_728()) return true;
return false;
}
- inline bool jj_3R_61()
+ inline bool jj_3R_714()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(APOSTROPHE_T)) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_227()) {
+ if (!jj_3R_720()) return false;
jj_scanpos = xsp;
- if (jj_3R_228()) return true;
- }
+ if (jj_3R_721()) return true;
return false;
}
- inline bool jj_3R_342()
+ inline bool jj_3R_234()
{
if (jj_done) return true;
if (jj_3R_112()) return true;
return false;
}
- inline bool jj_3R_191()
+ inline bool jj_3R_63()
{
if (jj_done) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(APOSTROPHE_T)) return true;
Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_342()) { jj_scanpos = xsp; break; }
- }
+ xsp = jj_scanpos;
+ if (!jj_3R_234()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_235()) return true;
return false;
}
- inline bool jj_3R_192()
+ inline bool jj_3R_358()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_115()) return true;
return false;
}
- inline bool jj_3R_340()
+ inline bool jj_3R_197()
{
if (jj_done) return true;
- if (jj_3R_422()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_358()) { jj_scanpos = xsp; break; }
+ }
return false;
}
- inline bool jj_3R_237()
+ inline bool jj_3R_198()
{
if (jj_done) return true;
- if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_236()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_576()
+ inline bool jj_3R_356()
{
if (jj_done) return true;
- if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_440()) return true;
return false;
}
- inline bool jj_3R_531()
+ inline bool jj_3R_484()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_4()) {
- jj_scanpos = xsp;
- if (jj_3R_576()) return true;
- }
+ if (jj_3R_242()) return true;
return false;
}
- inline bool jj_3_4()
+ inline bool jj_3R_245()
{
if (jj_done) return true;
- if (jj_scan_token(NEW_T)) return true;
- if (jj_3R_61()) return true;
+ if (jj_scan_token(COMMA_T)) return true;
+ if (jj_3R_244()) return true;
return false;
}
- inline bool jj_3R_537()
+ inline bool jj_3R_241()
{
if (jj_done) return true;
- if (jj_3R_310()) return true;
+ if (jj_scan_token(NEW_T)) return true;
+ if (jj_3R_87()) return true;
return false;
}
- inline bool jj_3R_536()
+ inline bool jj_3R_195()
{
if (jj_done) return true;
- if (jj_scan_token(CHARACTER_LITERAL)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_scan_token(15)) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_356()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_535()
+ inline bool jj_3R_111()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3_4()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_241()) return true;
return false;
}
- inline bool jj_3R_464()
+ inline bool jj_3_4()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_535()) {
- jj_scanpos = xsp;
- if (jj_3R_536()) {
- jj_scanpos = xsp;
- if (jj_3R_537()) return true;
- }
- }
+ if (jj_scan_token(NEW_T)) return true;
+ if (jj_3R_63()) return true;
return false;
}
- inline bool jj_3R_189()
+ inline bool jj_3R_554()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(15)) {
- jj_scanpos = xsp;
- if (jj_3R_340()) return true;
- }
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_318()) return true;
return false;
}
- inline bool jj_3R_465()
+ inline bool jj_3R_553()
{
if (jj_done) return true;
- if (jj_scan_token(COLON_T)) return true;
- if (jj_3R_84()) return true;
+ if (jj_scan_token(CHARACTER_LITERAL)) return true;
return false;
}
- inline bool jj_3R_377()
+ inline bool jj_3R_194()
{
if (jj_done) return true;
- if (jj_scan_token(ALIAS_T)) return true;
- if (jj_3R_464()) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_465()) jj_scanpos = xsp;
- if (jj_scan_token(IS_T)) return true;
- if (jj_3R_59()) return true;
- xsp = jj_scanpos;
- if (jj_3R_466()) jj_scanpos = xsp;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_188()
+ inline bool jj_3R_552()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_108()
+ inline bool jj_3R_482()
{
if (jj_done) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_236()) return true;
Token * xsp;
- while (true) {
- xsp = jj_scanpos;
- if (jj_3R_237()) { jj_scanpos = xsp; break; }
- }
- if (jj_scan_token(RPAREN_T)) return true;
+ xsp = jj_scanpos;
+ if (!jj_3R_552()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_553()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_554()) return true;
return false;
}
- inline bool jj_3R_88()
+ inline bool jj_3R_91()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_188()) jj_scanpos = xsp;
+ if (jj_3R_194()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(79)) jj_scanpos = xsp;
if (jj_scan_token(PROCESS_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_189()) jj_scanpos = xsp;
+ if (jj_3R_195()) jj_scanpos = xsp;
xsp = jj_scanpos;
if (jj_scan_token(56)) jj_scanpos = xsp;
- if (jj_3R_190()) return true;
+ if (jj_3R_196()) return true;
if (jj_scan_token(BEGIN_T)) return true;
- if (jj_3R_191()) return true;
+ if (jj_3R_197()) return true;
if (jj_scan_token(END_T)) return true;
xsp = jj_scanpos;
if (jj_scan_token(79)) jj_scanpos = xsp;
if (jj_scan_token(PROCESS_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_192()) jj_scanpos = xsp;
+ if (jj_3R_198()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_341()
- {
- if (jj_done) return true;
- if (jj_3R_423()) return true;
- return false;
- }
-
- inline bool jj_3R_273()
- {
- if (jj_done) return true;
- if (jj_scan_token(MINUS_T)) return true;
- return false;
- }
-
- inline bool jj_3R_274()
+ inline bool jj_3R_357()
{
if (jj_done) return true;
- if (jj_scan_token(AMPERSAND_T)) return true;
+ if (jj_3R_441()) return true;
return false;
}
- inline bool jj_3R_190()
+ inline bool jj_3R_196()
{
if (jj_done) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_341()) { jj_scanpos = xsp; break; }
+ if (jj_3R_357()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_128()
- {
- if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_272()) {
- jj_scanpos = xsp;
- if (jj_3R_273()) {
- jj_scanpos = xsp;
- if (jj_3R_274()) return true;
- }
- }
- return false;
- }
-
- inline bool jj_3R_272()
+ inline bool jj_3R_537()
{
if (jj_done) return true;
- if (jj_scan_token(PLUS_T)) return true;
+ if (jj_3R_398()) return true;
return false;
}
- inline bool jj_3R_519()
+ inline bool jj_3R_483()
{
if (jj_done) return true;
- if (jj_3R_383()) return true;
+ if (jj_scan_token(COLON_T)) return true;
+ if (jj_3R_87()) return true;
return false;
}
- inline bool jj_3_3()
+ inline bool jj_3R_536()
{
if (jj_done) return true;
- if (jj_3R_60()) return true;
+ if (jj_3R_347()) return true;
return false;
}
- inline bool jj_3R_518()
+ inline bool jj_3R_393()
{
if (jj_done) return true;
- if (jj_3R_382()) return true;
+ if (jj_scan_token(ALIAS_T)) return true;
+ if (jj_3R_482()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_483()) jj_scanpos = xsp;
+ if (jj_scan_token(IS_T)) return true;
+ if (jj_3R_62()) return true;
+ xsp = jj_scanpos;
+ if (jj_3R_484()) jj_scanpos = xsp;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3_71()
+ inline bool jj_3_77()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3R_517()
+ inline bool jj_3R_535()
{
if (jj_done) return true;
- if (jj_3R_379()) return true;
+ if (jj_3R_395()) return true;
return false;
}
- inline bool jj_3R_492()
+ inline bool jj_3R_112()
{
if (jj_done) return true;
- if (jj_scan_token(BOX_T)) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_244()) return true;
+ Token * xsp;
+ while (true) {
+ xsp = jj_scanpos;
+ if (jj_3R_245()) { jj_scanpos = xsp; break; }
+ }
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_493()
+ inline bool jj_3R_534()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
- if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_60()) return true;
- if (jj_scan_token(RPAREN_T)) return true;
+ if (jj_3R_393()) return true;
return false;
}
- inline bool jj_3_70()
+ inline bool jj_3_76()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_66()) return true;
return false;
}
- inline bool jj_3R_516()
+ inline bool jj_3R_533()
{
if (jj_done) return true;
- if (jj_3R_377()) return true;
+ if (jj_3R_392()) return true;
return false;
}
- inline bool jj_3R_515()
+ inline bool jj_3R_532()
{
if (jj_done) return true;
- if (jj_3R_376()) return true;
+ if (jj_3R_391()) return true;
return false;
}
- inline bool jj_3R_404()
+ inline bool jj_3R_531()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3R_491()) {
- jj_scanpos = xsp;
- if (jj_3R_492()) {
- jj_scanpos = xsp;
- if (jj_3R_493()) return true;
- }
- }
+ if (jj_3R_389()) return true;
return false;
}
- inline bool jj_3R_491()
+ inline bool jj_3R_279()
{
if (jj_done) return true;
- if (jj_3R_60()) return true;
+ if (jj_scan_token(MINUS_T)) return true;
return false;
}
- inline bool jj_3R_514()
+ inline bool jj_3R_280()
{
if (jj_done) return true;
- if (jj_3R_375()) return true;
+ if (jj_scan_token(AMPERSAND_T)) return true;
return false;
}
- inline bool jj_3R_513()
+ inline bool jj_3R_530()
{
if (jj_done) return true;
- if (jj_3R_373()) return true;
+ if (jj_3R_388()) return true;
return false;
}
- inline bool jj_3_2()
+ inline bool jj_3R_529()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_387()) return true;
return false;
}
- inline bool jj_3R_512()
+ inline bool jj_3_3()
{
if (jj_done) return true;
- if (jj_3R_372()) return true;
+ if (jj_3R_62()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
return false;
}
- inline bool jj_3R_511()
+ inline bool jj_3R_131()
{
if (jj_done) return true;
- if (jj_3R_371()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_278()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_279()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_280()) return true;
return false;
}
- inline bool jj_3R_226()
+ inline bool jj_3R_278()
{
if (jj_done) return true;
- if (jj_3R_165()) return true;
+ if (jj_scan_token(PLUS_T)) return true;
return false;
}
- inline bool jj_3_1()
+ inline bool jj_3R_528()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_96()) return true;
return false;
}
- inline bool jj_3R_423()
+ inline bool jj_3R_441()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_510()) {
+ if (!jj_3R_528()) return false;
jj_scanpos = xsp;
- if (jj_3R_511()) {
+ if (!jj_3R_529()) return false;
jj_scanpos = xsp;
- if (jj_3R_512()) {
+ if (!jj_3R_530()) return false;
jj_scanpos = xsp;
- if (jj_3R_513()) {
+ if (!jj_3R_531()) return false;
jj_scanpos = xsp;
- if (jj_3R_514()) {
+ if (!jj_3R_532()) return false;
jj_scanpos = xsp;
- if (jj_3R_515()) {
+ if (!jj_3R_533()) return false;
jj_scanpos = xsp;
- if (jj_3R_516()) {
+ if (!jj_3R_534()) return false;
jj_scanpos = xsp;
- if (jj_3_70()) {
+ if (!jj_3_76()) return false;
jj_scanpos = xsp;
- if (jj_3R_517()) {
+ if (!jj_3R_535()) return false;
jj_scanpos = xsp;
- if (jj_3R_518()) {
+ if (!jj_3R_536()) return false;
jj_scanpos = xsp;
- if (jj_3_71()) {
+ if (!jj_3_77()) return false;
jj_scanpos = xsp;
- if (jj_3R_519()) return true;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
+ if (jj_3R_537()) return true;
return false;
}
- inline bool jj_3R_510()
+ inline bool jj_3_2()
{
if (jj_done) return true;
- if (jj_3R_92()) return true;
+ if (jj_3R_61()) return true;
return false;
}
- inline bool jj_3R_330()
+ inline bool jj_3R_342()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_226()) return true;
+ if (jj_3R_233()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_153()
+ inline bool jj_3R_516()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
+ if (jj_scan_token(LPAREN_T)) return true;
+ if (jj_3R_61()) return true;
+ if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_69()
+ inline bool jj_3R_515()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_scan_token(BOX_T)) return true;
return false;
}
- inline bool jj_3R_119()
+ inline bool jj_3_75()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_3_69()) jj_scanpos = xsp;
- if (jj_3R_176()) return true;
- if (jj_scan_token(SEMI_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_152()
+ inline bool jj_3R_122()
{
if (jj_done) return true;
- if (jj_3R_58()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3_75()) jj_scanpos = xsp;
+ if (jj_3R_180()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_151()
+ inline bool jj_3R_514()
{
if (jj_done) return true;
- if (jj_scan_token(OPEN_T)) return true;
+ if (jj_3R_61()) return true;
return false;
}
- inline bool jj_3R_60()
+ inline bool jj_3R_419()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_151()) {
+ if (!jj_3R_514()) return false;
jj_scanpos = xsp;
- if (jj_3R_152()) {
+ if (!jj_3R_515()) return false;
jj_scanpos = xsp;
- if (jj_3R_153()) return true;
- }
- }
+ if (jj_3R_516()) return true;
return false;
}
- inline bool jj_3R_176()
+ inline bool jj_3R_180()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_330()) jj_scanpos = xsp;
+ if (jj_3R_342()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_67()
+ inline bool jj_3R_233()
{
if (jj_done) return true;
- if (jj_3R_86()) return true;
+ if (jj_3R_167()) return true;
return false;
}
- inline bool jj_3R_656()
+ inline bool jj_3_73()
{
if (jj_done) return true;
- if (jj_scan_token(ACCESS_T)) return true;
- if (jj_3R_84()) return true;
+ if (jj_3R_89()) return true;
return false;
}
- inline bool jj_3R_204()
+ inline bool jj_3R_211()
{
if (jj_done) return true;
- if (jj_3R_351()) return true;
+ if (jj_3R_368()) return true;
return false;
}
- inline bool jj_3R_225()
+ inline bool jj_3R_210()
{
if (jj_done) return true;
- if (jj_scan_token(BASED_LITERAL)) return true;
+ if (jj_3R_367()) return true;
return false;
}
- inline bool jj_3R_224()
+ inline bool jj_3_1()
{
if (jj_done) return true;
- if (jj_scan_token(INTEGER)) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3_68()
+ inline bool jj_3_74()
{
if (jj_done) return true;
- if (jj_3R_107()) return true;
+ if (jj_3R_93()) return true;
return false;
}
- inline bool jj_3R_223()
+ inline bool jj_3R_153()
{
if (jj_done) return true;
- if (jj_scan_token(DECIMAL_LITERAL)) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_103()
+ inline bool jj_3R_209()
+ {
+ if (jj_done) return true;
+ if (jj_3R_89()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_208()
+ {
+ if (jj_done) return true;
+ if (jj_3R_366()) return true;
+ return false;
+ }
+
+ inline bool jj_3_72()
+ {
+ if (jj_done) return true;
+ if (jj_3R_111()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_207()
+ {
+ if (jj_done) return true;
+ if (jj_3R_365()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_97()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_223()) {
+ if (!jj_3R_207()) return false;
jj_scanpos = xsp;
- if (jj_3R_224()) {
+ if (!jj_3R_208()) return false;
jj_scanpos = xsp;
- if (jj_3R_225()) return true;
- }
- }
+ if (!jj_3R_209()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3_74()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_210()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_211()) return true;
return false;
}
- inline bool jj_3R_203()
+ inline bool jj_3R_152()
{
if (jj_done) return true;
- if (jj_3R_86()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_202()
+ inline bool jj_3_71()
{
if (jj_done) return true;
- if (jj_3R_350()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_201()
+ inline bool jj_3R_151()
{
if (jj_done) return true;
- if (jj_3R_349()) return true;
+ if (jj_scan_token(OPEN_T)) return true;
return false;
}
- inline bool jj_3R_93()
+ inline bool jj_3R_61()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_201()) {
- jj_scanpos = xsp;
- if (jj_3R_202()) {
+ if (!jj_3R_151()) return false;
jj_scanpos = xsp;
- if (jj_3R_203()) {
+ if (!jj_3R_152()) return false;
jj_scanpos = xsp;
- if (jj_3_68()) {
- jj_scanpos = xsp;
- if (jj_3R_204()) return true;
- }
- }
- }
- }
+ if (jj_3R_153()) return true;
return false;
}
- inline bool jj_3_66()
+ inline bool jj_3_70()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_110()) return true;
return false;
}
- inline bool jj_3_65()
+ inline bool jj_3R_475()
{
if (jj_done) return true;
- if (jj_3R_106()) return true;
+ if (jj_3R_112()) return true;
return false;
}
- inline bool jj_3R_457()
+ inline bool jj_3R_676()
{
if (jj_done) return true;
- if (jj_3R_108()) return true;
+ if (jj_scan_token(ACCESS_T)) return true;
+ if (jj_3R_87()) return true;
return false;
}
- inline bool jj_3_64()
+ inline bool jj_3_69()
{
if (jj_done) return true;
- if (jj_3R_105()) return true;
+ if (jj_3R_109()) return true;
return false;
}
- inline bool jj_3R_456()
+ inline bool jj_3R_474()
{
if (jj_done) return true;
- if (jj_3R_531()) return true;
+ if (jj_3R_111()) return true;
return false;
}
- inline bool jj_3_63()
+ inline bool jj_3_68()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_63()) return true;
return false;
}
- inline bool jj_3R_455()
+ inline bool jj_3R_473()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3_62()
+ inline bool jj_3R_232()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(BASED_LITERAL)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_231()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(INTEGER)) return true;
+ return false;
+ }
+
+ inline bool jj_3_67()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_454()
+ inline bool jj_3R_107()
{
if (jj_done) return true;
- if (jj_3R_106()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (!jj_3R_230()) return false;
+ jj_scanpos = xsp;
+ if (!jj_3R_231()) return false;
+ jj_scanpos = xsp;
+ if (jj_3R_232()) return true;
return false;
}
- inline bool jj_3_61()
+ inline bool jj_3R_230()
{
if (jj_done) return true;
- if (jj_3R_104()) return true;
+ if (jj_scan_token(DECIMAL_LITERAL)) return true;
return false;
}
- inline bool jj_3R_242()
+ inline bool jj_3R_472()
{
if (jj_done) return true;
- if (jj_3R_59()) return true;
+ if (jj_3R_110()) return true;
return false;
}
- inline bool jj_3R_453()
+ inline bool jj_3R_727()
{
if (jj_done) return true;
- if (jj_3R_105()) return true;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_452()
+ inline bool jj_3_66()
{
if (jj_done) return true;
- if (jj_3R_61()) return true;
+ if (jj_3R_108()) return true;
return false;
}
- inline bool jj_3R_451()
+ inline bool jj_3R_471()
+ {
+ if (jj_done) return true;
+ if (jj_3R_109()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_470()
+ {
+ if (jj_done) return true;
+ if (jj_3R_63()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_469()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_370()
+ inline bool jj_3R_386()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_450()) {
+ if (!jj_3R_468()) return false;
jj_scanpos = xsp;
- if (jj_3R_451()) {
+ if (!jj_3R_469()) return false;
jj_scanpos = xsp;
- if (jj_3R_452()) {
+ if (!jj_3R_470()) return false;
jj_scanpos = xsp;
- if (jj_3R_453()) {
+ if (!jj_3R_471()) return false;
jj_scanpos = xsp;
- if (jj_3R_454()) {
+ if (!jj_3R_472()) return false;
jj_scanpos = xsp;
- if (jj_3R_455()) {
+ if (!jj_3R_473()) return false;
jj_scanpos = xsp;
- if (jj_3R_456()) {
+ if (!jj_3R_474()) return false;
jj_scanpos = xsp;
- if (jj_3R_457()) return true;
- }
- }
- }
- }
- }
- }
- }
+ if (jj_3R_475()) return true;
return false;
}
- inline bool jj_3R_450()
+ inline bool jj_3R_468()
{
if (jj_done) return true;
- if (jj_3R_104()) return true;
+ if (jj_3R_108()) return true;
return false;
}
- inline bool jj_3R_329()
+ inline bool jj_3R_341()
{
if (jj_done) return true;
if (jj_scan_token(PORT_T)) return true;
if (jj_scan_token(MAP_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_165()) return true;
+ if (jj_3R_167()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_582()
+ inline bool jj_3R_604()
{
if (jj_done) return true;
- if (jj_3R_313()) return true;
+ if (jj_3R_324()) return true;
return false;
}
- inline bool jj_3R_241()
+ inline bool jj_3R_726()
{
if (jj_done) return true;
- if (jj_3R_360()) return true;
+ if (jj_3R_746()) return true;
return false;
}
- inline bool jj_3R_538()
+ inline bool jj_3R_555()
{
if (jj_done) return true;
if (jj_scan_token(PORT_T)) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_582()) return true;
+ if (jj_3R_604()) return true;
if (jj_scan_token(RPAREN_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_111()
+ inline bool jj_3R_719()
{
if (jj_done) return true;
if (jj_scan_token(UNITS_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(SEMI_T)) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_241()) { jj_scanpos = xsp; break; }
+ if (jj_3R_726()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(UNITS_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_242()) jj_scanpos = xsp;
+ if (jj_3R_727()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_60()
+ inline bool jj_3_65()
{
if (jj_done) return true;
- if (jj_3R_103()) return true;
+ if (jj_3R_107()) return true;
return false;
}
- inline bool jj_3R_222()
+ inline bool jj_3R_229()
{
if (jj_done) return true;
- if (jj_3R_103()) return true;
+ if (jj_3R_107()) return true;
return false;
}
- inline bool jj_3R_102()
+ inline bool jj_3R_106()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_222()) jj_scanpos = xsp;
- if (jj_3R_59()) return true;
+ if (jj_3R_229()) jj_scanpos = xsp;
+ if (jj_3R_62()) return true;
return false;
}
- inline bool jj_3R_408()
+ inline bool jj_3R_423()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(IN_T)) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_71()) return true;
return false;
}
- inline bool jj_3_59()
+ inline bool jj_3_64()
{
if (jj_done) return true;
- if (jj_3R_86()) return true;
+ if (jj_3R_89()) return true;
return false;
}
- inline bool jj_3_57()
+ inline bool jj_3_62()
{
if (jj_done) return true;
- if (jj_3R_64()) return true;
+ if (jj_3R_66()) return true;
return false;
}
- inline bool jj_3_58()
+ inline bool jj_3_63()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3R_351()
+ inline bool jj_3R_367()
{
if (jj_done) return true;
if (jj_scan_token(PACKAGE_T)) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3_56()
+ inline bool jj_3_61()
{
if (jj_done) return true;
- if (jj_3R_65()) return true;
+ if (jj_3R_67()) return true;
return false;
}
- inline bool jj_3R_317()
+ inline bool jj_3R_328()
{
if (jj_done) return true;
- if (jj_3R_405()) return true;
+ if (jj_3R_420()) return true;
return false;
}
- inline bool jj_3R_261()
+ inline bool jj_3R_170()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_scan_token(50)) jj_scanpos = xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_328()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_166()
+ inline bool jj_3R_267()
{
if (jj_done) return true;
- Token * xsp;
- xsp = jj_scanpos;
- if (jj_scan_token(50)) jj_scanpos = xsp;
- xsp = jj_scanpos;
- if (jj_3R_317()) jj_scanpos = xsp;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_310()
+ inline bool jj_3R_318()
{
if (jj_done) return true;
if (jj_scan_token(STRINGLITERAL)) return true;
return false;
}
- inline bool jj_3R_647()
+ inline bool jj_3R_666()
{
if (jj_done) return true;
if (jj_scan_token(TYPE_T)) return true;
return false;
}
- inline bool jj_3R_646()
+ inline bool jj_3R_665()
{
if (jj_done) return true;
if (jj_scan_token(FILE_T)) return true;
return false;
}
- inline bool jj_3R_645()
+ inline bool jj_3R_664()
{
if (jj_done) return true;
if (jj_scan_token(SHARED_T)) return true;
@@ -8304,246 +8158,261 @@ void parseInline();
return false;
}
- inline bool jj_3_55()
+ inline bool jj_3_60()
{
if (jj_done) return true;
- if (jj_3R_102()) return true;
+ if (jj_3R_106()) return true;
return false;
}
- inline bool jj_3R_644()
+ inline bool jj_3R_663()
{
if (jj_done) return true;
if (jj_scan_token(VARIABLE_T)) return true;
return false;
}
- inline bool jj_3R_643()
+ inline bool jj_3R_662()
{
if (jj_done) return true;
if (jj_scan_token(SIGNAL_T)) return true;
return false;
}
- inline bool jj_3R_642()
+ inline bool jj_3R_661()
{
if (jj_done) return true;
if (jj_scan_token(CONSTANT_T)) return true;
return false;
}
- inline bool jj_3R_613()
+ inline bool jj_3R_635()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_642()) {
+ if (!jj_3R_661()) return false;
jj_scanpos = xsp;
- if (jj_3R_643()) {
+ if (!jj_3R_662()) return false;
jj_scanpos = xsp;
- if (jj_3R_644()) {
+ if (!jj_3R_663()) return false;
jj_scanpos = xsp;
- if (jj_3R_645()) {
+ if (!jj_3R_664()) return false;
jj_scanpos = xsp;
- if (jj_3R_646()) {
+ if (!jj_3R_665()) return false;
jj_scanpos = xsp;
- if (jj_3R_647()) return true;
- }
- }
- }
- }
- }
+ if (jj_3R_666()) return true;
return false;
}
- inline bool jj_3R_353()
+ inline bool jj_3R_370()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_206()
+ inline bool jj_3R_213()
{
if (jj_done) return true;
- if (jj_3R_103()) return true;
+ if (jj_3R_107()) return true;
return false;
}
- inline bool jj_3R_205()
+ inline bool jj_3R_212()
{
if (jj_done) return true;
- if (jj_3R_102()) return true;
+ if (jj_3R_106()) return true;
return false;
}
- inline bool jj_3R_95()
+ inline bool jj_3R_99()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_205()) {
+ if (!jj_3R_212()) return false;
jj_scanpos = xsp;
- if (jj_3R_206()) return true;
- }
+ if (jj_3R_213()) return true;
return false;
}
- inline bool jj_3R_441()
+ inline bool jj_3R_459()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_363()
+ inline bool jj_3R_379()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_441()) jj_scanpos = xsp;
+ if (jj_3R_459()) jj_scanpos = xsp;
if (jj_scan_token(NULL_T)) return true;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_101()
+ inline bool jj_3R_105()
{
if (jj_done) return true;
if (jj_scan_token(COMMA_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
return false;
}
- inline bool jj_3R_262()
+ inline bool jj_3R_268()
{
if (jj_done) return true;
if (jj_scan_token(WHEN_T)) return true;
- if (jj_3R_79()) return true;
+ if (jj_3R_82()) return true;
return false;
}
- inline bool jj_3_54()
+ inline bool jj_3R_266()
{
if (jj_done) return true;
- if (jj_scan_token(LBRACKET_T)) return true;
+ if (jj_3R_73()) return true;
+ if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_260()
+ inline bool jj_3_59()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
- if (jj_scan_token(COLON_T)) return true;
+ if (jj_scan_token(LBRACKET_T)) return true;
return false;
}
- inline bool jj_3R_123()
+ inline bool jj_3R_126()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_260()) jj_scanpos = xsp;
+ if (jj_3R_266()) jj_scanpos = xsp;
if (jj_scan_token(NEXT_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_261()) jj_scanpos = xsp;
+ if (jj_3R_267()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_262()) jj_scanpos = xsp;
+ if (jj_3R_268()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3R_221()
+ inline bool jj_3R_228()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_219()
- {
- if (jj_done) return true;
- if (jj_3R_234()) return true;
- return false;
- }
-
- inline bool jj_3_53()
+ inline bool jj_3_58()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_101()) { jj_scanpos = xsp; break; }
+ if (jj_3R_105()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_100()
+ inline bool jj_3R_226()
+ {
+ if (jj_done) return true;
+ if (jj_3R_242()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_104()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_219()) jj_scanpos = xsp;
+ if (jj_3R_226()) jj_scanpos = xsp;
if (jj_scan_token(APOSTROPHE_T)) return true;
- if (jj_3R_220()) return true;
+ if (jj_3R_227()) return true;
xsp = jj_scanpos;
- if (jj_3R_221()) jj_scanpos = xsp;
+ if (jj_3R_228()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3_52()
+ inline bool jj_3_57()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_71()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_48()
+ inline bool jj_3_53()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_3R_102()) return true;
+ return false;
+ }
+
+ inline bool jj_3_56()
+ {
+ if (jj_done) return true;
+ if (jj_3R_104()) return true;
return false;
}
inline bool jj_3_51()
{
if (jj_done) return true;
- if (jj_3R_100()) return true;
+ if (jj_3R_101()) return true;
return false;
}
- inline bool jj_3R_214()
+ inline bool jj_3_50()
+ {
+ if (jj_done) return true;
+ if (jj_3R_101()) return true;
+ return false;
+ }
+
+ inline bool jj_3_52()
+ {
+ if (jj_done) return true;
+ if (jj_3R_101()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_221()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_58()) return true;
+ if (jj_3R_60()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_353()) { jj_scanpos = xsp; break; }
+ if (jj_3R_370()) { jj_scanpos = xsp; break; }
}
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3_50()
+ inline bool jj_3_55()
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_99()) return true;
+ if (jj_3R_103()) return true;
return false;
}
- inline bool jj_3_49()
+ inline bool jj_3_54()
{
if (jj_done) return true;
if (jj_scan_token(APOSTROPHE_T)) return true;
@@ -8551,45 +8420,59 @@ void parseInline();
return false;
}
- inline bool jj_3R_213()
+ inline bool jj_3R_220()
{
if (jj_done) return true;
if (jj_scan_token(LPAREN_T)) return true;
- if (jj_3R_67()) return true;
+ if (jj_3R_71()) return true;
if (jj_scan_token(RPAREN_T)) return true;
return false;
}
- inline bool jj_3R_209()
+ inline bool jj_3R_216()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_3R_102()) return true;
return false;
}
- inline bool jj_3R_212()
+ inline bool jj_3R_219()
{
if (jj_done) return true;
- if (jj_3R_100()) return true;
+ if (jj_3R_104()) return true;
return false;
}
- inline bool jj_3R_149()
+ inline bool jj_3R_319()
{
if (jj_done) return true;
- if (jj_3R_311()) return true;
+ if (jj_3R_101()) return true;
return false;
}
- inline bool jj_3R_211()
+ inline bool jj_3R_321()
+ {
+ if (jj_done) return true;
+ if (jj_3R_101()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_322()
+ {
+ if (jj_done) return true;
+ if (jj_3R_101()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_218()
{
if (jj_done) return true;
if (jj_scan_token(DOT_T)) return true;
- if (jj_3R_99()) return true;
+ if (jj_3R_103()) return true;
return false;
}
- inline bool jj_3R_210()
+ inline bool jj_3R_217()
{
if (jj_done) return true;
if (jj_scan_token(APOSTROPHE_T)) return true;
@@ -8597,314 +8480,326 @@ void parseInline();
return false;
}
- inline bool jj_3R_98()
+ inline bool jj_3R_102()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_210()) {
+ if (!jj_3R_217()) return false;
jj_scanpos = xsp;
- if (jj_3R_211()) {
+ if (!jj_3R_218()) return false;
jj_scanpos = xsp;
- if (jj_3R_212()) {
+ if (!jj_3R_219()) return false;
jj_scanpos = xsp;
- if (jj_3R_213()) {
+ if (!jj_3R_220()) return false;
jj_scanpos = xsp;
- if (jj_3R_214()) return true;
- }
- }
- }
- }
+ if (jj_3R_221()) return true;
return false;
}
- inline bool jj_3_47()
- {
- if (jj_done) return true;
- if (jj_3R_97()) return true;
- return false;
- }
-
- inline bool jj_3R_97()
+ inline bool jj_3R_101()
{
if (jj_done) return true;
- if (jj_3R_98()) return true;
+ if (jj_3R_102()) return true;
Token * xsp;
while (true) {
xsp = jj_scanpos;
- if (jj_3R_209()) { jj_scanpos = xsp; break; }
+ if (jj_3R_216()) { jj_scanpos = xsp; break; }
}
return false;
}
- inline bool jj_3R_148()
+ inline bool jj_3R_156()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_322()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_150()
+ inline bool jj_3R_155()
{
if (jj_done) return true;
- if (jj_3R_97()) return true;
+ if (jj_3R_320()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_321()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_147()
+ inline bool jj_3R_154()
{
if (jj_done) return true;
- if (jj_3R_310()) return true;
+ if (jj_3R_318()) return true;
+ Token * xsp;
+ xsp = jj_scanpos;
+ if (jj_3R_319()) jj_scanpos = xsp;
return false;
}
- inline bool jj_3R_59()
+ inline bool jj_3R_62()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_147()) {
+ if (!jj_3R_154()) return false;
jj_scanpos = xsp;
- if (jj_3R_148()) {
+ if (!jj_3R_155()) return false;
jj_scanpos = xsp;
- if (jj_3R_149()) return true;
- }
- }
- xsp = jj_scanpos;
- if (jj_3R_150()) jj_scanpos = xsp;
+ if (jj_3R_156()) return true;
return false;
}
- inline bool jj_3R_281()
+ inline bool jj_3R_287()
{
if (jj_done) return true;
if (jj_scan_token(REM_T)) return true;
return false;
}
- inline bool jj_3R_280()
+ inline bool jj_3R_286()
{
if (jj_done) return true;
if (jj_scan_token(MOD_T)) return true;
return false;
}
- inline bool jj_3R_279()
+ inline bool jj_3R_285()
{
if (jj_done) return true;
if (jj_scan_token(SLASH_T)) return true;
return false;
}
- inline bool jj_3R_134()
+ inline bool jj_3R_138()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_278()) {
+ if (!jj_3R_284()) return false;
jj_scanpos = xsp;
- if (jj_3R_279()) {
+ if (!jj_3R_285()) return false;
jj_scanpos = xsp;
- if (jj_3R_280()) {
+ if (!jj_3R_286()) return false;
jj_scanpos = xsp;
- if (jj_3R_281()) return true;
- }
- }
- }
+ if (jj_3R_287()) return true;
return false;
}
- inline bool jj_3R_278()
+ inline bool jj_3R_284()
{
if (jj_done) return true;
if (jj_scan_token(MULT_T)) return true;
return false;
}
- inline bool jj_3R_629()
+ inline bool jj_3R_647()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
return false;
}
- inline bool jj_3R_431()
+ inline bool jj_3R_449()
{
if (jj_done) return true;
if (jj_scan_token(LINKAGE_T)) return true;
return false;
}
- inline bool jj_3R_430()
+ inline bool jj_3R_448()
{
if (jj_done) return true;
if (jj_scan_token(BUFFER_T)) return true;
return false;
}
- inline bool jj_3R_429()
+ inline bool jj_3R_447()
{
if (jj_done) return true;
if (jj_scan_token(INOUT_T)) return true;
return false;
}
- inline bool jj_3R_428()
+ inline bool jj_3R_446()
{
if (jj_done) return true;
if (jj_scan_token(OUT_T)) return true;
return false;
}
- inline bool jj_3R_346()
+ inline bool jj_3R_362()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_427()) {
+ if (!jj_3R_445()) return false;
jj_scanpos = xsp;
- if (jj_3R_428()) {
+ if (!jj_3R_446()) return false;
jj_scanpos = xsp;
- if (jj_3R_429()) {
+ if (!jj_3R_447()) return false;
jj_scanpos = xsp;
- if (jj_3R_430()) {
+ if (!jj_3R_448()) return false;
jj_scanpos = xsp;
- if (jj_3R_431()) return true;
- }
- }
- }
- }
+ if (jj_3R_449()) return true;
return false;
}
- inline bool jj_3R_427()
+ inline bool jj_3R_445()
{
if (jj_done) return true;
if (jj_scan_token(IN_T)) return true;
return false;
}
- inline bool jj_3R_258()
+ inline bool jj_3R_264()
{
if (jj_done) return true;
- if (jj_3R_367()) return true;
+ if (jj_3R_383()) return true;
return false;
}
- inline bool jj_3R_257()
+ inline bool jj_3R_263()
{
if (jj_done) return true;
- if (jj_3R_69()) return true;
+ if (jj_3R_73()) return true;
if (jj_scan_token(COLON_T)) return true;
return false;
}
- inline bool jj_3R_122()
+ inline bool jj_3R_125()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_257()) jj_scanpos = xsp;
+ if (jj_3R_263()) jj_scanpos = xsp;
xsp = jj_scanpos;
- if (jj_3R_258()) jj_scanpos = xsp;
+ if (jj_3R_264()) jj_scanpos = xsp;
if (jj_scan_token(LOOP_T)) return true;
- if (jj_3R_259()) return true;
+ if (jj_3R_265()) return true;
if (jj_scan_token(END_T)) return true;
if (jj_scan_token(LOOP_T)) return true;
xsp = jj_scanpos;
- if (jj_3R_629()) jj_scanpos = xsp;
+ if (jj_3R_647()) jj_scanpos = xsp;
if (jj_scan_token(SEMI_T)) return true;
return false;
}
- inline bool jj_3_46()
+ inline bool jj_3_49()
{
if (jj_done) return true;
- if (jj_3R_96()) return true;
+ if (jj_3R_100()) return true;
return false;
}
- inline bool jj_3_45()
+ inline bool jj_3_48()
{
if (jj_done) return true;
- if (jj_3R_95()) return true;
+ if (jj_3R_99()) return true;
return false;
}
- inline bool jj_3R_233()
+ inline bool jj_3R_240()
{
if (jj_done) return true;
if (jj_scan_token(NULL_T)) return true;
return false;
}
- inline bool jj_3_44()
+ inline bool jj_3_47()
{
if (jj_done) return true;
- if (jj_3R_94()) return true;
+ if (jj_3R_98()) return true;
return false;
}
- inline bool jj_3R_232()
+ inline bool jj_3R_239()
{
if (jj_done) return true;
- if (jj_3R_356()) return true;
+ if (jj_3R_373()) return true;
return false;
}
- inline bool jj_3R_231()
+ inline bool jj_3R_238()
{
if (jj_done) return true;
- if (jj_3R_96()) return true;
+ if (jj_3R_100()) return true;
return false;
}
- inline bool jj_3R_230()
+ inline bool jj_3R_237()
{
if (jj_done) return true;
- if (jj_3R_95()) return true;
+ if (jj_3R_99()) return true;
return false;
}
- inline bool jj_3R_106()
+ inline bool jj_3R_110()
{
if (jj_done) return true;
Token * xsp;
xsp = jj_scanpos;
- if (jj_3R_229()) {
+ if (!jj_3R_236()) return false;
jj_scanpos = xsp;
- if (jj_3R_230()) {
+ if (!jj_3R_237()) return false;
jj_scanpos = xsp;
- if (jj_3R_231()) {
+ if (!jj_3R_238()) return false;
jj_scanpos = xsp;
- if (jj_3R_232()) {
+ if (!jj_3R_239()) return false;
jj_scanpos = xsp;
- if (jj_3R_233()) return true;
- }
- }
- }
- }
+ if (jj_3R_240()) return true;
return false;
}
- inline bool jj_3R_229()
+ inline bool jj_3R_236()
{
if (jj_done) return true;
- if (jj_3R_94()) return true;
+ if (jj_3R_98()) return true;
+ return false;
+ }
+
+ inline bool jj_3_46()
+ {
+ if (jj_done) return true;
+ if (jj_3R_97()) return true;
+ return false;
+ }
+
+ inline bool jj_3R_346()
+ {
+ if (jj_done) return true;
+ if (jj_scan_token(LIBRARY_T)) return true;
+ if (jj_3R_202()) return true;
+ if (jj_scan_token(SEMI_T)) return true;
+ return false;
+ }
+
+ inline bool jj_3R_143()
+ {
+ if (jj_done) return true;
+ if (jj_3R_73()) return true;
return false;
}
public:
- TokenManager *token_source;
- CharStream *jj_input_stream;
+ void setErrorHandler(ErrorHandler *eh) {
+ if (errorHandler) delete errorHandler;
+ errorHandler = eh;
+ }
+
+ TokenManager *token_source = nullptr;
+ CharStream *jj_input_stream = nullptr;
/** Current token. */
- Token *token;
+ Token *token = nullptr;
/** Next token. */
- Token *jj_nt;
+ Token *jj_nt = nullptr;
+
private:
int jj_ntk;
- JJCalls jj_2_rtns[117];
+ JJCalls jj_2_rtns[125];
bool jj_rescan;
int jj_gc;
Token *jj_scanpos, *jj_lastpos;
@@ -8913,102 +8808,66 @@ private:
bool jj_lookingAhead;
bool jj_semLA;
int jj_gen;
- int jj_la1[294];
- ErrorHandler *errorHandler;
- bool errorHandlerCreated;
+ int jj_la1[302];
+ ErrorHandler *errorHandler = nullptr;
+
protected:
bool hasError;
-public:
- void setErrorHandler(ErrorHandler *eh) {
- if (errorHandlerCreated) delete errorHandler;
- errorHandler = eh;
- errorHandlerCreated = false;
- }
+
Token *head;
public:
-
- VhdlParser(TokenManager *tm);
+ VhdlParser(TokenManager *tokenManager);
virtual ~VhdlParser();
-
-void ReInit(TokenManager *tm);
-
+void ReInit(TokenManager* tokenManager);
void clear();
-
Token * jj_consume_token(int kind);
-
bool jj_scan_token(int kind);
-
Token * getNextToken();
-
Token * getToken(int index);
-
int jj_ntk_f();
private:
int jj_kind;
int **jj_expentries;
int *jj_expentry;
-
void jj_add_error_token(int kind, int pos);
protected:
/** Generate ParseException. */
-
virtual void parseError();
private:
- int trace_indent;
- bool trace_enabled;
+ int indent; // trace indentation
+ bool trace = false; // trace enabled if true
public:
-
+ bool trace_enabled();
void enable_tracing();
-
void disable_tracing();
-
void jj_rescan_token();
-
void jj_save(int index, int xla);
-typedef unsigned long long uint64;
-
-static Entry* current_root;
-static Entry* tempEntry;
-static Entry* lastEntity ;
-static Entry* lastCompound ;
-static std::shared_ptr<Entry> current;
-static QCString compSpec;
-static QCString currName;
-static int levelCounter;
-static QCString confName;
-static QCString genLabels;
-static QCString lab;
-static QCString forL;
-static int param_sec ;
-static int parse_sec;
-static int currP;
-
-//----------------------------------------
-
-static void setLineParsed(int tok);
-static int getLine(int tok);
-static int getLine();
-static void lineCount(const char*);
-static void lineCount();
-static void addProto(const char *s1,const char *s2,const char *s3,const char *s4,const char *s5,const char *s6);
-static void addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool inlineConf);
-static void createFunction(const char *impure,uint64 spec,const char *fname);
-static void addVhdlType(const char *n,int startLine,int section, uint64 spec,const char* args,const char* type,Protection prot);
-static void addCompInst(const char *n, const char* instName, const char* comp,int iLine);
-static void handleCommentBlock(const char* doc,bool brief);
-static void handleFlowComment(const char*);
-static void initEntry(Entry *e);
-static void newEntry();
-static bool isFuncProcProced();
-static void pushLabel(QCString &,QCString&);
-static QCString popLabel(QCString & q);
-static bool addLibUseClause(const QCString &type);
-static void mapLibPackage( Entry* root);
-static void createFlow();
-static void error_skipto(int kind);
-static void oneLineComment(QCString qcs);
-static void setMultCommentLine();
+struct SharedState
+{
+ std::shared_ptr<Entry> current_root;
+ std::shared_ptr<Entry> tempEntry;
+ std::shared_ptr<Entry> lastEntity;
+ std::shared_ptr<Entry> lastCompound;
+ std::shared_ptr<Entry> current;
+ QCString compSpec;
+ QCString currName;
+ int levelCounter = 0;
+ QCString confName;
+ QCString genLabels;
+ QCString lab;
+ int param_sec = 0;
+ int parse_sec = 0;
+ int currP = 0;
+};
+
+VHDLOutlineParser *m_outlineParser;
+SharedState *m_sharedState;
+
+void setOutlineParser(VHDLOutlineParser* p) { m_outlineParser=p; }
+VHDLOutlineParser *outlineParser() const { return m_outlineParser; }
+void setSharedState(SharedState *s) { m_sharedState=s; }
+void clearError() { hasError = false; }
private:
bool jj_done;
diff --git a/vhdlparser/VhdlParserConstants.h b/vhdlparser/VhdlParserConstants.h
index 882402b..e87567f 100644
--- a/vhdlparser/VhdlParserConstants.h
+++ b/vhdlparser/VhdlParserConstants.h
@@ -2,7 +2,7 @@
/**
* Token literal values and constants.
- * Generated by org.javacc.parser.OtherFilesGen#start()
+ * Generated by org.javacc.parser.OtherFilesGenCPP#start()
*/
#ifndef VHDLPARSERCONSTANTS_H
#define VHDLPARSERCONSTANTS_H
@@ -382,392 +382,396 @@ const int LOWER_CASE_LETTER = 187;
const int QUOTE = 188;
/** RegularExpression Id. */
const int VHDL2008TOOLDIR = 189;
+ /** RegularExpression Id. */
+const int SPEC_ATTR = 190;
/** Lexical state. */
const int DEFAULT = 0;
/** Literal token values. */
- static JAVACC_CHAR_TYPE tokenImage_arr_0[] =
+ static const JJChar tokenImage_arr_0[] =
{0x3c, 0x45, 0x4f, 0x46, 0x3e, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_1[] =
+ static const JJChar tokenImage_arr_1[] =
{0x22, 0x20, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_2[] =
+ static const JJChar tokenImage_arr_2[] =
{0x22, 0x9, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_3[] =
+ static const JJChar tokenImage_arr_3[] =
{0x22, 0xa, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_4[] =
+ static const JJChar tokenImage_arr_4[] =
{0x22, 0xd, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_5[] =
+ static const JJChar tokenImage_arr_5[] =
{0x22, 0x3c, 0x44, 0x4f, 0x58, 0x59, 0x47, 0x45, 0x4e, 0x5f, 0x56, 0x48, 0x44, 0x4c, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_6[] =
+ static const JJChar tokenImage_arr_6[] =
{0x22, 0x3c, 0x4d, 0x55, 0x4c, 0x54, 0x5f, 0x44, 0x4f, 0x58, 0x59, 0x47, 0x45, 0x4e, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_7[] =
+ static const JJChar tokenImage_arr_7[] =
{0x22, 0x3c, 0x56, 0x48, 0x44, 0x4c, 0x5f, 0x46, 0x4c, 0x4f, 0x57, 0x43, 0x48, 0x41, 0x52, 0x54, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_8[] =
+ static const JJChar tokenImage_arr_8[] =
{0x22, 0x3c, 0x56, 0x48, 0x44, 0x4c, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_9[] =
+ static const JJChar tokenImage_arr_9[] =
{0x22, 0x3c, 0x4d, 0x55, 0x4c, 0x54, 0x5f, 0x44, 0x4f, 0x58, 0x59, 0x47, 0x45, 0x4e, 0x5f, 0x56, 0x48, 0x44, 0x4c, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x32, 0x30, 0x30, 0x38, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_10[] =
+ static const JJChar tokenImage_arr_10[] =
{0x22, 0x3c, 0x4d, 0x55, 0x4c, 0x54, 0x5f, 0x56, 0x48, 0x44, 0x4c, 0x5f, 0x32, 0x30, 0x30, 0x38, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_11[] =
+ static const JJChar tokenImage_arr_11[] =
{0x22, 0x61, 0x62, 0x73, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_12[] =
+ static const JJChar tokenImage_arr_12[] =
{0x22, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_13[] =
+ static const JJChar tokenImage_arr_13[] =
{0x22, 0x61, 0x66, 0x74, 0x65, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_14[] =
+ static const JJChar tokenImage_arr_14[] =
{0x22, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_15[] =
+ static const JJChar tokenImage_arr_15[] =
{0x22, 0x61, 0x6c, 0x6c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_16[] =
+ static const JJChar tokenImage_arr_16[] =
{0x22, 0x61, 0x6e, 0x64, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_17[] =
+ static const JJChar tokenImage_arr_17[] =
{0x22, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_18[] =
+ static const JJChar tokenImage_arr_18[] =
{0x22, 0x61, 0x72, 0x72, 0x61, 0x79, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_19[] =
+ static const JJChar tokenImage_arr_19[] =
{0x22, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_20[] =
+ static const JJChar tokenImage_arr_20[] =
{0x22, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_21[] =
+ static const JJChar tokenImage_arr_21[] =
{0x22, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x5f, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_22[] =
+ static const JJChar tokenImage_arr_22[] =
{0x22, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_23[] =
+ static const JJChar tokenImage_arr_23[] =
{0x22, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_24[] =
+ static const JJChar tokenImage_arr_24[] =
{0x22, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_25[] =
+ static const JJChar tokenImage_arr_25[] =
{0x22, 0x62, 0x6f, 0x64, 0x79, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_26[] =
+ static const JJChar tokenImage_arr_26[] =
{0x22, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_27[] =
+ static const JJChar tokenImage_arr_27[] =
{0x22, 0x62, 0x75, 0x73, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_28[] =
+ static const JJChar tokenImage_arr_28[] =
{0x22, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_29[] =
+ static const JJChar tokenImage_arr_29[] =
{0x22, 0x63, 0x61, 0x73, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_30[] =
+ static const JJChar tokenImage_arr_30[] =
{0x22, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_31[] =
+ static const JJChar tokenImage_arr_31[] =
{0x22, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_32[] =
+ static const JJChar tokenImage_arr_32[] =
{0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_33[] =
+ static const JJChar tokenImage_arr_33[] =
{0x22, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_34[] =
+ static const JJChar tokenImage_arr_34[] =
{0x22, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_35[] =
+ static const JJChar tokenImage_arr_35[] =
{0x22, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_36[] =
+ static const JJChar tokenImage_arr_36[] =
{0x22, 0x64, 0x6f, 0x77, 0x6e, 0x74, 0x6f, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_37[] =
+ static const JJChar tokenImage_arr_37[] =
{0x22, 0x65, 0x6c, 0x73, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_38[] =
+ static const JJChar tokenImage_arr_38[] =
{0x22, 0x65, 0x6c, 0x73, 0x69, 0x66, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_39[] =
+ static const JJChar tokenImage_arr_39[] =
{0x22, 0x65, 0x6e, 0x64, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_40[] =
+ static const JJChar tokenImage_arr_40[] =
{0x22, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_41[] =
+ static const JJChar tokenImage_arr_41[] =
{0x22, 0x65, 0x78, 0x69, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_42[] =
+ static const JJChar tokenImage_arr_42[] =
{0x22, 0x66, 0x61, 0x69, 0x72, 0x6e, 0x65, 0x73, 0x73, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_43[] =
+ static const JJChar tokenImage_arr_43[] =
{0x22, 0x66, 0x69, 0x6c, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_44[] =
+ static const JJChar tokenImage_arr_44[] =
{0x22, 0x66, 0x6f, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_45[] =
+ static const JJChar tokenImage_arr_45[] =
{0x22, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_46[] =
+ static const JJChar tokenImage_arr_46[] =
{0x22, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_47[] =
+ static const JJChar tokenImage_arr_47[] =
{0x22, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_48[] =
+ static const JJChar tokenImage_arr_48[] =
{0x22, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_49[] =
+ static const JJChar tokenImage_arr_49[] =
{0x22, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_50[] =
+ static const JJChar tokenImage_arr_50[] =
{0x22, 0x67, 0x75, 0x61, 0x72, 0x64, 0x65, 0x64, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_51[] =
+ static const JJChar tokenImage_arr_51[] =
{0x22, 0x69, 0x66, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_52[] =
+ static const JJChar tokenImage_arr_52[] =
{0x22, 0x69, 0x6d, 0x70, 0x75, 0x72, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_53[] =
+ static const JJChar tokenImage_arr_53[] =
{0x22, 0x69, 0x6e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_54[] =
+ static const JJChar tokenImage_arr_54[] =
{0x22, 0x69, 0x6e, 0x65, 0x72, 0x74, 0x69, 0x61, 0x6c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_55[] =
+ static const JJChar tokenImage_arr_55[] =
{0x22, 0x69, 0x6e, 0x6f, 0x75, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_56[] =
+ static const JJChar tokenImage_arr_56[] =
{0x22, 0x69, 0x73, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_57[] =
+ static const JJChar tokenImage_arr_57[] =
{0x22, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_58[] =
+ static const JJChar tokenImage_arr_58[] =
{0x22, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_59[] =
+ static const JJChar tokenImage_arr_59[] =
{0x22, 0x6c, 0x69, 0x6e, 0x6b, 0x61, 0x67, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_60[] =
+ static const JJChar tokenImage_arr_60[] =
{0x22, 0x6c, 0x69, 0x74, 0x65, 0x72, 0x61, 0x6c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_61[] =
+ static const JJChar tokenImage_arr_61[] =
{0x22, 0x6c, 0x6f, 0x6f, 0x70, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_62[] =
+ static const JJChar tokenImage_arr_62[] =
{0x22, 0x6d, 0x61, 0x70, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_63[] =
+ static const JJChar tokenImage_arr_63[] =
{0x22, 0x6d, 0x6f, 0x64, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_64[] =
+ static const JJChar tokenImage_arr_64[] =
{0x22, 0x6e, 0x61, 0x6e, 0x64, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_65[] =
+ static const JJChar tokenImage_arr_65[] =
{0x22, 0x6e, 0x65, 0x77, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_66[] =
+ static const JJChar tokenImage_arr_66[] =
{0x22, 0x6e, 0x65, 0x78, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_67[] =
+ static const JJChar tokenImage_arr_67[] =
{0x22, 0x6e, 0x6f, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_68[] =
+ static const JJChar tokenImage_arr_68[] =
{0x22, 0x6e, 0x6f, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_69[] =
+ static const JJChar tokenImage_arr_69[] =
{0x22, 0x6e, 0x75, 0x6c, 0x6c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_70[] =
+ static const JJChar tokenImage_arr_70[] =
{0x22, 0x6f, 0x66, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_71[] =
+ static const JJChar tokenImage_arr_71[] =
{0x22, 0x6f, 0x6e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_72[] =
+ static const JJChar tokenImage_arr_72[] =
{0x22, 0x6f, 0x70, 0x65, 0x6e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_73[] =
+ static const JJChar tokenImage_arr_73[] =
{0x22, 0x6f, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_74[] =
+ static const JJChar tokenImage_arr_74[] =
{0x22, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_75[] =
+ static const JJChar tokenImage_arr_75[] =
{0x22, 0x6f, 0x75, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_76[] =
+ static const JJChar tokenImage_arr_76[] =
{0x22, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_77[] =
+ static const JJChar tokenImage_arr_77[] =
{0x22, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_78[] =
+ static const JJChar tokenImage_arr_78[] =
{0x22, 0x70, 0x6f, 0x72, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_79[] =
+ static const JJChar tokenImage_arr_79[] =
{0x22, 0x70, 0x6f, 0x73, 0x74, 0x70, 0x6f, 0x6e, 0x65, 0x64, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_80[] =
+ static const JJChar tokenImage_arr_80[] =
{0x22, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x64, 0x75, 0x72, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_81[] =
+ static const JJChar tokenImage_arr_81[] =
{0x22, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_82[] =
+ static const JJChar tokenImage_arr_82[] =
{0x22, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_83[] =
+ static const JJChar tokenImage_arr_83[] =
{0x22, 0x70, 0x72, 0x6f, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_84[] =
+ static const JJChar tokenImage_arr_84[] =
{0x22, 0x70, 0x75, 0x72, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_85[] =
+ static const JJChar tokenImage_arr_85[] =
{0x22, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_86[] =
+ static const JJChar tokenImage_arr_86[] =
{0x22, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_87[] =
+ static const JJChar tokenImage_arr_87[] =
{0x22, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_88[] =
+ static const JJChar tokenImage_arr_88[] =
{0x22, 0x72, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_89[] =
+ static const JJChar tokenImage_arr_89[] =
{0x22, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_90[] =
+ static const JJChar tokenImage_arr_90[] =
{0x22, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_91[] =
+ static const JJChar tokenImage_arr_91[] =
{0x22, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x5f, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_92[] =
+ static const JJChar tokenImage_arr_92[] =
{0x22, 0x72, 0x65, 0x6d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_93[] =
+ static const JJChar tokenImage_arr_93[] =
{0x22, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_94[] =
+ static const JJChar tokenImage_arr_94[] =
{0x22, 0x72, 0x6f, 0x6c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_95[] =
+ static const JJChar tokenImage_arr_95[] =
{0x22, 0x72, 0x6f, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_96[] =
+ static const JJChar tokenImage_arr_96[] =
{0x22, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_97[] =
+ static const JJChar tokenImage_arr_97[] =
{0x22, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_98[] =
+ static const JJChar tokenImage_arr_98[] =
{0x22, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_99[] =
+ static const JJChar tokenImage_arr_99[] =
{0x22, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_100[] =
+ static const JJChar tokenImage_arr_100[] =
{0x22, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_101[] =
+ static const JJChar tokenImage_arr_101[] =
{0x22, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_102[] =
+ static const JJChar tokenImage_arr_102[] =
{0x22, 0x73, 0x6c, 0x61, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_103[] =
+ static const JJChar tokenImage_arr_103[] =
{0x22, 0x73, 0x6c, 0x6c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_104[] =
+ static const JJChar tokenImage_arr_104[] =
{0x22, 0x73, 0x72, 0x61, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_105[] =
+ static const JJChar tokenImage_arr_105[] =
{0x22, 0x73, 0x72, 0x6c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_106[] =
+ static const JJChar tokenImage_arr_106[] =
{0x22, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_107[] =
+ static const JJChar tokenImage_arr_107[] =
{0x22, 0x73, 0x75, 0x62, 0x74, 0x79, 0x70, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_108[] =
+ static const JJChar tokenImage_arr_108[] =
{0x22, 0x74, 0x68, 0x65, 0x6e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_109[] =
+ static const JJChar tokenImage_arr_109[] =
{0x22, 0x74, 0x6f, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_110[] =
+ static const JJChar tokenImage_arr_110[] =
{0x22, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_111[] =
+ static const JJChar tokenImage_arr_111[] =
{0x22, 0x74, 0x79, 0x70, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_112[] =
+ static const JJChar tokenImage_arr_112[] =
{0x22, 0x75, 0x6e, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_113[] =
+ static const JJChar tokenImage_arr_113[] =
{0x22, 0x75, 0x6e, 0x69, 0x74, 0x73, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_114[] =
+ static const JJChar tokenImage_arr_114[] =
{0x22, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_115[] =
+ static const JJChar tokenImage_arr_115[] =
{0x22, 0x75, 0x73, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_116[] =
+ static const JJChar tokenImage_arr_116[] =
{0x22, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_117[] =
+ static const JJChar tokenImage_arr_117[] =
{0x22, 0x76, 0x6d, 0x6f, 0x64, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_118[] =
+ static const JJChar tokenImage_arr_118[] =
{0x22, 0x76, 0x70, 0x72, 0x6f, 0x70, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_119[] =
+ static const JJChar tokenImage_arr_119[] =
{0x22, 0x76, 0x75, 0x6e, 0x69, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_120[] =
+ static const JJChar tokenImage_arr_120[] =
{0x22, 0x77, 0x61, 0x69, 0x74, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_121[] =
+ static const JJChar tokenImage_arr_121[] =
{0x22, 0x77, 0x68, 0x65, 0x6e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_122[] =
+ static const JJChar tokenImage_arr_122[] =
{0x22, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_123[] =
+ static const JJChar tokenImage_arr_123[] =
{0x22, 0x77, 0x69, 0x74, 0x68, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_124[] =
+ static const JJChar tokenImage_arr_124[] =
{0x22, 0x78, 0x6f, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_125[] =
+ static const JJChar tokenImage_arr_125[] =
{0x22, 0x78, 0x6e, 0x6f, 0x72, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_126[] =
+ static const JJChar tokenImage_arr_126[] =
{0x22, 0x26, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_127[] =
+ static const JJChar tokenImage_arr_127[] =
{0x22, 0x27, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_128[] =
+ static const JJChar tokenImage_arr_128[] =
{0x22, 0x28, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_129[] =
+ static const JJChar tokenImage_arr_129[] =
{0x22, 0x29, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_130[] =
+ static const JJChar tokenImage_arr_130[] =
{0x22, 0x2a, 0x2a, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_131[] =
+ static const JJChar tokenImage_arr_131[] =
{0x22, 0x2a, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_132[] =
+ static const JJChar tokenImage_arr_132[] =
{0x22, 0x2b, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_133[] =
+ static const JJChar tokenImage_arr_133[] =
{0x22, 0x2d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_134[] =
+ static const JJChar tokenImage_arr_134[] =
{0x22, 0x2c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_135[] =
+ static const JJChar tokenImage_arr_135[] =
{0x22, 0x3a, 0x3d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_136[] =
+ static const JJChar tokenImage_arr_136[] =
{0x22, 0x3a, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_137[] =
+ static const JJChar tokenImage_arr_137[] =
{0x22, 0x3b, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_138[] =
+ static const JJChar tokenImage_arr_138[] =
{0x22, 0x3c, 0x3d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_139[] =
+ static const JJChar tokenImage_arr_139[] =
{0x22, 0x3e, 0x3d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_140[] =
+ static const JJChar tokenImage_arr_140[] =
{0x22, 0x3c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_141[] =
+ static const JJChar tokenImage_arr_141[] =
{0x22, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_142[] =
+ static const JJChar tokenImage_arr_142[] =
{0x22, 0x3d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_143[] =
+ static const JJChar tokenImage_arr_143[] =
{0x22, 0x2f, 0x3d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_144[] =
+ static const JJChar tokenImage_arr_144[] =
{0x22, 0x3d, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_145[] =
+ static const JJChar tokenImage_arr_145[] =
{0x22, 0x3c, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_146[] =
+ static const JJChar tokenImage_arr_146[] =
{0x22, 0x3c, 0x3c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_147[] =
+ static const JJChar tokenImage_arr_147[] =
{0x22, 0x3e, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_148[] =
+ static const JJChar tokenImage_arr_148[] =
{0x22, 0x3f, 0x3f, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_149[] =
+ static const JJChar tokenImage_arr_149[] =
{0x22, 0x3f, 0x3e, 0x3d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_150[] =
+ static const JJChar tokenImage_arr_150[] =
{0x22, 0x3f, 0x3c, 0x3d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_151[] =
+ static const JJChar tokenImage_arr_151[] =
{0x22, 0x3f, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_152[] =
+ static const JJChar tokenImage_arr_152[] =
{0x22, 0x3f, 0x3c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_153[] =
+ static const JJChar tokenImage_arr_153[] =
{0x22, 0x3f, 0x3d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_154[] =
+ static const JJChar tokenImage_arr_154[] =
{0x22, 0x3f, 0x2f, 0x3d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_155[] =
+ static const JJChar tokenImage_arr_155[] =
{0x22, 0x3f, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_156[] =
+ static const JJChar tokenImage_arr_156[] =
{0x22, 0x7c, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_157[] =
+ static const JJChar tokenImage_arr_157[] =
{0x22, 0x2e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_158[] =
+ static const JJChar tokenImage_arr_158[] =
{0x22, 0x2f, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_159[] =
+ static const JJChar tokenImage_arr_159[] =
{0x22, 0x40, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_160[] =
+ static const JJChar tokenImage_arr_160[] =
{0x22, 0x5e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_161[] =
+ static const JJChar tokenImage_arr_161[] =
{0x22, 0x5b, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_162[] =
+ static const JJChar tokenImage_arr_162[] =
{0x22, 0x5d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_163[] =
+ static const JJChar tokenImage_arr_163[] =
{0x22, 0x7b, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_164[] =
+ static const JJChar tokenImage_arr_164[] =
{0x22, 0x7d, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_165[] =
+ static const JJChar tokenImage_arr_165[] =
{0x22, 0x3c, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_166[] =
+ static const JJChar tokenImage_arr_166[] =
{0x22, 0x3c, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_167[] =
+ static const JJChar tokenImage_arr_167[] =
{0x22, 0x3c, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_168[] =
+ static const JJChar tokenImage_arr_168[] =
{0x22, 0x3c, 0x45, 0x58, 0x54, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_169[] =
+ static const JJChar tokenImage_arr_169[] =
{0x22, 0x3c, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_170[] =
+ static const JJChar tokenImage_arr_170[] =
{0x22, 0x3c, 0x44, 0x45, 0x43, 0x49, 0x4d, 0x41, 0x4c, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_171[] =
+ static const JJChar tokenImage_arr_171[] =
{0x22, 0x3c, 0x42, 0x41, 0x53, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_172[] =
+ static const JJChar tokenImage_arr_172[] =
{0x22, 0x3c, 0x42, 0x41, 0x53, 0x45, 0x44, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_173[] =
+ static const JJChar tokenImage_arr_173[] =
{0x22, 0x3c, 0x45, 0x58, 0x50, 0x4f, 0x4e, 0x45, 0x4e, 0x54, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_174[] =
+ static const JJChar tokenImage_arr_174[] =
{0x22, 0x3c, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x47, 0x52, 0x41, 0x50, 0x48, 0x49, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_175[] =
+ static const JJChar tokenImage_arr_175[] =
{0x22, 0x3c, 0x47, 0x52, 0x41, 0x50, 0x48, 0x49, 0x43, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_176[] =
+ static const JJChar tokenImage_arr_176[] =
{0x22, 0x3c, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x4f, 0x52, 0x5f, 0x44, 0x49, 0x47, 0x49, 0x54, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_177[] =
+ static const JJChar tokenImage_arr_177[] =
{0x22, 0x3c, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x5f, 0x4f, 0x52, 0x5f, 0x44, 0x49, 0x47, 0x49, 0x54, 0x5f, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x44, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_178[] =
+ static const JJChar tokenImage_arr_178[] =
{0x22, 0x3c, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_179[] =
+ static const JJChar tokenImage_arr_179[] =
{0x22, 0x3c, 0x55, 0x50, 0x50, 0x45, 0x52, 0x5f, 0x43, 0x41, 0x53, 0x45, 0x5f, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_180[] =
+ static const JJChar tokenImage_arr_180[] =
{0x22, 0x3c, 0x42, 0x49, 0x54, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x4c, 0x49, 0x54, 0x45, 0x52, 0x41, 0x4c, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_181[] =
+ static const JJChar tokenImage_arr_181[] =
{0x22, 0x3c, 0x42, 0x41, 0x53, 0x45, 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_182[] =
+ static const JJChar tokenImage_arr_182[] =
{0x22, 0x3c, 0x53, 0x54, 0x44, 0x5f, 0x4c, 0x4f, 0x47, 0x49, 0x43, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_183[] =
+ static const JJChar tokenImage_arr_183[] =
{0x22, 0x3c, 0x44, 0x49, 0x47, 0x49, 0x54, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_184[] =
+ static const JJChar tokenImage_arr_184[] =
{0x22, 0x3c, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_185[] =
+ static const JJChar tokenImage_arr_185[] =
{0x22, 0x3c, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x5f, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_186[] =
+ static const JJChar tokenImage_arr_186[] =
{0x22, 0x3c, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x43, 0x48, 0x41, 0x52, 0x41, 0x43, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_187[] =
+ static const JJChar tokenImage_arr_187[] =
{0x22, 0x3c, 0x4c, 0x4f, 0x57, 0x45, 0x52, 0x5f, 0x43, 0x41, 0x53, 0x45, 0x5f, 0x4c, 0x45, 0x54, 0x54, 0x45, 0x52, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_188[] =
+ static const JJChar tokenImage_arr_188[] =
{0x22, 0x3c, 0x51, 0x55, 0x4f, 0x54, 0x45, 0x3e, 0x22, 0};
- static JAVACC_CHAR_TYPE tokenImage_arr_189[] =
+ static const JJChar tokenImage_arr_189[] =
{0x22, 0x3c, 0x56, 0x48, 0x44, 0x4c, 0x32, 0x30, 0x30, 0x38, 0x54, 0x4f, 0x4f, 0x4c, 0x44, 0x49, 0x52, 0x3e, 0x22, 0};
- static JAVACC_STRING_TYPE tokenImage[] = {
+ static const JJChar tokenImage_arr_190[] =
+{0x22, 0x3c, 0x53, 0x50, 0x45, 0x43, 0x5f, 0x41, 0x54, 0x54, 0x52, 0x3e, 0x22, 0};
+ static const JJChar* const tokenImage[] = {
tokenImage_arr_0,
tokenImage_arr_1,
tokenImage_arr_2,
@@ -958,6 +962,7 @@ tokenImage_arr_186,
tokenImage_arr_187,
tokenImage_arr_188,
tokenImage_arr_189,
+tokenImage_arr_190,
};
}
diff --git a/vhdlparser/VhdlParserErrorHandler.hpp b/vhdlparser/VhdlParserErrorHandler.hpp
index 9576ce6..efdf20e 100644
--- a/vhdlparser/VhdlParserErrorHandler.hpp
+++ b/vhdlparser/VhdlParserErrorHandler.hpp
@@ -14,42 +14,55 @@ const char *getVhdlFileName(void);
namespace vhdl { namespace parser {
class VhdlErrorHandler: public ErrorHandler
- {
- virtual void handleUnexpectedToken(int expectedKind, JAVACC_STRING_TYPE expectedToken, Token *actual, VhdlParser *parser)
+{
+ public:
+ VhdlErrorHandler(const char *fileName) : m_fileName(fileName) {}
+
+ virtual void handleUnexpectedToken(int expectedKind, const JJString& expectedToken, Token *actual, VhdlParser *parser)
{
- warn(getVhdlFileName(),actual->beginLine,"syntax error '%s'",actual->image.data());
+ warn(m_fileName,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, const JJSimpleString& production, VhdlParser *parser)
{
- warn(getVhdlFileName(),last->beginLine,"unexpected token: '%s'", unexpected->image.data());
+ warn(m_fileName,last->beginLine,"unexpected token: '%s'", unexpected->image.data());
error_count++;
throw std::exception();
}
- virtual void handleOtherError(JAVACC_STRING_TYPE message, VhdlParser *parser)
+ virtual void handleOtherError(const JJString& message, VhdlParser *parser)
{
- warn(getVhdlFileName(), -1, "unexpected error: '%s'", (char*)message.c_str());
+ warn(m_fileName, -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)
+ private:
+ QCString m_fileName;
+};
+
+class VhdlTokenManagerErrorHandler: public TokenManagerErrorHandler
+{
+ public:
+ VhdlTokenManagerErrorHandler(const char *fileName) : m_fileName(fileName) {}
+
+ virtual void lexicalError(bool EOFSeen, int lexState, int errorLine, int errorColumn, const JJString& errorAfter, JJChar curChar, VhdlParserTokenManager* token_manager)
{
- warn(getVhdlFileName(),errorLine,"Lexical error, Encountered: '%c' after: '%s'",curChar, (EOFSeen? "EOF" : (const char*)errorAfter.c_str()));
+ warn(m_fileName,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)
+ virtual void lexicalError(const JJString& errorMessage, VhdlParserTokenManager* token_manager)
{
- warn(getVhdlFileName(),-1,"Unknown error: '%s'", (char*)errorMessage.c_str());
+ warn(m_fileName,-1,"Unknown error: '%s'", (char*)errorMessage.c_str());
}
- };
-}
-}
+
+ private:
+ QCString m_fileName;
+};
+
+} }
#endif
diff --git a/vhdlparser/VhdlParserIF.cpp b/vhdlparser/VhdlParserIF.cpp
deleted file mode 100644
index 676546b..0000000
--- a/vhdlparser/VhdlParserIF.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-
-#include "VhdlParserTokenManager.h"
-#include "VhdlParserErrorHandler.hpp"
-#include "VhdlParser.h"
-#include "VhdlParserIF.h"
-#include "CharStream.h"
-
-using namespace vhdl::parser;
-
-static VhdlParser * myParser=0;
-
-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);
- try
- {
- if(inLine)
- {
- myParser->parseInline();
- }
- else
- {
- myParser->design_file();
- }
- }
- catch( std::exception &){ /* fprintf(stderr,"\n[%s]",e.what()); */ }
- // fprintf(stderr,"\n\nparsed lines: %d\n",yyLineNr);
- // fprintf(stderr,"\n\nerrors : %d\n\n",myErr->getErrorCount());
- delete myParser;
-}
-
-void VhdlParser::error_skipto(int kind)
-{
- Token *op;
- do
- {
- Token *t = myParser->getNextToken();// step to next token
- op=myParser->getToken(1); // get first token
- if (op==0) break;
- //fprintf(stderr,"\n %s",t->image.data());
- } while (op->kind != kind);
- myParser->hasError=false;
- // The above loop consumes tokens all the way up to a token of
- // "kind". We use a do-while loop rather than a while because the
- // current token is the one immediately before the erroneous token
- // (in our case the token immediately before what should have been
- // "if"/"while".
-
-}
diff --git a/vhdlparser/VhdlParserIF.h b/vhdlparser/VhdlParserIF.h
deleted file mode 100644
index d11389b..0000000
--- a/vhdlparser/VhdlParserIF.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef VHDLPARSERIF
-#define VHDLPARSERIF
-
-#include "VhdlParser.h"
-
-class VhdlParserIF
-{
- public:
- static void parseVhdlfile(const char* inputBuffer,bool inLine);
-
-};
-#endif
diff --git a/vhdlparser/VhdlParserTokenManager.cc b/vhdlparser/VhdlParserTokenManager.cc
index 5edbfc5..d51b004 100644
--- a/vhdlparser/VhdlParserTokenManager.cc
+++ b/vhdlparser/VhdlParserTokenManager.cc
@@ -13,232 +13,234 @@ static const unsigned long long jjbitVec3[] = {
0x0ULL, 0x0ULL, 0xffffffff00000000ULL, 0xffffffffffffffffULL
};
static const int jjnextStates[] = {
- 58, 59, 60, 61, 62, 65, 69, 70, 71, 80, 21, 50, 51, 2, 37, 38,
- 0, 3, 4, 5, 7, 12, 13, 15, 16, 24, 23, 25, 33, 34, 36, 39,
- 40, 42, 46, 47, 49, 53, 54, 56, 60, 61, 62, 65, 64, 63, 65, 69,
- 70, 71, 72, 73, 75, 9, 10, 28, 29, 27, 30,
+ 56, 57, 58, 59, 60, 63, 67, 68, 69, 78, 18, 19, 79, 81, 83, 48,
+ 49, 2, 35, 36, 0, 3, 4, 5, 7, 12, 13, 15, 16, 22, 21, 23,
+ 31, 32, 34, 37, 38, 40, 44, 45, 47, 51, 52, 54, 58, 59, 60, 63,
+ 62, 61, 63, 67, 68, 69, 70, 71, 73, 78, 18, 19, 78, 18, 19, 79,
+ 9, 10, 26, 27, 25, 28,
};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_0[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_1[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_2[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_3[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_4[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_5[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_6[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_7[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_8[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_9[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_10[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_11[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_12[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_13[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_14[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_15[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_16[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_17[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_18[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_19[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_20[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_21[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_22[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_23[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_24[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_25[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_26[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_27[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_28[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_29[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_30[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_31[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_32[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_33[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_34[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_35[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_36[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_37[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_38[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_39[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_40[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_41[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_42[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_43[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_44[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_45[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_46[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_47[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_48[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_49[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_50[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_51[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_52[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_53[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_54[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_55[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_56[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_57[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_58[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_59[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_60[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_61[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_62[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_63[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_64[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_65[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_66[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_67[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_68[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_69[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_70[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_71[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_72[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_73[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_74[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_75[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_76[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_77[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_78[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_79[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_80[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_81[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_82[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_83[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_84[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_85[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_86[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_87[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_88[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_89[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_90[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_91[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_92[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_93[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_94[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_95[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_96[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_97[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_98[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_99[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_100[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_101[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_102[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_103[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_104[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_105[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_106[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_107[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_108[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_109[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_110[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_111[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_112[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_113[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_114[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_115[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_116[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_117[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_118[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_119[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_120[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_121[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_122[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_123[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_124[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_125[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_126[] = {0x26, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_127[] = {0x27, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_128[] = {0x28, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_129[] = {0x29, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_130[] = {0x2a, 0x2a, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_131[] = {0x2a, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_132[] = {0x2b, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_133[] = {0x2d, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_134[] = {0x2c, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_135[] = {0x3a, 0x3d, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_136[] = {0x3a, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_137[] = {0x3b, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_138[] = {0x3c, 0x3d, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_139[] = {0x3e, 0x3d, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_140[] = {0x3c, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_141[] = {0x3e, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_142[] = {0x3d, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_143[] = {0x2f, 0x3d, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_144[] = {0x3d, 0x3e, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_145[] = {0x3c, 0x3e, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_146[] = {0x3c, 0x3c, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_147[] = {0x3e, 0x3e, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_148[] = {0x3f, 0x3f, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_149[] = {0x3f, 0x3e, 0x3d, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_150[] = {0x3f, 0x3c, 0x3d, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_151[] = {0x3f, 0x3e, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_152[] = {0x3f, 0x3c, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_153[] = {0x3f, 0x3d, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_154[] = {0x3f, 0x2f, 0x3d, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_155[] = {0x3f, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_156[] = {0x7c, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_157[] = {0x2e, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_158[] = {0x2f, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_159[] = {0x40, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_160[] = {0x5e, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_161[] = {0x5b, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_162[] = {0x5d, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_163[] = {0x7b, 0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_164[] = {0x7d, 0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_165[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_166[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_167[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_168[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_169[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_170[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_171[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_172[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_173[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_174[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_175[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_176[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_177[] = {0};
-
-static JAVACC_CHAR_TYPE jjstrLiteralChars_178[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_179[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_180[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_181[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_182[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_183[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_184[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_185[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_186[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_187[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_188[] = {0};
-static JAVACC_CHAR_TYPE jjstrLiteralChars_189[] = {0};
-static const JAVACC_STRING_TYPE jjstrLiteralImages[] = {
+static JJChar jjstrLiteralChars_0[] = {0};
+static JJChar jjstrLiteralChars_1[] = {0};
+static JJChar jjstrLiteralChars_2[] = {0};
+static JJChar jjstrLiteralChars_3[] = {0};
+static JJChar jjstrLiteralChars_4[] = {0};
+static JJChar jjstrLiteralChars_5[] = {0};
+static JJChar jjstrLiteralChars_6[] = {0};
+
+static JJChar jjstrLiteralChars_7[] = {0};
+static JJChar jjstrLiteralChars_8[] = {0};
+static JJChar jjstrLiteralChars_9[] = {0};
+static JJChar jjstrLiteralChars_10[] = {0};
+static JJChar jjstrLiteralChars_11[] = {0};
+static JJChar jjstrLiteralChars_12[] = {0};
+static JJChar jjstrLiteralChars_13[] = {0};
+static JJChar jjstrLiteralChars_14[] = {0};
+static JJChar jjstrLiteralChars_15[] = {0};
+static JJChar jjstrLiteralChars_16[] = {0};
+static JJChar jjstrLiteralChars_17[] = {0};
+static JJChar jjstrLiteralChars_18[] = {0};
+static JJChar jjstrLiteralChars_19[] = {0};
+static JJChar jjstrLiteralChars_20[] = {0};
+
+static JJChar jjstrLiteralChars_21[] = {0};
+static JJChar jjstrLiteralChars_22[] = {0};
+static JJChar jjstrLiteralChars_23[] = {0};
+static JJChar jjstrLiteralChars_24[] = {0};
+static JJChar jjstrLiteralChars_25[] = {0};
+static JJChar jjstrLiteralChars_26[] = {0};
+static JJChar jjstrLiteralChars_27[] = {0};
+static JJChar jjstrLiteralChars_28[] = {0};
+static JJChar jjstrLiteralChars_29[] = {0};
+static JJChar jjstrLiteralChars_30[] = {0};
+static JJChar jjstrLiteralChars_31[] = {0};
+static JJChar jjstrLiteralChars_32[] = {0};
+static JJChar jjstrLiteralChars_33[] = {0};
+static JJChar jjstrLiteralChars_34[] = {0};
+
+static JJChar jjstrLiteralChars_35[] = {0};
+static JJChar jjstrLiteralChars_36[] = {0};
+static JJChar jjstrLiteralChars_37[] = {0};
+static JJChar jjstrLiteralChars_38[] = {0};
+static JJChar jjstrLiteralChars_39[] = {0};
+static JJChar jjstrLiteralChars_40[] = {0};
+static JJChar jjstrLiteralChars_41[] = {0};
+static JJChar jjstrLiteralChars_42[] = {0};
+static JJChar jjstrLiteralChars_43[] = {0};
+static JJChar jjstrLiteralChars_44[] = {0};
+static JJChar jjstrLiteralChars_45[] = {0};
+static JJChar jjstrLiteralChars_46[] = {0};
+static JJChar jjstrLiteralChars_47[] = {0};
+static JJChar jjstrLiteralChars_48[] = {0};
+
+static JJChar jjstrLiteralChars_49[] = {0};
+static JJChar jjstrLiteralChars_50[] = {0};
+static JJChar jjstrLiteralChars_51[] = {0};
+static JJChar jjstrLiteralChars_52[] = {0};
+static JJChar jjstrLiteralChars_53[] = {0};
+static JJChar jjstrLiteralChars_54[] = {0};
+static JJChar jjstrLiteralChars_55[] = {0};
+static JJChar jjstrLiteralChars_56[] = {0};
+static JJChar jjstrLiteralChars_57[] = {0};
+static JJChar jjstrLiteralChars_58[] = {0};
+static JJChar jjstrLiteralChars_59[] = {0};
+static JJChar jjstrLiteralChars_60[] = {0};
+static JJChar jjstrLiteralChars_61[] = {0};
+static JJChar jjstrLiteralChars_62[] = {0};
+
+static JJChar jjstrLiteralChars_63[] = {0};
+static JJChar jjstrLiteralChars_64[] = {0};
+static JJChar jjstrLiteralChars_65[] = {0};
+static JJChar jjstrLiteralChars_66[] = {0};
+static JJChar jjstrLiteralChars_67[] = {0};
+static JJChar jjstrLiteralChars_68[] = {0};
+static JJChar jjstrLiteralChars_69[] = {0};
+static JJChar jjstrLiteralChars_70[] = {0};
+static JJChar jjstrLiteralChars_71[] = {0};
+static JJChar jjstrLiteralChars_72[] = {0};
+static JJChar jjstrLiteralChars_73[] = {0};
+static JJChar jjstrLiteralChars_74[] = {0};
+static JJChar jjstrLiteralChars_75[] = {0};
+static JJChar jjstrLiteralChars_76[] = {0};
+
+static JJChar jjstrLiteralChars_77[] = {0};
+static JJChar jjstrLiteralChars_78[] = {0};
+static JJChar jjstrLiteralChars_79[] = {0};
+static JJChar jjstrLiteralChars_80[] = {0};
+static JJChar jjstrLiteralChars_81[] = {0};
+static JJChar jjstrLiteralChars_82[] = {0};
+static JJChar jjstrLiteralChars_83[] = {0};
+static JJChar jjstrLiteralChars_84[] = {0};
+static JJChar jjstrLiteralChars_85[] = {0};
+static JJChar jjstrLiteralChars_86[] = {0};
+static JJChar jjstrLiteralChars_87[] = {0};
+static JJChar jjstrLiteralChars_88[] = {0};
+static JJChar jjstrLiteralChars_89[] = {0};
+static JJChar jjstrLiteralChars_90[] = {0};
+
+static JJChar jjstrLiteralChars_91[] = {0};
+static JJChar jjstrLiteralChars_92[] = {0};
+static JJChar jjstrLiteralChars_93[] = {0};
+static JJChar jjstrLiteralChars_94[] = {0};
+static JJChar jjstrLiteralChars_95[] = {0};
+static JJChar jjstrLiteralChars_96[] = {0};
+static JJChar jjstrLiteralChars_97[] = {0};
+static JJChar jjstrLiteralChars_98[] = {0};
+static JJChar jjstrLiteralChars_99[] = {0};
+static JJChar jjstrLiteralChars_100[] = {0};
+static JJChar jjstrLiteralChars_101[] = {0};
+static JJChar jjstrLiteralChars_102[] = {0};
+static JJChar jjstrLiteralChars_103[] = {0};
+static JJChar jjstrLiteralChars_104[] = {0};
+
+static JJChar jjstrLiteralChars_105[] = {0};
+static JJChar jjstrLiteralChars_106[] = {0};
+static JJChar jjstrLiteralChars_107[] = {0};
+static JJChar jjstrLiteralChars_108[] = {0};
+static JJChar jjstrLiteralChars_109[] = {0};
+static JJChar jjstrLiteralChars_110[] = {0};
+static JJChar jjstrLiteralChars_111[] = {0};
+static JJChar jjstrLiteralChars_112[] = {0};
+static JJChar jjstrLiteralChars_113[] = {0};
+static JJChar jjstrLiteralChars_114[] = {0};
+static JJChar jjstrLiteralChars_115[] = {0};
+static JJChar jjstrLiteralChars_116[] = {0};
+static JJChar jjstrLiteralChars_117[] = {0};
+static JJChar jjstrLiteralChars_118[] = {0};
+
+static JJChar jjstrLiteralChars_119[] = {0};
+static JJChar jjstrLiteralChars_120[] = {0};
+static JJChar jjstrLiteralChars_121[] = {0};
+static JJChar jjstrLiteralChars_122[] = {0};
+static JJChar jjstrLiteralChars_123[] = {0};
+static JJChar jjstrLiteralChars_124[] = {0};
+static JJChar jjstrLiteralChars_125[] = {0};
+
+static JJChar jjstrLiteralChars_126[] = {0x26, 0};
+static JJChar jjstrLiteralChars_127[] = {0x27, 0};
+
+static JJChar jjstrLiteralChars_128[] = {0x28, 0};
+static JJChar jjstrLiteralChars_129[] = {0x29, 0};
+
+static JJChar jjstrLiteralChars_130[] = {0x2a, 0x2a, 0};
+static JJChar jjstrLiteralChars_131[] = {0x2a, 0};
+
+static JJChar jjstrLiteralChars_132[] = {0x2b, 0};
+static JJChar jjstrLiteralChars_133[] = {0x2d, 0};
+
+static JJChar jjstrLiteralChars_134[] = {0x2c, 0};
+static JJChar jjstrLiteralChars_135[] = {0x3a, 0x3d, 0};
+
+static JJChar jjstrLiteralChars_136[] = {0x3a, 0};
+static JJChar jjstrLiteralChars_137[] = {0x3b, 0};
+
+static JJChar jjstrLiteralChars_138[] = {0x3c, 0x3d, 0};
+static JJChar jjstrLiteralChars_139[] = {0x3e, 0x3d, 0};
+
+static JJChar jjstrLiteralChars_140[] = {0x3c, 0};
+static JJChar jjstrLiteralChars_141[] = {0x3e, 0};
+
+static JJChar jjstrLiteralChars_142[] = {0x3d, 0};
+static JJChar jjstrLiteralChars_143[] = {0x2f, 0x3d, 0};
+
+static JJChar jjstrLiteralChars_144[] = {0x3d, 0x3e, 0};
+static JJChar jjstrLiteralChars_145[] = {0x3c, 0x3e, 0};
+
+static JJChar jjstrLiteralChars_146[] = {0x3c, 0x3c, 0};
+static JJChar jjstrLiteralChars_147[] = {0x3e, 0x3e, 0};
+
+static JJChar jjstrLiteralChars_148[] = {0x3f, 0x3f, 0};
+static JJChar jjstrLiteralChars_149[] = {0x3f, 0x3e, 0x3d, 0};
+
+static JJChar jjstrLiteralChars_150[] = {0x3f, 0x3c, 0x3d, 0};
+static JJChar jjstrLiteralChars_151[] = {0x3f, 0x3e, 0};
+
+static JJChar jjstrLiteralChars_152[] = {0x3f, 0x3c, 0};
+static JJChar jjstrLiteralChars_153[] = {0x3f, 0x3d, 0};
+
+static JJChar jjstrLiteralChars_154[] = {0x3f, 0x2f, 0x3d, 0};
+static JJChar jjstrLiteralChars_155[] = {0x3f, 0};
+
+static JJChar jjstrLiteralChars_156[] = {0x7c, 0};
+static JJChar jjstrLiteralChars_157[] = {0x2e, 0};
+
+static JJChar jjstrLiteralChars_158[] = {0x2f, 0};
+static JJChar jjstrLiteralChars_159[] = {0x40, 0};
+
+static JJChar jjstrLiteralChars_160[] = {0x5e, 0};
+static JJChar jjstrLiteralChars_161[] = {0x5b, 0};
+
+static JJChar jjstrLiteralChars_162[] = {0x5d, 0};
+static JJChar jjstrLiteralChars_163[] = {0x7b, 0};
+
+static JJChar jjstrLiteralChars_164[] = {0x7d, 0};
+static JJChar jjstrLiteralChars_165[] = {0};
+static JJChar jjstrLiteralChars_166[] = {0};
+static JJChar jjstrLiteralChars_167[] = {0};
+static JJChar jjstrLiteralChars_168[] = {0};
+static JJChar jjstrLiteralChars_169[] = {0};
+static JJChar jjstrLiteralChars_170[] = {0};
+static JJChar jjstrLiteralChars_171[] = {0};
+static JJChar jjstrLiteralChars_172[] = {0};
+static JJChar jjstrLiteralChars_173[] = {0};
+static JJChar jjstrLiteralChars_174[] = {0};
+static JJChar jjstrLiteralChars_175[] = {0};
+static JJChar jjstrLiteralChars_176[] = {0};
+static JJChar jjstrLiteralChars_177[] = {0};
+
+static JJChar jjstrLiteralChars_178[] = {0};
+static JJChar jjstrLiteralChars_179[] = {0};
+static JJChar jjstrLiteralChars_180[] = {0};
+static JJChar jjstrLiteralChars_181[] = {0};
+static JJChar jjstrLiteralChars_182[] = {0};
+static JJChar jjstrLiteralChars_183[] = {0};
+static JJChar jjstrLiteralChars_184[] = {0};
+static JJChar jjstrLiteralChars_185[] = {0};
+static JJChar jjstrLiteralChars_186[] = {0};
+static JJChar jjstrLiteralChars_187[] = {0};
+static JJChar jjstrLiteralChars_188[] = {0};
+static JJChar jjstrLiteralChars_189[] = {0};
+static JJChar jjstrLiteralChars_190[] = {0};
+static const JJString jjstrLiteralImages[] = {
jjstrLiteralChars_0,
jjstrLiteralChars_1,
jjstrLiteralChars_2,
@@ -429,22 +431,23 @@ jjstrLiteralChars_186,
jjstrLiteralChars_187,
jjstrLiteralChars_188,
jjstrLiteralChars_189,
+jjstrLiteralChars_190,
};
/** Lexer state names. */
-static const JAVACC_CHAR_TYPE lexStateNames_arr_0[] =
+static const JJChar lexStateNames_arr_0[] =
{0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0};
-static const JAVACC_STRING_TYPE lexStateNames[] = {
+static const JJString lexStateNames[] = {
lexStateNames_arr_0,
};
static const unsigned long long jjtoToken[] = {
- 0xfffffffffffff801ULL, 0xffffffffffffffffULL, 0x20101fffffffffffULL,
+ 0xfffffffffffff801ULL, 0xffffffffffffffffULL, 0x60101fffffffffffULL,
};
static const unsigned long long jjtoSkip[] = {
0x7deULL, 0x0ULL, 0x0ULL,
};
-void VhdlParserTokenManager::setDebugStream(FILE *ds){ debugStream = ds; }
+ void VhdlParserTokenManager::setDebugStream(FILE *ds){ debugStream = ds; }
int VhdlParserTokenManager::jjStopAtPos(int pos, int kind){
jjmatchedKind = kind;
@@ -2687,7 +2690,7 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
curChar = input_stream->readChar();
curPos = 0;
int startsAt = 0;
- jjnewStateCnt = 81;
+ jjnewStateCnt = 87;
int i = 1;
jjstateSet[0] = startState;
int kind = 0x7fffffff;
@@ -2708,23 +2711,23 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
{
if (kind > 165)
kind = 165;
- { jjCheckNAddStates(0, 10); }
+ { jjCheckNAddStates(0, 12); }
}
else if ((0x100000200ULL & l) != 0L)
{ jjCheckNAddTwoStates(0, 3); }
+ else if (curChar == 39)
+ { jjAddStates(13, 14); }
else if (curChar == 47)
- { jjAddStates(11, 12); }
+ { jjAddStates(15, 16); }
else if (curChar == 45)
- { jjCheckNAddStates(13, 15); }
- else if (curChar == 39)
- jjstateSet[jjnewStateCnt++] = 18;
+ { jjCheckNAddStates(17, 19); }
else if (curChar == 34)
{ jjCheckNAddTwoStates(9, 10); }
if ((0x3ff000000000000ULL & l) != 0L)
{
if (kind > 171)
kind = 171;
- { jjCheckNAdd(20); }
+ { jjCheckNAdd(17); }
}
break;
case 0:
@@ -2736,7 +2739,7 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
break;
if (kind > 6)
kind = 6;
- { jjCheckNAddStates(16, 20); }
+ { jjCheckNAddStates(20, 24); }
break;
case 2:
if (curChar == 45)
@@ -2751,7 +2754,7 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
break;
if (kind > 6)
kind = 6;
- { jjCheckNAddStates(16, 20); }
+ { jjCheckNAddStates(20, 24); }
break;
case 5:
if ((0x2400ULL & l) == 0L)
@@ -2791,265 +2794,285 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
break;
if (kind > 167)
kind = 167;
- { jjAddStates(21, 22); }
+ { jjAddStates(25, 26); }
break;
case 15:
if ((0xfffffffb00000200ULL & l) != 0L)
- { jjAddStates(23, 24); }
+ { jjAddStates(27, 28); }
break;
case 17:
- if (curChar == 39)
- jjstateSet[jjnewStateCnt++] = 18;
- break;
- case 18:
- if ((0xffffffff00000200ULL & l) != 0L)
- jjstateSet[jjnewStateCnt++] = 19;
- break;
- case 19:
- if (curChar == 39 && kind > 169)
- kind = 169;
- break;
- case 20:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 171)
kind = 171;
- { jjCheckNAdd(20); }
+ { jjCheckNAdd(17); }
break;
- case 22:
+ case 20:
if (curChar == 34)
- { jjCheckNAdd(23); }
+ { jjCheckNAdd(21); }
break;
- case 23:
+ case 21:
if ((0x3ff200000000000ULL & l) != 0L)
- { jjCheckNAddStates(25, 27); }
+ { jjCheckNAddStates(29, 31); }
break;
- case 25:
+ case 23:
if (curChar == 34 && kind > 180)
kind = 180;
break;
- case 27:
+ case 25:
if (curChar == 34)
- { jjCheckNAddTwoStates(28, 29); }
+ { jjCheckNAddTwoStates(26, 27); }
break;
- case 28:
+ case 26:
if ((0xfffffffb00000200ULL & l) != 0L)
- { jjCheckNAddTwoStates(28, 29); }
+ { jjCheckNAddTwoStates(26, 27); }
break;
- case 29:
+ case 27:
if (curChar != 34)
break;
if (kind > 189)
kind = 189;
- { jjCheckNAddTwoStates(27, 30); }
+ { jjCheckNAddTwoStates(25, 28); }
break;
- case 30:
+ case 28:
if ((0xfffffffb00000200ULL & l) == 0L)
break;
if (kind > 189)
kind = 189;
- { jjCheckNAddTwoStates(27, 30); }
+ { jjCheckNAddTwoStates(25, 28); }
break;
- case 31:
+ case 29:
if (curChar == 45)
- { jjCheckNAddStates(13, 15); }
+ { jjCheckNAddStates(17, 19); }
break;
- case 32:
+ case 30:
if (curChar != 35)
break;
if (kind > 7)
kind = 7;
- { jjCheckNAddStates(28, 30); }
+ { jjCheckNAddStates(32, 34); }
break;
- case 33:
+ case 31:
if ((0xffffffffffffdbffULL & l) == 0L)
break;
if (kind > 7)
kind = 7;
- { jjCheckNAddStates(28, 30); }
+ { jjCheckNAddStates(32, 34); }
break;
- case 34:
+ case 32:
if ((0x2400ULL & l) != 0L && kind > 7)
kind = 7;
break;
- case 35:
+ case 33:
if (curChar == 10 && kind > 7)
kind = 7;
break;
- case 36:
+ case 34:
if (curChar == 13)
- jjstateSet[jjnewStateCnt++] = 35;
+ jjstateSet[jjnewStateCnt++] = 33;
break;
- case 37:
+ case 35:
if (curChar == 45)
- jjstateSet[jjnewStateCnt++] = 32;
+ jjstateSet[jjnewStateCnt++] = 30;
break;
- case 38:
+ case 36:
if (curChar != 45)
break;
if (kind > 8)
kind = 8;
- { jjCheckNAddStates(31, 33); }
+ { jjCheckNAddStates(35, 37); }
break;
- case 39:
+ case 37:
if ((0xffffffffffffdbffULL & l) == 0L)
break;
if (kind > 8)
kind = 8;
- { jjCheckNAddStates(31, 33); }
+ { jjCheckNAddStates(35, 37); }
break;
- case 40:
+ case 38:
if ((0x2400ULL & l) != 0L && kind > 8)
kind = 8;
break;
- case 41:
+ case 39:
if (curChar == 10 && kind > 8)
kind = 8;
break;
- case 42:
+ case 40:
if (curChar == 13)
- jjstateSet[jjnewStateCnt++] = 41;
+ jjstateSet[jjnewStateCnt++] = 39;
break;
- case 43:
+ case 41:
if (curChar == 47)
- { jjAddStates(11, 12); }
+ { jjAddStates(15, 16); }
break;
- case 44:
+ case 42:
if (curChar == 33)
- { jjCheckNAddTwoStates(45, 46); }
+ { jjCheckNAddTwoStates(43, 44); }
break;
- case 45:
+ case 43:
if ((0xfffffbffffffffffULL & l) != 0L)
- { jjCheckNAddTwoStates(45, 46); }
+ { jjCheckNAddTwoStates(43, 44); }
break;
- case 46:
+ case 44:
if (curChar == 42)
- { jjCheckNAddStates(34, 36); }
+ { jjCheckNAddStates(38, 40); }
break;
- case 47:
+ case 45:
if ((0xffff7bffffffffffULL & l) != 0L)
- { jjCheckNAddTwoStates(48, 46); }
+ { jjCheckNAddTwoStates(46, 44); }
break;
- case 48:
+ case 46:
if ((0xfffffbffffffffffULL & l) != 0L)
- { jjCheckNAddTwoStates(48, 46); }
+ { jjCheckNAddTwoStates(46, 44); }
break;
- case 49:
+ case 47:
if (curChar == 47 && kind > 9)
kind = 9;
break;
- case 50:
+ case 48:
if (curChar == 42)
- jjstateSet[jjnewStateCnt++] = 44;
+ jjstateSet[jjnewStateCnt++] = 42;
break;
- case 51:
+ case 49:
if (curChar == 42)
- { jjCheckNAddTwoStates(52, 53); }
+ { jjCheckNAddTwoStates(50, 51); }
break;
- case 52:
+ case 50:
if ((0xfffffbffffffffffULL & l) != 0L)
- { jjCheckNAddTwoStates(52, 53); }
+ { jjCheckNAddTwoStates(50, 51); }
break;
- case 53:
+ case 51:
if (curChar == 42)
- { jjCheckNAddStates(37, 39); }
+ { jjCheckNAddStates(41, 43); }
break;
- case 54:
+ case 52:
if ((0xffff7bffffffffffULL & l) != 0L)
- { jjCheckNAddTwoStates(55, 53); }
+ { jjCheckNAddTwoStates(53, 51); }
break;
- case 55:
+ case 53:
if ((0xfffffbffffffffffULL & l) != 0L)
- { jjCheckNAddTwoStates(55, 53); }
+ { jjCheckNAddTwoStates(53, 51); }
break;
- case 56:
+ case 54:
if (curChar == 47 && kind > 10)
kind = 10;
break;
- case 57:
+ case 55:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 165)
kind = 165;
- { jjCheckNAddStates(0, 10); }
+ { jjCheckNAddStates(0, 12); }
break;
- case 59:
+ case 57:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 165)
kind = 165;
- { jjCheckNAddTwoStates(58, 59); }
+ { jjCheckNAddTwoStates(56, 57); }
break;
- case 61:
+ case 59:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 170)
kind = 170;
- { jjCheckNAddStates(40, 43); }
+ { jjCheckNAddStates(44, 47); }
break;
- case 62:
+ case 60:
if (curChar == 46)
- { jjCheckNAdd(63); }
+ { jjCheckNAdd(61); }
break;
- case 63:
+ case 61:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 170)
kind = 170;
- { jjCheckNAddStates(44, 46); }
+ { jjCheckNAddStates(48, 50); }
break;
- case 66:
+ case 64:
if ((0x280000000000ULL & l) != 0L)
- { jjCheckNAdd(67); }
+ { jjCheckNAdd(65); }
break;
- case 67:
+ case 65:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 170)
kind = 170;
- { jjCheckNAddTwoStates(68, 67); }
+ { jjCheckNAddTwoStates(66, 65); }
break;
- case 70:
+ case 68:
if ((0x3ff000000000000ULL & l) != 0L)
- { jjCheckNAddStates(47, 49); }
+ { jjCheckNAddStates(51, 53); }
break;
- case 71:
+ case 69:
if (curChar == 35)
- { jjCheckNAdd(72); }
+ { jjCheckNAdd(70); }
break;
- case 72:
+ case 70:
if ((0x3ff000000000000ULL & l) != 0L)
- { jjCheckNAddStates(50, 52); }
+ { jjCheckNAddStates(54, 56); }
break;
- case 73:
+ case 71:
if (curChar == 46)
- { jjCheckNAdd(74); }
+ { jjCheckNAdd(72); }
break;
- case 74:
+ case 72:
if ((0x3ff000000000000ULL & l) != 0L)
- { jjCheckNAddTwoStates(74, 75); }
+ { jjCheckNAddTwoStates(72, 73); }
break;
- case 75:
+ case 73:
if (curChar != 35)
break;
if (kind > 172)
kind = 172;
- jjstateSet[jjnewStateCnt++] = 76;
+ jjstateSet[jjnewStateCnt++] = 74;
break;
- case 77:
+ case 75:
if ((0x280000000000ULL & l) != 0L)
- { jjCheckNAdd(78); }
+ { jjCheckNAdd(76); }
break;
- case 78:
+ case 76:
if ((0x3ff000000000000ULL & l) == 0L)
break;
if (kind > 172)
kind = 172;
- { jjCheckNAddTwoStates(79, 78); }
+ { jjCheckNAddTwoStates(77, 76); }
break;
- case 80:
+ case 78:
if ((0x3ff000000000000ULL & l) != 0L)
- { jjCheckNAddTwoStates(80, 21); }
+ { jjCheckNAddStates(57, 59); }
+ break;
+ case 79:
+ if ((0x3ff000000000000ULL & l) != 0L)
+ { jjCheckNAddStates(60, 63); }
+ break;
+ case 80:
+ if (curChar == 39)
+ { jjAddStates(13, 14); }
+ break;
+ case 81:
+ if ((0xffffffff00000200ULL & l) != 0L)
+ jjstateSet[jjnewStateCnt++] = 82;
+ break;
+ case 82:
+ if (curChar == 39 && kind > 169)
+ kind = 169;
+ break;
+ case 83:
+ if (curChar == 40)
+ jjstateSet[jjnewStateCnt++] = 84;
+ break;
+ case 84:
+ if (curChar == 39)
+ jjstateSet[jjnewStateCnt++] = 85;
+ break;
+ case 85:
+ if ((0xfffffffb00000200ULL & l) != 0L)
+ jjstateSet[jjnewStateCnt++] = 86;
+ break;
+ case 86:
+ if (curChar == 39 && kind > 190)
+ kind = 190;
break;
default : break;
}
@@ -3068,10 +3091,10 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
{
if (kind > 171)
kind = 171;
- { jjCheckNAdd(20); }
+ { jjCheckNAdd(17); }
}
else if (curChar == 96)
- { jjCheckNAddTwoStates(27, 30); }
+ { jjCheckNAddTwoStates(25, 28); }
else if (curChar == 92)
{ jjCheckNAddTwoStates(15, 16); }
if ((0x7fffffe07fffffeULL & l) != 0L)
@@ -3081,16 +3104,18 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
{ jjCheckNAddTwoStates(12, 13); }
}
if ((0x100801401008014ULL & l) != 0L)
- jjstateSet[jjnewStateCnt++] = 22;
+ jjstateSet[jjnewStateCnt++] = 20;
+ else if ((0x280000ULL & l) != 0L)
+ { jjCheckNAddTwoStates(18, 19); }
break;
case 4:
if (kind > 6)
kind = 6;
- { jjAddStates(16, 20); }
+ { jjAddStates(20, 24); }
break;
case 9:
if ((0x7fffffffffffffffULL & l) != 0L)
- { jjAddStates(53, 54); }
+ { jjAddStates(64, 65); }
break;
case 12:
if (curChar == 95)
@@ -3115,107 +3140,115 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
if (curChar == 92 && kind > 168)
kind = 168;
break;
- case 18:
- if ((0x7fffffffffffffffULL & l) != 0L)
- jjstateSet[jjnewStateCnt++] = 19;
- break;
- case 20:
+ case 17:
if ((0x7fffffe07fffffeULL & l) == 0L)
break;
if (kind > 171)
kind = 171;
- { jjCheckNAdd(20); }
+ { jjCheckNAdd(17); }
break;
- case 21:
+ case 18:
+ if ((0x280000ULL & l) != 0L)
+ { jjCheckNAddTwoStates(18, 19); }
+ break;
+ case 19:
if ((0x100801401008014ULL & l) != 0L)
- jjstateSet[jjnewStateCnt++] = 22;
+ jjstateSet[jjnewStateCnt++] = 20;
break;
- case 23:
+ case 21:
if ((0x7fffffe07fffffeULL & l) != 0L)
- { jjCheckNAddStates(25, 27); }
+ { jjCheckNAddStates(29, 31); }
break;
- case 24:
+ case 22:
if (curChar == 95)
- { jjCheckNAddTwoStates(24, 23); }
+ { jjCheckNAddTwoStates(22, 21); }
break;
- case 26:
+ case 24:
if (curChar == 96)
- { jjCheckNAddTwoStates(27, 30); }
+ { jjCheckNAddTwoStates(25, 28); }
break;
- case 28:
+ case 26:
if ((0x7fffffffffffffffULL & l) != 0L)
- { jjAddStates(55, 56); }
+ { jjAddStates(66, 67); }
break;
- case 30:
+ case 28:
if ((0x7fffffffffffffffULL & l) == 0L)
break;
if (kind > 189)
kind = 189;
- { jjCheckNAddTwoStates(27, 30); }
+ { jjCheckNAddTwoStates(25, 28); }
break;
- case 33:
+ case 31:
if (kind > 7)
kind = 7;
- { jjAddStates(28, 30); }
+ { jjAddStates(32, 34); }
break;
- case 39:
+ case 37:
if (kind > 8)
kind = 8;
- { jjAddStates(31, 33); }
+ { jjAddStates(35, 37); }
+ break;
+ case 43:
+ { jjCheckNAddTwoStates(43, 44); }
break;
case 45:
- { jjCheckNAddTwoStates(45, 46); }
+ case 46:
+ { jjCheckNAddTwoStates(46, 44); }
break;
- case 47:
- case 48:
- { jjCheckNAddTwoStates(48, 46); }
+ case 50:
+ { jjCheckNAddTwoStates(50, 51); }
break;
case 52:
- { jjCheckNAddTwoStates(52, 53); }
+ case 53:
+ { jjCheckNAddTwoStates(53, 51); }
break;
- case 54:
- case 55:
- { jjCheckNAddTwoStates(55, 53); }
+ case 56:
+ if (curChar == 95)
+ jjstateSet[jjnewStateCnt++] = 57;
break;
case 58:
if (curChar == 95)
jjstateSet[jjnewStateCnt++] = 59;
break;
- case 60:
+ case 62:
if (curChar == 95)
jjstateSet[jjnewStateCnt++] = 61;
break;
- case 64:
- if (curChar == 95)
- jjstateSet[jjnewStateCnt++] = 63;
- break;
- case 65:
+ case 63:
if ((0x2000000020ULL & l) != 0L)
- { jjCheckNAddTwoStates(66, 67); }
+ { jjCheckNAddTwoStates(64, 65); }
break;
- case 68:
+ case 66:
if (curChar == 95)
- { jjCheckNAdd(67); }
+ { jjCheckNAdd(65); }
break;
- case 69:
+ case 67:
if (curChar == 95)
- jjstateSet[jjnewStateCnt++] = 70;
+ jjstateSet[jjnewStateCnt++] = 68;
break;
- case 72:
+ case 70:
if ((0x7fffffe07fffffeULL & l) != 0L)
- { jjCheckNAddStates(50, 52); }
+ { jjCheckNAddStates(54, 56); }
break;
- case 74:
+ case 72:
if ((0x7fffffe07fffffeULL & l) != 0L)
- { jjCheckNAddTwoStates(74, 75); }
+ { jjCheckNAddTwoStates(72, 73); }
break;
- case 76:
+ case 74:
if ((0x2000000020ULL & l) != 0L)
- { jjCheckNAddTwoStates(77, 78); }
+ { jjCheckNAddTwoStates(75, 76); }
break;
- case 79:
+ case 77:
if (curChar == 95)
- { jjCheckNAdd(78); }
+ { jjCheckNAdd(76); }
+ break;
+ case 81:
+ if ((0x7fffffffffffffffULL & l) != 0L)
+ jjstateSet[jjnewStateCnt++] = 82;
+ break;
+ case 85:
+ if ((0x7fffffffffffffffULL & l) != 0L)
+ jjstateSet[jjnewStateCnt++] = 86;
break;
default : break;
}
@@ -3237,62 +3270,66 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
break;
if (kind > 6)
kind = 6;
- { jjAddStates(16, 20); }
+ { jjAddStates(20, 24); }
break;
case 9:
if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- { jjAddStates(53, 54); }
+ { jjAddStates(64, 65); }
break;
case 15:
if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- { jjAddStates(23, 24); }
+ { jjAddStates(27, 28); }
break;
- case 18:
+ case 26:
if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- jjstateSet[jjnewStateCnt++] = 19;
+ { jjAddStates(66, 67); }
break;
case 28:
- if (jjCanMove_1(hiByte, i1, i2, l1, l2))
- { jjAddStates(55, 56); }
- break;
- case 30:
if (!jjCanMove_1(hiByte, i1, i2, l1, l2))
break;
if (kind > 189)
kind = 189;
- { jjAddStates(57, 58); }
+ { jjAddStates(68, 69); }
break;
- case 33:
+ case 31:
if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
break;
if (kind > 7)
kind = 7;
- { jjAddStates(28, 30); }
+ { jjAddStates(32, 34); }
break;
- case 39:
+ case 37:
if (!jjCanMove_0(hiByte, i1, i2, l1, l2))
break;
if (kind > 8)
kind = 8;
- { jjAddStates(31, 33); }
+ { jjAddStates(35, 37); }
+ break;
+ case 43:
+ if (jjCanMove_0(hiByte, i1, i2, l1, l2))
+ { jjCheckNAddTwoStates(43, 44); }
break;
case 45:
+ case 46:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- { jjCheckNAddTwoStates(45, 46); }
+ { jjCheckNAddTwoStates(46, 44); }
break;
- case 47:
- case 48:
+ case 50:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- { jjCheckNAddTwoStates(48, 46); }
+ { jjCheckNAddTwoStates(50, 51); }
break;
case 52:
+ case 53:
if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- { jjCheckNAddTwoStates(52, 53); }
+ { jjCheckNAddTwoStates(53, 51); }
break;
- case 54:
- case 55:
- if (jjCanMove_0(hiByte, i1, i2, l1, l2))
- { jjCheckNAddTwoStates(55, 53); }
+ case 81:
+ if (jjCanMove_1(hiByte, i1, i2, l1, l2))
+ jjstateSet[jjnewStateCnt++] = 82;
+ break;
+ case 85:
+ if (jjCanMove_1(hiByte, i1, i2, l1, l2))
+ jjstateSet[jjnewStateCnt++] = 86;
break;
default : if (i1 == 0 || l1 == 0 || i2 == 0 || l2 == 0) break; else break;
}
@@ -3305,7 +3342,7 @@ int VhdlParserTokenManager::jjMoveNfa_0(int startState, int curPos){
kind = 0x7fffffff;
}
++curPos;
- if ((i = jjnewStateCnt), (jjnewStateCnt = startsAt), (i == (startsAt = 81 - startsAt)))
+ if ((i = jjnewStateCnt), (jjnewStateCnt = startsAt), (i == (startsAt = 87 - startsAt)))
break;
if (input_stream->endOfInput()) { break; }
curChar = input_stream->readChar();
@@ -3357,12 +3394,12 @@ bool VhdlParserTokenManager::jjCanMove_1(int hiByte, int i1, int i2, unsigned lo
Token * VhdlParserTokenManager::jjFillToken(){
Token *t;
- JAVACC_STRING_TYPE curTokenImage;
+ JJString curTokenImage;
int beginLine = -1;
int endLine = -1;
int beginColumn = -1;
int endColumn = -1;
- JAVACC_STRING_TYPE im = jjstrLiteralImages[jjmatchedKind];
+ JJString im = jjstrLiteralImages[jjmatchedKind];
curTokenImage = (im.length() == 0) ? input_stream->GetImage() : im;
if (input_stream->getTrackLineColumn()) {
beginLine = input_stream->getBeginLine();
@@ -3373,8 +3410,8 @@ Token * VhdlParserTokenManager::jjFillToken(){
t = Token::newToken(jjmatchedKind);
t->kind = jjmatchedKind;
t->image = curTokenImage;
- t->specialToken = NULL;
- t->next = NULL;
+ t->specialToken = nullptr;
+ t->next = nullptr;
if (input_stream->getTrackLineColumn()) {
t->beginLine = beginLine;
@@ -3389,7 +3426,7 @@ const int defaultLexState = 0;
/** Get the next Token. */
Token * VhdlParserTokenManager::getNextToken(){
- Token *matchedToken;
+ Token *matchedToken = nullptr;
int curPos = 0;
for (;;)
@@ -3422,13 +3459,13 @@ Token * VhdlParserTokenManager::getNextToken(){
}
else
{
- SkipLexicalActions(NULL);
+ SkipLexicalActions(nullptr);
goto EOFLoop;
}
}
int error_line = input_stream->getEndLine();
int error_column = input_stream->getEndColumn();
- JAVACC_STRING_TYPE error_after;
+ JJString error_after;
bool EOFSeen = false;
if (input_stream->endOfInput()) {
EOFSeen = true;
@@ -3453,44 +3490,44 @@ void VhdlParserTokenManager::SkipLexicalActions(Token *matchedToken){
{
case 3 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::lineCount();
+ parser->outlineParser()->lineCount();
break;
}
case 6 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
{
QCString doc(image.data());
- int count=doc.contains("--!");
- ::vhdl::parser::VhdlParser::setMultCommentLine();
- ::vhdl::parser::VhdlParser::lineCount(image.data());
+ int count=doc.contains("--!");
+ parser->outlineParser()->setMultCommentLine();
+ parser->outlineParser()->lineCount(image.data());
if (count == 1)
- ::vhdl::parser::VhdlParser::oneLineComment(doc);
+ parser->outlineParser()->oneLineComment(doc);
else
- ::vhdl::parser::VhdlParser::handleCommentBlock(image.data(),FALSE); ;
+ parser->outlineParser()->handleCommentBlock(image.data(),FALSE); ;
}
break;
}
case 7 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::handleFlowComment(image.data());
+ parser->outlineParser()->handleFlowComment(image.data());
break;
}
case 8 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::lineCount(image.data());
+ parser->outlineParser()->lineCount(image.data());
break;
}
case 9 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
{
QCString q = filter2008VhdlComment(image.data());
- ::vhdl::parser::VhdlParser::handleCommentBlock(q.data(),TRUE);image.clear();
+ parser->outlineParser()->handleCommentBlock(q.data(),TRUE);image.clear();
}
break;
}
case 10 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::lineCount(image.data());image.clear();
+ parser->outlineParser()->lineCount(image.data());image.clear();
break;
}
default :
@@ -3503,123 +3540,123 @@ void VhdlParserTokenManager::TokenLexicalActions(Token *matchedToken){
{
case 17 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(ARCHITECTURE_T);
+ parser->outlineParser()->setLineParsed(ARCHITECTURE_T);
break;
}
case 18 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(ARRAY_T);
+ parser->outlineParser()->setLineParsed(ARRAY_T);
break;
}
case 22 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(ATTRIBUTE_T);
+ parser->outlineParser()->setLineParsed(ATTRIBUTE_T);
break;
}
case 25 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(BODY_T);
+ parser->outlineParser()->setLineParsed(BODY_T);
break;
}
case 28 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(COMPONENT_T);
+ parser->outlineParser()->setLineParsed(COMPONENT_T);
break;
}
case 30 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(CONFIGURATION_T);
+ parser->outlineParser()->setLineParsed(CONFIGURATION_T);
break;
}
case 31 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(CONSTANT_T);
+ parser->outlineParser()->setLineParsed(CONSTANT_T);
break;
}
case 32 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(CONTEXT_T);
+ parser->outlineParser()->setLineParsed(CONTEXT_T);
break;
}
case 39 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(END_T);
+ parser->outlineParser()->setLineParsed(END_T);
break;
}
case 40 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(ENTITY_T);
+ parser->outlineParser()->setLineParsed(ENTITY_T);
break;
}
case 43 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(FILE_T);
+ parser->outlineParser()->setLineParsed(FILE_T);
break;
}
case 46 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(FUNCTION_T);
+ parser->outlineParser()->setLineParsed(FUNCTION_T);
break;
}
case 49 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(GROUP_T);
+ parser->outlineParser()->setLineParsed(GROUP_T);
break;
}
case 58 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- VhdlParser::setLineParsed(LIBRARY_T);
+ parser->outlineParser()->setLineParsed(LIBRARY_T);
break;
}
case 76 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(PACKAGE_T);
+ parser->outlineParser()->setLineParsed(PACKAGE_T);
break;
}
case 78 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(PORT_T);
+ parser->outlineParser()->setLineParsed(PORT_T);
break;
}
case 80 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(PROCEDURE_T);
+ parser->outlineParser()->setLineParsed(PROCEDURE_T);
break;
}
case 81 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(PROCESS_T);
+ parser->outlineParser()->setLineParsed(PROCESS_T);
break;
}
case 86 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(RECORD_T);
+ parser->outlineParser()->setLineParsed(RECORD_T);
break;
}
case 100 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(SIGNAL_T);
+ parser->outlineParser()->setLineParsed(SIGNAL_T);
break;
}
case 107 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(SUBTYPE_T);
+ parser->outlineParser()->setLineParsed(SUBTYPE_T);
break;
}
case 111 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(TYPE_T);
+ parser->outlineParser()->setLineParsed(TYPE_T);
break;
}
case 113 : {
image.append(input_stream->GetSuffix(jjimageLen + (lengthOfMatch = jjmatchedPos + 1)));
- ::vhdl::parser::VhdlParser::setLineParsed(UNITS_T);
+ parser->outlineParser()->setLineParsed(UNITS_T);
break;
}
case 137 : {
image.append(jjstrLiteralImages[137]);
lengthOfMatch = jjstrLiteralImages[137].length();
- ::vhdl::parser::VhdlParser::setLineParsed(SEMI_T);
+ parser->outlineParser()->setLineParsed(SEMI_T);
break;
}
default :
@@ -3627,7 +3664,7 @@ void VhdlParserTokenManager::TokenLexicalActions(Token *matchedToken){
}
}
/** Reinitialise parser. */
- void VhdlParserTokenManager::ReInit(JAVACC_CHARSTREAM *stream, int lexState, VhdlParser *parserArg) {
+ void VhdlParserTokenManager::ReInit(JAVACC_CHARSTREAM *stream, int lexState) {
clear();
jjmatchedPos = jjnewStateCnt = 0;
curLexState = lexState;
@@ -3635,22 +3672,20 @@ void VhdlParserTokenManager::TokenLexicalActions(Token *matchedToken){
ReInitRounds();
debugStream = stdout; // init
SwitchTo(lexState);
- parser = parserArg;
errorHandler = new TokenManagerErrorHandler();
- errorHandlerCreated = true;
}
void VhdlParserTokenManager::ReInitRounds() {
int i;
jjround = 0x80000001;
- for (i = 81; i-- > 0;)
+ for (i = 87; i-- > 0;)
jjrounds[i] = 0x80000000;
}
/** Switch to specified lex state. */
void VhdlParserTokenManager::SwitchTo(int lexState) {
if (lexState >= 1 || lexState < 0) {
- JAVACC_STRING_TYPE message;
+ JJString message;
#ifdef WIDE_CHAR
message += L"Error: Ignoring invalid lexical state : ";
message += lexState; message += L". State unchanged.";
@@ -3664,11 +3699,11 @@ void VhdlParserTokenManager::TokenLexicalActions(Token *matchedToken){
}
/** Constructor. */
- VhdlParserTokenManager::VhdlParserTokenManager (JAVACC_CHARSTREAM *stream, int lexState, VhdlParser *parserArg)
+ VhdlParserTokenManager::VhdlParserTokenManager (JAVACC_CHARSTREAM *stream, int lexState)
+ : TokenParser()
{
- input_stream = NULL;
- errorHandlerCreated = false;
- ReInit(stream, lexState, parserArg);
+ input_stream = nullptr;
+ ReInit(stream, lexState);
}
// Destructor
@@ -3681,7 +3716,7 @@ void VhdlParserTokenManager::TokenLexicalActions(Token *matchedToken){
//Since input_stream was generated outside of TokenManager
//TokenManager should not take care of deleting it
//if (input_stream) delete input_stream;
- if (errorHandlerCreated) delete errorHandler;
+ if (errorHandler) delete errorHandler, errorHandler = nullptr;
}
diff --git a/vhdlparser/VhdlParserTokenManager.h b/vhdlparser/VhdlParserTokenManager.h
index 96a2449..2837737 100644
--- a/vhdlparser/VhdlParserTokenManager.h
+++ b/vhdlparser/VhdlParserTokenManager.h
@@ -7,79 +7,52 @@
#include "ErrorHandler.h"
#include "TokenManager.h"
#include "VhdlParserConstants.h"
-#include "VhdlParser.h"
+#include "vhdlstring.h"
+
namespace vhdl {
namespace parser {
class VhdlParser;
/** Token Manager. */
-class VhdlParserTokenManager : public TokenManager {
- public:
+class VhdlParserTokenManager : public TokenManager, public TokenParser {
+public:
- /** Debug output. */
FILE *debugStream;
- /** Set debug output. */
-
-void setDebugStream(FILE *ds);
-
+ void setDebugStream(FILE *ds);
int jjStopAtPos(int pos, int kind);
-
int jjMoveStringLiteralDfa0_0();
-
int jjMoveStringLiteralDfa1_0(unsigned long long active0, unsigned long long active1, unsigned long long active2);
-
int jjMoveStringLiteralDfa2_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1, unsigned long long old2, unsigned long long active2);
-
int jjMoveStringLiteralDfa3_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1, unsigned long long old2, unsigned long long active2);
-
int jjMoveStringLiteralDfa4_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa5_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa6_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa7_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa8_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa9_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa10_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa11_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa12_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa13_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa14_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa15_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa16_0(unsigned long long old0, unsigned long long active0, unsigned long long old1, unsigned long long active1);
-
int jjMoveStringLiteralDfa17_0(unsigned long long old1, unsigned long long active1);
-
int jjMoveNfa_0(int startState, int curPos);
-
bool jjCanMove_0(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2);
-
bool jjCanMove_1(int hiByte, int i1, int i2, unsigned long long l1, unsigned long long l2);
-
Token * jjFillToken();
-public: int curLexState;
-public: int jjnewStateCnt;
-public: int jjround;
-public: int jjmatchedPos;
-public: int jjmatchedKind;
-
+public:
+ int curLexState;
+ int jjnewStateCnt;
+ int jjround;
+ int jjmatchedPos;
+ int jjmatchedKind;
Token * getNextToken();
-
void SkipLexicalActions(Token *matchedToken);
-
void TokenLexicalActions(Token *matchedToken);
#define jjCheckNAdd(state)\
{\
@@ -111,31 +84,33 @@ void TokenLexicalActions(Token *matchedToken);
#ifndef JAVACC_CHARSTREAM
#define JAVACC_CHARSTREAM CharStream
#endif
- private: VhdlParser*parser;
- private: void ReInitRounds();
- public: VhdlParserTokenManager(JAVACC_CHARSTREAM *stream, int lexState = 0, VhdlParser *parserArg = NULL);
- public: virtual ~VhdlParserTokenManager();
- void ReInit(JAVACC_CHARSTREAM *stream, int lexState = 0, VhdlParser *parserArg = NULL);
+
+private:
+ void ReInitRounds();
+
+public:
+ VhdlParserTokenManager(JAVACC_CHARSTREAM *stream, int lexState = 0);
+ virtual ~VhdlParserTokenManager();
+ void ReInit(JAVACC_CHARSTREAM *stream, int lexState = 0);
void SwitchTo(int lexState);
void clear();
- const JAVACC_SIMPLE_STRING jjKindsForBitVector(int i, unsigned long long vec);
- const JAVACC_SIMPLE_STRING jjKindsForStateVector(int lexState, int vec[], int start, int end);
+ const JJSimpleString jjKindsForBitVector(int i, unsigned long long vec);
+ const JJSimpleString jjKindsForStateVector(int lexState, int vec[], int start, int end);
+
JAVACC_CHARSTREAM* input_stream;
- int jjrounds[81];
- int jjstateSet[2 * 81];
- JAVACC_STRING_TYPE jjimage;
- JAVACC_STRING_TYPE image;
+ int jjrounds[87];
+ int jjstateSet[2 * 87];
+ JJString jjimage;
+ JJString image;
int jjimageLen;
int lengthOfMatch;
- JAVACC_CHAR_TYPE curChar;
- TokenManagerErrorHandler* errorHandler;
- bool errorHandlerCreated;
+ JJChar curChar;
+ TokenManagerErrorHandler* errorHandler = nullptr;
public:
void setErrorHandler(TokenManagerErrorHandler *eh) {
- if (errorHandlerCreated && errorHandler != NULL) delete errorHandler;
+ if (errorHandler) delete errorHandler, errorHandler = nullptr;
errorHandler = eh;
- errorHandlerCreated = false;
}
};
diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj
index 3151528..d9d1136 100644..100755
--- a/vhdlparser/vhdlparser.jj
+++ b/vhdlparser/vhdlparser.jj
@@ -15,8 +15,10 @@ options {
NAMESPACE = "vhdl::parser";
STATIC=false;
PARSER_INCLUDES="vhdljjparser.h";
- TOKEN_MANAGER_INCLUDES="VhdlParser.h";
-
+ TOKEN_MANAGER_INCLUDES="vhdlstring.h";
+ // TOKEN_MANAGER_USES_PARSER = true;
+ TOKEN_MANAGER_SUPER_CLASS = "TokenParser";
+ // DEBUG_PARSER = true;
//OUTPUT_DIRECTORY = ".";
//DEBUG_PARSER=true;
//DEBUG_LOOKAHEAD=true;
@@ -25,56 +27,71 @@ options {
PARSER_BEGIN(VhdlParser)
-typedef unsigned long long uint64;
-
-static Entry* current_root;
-static Entry* tempEntry;
-static Entry* lastEntity ;
-static Entry* lastCompound ;
-static std::shared_ptr<Entry> current;
-static QCString compSpec;
-static QCString currName;
-static int levelCounter;
-static QCString confName;
-static QCString genLabels;
-static QCString lab;
-static QCString forL;
-static int param_sec ;
-static int parse_sec;
-static int currP;
+
+struct SharedState
+{
+ std::shared_ptr<Entry> current_root;
+ std::shared_ptr<Entry> tempEntry;
+ std::shared_ptr<Entry> lastEntity;
+ std::shared_ptr<Entry> lastCompound;
+ std::shared_ptr<Entry> current;
+ QCString compSpec;
+ QCString currName;
+ int levelCounter = 0;
+ QCString confName;
+ QCString genLabels;
+ QCString lab;
+ int param_sec = 0;
+ int parse_sec = 0;
+ int currP = 0;
+};
+
+VHDLOutlineParser *m_outlineParser;
+SharedState *m_sharedState;
+
+void setOutlineParser(VHDLOutlineParser* p) { m_outlineParser=p; }
+VHDLOutlineParser *outlineParser() const { return m_outlineParser; }
+void setSharedState(SharedState *s) { m_sharedState=s; }
+void clearError() { hasError = false; }
+
+
+
+
+//typedef unsigned long long uint64;
//----------------------------------------
-static void setLineParsed(int tok);
-static int getLine(int tok);
-static int getLine();
-static void lineCount(const char*);
-static void lineCount();
-static void addProto(const char *s1,const char *s2,const char *s3,const char *s4,const char *s5,const char *s6);
-static void addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool inlineConf);
-static void createFunction(const char *impure,uint64 spec,const char *fname);
-static void addVhdlType(const char *n,int startLine,int section, uint64 spec,const char* args,const char* type,Protection prot);
-static void addCompInst(const char *n, const char* instName, const char* comp,int iLine);
-static void handleCommentBlock(const char* doc,bool brief);
-static void handleFlowComment(const char*);
-static void initEntry(Entry *e);
-static void newEntry();
-static bool isFuncProcProced();
-static void pushLabel(QCString &,QCString&);
-static QCString popLabel(QCString & q);
-static bool addLibUseClause(const QCString &type);
-static void mapLibPackage( Entry* root);
-static void createFlow();
-static void error_skipto(int kind);
-static void oneLineComment(QCString qcs);
-static void setMultCommentLine();
+//void setLineParsed(int tok);
+//int getLine(int tok);
+//int getLine();
+//void lineCount(const char*);
+//void lineCount();
+//void outlineParser()->addProto(const char *s1,const char *s2,const char *s3,const char *s4,const char *s5,const char *s6);
+//void addConfigureNode(const char* a,const char*b, bool,bool isLeaf,bool inlineConf);
+//void createFunction(const char *impure,uint64 spec,const char *fname);
+//void outlineParser()->addVhdlType(const char *n,int startLine,int section, uint64 spec,const char* args,const char* type,Protection prot);
+//void outlineParser()->addCompInst(const char *n, const char* instName, const char* comp,int iLine);
+//void handleCommentBlock(const char* doc,bool brief);
+//void handleFlowComment(const char*);
+//void initEntry(Entry *e);
+//void outlineParser()->newEntry();
+//bool isFuncProcProced();
+//void pushLabel(QCString &,QCString&);
+//QCString popLabel(QCString & q);
+//bool addLibUseClause(const QCString &type);
+//void mapLibPackage( Entry* root);
+//void createFlow();
+//void outlineParser()->error_skipto(int kind);
+//void oneLineComment(QCString qcs);
+//void setMultCommentLine();
+
PARSER_END(VhdlParser)
SKIP :
{
" "
| "\t"
-| "\n" {::vhdl::parser::VhdlParser::lineCount();}
+| "\n" {parser->outlineParser()->lineCount();}
| "\r"
}
@@ -87,20 +104,20 @@ SKIP:
{
{
QCString doc(image.data());
- int count=doc.contains("--!");
- ::vhdl::parser::VhdlParser::setMultCommentLine();
- ::vhdl::parser::VhdlParser::lineCount(image.data());
+ int count=doc.contains("--!");
+ parser->outlineParser()->setMultCommentLine();
+ parser->outlineParser()->lineCount(image.data());
if (count == 1)
- ::vhdl::parser::VhdlParser::oneLineComment(doc);
+ parser->outlineParser()->oneLineComment(doc);
else
- ::vhdl::parser::VhdlParser::handleCommentBlock(image.data(),FALSE); ;
+ parser->outlineParser()->handleCommentBlock(image.data(),FALSE); ;
}
}
- |<VHDL_FLOWCHART_COMMENT: "--#" (~["\n", "\r"])* ("\n" | "\r" | "\r\n")?> { ::vhdl::parser::VhdlParser::handleFlowComment(image.data());}
+ |<VHDL_FLOWCHART_COMMENT: "--#" (~["\n", "\r"])* ("\n" | "\r" | "\r\n")?> { parser->outlineParser()->handleFlowComment(image.data());}
|<VHDL_COMMENT: "--" (~["\n", "\r"])* ("\n" | "\r" | "\r\n")?>
{
- ::vhdl::parser::VhdlParser::lineCount(image.data());}
+ parser->outlineParser()->lineCount(image.data());}
}
// VHDL 2008 comment /* .... */
@@ -111,12 +128,12 @@ SKIP :
{
{
QCString q = filter2008VhdlComment(image.data());
- ::vhdl::parser::VhdlParser::handleCommentBlock(q.data(),TRUE);image.clear();
+ parser->outlineParser()->handleCommentBlock(q.data(),TRUE);image.clear();
}
}
| <MULT_VHDL_2008_COMMENT : "/*" (~["*"])* "*" ("*" | ~["*","/"] (~["*"])* "*")* "/">
{
- ::vhdl::parser::VhdlParser::lineCount(image.data());image.clear();}
+ parser->outlineParser()->lineCount(image.data());image.clear();}
}
/* KEYWORDS */
@@ -129,39 +146,39 @@ TOKEN [IGNORE_CASE] :
| <ALIAS_T: "alias">
| <ALL_T: "all">
| <AND_T: "and">
-| <ARCHITECTURE_T: "architecture"> {::vhdl::parser::VhdlParser::setLineParsed(ARCHITECTURE_T);}
-| <ARRAY_T: "array"> {VhdlParser::setLineParsed(ARRAY_T);}
+| <ARCHITECTURE_T: "architecture"> {parser->outlineParser()->setLineParsed(ARCHITECTURE_T);}
+| <ARRAY_T: "array"> {parser->outlineParser()->setLineParsed(ARRAY_T);}
| <ASSERT_T: "assert">
| <ASSUME_T: "assume">
| <ASSUME_GUARANTEE_T: "assume_guarantee">
-| <ATTRIBUTE_T: "attribute"> {::vhdl::parser::VhdlParser::setLineParsed(ATTRIBUTE_T);}
+| <ATTRIBUTE_T: "attribute"> {parser->outlineParser()->setLineParsed(ATTRIBUTE_T);}
| <BEGIN_T: "begin">
| <BLOCK_T: "block">
-| <BODY_T: "body"> {::vhdl::parser::VhdlParser::setLineParsed(BODY_T);}
+| <BODY_T: "body"> {parser->outlineParser()->setLineParsed(BODY_T);}
| <BUFFER_T: "buffer">
| <BUS_T: "bus">
-| <COMPONENT_T: "component"> {VhdlParser::setLineParsed(COMPONENT_T);}
+| <COMPONENT_T: "component"> {parser->outlineParser()->setLineParsed(COMPONENT_T);}
| <CASE_T: "case">
-| <CONFIGURATION_T: "configuration"> {VhdlParser::setLineParsed(CONFIGURATION_T);}
-| <CONSTANT_T: "constant"> {VhdlParser::setLineParsed(CONSTANT_T);}
-| <CONTEXT_T: "context"> {VhdlParser::setLineParsed(CONTEXT_T);}
+| <CONFIGURATION_T: "configuration"> {parser->outlineParser()->setLineParsed(CONFIGURATION_T);}
+| <CONSTANT_T: "constant"> {parser->outlineParser()->setLineParsed(CONSTANT_T);}
+| <CONTEXT_T: "context"> {parser->outlineParser()->setLineParsed(CONTEXT_T);}
| <COVER_T: "cover">
| <DEFAULT_T: "default">
| <DISCONNECT_T: "disconnect">
| <DOWNTO_T: "downto">
| <ELSE_T: "else">
| <ELSIF_T: "elsif">
-| <END_T: "end"> {VhdlParser::setLineParsed(END_T);}
-| <ENTITY_T: "entity"> {VhdlParser::setLineParsed(ENTITY_T);}
+| <END_T: "end"> {parser->outlineParser()->setLineParsed(END_T);}
+| <ENTITY_T: "entity"> {parser->outlineParser()->setLineParsed(ENTITY_T);}
| <EXIT_T: "exit">
| <FAIRNESS_T: "fairness">
-| <FILE_T: "file"> {VhdlParser::setLineParsed(FILE_T);}
+| <FILE_T: "file"> {parser->outlineParser()->setLineParsed(FILE_T);}
| <FOR_T: "for">
| <FORCE_T: "force">
-| <FUNCTION_T: "function"> {VhdlParser::setLineParsed(FUNCTION_T);}
+| <FUNCTION_T: "function"> {parser->outlineParser()->setLineParsed(FUNCTION_T);}
| <GENERATE_T: "generate">
| <GENERIC_T: "generic">
-| <GROUP_T: "group"> {VhdlParser::setLineParsed(GROUP_T);}
+| <GROUP_T: "group"> {parser->outlineParser()->setLineParsed(GROUP_T);}
| <GUARDED_T: "guarded">
| <IF_T: "if">
| <IMPURE_T: "impure">
@@ -170,7 +187,7 @@ TOKEN [IGNORE_CASE] :
| <INOUT_T: "inout">
| <IS_T: "is">
| <LABEL_T: "label">
-| <LIBRARY_T: "library"> {VhdlParser::setLineParsed(LIBRARY_T);}
+| <LIBRARY_T: "library"> {parser->outlineParser()->setLineParsed(LIBRARY_T);}
| <LINKAGE_T: "linkage">
| <LITERAL_T: "literal">
| <LOOP_T: "loop">
@@ -188,17 +205,17 @@ TOKEN [IGNORE_CASE] :
| <OR_T: "or">
| <OTHER_T: "others">
| <OUT_T: "out">
-| <PACKAGE_T: "package"> {::vhdl::parser::VhdlParser::setLineParsed(PACKAGE_T);}
+| <PACKAGE_T: "package"> {parser->outlineParser()->setLineParsed(PACKAGE_T);}
| <PARAMETER_T: "parameter">
-| <PORT_T: "port"> {::vhdl::parser::VhdlParser::setLineParsed(PORT_T);}
+| <PORT_T: "port"> {parser->outlineParser()->setLineParsed(PORT_T);}
| <POSTPONED_T: "postponed">
-| <PROCEDURE_T: "procedure"> {::vhdl::parser::VhdlParser::setLineParsed(PROCEDURE_T);}
-| <PROCESS_T: "process"> {::vhdl::parser::VhdlParser::setLineParsed(PROCESS_T);}
+| <PROCEDURE_T: "procedure"> {parser->outlineParser()->setLineParsed(PROCEDURE_T);}
+| <PROCESS_T: "process"> {parser->outlineParser()->setLineParsed(PROCESS_T);}
| <PROPERTY_T: "property">
| <PROTECTED_T: "protected">
| <PURE_T: "pure">
| <RANGE_T: "range">
-| <RECORD_T: "record"> {::vhdl::parser::VhdlParser::setLineParsed(RECORD_T);}
+| <RECORD_T: "record"> {parser->outlineParser()->setLineParsed(RECORD_T);}
| <REGISTER_T: "register">
| <REJECT_T: "reject">
| <RELEASE_T: "release">
@@ -212,20 +229,20 @@ TOKEN [IGNORE_CASE] :
| <SELECT_T: "select">
| <SEQUENCE_T: "sequence">
| <SEVERITY_T: "severity">
-| <SIGNAL_T: "signal"> {::vhdl::parser::VhdlParser::setLineParsed(SIGNAL_T);}
+| <SIGNAL_T: "signal"> {parser->outlineParser()->setLineParsed(SIGNAL_T);}
| <SHARED_T: "shared">
| <SLA_T: "sla">
| <SLL_T: "sll">
| <SRA_T: "sra">
| <SRL_T: "srl">
| <STRONG_T: "strong">
-| <SUBTYPE_T: "subtype"> {::vhdl::parser::VhdlParser::setLineParsed(SUBTYPE_T);}
+| <SUBTYPE_T: "subtype"> {parser->outlineParser()->setLineParsed(SUBTYPE_T);}
| <THEN_T: "then">
| <TO_T: "to">
| <TRANSPORT_T: "transport">
-| <TYPE_T: "type"> {::vhdl::parser::VhdlParser::setLineParsed(TYPE_T);}
+| <TYPE_T: "type"> {parser->outlineParser()->setLineParsed(TYPE_T);}
| <UNAFFECTED_T: "unaffected">
-| <UNITS_T: "units"> {::vhdl::parser::VhdlParser::setLineParsed(UNITS_T);}
+| <UNITS_T: "units"> {parser->outlineParser()->setLineParsed(UNITS_T);}
| <UNTIL_T: "until">
| <USE_T: "use">
| <VARIABLE_T: "variable">
@@ -255,7 +272,7 @@ TOKEN :
| < COMMA_T: "," >
| < VARASSIGN_T: ":=" >
| < COLON_T: ":" >
-| < SEMI_T: ";" >{::vhdl::parser::VhdlParser::setLineParsed(SEMI_T);}
+| < SEMI_T: ";" >{parser->outlineParser()->setLineParsed(SEMI_T);}
| < LESSTHAN_T: "<=" >
| < GREATERTHAN_T: ">=" >
| < LT_T: "<" >
@@ -304,7 +321,7 @@ TOKEN:
| < #LETTER: (<UPPER_CASE_LETTER>|<LOWER_CASE_LETTER>) >
| < #UPPER_CASE_LETTER: ["A"-"Z"] >
| <BIT_STRING_LITERAL : (<DIGIT>)*<BASE_SPECIFIER>["\""](<LETTER_OR_DIGIT_OR_STD>((["_"])*<LETTER_OR_DIGIT_OR_STD>)*)["\""] >
- | <#BASE_SPECIFIER:["B","O","X","b","o","x","d","D"]>
+ | <#BASE_SPECIFIER: (<DIGIT>)*(["S","U"])*["B","O","X","b","o","x","d","D"] >
| <#STD_LOGIC:["0","1","L","H","X","Z","W","-","l","h","x","z","w"]>
| < #DIGIT: ["0"-"9"] >
| < #SPECIAL_CHARACTER: ["#","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","_","|"] >
@@ -313,6 +330,7 @@ TOKEN:
| < #LOWER_CASE_LETTER: ["a"-"z"] >
| < #QUOTE: ["\""] >
| <VHDL2008TOOLDIR : ["`"](<GRAPHIC_CHARACTER>|<STRINGLITERAL>)+ >
+ | <SPEC_ATTR: (["'"]["("]["'"](<GRAPHIC_CHARACTER>)["'"]) >
}
@@ -330,6 +348,7 @@ QCString access_type_definition() :
tok=<ACCESS_T> str1=subtype_indication() { str=tok->image.c_str(); return str+str1; }
}
+
QCString actual_designator() :
{QCString str;Token *t=0;}
{
@@ -337,11 +356,13 @@ t=<OPEN_T> { return t->image.c_str(); }
|
LOOKAHEAD(expression())
str=expression() { return str; }
-|
- LOOKAHEAD(name())
- str=name() { return str; }
+ |
+ str=identifier(){return str;}
}
+
+
+
QCString actual_parameter_part() :
{QCString s;}
{
@@ -356,6 +377,7 @@ QCString actual_part() :
|
<BOX_T> { return "<>";}
|
+ LOOKAHEAD(name() <LPAREN_T>)
s=name() <LPAREN_T> s1=actual_designator() <RPAREN_T> {s+="(";s+=s1+")";return s;}
}
@@ -380,7 +402,7 @@ QCString alias_declaration() : {QCString s,s1,s2;}
<IS_T> { s+=" is "; } s1=name() {s+=s1;} [s1=signature() {s+=s1;}]
<SEMI_T>
{
- addVhdlType(s2.data(),getLine(ALIAS_T),Entry::VARIABLE_SEC,VhdlDocGen::ALIAS,0,s.data(),Public);
+ outlineParser()->addVhdlType(s2.data(),outlineParser()->getLine(ALIAS_T),Entry::VARIABLE_SEC,VhdlDocGen::ALIAS,0,s.data(),Public);
return s2+" "+s+";";
}
@@ -395,29 +417,34 @@ QCString alias_designator() : {Token *tok=0;QCString s;}
void allocator() :{}
{
- LOOKAHEAD(3)
- <NEW_T> qualified_expression()
- | <NEW_T> subtype_indication()
+ LOOKAHEAD(3)
+ <NEW_T> qualified_expression()
+ | <NEW_T> subtype_indication()
}
void architecture_body() : {QCString s,s1;}
{
- <ARCHITECTURE_T> s=identifier() <OF_T> s1=name() <IS_T>
- {
- QCString t=s1+"::"+s;
- genLabels.resize(0);
- pushLabel(genLabels,s1);
- lastCompound=current.get();
- addVhdlType(t,getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
- }
- try{
- architecture_declarative_part()
- }catch(...){error_skipto(BEGIN_T);}
- <BEGIN_T>
- architecture_statement_part()
+ <ARCHITECTURE_T> s=identifier() <OF_T> s1=name() <IS_T>
+ {
+ QCString t=s1+"::"+s;
+ m_sharedState->genLabels.resize(0);
+ outlineParser()->pushLabel(m_sharedState->genLabels,s1);
+ m_sharedState->lastCompound=m_sharedState->current;
+ outlineParser()->addVhdlType(t,outlineParser()->getLine(ARCHITECTURE_T),Entry::CLASS_SEC,VhdlDocGen::ARCHITECTURE,0,0,Private);
+ }
+ try
+ {
+ architecture_declarative_part()
+ }
+ catch(...)
+ {
+ outlineParser()->error_skipto(BEGIN_T);
+ }
+ <BEGIN_T>
+ architecture_statement_part()
<END_T> [<ARCHITECTURE_T>] [name()] <SEMI_T>
- { lastEntity=0;lastCompound=0; genLabels.resize(0); }
+ { m_sharedState->lastEntity=0;m_sharedState->lastCompound=0; m_sharedState->genLabels.resize(0); }
}
void architecture_declarative_part() : {}
@@ -435,11 +462,11 @@ void architecture_statement_part() : {}
QCString array_type_definition (): { QCString s;}
{
- LOOKAHEAD(unconstraint_array_definition())
-
- s=unconstraint_array_definition() {return s;}
- | s=constraint_array_definition() {return s;}
-
+ LOOKAHEAD(<ARRAY_T> index_constraint() <OF_T>)
+ s=constraint_array_definition() {return s;}
+ |
+ s=unconstraint_array_definition() {return s;}
+
}
QCString assertion() : {QCString s,s1,s2;Token *t=0;Token *t1=0;}
@@ -476,7 +503,7 @@ QCString attribute_declaration() : {QCString s,s1;}
{
<ATTRIBUTE_T> s=identifier() <COLON_T> s1=type_mark() <SEMI_T>
{
- addVhdlType(s.data(),getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,s1.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,s1.data(),Public);
return " attribute "+s+":"+s1+";";
}
}
@@ -487,18 +514,18 @@ QCString attribute_designator (): {QCString s;Token *tok=0;}
| tok=<RANGE_T> { return tok->image.c_str(); }
}
+
QCString attribute_name (): {QCString s,s1;}
{
- s=identifier() <APOSTROPHE_T> s1=name(){ s+="'"+s1; }[LOOKAHEAD(1)<LPAREN_T>s1=expression() <RPAREN_T> {s+"("+s1+")";}] { return s; }
-}
-
+ s=identifier() <APOSTROPHE_T> (<RANGE_T> | s1=name()) { s+=s1; }[LOOKAHEAD(1)<LPAREN_T>s1=expression() <RPAREN_T> {s+=s1;}] { return s; }
+ }
QCString attribute_specification(): {QCString s,s1,s2;}
{
<ATTRIBUTE_T> s=attribute_designator() <OF_T> s1=entity_specification() <IS_T> s2=expression() <SEMI_T>
{
QCString t= s1+" is "+s2;
- addVhdlType(s.data(),getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,t.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(ATTRIBUTE_T),Entry::VARIABLE_SEC,VhdlDocGen::ATTRIBUTE,0,t.data(),Public);
return " attribute "+s+" of "+s1+ " is "+s2+";";
}
}
@@ -563,7 +590,6 @@ void block_configuration() : {}
void block_declarative_item (): {}
{
subprogram_declaration()
-//| subprogram_body()
| type_declaration()
| subtype_declaration()
| constant_declaration()
@@ -599,20 +625,20 @@ void block_header() : {}
void block_specification() : {}
{
- name()[LOOKAHEAD(1) <LPAREN_T> index_specification() <RPAREN_T>]
+ name() [ <LPAREN_T> index_specification() <RPAREN_T> ]
}
void block_statement() : {QCString s;}
{
s=identifier() <COLON_T>
- <BLOCK_T> { pushLabel(genLabels,s); }[ <LPAREN_T> expression() <RPAREN_T> ] [ <IS_T> ]
+ <BLOCK_T> { outlineParser()->pushLabel(m_sharedState->genLabels,s); }[ <LPAREN_T> expression() <RPAREN_T> ] [ <IS_T> ]
block_header()
block_declarative_part()
<BEGIN_T>
block_statement_part()
<END_T> <BLOCK_T> [ identifier() ] <SEMI_T>
{
- genLabels=popLabel(genLabels);
+ m_sharedState->genLabels=outlineParser()->popLabel(m_sharedState->genLabels);
}
}
@@ -623,7 +649,7 @@ void block_statement_part() : {}
void case_statement() : {QCString s;}
{
-[ identifier() <COLON_T> ]
+[ identifier() [<Q_T>] <COLON_T> ]
<CASE_T> s=expression()
{
QCString ca="case "+s;
@@ -636,7 +662,7 @@ void case_statement() : {QCString s;}
{
FlowChart::moveToPrevLevel();
FlowChart::addFlowChart(FlowChart::END_CASE,"end case",0);
- }
+ }
}
void case_statement_alternative() : {QCString s;}
@@ -657,17 +683,20 @@ QCString character_literal() : {Token *tok=0;}
QCString choice() : {QCString s;}
{
- LOOKAHEAD(discrete_range())
- s=discrete_range(){ return s; }
+ LOOKAHEAD(simple_expression() direction ())
+ s=range() { return s;}
|
LOOKAHEAD(simple_expression())
s=simple_expression(){ return s; }
+ |
+ LOOKAHEAD(discrete_range())
+ s=discrete_range(){ return s; }
|
- LOOKAHEAD(identifier())
- s=identifier(){ return s; }
+ s=identifier(){ return s; }
| <OTHER_T> { return " others "; }
}
+
QCString choices() : {QCString s,s1;}
{
s=choice() (<BAR_T> s1=choice(){s+="|";s+=s1;})* { return s; }
@@ -683,12 +712,12 @@ void component_configuration () :{}
void component_declaration() : {QCString s;}
{
<COMPONENT_T> s=identifier() [ <IS_T> ]
- { currP=VhdlDocGen::COMPONENT; }
+ { m_sharedState->currP=VhdlDocGen::COMPONENT; }
[ generic_clause() ]
[ port_clause() ]
{
- addVhdlType(s.data(),getLine(COMPONENT_T),Entry::VARIABLE_SEC,VhdlDocGen::COMPONENT,0,0,Public);
- currP=0;
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(COMPONENT_T),Entry::VARIABLE_SEC,VhdlDocGen::COMPONENT,0,0,Public);
+ m_sharedState->currP=0;
}
<END_T> <COMPONENT_T> [ identifier() ] <SEMI_T>
@@ -697,7 +726,7 @@ void component_declaration() : {QCString s;}
void component_instantiation_statement() : {QCString s,s1;}
{
-s=identifier() <COLON_T>
+ s=identifier() <COLON_T>
s1=instantiation_unit()
{
QCString s3;
@@ -706,7 +735,7 @@ s=identifier() <COLON_T>
s1=VhdlDocGen::getIndexWord(s1.data(),1);
}
- addCompInst(s.lower().data(),s1.lower().data(),s3.data(),getLine());
+ outlineParser()->addCompInst(s.lower().data(),s1.lower().data(),s3.data(),outlineParser()->getLine());
}
[ LOOKAHEAD(generic_map_aspect()) generic_map_aspect() ]
[ port_map_aspect() ] <SEMI_T>
@@ -771,12 +800,7 @@ component_instantiation_statement()
LOOKAHEAD(concurrent_procedure_call_statement())
concurrent_procedure_call_statement()
| <VHDL2008TOOLDIR>
- /*
- catch( ParseException e )
- {
- error_skipto(SEMI_T, "syntax error in declarative item");
- }
- */
+
}
QCString condition() : {QCString s;}
@@ -806,26 +830,20 @@ waveform()
[ <WHEN_T> condition() ]
}
-// ( waveform() < WHEN_T> condition() <ELSE_T> )*
-// waveform() [ <WHEN_T> condition() ]
-//waveform()
- // ( LOOKAHEAD( <WHEN> condition() <ELSE>)
- // <WHEN> condition() <ELSE> waveform() )*
- //[ <WHEN> condition() ]
void configuration_declaration() : {QCString s,s1;}
{
<CONFIGURATION_T> s=identifier() <OF_T> s1=name() <IS_T>
{
- confName=s+"::"+s1;
- addVhdlType(s.data(),getLine(CONFIGURATION_T),Entry::VARIABLE_SEC,VhdlDocGen::CONFIG,"configuration",s1.data(),Public);
+ m_sharedState->confName=s+"::"+s1;
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(CONFIGURATION_T),Entry::VARIABLE_SEC,VhdlDocGen::CONFIG,"configuration",s1.data(),Public);
}
configuration_declarative_part()
block_configuration()
<END_T> [ <CONFIGURATION_T> ] [ name() ] <SEMI_T>
- { genLabels.resize(0); confName="";}
+ { m_sharedState->genLabels.resize(0); m_sharedState->confName="";}
}
void configuration_declarative_item() : {}
@@ -860,7 +878,7 @@ QCString constant_declaration() : {QCString s,s1,s2;Token *t=0;}
if(t)
s2.prepend(":=");
QCString it=s1+s2;
- addVhdlType(s.data(),getLine(CONSTANT_T),Entry::VARIABLE_SEC,VhdlDocGen::CONSTANT,0,it.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(CONSTANT_T),Entry::VARIABLE_SEC,VhdlDocGen::CONSTANT,0,it.data(),Public);
it.prepend("constant ");
return it;
}
@@ -871,9 +889,10 @@ QCString constraint_array_definition (): {QCString s,s1;}
<ARRAY_T> s=index_constraint() <OF_T> s1=subtype_indication(){ return s+" "+s1;}
}
+
void context_clause (): {}
{
- (context_item())*
+ (LOOKAHEAD(3) context_item())*
}
QCString constraint () :{QCString s;}
@@ -889,6 +908,7 @@ void context_item() : {}
{
library_clause()
| use_clause()
+| context_ref()
}
QCString decimal_literal() : {Token *tok=0;}
@@ -956,15 +976,21 @@ return s1;
}
}
-QCString element_declaration() : {QCString s,s1;}
+QCString element_declaration() : {QCString rec_name,s1,s2;}
{
-s=identifier_list() <COLON_T> s1=subtype_indication() <SEMI_T>
+rec_name=identifier_list() <COLON_T> s1=subtype_indication() <SEMI_T>
{
-
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s1.data(),Public);
- //addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
- return s+":"+s1;
-}
+ QCString name;
+ QCStringList ql=QCStringList::split(",",rec_name);
+ for (uint j=0;j<ql.count();j++)
+ {
+ name=ql[j]+"~";
+ name+=outlineParser()->getNameID().data();;
+ outlineParser()->addVhdlType(name.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s1.data(),Public);
+ }
+ s2=rec_name+":"+s1;
+ return s2;
+ }
}
@@ -1011,17 +1037,17 @@ void entity_declaration() : {QCString s;}
// try{
<ENTITY_T> s=identifier() <IS_T>
{
- lastEntity=current.get();
- lastCompound=0;
- addVhdlType(s.data(),getLine(ENTITY_T),Entry::CLASS_SEC,VhdlDocGen::ENTITY,0,0,Public);
+ m_sharedState->lastEntity=m_sharedState->current;
+ m_sharedState->lastCompound=0;
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(ENTITY_T),Entry::CLASS_SEC,VhdlDocGen::ENTITY,0,0,Public);
}
entity_header()
entity_declarative_part ()
[ <BEGIN_T> entity_statement_part() ]
<END_T> [ <ENTITY_T> ] [ name() ]
- // }catch(...){error_skipto(SEMI_T);}
+ // }catch(...){outlineParser()->error_skipto(SEMI_T);}
<SEMI_T>
- { lastEntity=0;lastCompound=0; genLabels.resize(0); }
+ { m_sharedState->lastEntity=0;m_sharedState->lastCompound=0; m_sharedState->genLabels.resize(0); }
}
void entity_declarative_item() : {}
@@ -1064,17 +1090,19 @@ s=entity_tag() [ s1=signature() ] { return s+s1;}
void entity_header() : {}
{
- [ { currP=VhdlDocGen::GENERIC;parse_sec=GEN_SEC; } generic_clause()]
- [ { currP=VhdlDocGen::PORT; } port_clause()]
+ [ { m_sharedState->currP=VhdlDocGen::GENERIC;m_sharedState->parse_sec=GEN_SEC; } generic_clause()]
+ [ { m_sharedState->currP=VhdlDocGen::PORT; } port_clause()]
}
-QCString entity_name_list() : {QCString s,s1;}
+QCString entity_name_list() : {QCString s,s1,s2;}
{
-(s1=entity_designator() {s+=s1;})+ { return s;}
+(s1=entity_designator() ) (<COMMA_T> s=entity_designator() { s2+=s; } )* { return s2;}
| <OTHER_T> { return "other";}
| <ALL_T> {return "all";}
}
+
+
QCString entity_specification() : {QCString s,s1;}
{
s=entity_name_list() <COLON_T> s1=entity_class(){ return s+":"+s1;}
@@ -1120,7 +1148,7 @@ QCString exit_statement() : {QCString s,s1,s2;Token *t=0;Token *t1=0;}
[ s=identifier() t=<COLON_T> ] <EXIT_T> [ s1=identifier() ]
[ t1=<WHEN_T> s2=condition() ] <SEMI_T>
{
- lab.resize(0);
+ m_sharedState->lab.resize(0);
if(t) s+=":";
if(t1) s2.prepend(" when ");
FlowChart::addFlowChart(FlowChart::EXIT_NO,"exit",s2.data(),s1.data());
@@ -1155,6 +1183,9 @@ QCString factor(): {QCString s,s1;}
s=primary() [LOOKAHEAD(1) <DOUBLEMULT_T> s1=primary(){ s+="**";s+=s1;} ] { return s;}
| <ABS_T> s=primary(){ s1 = "abs "; return s1+s; }
| <NOT_T> s=primary(){s1="not ";return s1+s;}
+| <QQ_T> s=primary(){s1="?? ";return s1;}
+| s=logop() s1=primary() { return s;}
+
}
QCString file_declaration() : {QCString s,s1,s2,s3;}
@@ -1162,7 +1193,7 @@ QCString file_declaration() : {QCString s,s1,s2,s3;}
<FILE_T> s=identifier_list() <COLON_T> s2=subtype_indication() [ s3=file_open_information() ] <SEMI_T>
{
QCString t1=s2+" "+s3;
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,t1.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,t1.data(),Public);
return " file "+s+":"+s2+" "+s3+";";
}
}
@@ -1174,7 +1205,7 @@ QCString file_logical_name(): {QCString s;}
QCString file_open_information() : {QCString s,s1,s2;}
{
- [ <OPEN_T> s=expression() ] <IS_T> s1=file_logical_name() {s2="open "+s+" is "+s1; return s2; }
+ [ <OPEN_T> s=expression() ] <IS_T> [inout_stat()] s1=file_logical_name() {s2="open "+s+" is "+s1; return s2; }
}
QCString file_type_definition() : {QCString s,s1;}
@@ -1204,38 +1235,36 @@ QCString formal_part() : {QCString s,s1;}
s=name() [<LPAREN_T> formal_designator() <RPAREN_T> {s+"("+s1+")";}] {return s;}
}
-QCString full_type_declaration() : {Entry *tmpEntry;QCString s,s1,s2;}
-{
-<TYPE_T> s=identifier() <IS_T>
+QCString full_type_declaration() : { std::shared_ptr<Entry> tmpEntry;QCString s,s1,s2; }
{
- tmpEntry=current.get();
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,0,Public);
-}
- try{
- s2=type_definition()
- }catch(...){error_skipto(SEMI_T);}
- <SEMI_T>
- {
- if (s2.contains("#")) {
- VhdlDocGen::deleteAllChars(s2,'#');
- tmpEntry->spec=VhdlDocGen::RECORD;
- tmpEntry->type=s2.data();
- //addVhdlType(s.data(),getLine(TYPE_T),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,s2.data(),Public);
- }
- else if (s2.contains("%")) {
- VhdlDocGen::deleteAllChars(s2,'%');
- tmpEntry->spec=VhdlDocGen::UNITS;
- tmpEntry->type=s2.data();
- //addVhdlType(s.data(),getLine(TYPE_T),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,s2.data(),s2.data(),Public);
- }
- else {
- tmpEntry->spec=VhdlDocGen::TYPE;
- tmpEntry->type=s2.data();
- //addVhdlType(s.data(),getLine(TYPE_T),Entry::VARIABLE_SEC,VhdlDocGen::TYPE,0,s2.data(),Public);
- }
- tmpEntry=0;
- return "type "+s+" is "+s2+";";
+ <TYPE_T> s=identifier() <IS_T>
+ {
+ tmpEntry=m_sharedState->current;
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::RECORD,0,0,Public);
+ }
+
+ s2=type_definition()
+
+ <SEMI_T>
+ {
+ if (s2.contains("#")) {
+ VhdlDocGen::deleteAllChars(s2,'#');
+ tmpEntry->spec=VhdlDocGen::RECORD;
+ tmpEntry->type=s2.data();
+ }
+ else if (s2.contains("%")) {
+ VhdlDocGen::deleteAllChars(s2,'%');
+ tmpEntry->spec=VhdlDocGen::UNITS;
+ tmpEntry->type=s2.data();
}
+ else {
+ tmpEntry->spec=VhdlDocGen::TYPE;
+ tmpEntry->type=s2.data();
+ }
+
+ tmpEntry.reset();
+ return "type "+s+" is "+s2+";";
+ }
}
QCString function_call() : {QCString s,s1;}
@@ -1248,22 +1277,22 @@ void generate_statement() : {QCString s;}
s=identifier() <COLON_T>
try{
generate_scheme() <GENERATE_T>
- { pushLabel(genLabels,s); }
+ { outlineParser()->pushLabel(m_sharedState->genLabels,s); }
generate_statement_body1()
<END_T>
- }catch(...){error_skipto(GENERATE_T);}
- <GENERATE_T> [ identifier() ] <SEMI_T> {genLabels=popLabel(genLabels); }
+ }catch(...){outlineParser()->error_skipto(GENERATE_T);}
+ <GENERATE_T> [ identifier() ] <SEMI_T> {m_sharedState->genLabels=outlineParser()->popLabel(m_sharedState->genLabels); }
}
void generate_scheme() : {}
{
<FOR_T> parameter_specification()
-| <IF_T> condition()
+| <IF_T> [LOOKAHEAD(2) identifier() <COLON_T> ] condition()
}
void generic_clause() : {QCString s;}
{
- <GENERIC_T> <LPAREN_T> { parse_sec=GEN_SEC; } s=generic_list() <RPAREN_T> <SEMI_T> { parse_sec=0; }
+ <GENERIC_T> <LPAREN_T> { m_sharedState->parse_sec=GEN_SEC; } s=generic_list() <RPAREN_T> <SEMI_T> { m_sharedState->parse_sec=0; }
}
QCString generic_list() : {QCString s;}
@@ -1316,35 +1345,35 @@ QCString identifier() : {Token *tok=0;}
QCString identifier_list() : {QCString str,str1;}
{
- str=identifier() (<COMMA_T> str1=identifier() {str+=",";str+=str1;})* { return str; }
+ str=name() (<COMMA_T> str1=name() {str+=",";str+=str1;})* { return str; }
}
void if_statement() : {QCString s,s1;}
{
-[LOOKAHEAD(1) identifier() <COLON_T> ]
+ [LOOKAHEAD(1) identifier() <COLON_T> ]
<IF_T> s=condition() <THEN_T>
{
- s.prepend("if ");
- FlowChart::addFlowChart(FlowChart::IF_NO,0,s);
+ s.prepend("if ");
+ FlowChart::addFlowChart(FlowChart::IF_NO,0,s);
+ }
+ sequence_of_statement()
+ (
+ <ELSIF_T> s1=condition() <THEN_T>
+ {
+ s1.prepend("elsif ");
+ FlowChart::addFlowChart(FlowChart::ELSIF_NO,0,s1.data());
+ }
+ sequence_of_statement()
+ )*
+ [LOOKAHEAD(1) <ELSE_T>
+ {
+ FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
+ }
+ sequence_of_statement() ] <END_T> <IF_T> [ identifier() ] <SEMI_T>
+ {
+ FlowChart::moveToPrevLevel();
+ FlowChart::addFlowChart(FlowChart::ENDIF_NO,0,0);
}
- sequence_of_statement()
- (
- <ELSIF_T> s1=condition() <THEN_T>
- {
- s1.prepend("elsif ");
- FlowChart::addFlowChart(FlowChart::ELSIF_NO,0,s1.data());
- }
- sequence_of_statement()
- )*
- [LOOKAHEAD(1) <ELSE_T>
- {
- FlowChart::addFlowChart(FlowChart::ELSE_NO,0,0);
- }
- sequence_of_statement() ] <END_T> <IF_T> [ identifier() ] <SEMI_T>
- {
- FlowChart::moveToPrevLevel();
- FlowChart::addFlowChart(FlowChart::ENDIF_NO,0,0);
- }
}
QCString incomplete_type_declaration() : {QCString s;}
@@ -1359,7 +1388,7 @@ QCString index_constraint() : {QCString s="("; QCString s1,s2;}
{
//try{
<LPAREN_T> s2=discrete_range(){s+=s2;}(LOOKAHEAD(1)<COMMA_T> s1=discrete_range(){s+=",";s+=s1;})* <RPAREN_T> {return s+")";}
-//}catch(...){ error_skipto(SEMI_T);hasError=false;return "";}
+//}catch(...){ outlineParser()->error_skipto(SEMI_T);hasError=false;return "";}
}
QCString index_specification() : {QCString s;}
@@ -1403,8 +1432,9 @@ QCString interface_declaration() : {QCString s,s1;}
LOOKAHEAD(5)
s=interface_subprogram_declaration() { return s;}
-
-|interface_package_declaration() { return s;}
+|
+LOOKAHEAD(5)
+interface_package_declaration() { return s;}
|
LOOKAHEAD(5)
s=interface_variable_declaration() { return s;}
@@ -1417,68 +1447,67 @@ subprogram_declaration() { return s;}
|
s=object_class() s1=identifier()
{
- if (parse_sec==GEN_SEC)
-
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,currP,s1.data(),0,Public);
- return s;
- }
+ if (m_sharedState->parse_sec==GEN_SEC)
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,m_sharedState->currP,s1.data(),0,Public);
+ return s;
+ }
}
QCString interface_element() : {QCString s;}
{
-s=interface_declaration(){ return s;}
+ s=interface_declaration(){ return s;}
}
QCString interface_file_declaration() : {QCString s,s1;}
{
-<FILE_T> s=identifier_list() <COLON_T> s1=subtype_indication()
-{
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
- return " file "+s+":"+s1;
-}
+ <FILE_T> s=identifier_list() <COLON_T> s1=subtype_indication()
+ {
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::VFILE,0,s1.data(),Public);
+ return " file "+s+":"+s1;
+ }
}
QCString interface_list() : {QCString s,s1,s2;}
{
-s=interface_element() (LOOKAHEAD(1) <SEMI_T> s1=interface_element(){s2+=";";s2+=s1;})* { return s+s2;}
+ s=interface_element() (LOOKAHEAD(1) <SEMI_T> s1=interface_element(){s2+=";";s2+=s1;})* { return s+s2;}
}
QCString interface_variable_declaration() : {Token *tok=0;Token *tok1=0;Token *tok2=0;QCString s,s1,s2,s3,s4,s5;}
{
-[( tok=<VARIABLE_T> | tok=<SIGNAL_T> | tok=<CONSTANT_T>|tok=<SHARED_T>) ]
- s=identifier_list() <COLON_T> [ s1=mode() ]
- s2=subtype_indication() [ tok1=<BUS_T> ] [ tok2=<VARASSIGN_T> s4=expression() ]
-{
- if(tok)
- s5=tok->image.c_str();
+[ ( tok=<VARIABLE_T> | tok=<SIGNAL_T> | tok=<CONSTANT_T>|tok=<SHARED_T>) ]
+ s=identifier_list() <COLON_T> [ s1=mode() ]
+ s2=subtype_indication() [ tok1=<BUS_T> ] [ tok2=<VARASSIGN_T> s4=expression() ]
+ {
+ if(tok)
+ s5=tok->image.c_str();
- if(tok1)
- s3=tok1->image.data();
+ if(tok1)
+ s3=tok1->image.data();
- if(tok2)
- s3+=":=";
+ if(tok2)
+ s3+=":=";
- QCString it=s+":"+s1+" "+s2+" "+s3+" "+s4;
- if (currP!=VhdlDocGen::COMPONENT)
- {
- if (currP==VhdlDocGen::FUNCTION || currP==VhdlDocGen::PROCEDURE)
- {
- addProto(s5.data(),s.data(),s1.data(),s2.data(),s3.data(),s4.data());
- }
- else
- {
- QCString i=s2+s3+s4;
- if (currP==VhdlDocGen::GENERIC && param_sec==0)
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,currP,i.data(),s1.data(),Public);
- else if(parse_sec != GEN_SEC)
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,currP,i.data(),s1.data(),Public);
- }
- // fprintf(stderr,"\n\n <<port %s >>\n",$$.data());
- } // if component
- return it;
- }
+ QCString it=s+":"+s1+" "+s2+" "+s3+" "+s4;
+ if (m_sharedState->currP!=VhdlDocGen::COMPONENT)
+ {
+ if (m_sharedState->currP==VhdlDocGen::FUNCTION || m_sharedState->currP==VhdlDocGen::PROCEDURE)
+ {
+ outlineParser()->addProto(s5.data(),s.data(),s1.data(),s2.data(),s3.data(),s4.data());
+ }
+ else
+ {
+ QCString i=s2+s3+s4;
+ if (m_sharedState->currP==VhdlDocGen::GENERIC && m_sharedState->param_sec==0)
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,m_sharedState->currP,i.data(),s1.data(),Public);
+ else if(m_sharedState->parse_sec != GEN_SEC)
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,m_sharedState->currP,i.data(),s1.data(),Public);
+ }
+ // fprintf(stderr,"\n\n <<port %s >>\n",$$.data());
+ } // if component
+ return it;
+ }
}
QCString iteration_scheme() : {QCString s;}
@@ -1486,15 +1515,15 @@ QCString iteration_scheme() : {QCString s;}
<WHILE_T> s=condition()
{
s.prepend("while ");
- FlowChart::addFlowChart(FlowChart::WHILE_NO,0,s.data(),lab.data());
- lab="";
+ FlowChart::addFlowChart(FlowChart::WHILE_NO,0,s.data(),m_sharedState->lab.data());
+ m_sharedState->lab="";
return s;
}
| <FOR_T> s=parameter_specification()
{
- QCString q=lab+" for "+s;
- FlowChart::addFlowChart(FlowChart::FOR_NO,0,q.data(),lab.data());
- lab="";
+ QCString q=m_sharedState->lab+" for "+s;
+ FlowChart::addFlowChart(FlowChart::FOR_NO,0,q.data(),m_sharedState->lab.data());
+ m_sharedState->lab="";
return q;
}
}
@@ -1509,9 +1538,9 @@ QCString library_clause() : {QCString s;}
(<LIBRARY_T> s=identifier_list() <SEMI_T>
)
{
- if ( parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
+ if ( m_sharedState->parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
{
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,s.data(),"_library_",Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,s.data(),"_library_",Public);
}
QCString s1="library "+s;
return s1;
@@ -1523,7 +1552,7 @@ QCString library_unit() : {QCString s;}
LOOKAHEAD(2)
primary_unit() { return s; }
| secondary_unit() { return s; }
-| context_declaration()
+
}
@@ -1595,15 +1624,17 @@ tok=<MULT_T> { return tok->image.c_str(); }
}
- QCString name() : {QCString s,s1;}
+QCString name() : {QCString s,s1;}
{
(
- s=operator_symbol()
- | s=identifier()| s=external_name()
+ s=operator_symbol() [LOOKAHEAD(name_ext1()) s1=name_ext1(){ s+=s1;}] { return s; }
+ |s=external_name() [LOOKAHEAD(name_ext1()) s1=name_ext1(){ s+=s1;}] { return s; }
+ | s=identifier() [LOOKAHEAD(name_ext1()) s1=name_ext1(){ s+=s1;}] { return s; }
)
- [LOOKAHEAD(name_ext1()) s1=name_ext1(){ s+=s1;}] { return s; }
+
}
+
QCString name_ext1() : {QCString s,s1,s2;}
{
s=name_ext() (LOOKAHEAD(name_ext()) s1=name_ext(){s+=s1;})* { return s;}
@@ -1614,22 +1645,22 @@ QCString name_ext1() : {QCString s,s1,s2;}
(
LOOKAHEAD(<APOSTROPHE_T><SUBTYPE_T>)
- <APOSTROPHE_T><SUBTYPE_T>{s+="'subtype";}
+ <APOSTROPHE_T><SUBTYPE_T>{s+="'subtype"; return s;}
|
LOOKAHEAD(<DOT_T> suffix())
- <DOT_T> s1=suffix(){s+=".";s+=s1;}
+ <DOT_T> s1=suffix(){s+=".";s+=s1; return s;}
|
LOOKAHEAD(test_att_name())
- s1=test_att_name() { s+=s1;}
+ s1=test_att_name() { s+=s1;return s;}
|
LOOKAHEAD( <LPAREN_T> discrete_range() <RPAREN_T>)
- <LPAREN_T> s1=discrete_range() <RPAREN_T> {s+="(";s+=s1;s+=")";}
+ <LPAREN_T> s1=discrete_range() <RPAREN_T> {s+="(";s+=s1;s+=")";return s;}
|
LOOKAHEAD( "(" expression() ("," expression() )* ")" )
- <LPAREN_T> s1=expression() {s+="(";s+=s1;} (LOOKAHEAD(1) <COMMA_T> s1=expression(){s+=",";s+=s1;})* <RPAREN_T> { s+=")";}
+ <LPAREN_T> s1=expression() {s+="(";s+=s1;} (LOOKAHEAD(1) <COMMA_T> s1=expression(){s+=",";s+=s1;})* <RPAREN_T> { s+=")";return s;}
)
- {return s;}
+
}
QCString test_att_name() : {QCString s,s1;}
@@ -1647,12 +1678,12 @@ QCString name_ext1() : {QCString s,s1,s2;}
QCString next_statement() : {QCString s,s1,s2;Token *t=0;Token *t1=0;}
{
-[LOOKAHEAD(1) s=identifier() t=<COLON_T> ] <NEXT_T> [ s1=identifier() ]
-[LOOKAHEAD(1) t1=<WHEN_T> s2=condition() ] <SEMI_T>
+[ s=identifier() t=<COLON_T> ] <NEXT_T> [ s1=identifier() ]
+[ t1=<WHEN_T> s2=condition() ] <SEMI_T>
{
if(t) s+=":";
FlowChart::addFlowChart(FlowChart::NEXT_NO,"next ",s2.data(),s1.data());
- lab.resize(0);
+ m_sharedState->lab.resize(0);
if(t1) s2.prepend("when ");
return s+s1+s2+";";
}
@@ -1695,19 +1726,19 @@ void package_body() : {QCString s;}
{
<PACKAGE_T> <BODY_T> s=name() <IS_T>
{
- lastCompound=current.get();
+ m_sharedState->lastCompound=m_sharedState->current;
s.prepend("_");
- addVhdlType(s,getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
+ outlineParser()->addVhdlType(s,outlineParser()->getLine(),Entry::CLASS_SEC,VhdlDocGen::PACKAGE_BODY,0,0,Protected);
}
package_body_declarative_part()
-<END_T> [<PACKAGE_T> <BODY_T> ] [ name() ] <SEMI_T> { lastCompound=0; genLabels.resize(0); }
+<END_T> [<PACKAGE_T> <BODY_T> ] [ name() ] <SEMI_T> { m_sharedState->lastCompound=0; m_sharedState->genLabels.resize(0); }
}
void package_body_declarative_item() : {}
{
subprogram_declaration()
-//| subprogram_body()
+
| type_declaration()
| subtype_declaration()
| constant_declaration()
@@ -1726,25 +1757,32 @@ void package_body_declarative_part() : {}
(package_body_declarative_item() )*
}
+void package_header(): {QCString s;}
+{
+ [ generic_clause() [ generic_map_aspect() <SEMI_T> ] ]
+}
+
+
void package_declaration(): {QCString s;}
{
<PACKAGE_T> s=identifier() <IS_T>
{
- lastCompound=current.get();
- std::shared_ptr<Entry> clone=std::make_shared<Entry>(*current);
+ m_sharedState->lastCompound=m_sharedState->current;
+ std::shared_ptr<Entry> clone=std::make_shared<Entry>(*m_sharedState->current);
clone->section=Entry::NAMESPACE_SEC;
clone->spec=VhdlDocGen::PACKAGE;
clone->name=s;
- clone->startLine=getLine(PACKAGE_T);
- clone->bodyLine=getLine(PACKAGE_T);
+ clone->startLine=outlineParser()->getLine(PACKAGE_T);
+ clone->bodyLine=outlineParser()->getLine(PACKAGE_T);
clone->protection=Package;
- current_root->moveToSubEntryAndKeep(clone);
- addVhdlType(s,getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
+ m_sharedState->current_root->moveToSubEntryAndKeep(clone);
+ outlineParser()->addVhdlType(s,outlineParser()->getLine(PACKAGE_T),Entry::CLASS_SEC,VhdlDocGen::PACKAGE,0,0,Package);
}
+ package_header()
package_declarative_part()
<END_T> [ <PACKAGE_T>] [ name() ] <SEMI_T>
-{ lastEntity=0;lastCompound=0; genLabels.resize(0); }
+{ m_sharedState->lastEntity=0;m_sharedState->lastCompound=0; m_sharedState->genLabels.resize(0); }
}
void geninter():{}
@@ -1754,8 +1792,7 @@ void geninter():{}
void package_declarative_item() : {}
{
-//LOOKAHEAD(3)
-//interface_subprogram_declaration()
+
subprogram_declaration()
| type_declaration()
| subtype_declaration()
@@ -1797,21 +1834,21 @@ QCString physical_literal() : {QCString s,s1;}
[LOOKAHEAD(abstract_literal()) s=abstract_literal()] s1=name(){s+=" ";s+=s1;s.prepend(" "); return s;}
}
-QCString physical_type_definition() : {QCString s,s1,s2;}
+QCString physical_type_definition() : {QCString s,s1,s2;Token *t=0;}
{
- <UNITS_T>
- s=identifier()<SEMI_T> { addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,0,Public);}
+ t=<UNITS_T>
+ s=identifier()<SEMI_T> { outlineParser()->addVhdlType(s.data(),t->beginLine,Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,0,Public);}
(
s1=secondary_unit_declaration()
)*
<END_T> <UNITS_T> [name()]
- { return s+"%";}
+ { return s;}
}
void port_clause() : {}
{
- <PORT_T> <LPAREN_T> port_list()<RPAREN_T> <SEMI_T>{ currP=0; }
+ <PORT_T> <LPAREN_T> port_list()<RPAREN_T> <SEMI_T>{ m_sharedState->currP=0; }
}
QCString port_list() : {QCString s;}
@@ -1844,6 +1881,7 @@ s=literal() { s.prepend(" ");return s;}
LOOKAHEAD(name())
s=name() { return s;}
|
+LOOKAHEAD(allocator())
allocator() { return "";}
|
s=aggregate() { return s; }
@@ -1861,6 +1899,7 @@ package_instantiation_declaration()
LOOKAHEAD(4)
interface_package_declaration()
| package_declaration()
+| context_declaration()
}
@@ -1909,9 +1948,9 @@ void process_statement() : {QCString s,s1,s2;Token *tok=0;}
[ s=identifier() <COLON_T> ]
[ <POSTPONED_T> ]
{
- currP=VhdlDocGen::PROCESS;
- current->startLine=getLine();
- current->bodyLine=getLine();
+ m_sharedState->currP=VhdlDocGen::PROCESS;
+ m_sharedState->current->startLine=outlineParser()->getLine();
+ m_sharedState->current->bodyLine=outlineParser()->getLine();
}
<PROCESS_T>
//try{
@@ -1925,25 +1964,25 @@ void process_statement() : {QCString s,s1,s2;Token *tok=0;}
<BEGIN_T>
process_statement_part()
<END_T> [ <POSTPONED_T> ]
- // }catch(...){error_skipto(PROCESS_T);}
+ // }catch(...){outlineParser()->error_skipto(PROCESS_T);}
<PROCESS_T> [ identifier() ] <SEMI_T>
- {
- if(s.isEmpty())
- currName=VhdlDocGen::getProcessNumber();
- else
- currName=s;
-
- current->name=currName;
- tempEntry=current.get();
- current->endBodyLine=getLine();
- currP=0;
- if(tok)
- s1=tok->image.data();
- createFunction(currName,VhdlDocGen::PROCESS,s1.data());
- createFlow();
- currName="";
- newEntry();
-}
+ {
+ if(s.isEmpty())
+ m_sharedState->currName=VhdlDocGen::getProcessNumber();
+ else
+ m_sharedState->currName=s;
+
+ m_sharedState->current->name=m_sharedState->currName;
+ m_sharedState->tempEntry=m_sharedState->current;
+ m_sharedState->current->endBodyLine=outlineParser()->getLine();
+ m_sharedState->currP=0;
+ if(tok)
+ s1=tok->image.data();
+ outlineParser()->createFunction(m_sharedState->currName,VhdlDocGen::PROCESS,s1.data());
+ outlineParser()->createFlow();
+ m_sharedState->currName="";
+ outlineParser()->newEntry();
+ }
}
void process_statement_part() : {}
@@ -1981,7 +2020,7 @@ void record_type_definition() : {}
<RECORD_T>
// try{
(element_declaration())+
- // }catch(...){error_skipto(END_T);}
+ // }catch(...){outlineParser()->error_skipto(END_T);}
<END_T>
<RECORD_T> [ name()]
}
@@ -1999,6 +2038,13 @@ QCString relation_operator() : {}
|<GREATERTHAN_T> {return ">=";}
|<LESSTHAN_T> {return "<=";}
|<NOTEQU_T> {return "/=";}
+ |<QGT_T> { return "?>=";}
+ |<QLT_T> { return "?<=";}
+ |<QG_T> { return "?>";}
+ |<QL_T> { return "?<";}
+ |<QEQU_T> { return "?=";}
+ |<QNEQU_T> {return "?/="; }
+
}
@@ -2023,9 +2069,9 @@ QCString return_statement() : {QCString s,s1;}
QCString scalar_type_definition() : {QCString s,s1;}
{
-
+LOOKAHEAD(enumeration_type_definition())
s=enumeration_type_definition(){ return s;}
-| s=range_constraint() [LOOKAHEAD( physical_type_definition()) s1=physical_type_definition()] { return s+" "+s1+"%";}
+| s=range_constraint() [ s1=physical_type_definition()] { return s+" "+s1;}
}
void secondary_unit() : {}
@@ -2034,14 +2080,12 @@ architecture_body()
| package_body()
}
-QCString secondary_unit_declaration() : {QCString s,s1;}
+QCString secondary_unit_declaration() : {QCString s,s1;Token *t1=0;}
{
-s=identifier() <EQU_T> s1=physical_literal() <SEMI_T>
+s=identifier() t1=<EQU_T> s1=physical_literal() <SEMI_T>
{
- //printf("\n %s %s [%d]",s.data(),s1.data(),getLine());
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,s1.data(),Public);
-
- return s+"="+s1; }
+ outlineParser()->addVhdlType(s.data(),t1->beginLine,Entry::VARIABLE_SEC,VhdlDocGen::UNITS,0,s1.data(),Public);
+ return s+"="+s1; }
}
QCString selected_name() : {QCString s,s1;}
@@ -2172,7 +2216,7 @@ void signal_declaration() : { Token* tok=0;QCString s,s1,s2,s3,s4;}
if(tok)
s3.prepend(":=");
s4=s1+s2+s3;
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::SIGNAL,0,s4.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::SIGNAL,0,s4.data(),Public);
}
}
QCString signal_kind() : {}
@@ -2230,14 +2274,14 @@ tok=<STRINGLITERAL> {return tok->image.c_str();}
}
FlowChart::addFlowChart(FlowChart::BEGIN_NO,"BEGIN",0);
}
- // }catch(...){error_skipto(BEGIN_T);}
+ // }catch(...){outlineParser()->error_skipto(BEGIN_T);}
<BEGIN_T>
subprogram_statement_part()
<END_T> [ subprogram_kind() ] [ designator() ] <SEMI_T>
{
- tempEntry->endBodyLine=getLine(END_T);
- createFlow();
- currP=0;
+ m_sharedState->tempEntry->endBodyLine=outlineParser()->getLine(END_T);
+ outlineParser()->createFlow();
+ m_sharedState->currP=0;
}
}
@@ -2246,7 +2290,7 @@ void subprogram_declaration() : {}
LOOKAHEAD(subprogram_instantiation_declaration())
subprogram_instantiation_declaration()
|
-subprogram_specification()subprogram_1(){currP=0;}
+subprogram_specification()subprogram_1(){m_sharedState->currP=0;}
}
void subprogram_1() : {}
@@ -2292,35 +2336,35 @@ void subprogram_specification() : {QCString s;Token *tok=0;Token *t;}
{
<PROCEDURE_T> s=designator()
{
- currP=VhdlDocGen::PROCEDURE;
- createFunction(s.data(),currP,0);
- tempEntry=current.get();
- current->startLine=getLine(PROCEDURE_T);
- current->bodyLine=getLine(PROCEDURE_T);
-
- } [LOOKAHEAD(1) <LPAREN_T> { param_sec=PARAM_SEC; } interface_list() { param_sec=0; }<RPAREN_T> ]
- [LOOKAHEAD(2) gen_interface_list()]
- [ LOOKAHEAD(2) gen_assoc_list()]
- param()
- { newEntry(); }
-|
+ m_sharedState->currP=VhdlDocGen::PROCEDURE;
+ outlineParser()->createFunction(s.data(),m_sharedState->currP,0);
+ m_sharedState->tempEntry=m_sharedState->current;
+ m_sharedState->current->startLine=outlineParser()->getLine(PROCEDURE_T);
+ m_sharedState->current->bodyLine=outlineParser()->getLine(PROCEDURE_T);
+
+ } [LOOKAHEAD(1) <LPAREN_T> { m_sharedState->param_sec=PARAM_SEC; } interface_list() { m_sharedState->param_sec=0; }<RPAREN_T> ]
+ [LOOKAHEAD(2) gen_interface_list()]
+ [ LOOKAHEAD(2) gen_assoc_list()]
+ param()
+ { outlineParser()->newEntry(); }
+ |
[ (tok=<PURE_T> | tok=<IMPURE_T>) ] t=<FUNCTION_T> s=designator()
- {
- currP=VhdlDocGen::FUNCTION;
- if(tok)
- createFunction(tok->image.c_str(),currP,s.data());
- else
- createFunction(0,currP,s.data());
- tempEntry=current.get();
- current->startLine=getLine(FUNCTION_T);
- current->bodyLine=getLine(FUNCTION_T);
- }
- [{ param_sec=PARAM_SEC; } <LPAREN_T> formal_parameter_list() <RPAREN_T> { param_sec=0; }]
+ {
+ m_sharedState->currP=VhdlDocGen::FUNCTION;
+ if(tok)
+ outlineParser()->createFunction(tok->image.c_str(),m_sharedState->currP,s.data());
+ else
+ outlineParser()->createFunction(0,m_sharedState->currP,s.data());
+ m_sharedState->tempEntry=m_sharedState->current;
+ m_sharedState->current->startLine=outlineParser()->getLine(FUNCTION_T);
+ m_sharedState->current->bodyLine=outlineParser()->getLine(FUNCTION_T);
+ }
+ [{ m_sharedState->param_sec=PARAM_SEC; } <LPAREN_T> formal_parameter_list() <RPAREN_T> { m_sharedState->param_sec=0; }]
<RETURN_T> s=type_mark()
{
- tempEntry=current.get();
- current->type=s;
- newEntry();
+ m_sharedState->tempEntry=m_sharedState->current;
+ m_sharedState->current->type=s;
+ outlineParser()->newEntry();
}
}
@@ -2332,20 +2376,26 @@ void subprogram_statement_part() : {}
QCString subtype_declaration() : {QCString s,s1;}
{
<SUBTYPE_T> s=identifier() <IS_T> s1=subtype_indication() <SEMI_T>
- {
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::SUBTYPE,0,s1.data(),Public);
+{
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::SUBTYPE,0,s1.data(),Public);
return " subtype "+s+" is "+s1+";";
- }
+}
}
+QCString reslution_indication(): {QCString s;}
+{
+ <LPAREN_T> s=expression() <RPAREN_T> { return "("+s+")"; }
+ // |s=name() { return s;}
+}
+//[LOOKAHEAD (reslution_indication()) s=reslution_indication()]
+// [ resolution_indication ] type_mark [ constraint ]
QCString subtype_indication() : {QCString s,s1,s2;}
{
- s=name()
- [LOOKAHEAD (name()) s1=name()] [LOOKAHEAD(constraint() ) s2=constraint()]
+ [LOOKAHEAD(5) s=reslution_indication()] (s1=name())+ [LOOKAHEAD(constraint() ) s2=constraint()]
{return s+" "+s1+" "+s2;}
}
-QCString suffix() : {QCString s;}
+QCString suffix() : { QCString s; }
{
LOOKAHEAD(name())
s=name() { return s;}
@@ -2354,18 +2404,18 @@ s=name() { return s;}
| <ALL_T> {return " all ";}
}
-QCString target() : {QCString s;}
+QCString target() : { QCString s; }
{
s=name(){ return s;}
| s=aggregate() { return s;}
}
-QCString term() : {QCString s,s1,s2;}
+QCString term() : { QCString s,s1,s2; }
{
s=factor() ( LOOKAHEAD(2) s1=multiplying_operation() s2=factor(){s+=s1;s+=s2;} )* { return s;}
}
-QCString timeout_clause() : {QCString s;}
+QCString timeout_clause() : { QCString s; }
{
<FOR_T> s=expression()
{
@@ -2396,7 +2446,7 @@ s=scalar_type_definition(){ return s;}
LOOKAHEAD(2)
protected_type_body() { return ""; }
| protected_type_declaration() { return ""; }
-//}catch(...){error_skipto(SEMI_T); return "";}
+//}catch(...){outlineParser()->error_skipto(SEMI_T); return "";}
}
QCString type_mark() : {QCString s; }
@@ -2419,9 +2469,9 @@ QCString unconstraint_array_definition() : {QCString s,s1,s2,s3;}
{
QCStringList ql=QCStringList::split(".",ql1[j]);
QCString it=ql[1];
- if ( parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
+ if ( m_sharedState->parse_sec==0 && Config_getBool(SHOW_INCLUDE_FILES) )
{
- VhdlParser::addVhdlType(it.data(),getLine(),Entry::VARIABLE_SEC,VhdlDocGen::USE,it.data(),"_use_",Public);
+ outlineParser()->addVhdlType(it.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,VhdlDocGen::USE,it.data(),"_use_",Public);
}
}
s1="use "+s;
@@ -2444,27 +2494,28 @@ QCString variable_declaration() : {Token *tok=0;Token *t1=0;QCString s,s1,s2;}
[ t1=<VARASSIGN_T> s2=expression() ] <SEMI_T>
{
- int spec;
- if(t1)
- s2.prepend(":=");
- QCString val=" variable "+s+":"+s1+s2+";";
- QCString it=s1;
- if(tok != 0)
- {
- it.prepend(" shared ");
- val.prepend(" shared");
- spec=VhdlDocGen::SHAREDVARIABLE;
- }
- else
- spec=VhdlDocGen::SHAREDVARIABLE;
+ int spec;
+ if(t1)
+ s2.prepend(":=");
+ QCString val=" variable "+s+":"+s1+s2+";";
+ QCString it=s1;
+ if(tok != 0)
+ {
+ it.prepend(" shared ");
+ val.prepend(" shared");
+ spec=VhdlDocGen::SHAREDVARIABLE;
+ }
+ else
+ spec=VhdlDocGen::SHAREDVARIABLE;
- if(t1){
- it+=":=";
- it+=s2;
- }
- addVhdlType(s.data(),getLine(),Entry::VARIABLE_SEC,spec,0,it.data(),Public);
- return val;
- }
+ if(t1)
+ {
+ it+=":=";
+ it+=s2;
+ }
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(),Entry::VARIABLE_SEC,spec,0,it.data(),Public);
+ return val;
+}
}
@@ -2502,7 +2553,7 @@ QCString protected_type_body() :{ }
<PROTECTED_T> <BODY_T>
protected_type_body_declarative_part()
- //}catch(...){error_skipto(END_T);}
+ //}catch(...){outlineParser()->error_skipto(END_T);}
<END_T><PROTECTED_T> <BODY_T> [identifier()] {return "";}
}
@@ -2538,7 +2589,7 @@ QCString protected_type_declaration() : { }
<PROTECTED_T>
try{
protected_type_declarative_part()
- }catch(...){error_skipto(END_T);}
+ }catch(...){outlineParser()->error_skipto(END_T);}
<END_T><PROTECTED_T> [ identifier() ] { return "";}
}
@@ -2561,7 +2612,7 @@ void protected_type_declarative_part() : {}
QCString context_ref() : {QCString s;}
{
- <CONTEXT_T> s=identifier_list() <SEMI_T>
+ <CONTEXT_T> s=name() <SEMI_T>
{
return "context "+s ;
}
@@ -2569,10 +2620,10 @@ QCString context_ref() : {QCString s;}
void context_declaration(): {QCString s,s1;}
{
- <CONTEXT_T> s=identifier() <IS_T> { parse_sec=CONTEXT_SEC; } (s1=libustcont_stats())* <END_T> [ <CONTEXT_T> ][identifier()] <SEMI_T>
+ <CONTEXT_T> s=identifier() <IS_T> { m_sharedState->parse_sec=CONTEXT_SEC; } (s1=libustcont_stats())* <END_T> [ <CONTEXT_T> ][identifier()] <SEMI_T>
{
- parse_sec=0;
- addVhdlType(s.data(),getLine(LIBRARY_T),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,"context",s1.data(),Public);
+ m_sharedState->parse_sec=0;
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(LIBRARY_T),Entry::VARIABLE_SEC,VhdlDocGen::LIBRARY,"context",s1.data(),Public);
}
}
@@ -2588,7 +2639,7 @@ QCString libustcont_stats(): {QCString s;}
<PACKAGE_T> s=identifier() <IS_T> <NEW_T> s1=name() s2=signature() [gen_assoc_list()] <SEMI_T>
{
QCString q=" is new "+s1+s2;
- addVhdlType(s.data(),getLine(PACKAGE_T),Entry::VARIABLE_SEC,VhdlDocGen::INSTANTIATION,"package",q.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(PACKAGE_T),Entry::VARIABLE_SEC,VhdlDocGen::INSTANTIATION,"package",q.data(),Public);
}
}
@@ -2596,7 +2647,7 @@ QCString interface_package_declaration(): {QCString s,s1;}
{
<PACKAGE_T> s=identifier() <IS_T> <NEW_T> s1=name() [gen_assoc_list()]
{
- current->name=s;
+ m_sharedState->current->name=s;
return "package "+s+" is new "+s1;
}
}
@@ -2606,7 +2657,7 @@ QCString subprogram_instantiation_declaration():{QCString s,s1,s2;}
<FUNCTION_T> s=identifier() <IS_T> <NEW_T> s1=name() s2=signature() [gen_assoc_list()] <SEMI_T>
{
QCString q= " is new "+s1+s2;
- addVhdlType(s.data(),getLine(FUNCTION_T),Entry::VARIABLE_SEC,VhdlDocGen::INSTANTIATION,"function ",q.data(),Public);
+ outlineParser()->addVhdlType(s.data(),outlineParser()->getLine(FUNCTION_T),Entry::VARIABLE_SEC,VhdlDocGen::INSTANTIATION,"function ",q.data(),Public);
return q;
}
}
@@ -2622,12 +2673,12 @@ void gen_interface_list() : {}
<GENERIC_T><LPAREN_T>
{
//int u=s_str.iLine;
- parse_sec=GEN_SEC;
+ m_sharedState->parse_sec=GEN_SEC;
}
interface_list()
{
// QCString vo=$3;
- parse_sec=0;
+ m_sharedState->parse_sec=0;
}
<RPAREN_T>
}
@@ -2653,17 +2704,31 @@ void ttend(): {}
void generate_statement_body() : {}
{
- <BEGIN_T> generate_statement_body()
+ [(LOOKAHEAD(block_declarative_item())block_declarative_item() )* <BEGIN_T>] (concurrent_statement())*
}
void generate_statement_body1() : {}
{
- // [LOOKAHEAD(block_declarative_item()<BEGIN_T> )(block_declarative_item() )* <BEGIN_T>] (concurrent_statement())*
+ generate_statement_body() generate_scheme_1() [generate_scheme_2()]
+}
+
+void generate_scheme_1() : {}
+{
+ ( generate_scheme_3())*
+}
+
+void generate_scheme_2() : {}
+{
+<ELSE_T> [LOOKAHEAD(2) identifier() <COLON_T> ] <GENERATE_T> generate_statement_body()
+}
- [(LOOKAHEAD(block_declarative_item())block_declarative_item() )* <BEGIN_T>] (concurrent_statement())*
- // | (concurrent_statement())*
+void generate_scheme_3() : {}
+{
+ <ELSIF_T>[LOOKAHEAD(2) identifier() <COLON_T> ] expression() <GENERATE_T> generate_statement_body()
}
+
+
QCString external_name(): {QCString s,s1,s2;}
{
<SLSL_T> s=sig_stat() s1=external_pathname() <COLON_T> s2=subtype_indication() <RSRS_T>
@@ -2719,86 +2784,93 @@ QCString pathname_element ():{QCString s,s1;}
QCString pathname_element_list():{QCString s,s1,s2;}
{
- ( s=pathname_element() <DOT_T> ) {s+=".";} (LOOKAHEAD(pathname_element() <DOT_T>) s1=pathname_element() <DOT_T> {s2+=s1;s2+="."; })*
- { return s+s2; }
+ ( s=pathname_element() <DOT_T> ) {s+=".";} (LOOKAHEAD(pathname_element() <DOT_T>) s1=pathname_element() <DOT_T> {s2+=s1;s2+="."; })*
+ { return s+s2; }
}
QCString package_path_name():{QCString s;}
{
- <AT_T> s=name() { return "@"+s; }
+ <AT_T> s=name() { return "@"+s; }
}
void conditional_signal_assignment_wave(): {}
{
LOOKAHEAD(conditional_force_assignment())
- conditional_force_assignment()
- |conditional_waveform_assignment()
+ conditional_force_assignment() |
+ conditional_waveform_assignment()
}
void conditional_waveform_assignment():{}
{
- target() <LESSTHAN_T> [LOOKAHEAD(1) delay_mechanism() ] waveform_element() <WHEN_T> expression() [else_wave_list()] <SEMI_T>
- }
+ target()
+ <LESSTHAN_T> [LOOKAHEAD(1) delay_mechanism() ] waveform_element()
+ <WHEN_T> expression() [else_wave_list()]
+ <SEMI_T>
+}
void else_wave_list(): {}
{
-<ELSE_T> expression() [ <WHEN_T> expression()]
+ <ELSE_T> expression() [ <WHEN_T> expression()]
}
void conditional_force_assignment(): {}
{
- target() <LESSTHAN_T> <FORCE_T> [inout_stat()] expression() <WHEN_T> [expression() else_stat()] <SEMI_T>
+ target()
+ <LESSTHAN_T>
+ <FORCE_T> [inout_stat()] expression()
+ <WHEN_T> [expression() else_stat()]
+ <SEMI_T>
}
void selected_signal_assignment_wave() : {}
{
- LOOKAHEAD(selected_force_assignment() )
- selected_force_assignment()
-| selected_waveform_assignment()
+ LOOKAHEAD(selected_force_assignment() )
+ selected_force_assignment() |
+ selected_waveform_assignment()
}
void selected_variable_assignment():{}
{
- <WITH_T> expression() <SELECT_T> [<Q_T>] select_name() <VARASSIGN_T> sel_var_list() // { $$=""; }
+ <WITH_T> expression()
+ <SELECT_T> [<Q_T>] select_name()
+ <VARASSIGN_T> sel_var_list() // { $$=""; }
}
void select_name(): {}
{
- LOOKAHEAD(aggregate())
- aggregate()
- | name()
-
+ LOOKAHEAD(aggregate())
+ aggregate() |
+ name()
}
void selected_waveform_assignment():{}
{
- <WITH_T> expression() <SELECT_T> [<Q_T>]
- target() <LESSTHAN_T> [delay_mechanism()] sel_wave_list()
+ <WITH_T> expression()
+ <SELECT_T> [<Q_T>] target()
+ <LESSTHAN_T> [delay_mechanism()] sel_wave_list()
}
void selected_force_assignment():{}
{
-<WITH_T> expression() <SELECT_T> [<Q_T>] target() <LESSTHAN_T> <FORCE_T>
+ <WITH_T> expression() <SELECT_T> [<Q_T>] target() <LESSTHAN_T> <FORCE_T>
[inout_stat()] sel_var_list()
}
void sel_var_list(): {}
{
(expression() <WHEN_T> choices() (<COMMA_T>|<SEMI_T>))(LOOKAHEAD(expression() <WHEN_T>) expression() <WHEN_T> choices() (<COMMA_T>|<SEMI_T>))*
-
}
void sel_wave_list() : {}
{
waveform_element() <WHEN_T> choices() (LOOKAHEAD(1) <COMMA_T> sel_wave_list())* <SEMI_T>
- // | sel_wave_list_1()
}
void inout_stat(): {}
{
- <IN_T>
- | <OUT_T>
+ <IN_T> |
+ <OUT_T>
}
void else_stat(): {}
@@ -2810,68 +2882,64 @@ void else_stat(): {}
QCString interface_subprogram_declaration(): {QCString s;}
{
- s=iproc() { return s;}
+ s=iproc() { return s;}
| s=ifunc() { return s; }
}
QCString iproc(): {QCString s,s1;}
- {
+{
<PROCEDURE_T> s=identifier() s1=param()
{
- current->name=s;
- return "procedure "+s+s1;
+ m_sharedState->current->name=s;
+ return "procedure "+s+s1;
}
- }
+}
QCString ifunc():{QCString s,s1,s2,s3;Token *t=0;Token *t1=0;Token *t2=0;}
{
-
[t=<PURE_T> | t=<IMPURE_T> ] <FUNCTION_T> s=name() s1=param() <RETURN_T> s2=name() [t1=<IS_T> (s3=identifier() | t2=<BOX_T>)]
- {
- QCString q;
- if(t) q=t->image.data();
- if(t2) s3="<>";
- if (!s3.isEmpty())
- {
- s3.prepend(" is ");
- }
- current->name=s;
- if (parse_sec==GEN_SEC)
- {
- QCString ss=q+" function "+s1+" return "+s2+s3;
- int a=getLine(FUNCTION_T);
- int b=getLine(PROCEDURE_T);
-
- if (a>b) b=a;
- addVhdlType(current->name.data(),b,Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,ss.data(),0,Public);
- }
- currP=0;return "";
- }
+ {
+ QCString q;
+ if(t) q=t->image.data();
+ if(t2) s3="<>";
+ if (!s3.isEmpty())
+ {
+ s3.prepend(" is ");
+ }
+ m_sharedState->current->name=s;
+ if (m_sharedState->parse_sec==GEN_SEC)
+ {
+ QCString ss=q+" function "+s1+" return "+s2+s3;
+ int a=outlineParser()->getLine(FUNCTION_T);
+ int b=outlineParser()->getLine(PROCEDURE_T);
- }
+ if (a>b) b=a;
+ outlineParser()->addVhdlType(m_sharedState->current->name.data(),b,Entry::VARIABLE_SEC,VhdlDocGen::GENERIC,ss.data(),0,Public);
+ }
+ m_sharedState->currP=0;return "";
+ }
+}
QCString param(): {QCString s,s1;Token *tok=0;}
{
-[ tok=<PARAMETER_T> ] { param_sec=PARAM_SEC; }
- [ <LPAREN_T> s1=interface_list() <RPAREN_T>]
- {
- if(tok)
- {
- s = tok->image.data();
-
- }
- param_sec=0;
- return s+"("+s1+")";
- }
-
- }
+ [ tok=<PARAMETER_T> ] { m_sharedState->param_sec=PARAM_SEC; }
+ [ <LPAREN_T> s1=interface_list() <RPAREN_T>]
+ {
+ if(tok)
+ {
+ s = tok->image.data();
+ }
+ m_sharedState->param_sec=0;
+ return s+"("+s1+")";
+ }
+}
// -----------------------------------------------------------------
// needed for inline (function/process/procedure) parsing
void parseInline() : {}
{
- process_statement()
- | subprogram_declaration()
- }
+ process_statement() |
+ subprogram_declaration()
+}
diff --git a/vhdlparser/vhdlstring.h b/vhdlparser/vhdlstring.h
index 4c64440..ee01b06 100644..100755
--- a/vhdlparser/vhdlstring.h
+++ b/vhdlparser/vhdlstring.h
@@ -5,6 +5,26 @@
#include <stdlib.h>
#include <string.h>
+#include "VhdlParser.h"
+// super class for VhdlParserTokenManager
+// is generated in vhdlparser.jj
+// -option TOKEN_MANAGER_SUPER_CLASS = "TokenParser"
+// sets the Vhdlparser in vhdljjparser.cpp
+// tokenManager->setLexParser(vhdlParser);
+
+namespace vhdl {
+ namespace parser {
+ class TokenParser {
+ public:
+ VhdlParser* parser = nullptr;
+ void setLexParser(VhdlParser* p)
+ {
+ parser = p;
+ }
+ };
+ }
+}
+
/** @brief Minimal string class with std::string like behaviour that fulfills the JavaCC
* string requirements.