From 47addccf4632f510f19b73ba5cbdbe011513d30f Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 20 May 2020 18:15:45 +0200 Subject: issue #7787 Doxygen 1.8.18: Markdown tables not working in ALIASES anymore? The artificial newline characters in ALIASES (`^^`) or better said its doxygen replacements (`\\_linebr`) were not seen by the markdown parser as line terminator and as a consequence there was no table seen (it was just 1 long line, without header / data lines).. --- src/markdown.cpp | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index 937e5e0..6c70e6c 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -80,6 +80,15 @@ data[i]=='\\' || \ data[i]=='@') +inline int isNewline(const char *data) +{ + // plain return + if (data[0] == '\n') return(1); + // doxygen return from ^^ in ALIASES + if (data[0] == '\\' && data[1] == '\\' && data[2] == '_' && data[3] == 'l' && data[4] == 'i' && + data[5] == 'n' && data[6] == 'e' && data[7] == 'b' && data[8] == 'r') return(9); + return(0); +} //---------- struct LinkRef @@ -1594,8 +1603,10 @@ int findTableColumns(const char *data,int size,int &start,int &end,int &columns) start = i; // find end character of the table line - while (i0 && data[i]==' ') i--; if (i>0 && data[i-1]!='\\' && data[i]=='|') i--,n++; // trailing or escaped | does not count @@ -2120,7 +2131,9 @@ static void findEndOfLine(GrowBuf &out,const char *data,int size, // find end of the line int nb=0; end=i+1; - while (end<=size && data[end-1]!='\n') + //while (end<=size && data[end-1]!='\n') + int j = 0; + while (end<=size && !(j = isNewline(data+end-1))) { // while looking for the end of the line we might encounter a block // that needs to be passed unprocessed. @@ -2181,6 +2194,7 @@ static void findEndOfLine(GrowBuf &out,const char *data,int size, end++; } } + if (j) end += j-1; //printf("findEndOfLine pi=%d i=%d end=%d {%s}\n",pi,i,end,QCString(data+i).left(end-i).data()); } -- cgit v0.12 From 1a683c1864eaac3255f464dd63eff3619bd9ced6 Mon Sep 17 00:00:00 2001 From: Wataru Ashihara Date: Sat, 23 May 2020 18:22:27 +0900 Subject: Improve flex/bison debuggability with gdb This changes "#line" in generated C++ source: #line 26 "doctokenizer.l" to: #line 26 "/absolute/path/to/doctokenizer.l" so that gdb can recognize the original .l .y source locations and step into them. --- src/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e880722..3230a4b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -129,11 +129,11 @@ foreach(lex_file ${LEX_FILES}) ) set_source_files_properties(${GENERATED_SRC}/${lex_file}.l.h PROPERTIES GENERATED 1) - FLEX_TARGET(${lex_file} ${lex_file}.l ${GENERATED_SRC}/${lex_file}.cpp COMPILE_FLAGS "${LEX_FLAGS}") + FLEX_TARGET(${lex_file} ${CMAKE_CURRENT_LIST_DIR}/${lex_file}.l ${GENERATED_SRC}/${lex_file}.cpp COMPILE_FLAGS "${LEX_FLAGS}") endforeach() -BISON_TARGET(constexp constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "${YACC_FLAGS}") +BISON_TARGET(constexp ${CMAKE_CURRENT_LIST_DIR}/constexp.y ${GENERATED_SRC}/ce_parse.cpp COMPILE_FLAGS "${YACC_FLAGS}") add_library(doxycfg STATIC ${GENERATED_SRC}/lang_cfg.h -- cgit v0.12 From 406e1499c35570e6d4333962ccd420a1ab217f7c Mon Sep 17 00:00:00 2001 From: hake Date: Wed, 3 Jun 2020 19:32:11 +0200 Subject: missing instance-rework --- src/vhdljjparser.cpp | 173 ++++++++++++++++++++++++++++++++++++----------- src/vhdljjparser.h | 1 + vhdlparser/vhdlparser.jj | 2 +- 3 files changed, 136 insertions(+), 40 deletions(-) diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp index ea60dd6..38aa641 100644 --- a/src/vhdljjparser.cpp +++ b/src/vhdljjparser.cpp @@ -81,6 +81,7 @@ struct VHDLOutlineParser::Private VHDLDocInfo str_doc; VhdlParser::SharedState shared; QCString forL; + int code = 0; }; @@ -264,34 +265,128 @@ void VHDLOutlineParser::handleFlowComment(const char* doc) } } +int VHDLOutlineParser::checkInlineCode(QCString &doc) +{ + QRegExp cs("[\\\\@]code"); + QRegExp cend("[\\s ]*[\\\\@]endcode"); + QRegExp cbrief("[\\\\@]brief"); + int index = doc.find(cs); + + if (doc.contains(cend) > 0) + return 1; + + if (index < 0) + return index; + + VhdlParser::SharedState *s = &p->shared; + p->strComment += doc; + p->code = p->inputString.find(cs, p->code + 1); + int com = p->inputString.find(p->strComment.data()); + int ref = p->inputString.find(cend, p->code + 1); + int len = p->strComment.size(); + + int ll = com + len; + int diff = ref - ll - 3; + QCString code = p->inputString.mid(ll, diff); + int iLine = 0; + code = stripLeadingAndTrailingEmptyLines(code, iLine); + int val = code.contains('\n'); + VhdlDocGen::prepareComment(p->strComment); + QCStringList ql = QCStringList::split('\n', p->strComment); + + QCString co; + QCString na; + for (QCString qcs : ql) + { + qcs = qcs.simplifyWhiteSpace(); + if (qcs.contains(cs)) + { + int i = qcs.find('{'); + int j = qcs.find('}'); + if (i > 0 && j > 0 && j > i) + { + na = qcs.mid(i + 1, (j - i - 1)); + } + continue; + } + qcs = qcs.replace(cbrief, ""); + co += qcs; + co += '\n'; + } + + VhdlDocGen::prepareComment(co); + + Entry gBlock; + if (!na.isEmpty()) + gBlock.name = na; + else + gBlock.name = "misc" + VhdlDocGen::getRecordNumber(); + gBlock.startLine = p->yyLineNr+iLine-1; + gBlock.bodyLine = p->yyLineNr+iLine-1 ; + gBlock.doc = code; + gBlock.inbodyDocs = code; + gBlock.brief = co; + gBlock.section = Entry::VARIABLE_SEC; + gBlock.spec = VhdlDocGen::MISCELLANEOUS; + gBlock.fileName = p->yyFileName; + gBlock.endBodyLine = p->yyLineNr + val +iLine; + gBlock.lang = SrcLangExt_VHDL; + std::shared_ptr compound; + + if (s->lastEntity) + compound = s->lastEntity; + else if (s->lastCompound) + compound = s->lastCompound; + else + compound = 0; + + if (compound) + { + compound->copyToSubEntry(&gBlock); + } + else + { + gBlock.type = "misc"; // global code like library ieee... + s->current_root->copyToSubEntry(&gBlock); + } + p->strComment.resize(0); + return 1; +} -void VHDLOutlineParser::handleCommentBlock(const char* doc1,bool brief) +void VHDLOutlineParser::handleCommentBlock(const char *doc1, bool brief) { + int position = 0; + bool needsEntry = FALSE; VhdlParser::SharedState *s = &p->shared; QCString doc = doc1; - if (doc.isEmpty()) return; - if (checkMultiComment(doc,p->yyLineNr)) + if (doc.isEmpty()) + return; + + if (checkMultiComment(doc, p->yyLineNr)) { p->strComment.resize(0); return; } - VhdlDocGen::prepareComment(doc); + if (checkInlineCode(doc) > 0) + { + return; + } - Protection protection=Public; + Protection protection = Public; + VhdlDocGen::prepareComment(doc); - if (p->oldEntry==s->current.get()) + if (p->oldEntry == s->current.get()) { - //printf("\n find pending message < %s > at line: %d \n ",doc.data(),iDocLine); - p->str_doc.doc=doc; - p->str_doc.iDocLine=p->iDocLine; - p->str_doc.brief=brief; - p->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; } - p->oldEntry=s->current.get(); + p->oldEntry = s->current.get(); if (brief) { @@ -302,45 +397,45 @@ void VHDLOutlineParser::handleCommentBlock(const char* doc1,bool brief) s->current->docLine = p->yyLineNr; } - int j=doc.find("[plant]"); - if (j>=0) + int j = doc.find("[plant]"); + if (j >= 0) { - doc=doc.remove(j,7); - s->current->stat=true; + doc = doc.remove(j, 7); + s->current->stat = true; } - int position=0; - bool needsEntry=FALSE; - QCString processedDoc = processMarkdownForCommentBlock(doc,p->yyFileName,p->iDocLine); + //int position=0; + + QCString processedDoc = processMarkdownForCommentBlock(doc, p->yyFileName, p->iDocLine); + while (p->commentScanner.parseCommentBlock( - p->thisParser, - s->current.get(), - processedDoc, // text - p->yyFileName, // file - p->iDocLine, // line of block start - brief, - 0, - FALSE, - protection, - position, - needsEntry - ) - ) - { - if (needsEntry) newEntry(); + p->thisParser, + s->current.get(), + processedDoc, // text + p->yyFileName, // file + p->iDocLine, // line of block start + brief, + 0, + FALSE, + protection, + position, + needsEntry)) + { + if (needsEntry) + newEntry(); } if (needsEntry) { if (p->varr) { - p->varr=FALSE; - s->current->name=p->varName; - s->current->section=Entry::VARIABLEDOC_SEC; - p->varName=""; + p->varr = FALSE; + s->current->name = p->varName; + s->current->section = Entry::VARIABLEDOC_SEC; + p->varName = ""; } newEntry(); } - p->iDocLine=-1; + p->iDocLine = -1; p->strComment.resize(0); } diff --git a/src/vhdljjparser.h b/src/vhdljjparser.h index c4a55de..940631d 100755 --- a/src/vhdljjparser.h +++ b/src/vhdljjparser.h @@ -72,6 +72,7 @@ class VHDLOutlineParser : public OutlineParserInterface bool checkMultiComment(QCString& qcs,int line); void insertEntryAtLine(std::shared_ptr ce,int line); QString getNameID(); + int checkInlineCode(QCString & doc); private: struct Private; std::unique_ptr p; diff --git a/vhdlparser/vhdlparser.jj b/vhdlparser/vhdlparser.jj index 4287871..007bd5b 100755 --- a/vhdlparser/vhdlparser.jj +++ b/vhdlparser/vhdlparser.jj @@ -783,7 +783,7 @@ block_statement() LOOKAHEAD([identifier() ":"] [] ) process_statement() | -LOOKAHEAD(generate_statement()) +LOOKAHEAD(3) generate_statement() | case_scheme() -- cgit v0.12 From 73d699a94cf96915a6b5897b7747d0964df647ca Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 4 Jun 2020 18:45:54 +0200 Subject: Incorrect htmlhelp language code for Indonesian The language code for Indonesian is `0x421` and not `0x412`, the later is for Korean. --- src/htmlhelp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 066e6f7..44dea05 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -420,7 +420,7 @@ void HtmlHelp::initialize() s_languageDict.insert("chinese-traditional", new QCString("0x404 Chinese (Taiwan)")); // new LCIDs - s_languageDict.insert("indonesian", new QCString("0x412 Indonesian")); + s_languageDict.insert("indonesian", new QCString("0x421 Indonesian")); s_languageDict.insert("croatian", new QCString("0x41A Croatian")); s_languageDict.insert("romanian", new QCString("0x418 Romanian")); s_languageDict.insert("slovene", new QCString("0x424 Slovenian")); -- cgit v0.12 From 0df1623c9363d52a2b04457233dcf2c64319b03c Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 2 Jun 2020 11:13:43 +0200 Subject: Refactor: modernize configuration values --- addon/doxyapp/doxyapp.cpp | 31 +-- addon/doxyparse/doxyparse.cpp | 52 ++-- src/cite.cpp | 40 ++- src/clangparser.cpp | 20 +- src/classdef.cpp | 10 +- src/condparser.cpp | 16 +- src/config.h | 32 ++- src/configgen.py | 117 +++++---- src/configimpl.h | 91 +++---- src/configimpl.l | 562 ++++++++++++++++++++---------------------- src/context.cpp | 18 +- src/definition.cpp | 18 +- src/dirdef.cpp | 12 +- src/docparser.cpp | 10 +- src/doxygen.cpp | 243 +++++++++--------- src/doxygen.h | 4 +- src/ftvhelp.cpp | 2 +- src/htags.cpp | 32 +-- src/htmlgen.cpp | 29 +-- src/index.cpp | 12 +- src/latexgen.cpp | 10 +- src/layout.cpp | 496 ++++++++++++++++++------------------- src/mangen.cpp | 158 ++++++------ src/plantuml.cpp | 28 ++- src/pre.l | 20 +- src/rtfgen.cpp | 4 +- src/util.cpp | 52 ++-- src/util.h | 3 +- src/vhdldocgen.cpp | 7 +- 29 files changed, 1041 insertions(+), 1088 deletions(-) diff --git a/addon/doxyapp/doxyapp.cpp b/addon/doxyapp/doxyapp.cpp index 1153ce3..97f3755 100644 --- a/addon/doxyapp/doxyapp.cpp +++ b/addon/doxyapp/doxyapp.cpp @@ -264,31 +264,32 @@ int main(int argc,char **argv) checkConfiguration(); adjustConfiguration(); // we need a place to put intermediate files - Config_getString(OUTPUT_DIRECTORY)="/tmp/doxygen"; + Config_updateString(OUTPUT_DIRECTORY,"/tmp/doxygen"); // disable html output - Config_getBool(GENERATE_HTML)=FALSE; + Config_updateBool(GENERATE_HTML,FALSE); // disable latex output - Config_getBool(GENERATE_LATEX)=FALSE; + Config_updateBool(GENERATE_LATEX,FALSE); // be quiet - Config_getBool(QUIET)=TRUE; + Config_updateBool(QUIET,TRUE); // turn off warnings - Config_getBool(WARNINGS)=FALSE; - Config_getBool(WARN_IF_UNDOCUMENTED)=FALSE; - Config_getBool(WARN_IF_DOC_ERROR)=FALSE; + Config_updateBool(WARNINGS,FALSE); + Config_updateBool(WARN_IF_UNDOCUMENTED,FALSE); + Config_updateBool(WARN_IF_DOC_ERROR,FALSE); // Extract as much as possible - Config_getBool(EXTRACT_ALL)=TRUE; - Config_getBool(EXTRACT_STATIC)=TRUE; - Config_getBool(EXTRACT_PRIVATE)=TRUE; - Config_getBool(EXTRACT_LOCAL_METHODS)=TRUE; + Config_updateBool(EXTRACT_ALL,TRUE); + Config_updateBool(EXTRACT_STATIC,TRUE); + Config_updateBool(EXTRACT_PRIVATE,TRUE); + Config_updateBool(EXTRACT_LOCAL_METHODS,TRUE); // Extract source browse information, needed // to make doxygen gather the cross reference info - Config_getBool(SOURCE_BROWSER)=TRUE; + Config_updateBool(SOURCE_BROWSER,TRUE); // In case of a directory take all files on directory and its subdirectories - Config_getBool(RECURSIVE)=TRUE; + Config_updateBool(RECURSIVE,TRUE); // set the input - Config_getList(INPUT).clear(); - Config_getList(INPUT).append(argv[1]); + StringVector inputList; + inputList.push_back(argv[1]); + Config_updateList(INPUT,inputList); // parse the files parseInput(); diff --git a/addon/doxyparse/doxyparse.cpp b/addon/doxyparse/doxyparse.cpp index 2fcf9ac..c06eb1c 100644 --- a/addon/doxyparse/doxyparse.cpp +++ b/addon/doxyparse/doxyparse.cpp @@ -462,44 +462,35 @@ int main(int argc,char **argv) { else tmpdir << "doxyparse-" << pid; - Config_getString(OUTPUT_DIRECTORY)= tmpdir.str().c_str(); + Config_updateString(OUTPUT_DIRECTORY,tmpdir.str().c_str()); // enable HTML (fake) output to omit warning about missing output format - Config_getBool(GENERATE_HTML)=TRUE; + Config_updateBool(GENERATE_HTML,TRUE); // disable latex output - Config_getBool(GENERATE_LATEX)=FALSE; + Config_updateBool(GENERATE_LATEX,FALSE); // be quiet - Config_getBool(QUIET)=TRUE; + Config_updateBool(QUIET,TRUE); // turn off warnings - Config_getBool(WARNINGS)=FALSE; - Config_getBool(WARN_IF_UNDOCUMENTED)=FALSE; - Config_getBool(WARN_IF_DOC_ERROR)=FALSE; + Config_updateBool(WARNINGS,FALSE); + Config_updateBool(WARN_IF_UNDOCUMENTED,FALSE); + Config_updateBool(WARN_IF_DOC_ERROR,FALSE); // Extract as much as possible - Config_getBool(EXTRACT_ALL)=TRUE; - Config_getBool(EXTRACT_STATIC)=TRUE; - Config_getBool(EXTRACT_PRIVATE)=TRUE; - Config_getBool(EXTRACT_LOCAL_METHODS)=TRUE; - Config_getBool(EXTRACT_PACKAGE)=TRUE; + Config_updateBool(EXTRACT_ALL,TRUE); + Config_updateBool(EXTRACT_STATIC,TRUE); + Config_updateBool(EXTRACT_PRIVATE,TRUE); + Config_updateBool(EXTRACT_LOCAL_METHODS,TRUE); + Config_updateBool(EXTRACT_PACKAGE,TRUE); // Extract source browse information, needed // to make doxygen gather the cross reference info - Config_getBool(SOURCE_BROWSER)=TRUE; + Config_updateBool(SOURCE_BROWSER,TRUE); // find functions call between modules - Config_getBool(CALL_GRAPH)=TRUE; + Config_updateBool(CALL_GRAPH,TRUE); // loop recursive over input files - Config_getBool(RECURSIVE)=TRUE; + Config_updateBool(RECURSIVE,TRUE); // add file extensions - Config_getList(FILE_PATTERNS).append("*.cc"); - Config_getList(FILE_PATTERNS).append("*.cxx"); - Config_getList(FILE_PATTERNS).append("*.cpp"); - Config_getList(FILE_PATTERNS).append("*.java"); - Config_getList(FILE_PATTERNS).append("*.py"); - Config_getList(FILE_PATTERNS).append("*.pyw"); - Config_getList(FILE_PATTERNS).append("*.cs"); - Config_getList(FILE_PATTERNS).append("*.c"); - Config_getList(FILE_PATTERNS).append("*.h"); - Config_getList(FILE_PATTERNS).append("*.hh"); - Config_getList(FILE_PATTERNS).append("*.hpp"); + Config_updateList(FILE_PATTERNS, { "*.cc", "*.cxx", "*.cpp", "*.java", + "*.py", "*.pyw", "*.cs", "*.c", "*.h", "*.hh", "*.hpp"}); // set the input - Config_getList(INPUT).clear(); + StringVector inputList; for (int i = 1; i < argc; i++) { if (strcmp(argv[i], "-") == 0) { char filename[1024]; @@ -508,13 +499,14 @@ int main(int argc,char **argv) { if (feof(stdin)) { break; } - Config_getList(INPUT).append(filename); + inputList.push_back(filename); } } else { - Config_getList(INPUT).append(argv[i]); + inputList.push_back(argv[i]); } } - if (Config_getList(INPUT).isEmpty()) { + Config_updateList(INPUT,inputList); + if (inputList.empty()) { exit(0); } diff --git a/src/cite.cpp b/src/cite.cpp index dac2bcd..7b6452e 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -4,8 +4,8 @@ * Based on a patch by David Munger * * 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 + * 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. * @@ -94,7 +94,7 @@ void CitationManager::clear() bool CitationManager::isEmpty() const { - uint numFiles = Config_getList(CITE_BIB_FILES).count(); + size_t numFiles = Config_getList(CITE_BIB_FILES).size(); return (numFiles==0 || p->entries.empty()); } @@ -117,12 +117,10 @@ void CitationManager::generatePage() // 0. add cross references from the bib files to the cite dictionary QFile f; - const QStrList &citeDataList = Config_getList(CITE_BIB_FILES); - QStrListIterator li(citeDataList); - const char *bibdata = 0; - for (li.toFirst() ; (bibdata = li.current()) ; ++li) + const StringVector &citeDataList = Config_getList(CITE_BIB_FILES); + for (const auto &bibdata : citeDataList) { - QCString bibFile = bibdata; + QCString bibFile = bibdata.c_str(); if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib"; QFileInfo fi(bibFile); if (fi.exists()) @@ -130,7 +128,7 @@ void CitationManager::generatePage() if (!bibFile.isEmpty()) { f.setName(bibFile); - if (!f.open(IO_ReadOnly)) + if (!f.open(IO_ReadOnly)) { err("could not open file %s for reading\n",bibFile.data()); } @@ -173,7 +171,7 @@ void CitationManager::generatePage() QCString outputDir = Config_getString(OUTPUT_DIRECTORY); QCString citeListFile = outputDir+"/citelist.doc"; f.setName(citeListFile); - if (!f.open(IO_WriteOnly)) + if (!f.open(IO_WriteOnly)) { err("could not open file %s for writing\n",citeListFile.data()); } @@ -207,9 +205,9 @@ void CitationManager::generatePage() QDir thisDir; thisDir.mkdir(bibOutputDir); int i = 0; - for (li.toFirst() ; (bibdata = li.current()) ; ++li) + for (const auto &bibdata : citeDataList) { - QCString bibFile = bibdata; + QCString bibFile = bibdata.c_str(); if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib"; QFileInfo fi(bibFile); if (fi.exists()) @@ -242,7 +240,7 @@ void CitationManager::generatePage() // 6. read back the file f.setName(citeListFile); - if (!f.open(IO_ReadOnly)) + if (!f.open(IO_ReadOnly)) { err("could not open file %s for reading\n",citeListFile.data()); } @@ -294,16 +292,16 @@ void CitationManager::generatePage() // 7. add it as a page addRelatedPage(fileName(),theTranslator->trCiteReferences(),doc,fileName(),1); - // 8. for latex we just copy the bib files to the output and let + // 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 QCString latexOutputDir = Config_getString(LATEX_OUTPUT)+"/"; i = 0; - for (li.toFirst() ; (bibdata = li.current()) ; ++li) + for (const auto &bibdata : citeDataList) { - QCString bibFile = bibdata; + QCString bibFile = bibdata.c_str(); // Note: file can now have multiple dots if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib"; fi.setFile(bibFile); @@ -333,7 +331,7 @@ void CitationManager::generatePage() // 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++) + for (size_t j = 1; j <= citeDataList.size(); j++) { thisDir.remove(bibOutputDir + bibTmpFile + QCString().setNum(j) + ".bib"); } @@ -370,13 +368,11 @@ void CitationManager::writeLatexBibliography(FTextStream &t) const } t << "\\bibliographystyle{" << style << "}\n" "\\bibliography{"; - QStrList &citeDataList = Config_getList(CITE_BIB_FILES); + const StringVector &citeDataList = Config_getList(CITE_BIB_FILES); int i = 0; - QStrListIterator li(citeDataList); - const char *bibdata = 0; - for (li.toFirst() ; (bibdata = li.current()) ; ++li) + for (const auto &bibdata : citeDataList) { - QCString bibFile = bibdata; + QCString bibFile = bibdata.c_str(); // Note: file can now have multiple dots if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib"; QFileInfo fi(bibFile); diff --git a/src/clangparser.cpp b/src/clangparser.cpp index 0754888..e0a1640 100644 --- a/src/clangparser.cpp +++ b/src/clangparser.cpp @@ -159,10 +159,10 @@ void ClangParser::determineInputFilesInSameTu(QStrList &files) void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit) { - static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); - static QStrList &includePath = Config_getList(INCLUDE_PATH); - static QStrList clangOptions = Config_getList(CLANG_OPTIONS); - static QCString clangCompileDatabase = Config_getString(CLANG_DATABASE_PATH); + bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); + const StringVector &includePath = Config_getList(INCLUDE_PATH); + const StringVector &clangOptions = Config_getList(CLANG_OPTIONS); + QCString clangCompileDatabase = Config_getString(CLANG_DATABASE_PATH); if (!clangAssistedParsing) return; //printf("ClangParser::start(%s)\n",fileName); p->fileName = fileName; @@ -198,8 +198,8 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit) } char **argv = (char**)malloc(sizeof(char*)* (4+Doxygen::inputPaths.size()+ - includePath.count()+ - clangOptions.count()+ + includePath.size()+ + clangOptions.size()+ clang_option_len)); if (!command.empty() ) { @@ -222,15 +222,15 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit) //printf("argv[%d]=%s\n",argc,argv[argc]); } // add external include paths - for (uint i=0;iincInfo) { QCString nm; - QStrList paths = Config_getList(STRIP_FROM_PATH); - if (!paths.isEmpty() && m_impl->incInfo->fileDef) + const StringVector &paths = Config_getList(STRIP_FROM_PATH); + if (!paths.empty() && m_impl->incInfo->fileDef) { QCString abs = m_impl->incInfo->fileDef->absFilePath(); - const char *s = paths.first(); QCString potential; unsigned int length = 0; - while (s) + for (const auto &s : paths) { - QFileInfo info(s); + QFileInfo info(s.c_str()); if (info.exists()) { QCString prefix = info.absFilePath().utf8(); @@ -1872,7 +1871,6 @@ void ClassDefImpl::writeIncludeFilesForSlice(OutputList &ol) const length = prefix.length(); potential = abs.right(abs.length() - prefix.length()); } - s = paths.next(); } } diff --git a/src/condparser.cpp b/src/condparser.cpp index e76b164..ac6ff61 100644 --- a/src/condparser.cpp +++ b/src/condparser.cpp @@ -2,8 +2,8 @@ * Copyright (C) 1997-2015 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 + * 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. * @@ -19,6 +19,8 @@ * ! NOT operator */ +#include + #include "condparser.h" #include "config.h" #include "message.h" @@ -27,7 +29,7 @@ /** * parses and evaluates the given expression. - * @returns + * @returns * - On error, an error message is returned. * - On success, the result of the expression is either "1" or "0". */ @@ -123,13 +125,13 @@ int CondParser::getOperatorId(const QCString &opName) /** * Get next token in the current string expr. - * Uses the data in m_expr pointed to by m_e to + * Uses the data in m_expr pointed to by m_e to * produce m_tokenType and m_token, set m_err in case of an error */ void CondParser::getToken() { m_tokenType = NOTHING; - m_token.resize(0); + m_token.resize(0); //printf("\tgetToken e:{%c}, ascii=%i, col=%i\n", *e, *e, e-expr); @@ -303,7 +305,7 @@ bool CondParser::evalOperator(int opId, bool lhs, bool rhs) */ bool CondParser::evalVariable(const char *varName) { - if (Config_getList(ENABLED_SECTIONS).find(varName)==-1) return FALSE; - return TRUE; + const StringVector &list = Config_getList(ENABLED_SECTIONS); + return std::find(list.begin(),list.end(),varName)!=list.end(); } diff --git a/src/config.h b/src/config.h index 1b79b1e..845a369 100644 --- a/src/config.h +++ b/src/config.h @@ -24,19 +24,25 @@ class FTextStream; //! @{ //! some convenience macros for accessing the config options //! mainly done like this for backward compatibility -#if DYNAMIC_LOOKUP // for debug purposes -#define Config_getString(val) (ConfigValues::instance().*((ConfigValues::InfoString*)ConfigValues::instance().get(#val))->item) -#define Config_getBool(val) (ConfigValues::instance().*((ConfigValues::InfoBool*)ConfigValues::instance().get(#val))->item) -#define Config_getInt(val) (ConfigValues::instance().*((ConfigValues::InfoInt*)ConfigValues::instance().get(#val))->item) -#define Config_getEnum(val) (ConfigValues::instance().*((ConfigValues::InfoString*)ConfigValues::instance().get(#val))->item) -#define Config_getList(val) (ConfigValues::instance().*((ConfigValues::InfoList*)ConfigValues::instance().get(#val))->item) -#else // direct access -#define Config_getString(val) (ConfigValues::instance().val) -#define Config_getBool(val) (ConfigValues::instance().val) -#define Config_getInt(val) (ConfigValues::instance().val) -#define Config_getEnum(val) (ConfigValues::instance().val) -#define Config_getList(val) (ConfigValues::instance().val) -#endif +//#if DYNAMIC_LOOKUP // for debug purposes +//#define Config_getString(val) (ConfigValues::instance().*((ConfigValues::InfoString*)ConfigValues::instance().get(#val))->item) +//#define Config_getBool(val) (ConfigValues::instance().*((ConfigValues::InfoBool*)ConfigValues::instance().get(#val))->item) +//#define Config_getInt(val) (ConfigValues::instance().*((ConfigValues::InfoInt*)ConfigValues::instance().get(#val))->item) +//#define Config_getEnum(val) (ConfigValues::instance().*((ConfigValues::InfoString*)ConfigValues::instance().get(#val))->item) +//#define Config_getList(val) (ConfigValues::instance().*((ConfigValues::InfoList*)ConfigValues::instance().get(#val))->item) +//#else // direct access +#define Config_getString(name) (ConfigValues::instance().name()) +#define Config_getBool(name) (ConfigValues::instance().name()) +#define Config_getInt(name) (ConfigValues::instance().name()) +#define Config_getEnum(name) (ConfigValues::instance().name()) +#define Config_getList(name) (ConfigValues::instance().name()) +#define Config_updateString(name,value) (ConfigValues::instance().update_##name(value)); +#define Config_updateBool(name,value) (ConfigValues::instance().update_##name(value)); +#define Config_updateInt(name,value) (ConfigValues::instance().update_##name(value)); +#define Config_updateEnum(name,value) (ConfigValues::instance().update_##name(value)); +#define Config_updateList(name,...) (ConfigValues::instance().update_##name(__VA_ARGS__)); +#define Config_setterFunc(name) (std::bind(&ConfigValues::update_##name,ConfigValues::instance(),std::placeholders::_1)) +//#endif //! @} /** \brief Public function to deal with the configuration file. */ diff --git a/src/configgen.py b/src/configgen.py index 6720116..89eff6d 100755 --- a/src/configgen.py +++ b/src/configgen.py @@ -355,8 +355,23 @@ def parseGroups(node): if n.nodeType == Node.ELEMENT_NODE: parseOption(n) -def parseGroupMap(node): - map = { 'bool':'bool', 'string':'QCString', 'enum':'QCString', 'int':'int', 'list':'QStrList' } + +def parseGroupMapGetter(node): + map = { 'bool':'bool', 'string':'const QCString &', 'enum':'const QCString &', 'int':'int', 'list':'const StringVector &' } + for n in node.childNodes: + if n.nodeType == Node.ELEMENT_NODE: + setting = n.getAttribute('setting') + if len(setting) > 0: + print("#if %s" % (setting)) + type = n.getAttribute('type') + name = n.getAttribute('id') + if type in map: + print(" %-20s %-30s const { return m_%s; }" % (map[type],name+'()',name)) + if len(setting) > 0: + print("#endif") + +def parseGroupMapSetter(node): + map = { 'bool':'bool', 'string':'const QCString &', 'enum':'const QCString &', 'int':'int', 'list':'const StringVector &' } for n in node.childNodes: if n.nodeType == Node.ELEMENT_NODE: setting = n.getAttribute('setting') @@ -365,7 +380,21 @@ def parseGroupMap(node): type = n.getAttribute('type') name = n.getAttribute('id') if type in map: - print(" %-8s %s;" % (map[type],name)) + print(" %-20s update_%-46s { m_%s = v; return m_%s; }" % (map[type],name+'('+map[type]+' v)',name,name)) + if len(setting) > 0: + print("#endif") + +def parseGroupMapVar(node): + map = { 'bool':'bool', 'string':'QCString', 'enum':'QCString', 'int':'int', 'list':'StringVector' } + for n in node.childNodes: + if n.nodeType == Node.ELEMENT_NODE: + setting = n.getAttribute('setting') + if len(setting) > 0: + print("#if %s" % (setting)) + type = n.getAttribute('type') + name = n.getAttribute('id') + if type in map: + print(" %-12s m_%s;" % (map[type],name)) if len(setting) > 0: print("#endif") @@ -379,7 +408,7 @@ def parseGroupInit(node): type = n.getAttribute('type') name = n.getAttribute('id') if type in map: - print(" %-25s = ConfigImpl::instance()->get%s(__FILE__,__LINE__,\"%s\");" % (name,map[type],name)) + print(" %-25s = ConfigImpl::instance()->get%s(__FILE__,__LINE__,\"%s\");" % ('m_'+name,map[type],name)) if len(setting) > 0: print("#endif") @@ -393,7 +422,7 @@ def parseGroupMapInit(node): type = n.getAttribute('type') name = n.getAttribute('id') if type in map: - print(" m_map.insert(\"%s\",new Info%s(&ConfigValues::%s));" % (name,map[type],name)) + print(" { %-25s Info{ %-13s &ConfigValues::m_%s }}," % ('\"'+name+'\",','Info::'+map[type]+',',name)) if len(setting) > 0: print("#endif") @@ -652,6 +681,7 @@ def main(): print("#include ") print("#include ") print("#include ") + print("#include \"containers.h\"") print("#include \"settings.h\"") print("") print("class ConfigValues") @@ -661,42 +691,38 @@ def main(): for n in elem.childNodes: if n.nodeType == Node.ELEMENT_NODE: if (n.nodeName == "group"): - parseGroupMap(n) + parseGroupMapGetter(n) + for n in elem.childNodes: + if n.nodeType == Node.ELEMENT_NODE: + if (n.nodeName == "group"): + parseGroupMapSetter(n) print(" void init();") - print(" struct Info") - print(" {") - print(" enum Type { Bool, Int, String, List, Unknown };") - print(" Info(Type t) : type(t) {}") - print(" virtual ~Info() {}") - print(" Type type;") - print(" };") - print(" struct InfoBool : public Info") - print(" {") - print(" InfoBool(bool ConfigValues::*ptm) : Info(Info::Bool), item(ptm) {}") - print(" bool ConfigValues::*item;") - print(" };") - print(" struct InfoInt : public Info") - print(" {") - print(" InfoInt(int ConfigValues::*ptm) : Info(Info::Int), item(ptm) {}") - print(" int ConfigValues::*item;") - print(" };") - print(" struct InfoString : public Info") - print(" {") - print(" InfoString(QCString ConfigValues::*ptm) : Info(Info::String), item(ptm) {}") - print(" QCString ConfigValues::*item;") - print(" };") - print(" struct InfoList : public Info") - print(" {") - print(" InfoList(QStrList ConfigValues::*ptm) : Info(Info::List), item(ptm) {}") - print(" QStrList ConfigValues::*item;") - print(" };") - print(" const Info *get(const char *tag) const") - print(" {") - print(" return m_map.find(tag);") - print(" }") + print(" struct Info"); + print(" {"); + print(" enum Type { Bool, Int, String, List, Unknown };"); + print(" Info(Type t,bool ConfigValues::*b) : type(t), value(b) {}"); + print(" Info(Type t,int ConfigValues::*i) : type(t), value(i) {}"); + print(" Info(Type t,QCString ConfigValues::*s) : type(t), value(s) {}"); + print(" Info(Type t,StringVector ConfigValues::*l) : type(t), value(l) {}"); + print(" Type type;"); + print(" union Item"); + print(" {"); + print(" Item(bool ConfigValues::*v) : b(v) {}"); + print(" Item(int ConfigValues::*v) : i(v) {}"); + print(" Item(QCString ConfigValues::*v) : s(v) {}"); + print(" Item(StringVector ConfigValues::*v) : l(v) {}"); + print(" bool ConfigValues::*b;"); + print(" int ConfigValues::*i;"); + print(" QCString ConfigValues::*s;"); + print(" StringVector ConfigValues::*l;"); + print(" } value;"); + print(" };"); + print(" const Info *get(const char *tag) const;"); print(" private:") - print(" ConfigValues();") - print(" QDict m_map;") + for n in elem.childNodes: + if n.nodeType == Node.ELEMENT_NODE: + if (n.nodeName == "group"): + parseGroupMapVar(n) print("};") print("") print("#endif") @@ -707,15 +733,20 @@ def main(): print(" */") print("#include \"configvalues.h\"") print("#include \"configimpl.h\"") + print("#include ") print("") - print("ConfigValues::ConfigValues() : m_map(257)") - print("{") - print(" m_map.setAutoDelete(TRUE);") + print("const ConfigValues::Info *ConfigValues::get(const char *tag) const"); + print("{"); + print(" static const std::unordered_map< std::string, Info > configMap ="); + print(" {"); for n in elem.childNodes: if n.nodeType == Node.ELEMENT_NODE: if (n.nodeName == "group"): parseGroupMapInit(n) - print("}") + print(" };"); + print(" auto it = configMap.find(tag);"); + print(" return it!=configMap.end() ? &it->second : nullptr;"); + print("}"); print("") print("void ConfigValues::init()") print("{") diff --git a/src/configimpl.h b/src/configimpl.h index 6134088..a267cc6 100644 --- a/src/configimpl.h +++ b/src/configimpl.h @@ -1,13 +1,13 @@ /****************************************************************************** * - * + * * * * Copyright (C) 1997-2015 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 + * 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. * @@ -24,6 +24,7 @@ #include #include #include "ftextstream.h" +#include "containers.h" /** Abstract base class for any configuration option. @@ -35,8 +36,8 @@ class ConfigOption public: /*! The type of option */ - enum OptionType - { + enum OptionType + { O_Info, //!< A section header O_List, //!< A list of items O_Enum, //!< A fixed set of items @@ -46,14 +47,14 @@ class ConfigOption O_Obsolete, //!< An obsolete option O_Disabled //!< Disabled compile time option }; - enum - { - /*! Maximum length of an option in the config file. Used for + enum + { + /*! Maximum length of an option in the config file. Used for * alignment purposes. */ - MAX_OPTION_LENGTH = 23 + MAX_OPTION_LENGTH = 23 }; - ConfigOption(OptionType t) : m_kind(t) + ConfigOption(OptionType t) : m_kind(t) { m_spaces.fill(' ',40); } @@ -81,8 +82,8 @@ class ConfigOption void writeBoolValue(FTextStream &t,bool v); void writeIntValue(FTextStream &t,int i); - void writeStringValue(FTextStream &t,QCString &s); - void writeStringList(FTextStream &t,QStrList &l); + void writeStringValue(FTextStream &t,const QCString &s); + void writeStringList(FTextStream &t,const StringVector &l); QCString m_spaces; QCString m_name; @@ -98,7 +99,7 @@ class ConfigOption class ConfigInfo : public ConfigOption { public: - ConfigInfo(const char *name,const char *doc) + ConfigInfo(const char *name,const char *doc) : ConfigOption(O_Info) { m_name = name; @@ -115,25 +116,25 @@ class ConfigList : public ConfigOption { public: enum WidgetType { String, File, Dir, FileAndDir }; - ConfigList(const char *name,const char *doc) + ConfigList(const char *name,const char *doc) : ConfigOption(O_List) { m_name = name; m_doc = doc; m_widgetType = String; } - void addValue(const char *v) { m_defaultValue.append(v); } + void addValue(const char *v) { m_defaultValue.push_back(v); } void setWidgetType(WidgetType w) { m_widgetType = w; } WidgetType widgetType() const { return m_widgetType; } - QStrList *valueRef() { return &m_value; } - QStrList getDefault() { return m_defaultValue; } + StringVector *valueRef() { return &m_value; } + StringVector getDefault() { return m_defaultValue; } void writeTemplate(FTextStream &t,bool sl,bool); void compareDoxyfile(FTextStream &t); void substEnvVars(); void init() { m_value = m_defaultValue; } private: - QStrList m_value; - QStrList m_defaultValue; + StringVector m_value; + StringVector m_defaultValue; WidgetType m_widgetType; }; @@ -142,7 +143,7 @@ class ConfigList : public ConfigOption class ConfigEnum : public ConfigOption { public: - ConfigEnum(const char *name,const char *doc,const char *defVal) + ConfigEnum(const char *name,const char *doc,const char *defVal) : ConfigOption(O_Enum) { m_name = name; @@ -151,7 +152,7 @@ class ConfigEnum : public ConfigOption m_defValue = defVal; } void addValue(const char *v) { m_valueRange.append(v); } - QStrListIterator iterator() + QStrListIterator iterator() { return QStrListIterator(m_valueRange); } @@ -174,7 +175,7 @@ class ConfigString : public ConfigOption { public: enum WidgetType { String, File, Dir, Image }; - ConfigString(const char *name,const char *doc) + ConfigString(const char *name,const char *doc) : ConfigOption(O_String) { m_name = name; @@ -193,7 +194,7 @@ class ConfigString : public ConfigOption void substEnvVars(); void init() { m_value = m_defValue.copy(); } void emptyValueToDefault() { if(m_value.isEmpty()) m_value=m_defValue; }; - + private: QCString m_value; QCString m_defValue; @@ -205,7 +206,7 @@ class ConfigString : public ConfigOption class ConfigInt : public ConfigOption { public: - ConfigInt(const char *name,const char *doc,int minVal,int maxVal,int defVal) + ConfigInt(const char *name,const char *doc,int minVal,int maxVal,int defVal) : ConfigOption(O_Int) { m_name = name; @@ -237,7 +238,7 @@ class ConfigInt : public ConfigOption class ConfigBool : public ConfigOption { public: - ConfigBool(const char *name,const char *doc,bool defVal) + ConfigBool(const char *name,const char *doc,bool defVal) : ConfigOption(O_Bool) { m_name = name; @@ -264,7 +265,7 @@ class ConfigBool : public ConfigOption class ConfigObsolete : public ConfigOption { public: - ConfigObsolete(const char *name) : ConfigOption(O_Obsolete) + ConfigObsolete(const char *name) : ConfigOption(O_Obsolete) { m_name = name; } void writeTemplate(FTextStream &,bool,bool); void compareDoxyfile(FTextStream &) {} @@ -276,7 +277,7 @@ class ConfigObsolete : public ConfigOption class ConfigDisabled : public ConfigOption { public: - ConfigDisabled(const char *name) : ConfigOption(O_Disabled) + ConfigDisabled(const char *name) : ConfigOption(O_Disabled) { m_name = name; } void writeTemplate(FTextStream &,bool,bool); void compareDoxyfile(FTextStream &) {} @@ -297,7 +298,7 @@ class ConfigDisabled : public ConfigOption * read from a user-supplied configuration file. * The static member instance() can be used to get * a pointer to the one and only instance. - * + * * Set all variables to their default values by * calling Config::instance()->init() * @@ -321,8 +322,8 @@ class ConfigImpl delete m_instance; m_instance=0; } - - /*! Returns an iterator that can by used to iterate over the + + /*! Returns an iterator that can by used to iterate over the * configuration options. */ QListIterator iterator() @@ -330,36 +331,36 @@ class ConfigImpl return QListIterator(*m_options); } - /*! + /*! * @name Getting configuration values. * @{ */ - /*! Returns the value of the string option with name \a fileName. + /*! Returns the value of the string option with name \a fileName. * The arguments \a num and \a name are for debugging purposes only. * There is a convenience function Config_getString() for this. */ QCString &getString(const char *fileName,int num,const char *name) const; - /*! Returns the value of the list option with name \a fileName. + /*! Returns the value of the list option with name \a fileName. * The arguments \a num and \a name are for debugging purposes only. * There is a convenience function Config_getList() for this. */ - QStrList &getList(const char *fileName,int num,const char *name) const; + StringVector &getList(const char *fileName,int num,const char *name) const; - /*! Returns the value of the enum option with name \a fileName. + /*! Returns the value of the enum option with name \a fileName. * The arguments \a num and \a name are for debugging purposes only. * There is a convenience function Config_getEnum() for this. */ QCString &getEnum(const char *fileName,int num,const char *name) const; - /*! Returns the value of the integer option with name \a fileName. + /*! Returns the value of the integer option with name \a fileName. * The arguments \a num and \a name are for debugging purposes only. * There is a convenience function Config_getInt() for this. */ int &getInt(const char *fileName,int num,const char *name) const; - /*! Returns the value of the boolean option with name \a fileName. + /*! Returns the value of the boolean option with name \a fileName. * The arguments \a num and \a name are for debugging purposes only. * There is a convenience function Config_getBool() for this. */ @@ -370,12 +371,12 @@ class ConfigImpl */ ConfigOption *get(const char *name) const { - return m_dict->find(name); + return m_dict->find(name); } /* @} */ - /*! - * @name Adding configuration options. + /*! + * @name Adding configuration options. * @{ */ @@ -402,7 +403,7 @@ class ConfigImpl } /*! Adds a new enumeration option with \a name and documentation \a doc - * and initial value \a defVal. + * and initial value \a defVal. * \returns An object representing the option. */ ConfigEnum *addEnum(const char *name, @@ -510,18 +511,18 @@ class ConfigImpl /*! Parse a configuration data in string \a str. * \returns TRUE if successful, or FALSE if the string could not be * parsed. - */ + */ //bool parseString(const char *fn,const char *str); bool parseString(const char *fn,const char *str,bool upd = FALSE); /*! Parse a configuration file with name \a fn. - * \returns TRUE if successful, FALSE if the file could not be + * \returns TRUE if successful, FALSE if the file could not be * opened or read. - */ + */ bool parse(const char *fn,bool upd = FALSE); /*! Called from the constructor, will add doxygen's default options - * to the configuration object + * to the configuration object */ void create(); diff --git a/src/configimpl.l b/src/configimpl.l index da94484..9cea61b 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -1,10 +1,10 @@ /****************************************************************************** * - * 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 - * granted. No representations are made about the suitability of this software + * 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. * @@ -29,11 +29,12 @@ #include #include -#include #include #include #include + #include +#include #include "configimpl.h" #include "version.h" @@ -61,7 +62,7 @@ void config_err(const char *fmt, ...) va_list args; va_start(args, fmt); vfprintf(stderr, (QCString(error_str) + fmt).data(), args); - va_end(args); + va_end(args); } void config_term(const char *fmt, ...) { @@ -141,7 +142,7 @@ void ConfigOption::writeIntValue(FTextStream &t,int i) t << " " << i; } -void ConfigOption::writeStringValue(FTextStream &t,QCString &s) +void ConfigOption::writeStringValue(FTextStream &t,const QCString &s) { char c; bool needsEscaping=FALSE; @@ -151,10 +152,10 @@ void ConfigOption::writeStringValue(FTextStream &t,QCString &s) if (p) { t << " "; - while ((c=*p++)!=0 && !needsEscaping) + while ((c=*p++)!=0 && !needsEscaping) needsEscaping = (c==' ' || c=='\n' || c=='\t' || c=='"' || c=='#'); if (needsEscaping) - { + { t << "\""; p=se.data(); while (*p) @@ -172,19 +173,17 @@ void ConfigOption::writeStringValue(FTextStream &t,QCString &s) } } -void ConfigOption::writeStringList(FTextStream &t,QStrList &l) +void ConfigOption::writeStringList(FTextStream &t,const StringVector &l) { - const char *p = l.first(); bool first=TRUE; - while (p) + for (const auto &p : l) { - QCString s=p; + if (!first) t << " \\" << endl; + QCString s=p.c_str(); if (!first) t << " "; - first=FALSE; writeStringValue(t,s); - p = l.next(); - if (p) t << " \\" << endl; + first=FALSE; } } @@ -193,7 +192,7 @@ void ConfigOption::writeStringList(FTextStream &t,QStrList &l) ConfigImpl *ConfigImpl::m_instance = 0; -void ConfigInt::convertStrToVal() +void ConfigInt::convertStrToVal() { if (!m_valueString.isEmpty()) { @@ -216,7 +215,7 @@ void ConfigBool::convertStrToVal() QCString val = m_valueString.stripWhiteSpace().lower(); if (!val.isEmpty()) { - if (val=="yes" || val=="true" || val=="1" || val=="all") + if (val=="yes" || val=="true" || val=="1" || val=="all") { m_value=TRUE; } @@ -259,7 +258,7 @@ void ConfigEnum::convertStrToVal() QCString &ConfigImpl::getString(const char *fileName,int num,const char *name) const { ConfigOption *opt = m_dict->find(name); - if (opt==0) + if (opt==0) { config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); } @@ -270,10 +269,10 @@ QCString &ConfigImpl::getString(const char *fileName,int num,const char *name) c return *((ConfigString *)opt)->valueRef(); } -QStrList &ConfigImpl::getList(const char *fileName,int num,const char *name) const +StringVector &ConfigImpl::getList(const char *fileName,int num,const char *name) const { ConfigOption *opt = m_dict->find(name); - if (opt==0) + if (opt==0) { config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); } @@ -287,7 +286,7 @@ QStrList &ConfigImpl::getList(const char *fileName,int num,const char *name) con QCString &ConfigImpl::getEnum(const char *fileName,int num,const char *name) const { ConfigOption *opt = m_dict->find(name); - if (opt==0) + if (opt==0) { config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); } @@ -301,7 +300,7 @@ QCString &ConfigImpl::getEnum(const char *fileName,int num,const char *name) con int &ConfigImpl::getInt(const char *fileName,int num,const char *name) const { ConfigOption *opt = m_dict->find(name); - if (opt==0) + if (opt==0) { config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); } @@ -315,7 +314,7 @@ int &ConfigImpl::getInt(const char *fileName,int num,const char *name) const bool &ConfigImpl::getBool(const char *fileName,int num,const char *name) const { ConfigOption *opt = m_dict->find(name); - if (opt==0) + if (opt==0) { config_term("%s<%d>: Internal error: Requested unknown option %s!\n",fileName,num,name); } @@ -358,71 +357,33 @@ void ConfigList::writeTemplate(FTextStream &t,bool sl,bool) void ConfigList::compareDoxyfile(FTextStream &t) { - const char *p = m_value.first(); - const char *q = m_defaultValue.first(); - int defCnt = 0; - int valCnt = 0; - - // count non empty elements - while (p) - { - QCString s=p; - if (!s.stripWhiteSpace().isEmpty()) valCnt += 1; - p = m_value.next(); - } - - while (q) - { - QCString s=q; - if (!s.stripWhiteSpace().isEmpty()) defCnt += 1; - q = m_defaultValue.next(); - } + auto get_stripped = [](std::string s) { return QCString(s.c_str()).stripWhiteSpace(); }; + auto is_not_empty = [get_stripped](std::string s) { return !get_stripped(s).isEmpty(); }; + int defCnt = std::count_if( m_value.begin(), m_value.end(),is_not_empty); + int valCnt = std::count_if(m_defaultValue.begin(),m_defaultValue.end(),is_not_empty); if ( valCnt != defCnt) { writeTemplate(t,TRUE,TRUE); return; } - - // get first non empry element - q = m_defaultValue.first(); - p = m_value.first(); - QCString sp = p; - while (p && sp.stripWhiteSpace().isEmpty()) + auto it1 = m_value.begin(); + auto it2 = m_defaultValue.begin(); + while (it1!=m_value.end() && it2!=m_defaultValue.end()) { - p = m_value.next(); - sp = p; - } - QCString sq = q; - while (q && sq.stripWhiteSpace().isEmpty()) - { - q = m_value.next(); - sq = q; - } - while (p) - { - // skip empty elements - sp = p; - while (p && sp.stripWhiteSpace().isEmpty()) + // skip over empty values + while (it1!=m_value.end() && !is_not_empty(*it1)) { - p = m_value.next(); - sp = p; + ++it1; } - sq = q; - while (q && sq.stripWhiteSpace().isEmpty()) + if (it1!=m_value.end()) // non-empty value { - q = m_value.next(); - sq = q; - } - // be sure we have still an element (p and q have same number of 'filled' elements) - if (p) - { - if (sp.stripWhiteSpace() != sq.stripWhiteSpace()) + if (get_stripped(*it1) != get_stripped(*it2)) // not the default, write as difference { writeTemplate(t,TRUE,TRUE); return; } - p = m_value.next(); - q = m_defaultValue.next(); + ++it1; + ++it2; } } } @@ -544,7 +505,7 @@ struct ConfigFileState YY_BUFFER_STATE oldState; YY_BUFFER_STATE newState; QCString fileName; -}; +}; static const char *g_inputString; static int g_inputPosition; @@ -553,11 +514,11 @@ static QCString g_yyFileName; static QCString g_tmpString; static QCString *g_string=0; static bool *g_bool=0; -static QStrList *g_list=0; +static StringVector *g_list=0; static int g_lastState; static QCString g_elemStr; -static QStrList g_includePathList; -static QStack g_includeStack; +static StringVector g_includePathList; +static QStack g_includeStack; static int g_includeDepth; static bool g_configUpdate = FALSE; static QCString g_encoding; @@ -571,7 +532,7 @@ static ConfigImpl *g_config; static yy_size_t yyread(char *buf,yy_size_t max_size) { // no file included - if (g_includeStack.isEmpty()) + if (g_includeStack.isEmpty()) { yy_size_t c=0; if (g_inputString==0) return c; @@ -602,7 +563,7 @@ static QCString configStringRecode( int outputSize=inputSize*4+1; QCString output(outputSize); void *cd = portable_iconv_open(outputEncoding,inputEncoding); - if (cd==(void *)(-1)) + if (cd==(void *)(-1)) { config_term("Error: unsupported character conversion: '%s'->'%s'\n", inputEncoding.data(),outputEncoding.data()); @@ -646,7 +607,7 @@ static FILE *tryPath(const char *path,const char *fileName) return 0; } -static void substEnvVarsInStrList(QStrList &sl); +static void substEnvVarsInStrList(StringVector &sl); static void substEnvVarsInString(QCString &s); static FILE *findFile(const char *fileName) @@ -660,13 +621,11 @@ static FILE *findFile(const char *fileName) return tryPath(NULL, fileName); } substEnvVarsInStrList(g_includePathList); - char *s=g_includePathList.first(); - while (s) // try each of the include paths + for (const auto &s : g_includePathList) { - FILE *f = tryPath(s,fileName); + FILE *f = tryPath(s.c_str(),fileName); if (f) return f; - s=g_includePathList.next(); - } + } // try cwd if g_includePathList fails return tryPath(".",fileName); } @@ -676,7 +635,7 @@ static void readIncludeFile(const char *incName) if (g_includeDepth==MAX_INCLUDE_DEPTH) { config_term("maximum include depth (%d) reached, %s is not included. Aborting...\n", MAX_INCLUDE_DEPTH,incName); - } + } QCString inc = incName; substEnvVarsInString(inc); @@ -697,7 +656,7 @@ static void readIncludeFile(const char *incName) msg("@INCLUDE = %s: parsing...\n",inc.data()); #endif - // store the state of the old file + // store the state of the old file ConfigFileState *fs=new ConfigFileState; fs->oldState=YY_CURRENT_BUFFER; fs->lineNr=g_yyLineNr; @@ -710,7 +669,7 @@ static void readIncludeFile(const char *incName) fs->newState=YY_CURRENT_BUFFER; g_yyFileName=inc; g_includeDepth++; - } + } else { config_term("@INCLUDE = %s: not found!\n",inc.data()); @@ -745,12 +704,12 @@ static void readIncludeFile(const char *incName) "##".*"\n" { g_config->appendUserComment(yytext);g_yyLineNr++;} "#" { BEGIN(SkipComment); } [a-z_A-Z][a-z_A-Z0-9]*[ \t]*"=" { QCString cmd=yytext; - cmd=cmd.left(cmd.length()-1).stripWhiteSpace(); + cmd=cmd.left(cmd.length()-1).stripWhiteSpace(); ConfigOption *option = g_config->get(cmd); if (option==0) // oops not known { config_warn("ignoring unsupported tag '%s' at line %d, file %s\n", - cmd.data(),g_yyLineNr,g_yyFileName.data()); + cmd.data(),g_yyLineNr,g_yyFileName.data()); BEGIN(SkipInvalid); } else // known tag @@ -806,7 +765,7 @@ static void readIncludeFile(const char *incName) { config_warn("Tag '%s' at line %d of file '%s' has become obsolete.\n" " To avoid this warning please remove this line from your configuration " - "file or upgrade it using \"doxygen -u\"\n", cmd.data(),g_yyLineNr,g_yyFileName.data()); + "file or upgrade it using \"doxygen -u\"\n", cmd.data(),g_yyLineNr,g_yyFileName.data()); } BEGIN(SkipInvalid); break; @@ -820,7 +779,7 @@ static void readIncludeFile(const char *incName) { config_warn("Tag '%s' at line %d of file '%s' belongs to an option that was not enabled at compile time.\n" " To avoid this warning please remove this line from your configuration " - "file or upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", cmd.data(),g_yyLineNr,g_yyFileName.data()); + "file or upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", cmd.data(),g_yyLineNr,g_yyFileName.data()); } BEGIN(SkipInvalid); break; @@ -828,12 +787,12 @@ static void readIncludeFile(const char *incName) } } [a-z_A-Z][a-z_A-Z0-9]*[ \t]*"+=" { QCString cmd=yytext; - cmd=cmd.left(cmd.length()-2).stripWhiteSpace(); + cmd=cmd.left(cmd.length()-2).stripWhiteSpace(); ConfigOption *option = g_config->get(cmd); if (option==0) // oops not known { config_warn("ignoring unsupported tag '%s' at line %d, file %s\n", - cmd.data(),g_yyLineNr,g_yyFileName.data()); + cmd.data(),g_yyLineNr,g_yyFileName.data()); BEGIN(SkipInvalid); } else // known tag @@ -862,19 +821,19 @@ static void readIncludeFile(const char *incName) case ConfigOption::O_Int: case ConfigOption::O_Bool: config_warn("operator += not supported for '%s'. Ignoring line at line %d, file %s\n", - yytext,g_yyLineNr,g_yyFileName.data()); + yytext,g_yyLineNr,g_yyFileName.data()); BEGIN(SkipInvalid); break; case ConfigOption::O_Obsolete: config_warn("Tag '%s' at line %d of file %s has become obsolete.\n" "To avoid this warning please update your configuration " - "file using \"doxygen -u\"\n", cmd.data(),g_yyLineNr,g_yyFileName.data()); + "file using \"doxygen -u\"\n", cmd.data(),g_yyLineNr,g_yyFileName.data()); BEGIN(SkipInvalid); break; case ConfigOption::O_Disabled: config_warn("Tag '%s' at line %d of file %s belongs to an option that was not enabled at compile time.\n" "To avoid this warning please remove this line from your configuration " - "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", cmd.data(),g_yyLineNr,g_yyFileName.data()); + "file, upgrade it using \"doxygen -u\", or recompile doxygen with this feature enabled.\n", cmd.data(),g_yyLineNr,g_yyFileName.data()); BEGIN(SkipInvalid); break; } @@ -883,8 +842,8 @@ static void readIncludeFile(const char *incName) "@INCLUDE_PATH"[ \t]*"=" { BEGIN(GetStrList); g_list=&g_includePathList; g_list->clear(); g_elemStr=""; } /* include a g_config file */ "@INCLUDE"[ \t]*"=" { BEGIN(Include);} -([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") { - readIncludeFile(configStringRecode(yytext,g_encoding,"UTF-8")); +([^ \"\t\r\n]+)|("\""[^\n\"]+"\"") { + readIncludeFile(configStringRecode(yytext,g_encoding,"UTF-8")); BEGIN(Start); } <> { @@ -912,19 +871,19 @@ static void readIncludeFile(const char *incName) [a-z_A-Z0-9]+ { config_warn("ignoring unknown tag '%s' at line %d, file %s\n",yytext,g_yyLineNr,g_yyFileName.data()); } \n { g_yyLineNr++; BEGIN(Start); } \n { - g_yyLineNr++; + g_yyLineNr++; if (!g_elemStr.isEmpty()) { //printf("elemStr1='%s'\n",g_elemStr.data()); - g_list->append(g_elemStr); + g_list->push_back(g_elemStr.data()); } - BEGIN(Start); + BEGIN(Start); } [ \t]+ { if (!g_elemStr.isEmpty()) { //printf("elemStr2='%s'\n",g_elemStr.data()); - g_list->append(g_elemStr); + g_list->push_back(g_elemStr.data()); } g_elemStr.resize(0); } @@ -932,18 +891,18 @@ static void readIncludeFile(const char *incName) if (!g_elemStr.isEmpty()) { //printf("elemStr2='%s'\n",g_elemStr.data()); - g_list->append(g_elemStr); + g_list->push_back(g_elemStr.data()); } g_elemStr.resize(0); } -[^ \"\t\r\n]+ { (*g_string)+=configStringRecode(yytext,g_encoding,"UTF-8"); +[^ \"\t\r\n]+ { (*g_string)+=configStringRecode(yytext,g_encoding,"UTF-8"); checkEncoding(); } "\"" { g_lastState=YY_START; - BEGIN(GetQuotedString); - g_tmpString.resize(0); + BEGIN(GetQuotedString); + g_tmpString.resize(0); } -"\""|"\n" { +"\""|"\n" { // 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",g_tmpString.data()); @@ -967,16 +926,16 @@ static void readIncludeFile(const char *incName) g_tmpString+='"'; } . { g_tmpString+=*yytext; } -[a-zA-Z]+ { - QCString bs=yytext; +[a-zA-Z]+ { + QCString bs=yytext; bs=bs.upper(); if (bs=="YES" || bs=="1") *g_bool=TRUE; else if (bs=="NO" || bs=="0") *g_bool=FALSE; - else + else { - *g_bool=FALSE; + *g_bool=FALSE; config_warn("Invalid value '%s' for " "boolean tag in line %d, file %s; use YES or NO\n", bs.data(),g_yyLineNr,g_yyFileName.data()); @@ -991,7 +950,7 @@ static void readIncludeFile(const char *incName) \n { g_yyLineNr++; BEGIN(Start); } \\[ \r\t]*\n { g_yyLineNr++; BEGIN(Start); } <*>\\[ \r\t]*\n { g_yyLineNr++; } -<*>. +<*>. <*>\n { g_yyLineNr++ ; } %% @@ -1004,7 +963,7 @@ void ConfigImpl::writeTemplate(FTextStream &t,bool sl,bool upd) /* print first lines of user comment that were at the beginning of the file, might have special meaning for editors */ if (m_startComment) { - t << takeStartComment() << endl; + t << takeStartComment() << endl; } t << "# Doxyfile " << getDoxygenVersion() << endl << endl; if (!sl) @@ -1078,12 +1037,12 @@ static void substEnvVarsInString(QCString &s) //printf("substEnvVarInString(%s) end\n",s.data()); } -static void substEnvVarsInStrList(QStrList &sl) +static void substEnvVarsInStrList(StringVector &sl) { - char *s = sl.first(); - while (s) + StringVector results; + for (const auto &s : sl) { - QCString result(s); + QCString result = s.c_str(); // an argument with quotes will have an extra space at the end, so wasQuoted will be TRUE. bool wasQuoted = (result.find(' ')!=-1) || (result.find('\t')!=-1); // here we strip the quote again @@ -1093,8 +1052,8 @@ static void substEnvVarsInStrList(QStrList &sl) if (!wasQuoted) /* as a result of the expansion, a single string may have expanded into a list, which we'll - add to sl. If the original string already - contained multiple elements no further + add to sl. If the original string already + contained multiple elements no further splitting is done to allow quoted items with spaces! */ { int l=result.length(); @@ -1105,7 +1064,7 @@ static void substEnvVarsInStrList(QStrList &sl) { char c=0; // skip until start of new word - while (iinit(); } -static void checkList(QStrList &list,const char *name, bool equalRequired,bool valueRequired) +static void checkList(const StringVector &list,const char *name, bool equalRequired,bool valueRequired) { - const char *s=list.first(); - while (s) + for (const auto &s: list) { - QCString item=s; + QCString item=s.c_str(); item=item.stripWhiteSpace(); int i=item.find('='); if (i==-1 && equalRequired) @@ -1403,7 +1331,6 @@ static void checkList(QStrList &list,const char *name, bool equalRequired,bool v } } } - s=list.next(); } } @@ -1411,17 +1338,18 @@ void Config::checkAndCorrect() { ConfigValues::instance().init(); - QCString &warnFormat = Config_getString(WARN_FORMAT); + //------------------------ + // check WARN_FORMAT + QCString warnFormat = Config_getString(WARN_FORMAT); if (warnFormat.stripWhiteSpace().isEmpty()) { - warnFormat="$file:$line $text"; + Config_updateString(WARN_FORMAT,"$file:$line $text"); } else { if (warnFormat.find("$file")==-1) { warn_uncond("warning format does not contain a $file tag!\n"); - } if (warnFormat.find("$line")==-1) { @@ -1433,15 +1361,17 @@ void Config::checkAndCorrect() } } - QCString &manExtension = Config_getString(MAN_EXTENSION); - + //------------------------ // set default man page extension if non is given by the user + QCString manExtension = Config_getString(MAN_EXTENSION); if (manExtension.isEmpty()) { - manExtension=".3"; + Config_updateString(MAN_EXTENSION,".3"); } - QCString &paperType = Config_getEnum(PAPER_TYPE); + //------------------------ + // check and correct PAPER_TYPE + QCString paperType = Config_getEnum(PAPER_TYPE); paperType=paperType.lower().stripWhiteSpace(); if (paperType.isEmpty() || paperType=="a4wide") { @@ -1453,42 +1383,53 @@ void Config::checkAndCorrect() err("Unknown page type specified\n"); paperType="a4"; } + Config_updateEnum(PAPER_TYPE,paperType); - QCString &outputLanguage=Config_getEnum(OUTPUT_LANGUAGE); + //------------------------ + // check & correct OUTPUT_LANGUAGE + QCString outputLanguage=Config_getEnum(OUTPUT_LANGUAGE); outputLanguage=outputLanguage.stripWhiteSpace(); if (outputLanguage.isEmpty()) { outputLanguage = "English"; } + Config_updateEnum(OUTPUT_LANGUAGE,outputLanguage); - QCString &htmlFileExtension=Config_getString(HTML_FILE_EXTENSION); + //------------------------ + // check & correct HTML_FILE_EXTENSION + QCString htmlFileExtension=Config_getString(HTML_FILE_EXTENSION); htmlFileExtension=htmlFileExtension.stripWhiteSpace(); if (htmlFileExtension.isEmpty()) { htmlFileExtension = ".html"; } + Config_updateString(HTML_FILE_EXTENSION,htmlFileExtension); - // expand the relative stripFromPath values - QStrList &stripFromPath = Config_getList(STRIP_FROM_PATH); - char *sfp = stripFromPath.first(); - if (sfp==0) // by default use the current path + //------------------------ + // check & correct STRIP_FROM_PATH + StringVector stripFromPath = Config_getList(STRIP_FROM_PATH); + if (stripFromPath.empty()) // by default use the current path { QString p = QDir::currentDirPath(); if (p.at(p.length()-1)!='/') p.append('/'); - stripFromPath.append(p.utf8()); + stripFromPath.push_back(p.utf8().data()); } else { cleanUpPaths(stripFromPath); } + Config_updateList(STRIP_FROM_PATH,stripFromPath); - // expand the relative stripFromPath values - QStrList &stripFromIncPath = Config_getList(STRIP_FROM_INC_PATH); + //------------------------ + // check & correct STRIP_FROM_INC_PATH + StringVector stripFromIncPath = Config_getList(STRIP_FROM_INC_PATH); cleanUpPaths(stripFromIncPath); + Config_updateList(STRIP_FROM_INC_PATH,stripFromIncPath); + //------------------------ // Test to see if HTML header is valid - QCString &headerFile = Config_getString(HTML_HEADER); + QCString headerFile = Config_getString(HTML_HEADER); if (!headerFile.isEmpty()) { QFileInfo fi(headerFile); @@ -1498,8 +1439,10 @@ void Config::checkAndCorrect() "does not exist\n",headerFile.data()); } } + + //------------------------ // Test to see if HTML footer is valid - QCString &footerFile = Config_getString(HTML_FOOTER); + QCString footerFile = Config_getString(HTML_FOOTER); if (!footerFile.isEmpty()) { QFileInfo fi(footerFile); @@ -1510,29 +1453,31 @@ void Config::checkAndCorrect() } } + //------------------------ // Test to see if MathJax code file is valid if (Config_getBool(USE_MATHJAX)) { - QCString &MathJaxCodefile = Config_getString(MATHJAX_CODEFILE); - if (!MathJaxCodefile.isEmpty()) + QCString mathJaxCodefile = Config_getString(MATHJAX_CODEFILE); + if (!mathJaxCodefile.isEmpty()) { - QFileInfo fi(MathJaxCodefile); + QFileInfo fi(mathJaxCodefile); if (!fi.exists()) { config_term("tag MATHJAX_CODEFILE file '%s' " - "does not exist\n",MathJaxCodefile.data()); + "does not exist\n",mathJaxCodefile.data()); } } - QCString &path = Config_getString(MATHJAX_RELPATH); + QCString path = Config_getString(MATHJAX_RELPATH); if (!path.isEmpty() && path.at(path.length()-1)!='/') { path+="/"; } - + Config_updateString(MATHJAX_RELPATH,path); } + //------------------------ // Test to see if LaTeX header is valid - QCString &latexHeaderFile = Config_getString(LATEX_HEADER); + QCString latexHeaderFile = Config_getString(LATEX_HEADER); if (!latexHeaderFile.isEmpty()) { QFileInfo fi(latexHeaderFile); @@ -1542,8 +1487,10 @@ void Config::checkAndCorrect() "does not exist\n",latexHeaderFile.data()); } } + + //------------------------ // Test to see if LaTeX footer is valid - QCString &latexFooterFile = Config_getString(LATEX_FOOTER); + QCString latexFooterFile = Config_getString(LATEX_FOOTER); if (!latexFooterFile.isEmpty()) { QFileInfo fi(latexFooterFile); @@ -1554,25 +1501,24 @@ void Config::checkAndCorrect() } } + //------------------------ // check include path - QStrList &includePath = Config_getList(INCLUDE_PATH); - char *s=includePath.first(); - while (s) + const StringVector &includePath = Config_getList(INCLUDE_PATH); + for (const auto &s : includePath) { - QFileInfo fi(s); + QFileInfo fi(s.c_str()); if (!fi.exists()) warn_uncond("tag INCLUDE_PATH: include path '%s' " - "does not exist\n",s); - s=includePath.next(); + "does not exist\n",s.c_str()); } + //------------------------ // check PREDEFINED if (Config_getBool(ENABLE_PREPROCESSING)) { - QStrList &predefList = Config_getList(PREDEFINED); - s=predefList.first(); - while (s) + const StringVector &predefList = Config_getList(PREDEFINED); + for (const auto &s : predefList) { - QCString predef=s; + QCString predef=s.c_str(); predef=predef.stripWhiteSpace(); int i_equals=predef.find('='); int i_obrace=predef.find('('); @@ -1580,79 +1526,85 @@ void Config::checkAndCorrect() { err("Illegal PREDEFINED format '%s', no define name specified\n",predef.data()); } - s=predefList.next(); } } + //------------------------ // check ALIASES - QStrList &aliasList = Config_getList(ALIASES); - s=aliasList.first(); - while (s) + const StringVector &aliasList = Config_getList(ALIASES); + for (const auto &s : aliasList) { QRegExp re1("[a-z_A-Z][a-z_A-Z0-9]*[ \t]*="); // alias without argument QRegExp re2("[a-z_A-Z][a-z_A-Z0-9]*{[0-9]+}[ \t]*="); // alias with argument - QCString alias=s; + QCString alias=s.c_str(); alias=alias.stripWhiteSpace(); if (alias.find(re1)!=0 && alias.find(re2)!=0) { err("Illegal ALIASES format '%s'. Use \"name=value\" or \"name{n}=value\", where n is the number of arguments\n", alias.data()); } - 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); + //------------------------ // check FILTER_SOURCE_PATTERNS checkList(Config_getList(FILTER_SOURCE_PATTERNS),"FILTER_SOURCE_PATTERNS",FALSE,FALSE); + //------------------------ // check TAGFILES checkList(Config_getList(TAGFILES),"TAGFILES",FALSE,TRUE); + //------------------------ // check EXTRA_SEARCH_MAPPINGS if (Config_getBool(SEARCHENGINE) && Config_getBool(GENERATE_HTML)) { checkList(Config_getList(EXTRA_SEARCH_MAPPINGS),"EXTRA_SEARCH_MAPPING",TRUE,TRUE); } + //------------------------ // check if GENERATE_TREEVIEW and GENERATE_HTMLHELP are both enabled if (Config_getBool(GENERATE_TREEVIEW) && Config_getBool(GENERATE_HTMLHELP)) { err("When enabling GENERATE_HTMLHELP the tree view (GENERATE_TREEVIEW) should be disabled. I'll do it for you.\n"); - Config_getBool(GENERATE_TREEVIEW)=FALSE; + Config_updateBool(GENERATE_TREEVIEW,FALSE); } + + //------------------------ + // check if SEARCHENGINE and GENERATE_HTMLHELP are both enabled if (Config_getBool(SEARCHENGINE) && Config_getBool(GENERATE_HTMLHELP)) { err("When enabling GENERATE_HTMLHELP the search engine (SEARCHENGINE) should be disabled. I'll do it for you.\n"); - Config_getBool(SEARCHENGINE)=FALSE; + Config_updateBool(SEARCHENGINE,FALSE); } + //------------------------ // check if SEPARATE_MEMBER_PAGES and INLINE_GROUPED_CLASSES are both enabled if (Config_getBool(SEPARATE_MEMBER_PAGES) && Config_getBool(INLINE_GROUPED_CLASSES)) { err("When enabling INLINE_GROUPED_CLASSES the SEPARATE_MEMBER_PAGES option should be disabled. I'll do it for you.\n"); - Config_getBool(SEPARATE_MEMBER_PAGES)=FALSE; + Config_updateBool(SEPARATE_MEMBER_PAGES,FALSE); } - // check dot image format - QCString &dotImageFormat=Config_getEnum(DOT_IMAGE_FORMAT); + //------------------------ + // check and correct DOT_IMAGE_FORMAT + QCString dotImageFormat=Config_getEnum(DOT_IMAGE_FORMAT); dotImageFormat=dotImageFormat.stripWhiteSpace(); if (dotImageFormat.isEmpty()) { dotImageFormat = "png"; } - //else if (dotImageFormat!="gif" && dotImageFormat!="png" && dotImageFormat!="jpg") - //{ - // err("Invalid value for DOT_IMAGE_FORMAT: '%s'. Using the default.\n",dotImageFormat.data()); - // dotImageFormat = "png"; - //} + Config_updateEnum(DOT_IMAGE_FORMAT,dotImageFormat); + //------------------------ // correct DOT_FONTNAME if needed - QCString &dotFontName=Config_getString(DOT_FONTNAME); + QCString dotFontName=Config_getString(DOT_FONTNAME); if (dotFontName=="FreeSans" || dotFontName=="FreeSans.ttf") { warn_uncond("doxygen no longer ships with the FreeSans font.\n" @@ -1663,9 +1615,11 @@ void Config::checkAndCorrect() { dotFontName = "Helvetica"; } + Config_updateString(DOT_FONTNAME,dotFontName); + //------------------------ // clip dotFontSize against the maximum bounds - int &dotFontSize = Config_getInt(DOT_FONTSIZE); + int dotFontSize = Config_getInt(DOT_FONTSIZE); if (dotFontSize<4) { dotFontSize=4; @@ -1674,9 +1628,11 @@ void Config::checkAndCorrect() { dotFontSize=24; } + Config_updateInt(DOT_FONTSIZE,dotFontSize); + //------------------------ // clip number of threads - int &dotNumThreads = Config_getInt(DOT_NUM_THREADS); + int dotNumThreads = Config_getInt(DOT_NUM_THREADS); if (dotNumThreads>32) { dotNumThreads=32; @@ -1685,9 +1641,11 @@ void Config::checkAndCorrect() { dotNumThreads=QMAX(2,std::thread::hardware_concurrency()+1); } + Config_updateInt(DOT_NUM_THREADS,dotNumThreads); + //------------------------ // check dot path - QCString &dotPath = Config_getString(DOT_PATH); + QCString dotPath = Config_getString(DOT_PATH); if (!dotPath.isEmpty()) { QFileInfo fi(dotPath); @@ -1717,9 +1675,11 @@ void Config::checkAndCorrect() { dotPath=""; } + Config_updateString(DOT_PATH,dotPath); + //------------------------ // check plantuml path - QCString &plantumlJarPath = Config_getString(PLANTUML_JAR_PATH); + QCString plantumlJarPath = Config_getString(PLANTUML_JAR_PATH); if (!plantumlJarPath.isEmpty()) { QFileInfo pu(plantumlJarPath); @@ -1748,9 +1708,11 @@ void Config::checkAndCorrect() plantumlJarPath=""; } } + Config_updateString(PLANTUML_JAR_PATH,plantumlJarPath); + //------------------------ // check dia path - QCString &diaPath = Config_getString(DIA_PATH); + QCString diaPath = Config_getString(DIA_PATH); if (!diaPath.isEmpty()) { QFileInfo dp(diaPath+"/dia"+Portable::commandExtension()); @@ -1772,52 +1734,52 @@ void Config::checkAndCorrect() { diaPath=""; } + Config_updateString(DIA_PATH,diaPath); - // check input - QStrList &inputSources=Config_getList(INPUT); - if (inputSources.count()==0) + //------------------------ + // check INPUT + StringVector inputSources=Config_getList(INPUT); + if (inputSources.empty()) { // use current dir as the default - inputSources.append(QDir::currentDirPath().utf8()); + inputSources.push_back(QDir::currentDirPath().utf8().data()); } else { - s=inputSources.first(); - while (s) + for (const auto &s : inputSources) { - QFileInfo fi(s); + QFileInfo fi(s.c_str()); if (!fi.exists()) { - warn_uncond("tag INPUT: input source '%s' does not exist\n",s); + warn_uncond("tag INPUT: input source '%s' does not exist\n",s.c_str()); } - s=inputSources.next(); } } + Config_updateList(INPUT,inputSources); + //------------------------ // add default file patterns if needed - QStrList &filePatternList = Config_getList(FILE_PATTERNS); - if (filePatternList.isEmpty()) + StringVector filePatternList = Config_getList(FILE_PATTERNS); + if (filePatternList.empty()) { ConfigOption * opt = ConfigImpl::instance()->get("FILE_PATTERNS"); if (opt->kind()==ConfigOption::O_List) { - QStrList l = ((ConfigList*)opt)->getDefault(); - const char *p = l.first(); - while (p) - { - filePatternList.append(p); - p = l.next(); - } + filePatternList = ((ConfigList*)opt)->getDefault(); } } + Config_updateList(FILE_PATTERNS,filePatternList); + //------------------------ // add default pattern if needed - QStrList &examplePatternList = Config_getList(EXAMPLE_PATTERNS); - if (examplePatternList.isEmpty()) + StringVector examplePatternList = Config_getList(EXAMPLE_PATTERNS); + if (examplePatternList.empty()) { - examplePatternList.append("*"); + examplePatternList.push_back("*"); + Config_updateList(EXAMPLE_PATTERNS,examplePatternList); } + //------------------------ // if no output format is enabled, warn the user if (!Config_getBool(GENERATE_HTML) && !Config_getBool(GENERATE_LATEX) && @@ -1834,6 +1796,7 @@ void Config::checkAndCorrect() warn_uncond("No output formats selected! Set at least one of the main GENERATE_* options to YES.\n"); } + //------------------------ // check HTMLHELP creation requirements if (!Config_getBool(GENERATE_HTML) && Config_getBool(GENERATE_HTMLHELP)) @@ -1841,36 +1804,40 @@ void Config::checkAndCorrect() warn_uncond("GENERATE_HTMLHELP=YES requires GENERATE_HTML=YES.\n"); } + //------------------------ // check QHP creation requirements if (Config_getBool(GENERATE_QHP)) { if (Config_getString(QHP_NAMESPACE).isEmpty()) { err("GENERATE_QHP=YES requires QHP_NAMESPACE to be set. Using 'org.doxygen.doc' as default!.\n"); - Config_getString(QHP_NAMESPACE)="org.doxygen.doc"; + Config_updateString(QHP_NAMESPACE,"org.doxygen.doc"); } if (Config_getString(QHP_VIRTUAL_FOLDER).isEmpty()) { err("GENERATE_QHP=YES requires QHP_VIRTUAL_FOLDER to be set. Using 'doc' as default!\n"); - Config_getString(QHP_VIRTUAL_FOLDER)="doc"; + Config_updateString(QHP_VIRTUAL_FOLDER,"doc"); } } + //------------------------ if (Config_getBool(OPTIMIZE_OUTPUT_JAVA) && Config_getBool(INLINE_INFO)) { // don't show inline info for Java output, since Java has no inline // concept. - Config_getBool(INLINE_INFO)=FALSE; + Config_updateBool(INLINE_INFO,FALSE); } - int &depth = Config_getInt(MAX_DOT_GRAPH_DEPTH); + //------------------------ + int depth = Config_getInt(MAX_DOT_GRAPH_DEPTH); if (depth==0) { - depth=1000; + Config_updateInt(MAX_DOT_GRAPH_DEPTH,1000); } - int &hue = Config_getInt(HTML_COLORSTYLE_HUE); + //------------------------ + int hue = Config_getInt(HTML_COLORSTYLE_HUE); if (hue<0) { hue=0; @@ -1879,8 +1846,10 @@ void Config::checkAndCorrect() { hue=hue%360; } + Config_updateInt(HTML_COLORSTYLE_HUE,hue); - int &sat = Config_getInt(HTML_COLORSTYLE_SAT); + //------------------------ + int sat = Config_getInt(HTML_COLORSTYLE_SAT); if (sat<0) { sat=0; @@ -1889,7 +1858,11 @@ void Config::checkAndCorrect() { sat=255; } - int &gamma = Config_getInt(HTML_COLORSTYLE_GAMMA); + Config_updateInt(HTML_COLORSTYLE_SAT,sat); + + + //------------------------ + int gamma = Config_getInt(HTML_COLORSTYLE_GAMMA); if (gamma<40) { gamma=40; @@ -1898,32 +1871,30 @@ void Config::checkAndCorrect() { gamma=240; } + Config_updateInt(HTML_COLORSTYLE_GAMMA,gamma); + //------------------------ QCString mathJaxFormat = Config_getEnum(MATHJAX_FORMAT); if (!mathJaxFormat.isEmpty() && mathJaxFormat!="HTML-CSS" && mathJaxFormat!="NativeMML" && mathJaxFormat!="SVG") { err("Unsupported value for MATHJAX_FORMAT: Should be one of HTML-CSS, NativeMML, or SVG\n"); - Config_getEnum(MATHJAX_FORMAT)="HTML-CSS"; + Config_updateEnum(MATHJAX_FORMAT,"HTML-CSS"); } + //------------------------ // add default words if needed - QStrList &annotationFromBrief = Config_getList(ABBREVIATE_BRIEF); - if (annotationFromBrief.isEmpty()) - { - annotationFromBrief.append("The $name class"); - annotationFromBrief.append("The $name widget"); - annotationFromBrief.append("The $name file"); - annotationFromBrief.append("is"); - annotationFromBrief.append("provides"); - annotationFromBrief.append("specifies"); - annotationFromBrief.append("contains"); - annotationFromBrief.append("represents"); - annotationFromBrief.append("a"); - annotationFromBrief.append("an"); - annotationFromBrief.append("the"); + const StringVector &annotationFromBrief = Config_getList(ABBREVIATE_BRIEF); + if (annotationFromBrief.empty()) + { + Config_updateList(ABBREVIATE_BRIEF, + { "The $name class", "The $name widget", + "The $name file", "is", "provides", "specifies", + "contains", "represents", "a", "an", "the" + }); } + //------------------------ // some default settings for vhdl if (Config_getBool(OPTIMIZE_OUTPUT_VHDL) && (Config_getBool(INLINE_INHERITED_MEMB) || @@ -1953,15 +1924,18 @@ void Config::checkAndCorrect() "%s%s%s%s%s%s",s1,s2,s3,s4,s5,s6 ); - Config_getBool(INLINE_INHERITED_MEMB) = FALSE; - Config_getBool(INHERIT_DOCS) = FALSE; - Config_getBool(HIDE_SCOPE_NAMES) = TRUE; - Config_getBool(EXTRACT_PRIVATE) = TRUE; - Config_getBool(ENABLE_PREPROCESSING) = FALSE; - Config_getBool(EXTRACT_PACKAGE) = TRUE; + Config_updateBool(INLINE_INHERITED_MEMB, FALSE); + Config_updateBool(INHERIT_DOCS, FALSE); + Config_updateBool(HIDE_SCOPE_NAMES, TRUE); + Config_updateBool(EXTRACT_PRIVATE, TRUE); + Config_updateBool(ENABLE_PREPROCESSING, FALSE); + Config_updateBool(EXTRACT_PACKAGE, TRUE); } - checkFileName(Config_getString(GENERATE_TAGFILE),"GENERATE_TAGFILE"); + if (!checkFileName(Config_getString(GENERATE_TAGFILE),"GENERATE_TAGFILE")) + { + Config_updateString(GENERATE_TAGFILE,""); + } #if 0 // TODO: this breaks test 25; SOURCEBROWSER = NO and SOURCE_TOOLTIPS = YES. // So this and other regressions should be analysed and fixed before this can be enabled @@ -2016,10 +1990,10 @@ void Config::postProcess(bool clearHeaderAndFooter, bool compare) // refers to the files that we are supposed to parse. if (clearHeaderAndFooter) { - Config_getString(HTML_HEADER)=""; - Config_getString(HTML_FOOTER)=""; - Config_getString(LATEX_HEADER)=""; - Config_getString(LATEX_FOOTER)=""; + Config_updateString(HTML_HEADER ,""); + Config_updateString(HTML_FOOTER ,""); + Config_updateString(LATEX_HEADER,""); + Config_updateString(LATEX_FOOTER,""); } } diff --git a/src/context.cpp b/src/context.cpp index 9684870..d21b1d0 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -298,18 +298,16 @@ class ConfigContext::Private public: Private() { m_cachedLists.setAutoDelete(TRUE); } virtual ~Private() { } - TemplateVariant fetchList(const QCString &name,const QStrList *list) + TemplateVariant fetchList(const QCString &name,const StringVector &list) { TemplateVariant *v = m_cachedLists.find(name); if (v==0) { TemplateList *tlist = TemplateList::alloc(); m_cachedLists.insert(name,new TemplateVariant(tlist)); - QStrListIterator li(*list); - char *s; - for (li.toFirst();(s=li.current());++li) + for (const auto &s : list) { - tlist->append(s); + tlist->append(s.c_str()); } return tlist; } @@ -345,23 +343,23 @@ TemplateVariant ConfigContext::get(const char *name) const { case ConfigValues::Info::Bool: { - bool b = ConfigValues::instance().*((ConfigValues::InfoBool*)option)->item; + bool b = ConfigValues::instance().*(option->value.b); return TemplateVariant(b); } case ConfigValues::Info::Int: { - int i = ConfigValues::instance().*((ConfigValues::InfoInt*)option)->item; + int i = ConfigValues::instance().*(option->value.i); return TemplateVariant(i); } case ConfigValues::Info::String: { - QCString s = ConfigValues::instance().*((ConfigValues::InfoString*)option)->item; + QCString s = ConfigValues::instance().*(option->value.s); return TemplateVariant(s); } case ConfigValues::Info::List: { - const QStrList &l = ConfigValues::instance().*((ConfigValues::InfoList*)option)->item; - return p->fetchList(name,&l); + const StringVector &l = ConfigValues::instance().*(option->value.l); + return p->fetchList(name,l); } default: break; diff --git a/src/definition.cpp b/src/definition.cpp index 09b4f56..c398b61 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -159,13 +159,12 @@ void DefinitionImpl::setDefFile(const QCString &df,int defLine,int defCol) static bool matchExcludedSymbols(const char *name) { - static QStrList &exclSyms = Config_getList(EXCLUDE_SYMBOLS); - if (exclSyms.count()==0) return FALSE; // nothing specified - const char *pat = exclSyms.first(); + const StringVector &exclSyms = Config_getList(EXCLUDE_SYMBOLS); + if (exclSyms.empty()) return FALSE; // nothing specified QCString symName = name; - while (pat) + for (const auto &pat : exclSyms) { - QCString pattern = pat; + QCString pattern = pat.c_str(); bool forceStart=FALSE; bool forceEnd=FALSE; if (pattern.at(0)=='^') @@ -210,7 +209,6 @@ static bool matchExcludedSymbols(const char *name) } } } - pat = exclSyms.next(); } //printf("--> name=%s: no match\n",name); return FALSE; @@ -1930,15 +1928,13 @@ QCString abbreviate(const char *s,const char *name) result=result.left(result.length()-1); // strip any predefined prefix - QStrList &briefDescAbbrev = Config_getList(ABBREVIATE_BRIEF); - const char *p = briefDescAbbrev.first(); - while (p) + const StringVector &briefDescAbbrev = Config_getList(ABBREVIATE_BRIEF); + for (const auto &p : briefDescAbbrev) { - QCString str = p; + QCString str = p.c_str(); str.replace(QRegExp("\\$name"), scopelessName); // replace $name with entity name str += " "; stripWord(result,str); - p = briefDescAbbrev.next(); } // capitalize first word diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 0f8f04b..7f0b524 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -69,7 +69,7 @@ class DirDefImpl : public DefinitionImpl, public DirDef void endMemberDeclarations(OutputList &ol); static DirDef *createNewDir(const char *path); - static bool matchPath(const QCString &path,QStrList &l); + static bool matchPath(const QCString &path,const StringVector &l); DirList m_subdirs; QCString m_dispName; @@ -792,17 +792,15 @@ DirDef *DirDefImpl::createNewDir(const char *path) return dir; } -bool DirDefImpl::matchPath(const QCString &path,QStrList &l) +bool DirDefImpl::matchPath(const QCString &path,const StringVector &l) { - const char *s=l.first(); - while (s) + for (const auto &s : l) { - QCString prefix = s; - if (qstricmp(prefix.left(path.length()),path)==0) // case insensitive compare + std::string prefix = s.substr(0,path.length()); + if (qstricmp(prefix.c_str(),path)==0) // case insensitive compare { return TRUE; } - s = l.next(); } return FALSE; } diff --git a/src/docparser.cpp b/src/docparser.cpp index 00f287c..0ed7f50 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -1846,18 +1846,16 @@ static void readTextFileByName(const QCString &file,QCString &text) return; } } - QStrList &examplePathList = Config_getList(EXAMPLE_PATH); - char *s=examplePathList.first(); - while (s) + const StringVector &examplePathList = Config_getList(EXAMPLE_PATH); + for (const auto &s : examplePathList) { - QCString absFileName = QCString(s)+Portable::pathSeparator()+file; + QCString absFileName = QCString(s.c_str())+Portable::pathSeparator()+file; QFileInfo fi(absFileName); if (fi.exists()) { text = fileToString(absFileName,Config_getBool(FILTER_SOURCE_FILES)); return; } - s=examplePathList.next(); } // as a fallback we also look in the exampleNameDict @@ -2569,7 +2567,7 @@ void DocRef::parse() DocCite::DocCite(DocNode *parent,const QCString &target,const QCString &) //context) { - static uint numBibFiles = Config_getList(CITE_BIB_FILES).count(); + size_t numBibFiles = Config_getList(CITE_BIB_FILES).size(); m_parent = parent; //printf("DocCite::DocCite(target=%s)\n",target.data()); ASSERT(!target.isEmpty()); diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 1824ceb..ddaa3f1 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -628,7 +628,7 @@ static void addIncludeFile(ClassDef *cd,FileDef *ifd,const Entry *root) iName=fd->name(); } } - else if (!Config_getList(STRIP_FROM_INC_PATH).isEmpty()) + else if (!Config_getList(STRIP_FROM_INC_PATH).empty()) { iName=stripFromIncludePath(fd->absFilePath()); } @@ -8856,10 +8856,10 @@ static void readTagFile(const std::shared_ptr &root,const char *tl) //---------------------------------------------------------------------------- static void copyLatexStyleSheet() { - QStrList latexExtraStyleSheet = Config_getList(LATEX_EXTRA_STYLESHEET); - for (uint i=0; i parseFile(OutlineParserInterface &parser, parser.needsPreprocessing(extension)) { Preprocessor preprocessor; - QStrList &includePath = Config_getList(INCLUDE_PATH); - char *s=includePath.first(); - while (s) + const StringVector &includePath = Config_getList(INCLUDE_PATH); + for (const auto &s : includePath) { - preprocessor.addSearchDir(QFileInfo(s).absFilePath().utf8()); - s=includePath.next(); + preprocessor.addSearchDir(QFileInfo(s.c_str()).absFilePath().utf8()); } BufStr inBuf(fi.size()+4096); msg("Preprocessing %s...\n",fn); @@ -9318,8 +9314,8 @@ static QDict g_pathsVisited(1009); static int readDir(QFileInfo *fi, FileNameLinkedMap *fnMap, StringUnorderedSet *exclSet, - QStrList *patList, - QStrList *exclPatList, + const StringVector *patList, + const StringVector *exclPatList, StringVector *resultList, StringUnorderedSet *resultSet, bool errorIfNotExist, @@ -9366,8 +9362,8 @@ static int readDir(QFileInfo *fi, } else if (cfi->isFile() && (!Config_getBool(EXCLUDE_SYMLINKS) || !cfi->isSymLink()) && - (patList==0 || patternMatch(*cfi,patList)) && - !patternMatch(*cfi,exclPatList) && + (patList==0 || patternMatch(*cfi,*patList)) && + (exclPatList==0 || !patternMatch(*cfi,*exclPatList)) && (killSet==0 || killSet->find(cfi->absFilePath().utf8().data())==killSet->end()) ) { @@ -9391,7 +9387,7 @@ static int readDir(QFileInfo *fi, else if (recursive && (!Config_getBool(EXCLUDE_SYMLINKS) || !cfi->isSymLink()) && cfi->isDir() && - !patternMatch(*cfi,exclPatList) && + (exclPatList==0 || !patternMatch(*cfi,*exclPatList)) && cfi->fileName().at(0)!='.') // skip "." ".." and ".dir" { cfi->setFile(cfi->absFilePath()); @@ -9414,8 +9410,8 @@ static int readDir(QFileInfo *fi, int readFileOrDirectory(const char *s, FileNameLinkedMap *fnMap, StringUnorderedSet *exclSet, - QStrList *patList, - QStrList *exclPatList, + const StringVector *patList, + const StringVector *exclPatList, StringVector *resultList, StringUnorderedSet *resultSet, bool recursive, @@ -9554,13 +9550,12 @@ void readAliases() { // add aliases to a dictionary Doxygen::aliasDict.setAutoDelete(TRUE); - QStrList &aliasList = Config_getList(ALIASES); - const char *s=aliasList.first(); - while (s) + const StringVector &aliasList = Config_getList(ALIASES); + for (const auto &s : aliasList) { - if (Doxygen::aliasDict[s]==0) + QCString alias=s.c_str(); + if (Doxygen::aliasDict[alias]==0) { - QCString alias=s; int i=alias.find('='); if (i>0) { @@ -9581,7 +9576,6 @@ void readAliases() } } } - s=aliasList.next(); } expandAliases(); escapeAliases(); @@ -10308,15 +10302,13 @@ void adjustConfiguration() * Add custom extension mappings **************************************************************************/ - QStrList &extMaps = Config_getList(EXTENSION_MAPPING); - char *mapping = extMaps.first(); - while (mapping) + const StringVector &extMaps = Config_getList(EXTENSION_MAPPING); + for (const auto &mapping : extMaps) { - QCString mapStr = mapping; + QCString mapStr = mapping.c_str(); int i=mapStr.find('='); if (i==-1) { - mapping = extMaps.next(); continue; } else @@ -10325,7 +10317,6 @@ void adjustConfiguration() QCString language = mapStr.mid(i+1).stripWhiteSpace().lower(); if (ext.isEmpty() || language.isEmpty()) { - mapping = extMaps.next(); continue; } @@ -10341,23 +10332,20 @@ void adjustConfiguration() ext.data(),language.data()); } } - mapping = extMaps.next(); } // add predefined macro name to a dictionary - QStrList &expandAsDefinedList =Config_getList(EXPAND_AS_DEFINED); - char *s=expandAsDefinedList.first(); - while (s) + const StringVector &expandAsDefinedList =Config_getList(EXPAND_AS_DEFINED); + for (const auto &s : expandAsDefinedList) { - Doxygen::expandAsDefinedSet.insert(s); - s=expandAsDefinedList.next(); + Doxygen::expandAsDefinedSet.insert(s.c_str()); } // read aliases and store them in a dictionary readAliases(); // store number of spaces in a tab into Doxygen::spaces - int &tabSize = Config_getInt(TAB_SIZE); + int tabSize = Config_getInt(TAB_SIZE); Doxygen::spaces.resize(tabSize+1); int sp;for (sp=0;sp updateConfig) { + QCString result = formatDirName; // Note the & on the next line, we modify the formatDirOption! - if (formatDirName.isEmpty()) + if (result.isEmpty()) { - formatDirName = baseDirName + defaultDirName; + result = baseDirName + defaultDirName; + updateConfig(result); } else if (formatDirName[0]!='/' && (formatDirName.length()==1 || formatDirName[1]!=':')) { - formatDirName.prepend(baseDirName+'/'); + result.prepend(baseDirName+'/'); + updateConfig(result); } - QDir formatDir(formatDirName); - if (!formatDir.exists() && !formatDir.mkdir(formatDirName)) + QDir formatDir(result); + if (!formatDir.exists() && !formatDir.mkdir(result)) { - err("Could not create output directory %s\n", formatDirName.data()); + err("Could not create output directory %s\n", result.data()); cleanUpDoxygen(); exit(1); } - return formatDirName; + return result; } static QCString getQchFileName() @@ -10533,23 +10525,20 @@ void searchInputFiles() { StringUnorderedSet killSet; - QStrList &exclPatterns = Config_getList(EXCLUDE_PATTERNS); + const StringVector &exclPatterns = Config_getList(EXCLUDE_PATTERNS); bool alwaysRecursive = Config_getBool(RECURSIVE); StringUnorderedSet excludeNameSet; // gather names of all files in the include path g_s.begin("Searching for include files...\n"); killSet.clear(); - QStrList &includePathList = Config_getList(INCLUDE_PATH); - char *s=includePathList.first(); - while (s) + const StringVector &includePathList = Config_getList(INCLUDE_PATH); + for (const auto &s : includePathList) { - QStrList &pl = Config_getList(INCLUDE_FILE_PATTERNS); - if (pl.count()==0) - { - pl = Config_getList(FILE_PATTERNS); - } - readFileOrDirectory(s, // s + size_t plSize = Config_getList(INCLUDE_FILE_PATTERNS).size(); + const StringVector &pl = plSize==0 ? Config_getList(FILE_PATTERNS) : + Config_getList(INCLUDE_FILE_PATTERNS); + readFileOrDirectory(s.c_str(), // s Doxygen::includeNameLinkedMap, // fnDict 0, // exclSet &pl, // patList @@ -10559,17 +10548,15 @@ void searchInputFiles() alwaysRecursive, // recursive TRUE, // errorIfNotExist &killSet); // killSet - s=includePathList.next(); } g_s.end(); g_s.begin("Searching for example files...\n"); killSet.clear(); - QStrList &examplePathList = Config_getList(EXAMPLE_PATH); - s=examplePathList.first(); - while (s) + const StringVector &examplePathList = Config_getList(EXAMPLE_PATH); + for (const auto &s : examplePathList) { - readFileOrDirectory(s, // s + readFileOrDirectory(s.c_str(), // s Doxygen::exampleNameLinkedMap, // fnDict 0, // exclSet &Config_getList(EXAMPLE_PATTERNS), // patList @@ -10579,17 +10566,15 @@ void searchInputFiles() (alwaysRecursive || Config_getBool(EXAMPLE_RECURSIVE)), // recursive TRUE, // errorIfNotExist &killSet); // killSet - s=examplePathList.next(); } g_s.end(); g_s.begin("Searching for images...\n"); killSet.clear(); - QStrList &imagePathList=Config_getList(IMAGE_PATH); - s=imagePathList.first(); - while (s) + const StringVector &imagePathList=Config_getList(IMAGE_PATH); + for (const auto &s : imagePathList) { - readFileOrDirectory(s, // s + readFileOrDirectory(s.c_str(), // s Doxygen::imageNameLinkedMap, // fnDict 0, // exclSet 0, // patList @@ -10599,17 +10584,15 @@ void searchInputFiles() alwaysRecursive, // recursive TRUE, // errorIfNotExist &killSet); // killSet - s=imagePathList.next(); } g_s.end(); g_s.begin("Searching for dot files...\n"); killSet.clear(); - QStrList &dotFileList=Config_getList(DOTFILE_DIRS); - s=dotFileList.first(); - while (s) + const StringVector &dotFileList=Config_getList(DOTFILE_DIRS); + for (const auto &s : dotFileList) { - readFileOrDirectory(s, // s + readFileOrDirectory(s.c_str(), // s Doxygen::dotFileNameLinkedMap, // fnDict 0, // exclSet 0, // patList @@ -10619,17 +10602,15 @@ void searchInputFiles() alwaysRecursive, // recursive TRUE, // errorIfNotExist &killSet); // killSet - s=dotFileList.next(); } g_s.end(); g_s.begin("Searching for msc files...\n"); killSet.clear(); - QStrList &mscFileList=Config_getList(MSCFILE_DIRS); - s=mscFileList.first(); - while (s) + const StringVector &mscFileList=Config_getList(MSCFILE_DIRS); + for (const auto &s : mscFileList) { - readFileOrDirectory(s, // s + readFileOrDirectory(s.c_str(), // s Doxygen::mscFileNameLinkedMap, // fnDict 0, // exclSet 0, // patList @@ -10639,17 +10620,15 @@ void searchInputFiles() alwaysRecursive, // recursive TRUE, // errorIfNotExist &killSet); // killSet - s=mscFileList.next(); } g_s.end(); g_s.begin("Searching for dia files...\n"); killSet.clear(); - QStrList &diaFileList=Config_getList(DIAFILE_DIRS); - s=diaFileList.first(); - while (s) + const StringVector &diaFileList=Config_getList(DIAFILE_DIRS); + for (const auto &s : diaFileList) { - readFileOrDirectory(s, // s + readFileOrDirectory(s.c_str(), // s Doxygen::diaFileNameLinkedMap, // fnDict 0, // exclSet 0, // patList @@ -10659,16 +10638,14 @@ void searchInputFiles() alwaysRecursive, // recursive TRUE, // errorIfNotExist &killSet); // killSet - s=diaFileList.next(); } g_s.end(); g_s.begin("Searching for files to exclude\n"); - QStrList &excludeList = Config_getList(EXCLUDE); - s=excludeList.first(); - while (s) + const StringVector &excludeList = Config_getList(EXCLUDE); + for (const auto &s : excludeList) { - readFileOrDirectory(s, // s + readFileOrDirectory(s.c_str(), // s 0, // fnDict 0, // exclSet &Config_getList(FILE_PATTERNS), // patList @@ -10677,7 +10654,6 @@ void searchInputFiles() &excludeNameSet, // resultSet alwaysRecursive, // recursive FALSE); // errorIfNotExist - s=excludeList.next(); // killSet } g_s.end(); @@ -10688,11 +10664,10 @@ void searchInputFiles() g_s.begin("Searching INPUT for files to process...\n"); killSet.clear(); Doxygen::inputPaths.clear(); - QStrList &inputList=Config_getList(INPUT); - s=inputList.first(); - while (s) + const StringVector &inputList=Config_getList(INPUT); + for (const auto &s : inputList) { - QCString path=s; + QCString path=s.c_str(); uint l = path.length(); if (l>0) { @@ -10712,7 +10687,6 @@ void searchInputFiles() &killSet, // killSet &Doxygen::inputPaths); // paths } - s=inputList.next(); } std::sort(Doxygen::inputNameLinkedMap->begin(), Doxygen::inputNameLinkedMap->end(), @@ -10738,10 +10712,10 @@ void parseInput() /************************************************************************** * Make sure the output directory exists **************************************************************************/ - QCString &outputDirectory = Config_getString(OUTPUT_DIRECTORY); + QCString outputDirectory = Config_getString(OUTPUT_DIRECTORY); if (outputDirectory.isEmpty()) { - outputDirectory=QDir::currentDirPath().utf8(); + outputDirectory = Config_updateString(OUTPUT_DIRECTORY,QDir::currentDirPath().utf8()); } else { @@ -10763,7 +10737,7 @@ void parseInput() } dir.cd(outputDirectory); } - outputDirectory=dir.absPath().utf8(); + outputDirectory = Config_updateString(OUTPUT_DIRECTORY,dir.absPath().utf8()); } /************************************************************************** @@ -10795,34 +10769,40 @@ void parseInput() **************************************************************************/ QCString htmlOutput; - bool &generateHtml = Config_getBool(GENERATE_HTML); + bool generateHtml = Config_getBool(GENERATE_HTML); if (generateHtml || g_useOutputTemplate /* TODO: temp hack */) - htmlOutput = createOutputDirectory(outputDirectory,Config_getString(HTML_OUTPUT),"/html"); + htmlOutput = createOutputDirectory(outputDirectory,Config_getString(HTML_OUTPUT), + "/html",Config_setterFunc(HTML_OUTPUT)); QCString docbookOutput; - bool &generateDocbook = Config_getBool(GENERATE_DOCBOOK); + bool generateDocbook = Config_getBool(GENERATE_DOCBOOK); if (generateDocbook) - docbookOutput = createOutputDirectory(outputDirectory,Config_getString(DOCBOOK_OUTPUT),"/docbook"); + docbookOutput = createOutputDirectory(outputDirectory,Config_getString(DOCBOOK_OUTPUT), + "/docbook",Config_setterFunc(DOCBOOK_OUTPUT)); QCString xmlOutput; - bool &generateXml = Config_getBool(GENERATE_XML); + bool generateXml = Config_getBool(GENERATE_XML); if (generateXml) - xmlOutput = createOutputDirectory(outputDirectory,Config_getString(XML_OUTPUT),"/xml"); + xmlOutput = createOutputDirectory(outputDirectory,Config_getString(XML_OUTPUT), + "/xml",Config_setterFunc(XML_OUTPUT)); QCString latexOutput; - bool &generateLatex = Config_getBool(GENERATE_LATEX); + bool generateLatex = Config_getBool(GENERATE_LATEX); if (generateLatex) - latexOutput = createOutputDirectory(outputDirectory,Config_getString(LATEX_OUTPUT),"/latex"); + latexOutput = createOutputDirectory(outputDirectory,Config_getString(LATEX_OUTPUT), + "/latex",Config_setterFunc(LATEX_OUTPUT)); QCString rtfOutput; - bool &generateRtf = Config_getBool(GENERATE_RTF); + bool generateRtf = Config_getBool(GENERATE_RTF); if (generateRtf) - rtfOutput = createOutputDirectory(outputDirectory,Config_getString(RTF_OUTPUT),"/rtf"); + rtfOutput = createOutputDirectory(outputDirectory,Config_getString(RTF_OUTPUT), + "/rtf",Config_setterFunc(RTF_OUTPUT)); QCString manOutput; - bool &generateMan = Config_getBool(GENERATE_MAN); + bool generateMan = Config_getBool(GENERATE_MAN); if (generateMan) - manOutput = createOutputDirectory(outputDirectory,Config_getString(MAN_OUTPUT),"/man"); + manOutput = createOutputDirectory(outputDirectory,Config_getString(MAN_OUTPUT), + "/man",Config_setterFunc(MAN_OUTPUT)); //QCString sqlOutput; //bool &generateSql = Config_getBool(GENERATE_SQLITE3); @@ -10856,11 +10836,11 @@ void parseInput() **************************************************************************/ LayoutDocManager::instance().init(); - QCString &layoutFileName = Config_getString(LAYOUT_FILE); + QCString layoutFileName = Config_getString(LAYOUT_FILE); bool defaultLayoutUsed = FALSE; if (layoutFileName.isEmpty()) { - layoutFileName = "DoxygenLayout.xml"; + layoutFileName = Config_updateString(LAYOUT_FILE,"DoxygenLayout.xml"); defaultLayoutUsed = TRUE; } @@ -10880,13 +10860,14 @@ void parseInput() **************************************************************************/ // prevent search in the output directories - QStrList &exclPatterns = Config_getList(EXCLUDE_PATTERNS); - if (generateHtml) exclPatterns.append(htmlOutput); - if (generateDocbook) exclPatterns.append(docbookOutput); - if (generateXml) exclPatterns.append(xmlOutput); - if (generateLatex) exclPatterns.append(latexOutput); - if (generateRtf) exclPatterns.append(rtfOutput); - if (generateMan) exclPatterns.append(manOutput); + StringVector exclPatterns = Config_getList(EXCLUDE_PATTERNS); + if (generateHtml) exclPatterns.push_back(htmlOutput.data()); + if (generateDocbook) exclPatterns.push_back(docbookOutput.data()); + if (generateXml) exclPatterns.push_back(xmlOutput.data()); + if (generateLatex) exclPatterns.push_back(latexOutput.data()); + if (generateRtf) exclPatterns.push_back(rtfOutput.data()); + if (generateMan) exclPatterns.push_back(manOutput.data()); + Config_updateList(EXCLUDE_PATTERNS,exclPatterns); searchInputFiles(); @@ -10919,12 +10900,10 @@ void parseInput() std::shared_ptr root = std::make_shared(); msg("Reading and parsing tag files\n"); - QStrList &tagFileList = Config_getList(TAGFILES); - char *s=tagFileList.first(); - while (s) + const StringVector &tagFileList = Config_getList(TAGFILES); + for (const auto &s : tagFileList) { - readTagFile(root,s); - s=tagFileList.next(); + readTagFile(root,s.c_str()); } /************************************************************************** diff --git a/src/doxygen.h b/src/doxygen.h index 99b5d6f..557c871 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -165,8 +165,8 @@ void cleanUpDoxygen(); int readFileOrDirectory(const char *s, FileNameLinkedMap *fnDict, StringUnorderedSet *exclSet, - QStrList *patList, - QStrList *exclPatList, + const StringVector *patList, + const StringVector *exclPatList, StringVector *resultList, StringUnorderedSet *resultSet, bool recursive, diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index cb50af1..d5a5703 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -669,7 +669,7 @@ static void generateJSNavTree(const QList &nodeList) t << "var NAVTREE =" << endl; t << "[" << endl; t << " [ "; - QCString &projName = Config_getString(PROJECT_NAME); + QCString projName = Config_getString(PROJECT_NAME); if (projName.isEmpty()) { if (mainPageHasTitle()) // Use title of main page as root diff --git a/src/htags.cpp b/src/htags.cpp index 1a240b1..0c3a9af 100644 --- a/src/htags.cpp +++ b/src/htags.cpp @@ -3,8 +3,8 @@ * Copyright (C) 1997-2015 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 + * 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. * @@ -36,25 +36,25 @@ static QDict g_symbolDict(10007); */ bool Htags::execute(const QCString &htmldir) { - static QStrList &inputSource = Config_getList(INPUT); - static bool quiet = Config_getBool(QUIET); - static bool warnings = Config_getBool(WARNINGS); - static QCString htagsOptions = ""; //Config_getString(HTAGS_OPTIONS); - static QCString projectName = Config_getString(PROJECT_NAME); - static QCString projectNumber = Config_getString(PROJECT_NUMBER); + const StringVector &inputSource = Config_getList(INPUT); + bool quiet = Config_getBool(QUIET); + bool warnings = Config_getBool(WARNINGS); + QCString htagsOptions = ""; //Config_getString(HTAGS_OPTIONS); + QCString projectName = Config_getString(PROJECT_NAME); + QCString projectNumber = Config_getString(PROJECT_NUMBER); QCString cwd = QDir::currentDirPath().utf8(); - if (inputSource.isEmpty()) + if (inputSource.empty()) { g_inputDir.setPath(cwd); } - else if (inputSource.count()==1) + else if (inputSource.size()==1) { - g_inputDir.setPath(inputSource.first()); + g_inputDir.setPath(inputSource.back().c_str()); if (!g_inputDir.exists()) err("Cannot find directory %s. " "Check the value of the INPUT tag in the configuration file.\n", - inputSource.first() + inputSource.back().c_str() ); } else @@ -69,16 +69,16 @@ bool Htags::execute(const QCString &htmldir) QCString commandLine = " -g -s -a -n "; if (!quiet) commandLine += "-v "; if (warnings) commandLine += "-w "; - if (!htagsOptions.isEmpty()) + if (!htagsOptions.isEmpty()) { commandLine += ' '; commandLine += htagsOptions; } - if (!projectName.isEmpty()) + if (!projectName.isEmpty()) { commandLine += "-t \""; commandLine += projectName; - if (!projectNumber.isEmpty()) + if (!projectNumber.isEmpty()) { commandLine += '-'; commandLine += projectNumber; @@ -150,7 +150,7 @@ bool Htags::loadFilemap(const QCString &htmlDir) } else { - err("file %s cannot be opened\n",fileMapName.data()); + err("file %s cannot be opened\n",fileMapName.data()); } } return FALSE; diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 7458b23..900ea48 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -415,7 +415,6 @@ static QCString substituteHtmlKeywords(const QCString &str, { // Build CSS/JavaScript tags depending on treeview, search engine settings QCString cssFile; - QStrList extraCssFile; QCString generatedBy; QCString treeViewCssJs; QCString searchCssJs; @@ -456,10 +455,10 @@ static QCString substituteHtmlKeywords(const QCString &str, } extraCssText = ""; - extraCssFile = Config_getList(HTML_EXTRA_STYLESHEET); - for (uint i=0; i\n" " MathJax.Hub.Config({\n" " extensions: [\"tex2jax.js\""; - QStrList &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS); - const char *s = mathJaxExtensions.first(); - while (s) + const StringVector &mathJaxExtensions = Config_getList(MATHJAX_EXTENSIONS); + for (const auto &s : mathJaxExtensions) { - mathJaxJs+= ", \""+QCString(s)+".js\""; - s = mathJaxExtensions.next(); + mathJaxJs+= ", \""+QCString(s.c_str())+".js\""; } if (mathJaxFormat.isEmpty()) { @@ -1261,10 +1258,10 @@ void HtmlGenerator::writeStyleInfo(int part) } Doxygen::indexList->addStyleSheetFile(cssfi.fileName().utf8()); } - static QStrList extraCssFile = Config_getList(HTML_EXTRA_STYLESHEET); - for (uint i=0; itrLegendTitle().data()); startTitle(ol,0); @@ -3936,8 +3936,8 @@ void writeGraphInfo(OutputList &ol) delete fd; // restore config settings - stripCommentsStateRef = oldStripCommentsState; - createSubdirs = oldCreateSubdirs; + Config_updateBool(STRIP_CODE_COMMENTS,oldStripCommentsState); + Config_updateBool(CREATE_SUBDIRS,oldCreateSubdirs); endFile(ol); ol.popGeneratorState(); diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 52a8acf..f3cce3e 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -511,10 +511,10 @@ static void writeDefaultHeaderPart1(FTextStream &t) "\\usepackage{fixltx2e}\n" // for \textsubscript "\\usepackage{calc}\n" "\\usepackage{doxygen}\n"; - QStrList extraLatexStyle = Config_getList(LATEX_EXTRA_STYLESHEET); - for (uint i=0; itype==ConfigValues::Info::Bool) { - return ConfigValues::instance().*((ConfigValues::InfoBool*)opt)->item; + return ConfigValues::instance().*(opt->value.b); } else if (!opt) { @@ -84,7 +84,7 @@ LayoutNavEntry *LayoutNavEntry::find(LayoutNavEntry::Kind kind, LayoutNavEntry *entry; for (li.toFirst();(entry=li.current());++li) { - // depth first search, needed to find the entry furthest from the + // depth first search, needed to find the entry furthest from the // root in case an entry is in the tree twice result = entry->find(kind,file); if (result) return result; @@ -99,7 +99,7 @@ LayoutNavEntry *LayoutNavEntry::find(LayoutNavEntry::Kind kind, QCString LayoutNavEntry::url() const { QCString url = baseFile().stripWhiteSpace(); - if ((kind()!=LayoutNavEntry::User && kind()!=LayoutNavEntry::UserGroup) || + if ((kind()!=LayoutNavEntry::User && kind()!=LayoutNavEntry::UserGroup) || (kind()==LayoutNavEntry::UserGroup && url.left(9)=="usergroup")) { url+=Doxygen::htmlFileExtension; @@ -111,7 +111,7 @@ QCString LayoutNavEntry::url() const bool found=FALSE; if (resolveLink(0,url.mid(5).stripWhiteSpace(),TRUE,&d,anchor)) { - if (d && d->isLinkable()) + if (d && d->isLinkable()) { url=d->getOutputFileBase()+Doxygen::htmlFileExtension; if (!anchor.isEmpty()) @@ -137,14 +137,14 @@ class LayoutParser : public QXmlDefaultHandler private: class StartElementHandler { - typedef void (LayoutParser::*Handler)(const QXmlAttributes &attrib); + typedef void (LayoutParser::*Handler)(const QXmlAttributes &attrib); public: - StartElementHandler(LayoutParser *parent, Handler h) + StartElementHandler(LayoutParser *parent, Handler h) : m_parent(parent), m_handler(h) {} virtual ~StartElementHandler() {} - virtual void operator()(const QXmlAttributes &attrib) - { - (m_parent->*m_handler)(attrib); + virtual void operator()(const QXmlAttributes &attrib) + { + (m_parent->*m_handler)(attrib); } protected: StartElementHandler() : m_parent(0), m_handler(0) {} @@ -156,13 +156,13 @@ class LayoutParser : public QXmlDefaultHandler class StartElementHandlerKind : public StartElementHandler { typedef void (LayoutParser::*Handler)(LayoutDocEntry::Kind kind, - const QXmlAttributes &attrib); + const QXmlAttributes &attrib); public: - StartElementHandlerKind(LayoutParser *parent, LayoutDocEntry::Kind k,Handler h) + StartElementHandlerKind(LayoutParser *parent, LayoutDocEntry::Kind k,Handler h) : m_parent(parent), m_kind(k), m_handler(h) {} - void operator()(const QXmlAttributes &attrib) - { - (m_parent->*m_handler)(m_kind,attrib); + void operator()(const QXmlAttributes &attrib) + { + (m_parent->*m_handler)(m_kind,attrib); } private: LayoutParser *m_parent; @@ -174,14 +174,14 @@ class LayoutParser : public QXmlDefaultHandler { typedef void (LayoutParser::*Handler)(LayoutDocEntry::Kind kind, const QXmlAttributes &attrib, - const QCString &title); + const QCString &title); public: StartElementHandlerSection(LayoutParser *parent, LayoutDocEntry::Kind k,Handler h, - const QCString &title) + const QCString &title) : m_parent(parent), m_kind(k), m_handler(h), m_title(title) {} - void operator()(const QXmlAttributes &attrib) - { - (m_parent->*m_handler)(m_kind,attrib,m_title); + void operator()(const QXmlAttributes &attrib) + { + (m_parent->*m_handler)(m_kind,attrib,m_title); } private: LayoutParser *m_parent; @@ -195,19 +195,19 @@ class LayoutParser : public QXmlDefaultHandler typedef void (LayoutParser::*Handler)(const QXmlAttributes &attrib, MemberListType type, const QCString &title, - const QCString &subtitle); + const QCString &subtitle); public: - StartElementHandlerMember(LayoutParser *parent, + StartElementHandlerMember(LayoutParser *parent, Handler h, MemberListType type, const QCString &tl, const QCString &ss = QCString() - ) + ) : m_parent(parent), m_handler(h), m_type(type), m_title(tl), m_subscript(ss) {} - void operator()(const QXmlAttributes &attrib) - { - (m_parent->*m_handler)(attrib,m_type,m_title,m_subscript); + void operator()(const QXmlAttributes &attrib) + { + (m_parent->*m_handler)(attrib,m_type,m_title,m_subscript); } private: LayoutParser *m_parent; @@ -221,17 +221,17 @@ class LayoutParser : public QXmlDefaultHandler { typedef void (LayoutParser::*Handler)(LayoutNavEntry::Kind kind, const QXmlAttributes &attrib, - const QCString &title); + const QCString &title); public: StartElementHandlerNavEntry(LayoutParser *parent, - LayoutNavEntry::Kind kind, + LayoutNavEntry::Kind kind, Handler h, const QCString &tl - ) + ) : m_parent(parent), m_kind(kind), m_handler(h), m_title(tl) {} - void operator()(const QXmlAttributes &attrib) - { - (m_parent->*m_handler)(m_kind,attrib,m_title); + void operator()(const QXmlAttributes &attrib) + { + (m_parent->*m_handler)(m_kind,attrib,m_title); } private: LayoutParser *m_parent; @@ -242,7 +242,7 @@ class LayoutParser : public QXmlDefaultHandler class EndElementHandler { - typedef void (LayoutParser::*Handler)(); + typedef void (LayoutParser::*Handler)(); public: EndElementHandler(LayoutParser *parent, Handler h) : m_parent(parent), m_handler(h) {} void operator()() { (m_parent->*m_handler)(); } @@ -266,51 +266,51 @@ class LayoutParser : public QXmlDefaultHandler m_rootNav = 0; //bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); - //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); + //bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); //bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA); bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); // start & end handlers - m_sHandler.insert("doxygenlayout", + m_sHandler.insert("doxygenlayout", new StartElementHandler(this,&LayoutParser::startLayout)); - m_eHandler.insert("doxygenlayout", + m_eHandler.insert("doxygenlayout", new EndElementHandler(this,&LayoutParser::endLayout)); // class layout handlers - m_sHandler.insert("navindex", + m_sHandler.insert("navindex", new StartElementHandler(this,&LayoutParser::startNavIndex)); - m_sHandler.insert("navindex/tab", + m_sHandler.insert("navindex/tab", new StartElementHandler(this,&LayoutParser::startNavEntry)); - m_eHandler.insert("navindex/tab", + m_eHandler.insert("navindex/tab", new EndElementHandler(this,&LayoutParser::endNavEntry)); - m_eHandler.insert("navindex", + m_eHandler.insert("navindex", new EndElementHandler(this,&LayoutParser::endNavIndex)); // class layout handlers - m_sHandler.insert("class", + m_sHandler.insert("class", new StartElementHandler(this,&LayoutParser::startClass)); - m_sHandler.insert("class/briefdescription", + m_sHandler.insert("class/briefdescription", new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("class/detaileddescription", + m_sHandler.insert("class/detaileddescription", new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry, theTranslator->trDetailedDescription())); - m_sHandler.insert("class/authorsection", + m_sHandler.insert("class/authorsection", new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("class/includes", + m_sHandler.insert("class/includes", new StartElementHandlerKind(this,LayoutDocEntry::ClassIncludes,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("class/inheritancegraph", + m_sHandler.insert("class/inheritancegraph", new StartElementHandlerKind(this,LayoutDocEntry::ClassInheritanceGraph,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("class/collaborationgraph", + m_sHandler.insert("class/collaborationgraph", new StartElementHandlerKind(this,LayoutDocEntry::ClassCollaborationGraph,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("class/allmemberslink", + m_sHandler.insert("class/allmemberslink", new StartElementHandlerKind(this,LayoutDocEntry::ClassAllMembersLink,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("class/usedfiles", + m_sHandler.insert("class/usedfiles", new StartElementHandlerKind(this,LayoutDocEntry::ClassUsedFiles,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("class/memberdecl", + m_sHandler.insert("class/memberdecl", new StartElementHandler(this,&LayoutParser::startMemberDecl)); - m_sHandler.insert("class/memberdecl/membergroups", + m_sHandler.insert("class/memberdecl/membergroups", new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("class/memberdecl/nestedclasses", + m_sHandler.insert("class/memberdecl/nestedclasses", new StartElementHandlerSection(this,LayoutDocEntry::ClassNestedClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_2_OPTIONS( theTranslator->trCompounds(), @@ -323,118 +323,118 @@ class LayoutParser : public QXmlDefaultHandler m_sHandler.insert("class/memberdecl/interfaces", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_interfaces,theTranslator->trInterfaces())); - m_sHandler.insert("class/memberdecl/publictypes", + m_sHandler.insert("class/memberdecl/publictypes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_pubTypes,theTranslator->trPublicTypes())); - m_sHandler.insert("class/memberdecl/publicslots", + m_sHandler.insert("class/memberdecl/publicslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_pubSlots,theTranslator->trPublicSlots())); - m_sHandler.insert("class/memberdecl/signals", + MemberListType_pubSlots,theTranslator->trPublicSlots())); + m_sHandler.insert("class/memberdecl/signals", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_signals,theTranslator->trSignals())); - m_sHandler.insert("class/memberdecl/publicmethods", + MemberListType_signals,theTranslator->trSignals())); + m_sHandler.insert("class/memberdecl/publicmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_pubMethods, COMPILE_FOR_2_OPTIONS( theTranslator->trPublicMembers(), SrcLangExt_ObjC,theTranslator->trInstanceMethods(), SrcLangExt_Slice,theTranslator->trOperations() - ))); - m_sHandler.insert("class/memberdecl/publicstaticmethods", + ))); + m_sHandler.insert("class/memberdecl/publicstaticmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_pubStaticMethods, COMPILE_FOR_1_OPTION( theTranslator->trStaticPublicMembers(), SrcLangExt_ObjC,theTranslator->trClassMethods() - ))); - m_sHandler.insert("class/memberdecl/publicattributes", + ))); + m_sHandler.insert("class/memberdecl/publicattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_pubAttribs, COMPILE_FOR_1_OPTION( theTranslator->trPublicAttribs(), SrcLangExt_Slice,theTranslator->trDataMembers() - ))); - m_sHandler.insert("class/memberdecl/publicstaticattributes", + ))); + m_sHandler.insert("class/memberdecl/publicstaticattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_pubStaticAttribs,theTranslator->trStaticPublicAttribs())); - m_sHandler.insert("class/memberdecl/protectedtypes", + MemberListType_pubStaticAttribs,theTranslator->trStaticPublicAttribs())); + m_sHandler.insert("class/memberdecl/protectedtypes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_proTypes,theTranslator->trProtectedTypes())); - m_sHandler.insert("class/memberdecl/protectedslots", + MemberListType_proTypes,theTranslator->trProtectedTypes())); + m_sHandler.insert("class/memberdecl/protectedslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_proSlots,theTranslator->trProtectedSlots())); - m_sHandler.insert("class/memberdecl/protectedmethods", + MemberListType_proSlots,theTranslator->trProtectedSlots())); + m_sHandler.insert("class/memberdecl/protectedmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_proMethods,theTranslator->trProtectedMembers())); - m_sHandler.insert("class/memberdecl/protectedstaticmethods", + MemberListType_proMethods,theTranslator->trProtectedMembers())); + m_sHandler.insert("class/memberdecl/protectedstaticmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_proStaticMethods,theTranslator->trStaticProtectedMembers())); - m_sHandler.insert("class/memberdecl/protectedattributes", + m_sHandler.insert("class/memberdecl/protectedattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_proAttribs,theTranslator->trProtectedAttribs())); - m_sHandler.insert("class/memberdecl/protectedstaticattributes", + MemberListType_proAttribs,theTranslator->trProtectedAttribs())); + m_sHandler.insert("class/memberdecl/protectedstaticattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_proStaticAttribs,theTranslator->trStaticProtectedAttribs())); - m_sHandler.insert("class/memberdecl/packagetypes", + MemberListType_proStaticAttribs,theTranslator->trStaticProtectedAttribs())); + m_sHandler.insert("class/memberdecl/packagetypes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_pacTypes,theTranslator->trPackageTypes())); - m_sHandler.insert("class/memberdecl/packagemethods", + MemberListType_pacTypes,theTranslator->trPackageTypes())); + m_sHandler.insert("class/memberdecl/packagemethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_pacMethods,theTranslator->trPackageMembers())); - m_sHandler.insert("class/memberdecl/packagestaticmethods", + MemberListType_pacMethods,theTranslator->trPackageMembers())); + m_sHandler.insert("class/memberdecl/packagestaticmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_pacStaticMethods,theTranslator->trStaticPackageMembers())); - m_sHandler.insert("class/memberdecl/packageattributes", + MemberListType_pacStaticMethods,theTranslator->trStaticPackageMembers())); + m_sHandler.insert("class/memberdecl/packageattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_pacAttribs,theTranslator->trPackageAttribs())); - m_sHandler.insert("class/memberdecl/packagestaticattributes", + MemberListType_pacAttribs,theTranslator->trPackageAttribs())); + m_sHandler.insert("class/memberdecl/packagestaticattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_pacStaticAttribs,theTranslator->trStaticPackageAttribs())); - m_sHandler.insert("class/memberdecl/properties", + MemberListType_pacStaticAttribs,theTranslator->trStaticPackageAttribs())); + m_sHandler.insert("class/memberdecl/properties", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_properties,theTranslator->trProperties())); - m_sHandler.insert("class/memberdecl/events", + MemberListType_properties,theTranslator->trProperties())); + m_sHandler.insert("class/memberdecl/events", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_events,theTranslator->trEvents())); - m_sHandler.insert("class/memberdecl/privatetypes", + MemberListType_events,theTranslator->trEvents())); + m_sHandler.insert("class/memberdecl/privatetypes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_priTypes,theTranslator->trPrivateTypes())); - m_sHandler.insert("class/memberdecl/privateslots", + MemberListType_priTypes,theTranslator->trPrivateTypes())); + m_sHandler.insert("class/memberdecl/privateslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_priSlots,theTranslator->trPrivateSlots())); - m_sHandler.insert("class/memberdecl/privatemethods", + MemberListType_priSlots,theTranslator->trPrivateSlots())); + m_sHandler.insert("class/memberdecl/privatemethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_priMethods,theTranslator->trPrivateMembers())); - m_sHandler.insert("class/memberdecl/privatestaticmethods", + MemberListType_priMethods,theTranslator->trPrivateMembers())); + m_sHandler.insert("class/memberdecl/privatestaticmethods", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_priStaticMethods,theTranslator->trStaticPrivateMembers())); - m_sHandler.insert("class/memberdecl/privateattributes", + MemberListType_priStaticMethods,theTranslator->trStaticPrivateMembers())); + m_sHandler.insert("class/memberdecl/privateattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_priAttribs,theTranslator->trPrivateAttribs())); - m_sHandler.insert("class/memberdecl/privatestaticattributes", + MemberListType_priAttribs,theTranslator->trPrivateAttribs())); + m_sHandler.insert("class/memberdecl/privatestaticattributes", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, - MemberListType_priStaticAttribs,theTranslator->trStaticPrivateAttribs())); - m_sHandler.insert("class/memberdecl/friends", + MemberListType_priStaticAttribs,theTranslator->trStaticPrivateAttribs())); + m_sHandler.insert("class/memberdecl/friends", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_friends,theTranslator->trFriends())); - m_sHandler.insert("class/memberdecl/related", + m_sHandler.insert("class/memberdecl/related", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_related,theTranslator->trRelatedFunctions(), - theTranslator->trRelatedSubscript())); - m_eHandler.insert("class/memberdecl", + theTranslator->trRelatedSubscript())); + m_eHandler.insert("class/memberdecl", new EndElementHandler(this,&LayoutParser::endMemberDecl)); - m_sHandler.insert("class/memberdef", + m_sHandler.insert("class/memberdef", new StartElementHandler(this,&LayoutParser::startMemberDef)); - m_sHandler.insert("class/memberdef/inlineclasses", + m_sHandler.insert("class/memberdef/inlineclasses", new StartElementHandlerSection(this,LayoutDocEntry::ClassInlineClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_1_OPTION( theTranslator->trClassDocumentation(), SrcLangExt_Fortran,theTranslator->trTypeDocumentation() ))); - m_sHandler.insert("class/memberdef/typedefs", + m_sHandler.insert("class/memberdef/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_typedefMembers,theTranslator->trMemberTypedefDocumentation())); - m_sHandler.insert("class/memberdef/enums", + m_sHandler.insert("class/memberdef/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_enumMembers,theTranslator->trMemberEnumerationDocumentation())); m_sHandler.insert("class/memberdef/services", @@ -443,10 +443,10 @@ class LayoutParser : public QXmlDefaultHandler m_sHandler.insert("class/memberdef/interfaces", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_interfaceMembers,theTranslator->trInterfaces())); - m_sHandler.insert("class/memberdef/constructors", + m_sHandler.insert("class/memberdef/constructors", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_constructors,theTranslator->trConstructorDocumentation())); - m_sHandler.insert("class/memberdef/functions", + m_sHandler.insert("class/memberdef/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_functionMembers, COMPILE_FOR_3_OPTIONS( @@ -455,41 +455,41 @@ class LayoutParser : public QXmlDefaultHandler SrcLangExt_Fortran,theTranslator->trMemberFunctionDocumentationFortran(), SrcLangExt_Slice,theTranslator->trOperationDocumentation() ))); - m_sHandler.insert("class/memberdef/related", + m_sHandler.insert("class/memberdef/related", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_relatedMembers,theTranslator->trRelatedFunctionDocumentation())); - m_sHandler.insert("class/memberdef/variables", + m_sHandler.insert("class/memberdef/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_variableMembers, COMPILE_FOR_1_OPTION( theTranslator->trMemberDataDocumentation(), SrcLangExt_Slice,theTranslator->trDataMemberDocumentation() - ))); - m_sHandler.insert("class/memberdef/properties", + ))); + m_sHandler.insert("class/memberdef/properties", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_propertyMembers,theTranslator->trPropertyDocumentation())); - m_sHandler.insert("class/memberdef/events", + m_sHandler.insert("class/memberdef/events", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_eventMembers,theTranslator->trEventDocumentation())); - m_eHandler.insert("class/memberdef", + m_eHandler.insert("class/memberdef", new EndElementHandler(this,&LayoutParser::endMemberDef)); - m_eHandler.insert("class", + m_eHandler.insert("class", new EndElementHandler(this,&LayoutParser::endClass)); // namespace layout handlers - m_sHandler.insert("namespace", + m_sHandler.insert("namespace", new StartElementHandler(this,&LayoutParser::startNamespace)); - m_sHandler.insert("namespace/briefdescription", + m_sHandler.insert("namespace/briefdescription", new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("namespace/detaileddescription", + m_sHandler.insert("namespace/detaileddescription", new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry, theTranslator->trDetailedDescription())); - m_sHandler.insert("namespace/authorsection", + m_sHandler.insert("namespace/authorsection", new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("namespace/memberdecl", + m_sHandler.insert("namespace/memberdecl", new StartElementHandler(this,&LayoutParser::startMemberDecl)); - m_sHandler.insert("namespace/memberdecl/nestednamespaces", + m_sHandler.insert("namespace/memberdecl/nestednamespaces", new StartElementHandlerSection(this,LayoutDocEntry::NamespaceNestedNamespaces,&LayoutParser::startSectionEntry, COMPILE_FOR_5_OPTIONS( theTranslator->trNamespaces(), @@ -503,37 +503,37 @@ class LayoutParser : public QXmlDefaultHandler m_sHandler.insert("namespace/memberdecl/constantgroups", new StartElementHandlerSection(this,LayoutDocEntry::NamespaceNestedConstantGroups,&LayoutParser::startSectionEntry, theTranslator->trConstantGroups())); - m_sHandler.insert("namespace/memberdecl/interfaces", + m_sHandler.insert("namespace/memberdecl/interfaces", new StartElementHandlerSection(this,LayoutDocEntry::NamespaceInterfaces,&LayoutParser::startSectionEntry, theTranslator->trSliceInterfaces())); - m_sHandler.insert("namespace/memberdecl/classes", + m_sHandler.insert("namespace/memberdecl/classes", new StartElementHandlerSection(this,LayoutDocEntry::NamespaceClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_2_OPTIONS( theTranslator->trCompounds(), SrcLangExt_VHDL,theTranslator->trVhdlType(VhdlDocGen::ENTITY,FALSE), SrcLangExt_Fortran,theTranslator->trDataTypes() ))); - m_sHandler.insert("namespace/memberdecl/structs", + m_sHandler.insert("namespace/memberdecl/structs", new StartElementHandlerSection(this,LayoutDocEntry::NamespaceStructs,&LayoutParser::startSectionEntry, theTranslator->trStructs())); - m_sHandler.insert("namespace/memberdecl/exceptions", + m_sHandler.insert("namespace/memberdecl/exceptions", new StartElementHandlerSection(this,LayoutDocEntry::NamespaceExceptions,&LayoutParser::startSectionEntry, theTranslator->trExceptions())); - m_sHandler.insert("namespace/memberdecl/membergroups", + m_sHandler.insert("namespace/memberdecl/membergroups", new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("namespace/memberdecl/typedefs", + m_sHandler.insert("namespace/memberdecl/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decTypedefMembers,theTranslator->trTypedefs())); - m_sHandler.insert("namespace/memberdecl/sequences", + m_sHandler.insert("namespace/memberdecl/sequences", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decSequenceMembers,theTranslator->trSequences())); - m_sHandler.insert("namespace/memberdecl/dictionaries", + m_sHandler.insert("namespace/memberdecl/dictionaries", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decDictionaryMembers,theTranslator->trDictionaries())); - m_sHandler.insert("namespace/memberdecl/enums", + m_sHandler.insert("namespace/memberdecl/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decEnumMembers,theTranslator->trEnumerations())); - m_sHandler.insert("namespace/memberdecl/functions", + m_sHandler.insert("namespace/memberdecl/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decFuncMembers, COMPILE_FOR_2_OPTIONS( @@ -541,89 +541,89 @@ class LayoutParser : public QXmlDefaultHandler SrcLangExt_Fortran,theTranslator->trSubprograms(), SrcLangExt_VHDL,theTranslator->trFunctionAndProc() ))); - m_sHandler.insert("namespace/memberdecl/variables", + m_sHandler.insert("namespace/memberdecl/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decVarMembers, sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables())); - m_eHandler.insert("namespace/memberdecl", + m_eHandler.insert("namespace/memberdecl", new EndElementHandler(this,&LayoutParser::endMemberDecl)); - m_sHandler.insert("namespace/memberdef", + m_sHandler.insert("namespace/memberdef", new StartElementHandler(this,&LayoutParser::startMemberDef)); - m_sHandler.insert("namespace/memberdef/inlineclasses", + m_sHandler.insert("namespace/memberdef/inlineclasses", new StartElementHandlerSection(this,LayoutDocEntry::NamespaceInlineClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_1_OPTION( theTranslator->trClassDocumentation(), SrcLangExt_Fortran,theTranslator->trTypeDocumentation() ))); - m_sHandler.insert("namespace/memberdef/typedefs", + m_sHandler.insert("namespace/memberdef/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docTypedefMembers,theTranslator->trTypedefDocumentation())); - m_sHandler.insert("namespace/memberdef/sequences", + m_sHandler.insert("namespace/memberdef/sequences", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docSequenceMembers,theTranslator->trSequenceDocumentation())); - m_sHandler.insert("namespace/memberdef/dictionaries", + m_sHandler.insert("namespace/memberdef/dictionaries", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docDictionaryMembers, theTranslator->trDictionaryDocumentation())); - m_sHandler.insert("namespace/memberdef/enums", + m_sHandler.insert("namespace/memberdef/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docEnumMembers,theTranslator->trEnumerationTypeDocumentation())); - m_sHandler.insert("namespace/memberdef/functions", + m_sHandler.insert("namespace/memberdef/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docFuncMembers, COMPILE_FOR_1_OPTION( theTranslator->trFunctionDocumentation(), SrcLangExt_Fortran,theTranslator->trSubprogramDocumentation() ))); - m_sHandler.insert("namespace/memberdef/variables", + m_sHandler.insert("namespace/memberdef/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docVarMembers, sliceOpt ? theTranslator->trConstantDocumentation() : theTranslator->trVariableDocumentation())); - m_eHandler.insert("namespace/memberdef", + m_eHandler.insert("namespace/memberdef", new EndElementHandler(this,&LayoutParser::endMemberDef)); - m_eHandler.insert("namespace", + m_eHandler.insert("namespace", new EndElementHandler(this,&LayoutParser::endNamespace)); // file layout handlers - m_sHandler.insert("file", + m_sHandler.insert("file", new StartElementHandler(this,&LayoutParser::startFile)); - m_sHandler.insert("file/briefdescription", + m_sHandler.insert("file/briefdescription", new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("file/detaileddescription", + m_sHandler.insert("file/detaileddescription", new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry, theTranslator->trDetailedDescription())); - m_sHandler.insert("file/authorsection", + m_sHandler.insert("file/authorsection", new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("file/includes", + m_sHandler.insert("file/includes", new StartElementHandlerKind(this,LayoutDocEntry::FileIncludes,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("file/includegraph", + m_sHandler.insert("file/includegraph", new StartElementHandlerKind(this,LayoutDocEntry::FileIncludeGraph,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("file/includedbygraph", + m_sHandler.insert("file/includedbygraph", new StartElementHandlerKind(this,LayoutDocEntry::FileIncludedByGraph,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("file/sourcelink", + m_sHandler.insert("file/sourcelink", new StartElementHandlerKind(this,LayoutDocEntry::FileSourceLink,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("file/memberdecl/membergroups", + m_sHandler.insert("file/memberdecl/membergroups", new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("file/memberdecl", + m_sHandler.insert("file/memberdecl", new StartElementHandler(this,&LayoutParser::startMemberDecl)); - m_sHandler.insert("file/memberdecl/interfaces", + m_sHandler.insert("file/memberdecl/interfaces", new StartElementHandlerSection(this,LayoutDocEntry::FileInterfaces,&LayoutParser::startSectionEntry, theTranslator->trSliceInterfaces())); - m_sHandler.insert("file/memberdecl/classes", + m_sHandler.insert("file/memberdecl/classes", new StartElementHandlerSection(this,LayoutDocEntry::FileClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_2_OPTIONS( theTranslator->trCompounds(), SrcLangExt_VHDL,theTranslator->trVhdlType(VhdlDocGen::ENTITY,FALSE), SrcLangExt_Fortran,theTranslator->trDataTypes() ))); - m_sHandler.insert("file/memberdecl/structs", + m_sHandler.insert("file/memberdecl/structs", new StartElementHandlerSection(this,LayoutDocEntry::FileStructs,&LayoutParser::startSectionEntry, theTranslator->trStructs())); - m_sHandler.insert("file/memberdecl/exceptions", + m_sHandler.insert("file/memberdecl/exceptions", new StartElementHandlerSection(this,LayoutDocEntry::FileExceptions,&LayoutParser::startSectionEntry, theTranslator->trExceptions())); - m_sHandler.insert("file/memberdecl/namespaces", + m_sHandler.insert("file/memberdecl/namespaces", new StartElementHandlerSection(this,LayoutDocEntry::FileNamespaces,&LayoutParser::startSectionEntry, COMPILE_FOR_4_OPTIONS( theTranslator->trNamespaces(), @@ -635,22 +635,22 @@ class LayoutParser : public QXmlDefaultHandler m_sHandler.insert("file/memberdecl/constantgroups", new StartElementHandlerSection(this,LayoutDocEntry::FileConstantGroups,&LayoutParser::startSectionEntry, theTranslator->trConstantGroups())); - m_sHandler.insert("file/memberdecl/defines", + m_sHandler.insert("file/memberdecl/defines", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decDefineMembers,theTranslator->trDefines())); - m_sHandler.insert("file/memberdecl/typedefs", + m_sHandler.insert("file/memberdecl/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decTypedefMembers,theTranslator->trTypedefs())); - m_sHandler.insert("file/memberdecl/sequences", + m_sHandler.insert("file/memberdecl/sequences", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decSequenceMembers,theTranslator->trSequences())); - m_sHandler.insert("file/memberdecl/dictionaries", + m_sHandler.insert("file/memberdecl/dictionaries", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decDictionaryMembers,theTranslator->trDictionaries())); - m_sHandler.insert("file/memberdecl/enums", + m_sHandler.insert("file/memberdecl/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decEnumMembers,theTranslator->trEnumerations())); - m_sHandler.insert("file/memberdecl/functions", + m_sHandler.insert("file/memberdecl/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decFuncMembers, COMPILE_FOR_2_OPTIONS( @@ -658,115 +658,115 @@ class LayoutParser : public QXmlDefaultHandler SrcLangExt_Fortran,theTranslator->trSubprograms(), SrcLangExt_VHDL,theTranslator->trFunctionAndProc() ))); - m_sHandler.insert("file/memberdecl/variables", + m_sHandler.insert("file/memberdecl/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decVarMembers, sliceOpt ? theTranslator->trConstants() : theTranslator->trVariables())); - m_eHandler.insert("file/memberdecl", + m_eHandler.insert("file/memberdecl", new EndElementHandler(this,&LayoutParser::endMemberDecl)); - m_sHandler.insert("file/memberdef", + m_sHandler.insert("file/memberdef", new StartElementHandler(this,&LayoutParser::startMemberDef)); - m_sHandler.insert("file/memberdef/inlineclasses", + m_sHandler.insert("file/memberdef/inlineclasses", new StartElementHandlerSection(this,LayoutDocEntry::FileInlineClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_1_OPTION( theTranslator->trClassDocumentation(), SrcLangExt_Fortran,theTranslator->trTypeDocumentation() ))); - m_sHandler.insert("file/memberdef/defines", + m_sHandler.insert("file/memberdef/defines", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docDefineMembers,theTranslator->trDefineDocumentation())); - m_sHandler.insert("file/memberdef/typedefs", + m_sHandler.insert("file/memberdef/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docTypedefMembers,theTranslator->trTypedefDocumentation())); - m_sHandler.insert("file/memberdef/sequences", + m_sHandler.insert("file/memberdef/sequences", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docSequenceMembers,theTranslator->trSequenceDocumentation())); - m_sHandler.insert("file/memberdef/dictionaries", + m_sHandler.insert("file/memberdef/dictionaries", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docDictionaryMembers, theTranslator->trDictionaryDocumentation())); - m_sHandler.insert("file/memberdef/enums", + m_sHandler.insert("file/memberdef/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docEnumMembers, theTranslator->trEnumerationTypeDocumentation())); - m_sHandler.insert("file/memberdef/functions", + m_sHandler.insert("file/memberdef/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docFuncMembers, COMPILE_FOR_1_OPTION( theTranslator->trFunctionDocumentation(), SrcLangExt_Fortran,theTranslator->trSubprogramDocumentation() ))); - m_sHandler.insert("file/memberdef/variables", + m_sHandler.insert("file/memberdef/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docVarMembers,theTranslator->trVariableDocumentation())); - m_eHandler.insert("file/memberdef", + m_eHandler.insert("file/memberdef", new EndElementHandler(this,&LayoutParser::endMemberDef)); - m_eHandler.insert("file", + m_eHandler.insert("file", new EndElementHandler(this,&LayoutParser::endFile)); // group layout handlers - m_sHandler.insert("group", + m_sHandler.insert("group", new StartElementHandler(this,&LayoutParser::startGroup)); - m_sHandler.insert("group/briefdescription", + m_sHandler.insert("group/briefdescription", new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("group/detaileddescription", + m_sHandler.insert("group/detaileddescription", new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry, theTranslator->trDetailedDescription())); - m_sHandler.insert("group/authorsection", + m_sHandler.insert("group/authorsection", new StartElementHandlerKind(this,LayoutDocEntry::AuthorSection,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("group/groupgraph", + m_sHandler.insert("group/groupgraph", new StartElementHandlerKind(this,LayoutDocEntry::GroupGraph,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("group/memberdecl/membergroups", + m_sHandler.insert("group/memberdecl/membergroups", new StartElementHandlerKind(this,LayoutDocEntry::MemberGroups,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("group/memberdecl", + m_sHandler.insert("group/memberdecl", new StartElementHandler(this,&LayoutParser::startMemberDecl)); - m_sHandler.insert("group/memberdecl/classes", + m_sHandler.insert("group/memberdecl/classes", new StartElementHandlerSection(this,LayoutDocEntry::GroupClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_2_OPTIONS( theTranslator->trCompounds(), SrcLangExt_VHDL,theTranslator->trVhdlType(VhdlDocGen::ENTITY,FALSE), SrcLangExt_Fortran,theTranslator->trDataTypes() ))); - m_sHandler.insert("group/memberdecl/namespaces", + m_sHandler.insert("group/memberdecl/namespaces", new StartElementHandlerSection(this,LayoutDocEntry::GroupNamespaces,&LayoutParser::startSectionEntry, COMPILE_FOR_2_OPTIONS( theTranslator->trNamespaces(), SrcLangExt_Java,theTranslator->trPackages(), SrcLangExt_Fortran,theTranslator->trModules() ))); - m_sHandler.insert("group/memberdecl/dirs", + m_sHandler.insert("group/memberdecl/dirs", new StartElementHandlerSection(this,LayoutDocEntry::GroupDirs,&LayoutParser::startSectionEntry, theTranslator->trDirectories() )); - m_sHandler.insert("group/memberdecl/nestedgroups", + m_sHandler.insert("group/memberdecl/nestedgroups", new StartElementHandlerSection(this,LayoutDocEntry::GroupNestedGroups,&LayoutParser::startSectionEntry, theTranslator->trModules() )); - m_sHandler.insert("group/memberdecl/files", + m_sHandler.insert("group/memberdecl/files", new StartElementHandlerSection(this,LayoutDocEntry::GroupFiles,&LayoutParser::startSectionEntry, theTranslator->trFile(TRUE,FALSE) )); - m_sHandler.insert("group/memberdecl/defines", + m_sHandler.insert("group/memberdecl/defines", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decDefineMembers,theTranslator->trDefines())); - m_sHandler.insert("group/memberdecl/typedefs", + m_sHandler.insert("group/memberdecl/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decTypedefMembers,theTranslator->trTypedefs())); - m_sHandler.insert("group/memberdecl/sequences", + m_sHandler.insert("group/memberdecl/sequences", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decSequenceMembers,theTranslator->trSequences())); - m_sHandler.insert("group/memberdecl/dictionaries", + m_sHandler.insert("group/memberdecl/dictionaries", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decDictionaryMembers,theTranslator->trDictionaries())); - m_sHandler.insert("group/memberdecl/enums", + m_sHandler.insert("group/memberdecl/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decEnumMembers,theTranslator->trEnumerations())); - m_sHandler.insert("group/memberdecl/enumvalues", + m_sHandler.insert("group/memberdecl/enumvalues", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decEnumValMembers,theTranslator->trEnumerationValues())); - m_sHandler.insert("group/memberdecl/functions", + m_sHandler.insert("group/memberdecl/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decFuncMembers, COMPILE_FOR_2_OPTIONS( @@ -774,116 +774,116 @@ class LayoutParser : public QXmlDefaultHandler SrcLangExt_Fortran,theTranslator->trSubprograms(), SrcLangExt_VHDL,theTranslator->trFunctionAndProc() ))); - m_sHandler.insert("group/memberdecl/variables", + m_sHandler.insert("group/memberdecl/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decVarMembers,theTranslator->trVariables())); - m_sHandler.insert("group/memberdecl/signals", + m_sHandler.insert("group/memberdecl/signals", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decSignalMembers,theTranslator->trSignals())); - m_sHandler.insert("group/memberdecl/publicslots", + m_sHandler.insert("group/memberdecl/publicslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decPubSlotMembers,theTranslator->trPublicSlots())); - m_sHandler.insert("group/memberdecl/protectedslots", + m_sHandler.insert("group/memberdecl/protectedslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decProSlotMembers,theTranslator->trProtectedSlots())); - m_sHandler.insert("group/memberdecl/privateslots", + m_sHandler.insert("group/memberdecl/privateslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decPriSlotMembers,theTranslator->trPrivateSlots())); - m_sHandler.insert("group/memberdecl/events", + m_sHandler.insert("group/memberdecl/events", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decEventMembers,theTranslator->trEvents())); - m_sHandler.insert("group/memberdecl/properties", + m_sHandler.insert("group/memberdecl/properties", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decPropMembers,theTranslator->trProperties())); - m_sHandler.insert("group/memberdecl/friends", + m_sHandler.insert("group/memberdecl/friends", new StartElementHandlerMember(this,&LayoutParser::startMemberDeclEntry, MemberListType_decFriendMembers,theTranslator->trFriends())); - m_eHandler.insert("group/memberdecl", + m_eHandler.insert("group/memberdecl", new EndElementHandler(this,&LayoutParser::endMemberDecl)); - m_sHandler.insert("group/memberdef", + m_sHandler.insert("group/memberdef", new StartElementHandler(this,&LayoutParser::startMemberDef)); - m_sHandler.insert("group/memberdef/pagedocs", + m_sHandler.insert("group/memberdef/pagedocs", new StartElementHandlerKind(this,LayoutDocEntry::GroupPageDocs,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("group/memberdef/inlineclasses", + m_sHandler.insert("group/memberdef/inlineclasses", new StartElementHandlerSection(this,LayoutDocEntry::GroupInlineClasses,&LayoutParser::startSectionEntry, COMPILE_FOR_1_OPTION( theTranslator->trClassDocumentation(), SrcLangExt_Fortran,theTranslator->trTypeDocumentation() ))); - m_sHandler.insert("group/memberdef/defines", + m_sHandler.insert("group/memberdef/defines", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docDefineMembers,theTranslator->trDefineDocumentation())); - m_sHandler.insert("group/memberdef/typedefs", + m_sHandler.insert("group/memberdef/typedefs", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docTypedefMembers,theTranslator->trTypedefDocumentation())); - m_sHandler.insert("group/memberdef/sequences", + m_sHandler.insert("group/memberdef/sequences", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docSequenceMembers,theTranslator->trSequenceDocumentation())); - m_sHandler.insert("group/memberdef/dictionaries", + m_sHandler.insert("group/memberdef/dictionaries", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docDictionaryMembers, theTranslator->trDictionaryDocumentation())); - m_sHandler.insert("group/memberdef/enums", + m_sHandler.insert("group/memberdef/enums", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docEnumMembers,theTranslator->trEnumerationTypeDocumentation())); - m_sHandler.insert("group/memberdef/enumvalues", + m_sHandler.insert("group/memberdef/enumvalues", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docEnumValMembers,theTranslator->trEnumerationValueDocumentation())); - m_sHandler.insert("group/memberdef/functions", + m_sHandler.insert("group/memberdef/functions", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docFuncMembers, COMPILE_FOR_1_OPTION( theTranslator->trFunctionDocumentation(), SrcLangExt_Fortran,theTranslator->trSubprogramDocumentation() ))); - m_sHandler.insert("group/memberdef/variables", + m_sHandler.insert("group/memberdef/variables", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docVarMembers,theTranslator->trVariableDocumentation())); - m_sHandler.insert("group/memberdef/signals", + m_sHandler.insert("group/memberdef/signals", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, - MemberListType_docSignalMembers,theTranslator->trSignals())); - m_sHandler.insert("group/memberdef/publicslots", + MemberListType_docSignalMembers,theTranslator->trSignals())); + m_sHandler.insert("group/memberdef/publicslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docPubSlotMembers,theTranslator->trPublicSlots())); - m_sHandler.insert("group/memberdef/protectedslots", + m_sHandler.insert("group/memberdef/protectedslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docProSlotMembers,theTranslator->trProtectedSlots())); - m_sHandler.insert("group/memberdef/privateslots", + m_sHandler.insert("group/memberdef/privateslots", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docPriSlotMembers,theTranslator->trPrivateSlots())); - m_sHandler.insert("group/memberdef/events", + m_sHandler.insert("group/memberdef/events", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docEventMembers,theTranslator->trEvents())); - m_sHandler.insert("group/memberdef/properties", + m_sHandler.insert("group/memberdef/properties", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docPropMembers,theTranslator->trProperties())); - m_sHandler.insert("group/memberdef/friends", + m_sHandler.insert("group/memberdef/friends", new StartElementHandlerMember(this,&LayoutParser::startMemberDefEntry, MemberListType_docFriendMembers,theTranslator->trFriends())); - m_eHandler.insert("group/memberdef", + m_eHandler.insert("group/memberdef", new EndElementHandler(this,&LayoutParser::endMemberDef)); - m_eHandler.insert("group", + m_eHandler.insert("group", new EndElementHandler(this,&LayoutParser::endGroup)); // directory layout handlers - m_sHandler.insert("directory", + m_sHandler.insert("directory", new StartElementHandler(this,&LayoutParser::startDirectory)); - m_sHandler.insert("directory/briefdescription", + m_sHandler.insert("directory/briefdescription", new StartElementHandlerKind(this,LayoutDocEntry::BriefDesc,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("directory/detaileddescription", + m_sHandler.insert("directory/detaileddescription", new StartElementHandlerSection(this,LayoutDocEntry::DetailedDesc,&LayoutParser::startSectionEntry, theTranslator->trDetailedDescription())); - m_sHandler.insert("directory/directorygraph", + m_sHandler.insert("directory/directorygraph", new StartElementHandlerKind(this,LayoutDocEntry::DirGraph,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("directory/memberdecl", + m_sHandler.insert("directory/memberdecl", new StartElementHandler(this,&LayoutParser::startMemberDecl)); - m_sHandler.insert("directory/memberdecl/dirs", + m_sHandler.insert("directory/memberdecl/dirs", new StartElementHandlerKind(this,LayoutDocEntry::DirSubDirs,&LayoutParser::startSimpleEntry)); - m_sHandler.insert("directory/memberdecl/files", + m_sHandler.insert("directory/memberdecl/files", new StartElementHandlerKind(this,LayoutDocEntry::DirFiles,&LayoutParser::startSimpleEntry)); - m_eHandler.insert("directory/memberdecl", + m_eHandler.insert("directory/memberdecl", new EndElementHandler(this,&LayoutParser::endMemberDecl)); - m_eHandler.insert("directory", + m_eHandler.insert("directory", new EndElementHandler(this,&LayoutParser::endDirectory)); } @@ -964,7 +964,7 @@ class LayoutParser : public QXmlDefaultHandler if (m_rootNav && !m_rootNav->find(LayoutNavEntry::MainPage)) { // no MainPage node... add one as the first item of the root node... - new LayoutNavEntry(m_rootNav,LayoutNavEntry::MainPage, TRUE, + new LayoutNavEntry(m_rootNav,LayoutNavEntry::MainPage, TRUE, /*Config_getBool(GENERATE_TREEVIEW) ? "main" :*/ "index", theTranslator->trMainPage(),"",TRUE); } @@ -974,8 +974,8 @@ class LayoutParser : public QXmlDefaultHandler { static bool javaOpt = Config_getBool(OPTIMIZE_OUTPUT_JAVA); static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN); - static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); - static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); + static bool vhdlOpt = Config_getBool(OPTIMIZE_OUTPUT_VHDL); + static bool sliceOpt = Config_getBool(OPTIMIZE_OUTPUT_SLICE); static bool hasGraphicalHierarchy = Config_getBool(HAVE_DOT) && Config_getBool(GRAPHICAL_HIERARCHY); static bool extractAll = Config_getBool(EXTRACT_ALL); @@ -1213,7 +1213,7 @@ class LayoutParser : public QXmlDefaultHandler } i++; } - if (mapping[i].typeStr==0) + if (mapping[i].typeStr==0) { if (type.isEmpty()) { @@ -1230,7 +1230,7 @@ class LayoutParser : public QXmlDefaultHandler QCString title = attrib.value("title").utf8(); bool isVisible = elemIsVisible(attrib); if (title.isEmpty()) // use default title - { + { title = mapping[i].mainName; // use title for main row if (m_rootNav!=LayoutDocManager::instance().rootNavEntry() && !mapping[i].subName.isEmpty()) { @@ -1384,7 +1384,7 @@ class LayoutParser : public QXmlDefaultHandler } // reimplemented from QXmlDefaultHandler - bool startElement( const QString&, const QString&, + bool startElement( const QString&, const QString&, const QString& name, const QXmlAttributes& attrib ) { //printf("startElement [%s]::[%s]\n",m_scope.data(),name.data()); @@ -1568,7 +1568,7 @@ void writeDefaultLayoutFile(const char *fileName) //---------------------------------------------------------------------------------- // Convert input to a title. -// The format of input can be a simple title "A title" or in case there are different +// The format of input can be a simple title "A title" or in case there are different // titles for some programming languages they can take the following form: // "A title|16=Another title|8=Yet Another title" // where the number is a value of SrcLangExt in decimal notation (i.e. 16=Java, 8=IDL). diff --git a/src/mangen.cpp b/src/mangen.cpp index 6709748..1faa296 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -1,12 +1,12 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2015 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 + * 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. * @@ -41,7 +41,7 @@ static QCString getExtension() QCString ext = Config_getString(MAN_EXTENSION); if (ext.isEmpty()) { - ext = "3"; + ext = "3"; } else { @@ -49,7 +49,7 @@ static QCString getExtension() { if (ext.length()==1) { - ext = "3"; + ext = "3"; } else // strip . { @@ -91,8 +91,8 @@ ManGenerator::~ManGenerator() void ManGenerator::init() { - QCString &manOutput = Config_getString(MAN_OUTPUT); - + QCString manOutput = Config_getString(MAN_OUTPUT); + QDir d(manOutput); if (!d.exists() && !d.mkdir(manOutput)) { @@ -139,7 +139,7 @@ static QCString buildFileName(const char *name) } QCString manExtension = "." + getExtension(); - if (fileName.right(manExtension.length())!=manExtension) + if (fileName.right(manExtension.length())!=manExtension) { fileName+=manExtension; } @@ -161,11 +161,11 @@ void ManGenerator::endFile() void ManGenerator::endTitleHead(const char *,const char *name) { - t << ".TH \"" << name << "\" " << getExtension() << " \"" + t << ".TH \"" << name << "\" " << getExtension() << " \"" << dateToString(FALSE) << "\" \""; if (!Config_getString(PROJECT_NUMBER).isEmpty()) t << "Version " << Config_getString(PROJECT_NUMBER) << "\" \""; - if (Config_getString(PROJECT_NAME).isEmpty()) + if (Config_getString(PROJECT_NAME).isEmpty()) t << "Doxygen"; else t << Config_getString(PROJECT_NAME); @@ -284,7 +284,7 @@ void ManGenerator::docify(const char *str) { const char *p=str; char c=0; - while ((c=*p++)) + while ((c=*p++)) { switch(c) { @@ -318,8 +318,8 @@ void ManGenerator::codify(const char *str) case '.': t << "\\&."; break; // see bug652277 case '\t': spacesToNextTabStop = Config_getInt(TAB_SIZE) - (m_col%Config_getInt(TAB_SIZE)); - t << Doxygen::spaces.left(spacesToNextTabStop); - m_col+=spacesToNextTabStop; + t << Doxygen::spaces.left(spacesToNextTabStop); + m_col+=spacesToNextTabStop; break; case '\n': t << "\n"; m_firstCol=TRUE; m_col=0; break; case '\\': t << "\\"; m_col++; break; @@ -346,21 +346,21 @@ void ManGenerator::writeChar(char c) m_paragraph=FALSE; } -void ManGenerator::startDescList(SectionTypes) +void ManGenerator::startDescList(SectionTypes) { - if (!m_firstCol) - { t << endl << ".PP" << endl; - m_firstCol=TRUE; m_paragraph=TRUE; + if (!m_firstCol) + { t << endl << ".PP" << endl; + m_firstCol=TRUE; m_paragraph=TRUE; m_col=0; } m_paragraph=FALSE; startBold(); } -void ManGenerator::startTitle() -{ - if (!m_firstCol) t << endl; - t << ".SH \""; +void ManGenerator::startTitle() +{ + if (!m_firstCol) t << endl; + t << ".SH \""; m_firstCol=FALSE; m_paragraph=FALSE; } @@ -370,40 +370,40 @@ void ManGenerator::endTitle() t << "\""; } -void ManGenerator::startItemListItem() -{ - if (!m_firstCol) t << endl; - t << ".TP" << endl; +void ManGenerator::startItemListItem() +{ + if (!m_firstCol) t << endl; + t << ".TP" << endl; m_firstCol=TRUE; m_paragraph=FALSE; m_col=0; -} +} void ManGenerator::endItemListItem() { } -void ManGenerator::startCodeFragment() -{ +void ManGenerator::startCodeFragment() +{ newParagraph(); - t << ".nf" << endl; + t << ".nf" << endl; m_firstCol=TRUE; m_paragraph=FALSE; } -void ManGenerator::endCodeFragment() -{ +void ManGenerator::endCodeFragment() +{ if (!m_firstCol) t << endl; - t << ".fi" << endl; + t << ".fi" << endl; m_firstCol=TRUE; m_paragraph=FALSE; m_col=0; } -void ManGenerator::startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool) -{ +void ManGenerator::startMemberDoc(const char *,const char *,const char *,const char *,int,int,bool) +{ if (!m_firstCol) t << endl; - t << ".SS \""; + t << ".SS \""; m_firstCol=FALSE; m_paragraph=FALSE; } @@ -413,7 +413,7 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName, const char *) { // something to be done? - if( !Config_getBool(MAN_LINKS) ) + if( !Config_getBool(MAN_LINKS) ) { return; // no } @@ -426,14 +426,14 @@ void ManGenerator::startDoxyAnchor(const char *,const char *manName, //printf("Converting man link '%s'->'%s'->'%s'\n", // name,baseName.data(),buildFileName(baseName).data()); - + // - remove dangerous characters and append suffix, then add dir prefix QCString fileName=m_dir+"/"+buildFileName( baseName ); QFile linkfile( fileName ); // - only create file if it doesn't exist already - if ( !linkfile.open( IO_ReadOnly ) ) + if ( !linkfile.open( IO_ReadOnly ) ) { - if ( linkfile.open( IO_WriteOnly ) ) + if ( linkfile.open( IO_WriteOnly ) ) { FTextStream linkstream; linkstream.setDevice(&linkfile); @@ -449,10 +449,10 @@ void ManGenerator::endMemberDoc(bool) t << "\"\n"; } -void ManGenerator::startSubsection() -{ +void ManGenerator::startSubsection() +{ if (!m_firstCol) t << endl; - t << ".SS \""; + t << ".SS \""; m_firstCol=FALSE; m_paragraph=FALSE; } @@ -463,10 +463,10 @@ void ManGenerator::endSubsection() } -void ManGenerator::startSubsubsection() -{ +void ManGenerator::startSubsubsection() +{ if (!m_firstCol) t << endl; - t << "\n.SS \""; + t << "\n.SS \""; m_firstCol=FALSE; m_paragraph=FALSE; } @@ -476,10 +476,10 @@ void ManGenerator::endSubsubsection() t << "\""; } -void ManGenerator::writeSynopsis() -{ +void ManGenerator::writeSynopsis() +{ if (!m_firstCol) t << endl; - t << ".SH SYNOPSIS\n.br\n.PP\n"; + t << ".SH SYNOPSIS\n.br\n.PP\n"; m_firstCol=TRUE; m_paragraph=FALSE; } @@ -534,31 +534,31 @@ void ManGenerator::endAnonTypeScope(int indentLevel) } -void ManGenerator::startMemberItem(const char *,int,const char *) -{ +void ManGenerator::startMemberItem(const char *,int,const char *) +{ if (m_firstCol && !m_insideTabbing) t << ".in +1c\n"; - t << "\n.ti -1c\n.RI \""; + t << "\n.ti -1c\n.RI \""; m_firstCol=FALSE; } -void ManGenerator::endMemberItem() -{ - t << "\"\n.br"; +void ManGenerator::endMemberItem() +{ + t << "\"\n.br"; } -void ManGenerator::startMemberList() -{ +void ManGenerator::startMemberList() +{ if (!m_insideTabbing) { - t << "\n.in +1c"; m_firstCol=FALSE; + t << "\n.in +1c"; m_firstCol=FALSE; } } -void ManGenerator::endMemberList() -{ +void ManGenerator::endMemberList() +{ if (!m_insideTabbing) { - t << "\n.in -1c"; m_firstCol=FALSE; + t << "\n.in -1c"; m_firstCol=FALSE; } } @@ -595,7 +595,7 @@ void ManGenerator::endMemberGroup(bool) void ManGenerator::startSection(const char *,const char *,SectionType type) { - if( !m_inHeader ) + if( !m_inHeader ) { switch(type) { @@ -634,9 +634,9 @@ void ManGenerator::endSection(const char *,SectionType type) void ManGenerator::startExamples() { - if (!m_firstCol) - { t << endl << ".PP" << endl; - m_firstCol=TRUE; m_paragraph=TRUE; + if (!m_firstCol) + { t << endl << ".PP" << endl; + m_firstCol=TRUE; m_paragraph=TRUE; m_col=0; } m_paragraph=FALSE; @@ -652,9 +652,9 @@ void ManGenerator::endExamples() void ManGenerator::startDescTable(const char *title) { - if (!m_firstCol) - { t << endl << ".PP" << endl; - m_firstCol=TRUE; m_paragraph=TRUE; + if (!m_firstCol) + { t << endl << ".PP" << endl; + m_firstCol=TRUE; m_paragraph=TRUE; m_col=0; } m_paragraph=FALSE; @@ -672,9 +672,9 @@ void ManGenerator::endDescTable() void ManGenerator::startParamList(ParamListTypes,const char *title) { - if (!m_firstCol) - { t << endl << ".PP" << endl; - m_firstCol=TRUE; m_paragraph=TRUE; + if (!m_firstCol) + { t << endl << ".PP" << endl; + m_firstCol=TRUE; m_paragraph=TRUE; m_col=0; } m_paragraph=FALSE; @@ -692,16 +692,16 @@ void ManGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *) { ManDocVisitor *visitor = new ManDocVisitor(t,*this,ctx?ctx->getDefFileExtension():QCString("")); n->accept(visitor); - delete visitor; + delete visitor; m_firstCol=FALSE; m_paragraph = FALSE; } void ManGenerator::startConstraintList(const char *header) { - if (!m_firstCol) - { t << endl << ".PP" << endl; - m_firstCol=TRUE; m_paragraph=TRUE; + if (!m_firstCol) + { t << endl << ".PP" << endl; + m_firstCol=TRUE; m_paragraph=TRUE; m_col=0; } m_paragraph=FALSE; @@ -748,16 +748,16 @@ void ManGenerator::endConstraintList() } -void ManGenerator::startInlineHeader() +void ManGenerator::startInlineHeader() { - if (!m_firstCol) + if (!m_firstCol) { t << endl << ".PP" << endl << ".in -1c" << endl; } - t << ".RI \"\\fB"; + t << ".RI \"\\fB"; } -void ManGenerator::endInlineHeader() +void ManGenerator::endInlineHeader() { t << "\\fP\"" << endl << ".in +1c" << endl; m_firstCol = FALSE; @@ -765,7 +765,7 @@ void ManGenerator::endInlineHeader() void ManGenerator::startMemberDocSimple(bool isEnum) { - if (!m_firstCol) + if (!m_firstCol) { t << endl << ".PP" << endl; } diff --git a/src/plantuml.cpp b/src/plantuml.cpp index 2e172ac..d020da0 100644 --- a/src/plantuml.cpp +++ b/src/plantuml.cpp @@ -208,21 +208,23 @@ static void runPlantumlContent(const QDict< QList > &plantumlFiles, QCString pumlType = ""; QCString pumlOutDir = ""; - QStrList &pumlIncludePathList = Config_getList(PLANTUML_INCLUDE_PATH); - char *s=pumlIncludePathList.first(); - if (s) + const StringVector &pumlIncludePathList = Config_getList(PLANTUML_INCLUDE_PATH); { - pumlArgs += "-Dplantuml.include.path=\""; - pumlArgs += s; - s = pumlIncludePathList.next(); - } - while (s) - { - pumlArgs += Portable::pathListSeparator(); - pumlArgs += s; - s = pumlIncludePathList.next(); + auto it = pumlIncludePathList.begin(); + if (it!=pumlIncludePathList.end()) + { + pumlArgs += "-Dplantuml.include.path=\""; + pumlArgs += it->c_str(); + ++it; + } + while (it!=pumlIncludePathList.end()) + { + pumlArgs += Portable::pathListSeparator(); + pumlArgs += it->c_str(); + ++it; + } } - if (pumlIncludePathList.first()) pumlArgs += "\" "; + if (!pumlIncludePathList.empty()) pumlArgs += "\" "; pumlArgs += "-Djava.awt.headless=true -jar \""+plantumlJarPath+"plantuml.jar\" "; if (!plantumlConfigFile.isEmpty()) { diff --git a/src/pre.l b/src/pre.l index 5981147..b78908f 100644 --- a/src/pre.l +++ b/src/pre.l @@ -1796,8 +1796,8 @@ static FileState *checkAndOpenFile(yyscan_t yyscanner,const QCString &fileName,b QFileInfo fi(fileName); if (fi.exists() && fi.isFile()) { - const QStrList &exclPatterns = Config_getList(EXCLUDE_PATTERNS); - if (patternMatch(fi,&exclPatterns)) return 0; + const StringVector &exclPatterns = Config_getList(EXCLUDE_PATTERNS); + if (patternMatch(fi,exclPatterns)) return 0; QCString absName = fi.absFilePath().utf8(); @@ -2918,11 +2918,10 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc) } else if (searchIncludes) // search in INCLUDE_PATH as well { - QStrList &includePath = Config_getList(INCLUDE_PATH); - char *incPath=includePath.first(); - while (incPath) + const StringVector &includePath = Config_getList(INCLUDE_PATH); + for (const auto &incPath : includePath) { - QFileInfo fi3(incPath); + QFileInfo fi3(incPath.c_str()); if (fi3.exists() && fi3.isDir()) { absName = QCString(fi3.absFilePath().utf8())+"/"+incFileName; @@ -2935,7 +2934,6 @@ static void readIncludeFile(yyscan_t yyscanner,const QCString &inc) } //printf( "absIncFileName = %s\n", absIncFileName.data() ); } - incPath=includePath.next(); } } //printf( "absIncFileName = %s\n", absIncFileName.data() ); @@ -3191,12 +3189,10 @@ static void initPredefined(yyscan_t yyscanner,const char *fileName) YY_EXTRA_TYPE state = preYYget_extra(yyscanner); // add predefined macros - char *defStr; - QStrList &predefList = Config_getList(PREDEFINED); - QStrListIterator sli(predefList); - for (sli.toFirst();(defStr=sli.current());++sli) + const StringVector &predefList = Config_getList(PREDEFINED); + for (const auto &defStr : predefList) { - QCString ds = defStr; + QCString ds = defStr.c_str(); int i_equals=ds.find('='); int i_obrace=ds.find('('); int i_cbrace=ds.find(')'); diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index ecf2d32..9d0a957 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -186,14 +186,14 @@ void RTFGenerator::init() } // overwrite some (or all) definitions from file - QCString &rtfStyleSheetFile = Config_getString(RTF_STYLESHEET_FILE); + QCString rtfStyleSheetFile = Config_getString(RTF_STYLESHEET_FILE); if (!rtfStyleSheetFile.isEmpty()) { loadStylesheet(rtfStyleSheetFile, rtf_Style); } // If user has defined an extension file, load its contents. - QCString &rtfExtensionsFile = Config_getString(RTF_EXTENSIONS_FILE); + QCString rtfExtensionsFile = Config_getString(RTF_EXTENSIONS_FILE); if (!rtfExtensionsFile.isEmpty()) { loadExtensions(rtfExtensionsFile); diff --git a/src/util.cpp b/src/util.cpp index 86435fa..7006f26 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -277,22 +277,20 @@ QCString generateMarker(int id) return result; } -static QCString stripFromPath(const QCString &path,QStrList &l) +static QCString stripFromPath(const QCString &path,const StringVector &l) { // look at all the strings in the list and strip the longest match - const char *s=l.first(); QCString potential; unsigned int length = 0; - while (s) + for (const auto &s : l) { - QCString prefix = s; + QCString prefix = s.c_str(); if (prefix.length() > length && qstricmp(path.left(prefix.length()),prefix)==0) // case insensitive compare { length = prefix.length(); potential = path.right(path.length()-prefix.length()); } - s = l.next(); } if (length) return potential; return path; @@ -2377,15 +2375,13 @@ int filterCRLF(char *buf,int len) return dest; // length of the valid part of the buf } -static QCString getFilterFromList(const char *name,const QStrList &filterList,bool &found) +static QCString getFilterFromList(const char *name,const StringVector &filterList,bool &found) { found=FALSE; // compare the file name to the filter pattern list - QStrListIterator sli(filterList); - char* filterStr; - for (sli.toFirst(); (filterStr = sli.current()); ++sli) + for (const auto &filterStr : filterList) { - QCString fs = filterStr; + QCString fs = filterStr.c_str(); int i_equals=fs.find('='); if (i_equals!=-1) { @@ -2419,12 +2415,12 @@ QCString getFileFilter(const char* name,bool isSourceCode) // sanity check if (name==0) return ""; - QStrList& filterSrcList = Config_getList(FILTER_SOURCE_PATTERNS); - QStrList& filterList = Config_getList(FILTER_PATTERNS); + const StringVector& filterSrcList = Config_getList(FILTER_SOURCE_PATTERNS); + const StringVector& filterList = Config_getList(FILTER_PATTERNS); QCString filterName; bool found=FALSE; - if (isSourceCode && !filterSrcList.isEmpty()) + if (isSourceCode && !filterSrcList.empty()) { // first look for source filter pattern list filterName = getFilterFromList(name,filterSrcList,found); } @@ -4633,11 +4629,10 @@ QCString substituteKeywords(const QCString &s,const char *title, int getPrefixIndex(const QCString &name) { if (name.isEmpty()) return 0; - static QStrList &sl = Config_getList(IGNORE_PREFIX); - char *s = sl.first(); - while (s) + const StringVector &sl = Config_getList(IGNORE_PREFIX); + for (const auto &s : sl) { - const char *ps=s; + const char *ps=s.c_str(); const char *pd=name.data(); int i=0; while (*ps!=0 && *pd!=0 && *ps==*pd) ps++,pd++,i++; @@ -4645,7 +4640,6 @@ int getPrefixIndex(const QCString &name) { return i; } - s = sl.next(); } return 0; } @@ -7506,7 +7500,7 @@ QCString filterTitle(const QCString &title) // returns TRUE if the name of the file represented by 'fi' matches // one of the file patterns in the 'patList' list. -bool patternMatch(const QFileInfo &fi,const QStrList *patList) +bool patternMatch(const QFileInfo &fi,const StringVector &patList) { static bool caseSenseNames = Config_getBool(CASE_SENSE_NAMES); bool found = FALSE; @@ -7517,17 +7511,15 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList) caseSenseNames = FALSE; } - if (patList) + if (!patList.empty()) { - QStrListIterator it(*patList); - QCString pattern; - QCString fn = fi.fileName().data(); QCString fp = fi.filePath().data(); QCString afp= fi.absFilePath().data(); - for (it.toFirst();(pattern=it.current());++it) + for (const auto &pat: patList) { + QCString pattern = pat.c_str(); if (!pattern.isEmpty()) { int i=pattern.find('='); @@ -8368,18 +8360,16 @@ bool openOutputFile(const char *outFile,QFile &f) void writeExtraLatexPackages(FTextStream &t) { // User-specified packages - QStrList &extraPackages = Config_getList(EXTRA_PACKAGES); - if (!extraPackages.isEmpty()) + const StringVector &extraPackages = Config_getList(EXTRA_PACKAGES); + if (!extraPackages.empty()) { t << "% Packages requested by user\n"; - const char *pkgName=extraPackages.first(); - while (pkgName) + for (const auto &pkgName : extraPackages) { if ((pkgName[0] == '[') || (pkgName[0] == '{')) - t << "\\usepackage" << pkgName << "\n"; + t << "\\usepackage" << pkgName.c_str() << "\n"; else - t << "\\usepackage{" << pkgName << "}\n"; - pkgName=extraPackages.next(); + t << "\\usepackage{" << pkgName.c_str() << "}\n"; } t << "\n"; } diff --git a/src/util.h b/src/util.h index e49a807..a93220c 100644 --- a/src/util.h +++ b/src/util.h @@ -31,6 +31,7 @@ #include "docparser.h" #include "classdef.h" #include "arguments.h" +#include "containers.h" //-------------------------------------------------------------------- @@ -436,7 +437,7 @@ bool readInputFile(const char *fileName,BufStr &inBuf, bool filter=TRUE,bool isSourceCode=FALSE); QCString filterTitle(const QCString &title); -bool patternMatch(const QFileInfo &fi,const QStrList *patList); +bool patternMatch(const QFileInfo &fi,const StringVector &patList); QCString externalLinkTarget(const bool parent = false); QCString externalRef(const QCString &relPath,const QCString &ref,bool href); diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 9a48e14..3f63cf0 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -3524,12 +3524,11 @@ void FlowChart::printUmlTree() } qcs+="\n"; - QCString & htmlOutDir = Config_getString(HTML_OUTPUT); + QCString htmlOutDir = Config_getString(HTML_OUTPUT); QCString n=convertNameToFileName(); - QCString tmp=htmlOutDir; - n=PlantumlManager::instance()->writePlantUMLSource(tmp,n,qcs,PlantumlManager::PUML_SVG); - PlantumlManager::instance()->generatePlantUMLOutput(n.data(),tmp.data(),PlantumlManager::PUML_SVG); + n=PlantumlManager::instance()->writePlantUMLSource(htmlOutDir,n,qcs,PlantumlManager::PUML_SVG); + PlantumlManager::instance()->generatePlantUMLOutput(n,htmlOutDir,PlantumlManager::PUML_SVG); } QCString FlowChart::convertNameToFileName() -- cgit v0.12 From f49f1c8cdd9babbbe0350c9ad3d3a3e92244085e Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Fri, 5 Jun 2020 21:24:10 +0200 Subject: Issue #7831: Error building docs after 0df1623c9363d52a2b04457233dcf2c64319b03c --- src/config.h | 1 - src/doxygen.cpp | 47 +++++++++++++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/config.h b/src/config.h index 845a369..31be3a1 100644 --- a/src/config.h +++ b/src/config.h @@ -41,7 +41,6 @@ class FTextStream; #define Config_updateInt(name,value) (ConfigValues::instance().update_##name(value)); #define Config_updateEnum(name,value) (ConfigValues::instance().update_##name(value)); #define Config_updateList(name,...) (ConfigValues::instance().update_##name(__VA_ARGS__)); -#define Config_setterFunc(name) (std::bind(&ConfigValues::update_##name,ConfigValues::instance(),std::placeholders::_1)) //#endif //! @} diff --git a/src/doxygen.cpp b/src/doxygen.cpp index ddaa3f1..344ec7b 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -10479,20 +10479,16 @@ static void exitDoxygen() static QCString createOutputDirectory(const QCString &baseDirName, const QCString &formatDirName, - const char *defaultDirName, - std::function updateConfig) + const char *defaultDirName) { QCString result = formatDirName; - // Note the & on the next line, we modify the formatDirOption! if (result.isEmpty()) { result = baseDirName + defaultDirName; - updateConfig(result); } else if (formatDirName[0]!='/' && (formatDirName.length()==1 || formatDirName[1]!=':')) { result.prepend(baseDirName+'/'); - updateConfig(result); } QDir formatDir(result); if (!formatDir.exists() && !formatDir.mkdir(result)) @@ -10771,43 +10767,58 @@ void parseInput() QCString htmlOutput; bool generateHtml = Config_getBool(GENERATE_HTML); if (generateHtml || g_useOutputTemplate /* TODO: temp hack */) - htmlOutput = createOutputDirectory(outputDirectory,Config_getString(HTML_OUTPUT), - "/html",Config_setterFunc(HTML_OUTPUT)); + { + htmlOutput = createOutputDirectory(outputDirectory,Config_getString(HTML_OUTPUT),"/html"); + Config_updateString(HTML_OUTPUT,htmlOutput); + } QCString docbookOutput; bool generateDocbook = Config_getBool(GENERATE_DOCBOOK); if (generateDocbook) - docbookOutput = createOutputDirectory(outputDirectory,Config_getString(DOCBOOK_OUTPUT), - "/docbook",Config_setterFunc(DOCBOOK_OUTPUT)); + { + docbookOutput = createOutputDirectory(outputDirectory,Config_getString(DOCBOOK_OUTPUT),"/docbook"); + Config_updateString(DOCBOOK_OUTPUT,docbookOutput); + } QCString xmlOutput; bool generateXml = Config_getBool(GENERATE_XML); if (generateXml) - xmlOutput = createOutputDirectory(outputDirectory,Config_getString(XML_OUTPUT), - "/xml",Config_setterFunc(XML_OUTPUT)); + { + xmlOutput = createOutputDirectory(outputDirectory,Config_getString(XML_OUTPUT),"/xml"); + Config_updateString(XML_OUTPUT,xmlOutput); + } QCString latexOutput; bool generateLatex = Config_getBool(GENERATE_LATEX); if (generateLatex) - latexOutput = createOutputDirectory(outputDirectory,Config_getString(LATEX_OUTPUT), - "/latex",Config_setterFunc(LATEX_OUTPUT)); + { + latexOutput = createOutputDirectory(outputDirectory,Config_getString(LATEX_OUTPUT), "/latex"); + Config_updateString(LATEX_OUTPUT,latexOutput); + } QCString rtfOutput; bool generateRtf = Config_getBool(GENERATE_RTF); if (generateRtf) - rtfOutput = createOutputDirectory(outputDirectory,Config_getString(RTF_OUTPUT), - "/rtf",Config_setterFunc(RTF_OUTPUT)); + { + rtfOutput = createOutputDirectory(outputDirectory,Config_getString(RTF_OUTPUT),"/rtf"); + Config_updateString(RTF_OUTPUT,rtfOutput); + } QCString manOutput; bool generateMan = Config_getBool(GENERATE_MAN); if (generateMan) - manOutput = createOutputDirectory(outputDirectory,Config_getString(MAN_OUTPUT), - "/man",Config_setterFunc(MAN_OUTPUT)); + { + manOutput = createOutputDirectory(outputDirectory,Config_getString(MAN_OUTPUT),"/man"); + Config_updateString(MAN_OUTPUT,manOutput); + } //QCString sqlOutput; //bool &generateSql = Config_getBool(GENERATE_SQLITE3); //if (generateSql) - // sqlOutput = createOutputDirectory(outputDirectory,"SQLITE3_OUTPUT","/sqlite3"); + //{ + // sqlOutput = createOutputDirectory(outputDirectory,Config_getString(SQLITE3_OUTPUT),"/sqlite3"); + // Config_update(SQLITE3_OUTPUT,sqlOutput); + //} if (Config_getBool(HAVE_DOT)) { -- cgit v0.12 From c0dcee7cdcc5d7841d050682a35ccf59dc668fcb Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 6 Jun 2020 13:22:04 +0200 Subject: issue #7833 Empty string in PREDEFINED throws Ignore empty strings --- src/configimpl.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configimpl.l b/src/configimpl.l index 9cea61b..57e7c78 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -1102,7 +1102,7 @@ static void substEnvVarsInStrList(StringVector &sl) } else // just goto the next element in the list { - results.push_back(result.data()); + if (!result.isEmpty()) results.push_back(result.data()); } } sl = results; -- cgit v0.12 From b42789d09fd8a81a40c0f13ba2c024b7eec71d92 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 6 Jun 2020 13:38:02 +0200 Subject: Fixed compilation issue on Windows for setNum with size_t argument --- src/cite.cpp | 2 +- src/index.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cite.cpp b/src/cite.cpp index 7b6452e..4adf6f2 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -333,7 +333,7 @@ void CitationManager::generatePage() // so no problem. for (size_t j = 1; j <= citeDataList.size(); j++) { - thisDir.remove(bibOutputDir + bibTmpFile + QCString().setNum(j) + ".bib"); + thisDir.remove(bibOutputDir + bibTmpFile + QCString().setNum(static_cast(j)) + ".bib"); } thisDir.rmdir(bibOutputDir); } diff --git a/src/index.cpp b/src/index.cpp index 54fa90b..04d6ce4 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -3988,7 +3988,7 @@ static void writeGroupTreeNode(OutputList &ol, GroupDef *gd, int level, FTVHelp* numSubItems += gd->getNamespaces()->count(); numSubItems += gd->getClasses()->count(); numSubItems += gd->getFiles()->count(); - numSubItems += gd->getDirs().size(); + numSubItems += static_cast(gd->getDirs().size()); numSubItems += gd->getPages()->count(); } -- cgit v0.12 From 2a0e9798c552e7ce526ed9e6678ea938033faa65 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 6 Jun 2020 13:43:15 +0200 Subject: Prevent potential empty string --- src/configimpl.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/configimpl.l b/src/configimpl.l index 57e7c78..9eda61d 100644 --- a/src/configimpl.l +++ b/src/configimpl.l @@ -1090,7 +1090,7 @@ static void substEnvVarsInStrList(StringVector &sl) } else if (c==' ' || c=='\t') // separator { - results.push_back(result.mid(p,i-p).data()); + if (i>p) results.push_back(result.mid(p,i-p).data()); p=i+1; } } -- cgit v0.12 From 73c460247af61dd37fb092a9dd4e647edcd8cbfa Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 6 Jun 2020 14:57:58 +0200 Subject: Minor documentation updates --- doc/CMakeLists.txt | 2 +- doc/arch.doc | 110 ++++----- doc/archoverview.gif | Bin 7822 -> 0 bytes doc/archoverview.svg | 625 +++++++++++++++++++++++++++++++++++++++++++++++++++ doc/install.doc | 24 +- 5 files changed, 697 insertions(+), 64 deletions(-) delete mode 100644 doc/archoverview.gif create mode 100644 doc/archoverview.svg diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 032c16a..537089b 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -32,7 +32,7 @@ set(DOC_INSTALL_DIR "share/doc/packages/doxygen" CACHE STRING "Relative path whe set(DOC_FILES arch.doc archoverview.eps - archoverview.gif + archoverview.svg autolink.doc changelog.doc commands.doc diff --git a/doc/arch.doc b/doc/arch.doc index bd51a1b..104b3e3 100644 --- a/doc/arch.doc +++ b/doc/arch.doc @@ -1,12 +1,12 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2015 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 + * 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. * @@ -22,7 +22,7 @@ The following picture shows how source files are processed by doxygen. -\image html archoverview.gif "Data flow overview" +\image html archoverview.svg "Data flow overview" \image latex archoverview.eps "Data flow overview" width=14cm The following sections explain the steps above in more detail. @@ -30,20 +30,20 @@ The following sections explain the steps above in more detail.

Config parser

The configuration file that controls the settings of a project is parsed -and the settings are stored in the singleton class \c Config -in src/config.h. The parser itself is written using \c flex -and can be found in src/config.l. This parser is also used +and the settings are stored in the singleton class \c Config +in src/config.h. The parser itself is written using \c flex +and can be found in src/config.l. This parser is also used directly by \c doxywizard, so it is put in a separate library. -Each configuration option has one of 5 possible types: \c String, +Each configuration option has one of 5 possible types: \c String, \c List, \c Enum, \c Int, or \c Bool. The values of these options are available through the global functions \c Config_getXXX(), where \c XXX is the type of the option. The argument of these function is a string naming -the option as it appears in the configuration file. For instance: +the option as it appears in the configuration file. For instance: \c Config_getBool("GENERATE_TESTLIST") returns a reference to a boolean -value that is \c TRUE if the test list was enabled in the configuration file. +value that is \c TRUE if the test list was enabled in the configuration file. -The function \c readConfiguration() in \c src/doxygen.cpp +The function \c readConfiguration() in \c src/doxygen.cpp reads the command line options and then calls the configuration parser.

C Preprocessor

@@ -54,29 +54,29 @@ C Preprocessor (after being piped through a user defined filter if available). The way the preprocessor works differs somewhat from a standard C Preprocessor. By default it does not do macro expansion, although it can be configured to expand all macros. Typical usage is to only expand a user specified set -of macros. This is to allow macro names to appear in the type of +of macros. This is to allow macro names to appear in the type of function parameters for instance. -Another difference is that the preprocessor parses, but not actually includes +Another difference is that the preprocessor parses, but not actually includes code when it encounters a \c \#include (with the exception of \c \#include -found inside { ... } blocks). The reasons behind this deviation from -the standard is to prevent feeding multiple definitions of the -same functions/classes to doxygen's parser. If all source files would -include a common header file for instance, the class and type -definitions (and their documentation) would be present in each -translation unit. +found inside { ... } blocks). The reasons behind this deviation from +the standard is to prevent feeding multiple definitions of the +same functions/classes to doxygen's parser. If all source files would +include a common header file for instance, the class and type +definitions (and their documentation) would be present in each +translation unit. The preprocessor is written using \c flex and can be found in -\c src/pre.l. For condition blocks (\c \#if) evaluation of constant expressions -is needed. For this a \c yacc based parser is used, which can be found +\c src/pre.l. For condition blocks (\c \#if) evaluation of constant expressions +is needed. For this a \c yacc based parser is used, which can be found in \c src/constexp.y and \c src/constexp.l. -The preprocessor is invoked for each file using the \c preprocessFile() -function declared in \c src/pre.h, and will append the preprocessed result +The preprocessor is invoked for each file using the \c preprocessFile() +function declared in \c src/pre.h, and will append the preprocessed result to a character buffer. The format of the character buffer is \verbatim -0x06 file name 1 +0x06 file name 1 0x06 preprocessed contents of file 1 ... 0x06 file name n @@ -85,17 +85,17 @@ to a character buffer. The format of the character buffer is

Language parser

-The preprocessed input buffer is fed to the language parser, which is -implemented as a big state machine using \c flex. It can be found -in the file \c src/scanner.l. There is one parser for all -languages (C/C++/Java/IDL). The state variables \c insideIDL -and \c insideJava are uses at some places for language specific choices. +The preprocessed input buffer is fed to the language parser, which is +implemented as a big state machine using \c flex. It can be found +in the file \c src/scanner.l. There is one parser for all +languages (C/C++/Java/IDL). The state variables \c insideIDL +and \c insideJava are uses at some places for language specific choices. -The task of the parser is to convert the input buffer into a tree of entries -(basically an abstract syntax tree). An entry is defined in \c src/entry.h -and is a blob of loosely structured information. The most important field +The task of the parser is to convert the input buffer into a tree of entries +(basically an abstract syntax tree). An entry is defined in \c src/entry.h +and is a blob of loosely structured information. The most important field is \c section which specifies the kind of information contained in the entry. - + Possible improvements for future versions: - Use one scanner/parser per language instead of one big scanner. - Move the first pass parsing of documentation blocks to a separate module. @@ -104,8 +104,8 @@ Possible improvements for future versions:

Data organizer

-This step consists of many smaller steps, that build -dictionaries of the extracted classes, files, namespaces, +This step consists of many smaller steps, that build +dictionaries of the extracted classes, files, namespaces, variables, functions, packages, pages, and groups. Besides building dictionaries, during this step relations (such as inheritance relations), between the extracted entities are computed. @@ -117,15 +117,15 @@ on the tree of entries, built during language parsing. Look at the The result of this step is a number of dictionaries, which can be found in the doxygen "namespace" defined in \c src/doxygen.h. Most elements of these dictionaries are derived from the class \c Definition; -The class \c MemberDef, for instance, holds all information for a member. -An instance of such a class can be part of a file ( class \c FileDef ), -a class ( class \c ClassDef ), a namespace ( class \c NamespaceDef ), +The class \c MemberDef, for instance, holds all information for a member. +An instance of such a class can be part of a file ( class \c FileDef ), +a class ( class \c ClassDef ), a namespace ( class \c NamespaceDef ), a group ( class \c GroupDef ), or a Java package ( class \c PackageDef ).

Tag file parser

If tag files are specified in the configuration file, these are parsed -by a SAX based XML parser, which can be found in \c src/tagreader.cpp. +by a SAX based XML parser, which can be found in \c src/tagreader.cpp. The result of parsing a tag file is the insertion of \c Entry objects in the entry tree. The field \c Entry::tagInfo is used to mark the entry as external, and holds information about the tag file. @@ -136,7 +136,7 @@ Special comment blocks are stored as strings in the entities that they document. There is a string for the brief description and a string for the detailed description. The documentation parser reads these strings and executes the commands it finds in it (this is the second pass -in parsing the documentation). It writes the result directly to the output +in parsing the documentation). It writes the result directly to the output generators. The parser is written in C++ and can be found in \c src/docparser.cpp. The @@ -144,7 +144,7 @@ tokens that are eaten by the parser come from \c src/doctokenizer.l. Code fragments found in the comment blocks are passed on to the source parser. The main entry point for the documentation parser is \c validatingParseDoc() -declared in \c src/docparser.h. For simple texts with special +declared in \c src/docparser.h. For simple texts with special commands \c validatingParseText() is used.

Source parser

@@ -156,13 +156,13 @@ The code parser tries to cross-reference to source code it parses with documented entities. It also does syntax highlighting of the sources. The output is directly written to the output generators. -The main entry point for the code parser is \c parseCode() +The main entry point for the code parser is \c parseCode() declared in \c src/code.h.

Output generators

-After data is gathered and cross-referenced, doxygen generates -output in various formats. For this it uses the methods provided by +After data is gathered and cross-referenced, doxygen generates +output in various formats. For this it uses the methods provided by the abstract class \c OutputGenerator. In order to generate output for multiple formats at once, the methods of \c OutputList are called instead. This class maintains a list of concrete output generators, @@ -171,15 +171,15 @@ where each method called is delegated to all generators in the list. To allow small deviations in what is written to the output for each concrete output generator, it is possible to temporarily disable certain generators. The OutputList class contains various \c disable() and \c enable() -methods for this. The methods \c OutputList::pushGeneratorState() and +methods for this. The methods \c OutputList::pushGeneratorState() and \c OutputList::popGeneratorState() are used to temporarily save the -set of enabled/disabled output generators on a stack. +set of enabled/disabled output generators on a stack. The XML is generated directly from the gathered data structures. In the future XML will be used as an intermediate language (IL). The output generators will then use this IL as a starting point to generate the specific output formats. The advantage of having an IL is that various -independently developed tools written in various languages, +independently developed tools written in various languages, could extract information from the XML output. Possible tools could be: - an interactive source browser - a class diagram generator @@ -188,18 +188,18 @@ could extract information from the XML output. Possible tools could be:

Debugging

Since doxygen uses a lot of \c flex code it is important to understand -how \c flex works (for this one should read the \c man page) -and to understand what it is doing when \c flex is parsing some input. +how \c flex works (for this one should read the \c man page) +and to understand what it is doing when \c flex is parsing some input. Fortunately, when \c flex is used with the `-d` option it outputs what rules -matched. This makes it quite easy to follow what is going on for a -particular input fragment. +matched. This makes it quite easy to follow what is going on for a +particular input fragment. To make it easier to toggle debug information for a given \c flex file I wrote the following \c perl script, which automatically adds or removes `-d` from the correct line in the \c Makefile: \verbatim -#!/usr/bin/perl +#!/usr/bin/perl $file = shift @ARGV; print "Toggle debugging mode for $file\n"; @@ -232,7 +232,7 @@ if (open(F,"Testing @@ -258,7 +258,7 @@ Studio projects), e.g. `setenv TEST_FLAGS "--id 5 --id 7"` and `make tests`.

Doxyfile differences

-In case one has to communicate through e.g. a forum the configuration settings that +In case one has to communicate through e.g. a forum the configuration settings that are different from the standard doxygen configuration file settings one can run the doxygen command: with the `-x` option and the name of the configuration file (default is `Doxyfile`). The output will be a list of the not default settings (in `Doxyfile` diff --git a/doc/archoverview.gif b/doc/archoverview.gif deleted file mode 100644 index f404076..0000000 Binary files a/doc/archoverview.gif and /dev/null differ diff --git a/doc/archoverview.svg b/doc/archoverview.svg new file mode 100644 index 0000000..11a4340 --- /dev/null +++ b/doc/archoverview.svg @@ -0,0 +1,625 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/doc/install.doc b/doc/install.doc index 9820f3c..97a0d7a 100644 --- a/doc/install.doc +++ b/doc/install.doc @@ -29,16 +29,15 @@ If you downloaded the source distribution, you need at least the following to build the executable:
  • The GNU tools - \c flex, \c bison, \c libiconv and GNU make, and \c strip + \c flex, \c bison, \c libiconv and GNU make \addindex flex \addindex bison \addindex libiconv \addindex make - \addindex strip \addindex python -
  • You need \c python (version 2.6 or higher, see https://www.python.org). +
  • You need \c python (version 2.7 or higher, see https://www.python.org).
  • In order to generate a \c Makefile for your platform, you need - cmake version 3.1.3 or later. + cmake version 3.3 or later. \addindex cmake
@@ -55,7 +54,7 @@ tools should be installed. TeX Live This is needed for generating \LaTeX, Postscript, and PDF output.
  • - the Graph visualization toolkit version 1.8.10 or higher + the Graph visualization toolkit version 2.38 or higher Needed for the include dependency graphs, the graphical inheritance graphs, and the collaboration graphs. If you compile graphviz yourself, make sure you do include @@ -165,7 +164,7 @@ From version 1.8.10 onwards, build files need to be generated by cmake. cmake can be downloaded from https://cmake.org/download/ \addindex cmake -At the moment only the express version of Visual Studio 2013 is tested, +At the moment only the express version of Visual Studio 2015 and 2017 are tested, but other version might also work. Alternatively, you can compile doxygen @@ -199,7 +198,16 @@ cd into the \c doxygen-x.y.z directory, create and cd to a build directory \verbatim mkdir build cd build -cmake -G "Visual Studio 12 2013" .. +cmake -G "Visual Studio 14 2015" .. +\endverbatim +This will create a project file then can be opened in Visual Studio. + +If you prefer compiling from the command prompt you can use the following instead: +\verbatim +mkdir build +cd build +cmake -G "NMake Makefiles" .. +nmake \endverbatim Note that compiling Doxywizard requires Qt 4.3 or newer @@ -214,7 +222,7 @@ Doxygen comes as a self-installing archive, so installation is extremely simple. Just follow the dialogs. After installation it is recommended to also download and install GraphViz -(version 2.20 or better is highly recommended). Doxygen can use the \c dot tool +(version 2.38 or better is highly recommended). Doxygen can use the \c dot tool of the GraphViz package to render nicer diagrams, see the \ref cfg_have_dot "HAVE_DOT" option in the configuration file. -- cgit v0.12 From 95f9c89d6aa0008321c2ee8a0f3b1a4602789395 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 7 Jun 2020 21:11:50 +0200 Subject: Revert pull request #7703: make declArgumentList be from declaration, and argumentList from definition --- src/doxygen.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 344ec7b..f20756e 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -3443,7 +3443,7 @@ static void buildFunctionList(const Entry *root) { // merge argument lists ArgumentList mergedArgList = root->argList; - mergeArguments(mdAl,mergedArgList,!root->proto); + mergeArguments(mdAl,mergedArgList,!root->doc.isEmpty()); // merge documentation if (md->documentation().isEmpty() && !root->doc.isEmpty()) { @@ -4952,7 +4952,7 @@ static void addMemberDocs(const Entry *root, { ArgumentList mergedAl = *al; //printf("merging arguments (1) docs=%d\n",root->doc.isEmpty()); - mergeArguments(mdAl,mergedAl,!root->proto); + mergeArguments(mdAl,mergedAl,!root->doc.isEmpty()); } else { @@ -4965,7 +4965,7 @@ static void addMemberDocs(const Entry *root, { //printf("merging arguments (2)\n"); ArgumentList mergedArgList = root->argList; - mergeArguments(mdAl,mergedArgList,!root->proto); + mergeArguments(mdAl,mergedArgList,!root->doc.isEmpty()); } } if (over_load) // the \overload keyword was used -- cgit v0.12 From 2f19e7322f6c082b09252c285753056f359a1eb6 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 8 Jun 2020 18:26:52 +0200 Subject: LaTeX test were hanging for a.o. Hungarian on Windows On Windows a number of tests were hanging when using a language like Hungarian, Russian. The handling of the output of the output is now done differently for Windows and other OS A small (but obvious) error has been corrected (failed_html -> failed_latex), has no effect on the output / results though. --- testing/runtests.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/testing/runtests.py b/testing/runtests.py index 10fe502..7896cdd 100755 --- a/testing/runtests.py +++ b/testing/runtests.py @@ -366,10 +366,13 @@ class Tester: if (self.args.pdf): failed_latex=False latex_output='%s/latex' % self.test_out + # with languages like Hungarian we had problems with some tests on windows when stderr was used. if (sys.platform == 'win32'): + outType=False redirl='>nul: 2>temp' mk='make.bat' else: + outType=True redirl='>/dev/null 2>temp' mk='make' cur_directory = os.getcwd() @@ -377,18 +380,22 @@ class Tester: exe_string = mk exe_string1 = exe_string exe_string += ' %s' % (redirl) - exe_string += ' %s more temp' % (separ) - latex_out = xpopen(exe_string,exe_string1,getStderr=True) + if outType: + exe_string += ' %s more temp' % (separ) + latex_out = xpopen(exe_string,exe_string1,getStderr=outType) os.chdir(cur_directory); - if latex_out.find("Error")!=-1: + if (outType and latex_out.find("Error")!=-1): msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",) - failed_html=True + failed_latex=True + elif (not outType and xopen(latex_output + "/temp",'r').read().find("Error")!= -1): + msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",) + failed_latex=True elif xopen(latex_output + "/refman.log",'r').read().find("Error")!= -1: msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",) - failed_html=True + failed_latex=True elif xopen(latex_output + "/refman.log",'r').read().find("Emergency stop")!= -1: msg += ("PDF generation failed\n For a description of the problem see 'refman.log' in the latex directory of this test",) - failed_html=True + failed_latex=True elif not self.args.keep: shutil.rmtree(latex_output,ignore_errors=True) -- cgit v0.12 From 1fa64cc88d0400eccb85fe4a687a269870fc3017 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 7 Jun 2020 11:36:24 +0200 Subject: Refactor: make QCString a wrapper around std::string --- qtools/qcstring.cpp | 273 +---------------- qtools/qcstring.h | 806 ++++++++++++++++----------------------------------- src/definition.cpp | 2 +- src/definition.h | 2 +- src/definitionimpl.h | 4 +- src/dot.cpp | 3 +- src/dotrunner.cpp | 3 +- src/filedef.cpp | 5 +- src/filedef.h | 24 +- src/ftextstream.h | 3 +- 10 files changed, 279 insertions(+), 846 deletions(-) diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp index 8d442d7..8169979 100644 --- a/qtools/qcstring.cpp +++ b/qtools/qcstring.cpp @@ -218,135 +218,6 @@ int QCString::contains( const QRegExp &rx ) const return count; } -bool QCString::startsWith( const char *s ) const -{ - const char *p = data(); - if (p==0 || s==0) return s==0; - while (*p!=0 && *p==*s) p++,s++; - return *s==0; -} - -bool QCString::stripPrefix(const char *prefix) -{ - if (prefix==0 || length()==0) return FALSE; - int len = qstrlen(prefix); - if (qstrncmp(prefix,data(),len)==0) - { - m_rep=mid(len,length()-len).m_rep; // need to make a deep copy - return TRUE; - } - return FALSE; -} - -QCString QCString::left( uint len ) const -{ - if (isEmpty()) - { - return QCString(); - } - else if (len>=length()) - { - return QCString(data()); - } - else - { - QCString s( len+1 ); - memcpy( s.rawData(), data(), len); - return s; - } -} - -QCString QCString::right( uint len ) const -{ - if (isEmpty()) - { - return QCString(); - } - else - { - int l = length(); - if ((int)len>l) len=l; - const char *pos = data() + (l-len); - return QCString(pos); - } -} - -QCString QCString::mid( uint index, uint len) const -{ - uint slen = (uint)length(); - if (len==0xffffffff) len = slen-index; - if (isEmpty() || index>=slen || len==0) - { - return QCString(); - } - else - { - const char *p = data()+index; - QCString s(len+1); - qstrncpy( s.rawData(), p, len+1 ); - return s; - } -} - -QCString QCString::lower() const -{ - if (length()==0) return QCString(); - QCString s(data()); - char *pos = s.rawData(); - if (pos) - { - while (*pos) - { - *pos = tolower((unsigned char)*pos); - pos++; - } - } - return s; -} - -QCString QCString::upper() const -{ - if (length()==0) return QCString(); - QCString s(data()); - char *pos = s.rawData(); - if (pos) - { - while (*pos) - { - *pos = toupper((unsigned char)*pos); - pos++; - } - } - return s; -} - -QCString QCString::stripWhiteSpace() const -{ - if ( isEmpty() ) // nothing to do - return *this; - - const char *cs = data(); - int reslen = length(); - if ( !isspace((uchar)cs[0]) && !isspace((uchar)cs[reslen-1]) ) - return *this; // returns a copy - - QCString result(cs); - char *s = result.rawData(); - int start = 0; - int end = reslen - 1; - while ( isspace((uchar) s[start]) ) // skip white space from start - start++; - if ( s[start] == '\0' ) - { // only white space - return QCString(); - } - while ( end && isspace((uchar) s[end]) ) // skip white space from end - end--; - end -= start - 1; - qmemmove( s, &s[start], end ); - result.resize( end + 1 ); - return result; -} QCString QCString::simplifyWhiteSpace() const { @@ -375,67 +246,6 @@ QCString QCString::simplifyWhiteSpace() const return result; } -QCString &QCString::assign( const char *str ) -{ - return operator=(str); -} - -QCString &QCString::insert( uint index, const char *s ) -{ - int len = s ? qstrlen(s) : 0; - if ( len == 0 ) return *this; - int olen = length(); - int nlen = olen + len; - if ((int)index>=olen) - { - resize(nlen+index-olen+1); - memset(rawData()+olen, ' ', index-olen); - memcpy(rawData()+index,s, len+1); - } - else - { - resize(nlen+1); - qmemmove(rawData()+index+len,data()+index,olen-index+1); - memcpy(rawData()+index,s,len); - } - return *this; -} - -QCString &QCString::insert( uint index, char c) -{ - char buf[2]; - buf[0] = c; - buf[1] = '\0'; - return insert( index, buf ); -} -QCString &QCString::append( const char *s ) -{ - return operator+=(s); -} -QCString &QCString::prepend( const char *s ) -{ - return insert(0,s); -} -QCString &QCString::remove( uint index, uint len ) -{ - uint olen = length(); - if ( index + len >= olen ) // range problems - { - if ( index < olen ) // index ok - { - resize( index+1 ); - } - } - else if ( len != 0 ) - { - QCString tmp(olen-index-len+1); - qmemmove( tmp.rawData(), data()+index+len, olen-index-len+1 ); - resize( olen-len+1 ); - memcpy( rawData()+index,tmp.data(),tmp.length() ); - } - return *this; -} - QCString &QCString::replace( uint index, uint len, const char *s) { remove( index, len ); @@ -645,65 +455,6 @@ bye: return is_ok ? val : 0; } -QCString &QCString::setNum(short n) -{ - return setNum((long)n); -} - -QCString &QCString::setNum(ushort n) -{ - return setNum((ulong)n); -} - -QCString &QCString::setNum(int n) -{ - return setNum((long)n); -} - -QCString &QCString::setNum(uint n) -{ - return setNum((ulong)n); -} - -QCString &QCString::setNum(long n) -{ - char buf[20]; - char *p = &buf[19]; - bool neg; - if ( n < 0 ) - { - neg = TRUE; - n = -n; - } - else - { - neg = FALSE; - } - *p = '\0'; - do - { - *--p = ((int)(n%10)) + '0'; - n /= 10; - } while ( n ); - if ( neg ) *--p = '-'; - operator=( p ); - return *this; -} - -QCString &QCString::setNum( ulong n) -{ - char buf[20]; - char *p = &buf[19]; - *p = '\0'; - do - { - *--p = ((int)(n%10)) + '0'; - n /= 10; - } while ( n ); - operator=( p ); - return *this; -} - //------------------------------------------------- void *qmemmove( void *dst, const void *src, uint len ) @@ -828,16 +579,12 @@ QDataStream &operator>>( QDataStream &s, QCString &str ) inline QCString operator+( const QCString &s1, const QGString &s2 ) { - QCString tmp(s1); - tmp += s2.data(); - return tmp; + return s1.str()+s2.data(); } inline QCString operator+( const QGString &s1, const QCString &s2 ) { - QCString tmp(s1.data()); - tmp += s2; - return tmp; + return s1.data()+s2.str(); } /// substitute all occurrences of \a src in \a s by \a dst @@ -934,19 +681,3 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst,in return result; } -/// substitute all occurrences of \a srcChar in \a s by \a dstChar -QCString substitute(const QCString &s,char srcChar,char dstChar) -{ - int l=s.length(); - QCString result(l+1); - char *q=result.rawData(); - if (l>0) - { - const char *p=s.data(); - char c; - while ((c=*p++)) *q++ = (c==srcChar) ? dstChar : c; - } - *q='\0'; - return result; -} - diff --git a/qtools/qcstring.h b/qtools/qcstring.h index b126194..9c10bec 100644 --- a/qtools/qcstring.h +++ b/qtools/qcstring.h @@ -22,52 +22,21 @@ #endif // QT_H #include +#include -#include -#include -#include - -#if !defined(_OS_WIN32_) || defined(__MINGW32__) -#include -#endif - -#if defined(_OS_SUN_) && defined(_CC_GNU_) -#include -#endif - -#include +#include +#include +#include +#include +#include class QGString; /***************************************************************************** - Fixes and workarounds for some platforms - *****************************************************************************/ - -#if defined(_OS_HPUX_) -// HP-UX has badly defined strstr() etc. -// ### fix in 3.0: change hack_* to qt_hack_* -// by the way HP-UX is probably right, the standard has evolved and -// we'll have to adapt to it -inline char *hack_strstr( const char *s1, const char *s2 ) -{ return (char *)strstr(s1, s2); } -inline char *hack_strchr( const char *s, int c ) -{ return (char *)strchr(s, c); } -inline char *hack_strrchr( const char *s, int c ) -{ return (char *)strrchr(s, c); } -#define strstr(s1,s2) hack_strstr((s1),(s2)) -#define strchr(s,c) hack_strchr((s),(c)) -#define strrchr(s,c) hack_strrchr((s),(c)) -#endif - -/***************************************************************************** Safe and portable C string functions; extensions to standard string.h *****************************************************************************/ -Q_EXPORT void *qmemmove( void *dst, const void *src, uint len ); - -#if defined(_OS_SUN_) || defined(_CC_OC_) -#define memmove(s1,s2,n) qmemmove((s1),(s2),(n)) -#endif +void *qmemmove( void *dst, const void *src, uint len ); #if defined(_OS_WIN32_) #define qsnprintf _snprintf @@ -75,45 +44,45 @@ Q_EXPORT void *qmemmove( void *dst, const void *src, uint len ); #define qsnprintf snprintf #endif -Q_EXPORT char *qstrdup( const char * ); +char *qstrdup( const char * ); -Q_EXPORT inline uint cstrlen( const char *str ) +inline uint cstrlen( const char *str ) { return (uint)strlen(str); } -Q_EXPORT inline uint qstrlen( const char *str ) +inline uint qstrlen( const char *str ) { return str ? (uint)strlen(str) : 0; } -Q_EXPORT inline char *cstrcpy( char *dst, const char *src ) +inline char *cstrcpy( char *dst, const char *src ) { return strcpy(dst,src); } -Q_EXPORT inline char *qstrcpy( char *dst, const char *src ) +inline char *qstrcpy( char *dst, const char *src ) { return src ? strcpy(dst, src) : 0; } -Q_EXPORT char * qstrncpy(char *src,const char *dst, uint len); +char * qstrncpy(char *src,const char *dst, uint len); -Q_EXPORT inline int cstrcmp( const char *str1, const char *str2 ) +inline int cstrcmp( const char *str1, const char *str2 ) { return strcmp(str1,str2); } -Q_EXPORT inline int qstrcmp( const char *str1, const char *str2 ) +inline int qstrcmp( const char *str1, const char *str2 ) { return (str1 && str2) ? strcmp(str1,str2) : (int)((intptr_t)str2 - (intptr_t)str1); } -Q_EXPORT inline int cstrncmp( const char *str1, const char *str2, uint len ) +inline int cstrncmp( const char *str1, const char *str2, uint len ) { return strncmp(str1,str2,len); } -Q_EXPORT inline int qstrncmp( const char *str1, const char *str2, uint len ) +inline int qstrncmp( const char *str1, const char *str2, uint len ) { return (str1 && str2) ? strncmp(str1,str2,len) : (int)((intptr_t)str2 - (intptr_t)str1); } -Q_EXPORT int qstricmp( const char *str1, const char *str2 ); +int qstricmp( const char *str1, const char *str2 ); -Q_EXPORT int qstrnicmp( const char *str1, const char *str2, uint len ); +int qstrnicmp( const char *str1, const char *str2, uint len ); /***************************************************************************** QByteArray class *****************************************************************************/ #if defined(Q_TEMPLATEDLL) -template class Q_EXPORT QArray; +template class QArray; #endif typedef QArray QByteArray; @@ -121,120 +90,75 @@ typedef QArray QByteArray; QByteArray stream functions *****************************************************************************/ #ifndef QT_NO_DATASTREAM -Q_EXPORT QDataStream &operator<<( QDataStream &, const QByteArray & ); -Q_EXPORT QDataStream &operator>>( QDataStream &, QByteArray & ); +QDataStream &operator<<( QDataStream &, const QByteArray & ); +QDataStream &operator>>( QDataStream &, QByteArray & ); #endif class QRegExp; /** This is an alternative implementation of QCString. It provides basically - * the same functions but uses reference counting and copy on write. + * the same functions but uses std::string as the underlying string type */ class QCString { -public: - /** creates an empty string */ - QCString() : m_rep() - { - } - - /** destroys the string */ - ~QCString() - { - } + public: + QCString() = default; + ~QCString() = default; + QCString( const QCString &s ) = default; + QCString &operator=( const QCString &s ) = default; + QCString( QCString &&s ) = default; + QCString &operator=( QCString &&s ) = default; - /** makes a copy of a string. */ - QCString( const QCString &s ) : m_rep(s.m_rep) - { - } + QCString( const std::string &s ) : m_rep(s) {} /** creates a string with room for size characters - * @param[in] size the number of character to allocate (including the 0-terminator) + * @param[in] size the number of character to allocate (also counting the 0-terminator!) */ - explicit QCString( uint size ) : m_rep(size) - { - } + explicit QCString( uint size ) { m_rep.resize(size>0 ? size-1 : 0); } /** creates a string from a plain C string. * @param[in] str A zero terminated C string. When 0 an empty string is created. */ - QCString( const char *str ) : m_rep(str) - { - } + QCString( const char *str ) : m_rep(str?str:"") {} /** creates a string from \a str and copies over the first \a maxlen characters. */ - QCString( const char *str, uint maxlen ) : m_rep(str,maxlen) - { - } + QCString( const char *str, uint maxlen ) : m_rep(str?str:"") { m_rep.resize(maxlen); } /** replaces the contents by that of string \a s. */ - QCString &operator=( const QCString &s ) - { - m_rep = s.m_rep; - return *this; - } /** replaces the contents by that of C string \a str. */ - QCString &operator=( const char *str) - { - m_rep = str; - return *this; - } + QCString &operator=( const char *str) { m_rep = str?str:""; return *this; } /** Returns TRUE iff the string is empty. Equivalent to isEmpty(). */ - bool isNull() const - { - return m_rep.isEmpty(); - } + bool isNull() const { return m_rep.empty(); } /** Returns TRUE iff the string is empty */ - bool isEmpty() const - { - return m_rep.isEmpty(); - } + bool isEmpty() const { return m_rep.empty(); } - /** Returns the length of the string, excluding the 0-terminator. Equivalent to size(). */ - uint length() const - { - return m_rep.length(); - } + /** Returns the length of the string, not counting the 0-terminator. Equivalent to size(). */ + uint length() const { return (uint)m_rep.size(); } - /** Returns the length of the string, excluding the 0-terminator. */ - uint size() const - { - return m_rep.length(); - } + /** Returns the length of the string, not counting the 0-terminator. */ + uint size() const { return (uint)m_rep.size(); } /** Returns a pointer to the contents of the string in the form of a 0-terminated C string */ - const char *data() const - { - return m_rep.data(); - } + const char *data() const { return m_rep.empty() ? 0 : m_rep.c_str(); } /** Returns a writable pointer to the data. * @warning if the string is shared it will modifying the string directly and * this will overwrite all copies as well! */ - char *rawData() const - { - return m_rep.rawData(); - } + char *rawData() const { return m_rep.empty() ? 0 : const_cast(&m_rep[0]); } /** Resizes the string to hold \a newlen characters - * (this value should include the 0-terminator). If the string is enlarged the contents will + * (this value should also count the 0-terminator). + * If the string is enlarged the contents will * be left unmodified. */ - bool resize( uint newlen ) - { - m_rep.resize(newlen); - return TRUE; - } + bool resize( uint newlen ) { m_rep.resize( newlen>0 ? newlen-1 : 0 ); return TRUE; } /** Truncates the string at position \a pos. */ - bool truncate( uint pos ) - { - return resize(pos+1); - } + bool truncate( uint pos ) { return resize( pos + 1 ); } /** Fills a string with a predefined character * @param[in] c the character used to fill the string with. @@ -244,523 +168,286 @@ public: */ bool fill( char c, int len = -1 ) { - m_rep.fill(c,len); + int l = len==-1 ? m_rep.size() : len; + m_rep = std::string(l,c); return TRUE; } /** Returns a deep copy of the string. */ - QCString copy() const - { - if (length()==0) return QCString(); - QCString cs(length()+1); - memcpy(cs.rawData(),data(),length()); - return cs; - } + QCString copy() const { return *this; } QCString &sprintf( const char *format, ... ); + int find( char c, int index=0, bool cs=TRUE ) const; int find( const char *str, int index=0, bool cs=TRUE ) const; int find( const QCString &str, int index=0, bool cs=TRUE ) const; int find( const QRegExp &rx, int index=0 ) const; + int findRev( char c, int index=-1, bool cs=TRUE) const; int findRev( const char *str, int index=-1, bool cs=TRUE) const; int findRev( const QRegExp &rx, int index=-1 ) const; + int contains( char c, bool cs=TRUE ) const; int contains( const char *str, bool cs=TRUE ) const; int contains( const QRegExp &rx ) const; - bool stripPrefix(const char *prefix); - QCString left( uint len ) const; - QCString right( uint len ) const; - QCString mid( uint index, uint len=(uint)-1) const; - QCString lower() const; - QCString upper() const; - QCString stripWhiteSpace() const; + + bool stripPrefix(const char *prefix) + { + if (prefix==0 || m_rep.empty()) return FALSE; + if (m_rep.rfind(prefix,0)==0) // string starts with prefix + { + m_rep.erase(0,qstrlen(prefix)); + return TRUE; + } + return FALSE; + } + + QCString left( uint len ) const + { + return m_rep.empty() ? QCString() : QCString(m_rep.substr(0,len)); + } + + QCString right( uint len ) const + { + return m_rep.empty() ? QCString() : + lenslen || len==0 ? QCString() : + QCString(m_rep.substr(index,len)); + } + + QCString lower() const + { + std::string s = m_rep; + std::transform(s.begin(),s.end(),s.begin(), + [](unsigned char c){ return std::tolower(c); }); + return s; + } + + QCString upper() const + { + std::string s = m_rep; + std::transform(s.begin(),s.end(),s.begin(), + [](unsigned char c){ return std::toupper(c); }); + return s; + } + + QCString stripWhiteSpace() const + { + int sl = (uint)m_rep.size(); + if (sl==0 || (!std::isspace(m_rep[0]) && !std::isspace(m_rep[sl-1]))) return *this; + int start=0,end=sl-1; + while (startstart && std::isspace(m_rep[end])) end--; + return QCString(m_rep.substr(start,1+end-start)); + } + QCString simplifyWhiteSpace() const; - QCString &assign( const char *str ); - QCString &insert( uint index, const char *s ); - QCString &insert( uint index, char c); - QCString &append( const char *s ); - QCString &prepend( const char *s ); - QCString &remove( uint index, uint len ); + + QCString &insert( uint index, const char *s ) + { + uint len = s ? qstrlen(s) : 0; + if (len>0) + { + uint ol = m_rep.size(); + if (index>ol) // insert beyond end of string and fill gap with spaces + { + m_rep.resize(index+len); + std::memset(&m_rep[ol],' ',index-ol); + std::memcpy(&m_rep[index],s,len+1); + } + else // insert inside the string + { + m_rep.insert(index,s); + } + } + return *this; + } + + QCString &insert( uint index, char c) + { + char s[2] = { c, '\0' }; + return insert(index,s); + } + + QCString &append( const char *s ) + { + return operator+=(s); + } + + QCString &prepend( const char *s ) + { + return insert(0,s); + } + + QCString &remove( uint index, uint len ) + { + uint ol = (uint)m_rep.size(); + if (index
      0) m_rep.erase(index,index+len>=ol ? std::string::npos : len); + return *this; + } + QCString &replace( uint index, uint len, const char *s); QCString &replace( const QRegExp &rx, const char *str ); - short toShort( bool *ok=0, int base=10 ) const; + + short toShort( bool *ok=0, int base=10 ) const; ushort toUShort( bool *ok=0, int base=10 ) const; - int toInt( bool *ok=0, int base=10 ) const; - uint toUInt( bool *ok=0, int base=10 ) const; - long toLong( bool *ok=0, int base=10 ) const; - ulong toULong( bool *ok=0, int base=10 ) const; + int toInt( bool *ok=0, int base=10 ) const; + uint toUInt( bool *ok=0, int base=10 ) const; + long toLong( bool *ok=0, int base=10 ) const; + ulong toULong( bool *ok=0, int base=10 ) const; uint64 toUInt64( bool *ok=0, int base=10 ) const; - QCString &setNum(short n); - QCString &setNum(ushort n); - QCString &setNum(int n); - QCString &setNum(uint n); - QCString &setNum(long n); - QCString &setNum(ulong n); - bool startsWith( const char *s ) const; - /** Converts the string to a plain C string */ - operator const char *() const + QCString &setNum(short n) { - return (const char *)data(); + m_rep = std::to_string(n); + return *this; } - /** Appends string \a str to this string and returns a reference to the result. */ - QCString &operator+=( const char *str ) + QCString &setNum(ushort n) { - if (!str) return *this; - uint len1 = length(); - uint len2 = (uint)strlen(str); - resize(len1+len2+1); - memcpy(rawData()+len1,str,len2); + m_rep = std::to_string(n); return *this; } - /** Appends character \a c to this string and returns a reference to the result. */ - QCString &operator+=( char c ) + QCString &setNum(int n) { - uint len = length(); - resize(len+2); - rawData()[len]=c; + m_rep = std::to_string(n); return *this; } - /** Returns a reference to the character at index \a i. */ - char &at( uint i) const + QCString &setNum(uint n) { - return m_rep.at(i); + m_rep = std::to_string(n); + return *this; } - /** Indexing operator. Equivalent to at(). */ - char &operator[]( int i ) const + QCString &setNum(long n) { - return m_rep.at((uint)i); + m_rep = std::to_string(n); + return *this; } - private: - - struct LSData; - - // long string representation - struct LongStringRep + QCString &setNum(ulong n) { - uchar isShort; // : 1; // should be shared with ShortStringRep - //uchar : 7; - LSData *d; - }; + m_rep = std::to_string(n); + return *this; + } -#define SHORT_STR_CAPACITY ((int)sizeof(LongStringRep)-2) -#define SHORT_STR_MAX_LEN (SHORT_STR_CAPACITY-1) + bool startsWith( const char *s ) const + { + if (m_rep.empty() || s==0) return s==0; + return m_rep.rfind(s,0)==0; // looking "backward" starting and ending at index 0 + } - // short string representation - struct ShortStringRep + /** Converts the string to a plain C string */ + operator const char *() const { - uchar isShort; // : 1; // should be shared with LongStringRep - uchar len; // : 7; - char str[SHORT_STR_CAPACITY]; // size including 0-terminator - }; + return const_cast(data()); + } - // ref counting string header - struct LSHeader + std::string str() const { - uint len; // length of string without 0 terminator - int refCount; // -1=leaked, 0=one ref & non-cost, n>0, n+1 refs, const - }; - // ref counting string data and methods - struct LSData : public LSHeader + return m_rep; + } + + /** Appends string \a str to this string and returns a reference to the result. */ + QCString &operator+=( const char *str ) { - char *toStr() - { - return (char*)(this+1); // string data starts after the header - } + if (str) m_rep+=str; + return *this; + } - // creates a LSData item with room for size bytes (which includes the 0 terminator!) - // if size is zero, an empty string will be created. - static LSData *create(uint size) - { - LSData *data; - data = (LSData*)malloc(sizeof(LSHeader)+size); - data->len = size-1; - data->refCount = 0; - data->toStr()[size-1] = 0; - return data; - } - // remove out reference to the data. Frees memory if no more users - void dispose() - { - if (--refCount<0) free(this); - } + /** Appends character \a c to this string and returns a reference to the result. */ + QCString &operator+=( char c ) + { + m_rep+=c; + return *this; + } - // 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,uint size) - { - if (d->len>0 && d->refCount==0) // non-const, non-empty - { - d = (LSData*)realloc(d,sizeof(LSHeader)+size); - d->len = size-1; - d->toStr()[size-1] = 0; - return d; - } - else // need to make a copy - { - LSData *newData = LSData::create(size); - uint len = d->len; - if (len>=size) len=size-1; - memcpy(newData->toStr(),d->toStr(),len); - newData->toStr()[len]=0; - d->dispose(); - return newData; - } - } - }; + /** Returns a reference to the character at index \a i. */ + char &at( uint i) const + { + return const_cast(m_rep[i]); + } - class StringRep + /** Indexing operator. Equivalent to at(). */ + char &operator[]( int i ) const { - public: - StringRep() - { - initEmpty(); - } - void initEmpty() - { - u.s.isShort=TRUE; - u.s.len=0; - //memset(u.s.str,0,SHORT_STR_CAPACITY); - } - ~StringRep() - { - if (!u.s.isShort) - { - u.l.d->dispose(); - } - } - StringRep(const StringRep &s) - { - if (&s!=this) - { - u.s.isShort = s.u.s.isShort; - if (s.u.s.isShort) - { - u.s.len = s.u.s.len; - memcpy(u.s.str,s.u.s.str,s.u.s.len+1); - } - else - { - u.l.d = s.u.l.d; - u.l.d->refCount++; - } - } - else // self-assignment - { - u = s.u; // avoid uninitialized warning from gcc - } - } - StringRep(uint size) - { - u.s.isShort = size<=SHORT_STR_CAPACITY; - if (size<=SHORT_STR_CAPACITY) // init short string - { - if (size>0) - { - u.s.len = (uchar)(size-1); - u.s.str[size-1]='\0'; - } - else - { - u.s.len = 0; - } - } - else // int long string - { - u.l.d = LSData::create(size); - } - } - StringRep(const char *str) - { - if (str) - { - uint len = (uint)strlen(str); - u.s.isShort = lentoStr(),str,u.l.d->len); - } - } - else // create empty string - { - initEmpty(); - } - } - StringRep( const char *str, uint maxlen ) - { - if (str && maxlen>0) - { - uint len=(uint)strlen(str); - if (len>maxlen) len=maxlen; - u.s.isShort = len<=SHORT_STR_MAX_LEN; - if (u.s.isShort) - { - u.s.len = (uchar)len; - memcpy(u.s.str,str,len); - u.s.str[len]='\0'; - } - else - { - u.l.d = LSData::create(len+1); - memcpy(u.l.d->toStr(),str,len); - } - } - else // create empty string - { - initEmpty(); - } - } - StringRep &operator=(const StringRep &s) - { - if (&s!=this) - { - if (!u.s.isShort) - { - u.l.d->dispose(); - } - u.s.isShort = s.u.s.isShort; - if (u.s.isShort) // copy by value - { - u.s.len = s.u.s.len; - memcpy(u.s.str,s.u.s.str,s.u.s.len+1); - } - else // copy by reference - { - u.l.d = s.u.l.d; - u.l.d->refCount++; - } - } - else // self-assignment - { - u = s.u; // avoid uninitialized warning from gcc - } - return *this; - } - StringRep &operator=(const char *str) - { - if (!u.s.isShort) - { - u.l.d->dispose(); - } - if (str) - { - uint len = (uint)strlen(str); - u.s.isShort = lentoStr(),str,len); - } - } - else - { - initEmpty(); - } - return *this; - } - bool isEmpty() const - { - return u.s.isShort && u.s.len==0; - } - uint length() const - { - uint l = u.s.isShort ? u.s.len : u.l.d->len; - return l; - } - const char *data() const - { - if (u.s.isShort) - { - return u.s.len==0 ? 0 : u.s.str; - } - else - { - return u.l.d->len==0 ? 0 : u.l.d->toStr(); - } - } - char *rawData() const - { - if (u.s.isShort) - { - return u.s.len==0 ? 0 : (char*)u.s.str; - } - else - { - //assert(u.l.d->refCount==0); // string may not be shared when accessed raw - return u.l.d->len==0 ? 0 : u.l.d->toStr(); - } - } - char &at(uint i) const - { - if (u.s.isShort) - { - return (char&)u.s.str[i]; - } - else - { - return u.l.d->toStr()[i]; - } - } - bool resize( uint newlen ) - { - if (u.s.isShort && newlen<=SHORT_STR_CAPACITY) // resize short string - { - if (newlen>0) - { - u.s.len = (uchar)(newlen-1); - u.s.str[newlen-1]='\0'; - } - else // string becomes empty - { - initEmpty(); - } - } - else if (u.s.isShort) // turn short string into long string - { - StringRep tmp = *this; - u.s.isShort=FALSE; - u.l.d = LSData::create(newlen); - if (tmp.u.s.len>0) - { - memcpy(u.l.d->toStr(),tmp.u.s.str,tmp.u.s.len+1); - } - else - { - u.l.d->toStr()[0]='\0'; - } - } - else if (!u.s.isShort && newlen<=SHORT_STR_CAPACITY) // turn long string into short string - { - if (newlen>0) - { - StringRep tmp(newlen); // copy short part into tmp buffer - memcpy(tmp.u.s.str,u.l.d->toStr(),newlen-1); - tmp.u.s.str[newlen-1]='\0'; - u.l.d->dispose(); - u.s = tmp.u.s; - } - else - { - u.l.d->dispose(); - initEmpty(); - } - } - else // resize long string - { - u.l.d = u.l.d->resize(u.l.d,newlen); - } - return TRUE; - } - bool fill( char c, int len ) - { - uint ulen = len<0 ? length() : (uint)len; - if (!u.s.isShort) // detach from shared string - { - resize(ulen+1); - } - else if (ulen!=length()) - { - if (ulen>0) - { - resize(ulen+1); - } - } - if (ulen>0) - { - memset(rawData(),c,ulen); - } - return TRUE; - } - private: - union ShortOrLongStringSelector - { - ShortStringRep s; - LongStringRep l; - } u; - }; - StringRep m_rep; + return const_cast(m_rep[i]); + } + private: + std::string m_rep; }; /***************************************************************************** QCString stream functions *****************************************************************************/ #ifndef QT_NO_DATASTREAM -Q_EXPORT QDataStream &operator<<( QDataStream &, const QCString & ); -Q_EXPORT QDataStream &operator>>( QDataStream &, QCString & ); +QDataStream &operator<<( QDataStream &, const QCString & ); +QDataStream &operator>>( QDataStream &, QCString & ); #endif /***************************************************************************** QCString non-member operators *****************************************************************************/ -Q_EXPORT inline bool operator==( const QCString &s1, const QCString &s2 ) +inline bool operator==( const QCString &s1, const QCString &s2 ) { return qstrcmp(s1.data(),s2.data()) == 0; } -Q_EXPORT inline bool operator==( const QCString &s1, const char *s2 ) +inline bool operator==( const QCString &s1, const char *s2 ) { return qstrcmp(s1.data(),s2) == 0; } -Q_EXPORT inline bool operator==( const char *s1, const QCString &s2 ) +inline bool operator==( const char *s1, const QCString &s2 ) { return qstrcmp(s1,s2.data()) == 0; } -Q_EXPORT inline bool operator!=( const QCString &s1, const QCString &s2 ) +inline bool operator!=( const QCString &s1, const QCString &s2 ) { return qstrcmp(s1.data(),s2.data()) != 0; } -Q_EXPORT inline bool operator!=( const QCString &s1, const char *s2 ) +inline bool operator!=( const QCString &s1, const char *s2 ) { return qstrcmp(s1.data(),s2) != 0; } -Q_EXPORT inline bool operator!=( const char *s1, const QCString &s2 ) +inline bool operator!=( const char *s1, const QCString &s2 ) { return qstrcmp(s1,s2.data()) != 0; } -Q_EXPORT inline bool operator<( const QCString &s1, const QCString& s2 ) +inline bool operator<( const QCString &s1, const QCString& s2 ) { return qstrcmp(s1.data(),s2.data()) < 0; } -Q_EXPORT inline bool operator<( const QCString &s1, const char *s2 ) +inline bool operator<( const QCString &s1, const char *s2 ) { return qstrcmp(s1.data(),s2) < 0; } -Q_EXPORT inline bool operator<( const char *s1, const QCString &s2 ) +inline bool operator<( const char *s1, const QCString &s2 ) { return qstrcmp(s1,s2.data()) < 0; } -Q_EXPORT inline bool operator<=( const QCString &s1, const char *s2 ) +inline bool operator<=( const QCString &s1, const char *s2 ) { return qstrcmp(s1.data(),s2) <= 0; } -Q_EXPORT inline bool operator<=( const char *s1, const QCString &s2 ) +inline bool operator<=( const char *s1, const QCString &s2 ) { return qstrcmp(s1,s2.data()) <= 0; } -Q_EXPORT inline bool operator>( const QCString &s1, const char *s2 ) +inline bool operator>( const QCString &s1, const char *s2 ) { return qstrcmp(s1.data(),s2) > 0; } -Q_EXPORT inline bool operator>( const char *s1, const QCString &s2 ) +inline bool operator>( const char *s1, const QCString &s2 ) { return qstrcmp(s1,s2.data()) > 0; } -Q_EXPORT inline bool operator>=( const QCString &s1, const char *s2 ) +inline bool operator>=( const QCString &s1, const char *s2 ) { return qstrcmp(s1.data(),s2) >= 0; } -Q_EXPORT inline bool operator>=( const char *s1, const QCString &s2 ) +inline bool operator>=( const char *s1, const QCString &s2 ) { return qstrcmp(s1,s2.data()) >= 0; } -Q_EXPORT inline QCString operator+( const QCString &s1, const QCString &s2 ) +inline QCString operator+( const QCString &s1, const QCString &s2 ) { - QCString tmp(s1); - tmp += s2; - return tmp; + return QCString(s1.str()+s2.str()); } @@ -768,28 +455,28 @@ inline QCString operator+( const QCString &s1, const QGString &s2 ); inline QCString operator+( const QGString &s1, const QCString &s2 ); -Q_EXPORT inline QCString operator+( const QCString &s1, const char *s2 ) +inline QCString operator+( const QCString &s1, const char *s2 ) { QCString tmp(s1); tmp += s2; return tmp; } -Q_EXPORT inline QCString operator+( const char *s1, const QCString &s2 ) +inline QCString operator+( const char *s1, const QCString &s2 ) { QCString tmp(s1); tmp += s2; return tmp; } -Q_EXPORT inline QCString operator+( const QCString &s1, char c2 ) +inline QCString operator+( const QCString &s1, char c2 ) { QCString tmp( s1.data() ); tmp += c2; return tmp; } -Q_EXPORT inline QCString operator+( char c1, const QCString &s2 ) +inline QCString operator+( char c1, const QCString &s2 ) { QCString tmp; tmp += c1; @@ -807,14 +494,25 @@ inline const char *qPrint(const QCString &s) if (!s.isEmpty()) return s.data(); else return ""; } +inline const char *qPrint(const std::string &s) +{ + return s.c_str(); +} + inline std::string toStdString(const QCString &s) { - if (!s.isEmpty()) return std::string(s.data()); else return std::string(); + return s.str(); } // helper functions -QCString substitute(const QCString &s,const QCString &src,const QCString &dst); +QCString substitute(const QCString &str,const QCString &find,const QCString &replace); QCString substitute(const QCString &s,const QCString &src,const QCString &dst,int skip_seq); -QCString substitute(const QCString &s,char srcChar,char dstChar); + +inline QCString substitute(const QCString &s,char srcChar,char dstChar) +{ + std::string ss = s.str(); + ss.replace(ss.begin(),ss.end(),srcChar,dstChar); + return ss; +} #endif // QCSTRING_H diff --git a/src/definition.cpp b/src/definition.cpp index c398b61..3ed331c 100644 --- a/src/definition.cpp +++ b/src/definition.cpp @@ -2177,7 +2177,7 @@ QCString DefinitionImpl::externalReference(const QCString &relPath) const return relPath; } -QCString DefinitionImpl::name() const +const QCString &DefinitionImpl::name() const { return m_impl->name; } diff --git a/src/definition.h b/src/definition.h index 2d167dc..8ad15b2 100644 --- a/src/definition.h +++ b/src/definition.h @@ -111,7 +111,7 @@ class Definition : public DefinitionIntf virtual bool isAlias() const = 0; /*! Returns the name of the definition */ - virtual QCString name() const = 0; + virtual const QCString &name() const = 0; /*! Returns TRUE iff this definition has an artificially generated name * (typically starting with a @) that is used for nameless definitions diff --git a/src/definitionimpl.h b/src/definitionimpl.h index c35a89e..e91d989 100644 --- a/src/definitionimpl.h +++ b/src/definitionimpl.h @@ -31,7 +31,7 @@ class DefinitionImpl : virtual public Definition virtual ~DefinitionImpl(); virtual bool isAlias() const { return FALSE; } - virtual QCString name() const; + virtual const QCString &name() const; virtual bool isAnonymous() const; virtual QCString localName() const; virtual QCString qualifiedName() const; @@ -142,7 +142,7 @@ class DefinitionAliasImpl : virtual public Definition virtual ~DefinitionAliasImpl(); virtual bool isAlias() const { return TRUE; } - virtual QCString name() const + virtual const QCString &name() const { return m_def->name(); } virtual bool isAnonymous() const { return m_def->isAnonymous(); } diff --git a/src/dot.cpp b/src/dot.cpp index 675ead6..ddabbc7 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -13,7 +13,8 @@ * */ -#include +#include +#include #include diff --git a/src/dotrunner.cpp b/src/dotrunner.cpp index 8cf09fa..a1bbc52 100644 --- a/src/dotrunner.cpp +++ b/src/dotrunner.cpp @@ -13,6 +13,8 @@ * */ +#include + #include "dotrunner.h" #include "qstring.h" @@ -151,7 +153,6 @@ DotRunner::DotRunner(const std::string& absDotName, const std::string& md5Hash) , m_md5Hash(md5Hash.data()) , m_dotExe(Config_getString(DOT_PATH)+"dot") , m_cleanUp(Config_getBool(DOT_CLEANUP)) - , m_jobs() { } diff --git a/src/filedef.cpp b/src/filedef.cpp index 7e8afdc..919ce2b 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -55,7 +55,8 @@ class FileDefImpl : public DefinitionImpl, public FileDef virtual ~FileDefImpl(); virtual DefType definitionType() const { return TypeFile; } - virtual QCString name() const; + virtual const QCString &name() const; + virtual QCString displayName(bool=TRUE) const { return name(); } virtual QCString fileName() const { return m_fileName; } virtual QCString getOutputFileBase() const; @@ -1464,7 +1465,7 @@ void FileDefImpl::insertNamespace(NamespaceDef *nd) } } -QCString FileDefImpl::name() const +const QCString &FileDefImpl::name() const { if (Config_getBool(FULL_PATH_NAMES)) return m_fileName; diff --git a/src/filedef.h b/src/filedef.h index 2ca33db..2510d85 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -1,12 +1,12 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2015 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 + * 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. * @@ -53,11 +53,11 @@ struct IncludeInfo bool indirect; }; -/** A model of a file symbol. - * +/** A model of a file symbol. + * * An object of this class contains all file information that is gathered. * This includes the members and compounds defined in the file. - * + * * The member writeDocumentation() can be used to generate the page of * documentation to HTML and LaTeX. */ @@ -71,7 +71,7 @@ class FileDef : virtual public Definition virtual DefType definitionType() const = 0; /*! Returns the unique file name (this may include part of the path). */ - virtual QCString name() const = 0; + virtual const QCString &name() const = 0; virtual QCString displayName(bool=TRUE) const = 0; virtual QCString fileName() const = 0; @@ -228,11 +228,11 @@ class DirEntry { public: enum EntryKind { Dir, File }; - DirEntry(DirEntry *parent,FileDef *fd) - : m_parent(parent), m_name(fd->name()), m_kind(File), m_fd(fd), + DirEntry(DirEntry *parent,FileDef *fd) + : m_parent(parent), m_name(fd->name()), m_kind(File), m_fd(fd), m_isLast(FALSE) { } - DirEntry(DirEntry *parent,QCString name) - : m_parent(parent), m_name(name), m_kind(Dir), + DirEntry(DirEntry *parent,QCString name) + : m_parent(parent), m_name(name), m_kind(Dir), m_fd(0), m_isLast(FALSE) { } virtual ~DirEntry() { } EntryKind kind() const { return m_kind; } @@ -257,7 +257,7 @@ class DirEntry class Directory : public DirEntry { public: - Directory(Directory *parent,const QCString &name) + Directory(Directory *parent,const QCString &name) : DirEntry(parent,name) { m_children.setAutoDelete(TRUE); } virtual ~Directory() {} diff --git a/src/ftextstream.h b/src/ftextstream.h index bfc5bd5..5b6a9ca 100644 --- a/src/ftextstream.h +++ b/src/ftextstream.h @@ -60,7 +60,8 @@ inline FTextStream &FTextStream::operator<<( const char* s) inline FTextStream &FTextStream::operator<<( const QCString &s) { - return operator<<(s.data()); + if (m_dev) m_dev->writeBlock( s, s.length() ); + return *this; } typedef FTextStream & (*FTSFUNC)(FTextStream &);// manipulator function -- cgit v0.12 From b4323811d0d68bc8de00d9487469c4ec60601dd6 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Wed, 10 Jun 2020 21:15:45 +0200 Subject: Fix win64 compiler warnings --- qtools/qcstring.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qtools/qcstring.h b/qtools/qcstring.h index 9c10bec..a998fef 100644 --- a/qtools/qcstring.h +++ b/qtools/qcstring.h @@ -168,7 +168,7 @@ class QCString */ bool fill( char c, int len = -1 ) { - int l = len==-1 ? m_rep.size() : len; + int l = len==-1 ? (int)m_rep.size() : len; m_rep = std::string(l,c); return TRUE; } @@ -226,7 +226,7 @@ class QCString { std::string s = m_rep; std::transform(s.begin(),s.end(),s.begin(), - [](unsigned char c){ return std::tolower(c); }); + [](unsigned char c){ return (unsigned char)std::tolower(c); }); return s; } @@ -234,7 +234,7 @@ class QCString { std::string s = m_rep; std::transform(s.begin(),s.end(),s.begin(), - [](unsigned char c){ return std::toupper(c); }); + [](unsigned char c){ return (unsigned char)std::toupper(c); }); return s; } @@ -256,7 +256,7 @@ class QCString uint len = s ? qstrlen(s) : 0; if (len>0) { - uint ol = m_rep.size(); + uint ol = (uint)m_rep.size(); if (index>ol) // insert beyond end of string and fill gap with spaces { m_rep.resize(index+len); -- cgit v0.12 From cb5a9c3f31b0233a5dc72d13f9f4cfa7db5fe00c Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 10 Jun 2020 21:44:36 +0200 Subject: issue #7778 Build fails with javacc 5.0 (#7779) * issue #7778 Build fails with javacc 5.0 At the moment doxygen works with javaCC version 7.0.5 but no test is done for the version. The minimum requirement has been set to 7.0.5 javacc does not have an option to retrieve the version though when giving `--version` a bit more information is given, this information is filtered. (an issue has been submitted to javacc to obtain the version information: https://github.com/javacc/javacc/issues/172). * issue #7778 Build fails with javacc 5.0 Version detection did not work for `5.0` (only x.y.z was handled, not x.y) * issue #7778 Build fails with javacc 5.0 Based on a review - `--version` is not a valid option, but present already for future use but - removed double ` if(JAVACC_EXECUTABLE)` - Needed `"${JAVACC_TEMP_VERSION}"` as otherwise when `javacc` is found but cannot be executed a message like: ``` CMake Error at cmake/FindJavacc.cmake:11 (string): string sub-command REGEX, mode MATCH needs at least 5 arguments total to command. Call Stack (most recent call first): vhdlparser/CMakeLists.txt:1 (find_package) ``` would appear - reformulated some status strings * issue #7778 Build fails with javacc 5.0 the `.` was not correctly escaped. * issue #7778 Build fails with javacc 5.0 Another one 7.0........ match, going for the suggested match in the cmake CheckCXXCompilerFlag * issue #7778 Build fails with javacc 5.0 Accidently left debug statement. * issue #7778 Build fails with javacc 5.0 Problem has been fixed upstream for version 7.0.7 and up, not using `--version` but `-version` as all command line arguments are starting with a single '-'. Also it is just the bare version, so small extra test so it will work with all versions. --- cmake/FindJavacc.cmake | 17 ++++++++++++++++- vhdlparser/CMakeLists.txt | 6 ++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/cmake/FindJavacc.cmake b/cmake/FindJavacc.cmake index c7de776..a134020 100755 --- a/cmake/FindJavacc.cmake +++ b/cmake/FindJavacc.cmake @@ -1,9 +1,24 @@ - find_program(JAVACC_EXECUTABLE NAMES javacc javaCC Javacc JavaCC javacc.bat DOC "path to the javacc executable") mark_as_advanced(JAVACC_EXECUTABLE) if(JAVACC_EXECUTABLE) set(JAVACC_FOUND 1) message(STATUS "The javacc executable: ${JAVACC_EXECUTABLE}") + execute_process( + COMMAND "${JAVACC_EXECUTABLE}" -version + OUTPUT_VARIABLE JAVACC_TEMP_VERSION + ) + string(REGEX MATCH ".* ([0-9]+(\\.[0-9]+)+) .*" JAVACC_TEMP_VERSION2_UNUSED "${JAVACC_TEMP_VERSION}") + if(CMAKE_MATCH_1) + set(JAVACC_VERSION ${CMAKE_MATCH_1}) + else() + string(REGEX MATCH "([0-9]+(\\.[0-9]+)+)" JAVACC_TEMP_VERSION3_UNUSED "${JAVACC_TEMP_VERSION}") + if(CMAKE_MATCH_1) + set(JAVACC_VERSION ${CMAKE_MATCH_1}) + else() + message(STATUS "Unable to determine JavaCC version, using existing files") + set(JAVACC_FOUND 0) + endif() + endif() else() set(JAVACC_FOUND 0) message(STATUS "The javacc executable not found, using existing files") diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt index 3e52817..343f126 100644 --- a/vhdlparser/CMakeLists.txt +++ b/vhdlparser/CMakeLists.txt @@ -1,11 +1,17 @@ find_package(Javacc) if (JAVACC_FOUND) + if (JAVACC_VERSION VERSION_LESS 7.0.5) + message(STATUS " Doxygen requires at least JavaCC version 7.0.5 (installed: ${JAVACC_VERSION})") + message(STATUS " Fall back to JavaCC not installed, using existing files.") + else() + 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/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() endif() include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/qtools ${GENERATED_SRC}) -- cgit v0.12 From 6b807dd23a21a45ead11a9af48c45d8adf211663 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Wed, 10 Jun 2020 22:15:50 +0200 Subject: Regression: fix issue with substitute characters --- qtools/qcstring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qtools/qcstring.h b/qtools/qcstring.h index a998fef..acb9c13 100644 --- a/qtools/qcstring.h +++ b/qtools/qcstring.h @@ -511,7 +511,7 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst,in inline QCString substitute(const QCString &s,char srcChar,char dstChar) { std::string ss = s.str(); - ss.replace(ss.begin(),ss.end(),srcChar,dstChar); + std::replace(ss.begin(),ss.end(),srcChar,dstChar); return ss; } -- cgit v0.12 From fa4e3f5f955e602f02545e049361510f3334cfff Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Wed, 10 Jun 2020 22:48:21 +0200 Subject: Regression: further fixes to make the documentation build again --- qtools/qcstring.h | 2 +- src/latexdocvisitor.cpp | 165 +-- vhdlparser/VhdlParser.cc | 2 +- vhdlparser/VhdlParser.h | 2797 ++++++++++++++++++++-------------------------- 4 files changed, 1301 insertions(+), 1665 deletions(-) diff --git a/qtools/qcstring.h b/qtools/qcstring.h index acb9c13..0f3f932 100644 --- a/qtools/qcstring.h +++ b/qtools/qcstring.h @@ -350,7 +350,7 @@ class QCString /** Converts the string to a plain C string */ operator const char *() const { - return const_cast(data()); + return data(); } std::string str() const diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index b899935..19f01b0 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -1,13 +1,13 @@ /****************************************************************************** * - * + * * * * Copyright (C) 1997-2015 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 + * 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. * @@ -16,7 +16,7 @@ * */ #include "htmlattrib.h" -#include +#include #include "latexdocvisitor.h" #include "latexgen.h" #include "docparser.h" @@ -37,7 +37,7 @@ #include "plantuml.h" const int maxLevels=5; -static const char *secLabels[maxLevels] = +static const char *secLabels[maxLevels] = { "doxysection","doxysubsection","doxysubsubsection","doxyparagraph","doxysubparagraph" }; static const char *getSectionName(int level) @@ -176,8 +176,8 @@ QCString LatexDocVisitor::escapeMakeIndexChars(const char *s) LatexDocVisitor::LatexDocVisitor(FTextStream &t,CodeOutputInterface &ci, - const char *langExt,bool insideTabbing) - : DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE), + const char *langExt,bool insideTabbing) + : DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE), m_insideItem(FALSE), m_hide(FALSE), m_hideCaption(FALSE), m_insideTabbing(insideTabbing), m_langExt(langExt) { @@ -322,7 +322,7 @@ void LatexDocVisitor::visit(DocStyleChange *s) if (s->enable()) m_t << "\n\\footnotesize "; else m_t << "\n\\normalsize "; break; case DocStyleChange::Preformatted: - if (s->enable()) + if (s->enable()) { m_t << "\n\\begin{DoxyPre}"; m_insidePre=TRUE; @@ -349,7 +349,7 @@ void LatexDocVisitor::visit(DocVerbatim *s) SrcLangExt langExt = getLanguageFromFileName(lang); switch(s->type()) { - case DocVerbatim::Code: + case DocVerbatim::Code: { m_t << "\n\\begin{DoxyCode}{" << usedTableLevels() << "}\n"; LatexCodeGenerator::setDoxyCodeOpen(TRUE); @@ -360,28 +360,28 @@ void LatexDocVisitor::visit(DocVerbatim *s) m_t << "\\end{DoxyCode}\n"; } break; - case DocVerbatim::Verbatim: + case DocVerbatim::Verbatim: m_t << "\\begin{DoxyVerb}"; m_t << s->text(); m_t << "\\end{DoxyVerb}\n"; break; - case DocVerbatim::HtmlOnly: - case DocVerbatim::XmlOnly: - case DocVerbatim::ManOnly: + case DocVerbatim::HtmlOnly: + case DocVerbatim::XmlOnly: + case DocVerbatim::ManOnly: case DocVerbatim::RtfOnly: case DocVerbatim::DocbookOnly: - /* nothing */ + /* nothing */ break; - case DocVerbatim::LatexOnly: - m_t << s->text(); + case DocVerbatim::LatexOnly: + m_t << s->text(); break; - case DocVerbatim::Dot: + case DocVerbatim::Dot: { static int dotindex = 1; QCString fileName(4096); - fileName.sprintf("%s%d%s", - (Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_").data(), + fileName.sprintf("%s%d%s", + (Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_").data(), dotindex++, ".dot" ); @@ -403,13 +403,13 @@ void LatexDocVisitor::visit(DocVerbatim *s) } } break; - case DocVerbatim::Msc: + case DocVerbatim::Msc: { static int mscindex = 1; QCString baseName(4096); - baseName.sprintf("%s%d", - (Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_").data(), + baseName.sprintf("%s%d", + (Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_").data(), mscindex++ ); QFile file(baseName+".msc"); @@ -431,7 +431,7 @@ void LatexDocVisitor::visit(DocVerbatim *s) } } break; - case DocVerbatim::PlantUML: + case DocVerbatim::PlantUML: { QCString latexOutput = Config_getString(LATEX_OUTPUT); QCString baseName = PlantumlManager::instance()->writePlantUMLSource(latexOutput,s->exampleFile(),s->text(),PlantumlManager::PUML_EPS); @@ -446,11 +446,11 @@ void LatexDocVisitor::visit(DocAnchor *anc) { if (m_hide) return; m_t << "\\label{" << stripPath(anc->file()) << "_" << anc->anchor() << "}%" << endl; - if (!anc->file().isEmpty() && Config_getBool(PDF_HYPERLINKS)) + if (!anc->file().isEmpty() && Config_getBool(PDF_HYPERLINKS)) { - m_t << "\\Hypertarget{" << stripPath(anc->file()) << "_" << anc->anchor() + m_t << "\\Hypertarget{" << stripPath(anc->file()) << "_" << anc->anchor() << "}%" << endl; - } + } } void LatexDocVisitor::visit(DocInclude *inc) @@ -460,7 +460,7 @@ void LatexDocVisitor::visit(DocInclude *inc) switch(inc->type()) { case DocInclude::IncWithLines: - { + { m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n"; LatexCodeGenerator::setDoxyCodeOpen(TRUE); QFileInfo cfi( inc->file() ); @@ -482,8 +482,8 @@ void LatexDocVisitor::visit(DocInclude *inc) LatexCodeGenerator::setDoxyCodeOpen(FALSE); m_t << "\\end{DoxyCodeInclude}" << endl; } - break; - case DocInclude::Include: + break; + case DocInclude::Include: m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n"; LatexCodeGenerator::setDoxyCodeOpen(TRUE); Doxygen::parserManager->getCodeParser(inc->extension()) @@ -511,7 +511,7 @@ void LatexDocVisitor::visit(DocInclude *inc) case DocInclude::LatexInclude: m_t << inc->text(); break; - case DocInclude::VerbInclude: + case DocInclude::VerbInclude: m_t << "\n\\begin{DoxyVerbInclude}\n"; m_t << inc->text(); m_t << "\\end{DoxyVerbInclude}\n"; @@ -544,7 +544,7 @@ void LatexDocVisitor::visit(DocInclude *inc) extractBlock(inc->text(),inc->blockId()), langExt, inc->isExample(), - inc->exampleFile(), + inc->exampleFile(), fd, lineBlock(inc->text(),inc->blockId()), -1, // endLine @@ -557,8 +557,8 @@ void LatexDocVisitor::visit(DocInclude *inc) m_t << "\\end{DoxyCodeInclude}" << endl; } break; - case DocInclude::SnippetDoc: - case DocInclude::IncludeDoc: + case DocInclude::SnippetDoc: + case DocInclude::IncludeDoc: err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s" "Please create a bug report\n",__FILE__); break; @@ -569,7 +569,7 @@ void LatexDocVisitor::visit(DocIncOperator *op) { //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n", // op->type(),op->isFirst(),op->isLast(),op->text().data()); - if (op->isFirst()) + if (op->isFirst()) { if (!m_hide) m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n"; LatexCodeGenerator::setDoxyCodeOpen(TRUE); @@ -579,10 +579,10 @@ void LatexDocVisitor::visit(DocIncOperator *op) QCString locLangExt = getFileNameExtension(op->includeFileName()); if (locLangExt.isEmpty()) locLangExt = m_langExt; SrcLangExt langExt = getLanguageFromFileName(locLangExt); - if (op->type()!=DocIncOperator::Skip) + if (op->type()!=DocIncOperator::Skip) { popEnabled(); - if (!m_hide) + if (!m_hide) { FileDef *fd = 0; if (!op->includeFileName().isEmpty()) @@ -606,7 +606,7 @@ void LatexDocVisitor::visit(DocIncOperator *op) pushEnabled(); m_hide=TRUE; } - if (op->isLast()) + if (op->isLast()) { popEnabled(); LatexCodeGenerator::setDoxyCodeOpen(FALSE); @@ -621,7 +621,8 @@ void LatexDocVisitor::visit(DocIncOperator *op) void LatexDocVisitor::visit(DocFormula *f) { if (m_hide) return; - const char *p=f->text(); + QCString s = f->text(); + const char *p = s.data(); char c; if (p) { @@ -653,7 +654,7 @@ void LatexDocVisitor::visit(DocSimpleSectSep *) void LatexDocVisitor::visit(DocCite *cite) { if (m_hide) return; - if (!cite->file().isEmpty()) + if (!cite->file().isEmpty()) { //startLink(cite->ref(),cite->file(),cite->anchor()); QCString anchor = cite->anchor(); @@ -705,11 +706,11 @@ void LatexDocVisitor::visitPre(DocAutoListItem *) m_t << "\n\\item "; } -void LatexDocVisitor::visitPost(DocAutoListItem *) +void LatexDocVisitor::visitPost(DocAutoListItem *) { } -void LatexDocVisitor::visitPre(DocPara *) +void LatexDocVisitor::visitPre(DocPara *) { } @@ -799,7 +800,7 @@ void LatexDocVisitor::visitPre(DocSimpleSect *s) case DocSimpleSect::User: m_t << "\\begin{DoxyParagraph}{"; break; - case DocSimpleSect::Rcs: + case DocSimpleSect::Rcs: m_t << "\\begin{DoxyParagraph}{"; break; case DocSimpleSect::Unknown: break; @@ -869,7 +870,7 @@ void LatexDocVisitor::visitPost(DocSimpleSect *s) case DocSimpleSect::User: m_t << "\n\\end{DoxyParagraph}\n"; break; - case DocSimpleSect::Rcs: + case DocSimpleSect::Rcs: m_t << "\n\\end{DoxyParagraph}\n"; break; default: @@ -906,7 +907,7 @@ void LatexDocVisitor::visitPre(DocSimpleListItem *) m_t << "\\item "; } -void LatexDocVisitor::visitPost(DocSimpleListItem *) +void LatexDocVisitor::visitPost(DocSimpleListItem *) { } @@ -922,25 +923,25 @@ void LatexDocVisitor::visitPre(DocSection *s) m_t << "}\\label{" << stripPath(s->file()) << "_" << s->anchor() << "}" << endl; } -void LatexDocVisitor::visitPost(DocSection *) +void LatexDocVisitor::visitPost(DocSection *) { } void LatexDocVisitor::visitPre(DocHtmlList *s) { if (m_hide) return; - if (s->type()==DocHtmlList::Ordered) + if (s->type()==DocHtmlList::Ordered) m_t << "\n\\begin{DoxyEnumerate}"; - else + else m_t << "\n\\begin{DoxyItemize}"; } -void LatexDocVisitor::visitPost(DocHtmlList *s) +void LatexDocVisitor::visitPost(DocHtmlList *s) { if (m_hide) return; - if (s->type()==DocHtmlList::Ordered) + if (s->type()==DocHtmlList::Ordered) m_t << "\n\\end{DoxyEnumerate}"; - else + else m_t << "\n\\end{DoxyItemize}"; } @@ -950,7 +951,7 @@ void LatexDocVisitor::visitPre(DocHtmlListItem *) m_t << "\n\\item "; } -void LatexDocVisitor::visitPost(DocHtmlListItem *) +void LatexDocVisitor::visitPost(DocHtmlListItem *) { } @@ -960,7 +961,7 @@ void LatexDocVisitor::visitPost(DocHtmlListItem *) // m_insidePre=TRUE; //} -//void LatexDocVisitor::visitPost(DocHtmlPre *) +//void LatexDocVisitor::visitPost(DocHtmlPre *) //{ // m_insidePre=FALSE; // m_t << "\\end{alltt}\\normalsize " << endl; @@ -980,7 +981,7 @@ void LatexDocVisitor::visitPre(DocHtmlDescList *dl) } } -void LatexDocVisitor::visitPost(DocHtmlDescList *dl) +void LatexDocVisitor::visitPost(DocHtmlDescList *dl) { if (m_hide) return; QCString val = dl->attribs().find("class"); @@ -1001,7 +1002,7 @@ void LatexDocVisitor::visitPre(DocHtmlDescTitle *) m_insideItem=TRUE; } -void LatexDocVisitor::visitPost(DocHtmlDescTitle *) +void LatexDocVisitor::visitPost(DocHtmlDescTitle *) { if (m_hide) return; m_insideItem=FALSE; @@ -1012,7 +1013,7 @@ void LatexDocVisitor::visitPre(DocHtmlDescData *) { } -void LatexDocVisitor::visitPost(DocHtmlDescData *) +void LatexDocVisitor::visitPost(DocHtmlDescData *) { } @@ -1120,7 +1121,7 @@ void LatexDocVisitor::visitPre(DocHtmlRow *r) setCurrentColumn(0); } -void LatexDocVisitor::visitPost(DocHtmlRow *row) +void LatexDocVisitor::visitPost(DocHtmlRow *row) { if (m_hide) return; @@ -1155,7 +1156,7 @@ void LatexDocVisitor::visitPost(DocHtmlRow *row) } m_t << "\\\\"; - + int col = 1; uint i; for (i=0;iisHeading()) @@ -1317,7 +1318,7 @@ void LatexDocVisitor::visitPre(DocInternal *) //m_t << "}\n"; } -void LatexDocVisitor::visitPost(DocInternal *) +void LatexDocVisitor::visitPost(DocInternal *) { if (m_hide) return; //m_t << "\\end{DoxyInternal}" << endl; @@ -1335,7 +1336,7 @@ void LatexDocVisitor::visitPre(DocHRef *href) m_t << "{\\texttt{ "; } -void LatexDocVisitor::visitPost(DocHRef *) +void LatexDocVisitor::visitPost(DocHRef *) { if (m_hide) return; m_t << "}}"; @@ -1347,7 +1348,7 @@ void LatexDocVisitor::visitPre(DocHtmlHeader *header) m_t << "\\" << getSectionName(header->level()) << "*{"; } -void LatexDocVisitor::visitPost(DocHtmlHeader *) +void LatexDocVisitor::visitPost(DocHtmlHeader *) { if (m_hide) return; m_t << "}"; @@ -1372,7 +1373,7 @@ void LatexDocVisitor::visitPre(DocImage *img) } } -void LatexDocVisitor::visitPost(DocImage *img) +void LatexDocVisitor::visitPost(DocImage *img) { if (img->type()==DocImage::Latex) { @@ -1391,7 +1392,7 @@ void LatexDocVisitor::visitPre(DocDotFile *df) startDotFile(df->file(),df->width(),df->height(),df->hasCaption()); } -void LatexDocVisitor::visitPost(DocDotFile *df) +void LatexDocVisitor::visitPost(DocDotFile *df) { if (m_hide) return; endDotFile(df->hasCaption()); @@ -1402,7 +1403,7 @@ void LatexDocVisitor::visitPre(DocMscFile *df) startMscFile(df->file(),df->width(),df->height(),df->hasCaption()); } -void LatexDocVisitor::visitPost(DocMscFile *df) +void LatexDocVisitor::visitPost(DocMscFile *df) { if (m_hide) return; endMscFile(df->hasCaption()); @@ -1425,7 +1426,7 @@ void LatexDocVisitor::visitPre(DocLink *lnk) startLink(lnk->ref(),lnk->file(),lnk->anchor()); } -void LatexDocVisitor::visitPost(DocLink *lnk) +void LatexDocVisitor::visitPost(DocLink *lnk) { if (m_hide) return; endLink(lnk->ref(),lnk->file(),lnk->anchor()); @@ -1447,7 +1448,7 @@ void LatexDocVisitor::visitPre(DocRef *ref) if (!ref->hasLinkText()) filter(ref->targetTitle()); } -void LatexDocVisitor::visitPost(DocRef *ref) +void LatexDocVisitor::visitPost(DocRef *ref) { if (m_hide) return; if (ref->isSubPage()) @@ -1471,7 +1472,7 @@ void LatexDocVisitor::visitPre(DocSecRefItem *ref) } } -void LatexDocVisitor::visitPost(DocSecRefItem *ref) +void LatexDocVisitor::visitPost(DocSecRefItem *ref) { if (m_hide) return; static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS); @@ -1490,7 +1491,7 @@ void LatexDocVisitor::visitPre(DocSecRefList *) m_t << "\\begin{DoxyCompactList}" << endl; } -void LatexDocVisitor::visitPost(DocSecRefList *) +void LatexDocVisitor::visitPost(DocSecRefList *) { if (m_hide) return; m_t << "\\end{DoxyCompactList}" << endl; @@ -1517,11 +1518,11 @@ void LatexDocVisitor::visitPre(DocParamSect *s) m_t << "\n\\begin{DoxyRetVals}{"; filter(theTranslator->trReturnValues()); break; - case DocParamSect::Exception: + case DocParamSect::Exception: m_t << "\n\\begin{DoxyExceptions}{"; filter(theTranslator->trExceptions()); break; - case DocParamSect::TemplateParam: + case DocParamSect::TemplateParam: m_t << "\n\\begin{DoxyTemplParams}{"; filter(theTranslator->trTemplateParameters()); break; @@ -1543,10 +1544,10 @@ void LatexDocVisitor::visitPost(DocParamSect *s) case DocParamSect::RetVal: m_t << "\\end{DoxyRetVals}\n"; break; - case DocParamSect::Exception: + case DocParamSect::Exception: m_t << "\\end{DoxyExceptions}\n"; break; - case DocParamSect::TemplateParam: + case DocParamSect::TemplateParam: m_t << "\\end{DoxyTemplParams}\n"; break; default: @@ -1601,11 +1602,11 @@ void LatexDocVisitor::visitPre(DocParamList *pl) { if (type->kind()==DocNode::Kind_Word) { - visit((DocWord*)type); + visit((DocWord*)type); } else if (type->kind()==DocNode::Kind_LinkedWord) { - visit((DocLinkedWord*)type); + visit((DocLinkedWord*)type); } else if (type->kind()==DocNode::Kind_Sep) { @@ -1626,11 +1627,11 @@ void LatexDocVisitor::visitPre(DocParamList *pl) m_insideItem=TRUE; if (param->kind()==DocNode::Kind_Word) { - visit((DocWord*)param); + visit((DocWord*)param); } else if (param->kind()==DocNode::Kind_LinkedWord) { - visit((DocLinkedWord*)param); + visit((DocLinkedWord*)param); } m_insideItem=FALSE; } @@ -1705,7 +1706,7 @@ void LatexDocVisitor::visitPre(DocInternalRef *ref) startLink(0,ref->file(),ref->anchor()); } -void LatexDocVisitor::visitPost(DocInternalRef *ref) +void LatexDocVisitor::visitPost(DocInternalRef *ref) { if (m_hide) return; endLink(0,ref->file(),ref->anchor()); @@ -1752,7 +1753,7 @@ void LatexDocVisitor::visitPost(DocParBlock *) } void LatexDocVisitor::filter(const char *str) -{ +{ filterLatexString(m_t,str,m_insideTabbing,m_insidePre,m_insideItem); } @@ -1833,7 +1834,7 @@ void LatexDocVisitor::startDotFile(const QCString &fileName, if ((i=baseName.findRev('/'))!=-1) { baseName=baseName.right(baseName.length()-i-1); - } + } if ((i=baseName.find('.'))!=-1) { baseName=baseName.left(i); @@ -1862,7 +1863,7 @@ void LatexDocVisitor::startMscFile(const QCString &fileName, if ((i=baseName.findRev('/'))!=-1) { baseName=baseName.right(baseName.length()-i-1); - } + } if ((i=baseName.find('.'))!=-1) { baseName=baseName.left(i); @@ -1870,7 +1871,7 @@ void LatexDocVisitor::startMscFile(const QCString &fileName, baseName.prepend("msc_"); QCString outDir = Config_getString(LATEX_OUTPUT); - writeMscGraphFromFile(fileName,outDir,baseName,MSC_EPS); + writeMscGraphFromFile(fileName,outDir,baseName,MSC_EPS); visitPreStart(m_t,hasCaption, baseName, width, height); } @@ -1888,7 +1889,7 @@ void LatexDocVisitor::writeMscFile(const QCString &baseName, DocVerbatim *s) if ((i=shortName.findRev('/'))!=-1) { shortName=shortName.right(shortName.length()-i-1); - } + } QCString outDir = Config_getString(LATEX_OUTPUT); writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_EPS); visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height()); diff --git a/vhdlparser/VhdlParser.cc b/vhdlparser/VhdlParser.cc index dd96740..3c0fe35 100644 --- a/vhdlparser/VhdlParser.cc +++ b/vhdlparser/VhdlParser.cc @@ -1907,7 +1907,7 @@ void VhdlParser::concurrent_statement() { if (!hasError) { process_statement(); } - } else if (jj_2_20(2147483647)) { + } else if (jj_2_20(3)) { if (!hasError) { generate_statement(); } diff --git a/vhdlparser/VhdlParser.h b/vhdlparser/VhdlParser.h index 088be16..891b085 100644 --- a/vhdlparser/VhdlParser.h +++ b/vhdlparser/VhdlParser.h @@ -1303,7 +1303,7 @@ void parseInline(); { jj_save(124, xla); } } - inline bool jj_3R_209() + inline bool jj_3R_207() { if (jj_done) return true; if (jj_scan_token(VARASSIGN_T)) return true; @@ -1311,33 +1311,33 @@ void parseInline(); return false; } - inline bool jj_3R_471() + inline bool jj_3R_461() { if (jj_done) return true; if (jj_scan_token(FOR_T)) return true; - if (jj_3R_428()) return true; + if (jj_3R_543()) return true; return false; } - inline bool jj_3R_208() + inline bool jj_3R_206() { if (jj_done) return true; - if (jj_3R_368()) return true; + if (jj_3R_363()) return true; return false; } - inline bool jj_3R_388() + inline bool jj_3R_383() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_470()) return false; + if (!jj_3R_460()) return false; jj_scanpos = xsp; - if (jj_3R_471()) return true; + if (jj_3R_461()) return true; return false; } - inline bool jj_3R_470() + inline bool jj_3R_460() { if (jj_done) return true; if (jj_scan_token(WHILE_T)) return true; @@ -1345,15 +1345,15 @@ void parseInline(); return false; } - inline bool jj_3R_420() + inline bool jj_3R_415() { if (jj_done) return true; if (jj_scan_token(SEMI_T)) return true; - if (jj_3R_419()) return true; + if (jj_3R_414()) return true; return false; } - inline bool jj_3R_434() + inline bool jj_3R_424() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; @@ -1362,7 +1362,7 @@ void parseInline(); return false; } - inline bool jj_3R_206() + inline bool jj_3R_204() { if (jj_done) return true; Token * xsp; @@ -1382,27 +1382,27 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_206()) jj_scanpos = xsp; - if (jj_3R_207()) return true; + if (jj_3R_204()) jj_scanpos = xsp; + if (jj_3R_205()) return true; if (jj_scan_token(COLON_T)) return true; xsp = jj_scanpos; - if (jj_3R_208()) jj_scanpos = xsp; + if (jj_3R_206()) jj_scanpos = xsp; if (jj_3R_89()) return true; xsp = jj_scanpos; if (jj_scan_token(27)) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_209()) jj_scanpos = xsp; + if (jj_3R_207()) jj_scanpos = xsp; return false; } - inline bool jj_3R_329() + inline bool jj_3R_327() { if (jj_done) return true; - if (jj_3R_419()) return true; + if (jj_3R_414()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_420()) { jj_scanpos = xsp; break; } + if (jj_3R_415()) { jj_scanpos = xsp; break; } } return false; } @@ -1411,23 +1411,23 @@ void parseInline(); { if (jj_done) return true; if (jj_scan_token(FILE_T)) return true; - if (jj_3R_207()) return true; + if (jj_3R_205()) return true; if (jj_scan_token(COLON_T)) return true; if (jj_3R_89()) return true; return false; } - inline bool jj_3R_728() + inline bool jj_3R_693() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_419() + inline bool jj_3R_414() { if (jj_done) return true; - if (jj_3R_523()) return true; + if (jj_3R_513()) return true; return false; } @@ -1438,27 +1438,27 @@ void parseInline(); return false; } - inline bool jj_3R_454() + inline bool jj_3R_444() { if (jj_done) return true; if (jj_scan_token(IS_T)) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_728()) return false; + if (!jj_3R_693()) return false; jj_scanpos = xsp; if (jj_scan_token(145)) return true; return false; } - inline bool jj_3R_584() + inline bool jj_3R_572() { if (jj_done) return true; - if (jj_3R_645()) return true; + if (jj_3R_625()) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_583() + inline bool jj_3R_571() { if (jj_done) return true; if (jj_3R_98()) return true; @@ -1486,7 +1486,7 @@ void parseInline(); return false; } - inline bool jj_3R_523() + inline bool jj_3R_513() { if (jj_done) return true; Token * xsp; @@ -1499,9 +1499,9 @@ void parseInline(); jj_scanpos = xsp; if (!jj_3_45()) return false; jj_scanpos = xsp; - if (!jj_3R_583()) return false; + if (!jj_3R_571()) return false; jj_scanpos = xsp; - if (jj_3R_584()) return true; + if (jj_3R_572()) return true; return false; } @@ -1528,48 +1528,48 @@ void parseInline(); return false; } - inline bool jj_3R_437() + inline bool jj_3R_427() { if (jj_done) return true; if (jj_scan_token(ALL_T)) return true; return false; } - inline bool jj_3R_436() + inline bool jj_3R_426() { if (jj_done) return true; if (jj_scan_token(OTHER_T)) return true; return false; } - inline bool jj_3R_653() + inline bool jj_3R_631() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_348() + inline bool jj_3R_343() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_435()) return false; + if (!jj_3R_425()) return false; jj_scanpos = xsp; - if (!jj_3R_436()) return false; + if (!jj_3R_426()) return false; jj_scanpos = xsp; - if (jj_3R_437()) return true; + if (jj_3R_427()) return true; return false; } - inline bool jj_3R_435() + inline bool jj_3R_425() { if (jj_done) return true; - if (jj_3R_207()) return true; + if (jj_3R_205()) return true; return false; } - inline bool jj_3R_345() + inline bool jj_3R_340() { if (jj_done) return true; if (jj_scan_token(CONFIGURATION_T)) return true; @@ -1577,7 +1577,7 @@ void parseInline(); return false; } - inline bool jj_3R_344() + inline bool jj_3R_339() { if (jj_done) return true; if (jj_scan_token(ENTITY_T)) return true; @@ -1586,20 +1586,20 @@ void parseInline(); if (jj_3_41()) jj_scanpos = xsp; if (jj_3R_63()) return true; xsp = jj_scanpos; - if (jj_3R_434()) jj_scanpos = xsp; + if (jj_3R_424()) jj_scanpos = xsp; return false; } - inline bool jj_3R_179() + inline bool jj_3R_177() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_343()) return false; + if (!jj_3R_338()) return false; jj_scanpos = xsp; - if (!jj_3R_344()) return false; + if (!jj_3R_339()) return false; jj_scanpos = xsp; - if (jj_3R_345()) return true; + if (jj_3R_340()) return true; return false; } @@ -1610,7 +1610,7 @@ void parseInline(); return false; } - inline bool jj_3R_343() + inline bool jj_3R_338() { if (jj_done) return true; Token * xsp; @@ -1620,7 +1620,7 @@ void parseInline(); return false; } - inline bool jj_3R_757() + inline bool jj_3R_722() { if (jj_done) return true; if (jj_3R_161()) return true; @@ -1629,36 +1629,36 @@ void parseInline(); return false; } - inline bool jj_3R_650() + inline bool jj_3R_628() { if (jj_done) return true; if (jj_3R_61()) return true; return false; } - inline bool jj_3R_649() + inline bool jj_3R_627() { if (jj_done) return true; if (jj_3R_72()) return true; return false; } - inline bool jj_3R_597() + inline bool jj_3R_577() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_649()) return false; + if (!jj_3R_627()) return false; jj_scanpos = xsp; - if (jj_3R_650()) return true; + if (jj_3R_628()) return true; return false; } - inline bool jj_3R_548() + inline bool jj_3R_535() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_329()) return true; + if (jj_3R_327()) return true; if (jj_scan_token(RPAREN_T)) return true; return false; } @@ -1671,14 +1671,14 @@ void parseInline(); return false; } - inline bool jj_3R_452() + 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_548()) jj_scanpos = xsp; + if (jj_3R_535()) jj_scanpos = xsp; return false; } @@ -1696,7 +1696,7 @@ void parseInline(); return false; } - inline bool jj_3R_559() + inline bool jj_3R_547() { if (jj_done) return true; if (jj_scan_token(TYPE_T)) return true; @@ -1705,7 +1705,7 @@ void parseInline(); return false; } - inline bool jj_3R_406() + inline bool jj_3R_401() { if (jj_done) return true; if (jj_3R_61()) return true; @@ -1719,30 +1719,30 @@ void parseInline(); return false; } - inline bool jj_3R_558() + inline bool jj_3R_546() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_476()) return true; + if (jj_3R_466()) return true; return false; } - inline bool jj_3R_652() + inline bool jj_3R_630() { if (jj_done) return true; if (jj_scan_token(ELSE_T)) return true; - if (jj_3R_270()) return true; + if (jj_3R_268()) return true; return false; } - inline bool jj_3R_318() + inline bool jj_3R_316() { if (jj_done) return true; - if (jj_3R_404()) return true; + if (jj_3R_399()) return true; return false; } - inline bool jj_3R_573() + inline bool jj_3R_561() { if (jj_done) return true; if (jj_scan_token(WHEN_T)) return true; @@ -1750,7 +1750,7 @@ void parseInline(); return false; } - inline bool jj_3R_453() + inline bool jj_3R_443() { if (jj_done) return true; Token * xsp; @@ -1761,33 +1761,33 @@ void parseInline(); return false; } - inline bool jj_3R_651() + inline bool jj_3R_629() { if (jj_done) return true; if (jj_scan_token(ELSIF_T)) return true; if (jj_3R_83()) return true; if (jj_scan_token(THEN_T)) return true; - if (jj_3R_270()) return true; + if (jj_3R_268()) return true; return false; } - inline bool jj_3R_366() + inline bool jj_3R_361() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_453()) jj_scanpos = xsp; + if (jj_3R_443()) jj_scanpos = xsp; if (jj_scan_token(FUNCTION_T)) return true; if (jj_3R_63()) return true; - if (jj_3R_452()) return true; + if (jj_3R_442()) return true; if (jj_scan_token(RETURN_T)) return true; if (jj_3R_63()) return true; xsp = jj_scanpos; - if (jj_3R_454()) jj_scanpos = xsp; + if (jj_3R_444()) jj_scanpos = xsp; return false; } - inline bool jj_3R_367() + inline bool jj_3R_362() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; @@ -1795,16 +1795,16 @@ void parseInline(); return false; } - inline bool jj_3R_365() + inline bool jj_3R_360() { if (jj_done) return true; if (jj_scan_token(PROCEDURE_T)) return true; if (jj_3R_74()) return true; - if (jj_3R_452()) return true; + if (jj_3R_442()) return true; return false; } - inline bool jj_3R_266() + inline bool jj_3R_264() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -1817,36 +1817,36 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_266()) jj_scanpos = xsp; + if (jj_3R_264()) jj_scanpos = xsp; if (jj_scan_token(IF_T)) return true; if (jj_3R_83()) return true; if (jj_scan_token(THEN_T)) return true; - if (jj_3R_270()) return true; + if (jj_3R_268()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_651()) { jj_scanpos = xsp; break; } + if (jj_3R_629()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_652()) jj_scanpos = xsp; + if (jj_3R_630()) 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_653()) jj_scanpos = xsp; + if (jj_3R_631()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_205() + inline bool jj_3R_203() { if (jj_done) return true; - if (jj_3R_366()) return true; + if (jj_3R_361()) return true; return false; } - inline bool jj_3R_204() + inline bool jj_3R_202() { if (jj_done) return true; - if (jj_3R_365()) return true; + if (jj_3R_360()) return true; return false; } @@ -1855,32 +1855,32 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_204()) return false; + if (!jj_3R_202()) return false; jj_scanpos = xsp; - if (jj_3R_205()) return true; + if (jj_3R_203()) return true; return false; } - inline bool jj_3R_207() + inline bool jj_3R_205() { if (jj_done) return true; if (jj_3R_63()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_367()) { jj_scanpos = xsp; break; } + if (jj_3R_362()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_503() + inline bool jj_3R_493() { if (jj_done) return true; if (jj_scan_token(ELSE_T)) return true; if (jj_3R_61()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_573()) jj_scanpos = xsp; + if (jj_3R_561()) jj_scanpos = xsp; return false; } @@ -1891,14 +1891,14 @@ void parseInline(); return false; } - inline bool jj_3R_405() + inline bool jj_3R_400() { if (jj_done) return true; Token * xsp; - if (jj_3R_503()) return true; + if (jj_3R_493()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_503()) { jj_scanpos = xsp; break; } + if (jj_3R_493()) { jj_scanpos = xsp; break; } } return false; } @@ -1921,15 +1921,15 @@ void parseInline(); return false; } - inline bool jj_3R_572() + inline bool jj_3R_560() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_571()) return true; + if (jj_3R_559()) return true; return false; } - inline bool jj_3R_404() + inline bool jj_3R_399() { if (jj_done) return true; Token * xsp; @@ -1940,25 +1940,25 @@ void parseInline(); return false; } - inline bool jj_3R_476() + inline bool jj_3R_466() { if (jj_done) return true; - if (jj_3R_473()) return true; + if (jj_3R_463()) return true; if (jj_scan_token(WHEN_T)) return true; if (jj_3R_90()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_558()) { jj_scanpos = xsp; break; } + if (jj_3R_546()) { jj_scanpos = xsp; break; } } if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_475() + inline bool jj_3R_465() { if (jj_done) return true; - if (jj_3R_425()) return true; + if (jj_3R_420()) return true; return false; } @@ -1969,13 +1969,13 @@ void parseInline(); if (jj_3R_74()) return true; if (jj_scan_token(IS_T)) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_501()) 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_319() + inline bool jj_3R_317() { if (jj_done) return true; if (jj_3R_61()) return true; @@ -1988,12 +1988,12 @@ void parseInline(); if (jj_scan_token(137)) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_406()) { jj_scanpos = xsp; break; } + if (jj_3R_401()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_403() + inline bool jj_3R_398() { if (jj_done) return true; if (jj_scan_token(GROUP_T)) return true; @@ -2001,7 +2001,7 @@ void parseInline(); if (jj_scan_token(COLON_T)) return true; if (jj_3R_74()) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_502()) 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; @@ -2020,19 +2020,19 @@ void parseInline(); if (jj_scan_token(LESSTHAN_T)) return true; if (jj_scan_token(FORCE_T)) return true; xsp = jj_scanpos; - if (jj_3R_318()) jj_scanpos = xsp; - if (jj_3R_319()) return true; + if (jj_3R_316()) jj_scanpos = xsp; + if (jj_3R_317()) return true; return false; } - inline bool jj_3R_502() + inline bool jj_3R_492() { if (jj_done) return true; - if (jj_3R_571()) return true; + if (jj_3R_559()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_572()) { jj_scanpos = xsp; break; } + if (jj_3R_560()) { jj_scanpos = xsp; break; } } return false; } @@ -2044,7 +2044,7 @@ void parseInline(); return false; } - inline bool jj_3R_390() + inline bool jj_3R_385() { if (jj_done) return true; if (jj_scan_token(WITH_T)) return true; @@ -2056,37 +2056,37 @@ void parseInline(); if (jj_3R_119()) return true; if (jj_scan_token(LESSTHAN_T)) return true; xsp = jj_scanpos; - if (jj_3R_475()) jj_scanpos = xsp; - if (jj_3R_476()) return true; + if (jj_3R_465()) jj_scanpos = xsp; + if (jj_3R_466()) return true; return false; } - inline bool jj_3R_640() + inline bool jj_3R_620() { if (jj_done) return true; - if (jj_3R_374()) return true; + if (jj_3R_369()) return true; return false; } - inline bool jj_3R_639() + inline bool jj_3R_619() { if (jj_done) return true; if (jj_3R_63()) return true; return false; } - inline bool jj_3R_571() + inline bool jj_3R_559() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_639()) return false; + if (!jj_3R_619()) return false; jj_scanpos = xsp; - if (jj_3R_640()) return true; + if (jj_3R_620()) return true; return false; } - inline bool jj_3R_722() + inline bool jj_3R_687() { if (jj_done) return true; if (jj_3R_63()) return true; @@ -2104,21 +2104,21 @@ void parseInline(); return false; } - inline bool jj_3R_721() + inline bool jj_3R_686() { if (jj_done) return true; if (jj_3R_114()) return true; return false; } - inline bool jj_3R_696() + inline bool jj_3R_663() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_721()) return false; + if (!jj_3R_686()) return false; jj_scanpos = xsp; - if (jj_3R_722()) return true; + if (jj_3R_687()) return true; return false; } @@ -2130,14 +2130,7 @@ void parseInline(); return false; } - inline bool jj_3R_176() - { - if (jj_done) return true; - if (jj_3R_74()) return true; - return false; - } - - inline bool jj_3R_607() + inline bool jj_3R_587() { if (jj_done) return true; if (jj_scan_token(WHEN_T)) return true; @@ -2152,7 +2145,7 @@ void parseInline(); return false; } - inline bool jj_3R_555() + inline bool jj_3R_542() { if (jj_done) return true; if (jj_scan_token(WITH_T)) return true; @@ -2161,16 +2154,16 @@ void parseInline(); Token * xsp; xsp = jj_scanpos; if (jj_scan_token(155)) jj_scanpos = xsp; - if (jj_3R_696()) return true; + if (jj_3R_663()) return true; if (jj_scan_token(VARASSIGN_T)) return true; - if (jj_3R_319()) return true; + if (jj_3R_317()) return true; return false; } inline bool jj_3R_162() { if (jj_done) return true; - if (jj_3R_329()) return true; + if (jj_3R_327()) return true; return false; } @@ -2182,14 +2175,14 @@ void parseInline(); return false; } - inline bool jj_3R_316() + inline bool jj_3R_314() { if (jj_done) return true; - if (jj_3R_404()) return true; + if (jj_3R_399()) return true; return false; } - inline bool jj_3R_314() + inline bool jj_3R_312() { if (jj_done) return true; if (jj_3R_148()) return true; @@ -2197,18 +2190,18 @@ void parseInline(); return false; } - inline bool jj_3R_317() + inline bool jj_3R_315() { if (jj_done) return true; if (jj_3R_61()) return true; - if (jj_3R_405()) return true; + if (jj_3R_400()) return true; return false; } - inline bool jj_3R_474() + inline bool jj_3R_464() { if (jj_done) return true; - if (jj_3R_557()) return true; + if (jj_3R_545()) return true; return false; } @@ -2223,10 +2216,10 @@ void parseInline(); return false; } - inline bool jj_3R_282() + inline bool jj_3R_280() { if (jj_done) return true; - if (jj_3R_390()) return true; + if (jj_3R_385()) return true; return false; } @@ -2235,27 +2228,23 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_281()) return false; + if (!jj_3R_279()) return false; jj_scanpos = xsp; - if (jj_3R_282()) return true; + if (jj_3R_280()) return true; return false; } - inline bool jj_3R_281() + inline bool jj_3R_279() { if (jj_done) return true; if (jj_3R_150()) return true; return false; } - inline bool jj_3R_338() + inline bool jj_3R_336() { if (jj_done) return true; if (jj_scan_token(IF_T)) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3_39()) jj_scanpos = xsp; - if (jj_3R_83()) return true; return false; } @@ -2264,24 +2253,23 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_337()) return false; + if (!jj_3R_335()) return false; jj_scanpos = xsp; - if (jj_3R_338()) return true; + if (jj_3R_336()) return true; return false; } - inline bool jj_3R_337() + inline bool jj_3R_335() { if (jj_done) return true; if (jj_scan_token(FOR_T)) return true; - if (jj_3R_428()) return true; return false; } - inline bool jj_3R_472() + inline bool jj_3R_462() { if (jj_done) return true; - if (jj_3R_425()) return true; + if (jj_3R_420()) return true; return false; } @@ -2293,23 +2281,23 @@ void parseInline(); if (jj_scan_token(FORCE_T)) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_316()) jj_scanpos = xsp; + if (jj_3R_314()) jj_scanpos = xsp; if (jj_3R_61()) return true; if (jj_scan_token(WHEN_T)) return true; xsp = jj_scanpos; - if (jj_3R_317()) jj_scanpos = xsp; + if (jj_3R_315()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_557() + inline bool jj_3R_545() { if (jj_done) return true; if (jj_scan_token(ELSE_T)) return true; if (jj_3R_61()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_607()) jj_scanpos = xsp; + if (jj_3R_587()) jj_scanpos = xsp; return false; } @@ -2319,14 +2307,6 @@ void parseInline(); if (jj_3R_74()) return true; if (jj_scan_token(COLON_T)) return true; if (jj_3R_174()) return true; - if (jj_scan_token(GENERATE_T)) return true; - if (jj_3R_175()) 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_176()) jj_scanpos = xsp; - if (jj_scan_token(SEMI_T)) return true; return false; } @@ -2342,32 +2322,32 @@ void parseInline(); if (jj_done) return true; if (jj_3R_63()) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_238()) return true; + if (jj_3R_236()) return true; if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3R_389() + inline bool jj_3R_384() { if (jj_done) return true; if (jj_3R_119()) return true; if (jj_scan_token(LESSTHAN_T)) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_472()) jj_scanpos = xsp; - if (jj_3R_473()) return true; + if (jj_3R_462()) jj_scanpos = xsp; + if (jj_3R_463()) return true; if (jj_scan_token(WHEN_T)) return true; if (jj_3R_61()) return true; xsp = jj_scanpos; - if (jj_3R_474()) jj_scanpos = xsp; + if (jj_3R_464()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_280() + inline bool jj_3R_278() { if (jj_done) return true; - if (jj_3R_389()) return true; + if (jj_3R_384()) return true; return false; } @@ -2376,20 +2356,20 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_279()) return false; + if (!jj_3R_277()) return false; jj_scanpos = xsp; - if (jj_3R_280()) return true; + if (jj_3R_278()) return true; return false; } - inline bool jj_3R_279() + inline bool jj_3R_277() { if (jj_done) return true; if (jj_3R_149()) return true; return false; } - inline bool jj_3R_582() + inline bool jj_3R_570() { if (jj_done) return true; if (jj_scan_token(AT_T)) return true; @@ -2397,14 +2377,14 @@ void parseInline(); return false; } - inline bool jj_3R_491() + inline bool jj_3R_481() { if (jj_done) return true; - if (jj_3R_561()) return true; + if (jj_3R_549()) return true; return false; } - inline bool jj_3R_315() + inline bool jj_3R_313() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; @@ -2420,13 +2400,6 @@ void parseInline(); return false; } - inline bool jj_3R_430() - { - if (jj_done) return true; - if (jj_3R_531()) return true; - return false; - } - inline bool jj_3R_147() { if (jj_done) return true; @@ -2435,22 +2408,22 @@ void parseInline(); Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_314()) { jj_scanpos = xsp; break; } + if (jj_3R_312()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_644() + inline bool jj_3R_624() { if (jj_done) return true; if (jj_3R_147()) return true; return false; } - inline bool jj_3R_612() + inline bool jj_3R_592() { if (jj_done) return true; - if (jj_3R_404()) return true; + if (jj_3R_399()) return true; return false; } @@ -2458,7 +2431,7 @@ void parseInline(); { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_328()) return true; + if (jj_3R_326()) return true; if (jj_scan_token(RPAREN_T)) return true; return false; } @@ -2469,7 +2442,7 @@ void parseInline(); if (jj_3R_74()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_315()) jj_scanpos = xsp; + if (jj_3R_313()) jj_scanpos = xsp; return false; } @@ -2479,12 +2452,12 @@ void parseInline(); if (jj_scan_token(TYPE_T)) return true; if (jj_3R_74()) return true; if (jj_scan_token(IS_T)) return true; - if (jj_3R_608()) return true; + if (jj_3R_588()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_669() + inline bool jj_3R_647() { if (jj_done) return true; if (jj_scan_token(NEG_T)) return true; @@ -2492,14 +2465,14 @@ void parseInline(); return false; } - inline bool jj_3R_643() + inline bool jj_3R_623() { if (jj_done) return true; Token * xsp; - if (jj_3R_669()) return true; + if (jj_3R_647()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_669()) { jj_scanpos = xsp; break; } + if (jj_3R_647()) { jj_scanpos = xsp; break; } } return false; } @@ -2522,39 +2495,32 @@ void parseInline(); return false; } - inline bool jj_3R_581() + inline bool jj_3R_569() { if (jj_done) return true; - if (jj_3R_643()) return true; + if (jj_3R_623()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_644()) jj_scanpos = xsp; + if (jj_3R_624()) jj_scanpos = xsp; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_602() + inline bool jj_3R_582() { if (jj_done) return true; - if (jj_3R_329()) return true; - return false; - } - - inline bool jj_3R_341() - { - if (jj_done) return true; - if (jj_3R_432()) return true; + if (jj_3R_327()) return true; return false; } - inline bool jj_3R_418() + inline bool jj_3R_413() { if (jj_done) return true; if (jj_scan_token(INTEGER)) return true; return false; } - inline bool jj_3R_642() + inline bool jj_3R_622() { if (jj_done) return true; if (jj_scan_token(DOT_T)) return true; @@ -2562,25 +2528,25 @@ void parseInline(); return false; } - inline bool jj_3R_328() + inline bool jj_3R_326() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_417()) return false; + if (!jj_3R_412()) return false; jj_scanpos = xsp; - if (jj_3R_418()) return true; + if (jj_3R_413()) return true; return false; } - inline bool jj_3R_417() + inline bool jj_3R_412() { if (jj_done) return true; if (jj_3R_63()) return true; return false; } - inline bool jj_3R_641() + inline bool jj_3R_621() { if (jj_done) return true; if (jj_scan_token(DOT_T)) return true; @@ -2589,66 +2555,66 @@ void parseInline(); return false; } - inline bool jj_3R_580() + inline bool jj_3R_568() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_641()) return false; + if (!jj_3R_621()) return false; jj_scanpos = xsp; - if (jj_3R_642()) return true; + if (jj_3R_622()) return true; return false; } - inline bool jj_3R_522() - { - if (jj_done) return true; - if (jj_3R_582()) return true; - return false; - } - - inline bool jj_3R_521() + inline bool jj_3R_512() { if (jj_done) return true; - if (jj_3R_581()) return true; + if (jj_3R_570()) return true; return false; } - inline bool jj_3R_520() + inline bool jj_3R_511() { if (jj_done) return true; - if (jj_3R_580()) return true; + if (jj_3R_569()) return true; return false; } - inline bool jj_3R_416() + inline bool jj_3R_411() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_520()) return false; + if (!jj_3R_510()) return false; jj_scanpos = xsp; - if (!jj_3R_521()) return false; + if (!jj_3R_511()) return false; jj_scanpos = xsp; - if (jj_3R_522()) return true; + if (jj_3R_512()) return true; return false; } - inline bool jj_3R_519() + inline bool jj_3R_510() { if (jj_done) return true; - if (jj_scan_token(VARIABLE_T)) return true; + if (jj_3R_568()) return true; return false; } - inline bool jj_3R_191() + inline bool jj_3R_189() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_687() + inline bool jj_3R_509() + { + if (jj_done) return true; + if (jj_scan_token(VARIABLE_T)) return true; + return false; + } + + inline bool jj_3R_659() { if (jj_done) return true; if (jj_scan_token(FILE_T)) return true; @@ -2657,14 +2623,14 @@ void parseInline(); return false; } - inline bool jj_3R_518() + inline bool jj_3R_508() { if (jj_done) return true; if (jj_scan_token(SIGNAL_T)) return true; return false; } - inline bool jj_3R_611() + inline bool jj_3R_591() { if (jj_done) return true; if (jj_scan_token(OPEN_T)) return true; @@ -2672,40 +2638,40 @@ void parseInline(); return false; } - inline bool jj_3R_517() + inline bool jj_3R_410() { if (jj_done) return true; - if (jj_scan_token(CONSTANT_T)) 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_415() + inline bool jj_3R_507() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_517()) return false; - jj_scanpos = xsp; - if (!jj_3R_518()) return false; - jj_scanpos = xsp; - if (jj_3R_519()) return true; + if (jj_scan_token(CONSTANT_T)) return true; return false; } - inline bool jj_3R_561() + inline bool jj_3R_549() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_611()) jj_scanpos = xsp; + if (jj_3R_591()) jj_scanpos = xsp; if (jj_scan_token(IS_T)) return true; xsp = jj_scanpos; - if (jj_3R_612()) jj_scanpos = xsp; - if (jj_3R_613()) return true; + if (jj_3R_592()) jj_scanpos = xsp; + if (jj_3R_593()) return true; return false; } - inline bool jj_3R_613() + inline bool jj_3R_593() { if (jj_done) return true; if (jj_3R_61()) return true; @@ -2727,12 +2693,12 @@ void parseInline(); return false; } - inline bool jj_3R_325() + inline bool jj_3R_323() { if (jj_done) return true; if (jj_scan_token(SLSL_T)) return true; - if (jj_3R_415()) return true; - if (jj_3R_416()) 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_89()) return true; if (jj_scan_token(RSRS_T)) return true; @@ -2747,49 +2713,36 @@ void parseInline(); return false; } - inline bool jj_3R_477() + inline bool jj_3R_467() { if (jj_done) return true; if (jj_scan_token(DOUBLEMULT_T)) return true; - if (jj_3R_391()) return true; + if (jj_3R_386()) return true; return false; } - inline bool jj_3R_397() + inline bool jj_3R_392() { if (jj_done) return true; if (jj_scan_token(FILE_T)) return true; - if (jj_3R_207()) return true; + if (jj_3R_205()) return true; if (jj_scan_token(COLON_T)) return true; if (jj_3R_89()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_491()) jj_scanpos = xsp; + if (jj_3R_481()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_286() + inline bool jj_3R_284() { if (jj_done) return true; if (jj_3R_137()) return true; return false; } - inline bool jj_3R_532() - { - if (jj_done) return true; - if (jj_scan_token(ELSIF_T)) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3_118()) jj_scanpos = xsp; - if (jj_3R_61()) return true; - if (jj_scan_token(GENERATE_T)) return true; - if (jj_3R_339()) return true; - return false; - } - - inline bool jj_3R_275() + inline bool jj_3R_273() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -2803,54 +2756,35 @@ void parseInline(); return false; } - inline bool jj_3R_297() + inline bool jj_3R_295() { if (jj_done) return true; - if (jj_3R_322()) return true; - if (jj_3R_391()) return true; + if (jj_3R_320()) return true; + if (jj_3R_386()) return true; return false; } - inline bool jj_3R_296() + inline bool jj_3R_294() { if (jj_done) return true; if (jj_scan_token(QQ_T)) return true; - if (jj_3R_391()) return true; + if (jj_3R_386()) return true; return false; } - inline bool jj_3R_295() + inline bool jj_3R_293() { if (jj_done) return true; if (jj_scan_token(NOT_T)) return true; - if (jj_3R_391()) return true; - return false; - } - - inline bool jj_3R_432() - { - if (jj_done) return true; - if (jj_scan_token(ELSE_T)) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3_117()) jj_scanpos = xsp; - if (jj_scan_token(GENERATE_T)) return true; - if (jj_3R_339()) return true; + if (jj_3R_386()) return true; return false; } - inline bool jj_3R_294() + inline bool jj_3R_292() { if (jj_done) return true; if (jj_scan_token(ABS_T)) return true; - if (jj_3R_391()) return true; - return false; - } - - inline bool jj_3R_431() - { - if (jj_done) return true; - if (jj_3R_532()) return true; + if (jj_3R_386()) return true; return false; } @@ -2859,58 +2793,29 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_293()) return false; + if (!jj_3R_291()) return false; jj_scanpos = xsp; - if (!jj_3R_294()) return false; + if (!jj_3R_292()) return false; jj_scanpos = xsp; - if (!jj_3R_295()) return false; + if (!jj_3R_293()) return false; jj_scanpos = xsp; - if (!jj_3R_296()) return false; + if (!jj_3R_294()) return false; jj_scanpos = xsp; - if (jj_3R_297()) return true; + if (jj_3R_295()) return true; return false; } - inline bool jj_3R_293() - { - if (jj_done) return true; - if (jj_3R_391()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_477()) jj_scanpos = xsp; - return false; - } - - inline bool jj_3R_340() - { - if (jj_done) return true; - Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_431()) { jj_scanpos = xsp; break; } - } - return false; - } - - inline bool jj_3R_530() - { - if (jj_done) return true; - if (jj_3R_146()) return true; - return false; - } - - inline bool jj_3R_175() + inline bool jj_3R_291() { if (jj_done) return true; - if (jj_3R_339()) return true; - if (jj_3R_340()) return true; + if (jj_3R_386()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_341()) jj_scanpos = xsp; + if (jj_3R_467()) jj_scanpos = xsp; return false; } - inline bool jj_3R_253() + inline bool jj_3R_251() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; @@ -2918,75 +2823,50 @@ void parseInline(); return false; } - inline bool jj_3R_429() - { - if (jj_done) return true; - Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_530()) { jj_scanpos = xsp; break; } - } - if (jj_scan_token(BEGIN_T)) return true; - return false; - } - - inline bool jj_3R_339() - { - if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_429()) jj_scanpos = xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_430()) { jj_scanpos = xsp; break; } - } - return false; - } - inline bool jj_3R_152() { if (jj_done) return true; - if (jj_3R_322()) return true; + if (jj_3R_320()) return true; if (jj_3R_151()) return true; return false; } - inline bool jj_3R_298() + inline bool jj_3R_296() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_414() + inline bool jj_3R_409() { if (jj_done) return true; if (jj_scan_token(OR_T)) return true; return false; } - inline bool jj_3R_413() + inline bool jj_3R_408() { if (jj_done) return true; if (jj_scan_token(XOR_T)) return true; return false; } - inline bool jj_3R_412() + inline bool jj_3R_407() { if (jj_done) return true; if (jj_scan_token(XNOR_T)) return true; return false; } - inline bool jj_3R_248() + inline bool jj_3R_246() { if (jj_done) return true; if (jj_3R_137()) return true; return false; } - inline bool jj_3R_411() + inline bool jj_3R_406() { if (jj_done) return true; if (jj_scan_token(NOR_T)) return true; @@ -3001,33 +2881,33 @@ void parseInline(); return false; } - inline bool jj_3R_410() + inline bool jj_3R_405() { if (jj_done) return true; if (jj_scan_token(NAND_T)) return true; return false; } - inline bool jj_3R_322() + inline bool jj_3R_320() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_409()) return false; + if (!jj_3R_404()) return false; jj_scanpos = xsp; - if (!jj_3R_410()) return false; + if (!jj_3R_405()) return false; jj_scanpos = xsp; - if (!jj_3R_411()) return false; + if (!jj_3R_406()) return false; jj_scanpos = xsp; - if (!jj_3R_412()) return false; + if (!jj_3R_407()) return false; jj_scanpos = xsp; - if (!jj_3R_413()) return false; + if (!jj_3R_408()) return false; jj_scanpos = xsp; - if (jj_3R_414()) return true; + if (jj_3R_409()) return true; return false; } - inline bool jj_3R_409() + inline bool jj_3R_404() { if (jj_done) return true; if (jj_scan_token(AND_T)) return true; @@ -3040,35 +2920,22 @@ void parseInline(); if (jj_scan_token(END_T)) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_298()) jj_scanpos = xsp; + if (jj_3R_296()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_670() + inline bool jj_3R_648() { if (jj_done) return true; if (jj_3R_137()) return true; return false; } - inline bool jj_3R_190() - { - if (jj_done) return true; - if (jj_3R_354()) return true; - return false; - } - - inline bool jj_3R_695() + inline bool jj_3R_188() { if (jj_done) return true; - if (jj_scan_token(WHEN_T)) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3_115()) jj_scanpos = xsp; - if (jj_3R_90()) return true; - if (jj_scan_token(ARROW_T)) return true; - if (jj_3R_339()) return true; + if (jj_3R_349()) return true; return false; } @@ -3084,36 +2951,7 @@ void parseInline(); return false; } - inline bool jj_3R_682() - { - if (jj_done) return true; - Token * xsp; - if (jj_3R_695()) return true; - while (true) { - xsp = jj_scanpos; - if (jj_3R_695()) { jj_scanpos = xsp; break; } - } - return false; - } - - inline bool jj_3R_647() - { - if (jj_done) return true; - if (jj_scan_token(CASE_T)) return true; - if (jj_3R_61()) return true; - if (jj_scan_token(GENERATE_T)) return true; - if (jj_3R_682()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3_114()) jj_scanpos = xsp; - if (jj_scan_token(END_T)) return true; - if (jj_scan_token(GENERATE_T)) return true; - if (jj_3R_339()) return true; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - - inline bool jj_3R_276() + inline bool jj_3R_274() { if (jj_done) return true; if (jj_scan_token(WHEN_T)) return true; @@ -3121,7 +2959,7 @@ void parseInline(); return false; } - inline bool jj_3R_274() + inline bool jj_3R_272() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -3134,12 +2972,12 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_274()) jj_scanpos = xsp; + if (jj_3R_272()) jj_scanpos = xsp; if (jj_scan_token(EXIT_T)) return true; xsp = jj_scanpos; - if (jj_3R_275()) jj_scanpos = xsp; + if (jj_3R_273()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_276()) jj_scanpos = xsp; + if (jj_3R_274()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } @@ -3152,7 +2990,7 @@ void parseInline(); Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_253()) { jj_scanpos = xsp; break; } + if (jj_3R_251()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RPAREN_T)) return true; return false; @@ -3163,19 +3001,19 @@ void parseInline(); if (jj_done) return true; if (jj_scan_token(GENERIC_T)) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_329()) return true; + if (jj_3R_327()) return true; if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3R_220() + inline bool jj_3R_218() { if (jj_done) return true; - if (jj_3R_374()) return true; + if (jj_3R_369()) return true; return false; } - inline bool jj_3R_219() + inline bool jj_3R_217() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -3187,9 +3025,9 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_219()) return false; + if (!jj_3R_217()) return false; jj_scanpos = xsp; - if (jj_3R_220()) return true; + if (jj_3R_218()) return true; return false; } @@ -3204,36 +3042,36 @@ void parseInline(); return false; } - inline bool jj_3R_718() + inline bool jj_3R_685() { if (jj_done) return true; - if (jj_3R_374()) return true; + if (jj_3R_369()) return true; return false; } - inline bool jj_3R_717() + inline bool jj_3R_684() { if (jj_done) return true; if (jj_3R_63()) return true; return false; } - inline bool jj_3R_689() + inline bool jj_3R_661() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_717()) return false; + if (!jj_3R_684()) return false; jj_scanpos = xsp; - if (jj_3R_718()) return true; + if (jj_3R_685()) return true; return false; } - inline bool jj_3R_667() + inline bool jj_3R_645() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_666()) return true; + if (jj_3R_644()) return true; return false; } @@ -3259,10 +3097,10 @@ void parseInline(); if (jj_scan_token(IS_T)) return true; if (jj_scan_token(NEW_T)) return true; if (jj_3R_63()) return true; - if (jj_3R_247()) return true; + if (jj_3R_245()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_286()) jj_scanpos = xsp; + if (jj_3R_284()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } @@ -3277,11 +3115,11 @@ void parseInline(); if (jj_3R_63()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_670()) jj_scanpos = xsp; + if (jj_3R_648()) jj_scanpos = xsp; return false; } - inline bool jj_3R_445() + inline bool jj_3R_435() { if (jj_done) return true; if (jj_scan_token(DOT_T)) return true; @@ -3289,19 +3127,19 @@ void parseInline(); return false; } - inline bool jj_3R_498() + inline bool jj_3R_488() { if (jj_done) return true; - if (jj_3R_566()) return true; + if (jj_3R_554()) return true; if (jj_scan_token(COLON_T)) return true; - if (jj_3R_567()) return true; + if (jj_3R_555()) return true; return false; } - inline bool jj_3R_690() + inline bool jj_3R_662() { if (jj_done) return true; - if (jj_3R_247()) return true; + if (jj_3R_245()) return true; return false; } @@ -3313,84 +3151,84 @@ void parseInline(); if (jj_scan_token(IS_T)) return true; if (jj_scan_token(NEW_T)) return true; if (jj_3R_63()) return true; - if (jj_3R_247()) return true; + if (jj_3R_245()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_248()) jj_scanpos = xsp; + if (jj_3R_246()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_448() + inline bool jj_3R_438() { if (jj_done) return true; - if (jj_3R_353()) return true; + if (jj_3R_348()) return true; return false; } - inline bool jj_3R_617() + inline bool jj_3R_597() { if (jj_done) return true; if (jj_scan_token(ALL_T)) return true; return false; } - inline bool jj_3R_447() + inline bool jj_3R_437() { if (jj_done) return true; - if (jj_3R_351()) return true; + if (jj_3R_346()) return true; return false; } - inline bool jj_3R_616() + inline bool jj_3R_596() { if (jj_done) return true; if (jj_scan_token(OTHER_T)) return true; return false; } - inline bool jj_3R_354() + inline bool jj_3R_349() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_446()) return false; + if (!jj_3R_436()) return false; jj_scanpos = xsp; - if (!jj_3R_447()) return false; + if (!jj_3R_437()) return false; jj_scanpos = xsp; - if (jj_3R_448()) return true; + if (jj_3R_438()) return true; return false; } - inline bool jj_3R_446() + inline bool jj_3R_436() { if (jj_done) return true; - if (jj_3R_352()) return true; + if (jj_3R_347()) return true; return false; } - inline bool jj_3R_615() + inline bool jj_3R_595() { if (jj_done) return true; - if (jj_3R_666()) return true; + if (jj_3R_644()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_667()) { jj_scanpos = xsp; break; } + if (jj_3R_645()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_566() + inline bool jj_3R_554() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_615()) return false; + if (!jj_3R_595()) return false; jj_scanpos = xsp; - if (!jj_3R_616()) return false; + if (!jj_3R_596()) return false; jj_scanpos = xsp; - if (jj_3R_617()) return true; + if (jj_3R_597()) return true; return false; } @@ -3403,42 +3241,42 @@ void parseInline(); Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_190()) { jj_scanpos = xsp; break; } + if (jj_3R_188()) { jj_scanpos = xsp; break; } } if (jj_scan_token(END_T)) return true; xsp = jj_scanpos; if (jj_scan_token(32)) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_191()) jj_scanpos = xsp; + if (jj_3R_189()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_716() + inline bool jj_3R_683() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_666() + inline bool jj_3R_644() { if (jj_done) return true; - if (jj_3R_689()) return true; + if (jj_3R_661()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_690()) jj_scanpos = xsp; + if (jj_3R_662()) jj_scanpos = xsp; return false; } - inline bool jj_3R_265() + inline bool jj_3R_263() { if (jj_done) return true; - if (jj_3R_387()) return true; + if (jj_3R_382()) return true; return false; } - inline bool jj_3R_353() + inline bool jj_3R_348() { if (jj_done) return true; if (jj_scan_token(CONTEXT_T)) return true; @@ -3446,27 +3284,27 @@ void parseInline(); Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_445()) { jj_scanpos = xsp; break; } + if (jj_3R_435()) { jj_scanpos = xsp; break; } } if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_727() + inline bool jj_3R_692() { if (jj_done) return true; - if (jj_3R_735()) return true; + if (jj_3R_700()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_715() + inline bool jj_3R_682() { if (jj_done) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_727()) { jj_scanpos = xsp; break; } + if (jj_3R_692()) { jj_scanpos = xsp; break; } } return false; } @@ -3485,17 +3323,17 @@ void parseInline(); return false; } - inline bool jj_3R_755() + inline bool jj_3R_720() { if (jj_done) return true; - if (jj_3R_352()) return true; + if (jj_3R_347()) return true; return false; } - inline bool jj_3R_754() + inline bool jj_3R_719() { if (jj_done) return true; - if (jj_3R_400()) return true; + if (jj_3R_395()) return true; return false; } @@ -3506,65 +3344,65 @@ void parseInline(); return false; } - inline bool jj_3R_570() + inline bool jj_3R_558() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_569()) return true; + if (jj_3R_557()) return true; return false; } - inline bool jj_3R_753() + inline bool jj_3R_718() { if (jj_done) return true; - if (jj_3R_369()) return true; + if (jj_3R_364()) return true; return false; } - inline bool jj_3R_735() + inline bool jj_3R_700() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_753()) return false; + if (!jj_3R_718()) return false; jj_scanpos = xsp; - if (!jj_3R_754()) return false; + if (!jj_3R_719()) return false; jj_scanpos = xsp; - if (jj_3R_755()) return true; + if (jj_3R_720()) return true; return false; } - inline bool jj_3R_714() + inline bool jj_3R_681() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_264() + inline bool jj_3R_262() { if (jj_done) return true; - if (jj_3R_386()) return true; + if (jj_3R_381()) return true; return false; } - inline bool jj_3R_688() + inline bool jj_3R_660() { if (jj_done) return true; if (jj_scan_token(PROTECTED_T)) return true; - if (jj_3R_715()) 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_716()) jj_scanpos = xsp; + if (jj_3R_683()) jj_scanpos = xsp; return false; } - inline bool jj_3R_726() + inline bool jj_3R_691() { if (jj_done) return true; - if (jj_3R_734()) return true; + if (jj_3R_699()) return true; return false; } @@ -3575,25 +3413,25 @@ void parseInline(); return false; } - inline bool jj_3R_713() + inline bool jj_3R_680() { if (jj_done) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_726()) { jj_scanpos = xsp; break; } + if (jj_3R_691()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_752() + inline bool jj_3R_717() { if (jj_done) return true; - if (jj_3R_403()) return true; + if (jj_3R_398()) return true; return false; } - inline bool jj_3R_638() + inline bool jj_3R_618() { if (jj_done) return true; if (jj_scan_token(BOX_T)) return true; @@ -3607,28 +3445,28 @@ void parseInline(); return false; } - inline bool jj_3R_751() + inline bool jj_3R_716() { if (jj_done) return true; - if (jj_3R_352()) return true; + if (jj_3R_347()) return true; return false; } - inline bool jj_3R_750() + inline bool jj_3R_715() { if (jj_done) return true; - if (jj_3R_400()) return true; + if (jj_3R_395()) return true; return false; } - inline bool jj_3R_749() + inline bool jj_3R_714() { if (jj_done) return true; if (jj_3R_67()) return true; return false; } - inline bool jj_3R_371() + inline bool jj_3R_366() { if (jj_done) return true; if (jj_scan_token(ENTITY_T)) return true; @@ -3636,125 +3474,125 @@ void parseInline(); return false; } - inline bool jj_3R_748() + inline bool jj_3R_713() { if (jj_done) return true; - if (jj_3R_398()) return true; + if (jj_3R_393()) return true; return false; } - inline bool jj_3R_747() + inline bool jj_3R_712() { if (jj_done) return true; - if (jj_3R_397()) return true; + if (jj_3R_392()) return true; return false; } - inline bool jj_3R_746() + inline bool jj_3R_711() { if (jj_done) return true; - if (jj_3R_396()) return true; + if (jj_3R_391()) return true; return false; } - inline bool jj_3R_745() + inline bool jj_3R_710() { if (jj_done) return true; - if (jj_3R_394()) return true; + if (jj_3R_389()) return true; return false; } - inline bool jj_3R_744() + inline bool jj_3R_709() { if (jj_done) return true; - if (jj_3R_393()) return true; + if (jj_3R_388()) return true; return false; } - inline bool jj_3R_743() + inline bool jj_3R_708() { if (jj_done) return true; - if (jj_3R_392()) return true; + if (jj_3R_387()) return true; return false; } - inline bool jj_3R_742() + inline bool jj_3R_707() { if (jj_done) return true; - if (jj_3R_553()) return true; + if (jj_3R_540()) return true; return false; } - inline bool jj_3R_501() + inline bool jj_3R_491() { if (jj_done) return true; - if (jj_3R_569()) return true; + if (jj_3R_557()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_570()) { jj_scanpos = xsp; break; } + if (jj_3R_558()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_741() + inline bool jj_3R_706() { if (jj_done) return true; if (jj_3R_98()) return true; return false; } - inline bool jj_3R_734() + inline bool jj_3R_699() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_741()) return false; + if (!jj_3R_706()) return false; jj_scanpos = xsp; - if (!jj_3R_742()) return false; + if (!jj_3R_707()) return false; jj_scanpos = xsp; - if (!jj_3R_743()) return false; + if (!jj_3R_708()) return false; jj_scanpos = xsp; - if (!jj_3R_744()) return false; + if (!jj_3R_709()) return false; jj_scanpos = xsp; - if (!jj_3R_745()) return false; + if (!jj_3R_710()) return false; jj_scanpos = xsp; - if (!jj_3R_746()) return false; + if (!jj_3R_711()) return false; jj_scanpos = xsp; - if (!jj_3R_747()) return false; + if (!jj_3R_712()) return false; jj_scanpos = xsp; - if (!jj_3R_748()) return false; + if (!jj_3R_713()) return false; jj_scanpos = xsp; - if (!jj_3R_749()) return false; + if (!jj_3R_714()) return false; jj_scanpos = xsp; - if (!jj_3R_750()) return false; + if (!jj_3R_715()) return false; jj_scanpos = xsp; - if (!jj_3R_751()) return false; + if (!jj_3R_716()) return false; jj_scanpos = xsp; if (!jj_3_113()) return false; jj_scanpos = xsp; - if (jj_3R_752()) return true; + if (jj_3R_717()) return true; return false; } - inline bool jj_3R_263() + inline bool jj_3R_261() { if (jj_done) return true; - if (jj_3R_385()) return true; + if (jj_3R_380()) return true; return false; } - inline bool jj_3R_569() + inline bool jj_3R_557() { if (jj_done) return true; - if (jj_3R_567()) return true; + if (jj_3R_555()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_638()) jj_scanpos = xsp; + if (jj_3R_618()) jj_scanpos = xsp; return false; } - inline bool jj_3R_648() + inline bool jj_3R_626() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; @@ -3763,14 +3601,14 @@ void parseInline(); return false; } - inline bool jj_3R_634() + inline bool jj_3R_614() { if (jj_done) return true; if (jj_scan_token(FILE_T)) return true; return false; } - inline bool jj_3R_556() + inline bool jj_3R_544() { if (jj_done) return true; if (jj_scan_token(AFTER_T)) return true; @@ -3778,21 +3616,21 @@ void parseInline(); return false; } - inline bool jj_3R_633() + inline bool jj_3R_613() { if (jj_done) return true; if (jj_scan_token(GROUP_T)) return true; return false; } - inline bool jj_3R_632() + inline bool jj_3R_612() { if (jj_done) return true; if (jj_scan_token(UNITS_T)) return true; return false; } - inline bool jj_3R_631() + inline bool jj_3R_611() { if (jj_done) return true; if (jj_scan_token(LITERAL_T)) return true; @@ -3804,174 +3642,174 @@ void parseInline(); if (jj_done) return true; if (jj_scan_token(PROTECTED_T)) return true; if (jj_scan_token(BODY_T)) return true; - if (jj_3R_713()) 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; Token * xsp; xsp = jj_scanpos; - if (jj_3R_714()) jj_scanpos = xsp; + if (jj_3R_681()) jj_scanpos = xsp; return false; } - inline bool jj_3R_630() + inline bool jj_3R_610() { if (jj_done) return true; if (jj_scan_token(LABEL_T)) return true; return false; } - inline bool jj_3R_529() + inline bool jj_3R_519() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_473()) return true; + if (jj_3R_463()) return true; return false; } - inline bool jj_3R_629() + inline bool jj_3R_609() { if (jj_done) return true; if (jj_scan_token(COMPONENT_T)) return true; return false; } - inline bool jj_3R_628() + inline bool jj_3R_608() { if (jj_done) return true; if (jj_scan_token(VARIABLE_T)) return true; return false; } - inline bool jj_3R_627() + inline bool jj_3R_607() { if (jj_done) return true; if (jj_scan_token(SIGNAL_T)) return true; return false; } - inline bool jj_3R_626() + inline bool jj_3R_606() { if (jj_done) return true; if (jj_scan_token(CONSTANT_T)) return true; return false; } - inline bool jj_3R_625() + inline bool jj_3R_605() { if (jj_done) return true; if (jj_scan_token(SUBTYPE_T)) return true; return false; } - inline bool jj_3R_624() + inline bool jj_3R_604() { if (jj_done) return true; if (jj_scan_token(TYPE_T)) return true; return false; } - inline bool jj_3R_623() + inline bool jj_3R_603() { if (jj_done) return true; if (jj_scan_token(PACKAGE_T)) return true; return false; } - inline bool jj_3R_622() + inline bool jj_3R_602() { if (jj_done) return true; if (jj_scan_token(FUNCTION_T)) return true; return false; } - inline bool jj_3R_621() + inline bool jj_3R_601() { if (jj_done) return true; if (jj_scan_token(PROCEDURE_T)) return true; return false; } - inline bool jj_3R_620() + inline bool jj_3R_600() { if (jj_done) return true; if (jj_scan_token(CONFIGURATION_T)) return true; return false; } - inline bool jj_3R_619() + inline bool jj_3R_599() { if (jj_done) return true; if (jj_scan_token(ARCHITECTURE_T)) return true; return false; } - inline bool jj_3R_473() + inline bool jj_3R_463() { if (jj_done) return true; if (jj_3R_61()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_556()) jj_scanpos = xsp; + if (jj_3R_544()) jj_scanpos = xsp; return false; } - inline bool jj_3R_618() + inline bool jj_3R_598() { if (jj_done) return true; if (jj_scan_token(ENTITY_T)) return true; return false; } - inline bool jj_3R_567() + inline bool jj_3R_555() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_618()) return false; + if (!jj_3R_598()) return false; jj_scanpos = xsp; - if (!jj_3R_619()) return false; + if (!jj_3R_599()) return false; jj_scanpos = xsp; - if (!jj_3R_620()) return false; + if (!jj_3R_600()) return false; jj_scanpos = xsp; - if (!jj_3R_621()) return false; + if (!jj_3R_601()) return false; jj_scanpos = xsp; - if (!jj_3R_622()) return false; + if (!jj_3R_602()) return false; jj_scanpos = xsp; - if (!jj_3R_623()) return false; + if (!jj_3R_603()) return false; jj_scanpos = xsp; - if (!jj_3R_624()) return false; + if (!jj_3R_604()) return false; jj_scanpos = xsp; - if (!jj_3R_625()) return false; + if (!jj_3R_605()) return false; jj_scanpos = xsp; - if (!jj_3R_626()) return false; + if (!jj_3R_606()) return false; jj_scanpos = xsp; - if (!jj_3R_627()) return false; + if (!jj_3R_607()) return false; jj_scanpos = xsp; - if (!jj_3R_628()) return false; + if (!jj_3R_608()) return false; jj_scanpos = xsp; - if (!jj_3R_629()) return false; + if (!jj_3R_609()) return false; jj_scanpos = xsp; - if (!jj_3R_630()) return false; + if (!jj_3R_610()) return false; jj_scanpos = xsp; - if (!jj_3R_631()) return false; + if (!jj_3R_611()) return false; jj_scanpos = xsp; - if (!jj_3R_632()) return false; + if (!jj_3R_612()) return false; jj_scanpos = xsp; - if (!jj_3R_633()) return false; + if (!jj_3R_613()) return false; jj_scanpos = xsp; - if (jj_3R_634()) return true; + if (jj_3R_614()) return true; return false; } - inline bool jj_3R_596() + inline bool jj_3R_576() { if (jj_done) return true; if (jj_scan_token(OPEN_T)) return true; return false; } - inline bool jj_3R_595() + inline bool jj_3R_575() { if (jj_done) return true; if (jj_scan_token(CONFIGURATION_T)) return true; @@ -3979,61 +3817,61 @@ void parseInline(); return false; } - inline bool jj_3R_427() + inline bool jj_3R_422() { if (jj_done) return true; if (jj_scan_token(UNAFFECTED_T)) return true; return false; } - inline bool jj_3R_594() + inline bool jj_3R_574() { if (jj_done) return true; if (jj_scan_token(ENTITY_T)) return true; if (jj_3R_63()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_648()) jj_scanpos = xsp; + if (jj_3R_626()) jj_scanpos = xsp; return false; } - inline bool jj_3R_534() + inline bool jj_3R_521() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_594()) return false; + if (!jj_3R_574()) return false; jj_scanpos = xsp; - if (!jj_3R_595()) return false; + if (!jj_3R_575()) return false; jj_scanpos = xsp; - if (jj_3R_596()) return true; + if (jj_3R_576()) return true; return false; } - inline bool jj_3R_334() + inline bool jj_3R_332() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_426()) return false; + if (!jj_3R_421()) return false; jj_scanpos = xsp; - if (jj_3R_427()) return true; + if (jj_3R_422()) return true; return false; } - inline bool jj_3R_426() + inline bool jj_3R_421() { if (jj_done) return true; - if (jj_3R_473()) return true; + if (jj_3R_463()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_529()) { jj_scanpos = xsp; break; } + if (jj_3R_519()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_262() + inline bool jj_3R_260() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -4046,14 +3884,14 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_262()) jj_scanpos = xsp; + if (jj_3R_260()) jj_scanpos = xsp; if (jj_scan_token(WAIT_T)) return true; xsp = jj_scanpos; - if (jj_3R_263()) jj_scanpos = xsp; + if (jj_3R_261()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_264()) jj_scanpos = xsp; + if (jj_3R_262()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_265()) jj_scanpos = xsp; + if (jj_3R_263()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } @@ -4066,10 +3904,10 @@ void parseInline(); return false; } - inline bool jj_3R_740() + inline bool jj_3R_705() { if (jj_done) return true; - if (jj_3R_207()) return true; + if (jj_3R_205()) return true; if (jj_scan_token(COLON_T)) return true; if (jj_3R_89()) return true; if (jj_scan_token(SEMI_T)) return true; @@ -4083,11 +3921,11 @@ void parseInline(); return false; } - inline bool jj_3R_758() + inline bool jj_3R_723() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_757()) return true; + if (jj_3R_722()) return true; return false; } @@ -4098,7 +3936,7 @@ void parseInline(); return false; } - inline bool jj_3R_381() + inline bool jj_3R_376() { if (jj_done) return true; if (jj_3R_90()) return true; @@ -4106,12 +3944,12 @@ void parseInline(); return false; } - inline bool jj_3R_249() + inline bool jj_3R_247() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_381()) jj_scanpos = xsp; + if (jj_3R_376()) jj_scanpos = xsp; if (jj_3R_61()) return true; return false; } @@ -4141,7 +3979,7 @@ void parseInline(); return false; } - inline bool jj_3R_490() + inline bool jj_3R_480() { if (jj_done) return true; if (jj_scan_token(VARASSIGN_T)) return true; @@ -4149,51 +3987,51 @@ void parseInline(); return false; } - inline bool jj_3R_499() + inline bool jj_3R_489() { if (jj_done) return true; - if (jj_3R_568()) return true; + if (jj_3R_556()) return true; if (jj_scan_token(COLON_T)) return true; if (jj_3R_63()) return true; return false; } - inline bool jj_3R_396() + inline bool jj_3R_391() { if (jj_done) 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_207()) return true; + if (jj_3R_205()) return true; if (jj_scan_token(COLON_T)) return true; if (jj_3R_89()) return true; xsp = jj_scanpos; - if (jj_3R_490()) jj_scanpos = xsp; + if (jj_3R_480()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_500() + inline bool jj_3R_490() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_444()) return true; + if (jj_3R_434()) return true; return false; } - inline bool jj_3R_468() + inline bool jj_3R_458() { if (jj_done) return true; - if (jj_3R_555()) return true; + if (jj_3R_542()) return true; return false; } - inline bool jj_3R_402() + inline bool jj_3R_397() { if (jj_done) return true; if (jj_scan_token(DISCONNECT_T)) return true; - if (jj_3R_499()) return true; + if (jj_3R_489()) return true; if (jj_scan_token(AFTER_T)) return true; if (jj_3R_61()) return true; if (jj_scan_token(SEMI_T)) return true; @@ -4215,18 +4053,18 @@ void parseInline(); return false; } - inline bool jj_3R_383() + inline bool jj_3R_378() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_467()) return false; + if (!jj_3R_457()) return false; jj_scanpos = xsp; - if (jj_3R_468()) return true; + if (jj_3R_458()) return true; return false; } - inline bool jj_3R_467() + inline bool jj_3R_457() { if (jj_done) return true; Token * xsp; @@ -4239,7 +4077,7 @@ void parseInline(); return false; } - inline bool jj_3R_487() + inline bool jj_3R_477() { if (jj_done) return true; if (jj_scan_token(VARASSIGN_T)) return true; @@ -4265,46 +4103,46 @@ void parseInline(); return false; } - inline bool jj_3R_601() + inline bool jj_3R_581() { if (jj_done) return true; - if (jj_3R_323()) return true; + if (jj_3R_321()) return true; return false; } - inline bool jj_3R_600() + inline bool jj_3R_580() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_549() + inline bool jj_3R_536() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_600()) return false; + if (!jj_3R_580()) return false; jj_scanpos = xsp; - if (jj_3R_601()) return true; + if (jj_3R_581()) return true; return false; } - inline bool jj_3R_352() + inline bool jj_3R_347() { if (jj_done) return true; if (jj_scan_token(USE_T)) return true; - if (jj_3R_444()) return true; + if (jj_3R_434()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_500()) { jj_scanpos = xsp; break; } + if (jj_3R_490()) { jj_scanpos = xsp; break; } } if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_585() + inline bool jj_3R_573() { if (jj_done) return true; if (jj_scan_token(REJECT_T)) return true; @@ -4319,26 +4157,26 @@ void parseInline(); return false; } - inline bool jj_3R_528() + inline bool jj_3R_518() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_585()) jj_scanpos = xsp; + if (jj_3R_573()) jj_scanpos = xsp; if (jj_scan_token(INERTIAL_T)) return true; return false; } - inline bool jj_3R_739() + inline bool jj_3R_704() { if (jj_done) return true; if (jj_scan_token(ARRAY_T)) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_757()) return true; + if (jj_3R_722()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_758()) { jj_scanpos = xsp; break; } + if (jj_3R_723()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RPAREN_T)) return true; if (jj_scan_token(OF_T)) return true; @@ -4346,7 +4184,7 @@ void parseInline(); return false; } - inline bool jj_3R_527() + inline bool jj_3R_517() { if (jj_done) return true; if (jj_scan_token(TRANSPORT_T)) return true; @@ -4360,14 +4198,14 @@ void parseInline(); return false; } - inline bool jj_3R_425() + inline bool jj_3R_420() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_527()) return false; + if (!jj_3R_517()) return false; jj_scanpos = xsp; - if (jj_3R_528()) return true; + if (jj_3R_518()) return true; return false; } @@ -4385,24 +4223,24 @@ void parseInline(); return false; } - inline bool jj_3R_195() + inline bool jj_3R_193() { if (jj_done) return true; if (jj_3R_139()) return true; return false; } - inline bool jj_3R_665() + inline bool jj_3R_643() { if (jj_done) return true; - if (jj_3R_688()) return true; + if (jj_3R_660()) return true; return false; } - inline bool jj_3R_189() + inline bool jj_3R_187() { if (jj_done) return true; - if (jj_3R_353()) return true; + if (jj_3R_348()) return true; return false; } @@ -4413,7 +4251,7 @@ void parseInline(); return false; } - inline bool jj_3R_188() + inline bool jj_3R_186() { if (jj_done) return true; if (jj_3R_87()) return true; @@ -4427,38 +4265,38 @@ void parseInline(); return false; } - inline bool jj_3R_664() + inline bool jj_3R_642() { if (jj_done) return true; - if (jj_3R_687()) return true; + if (jj_3R_659()) return true; return false; } - inline bool jj_3R_187() + inline bool jj_3R_185() { if (jj_done) return true; - if (jj_3R_352()) return true; + if (jj_3R_347()) return true; return false; } - inline bool jj_3R_663() + inline bool jj_3R_641() { if (jj_done) return true; - if (jj_3R_686()) return true; + if (jj_3R_658()) return true; return false; } - inline bool jj_3R_662() + inline bool jj_3R_640() { if (jj_done) return true; - if (jj_3R_685()) return true; + if (jj_3R_657()) return true; return false; } - inline bool jj_3R_186() + inline bool jj_3R_184() { if (jj_done) return true; - if (jj_3R_351()) return true; + if (jj_3R_346()) return true; return false; } @@ -4467,43 +4305,43 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_186()) return false; + if (!jj_3R_184()) return false; jj_scanpos = xsp; - if (!jj_3R_187()) return false; + if (!jj_3R_185()) return false; jj_scanpos = xsp; - if (!jj_3R_188()) return false; + if (!jj_3R_186()) return false; jj_scanpos = xsp; - if (jj_3R_189()) return true; + if (jj_3R_187()) return true; return false; } - inline bool jj_3R_661() + inline bool jj_3R_639() { if (jj_done) return true; - if (jj_3R_684()) return true; + if (jj_3R_656()) return true; return false; } - inline bool jj_3R_608() + inline bool jj_3R_588() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_661()) return false; + if (!jj_3R_639()) return false; jj_scanpos = xsp; - if (!jj_3R_662()) return false; + if (!jj_3R_640()) return false; jj_scanpos = xsp; - if (!jj_3R_663()) return false; + if (!jj_3R_641()) return false; jj_scanpos = xsp; - if (!jj_3R_664()) return false; + if (!jj_3R_642()) return false; jj_scanpos = xsp; if (!jj_3_110()) return false; jj_scanpos = xsp; - if (jj_3R_665()) return true; + if (jj_3R_643()) return true; return false; } - inline bool jj_3R_288() + inline bool jj_3R_286() { if (jj_done) return true; if (jj_3R_65()) return true; @@ -4515,30 +4353,30 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_287()) return false; + if (!jj_3R_285()) return false; jj_scanpos = xsp; - if (jj_3R_288()) return true; + if (jj_3R_286()) return true; return false; } - inline bool jj_3R_287() + inline bool jj_3R_285() { if (jj_done) return true; if (jj_3R_86()) return true; return false; } - inline bool jj_3R_194() + inline bool jj_3R_192() { if (jj_done) return true; if (jj_3R_63()) return true; return false; } - inline bool jj_3R_486() + inline bool jj_3R_476() { if (jj_done) return true; - if (jj_3R_559()) return true; + if (jj_3R_547()) return true; return false; } @@ -4549,14 +4387,14 @@ void parseInline(); return false; } - inline bool jj_3R_392() + inline bool jj_3R_387() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; if (!jj_3_109()) return false; jj_scanpos = xsp; - if (jj_3R_486()) return true; + if (jj_3R_476()) return true; return false; } @@ -4585,7 +4423,7 @@ void parseInline(); return false; } - inline bool jj_3R_738() + inline bool jj_3R_703() { if (jj_done) return true; if (jj_scan_token(ARRAY_T)) return true; @@ -4595,7 +4433,7 @@ void parseInline(); return false; } - inline bool jj_3R_387() + inline bool jj_3R_382() { if (jj_done) return true; if (jj_scan_token(FOR_T)) return true; @@ -4615,21 +4453,21 @@ void parseInline(); return false; } - inline bool jj_3R_394() + inline bool jj_3R_389() { if (jj_done) return true; if (jj_scan_token(CONSTANT_T)) return true; - if (jj_3R_207()) return true; + if (jj_3R_205()) return true; if (jj_scan_token(COLON_T)) return true; if (jj_3R_89()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_487()) jj_scanpos = xsp; + if (jj_3R_477()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_258() + inline bool jj_3R_256() { if (jj_done) return true; if (jj_3R_114()) return true; @@ -4641,9 +4479,9 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_257()) return false; + if (!jj_3R_255()) return false; jj_scanpos = xsp; - if (jj_3R_258()) return true; + if (jj_3R_256()) return true; return false; } @@ -4654,7 +4492,7 @@ void parseInline(); return false; } - inline bool jj_3R_257() + inline bool jj_3R_255() { if (jj_done) return true; if (jj_3R_63()) return true; @@ -4668,41 +4506,41 @@ void parseInline(); return false; } - inline bool jj_3R_230() + inline bool jj_3R_228() { if (jj_done) return true; if (jj_scan_token(ALL_T)) return true; return false; } - inline bool jj_3R_401() + inline bool jj_3R_396() { if (jj_done) return true; if (jj_scan_token(FOR_T)) return true; - if (jj_3R_183()) return true; - if (jj_3R_349()) 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_3R_229() + inline bool jj_3R_227() { if (jj_done) return true; - if (jj_3R_323()) return true; + if (jj_3R_321()) return true; return false; } - inline bool jj_3R_228() + inline bool jj_3R_226() { if (jj_done) return true; - if (jj_3R_374()) return true; + if (jj_3R_369()) return true; return false; } - inline bool jj_3R_599() + inline bool jj_3R_579() { if (jj_done) return true; - if (jj_3R_350()) return true; + if (jj_3R_345()) return true; return false; } @@ -4711,38 +4549,38 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_227()) return false; + if (!jj_3R_225()) return false; jj_scanpos = xsp; - if (!jj_3R_228()) return false; + if (!jj_3R_226()) return false; jj_scanpos = xsp; - if (!jj_3R_229()) return false; + if (!jj_3R_227()) return false; jj_scanpos = xsp; - if (jj_3R_230()) return true; + if (jj_3R_228()) return true; return false; } - inline bool jj_3R_227() + inline bool jj_3R_225() { if (jj_done) return true; if (jj_3R_63()) return true; return false; } - inline bool jj_3R_598() + inline bool jj_3R_578() { if (jj_done) return true; if (jj_3R_84()) return true; return false; } - inline bool jj_3R_536() + inline bool jj_3R_523() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_598()) return false; + if (!jj_3R_578()) return false; jj_scanpos = xsp; - if (jj_3R_599()) return true; + if (jj_3R_579()) return true; return false; } @@ -4759,13 +4597,13 @@ void parseInline(); Token * xsp; xsp = jj_scanpos; if (jj_3_105()) jj_scanpos = xsp; - if (jj_3R_194()) return true; + if (jj_3R_192()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_194()) { jj_scanpos = xsp; break; } + if (jj_3R_192()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_195()) jj_scanpos = xsp; + if (jj_3R_193()) jj_scanpos = xsp; return false; } @@ -4787,7 +4625,7 @@ void parseInline(); return false; } - inline bool jj_3R_393() + inline bool jj_3R_388() { if (jj_done) return true; if (jj_scan_token(SUBTYPE_T)) return true; @@ -4798,25 +4636,25 @@ void parseInline(); return false; } - inline bool jj_3R_659() + inline bool jj_3R_637() { if (jj_done) return true; if (jj_3R_117()) return true; return false; } - inline bool jj_3R_604() + inline bool jj_3R_584() { if (jj_done) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_659()) { jj_scanpos = xsp; break; } + if (jj_3R_637()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_372() + inline bool jj_3R_367() { if (jj_done) return true; if (jj_scan_token(CONFIGURATION_T)) return true; @@ -4824,7 +4662,7 @@ void parseInline(); return false; } - inline bool jj_3R_336() + inline bool jj_3R_334() { if (jj_done) return true; if (jj_scan_token(WHEN_T)) return true; @@ -4832,21 +4670,21 @@ void parseInline(); return false; } - inline bool jj_3R_335() + inline bool jj_3R_333() { if (jj_done) return true; if (jj_scan_token(WHEN_T)) return true; if (jj_3R_83()) return true; if (jj_scan_token(ELSE_T)) return true; - if (jj_3R_334()) return true; + if (jj_3R_332()) return true; return false; } - inline bool jj_3R_552() + inline bool jj_3R_539() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_602()) return true; + if (jj_3R_582()) return true; if (jj_scan_token(RPAREN_T)) return true; return false; } @@ -4854,14 +4692,14 @@ void parseInline(); inline bool jj_3R_173() { if (jj_done) return true; - if (jj_3R_334()) return true; + if (jj_3R_332()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_335()) { jj_scanpos = xsp; break; } + if (jj_3R_333()) { jj_scanpos = xsp; break; } } xsp = jj_scanpos; - if (jj_3R_336()) jj_scanpos = xsp; + if (jj_3R_334()) jj_scanpos = xsp; return false; } @@ -4876,7 +4714,7 @@ void parseInline(); return false; } - inline bool jj_3R_551() + inline bool jj_3R_538() { if (jj_done) return true; Token * xsp; @@ -4894,16 +4732,16 @@ void parseInline(); return false; } - inline bool jj_3R_461() + inline bool jj_3R_451() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_551()) jj_scanpos = xsp; + if (jj_3R_538()) jj_scanpos = xsp; if (jj_scan_token(FUNCTION_T)) return true; - if (jj_3R_549()) return true; + if (jj_3R_536()) return true; xsp = jj_scanpos; - if (jj_3R_552()) jj_scanpos = xsp; + if (jj_3R_539()) jj_scanpos = xsp; if (jj_scan_token(RETURN_T)) return true; if (jj_3R_161()) return true; return false; @@ -4916,16 +4754,16 @@ void parseInline(); return false; } - inline bool jj_3R_550() + inline bool jj_3R_537() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_329()) return true; + if (jj_3R_327()) return true; if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3R_386() + inline bool jj_3R_381() { if (jj_done) return true; if (jj_scan_token(UNTIL_T)) return true; @@ -4961,30 +4799,30 @@ void parseInline(); return false; } - inline bool jj_3R_369() + inline bool jj_3R_364() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_460()) return false; + if (!jj_3R_450()) return false; jj_scanpos = xsp; - if (jj_3R_461()) return true; + if (jj_3R_451()) return true; return false; } - inline bool jj_3R_460() + inline bool jj_3R_450() { if (jj_done) return true; if (jj_scan_token(PROCEDURE_T)) return true; - if (jj_3R_549()) return true; + if (jj_3R_536()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_550()) jj_scanpos = xsp; + if (jj_3R_537()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3_103()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_3_104()) jj_scanpos = xsp; - if (jj_3R_452()) return true; + if (jj_3R_442()) return true; return false; } @@ -5008,14 +4846,7 @@ void parseInline(); return false; } - inline bool jj_3R_593() - { - if (jj_done) return true; - if (jj_3R_82()) return true; - return false; - } - - inline bool jj_3R_660() + inline bool jj_3R_638() { if (jj_done) return true; Token * xsp; @@ -5026,45 +4857,24 @@ void parseInline(); return false; } - inline bool jj_3R_592() - { - if (jj_done) return true; - if (jj_3R_81()) return true; - return false; - } - - inline bool jj_3_20() - { - if (jj_done) return true; - if (jj_3R_78()) return true; - return false; - } - - inline bool jj_3R_658() + inline bool jj_3R_636() { if (jj_done) return true; - if (jj_3R_683()) return true; + if (jj_3R_655()) return true; return false; } - inline bool jj_3R_603() + inline bool jj_3R_583() { if (jj_done) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_658()) { jj_scanpos = xsp; break; } + if (jj_3R_636()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_591() - { - if (jj_done) return true; - if (jj_3R_80()) return true; - return false; - } - inline bool jj_3R_77() { if (jj_done) return true; @@ -5085,13 +4895,6 @@ void parseInline(); return false; } - inline bool jj_3R_590() - { - if (jj_done) return true; - if (jj_3R_92()) return true; - return false; - } - inline bool jj_3R_76() { if (jj_done) return true; @@ -5117,31 +4920,24 @@ void parseInline(); return false; } - inline bool jj_3R_708() - { - if (jj_done) return true; - if (jj_3R_403()) return true; - return false; - } - - inline bool jj_3R_589() + inline bool jj_3R_675() { if (jj_done) return true; - if (jj_3R_647()) return true; + if (jj_3R_398()) return true; return false; } - inline bool jj_3R_588() + inline bool jj_3_20() { if (jj_done) return true; if (jj_3R_78()) return true; return false; } - inline bool jj_3R_707() + inline bool jj_3R_674() { if (jj_done) return true; - if (jj_3R_352()) return true; + if (jj_3R_347()) return true; return false; } @@ -5152,70 +4948,31 @@ void parseInline(); return false; } - inline bool jj_3R_706() - { - if (jj_done) return true; - if (jj_3R_400()) return true; - return false; - } - - inline bool jj_3R_587() + inline bool jj_3R_673() { if (jj_done) return true; - if (jj_3R_93()) return true; + if (jj_3R_395()) return true; return false; } - inline bool jj_3R_705() + inline bool jj_3R_672() { if (jj_done) return true; if (jj_3R_67()) return true; return false; } - inline bool jj_3R_704() - { - if (jj_done) return true; - if (jj_3R_398()) return true; - return false; - } - - inline bool jj_3R_586() - { - if (jj_done) return true; - if (jj_3R_646()) return true; - return false; - } - - inline bool jj_3R_531() + inline bool jj_3R_671() { if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (!jj_3R_586()) return false; - jj_scanpos = xsp; - if (!jj_3R_587()) return false; - jj_scanpos = xsp; - if (!jj_3R_588()) return false; - jj_scanpos = xsp; - if (!jj_3R_589()) return false; - jj_scanpos = xsp; - if (!jj_3R_590()) return false; - jj_scanpos = xsp; - if (!jj_3R_591()) return false; - jj_scanpos = xsp; - if (!jj_3R_592()) return false; - jj_scanpos = xsp; - if (!jj_3R_593()) return false; - jj_scanpos = xsp; - if (jj_scan_token(189)) return true; + if (jj_3R_393()) return true; return false; } - inline bool jj_3R_703() + inline bool jj_3R_670() { if (jj_done) return true; - if (jj_3R_397()) return true; + if (jj_3R_392()) return true; return false; } @@ -5226,96 +4983,96 @@ void parseInline(); return false; } - inline bool jj_3R_702() + inline bool jj_3R_669() { if (jj_done) return true; - if (jj_3R_396()) return true; + if (jj_3R_391()) return true; return false; } - inline bool jj_3R_606() + inline bool jj_3R_586() { if (jj_done) return true; - if (jj_3R_549()) return true; + if (jj_3R_536()) return true; return false; } - inline bool jj_3R_701() + inline bool jj_3R_668() { if (jj_done) return true; - if (jj_3R_394()) return true; + if (jj_3R_389()) return true; return false; } - inline bool jj_3R_700() + inline bool jj_3R_667() { if (jj_done) return true; - if (jj_3R_393()) return true; + if (jj_3R_388()) return true; return false; } - inline bool jj_3R_699() + inline bool jj_3R_666() { if (jj_done) return true; - if (jj_3R_553()) return true; + if (jj_3R_540()) return true; return false; } - inline bool jj_3R_698() + inline bool jj_3R_665() { if (jj_done) return true; - if (jj_3R_392()) return true; + if (jj_3R_387()) return true; return false; } - inline bool jj_3R_178() + inline bool jj_3R_176() { if (jj_done) return true; - if (jj_3R_342()) return true; + if (jj_3R_337()) return true; return false; } - inline bool jj_3R_697() + inline bool jj_3R_664() { if (jj_done) return true; if (jj_3R_98()) return true; return false; } - inline bool jj_3R_683() + inline bool jj_3R_655() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_697()) return false; + if (!jj_3R_664()) return false; jj_scanpos = xsp; - if (!jj_3R_698()) return false; + if (!jj_3R_665()) return false; jj_scanpos = xsp; - if (!jj_3R_699()) return false; + if (!jj_3R_666()) return false; jj_scanpos = xsp; - if (!jj_3R_700()) return false; + if (!jj_3R_667()) return false; jj_scanpos = xsp; - if (!jj_3R_701()) return false; + if (!jj_3R_668()) return false; jj_scanpos = xsp; - if (!jj_3R_702()) return false; + if (!jj_3R_669()) return false; jj_scanpos = xsp; - if (!jj_3R_703()) return false; + if (!jj_3R_670()) return false; jj_scanpos = xsp; - if (!jj_3R_704()) return false; + if (!jj_3R_671()) return false; jj_scanpos = xsp; - if (!jj_3R_705()) return false; + if (!jj_3R_672()) return false; jj_scanpos = xsp; - if (!jj_3R_706()) return false; + if (!jj_3R_673()) return false; jj_scanpos = xsp; - if (!jj_3R_707()) return false; + if (!jj_3R_674()) return false; jj_scanpos = xsp; if (!jj_3_102()) return false; jj_scanpos = xsp; - if (jj_3R_708()) return true; + if (jj_3R_675()) return true; return false; } - inline bool jj_3R_177() + inline bool jj_3R_175() { if (jj_done) return true; if (jj_3R_75()) return true; @@ -5330,7 +5087,7 @@ void parseInline(); return false; } - inline bool jj_3R_489() + inline bool jj_3R_479() { if (jj_done) return true; if (jj_scan_token(VARASSIGN_T)) return true; @@ -5347,9 +5104,9 @@ void parseInline(); xsp = jj_scanpos; if (jj_scan_token(79)) jj_scanpos = xsp; xsp = jj_scanpos; - if (!jj_3R_177()) return false; + if (!jj_3R_175()) return false; jj_scanpos = xsp; - if (jj_3R_178()) return true; + if (jj_3R_176()) return true; return false; } @@ -5360,21 +5117,21 @@ void parseInline(); return false; } - inline bool jj_3R_370() + inline bool jj_3R_365() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_462()) return false; + if (!jj_3R_452()) return false; jj_scanpos = xsp; if (jj_scan_token(137)) return true; return false; } - inline bool jj_3R_462() + inline bool jj_3R_452() { if (jj_done) return true; - if (jj_3R_553()) return true; + if (jj_3R_540()) return true; return false; } @@ -5394,7 +5151,7 @@ void parseInline(); if (jj_3_15()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(79)) jj_scanpos = xsp; - if (jj_3R_182()) return true; + if (jj_3R_180()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } @@ -5414,11 +5171,11 @@ void parseInline(); return false; } - inline bool jj_3R_211() + inline bool jj_3R_209() { if (jj_done) return true; - if (jj_3R_369()) return true; - if (jj_3R_370()) return true; + if (jj_3R_364()) return true; + if (jj_3R_365()) return true; return false; } @@ -5430,19 +5187,19 @@ void parseInline(); if (jj_3_14()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(79)) jj_scanpos = xsp; - if (jj_3R_198()) return true; + if (jj_3R_196()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_605() + inline bool jj_3R_585() { if (jj_done) return true; - if (jj_3R_660()) return true; + if (jj_3R_638()) return true; return false; } - inline bool jj_3R_210() + inline bool jj_3R_208() { if (jj_done) return true; if (jj_3R_135()) return true; @@ -5454,9 +5211,9 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_210()) return false; + if (!jj_3R_208()) return false; jj_scanpos = xsp; - if (jj_3R_211()) return true; + if (jj_3R_209()) return true; return false; } @@ -5468,63 +5225,63 @@ void parseInline(); return false; } - inline bool jj_3R_712() + inline bool jj_3R_679() { if (jj_done) return true; - if (jj_3R_725()) return true; + if (jj_3R_690()) return true; return false; } - inline bool jj_3R_711() + inline bool jj_3R_678() { if (jj_done) return true; - if (jj_3R_724()) return true; + if (jj_3R_689()) return true; return false; } - inline bool jj_3R_685() + inline bool jj_3R_657() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_711()) return false; + if (!jj_3R_678()) return false; jj_scanpos = xsp; - if (jj_3R_712()) return true; + if (jj_3R_679()) return true; return false; } - inline bool jj_3R_181() + inline bool jj_3R_179() { if (jj_done) return true; - if (jj_3R_346()) return true; + if (jj_3R_341()) return true; return false; } - inline bool jj_3R_180() + inline bool jj_3R_178() { if (jj_done) return true; if (jj_3R_73()) return true; return false; } - inline bool jj_3R_497() + inline bool jj_3R_487() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_488() + inline bool jj_3R_478() { if (jj_done) return true; - if (jj_3R_560()) return true; + if (jj_3R_548()) return true; return false; } - inline bool jj_3R_183() + inline bool jj_3R_181() { if (jj_done) return true; - if (jj_3R_348()) return true; + if (jj_3R_343()) return true; if (jj_scan_token(COLON_T)) return true; if (jj_3R_63()) return true; return false; @@ -5538,19 +5295,19 @@ void parseInline(); return false; } - inline bool jj_3R_553() + inline bool jj_3R_540() { if (jj_done) return true; if (jj_scan_token(IS_T)) return true; - if (jj_3R_603()) return true; + if (jj_3R_583()) return true; if (jj_scan_token(BEGIN_T)) return true; - if (jj_3R_604()) return true; + if (jj_3R_584()) return true; if (jj_scan_token(END_T)) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_605()) jj_scanpos = xsp; + if (jj_3R_585()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_606()) jj_scanpos = xsp; + if (jj_3R_586()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } @@ -5560,53 +5317,53 @@ void parseInline(); if (jj_done) return true; if (jj_3R_74()) return true; if (jj_scan_token(COLON_T)) return true; - if (jj_3R_179()) return true; + if (jj_3R_177()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_180()) jj_scanpos = xsp; + if (jj_3R_178()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_181()) jj_scanpos = xsp; + if (jj_3R_179()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_378() + inline bool jj_3R_373() { if (jj_done) return true; if (jj_scan_token(STRINGLITERAL)) return true; return false; } - inline bool jj_3R_496() + inline bool jj_3R_486() { if (jj_done) return true; - if (jj_3R_565()) return true; + if (jj_3R_553()) return true; return false; } - inline bool jj_3R_495() + inline bool jj_3R_485() { if (jj_done) return true; if (jj_3R_69()) return true; return false; } - inline bool jj_3R_185() + inline bool jj_3R_183() { if (jj_done) return true; - if (jj_3R_350()) return true; + if (jj_3R_345()) return true; return false; } - inline bool jj_3R_184() + inline bool jj_3R_182() { if (jj_done) return true; - if (jj_3R_349()) return true; + if (jj_3R_344()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_463() + inline bool jj_3R_453() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; @@ -5614,15 +5371,15 @@ void parseInline(); return false; } - inline bool jj_3R_197() + inline bool jj_3R_195() { if (jj_done) return true; if (jj_scan_token(BAR_T)) return true; - if (jj_3R_196()) return true; + if (jj_3R_194()) return true; return false; } - inline bool jj_3R_399() + inline bool jj_3R_394() { if (jj_done) return true; if (jj_scan_token(COMPONENT_T)) return true; @@ -5631,30 +5388,21 @@ void parseInline(); xsp = jj_scanpos; if (jj_scan_token(56)) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_495()) jj_scanpos = xsp; + if (jj_3R_485()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_496()) jj_scanpos = xsp; + 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_497()) jj_scanpos = xsp; - if (jj_scan_token(SEMI_T)) return true; - return false; - } - - inline bool jj_3R_163() - { - if (jj_done) return true; - if (jj_3R_330()) 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_677() + inline bool jj_3R_163() { if (jj_done) return true; - if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_61()) return true; - if (jj_scan_token(RPAREN_T)) return true; + if (jj_3R_328()) return true; return false; } @@ -5676,19 +5424,19 @@ void parseInline(); { if (jj_done) return true; if (jj_scan_token(FOR_T)) return true; - if (jj_3R_183()) return true; + if (jj_3R_181()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_184()) jj_scanpos = xsp; + if (jj_3R_182()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_185()) jj_scanpos = xsp; + 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_380() + inline bool jj_3R_375() { if (jj_done) return true; if (jj_scan_token(RETURN_T)) return true; @@ -5696,7 +5444,7 @@ void parseInline(); return false; } - inline bool jj_3R_668() + inline bool jj_3R_646() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; @@ -5704,14 +5452,14 @@ void parseInline(); return false; } - inline bool jj_3R_379() + inline bool jj_3R_374() { if (jj_done) return true; if (jj_3R_63()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_463()) { jj_scanpos = xsp; break; } + if (jj_3R_453()) { jj_scanpos = xsp; break; } } return false; } @@ -5726,24 +5474,24 @@ void parseInline(); inline bool jj_3R_90() { if (jj_done) return true; - if (jj_3R_196()) return true; + if (jj_3R_194()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_197()) { jj_scanpos = xsp; break; } + if (jj_3R_195()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_247() + inline bool jj_3R_245() { if (jj_done) return true; if (jj_scan_token(LBRACKET_T)) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_379()) jj_scanpos = xsp; + if (jj_3R_374()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_380()) jj_scanpos = xsp; + if (jj_3R_375()) jj_scanpos = xsp; if (jj_scan_token(RBRACKET_T)) return true; return false; } @@ -5755,21 +5503,21 @@ void parseInline(); return false; } - inline bool jj_3R_637() + inline bool jj_3R_617() { if (jj_done) return true; if (jj_scan_token(ALL_T)) return true; return false; } - inline bool jj_3R_359() + inline bool jj_3R_354() { if (jj_done) return true; if (jj_scan_token(OTHER_T)) return true; return false; } - inline bool jj_3R_636() + inline bool jj_3R_616() { if (jj_done) return true; if (jj_scan_token(OTHER_T)) return true; @@ -5784,138 +5532,138 @@ void parseInline(); return false; } - inline bool jj_3R_358() + inline bool jj_3R_353() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_635() + inline bool jj_3R_615() { if (jj_done) return true; if (jj_3R_63()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_668()) { jj_scanpos = xsp; break; } + if (jj_3R_646()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_568() + inline bool jj_3R_556() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_635()) return false; + if (!jj_3R_615()) return false; jj_scanpos = xsp; - if (!jj_3R_636()) return false; + if (!jj_3R_616()) return false; jj_scanpos = xsp; - if (jj_3R_637()) return true; + if (jj_3R_617()) return true; return false; } - inline bool jj_3R_610() + inline bool jj_3R_590() { if (jj_done) return true; if (jj_scan_token(BUS_T)) return true; return false; } - inline bool jj_3R_357() + inline bool jj_3R_352() { if (jj_done) return true; if (jj_3R_72()) return true; return false; } - inline bool jj_3R_609() + inline bool jj_3R_589() { if (jj_done) return true; if (jj_scan_token(REGISTER_T)) return true; return false; } - inline bool jj_3R_560() + inline bool jj_3R_548() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_609()) return false; + if (!jj_3R_589()) return false; jj_scanpos = xsp; - if (jj_3R_610()) return true; + if (jj_3R_590()) return true; return false; } - inline bool jj_3R_356() + inline bool jj_3R_351() { if (jj_done) return true; if (jj_3R_70()) return true; return false; } - inline bool jj_3R_196() + inline bool jj_3R_194() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_355()) return false; + if (!jj_3R_350()) return false; jj_scanpos = xsp; - if (!jj_3R_356()) return false; + if (!jj_3R_351()) return false; jj_scanpos = xsp; - if (!jj_3R_357()) return false; + if (!jj_3R_352()) return false; jj_scanpos = xsp; - if (!jj_3R_358()) return false; + if (!jj_3R_353()) return false; jj_scanpos = xsp; - if (jj_3R_359()) return true; + if (jj_3R_354()) return true; return false; } - inline bool jj_3R_355() + inline bool jj_3R_350() { if (jj_done) return true; if (jj_3R_88()) return true; return false; } - inline bool jj_3R_656() + inline bool jj_3R_634() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_374() + inline bool jj_3R_369() { if (jj_done) return true; if (jj_scan_token(CHARACTER_LITERAL)) return true; return false; } - inline bool jj_3R_395() + inline bool jj_3R_390() { if (jj_done) return true; if (jj_scan_token(SIGNAL_T)) return true; - if (jj_3R_207()) return true; + if (jj_3R_205()) return true; if (jj_scan_token(COLON_T)) return true; if (jj_3R_89()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_488()) jj_scanpos = xsp; + if (jj_3R_478()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_489()) jj_scanpos = xsp; + if (jj_3R_479()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_654() + inline bool jj_3R_632() { if (jj_done) return true; if (jj_scan_token(WHEN_T)) return true; if (jj_3R_90()) return true; if (jj_scan_token(ARROW_T)) return true; - if (jj_3R_270()) return true; + if (jj_3R_268()) return true; return false; } @@ -5926,25 +5674,10 @@ void parseInline(); return false; } - inline bool jj_3R_681() - { - if (jj_done) return true; - if (jj_3R_74()) return true; - return false; - } - - inline bool jj_3R_655() - { - if (jj_done) return true; - if (jj_3R_654()) return true; - return false; - } - - inline bool jj_3R_719() + inline bool jj_3R_633() { if (jj_done) return true; - if (jj_3R_73()) return true; - if (jj_scan_token(SEMI_T)) return true; + if (jj_3R_632()) return true; return false; } @@ -5955,10 +5688,10 @@ void parseInline(); return false; } - inline bool jj_3R_554() + inline bool jj_3R_541() { if (jj_done) return true; - if (jj_3R_425()) return true; + if (jj_3R_420()) return true; return false; } @@ -5970,7 +5703,7 @@ void parseInline(); return false; } - inline bool jj_3R_466() + inline bool jj_3R_456() { if (jj_done) return true; Token * xsp; @@ -5979,48 +5712,48 @@ void parseInline(); if (jj_3R_119()) return true; if (jj_scan_token(LESSTHAN_T)) return true; xsp = jj_scanpos; - if (jj_3R_554()) jj_scanpos = xsp; - if (jj_3R_334()) return true; + if (jj_3R_541()) jj_scanpos = xsp; + if (jj_3R_332()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_465() + inline bool jj_3R_455() { if (jj_done) return true; if (jj_3R_132()) return true; return false; } - inline bool jj_3R_407() + inline bool jj_3R_402() { if (jj_done) return true; - if (jj_3R_504()) return true; + if (jj_3R_494()) return true; if (jj_3R_70()) return true; return false; } - inline bool jj_3R_382() + inline bool jj_3R_377() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_464()) return false; + if (!jj_3R_454()) return false; jj_scanpos = xsp; - if (!jj_3R_465()) return false; + if (!jj_3R_455()) return false; jj_scanpos = xsp; - if (jj_3R_466()) return true; + if (jj_3R_456()) return true; return false; } - inline bool jj_3R_464() + inline bool jj_3R_454() { if (jj_done) return true; if (jj_3R_131()) return true; return false; } - inline bool jj_3R_267() + inline bool jj_3R_265() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -6031,7 +5764,7 @@ void parseInline(); return false; } - inline bool jj_3R_422() + inline bool jj_3R_417() { if (jj_done) return true; if (jj_scan_token(MINUS_T)) return true; @@ -6043,174 +5776,125 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_267()) jj_scanpos = xsp; + if (jj_3R_265()) jj_scanpos = xsp; if (jj_scan_token(CASE_T)) return true; if (jj_3R_61()) return true; if (jj_scan_token(IS_T)) return true; - if (jj_3R_654()) return true; + if (jj_3R_632()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_655()) { jj_scanpos = xsp; break; } + if (jj_3R_633()) { 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_656()) jj_scanpos = xsp; + if (jj_3R_634()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_694() - { - if (jj_done) return true; - if (jj_3R_531()) return true; - return false; - } - - inline bool jj_3R_330() + inline bool jj_3R_328() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_421()) return false; + if (!jj_3R_416()) return false; jj_scanpos = xsp; - if (jj_3R_422()) return true; + if (jj_3R_417()) return true; return false; } - inline bool jj_3R_421() + inline bool jj_3R_416() { if (jj_done) return true; if (jj_scan_token(PLUS_T)) return true; return false; } - inline bool jj_3R_680() - { - if (jj_done) return true; - Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_694()) { jj_scanpos = xsp; break; } - } - return false; - } - - inline bool jj_3R_579() + inline bool jj_3R_567() { if (jj_done) return true; if (jj_scan_token(ROR_T)) return true; return false; } - inline bool jj_3R_578() + inline bool jj_3R_566() { if (jj_done) return true; if (jj_scan_token(ROL_T)) return true; return false; } - inline bool jj_3R_577() + inline bool jj_3R_565() { if (jj_done) return true; if (jj_scan_token(SRA_T)) return true; return false; } - inline bool jj_3R_576() + inline bool jj_3R_564() { if (jj_done) return true; if (jj_scan_token(SLA_T)) return true; return false; } - inline bool jj_3R_575() + inline bool jj_3R_563() { if (jj_done) return true; if (jj_scan_token(SRL_T)) return true; return false; } - inline bool jj_3R_574() + inline bool jj_3R_562() { if (jj_done) return true; if (jj_scan_token(SLL_T)) return true; return false; } - inline bool jj_3R_504() + inline bool jj_3R_494() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_574()) return false; + if (!jj_3R_562()) return false; jj_scanpos = xsp; - if (!jj_3R_575()) return false; + if (!jj_3R_563()) return false; jj_scanpos = xsp; - if (!jj_3R_576()) return false; + if (!jj_3R_564()) return false; jj_scanpos = xsp; - if (!jj_3R_577()) return false; + if (!jj_3R_565()) return false; jj_scanpos = xsp; - if (!jj_3R_578()) return false; + if (!jj_3R_566()) return false; jj_scanpos = xsp; - if (jj_3R_579()) return true; - return false; - } - - inline bool jj_3R_720() - { - if (jj_done) return true; - if (jj_3R_346()) return true; - if (jj_scan_token(SEMI_T)) return true; + if (jj_3R_567()) return true; return false; } - inline bool jj_3R_535() + inline bool jj_3R_522() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_597()) return true; + if (jj_3R_577()) return true; if (jj_scan_token(RPAREN_T)) return true; return false; } - inline bool jj_3R_320() + inline bool jj_3R_318() { if (jj_done) return true; if (jj_3R_70()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_407()) jj_scanpos = xsp; - return false; - } - - inline bool jj_3R_646() - { - if (jj_done) return true; - if (jj_3R_74()) 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_677()) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_scan_token(56)) jj_scanpos = xsp; - if (jj_3R_678()) return true; - if (jj_3R_679()) return true; - if (jj_scan_token(BEGIN_T)) return true; - if (jj_3R_680()) return true; - if (jj_scan_token(END_T)) return true; - if (jj_scan_token(BLOCK_T)) return true; - xsp = jj_scanpos; - if (jj_3R_681()) jj_scanpos = xsp; - if (jj_scan_token(SEMI_T)) return true; + if (jj_3R_402()) jj_scanpos = xsp; return false; } - inline bool jj_3R_256() + inline bool jj_3R_254() { if (jj_done) return true; - if (jj_3R_384()) return true; + if (jj_3R_379()) return true; return false; } @@ -6228,13 +5912,13 @@ void parseInline(); return false; } - inline bool jj_3R_441() + inline bool jj_3R_431() { if (jj_done) return true; if (jj_3R_63()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_535()) jj_scanpos = xsp; + if (jj_3R_522()) jj_scanpos = xsp; return false; } @@ -6252,16 +5936,6 @@ void parseInline(); return false; } - inline bool jj_3R_692() - { - if (jj_done) return true; - if (jj_3R_565()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_720()) jj_scanpos = xsp; - return false; - } - inline bool jj_3R_123() { if (jj_done) return true; @@ -6270,16 +5944,6 @@ void parseInline(); return false; } - inline bool jj_3R_691() - { - if (jj_done) return true; - if (jj_3R_69()) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_719()) jj_scanpos = xsp; - return false; - } - inline bool jj_3_88() { if (jj_done) return true; @@ -6298,24 +5962,6 @@ void parseInline(); return false; } - inline bool jj_3R_678() - { - if (jj_done) return true; - Token * xsp; - xsp = jj_scanpos; - if (jj_3R_691()) jj_scanpos = xsp; - xsp = jj_scanpos; - if (jj_3R_692()) jj_scanpos = xsp; - return false; - } - - inline bool jj_3R_693() - { - if (jj_done) return true; - if (jj_3R_146()) return true; - return false; - } - inline bool jj_3_91() { if (jj_done) return true; @@ -6323,17 +5969,6 @@ void parseInline(); return false; } - inline bool jj_3R_679() - { - if (jj_done) return true; - Token * xsp; - while (true) { - xsp = jj_scanpos; - if (jj_3R_693()) { jj_scanpos = xsp; break; } - } - return false; - } - inline bool jj_3_90() { if (jj_done) return true; @@ -6348,10 +5983,10 @@ void parseInline(); return false; } - inline bool jj_3R_313() + inline bool jj_3R_311() { if (jj_done) return true; - if (jj_3R_403()) return true; + if (jj_3R_398()) return true; return false; } @@ -6370,10 +6005,10 @@ void parseInline(); return false; } - inline bool jj_3R_255() + inline bool jj_3R_253() { if (jj_done) return true; - if (jj_3R_383()) return true; + if (jj_3R_378()) return true; return false; } @@ -6395,17 +6030,17 @@ void parseInline(); return false; } - inline bool jj_3R_312() + inline bool jj_3R_310() { if (jj_done) return true; - if (jj_3R_352()) return true; + if (jj_3R_347()) return true; return false; } - inline bool jj_3R_311() + inline bool jj_3R_309() { if (jj_done) return true; - if (jj_3R_402()) return true; + if (jj_3R_397()) return true; return false; } @@ -6416,17 +6051,17 @@ void parseInline(); return false; } - inline bool jj_3R_310() + inline bool jj_3R_308() { if (jj_done) return true; - if (jj_3R_401()) return true; + if (jj_3R_396()) return true; return false; } - inline bool jj_3R_309() + inline bool jj_3R_307() { if (jj_done) return true; - if (jj_3R_400()) return true; + if (jj_3R_395()) return true; return false; } @@ -6437,14 +6072,14 @@ void parseInline(); return false; } - inline bool jj_3R_307() + inline bool jj_3R_305() { if (jj_done) return true; - if (jj_3R_399()) return true; + if (jj_3R_394()) return true; return false; } - inline bool jj_3R_308() + inline bool jj_3R_306() { if (jj_done) return true; if (jj_3R_67()) return true; @@ -6458,34 +6093,34 @@ void parseInline(); return false; } - inline bool jj_3R_306() + inline bool jj_3R_304() { if (jj_done) return true; - if (jj_3R_398()) return true; + if (jj_3R_393()) return true; return false; } - inline bool jj_3R_533() + inline bool jj_3R_520() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_334()) return true; + if (jj_3R_332()) return true; if (jj_scan_token(WHEN_T)) return true; if (jj_3R_90()) return true; return false; } - inline bool jj_3R_305() + inline bool jj_3R_303() { if (jj_done) return true; - if (jj_3R_397()) return true; + if (jj_3R_392()) return true; return false; } - inline bool jj_3R_304() + inline bool jj_3R_302() { if (jj_done) return true; - if (jj_3R_396()) return true; + if (jj_3R_391()) return true; return false; } @@ -6494,7 +6129,7 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_254()) return false; + if (!jj_3R_252()) return false; jj_scanpos = xsp; if (!jj_3_85()) return false; jj_scanpos = xsp; @@ -6502,7 +6137,7 @@ void parseInline(); jj_scanpos = xsp; if (!jj_3_87()) return false; jj_scanpos = xsp; - if (!jj_3R_255()) return false; + if (!jj_3R_253()) return false; jj_scanpos = xsp; if (!jj_3_89()) return false; jj_scanpos = xsp; @@ -6518,32 +6153,32 @@ void parseInline(); jj_scanpos = xsp; if (!jj_3_95()) return false; jj_scanpos = xsp; - if (jj_3R_256()) return true; + if (jj_3R_254()) return true; return false; } - inline bool jj_3R_254() + inline bool jj_3R_252() { if (jj_done) return true; - if (jj_3R_382()) return true; + if (jj_3R_377()) return true; return false; } - inline bool jj_3R_303() + inline bool jj_3R_301() { if (jj_done) return true; - if (jj_3R_395()) return true; + if (jj_3R_390()) return true; return false; } - inline bool jj_3R_302() + inline bool jj_3R_300() { if (jj_done) return true; - if (jj_3R_394()) return true; + if (jj_3R_389()) return true; return false; } - inline bool jj_3R_537() + inline bool jj_3R_524() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; @@ -6551,31 +6186,31 @@ void parseInline(); return false; } - inline bool jj_3R_301() + inline bool jj_3R_299() { if (jj_done) return true; - if (jj_3R_393()) return true; + if (jj_3R_388()) return true; return false; } - inline bool jj_3R_443() + inline bool jj_3R_433() { if (jj_done) return true; - if (jj_3R_536()) return true; + if (jj_3R_523()) return true; return false; } - inline bool jj_3R_300() + inline bool jj_3R_298() { if (jj_done) return true; - if (jj_3R_392()) return true; + if (jj_3R_387()) return true; return false; } - inline bool jj_3R_442() + inline bool jj_3R_432() { if (jj_done) return true; - if (jj_3R_352()) return true; + if (jj_3R_347()) return true; return false; } @@ -6584,6 +6219,10 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; + if (!jj_3R_297()) return false; + jj_scanpos = xsp; + if (!jj_3R_298()) return false; + jj_scanpos = xsp; if (!jj_3R_299()) return false; jj_scanpos = xsp; if (!jj_3R_300()) return false; @@ -6608,17 +6247,13 @@ void parseInline(); jj_scanpos = xsp; if (!jj_3R_310()) return false; jj_scanpos = xsp; - if (!jj_3R_311()) return false; - jj_scanpos = xsp; - if (!jj_3R_312()) return false; - jj_scanpos = xsp; if (!jj_3_8()) return false; jj_scanpos = xsp; - if (jj_3R_313()) return true; + if (jj_3R_311()) return true; return false; } - inline bool jj_3R_299() + inline bool jj_3R_297() { if (jj_done) return true; if (jj_3R_98()) return true; @@ -6632,7 +6267,7 @@ void parseInline(); return false; } - inline bool jj_3R_270() + inline bool jj_3R_268() { if (jj_done) return true; Token * xsp; @@ -6643,19 +6278,19 @@ void parseInline(); return false; } - inline bool jj_3R_350() + inline bool jj_3R_345() { if (jj_done) return true; if (jj_scan_token(FOR_T)) return true; - if (jj_3R_441()) return true; + if (jj_3R_431()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_442()) { jj_scanpos = xsp; break; } + if (jj_3R_432()) { jj_scanpos = xsp; break; } } while (true) { xsp = jj_scanpos; - if (jj_3R_443()) { jj_scanpos = xsp; break; } + if (jj_3R_433()) { jj_scanpos = xsp; break; } } if (jj_scan_token(END_T)) return true; if (jj_scan_token(FOR_T)) return true; @@ -6663,7 +6298,7 @@ void parseInline(); return false; } - inline bool jj_3R_252() + inline bool jj_3R_250() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; @@ -6672,37 +6307,37 @@ void parseInline(); return false; } - inline bool jj_3R_450() + inline bool jj_3R_440() { if (jj_done) return true; if (jj_3R_63()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_537()) { jj_scanpos = xsp; break; } + if (jj_3R_524()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_362() + inline bool jj_3R_357() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_449()) return false; + if (!jj_3R_439()) return false; jj_scanpos = xsp; - if (jj_3R_450()) return true; + if (jj_3R_440()) return true; return false; } - inline bool jj_3R_449() + inline bool jj_3R_439() { if (jj_done) return true; if (jj_scan_token(ALL_T)) return true; return false; } - inline bool jj_3R_278() + inline bool jj_3R_276() { if (jj_done) return true; if (jj_3R_61()) return true; @@ -6716,71 +6351,71 @@ void parseInline(); return false; } - inline bool jj_3R_385() + inline bool jj_3R_380() { if (jj_done) return true; if (jj_scan_token(ON_T)) return true; - if (jj_3R_362()) return true; + if (jj_3R_357()) return true; return false; } - inline bool jj_3R_440() + inline bool jj_3R_430() { if (jj_done) return true; - if (jj_3R_346()) return true; + if (jj_3R_341()) return true; return false; } - inline bool jj_3R_439() + inline bool jj_3R_429() { if (jj_done) return true; if (jj_3R_73()) return true; return false; } - inline bool jj_3R_433() + inline bool jj_3R_423() { if (jj_done) return true; - if (jj_3R_334()) return true; + if (jj_3R_332()) return true; if (jj_scan_token(WHEN_T)) return true; if (jj_3R_90()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_533()) { jj_scanpos = xsp; break; } + if (jj_3R_520()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_438() + inline bool jj_3R_428() { if (jj_done) return true; if (jj_scan_token(USE_T)) return true; - if (jj_3R_534()) return true; + if (jj_3R_521()) return true; return false; } - inline bool jj_3R_349() + inline bool jj_3R_344() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_438()) jj_scanpos = xsp; + if (jj_3R_428()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_439()) jj_scanpos = xsp; + if (jj_3R_429()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_440()) jj_scanpos = xsp; + if (jj_3R_430()) jj_scanpos = xsp; return false; } - inline bool jj_3R_251() + inline bool jj_3R_249() { if (jj_done) return true; if (jj_3R_63()) return true; return false; } - inline bool jj_3R_342() + inline bool jj_3R_337() { if (jj_done) return true; if (jj_scan_token(WITH_T)) return true; @@ -6789,19 +6424,19 @@ void parseInline(); if (jj_3R_119()) return true; if (jj_scan_token(LESSTHAN_T)) return true; if (jj_3R_172()) return true; - if (jj_3R_433()) return true; + if (jj_3R_423()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_723() + inline bool jj_3R_688() { if (jj_done) return true; - if (jj_3R_729()) return true; + if (jj_3R_694()) return true; return false; } - inline bool jj_3R_444() + inline bool jj_3R_434() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -6810,7 +6445,7 @@ void parseInline(); return false; } - inline bool jj_3R_756() + inline bool jj_3R_721() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -6827,35 +6462,35 @@ void parseInline(); return false; } - inline bool jj_3R_710() + inline bool jj_3R_677() { if (jj_done) return true; if (jj_3R_86()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_723()) jj_scanpos = xsp; + if (jj_3R_688()) jj_scanpos = xsp; return false; } - inline bool jj_3R_709() + inline bool jj_3R_676() { if (jj_done) return true; if (jj_3R_116()) return true; return false; } - inline bool jj_3R_684() + inline bool jj_3R_656() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_709()) return false; + if (!jj_3R_676()) return false; jj_scanpos = xsp; - if (jj_3R_710()) return true; + if (jj_3R_677()) return true; return false; } - inline bool jj_3R_361() + inline bool jj_3R_356() { if (jj_done) return true; if (jj_scan_token(SEVERITY_T)) return true; @@ -6863,7 +6498,7 @@ void parseInline(); return false; } - inline bool jj_3R_277() + inline bool jj_3R_275() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -6876,15 +6511,15 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_277()) jj_scanpos = xsp; + if (jj_3R_275()) jj_scanpos = xsp; if (jj_scan_token(RETURN_T)) return true; xsp = jj_scanpos; - if (jj_3R_278()) jj_scanpos = xsp; + if (jj_3R_276()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_261() + inline bool jj_3R_259() { if (jj_done) return true; if (jj_scan_token(SEVERITY_T)) return true; @@ -6892,24 +6527,24 @@ void parseInline(); return false; } - inline bool jj_3R_400() + inline bool jj_3R_395() { if (jj_done) return true; if (jj_scan_token(ATTRIBUTE_T)) return true; - if (jj_3R_232()) return true; + if (jj_3R_230()) return true; if (jj_scan_token(OF_T)) return true; - if (jj_3R_498()) return true; + if (jj_3R_488()) return true; if (jj_scan_token(IS_T)) return true; if (jj_3R_61()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_332() + inline bool jj_3R_330() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_331()) return true; + if (jj_3R_329()) return true; return false; } @@ -6922,13 +6557,13 @@ void parseInline(); xsp = jj_scanpos; if (!jj_scan_token(85)) return false; jj_scanpos = xsp; - if (jj_3R_251()) return true; + if (jj_3R_249()) return true; xsp = jj_scanpos; - if (jj_3R_252()) jj_scanpos = xsp; + if (jj_3R_250()) jj_scanpos = xsp; return false; } - inline bool jj_3R_260() + inline bool jj_3R_258() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -6936,18 +6571,18 @@ void parseInline(); return false; } - inline bool jj_3R_377() + inline bool jj_3R_372() { if (jj_done) return true; if (jj_scan_token(RANGE_T)) return true; return false; } - inline bool jj_3R_321() + inline bool jj_3R_319() { if (jj_done) return true; - if (jj_3R_408()) return true; - if (jj_3R_320()) return true; + if (jj_3R_403()) return true; + if (jj_3R_318()) return true; return false; } @@ -6956,83 +6591,83 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_260()) jj_scanpos = xsp; + if (jj_3R_258()) jj_scanpos = xsp; if (jj_scan_token(REPORT_T)) return true; if (jj_3R_61()) return true; xsp = jj_scanpos; - if (jj_3R_261()) jj_scanpos = xsp; + if (jj_3R_259()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_232() + inline bool jj_3R_230() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_376()) return false; + if (!jj_3R_371()) return false; jj_scanpos = xsp; - if (jj_3R_377()) return true; + if (jj_3R_372()) return true; return false; } - inline bool jj_3R_376() + inline bool jj_3R_371() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_516() + inline bool jj_3R_506() { if (jj_done) return true; if (jj_scan_token(QNEQU_T)) return true; return false; } - inline bool jj_3R_515() + inline bool jj_3R_505() { if (jj_done) return true; if (jj_scan_token(QEQU_T)) return true; return false; } - inline bool jj_3R_514() + inline bool jj_3R_504() { if (jj_done) return true; if (jj_scan_token(QL_T)) return true; return false; } - inline bool jj_3R_733() + inline bool jj_3R_698() { if (jj_done) return true; if (jj_3R_63()) return true; return false; } - inline bool jj_3R_513() + inline bool jj_3R_503() { if (jj_done) return true; if (jj_scan_token(QG_T)) return true; return false; } - inline bool jj_3R_512() + inline bool jj_3R_502() { if (jj_done) return true; if (jj_scan_token(QLT_T)) return true; return false; } - inline bool jj_3R_511() + inline bool jj_3R_501() { if (jj_done) return true; if (jj_scan_token(QGT_T)) return true; return false; } - inline bool jj_3R_510() + inline bool jj_3R_500() { if (jj_done) return true; if (jj_scan_token(NOTEQU_T)) return true; @@ -7058,14 +6693,14 @@ void parseInline(); return false; } - inline bool jj_3R_509() + inline bool jj_3R_499() { if (jj_done) return true; if (jj_scan_token(LESSTHAN_T)) return true; return false; } - inline bool jj_3R_360() + inline bool jj_3R_355() { if (jj_done) return true; if (jj_scan_token(REPORT_T)) return true; @@ -7073,59 +6708,59 @@ void parseInline(); return false; } - inline bool jj_3R_508() + inline bool jj_3R_498() { if (jj_done) return true; if (jj_scan_token(GREATERTHAN_T)) return true; return false; } - inline bool jj_3R_507() + inline bool jj_3R_497() { if (jj_done) return true; if (jj_scan_token(EQU_T)) return true; return false; } - inline bool jj_3R_506() + inline bool jj_3R_496() { if (jj_done) return true; if (jj_scan_token(GT_T)) return true; return false; } - inline bool jj_3R_408() + inline bool jj_3R_403() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_505()) return false; + if (!jj_3R_495()) return false; jj_scanpos = xsp; - if (!jj_3R_506()) return false; + if (!jj_3R_496()) return false; jj_scanpos = xsp; - if (!jj_3R_507()) return false; + if (!jj_3R_497()) return false; jj_scanpos = xsp; - if (!jj_3R_508()) return false; + if (!jj_3R_498()) return false; jj_scanpos = xsp; - if (!jj_3R_509()) return false; + if (!jj_3R_499()) return false; jj_scanpos = xsp; - if (!jj_3R_510()) return false; + if (!jj_3R_500()) return false; jj_scanpos = xsp; - if (!jj_3R_511()) return false; + if (!jj_3R_501()) return false; jj_scanpos = xsp; - if (!jj_3R_512()) return false; + if (!jj_3R_502()) return false; jj_scanpos = xsp; - if (!jj_3R_513()) return false; + if (!jj_3R_503()) return false; jj_scanpos = xsp; - if (!jj_3R_514()) return false; + if (!jj_3R_504()) return false; jj_scanpos = xsp; - if (!jj_3R_515()) return false; + if (!jj_3R_505()) return false; jj_scanpos = xsp; - if (jj_3R_516()) return true; + if (jj_3R_506()) return true; return false; } - inline bool jj_3R_505() + inline bool jj_3R_495() { if (jj_done) return true; if (jj_scan_token(LT_T)) return true; @@ -7135,11 +6770,11 @@ void parseInline(); inline bool jj_3R_169() { if (jj_done) return true; - if (jj_3R_331()) return true; + if (jj_3R_329()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_332()) { jj_scanpos = xsp; break; } + if (jj_3R_330()) { jj_scanpos = xsp; break; } } return false; } @@ -7147,14 +6782,14 @@ void parseInline(); inline bool jj_3R_151() { if (jj_done) return true; - if (jj_3R_320()) return true; + if (jj_3R_318()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_321()) jj_scanpos = xsp; + if (jj_3R_319()) jj_scanpos = xsp; return false; } - inline bool jj_3R_423() + inline bool jj_3R_418() { if (jj_done) return true; if (jj_3R_66()) return true; @@ -7162,24 +6797,24 @@ void parseInline(); return false; } - inline bool jj_3R_732() + inline bool jj_3R_697() { if (jj_done) return true; - if (jj_3R_740()) return true; + if (jj_3R_705()) return true; return false; } - inline bool jj_3R_331() + inline bool jj_3R_329() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_423()) jj_scanpos = xsp; - if (jj_3R_424()) return true; + if (jj_3R_418()) jj_scanpos = xsp; + if (jj_3R_419()) return true; return false; } - inline bool jj_3R_259() + inline bool jj_3R_257() { if (jj_done) return true; if (jj_3R_145()) return true; @@ -7187,20 +6822,20 @@ void parseInline(); return false; } - inline bool jj_3R_725() + inline bool jj_3R_690() { if (jj_done) return true; if (jj_scan_token(RECORD_T)) return true; Token * xsp; - if (jj_3R_732()) return true; + if (jj_3R_697()) return true; while (true) { xsp = jj_scanpos; - if (jj_3R_732()) { jj_scanpos = xsp; break; } + if (jj_3R_697()) { 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_733()) jj_scanpos = xsp; + if (jj_3R_698()) jj_scanpos = xsp; return false; } @@ -7209,8 +6844,8 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_259()) jj_scanpos = xsp; - if (jj_3R_198()) return true; + if (jj_3R_257()) jj_scanpos = xsp; + if (jj_3R_196()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } @@ -7239,16 +6874,16 @@ void parseInline(); return false; } - inline bool jj_3R_198() + inline bool jj_3R_196() { if (jj_done) return true; if (jj_scan_token(ASSERT_T)) return true; if (jj_3R_83()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_360()) jj_scanpos = xsp; + if (jj_3R_355()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_361()) jj_scanpos = xsp; + if (jj_3R_356()) jj_scanpos = xsp; return false; } @@ -7268,14 +6903,14 @@ void parseInline(); return false; } - inline bool jj_3R_193() + inline bool jj_3R_191() { if (jj_done) return true; if (jj_3R_115()) return true; return false; } - inline bool jj_3R_192() + inline bool jj_3R_190() { if (jj_done) return true; if (jj_3R_70()) return true; @@ -7289,20 +6924,20 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_192()) return false; + if (!jj_3R_190()) return false; jj_scanpos = xsp; - if (jj_3R_193()) return true; + if (jj_3R_191()) return true; return false; } - inline bool jj_3R_731() + inline bool jj_3R_696() { if (jj_done) return true; - if (jj_3R_739()) return true; + if (jj_3R_704()) return true; return false; } - inline bool jj_3R_240() + inline bool jj_3R_238() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; @@ -7311,25 +6946,25 @@ void parseInline(); return false; } - inline bool jj_3R_730() + inline bool jj_3R_695() { if (jj_done) return true; - if (jj_3R_738()) return true; + if (jj_3R_703()) return true; return false; } - inline bool jj_3R_724() + inline bool jj_3R_689() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_730()) return false; + if (!jj_3R_695()) return false; jj_scanpos = xsp; - if (jj_3R_731()) return true; + if (jj_3R_696()) return true; return false; } - inline bool jj_3R_239() + inline bool jj_3R_237() { if (jj_done) return true; if (jj_3R_114()) return true; @@ -7343,53 +6978,53 @@ void parseInline(); if (jj_scan_token(APOSTROPHE_T)) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_239()) return false; + if (!jj_3R_237()) return false; jj_scanpos = xsp; - if (jj_3R_240()) return true; + if (jj_3R_238()) return true; return false; } - inline bool jj_3R_364() + inline bool jj_3R_359() { if (jj_done) return true; if (jj_3R_117()) return true; return false; } - inline bool jj_3R_202() + inline bool jj_3R_200() { if (jj_done) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_364()) { jj_scanpos = xsp; break; } + if (jj_3R_359()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_203() + inline bool jj_3R_201() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_494() + inline bool jj_3R_484() { if (jj_done) return true; - if (jj_3R_247()) return true; + if (jj_3R_245()) return true; return false; } - inline bool jj_3R_250() + inline bool jj_3R_248() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; - if (jj_3R_249()) return true; + if (jj_3R_247()) return true; return false; } - inline bool jj_3R_246() + inline bool jj_3R_244() { if (jj_done) return true; if (jj_scan_token(NEW_T)) return true; @@ -7397,11 +7032,11 @@ void parseInline(); return false; } - inline bool jj_3R_200() + inline bool jj_3R_198() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_362()) return true; + if (jj_3R_357()) return true; if (jj_scan_token(RPAREN_T)) return true; return false; } @@ -7413,7 +7048,7 @@ void parseInline(); xsp = jj_scanpos; if (!jj_3_4()) return false; jj_scanpos = xsp; - if (jj_3R_246()) return true; + if (jj_3R_244()) return true; return false; } @@ -7425,21 +7060,21 @@ void parseInline(); return false; } - inline bool jj_3R_564() + inline bool jj_3R_552() { if (jj_done) return true; - if (jj_3R_323()) return true; + if (jj_3R_321()) return true; return false; } - inline bool jj_3R_563() + inline bool jj_3R_551() { if (jj_done) return true; if (jj_scan_token(CHARACTER_LITERAL)) return true; return false; } - inline bool jj_3R_199() + inline bool jj_3R_197() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -7447,23 +7082,23 @@ void parseInline(); return false; } - inline bool jj_3R_562() + inline bool jj_3R_550() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_492() + inline bool jj_3R_482() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_562()) return false; + if (!jj_3R_550()) return false; jj_scanpos = xsp; - if (!jj_3R_563()) return false; + if (!jj_3R_551()) return false; jj_scanpos = xsp; - if (jj_3R_564()) return true; + if (jj_3R_552()) return true; return false; } @@ -7472,53 +7107,53 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_199()) jj_scanpos = xsp; + if (jj_3R_197()) 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_200()) jj_scanpos = xsp; + if (jj_3R_198()) jj_scanpos = xsp; xsp = jj_scanpos; if (jj_scan_token(56)) jj_scanpos = xsp; - if (jj_3R_201()) return true; + if (jj_3R_199()) return true; if (jj_scan_token(BEGIN_T)) return true; - if (jj_3R_202()) return true; + if (jj_3R_200()) 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_203()) jj_scanpos = xsp; + if (jj_3R_201()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_363() + inline bool jj_3R_358() { if (jj_done) return true; - if (jj_3R_451()) return true; + if (jj_3R_441()) return true; return false; } - inline bool jj_3R_201() + inline bool jj_3R_199() { if (jj_done) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_363()) { jj_scanpos = xsp; break; } + if (jj_3R_358()) { jj_scanpos = xsp; break; } } return false; } - inline bool jj_3R_547() + inline bool jj_3R_534() { if (jj_done) return true; - if (jj_3R_403()) return true; + if (jj_3R_398()) return true; return false; } - inline bool jj_3R_493() + inline bool jj_3R_483() { if (jj_done) return true; if (jj_scan_token(COLON_T)) return true; @@ -7526,10 +7161,10 @@ void parseInline(); return false; } - inline bool jj_3R_546() + inline bool jj_3R_533() { if (jj_done) return true; - if (jj_3R_352()) return true; + if (jj_3R_347()) return true; return false; } @@ -7540,33 +7175,33 @@ void parseInline(); return false; } - inline bool jj_3R_545() + inline bool jj_3R_532() { if (jj_done) return true; - if (jj_3R_400()) return true; + if (jj_3R_395()) return true; return false; } - inline bool jj_3R_398() + inline bool jj_3R_393() { if (jj_done) return true; if (jj_scan_token(ALIAS_T)) return true; - if (jj_3R_492()) return true; + if (jj_3R_482()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_493()) jj_scanpos = xsp; + if (jj_3R_483()) jj_scanpos = xsp; if (jj_scan_token(IS_T)) return true; if (jj_3R_63()) return true; xsp = jj_scanpos; - if (jj_3R_494()) jj_scanpos = xsp; + if (jj_3R_484()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_544() + inline bool jj_3R_531() { if (jj_done) return true; - if (jj_3R_398()) return true; + if (jj_3R_393()) return true; return false; } @@ -7574,11 +7209,11 @@ void parseInline(); { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_249()) return true; + if (jj_3R_247()) return true; Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_250()) { jj_scanpos = xsp; break; } + if (jj_3R_248()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RPAREN_T)) return true; return false; @@ -7591,52 +7226,52 @@ void parseInline(); return false; } - inline bool jj_3R_543() + inline bool jj_3R_530() { if (jj_done) return true; - if (jj_3R_397()) return true; + if (jj_3R_392()) return true; return false; } - inline bool jj_3R_542() + inline bool jj_3R_529() { if (jj_done) return true; - if (jj_3R_396()) return true; + if (jj_3R_391()) return true; return false; } - inline bool jj_3R_541() + inline bool jj_3R_528() { if (jj_done) return true; - if (jj_3R_394()) return true; + if (jj_3R_389()) return true; return false; } - inline bool jj_3R_540() + inline bool jj_3R_527() { if (jj_done) return true; - if (jj_3R_393()) return true; + if (jj_3R_388()) return true; return false; } - inline bool jj_3R_284() + inline bool jj_3R_282() { if (jj_done) return true; if (jj_scan_token(MINUS_T)) return true; return false; } - inline bool jj_3R_285() + inline bool jj_3R_283() { if (jj_done) return true; if (jj_scan_token(AMPERSAND_T)) return true; return false; } - inline bool jj_3R_539() + inline bool jj_3R_526() { if (jj_done) return true; - if (jj_3R_392()) return true; + if (jj_3R_387()) return true; return false; } @@ -7653,64 +7288,64 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_283()) return false; + if (!jj_3R_281()) return false; jj_scanpos = xsp; - if (!jj_3R_284()) return false; + if (!jj_3R_282()) return false; jj_scanpos = xsp; - if (jj_3R_285()) return true; + if (jj_3R_283()) return true; return false; } - inline bool jj_3R_283() + inline bool jj_3R_281() { if (jj_done) return true; if (jj_scan_token(PLUS_T)) return true; return false; } - inline bool jj_3R_538() + inline bool jj_3R_525() { if (jj_done) return true; if (jj_3R_98()) return true; return false; } - inline bool jj_3R_451() + inline bool jj_3R_441() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_538()) return false; + if (!jj_3R_525()) return false; jj_scanpos = xsp; - if (!jj_3R_539()) return false; + if (!jj_3R_526()) return false; jj_scanpos = xsp; - if (!jj_3R_540()) return false; + if (!jj_3R_527()) return false; jj_scanpos = xsp; - if (!jj_3R_541()) return false; + if (!jj_3R_528()) return false; jj_scanpos = xsp; - if (!jj_3R_542()) return false; + if (!jj_3R_529()) return false; jj_scanpos = xsp; - if (!jj_3R_543()) return false; + if (!jj_3R_530()) return false; jj_scanpos = xsp; - if (!jj_3R_544()) return false; + if (!jj_3R_531()) return false; jj_scanpos = xsp; if (!jj_3_77()) return false; jj_scanpos = xsp; - if (!jj_3R_545()) return false; + if (!jj_3R_532()) return false; jj_scanpos = xsp; - if (!jj_3R_546()) return false; + if (!jj_3R_533()) return false; jj_scanpos = xsp; if (!jj_3_78()) return false; jj_scanpos = xsp; - if (jj_3R_547()) return true; + if (jj_3R_534()) return true; return false; } - inline bool jj_3R_347() + inline bool jj_3R_342() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_238()) return true; + if (jj_3R_236()) return true; if (jj_scan_token(RPAREN_T)) return true; return false; } @@ -7722,7 +7357,7 @@ void parseInline(); return false; } - inline bool jj_3R_526() + inline bool jj_3R_516() { if (jj_done) return true; if (jj_3R_63()) return true; @@ -7732,7 +7367,7 @@ void parseInline(); return false; } - inline bool jj_3R_525() + inline bool jj_3R_515() { if (jj_done) return true; if (jj_scan_token(BOX_T)) return true; @@ -7753,42 +7388,42 @@ void parseInline(); Token * xsp; xsp = jj_scanpos; if (jj_3_76()) jj_scanpos = xsp; - if (jj_3R_182()) return true; + if (jj_3R_180()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_524() + inline bool jj_3R_514() { if (jj_done) return true; if (jj_3R_62()) return true; return false; } - inline bool jj_3R_424() + inline bool jj_3R_419() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_524()) return false; + if (!jj_3R_514()) return false; jj_scanpos = xsp; - if (!jj_3R_525()) return false; + if (!jj_3R_515()) return false; jj_scanpos = xsp; - if (jj_3R_526()) return true; + if (jj_3R_516()) return true; return false; } - inline bool jj_3R_182() + inline bool jj_3R_180() { if (jj_done) return true; if (jj_3R_63()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_347()) jj_scanpos = xsp; + if (jj_3R_342()) jj_scanpos = xsp; return false; } - inline bool jj_3R_238() + inline bool jj_3R_236() { if (jj_done) return true; if (jj_3R_169()) return true; @@ -7802,17 +7437,17 @@ void parseInline(); return false; } - inline bool jj_3R_216() + inline bool jj_3R_214() { if (jj_done) return true; if (jj_3R_87()) return true; return false; } - inline bool jj_3R_215() + inline bool jj_3R_213() { if (jj_done) return true; - if (jj_3R_373()) return true; + if (jj_3R_368()) return true; return false; } @@ -7837,17 +7472,17 @@ void parseInline(); return false; } - inline bool jj_3R_214() + inline bool jj_3R_212() { if (jj_done) return true; if (jj_3R_91()) return true; return false; } - inline bool jj_3R_213() + inline bool jj_3R_211() { if (jj_done) return true; - if (jj_3R_372()) return true; + if (jj_3R_367()) return true; return false; } @@ -7858,10 +7493,10 @@ void parseInline(); return false; } - inline bool jj_3R_212() + inline bool jj_3R_210() { if (jj_done) return true; - if (jj_3R_371()) return true; + if (jj_3R_366()) return true; return false; } @@ -7870,17 +7505,17 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_212()) return false; + if (!jj_3R_210()) return false; jj_scanpos = xsp; - if (!jj_3R_213()) return false; + if (!jj_3R_211()) return false; jj_scanpos = xsp; - if (!jj_3R_214()) return false; + if (!jj_3R_212()) return false; jj_scanpos = xsp; if (!jj_3_75()) return false; jj_scanpos = xsp; - if (!jj_3R_215()) return false; + if (!jj_3R_213()) return false; jj_scanpos = xsp; - if (jj_3R_216()) return true; + if (jj_3R_214()) return true; return false; } @@ -7925,7 +7560,7 @@ void parseInline(); return false; } - inline bool jj_3R_485() + inline bool jj_3R_475() { if (jj_done) return true; if (jj_3R_114()) return true; @@ -7939,7 +7574,7 @@ void parseInline(); return false; } - inline bool jj_3R_686() + inline bool jj_3R_658() { if (jj_done) return true; if (jj_scan_token(ACCESS_T)) return true; @@ -7947,7 +7582,7 @@ void parseInline(); return false; } - inline bool jj_3R_484() + inline bool jj_3R_474() { if (jj_done) return true; if (jj_3R_113()) return true; @@ -7961,14 +7596,14 @@ void parseInline(); return false; } - inline bool jj_3R_483() + inline bool jj_3R_473() { if (jj_done) return true; if (jj_3R_63()) return true; return false; } - inline bool jj_3R_237() + inline bool jj_3R_235() { if (jj_done) return true; if (jj_scan_token(BASED_LITERAL)) return true; @@ -7984,14 +7619,14 @@ void parseInline(); return false; } - inline bool jj_3R_236() + inline bool jj_3R_234() { if (jj_done) return true; if (jj_scan_token(INTEGER)) return true; return false; } - inline bool jj_3R_482() + inline bool jj_3R_472() { if (jj_done) return true; if (jj_3R_112()) return true; @@ -8003,22 +7638,22 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_235()) return false; + if (!jj_3R_233()) return false; jj_scanpos = xsp; - if (!jj_3R_236()) return false; + if (!jj_3R_234()) return false; jj_scanpos = xsp; - if (jj_3R_237()) return true; + if (jj_3R_235()) return true; return false; } - inline bool jj_3R_235() + inline bool jj_3R_233() { if (jj_done) return true; if (jj_scan_token(DECIMAL_LITERAL)) return true; return false; } - inline bool jj_3R_737() + inline bool jj_3R_702() { if (jj_done) return true; if (jj_3R_63()) return true; @@ -8032,21 +7667,21 @@ void parseInline(); return false; } - inline bool jj_3R_481() + inline bool jj_3R_471() { if (jj_done) return true; if (jj_3R_111()) return true; return false; } - inline bool jj_3R_480() + inline bool jj_3R_470() { if (jj_done) return true; if (jj_3R_64()) return true; return false; } - inline bool jj_3R_479() + inline bool jj_3R_469() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; @@ -8055,37 +7690,37 @@ void parseInline(); return false; } - inline bool jj_3R_391() + inline bool jj_3R_386() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_478()) return false; + if (!jj_3R_468()) return false; jj_scanpos = xsp; - if (!jj_3R_479()) return false; + if (!jj_3R_469()) return false; jj_scanpos = xsp; - if (!jj_3R_480()) return false; + if (!jj_3R_470()) return false; jj_scanpos = xsp; - if (!jj_3R_481()) return false; + if (!jj_3R_471()) return false; jj_scanpos = xsp; - if (!jj_3R_482()) return false; + if (!jj_3R_472()) return false; jj_scanpos = xsp; - if (!jj_3R_483()) return false; + if (!jj_3R_473()) return false; jj_scanpos = xsp; - if (!jj_3R_484()) return false; + if (!jj_3R_474()) return false; jj_scanpos = xsp; - if (jj_3R_485()) return true; + if (jj_3R_475()) return true; return false; } - inline bool jj_3R_478() + inline bool jj_3R_468() { if (jj_done) return true; if (jj_3R_110()) return true; return false; } - inline bool jj_3R_346() + inline bool jj_3R_341() { if (jj_done) return true; if (jj_scan_token(PORT_T)) return true; @@ -8096,32 +7731,32 @@ void parseInline(); return false; } - inline bool jj_3R_614() + inline bool jj_3R_594() { if (jj_done) return true; - if (jj_3R_329()) return true; + if (jj_3R_327()) return true; return false; } - inline bool jj_3R_736() + inline bool jj_3R_701() { if (jj_done) return true; - if (jj_3R_756()) return true; + if (jj_3R_721()) return true; return false; } - inline bool jj_3R_565() + inline bool jj_3R_553() { if (jj_done) return true; if (jj_scan_token(PORT_T)) return true; if (jj_scan_token(LPAREN_T)) return true; - if (jj_3R_614()) return true; + if (jj_3R_594()) return true; if (jj_scan_token(RPAREN_T)) return true; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_729() + inline bool jj_3R_694() { if (jj_done) return true; if (jj_scan_token(UNITS_T)) return true; @@ -8130,12 +7765,12 @@ void parseInline(); Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_736()) { jj_scanpos = xsp; break; } + if (jj_3R_701()) { 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_737()) jj_scanpos = xsp; + if (jj_3R_702()) jj_scanpos = xsp; return false; } @@ -8146,7 +7781,7 @@ void parseInline(); return false; } - inline bool jj_3R_234() + inline bool jj_3R_232() { if (jj_done) return true; if (jj_3R_109()) return true; @@ -8158,12 +7793,12 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_234()) jj_scanpos = xsp; + if (jj_3R_232()) jj_scanpos = xsp; if (jj_3R_63()) return true; return false; } - inline bool jj_3R_428() + inline bool jj_3R_543() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -8193,7 +7828,7 @@ void parseInline(); return false; } - inline bool jj_3R_373() + inline bool jj_3R_368() { if (jj_done) return true; if (jj_scan_token(PACKAGE_T)) return true; @@ -8208,10 +7843,10 @@ void parseInline(); return false; } - inline bool jj_3R_333() + inline bool jj_3R_331() { if (jj_done) return true; - if (jj_3R_425()) return true; + if (jj_3R_420()) return true; return false; } @@ -8222,39 +7857,39 @@ void parseInline(); xsp = jj_scanpos; if (jj_scan_token(50)) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_333()) jj_scanpos = xsp; + if (jj_3R_331()) jj_scanpos = xsp; return false; } - inline bool jj_3R_272() + inline bool jj_3R_270() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_323() + inline bool jj_3R_321() { if (jj_done) return true; if (jj_scan_token(STRINGLITERAL)) return true; return false; } - inline bool jj_3R_676() + inline bool jj_3R_654() { if (jj_done) return true; if (jj_scan_token(TYPE_T)) return true; return false; } - inline bool jj_3R_675() + inline bool jj_3R_653() { if (jj_done) return true; if (jj_scan_token(FILE_T)) return true; return false; } - inline bool jj_3R_674() + inline bool jj_3R_652() { if (jj_done) return true; if (jj_scan_token(SHARED_T)) return true; @@ -8269,47 +7904,47 @@ void parseInline(); return false; } - inline bool jj_3R_673() + inline bool jj_3R_651() { if (jj_done) return true; if (jj_scan_token(VARIABLE_T)) return true; return false; } - inline bool jj_3R_672() + inline bool jj_3R_650() { if (jj_done) return true; if (jj_scan_token(SIGNAL_T)) return true; return false; } - inline bool jj_3R_671() + inline bool jj_3R_649() { if (jj_done) return true; if (jj_scan_token(CONSTANT_T)) return true; return false; } - inline bool jj_3R_645() + inline bool jj_3R_625() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_671()) return false; + if (!jj_3R_649()) return false; jj_scanpos = xsp; - if (!jj_3R_672()) return false; + if (!jj_3R_650()) return false; jj_scanpos = xsp; - if (!jj_3R_673()) return false; + if (!jj_3R_651()) return false; jj_scanpos = xsp; - if (!jj_3R_674()) return false; + if (!jj_3R_652()) return false; jj_scanpos = xsp; - if (!jj_3R_675()) return false; + if (!jj_3R_653()) return false; jj_scanpos = xsp; - if (jj_3R_676()) return true; + if (jj_3R_654()) return true; return false; } - inline bool jj_3R_375() + inline bool jj_3R_370() { if (jj_done) return true; if (jj_scan_token(COMMA_T)) return true; @@ -8317,14 +7952,14 @@ void parseInline(); return false; } - inline bool jj_3R_218() + inline bool jj_3R_216() { if (jj_done) return true; if (jj_3R_109()) return true; return false; } - inline bool jj_3R_217() + inline bool jj_3R_215() { if (jj_done) return true; if (jj_3R_108()) return true; @@ -8336,13 +7971,13 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_217()) return false; + if (!jj_3R_215()) return false; jj_scanpos = xsp; - if (jj_3R_218()) return true; + if (jj_3R_216()) return true; return false; } - inline bool jj_3R_469() + inline bool jj_3R_459() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -8350,12 +7985,12 @@ void parseInline(); return false; } - inline bool jj_3R_384() + inline bool jj_3R_379() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_469()) 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; @@ -8369,7 +8004,7 @@ void parseInline(); return false; } - inline bool jj_3R_273() + inline bool jj_3R_271() { if (jj_done) return true; if (jj_scan_token(WHEN_T)) return true; @@ -8377,7 +8012,7 @@ void parseInline(); return false; } - inline bool jj_3R_271() + inline bool jj_3R_269() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -8397,17 +8032,17 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_271()) jj_scanpos = xsp; + if (jj_3R_269()) jj_scanpos = xsp; if (jj_scan_token(NEXT_T)) return true; xsp = jj_scanpos; - if (jj_3R_272()) jj_scanpos = xsp; + if (jj_3R_270()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_273()) jj_scanpos = xsp; + if (jj_3R_271()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } - inline bool jj_3R_233() + inline bool jj_3R_231() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; @@ -8430,10 +8065,10 @@ void parseInline(); return false; } - inline bool jj_3R_231() + inline bool jj_3R_229() { if (jj_done) return true; - if (jj_3R_247()) return true; + if (jj_3R_245()) return true; return false; } @@ -8442,11 +8077,11 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_231()) jj_scanpos = xsp; + if (jj_3R_229()) jj_scanpos = xsp; if (jj_scan_token(APOSTROPHE_T)) return true; - if (jj_3R_232()) return true; + if (jj_3R_230()) return true; xsp = jj_scanpos; - if (jj_3R_233()) jj_scanpos = xsp; + if (jj_3R_231()) jj_scanpos = xsp; return false; } @@ -8502,7 +8137,7 @@ void parseInline(); return false; } - inline bool jj_3R_226() + inline bool jj_3R_224() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; @@ -8510,7 +8145,7 @@ void parseInline(); Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_375()) { jj_scanpos = xsp; break; } + if (jj_3R_370()) { jj_scanpos = xsp; break; } } if (jj_scan_token(RPAREN_T)) return true; return false; @@ -8524,14 +8159,14 @@ void parseInline(); return false; } - inline bool jj_3R_221() + inline bool jj_3R_219() { if (jj_done) return true; if (jj_3R_104()) return true; return false; } - inline bool jj_3R_225() + inline bool jj_3R_223() { if (jj_done) return true; if (jj_scan_token(LPAREN_T)) return true; @@ -8540,35 +8175,35 @@ void parseInline(); return false; } - inline bool jj_3R_224() + inline bool jj_3R_222() { if (jj_done) return true; if (jj_3R_106()) return true; return false; } - inline bool jj_3R_324() + inline bool jj_3R_322() { if (jj_done) return true; if (jj_3R_103()) return true; return false; } - inline bool jj_3R_326() + inline bool jj_3R_324() { if (jj_done) return true; if (jj_3R_103()) return true; return false; } - inline bool jj_3R_327() + inline bool jj_3R_325() { if (jj_done) return true; if (jj_3R_103()) return true; return false; } - inline bool jj_3R_223() + inline bool jj_3R_221() { if (jj_done) return true; if (jj_scan_token(DOT_T)) return true; @@ -8576,7 +8211,7 @@ void parseInline(); return false; } - inline bool jj_3R_222() + inline bool jj_3R_220() { if (jj_done) return true; if (jj_scan_token(APOSTROPHE_T)) return true; @@ -8589,15 +8224,15 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_222()) return false; + if (!jj_3R_220()) return false; jj_scanpos = xsp; - if (!jj_3R_223()) return false; + if (!jj_3R_221()) return false; jj_scanpos = xsp; - if (!jj_3R_224()) return false; + if (!jj_3R_222()) return false; jj_scanpos = xsp; - if (!jj_3R_225()) return false; + if (!jj_3R_223()) return false; jj_scanpos = xsp; - if (jj_3R_226()) return true; + if (jj_3R_224()) return true; return false; } @@ -8608,7 +8243,7 @@ void parseInline(); Token * xsp; while (true) { xsp = jj_scanpos; - if (jj_3R_221()) { jj_scanpos = xsp; break; } + if (jj_3R_219()) { jj_scanpos = xsp; break; } } return false; } @@ -8619,27 +8254,27 @@ void parseInline(); if (jj_3R_74()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_327()) jj_scanpos = xsp; + if (jj_3R_325()) jj_scanpos = xsp; return false; } inline bool jj_3R_157() { if (jj_done) return true; - if (jj_3R_325()) return true; + if (jj_3R_323()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_326()) jj_scanpos = xsp; + if (jj_3R_324()) jj_scanpos = xsp; return false; } inline bool jj_3R_156() { if (jj_done) return true; - if (jj_3R_323()) return true; + if (jj_3R_321()) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_324()) jj_scanpos = xsp; + if (jj_3R_322()) jj_scanpos = xsp; return false; } @@ -8656,21 +8291,21 @@ void parseInline(); return false; } - inline bool jj_3R_292() + inline bool jj_3R_290() { if (jj_done) return true; if (jj_scan_token(REM_T)) return true; return false; } - inline bool jj_3R_291() + inline bool jj_3R_289() { if (jj_done) return true; if (jj_scan_token(MOD_T)) return true; return false; } - inline bool jj_3R_290() + inline bool jj_3R_288() { if (jj_done) return true; if (jj_scan_token(SLASH_T)) return true; @@ -8682,90 +8317,90 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_289()) return false; + if (!jj_3R_287()) return false; jj_scanpos = xsp; - if (!jj_3R_290()) return false; + if (!jj_3R_288()) return false; jj_scanpos = xsp; - if (!jj_3R_291()) return false; + if (!jj_3R_289()) return false; jj_scanpos = xsp; - if (jj_3R_292()) return true; + if (jj_3R_290()) return true; return false; } - inline bool jj_3R_289() + inline bool jj_3R_287() { if (jj_done) return true; if (jj_scan_token(MULT_T)) return true; return false; } - inline bool jj_3R_657() + inline bool jj_3R_635() { if (jj_done) return true; if (jj_3R_74()) return true; return false; } - inline bool jj_3R_459() + inline bool jj_3R_449() { if (jj_done) return true; if (jj_scan_token(LINKAGE_T)) return true; return false; } - inline bool jj_3R_458() + inline bool jj_3R_448() { if (jj_done) return true; if (jj_scan_token(BUFFER_T)) return true; return false; } - inline bool jj_3R_457() + inline bool jj_3R_447() { if (jj_done) return true; if (jj_scan_token(INOUT_T)) return true; return false; } - inline bool jj_3R_456() + inline bool jj_3R_446() { if (jj_done) return true; if (jj_scan_token(OUT_T)) return true; return false; } - inline bool jj_3R_368() + inline bool jj_3R_363() { if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_455()) return false; + if (!jj_3R_445()) return false; jj_scanpos = xsp; - if (!jj_3R_456()) return false; + if (!jj_3R_446()) return false; jj_scanpos = xsp; - if (!jj_3R_457()) return false; + if (!jj_3R_447()) return false; jj_scanpos = xsp; - if (!jj_3R_458()) return false; + if (!jj_3R_448()) return false; jj_scanpos = xsp; - if (jj_3R_459()) return true; + if (jj_3R_449()) return true; return false; } - inline bool jj_3R_455() + inline bool jj_3R_445() { if (jj_done) return true; if (jj_scan_token(IN_T)) return true; return false; } - inline bool jj_3R_269() + inline bool jj_3R_267() { if (jj_done) return true; - if (jj_3R_388()) return true; + if (jj_3R_383()) return true; return false; } - inline bool jj_3R_268() + inline bool jj_3R_266() { if (jj_done) return true; if (jj_3R_74()) return true; @@ -8778,15 +8413,15 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (jj_3R_268()) jj_scanpos = xsp; + if (jj_3R_266()) jj_scanpos = xsp; xsp = jj_scanpos; - if (jj_3R_269()) jj_scanpos = xsp; + if (jj_3R_267()) jj_scanpos = xsp; if (jj_scan_token(LOOP_T)) return true; - if (jj_3R_270()) return true; + if (jj_3R_268()) return true; if (jj_scan_token(END_T)) return true; if (jj_scan_token(LOOP_T)) return true; xsp = jj_scanpos; - if (jj_3R_657()) jj_scanpos = xsp; + if (jj_3R_635()) jj_scanpos = xsp; if (jj_scan_token(SEMI_T)) return true; return false; } @@ -8805,7 +8440,7 @@ void parseInline(); return false; } - inline bool jj_3R_245() + inline bool jj_3R_243() { if (jj_done) return true; if (jj_scan_token(NULL_T)) return true; @@ -8819,21 +8454,21 @@ void parseInline(); return false; } - inline bool jj_3R_244() + inline bool jj_3R_242() { if (jj_done) return true; - if (jj_3R_378()) return true; + if (jj_3R_373()) return true; return false; } - inline bool jj_3R_243() + inline bool jj_3R_241() { if (jj_done) return true; if (jj_3R_102()) return true; return false; } - inline bool jj_3R_242() + inline bool jj_3R_240() { if (jj_done) return true; if (jj_3R_101()) return true; @@ -8845,19 +8480,19 @@ void parseInline(); if (jj_done) return true; Token * xsp; xsp = jj_scanpos; - if (!jj_3R_241()) return false; + if (!jj_3R_239()) return false; jj_scanpos = xsp; - if (!jj_3R_242()) return false; + if (!jj_3R_240()) return false; jj_scanpos = xsp; - if (!jj_3R_243()) return false; + if (!jj_3R_241()) return false; jj_scanpos = xsp; - if (!jj_3R_244()) return false; + if (!jj_3R_242()) return false; jj_scanpos = xsp; - if (jj_3R_245()) return true; + if (jj_3R_243()) return true; return false; } - inline bool jj_3R_241() + inline bool jj_3R_239() { if (jj_done) return true; if (jj_3R_100()) return true; @@ -8871,11 +8506,11 @@ void parseInline(); return false; } - inline bool jj_3R_351() + inline bool jj_3R_346() { if (jj_done) return true; if (jj_scan_token(LIBRARY_T)) return true; - if (jj_3R_207()) return true; + if (jj_3R_205()) return true; if (jj_scan_token(SEMI_T)) return true; return false; } -- cgit v0.12 From e6a6e65d46196125a5baad4aeb1942aa043236fa Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 12 Jun 2020 13:35:46 +0200 Subject: Catch all wrong mkdir calls (coverity) - Always catch the output of `mkdir` - corrected an incorrect message (context.cpp) --- src/cite.cpp | 6 +++++- src/context.cpp | 2 +- src/template.cpp | 6 +++++- src/util.cpp | 10 ++++++++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/cite.cpp b/src/cite.cpp index 4adf6f2..82f9e6d 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -203,7 +203,11 @@ void CitationManager::generatePage() QCString bibOutputDir = outputDir+"/"+bibTmpDir; QCString bibOutputFiles = ""; QDir thisDir; - thisDir.mkdir(bibOutputDir); + if (!thisDir.exists(bibOutputDir) && !thisDir.mkdir(bibOutputDir)) + { + err("Failed to create temorary output directory '%s', skiping citations\n",bibOutputDir.data()); + return; + } int i = 0; for (const auto &bibdata : citeDataList) { diff --git a/src/context.cpp b/src/context.cpp index d21b1d0..3d71706 100644 --- a/src/context.cpp +++ b/src/context.cpp @@ -10343,7 +10343,7 @@ void generateTemplateFiles(const char *templateDir) QCString outDir = QCString(templateDir)+"/html"; if (!thisDir.exists(outDir) && !thisDir.mkdir(outDir)) { - err("Failed to create output directory '%s'\n",templateDir); + err("Failed to create output directory '%s'\n",outDir.data()); return; } ResourceMgr::instance().writeCategory("html",outDir); diff --git a/src/template.cpp b/src/template.cpp index 1763eec..c836c6b 100644 --- a/src/template.cpp +++ b/src/template.cpp @@ -2843,7 +2843,11 @@ template class TemplateNodeCreator : public TemplateNode if (d.exists()) { bool ok = d.mkdir(fileName.mid(j,i-j)); - if (!ok) break; + if (!ok) + { + err("Failed to create directory '%s'\n",(fileName.mid(j,i-j)).data()); + break; + } QCString dirName = outputDir+'/'+fileName.left(i); d = QDir(dirName); j = i+1; diff --git a/src/util.cpp b/src/util.cpp index 7006f26..1624b1c 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -5022,10 +5022,16 @@ void createSubDirs(QDir &d) int l1,l2; for (l1=0;l1<16;l1++) { - d.mkdir(QCString().sprintf("d%x",l1)); + if (!d.mkdir(QCString().sprintf("d%x",l1))) + { + term("Failed to create output directory '%s'\n",(QCString().sprintf("d%x",l1)).data()); + } for (l2=0;l2<256;l2++) { - d.mkdir(QCString().sprintf("d%x/d%02x",l1,l2)); + if (!d.mkdir(QCString().sprintf("d%x/d%02x",l1,l2))) + { + term("Failed to create output directory '%s'\n",(QCString().sprintf("d%x/d%02x",l1,l2)).data()); + } } } } -- cgit v0.12 From 906f429414678e0bcecf3c67d1f49f436bac2876 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 12 Jun 2020 15:28:22 +0200 Subject: Coverity uninitialized variable in mscgen_api.cpp - Initialize the variable ymax - add an extended example with "parallel events" triggered by a `,` instead of `;` between events --- libmscgen/mscgen_api.c | 1 + testing/037/037__msc_8cpp.xml | 27 +++++++++++++++++++++++++++ testing/037/class_receiver.xml | 4 ++-- testing/037/class_sender.xml | 4 ++-- testing/037_msc.cpp | 18 ++++++++++++++++++ 5 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 testing/037/037__msc_8cpp.xml diff --git a/libmscgen/mscgen_api.c b/libmscgen/mscgen_api.c index 376b9d8..e2cdcb9 100644 --- a/libmscgen/mscgen_api.c +++ b/libmscgen/mscgen_api.c @@ -457,6 +457,7 @@ static RowInfo *computeCanvasSize(Context *ctx, nextYmin = ymin = ctx->opts.entityHeadGap; yskipmax = 0; + ymax = 0; MscResetArcIterator(m); do { diff --git a/testing/037/037__msc_8cpp.xml b/testing/037/037__msc_8cpp.xml new file mode 100644 index 0000000..3de730d --- /dev/null +++ b/testing/037/037__msc_8cpp.xml @@ -0,0 +1,27 @@ + + + + 037_msc.cpp + Sender + Receiver + + + + A bit more complex msc diagram, with also parallel events. +Sender_1,Receiver_1,Sender1_1, +Sender,Receiver,Sender1, +Sender_2,Receiver_2,Sender1_2; + +Sender_1->Receiver_1 [label="Command()", URL="nref Receiver::Command()"], +Sender1_1<-Receiver_1 [label="Ack()", URL="nref Ack()", ID="1"]; + +Sender->Receiver [label="Command()", URL="nref Receiver::Command()"]; +Sender1<-Receiver [label="Ack()", URL="nref Ack()", ID="1"]; +Sender_2->Receiver_2 [label="Command()", URL="nref Receiver::Command()"], +Sender1_2<-Receiver_2 [label="Ack()", URL="nref Ack()", ID="1"]; + + + + + + diff --git a/testing/037/class_receiver.xml b/testing/037/class_receiver.xml index 24e82fd..b3c9c5a 100644 --- a/testing/037/class_receiver.xml +++ b/testing/037/class_receiver.xml @@ -19,7 +19,7 @@ - + @@ -32,7 +32,7 @@ - + Receiver diff --git a/testing/037/class_sender.xml b/testing/037/class_sender.xml index 525ab0a..14f29d1 100644 --- a/testing/037/class_sender.xml +++ b/testing/037/class_sender.xml @@ -19,7 +19,7 @@ - + @@ -32,7 +32,7 @@ - + Sender diff --git a/testing/037_msc.cpp b/testing/037_msc.cpp index 84ffc55..a3c0e4b 100644 --- a/testing/037_msc.cpp +++ b/testing/037_msc.cpp @@ -1,6 +1,24 @@ // objective: test the \msc and \endmsc commands // check: class_sender.xml // check: class_receiver.xml +// check: 037__msc_8cpp.xml + +/** \file + * A bit more complex msc diagram, with also parallel events. + * \msc + * Sender_1,Receiver_1,Sender1_1, + * Sender,Receiver,Sender1, + * Sender_2,Receiver_2,Sender1_2; + * + * Sender_1->Receiver_1 [label="Command()", URL="nref Receiver::Command()"], + * Sender1_1<-Receiver_1 [label="Ack()", URL="nref Ack()", ID="1"]; + * + * Sender->Receiver [label="Command()", URL="nref Receiver::Command()"]; + * Sender1<-Receiver [label="Ack()", URL="nref Ack()", ID="1"]; + * Sender_2->Receiver_2 [label="Command()", URL="nref Receiver::Command()"], + * Sender1_2<-Receiver_2 [label="Ack()", URL="nref Ack()", ID="1"]; + * \endmsc + */ /** Sender class. Can be used to send a command to the server. * The receiver will acknowledge the command by calling Ack(). -- cgit v0.12 From e7637f9dd977e9821394e7bed4dec02aec41ab9e Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 13 Jun 2020 14:54:25 +0200 Subject: Number of translatable terms (like Chapter) are in English instead of Greek (#7841) * Number of translatable terms (like Chapter) are in English instead of Greek When running tests in Greek OUTPUT_LANGUAGE mode for LaTeX a number of terms like Chapter were still in English instead of Greek. Some used references: https://tex.stackexchange.com/questions/548584/ascii-text-set-in-greek-script-when-using-usepackagegreekbabel https://tex.stackexchange.com/questions/548761/missing-characters-in-output-due-to-renewcommand-familydefault-sfdefault https://tex.stackexchange.com/questions/58624/variables-for-hiding-or-showing-text-in-latex * Number of translatable terms (like Chapter) are in English instead of Greek - adding the possibilities for mono spaced font (for code parts) - creating a more flexible way to change fonts for different languages See also discussion at https://tex.stackexchange.com/questions/548901/missing-characters-in-greek-output-due-to-ttfamily --- src/latexgen.cpp | 10 ++++++---- src/translator.h | 5 +++++ src/translator_gr.h | 24 ++++++++++++++++++++++-- 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/latexgen.cpp b/src/latexgen.cpp index f3cce3e..cb42863 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -560,11 +560,13 @@ static void writeDefaultHeaderPart1(FTextStream &t) { t << "\\usepackage[" << fontenc << "]{fontenc}\n"; } - t << "\\usepackage[scaled=.90]{helvet}\n" - "\\usepackage{courier}\n" - "\\usepackage{amssymb}\n" + QCString font = theTranslator->latexFont(); + if (!font.isEmpty()) + { + t << font; + } + t << "\\usepackage{amssymb}\n" "\\usepackage{sectsty}\n" - "\\renewcommand{\\familydefault}{\\sfdefault}\n" "\\allsectionsfont{%\n" " \\fontseries{bc}\\selectfont%\n" " \\color{darkgray}%\n" diff --git a/src/translator.h b/src/translator.h index 188b775..991e637 100644 --- a/src/translator.h +++ b/src/translator.h @@ -50,6 +50,11 @@ class Translator * can be returned. */ virtual QCString latexFontenc() { return "T1"; } + virtual QCString latexFont() { + return "\\usepackage[scaled=.90]{helvet}\n" + "\\usepackage{courier}\n" + "\\renewcommand{\\familydefault}{\\sfdefault}\n"; + } /*! * Sets the commands to be inserted directly after the `\\begin{document}` * in the LaTeX document. diff --git a/src/translator_gr.h b/src/translator_gr.h index 6ed43db..854a956 100644 --- a/src/translator_gr.h +++ b/src/translator_gr.h @@ -59,8 +59,18 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15 virtual QCString latexLanguageSupportCommand() { - return "\\usepackage[greek,english]{babel}\n" - "\\usepackage{alphabeta}\n"; + return "\\usepackage{fontspec}\n" + "\\usepackage[greek]{babel}\n"; + } + + virtual QCString latexFontenc() + { + return ""; + } + virtual QCString latexFont() + { + return "\\setmainfont{Libertinus Sans}\n" + "\\setmonofont{Courier New}\n"; } // --- Language translation methods ------------------- @@ -1159,6 +1169,16 @@ class TranslatorGreek : public TranslatorAdapter_1_8_15 return "1253"; } + virtual QCString latexCommandName() + { + QCString latex_command = Config_getString(LATEX_CMD_NAME); + if (latex_command.isEmpty()) latex_command = "latex"; + if (Config_getBool(USE_PDFLATEX)) + { + if (latex_command == "latex") latex_command = "xelatex"; + } + return latex_command; + } /*! Used as ansicpg for RTF fcharset */ -- cgit v0.12 From e53fa89addc9659ad406298d27a6376d1eb53e0d Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 13 Jun 2020 14:55:13 +0200 Subject: Incorrect label in map of dot files in xhtml (#7840) When a filename of a file starts with a digit the mapping of the resulting dot files results in message like: ``` Syntax of value for attribute id of map is not valid ``` an id cannot start with a digit, so an "a" is placed in front of it (unconditionally to overcome problems with a double label id i.e filename 087.cpp and a087.cpp). --- src/dotfilepatcher.cpp | 2 +- src/dotgraph.cpp | 2 +- src/util.cpp | 10 ++++++++++ src/util.h | 1 + 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/dotfilepatcher.cpp b/src/dotfilepatcher.cpp index 20ce4c1..17f8cb7 100644 --- a/src/dotfilepatcher.cpp +++ b/src/dotfilepatcher.cpp @@ -460,7 +460,7 @@ bool DotFilePatcher::run() const convertMapFile(tt,map->mapFile,map->relPath,map->urlOnly,map->context); if (!result.isEmpty()) { - t << "label << "\" id=\"" << map->label << "\">" << endl; + t << "label << "\" id=\"" << correctId(map->label) << "\">" << endl; t << result; t << "" << endl; } diff --git a/src/dotgraph.cpp b/src/dotgraph.cpp index c0cc4fd..1ad85e1 100644 --- a/src/dotgraph.cpp +++ b/src/dotgraph.cpp @@ -236,7 +236,7 @@ void DotGraph::generateCode(FTextStream &t) else // add link to bitmap file with image map { if (!m_noDivTag) t << "
      "; - t << "\"""; + t << "\"""; if (!m_noDivTag) t << "
      "; t << endl; if (m_regenerate || !insertMapFile(t, absMapName(), m_relPath, getMapLabel())) diff --git a/src/util.cpp b/src/util.cpp index 1624b1c..a298ace 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -5278,6 +5278,16 @@ QCString convertToId(const char *s) return growBuf.get(); } +/*! Some strings have been corrected but the requirement regarding the fact + * that an id cannot have a digit at the first position. To overcome problems + * with double labels we always place an "a" in front + */ +QCString correctId(QCString s) +{ + if (s.isEmpty()) return s; + return "a" + s; +} + /*! Converts a string to an XML-encoded string */ QCString convertToXML(const char *s, bool keepEntities) { diff --git a/src/util.h b/src/util.h index a93220c..65d164a 100644 --- a/src/util.h +++ b/src/util.h @@ -278,6 +278,7 @@ QCString insertTemplateSpecifierInScope(const QCString &scope,const QCString &te QCString stripScope(const char *name); QCString convertToId(const char *s); +QCString correctId(QCString s); QCString convertToHtml(const char *s,bool keepEntities=TRUE); -- cgit v0.12 From 963b8da31e03d149eefb9d61033db9f7263728da Mon Sep 17 00:00:00 2001 From: Sergei Izmailov Date: Sat, 13 Jun 2020 15:56:14 +0300 Subject: Add namespace inline flag in xml output (#7828) * Flag namespace as inline in xml output * Add inline namespace flag to innernamespace tag as well suggested by @mosra --- src/xmlgen.cpp | 7 +++++-- templates/xml/compound.xsd | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index 3a649e9..593f69a 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -1150,7 +1150,8 @@ static void writeInnerNamespaces(const NamespaceSDict *nl,FTextStream &t) if (!nd->isHidden() && !nd->isAnonymous()) { t << " getOutputFileBase() - << "\">" << convertToXML(nd->name()) << "" << endl; + << "\"" << (nd->isInline() ? " inline=\"yes\"" : "") + << ">" << convertToXML(nd->name()) << "" << endl; } } } @@ -1458,7 +1459,9 @@ static void generateXMLForNamespace(const NamespaceDef *nd,FTextStream &ti) writeXMLHeader(t); t << " getOutputFileBase() - << "\" kind=\"namespace\" language=\"" + << "\" kind=\"namespace\" " + << (nd->isInline()?"inline=\"yes\" ":"") + << "language=\"" << langToString(nd->getLanguage()) << "\">" << endl; t << " "; writeXMLString(t,nd->name()); diff --git a/templates/xml/compound.xsd b/templates/xml/compound.xsd index e17d2fa..4df19ce 100644 --- a/templates/xml/compound.xsd +++ b/templates/xml/compound.xsd @@ -43,6 +43,7 @@ + @@ -104,6 +105,7 @@ + -- cgit v0.12 From 42e36bdfa05f0a553f11bfd50f4a4eb2e9c74f82 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 13 Jun 2020 15:00:02 +0200 Subject: Addon option --pool to the test run script for parallel execution of tests (#7827) To make better use of the processors of a computer the possibility has been build to execute the tests in parallel, this is especially of an advantage for PDF tests. To make use of this option the number of parallel tests `np` has to be specified by means of `--pool=np`, the default is 1. --- testing/runtests.py | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/testing/runtests.py b/testing/runtests.py index 7896cdd..52fab66 100755 --- a/testing/runtests.py +++ b/testing/runtests.py @@ -183,7 +183,7 @@ class Tester: # check if the file we need to check is actually generated if not os.path.isfile(check_file): print('Non-existing file %s after \'check:\' statement' % check_file) - return + return False # convert output to canonical form data = xpopen('%s --format --noblanks --nowarning %s' % (self.args.xmllint,check_file)) if data: @@ -191,12 +191,13 @@ class Tester: data = re.sub(r'xsd" version="[0-9.-]+"','xsd" version=""',data).rstrip('\n') else: print('Failed to run %s on the doxygen output file %s' % (self.args.xmllint,self.test_out)) - return + return False out_file='%s/%s' % (self.test_out,check) with xopen(out_file,'w') as f: print(data,file=f) shutil.rmtree(self.test_out+'/out',ignore_errors=True) os.remove(self.test_out+'/Doxyfile') + return True # check the relevant files of a doxygen run with the reference material def perform_test(self,testmgr): @@ -401,17 +402,22 @@ class Tester: if failed_xml or failed_html or failed_latex or failed_docbook or failed_rtf or failed_xmlxsd: testmgr.ok(False,self.test_name,msg) - return + return False testmgr.ok(True,self.test_name) if not self.args.keep: shutil.rmtree(self.test_out,ignore_errors=True) + return True def run(self,testmgr): if self.update: - self.update_test(testmgr) + return self.update_test(testmgr) else: - self.perform_test(testmgr) + return self.perform_test(testmgr) + +def do_generation_work(test): + tester = Tester(test[0].args,test[1]) + return tester.run(test[0]) class TestManager: def __init__(self,args,tests): @@ -426,10 +432,10 @@ class TestManager: def ok(self,result,test_name,msg='Ok'): if result: - print('ok %s - %s' % (self.count,test_name)) + print('ok - %s' % (test_name)) self.passed = self.passed + 1 else: - print('not ok %s - %s' % (self.count,test_name)) + print('not ok - %s' % (test_name)) print('-------------------------------------') for o in msg: print(o) @@ -444,9 +450,20 @@ class TestManager: return 0 if self.passed==self.num_tests else 1 def perform_tests(self): - for test in self.tests: - tester = Tester(self.args,test) - tester.run(self) + if (self.args.pool == 1): + passed = 0 + for test in self.tests: + tester = Tester(self.args,test) + passed += tester.run(self) + self.passed = passed + else: + dl = [] + for test in self.tests: + dl += [(self, test)] + import multiprocessing as mp + p = mp.Pool(processes=self.args.pool) + passed = p.map(do_generation_work, dl) + self.passed = sum(passed) res=self.result() if self.args.xhtml and self.args.inputdir!='.' and not res and not self.args.keep: shutil.rmtree("dtd",ignore_errors=True) @@ -483,6 +500,8 @@ def main(): 'output directory to write the doxygen output to') parser.add_argument('--noredir',help= 'disable redirection of doxygen warnings',action="store_true") + parser.add_argument('--pool',nargs='?',default='1',type=int,help= + 'pool size of multiprocess tests') parser.add_argument('--xml',help='create xml output and check', action="store_true") parser.add_argument('--rtf',help= -- cgit v0.12 From 9438348bfc2fdf30ec96483679a3504cb8e17dfc Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 13 Jun 2020 15:00:28 +0200 Subject: Create link for GENERATE_XML (#7824) Small documentation consistency. --- doc/customize.doc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/customize.doc b/doc/customize.doc index 7b2729d..52f8d7a 100644 --- a/doc/customize.doc +++ b/doc/customize.doc @@ -372,7 +372,8 @@ generated output! If the above two methods still do not provide enough flexibility, you can also use the XML output produced by doxygen as a basis to -generate the output you like. To do this set GENERATE_XML to YES. +generate the output you like. To do this set +\ref cfg_generate_xml "GENERATE_XML" to \c YES. The XML output consists of an index file named \c index.xml which lists all items extracted by doxygen with references to the other XML files -- cgit v0.12 From e4a9056a5d0fb6764fadd4dac72e4a68184b9387 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 13 Jun 2020 15:01:50 +0200 Subject: issue #7810 LaTeX manual not built, but make install tries to install it (#7821) Give a meaningful fatal error when the pdf does not exists (when it exists automatically also the html directory with content exists). Give a meaningful fatal error when the chm does not exists. --- doc/CMakeLists.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index 537089b..df9c2a6 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -212,12 +212,22 @@ install(FILES DESTINATION ${CMAKE_INSTALL_MANDIR}/man1 ) +install(CODE "if(NOT EXISTS \"${PROJECT_BINARY_DIR}/latex/doxygen_manual.pdf\") + message(FATAL_ERROR \"\nTerminating:\n documentation has not been generated, \n create documentation by using the 'docs' target followed by an 'install'\n\") +endif()" +) + install(FILES "${PROJECT_BINARY_DIR}/latex/doxygen_manual.pdf" DESTINATION "${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}" ) if (build_doc_chm) +install(CODE "if(NOT EXISTS \"${PROJECT_BINARY_DIR}/chm/doxygen_manual.chm\") + message(FATAL_ERROR \"\nTerminating:\n CHM documentation has not been generated, \n create CHM documentation by using the 'docs_chm' target followed by an 'install'\n\") +endif()" +) + install(FILES "${PROJECT_BINARY_DIR}/chm/doxygen_manual.chm" DESTINATION "${CMAKE_INSTALL_PREFIX}/${DOC_INSTALL_DIR}" -- cgit v0.12 From fce24d0725943a9b1a1ac069449fda1d0bdf9ab7 Mon Sep 17 00:00:00 2001 From: David Hebbeker Date: Sat, 13 Jun 2020 15:02:20 +0200 Subject: Add `const` qualifier to UsedDir::m_dir. (#7820) --- src/dirdef.cpp | 2 +- src/dirdef.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dirdef.cpp b/src/dirdef.cpp index 7f0b524..dd8444e 100644 --- a/src/dirdef.cpp +++ b/src/dirdef.cpp @@ -750,7 +750,7 @@ int FilePairDict::compareValues(const FilePair *left,const FilePair *right) cons //---------------------------------------------------------------------- -UsedDir::UsedDir(DirDef *dir,bool inherited) : +UsedDir::UsedDir(const DirDef *dir,bool inherited) : m_dir(dir), m_filePairs(7), m_inherited(inherited) { m_filePairs.setAutoDelete(TRUE); diff --git a/src/dirdef.h b/src/dirdef.h index 399e0c2..468901d 100644 --- a/src/dirdef.h +++ b/src/dirdef.h @@ -104,7 +104,7 @@ class FilePairDict : public SDict class UsedDir { public: - UsedDir(DirDef *dir,bool inherited); + UsedDir(const DirDef *dir,bool inherited); virtual ~UsedDir(); void addFileDep(FileDef *srcFd,FileDef *dstFd); FilePair *findFilePair(const char *name); @@ -114,7 +114,7 @@ class UsedDir void sort(); private: - DirDef *m_dir; + const DirDef *m_dir; FilePairDict m_filePairs; bool m_inherited; }; -- cgit v0.12 From 2aef0e0e4f91038b0b1d952efad0a3aba7d6a6cd Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 13 Jun 2020 15:04:37 +0200 Subject: bug_121547 extern variable is being referenced in documentation incorrectly (#7792) It is made clear that where the variable is declared "extern" that it is also shown at that place in the documentation --- src/memberdef.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/memberdef.cpp b/src/memberdef.cpp index d857fa6..1d7909b 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -2733,7 +2733,7 @@ void MemberDefImpl::getLabels(QStrList &sl,const Definition *container) const isFriend() || isRelated() || (isInline() && inlineInfo) || isSignal() || isSlot() || - isStatic() || + isStatic() || isExternal() || (getClassDef() && getClassDef()!=container && container->definitionType()==TypeClass) || (m_impl->memSpec & ~Entry::Inline)!=0 ) @@ -2745,7 +2745,7 @@ void MemberDefImpl::getLabels(QStrList &sl,const Definition *container) const //ol.docify(" ["); SrcLangExt lang = getLanguage(); bool optVhdl = lang==SrcLangExt_VHDL; - bool extractPrivate = Config_getBool(EXTRACT_PRIVATE); + static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE); if (optVhdl) { sl.append(theTranslator->trVhdlType(getMemberSpecifiers(),TRUE)); @@ -2756,7 +2756,8 @@ void MemberDefImpl::getLabels(QStrList &sl,const Definition *container) const else if (isRelated()) sl.append("related"); else { - if (Config_getBool(INLINE_INFO) && isInline()) sl.append("inline"); + if (isExternal()) sl.append("extern"); + if (inlineInfo && isInline()) sl.append("inline"); if (isExplicit()) sl.append("explicit"); if (isMutable()) sl.append("mutable"); if (isStatic()) sl.append("static"); -- cgit v0.12 From 22d8ffd11ad8b864941ba73f2161622d693f4f49 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 13 Jun 2020 15:05:45 +0200 Subject: Running doxygen tests with variable with spaces (#7819) When having a run command like: ``` nmake tests TEST_FLAGS="--xhtml --keep --cfg GENERATE_HTMLHELP=YES --cfg HHC_LOCATION=\"c:\Program Files (x86)\HTML Help Workshop\hhc.exe\" --cfg HTML_FILE_EXTENSION=.html --cfg SEARCHENGINE=NO --id=1" ``` we get an error like ``` Not a doxygen configuration item, missing '=' sign: 'Files'. ``` this is due to the usage of the `split()` that does a brute force split on spaces. Making the splitting a bit more intelligent: - splitting on `--` - splitting on space after "command" --- testing/runtests.py | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/testing/runtests.py b/testing/runtests.py index 52fab66..5d5cee1 100755 --- a/testing/runtests.py +++ b/testing/runtests.py @@ -150,11 +150,11 @@ class Tester: if (self.args.clang): print('CLANG_ASSISTED_PARSING=YES', file=f) if (self.args.cfgs): - for cfg in list(itertools.chain.from_iterable(self.args.cfgs)): - if cfg.find('=') == -1: + for cfg in self.args.cfgs: + if cfg[0].find('=') == -1: print("Not a doxygen configuration item, missing '=' sign: '%s'."%cfg) sys.exit(1) - print(cfg, file=f) + print(cfg[0], file=f) if 'check' not in self.config or not self.config['check']: print('Test doesn\'t specify any files to check') @@ -474,6 +474,25 @@ class TestManager: shutil.rmtree("dtd",ignore_errors=True) shutil.copytree(self.args.inputdir+"/dtd", "dtd") +def split_and_keep(s, sep): + if not s: return [] + + # Find replacement character that is not used in string + # i.e. just use the highest available character plus one + # Note: This fails if ord(max(s)) = 0x10FFFF (ValueError) + p=chr(ord(max(s))+1) + + retVal = [] + for val in s.replace(sep, p+sep).split(p): + vv = val.split(" ",1) + if ((len(vv) == 1) and not vv[0] == ''): + retVal += vv + if ((len(vv) == 2) and not vv[1] == ''): + retVal += vv + if ((len(vv) == 2) and vv[1] == ''): + retVal += [vv[0]] + return retVal + def main(): # argument handling parser = argparse.ArgumentParser(description='run doxygen tests') @@ -524,7 +543,9 @@ def main(): parser.add_argument('--cfg',nargs='+',dest='cfgs',action='append',help= 'run test with extra doxygen configuration settings ' '(the option may be specified multiple times') - test_flags = os.getenv('TEST_FLAGS', default='').split() + + test_flags = split_and_keep(os.getenv('TEST_FLAGS', default=''), '--') + args = parser.parse_args(test_flags + sys.argv[1:]) # sanity check -- cgit v0.12 From 65bf92c94f2118b0f6e6c19e62993c6e27ebbef9 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 13 Jun 2020 15:07:52 +0200 Subject: issue #7796 Backticks (`) in Doxygen-markup-in-C in Markdown collapses (#7797) * issue #7796 Backticks (`) in Doxygen-markup-in-C in Markdown collapses The problem occurs when the backtick is just before the end of line. The fenced block will only terminate when the same number of fence characters are present, otherwise the search will continue. * issue #7796 Backticks (`) in Doxygen-markup-in-C in Markdown collapses Removed unintentional tab. --- src/markdown.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index c4dd9fb..06b714a 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -1501,8 +1501,11 @@ static bool isFencedCodeBlock(const char *data,int size,int refIndent, while (i Date: Sat, 13 Jun 2020 19:51:29 +0200 Subject: Spelling correction in cite code Correction of 2 spelling errors (thanks to Fossies). --- src/cite.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cite.cpp b/src/cite.cpp index 82f9e6d..78df0c3 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -205,7 +205,7 @@ void CitationManager::generatePage() QDir thisDir; if (!thisDir.exists(bibOutputDir) && !thisDir.mkdir(bibOutputDir)) { - err("Failed to create temorary output directory '%s', skiping citations\n",bibOutputDir.data()); + err("Failed to create temporary output directory '%s', skipping citations\n",bibOutputDir.data()); return; } int i = 0; -- cgit v0.12 From 07dd4ae9033c9872d70d68ff1d83ec46f1db7cb4 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 13 Jun 2020 20:45:58 +0200 Subject: Add options to enable various sanitizers New CMAKE options (default OFF): - SANITIZE_ADDRESS:BOOL=OFF - SANITIZE_LINK_STATIC:BOOL=OFF - SANITIZE_MEMORY:BOOL=OFF - SANITIZE_THREAD:BOOL=OFF - SANITIZE_UNDEFINED:BOOL=OFF --- CMakeLists.txt | 2 + cmake/Sanitizers/FindASan.cmake | 59 +++++++++++ cmake/Sanitizers/FindMSan.cmake | 57 ++++++++++ cmake/Sanitizers/FindSanitizers.cmake | 94 +++++++++++++++++ cmake/Sanitizers/FindTSan.cmake | 65 ++++++++++++ cmake/Sanitizers/FindUBSan.cmake | 46 +++++++++ cmake/Sanitizers/asan-wrapper | 55 ++++++++++ cmake/Sanitizers/sanitize-helpers.cmake | 177 ++++++++++++++++++++++++++++++++ src/CMakeLists.txt | 4 + src/perlmodgen.cpp | 10 -- 10 files changed, 559 insertions(+), 10 deletions(-) create mode 100644 cmake/Sanitizers/FindASan.cmake create mode 100644 cmake/Sanitizers/FindMSan.cmake create mode 100644 cmake/Sanitizers/FindSanitizers.cmake create mode 100644 cmake/Sanitizers/FindTSan.cmake create mode 100644 cmake/Sanitizers/FindUBSan.cmake create mode 100644 cmake/Sanitizers/asan-wrapper create mode 100644 cmake/Sanitizers/sanitize-helpers.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 16c0454..88b99d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,7 @@ option(enable_coverage "Enable coverage reporting for gcc/clang [development]" O SET(enlarge_lex_buffers "262144" CACHE INTERNAL "Sets the lex input and read buffers to the specified size") list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") +list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Sanitizers") set(TOP "${CMAKE_SOURCE_DIR}") include(version) @@ -102,6 +103,7 @@ if (BISON_VERSION VERSION_LESS 2.7) message(SEND_ERROR "Doxygen requires at least bison version 2.7 (installed: ${BISON_VERSION})") endif() find_package(Threads) +find_package(Sanitizers) if (sqlite3) find_package(SQLite3 REQUIRED) diff --git a/cmake/Sanitizers/FindASan.cmake b/cmake/Sanitizers/FindASan.cmake new file mode 100644 index 0000000..98ea7cb --- /dev/null +++ b/cmake/Sanitizers/FindASan.cmake @@ -0,0 +1,59 @@ +# The MIT License (MIT) +# +# Copyright (c) +# 2013 Matthew Arsenault +# 2015-2016 RWTH Aachen University, Federal Republic of Germany +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +option(SANITIZE_ADDRESS "Enable AddressSanitizer for sanitized targets." Off) + +set(FLAG_CANDIDATES + # Clang 3.2+ use this version. The no-omit-frame-pointer option is optional. + "-g -fsanitize=address -fno-omit-frame-pointer" + "-g -fsanitize=address" + + # Older deprecated flag for ASan + "-g -faddress-sanitizer" +) + + +if (SANITIZE_ADDRESS AND (SANITIZE_THREAD OR SANITIZE_MEMORY)) + message(FATAL_ERROR "AddressSanitizer is not compatible with " + "ThreadSanitizer or MemorySanitizer.") +endif () + + +include(sanitize-helpers) + +if (SANITIZE_ADDRESS) + sanitizer_check_compiler_flags("${FLAG_CANDIDATES}" "AddressSanitizer" + "ASan") + + find_program(ASan_WRAPPER "asan-wrapper" PATHS ${CMAKE_MODULE_PATH}) + mark_as_advanced(ASan_WRAPPER) +endif () + +function (add_sanitize_address TARGET) + if (NOT SANITIZE_ADDRESS) + return() + endif () + + sanitizer_add_flags(${TARGET} "AddressSanitizer" "ASan") +endfunction () diff --git a/cmake/Sanitizers/FindMSan.cmake b/cmake/Sanitizers/FindMSan.cmake new file mode 100644 index 0000000..22d0050 --- /dev/null +++ b/cmake/Sanitizers/FindMSan.cmake @@ -0,0 +1,57 @@ +# The MIT License (MIT) +# +# Copyright (c) +# 2013 Matthew Arsenault +# 2015-2016 RWTH Aachen University, Federal Republic of Germany +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +option(SANITIZE_MEMORY "Enable MemorySanitizer for sanitized targets." Off) + +set(FLAG_CANDIDATES + "-g -fsanitize=memory" +) + + +include(sanitize-helpers) + +if (SANITIZE_MEMORY) + if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + message(WARNING "MemorySanitizer disabled for target ${TARGET} because " + "MemorySanitizer is supported for Linux systems only.") + set(SANITIZE_MEMORY Off CACHE BOOL + "Enable MemorySanitizer for sanitized targets." FORCE) + elseif (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8) + message(WARNING "MemorySanitizer disabled for target ${TARGET} because " + "MemorySanitizer is supported for 64bit systems only.") + set(SANITIZE_MEMORY Off CACHE BOOL + "Enable MemorySanitizer for sanitized targets." FORCE) + else () + sanitizer_check_compiler_flags("${FLAG_CANDIDATES}" "MemorySanitizer" + "MSan") + endif () +endif () + +function (add_sanitize_memory TARGET) + if (NOT SANITIZE_MEMORY) + return() + endif () + + sanitizer_add_flags(${TARGET} "MemorySanitizer" "MSan") +endfunction () diff --git a/cmake/Sanitizers/FindSanitizers.cmake b/cmake/Sanitizers/FindSanitizers.cmake new file mode 100644 index 0000000..101bab8 --- /dev/null +++ b/cmake/Sanitizers/FindSanitizers.cmake @@ -0,0 +1,94 @@ +# The MIT License (MIT) +# +# Copyright (c) +# 2013 Matthew Arsenault +# 2015-2016 RWTH Aachen University, Federal Republic of Germany +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# If any of the used compiler is a GNU compiler, add a second option to static +# link against the sanitizers. +option(SANITIZE_LINK_STATIC "Try to link static against sanitizers." Off) + + + + +set(FIND_QUIETLY_FLAG "") +if (DEFINED Sanitizers_FIND_QUIETLY) + set(FIND_QUIETLY_FLAG "QUIET") +endif () + +find_package(ASan ${FIND_QUIETLY_FLAG}) +find_package(TSan ${FIND_QUIETLY_FLAG}) +find_package(MSan ${FIND_QUIETLY_FLAG}) +find_package(UBSan ${FIND_QUIETLY_FLAG}) + + + + +function(sanitizer_add_blacklist_file FILE) + if(NOT IS_ABSOLUTE ${FILE}) + set(FILE "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}") + endif() + get_filename_component(FILE "${FILE}" REALPATH) + + sanitizer_check_compiler_flags("-fsanitize-blacklist=${FILE}" + "SanitizerBlacklist" "SanBlist") +endfunction() + +function(add_sanitizers ...) + # If no sanitizer is enabled, return immediately. + if (NOT (SANITIZE_ADDRESS OR SANITIZE_MEMORY OR SANITIZE_THREAD OR + SANITIZE_UNDEFINED)) + return() + endif () + + foreach (TARGET ${ARGV}) + # Check if this target will be compiled by exactly one compiler. Other- + # wise sanitizers can't be used and a warning should be printed once. + get_target_property(TARGET_TYPE ${TARGET} TYPE) + if (TARGET_TYPE STREQUAL "INTERFACE_LIBRARY") + message(WARNING "Can't use any sanitizers for target ${TARGET}, " + "because it is an interface library and cannot be " + "compiled directly.") + return() + endif () + sanitizer_target_compilers(${TARGET} TARGET_COMPILER) + list(LENGTH TARGET_COMPILER NUM_COMPILERS) + if (NUM_COMPILERS GREATER 1) + message(WARNING "Can't use any sanitizers for target ${TARGET}, " + "because it will be compiled by incompatible compilers. " + "Target will be compiled without sanitizers.") + return() + + # If the target is compiled by no or no known compiler, give a warning. + elseif (NUM_COMPILERS EQUAL 0) + message(WARNING "Sanitizers for target ${TARGET} may not be" + " usable, because it uses no or an unknown compiler. " + "This is a false warning for targets using only " + "object lib(s) as input.") + endif () + + # Add sanitizers for target. + add_sanitize_address(${TARGET}) + add_sanitize_thread(${TARGET}) + add_sanitize_memory(${TARGET}) + add_sanitize_undefined(${TARGET}) + endforeach () +endfunction(add_sanitizers) diff --git a/cmake/Sanitizers/FindTSan.cmake b/cmake/Sanitizers/FindTSan.cmake new file mode 100644 index 0000000..3cba3c0 --- /dev/null +++ b/cmake/Sanitizers/FindTSan.cmake @@ -0,0 +1,65 @@ +# The MIT License (MIT) +# +# Copyright (c) +# 2013 Matthew Arsenault +# 2015-2016 RWTH Aachen University, Federal Republic of Germany +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +option(SANITIZE_THREAD "Enable ThreadSanitizer for sanitized targets." Off) + +set(FLAG_CANDIDATES + "-g -fsanitize=thread" +) + + +# ThreadSanitizer is not compatible with MemorySanitizer. +if (SANITIZE_THREAD AND SANITIZE_MEMORY) + message(FATAL_ERROR "ThreadSanitizer is not compatible with " + "MemorySanitizer.") +endif () + + +include(sanitize-helpers) + +if (SANITIZE_THREAD) + if (NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND + NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + message(WARNING "ThreadSanitizer disabled for target ${TARGET} because " + "ThreadSanitizer is supported for Linux systems and macOS only.") + set(SANITIZE_THREAD Off CACHE BOOL + "Enable ThreadSanitizer for sanitized targets." FORCE) + elseif (NOT ${CMAKE_SIZEOF_VOID_P} EQUAL 8) + message(WARNING "ThreadSanitizer disabled for target ${TARGET} because " + "ThreadSanitizer is supported for 64bit systems only.") + set(SANITIZE_THREAD Off CACHE BOOL + "Enable ThreadSanitizer for sanitized targets." FORCE) + else () + sanitizer_check_compiler_flags("${FLAG_CANDIDATES}" "ThreadSanitizer" + "TSan") + endif () +endif () + +function (add_sanitize_thread TARGET) + if (NOT SANITIZE_THREAD) + return() + endif () + + sanitizer_add_flags(${TARGET} "ThreadSanitizer" "TSan") +endfunction () diff --git a/cmake/Sanitizers/FindUBSan.cmake b/cmake/Sanitizers/FindUBSan.cmake new file mode 100644 index 0000000..ae103f7 --- /dev/null +++ b/cmake/Sanitizers/FindUBSan.cmake @@ -0,0 +1,46 @@ +# The MIT License (MIT) +# +# Copyright (c) +# 2013 Matthew Arsenault +# 2015-2016 RWTH Aachen University, Federal Republic of Germany +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +option(SANITIZE_UNDEFINED + "Enable UndefinedBehaviorSanitizer for sanitized targets." Off) + +set(FLAG_CANDIDATES + "-g -fsanitize=undefined" +) + + +include(sanitize-helpers) + +if (SANITIZE_UNDEFINED) + sanitizer_check_compiler_flags("${FLAG_CANDIDATES}" + "UndefinedBehaviorSanitizer" "UBSan") +endif () + +function (add_sanitize_undefined TARGET) + if (NOT SANITIZE_UNDEFINED) + return() + endif () + + sanitizer_add_flags(${TARGET} "UndefinedBehaviorSanitizer" "UBSan") +endfunction () diff --git a/cmake/Sanitizers/asan-wrapper b/cmake/Sanitizers/asan-wrapper new file mode 100644 index 0000000..5d54103 --- /dev/null +++ b/cmake/Sanitizers/asan-wrapper @@ -0,0 +1,55 @@ +#!/bin/sh + +# The MIT License (MIT) +# +# Copyright (c) +# 2013 Matthew Arsenault +# 2015-2016 RWTH Aachen University, Federal Republic of Germany +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# This script is a wrapper for AddressSanitizer. In some special cases you need +# to preload AddressSanitizer to avoid error messages - e.g. if you're +# preloading another library to your application. At the moment this script will +# only do something, if we're running on a Linux platform. OSX might not be +# affected. + + +# Exit immediately, if platform is not Linux. +if [ "$(uname)" != "Linux" ] +then + exec $@ +fi + + +# Get the used libasan of the application ($1). If a libasan was found, it will +# be prepended to LD_PRELOAD. +libasan=$(ldd $1 | grep libasan | sed "s/^[[:space:]]//" | cut -d' ' -f1) +if [ -n "$libasan" ] +then + if [ -n "$LD_PRELOAD" ] + then + export LD_PRELOAD="$libasan:$LD_PRELOAD" + else + export LD_PRELOAD="$libasan" + fi +fi + +# Execute the application. +exec $@ diff --git a/cmake/Sanitizers/sanitize-helpers.cmake b/cmake/Sanitizers/sanitize-helpers.cmake new file mode 100644 index 0000000..3649b07 --- /dev/null +++ b/cmake/Sanitizers/sanitize-helpers.cmake @@ -0,0 +1,177 @@ +# The MIT License (MIT) +# +# Copyright (c) +# 2013 Matthew Arsenault +# 2015-2016 RWTH Aachen University, Federal Republic of Germany +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +# Helper function to get the language of a source file. +function (sanitizer_lang_of_source FILE RETURN_VAR) + get_filename_component(LONGEST_EXT "${FILE}" EXT) + # If extension is empty return. This can happen for extensionless headers + if("${LONGEST_EXT}" STREQUAL "") + set(${RETURN_VAR} "" PARENT_SCOPE) + return() + endif() + # Get shortest extension as some files can have dot in their names + string(REGEX REPLACE "^.*(\\.[^.]+)$" "\\1" FILE_EXT ${LONGEST_EXT}) + string(TOLOWER "${FILE_EXT}" FILE_EXT) + string(SUBSTRING "${FILE_EXT}" 1 -1 FILE_EXT) + + get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) + foreach (LANG ${ENABLED_LANGUAGES}) + list(FIND CMAKE_${LANG}_SOURCE_FILE_EXTENSIONS "${FILE_EXT}" TEMP) + if (NOT ${TEMP} EQUAL -1) + set(${RETURN_VAR} "${LANG}" PARENT_SCOPE) + return() + endif () + endforeach() + + set(${RETURN_VAR} "" PARENT_SCOPE) +endfunction () + + +# Helper function to get compilers used by a target. +function (sanitizer_target_compilers TARGET RETURN_VAR) + # Check if all sources for target use the same compiler. If a target uses + # e.g. C and Fortran mixed and uses different compilers (e.g. clang and + # gfortran) this can trigger huge problems, because different compilers may + # use different implementations for sanitizers. + set(BUFFER "") + get_target_property(TSOURCES ${TARGET} SOURCES) + foreach (FILE ${TSOURCES}) + # If expression was found, FILE is a generator-expression for an object + # library. Object libraries will be ignored. + string(REGEX MATCH "TARGET_OBJECTS:([^ >]+)" _file ${FILE}) + if ("${_file}" STREQUAL "") + sanitizer_lang_of_source(${FILE} LANG) + if (LANG) + list(APPEND BUFFER ${CMAKE_${LANG}_COMPILER_ID}) + endif () + endif () + endforeach () + + list(REMOVE_DUPLICATES BUFFER) + set(${RETURN_VAR} "${BUFFER}" PARENT_SCOPE) +endfunction () + + +# Helper function to check compiler flags for language compiler. +function (sanitizer_check_compiler_flag FLAG LANG VARIABLE) + if (${LANG} STREQUAL "C") + include(CheckCCompilerFlag) + check_c_compiler_flag("${FLAG}" ${VARIABLE}) + + elseif (${LANG} STREQUAL "CXX") + include(CheckCXXCompilerFlag) + check_cxx_compiler_flag("${FLAG}" ${VARIABLE}) + + elseif (${LANG} STREQUAL "Fortran") + # CheckFortranCompilerFlag was introduced in CMake 3.x. To be compatible + # with older Cmake versions, we will check if this module is present + # before we use it. Otherwise we will define Fortran coverage support as + # not available. + include(CheckFortranCompilerFlag OPTIONAL RESULT_VARIABLE INCLUDED) + if (INCLUDED) + check_fortran_compiler_flag("${FLAG}" ${VARIABLE}) + elseif (NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Performing Test ${VARIABLE}") + message(STATUS "Performing Test ${VARIABLE}" + " - Failed (Check not supported)") + endif () + endif() +endfunction () + + +# Helper function to test compiler flags. +function (sanitizer_check_compiler_flags FLAG_CANDIDATES NAME PREFIX) + set(CMAKE_REQUIRED_QUIET ${${PREFIX}_FIND_QUIETLY}) + + get_property(ENABLED_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) + foreach (LANG ${ENABLED_LANGUAGES}) + # Sanitizer flags are not dependend on language, but the used compiler. + # So instead of searching flags foreach language, search flags foreach + # compiler used. + set(COMPILER ${CMAKE_${LANG}_COMPILER_ID}) + if (NOT DEFINED ${PREFIX}_${COMPILER}_FLAGS) + foreach (FLAG ${FLAG_CANDIDATES}) + if(NOT CMAKE_REQUIRED_QUIET) + message(STATUS "Try ${COMPILER} ${NAME} flag = [${FLAG}]") + endif() + + set(CMAKE_REQUIRED_FLAGS "${FLAG}") + unset(${PREFIX}_FLAG_DETECTED CACHE) + sanitizer_check_compiler_flag("${FLAG}" ${LANG} + ${PREFIX}_FLAG_DETECTED) + + if (${PREFIX}_FLAG_DETECTED) + # If compiler is a GNU compiler, search for static flag, if + # SANITIZE_LINK_STATIC is enabled. + if (SANITIZE_LINK_STATIC AND (${COMPILER} STREQUAL "GNU")) + string(TOLOWER ${PREFIX} PREFIX_lower) + sanitizer_check_compiler_flag( + "-static-lib${PREFIX_lower}" ${LANG} + ${PREFIX}_STATIC_FLAG_DETECTED) + + if (${PREFIX}_STATIC_FLAG_DETECTED) + set(FLAG "-static-lib${PREFIX_lower} ${FLAG}") + endif () + endif () + + set(${PREFIX}_${COMPILER}_FLAGS "${FLAG}" CACHE STRING + "${NAME} flags for ${COMPILER} compiler.") + mark_as_advanced(${PREFIX}_${COMPILER}_FLAGS) + break() + endif () + endforeach () + + if (NOT ${PREFIX}_FLAG_DETECTED) + set(${PREFIX}_${COMPILER}_FLAGS "" CACHE STRING + "${NAME} flags for ${COMPILER} compiler.") + mark_as_advanced(${PREFIX}_${COMPILER}_FLAGS) + + message(WARNING "${NAME} is not available for ${COMPILER} " + "compiler. Targets using this compiler will be " + "compiled without ${NAME}.") + endif () + endif () + endforeach () +endfunction () + + +# Helper to assign sanitizer flags for TARGET. +function (sanitizer_add_flags TARGET NAME PREFIX) + # Get list of compilers used by target and check, if sanitizer is available + # for this target. Other compiler checks like check for conflicting + # compilers will be done in add_sanitizers function. + sanitizer_target_compilers(${TARGET} TARGET_COMPILER) + list(LENGTH TARGET_COMPILER NUM_COMPILERS) + if ("${${PREFIX}_${TARGET_COMPILER}_FLAGS}" STREQUAL "") + return() + endif() + + # Set compile- and link-flags for target. + set_property(TARGET ${TARGET} APPEND_STRING + PROPERTY COMPILE_FLAGS " ${${PREFIX}_${TARGET_COMPILER}_FLAGS}") + set_property(TARGET ${TARGET} APPEND_STRING + PROPERTY COMPILE_FLAGS " ${SanBlist_${TARGET_COMPILER}_FLAGS}") + set_property(TARGET ${TARGET} APPEND_STRING + PROPERTY LINK_FLAGS " ${${PREFIX}_${TARGET_COMPILER}_FLAGS}") +endfunction () diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 598f73c..c8f1b86 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -167,6 +167,7 @@ add_library(doxycfg STATIC message.cpp debug.cpp ) +add_sanitizers(doxycfg) add_library(doxymain STATIC # generated for/by flex/bison @@ -296,6 +297,7 @@ add_library(doxymain STATIC xmldocvisitor.cpp xmlgen.cpp ) +add_sanitizers(doxymain) # LLVM/clang headers give a lot of warnings with -Wshadow and -Wcast-align so we disable them for # the one file that includes them @@ -311,6 +313,7 @@ endif() add_executable(doxygen main.cpp ) +add_sanitizers(doxygen) if (use_libclang) find_package(LLVM REQUIRED CONFIG) @@ -359,5 +362,6 @@ set_project_coverage(doxycfg) set_project_coverage(doxymain) set_project_coverage(doxygen) + install(TARGETS doxygen DESTINATION bin) diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index a08e480..843341f 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -1446,16 +1446,6 @@ static void addTemplateArgumentList(const ArgumentList &al,PerlModOutput &output output.closeList(); } -#if 0 -static void addMemberTemplateLists(MemberDef *md,PerlModOutput &output) -{ - ClassDef *cd = md->getClassDef(); - const char *cname = cd ? cd->name().data() : 0; - if (md->templateArguments()) // function template prefix - addTemplateArgumentList(md->templateArguments(),output,cname); -} -#endif - static void addTemplateList(const ClassDef *cd,PerlModOutput &output) { addTemplateArgumentList(cd->templateArguments(),output,cd->name()); -- cgit v0.12 From 5ee4689955e27dad85e9d722d48692f60593a812 Mon Sep 17 00:00:00 2001 From: Thomas Vogt Date: Sun, 14 Jun 2020 14:24:51 +0200 Subject: Updated formatting rules for paragraphs within table header cells. Only present paragraphs within table headers (th) with font weight strong, keep normal table cells (td) unaffected. --- templates/html/doxygen.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/html/doxygen.css b/templates/html/doxygen.css index 8f2c213..30eb1ac 100644 --- a/templates/html/doxygen.css +++ b/templates/html/doxygen.css @@ -66,7 +66,7 @@ p.startli, p.startdd { margin-top: 2px; } -th p.starttd, p.intertd, p.endtd { +th p.starttd, th p.intertd, th p.endtd { font-size: 100%; font-weight: 700; } -- cgit v0.12 From 3040df2f0aa29a4207de5b37da1d20e3d27340bb Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 14 Jun 2020 17:00:10 +0200 Subject: Added atomic reference counting to QString --- qtools/qshared.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qtools/qshared.h b/qtools/qshared.h index 79fab7b..58ad6fc 100644 --- a/qtools/qshared.h +++ b/qtools/qshared.h @@ -1,5 +1,5 @@ /**************************************************************************** -** +** ** ** Definition of QShared struct ** @@ -42,13 +42,15 @@ #include "qglobal.h" #endif // QT_H +#include + struct QShared { - QShared() { count = 1; } + QShared() : count(1) { } void ref() { count++; } bool deref() { return !--count; } - uint count; + std::atomic_uint count; }; -- cgit v0.12 From df070ebb578db360f4b888a6d674d9e20b58a523 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 16 Jun 2020 15:18:25 +0200 Subject: Show doxywizard version by means of --version Analogous to show help information (`--help`) also show the, full, version of the doxywizard (in the about box only the short version is shown). --- addon/doxywizard/doxywizard.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index 27c99da..ce22367 100755 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -698,6 +698,13 @@ int main(int argc,char **argv) msgBox.exec(); exit(0); } + else if (!qstrcmp(argv[1],"--version")) + { + QMessageBox msgBox; + msgBox.setText(QString::fromLatin1("Doxywizard version: %1").arg(QString::fromLatin1(getFullVersion()))); + msgBox.exec(); + exit(0); + } } if (argc > 2) { -- cgit v0.12 From e922facbb92cda058eae33f58f7640be8d1fb5b8 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 15 Jun 2020 19:25:46 +0200 Subject: Refactor: modernize markdown and make it thread-safe --- addon/doxyapp/CMakeLists.txt | 1 + addon/doxyparse/CMakeLists.txt | 1 + src/classdef.cpp | 12 +- src/commentscan.h | 8 +- src/commentscan.l | 2095 ++++++++++++++++++++-------------------- src/context.cpp | 3 +- src/dirdef.cpp | 15 +- src/docparser.cpp | 11 +- src/docparser.h | 103 +- src/doctokenizer.h | 8 +- src/doctokenizer.l | 16 +- src/doxygen.cpp | 9 +- src/doxygen.h | 2 +- src/filedef.cpp | 9 +- src/fortranscanner.l | 8 +- src/ftvhelp.cpp | 3 +- src/groupdef.cpp | 24 +- src/growbuf.h | 1 + src/index.cpp | 25 +- src/markdown.cpp | 725 ++++++-------- src/markdown.h | 83 +- src/memberdef.cpp | 33 +- src/memberlist.cpp | 9 +- src/namespacedef.cpp | 12 +- src/outputlist.cpp | 5 +- src/outputlist.h | 5 +- src/pagedef.cpp | 60 +- src/perlmodgen.cpp | 3 +- src/pyscanner.l | 6 +- src/scanner.l | 12 +- src/sqlite3gen.cpp | 6 +- src/util.cpp | 6 +- src/vhdldocgen.cpp | 11 +- src/vhdljjparser.cpp | 16 +- src/xmlgen.cpp | 3 +- 35 files changed, 1688 insertions(+), 1661 deletions(-) diff --git a/addon/doxyapp/CMakeLists.txt b/addon/doxyapp/CMakeLists.txt index 9d74fbc..8ec4d2e 100644 --- a/addon/doxyapp/CMakeLists.txt +++ b/addon/doxyapp/CMakeLists.txt @@ -12,6 +12,7 @@ include_directories( add_executable(doxyapp doxyapp.cpp ) +add_sanitizers(doxyapp) if (use_libclang) set(CLANG_LIBS libclang clangTooling ${llvm_libs}) diff --git a/addon/doxyparse/CMakeLists.txt b/addon/doxyparse/CMakeLists.txt index 8e0ad49..6ddc113 100644 --- a/addon/doxyparse/CMakeLists.txt +++ b/addon/doxyparse/CMakeLists.txt @@ -12,6 +12,7 @@ include_directories( add_executable(doxyparse doxyparse.cpp ) +add_sanitizers(doxyparse) if (use_libclang) set(CLANG_LIBS libclang clangTooling ${llvm_libs}) diff --git a/src/classdef.cpp b/src/classdef.cpp index 04e057b..5dee0dc 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -1431,7 +1431,8 @@ void ClassDefImpl::writeBriefDescription(OutputList &ol,bool exampleFlag) const ol.writeString(" - "); ol.popGeneratorState(); ol.generateDoc(briefFile(),briefLine(),this,0, - briefDescription(),TRUE,FALSE,0,TRUE,FALSE); + briefDescription(),TRUE,FALSE,0, + TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)); ol.pushGeneratorState(); ol.disable(OutputGenerator::RTF); ol.writeString(" \n"); @@ -1462,7 +1463,8 @@ void ClassDefImpl::writeDetailedDocumentationBody(OutputList &ol) const // repeat brief description if (!briefDescription().isEmpty() && repeatBrief) { - ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE); + ol.generateDoc(briefFile(),briefLine(),this,0,briefDescription(),FALSE,FALSE, + 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)); } if (!briefDescription().isEmpty() && repeatBrief && !documentation().isEmpty()) @@ -1475,7 +1477,8 @@ void ClassDefImpl::writeDetailedDocumentationBody(OutputList &ol) const // write documentation if (!documentation().isEmpty()) { - ol.generateDoc(docFile(),docLine(),this,0,documentation(),TRUE,FALSE); + ol.generateDoc(docFile(),docLine(),this,0,documentation(),TRUE,FALSE, + 0,FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)); } // write type constraints writeTypeConstraints(ol,this,m_impl->typeConstraints); @@ -2572,7 +2575,8 @@ void ClassDefImpl::writeDeclarationLink(OutputList &ol,bool &found,const char *h if (!briefDescription().isEmpty() && Config_getBool(BRIEF_MEMBER_DESC)) { DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0, - briefDescription(),FALSE,FALSE,0,TRUE,FALSE); + briefDescription(),FALSE,FALSE, + 0,TRUE,FALSE,Config_getBool(MARKDOWN_SUPPORT)); if (rootNode && !rootNode->isEmpty()) { ol.startMemberDescription(anchor()); diff --git a/src/commentscan.h b/src/commentscan.h index be92920..a111352 100644 --- a/src/commentscan.h +++ b/src/commentscan.h @@ -3,8 +3,8 @@ * Copyright (C) 1997-2015 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 + * 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. * @@ -60,6 +60,7 @@ class CommentScanner * @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. + * @param[in] markdownEnabled Indicates if markdown specific processing should be done. * @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 @@ -76,7 +77,8 @@ class CommentScanner bool isInbody, Protection &prot, int &position, - bool &newEntryNeeded + bool &newEntryNeeded, + bool markdownEnabled ); void initGroupInfo(Entry *entry); void enterFile(const char *fileName,int lineNr); diff --git a/src/commentscan.l b/src/commentscan.l index 309a334..f521528 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -3,8 +3,8 @@ * 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 + * 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. * @@ -24,7 +24,7 @@ %{ /* - * includes + * includes */ #include @@ -329,11 +329,11 @@ enum GuardType class GuardedSection { public: - GuardedSection(bool enabled,bool parentVisible) + GuardedSection(bool enabled,bool parentVisible) : m_enabled(enabled),m_parentVisible(parentVisible) {} bool isEnabled() const { return m_enabled; } bool parentVisible() const { return m_parentVisible; } - + private: bool m_enabled; bool m_parentVisible; @@ -341,7 +341,7 @@ class GuardedSection /* ----------------------------------------------------------------- * - * statics + * statics */ struct commentscanYY_state @@ -398,6 +398,7 @@ struct commentscanYY_state bool inInternalDocs = FALSE; int prevPosition = 0; DocGroup docGroup; + bool markdownSupport = TRUE; }; //----------------------------------------------------------------------------- @@ -428,20 +429,20 @@ static void addCite(yyscan_t yyscanner); //----------------------------------------------------------------------------- -#undef YY_INPUT -#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size); +#undef YY_INPUT +#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size); %} /* start command character */ -CMD ("\\"|"@") -XREFCMD {CMD}("bug"|"deprecated"|"test"|"todo"|"xrefitem") +CMD ("\\"|"@") +XREFCMD {CMD}("bug"|"deprecated"|"test"|"todo"|"xrefitem") PRE [pP][rR][eE] -TABLE [tT][aA][bB][lL][eE] -P [pP] +TABLE [tT][aA][bB][lL][eE] +P [pP] UL [uU][lL] -OL [oO][lL] -DL [dD][lL] +OL [oO][lL] +DL [dD][lL] IMG [iI][mM][gG] HR [hH][rR] PARA [pP][aA][rR][aA] @@ -452,13 +453,13 @@ DIV [dD][iI][vV] DETAILEDHTML {CENTER}|{DIV}|{PRE}|{UL}|{TABLE}|{OL}|{DL}|{P}|[Hh][1-6]|{IMG}|{HR}|{PARA} DETAILEDHTMLOPT {CODE} BN [ \t\n\r] -BL [ \t\r]*"\n" +BL [ \t\r]*"\n" B [ \t] BS ^(({B}*"//")?)(({B}*"*"+)?){B}* ATTR ({B}+[^>\n]*)? DOCNL "\n"|"\\_linebr" LC "\\"{B}*"\n" -NW [^a-z_A-Z0-9] +NW [^a-z_A-Z0-9] FILESCHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+@&#] FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+@&#] FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]*"\"") @@ -470,7 +471,7 @@ CITEID {CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*|"\""{CITESCHAR}{C SCOPEID {ID}({ID}*{BN}*"::"{BN}*)*({ID}?) SCOPENAME "$"?(({ID}?{BN}*("::"|"."){BN}*)*)((~{BN}*)?{ID}) TMPLSPEC "<"{BN}*[^>]+{BN}*">" -MAILADDR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+ +MAILADDR [a-z_A-Z0-9.+\-]+"@"[a-z_A-Z0-9\-]+("."[a-z_A-Z0-9\-]+)+[a-z_A-Z0-9\-]+ RCSTAG "$"{ID}":"[^\n$]+"$" %option noyywrap @@ -489,34 +490,34 @@ RCSTAG "$"{ID}":"[^\n$]+"$" %x XRefItemParam3 %x FileDocArg1 %x ParamArg1 -%x EnumDocArg1 -%x NameSpaceDocArg1 -%x PackageDocArg1 -%x GroupDocArg1 -%x GroupDocArg2 -%x SectionLabel -%x SectionTitle -%x SubpageLabel -%x SubpageTitle -%x FormatBlock -%x LineParam -%x GuardParam -%x GuardParamEnd -%x SkipGuardedSection -%x SkipInternal +%x EnumDocArg1 +%x NameSpaceDocArg1 +%x PackageDocArg1 +%x GroupDocArg1 +%x GroupDocArg2 +%x SectionLabel +%x SectionTitle +%x SubpageLabel +%x SubpageTitle +%x FormatBlock +%x LineParam +%x GuardParam +%x GuardParamEnd +%x SkipGuardedSection +%x SkipInternal %x NameParam -%x InGroupParam -%x FnParam -%x OverloadParam -%x InheritParam -%x ExtendsParam +%x InGroupParam +%x FnParam +%x OverloadParam +%x InheritParam +%x ExtendsParam %x ReadFormulaShort -%x ReadFormulaLong -%x AnchorLabel +%x ReadFormulaLong +%x AnchorLabel %x HtmlComment %x SkipLang -%x CiteLabel -%x CopyDoc +%x CiteLabel +%x CopyDoc %x GuardExpr %x CdataSection %x Noop @@ -540,52 +541,52 @@ RCSTAG "$"{ID}":"[^\n$]+"$" * XML commands, */ -{CMD}{CMD}[a-z_A-Z]+{B}* { // escaped command - addOutput(yyscanner,yytext); - } -{CMD}{CMD}"~"[a-z_A-Z]* { // escaped command - addOutput(yyscanner,yytext); - } -{MAILADDR} { // mail address - addOutput(yyscanner,yytext); - } -"\""[^"\n]*"\"" { // quoted text +{CMD}{CMD}[a-z_A-Z]+{B}* { // escaped command + addOutput(yyscanner,yytext); + } +{CMD}{CMD}"~"[a-z_A-Z]* { // escaped command + addOutput(yyscanner,yytext); + } +{MAILADDR} { // mail address + addOutput(yyscanner,yytext); + } +"\""[^"\n]*"\"" { // quoted text addOutput(yyscanner,yytext); - } -("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!) - addOutput(yyscanner,yytext); - } -"<"{DETAILEDHTML}{ATTR}">" { // HTML command that ends a brief description - setOutput(yyscanner,OutputDoc); - // continue with the same input + } +("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!) + addOutput(yyscanner,yytext); + } +"<"{DETAILEDHTML}{ATTR}">" { // HTML command that ends a brief description + setOutput(yyscanner,OutputDoc); + // continue with the same input REJECT; - } -"<"{DETAILEDHTMLOPT}{ATTR}">" { // HTML command that ends a brief description - if (yyextra->current->lang==SrcLangExt_CSharp) + } +"<"{DETAILEDHTMLOPT}{ATTR}">" { // HTML command that ends a brief description + if (yyextra->current->lang==SrcLangExt_CSharp) { setOutput(yyscanner,OutputDoc); } - // continue with the same input + // continue with the same input REJECT; - } -"" { // start of a .NET XML style brief description - setOutput(yyscanner,OutputBrief); + } +"" { // start of a .NET XML style brief description + setOutput(yyscanner,OutputBrief); addOutput(yyscanner,yytext); - } -"" { // start of a .NET XML style detailed description - setOutput(yyscanner,OutputDoc); + } +"" { // start of a .NET XML style detailed description + setOutput(yyscanner,OutputDoc); addOutput(yyscanner,yytext); - } -"" { // start of a .NET XML style detailed description - setOutput(yyscanner,OutputBrief); + } +"" { // start of a .NET XML style detailed description + setOutput(yyscanner,OutputBrief); addOutput(yyscanner,yytext); - setOutput(yyscanner,OutputDoc); - } -"" { // end of a brief or detailed description - - setOutput(yyscanner,OutputDoc); + setOutput(yyscanner,OutputDoc); + } +"" { // end of a brief or detailed description + + setOutput(yyscanner,OutputDoc); addOutput(yyscanner,yytext); - } + } "<"{CAPTION}{ATTR}">" { QCString tag=yytext; int s=tag.find("id="); @@ -616,22 +617,22 @@ RCSTAG "$"{ID}":"[^\n$]+"$" setOutput(yyscanner,OutputDoc); REJECT; } -" ClassDef includeInfo for %s\n", nm.data())); DBG_CTX((" local : %d\n", ii->local)); DBG_CTX((" imported : %d\n", ii->imported)); - DBG_CTX((" indirect : %d\n", ii->indirect)); DBG_CTX(("header: %s\n", ii->fileDef->absFilePath().data())); DBG_CTX((" file_id : %d\n", file_id)); DBG_CTX((" header_id: %d\n", header_id)); @@ -2211,7 +2210,6 @@ static void generateSqlite3ForFile(const FileDef *fd) DBG_CTX(("-----> FileDef includeInfo for %s\n", ii->includeName.data())); DBG_CTX((" local: %d\n", ii->local)); DBG_CTX((" imported: %d\n", ii->imported)); - DBG_CTX((" indirect: %d\n", ii->indirect)); if(ii->fileDef) { DBG_CTX(("include: %s\n", ii->fileDef->absFilePath().data())); diff --git a/src/tagreader.cpp b/src/tagreader.cpp index 12010e8..3c493b4 100644 --- a/src/tagreader.cpp +++ b/src/tagreader.cpp @@ -1526,7 +1526,7 @@ void TagFileParser::addIncludes() // ifd->getOutputFileBase().data(),ii->id.data()); if (ifd->getOutputFileBase()==QCString(ii->id)) { - fd->addIncludeDependency(ifd.get(),ii->text,ii->isLocal,ii->isImported,FALSE); + fd->addIncludeDependency(ifd.get(),ii->text,ii->isLocal,ii->isImported); } } } -- cgit v0.12 From 442da6dfa5ab1d48b632ab24e15acb0719ab0bbd Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 29 Jun 2020 18:14:20 +0200 Subject: Missing links in Fortran in case use statement with upper case characters in name Based on the question: https://stackoverflow.com/questions/62557644/automatic-link-to-fortran-classes-in-method-arguments-description-in-doxygen#62595302 The problem regarding the missing linking was checked and contrary to the idea that it was depending on the `ONLY` clause it was due to the fact that a conversion to lower case was missing. --- src/fortranscanner.l | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 195293f..2c3c23f 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -467,6 +467,7 @@ SCOPENAME ({ID}{BS}"::"{BS})* {ID} { DBG_CTX((stderr,"using dir %s\n",yytext)); yyextra->current->name=yytext; + yyextra->current->name=yyextra->current->name.lower(); yyextra->current->fileName = yyextra->fileName; yyextra->current->section=Entry::USINGDIR_SEC; yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current); @@ -475,12 +476,14 @@ SCOPENAME ({ID}{BS}"::"{BS})* } {ID}/, { yyextra->useModuleName=yytext; + yyextra->useModuleName=yyextra->useModuleName.lower(); } ,{BS}"ONLY" { BEGIN(UseOnly); } {BS},{BS} {} {ID} { yyextra->current->name= yyextra->useModuleName+"::"+yytext; + yyextra->current->name=yyextra->current->name.lower(); yyextra->current->fileName = yyextra->fileName; yyextra->current->section=Entry::USINGDECL_SEC; yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current); -- cgit v0.12 From 6b1543bbc7001cc67dbe55c7109c4c73fbb5f300 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 29 Jun 2020 21:46:50 +0200 Subject: Fix for compile issue on Travis --- src/pre.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pre.l b/src/pre.l index 9b27ff8..979e971 100644 --- a/src/pre.l +++ b/src/pre.l @@ -3365,7 +3365,7 @@ void Preprocessor::processFile(const char *fileName,BufStr &input,BufStr &output } } // add the macro definition for this file to the global map - Doxygen::macroDefinitions.emplace(std::make_pair(state->yyFileName,std::move(state->macroDefinitions))); + Doxygen::macroDefinitions.emplace(std::make_pair(state->yyFileName.str(),std::move(state->macroDefinitions))); } //yyextra->defineManager.endContext(); -- cgit v0.12 From 3e9d9386950cc67d155a920cf8483c4d5bdcec3c Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 29 Jun 2020 22:32:15 +0200 Subject: Fixed anothing compilation issue when use_libclang was not enabled --- src/doxygen.cpp | 18 ++++++++---------- src/doxygen.h | 1 + src/filedef.cpp | 6 ++---- src/scanner.l | 28 ++++++++++++---------------- 4 files changed, 23 insertions(+), 30 deletions(-) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 01b47f5..089110b 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -160,6 +160,7 @@ QCString Doxygen::spaces; bool Doxygen::generatingXmlOutput = FALSE; GenericsSDict *Doxygen::genericsDict; DefinesPerFileList Doxygen::macroDefinitions; +bool Doxygen::clangAssistedParsing = FALSE; // locally accessible globals static std::unordered_map< std::string, const Entry* > g_classEntries; @@ -7477,8 +7478,7 @@ static void generateFileSources() if (!Doxygen::inputNameLinkedMap->empty()) { #if USE_LIBCLANG - static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); - if (clangAssistedParsing) + if (Doxygen::clangAssistedParsing) { QDict g_processedFiles(10007); @@ -9063,11 +9063,6 @@ static std::shared_ptr parseFile(OutlineParserInterface &parser, FileDef *fd,const char *fn, bool sameTu,QStrList &filesInSameTu) { -#if USE_LIBCLANG - static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); -#else - static bool clangAssistedParsing = FALSE; -#endif QCString fileName=fn; QCString extension; int ei = fileName.findRev('.'); @@ -9114,7 +9109,7 @@ static std::shared_ptr parseFile(OutlineParserInterface &parser, convBuf.addChar('\0'); - if (clangAssistedParsing && !sameTu) + if (Doxygen::clangAssistedParsing && !sameTu) { fd->getAllIncludeFilesRecursively(filesInSameTu); } @@ -9130,8 +9125,7 @@ static std::shared_ptr parseFile(OutlineParserInterface &parser, static void parseFiles(const std::shared_ptr &root) { #if USE_LIBCLANG - static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); - if (clangAssistedParsing) + if (Doxygen::clangAssistedParsing) { QDict g_processedFiles(10007); @@ -10707,6 +10701,10 @@ void parseInput() { atexit(exitDoxygen); +#if USE_LIBCLANG + Doxygen::clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); +#endif + // we would like to show the versionString earlier, but we first have to handle the configuration file // to know the value of the QUIET setting. QCString versionString = getFullVersion(); diff --git a/src/doxygen.h b/src/doxygen.h index 2978052..e5757c3 100644 --- a/src/doxygen.h +++ b/src/doxygen.h @@ -152,6 +152,7 @@ class Doxygen static bool generatingXmlOutput; static GenericsSDict *genericsDict; static DefinesPerFileList macroDefinitions; + static bool clangAssistedParsing; }; void initDoxygen(); diff --git a/src/filedef.cpp b/src/filedef.cpp index 18e5cef..08f022b 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -1212,8 +1212,7 @@ void FileDefImpl::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu (void)sameTu; (void)filesInSameTu; #if USE_LIBCLANG - static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); - if (clangAssistedParsing && + if (Doxygen::clangAssistedParsing && (getLanguage()==SrcLangExt_Cpp || getLanguage()==SrcLangExt_ObjC)) { ol.startCodeFragment(); @@ -1276,8 +1275,7 @@ void FileDefImpl::parseSource(bool sameTu,QStrList &filesInSameTu) (void)sameTu; (void)filesInSameTu; #if USE_LIBCLANG - static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); - if (clangAssistedParsing && + if (Doxygen::clangAssistedParsing && (getLanguage()==SrcLangExt_Cpp || getLanguage()==SrcLangExt_ObjC)) { if (!sameTu) diff --git a/src/scanner.l b/src/scanner.l index cc5428d..d26a9b2 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2045,7 +2045,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) BEGIN(FindMembers); } {SCOPENAME} { - if (Config_getBool(CLANG_ASSISTED_PARSING) && (yyextra->insideCpp || yyextra->insideObjC)) + if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) { yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); } @@ -2348,7 +2348,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) */ {ID} { //printf("Define '%s' without args\n",yytext); - if (Config_getBool(CLANG_ASSISTED_PARSING) && (yyextra->insideCpp || yyextra->insideObjC)) + if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) { yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); } @@ -3463,7 +3463,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } . { yyextra->current->type += *yytext ; } {ID} { - if (Config_getBool(CLANG_ASSISTED_PARSING) && (yyextra->insideCpp || yyextra->insideObjC)) + if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) { yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); } @@ -5334,7 +5334,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } {SCOPENAME} { yyextra->current->name = yytext ; - if (Config_getBool(CLANG_ASSISTED_PARSING) && (yyextra->insideCpp || yyextra->insideObjC)) + if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) { yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); } @@ -5399,7 +5399,7 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } } {ID} { - if (Config_getBool(CLANG_ASSISTED_PARSING) && (yyextra->insideCpp || yyextra->insideObjC)) + if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) { yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); } @@ -7255,19 +7255,15 @@ static void parseMain(yyscan_t yyscanner, yyextra->yyBegColNr = 0; yyextra->yyFileName = fileName; setContext(yyscanner); - if (Config_getBool(CLANG_ASSISTED_PARSING)) + if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) { - bool processWithClang = yyextra->insideCpp || yyextra->insideObjC; - if (processWithClang) + if (!sameTranslationUnit) // new file { - if (!sameTranslationUnit) // new file - { - ClangParser::instance()->start(fileName,filesInSameTranslationUnit); - } - else - { - ClangParser::instance()->switchToFile(fileName); - } + ClangParser::instance()->start(fileName,filesInSameTranslationUnit); + } + else + { + ClangParser::instance()->switchToFile(fileName); } } rt->lang = yyextra->language; -- cgit v0.12 From bfe44c22752c443d1e74923137c065f901134478 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 30 Jun 2020 12:07:01 +0200 Subject: Misleading compiler warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When compiling on Cygwin (gcc version 9.3.0 (GCC)) in release mode we get: ``` In file included from /cygdrive/d/Programs/Doxygen/fork/doxygen/src/vhdldocgen.cpp:27: /cygdrive/d/Programs/Doxygen/fork/doxygen/qtools/qcstring.h: In static member function ‘static void FlowChart::colTextNodes()’: /cygdrive/d/Programs/Doxygen/fork/doxygen/qtools/qcstring.h:364:23: warning: ‘flno’ may be used uninitialized in this function [-Wmaybe-uninitialized] 364 | if (str) m_rep+=str; | ^~~ /cygdrive/d/Programs/Doxygen/fork/doxygen/src/vhdldocgen.cpp:3178:14: note: ‘flno’ was declared here 3178 | FlowChart *flno; | ^~~~ ``` The compiler doesn't "understand" that `flno` is guarded by `found` and this would be initialized. Local variable `text` is not used so removed. --- src/vhdldocgen.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index ff96331..28a2028 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -3174,20 +3174,18 @@ void FlowChart::printFlowTree() void FlowChart::colTextNodes() { - QCString text; - FlowChart *flno; + FlowChart *flno = NULL; bool found=FALSE; for (uint j=0;jtype&TEXT_NO) { - text+=flo->text+'\n'; if (!found) { flno=flo; } - if (found) + else { flno->text+=flo->text; flowList.remove(flo); -- cgit v0.12 From 955f746f9b26ca49e085fb8d84cc16085c8e6d21 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 1 Jul 2020 16:30:09 +0200 Subject: Missing last item in htmlhelp level2 index At every second level index part the last item is missing. We should not only forward but also backward --- src/htmlhelp.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/htmlhelp.cpp b/src/htmlhelp.cpp index 44dea05..8ef3d19 100644 --- a/src/htmlhelp.cpp +++ b/src/htmlhelp.cpp @@ -171,7 +171,7 @@ void HtmlHelpIndex::writeFields(FTextStream &t) dict->sort(); IndexFieldSDict::Iterator ifli(*dict); IndexField *f; - QCString lastLevel1; + QCString prevLevel1; bool level2Started=FALSE; for (;(f=ifli.current());++ifli) { @@ -187,7 +187,6 @@ void HtmlHelpIndex::writeFields(FTextStream &t) level1 = f->name.copy(); } - //if (level1!=lastLevel1) { // finish old list at level 2 if (level2Started) t << " " << endl; level2Started=FALSE; @@ -206,10 +205,11 @@ void HtmlHelpIndex::writeFields(FTextStream &t) nextLevel1 = fnext->name.left(fnext->name.find('?')); --ifli; } - if (level1 != nextLevel1) + if (!(level1 == prevLevel1 || level1 == nextLevel1)) { level2 = ""; } + prevLevel1 = level1.copy(); // if (level2.isEmpty()) @@ -257,7 +257,6 @@ void HtmlHelpIndex::writeFields(FTextStream &t) t << "recode(level2) << "\">" "\n"; } - lastLevel1 = level1.copy(); } if (level2Started) t << " " << endl; } -- cgit v0.12 From c30fbe4eba7f27c6296dea587eefe3d8b489661a Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 2 Jul 2020 12:22:00 +0200 Subject: issue #7890 Macro Expansion broken The defines from the doxygen configuration file were not taken into account du a wrong primary key. --- src/pre.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pre.l b/src/pre.l index 979e971..28d8f59 100644 --- a/src/pre.l +++ b/src/pre.l @@ -3191,7 +3191,7 @@ static void initPredefined(yyscan_t yyscanner,const char *fileName) def->nonRecursive = nonRecursive; def->fileDef = state->yyFileDef; def->fileName = fileName; - state->contextDefines.insert(std::make_pair(state->yyFileName.str(),std::move(def))); + state->contextDefines.insert(std::make_pair(toStdString(def->name),std::move(def))); //printf("#define '%s' '%s' #nargs=%d\n", // def->name.data(),def->definition.data(),def->nargs); @@ -3223,7 +3223,7 @@ static void initPredefined(yyscan_t yyscanner,const char *fileName) def->nonRecursive = nonRecursive; def->fileDef = state->yyFileDef; def->fileName = fileName; - state->contextDefines.insert(std::make_pair(state->yyFileName.str(),std::move(def))); + state->contextDefines.insert(std::make_pair(toStdString(def->name),std::move(def))); } } } -- cgit v0.12 From 2052757831db677b78b6f9b56bf075ab8413b92c Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 3 Jul 2020 17:49:04 +0200 Subject: issue #7884 Python to xml: Whitespace in method doc not preserved (MARKDOWN_SUPPORT=NO) Corrected handling of the comment blocks. Due to the possible nesting of classes and the handling of the first line special handling is required by means of the stripping of spaces after a return in a doc block (otherwise it might be stripped away multiple times / left multiple times). --- src/pyscanner.l | 70 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 56 insertions(+), 14 deletions(-) diff --git a/src/pyscanner.l b/src/pyscanner.l index a3dbaba..5181c0d 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -97,6 +97,7 @@ struct pyscannerYY_state QGString * copyString = 0; int indent = 0; int curIndent = 0; + int commentIndent = 0; bool importTuple = FALSE; QDict packageNameCache; char atomStart = 0; @@ -140,6 +141,7 @@ 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 QCString stripSpace(const char * doc,const int ind); static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size); @@ -1251,7 +1253,8 @@ STARTDOCSYMS "##" QCString actualDoc=yyextra->docBlock; if (!yyextra->docBlockSpecial) // legacy unformatted docstring { - actualDoc.prepend("\\verbatim "); + actualDoc = stripSpace(actualDoc,yyextra->commentIndent); + actualDoc.prepend("\\verbatim\n"); actualDoc.append("\\endverbatim "); } //printf("-------> yyextra->current=%p yyextra->bodyEntry=%p\n",yyextra->current,yyextra->bodyEntry); @@ -1262,7 +1265,8 @@ STARTDOCSYMS "##" QCString actualDoc=yyextra->docBlock; if (!yyextra->docBlockSpecial) // legacy unformatted docstring { - actualDoc.prepend("\\verbatim "); + actualDoc = stripSpace(actualDoc,yyextra->commentIndent); + actualDoc.prepend("\\verbatim\n"); actualDoc.append("\\endverbatim "); } actualDoc.prepend("\\namespace "+yyextra->moduleScope+" "); @@ -1290,18 +1294,7 @@ STARTDOCSYMS "##" ^{BB} { // leading whitespace - int indent = computeIndent(yytext); - if (indent>=yyextra->curIndent) - { // strip yyextra->curIndent amount of whitespace - int i; - for (i=0;icurIndent;i++) yyextra->docBlock+=' '; - DBG_CTX((stderr,"stripping indent %d\n",yyextra->curIndent)); - } - else - { - DBG_CTX((stderr,"not stripping: %d<%d\n",indent,yyextra->curIndent)); - yyextra->docBlock += yytext; - } + yyextra->docBlock += yytext; } [^"'\n \t\\]+ { yyextra->docBlock += yytext; @@ -1529,6 +1522,52 @@ static inline int computeIndent(const char *s) return col; } +static QCString stripSpace(const char *doc,const int ind) +{ + static GrowBuf growBuf; + growBuf.clear(); + if (ind <= 0) return doc; + signed char c; + const signed char *p=(const signed char*)doc; + bool startLine = false; + int cnt = 0; + while ((c=*p++)!=0) + { + switch(c) + { + case '\n': + growBuf.addChar(c); + startLine = true; + cnt = ind; + break; + case ' ': + if (startLine) + { + if (cnt) + { + cnt--; + } + else + { + startLine = false; + growBuf.addChar(c); + } + } + else + { + growBuf.addChar(c); + } + break; + default: + startLine = false; + growBuf.addChar(c); + break; + } + } + + growBuf.addChar(0); + return growBuf.get(); +} static QCString findPackageScopeFromPath(yyscan_t yyscanner,const QCString &path) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; @@ -1686,6 +1725,7 @@ static void initTriDoubleQuoteBlock(yyscan_t yyscanner) yyextra->docBlockJavaStyle = TRUE; yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!'; yyextra->docBlock.resize(0); + yyextra->commentIndent = yyextra->curIndent; yyextra->doubleQuote = TRUE; startCommentBlock(yyscanner,FALSE); } @@ -1698,6 +1738,7 @@ static void initTriSingleQuoteBlock(yyscan_t yyscanner) yyextra->docBlockJavaStyle = TRUE; yyextra->docBlockSpecial = yytext[strlen(yytext) - 1]=='!'; yyextra->docBlock.resize(0); + yyextra->commentIndent = yyextra->curIndent; yyextra->doubleQuote = FALSE; startCommentBlock(yyscanner,FALSE); } @@ -1710,6 +1751,7 @@ static void initSpecialBlock(yyscan_t yyscanner) yyextra->docBlockJavaStyle = TRUE; yyextra->docBrief = TRUE; yyextra->docBlock.resize(0); + yyextra->commentIndent = yyextra->curIndent; startCommentBlock(yyscanner,TRUE); } -- cgit v0.12 From 8c12604a84faabf6beeef7f159692ccddcb94dc6 Mon Sep 17 00:00:00 2001 From: tttapa Date: Sat, 4 Jul 2020 16:27:59 +0200 Subject: Scalable search bar for high resolution displays (#7888) * Use SVG images for search bar icons * Update search bar CSS for high resolution displays Uses CSS shadows instead of PNG images of shadows * Limit the main-menu CSS rule to first level list #main-menu li:last-child applies to last childs of sub-lists as well #main-menu > li:last-child only applies to the top-level list --- src/htmlgen.cpp | 18 ++++---- templates/html/close.svg | 31 +++++++++++++ templates/html/htmlbase.tpl | 6 +-- templates/html/htmllayout.tpl | 6 +-- templates/html/htmltabs.tpl | 6 +-- templates/html/mag.svg | 37 ++++++++++++++++ templates/html/mag_sel.svg | 74 +++++++++++++++++++++++++++++++ templates/html/menu.js | 4 +- templates/html/search.css | 100 ++++++++++++++++++------------------------ templates/html/search.js | 2 +- 10 files changed, 205 insertions(+), 79 deletions(-) create mode 100644 templates/html/close.svg create mode 100644 templates/html/mag.svg create mode 100644 templates/html/mag_sel.svg diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index 900ea48..d869a2b 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -67,7 +67,7 @@ static void writeClientSearchBox(FTextStream &t,const char *relPath) { t << "
      \n"; t << " \n"; - t << " \"\"/\n"; @@ -78,7 +78,7 @@ static void writeClientSearchBox(FTextStream &t,const char *relPath) t << " onkeyup=\"searchBox.OnSearchFieldChange(event)\"/>\n"; t << " \n"; t << " " - << "\"\"/\n"; + << "\"\"/\n"; t << " \n"; t << "
      \n"; } @@ -100,7 +100,7 @@ static void writeServerSearchBox(FTextStream &t,const char *relPath,bool highlig t << "search.php"; } t << "\" method=\"get\">\n"; - t << " \"\"/\n"; + t << " \"\"/\n"; if (!highlightSearch) { t << " addImageFile("search/search_r.png"); if (serverBasedSearch) { - mgr.copyResource("mag.png",dir); - Doxygen::indexList->addImageFile("search/mag.png"); + mgr.copyResource("mag.svg",dir); + Doxygen::indexList->addImageFile("search/mag.svg"); } else { - mgr.copyResource("close.png",dir); - Doxygen::indexList->addImageFile("search/close.png"); - mgr.copyResource("mag_sel.png",dir); - Doxygen::indexList->addImageFile("search/mag_sel.png"); + mgr.copyResource("close.svg",dir); + Doxygen::indexList->addImageFile("search/close.svg"); + mgr.copyResource("mag_sel.svg",dir); + Doxygen::indexList->addImageFile("search/mag_sel.svg"); } QCString searchDirName = Config_getString(HTML_OUTPUT)+"/search"; diff --git a/templates/html/close.svg b/templates/html/close.svg new file mode 100644 index 0000000..a933eea --- /dev/null +++ b/templates/html/close.svg @@ -0,0 +1,31 @@ + + + + + + image/svg+xml + + + + + + + + diff --git a/templates/html/htmlbase.tpl b/templates/html/htmlbase.tpl index 47939fd..02741d2 100644 --- a/templates/html/htmlbase.tpl +++ b/templates/html/htmlbase.tpl @@ -100,7 +100,7 @@ $(function() {
      - + @@ -111,7 +111,7 @@ $(function() { {% else %}{# !SERVER_BASED_SEARCH #}
      - @@ -121,7 +121,7 @@ $(function() { onkeyup="searchBox.OnSearchFieldChange(event)"/>
      diff --git a/templates/html/htmllayout.tpl b/templates/html/htmllayout.tpl index b434d0c..74d83c6 100644 --- a/templates/html/htmllayout.tpl +++ b/templates/html/htmllayout.tpl @@ -44,14 +44,14 @@ {% if config.SERVER_BASED_SEARCH %} {# server side search resources #} - {% resource 'mag.png' as 'search/mag.png' %} + {% resource 'mag.svg' as 'search/mag.svg' %} {% resource 'extsearch.js as 'search/search.js' %} {% resource 'search_functions.php' as 'search/search_functions.php' %} {% resource 'search_opensearch.php' as 'search/search_opensearch.php' %} {% else %} {# client side search resources #} - {% resource 'mag_sel.png' as 'search/mag_sel.png' %} - {% resource 'close.png' as 'search/close.png' %} + {% resource 'mag_sel.svg' as 'search/mag_sel.svg' %} + {% resource 'close.svg' as 'search/close.svg' %} {% resource 'search.js' as 'search/search.js' %} {% endif %} diff --git a/templates/html/htmltabs.tpl b/templates/html/htmltabs.tpl index e7539d9..b8632cb 100644 --- a/templates/html/htmltabs.tpl +++ b/templates/html/htmltabs.tpl @@ -35,7 +35,7 @@
      - + {% if page.highlight!='search' %}
      - @@ -60,7 +60,7 @@ onkeyup="searchBox.OnSearchFieldChange(event)"/> + id="MSearchCloseImg" border="0" src="{{ page.relPath }}search/close.svg" alt=""/>
      diff --git a/templates/html/mag.svg b/templates/html/mag.svg new file mode 100644 index 0000000..9f46b30 --- /dev/null +++ b/templates/html/mag.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/templates/html/mag_sel.svg b/templates/html/mag_sel.svg new file mode 100644 index 0000000..03626f6 --- /dev/null +++ b/templates/html/mag_sel.svg @@ -0,0 +1,74 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + diff --git a/templates/html/menu.js b/templates/html/menu.js index d18a2fe..2fe2214 100644 --- a/templates/html/menu.js +++ b/templates/html/menu.js @@ -41,9 +41,9 @@ function initMenu(relPath,searchEnabled,serverSide,searchPage,search) { $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu'); if (searchEnabled) { if (serverSide) { - $('#main-menu').append('
    1. '); + $('#main-menu').append('
    2. '); } else { - $('#main-menu').append('
    3. '); + $('#main-menu').append('
    4. '); } } $('#main-menu').smartmenus(); diff --git a/templates/html/search.css b/templates/html/search.css index 859cf6a..8af75a7 100644 --- a/templates/html/search.css +++ b/templates/html/search.css @@ -1,98 +1,82 @@ /*---------------- Search Box */ -#FSearchBox { - float: left; -} - #MSearchBox { white-space : nowrap; - float: none; - margin-top: 8px; - right: 0px; - width: 170px; - height: 24px; + background: white; + border-radius: 0.65em; + box-shadow: inset 0.5px 0.5px 3px 0px #555; z-index: 102; } -#MSearchBox .left -{ - display:block; - position:absolute; - left:10px; - width:20px; - height:19px; - background:url('search_l.png') no-repeat; - background-position:right; +#MSearchBox .left { + display: inline-block; + vertical-align: middle; + height: 1.4em; } #MSearchSelect { - display:block; - position:absolute; - width:20px; - height:19px; -} - -.left #MSearchSelect { - left:4px; -} - -.right #MSearchSelect { - right:5px; + display: inline-block; + vertical-align: middle; + height: 1.4em; + padding: 0 0 0 0.3em; + margin: 0; } #MSearchField { - display:block; - position:absolute; - height:19px; - background:url('search_m.png') repeat-x; + display: inline-block; + vertical-align: middle; + width: 7.5em; + height: 1.1em; + margin: 0 0.15em; + padding: 0; + line-height: 1em; border:none; - width:115px; - margin-left:20px; - padding-left:4px; color: #909090; outline: none; - font: 9pt Arial, Verdana, sans-serif; + font-family: Arial, Verdana, sans-serif; -webkit-border-radius: 0px; + border-radius: 0px; + background: none; } -#FSearchBox #MSearchField { - margin-left:15px; -} #MSearchBox .right { - display:block; - position:absolute; - right:10px; - top:8px; - width:20px; - height:19px; - background:url('search_r.png') no-repeat; - background-position:left; + display: inline-block; + vertical-align: middle; + width: 1.4em; + height: 1.4em; } #MSearchClose { display: none; - position: absolute; - top: 4px; + font-size: inherit; background : none; border: none; - margin: 0px 4px 0px 0px; - padding: 0px 0px; + margin: 0; + padding: 0; outline: none; -} -.left #MSearchClose { - left: 6px; } -.right #MSearchClose { - right: 2px; +#MSearchCloseImg { + height: 1.4em; + padding: 0.3em; + margin: 0; } .MSearchBoxActive #MSearchField { color: #000000; } +#main-menu > li:last-child { + /* This
    5. object is the parent of the search bar */ + display: flex; + justify-content: center; + align-items: center; + height: 36px; + margin-right: 1em; +} + /*---------------- Search filter selection */ #MSearchSelectWindow { diff --git a/templates/html/search.js b/templates/html/search.js index ff2b8c8..92b6094 100644 --- a/templates/html/search.js +++ b/templates/html/search.js @@ -364,7 +364,7 @@ function SearchBox(name, resultsPath, inFrame, label) if (domPopupSearchResultsWindow.style.display!='block') { var domSearchBox = this.DOMSearchBox(); - this.DOMSearchClose().style.display = 'inline'; + this.DOMSearchClose().style.display = 'inline-block'; if (this.insideFrame) { var domPopupSearchResults = this.DOMPopupSearchResults(); -- cgit v0.12 From e51bde4cca9e79ae11c54c45cbcc29233fad0ac1 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 6 Jul 2020 12:13:20 +0200 Subject: Superfluous space in "TEST_FLAGS" When having extra spaces in TEST_FLAGS like(note the double space before `--ip`): ``` make tests TEST_FLAGS="--keep --id=1" ``` or ``` make tests TEST_FLAGS="--id=1 --id=2" ``` we get a message like; ``` [100%] Running doxygen tests... usage: runtests.py [-h] [--updateref] [--doxygen [DOXYGEN]] [--xmllint [XMLLINT]] [--id IDS [IDS ...]] [--start_id START_ID] [--end_id END_ID] [--all] [--inputdir [INPUTDIR]] [--outputdir [OUTPUTDIR]] [--noredir] [--pool [POOL]] [--xml] [--rtf] [--docbook] [--xhtml] [--xmlxsd] [--pdf] [--subdirs] [--clang] [--keep] [--cfg CFGS [CFGS ...]] runtests.py: error: unrecognized arguments: NMAKE : fatal error U1077: 'D:\Programs\Python\Python37\python.exe' : return code '0x2' Stop. ``` By stripping the spaces in the arguments this can be overcome --- testing/runtests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testing/runtests.py b/testing/runtests.py index c7b7bc7..129a781 100755 --- a/testing/runtests.py +++ b/testing/runtests.py @@ -487,6 +487,8 @@ def split_and_keep(s, sep): vv = val.split(" ",1) if ((len(vv) == 1) and not vv[0] == ''): retVal += vv + if (len(vv) == 2): + vv[1] = vv[1].strip() if ((len(vv) == 2) and not vv[1] == ''): retVal += vv if ((len(vv) == 2) and vv[1] == ''): -- cgit v0.12 From 044fde94fc0ff1dfba618a72dbee286afa755405 Mon Sep 17 00:00:00 2001 From: albert-github Date: Mon, 6 Jul 2020 15:20:19 +0200 Subject: Compilation warning in debug.cpp When compiling debug.cpp on a 32-bit Windows system we get the warning: ``` ...\doxygen\src\debug.cpp(121): warning C4244: 'return': conversion from '_Rep' to 'int', possible loss of data with [ _Rep=__int64 ] ``` as we only use the seconds representation of the elapsed time we can do the conversion to seconds in the Timer class. --- src/debug.cpp | 10 +++++----- src/debug.h | 2 +- src/doxygen.cpp | 2 +- src/message.cpp | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/debug.cpp b/src/debug.cpp index ca3c1e9..6815b3b 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -114,11 +114,11 @@ class Timer { m_startTime = std::chrono::system_clock::now(); } - int elapsedTimeMs() + double elapsedTimeS() { - return std::chrono::duration_cast< + return (std::chrono::duration_cast< std::chrono::milliseconds>( - std::chrono::system_clock::now() - m_startTime).count(); + std::chrono::system_clock::now() - m_startTime).count()) / 1000.0; } private: std::chrono::time_point m_startTime; @@ -131,8 +131,8 @@ void Debug::startTimer() g_runningTime.start(); } -int Debug::elapsedTime() +double Debug::elapsedTime() { - return g_runningTime.elapsedTimeMs(); + return g_runningTime.elapsedTimeS(); } diff --git a/src/debug.h b/src/debug.h index 0c046f4..edc95e2 100644 --- a/src/debug.h +++ b/src/debug.h @@ -47,7 +47,7 @@ class Debug static void setPriority(int p); static void startTimer(); - static int elapsedTime(); + static double elapsedTime(); private: static DebugMask curMask; diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 089110b..50903b3 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -11583,7 +11583,7 @@ void generateOutput() if (Debug::isFlagSet(Debug::Time)) { msg("Total elapsed time: %.3f seconds\n(of which %.3f seconds waiting for external tools to finish)\n", - ((double)Debug::elapsedTime())/1000.0, + ((double)Debug::elapsedTime()), Portable::getSysElapsedTime() ); g_s.print(); diff --git a/src/message.cpp b/src/message.cpp index bbf578b..96c54a1 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -117,7 +117,7 @@ void msg(const char *fmt, ...) #endif if (Debug::isFlagSet(Debug::Time)) { - printf("%.3f sec: ",((double)Debug::elapsedTime())/1000.0); + printf("%.3f sec: ",((double)Debug::elapsedTime())); } va_list args; va_start(args, fmt); -- cgit v0.12 From 236080bf9b07dd036efc88f91e3718a1139cfa38 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 7 Jul 2020 22:23:29 +0200 Subject: Issue #7892: Incorrect search box on server-side search results page --- templates/html/search_functions.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/templates/html/search_functions.php b/templates/html/search_functions.php index 7374de9..22481db 100644 --- a/templates/html/search_functions.php +++ b/templates/html/search_functions.php @@ -7,7 +7,7 @@ function end_form($value) global $translator; if ($config['DISABLE_INDEX'] == false) { - echo " \n \n
    6. \n
      \n \n \n
      \n
      \n"; + echo "\n"; } if ($config['GENERATE_TREEVIEW']) { @@ -15,11 +15,6 @@ function end_form($value) } } -function end_page() -{ - echo ""; -} - function search_results() { global $translator; @@ -361,6 +356,5 @@ function main() end_form(preg_replace("/[^a-zA-Z0-9\-\_\.\x80-\xFF]/i", " ", $query )); // report results to the user report_results($sorted); - end_page(); } ?> -- cgit v0.12 From b11f1c4ec6309627004fce83f366c498bdaab429 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Tue, 7 Jul 2020 22:24:39 +0200 Subject: Refactoring: replace QDict by StringUnorderedSet for g_processedFiles and g_filesToProcess --- src/doxygen.cpp | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 089110b..3ed0e62 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -7480,15 +7480,16 @@ static void generateFileSources() #if USE_LIBCLANG if (Doxygen::clangAssistedParsing) { - QDict g_processedFiles(10007); + StringUnorderedSet processedFiles; // create a dictionary with files to process - QDict g_filesToProcess(10007); + StringUnorderedSet filesToProcess; + for (const auto &fn : *Doxygen::inputNameLinkedMap) { for (const auto &fd : *fn) { - g_filesToProcess.insert(fd->absFilePath(),(void*)0x8); + filesToProcess.insert(fd->absFilePath().str()); } } // process source files (and their include dependencies) @@ -7515,9 +7516,9 @@ static void generateFileSources() } char *incFile = filesInSameTu.first(); - while (incFile && g_filesToProcess.find(incFile)) + while (incFile && filesToProcess.find(incFile)!=filesToProcess.end()) { - if (fd->absFilePath()!=incFile && !g_processedFiles.find(incFile)) + if (fd->absFilePath()!=incFile && processedFiles.find(incFile)==processedFiles.end()) { QStrList moreFiles; bool ambig; @@ -7536,13 +7537,13 @@ static void generateFileSources() msg(" Parsing code for file %s...\n",ifd->docName().data()); ifd->parseSource(TRUE,moreFiles); } - g_processedFiles.insert(incFile,(void*)0x8); + processedFiles.insert(incFile); } } incFile = filesInSameTu.next(); } fd->finishParsing(); - g_processedFiles.insert(fd->absFilePath(),(void*)0x8); + processedFiles.insert(fd->absFilePath().str()); } } } @@ -7551,7 +7552,7 @@ static void generateFileSources() { for (const auto &fd : *fn) { - if (!g_processedFiles.find(fd->absFilePath())) // not yet processed + if (processedFiles.find(fd->absFilePath().str())==processedFiles.end()) // not yet processed { QStrList filesInSameTu; fd->startParsing(); @@ -9127,13 +9128,13 @@ static void parseFiles(const std::shared_ptr &root) #if USE_LIBCLANG if (Doxygen::clangAssistedParsing) { - QDict g_processedFiles(10007); + StringUnorderedSet processedFiles; // create a dictionary with files to process - QDict g_filesToProcess(10007); + StringUnorderedSet filesToProcess; for (const auto &s : g_inputFiles) { - g_filesToProcess.insert(s.c_str(),(void*)0x8); + filesToProcess.insert(s); } // process source files (and their include dependencies) @@ -9154,9 +9155,9 @@ static void parseFiles(const std::shared_ptr &root) // Now process any include files in the same translation unit // first. When libclang is used this is much more efficient. char *incFile = filesInSameTu.first(); - while (incFile && g_filesToProcess.find(incFile)) + while (incFile && filesToProcess.find(incFile)!=filesToProcess.end()) { - if (qstrcmp(incFile,s.c_str()) && !g_processedFiles.find(incFile)) + if (qstrcmp(incFile,s.c_str()) && processedFiles.find(incFile)==processedFiles.end()) { FileDef *ifd=findFileDef(Doxygen::inputNameLinkedMap,incFile,ambig); if (ifd && !ifd->isReference()) @@ -9165,19 +9166,19 @@ static void parseFiles(const std::shared_ptr &root) //printf(" Processing %s in same translation unit as %s\n",incFile,s->c_str()); fileRoot = parseFile(*parser.get(),ifd,incFile,TRUE,moreFiles); root->moveToSubEntryAndKeep(fileRoot); - g_processedFiles.insert(incFile,(void*)0x8); + processedFiles.insert(incFile); } } incFile = filesInSameTu.next(); } parser->finishTranslationUnit(); - g_processedFiles.insert(s.c_str(),(void*)0x8); + processedFiles.insert(s); } } // process remaining files for (const auto &s : g_inputFiles) { - if (!g_processedFiles.find(s.c_str())) // not yet processed + if (processedFiles.find(s)==processedFiles.end()) // not yet processed { bool ambig; QStrList filesInSameTu; @@ -9188,7 +9189,7 @@ static void parseFiles(const std::shared_ptr &root) std::shared_ptr fileRoot = parseFile(*parser.get(),fd,s.c_str(),FALSE,filesInSameTu); root->moveToSubEntryAndKeep(fileRoot); parser->finishTranslationUnit(); - g_processedFiles.insert(s.c_str(),(void*)0x8); + processedFiles.insert(s); } } } -- cgit v0.12 From 50fdb591d4abfdf88bfdda96ffd832cc4c024963 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Wed, 15 Jul 2020 21:23:12 +0200 Subject: Refactor: Modernize clang parser and make it run with multiple threads --- src/clangparser.cpp | 535 +++++++++++++++++++++++---------------------------- src/clangparser.h | 80 +++++++- src/doxygen.cpp | 276 +++++++++++++++++--------- src/filedef.cpp | 65 ++----- src/filedef.h | 10 +- src/fortranscanner.h | 11 +- src/fortranscanner.l | 3 +- src/markdown.cpp | 3 +- src/markdown.h | 5 +- src/parserintf.h | 26 +-- src/pyscanner.h | 15 +- src/pyscanner.l | 5 +- src/scanner.h | 13 +- src/scanner.l | 61 ++---- src/vhdldocgen.cpp | 6 +- src/vhdljjparser.cpp | 2 +- src/vhdljjparser.h | 7 +- 17 files changed, 573 insertions(+), 550 deletions(-) diff --git a/src/clangparser.cpp b/src/clangparser.cpp index e0a1640..2ca5998 100644 --- a/src/clangparser.cpp +++ b/src/clangparser.cpp @@ -20,17 +20,22 @@ #include "membername.h" #include "filename.h" #include "tooltip.h" +#if MULTITHREADED_INPUT +#include +#endif +#endif -static Definition *g_currentDefinition=0; -static MemberDef *g_currentMemberDef=0; -static uint g_currentLine=0; -static bool g_searchForBody=FALSE; -static bool g_insideBody=FALSE; -static uint g_bracketCount=0; +//-------------------------------------------------------------------------- + +#if MULTITHREADED_INPUT +std::mutex g_clangMutex; #endif ClangParser *ClangParser::instance() { +#if MULTITHREADED_INPUT + std::lock_guard lock(g_clangMutex); +#endif if (!s_instance) s_instance = new ClangParser; return s_instance; } @@ -40,29 +45,7 @@ ClangParser *ClangParser::s_instance = 0; //-------------------------------------------------------------------------- #if USE_LIBCLANG -class ClangParser::Private -{ - public: - enum DetectedLang { Detected_Cpp, Detected_ObjC, Detected_ObjCpp }; - Private() : tu(0), tokens(0), numTokens(0), cursors(0), - ufs(0), sources(0), numFiles(0), fileMapping(257), - detectedLang(Detected_Cpp) - { fileMapping.setAutoDelete(TRUE); } - int getCurrentTokenLine(); - CXIndex index; - CXTranslationUnit tu; - QCString fileName; - CXToken *tokens; - uint numTokens; - CXCursor *cursors; - uint curLine; - uint curToken; - CXUnsavedFile *ufs; - QCString *sources; - uint numFiles; - QDict fileMapping; - DetectedLang detectedLang; -}; +enum class DetectedLang { Cpp, ObjC, ObjCpp }; static QCString detab(const QCString &s) { @@ -118,83 +101,89 @@ static QCString detab(const QCString &s) return out.get(); } -/** Callback function called for each include in a translation unit */ -static void inclusionVisitor(CXFile includedFile, - CXSourceLocation* /*inclusionStack*/, - unsigned /*includeLen*/, - CXClientData clientData) +static QCString keywordToType(const char *keyword) { - QDict *fileDict = (QDict *)clientData; - CXString incFileName = clang_getFileName(includedFile); - //printf("--- file %s includes %s\n",fileName,clang_getCString(incFileName)); - fileDict->insert(clang_getCString(incFileName),(void*)0x8); - clang_disposeString(incFileName); + static const StringUnorderedSet flowKeywords({ + "break", "case", "catch", "continue", "default", "do", + "else", "finally", "for", "foreach", "for each", "goto", + "if", "return", "switch", "throw", "throws", "try", + "while", "@try", "@catch", "@finally" }); + static const StringUnorderedSet typeKeywords({ + "bool", "char", "double", "float", "int", "long", "object", + "short", "signed", "unsigned", "void", "wchar_t", "size_t", + "boolean", "id", "SEL", "string", "nullptr" }); + if (flowKeywords.find(keyword)!=flowKeywords.end()) return "keywordflow"; + if (typeKeywords.find(keyword)!=typeKeywords.end()) return "keywordtype"; + return "keyword"; } -/** filter the \a files and only keep those that are found as include files - * within the current translation unit. - * @param[in,out] files The list of files to filter. - */ -void ClangParser::determineInputFilesInSameTu(QStrList &files) + +//-------------------------------------------------------------------------- + +class ClangTUParser::Private +{ + public: + Private(const ClangParser &p,const FileDef *fd) + : parser(p), fileDef(fd) {} + const ClangParser &parser; + const FileDef *fileDef; + CXIndex index; + uint curToken = 0; + DetectedLang detectedLang = DetectedLang::Cpp; + uint numFiles = 0; + std::vector sources; + std::vector ufs; + std::vector cursors; + std::unordered_map fileMapping; + CXTranslationUnit tu; + CXToken *tokens = 0; + uint numTokens = 0; + StringVector filesInSameTU; + + // state while parsing sources + MemberDef *currentMemberDef=0; + uint currentLine=0; + bool searchForBody=FALSE; + bool insideBody=FALSE; + uint bracketCount=0; +}; + +ClangTUParser::ClangTUParser(const ClangParser &parser,const FileDef *fd) + : p(std::make_unique(parser,fd)) { - // put the files in this translation unit in a dictionary - QDict incFound(257); - clang_getInclusions(p->tu, - inclusionVisitor, - (CXClientData)&incFound - ); - // create a new filtered file list - QStrList resultIncludes; - QStrListIterator it2(files); - for (it2.toFirst();it2.current();++it2) - { - if (incFound.find(it2.current())) - { - resultIncludes.append(it2.current()); - } - } - // replace the original list - files=resultIncludes; } -void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit) +StringVector ClangTUParser::filesInSameTU() const { + return p->filesInSameTU; +} + +void ClangTUParser::parse() +{ + QCString fileName = p->fileDef->absFilePath(); + p->fileDef->getAllIncludeFilesRecursively(p->filesInSameTU); + //printf("ClangTUParser::ClangTUParser(fileName=%s,#filesInSameTU=%d)\n", + // qPrint(fileName),(int)p->filesInSameTU.size()); bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); + bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES); const StringVector &includePath = Config_getList(INCLUDE_PATH); const StringVector &clangOptions = Config_getList(CLANG_OPTIONS); - QCString clangCompileDatabase = Config_getString(CLANG_DATABASE_PATH); if (!clangAssistedParsing) return; //printf("ClangParser::start(%s)\n",fileName); - p->fileName = fileName; p->index = clang_createIndex(0, 0); - p->curLine = 1; p->curToken = 0; int argc=0; - std::string error; - // load a clang compilation database (https://clang.llvm.org/docs/JSONCompilationDatabase.html) - // this only needs to be loaded once, and could be refactored to a higher level function - static std::unique_ptr db = - clang::tooling::CompilationDatabase::loadFromDirectory(clangCompileDatabase.data(), error); - int clang_option_len = 0; + size_t clang_option_len = 0; std::vector command; - if (qstrcmp(clangCompileDatabase, "0") != 0) + if (p->parser.database()!=nullptr) { - if (db == nullptr) - { - // user specified a path, but DB file was not found - err("%s using clang compilation database path of: \"%s\"\n", error.c_str(), - clangCompileDatabase.data()); - } - else - { - // check if the file we are parsing is in the DB - command = db->getCompileCommands(fileName); - if (!command.empty() ) - { - // it's possible to have multiple entries for the same file, so use the last entry - clang_option_len = command[command.size()-1].CommandLine.size(); - } - } + // check if the file we are parsing is in the DB + command = p->parser.database()->getCompileCommands(fileName.data()); + if (!command.empty() ) + { + // it's possible to have multiple entries for the same file, so use the last entry + clang_option_len = command[command.size()-1].CommandLine.size(); + } } char **argv = (char**)malloc(sizeof(char*)* (4+Doxygen::inputPaths.size()+ @@ -203,14 +192,19 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit) clang_option_len)); if (!command.empty() ) { - std::vector options = command[command.size()-1].CommandLine; - // copy each compiler option used from the database. Skip the first which is compiler exe. - for (auto option = options.begin()+1; option != options.end(); option++) - { - argv[argc++] = qstrdup(option->c_str()); - } - // this extra addition to argv is accounted for as we are skipping the first entry in - argv[argc++]=qstrdup("-w"); // finally, turn off warnings. + std::vector options = command[command.size()-1].CommandLine; + // copy each compiler option used from the database. Skip the first which is compiler exe. + for (auto option = options.begin()+1; option != options.end(); option++) + { + argv[argc++] = qstrdup(option->c_str()); + } + // user specified options + for (size_t i=0;idetectedLang!=ClangParser::Private::Detected_Cpp) + if (lang==SrcLangExt_ObjC || p->detectedLang!=DetectedLang::Cpp) { QCString fn = fileName; - if (p->detectedLang==ClangParser::Private::Detected_Cpp && + if (p->detectedLang!=DetectedLang::Cpp && (fn.right(4).lower()==".cpp" || fn.right(4).lower()==".cxx" || fn.right(3).lower()==".cc" || fn.right(2).lower()==".c")) { // fall back to C/C++ once we see an extension that indicates this - p->detectedLang = ClangParser::Private::Detected_Cpp; + p->detectedLang = DetectedLang::Cpp; } else if (fn.right(3).lower()==".mm") // switch to Objective C++ { - p->detectedLang = ClangParser::Private::Detected_ObjCpp; + p->detectedLang = DetectedLang::ObjCpp; } else if (fn.right(2).lower()==".m") // switch to Objective C { - p->detectedLang = ClangParser::Private::Detected_ObjC; + p->detectedLang = DetectedLang::ObjC; } } - switch(p->detectedLang) + switch (p->detectedLang) { - case ClangParser::Private::Detected_Cpp: - argv[argc++]=qstrdup("c++"); - break; - case ClangParser::Private::Detected_ObjC: - argv[argc++]=qstrdup("objective-c"); - break; - case ClangParser::Private::Detected_ObjCpp: - argv[argc++]=qstrdup("objective-c++"); - break; + case DetectedLang::Cpp: argv[argc++]=qstrdup("c++"); break; + case DetectedLang::ObjC: argv[argc++]=qstrdup("objective-c"); break; + case DetectedLang::ObjCpp: argv[argc++]=qstrdup("objective-c++"); break; } // provide the input and and its dependencies as unsaved files so we can // pass the filtered versions argv[argc++]=qstrdup(fileName); } - static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES); //printf("source %s ----------\n%s\n-------------\n\n", // fileName,p->source.data()); - int numUnsavedFiles = filesInTranslationUnit.count()+1; + int numUnsavedFiles = static_cast(p->filesInSameTU.size()+1); p->numFiles = numUnsavedFiles; - p->sources = new QCString[numUnsavedFiles]; - p->ufs = new CXUnsavedFile[numUnsavedFiles]; + p->sources.resize(numUnsavedFiles); + p->ufs.resize(numUnsavedFiles); p->sources[0] = detab(fileToString(fileName,filterSourceFiles,TRUE)); p->ufs[0].Filename = qstrdup(fileName); p->ufs[0].Contents = p->sources[0].data(); p->ufs[0].Length = p->sources[0].length(); - QStrListIterator it(filesInTranslationUnit); + p->fileMapping.insert({fileName.data(),0}); int i=1; - for (it.toFirst();it.current() && ifilesInSameTU.begin(); + it != p->filesInSameTU.end() && ifileMapping.insert(it.current(),new uint(i)); - p->sources[i] = detab(fileToString(it.current(),filterSourceFiles,TRUE)); - p->ufs[i].Filename = qstrdup(it.current()); + p->fileMapping.insert({it->c_str(),static_cast(i)}); + p->sources[i] = detab(fileToString(it->c_str(),filterSourceFiles,TRUE)); + p->ufs[i].Filename = qstrdup(it->c_str()); p->ufs[i].Contents = p->sources[i].data(); p->ufs[i].Length = p->sources[i].length(); } // let libclang do the actual parsing p->tu = clang_parseTranslationUnit(p->index, 0, - argv, argc, p->ufs, numUnsavedFiles, + argv, argc, p->ufs.data(), numUnsavedFiles, CXTranslationUnit_DetailedPreprocessingRecord); + //printf(" tu=%p\n",p->tu); // free arguments for (i=0;itu) { - // filter out any includes not found by the clang parser - determineInputFilesInSameTu(filesInTranslationUnit); - // show any warnings that the compiler produced int n=clang_getNumDiagnostics(p->tu); for (i=0; i!=n; ++i) @@ -325,105 +312,74 @@ void ClangParser::start(const char *fileName,QStrList &filesInTranslationUnit) clang_disposeString(string); clang_disposeDiagnostic(diag); } - - // create a source range for the given file - QFileInfo fi(fileName); - CXFile f = clang_getFile(p->tu, fileName); - CXSourceLocation fileBegin = clang_getLocationForOffset(p->tu, f, 0); - CXSourceLocation fileEnd = clang_getLocationForOffset(p->tu, f, p->ufs[0].Length); - CXSourceRange fileRange = clang_getRange(fileBegin, fileEnd); - - // produce a token stream for the file - clang_tokenize(p->tu,fileRange,&p->tokens,&p->numTokens); - - // produce cursors for each token in the stream - p->cursors=new CXCursor[p->numTokens]; - clang_annotateTokens(p->tu,p->tokens,p->numTokens,p->cursors); } else { p->tokens = 0; p->numTokens = 0; - p->cursors = 0; - err("clang: Failed to parse translation unit %s\n",fileName); - } -} - -void ClangParser::switchToFile(const char *fileName) -{ - if (p->tu) - { - delete[] p->cursors; - clang_disposeTokens(p->tu,p->tokens,p->numTokens); - p->tokens = 0; - p->numTokens = 0; - p->cursors = 0; - - QFileInfo fi(fileName); - CXFile f = clang_getFile(p->tu, fileName); - uint *pIndex=p->fileMapping.find(fileName); - if (pIndex && *pIndexnumFiles) - { - uint i=*pIndex; - //printf("switchToFile %s: len=%ld\n",fileName,p->ufs[i].Length); - CXSourceLocation fileBegin = clang_getLocationForOffset(p->tu, f, 0); - CXSourceLocation fileEnd = clang_getLocationForOffset(p->tu, f, p->ufs[i].Length); - CXSourceRange fileRange = clang_getRange(fileBegin, fileEnd); - - clang_tokenize(p->tu,fileRange,&p->tokens,&p->numTokens); - p->cursors=new CXCursor[p->numTokens]; - clang_annotateTokens(p->tu,p->tokens,p->numTokens,p->cursors); - - p->curLine = 1; - p->curToken = 0; - } - else - { - err("clang: Failed to find input file %s in mapping\n",fileName); - } + p->cursors.clear(); + err("clang: Failed to parse translation unit %s\n",qPrint(fileName)); } } -void ClangParser::finish() +ClangTUParser::~ClangTUParser() { + //printf("ClangTUParser::~ClangTUParser() tu=%p\n",p->tu); static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); if (!clangAssistedParsing) return; if (p->tu) { - //printf("ClangParser::finish()\n"); - delete[] p->cursors; + p->cursors.clear(); clang_disposeTokens(p->tu,p->tokens,p->numTokens); clang_disposeTranslationUnit(p->tu); clang_disposeIndex(p->index); p->fileMapping.clear(); p->tokens = 0; p->numTokens = 0; - p->cursors = 0; } for (uint i=0;inumFiles;i++) { free((void *)p->ufs[i].Filename); } - delete[] p->ufs; - delete[] p->sources; - p->ufs = 0; - p->sources = 0; + p->ufs.clear(); + p->sources.clear(); p->numFiles = 0; p->tu = 0; } -int ClangParser::Private::getCurrentTokenLine() +void ClangTUParser::switchToFile(FileDef *fd) { - uint l, c; - if (numTokens==0) return 1; - // guard against filters that reduce the number of lines - if (curToken>=numTokens) curToken=numTokens-1; - CXSourceLocation start = clang_getTokenLocation(tu,tokens[curToken]); - clang_getSpellingLocation(start, 0, &l, &c, 0); - return l; + //printf("ClangTUParser::switchToFile(%s)\n",qPrint(fd->absFilePath())); + if (p->tu) + { + p->cursors.clear(); + clang_disposeTokens(p->tu,p->tokens,p->numTokens); + p->tokens = 0; + p->numTokens = 0; + + CXFile f = clang_getFile(p->tu, fd->absFilePath()); + auto it = p->fileMapping.find(fd->absFilePath().data()); + if (it!=p->fileMapping.end() && it->second < p->numFiles) + { + uint i = it->second; + //printf("switchToFile %s: len=%ld\n",fileName,p->ufs[i].Length); + CXSourceLocation fileBegin = clang_getLocationForOffset(p->tu, f, 0); + CXSourceLocation fileEnd = clang_getLocationForOffset(p->tu, f, p->ufs[i].Length); + CXSourceRange fileRange = clang_getRange(fileBegin, fileEnd); + + clang_tokenize(p->tu,fileRange,&p->tokens,&p->numTokens); + p->cursors.resize(p->numTokens); + clang_annotateTokens(p->tu,p->tokens,p->numTokens,p->cursors.data()); + p->curToken = 0; + } + else + { + err("clang: Failed to find input file %s in mapping\n",qPrint(fd->absFilePath())); + } + } } -QCString ClangParser::lookup(uint line,const char *symbol) +QCString ClangTUParser::lookup(uint line,const char *symbol) { //printf("ClangParser::lookup(%d,%s)\n",line,symbol); QCString result; @@ -431,19 +387,30 @@ QCString ClangParser::lookup(uint line,const char *symbol) static bool clangAssistedParsing = Config_getBool(CLANG_ASSISTED_PARSING); if (!clangAssistedParsing) return result; + auto getCurrentTokenLine = [=]() -> uint + { + uint l, c; + if (p->numTokens==0) return 1; + // guard against filters that reduce the number of lines + if (p->curToken>=p->numTokens) p->curToken=p->numTokens-1; + CXSourceLocation start = clang_getTokenLocation(p->tu,p->tokens[p->curToken]); + clang_getSpellingLocation(start, 0, &l, &c, 0); + return l; + }; + int sl = strlen(symbol); - uint l = p->getCurrentTokenLine(); + uint l = getCurrentTokenLine(); while (l>=line && p->curToken>0) { if (l==line) // already at the right line { p->curToken--; // linear search to start of the line - l = p->getCurrentTokenLine(); + l = getCurrentTokenLine(); } else { p->curToken/=2; // binary search backward - l = p->getCurrentTokenLine(); + l = getCurrentTokenLine(); } } bool found=FALSE; @@ -468,7 +435,7 @@ QCString ClangParser::lookup(uint line,const char *symbol) { break; // end of token stream } - l = p->getCurrentTokenLine(); + l = getCurrentTokenLine(); clang_disposeString(tokenString); tokenString = clang_getTokenSpelling(p->tu, p->tokens[p->curToken]); ts = clang_getCString(tokenString); @@ -505,7 +472,7 @@ QCString ClangParser::lookup(uint line,const char *symbol) p->curToken++; if (p->curTokennumTokens) { - l = p->getCurrentTokenLine(); + l = getCurrentTokenLine(); } } //if (!found) @@ -519,78 +486,23 @@ QCString ClangParser::lookup(uint line,const char *symbol) return result; } -static QCString keywordToType(const char *keyword) -{ - static bool init=TRUE; - static QDict flowKeywords(47); - static QDict typeKeywords(47); - if (init) - { - flowKeywords.insert("break",(void*)0x8); - flowKeywords.insert("case",(void*)0x8); - flowKeywords.insert("catch",(void*)0x8); - flowKeywords.insert("continue",(void*)0x8); - flowKeywords.insert("default",(void*)0x8); - flowKeywords.insert("do",(void*)0x8); - flowKeywords.insert("else",(void*)0x8); - flowKeywords.insert("finally",(void*)0x8); - flowKeywords.insert("for",(void*)0x8); - flowKeywords.insert("foreach",(void*)0x8); - flowKeywords.insert("for each",(void*)0x8); - flowKeywords.insert("goto",(void*)0x8); - flowKeywords.insert("if",(void*)0x8); - flowKeywords.insert("return",(void*)0x8); - flowKeywords.insert("switch",(void*)0x8); - flowKeywords.insert("throw",(void*)0x8); - flowKeywords.insert("throws",(void*)0x8); - flowKeywords.insert("try",(void*)0x8); - flowKeywords.insert("while",(void*)0x8); - flowKeywords.insert("@try",(void*)0x8); - flowKeywords.insert("@catch",(void*)0x8); - flowKeywords.insert("@finally",(void*)0x8); - - typeKeywords.insert("bool",(void*)0x8); - typeKeywords.insert("char",(void*)0x8); - typeKeywords.insert("double",(void*)0x8); - typeKeywords.insert("float",(void*)0x8); - typeKeywords.insert("int",(void*)0x8); - typeKeywords.insert("long",(void*)0x8); - typeKeywords.insert("object",(void*)0x8); - typeKeywords.insert("short",(void*)0x8); - typeKeywords.insert("signed",(void*)0x8); - typeKeywords.insert("unsigned",(void*)0x8); - typeKeywords.insert("void",(void*)0x8); - typeKeywords.insert("wchar_t",(void*)0x8); - typeKeywords.insert("size_t",(void*)0x8); - typeKeywords.insert("boolean",(void*)0x8); - typeKeywords.insert("id",(void*)0x8); - typeKeywords.insert("SEL",(void*)0x8); - typeKeywords.insert("string",(void*)0x8); - typeKeywords.insert("nullptr",(void*)0x8); - init=FALSE; - } - if (flowKeywords[keyword]) return "keywordflow"; - if (typeKeywords[keyword]) return "keywordtype"; - return "keyword"; -} -static void writeLineNumber(CodeOutputInterface &ol,FileDef *fd,uint line) +void ClangTUParser::writeLineNumber(CodeOutputInterface &ol,FileDef *fd,uint line) { Definition *d = fd ? fd->getSourceDefinition(line) : 0; if (d && d->isLinkable()) { - g_currentDefinition=d; - g_currentLine=line; + p->currentLine=line; MemberDef *md = fd->getSourceMember(line); if (md && md->isLinkable()) // link to member { - if (g_currentMemberDef!=md) // new member, start search for body + if (p->currentMemberDef!=md) // new member, start search for body { - g_searchForBody=TRUE; - g_insideBody=FALSE; - g_bracketCount=0; + p->searchForBody=TRUE; + p->insideBody=FALSE; + p->bracketCount=0; } - g_currentMemberDef=md; + p->currentMemberDef=md; ol.writeLineNumber(md->getReference(), md->getOutputFileBase(), md->anchor(), @@ -598,7 +510,7 @@ static void writeLineNumber(CodeOutputInterface &ol,FileDef *fd,uint line) } else // link to compound { - g_currentMemberDef=0; + p->currentMemberDef=0; ol.writeLineNumber(d->getReference(), d->getOutputFileBase(), d->anchor(), @@ -621,8 +533,8 @@ static void writeLineNumber(CodeOutputInterface &ol,FileDef *fd,uint line) //printf("writeLineNumber(%d) g_searchForBody=%d\n",line,g_searchForBody); } -static void codifyLines(CodeOutputInterface &ol,FileDef *fd,const char *text, - uint &line,uint &column,const char *fontClass=0) +void ClangTUParser::codifyLines(CodeOutputInterface &ol,FileDef *fd,const char *text, + uint &line,uint &column,const char *fontClass) { if (fontClass) ol.startFontClass(fontClass); const char *p=text,*sp=p; @@ -657,7 +569,7 @@ static void codifyLines(CodeOutputInterface &ol,FileDef *fd,const char *text, if (fontClass) ol.endFontClass(); } -static void writeMultiLineCodeLink(CodeOutputInterface &ol, +void ClangTUParser::writeMultiLineCodeLink(CodeOutputInterface &ol, FileDef *fd,uint &line,uint &column, Definition *d, const char *text) @@ -698,7 +610,7 @@ static void writeMultiLineCodeLink(CodeOutputInterface &ol, } } -void ClangParser::linkInclude(CodeOutputInterface &ol,FileDef *fd, +void ClangTUParser::linkInclude(CodeOutputInterface &ol,FileDef *fd, uint &line,uint &column,const char *text) { QCString incName = text; @@ -732,7 +644,7 @@ void ClangParser::linkInclude(CodeOutputInterface &ol,FileDef *fd, } } -void ClangParser::linkMacro(CodeOutputInterface &ol,FileDef *fd, +void ClangTUParser::linkMacro(CodeOutputInterface &ol,FileDef *fd, uint &line,uint &column,const char *text) { MemberName *mn=Doxygen::functionNameLinkedMap->find(text); @@ -751,7 +663,7 @@ void ClangParser::linkMacro(CodeOutputInterface &ol,FileDef *fd, } -void ClangParser::linkIdentifier(CodeOutputInterface &ol,FileDef *fd, +void ClangTUParser::linkIdentifier(CodeOutputInterface &ol,FileDef *fd, uint &line,uint &column,const char *text,int tokenIndex) { CXCursor c = p->cursors[tokenIndex]; @@ -782,11 +694,11 @@ void ClangParser::linkIdentifier(CodeOutputInterface &ol,FileDef *fd, //} if (d && d->isLinkable()) { - if (g_insideBody && - g_currentMemberDef && d->definitionType()==Definition::TypeMember && - (g_currentMemberDef!=d || g_currentLineinsideBody && + p->currentMemberDef && d->definitionType()==Definition::TypeMember && + (p->currentMemberDef!=d || p->currentLine(d)); + addDocCrossReference(p->currentMemberDef,dynamic_cast(d)); } writeMultiLineCodeLink(ol,fd,line,column,d,text); } @@ -797,45 +709,44 @@ void ClangParser::linkIdentifier(CodeOutputInterface &ol,FileDef *fd, clang_disposeString(usr); } -static void detectFunctionBody(const char *s) +void ClangTUParser::detectFunctionBody(const char *s) { //printf("punct=%s g_searchForBody=%d g_insideBody=%d g_bracketCount=%d\n", // s,g_searchForBody,g_insideBody,g_bracketCount); - if (g_searchForBody && (qstrcmp(s,":")==0 || qstrcmp(s,"{")==0)) // start of 'body' (: is for constructor) + if (p->searchForBody && (qstrcmp(s,":")==0 || qstrcmp(s,"{")==0)) // start of 'body' (: is for constructor) { - g_searchForBody=FALSE; - g_insideBody=TRUE; + p->searchForBody=FALSE; + p->insideBody=TRUE; } - else if (g_searchForBody && qstrcmp(s,";")==0) // declaration only + else if (p->searchForBody && qstrcmp(s,";")==0) // declaration only { - g_searchForBody=FALSE; - g_insideBody=FALSE; + p->searchForBody=FALSE; + p->insideBody=FALSE; } - if (g_insideBody && qstrcmp(s,"{")==0) // increase scoping level + if (p->insideBody && qstrcmp(s,"{")==0) // increase scoping level { - g_bracketCount++; + p->bracketCount++; } - if (g_insideBody && qstrcmp(s,"}")==0) // decrease scoping level + if (p->insideBody && qstrcmp(s,"}")==0) // decrease scoping level { - g_bracketCount--; - if (g_bracketCount<=0) // got outside of function body + p->bracketCount--; + if (p->bracketCount<=0) // got outside of function body { - g_insideBody=FALSE; - g_bracketCount=0; + p->insideBody=FALSE; + p->bracketCount=0; } } } -void ClangParser::writeSources(CodeOutputInterface &ol,FileDef *fd) +void ClangTUParser::writeSources(CodeOutputInterface &ol,FileDef *fd) { // (re)set global parser state - g_currentDefinition=0; - g_currentMemberDef=0; - g_currentLine=0; - g_searchForBody=FALSE; - g_insideBody=FALSE; - g_bracketCount=0; + p->currentMemberDef=0; + p->currentLine=0; + p->searchForBody=FALSE; + p->insideBody=FALSE; + p->bracketCount=0; unsigned int line=1,column=1; QCString lineNumber,lineAnchor; @@ -939,16 +850,47 @@ void ClangParser::writeSources(CodeOutputInterface &ol,FileDef *fd) ol.endCodeLine(); } -ClangParser::ClangParser() +//-------------------------------------------------------------------------- + +class ClangParser::Private +{ + public: + Private() + { + std::string error; + QCString clangCompileDatabase = Config_getString(CLANG_DATABASE_PATH); + // load a clang compilation database (https://clang.llvm.org/docs/JSONCompilationDatabase.html) + db = clang::tooling::CompilationDatabase::loadFromDirectory(clangCompileDatabase.data(), error); + if (clangCompileDatabase!="0" && db==nullptr) + { + // user specified a path, but DB file was not found + err("%s using clang compilation database path of: \"%s\"\n", error.c_str(), + clangCompileDatabase.data()); + } + } + + std::unique_ptr db; +}; + +const clang::tooling::CompilationDatabase *ClangParser::database() const +{ + return p->db.get(); +} + +ClangParser::ClangParser() : p(std::make_unique()) { - p = new Private; } ClangParser::~ClangParser() { - delete p; } +std::unique_ptr ClangParser::createTUParser(const FileDef *fd) const +{ + return std::make_unique(*this,fd); +} + + //-------------------------------------------------------------------------- #else // use stubbed functionality in case libclang support is disabled. @@ -982,7 +924,6 @@ ClangParser::~ClangParser() { } - #endif //-------------------------------------------------------------------------- diff --git a/src/clangparser.h b/src/clangparser.h index 8bb9aba..07907a6 100644 --- a/src/clangparser.h +++ b/src/clangparser.h @@ -3,9 +3,73 @@ #include #include +#include "containers.h" +#include class CodeOutputInterface; class FileDef; +class ClangParser; +class Definition; + +namespace clang { namespace tooling { + class CompilationDatabase; +} } + +/** @brief Clang parser object for a single translation unit, which consists of a source file + * and the directly or indirectly included headers + */ +class ClangTUParser +{ + public: + ClangTUParser(const ClangParser &parser,const FileDef *fd); + virtual ~ClangTUParser(); + + /** Parse the file given at construction time as a translation unit + * This file should already be preprocessed by doxygen preprocessor at the time of calling. + */ + void parse(); + + /** Switches to another file within the translation unit started with start(). + * @param[in] fileName The name of the file to switch to. + */ + void switchToFile(FileDef *fd); + + /** Returns the list of files for this translation unit */ + StringVector filesInSameTU() const; + + /** Looks for \a symbol which should be found at \a line. + * returns a clang unique reference to the symbol. + */ + QCString lookup(uint line,const char *symbol); + + /** writes the syntax highlighted source code for a file + * @param[out] ol The output generator list to write to. + * @param[in] fd The file to write sources for. + */ + void writeSources(CodeOutputInterface &ol,FileDef *fd); + + private: + void detectFunctionBody(const char *s); + void writeLineNumber(CodeOutputInterface &ol,FileDef *fd,uint line); + void codifyLines(CodeOutputInterface &ol,FileDef *fd,const char *text, + uint &line,uint &column,const char *fontClass=0); + void writeMultiLineCodeLink(CodeOutputInterface &ol, + FileDef *fd,uint &line,uint &column, + Definition *d, const char *text); + void linkIdentifier(CodeOutputInterface &ol,FileDef *fd, + uint &line,uint &column, + const char *text,int tokenIndex); + void linkMacro(CodeOutputInterface &ol,FileDef *fd, + uint &line,uint &column, + const char *text); + void linkInclude(CodeOutputInterface &ol,FileDef *fd, + uint &line,uint &column, + const char *text); + ClangTUParser(const ClangTUParser &) = delete; + ClangTUParser &operator=(const ClangTUParser &) = delete; + class Private; + std::unique_ptr p; +}; /** @brief Wrapper for to let libclang assisted parsing. */ class ClangParser @@ -13,16 +77,20 @@ class ClangParser public: /** Returns the one and only instance of the class */ static ClangParser *instance(); - + + std::unique_ptr createTUParser(const FileDef *fd) const; + const clang::tooling::CompilationDatabase *database() const; + +#if 0 /** Start parsing a file. * @param[in] fileName The name of the file to parse. * @param[in,out] filesInTranslationUnit Other files that are * part of the input and included by the file. * The function will return a subset of the files, - * only including the ones that were actually found + * only including the ones that were actually found * during parsing. */ - void start(const char *fileName,QStrList &filesInTranslationUnit); + void start(const char *fileName,StringVector &filesInTranslationUnit); /** Switches to another file within the translation unit started * with start(). @@ -45,8 +113,10 @@ class ClangParser * @param[in] fd The file to write sources for. */ void writeSources(CodeOutputInterface &ol,FileDef *fd); +#endif private: +#if 0 void linkIdentifier(CodeOutputInterface &ol,FileDef *fd, uint &line,uint &column, const char *text,int tokenIndex); @@ -56,9 +126,9 @@ class ClangParser void linkInclude(CodeOutputInterface &ol,FileDef *fd, uint &line,uint &column, const char *text); - void determineInputFilesInSameTu(QStrList &filesInTranslationUnit); +#endif class Private; - Private *p; + std::unique_ptr p; ClangParser(); virtual ~ClangParser(); static ClangParser *s_instance; diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 5ac1980..8c739ad 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -104,6 +104,7 @@ #include "plantuml.h" #include "stlsupport.h" #include "threadpool.h" +#include "clangparser.h" // provided by the generated file resources.cpp extern void initResources(); @@ -7499,50 +7500,48 @@ static void generateFileSources() { if (fd->isSource() && !fd->isReference()) { - QStrList filesInSameTu; - fd->getAllIncludeFilesRecursively(filesInSameTu); - fd->startParsing(); + auto clangParser = ClangParser::instance()->createTUParser(fd.get()); if (fd->generateSourceFile() && !g_useOutputTemplate) // sources need to be shown in the output { msg("Generating code for file %s...\n",fd->docName().data()); - fd->writeSource(*g_outputList,FALSE,filesInSameTu); + clangParser->parse(); + fd->writeSource(*g_outputList,clangParser.get()); } else if (!fd->isReference() && Doxygen::parseSourcesNeeded) // we needed to parse the sources even if we do not show them { msg("Parsing code for file %s...\n",fd->docName().data()); - fd->parseSource(FALSE,filesInSameTu); + clangParser->parse(); + fd->parseSource(clangParser.get()); } - char *incFile = filesInSameTu.first(); - while (incFile && filesToProcess.find(incFile)!=filesToProcess.end()) + for (auto incFile : clangParser->filesInSameTU()) { - if (fd->absFilePath()!=incFile && processedFiles.find(incFile)==processedFiles.end()) + if (filesToProcess.find(incFile)!=filesToProcess.end() && // part of input + fd->absFilePath()!=incFile && // not same file + processedFiles.find(incFile)==processedFiles.end()) // not yet marked as processed { - QStrList moreFiles; + StringVector moreFiles; bool ambig; - FileDef *ifd=findFileDef(Doxygen::inputNameLinkedMap,incFile,ambig); + FileDef *ifd=findFileDef(Doxygen::inputNameLinkedMap,incFile.c_str(),ambig); if (ifd && !ifd->isReference()) { if (ifd->generateSourceFile() && !g_useOutputTemplate) // sources need to be shown in the output { msg(" Generating code for file %s...\n",ifd->docName().data()); - ifd->writeSource(*g_outputList,TRUE,moreFiles); - + ifd->writeSource(*g_outputList,clangParser.get()); } else if (!ifd->isReference() && Doxygen::parseSourcesNeeded) // we needed to parse the sources even if we do not show them { msg(" Parsing code for file %s...\n",ifd->docName().data()); - ifd->parseSource(TRUE,moreFiles); + ifd->parseSource(clangParser.get()); } processedFiles.insert(incFile); } } - incFile = filesInSameTu.next(); } - fd->finishParsing(); processedFiles.insert(fd->absFilePath().str()); } } @@ -7554,21 +7553,21 @@ static void generateFileSources() { if (processedFiles.find(fd->absFilePath().str())==processedFiles.end()) // not yet processed { - QStrList filesInSameTu; - fd->startParsing(); + auto clangParser = ClangParser::instance()->createTUParser(fd.get()); if (fd->generateSourceFile() && !Htags::useHtags && !g_useOutputTemplate) // sources need to be shown in the output { msg("Generating code for file %s...\n",fd->docName().data()); - fd->writeSource(*g_outputList,FALSE,filesInSameTu); + clangParser->parse(); + fd->writeSource(*g_outputList,clangParser.get()); } else if (!fd->isReference() && Doxygen::parseSourcesNeeded) // we needed to parse the sources even if we do not show them { msg("Parsing code for file %s...\n",fd->docName().data()); - fd->parseSource(FALSE,filesInSameTu); + clangParser->parse(); + fd->parseSource(clangParser.get()); } - fd->finishParsing(); } } } @@ -7580,21 +7579,20 @@ static void generateFileSources() { for (const auto &fd : *fn) { - QStrList filesInSameTu; - fd->startParsing(); + StringVector filesInSameTu; + fd->getAllIncludeFilesRecursively(filesInSameTu); if (fd->generateSourceFile() && !Htags::useHtags && !g_useOutputTemplate) // sources need to be shown in the output { msg("Generating code for file %s...\n",fd->docName().data()); - fd->writeSource(*g_outputList,FALSE,filesInSameTu); + fd->writeSource(*g_outputList,nullptr); } else if (!fd->isReference() && Doxygen::parseSourcesNeeded) // we needed to parse the sources even if we do not show them { msg("Parsing code for file %s...\n",fd->docName().data()); - fd->parseSource(FALSE,filesInSameTu); + fd->parseSource(nullptr); } - fd->finishParsing(); } } } @@ -9062,7 +9060,7 @@ static std::unique_ptr getParserForFile(const char *fn) static std::shared_ptr parseFile(OutlineParserInterface &parser, FileDef *fd,const char *fn, - bool sameTu,QStrList &filesInSameTu) + ClangTUParser *clangParser,bool newTU) { QCString fileName=fn; QCString extension; @@ -9110,18 +9108,20 @@ static std::shared_ptr parseFile(OutlineParserInterface &parser, convBuf.addChar('\0'); - if (Doxygen::clangAssistedParsing && !sameTu) - { - fd->getAllIncludeFilesRecursively(filesInSameTu); - } - std::shared_ptr fileRoot = std::make_shared(); // use language parse to parse the file - parser.parseInput(fileName,convBuf.data(),fileRoot,sameTu,filesInSameTu); + if (clangParser) + { + if (newTU) clangParser->parse(); + clangParser->switchToFile(fd); + } + parser.parseInput(fileName,convBuf.data(),fileRoot,clangParser); fileRoot->setFileDef(fd); return fileRoot; } +#if MULTITHREADED_INPUT + //! parse the list of input files static void parseFiles(const std::shared_ptr &root) { @@ -9137,7 +9137,12 @@ static void parseFiles(const std::shared_ptr &root) filesToProcess.insert(s); } + std::mutex processedFilesLock; // process source files (and their include dependencies) + std::size_t numThreads = std::thread::hardware_concurrency(); + msg("Processing input using %lu threads.\n",numThreads); + ThreadPool threadPool(numThreads); + std::vector< std::future< std::vector< std::shared_ptr > > > results; for (const auto &s : g_inputFiles) { bool ambig; @@ -9145,70 +9150,89 @@ static void parseFiles(const std::shared_ptr &root) ASSERT(fd!=0); if (fd->isSource() && !fd->isReference()) // this is a source file { - QStrList filesInSameTu; - std::unique_ptr parser { getParserForFile(s.c_str()) }; - parser->startTranslationUnit(s.c_str()); - std::shared_ptr fileRoot = parseFile(*parser.get(),fd,s.c_str(),FALSE,filesInSameTu); - root->moveToSubEntryAndKeep(fileRoot); - //printf(" got %d extra files in tu\n",filesInSameTu.count()); - - // Now process any include files in the same translation unit - // first. When libclang is used this is much more efficient. - char *incFile = filesInSameTu.first(); - while (incFile && filesToProcess.find(incFile)!=filesToProcess.end()) - { - if (qstrcmp(incFile,s.c_str()) && processedFiles.find(incFile)==processedFiles.end()) + // lambda representing the work to executed by a thread + auto processFile = [s,&filesToProcess,&processedFilesLock,&processedFiles]() { + bool ambig; + std::vector< std::shared_ptr > roots; + FileDef *fd = findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig); + auto clangParser = ClangParser::instance()->createTUParser(fd); + auto parser = getParserForFile(s.c_str()); + auto fileRoot { parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),true) }; + roots.push_back(fileRoot); + + // Now process any include files in the same translation unit + // first. When libclang is used this is much more efficient. + for (auto incFile : clangParser->filesInSameTU()) { - FileDef *ifd=findFileDef(Doxygen::inputNameLinkedMap,incFile,ambig); - if (ifd && !ifd->isReference()) + if (filesToProcess.find(incFile)!=filesToProcess.end()) { - QStrList moreFiles; - //printf(" Processing %s in same translation unit as %s\n",incFile,s->c_str()); - fileRoot = parseFile(*parser.get(),ifd,incFile,TRUE,moreFiles); - root->moveToSubEntryAndKeep(fileRoot); - processedFiles.insert(incFile); + bool needsToBeProcessed; + { + std::lock_guard lock(processedFilesLock); + needsToBeProcessed = processedFiles.find(incFile)==processedFiles.end(); + if (needsToBeProcessed) processedFiles.insert(incFile); + } + if (incFile!=s && needsToBeProcessed) + { + FileDef *ifd=findFileDef(Doxygen::inputNameLinkedMap,incFile.c_str(),ambig); + if (ifd && !ifd->isReference()) + { + //printf(" Processing %s in same translation unit as %s\n",incFile,s->c_str()); + fileRoot = parseFile(*parser.get(),ifd,incFile.c_str(),clangParser.get(),false); + roots.push_back(fileRoot); + } + } } } - incFile = filesInSameTu.next(); - } - parser->finishTranslationUnit(); - processedFiles.insert(s); + return roots; + }; + // dispatch the work and collect the future results + results.emplace_back(threadPool.queue(processFile)); + } + } + // synchronise with the Entry result lists produced and add them to the root + for (auto &f : results) + { + auto l = f.get(); + for (auto &e : l) + { + root->moveToSubEntryAndKeep(e); } } // process remaining files + results.clear(); for (const auto &s : g_inputFiles) { if (processedFiles.find(s)==processedFiles.end()) // not yet processed { - bool ambig; - QStrList filesInSameTu; - FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig); - ASSERT(fd!=0); - std::unique_ptr parser { getParserForFile(s.c_str()) }; - parser->startTranslationUnit(s.c_str()); - std::shared_ptr fileRoot = parseFile(*parser.get(),fd,s.c_str(),FALSE,filesInSameTu); - root->moveToSubEntryAndKeep(fileRoot); - parser->finishTranslationUnit(); - processedFiles.insert(s); + // lambda representing the work to executed by a thread + auto processFile = [s]() { + bool ambig; + std::vector< std::shared_ptr > roots; + FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig); + auto clangParser = ClangParser::instance()->createTUParser(fd); + auto parser { getParserForFile(s.c_str()) }; + auto fileRoot = parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),true); + roots.push_back(fileRoot); + return roots; + }; + // dispatch the work and collect the future results + results.emplace_back(threadPool.queue(processFile)); + } + } + // synchronise with the Entry result lists produced and add them to the root + for (auto &f : results) + { + auto l = f.get(); + for (auto &e : l) + { + root->moveToSubEntryAndKeep(e); } } } else // normal processing #endif { -#if !MULTITHREADED_INPUT - for (const auto &s : g_inputFiles) - { - bool ambig; - QStrList filesInSameTu; - FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig); - ASSERT(fd!=0); - std::unique_ptr parser { getParserForFile(s.c_str()) }; - parser->startTranslationUnit(s.c_str()); - std::shared_ptr fileRoot = parseFile(*parser.get(),fd,s.c_str(),FALSE,filesInSameTu); - root->moveToSubEntryAndKeep(fileRoot); - } -#else std::size_t numThreads = std::thread::hardware_concurrency(); msg("Processing input using %lu threads.\n",numThreads); ThreadPool threadPool(numThreads); @@ -9218,12 +9242,10 @@ static void parseFiles(const std::shared_ptr &root) // lambda representing the work to executed by a thread auto processFile = [s]() { bool ambig; - QStrList filesInSameTu; FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig); - ASSERT(fd!=0); - std::unique_ptr parser { getParserForFile(s.c_str()) }; - parser->startTranslationUnit(s.c_str()); - std::shared_ptr fileRoot = parseFile(*parser.get(),fd,s.c_str(),FALSE,filesInSameTu); + auto clangParser = ClangParser::instance()->createTUParser(fd); + auto parser = getParserForFile(s.c_str()); + auto fileRoot = parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),true); return fileRoot; }; // dispatch the work and collect the future results @@ -9235,10 +9257,92 @@ static void parseFiles(const std::shared_ptr &root) root->moveToSubEntryAndKeep(f.get()); } #warning "Multi-threaded input enabled. This is a highly experimental feature. Only use for doxygen development." + } +} + +#else // !MULTITHREADED_INPUT + +//! parse the list of input files +static void parseFiles(const std::shared_ptr &root) +{ +#if USE_LIBCLANG + if (Doxygen::clangAssistedParsing) + { + StringUnorderedSet processedFiles; + + // create a dictionary with files to process + StringUnorderedSet filesToProcess; + for (const auto &s : g_inputFiles) + { + filesToProcess.insert(s); + } + + // process source files (and their include dependencies) + for (const auto &s : g_inputFiles) + { + bool ambig; + FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig); + ASSERT(fd!=0); + if (fd->isSource() && !fd->isReference()) // this is a source file + { + auto clangParser = ClangParser::instance()->createTUParser(fd); + auto parser { getParserForFile(s.c_str()) }; + auto fileRoot = parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),true); + root->moveToSubEntryAndKeep(fileRoot); + processedFiles.insert(s); + + // Now process any include files in the same translation unit + // first. When libclang is used this is much more efficient. + for (auto incFile : clangParser->filesInSameTU()) + { + //printf(" file %s\n",incFile.c_str()); + if (filesToProcess.find(incFile)!=filesToProcess.end() && // file need to be processed + processedFiles.find(incFile)==processedFiles.end()) // and is not processed already + { + FileDef *ifd=findFileDef(Doxygen::inputNameLinkedMap,incFile.c_str(),ambig); + if (ifd && !ifd->isReference()) + { + //printf(" Processing %s in same translation unit as %s\n",incFile.c_str(),s.c_str()); + fileRoot = parseFile(*parser.get(),ifd,incFile.c_str(),clangParser.get(),false); + root->moveToSubEntryAndKeep(fileRoot); + processedFiles.insert(incFile); + } + } + } + } + } + // process remaining files + for (const auto &s : g_inputFiles) + { + if (processedFiles.find(s)==processedFiles.end()) // not yet processed + { + bool ambig; + FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig); + auto clangParser = ClangParser::instance()->createTUParser(fd); + auto parser { getParserForFile(s.c_str()) }; + auto fileRoot = parseFile(*parser.get(),fd,s.c_str(),clangParser.get(),true); + root->moveToSubEntryAndKeep(fileRoot); + processedFiles.insert(s); + } + } + } + else // normal processing #endif + { + for (const auto &s : g_inputFiles) + { + bool ambig; + FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,s.c_str(),ambig); + ASSERT(fd!=0); + std::unique_ptr parser { getParserForFile(s.c_str()) }; + std::shared_ptr fileRoot = parseFile(*parser.get(),fd,s.c_str(),nullptr,true); + root->moveToSubEntryAndKeep(fileRoot); + } } } +#endif + // resolves a path that may include symlinks, if a recursive symlink is // found an empty string is returned. static QCString resolveSymlink(QCString path) @@ -9707,9 +9811,7 @@ static const char *getArg(int argc,char **argv,int &optind) class NullOutlineParser : public OutlineParserInterface { public: - void startTranslationUnit(const char *) {} - void finishTranslationUnit() {} - void parseInput(const char *, const char *,const std::shared_ptr &, bool, QStrList &) {} + void parseInput(const char *, const char *,const std::shared_ptr &, ClangTUParser*) {} bool needsPreprocessing(const QCString &) const { return FALSE; } void parsePrototype(const char *) {} }; diff --git a/src/filedef.cpp b/src/filedef.cpp index 08f022b..658023b 100644 --- a/src/filedef.cpp +++ b/src/filedef.cpp @@ -82,7 +82,7 @@ class FileDefImpl : public DefinitionImpl, public FileDef virtual SDict *getUsedClasses() const { return m_usingDeclList; } virtual QList *includeFileList() const { return m_includeList; } virtual QList *includedByFileList() const { return m_includedByList; } - virtual void getAllIncludeFilesRecursively(QStrList &incFiles) const; + virtual void getAllIncludeFilesRecursively(StringVector &incFiles) const; virtual MemberList *getMemberList(MemberListType lt) const; virtual const QList &getMemberLists() const { return m_memberLists; } virtual MemberGroupSDict *getMemberGroupSDict() const { return m_memberGroupSDict; } @@ -101,10 +101,8 @@ class FileDefImpl : public DefinitionImpl, public FileDef virtual void writeQuickMemberLinks(OutputList &ol,const MemberDef *currentMd) const; virtual void writeSummaryLinks(OutputList &ol) const; virtual void writeTagFile(FTextStream &t); - virtual void startParsing(); - virtual void writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu); - virtual void parseSource(bool sameTu,QStrList &filesInSameTu); - virtual void finishParsing(); + virtual void writeSource(OutputList &ol,ClangTUParser *clangParser); + virtual void parseSource(ClangTUParser *clangParser); virtual void setDiskName(const QCString &name); virtual void insertMember(MemberDef *md); virtual void insertClass(ClassDef *cd); @@ -1151,7 +1149,7 @@ void FileDefImpl::writeQuickMemberLinks(OutputList &ol,const MemberDef *currentM } /*! Write a source listing of this file to the output */ -void FileDefImpl::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu) +void FileDefImpl::writeSource(OutputList &ol,ClangTUParser *clangParser) { static bool generateTreeView = Config_getBool(GENERATE_TREEVIEW); static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES); @@ -1209,22 +1207,13 @@ void FileDefImpl::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu ol.popGeneratorState(); } - (void)sameTu; - (void)filesInSameTu; #if USE_LIBCLANG - if (Doxygen::clangAssistedParsing && + if (Doxygen::clangAssistedParsing && clangParser && (getLanguage()==SrcLangExt_Cpp || getLanguage()==SrcLangExt_ObjC)) { ol.startCodeFragment(); - if (!sameTu) - { - ClangParser::instance()->start(absFilePath(),filesInSameTu); - } - else - { - ClangParser::instance()->switchToFile(absFilePath()); - } - ClangParser::instance()->writeSources(ol,this); + clangParser->switchToFile(this); + clangParser->writeSources(ol,this); ol.endCodeFragment(); } else @@ -1268,25 +1257,16 @@ void FileDefImpl::writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu ol.enableAll(); } -void FileDefImpl::parseSource(bool sameTu,QStrList &filesInSameTu) +void FileDefImpl::parseSource(ClangTUParser *clangParser) { static bool filterSourceFiles = Config_getBool(FILTER_SOURCE_FILES); DevNullCodeDocInterface devNullIntf; - (void)sameTu; - (void)filesInSameTu; #if USE_LIBCLANG - if (Doxygen::clangAssistedParsing && + if (Doxygen::clangAssistedParsing && clangParser && (getLanguage()==SrcLangExt_Cpp || getLanguage()==SrcLangExt_ObjC)) { - if (!sameTu) - { - ClangParser::instance()->start(absFilePath(),filesInSameTu); - } - else - { - ClangParser::instance()->switchToFile(absFilePath()); - } - ClangParser::instance()->writeSources(devNullIntf,this); + clangParser->switchToFile(this); + clangParser->writeSources(devNullIntf,this); } else #endif @@ -1302,15 +1282,6 @@ void FileDefImpl::parseSource(bool sameTu,QStrList &filesInSameTu) } } -void FileDefImpl::startParsing() -{ -} - -void FileDefImpl::finishParsing() -{ - ClangParser::instance()->finish(); -} - void FileDefImpl::addMembersToMemberGroup() { QListIterator mli(m_memberLists); @@ -2159,7 +2130,7 @@ bool FileDefImpl::isLinkableInProject() const } static void getAllIncludeFilesRecursively( - QDict *filesVisited,const FileDef *fd,QStrList &incFiles) + StringUnorderedSet &filesVisited,const FileDef *fd,StringVector &incFiles) { if (fd->includeFileList()) { @@ -2168,21 +2139,21 @@ static void getAllIncludeFilesRecursively( for (iii.toFirst();(ii=iii.current());++iii) { if (ii->fileDef && !ii->fileDef->isReference() && - !filesVisited->find(ii->fileDef->absFilePath())) + filesVisited.find(ii->fileDef->absFilePath().str())==filesVisited.end()) { //printf("FileDefImpl::addIncludeDependency(%s)\n",ii->fileDef->absFilePath().data()); - incFiles.append(ii->fileDef->absFilePath()); - filesVisited->insert(ii->fileDef->absFilePath(),(void*)0x8); + incFiles.push_back(ii->fileDef->absFilePath().str()); + filesVisited.insert(ii->fileDef->absFilePath().str()); getAllIncludeFilesRecursively(filesVisited,ii->fileDef,incFiles); } } } } -void FileDefImpl::getAllIncludeFilesRecursively(QStrList &incFiles) const +void FileDefImpl::getAllIncludeFilesRecursively(StringVector &incFiles) const { - QDict includes(257); - ::getAllIncludeFilesRecursively(&includes,this,incFiles); + StringUnorderedSet includes; + ::getAllIncludeFilesRecursively(includes,this,incFiles); } QCString FileDefImpl::title() const diff --git a/src/filedef.h b/src/filedef.h index c03e7ef..e4bb549 100644 --- a/src/filedef.h +++ b/src/filedef.h @@ -25,6 +25,7 @@ #include "definition.h" #include "sortdict.h" #include "memberlist.h" +#include "containers.h" class MemberList; class FileDef; @@ -40,6 +41,7 @@ class MemberGroupSDict; class PackageDef; class DirDef; class FTextStream; +class ClangTUParser; /** Class representing the data associated with a \#include statement. */ struct IncludeInfo @@ -118,7 +120,7 @@ class FileDef : virtual public Definition virtual SDict *getUsedClasses() const = 0; virtual QList *includeFileList() const = 0; virtual QList *includedByFileList() const = 0; - virtual void getAllIncludeFilesRecursively(QStrList &incFiles) const = 0; + virtual void getAllIncludeFilesRecursively(StringVector &incFiles) const = 0; virtual MemberList *getMemberList(MemberListType lt) const = 0; virtual const QList &getMemberLists() const = 0; @@ -148,10 +150,8 @@ class FileDef : virtual public Definition virtual void writeSummaryLinks(OutputList &ol) const = 0; virtual void writeTagFile(FTextStream &t) = 0; - virtual void startParsing() = 0; - virtual void writeSource(OutputList &ol,bool sameTu,QStrList &filesInSameTu) = 0; - virtual void parseSource(bool sameTu,QStrList &filesInSameTu) = 0; - virtual void finishParsing() = 0; + virtual void writeSource(OutputList &ol,ClangTUParser *clangParser) = 0; + virtual void parseSource(ClangTUParser *clangParser) = 0; virtual void setDiskName(const QCString &name) = 0; virtual void insertMember(MemberDef *md) = 0; diff --git a/src/fortranscanner.h b/src/fortranscanner.h index 6ffcb1f..0e67bb2 100644 --- a/src/fortranscanner.h +++ b/src/fortranscanner.h @@ -1,12 +1,12 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2015 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 + * 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. * @@ -29,13 +29,10 @@ class FortranOutlineParser : public OutlineParserInterface public: FortranOutlineParser(FortranFormat format=FortranFormat_Unknown); ~FortranOutlineParser(); - void startTranslationUnit(const char *) {} - void finishTranslationUnit() {} void parseInput(const char *fileName, const char *fileBuf, const std::shared_ptr &root, - bool sameTranslationUnit, - QStrList &filesInSameTranslationUnit); + ClangTUParser *clangParser); bool needsPreprocessing(const QCString &extension) const; void parsePrototype(const char *text); diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 195293f..9714602 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -2803,8 +2803,7 @@ FortranOutlineParser::~FortranOutlineParser() void FortranOutlineParser::parseInput(const char *fileName, const char *fileBuf, const std::shared_ptr &root, - bool /*sameTranslationUnit*/, - QStrList & /*filesInSameTranslationUnit*/) + ClangTUParser * /*clangParser*/) { struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner; yyextra->thisParser = this; diff --git a/src/markdown.cpp b/src/markdown.cpp index 583ad17..1a96d45 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2528,8 +2528,7 @@ MarkdownOutlineParser::~MarkdownOutlineParser() void MarkdownOutlineParser::parseInput(const char *fileName, const char *fileBuf, const std::shared_ptr &root, - bool /*sameTranslationUnit*/, - QStrList & /*filesInSameTranslationUnit*/) + ClangTUParser* /*clangParser*/) { std::shared_ptr current = std::make_shared(); current->lang = SrcLangExt_Markdown; diff --git a/src/markdown.h b/src/markdown.h index 6ac59cb..43a17cc 100644 --- a/src/markdown.h +++ b/src/markdown.h @@ -93,13 +93,10 @@ class MarkdownOutlineParser : public OutlineParserInterface public: MarkdownOutlineParser(); virtual ~MarkdownOutlineParser(); - void startTranslationUnit(const char *) {} - void finishTranslationUnit() {} void parseInput(const char *fileName, const char *fileBuf, const std::shared_ptr &root, - bool sameTranslationUnit, - QStrList &filesInSameTranslationUnit); + ClangTUParser *clangParser); bool needsPreprocessing(const QCString &) const { return FALSE; } void parsePrototype(const char *text); private: diff --git a/src/parserintf.h b/src/parserintf.h index f11352e..911b707 100644 --- a/src/parserintf.h +++ b/src/parserintf.h @@ -26,12 +26,14 @@ #include #include "types.h" +#include "containers.h" class Entry; class FileDef; class CodeOutputInterface; class MemberDef; class Definition; +class ClangTUParser; /** \brief Abstract interface for outline parsers. * @@ -44,36 +46,18 @@ class OutlineParserInterface public: virtual ~OutlineParserInterface() {} - /** Starts processing a translation unit (source files + headers). - * After this call parseInput() is called with sameTranslationUnit - * set to FALSE. If parseInput() returns additional include files, - * these are also processed using parseInput() with - * sameTranslationUnit set to TRUE. After that - * finishTranslationUnit() is called. - */ - virtual void startTranslationUnit(const char *fileName) = 0; - - /** Called after all files in a translation unit have been - * processed. - */ - virtual void finishTranslationUnit() = 0; - /** Parses a single input file with the goal to build an Entry tree. * @param[in] fileName The full name of the file. * @param[in] fileBuf The contents of the file (zero terminated). * @param[in,out] root The root of the tree of Entry *nodes * representing the information extracted from the file. - * @param[in] sameTranslationUnit TRUE if this file was found in the same - * translation unit (in the filesInSameTranslationUnit list - * returned for another file). - * @param[in,out] filesInSameTranslationUnit other files expected to be - * found in the same translation unit (used for libclang) + * @param[in] clangParser The clang translation unit parser object + * or nullptr if disabled. */ virtual void parseInput(const char *fileName, const char *fileBuf, const std::shared_ptr &root, - bool sameTranslationUnit, - QStrList &filesInSameTranslationUnit) = 0; + ClangTUParser *clangParser) = 0; /** Returns TRUE if the language identified by \a extension needs * the C preprocessor to be run before feed the result to the input diff --git a/src/pyscanner.h b/src/pyscanner.h index d6e8672..4f0ae38 100644 --- a/src/pyscanner.h +++ b/src/pyscanner.h @@ -1,12 +1,12 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2015 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 + * 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. * @@ -36,13 +36,10 @@ class PythonOutlineParser : public OutlineParserInterface public: PythonOutlineParser(); virtual ~PythonOutlineParser(); - void startTranslationUnit(const char *) {} - void finishTranslationUnit() {} - void parseInput(const char * fileName, - const char *fileBuf, + void parseInput(const char * fileName, + const char *fileBuf, const std::shared_ptr &root, - bool sameTranslationUnit, - QStrList &filesInSameTranslationUnit); + ClangTUParser *clangParser); bool needsPreprocessing(const QCString &extension) const; void parsePrototype(const char *text); private: diff --git a/src/pyscanner.l b/src/pyscanner.l index a3dbaba..07b39d6 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -1517,7 +1517,7 @@ static void newFunction(yyscan_t yyscanner) static inline int computeIndent(const char *s) { int col=0; - static int tabSize=Config_getInt(TAB_SIZE); + int tabSize=Config_getInt(TAB_SIZE); const char *p=s; char c; while ((c=*p++)) @@ -1936,8 +1936,7 @@ PythonOutlineParser::~PythonOutlineParser() void PythonOutlineParser::parseInput(const char *fileName, const char *fileBuf, const std::shared_ptr &root, - bool /*sameTranslationUnit*/, - QStrList & /*filesInSameTranslationUnit*/) + ClangTUParser * /*clangParser*/) { struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner; yyextra->thisParser = this; diff --git a/src/scanner.h b/src/scanner.h index 70df660..cefc934 100644 --- a/src/scanner.h +++ b/src/scanner.h @@ -1,12 +1,12 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2015 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 + * 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. * @@ -23,7 +23,7 @@ /** \brief C-like language parser using state-based lexical scanning. * * This is the language parser for doxygen. It is somewhat fuzzy and - * supports C++ and various languages that are closely related to C++, + * supports C++ and various languages that are closely related to C++, * such as C, C#, Objective-C, Java, PHP, and IDL. */ class COutlineParser : public OutlineParserInterface @@ -31,13 +31,10 @@ class COutlineParser : public OutlineParserInterface public: COutlineParser(); virtual ~COutlineParser(); - void startTranslationUnit(const char *fileName); - void finishTranslationUnit(); void parseInput(const char *fileName, const char *fileBuf, const std::shared_ptr &root, - bool sameTranslationUnit, - QStrList &filesInSameTranslationUnit); + ClangTUParser *clangParser); bool needsPreprocessing(const QCString &extension) const; void parsePrototype(const char *text); private: diff --git a/src/scanner.l b/src/scanner.l index d26a9b2..d9ad41c 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -193,6 +193,8 @@ struct scannerYY_state uint fencedSize = 0; bool nestedComment = false; std::vector< std::pair > > outerScopeEntries; + + ClangTUParser * clangParser = 0; }; #if USE_STATE2STRING @@ -766,9 +768,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) yyextra->current->type = "id"; } yyextra->current->name = yytext; - if (yyextra->insideCpp || yyextra->insideObjC) + if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC)) { - yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); + yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,yytext); } } ":"{B}* { // start of parameter list @@ -2045,9 +2047,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) BEGIN(FindMembers); } {SCOPENAME} { - if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) + if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC)) { - yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); + yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,yytext); } yyextra->yyBegColNr=yyextra->yyColNr; yyextra->yyBegLineNr=yyextra->yyLineNr; @@ -2348,9 +2350,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) */ {ID} { //printf("Define '%s' without args\n",yytext); - if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) + if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC)) { - yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); + yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,yytext); } yyextra->current->bodyLine = yyextra->yyLineNr; yyextra->current->bodyColumn = yyextra->yyColNr; @@ -3463,9 +3465,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } . { yyextra->current->type += *yytext ; } {ID} { - if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) + if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC)) { - yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); + yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,yytext); } yyextra->current->bodyLine = yyextra->yyLineNr; yyextra->current->bodyColumn = yyextra->yyColNr; @@ -5334,9 +5336,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } {SCOPENAME} { yyextra->current->name = yytext ; - if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) + if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC)) { - yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); + yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,yytext); } lineCount(yyscanner); if (yyextra->current->spec & Entry::Protocol) @@ -5399,9 +5401,9 @@ OPERATOR "operator"{B}*({ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}) } } {ID} { - if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) + if (yyextra->clangParser && (yyextra->insideCpp || yyextra->insideObjC)) { - yyextra->current->id = ClangParser::instance()->lookup(yyextra->yyLineNr,yytext); + yyextra->current->id = yyextra->clangParser->lookup(yyextra->yyLineNr,yytext); } if (yyextra->insideIDL && qstrcmp(yytext,"switch")==0) { @@ -7232,8 +7234,7 @@ static void parseMain(yyscan_t yyscanner, const char *fileName, const char *fileBuf, const std::shared_ptr &rt, - bool sameTranslationUnit, - QStrList & filesInSameTranslationUnit) + ClangTUParser *clangParser) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; initParser(yyscanner); @@ -7254,18 +7255,8 @@ static void parseMain(yyscan_t yyscanner, yyextra->yyBegLineNr = 1; yyextra->yyBegColNr = 0; yyextra->yyFileName = fileName; + yyextra->clangParser = clangParser; setContext(yyscanner); - if (Doxygen::clangAssistedParsing && (yyextra->insideCpp || yyextra->insideObjC)) - { - if (!sameTranslationUnit) // new file - { - ClangParser::instance()->start(fileName,filesInSameTranslationUnit); - } - else - { - ClangParser::instance()->switchToFile(fileName); - } - } rt->lang = yyextra->language; msg("Parsing file %s...\n",yyextra->yyFileName.data()); @@ -7402,33 +7393,17 @@ COutlineParser::~COutlineParser() scannerYYlex_destroy(p->yyscanner); } -void COutlineParser::startTranslationUnit(const char *) -{ -} - -void COutlineParser::finishTranslationUnit() -{ - struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner; - bool processWithClang = yyextra->insideCpp || yyextra->insideObjC; - if (processWithClang) - { - ClangParser::instance()->finish(); - } -} - void COutlineParser::parseInput(const char *fileName, const char *fileBuf, const std::shared_ptr &root, - bool sameTranslationUnit, - QStrList & filesInSameTranslationUnit) + ClangTUParser *clangParser) { struct yyguts_t *yyg = (struct yyguts_t*)p->yyscanner; yyextra->thisParser = this; printlex(yy_flex_debug, TRUE, __FILE__, fileName); - ::parseMain(p->yyscanner, fileName,fileBuf,root, - sameTranslationUnit,filesInSameTranslationUnit); + ::parseMain(p->yyscanner,fileName,fileBuf,root,clangParser); printlex(yy_flex_debug, FALSE, __FILE__, fileName); } diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 28a2028..5cc57ec 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -2942,10 +2942,8 @@ void VhdlDocGen::createFlowChart(const MemberDef *mdef) auto parser { Doxygen::parserManager->getOutlineParser(".vhd") }; VhdlDocGen::setFlowMember(mdef); std::shared_ptr root = std::make_shared(); - QStrList filesInSameTu; - parser->startTranslationUnit(""); - parser->parseInput("",codeFragment.data(),root,FALSE,filesInSameTu); - parser->finishTranslationUnit(); + StringVector filesInSameTu; + parser->parseInput("",codeFragment.data(),root,nullptr); } void VhdlDocGen::resetCodeVhdlParserState() diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp index aa566ae..9ad9e23 100644 --- a/src/vhdljjparser.cpp +++ b/src/vhdljjparser.cpp @@ -126,7 +126,7 @@ VHDLOutlineParser::~VHDLOutlineParser() } void VHDLOutlineParser::parseInput(const char *fileName,const char *fileBuf, - const std::shared_ptr &root, bool ,QStrList&) + const std::shared_ptr &root, ClangTUParser *) { VhdlParser::SharedState *s = &p->shared; p->thisParser=this; diff --git a/src/vhdljjparser.h b/src/vhdljjparser.h index 940631d..651221c 100755 --- a/src/vhdljjparser.h +++ b/src/vhdljjparser.h @@ -32,20 +32,17 @@ class VHDLOutlineParser : public OutlineParserInterface public: VHDLOutlineParser(); virtual ~VHDLOutlineParser(); - void startTranslationUnit(const char *) {} - void finishTranslationUnit() {} void parseInput(const char * fileName, const char *fileBuf, const std::shared_ptr &root, - bool sameTranslationUnit, - QStrList &filesInSameTranslationUnit); + ClangTUParser *clangParser); bool needsPreprocessing(const QCString &) const { return TRUE; } void parsePrototype(const char *text); // interface for generated parser code - + void setLineParsed(int tok); int getLine(int tok); int getLine(); -- cgit v0.12 From 9eaa0b08fc4a09cff8abbd4993b5c644ef6f6e9a Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 16 Jul 2020 19:13:37 +0200 Subject: Cleanup some disabled code sections --- src/clangparser.h | 49 ++----------------------------------------------- 1 file changed, 2 insertions(+), 47 deletions(-) diff --git a/src/clangparser.h b/src/clangparser.h index 07907a6..8ee1bdb 100644 --- a/src/clangparser.h +++ b/src/clangparser.h @@ -74,59 +74,14 @@ class ClangTUParser /** @brief Wrapper for to let libclang assisted parsing. */ class ClangParser { + friend class ClangTUParser; public: /** Returns the one and only instance of the class */ static ClangParser *instance(); - std::unique_ptr createTUParser(const FileDef *fd) const; - const clang::tooling::CompilationDatabase *database() const; - -#if 0 - /** Start parsing a file. - * @param[in] fileName The name of the file to parse. - * @param[in,out] filesInTranslationUnit Other files that are - * part of the input and included by the file. - * The function will return a subset of the files, - * only including the ones that were actually found - * during parsing. - */ - void start(const char *fileName,StringVector &filesInTranslationUnit); - - /** Switches to another file within the translation unit started - * with start(). - * @param[in] fileName The name of the file to switch to. - */ - void switchToFile(const char *fileName); - - /** Finishes parsing a translation unit. Free any resources that - * were needed for parsing. - */ - void finish(); - - /** Looks for \a symbol which should be found at \a line and - * returns a clang unique reference to the symbol. - */ - QCString lookup(uint line,const char *symbol); - - /** writes the syntax highlighted source code for a file - * @param[out] ol The output generator list to write to. - * @param[in] fd The file to write sources for. - */ - void writeSources(CodeOutputInterface &ol,FileDef *fd); -#endif private: -#if 0 - void linkIdentifier(CodeOutputInterface &ol,FileDef *fd, - uint &line,uint &column, - const char *text,int tokenIndex); - void linkMacro(CodeOutputInterface &ol,FileDef *fd, - uint &line,uint &column, - const char *text); - void linkInclude(CodeOutputInterface &ol,FileDef *fd, - uint &line,uint &column, - const char *text); -#endif + const clang::tooling::CompilationDatabase *database() const; class Private; std::unique_ptr p; ClangParser(); -- cgit v0.12 From 08686b4117ae8b0f8dc3711e169e3da3fa1fe8fc Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 16 Jul 2020 19:16:19 +0200 Subject: Restructured the split_and_keep function --- testing/runtests.py | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/testing/runtests.py b/testing/runtests.py index 129a781..6b3e54e 100755 --- a/testing/runtests.py +++ b/testing/runtests.py @@ -474,26 +474,13 @@ class TestManager: shutil.rmtree("dtd",ignore_errors=True) shutil.copytree(self.args.inputdir+"/dtd", "dtd") -def split_and_keep(s, sep): - if not s: return [] - - # Find replacement character that is not used in string - # i.e. just use the highest available character plus one - # Note: This fails if ord(max(s)) = 0x10FFFF (ValueError) - p=chr(ord(max(s))+1) - - retVal = [] - for val in s.replace(sep, p+sep).split(p): - vv = val.split(" ",1) - if ((len(vv) == 1) and not vv[0] == ''): - retVal += vv - if (len(vv) == 2): - vv[1] = vv[1].strip() - if ((len(vv) == 2) and not vv[1] == ''): - retVal += vv - if ((len(vv) == 2) and vv[1] == ''): - retVal += [vv[0]] - return retVal +def split_and_keep(s,sep): + s = s.replace(sep,'\0'+sep) # add token separator + s = s.split('\0') # split by null delimiter + s = [x.strip() for x in filter(None,s)] # strip and remove empty elements + s = [z.split(' ',1) for z in s] # split by first space + s = [i for ss in s for i in ss] # flatten the list + return s def main(): # argument handling -- cgit v0.12 From 8c02f1e963682edfebfd0da619c65112cf30448b Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 16 Jul 2020 19:25:44 +0200 Subject: issue #6846 Doxygen parsing global variable as function in certain cases (#7903) A parameter can only be present for a function, so we should test on the member being a function it as well. This fix is for the problem as reported by @tgpfeiffer --- src/memberdef.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 2b8bbbc..7d6acb5 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -4167,6 +4167,7 @@ void MemberDefImpl::warnIfUndocumentedParams() const if (!Config_getBool(EXTRACT_ALL) && Config_getBool(WARN_IF_UNDOCUMENTED) && Config_getBool(WARN_NO_PARAMDOC) && + isFunction() && !isDeleted() && !isReference() && !Doxygen::suppressDocWarnings) @@ -4179,7 +4180,7 @@ void MemberDefImpl::warnIfUndocumentedParams() const qPrint(qualifiedName())); } if (!m_impl->hasDocumentedReturnType && - isFunction() && hasDocumentation() && !returnType.isEmpty()) + hasDocumentation() && !returnType.isEmpty()) { warn_doc_error(getDefFileName(),getDefLine(), "return type of member %s is not documented", -- cgit v0.12 From 38e6d479a2fb624000521b93a384932997ffe16f Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 16 Jul 2020 20:06:07 +0200 Subject: Added missing stub code when use_libclang is disabled --- src/clangparser.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/clangparser.cpp b/src/clangparser.cpp index 2ca5998..d0ed573 100644 --- a/src/clangparser.cpp +++ b/src/clangparser.cpp @@ -894,34 +894,34 @@ std::unique_ptr ClangParser::createTUParser(const FileDef *fd) co //-------------------------------------------------------------------------- #else // use stubbed functionality in case libclang support is disabled. -void ClangParser::start(const char *,QStrList &) +void ClangTUParser::switchToFile(FileDef *fd) { } -void ClangParser::switchToFile(const char *) +void ClangTUParser::parse() { } -void ClangParser::finish() +QCString ClangTUParser::lookup(uint,const char *) { + return ""; } -QCString ClangParser::lookup(uint,const char *) +class ClangParser::Private { - return ""; -} +}; -void ClangParser::writeSources(CodeOutputInterface &,FileDef *) +ClangParser::ClangParser() : p(std::make_unique()) { } -ClangParser::ClangParser() +ClangParser::~ClangParser() { - p = NULL; } -ClangParser::~ClangParser() +std::unique_ptr ClangParser::createTUParser(const FileDef *) const { + return nullptr; } #endif -- cgit v0.12 From a65546058116b9a057ea382d971701b9d5f47551 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 17 Jul 2020 11:50:30 +0200 Subject: Unused variable in code (VHDL) Due to #7864 the variable p is unused (and getFlowMember is just an access function to a flowMember). --- src/vhdldocgen.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/vhdldocgen.cpp b/src/vhdldocgen.cpp index 7abf9fa..8e311b7 100644 --- a/src/vhdldocgen.cpp +++ b/src/vhdldocgen.cpp @@ -3636,7 +3636,6 @@ void FlowChart::writeFlowChart() #ifdef DEBUGFLOW printFlowTree(); #endif - const MemberDef *p=VhdlDocGen::getFlowMember(); if (!Config_getString(PLANTUML_JAR_PATH).isEmpty()) { -- cgit v0.12 From 327423e217337bf4e64515aba6cf78b9877bc165 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Fri, 17 Jul 2020 16:13:38 +0200 Subject: issue #7852, #7867, #7901: Changed the set of commands that effect ending a brief description --- src/commentscan.l | 296 +++++++++++++++++++++++----------------------- src/groupdef.cpp | 5 + testing/019/group__g1.xml | 2 +- testing/019/group__g2.xml | 2 +- testing/019/group__g3.xml | 2 +- testing/019_defgroup.c | 2 +- 6 files changed, 159 insertions(+), 150 deletions(-) diff --git a/src/commentscan.l b/src/commentscan.l index 12391cb..aa80028 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -145,156 +145,163 @@ static const char *stateToString(int state); typedef bool (*DocCmdFunc)(yyscan_t yyscanner,const QCString &name, const QCStringList &optList); +enum class CommandSpacing +{ + Invisible, // command sets some property but does not appear in the output. + Inline, // command appears inline in the output which can be a brief description. + Block // command starts a new paragraphs / ends a brief description. +}; + struct DocCmdMap { - DocCmdMap(DocCmdFunc h,bool b) : handler(h), endsBrief(b) {} + DocCmdMap(DocCmdFunc h,CommandSpacing s) : handler(h), spacing(s) {} DocCmdFunc handler; - bool endsBrief; + CommandSpacing spacing; }; // map of command to handler function 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 }}, - { "rtfinclude", { 0, FALSE }}, - { "docbookinclude", { 0, FALSE }}, - { "maninclude", { 0, FALSE }}, - { "xmlinclude", { 0, FALSE }} + // command name handler function command spacing + { "_linebr", { &handleLineBr, CommandSpacing::Inline }}, + { "addindex", { &handleAddIndex, CommandSpacing::Invisible }}, + { "addtogroup", { &handleAddToGroup, CommandSpacing::Invisible }}, + { "anchor", { &handleAnchor, CommandSpacing::Invisible }}, + { "arg", { 0, CommandSpacing::Block }}, + { "attention", { 0, CommandSpacing::Block }}, + { "author", { 0, CommandSpacing::Block }}, + { "authors", { 0, CommandSpacing::Block }}, + { "brief", { &handleBrief, CommandSpacing::Invisible }}, + { "bug", { &handleBug, CommandSpacing::Block }}, + { "callergraph", { &handleCallergraph, CommandSpacing::Invisible }}, + { "callgraph", { &handleCallgraph, CommandSpacing::Invisible }}, + { "category", { &handleCategory, CommandSpacing::Invisible }}, + { "cite", { &handleCite, CommandSpacing::Inline }}, + { "class", { &handleClass, CommandSpacing::Invisible }}, + { "code", { &handleFormatBlock, CommandSpacing::Block }}, + { "copybrief", { &handleCopyBrief, CommandSpacing::Invisible }}, + { "copydetails", { &handleCopyDetails, CommandSpacing::Block }}, + { "copydoc", { &handleCopyDoc, CommandSpacing::Block }}, + { "copyright", { 0, CommandSpacing::Block }}, + { "date", { 0, CommandSpacing::Block }}, + { "def", { &handleDef, CommandSpacing::Invisible }}, + { "defgroup", { &handleDefGroup, CommandSpacing::Invisible }}, + { "deprecated", { &handleDeprecated, CommandSpacing::Block }}, + { "details", { &handleDetails, CommandSpacing::Block }}, + { "dir", { &handleDir, CommandSpacing::Invisible }}, + { "docbookinclude", { 0, CommandSpacing::Inline }}, + { "docbookonly", { &handleFormatBlock, CommandSpacing::Invisible }}, + { "dot", { &handleFormatBlock, CommandSpacing::Block }}, + { "dotfile", { 0, CommandSpacing::Block }}, + { "else", { &handleElse, CommandSpacing::Inline }}, + { "elseif", { &handleElseIf, CommandSpacing::Inline }}, + { "endif", { &handleEndIf, CommandSpacing::Inline }}, + { "endparblock", { &handleEndParBlock, CommandSpacing::Block }}, + { "enum", { &handleEnum, CommandSpacing::Invisible }}, + { "example", { &handleExample, CommandSpacing::Invisible }}, + { "exception", { 0, CommandSpacing::Block }}, + { "extends", { &handleExtends, CommandSpacing::Invisible }}, + { "file", { &handleFile, CommandSpacing::Invisible }}, + { "fn", { &handleFn, CommandSpacing::Invisible }}, + { "headerfile", { &handleHeaderFile, CommandSpacing::Invisible }}, + { "hidecallergraph", { &handleHideCallergraph, CommandSpacing::Invisible }}, + { "hidecallgraph", { &handleHideCallgraph, CommandSpacing::Invisible }}, + { "hideinitializer", { &handleHideInitializer, CommandSpacing::Invisible }}, + { "hiderefby", { &handleHideReferencedByRelation, CommandSpacing::Invisible }}, + { "hiderefs", { &handleHideReferencesRelation, CommandSpacing::Invisible }}, + { "htmlinclude", { 0, CommandSpacing::Inline }}, + { "htmlonly", { &handleFormatBlock, CommandSpacing::Invisible }}, + { "idlexcept", { &handleIdlException, CommandSpacing::Invisible }}, + { "if", { &handleIf, CommandSpacing::Inline }}, + { "ifnot", { &handleIfNot, CommandSpacing::Inline }}, + { "image", { 0, CommandSpacing::Block }}, + { "implements", { &handleExtends, CommandSpacing::Invisible }}, + { "include", { 0, CommandSpacing::Block }}, + { "includelineno", { 0, CommandSpacing::Block }}, + { "ingroup", { &handleIngroup, CommandSpacing::Invisible }}, + { "inherit", { &handleInherit, CommandSpacing::Invisible }}, + { "interface", { &handleInterface, CommandSpacing::Invisible }}, + { "internal", { &handleInternal, CommandSpacing::Block }}, + { "invariant", { 0, CommandSpacing::Block }}, + { "latexinclude", { 0, CommandSpacing::Inline }}, + { "latexonly", { &handleFormatBlock, CommandSpacing::Invisible }}, + { "li", { 0, CommandSpacing::Block }}, + { "line", { 0, CommandSpacing::Invisible }}, + { "mainpage", { &handleMainpage, CommandSpacing::Invisible }}, + { "maninclude", { 0, CommandSpacing::Inline }}, + { "manonly", { &handleFormatBlock, CommandSpacing::Invisible }}, + { "memberof", { &handleMemberOf, CommandSpacing::Invisible }}, + { "msc", { &handleFormatBlock, CommandSpacing::Block }}, + { "name", { &handleName, CommandSpacing::Invisible }}, + { "namespace", { &handleNamespace, CommandSpacing::Invisible }}, + { "noop", { &handleNoop, CommandSpacing::Invisible }}, + { "nosubgrouping", { &handleNoSubGrouping, CommandSpacing::Invisible }}, + { "note", { 0, CommandSpacing::Block }}, + { "overload", { &handleOverload, CommandSpacing::Invisible }}, + { "package", { &handlePackage, CommandSpacing::Invisible }}, + { "page", { &handlePage, CommandSpacing::Invisible }}, + { "par", { 0, CommandSpacing::Block }}, + { "paragraph", { &handleSection, CommandSpacing::Block }}, + { "param", { &handleParam, CommandSpacing::Block }}, + { "parblock", { &handleParBlock, CommandSpacing::Block }}, + { "post", { 0, CommandSpacing::Block }}, + { "pre", { 0, CommandSpacing::Block }}, + { "private", { &handlePrivate, CommandSpacing::Invisible }}, + { "privatesection", { &handlePrivateSection, CommandSpacing::Invisible }}, + { "property", { &handleFn, CommandSpacing::Invisible }}, + { "protected", { &handleProtected, CommandSpacing::Invisible }}, + { "protectedsection",{ &handleProtectedSection, CommandSpacing::Invisible }}, + { "protocol", { &handleProtocol, CommandSpacing::Invisible }}, + { "public", { &handlePublic, CommandSpacing::Invisible }}, + { "publicsection", { &handlePublicSection, CommandSpacing::Invisible }}, + { "pure", { &handlePure, CommandSpacing::Invisible }}, + { "refitem", { &handleRefItem, CommandSpacing::Inline }}, + { "related", { &handleRelated, CommandSpacing::Invisible }}, + { "relatedalso", { &handleRelatedAlso, CommandSpacing::Invisible }}, + { "relates", { &handleRelated, CommandSpacing::Invisible }}, + { "relatesalso", { &handleRelatedAlso, CommandSpacing::Invisible }}, + { "remark", { 0, CommandSpacing::Block }}, + { "remarks", { 0, CommandSpacing::Block }}, + { "result", { 0, CommandSpacing::Block }}, + { "return", { 0, CommandSpacing::Block }}, + { "returns", { 0, CommandSpacing::Block }}, + { "retval", { &handleRetval, CommandSpacing::Block }}, + { "rtfinclude", { 0, CommandSpacing::Inline }}, + { "rtfonly", { &handleFormatBlock, CommandSpacing::Invisible }}, + { "sa", { 0, CommandSpacing::Block }}, + { "section", { &handleSection, CommandSpacing::Block }}, + { "see", { 0, CommandSpacing::Block }}, + { "short", { &handleBrief, CommandSpacing::Invisible }}, + { "showinitializer", { &handleShowInitializer, CommandSpacing::Invisible }}, + { "showrefby", { &handleReferencedByRelation, CommandSpacing::Invisible }}, + { "showrefs", { &handleReferencesRelation, CommandSpacing::Invisible }}, + { "since", { 0, CommandSpacing::Block }}, + { "snippet", { 0, CommandSpacing::Block }}, + { "snippetlineno", { 0, CommandSpacing::Block }}, + { "startuml", { &handleFormatBlock, CommandSpacing::Block }}, + { "static", { &handleStatic, CommandSpacing::Invisible }}, + { "struct", { &handleStruct, CommandSpacing::Invisible }}, + { "subpage", { &handleSubpage, CommandSpacing::Inline }}, + { "subsection", { &handleSection, CommandSpacing::Block }}, + { "subsubsection", { &handleSection, CommandSpacing::Block }}, + { "tableofcontents", { &handleToc, CommandSpacing::Invisible }}, + { "test", { &handleTest, CommandSpacing::Block }}, + { "throw", { 0, CommandSpacing::Block }}, + { "throws", { 0, CommandSpacing::Block }}, + { "todo", { &handleTodo, CommandSpacing::Block }}, + { "tparam", { 0, CommandSpacing::Block }}, + { "typedef", { &handleFn, CommandSpacing::Invisible }}, + { "union", { &handleUnion, CommandSpacing::Invisible }}, + { "until", { 0, CommandSpacing::Block }}, + { "var", { &handleFn, CommandSpacing::Invisible }}, + { "verbatim", { &handleFormatBlock, CommandSpacing::Block }}, + { "verbinclude", { 0, CommandSpacing::Inline }}, + { "version", { 0, CommandSpacing::Block }}, + { "warning", { 0, CommandSpacing::Block }}, + { "weakgroup", { &handleWeakGroup, CommandSpacing::Invisible }}, + { "xmlinclude", { 0, CommandSpacing::Inline }}, + { "xmlonly", { &handleFormatBlock, CommandSpacing::Invisible }}, + { "xrefitem", { &handleXRefItem, CommandSpacing::Block }} }; #define YY_NO_INPUT 1 @@ -665,7 +672,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" int i=0; while (yytext[i]==' ' || yytext[i]=='\t') i++; yyextra->spaceBeforeCmd = QCString(yytext).left(i); - if (it->second.endsBrief && !(yyextra->inContext==OutputXRef && cmdName=="parblock")) + if (it->second.spacing==CommandSpacing::Block && !(yyextra->inContext==OutputXRef && cmdName=="parblock")) { yyextra->briefEndsAtDot=FALSE; // this command forces the end of brief description @@ -1906,7 +1913,6 @@ static bool handleDefGroup(yyscan_t yyscanner,const QCString &, const QCStringLi 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; } @@ -2523,7 +2529,6 @@ static bool handleLineBr(yyscan_t yyscanner,const QCString &, const QCStringList static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; - endBrief(yyscanner); yyextra->current->stat = TRUE; return FALSE; } @@ -2531,7 +2536,6 @@ static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList static bool handlePure(yyscan_t yyscanner,const QCString &, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; - endBrief(yyscanner); yyextra->current->virt = Pure; return FALSE; } diff --git a/src/groupdef.cpp b/src/groupdef.cpp index e4cb180..9b33356 100644 --- a/src/groupdef.cpp +++ b/src/groupdef.cpp @@ -1207,6 +1207,11 @@ void GroupDefImpl::writeDocumentation(OutputList &ol) ol.pushGeneratorState(); ol.disableAllBut(OutputGenerator::Man); ol.endTitleHead(getOutputFileBase(),name()); + if (!m_title.isEmpty()) + { + ol.writeString(" - "); + ol.parseText(m_title); + } ol.popGeneratorState(); ol.endHeaderSection(); ol.startContents(); diff --git a/testing/019/group__g1.xml b/testing/019/group__g1.xml index d6807ca..d9ea16d 100644 --- a/testing/019/group__g1.xml +++ b/testing/019/group__g1.xml @@ -20,9 +20,9 @@ - Text for first group. + Text for first group.
      diff --git a/testing/019/group__g2.xml b/testing/019/group__g2.xml index 3514d89..9b1fc83 100644 --- a/testing/019/group__g2.xml +++ b/testing/019/group__g2.xml @@ -21,9 +21,9 @@ - Text for second group. + Text for second group. diff --git a/testing/019/group__g3.xml b/testing/019/group__g3.xml index 0f21232..d9137b0 100644 --- a/testing/019/group__g3.xml +++ b/testing/019/group__g3.xml @@ -34,9 +34,9 @@ - Text for third group. + Text for third group. diff --git a/testing/019_defgroup.c b/testing/019_defgroup.c index d42d63e..d7e440e 100644 --- a/testing/019_defgroup.c +++ b/testing/019_defgroup.c @@ -38,7 +38,7 @@ void func_g3(); /** \} */ /** \addtogroup g3 - * \{ + * \{ */ /** Another function added to the third group */ -- cgit v0.12 From 537131d27d40e2fa1f3fc55f45449f6604c9a055 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 18 Jul 2020 13:14:01 +0200 Subject: issue #7911 markdown table add extra test to "\copybrief" The comment speaks of: > // need at least one space on either side of the cell text in > // order for doxygen to do other formatting but in the implementation the end space is missing. Looks like the problem is introduced in version 1.8.17 when some work is done on the line counting (removing artificial `\n`). --- src/markdown.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/markdown.cpp b/src/markdown.cpp index 1a96d45..4f40f8d 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -1846,7 +1846,7 @@ int Markdown::writeTableBlock(const char *data,int size) } // need at least one space on either side of the cell text in // order for doxygen to do other formatting - m_out.addStr("> " + cellText + ""); + m_out.addStr("> " + cellText + " "); } cellTag = "td"; cellClass = "class=\"markdownTableBody"; -- cgit v0.12 From 7fa193cbc9476ad0c76196e99e26f25873502c5f Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 18 Jul 2020 14:06:04 +0200 Subject: issue #7867 Fixed regression where blank line after \class was not seen as paragraph separator --- src/commentscan.l | 970 +++++++++++++++++++++++++++--------------------------- 1 file changed, 494 insertions(+), 476 deletions(-) diff --git a/src/commentscan.l b/src/commentscan.l index aa80028..1923e4d 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -556,27 +556,27 @@ RCSTAG "$"{ID}":"[^\n$]+"$" * XML commands, */ -{CMD}{CMD}[a-z_A-Z]+{B}* { // escaped command - addOutput(yyscanner,yytext); - } +{CMD}{CMD}[a-z_A-Z]+{B}* { // escaped command + addOutput(yyscanner,yytext); + } {CMD}{CMD}"~"[a-z_A-Z]* { // escaped command - addOutput(yyscanner,yytext); - } -{MAILADDR} { // mail address - addOutput(yyscanner,yytext); - } + addOutput(yyscanner,yytext); + } +{MAILADDR} { // mail address + addOutput(yyscanner,yytext); + } "\""[^"\n]*"\"" { // quoted text addOutput(yyscanner,yytext); - } -("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!) - addOutput(yyscanner,yytext); - } -"<"{DETAILEDHTML}{ATTR}">" { // HTML command that ends a brief description + } +("\\"[a-z_A-Z]+)+"\\" { // directory (or chain of commands!) + addOutput(yyscanner,yytext); + } +"<"{DETAILEDHTML}{ATTR}">" { // HTML command that ends a brief description setOutput(yyscanner,OutputDoc); // continue with the same input REJECT; } -"<"{DETAILEDHTMLOPT}{ATTR}">" { // HTML command that ends a brief description +"<"{DETAILEDHTMLOPT}{ATTR}">" { // HTML command that ends a brief description if (yyextra->current->lang==SrcLangExt_CSharp) { setOutput(yyscanner,OutputDoc); @@ -584,24 +584,24 @@ RCSTAG "$"{ID}":"[^\n$]+"$" // continue with the same input REJECT; } -"" { // start of a .NET XML style brief description +"" { // start of a .NET XML style brief description setOutput(yyscanner,OutputBrief); addOutput(yyscanner,yytext); - } + } "" { // start of a .NET XML style detailed description setOutput(yyscanner,OutputDoc); addOutput(yyscanner,yytext); - } -"" { // start of a .NET XML style detailed description + } +"" { // start of a .NET XML style detailed description setOutput(yyscanner,OutputBrief); addOutput(yyscanner,yytext); setOutput(yyscanner,OutputDoc); - } -"" { // end of a brief or detailed description + } +"" { // end of a brief or detailed description setOutput(yyscanner,OutputDoc); addOutput(yyscanner,yytext); - } + } "<"{CAPTION}{ATTR}">" { QCString tag=yytext; int s=tag.find("id="); @@ -638,14 +638,14 @@ RCSTAG "$"{ID}":"[^\n$]+"$" "{B}*{CMD}"endinternal"{B}* { +{B}*{CMD}"endinternal"{B}* { addOutput(yyscanner," \\endinternal "); if (!yyextra->inInternalDocs) warn(yyextra->fileName,yyextra->lineNr, "found \\endinternal without matching \\internal" ); yyextra->inInternalDocs = FALSE; - } + } {B}*{CMD}[a-z_A-Z]+"{"[a-zA-Z_,:0-9\. ]*"}"{B}* | {B}*{CMD}[a-z_A-Z]+{B}* { // potentially interesting command // the {B}* in the front was added for bug620924 @@ -663,8 +663,8 @@ RCSTAG "$"{ID}":"[^\n$]+"$" else // options present { cmdName = fullMatch.left(idx).stripWhiteSpace().data()+1; // to remove {CMD} - QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace(); - optList = QCStringList::split(',',optStr); + QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace(); + optList = QCStringList::split(',',optStr); } auto it = docCmdMap.find(cmdName.data()); if (it!=docCmdMap.end()) // special action is required @@ -708,18 +708,18 @@ RCSTAG "$"{ID}":"[^\n$]+"$" { addOutput(yyscanner,yytext); } - } -{B}*({CMD}{CMD})"f"[$\[{] { // escaped formula command - addOutput(yyscanner,yytext); - } -{B}*{CMD}"~"[a-z_A-Z-]* { // language switch command + } +{B}*({CMD}{CMD})"f"[$\[{] { // escaped formula command + addOutput(yyscanner,yytext); + } +{B}*{CMD}"~"[a-z_A-Z-]* { // language switch command QCString langId = QCString(yytext).stripWhiteSpace().data()+2; - if (!langId.isEmpty() && + if (!langId.isEmpty() && qstricmp(Config_getEnum(OUTPUT_LANGUAGE),langId)!=0) { // enable language specific section BEGIN(SkipLang); } - } + } {B}*{CMD}"f{"[^}\n]+"}"("{"?) { // start of a formula with custom environment setOutput(yyscanner,OutputDoc); yyextra->formulaText="\\begin"; @@ -732,18 +732,18 @@ RCSTAG "$"{ID}":"[^\n$]+"$" yyextra->formulaText+=yyextra->formulaEnv; yyextra->formulaNewLines=0; BEGIN(ReadFormulaLong); - } -{B}*{CMD}"f$" { // start of a inline formula + } +{B}*{CMD}"f$" { // start of a inline formula yyextra->formulaText="$"; yyextra->formulaNewLines=0; BEGIN(ReadFormulaShort); - } -{B}*{CMD}"f[" { // start of a block formula + } +{B}*{CMD}"f[" { // start of a block formula setOutput(yyscanner,OutputDoc); yyextra->formulaText="\\["; yyextra->formulaNewLines=0; BEGIN(ReadFormulaLong); - } + } {B}*{CMD}"{" { // begin of a group //yyextra->langParser->handleGroupStartCommand(yyextra->memberGroupHeader); yyextra->docGroup.open(yyextra->current,yyextra->fileName,yyextra->lineNr); @@ -761,17 +761,17 @@ RCSTAG "$"{ID}":"[^\n$]+"$" #endif yyterminate(); } -{B}*{CMD}[$@\\&~<>#%] { // escaped character - addOutput(yyscanner,yytext); - } -[a-z_A-Z]+ { // normal word +{B}*{CMD}[$@\\&~<>#%] { // escaped character addOutput(yyscanner,yytext); - } + } +[a-z_A-Z]+ { // normal word + addOutput(yyscanner,yytext); + } ^{B}*"."{B}*/\n { // explicit end autolist: e.g " ." addOutput(yyscanner,yytext); } ^{B}*[1-9][0-9]*"."{B}+ | -^{B}*[*+]{B}+ { // start of autolist +^{B}*[*+]{B}+ { // start of autolist if (!yyextra->markdownSupport) { REJECT; @@ -792,8 +792,8 @@ RCSTAG "$"{ID}":"[^\n$]+"$" yyextra->briefEndsAtDot=FALSE; setOutput(yyscanner,OutputDoc); } - addOutput(yyscanner,yytext); - } + addOutput(yyscanner,yytext); + } ^{B}*([\-:|]{B}*)*("--"|"---")({B}*[\-:|])*{B}*/\n { // horizontal line (dashed) addOutput(yyscanner,yytext); } @@ -817,23 +817,23 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } addOutput(yyscanner,yytext); } -("."+)[a-z_A-Z0-9\)] { // . at start or in the middle of a word, or ellipsis - addOutput(yyscanner,yytext); - } -".\\"[ \t] { // . with escaped space. - addOutput(yyscanner,yytext[0]); - addOutput(yyscanner,yytext[2]); - } -".," { // . with comma such as "e.g.," - addOutput(yyscanner,yytext); - } -"...\\"[ \t] { // ellipsis with escaped space. - addOutput(yyscanner,"... "); - } -".."[\.]?/[^ \t\n] { // internal ellipsis - addOutput(yyscanner,yytext); - } -(\n|\\_linebr)({B}*(\n|\\_linebr))+ { // at least one blank line (or blank line command) +("."+)[a-z_A-Z0-9\)] { // . at start or in the middle of a word, or ellipsis + addOutput(yyscanner,yytext); + } +".\\"[ \t] { // . with escaped space. + addOutput(yyscanner,yytext[0]); + addOutput(yyscanner,yytext[2]); + } +".," { // . with comma such as "e.g.," + addOutput(yyscanner,yytext); + } +"...\\"[ \t] { // ellipsis with escaped space. + addOutput(yyscanner,"... "); + } +".."[\.]?/[^ \t\n] { // internal ellipsis + addOutput(yyscanner,yytext); + } +(\n|\\_linebr)({B}*(\n|\\_linebr))+ { // at least one blank line (or blank line command) if (yyextra->inContext==OutputXRef) { // see bug 613024, we need to put the newlines after ending the XRef section. @@ -862,35 +862,35 @@ RCSTAG "$"{ID}":"[^\n$]+"$" // found some brief description and not just whitespace endBrief(yyscanner,FALSE); } - lineCount(yyscanner); - } -"." { // potential end of a JavaDoc style comment - addOutput(yyscanner,*yytext); - if (yyextra->briefEndsAtDot) + lineCount(yyscanner); + } +"." { // potential end of a JavaDoc style comment + addOutput(yyscanner,*yytext); + if (yyextra->briefEndsAtDot) { setOutput(yyscanner,OutputDoc); yyextra->briefEndsAtDot=FALSE; } - } -\n { // newline - addOutput(yyscanner,*yytext); - yyextra->lineNr++; - } -. { // catch-all for anything else - addOutput(yyscanner,*yytext); - } + } +\n { // newline + addOutput(yyscanner,*yytext); + yyextra->lineNr++; + } +. { // catch-all for anything else + addOutput(yyscanner,*yytext); + } /* -------------- Rules for handling HTML comments ----------- */ -"--"[!]?">"{B}* { BEGIN( Comment ); } -{DOCNL} { - if (*yytext=='\n') yyextra->lineNr++; - } -[^\\\n\-]+ { // ignore unimportant characters - } -. { // ignore every else - } +"--"[!]?">"{B}* { BEGIN( Comment ); } +{DOCNL} { + if (*yytext=='\n') yyextra->lineNr++; + } +[^\\\n\-]+ { // ignore unimportant characters + } +. { // ignore every else + } "\]\]>" { BEGIN( Comment ); @@ -912,26 +912,26 @@ RCSTAG "$"{ID}":"[^\n$]+"$" /* -------------- Rules for handling formulas ---------------- */ -{CMD}"f$" { // end of inline formula - yyextra->formulaText+="$"; +{CMD}"f$" { // end of inline formula + yyextra->formulaText+="$"; addOutput(yyscanner," "+addFormula(yyscanner)); BEGIN(Comment); - } -{CMD}"f]" { // end of block formula + } +{CMD}"f]" { // end of block formula yyextra->formulaText+="\\]"; addOutput(yyscanner," "+addFormula(yyscanner)); BEGIN(Comment); - } -{CMD}"f}" { // end of custom env formula + } +{CMD}"f}" { // end of custom env formula yyextra->formulaText+="\\end"; yyextra->formulaText+=yyextra->formulaEnv; addOutput(yyscanner," "+addFormula(yyscanner)); BEGIN(Comment); - } + } [^\\@\n]+ { // any non-special character yyextra->formulaText+=yytext; - } -\n { // new line + } +\n { // new line yyextra->formulaNewLines++; yyextra->formulaText+=*yytext; yyextra->lineNr++; @@ -942,77 +942,80 @@ RCSTAG "$"{ID}":"[^\n$]+"$" /* ------------ handle argument of enum command --------------- */ -{SCOPEID} { // handle argument - yyextra->current->name = yytext; +{SCOPEID} { // handle argument + yyextra->current->name = yytext; BEGIN( Comment ); - } -{LC} { // line continuation - yyextra->lineNr++; + } +{LC} { // line continuation + yyextra->lineNr++; addOutput(yyscanner,'\n'); } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "missing argument after \\enum." ); - addOutput(yyscanner,'\n'); - if (*yytext=='\n') yyextra->lineNr++; + unput('\n'); + //addOutput(yyscanner,'\n'); + //if (*yytext=='\n') yyextra->lineNr++; BEGIN( Comment ); - } -. { // ignore other stuff - } + } +. { // ignore other stuff + } /* ------------ handle argument of namespace command --------------- */ -{SCOPENAME} { // handle argument - yyextra->current->name = substitute(yytext,".","::"); +{SCOPENAME} { // handle argument + yyextra->current->name = substitute(yytext,".","::"); BEGIN( Comment ); - } -{LC} { // line continuation + } +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "missing argument after " "\\namespace." ); - addOutput(yyscanner,'\n'); - if (*yytext=='\n') yyextra->lineNr++; + unput('\n'); + //addOutput(yyscanner,'\n'); + //if (*yytext=='\n') yyextra->lineNr++; BEGIN( Comment ); - } -. { // ignore other stuff - } + } +. { // ignore other stuff + } /* ------------ handle argument of package command --------------- */ -{ID}("."{ID})* { // handle argument - yyextra->current->name = yytext; +{ID}("."{ID})* { // handle argument + yyextra->current->name = yytext; BEGIN( Comment ); - } -{LC} { // line continuation + } +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "missing argument after " "\\package." ); - addOutput(yyscanner,'\n'); - if (*yytext=='\n') yyextra->lineNr++; + unput('\n'); + //addOutput(yyscanner,'\n'); + //if (*yytext=='\n') yyextra->lineNr++; BEGIN( Comment ); - } -. { // ignore other stuff - } + } +. { // ignore other stuff + } /* ------ handle argument of class/struct/union command --------------- */ {SCOPENAME}{TMPLSPEC} { - yyextra->current->name = substitute(removeRedundantWhiteSpace(yytext),".","::"); + yyextra->current->name = substitute(removeRedundantWhiteSpace(yytext),".","::"); BEGIN( ClassDocArg2 ); } -{SCOPENAME} { // first argument - yyextra->current->name = substitute(yytext,".","::"); +{SCOPENAME} { // first argument + yyextra->current->name = substitute(yytext,".","::"); if (yyextra->current->section==Entry::PROTOCOLDOC_SEC) { yyextra->current->name+="-p"; @@ -1021,94 +1024,98 @@ RCSTAG "$"{ID}":"[^\n$]+"$" BEGIN( ClassDocArg2 ); } {SCOPENAME}{B}*"("[^\)]+")" { - yyextra->current->name = substitute(yytext,".","::"); + yyextra->current->name = substitute(yytext,".","::"); BEGIN( ClassDocArg2 ); - } + } {LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); } -{DOCNL} { - warn(yyextra->fileName,yyextra->lineNr, +{DOCNL} { + warn(yyextra->fileName,yyextra->lineNr, "missing argument after " "\\%s.",YY_START==ClassDocArg1?"class":"category" ); - addOutput(yyscanner,'\n'); - if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); + //if (*yytext=='\n') yyextra->lineNr++; + unput('\n'); BEGIN( Comment ); - } -. { // ignore other stuff - } + } +. { // ignore other stuff + } -{FILE}|"<>" { // second argument; include file +{FILE}|"<>" { // second argument; include file yyextra->current->includeFile = yytext; BEGIN( ClassDocArg3 ); } -{LC} { // line continuation +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); } -{DOCNL} { - addOutput(yyscanner,'\n'); - if (*yytext=='\n') yyextra->lineNr++; +{DOCNL} { + //addOutput(yyscanner,'\n'); + //if (*yytext=='\n') yyextra->lineNr++; + unput('\n'); BEGIN( Comment ); } -. { // ignore other stuff - } +. { // ignore other stuff + } -[<"]?{FILE}?[">]? { // third argument; include file name - yyextra->current->includeName = yytext; +[<"]?{FILE}?[">]? { // third argument; include file name + yyextra->current->includeName = yytext; BEGIN( Comment ); } -{LC} { // line continuation +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); } -{DOCNL} { - if (*yytext=='\n') yyextra->lineNr++; - BEGIN( Comment ); +{DOCNL} { + //if (*yytext=='\n') yyextra->lineNr++; + unput('\n'); + BEGIN( Comment ); + } +. { // ignore other stuff } -. { // ignore other stuff - } /* --------- handle arguments of {def,add,weak}group commands --------- */ -{LABELID}(".html"?) { // group name - yyextra->current->name = yytext; +{LABELID}(".html"?) { // group name + yyextra->current->name = yytext; //lastDefGroup.groupname = yytext; //lastDefGroup.pri = yyextra->current->groupingPri(); - // the .html stuff is for Qt compatibility + // the .html stuff is for Qt compatibility if (yyextra->current->name.right(5)==".html") { yyextra->current->name=yyextra->current->name.left(yyextra->current->name.length()-5); } yyextra->current->type.resize(0); BEGIN(GroupDocArg2); - } -"\\"{B}*"\n" { // line continuation - yyextra->lineNr++; + } +"\\"{B}*"\n" { // line continuation + yyextra->lineNr++; addOutput(yyscanner,'\n'); } -{DOCNL} { // missing argument! - warn(yyextra->fileName,yyextra->lineNr, +{DOCNL} { // missing argument! + warn(yyextra->fileName,yyextra->lineNr, "missing group name after %s", yyextra->current->groupDocCmd() ); - addOutput(yyscanner,'\n'); - if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); + //if (*yytext=='\n') yyextra->lineNr++; + unput('\n'); BEGIN( Comment ); - } -. { // ignore other stuff - } -"\\"{B}*"\n" { // line continuation - yyextra->lineNr++; + } +. { // ignore other stuff + } +"\\"{B}*"\n" { // line continuation + yyextra->lineNr++; addOutput(yyscanner,'\n'); } -[^\n\\]+ { // title (stored in type) +[^\n\\]+ { // title (stored in type) yyextra->current->type += yytext; yyextra->current->type = yyextra->current->type.stripWhiteSpace(); } -{DOCNL} { +{DOCNL} { if ( yyextra->current->groupDocType==Entry::GROUPDOC_NORMAL && yyextra->current->type.isEmpty() ) // defgroup requires second argument @@ -1118,10 +1125,11 @@ RCSTAG "$"{ID}":"[^\n$]+"$" "\\defgroup %s", yyextra->current->name.data() ); } - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); + unput('\n'); + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); BEGIN( Comment ); - } + } . { // title (stored in type) yyextra->current->type += yytext; yyextra->current->type = yyextra->current->type.stripWhiteSpace(); @@ -1129,38 +1137,40 @@ RCSTAG "$"{ID}":"[^\n$]+"$" /* --------- handle arguments of page/mainpage command ------------------- */ -{FILE} { // first argument; page name +{FILE} { // first argument; page name yyextra->current->name = stripQuotes(yytext); yyextra->current->args = ""; BEGIN( PageDocArg2 ); } -{LC} { yyextra->lineNr++; +{LC} { yyextra->lineNr++; addOutput(yyscanner,'\n'); } -{DOCNL} { +{DOCNL} { warn(yyextra->fileName,yyextra->lineNr, "missing argument after " "\\page." ); - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); + unput('\n'); + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); BEGIN( Comment ); - } -. { // ignore other stuff - } -{DOCNL} { // second argument; page title - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); + } +. { // ignore other stuff + } +{DOCNL} { // second argument; page title + unput('\n'); + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); BEGIN( Comment ); } -{CMD}[<>] { +{CMD}[<>] { // bug 748927 QCString tmp = yytext; tmp = substitute(substitute(tmp,"@<","<"),"@>",">"); tmp = substitute(substitute(tmp,"\\<","<"),"\\>",">"); yyextra->current->args += tmp; } -. { +. { yyextra->current->args += yytext; } /* --------- handle arguments of the param command ------------ */ @@ -1181,262 +1191,265 @@ RCSTAG "$"{ID}":"[^\n$]+"$" /* --------- handle arguments of the file/dir/example command ------------ */ -{DOCNL} { // no file name specified - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); +{DOCNL} { // no file name specified + unput('\n'); + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); BEGIN( Comment ); } -{FILE} { // first argument; name - yyextra->current->name = stripQuotes(yytext); +{FILE} { // first argument; name + yyextra->current->name = stripQuotes(yytext); BEGIN( Comment ); - } -{LC} { yyextra->lineNr++; + } +{LC} { yyextra->lineNr++; addOutput(yyscanner,'\n'); } -. { // ignore other stuff - } +. { // ignore other stuff + } /* --------- handle arguments of the xrefitem command ------------ */ -{LABELID} { // first argument - yyextra->newXRefItemKey=yytext; +{LABELID} { // first argument + yyextra->newXRefItemKey=yytext; setOutput(yyscanner,OutputXRef); BEGIN(XRefItemParam2); } -{LC} { // line continuation +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); } -{DOCNL} { // missing arguments - warn(yyextra->fileName,yyextra->lineNr, +{DOCNL} { // missing arguments + warn(yyextra->fileName,yyextra->lineNr, "Missing first argument of \\xrefitem" ); - if (*yytext=='\n') yyextra->lineNr++; + if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); yyextra->inContext = OutputDoc; BEGIN( Comment ); - } -. { // ignore other stuff - } + } +. { // ignore other stuff + } "\""[^\n\"]*"\"" { // second argument - yyextra->xrefItemTitle = stripQuotes(yytext); + yyextra->xrefItemTitle = stripQuotes(yytext); BEGIN(XRefItemParam3); - } -{LC} { // line continuation + } +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); - } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, + } +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "Missing second argument of \\xrefitem" ); - if (*yytext=='\n') yyextra->lineNr++; + if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); yyextra->inContext = OutputDoc; BEGIN( Comment ); - } -. { // ignore other stuff - } + } +. { // ignore other stuff + } "\""[^\n\"]*"\"" { // third argument - yyextra->xrefListTitle = stripQuotes(yytext); + yyextra->xrefListTitle = stripQuotes(yytext); yyextra->xrefKind = XRef_Item; BEGIN( Comment ); - } -{LC} { // line continuation + } +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); - } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, + } +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "Missing third argument of \\xrefitem" ); - if (*yytext=='\n') yyextra->lineNr++; + if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); yyextra->inContext = OutputDoc; BEGIN( Comment ); - } -. { // ignore other stuff - } + } +. { // ignore other stuff + } /* ----- handle arguments of the relates(also)/memberof command ------- */ -({ID}("::"|"."))*{ID} { // argument - yyextra->current->relates = yytext; +({ID}("::"|"."))*{ID} { // argument + yyextra->current->relates = yytext; //if (yyextra->current->mGrpId!=DOX_NOGROUP) //{ // memberGroupRelates = yytext; //} BEGIN( Comment ); } -{LC} { // line continuation +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); - } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, + } +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "Missing argument of \\relates or \\memberof command" ); - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); + unput('\n'); + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); BEGIN( Comment ); - } + } . { // ignore other stuff - } + } /* ----- handle arguments of the relates(also)/addindex commands ----- */ -{DOCNL} { // end of argument - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); +{DOCNL} { // end of argument + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); + unput('\n'); BEGIN( Comment ); - } -{LC} { // line continuation + } +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); - } -. { // ignore other stuff - addOutput(yyscanner,*yytext); - } + } +. { // ignore other stuff + addOutput(yyscanner,*yytext); + } /* ----- handle arguments of the section/subsection/.. commands ------- */ -{LABELID} { // first argument - yyextra->sectionLabel=yytext; +{LABELID} { // first argument + yyextra->sectionLabel=yytext; addOutput(yyscanner,yytext); yyextra->sectionTitle.resize(0); BEGIN(SectionTitle); - } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, + } +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "\\section command has no label" ); - if (*yytext=='\n') yyextra->lineNr++; + if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); BEGIN( Comment ); - } -. { // invalid character for section label - warn(yyextra->fileName,yyextra->lineNr, + } +. { // invalid character for section label + warn(yyextra->fileName,yyextra->lineNr, "Invalid or missing section label" ); BEGIN(Comment); - } + } [^\n@\\*]*/"\n" { // end of section title - addSection(yyscanner); + addSection(yyscanner); addOutput(yyscanner,yytext); BEGIN( Comment ); - } + } [^\n@\\]*/"\\_linebr" { // end of section title - addSection(yyscanner); + addSection(yyscanner); addOutput(yyscanner,yytext); BEGIN( Comment ); - } -{LC} { // line continuation + } +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); - } -[^\n@\\]* { // any character without special meaning - yyextra->sectionTitle+=yytext; + } +[^\n@\\]* { // any character without special meaning + yyextra->sectionTitle+=yytext; addOutput(yyscanner,yytext); - } -({CMD}{CMD}){ID} { // unescape escaped command - yyextra->sectionTitle+=&yytext[1]; + } +({CMD}{CMD}){ID} { // unescape escaped command + yyextra->sectionTitle+=&yytext[1]; addOutput(yyscanner,yytext); - } -{CMD}[$@\\&~<>#%] { // unescape escaped character - yyextra->sectionTitle+=yytext[1]; - addOutput(yyscanner,yytext); - } -. { // anything else - yyextra->sectionTitle+=yytext; + } +{CMD}[$@\\&~<>#%] { // unescape escaped character + yyextra->sectionTitle+=yytext[1]; + addOutput(yyscanner,yytext); + } +. { // anything else + yyextra->sectionTitle+=yytext; addOutput(yyscanner,*yytext); - } + } /* ----- handle arguments of the subpage command ------- */ -{LABELID} { // first argument +{LABELID} { // first argument addOutput(yyscanner,yytext); // we add subpage labels as a kind of "inheritance" relation to prevent // needing to add another list to the Entry class. yyextra->current->extends.push_back(BaseInfo(yytext,Public,Normal)); BEGIN(SubpageTitle); - } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, + } +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "\\subpage command has no label" ); - if (*yytext=='\n') yyextra->lineNr++; + if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); BEGIN( Comment ); - } -{DOCNL} { // no title, end command - addOutput(yyscanner,yytext); + } +{DOCNL} { // no title, end command + addOutput(yyscanner,yytext); BEGIN( Comment ); - } -[ \t]*"\""[^\"\n]*"\"" { // add title, end of command - addOutput(yyscanner,yytext); + } +[ \t]*"\""[^\"\n]*"\"" { // add title, end of command + addOutput(yyscanner,yytext); BEGIN( Comment ); - } -. { // no title, end of command - unput(*yytext); + } +. { // no title, end of command + unput(*yytext); BEGIN( Comment ); - } + } /* ----- handle arguments of the anchor command ------- */ -{LABELID} { // found argument +{LABELID} { // found argument addAnchor(yyscanner,yytext); addOutput(yyscanner,yytext); BEGIN( Comment ); - } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, + } +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "\\anchor command has no label" ); - if (*yytext=='\n') yyextra->lineNr++; + if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); BEGIN( Comment ); - } -. { // invalid character for anchor label - warn(yyextra->fileName,yyextra->lineNr, + } +. { // invalid character for anchor label + warn(yyextra->fileName,yyextra->lineNr, "Invalid or missing anchor label" ); BEGIN(Comment); - } + } /* ----- handle arguments of the preformatted block commands ------- */ {CMD}("endverbatim"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endrtfonly"|"endmanonly"|"enddot"|"endcode"|"endmsc"|"endvhdlflow")/{NW} { // possible ends - addOutput(yyscanner,yytext); + addOutput(yyscanner,yytext); if (&yytext[4]==yyextra->blockName) // found end of the block { BEGIN(Comment); } - } + } {CMD}"enduml" { - addOutput(yyscanner,yytext); + addOutput(yyscanner,yytext); if (yyextra->blockName=="startuml") // found end of the block { BEGIN(Comment); } } -[^ \@\*\/\\\n]* { // some word - addOutput(yyscanner,yytext); - } -{DOCNL} { // new line - if (*yytext=='\n') yyextra->lineNr++; +[^ \@\*\/\\\n]* { // some word + addOutput(yyscanner,yytext); + } +{DOCNL} { // new line + if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); - } -"/*" { // start of a C-comment + } +"/*" { // start of a C-comment if (!(yyextra->blockName=="code" || yyextra->blockName=="verbatim")) yyextra->commentCount++; - addOutput(yyscanner,yytext); - } -"*/" { // end of a C-comment - addOutput(yyscanner,yytext); + addOutput(yyscanner,yytext); + } +"*/" { // end of a C-comment + addOutput(yyscanner,yytext); if (!(yyextra->blockName=="code" || yyextra->blockName=="verbatim")) { yyextra->commentCount--; @@ -1445,12 +1458,12 @@ RCSTAG "$"{ID}":"[^\n$]+"$" 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()); } - } - } -. { - addOutput(yyscanner,*yytext); } -<> { + } +. { + addOutput(yyscanner,*yytext); + } +<> { QCString endTag = "end"+yyextra->blockName; if (yyextra->blockName=="startuml") endTag="enduml"; warn(yyextra->fileName,yyextra->lineNr, @@ -1458,11 +1471,11 @@ RCSTAG "$"{ID}":"[^\n$]+"$" yyextra->blockName.data(),endTag.data() ); yyterminate(); - } + } /* ----- handle arguments of if/ifnot commands ------- */ -{B}*"(" { +{B}*"(" { yyextra->guardExpr=yytext; yyextra->roundCount=1; BEGIN(GuardExpr); @@ -1488,52 +1501,52 @@ RCSTAG "$"{ID}":"[^\n$]+"$" unput(*yytext); BEGIN(GuardParam); } -{B}*[a-z_A-Z0-9.\-]+ { // parameter of if/ifnot yyextra->guards +{B}*[a-z_A-Z0-9.\-]+ { // parameter of if/ifnot yyextra->guards handleGuard(yyscanner,yytext); - } -{DOCNL} { // end of argument - if (*yytext=='\n') yyextra->lineNr++; + } +{DOCNL} { // end of argument + if (*yytext=='\n') yyextra->lineNr++; //next line is commented out due to bug620924 //addOutput(yyscanner,'\n'); BEGIN( Comment ); - } + } {LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); - } -. { // ignore other stuff - addOutput(yyscanner,*yytext); - } -{B}*{DOCNL} { - lineCount(yyscanner); - yyextra->spaceBeforeIf.resize(0); - BEGIN(Comment); - } -{B}* { - if (!yyextra->spaceBeforeIf.isEmpty()) // needed for 665313 in combination with bug620924 + } +. { // ignore other stuff + addOutput(yyscanner,*yytext); + } +{B}*{DOCNL} { + lineCount(yyscanner); + yyextra->spaceBeforeIf.resize(0); + BEGIN(Comment); + } +{B}* { + if (!yyextra->spaceBeforeIf.isEmpty()) // needed for 665313 in combination with bug620924 { addOutput(yyscanner,yyextra->spaceBeforeIf); } - yyextra->spaceBeforeIf.resize(0); - BEGIN(Comment); - } + yyextra->spaceBeforeIf.resize(0); + BEGIN(Comment); + } . { - unput(*yytext); - BEGIN(Comment); - } + unput(*yytext); + BEGIN(Comment); + } /* ----- handle skipping of conditional sections ------- */ -{CMD}"ifnot"/{NW} { +{CMD}"ifnot"/{NW} { yyextra->guardType = Guard_IfNot; - BEGIN( GuardParam ); - } -{CMD}"if"/{NW} { + BEGIN( GuardParam ); + } +{CMD}"if"/{NW} { yyextra->guardType = Guard_If; - BEGIN( GuardParam ); - } -{CMD}"endif"/{NW} { - if (yyextra->guards.empty()) + BEGIN( GuardParam ); + } +{CMD}"endif"/{NW} { + if (yyextra->guards.empty()) { warn(yyextra->fileName,yyextra->lineNr, "found \\endif without matching start command"); @@ -1549,9 +1562,9 @@ RCSTAG "$"{ID}":"[^\n$]+"$" BEGIN( GuardParamEnd ); } } - } -{CMD}"else"/{NW} { - if (yyextra->guards.empty()) + } +{CMD}"else"/{NW} { + if (yyextra->guards.empty()) { warn(yyextra->fileName,yyextra->lineNr, "found \\else without matching start command"); @@ -1566,9 +1579,9 @@ RCSTAG "$"{ID}":"[^\n$]+"$" BEGIN( GuardParamEnd ); } } - } + } {CMD}"elseif"/{NW} { - if (yyextra->guards.empty()) + if (yyextra->guards.empty()) { warn(yyextra->fileName,yyextra->lineNr, "found \\elseif without matching start command"); @@ -1582,162 +1595,165 @@ RCSTAG "$"{ID}":"[^\n$]+"$" BEGIN( GuardParam ); } } - } -{DOCNL} { // skip line - if (*yytext=='\n') yyextra->lineNr++; + } +{DOCNL} { // skip line + if (*yytext=='\n') yyextra->lineNr++; //addOutput(yyscanner,'\n'); - } -[^ \\@\n]+ { // skip non-special characters - } -. { // any other character - } + } +[^ \\@\n]+ { // skip non-special characters + } +. { // any other character + } /* ----- handle skipping of internal section ------- */ -{DOCNL} { // skip line - if (*yytext=='\n') yyextra->lineNr++; +{DOCNL} { // skip line + if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); - } -[@\\]"if"/[ \t] { + } +[@\\]"if"/[ \t] { yyextra->condCount++; } [@\\]"ifnot"/[ \t] { yyextra->condCount++; - } -[@\\]/"endif" { + } +[@\\]/"endif" { yyextra->condCount--; if (yyextra->condCount<0) // handle conditional section around of \internal, see bug607743 { unput('\\'); BEGIN(Comment); } - } -[@\\]/"section"[ \t] { - if (yyextra->sectionLevel>0) + } +[@\\]/"section"[ \t] { + if (yyextra->sectionLevel>0) { unput('\\'); BEGIN(Comment); } - } -[@\\]/"subsection"[ \t] { - if (yyextra->sectionLevel>1) + } +[@\\]/"subsection"[ \t] { + if (yyextra->sectionLevel>1) { unput('\\'); BEGIN(Comment); } - } -[@\\]/"subsubsection"[ \t] { - if (yyextra->sectionLevel>2) + } +[@\\]/"subsubsection"[ \t] { + if (yyextra->sectionLevel>2) { unput('\\'); BEGIN(Comment); } - } -[@\\]/"paragraph"[ \t] { - if (yyextra->sectionLevel>3) + } +[@\\]/"paragraph"[ \t] { + if (yyextra->sectionLevel>3) { unput('\\'); BEGIN(Comment); } - } + } [@\\]"endinternal"[ \t]* { BEGIN(Comment); } [^ \\@\n]+ { // skip non-special characters - } -. { // any other character - } + } +. { // any other character + } /* ----- handle argument of name command ------- */ -{DOCNL} { // end of argument - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); +{DOCNL} { // end of argument + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); + unput('\n'); BEGIN( Comment ); - } -{LC} { // line continuation + } +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); yyextra->docGroup.appendHeader(' '); - } -. { // ignore other stuff + } +. { // ignore other stuff yyextra->docGroup.appendHeader(*yytext); yyextra->current->name+=*yytext; - } + } /* ----- handle argument of noop command ------- */ -{DOCNL} { // end of argument +{DOCNL} { // end of argument if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); BEGIN( Comment ); } -. { // ignore other stuff +. { // ignore other stuff } /* ----- handle argument of ingroup command ------- */ -{LABELID} { // group id - yyextra->current->groups.push_back( +{LABELID} { // group id + yyextra->current->groups.push_back( Grouping(yytext, Grouping::GROUPING_INGROUP) ); yyextra->inGroupParamFound=TRUE; - } -{DOCNL} { // missing argument - if (!yyextra->inGroupParamFound) + } +{DOCNL} { // missing argument + if (!yyextra->inGroupParamFound) { - warn(yyextra->fileName,yyextra->lineNr, + warn(yyextra->fileName,yyextra->lineNr, "Missing group name for \\ingroup command" ); } - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); + unput('\n'); BEGIN( Comment ); - } -{LC} { // line continuation + } +{LC} { // line continuation yyextra->lineNr++; addOutput(yyscanner,'\n'); - } -. { // ignore other stuff - addOutput(yyscanner,*yytext); - } + } +. { // ignore other stuff + addOutput(yyscanner,*yytext); + } /* ----- handle argument of fn command ------- */ {DOCNL} { // end of argument - if (yyextra->braceCount==0) + if (yyextra->braceCount==0) { - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); + unput('\n'); yyextra->langParser->parsePrototype(yyextra->functionProto); BEGIN( Comment ); } - } -{LC} { // line continuation + } +{LC} { // line continuation yyextra->lineNr++; yyextra->functionProto+=' '; - } -[^@\\\n()]+ { // non-special characters + } +[^@\\\n()]+ { // non-special characters yyextra->functionProto+=yytext; - } -"(" { + } +"(" { yyextra->functionProto+=yytext; yyextra->braceCount++; } -")" { +")" { yyextra->functionProto+=yytext; yyextra->braceCount--; } -. { // add other stuff +. { // add other stuff yyextra->functionProto+=*yytext; - } + } /* ----- handle argument of overload command ------- */ -{DOCNL} { // end of argument - if (*yytext=='\n') yyextra->lineNr++; +{DOCNL} { // end of argument + if (*yytext=='\n') yyextra->lineNr++; if (yyextra->functionProto.stripWhiteSpace().isEmpty()) { // plain overload command addOutput(yyscanner,getOverloadDocs()); @@ -1749,117 +1765,119 @@ RCSTAG "$"{ID}":"[^\n$]+"$" yyextra->langParser->parsePrototype(yyextra->functionProto); } BEGIN( Comment ); - } -{LC} { // line continuation + } +{LC} { // line continuation yyextra->lineNr++; yyextra->functionProto+=' '; - } + } . { // add other stuff yyextra->functionProto+=*yytext; - } + } /* ----- handle argument of inherit command ------- */ -({ID}("::"|"."))*{ID} { // found argument +({ID}("::"|"."))*{ID} { // found argument yyextra->current->extends.push_back( BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal) ); BEGIN( Comment ); - } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, + } +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "\\inherit command has no argument" ); - if (*yytext=='\n') yyextra->lineNr++; + if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); BEGIN( Comment ); - } -. { // invalid character for anchor label - warn(yyextra->fileName,yyextra->lineNr, + } +. { // invalid character for anchor label + warn(yyextra->fileName,yyextra->lineNr, "Invalid or missing name for \\inherit command" ); BEGIN(Comment); - } + } /* ----- handle argument of extends and implements commands ------- */ -({ID}("::"|"."))*{ID} { // found argument +({ID}("::"|"."))*{ID} { // found argument yyextra->current->extends.push_back( BaseInfo(removeRedundantWhiteSpace(yytext),Public,Normal) ); BEGIN( Comment ); - } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, + } +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "\\extends or \\implements command has no argument" ); - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); + unput('\n'); BEGIN( Comment ); - } -. { // ignore other stuff - } + } +. { // ignore other stuff + } /* ----- handle language specific sections ------- */ -[\\@]"~"[a-zA-Z-]* { /* language switch */ - QCString langId = &yytext[2]; - if (langId.isEmpty() || - qstricmp(Config_getEnum(OUTPUT_LANGUAGE),langId)==0) - { // enable language specific section - BEGIN(Comment); - } - } -[^*@\\\n]* { /* any character not a *, @, backslash or new line */ - } -{DOCNL} { /* new line in verbatim block */ - if (*yytext=='\n') yyextra->lineNr++; - } -. { /* any other character */ - } +[\\@]"~"[a-zA-Z-]* { /* language switch */ + QCString langId = &yytext[2]; + if (langId.isEmpty() || + qstricmp(Config_getEnum(OUTPUT_LANGUAGE),langId)==0) + { // enable language specific section + BEGIN(Comment); + } + } +[^*@\\\n]* { /* any character not a *, @, backslash or new line */ + } +{DOCNL} { /* new line in verbatim block */ + if (*yytext=='\n') yyextra->lineNr++; + } +. { /* any other character */ + } /* ----- handle arguments of the cite command ------- */ -{CITEID} { // found argument - addCite(yyscanner); +{CITEID} { // found argument + addCite(yyscanner); addOutput(yyscanner,yytext); BEGIN(Comment); - } -{DOCNL} { // missing argument - warn(yyextra->fileName,yyextra->lineNr, + } +{DOCNL} { // missing argument + warn(yyextra->fileName,yyextra->lineNr, "\\cite command has no label" ); - if (*yytext=='\n') yyextra->lineNr++; - addOutput(yyscanner,'\n'); + //if (*yytext=='\n') yyextra->lineNr++; + //addOutput(yyscanner,'\n'); + unput('\n'); BEGIN( Comment ); - } -. { // invalid character for cite label - warn(yyextra->fileName,yyextra->lineNr, + } +. { // invalid character for cite label + warn(yyextra->fileName,yyextra->lineNr, "Invalid or missing cite label" ); BEGIN(Comment); - } + } /* ----- handle argument of the copydoc command ------- */ <> | {DOCNL} { - if (*yytext=='\n') yyextra->lineNr++; + if (*yytext=='\n') yyextra->lineNr++; addOutput(yyscanner,'\n'); setOutput(yyscanner,OutputDoc); addOutput(yyscanner," \\copydetails "); addOutput(yyscanner,yyextra->copyDocArg); addOutput(yyscanner,"\n"); BEGIN(Comment); - } -[^\n\\]+ { - yyextra->copyDocArg+=yytext; + } +[^\n\\]+ { + yyextra->copyDocArg+=yytext; addOutput(yyscanner,yytext); - } -. { - yyextra->copyDocArg+=yytext; + } +. { + yyextra->copyDocArg+=yytext; addOutput(yyscanner,yytext); - } + } %% -- cgit v0.12 From 1fb2408b0ef717f0e475894f646bcd4c1b90b65e Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 18 Jul 2020 17:01:33 +0200 Subject: Replaced bitmap of doxygen logo by SVG version --- src/htmlgen.cpp | 4 +-- src/res2cc_cmd.py | 9 +++++ src/resourcemgr.cpp | 12 +++++++ src/resourcemgr.h | 2 +- templates/html/doxygen.luma | 68 ------------------------------------- templates/html/doxygen.svg | 26 ++++++++++++++ templates/html/footer.html | 8 ++--- templates/html/htmlbase.tpl | 5 ++- templates/html/htmlhelpindexhhp.tpl | 2 +- 9 files changed, 55 insertions(+), 81 deletions(-) delete mode 100644 templates/html/doxygen.luma create mode 100644 templates/html/doxygen.svg diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index d869a2b..7b125af 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -1016,7 +1016,7 @@ void HtmlGenerator::writeTabData() mgr.copyResource("nav_h.lum",dname); mgr.copyResource("nav_f.lum",dname); mgr.copyResource("bc_s.luma",dname); - mgr.copyResource("doxygen.luma",dname); + mgr.copyResource("doxygen.svg",dname); mgr.copyResource("closed.luma",dname); mgr.copyResource("open.luma",dname); mgr.copyResource("bdwn.luma",dname); @@ -1181,7 +1181,7 @@ QCString HtmlGenerator::writeLogoAsString(const char *path) result += " \n\n" "\"doxygen\"/ "; + result += "doxygen.svg\" width=\"104\" height=\"31\" alt=\"doxygen\"/> "; result += getDoxygenVersion(); result += " "; return result; diff --git a/src/res2cc_cmd.py b/src/res2cc_cmd.py index 86d999d..268ae86 100755 --- a/src/res2cc_cmd.py +++ b/src/res2cc_cmd.py @@ -58,6 +58,7 @@ class File(object): if ext=='.lum': return LumFile(directory,subdir,fname) if ext=='.luma': return LumaFile(directory,subdir,fname) if ext=='.css': return CSSFile(directory,subdir,fname) + if ext=='.svg': return SVGFile(directory,subdir,fname) return VerbatimFile(directory,subdir,fname) class VerbatimFile(File): @@ -76,6 +77,14 @@ class CSSFile(File): def writeDirEntry(self,outputFile): print(" { \"%s\", \"%s\", %s_data, %s_len, Resource::CSS }," % (self.subdir,self.fileName,self.bareName,self.bareName), file=outputFile) +class SVGFile(File): + def __init__(self,directory,subdir,fileName): + File.__init__(self,directory,subdir,fileName,"r") + def writeContents(self,outputFile): + self.writeBytes(self.inputFile.read(),outputFile) + def writeDirEntry(self,outputFile): + print(" { \"%s\", \"%s\", %s_data, %s_len, Resource::SVG }," % (self.subdir,self.fileName,self.bareName,self.bareName), file=outputFile) + class LumFile(File): def __init__(self,directory,subdir,fileName): File.__init__(self,directory,subdir,fileName,"r") diff --git a/src/resourcemgr.cpp b/src/resourcemgr.cpp index 4ba3388..6d2946c 100644 --- a/src/resourcemgr.cpp +++ b/src/resourcemgr.cpp @@ -150,6 +150,18 @@ bool ResourceMgr::copyResourceAs(const char *name,const char *targetDir,const ch } } break; + case Resource::SVG: + { + QFile f(pathName); + if (f.open(IO_WriteOnly)) + { + QCString buf(res->size+1); + memcpy(buf.rawData(),res->data,res->size); + FTextStream t(&f); + t << replaceColorMarkers(buf); + return TRUE; + } + } } } else diff --git a/src/resourcemgr.h b/src/resourcemgr.h index 6e1587d..1959ec4 100644 --- a/src/resourcemgr.h +++ b/src/resourcemgr.h @@ -20,7 +20,7 @@ /** @brief Compiled resource */ struct Resource { - enum Type { Verbatim, Luminance, LumAlpha, CSS }; + enum Type { Verbatim, Luminance, LumAlpha, CSS, SVG }; const char *category; const char *name; const unsigned char *data; diff --git a/templates/html/doxygen.luma b/templates/html/doxygen.luma deleted file mode 100644 index 48d9435..0000000 --- a/templates/html/doxygen.luma +++ /dev/null @@ -1,68 +0,0 @@ -# doxygen logo -# width & height -104 31 -# luma data -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 - 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 255 255 255 255 255 255 255 255 - 32 32 32 32 32 32 32 32 32 32 91 91 91 91 32 32 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 - 32 32 32 32 32 32 32 32 32 32 255 255 255 255 32 32 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 - 32 32 32 32 32 32 32 32 32 32 253 253 253 253 32 32 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 253 255 255 255 255 255 255 255 255 - 32 32 32 32 32 32 32 32 32 32 251 251 251 251 32 32 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 251 255 255 255 255 255 255 255 255 - 32 32 32 32 32 32 32 32 32 32 249 249 249 249 32 32 249 249 249 249 32 32 32 32 32 32 249 249 249 249 32 32 32 32 32 32 249 249 249 249 32 32 32 32 32 32 32 32 32 32 249 249 249 32 32 32 32 32 249 249 249 249 32 32 32 32 32 32 32 32 32 32 249 249 249 249 249 249 32 32 32 32 32 32 32 249 249 249 249 249 32 32 32 32 32 249 32 32 32 32 32 255 255 255 - 32 32 32 32 46 132 190 190 147 61 247 247 247 247 32 32 247 247 32 32 118 161 190 190 161 118 32 32 247 32 46 89 89 89 89 46 32 247 247 32 89 89 89 89 61 89 89 89 89 46 32 247 32 46 89 89 89 89 32 247 32 32 118 175 190 161 89 61 89 89 89 61 32 247 247 247 32 32 104 147 190 190 190 132 89 32 32 247 247 32 46 89 89 89 75 32 89 161 190 161 75 32 255 255 - 32 32 32 74 230 244 244 244 244 244 244 244 244 244 32 32 244 32 74 216 244 244 244 244 244 244 216 74 32 244 32 187 244 244 244 159 32 244 32 117 244 244 244 230 46 173 244 244 244 131 32 244 32 131 244 244 244 173 32 32 46 173 244 244 244 244 244 230 244 244 244 131 32 244 244 32 74 202 244 244 244 244 244 244 244 173 46 32 244 32 89 244 244 244 187 145 244 244 244 244 244 89 32 255 - 32 32 46 213 241 241 241 241 241 241 241 241 241 241 32 32 32 60 227 241 241 241 241 241 241 241 241 227 60 32 32 46 227 241 241 241 102 32 60 227 241 241 241 88 32 116 241 241 241 199 32 241 32 185 241 241 241 116 32 32 143 241 241 241 241 241 241 241 241 241 241 130 32 241 32 74 227 241 241 241 199 185 241 241 241 241 171 32 241 32 88 241 241 241 241 241 241 241 241 241 241 199 32 255 - 32 32 128 237 237 237 223 128 87 128 237 237 237 237 32 32 32 182 237 237 237 196 100 100 196 237 237 237 182 32 237 32 100 237 237 237 223 59 196 237 237 237 141 32 32 46 237 237 237 237 59 32 46 237 237 237 237 46 32 59 237 237 237 237 169 87 87 182 237 237 237 128 32 237 32 196 237 237 237 87 32 32 73 223 237 237 237 73 32 32 87 237 237 237 237 223 182 223 237 237 237 237 46 32 - 32 32 207 234 234 234 113 32 32 32 234 234 234 234 32 32 59 234 234 234 221 45 32 32 45 221 234 234 234 59 32 234 32 140 234 234 234 221 234 234 234 194 32 32 234 32 167 234 234 234 126 32 99 234 234 234 167 32 32 126 234 234 234 180 32 32 32 126 234 234 234 126 32 32 99 234 234 234 167 32 32 32 32 153 234 234 234 126 32 32 86 234 234 234 207 45 32 45 234 234 234 234 86 32 - 32 45 231 231 231 218 32 32 32 32 231 231 231 231 32 32 98 231 231 231 165 32 231 231 32 165 231 231 231 98 32 231 32 45 191 231 231 231 231 231 218 72 32 231 231 32 98 231 231 231 165 32 151 231 231 231 112 32 32 165 231 231 231 112 32 231 32 125 231 231 231 125 32 32 138 231 231 231 178 125 125 125 125 178 231 231 231 178 32 32 85 231 231 231 178 32 255 32 191 231 231 231 85 32 - 32 84 227 227 227 175 32 32 32 32 227 227 227 227 32 32 123 227 227 227 123 32 227 227 32 123 227 227 227 123 32 227 227 32 71 227 227 227 227 227 123 32 227 227 227 227 32 214 227 227 227 45 201 227 227 227 45 32 32 175 227 227 227 84 32 227 32 123 227 227 227 123 32 32 175 227 227 227 227 227 227 227 227 227 227 227 227 175 32 32 84 227 227 227 175 32 255 32 175 227 227 227 84 32 - 32 83 223 223 223 172 32 32 32 32 223 223 223 223 32 32 121 223 223 223 121 32 223 223 32 121 223 223 223 121 32 223 223 223 32 172 223 223 223 210 45 32 223 223 223 223 32 147 223 223 223 134 223 223 223 147 32 223 32 172 223 223 223 83 32 223 32 121 223 223 223 121 32 32 172 223 223 223 223 223 223 223 223 223 223 223 223 172 32 32 83 223 223 223 172 32 255 32 172 223 223 223 83 32 - 32 82 220 220 220 170 32 32 32 32 220 220 220 220 32 32 120 220 220 220 120 32 220 220 32 120 220 220 220 120 32 220 220 32 95 220 220 220 220 220 132 32 220 220 220 220 32 95 220 220 220 207 220 220 220 95 32 220 32 170 220 220 220 107 32 220 32 120 220 220 220 120 32 32 170 220 220 220 132 32 32 32 32 32 32 32 32 32 32 32 82 220 220 220 170 32 255 32 170 220 220 220 82 32 - 32 57 216 216 216 216 32 32 32 32 216 216 216 216 32 32 81 216 216 216 167 32 216 216 32 155 216 216 216 81 32 216 32 57 204 216 216 216 216 216 216 93 32 216 216 216 216 32 204 216 216 216 216 216 204 32 216 216 32 118 216 216 216 167 32 32 32 130 216 216 216 118 32 32 118 216 216 216 191 32 32 216 216 216 32 32 44 57 32 32 81 216 216 216 167 32 255 32 167 216 216 216 81 32 - 32 32 189 213 213 213 116 32 32 80 213 213 213 213 32 32 44 201 213 213 213 68 32 32 68 213 213 213 213 44 32 32 32 165 213 213 213 165 213 213 213 201 44 32 213 213 213 32 129 213 213 213 213 213 141 32 213 213 32 80 213 213 213 213 165 116 153 213 213 213 213 116 32 32 56 213 213 213 213 153 56 32 32 32 44 104 189 116 32 32 80 213 213 213 165 32 255 32 165 213 213 213 80 32 - 32 32 139 210 210 210 210 174 174 210 210 210 210 210 32 32 32 127 210 210 210 198 127 127 198 210 210 210 127 32 210 32 115 210 210 210 174 44 139 210 210 210 163 32 32 210 210 32 68 210 210 210 210 210 91 32 210 210 210 32 174 210 210 210 210 210 210 210 210 210 210 115 32 210 32 127 210 210 210 210 210 174 163 163 210 210 210 115 32 32 79 210 210 210 163 32 255 32 163 210 210 210 79 32 - 32 32 55 194 206 206 206 206 206 194 206 206 206 206 32 32 32 44 171 206 206 206 206 206 206 206 206 171 44 32 32 67 206 206 206 206 67 32 44 183 206 206 206 113 32 206 206 206 32 183 206 206 206 194 32 206 206 206 206 32 67 194 206 206 206 206 206 171 206 206 206 113 32 206 32 32 136 206 206 206 206 206 206 206 206 206 206 113 32 32 78 206 206 206 160 32 255 32 160 206 206 206 78 32 - 32 32 32 100 192 203 203 203 157 55 203 203 203 203 32 32 203 32 43 135 203 203 203 203 203 203 135 43 32 32 43 180 203 203 203 112 32 203 32 66 203 203 203 203 66 32 203 203 32 157 203 203 203 135 32 203 203 203 203 203 32 43 112 157 157 123 55 112 203 203 203 112 32 203 203 32 32 78 146 203 203 203 203 203 203 169 123 55 32 32 78 203 203 203 157 32 255 32 157 203 203 203 78 32 - 32 32 32 32 54 110 110 88 32 32 32 32 32 32 32 32 200 200 32 32 54 99 110 110 99 54 32 32 200 200 32 32 32 32 32 32 32 200 200 32 32 32 32 32 32 200 200 32 54 200 200 200 200 77 32 200 200 200 200 200 32 32 32 32 32 32 32 166 200 200 200 88 32 200 200 200 200 32 32 32 66 77 77 77 32 32 32 32 200 200 32 32 32 32 32 32 255 32 32 32 32 32 32 255 - 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 32 198 198 198 198 32 32 32 32 32 32 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 198 32 109 198 198 198 176 32 198 198 198 198 198 32 98 121 76 32 32 54 109 198 198 198 198 43 32 198 198 198 198 198 198 198 32 32 32 32 198 198 198 198 198 198 198 198 198 198 198 198 255 255 255 255 255 255 255 255 - 32 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 33 159 191 191 191 117 36 41 41 41 41 41 34 108 191 191 191 191 191 191 191 191 191 117 36 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 255 - 32 41 97 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 78 38 64 190 192 192 192 66 66 41 41 85 128 65 34 107 190 192 192 192 192 192 192 192 139 48 39 41 41 105 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 97 41 255 - 32 41 97 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 96 36 95 147 148 148 139 55 41 41 85 121 128 91 38 75 137 158 190 190 190 170 139 97 49 37 41 41 105 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 128 97 41 255 - 32 41 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 41 36 45 45 45 48 38 41 41 76 76 76 76 76 37 34 42 33 33 33 39 48 59 41 41 41 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 76 41 255 - 32 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 41 255 -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 -# alpha data - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 66 66 66 66 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 145 247 247 247 247 145 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 247 247 247 247 247 247 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 247 247 247 247 247 247 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 247 247 247 247 247 247 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 16 115 181 181 132 247 247 247 247 247 247 0 0 0 0 0 99 148 181 181 148 99 0 0 0 0 16 66 66 66 66 16 0 0 0 0 66 66 66 66 33 66 66 66 66 16 0 0 0 16 66 66 66 66 0 0 0 0 99 165 181 148 66 33 66 66 66 33 0 0 0 0 0 0 82 132 181 181 181 115 66 0 0 0 0 0 16 66 66 66 49 0 66 148 181 148 49 0 0 0 - 0 0 0 129 247 247 247 247 247 247 247 247 247 247 247 0 0 0 112 214 247 247 247 247 247 247 214 112 0 16 247 247 247 247 247 247 46 0 0 145 247 247 247 247 247 247 247 247 247 247 16 0 16 247 247 247 247 247 66 0 63 165 247 247 247 247 247 247 247 247 247 247 33 0 0 0 96 198 247 247 247 247 247 247 247 165 63 0 0 16 247 247 247 247 247 145 247 247 247 247 247 145 0 0 - 0 0 112 247 247 247 247 247 247 247 247 247 247 247 247 0 0 129 247 247 247 247 247 247 247 247 247 247 129 0 181 247 247 247 247 247 148 0 129 247 247 247 247 247 247 247 247 247 247 247 115 0 115 247 247 247 247 247 165 30 247 247 247 247 247 247 247 247 247 247 247 247 115 0 0 129 247 247 247 247 247 247 247 247 247 247 247 63 0 66 247 247 247 247 247 247 247 247 247 247 247 247 96 0 - 0 16 247 247 247 247 247 247 247 247 247 247 247 247 247 0 79 247 247 247 247 247 247 247 247 247 247 247 247 79 79 247 247 247 247 247 247 129 247 247 247 247 247 247 129 247 247 247 247 247 198 0 181 247 247 247 247 247 99 145 247 247 247 247 247 247 247 247 247 247 247 247 115 0 96 247 247 247 247 247 247 247 247 247 247 247 247 165 0 66 247 247 247 247 247 247 247 247 247 247 247 247 198 0 - 0 115 247 247 247 247 247 247 247 247 247 247 247 247 247 0 181 247 247 247 247 247 247 247 247 247 247 247 247 181 0 129 247 247 247 247 247 247 247 247 247 247 247 145 16 247 247 247 247 247 247 33 247 247 247 247 247 247 33 247 247 247 247 247 247 247 247 247 247 247 247 247 115 0 198 247 247 247 247 247 198 181 247 247 247 247 247 247 49 66 247 247 247 247 247 247 247 247 247 247 247 247 247 16 - 0 214 247 247 247 247 247 129 66 247 247 247 247 247 247 33 247 247 247 247 247 247 96 96 247 247 247 247 247 247 33 0 145 247 247 247 247 247 247 247 247 247 198 30 0 165 247 247 247 247 247 115 247 247 247 247 247 165 115 247 247 247 247 247 181 66 115 247 247 247 247 247 115 82 247 247 247 247 247 165 115 115 148 247 247 247 247 247 115 66 247 247 247 247 247 247 181 247 247 247 247 247 247 66 - 16 247 247 247 247 247 231 0 0 247 247 247 247 247 247 82 247 247 247 247 247 165 0 0 165 247 247 247 247 247 82 0 30 247 247 247 247 247 247 247 247 247 96 0 0 82 247 247 247 247 247 165 247 247 247 247 247 99 165 247 247 247 247 247 99 0 115 247 247 247 247 247 115 132 247 247 247 247 247 247 247 247 247 247 247 247 247 247 181 66 247 247 247 247 247 181 0 198 247 247 247 247 247 66 - 66 247 247 247 247 247 181 0 0 247 247 247 247 247 247 115 247 247 247 247 247 115 0 0 115 247 247 247 247 247 115 0 0 96 247 247 247 247 247 247 247 129 0 0 0 0 231 247 247 247 247 247 247 247 247 247 247 16 181 247 247 247 247 247 66 0 115 247 247 247 247 247 115 181 247 247 247 247 247 247 247 247 247 247 247 247 247 247 181 66 247 247 247 247 247 181 0 181 247 247 247 247 247 66 - 66 247 247 247 247 247 181 0 0 247 247 247 247 247 247 115 247 247 247 247 247 115 0 0 115 247 247 247 247 247 115 0 0 0 181 247 247 247 247 247 247 30 0 0 0 0 148 247 247 247 247 247 247 247 247 247 148 0 181 247 247 247 247 247 66 0 115 247 247 247 247 247 115 181 247 247 247 247 247 247 247 247 247 247 247 247 247 247 181 66 247 247 247 247 247 181 0 181 247 247 247 247 247 66 - 66 247 247 247 247 247 181 0 0 247 247 247 247 247 247 115 247 247 247 247 247 115 0 0 115 247 247 247 247 247 115 0 0 129 247 247 247 247 247 247 247 145 0 0 0 0 82 247 247 247 247 247 247 247 247 247 82 0 181 247 247 247 247 247 99 0 115 247 247 247 247 247 115 181 247 247 247 247 247 247 247 247 247 247 247 247 247 181 79 66 247 247 247 247 247 181 0 181 247 247 247 247 247 66 - 33 247 247 247 247 247 247 14 0 247 247 247 247 247 247 66 247 247 247 247 247 181 0 0 165 247 247 247 247 247 66 0 79 247 247 247 247 247 247 247 247 247 129 0 0 0 0 231 247 247 247 247 247 247 247 231 0 0 115 247 247 247 247 247 181 115 165 247 247 247 247 247 115 115 247 247 247 247 247 214 63 0 0 0 16 112 247 247 33 66 247 247 247 247 247 181 0 181 247 247 247 247 247 66 - 0 214 247 247 247 247 247 198 198 247 247 247 247 247 247 16 247 247 247 247 247 247 132 132 247 247 247 247 247 247 16 14 181 247 247 247 247 247 247 247 247 247 247 79 0 0 0 132 247 247 247 247 247 247 247 148 0 0 66 247 247 247 247 247 247 247 247 247 247 247 247 247 115 33 247 247 247 247 247 247 247 198 181 181 247 247 247 247 115 66 247 247 247 247 247 181 0 181 247 247 247 247 247 66 - 0 148 247 247 247 247 247 247 247 247 247 247 247 247 247 0 132 247 247 247 247 247 247 247 247 247 247 247 247 145 0 145 247 247 247 247 247 247 247 247 247 247 247 181 14 0 0 49 247 247 247 247 247 247 247 82 0 0 0 198 247 247 247 247 247 247 247 247 247 247 247 247 115 0 145 247 247 247 247 247 247 247 247 247 247 247 247 247 115 66 247 247 247 247 247 181 0 181 247 247 247 247 247 66 - 0 46 247 247 247 247 247 247 247 247 247 247 247 247 247 0 30 247 247 247 247 247 247 247 247 247 247 247 247 30 112 247 247 247 247 247 247 96 247 247 247 247 247 247 145 0 0 0 214 247 247 247 247 247 231 0 0 0 0 96 247 247 247 247 247 247 247 247 247 247 247 247 115 0 30 148 247 247 247 247 247 247 247 247 247 247 247 247 115 66 247 247 247 247 247 181 0 181 247 247 247 247 247 66 - 0 0 129 247 247 247 247 247 247 247 247 247 247 247 247 0 0 96 247 247 247 247 247 247 247 247 247 247 96 16 247 247 247 247 247 247 145 0 112 247 247 247 247 247 247 49 0 0 181 247 247 247 247 247 148 0 0 0 0 0 129 247 247 247 247 247 247 247 247 247 247 247 115 0 0 46 148 247 247 247 247 247 247 247 247 247 247 247 33 66 247 247 247 247 247 181 0 181 247 247 247 247 247 66 - 0 0 0 129 247 247 247 247 181 145 247 247 247 247 145 0 0 0 46 148 247 247 247 247 247 247 148 46 0 0 112 214 247 247 247 145 14 0 0 145 247 247 247 247 145 0 0 33 247 247 247 247 247 247 66 0 0 0 0 0 99 132 115 181 181 132 198 247 247 247 247 247 82 0 0 0 0 66 165 247 247 247 247 247 247 198 132 33 0 0 145 247 247 247 181 79 0 79 181 247 247 247 145 0 - 0 0 0 0 33 115 115 82 0 0 0 0 0 0 0 0 0 0 0 0 33 99 115 115 99 33 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 115 247 247 247 247 247 214 0 0 0 0 0 99 247 247 247 247 247 247 247 247 247 247 247 247 16 0 0 0 0 0 0 0 49 66 66 66 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 165 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 108 224 255 255 255 255 255 255 101 164 255 255 255 143 250 255 255 255 255 255 255 255 255 255 255 255 98 170 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 165 0 - 0 165 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 136 251 255 255 255 255 255 255 101 130 255 255 255 153 250 255 255 255 255 255 255 255 255 255 255 121 98 189 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 165 0 - 0 165 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 198 252 255 255 255 255 255 164 164 255 255 255 255 176 249 251 255 255 255 255 255 255 255 255 150 86 192 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 165 0 - 0 165 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 164 198 255 255 255 255 201 133 164 255 255 255 255 255 145 203 255 255 255 255 255 255 255 117 79 194 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 165 0 - 0 66 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 73 73 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 47 70 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 102 66 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - diff --git a/templates/html/doxygen.svg b/templates/html/doxygen.svg new file mode 100644 index 0000000..0676128 --- /dev/null +++ b/templates/html/doxygen.svg @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/html/footer.html b/templates/html/footer.html index d2aa9e6..1cb1529 100644 --- a/templates/html/footer.html +++ b/templates/html/footer.html @@ -3,17 +3,13 @@ diff --git a/templates/html/htmlbase.tpl b/templates/html/htmlbase.tpl index 02741d2..362de31 100644 --- a/templates/html/htmlbase.tpl +++ b/templates/html/htmlbase.tpl @@ -228,8 +228,7 @@ $(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix {% else %} {{ tr.generatedBy }} {% endif %} - - doxygen {{ doxygen.version }} + doxygen {{ doxygen.version }} {% else %} @@ -239,7 +238,7 @@ $(document).ready(function(){initNavTree('{{ page.fileName }}{% if page_postfix {% else %} {{ tr.generatedBy }} {% endif %} - doxygendoxygen {{ doxygen.version }} {% endif %} diff --git a/templates/html/htmlhelpindexhhp.tpl b/templates/html/htmlhelpindexhhp.tpl index 15aba91..8097f3e 100644 --- a/templates/html/htmlhelpindexhhp.tpl +++ b/templates/html/htmlhelpindexhhp.tpl @@ -24,7 +24,7 @@ tab_s.png nav_h.png nav_f.png bc_s.png -doxygen.png +doxygen.svg closed.png open.png bdwn.png -- cgit v0.12 From cd1516dc7afe268a9ba798b33111d41881df520d Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 19 Jul 2020 10:48:03 +0200 Subject: Make the luminance levels of the new SVG logo better match the original bitmap --- templates/html/doxygen.svg | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/html/doxygen.svg b/templates/html/doxygen.svg index 0676128..265cf6c 100644 --- a/templates/html/doxygen.svg +++ b/templates/html/doxygen.svg @@ -2,15 +2,15 @@ - - + + - - + + @@ -19,7 +19,7 @@ - + -- cgit v0.12 From 1b2eb947740d9933cbfa448014375dee45d82b98 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 19 Jul 2020 11:58:19 +0200 Subject: Made shading more subtle in the SVG logo --- templates/html/doxygen.svg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/html/doxygen.svg b/templates/html/doxygen.svg index 265cf6c..d00110b 100644 --- a/templates/html/doxygen.svg +++ b/templates/html/doxygen.svg @@ -17,7 +17,7 @@ - + -- cgit v0.12 From 3803bec48abc143d3ac4e43caf9922018788ba96 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Sun, 19 Jul 2020 13:02:59 +0200 Subject: Fix #7883 --- addon/doxyapp/CMakeLists.txt | 2 +- addon/doxyparse/CMakeLists.txt | 2 +- src/CMakeLists.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addon/doxyapp/CMakeLists.txt b/addon/doxyapp/CMakeLists.txt index 8ec4d2e..808eee9 100644 --- a/addon/doxyapp/CMakeLists.txt +++ b/addon/doxyapp/CMakeLists.txt @@ -15,7 +15,7 @@ doxyapp.cpp add_sanitizers(doxyapp) if (use_libclang) - set(CLANG_LIBS libclang clangTooling ${llvm_libs}) + set(CLANG_LIBS libclang clang-cpp ${llvm_libs}) endif() target_link_libraries(doxyapp diff --git a/addon/doxyparse/CMakeLists.txt b/addon/doxyparse/CMakeLists.txt index 6ddc113..bfef0ab 100644 --- a/addon/doxyparse/CMakeLists.txt +++ b/addon/doxyparse/CMakeLists.txt @@ -15,7 +15,7 @@ doxyparse.cpp add_sanitizers(doxyparse) if (use_libclang) - set(CLANG_LIBS libclang clangTooling ${llvm_libs}) + set(CLANG_LIBS libclang clang-cpp ${llvm_libs}) endif() target_link_libraries(doxyparse diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 221ff46..dc90eb0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -330,9 +330,9 @@ if (use_libclang) endif() include_directories(${LLVM_INCLUDE_DIRS}) add_definitions(${LLVM_DEFINITIONS}) - llvm_map_components_to_libnames(llvm_libs support core option) + llvm_map_components_to_libnames(llvm_libs support) target_compile_definitions(doxygen PRIVATE ${LLVM_DEFINITIONS}) - set(CLANG_LIBS libclang clangTooling ${llvm_libs}) + set(CLANG_LIBS libclang clang-cpp ${llvm_libs}) endif() target_link_libraries(doxygen -- cgit v0.12 From 3b6ac9e24fae88e09558524d3d9bd023a753defc Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Mon, 20 Jul 2020 21:05:08 +0200 Subject: Make a switch to choose between dynamic library to clang-cpp or static linking against clangTooling --- CMakeLists.txt | 1 + addon/doxyapp/CMakeLists.txt | 6 +++++- addon/doxyparse/CMakeLists.txt | 6 +++++- src/CMakeLists.txt | 9 +++++++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 88b99d6..e76a745 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ option(build_doc "Build user manual (HTML and PDF)" OFF) option(build_doc_chm "Build user manual (CHM)" OFF) option(use_sqlite3 "Add support for sqlite3 output [experimental]." OFF) option(use_libclang "Add support for libclang parsing." OFF) +option(static_libclang "Link to a statically compiled version of LLVM/libclang." OFF) option(win_static "Link with /MT in stead of /MD on windows" OFF) option(english_only "Only compile in support for the English language" OFF) option(force_qt4 "Forces doxywizard to build using Qt4 even if Qt5 is installed" OFF) diff --git a/addon/doxyapp/CMakeLists.txt b/addon/doxyapp/CMakeLists.txt index 808eee9..a6a776a 100644 --- a/addon/doxyapp/CMakeLists.txt +++ b/addon/doxyapp/CMakeLists.txt @@ -15,7 +15,11 @@ doxyapp.cpp add_sanitizers(doxyapp) if (use_libclang) - set(CLANG_LIBS libclang clang-cpp ${llvm_libs}) + if (static_libclang) + set(CLANG_LIBS libclang clangTooling ${llvm_libs}) + else() + set(CLANG_LIBS libclang clang-cpp ${llvm_libs}) + endif() endif() target_link_libraries(doxyapp diff --git a/addon/doxyparse/CMakeLists.txt b/addon/doxyparse/CMakeLists.txt index bfef0ab..8df99ab 100644 --- a/addon/doxyparse/CMakeLists.txt +++ b/addon/doxyparse/CMakeLists.txt @@ -15,7 +15,11 @@ doxyparse.cpp add_sanitizers(doxyparse) if (use_libclang) - set(CLANG_LIBS libclang clang-cpp ${llvm_libs}) + if (static_libclang) + set(CLANG_LIBS libclang clangTooling ${llvm_libs}) + else() + set(CLANG_LIBS libclang clang-cpp ${llvm_libs}) + endif() endif() target_link_libraries(doxyparse diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index dc90eb0..5ba80b7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -330,9 +330,14 @@ if (use_libclang) endif() include_directories(${LLVM_INCLUDE_DIRS}) add_definitions(${LLVM_DEFINITIONS}) - llvm_map_components_to_libnames(llvm_libs support) + if (static_libclang) + llvm_map_components_to_libnames(llvm_libs support core option) + set(CLANG_LIBS libclang clangTooling ${llvm_libs}) + else() # dynamically linked version of clang + llvm_map_components_to_libnames(llvm_libs support) + set(CLANG_LIBS libclang clang-cpp ${llvm_libs}) + endif() target_compile_definitions(doxygen PRIVATE ${LLVM_DEFINITIONS}) - set(CLANG_LIBS libclang clang-cpp ${llvm_libs}) endif() target_link_libraries(doxygen -- cgit v0.12 From ab550764edebfcc6f92dd7782d755dd8fa1621fc Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 25 Jul 2020 15:41:47 +0200 Subject: issue #7900: Incorrect warning regarding no matching class member found --- src/doxygen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doxygen.cpp b/src/doxygen.cpp index 8c739ad..f073051 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -5646,7 +5646,7 @@ static void addMemberFunction(const Entry *root, root->protection,root->stat,root->virt,spec,relates); return; } - if (md->argsString()==argListToString(root->argList,TRUE,FALSE)) + if (md->argsString()==argListToString(root->argList,FALSE,FALSE)) { // exact argument list match -> remember ucd = ecd = ccd; umd = emd = cmd; -- cgit v0.12 From 483b47ddd8039ba77aacc11d35825489f74b3b47 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sat, 25 Jul 2020 18:59:50 +0200 Subject: issue #7921: Help for CLANG_DATABASE_PATH is misleading --- src/config.xml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/config.xml b/src/config.xml index 7683a4e..9cbe46a 100644 --- a/src/config.xml +++ b/src/config.xml @@ -1705,10 +1705,12 @@ to disable this feature. If clang assisted parsing is enabled you can provide the clang parser with the - path to the <a href="http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html"> - compilation database</a> used when the files were built. This is equivalent to - specifying the "-p" option to a clang tool, such as clang-check. These options - will then be passed to the parser. + path to the directory containing a file called compile_commands.json. + This file is the <a href="http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html"> + compilation database</a> containing the options used when the source files were built. + This is equivalent to specifying the "-p" option to a clang tool, such as clang-check. + These options will then be passed to the parser. Any options specified with + \ref cfg_clang_options "CLANG_OPTIONS" will be added as well. @note The availability of this option depends on whether or not doxygen was generated with the `-Duse_libclang=ON` option for CMake. -- cgit v0.12 From 603b2ada84164c9e740552cec052c01803bee383 Mon Sep 17 00:00:00 2001 From: albert-github <albert.tests@gmail.com> Date: Mon, 27 Jul 2020 12:38:09 +0200 Subject: issue #7923 source line numbers in warnings output by parser are off by 1 Explicit counting of the removed newlines at the beginning of a documenation block (markdown.cpp) so this number can be added to get a better line number in case of warnings. --- src/fortranscanner.l | 4 +++- src/markdown.cpp | 8 +++++--- src/markdown.h | 2 +- src/pyscanner.l | 4 +++- src/scanner.l | 4 +++- src/vhdljjparser.cpp | 3 ++- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 4d80d5f..81dcb16 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -2518,7 +2518,9 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief int position=0; bool needsEntry = FALSE; Markdown markdown(yyextra->fileName,lineNr); - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc) : doc; + int startNewlines = 0; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,startNewlines) : doc; + lineNr += startNewlines; while (yyextra->commentScanner.parseCommentBlock( yyextra->thisParser, yyextra->docBlockInBody ? yyextra->subrCurrent.back().get() : yyextra->current.get(), diff --git a/src/markdown.cpp b/src/markdown.cpp index 4f40f8d..6e9ac27 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -2457,7 +2457,7 @@ QCString Markdown::detab(const QCString &s,int &refIndent) //--------------------------------------------------------------------------- -QCString Markdown::process(const QCString &input) +QCString Markdown::process(const QCString &input, int &startNewlines) { if (input.isEmpty()) return input; int refIndent; @@ -2488,7 +2488,7 @@ QCString Markdown::process(const QCString &input) if (p) { while (*p==' ') p++; // skip over spaces - while (*p=='\n') p++; // skip over newlines + while (*p=='\n') {startNewlines++;p++;}; // skip over newlines if (qstrncmp(p,"<br>",4)==0) p+=4; // skip over <br> } if (p>result.data()) @@ -2576,7 +2576,9 @@ void MarkdownOutlineParser::parseInput(const char *fileName, Protection prot=Public; bool needsEntry = FALSE; int position=0; - QCString processedDocs = markdown.process(docs); + int startNewlines; + QCString processedDocs = markdown.process(docs,startNewlines); + lineNr += startNewlines; while (p->commentScanner.parseCommentBlock( this, current.get(), diff --git a/src/markdown.h b/src/markdown.h index 43a17cc..1210967 100644 --- a/src/markdown.h +++ b/src/markdown.h @@ -33,7 +33,7 @@ class Markdown { public: Markdown(const char *fileName,int lineNr,int indentLevel=0); - QCString process(const QCString &input); + QCString process(const QCString &input, int &startNewlines); QCString extractPageTitle(QCString &docs,QCString &id); void setIndentLevel(int level) { m_indentLevel = level; } diff --git a/src/pyscanner.l b/src/pyscanner.l index 07b39d6..6a80e34 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -1631,7 +1631,9 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief bool needsEntry; int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine; Markdown markdown(yyextra->yyFileName,lineNr); - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc) : doc; + int startNewlines = 0; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,startNewlines) : doc; + lineNr += startNewlines; while (yyextra->commentScanner.parseCommentBlock( yyextra->thisParser, (yyextra->docBlockInBody && yyextra->previous) ? yyextra->previous.get() : yyextra->current.get(), diff --git a/src/scanner.l b/src/scanner.l index d9ad41c..c1d2ab6 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -7020,7 +7020,9 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief bool needsEntry=FALSE; Markdown markdown(yyextra->yyFileName,lineNr); QCString strippedDoc = stripIndentation(doc); - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc) : strippedDoc; + int startNewlines = 0; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,startNewlines) : strippedDoc; + lineNr += startNewlines; while (yyextra->commentScanner.parseCommentBlock( yyextra->thisParser, yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(), diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp index d3adad2..50790e8 100644 --- a/src/vhdljjparser.cpp +++ b/src/vhdljjparser.cpp @@ -400,7 +400,8 @@ void VHDLOutlineParser::handleCommentBlock(const char *doc1, bool brief) Markdown markdown(p->yyFileName,p->iDocLine); - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc) : doc; + int startNewlines = 0; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,startNewlines) : doc; while (p->commentScanner.parseCommentBlock( p->thisParser, -- cgit v0.12 From fdefd3091128296d8f572f7daba6d838de24bf4b Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch <doxygen@gmail.com> Date: Mon, 27 Jul 2020 14:15:58 +0200 Subject: Additional tweaks to get markdown tables inside ALIASES work - Changed \_linebr to \ilinebr - \ilinebr is now also passed to doctokenizer - Also fixes issue #7493 regarding \snippet inside markdown tables and dealing with wrong line on issues detected by docparser after a markdown table. - Added function tracing to markdown (enabled with -d markdown in a debug build) --- doc/custcmd.doc | 26 ++++----- src/commentscan.l | 62 ++++++++++---------- src/doctokenizer.l | 61 +++++++++++++------- src/doxygen.cpp | 4 +- src/markdown.cpp | 164 ++++++++++++++++++++++++++++++++++++++++++++++++----- 5 files changed, 235 insertions(+), 82 deletions(-) diff --git a/doc/custcmd.doc b/doc/custcmd.doc index 02805da..c6be4c4 100644 --- a/doc/custcmd.doc +++ b/doc/custcmd.doc @@ -1,12 +1,12 @@ /****************************************************************************** * - * + * * * Copyright (C) 1997-2015 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 + * 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. * @@ -18,11 +18,11 @@ \tableofcontents{html,latex} -Doxygen provides a large number of \ref commands "special commands", +Doxygen provides a large number of \ref commands "special commands", \ref xmlcmds "XML commands", and \ref htmlcmds "HTML commands". -that can be used to enhance or structure the documentation inside a comment block. +that can be used to enhance or structure the documentation inside a comment block. If you for some reason have a need to define new commands you can do -so by means of an \e alias definition. +so by means of an \e alias definition. The definition of an alias should be specified in the configuration file using the \ref cfg_aliases "ALIASES" configuration tag. @@ -32,15 +32,15 @@ The simplest form of an alias is a simple substitution of the form \verbatim name=value \endverbatim - For example defining the following alias: + For example defining the following alias: \verbatim - ALIASES += sideeffect="\par Side Effects:\n" + ALIASES += sideeffect="\par Side Effects:\n" \endverbatim will allow you to - put the command `\sideeffect` (or `@sideeffect`) in the documentation, which + put the command `\sideeffect` (or `@sideeffect`) in the documentation, which will result in a user-defined paragraph with heading <b>Side Effects:</b>. -Note that you can put `\n`'s in the value part of an alias to insert newlines +Note that you cannot put `\n`'s in the value part of an alias to insert newlines (in the resulting output). You can put `^^` in the value part of an alias to insert a newline as if a physical newline was in the original file. @@ -52,7 +52,7 @@ use a double escape (\c \\\\{ and \c \\\\}) Also note that you can redefine existing special commands if you wish. Some commands, such as \ref cmdxrefitem "\\xrefitem" are designed to be used in -combination with aliases. +combination with aliases. \section custcmd_complex Aliases with arguments Aliases can also have one or more arguments. In the alias definition you then need @@ -101,9 +101,9 @@ ALIASES += reminder="\xreflist{reminders,Reminder,Reminders}" Note that if for aliases with more than one argument a comma is used as a separator, if you want to put a comma inside the command, you will need to escape it with a backslash, -i.e. +i.e. \verbatim -\l{SomeClass,Some text\, with an escaped comma} +\l{SomeClass,Some text\, with an escaped comma} \endverbatim given the alias definition of `\l` in the example above. diff --git a/src/commentscan.l b/src/commentscan.l index 1923e4d..da8e577 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -163,7 +163,7 @@ struct DocCmdMap static const std::map< std::string, DocCmdMap > docCmdMap = { // command name handler function command spacing - { "_linebr", { &handleLineBr, CommandSpacing::Inline }}, + { "ilinebr", { &handleLineBr, CommandSpacing::Inline }}, { "addindex", { &handleAddIndex, CommandSpacing::Invisible }}, { "addtogroup", { &handleAddToGroup, CommandSpacing::Invisible }}, { "anchor", { &handleAnchor, CommandSpacing::Invisible }}, @@ -472,7 +472,7 @@ BL [ \t\r]*"\n" B [ \t] BS ^(({B}*"//")?)(({B}*"*"+)?){B}* ATTR ({B}+[^>\n]*)? -DOCNL "\n"|"\\_linebr" +DOCNL "\n"|"\\ilinebr" LC "\\"{B}*"\n" NW [^a-z_A-Z0-9] FILESCHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+@&#] @@ -505,34 +505,34 @@ RCSTAG "$"{ID}":"[^\n$]+"$" %x XRefItemParam3 %x FileDocArg1 %x ParamArg1 -%x EnumDocArg1 -%x NameSpaceDocArg1 -%x PackageDocArg1 -%x GroupDocArg1 -%x GroupDocArg2 -%x SectionLabel -%x SectionTitle -%x SubpageLabel -%x SubpageTitle -%x FormatBlock -%x LineParam -%x GuardParam -%x GuardParamEnd -%x SkipGuardedSection -%x SkipInternal +%x EnumDocArg1 +%x NameSpaceDocArg1 +%x PackageDocArg1 +%x GroupDocArg1 +%x GroupDocArg2 +%x SectionLabel +%x SectionTitle +%x SubpageLabel +%x SubpageTitle +%x FormatBlock +%x LineParam +%x GuardParam +%x GuardParamEnd +%x SkipGuardedSection +%x SkipInternal %x NameParam -%x InGroupParam -%x FnParam -%x OverloadParam -%x InheritParam -%x ExtendsParam +%x InGroupParam +%x FnParam +%x OverloadParam +%x InheritParam +%x ExtendsParam %x ReadFormulaShort -%x ReadFormulaLong -%x AnchorLabel +%x ReadFormulaLong +%x AnchorLabel %x HtmlComment %x SkipLang -%x CiteLabel -%x CopyDoc +%x CiteLabel +%x CopyDoc %x GuardExpr %x CdataSection %x Noop @@ -833,7 +833,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" <Comment>".."[\.]?/[^ \t\n] { // internal ellipsis addOutput(yyscanner,yytext); } -<Comment>(\n|\\_linebr)({B}*(\n|\\_linebr))+ { // at least one blank line (or blank line command) +<Comment>(\n|\\ilinebr)({B}*(\n|\\ilinebr))+ { // at least one blank line (or blank line command) if (yyextra->inContext==OutputXRef) { // see bug 613024, we need to put the newlines after ending the XRef section. @@ -842,7 +842,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" for (i=0;i<(yy_size_t)yyleng;) { if (yytext[i]=='\n') addOutput(yyscanner,'\n'),i++; - else if (strcmp(yytext+i,"\\_linebr")==0) addOutput(yyscanner,'\n'),i+=8; + else if (strcmp(yytext+i,"\\ilinebr")==0) addOutput(yyscanner,"\\ilinebr"),i+=8; else i++; } } @@ -852,7 +852,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" for (i=0;i<(yy_size_t)yyleng;) { if (yytext[i]=='\n') addOutput(yyscanner,'\n'),i++; - else if (strcmp(yytext+i,"\\_linebr")==0) addOutput(yyscanner,'\n'),i+=8; + else if (strcmp(yytext+i,"\\ilinebr")==0) addOutput(yyscanner,"\\ilinebr"),i+=8; else i++; } setOutput(yyscanner,OutputDoc); @@ -1342,7 +1342,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" addOutput(yyscanner,yytext); BEGIN( Comment ); } -<SectionTitle>[^\n@\\]*/"\\_linebr" { // end of section title +<SectionTitle>[^\n@\\]*/"\\ilinebr" { // end of section title addSection(yyscanner); addOutput(yyscanner,yytext); BEGIN( Comment ); @@ -2540,7 +2540,7 @@ static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringLi static bool handleLineBr(yyscan_t yyscanner,const QCString &, const QCStringList &) { - addOutput(yyscanner,'\n'); + addOutput(yyscanner,"\\ilinebr"); return FALSE; } diff --git a/src/doctokenizer.l b/src/doctokenizer.l index b1aa82f..6ea39d9 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -114,6 +114,20 @@ bool doctokenizerYYpopContext() return TRUE; } +QCString extractPartAfterNewLine(const QCString &text) +{ + int nl1 = text.findRev('\n'); + if (nl1!=-1) + { + return text.mid(nl1+1); + } + int nl2 = text.findRev("\\ilinebr"); + if (nl2!=-1) + { + return text.mid(nl2+8); + } + return text; +} //-------------------------------------------------------------------------- @@ -520,25 +534,23 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return TK_LISTITEM; } } -<St_Para>{BLANK}*\n{LISTITEM} { /* list item on next line */ - QCString text=yytext; - text=text.right(text.length()-text.find('\n')-1); +<St_Para>{BLANK}*(\n|"\\ilinebr"){LISTITEM} { /* list item on next line */ + QCString text=extractPartAfterNewLine(yytext); int dashPos = text.findRev('-'); g_token->isEnumList = text.at(dashPos+1)=='#'; g_token->id = -1; g_token->indent = computeIndent(text,dashPos); return TK_LISTITEM; } -<St_Para>{BLANK}*\n{MLISTITEM} { /* list item on next line */ +<St_Para>{BLANK}*(\n|"\\ilinebr"){MLISTITEM} { /* list item on next line */ if (!g_markdownSupport || g_insidePre) { REJECT; } else { - QCString text=yytext; + QCString text=extractPartAfterNewLine(yytext); static QRegExp re("[*+]"); - text=text.right(text.length()-text.find('\n')-1); int markPos = text.findRev(re); g_token->isEnumList = FALSE; g_token->id = -1; @@ -546,17 +558,14 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return TK_LISTITEM; } } -<St_Para>{BLANK}*\n{OLISTITEM} { /* list item on next line */ +<St_Para>{BLANK}*(\n|"\\ilinebr"){OLISTITEM} { /* list item on next line */ if (!g_markdownSupport || g_insidePre) { REJECT; } else { - QCString text=yytext; - int nl=text.findRev('\n'); - int len=text.length(); - text=text.right(len-nl-1); + QCString text=extractPartAfterNewLine(yytext); static QRegExp re("[1-9]"); int digitPos = text.find(re); int dotPos = text.find('.',digitPos); @@ -571,11 +580,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->indent = computeIndent(yytext,dotPos); return TK_ENDLIST; } -<St_Para>{BLANK}*\n{ENDLIST} { /* end list on next line */ - QCString text=yytext; - text=text.right(text.length()-text.find('\n')-1); +<St_Para>{BLANK}*(\n|"\\ilinebr"){ENDLIST} { /* end list on next line */ + QCString text=extractPartAfterNewLine(yytext); int dotPos = text.findRev('.'); - g_token->indent = computeIndent(text,dotPos); + g_token->indent = computeIndent(text,dotPos); return TK_ENDLIST; } <St_Para>"{"{BLANK}*"@link"/{BLANK}+ { @@ -586,9 +594,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->name = "inheritdoc"; return TK_COMMAND_AT; } -<St_Para>"@_fakenl" { // artificial new line - yylineno++; - } +<St_Para>"@_fakenl" { // artificial new line + yylineno++; + } <St_Para>{SPCMD3} { g_token->name = "_form"; bool ok; @@ -603,6 +611,8 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->paramDir=TokenInfo::Unspecified; return TK_COMMAND_SEL(); } +<St_Para>"\\ilinebr" { + } <St_Para>{SPCMD1} | <St_Para>{SPCMD2} | <St_Para>{SPCMD5} | @@ -1367,17 +1377,23 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} warn(g_fileName,yylineno,"Unexpected character '%s' while looking for section label or title",yytext); } -<St_Snippet>[^\n]+ | -<St_Snippet>[^\n]*\n { - g_token->name = yytext; +<St_Snippet>[^\\\n]+ { + g_token->name += yytext; + } +<St_Snippet>"\\" { + g_token->name += yytext; + } +<St_Snippet>(\n|"\\ilinebr") { g_token->name = g_token->name.stripWhiteSpace(); - return TK_WORD; + return TK_WORD; } /* Generic rules that work for all states */ <*>\n { warn(g_fileName,yylineno,"Unexpected new line character"); } +<*>"\\ilinebr" { + } <*>[\\@<>&$#%~"=] { /* unescaped special character */ //warn(g_fileName,yylineno,"Unexpected character '%s', assuming command \\%s was meant.",yytext,yytext); g_token->name = yytext; @@ -1571,6 +1587,7 @@ void doctokenizerYYsetStateAnchor() void doctokenizerYYsetStateSnippet() { + g_token->name=""; BEGIN(St_Snippet); } diff --git a/src/doxygen.cpp b/src/doxygen.cpp index f073051..bc8eed7 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -9628,7 +9628,7 @@ static void escapeAliases() value.mid(in,14)!="\\nosubgrouping" ) { - newValue+="\\_linebr "; + newValue+="\\ilinebr "; } else { @@ -9643,7 +9643,7 @@ static void escapeAliases() while ((in=value.find("^^",p))!=-1) { newValue+=value.mid(p,in-p); - newValue+="\\\\_linebr "; + newValue+="\\ilinebr "; p=in+2; } newValue+=value.mid(p,value.length()-p); diff --git a/src/markdown.cpp b/src/markdown.cpp index 34a9935..2add54c 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -52,6 +52,90 @@ #include "message.h" #include "portable.h" +#if !defined(NDEBUG) +#define ENABLE_TRACING +#endif + +#ifdef ENABLE_TRACING +#define IOSTREAM stdout +#define DATA_BUFSIZE 20 +#if defined(_WIN32) && !defined(CYGWIN) +#define PRETTY_FUNC __FUNCSIG__ +#else +#define PRETTY_FUNC __PRETTY_FUNCTION__ +#endif + +class Trace +{ + public: + Trace(const char *func) : m_func(func) + { + if (Debug::isFlagSet(Debug::Markdown)) + { + fprintf(IOSTREAM,"> %s\n",func); + s_indent++; + } + } + Trace(const char *func,const char *data) : m_func(func) + { + if (Debug::isFlagSet(Debug::Markdown)) + { + indent(); + char data_s[DATA_BUFSIZE*2+1] = ""; // worst case each input char outputs 2 chars + 0 terminator. + int j=0; + if (data) + { + for (int i=0;i<DATA_BUFSIZE;i++) + { + char c=data[i]; + if (c==0) break; + else if (c=='\n') { data_s[j++]='\\'; data_s[j++]='n'; } + else if (c=='\t') { data_s[j++]='\\'; data_s[j++]='t'; } + else if (c=='\r') { data_s[j++]='\\'; data_s[j++]='r'; } + else if (c=='\\') { data_s[j++]='\\'; data_s[j++]='\\'; } + else data_s[j++]=c; + } + } + data_s[j++]=0; + fprintf(IOSTREAM,"> %s data=[%s…]\n",func,data_s); + s_indent++; + } + } + ~Trace() + { + if (Debug::isFlagSet(Debug::Markdown)) + { + s_indent--; + indent(); + fprintf(IOSTREAM,"< %s\n",m_func); + } + } + void trace(const char *fmt,...) + { + if (Debug::isFlagSet(Debug::Markdown)) + { + indent(); + fprintf(IOSTREAM,": %s: ",m_func); + va_list args; + va_start(args,fmt); + vfprintf(IOSTREAM, fmt, args); + va_end(args); + } + } + private: + void indent() { for (int i=0;i<s_indent;i++) fputs(" ",IOSTREAM); } + const char *m_func; + static int s_indent; +}; + +int Trace::s_indent = 0; +#define TRACE(data) Trace trace_(PRETTY_FUNC,data); +#define TRACE_MORE(...) trace_.trace(__VA_ARGS__); +#else +#define TRACE(data) do {} while(false) +#define TRACE_MORE(...) do {} while(false) +#endif + //----------- // is character at position i in data part of an identifier? @@ -79,15 +163,6 @@ data[i]=='\\' || \ data[i]=='@') -inline int isNewline(const char *data) -{ - // plain return - if (data[0] == '\n') return(1); - // doxygen return from ^^ in ALIASES - if (data[0] == '\\' && data[1] == '\\' && data[2] == '_' && data[3] == 'l' && data[4] == 'i' && - data[5] == 'n' && data[6] == 'e' && data[7] == 'b' && data[8] == 'r') return(9); - return(0); -} //---------- struct TableCell @@ -127,9 +202,21 @@ const int codeBlockIndent = 4; //---------- helpers ------- +// test if the next characters in data represent a new line (which can be character \n or string \ilinebr). +// returns 0 if no newline is found, or the number of characters that make up the newline if found. +inline int isNewline(const char *data) +{ + // normal newline + if (data[0] == '\n') return 1; + // artificial new line from ^^ in ALIASES + if (data[0] == '\\' && qstrncmp(data+1,"ilinebr",7)==0) return 8; + return 0; +} + // escape characters that have a special meaning later on. static QCString escapeSpecialChars(const QCString &s) { + TRACE(s.data()); if (s.isEmpty()) return ""; bool insideQuote=FALSE; GrowBuf growBuf; @@ -155,6 +242,7 @@ static QCString escapeSpecialChars(const QCString &s) static void convertStringFragment(QCString &result,const char *data,int size) { + TRACE(result.data()); if (size<0) size=0; result.resize(size+1); memcpy(result.rawData(),data,size); @@ -206,6 +294,7 @@ static Alignment markersToAlignment(bool leftMarker,bool rightMarker) // \manonly..\endmanonly QCString Markdown::isBlockCommand(const char *data,int offset,int size) { + TRACE(data); bool openBracket = offset>0 && data[-1]=='{'; bool isEscaped = offset>0 && (data[-1]=='\\' || data[-1]=='@'); if (isEscaped) return QCString(); @@ -260,6 +349,7 @@ QCString Markdown::isBlockCommand(const char *data,int offset,int size) */ int Markdown::findEmphasisChar(const char *data, int size, char c, int c_size) { + TRACE(data); int i = 1; while (i<size) @@ -358,6 +448,7 @@ int Markdown::findEmphasisChar(const char *data, int size, char c, int c_size) /** process single emphasis */ int Markdown::processEmphasis1(const char *data, int size, char c) { + TRACE(data); int i = 0, len; /* skipping one symbol if coming from emph3 */ @@ -389,6 +480,7 @@ int Markdown::processEmphasis1(const char *data, int size, char c) /** process double emphasis */ int Markdown::processEmphasis2(const char *data, int size, char c) { + TRACE(data); int i = 0, len; while (i<size) @@ -420,6 +512,7 @@ int Markdown::processEmphasis2(const char *data, int size, char c) */ int Markdown::processEmphasis3(const char *data, int size, char c) { + TRACE(data); int i = 0, len; while (i<size) @@ -477,6 +570,7 @@ int Markdown::processEmphasis3(const char *data, int size, char c) /** Process ndash and mdashes */ int Markdown::processNmdash(const char *data,int off,int size) { + TRACE(data); // precondition: data[0]=='-' int i=1; int count=1; @@ -511,6 +605,7 @@ int Markdown::processNmdash(const char *data,int off,int size) /** Process quoted section "...", can contain one embedded newline */ int Markdown::processQuoted(const char *data,int,int size) { + TRACE(data); int i=1; int nl=0; while (i<size && data[i]!='"' && nl<2) @@ -532,6 +627,7 @@ int Markdown::processQuoted(const char *data,int,int size) */ int Markdown::processHtmlTagWrite(const char *data,int offset,int size,bool doWrite) { + TRACE(data); if (offset>0 && data[-1]=='\\') return 0; // escaped < // find the end of the html tag @@ -616,11 +712,13 @@ int Markdown::processHtmlTagWrite(const char *data,int offset,int size,bool doWr int Markdown::processHtmlTag(const char *data,int offset,int size) { + TRACE(data); return processHtmlTagWrite(data,offset,size,true); } int Markdown::processEmphasis(const char *data,int offset,int size) { + TRACE(data); if ((offset>0 && !isOpenEmphChar(-1)) || // invalid char before * or _ (size>1 && data[0]!=data[1] && !(isIdChar(1) || extraChar(1) || data[1]=='[')) || // invalid char after * or _ (size>2 && data[0]==data[1] && !(isIdChar(2) || extraChar(2) || data[2]=='['))) // invalid char after ** or __ @@ -686,6 +784,7 @@ void Markdown::writeMarkdownImage(const char *fmt, bool explicitTitle, int Markdown::processLink(const char *data,int,int size) { + TRACE(data); QCString content; QCString link; QCString title; @@ -985,6 +1084,7 @@ int Markdown::processLink(const char *data,int,int size) /** '`' parsing a code span (assuming codespan != 0) */ int Markdown::processCodeSpan(const char *data, int /*offset*/, int size) { + TRACE(data); int end, nb = 0, i, f_begin, f_end; /* counting the number of backticks in the delimiter */ @@ -1059,6 +1159,7 @@ int Markdown::processCodeSpan(const char *data, int /*offset*/, int size) void Markdown::addStrEscapeUtf8Nbsp(const char *s,int len) { + TRACE(s); if (Portable::strnstr(s,g_doxy_nsbp,len)==0) // no escape needed -> fast { m_out.addStr(s,len); @@ -1071,10 +1172,12 @@ void Markdown::addStrEscapeUtf8Nbsp(const char *s,int len) int Markdown::processSpecialCommand(const char *data, int offset, int size) { + TRACE(data); int i=1; QCString endBlockName = isBlockCommand(data,offset,size); if (!endBlockName.isEmpty()) { + TRACE_MORE("endBlockName=%s\n",qPrint(endBlockName)); int l = endBlockName.length(); while (i<size-l) { @@ -1085,6 +1188,7 @@ int Markdown::processSpecialCommand(const char *data, int offset, int size) { //printf("found end at %d\n",i); addStrEscapeUtf8Nbsp(data,i+1+l); + TRACE_MORE("result=%d\n",i+1+l); return i+1+l; } } @@ -1097,24 +1201,29 @@ int Markdown::processSpecialCommand(const char *data, int offset, int size) if (c=='[' || c==']' || c=='*' || c=='!' || c=='(' || c==')' || c=='`' || c=='_') { m_out.addChar(data[1]); + TRACE_MORE("result=2\n"); return 2; } else if (c=='-' && size>3 && data[2]=='-' && data[3]=='-') // \--- { m_out.addStr(&data[1],3); + TRACE_MORE("result=4\n"); return 4; } else if (c=='-' && size>2 && data[2]=='-') // \-- { m_out.addStr(&data[1],2); + TRACE_MORE("result=3\n"); return 3; } } + TRACE_MORE("result=0\n"); return 0; } void Markdown::processInline(const char *data,int size) { + TRACE(data); int i=0, end=0; Action_t action; while (i<size) @@ -1139,6 +1248,7 @@ void Markdown::processInline(const char *data,int size) /** returns whether the line is a setext-style hdr underline */ int Markdown::isHeaderline(const char *data, int size, bool allowAdjustLevel) { + TRACE(data); int i=0, c=0; while (i<size && data[i]==' ') i++; @@ -1172,6 +1282,7 @@ int Markdown::isHeaderline(const char *data, int size, bool allowAdjustLevel) /** returns TRUE if this line starts a block quote */ bool isBlockQuote(const char *data,int size,int indent) { + TRACE(data); int i = 0; while (i<size && data[i]==' ') i++; if (i<indent+codeBlockIndent) // could be a quotation @@ -1198,6 +1309,7 @@ bool isBlockQuote(const char *data,int size,int indent) static int isLinkRef(const char *data,int size, QCString &refid,QCString &link,QCString &title) { + TRACE(data); //printf("isLinkRef data={%s}\n",data); // format: start with [some text]: int i = 0; @@ -1287,6 +1399,7 @@ static int isLinkRef(const char *data,int size, static int isHRuler(const char *data,int size) { + TRACE(data); int i=0; if (size>0 && data[size-1]=='\n') size--; // ignore newline character while (i<size && data[i]==' ') i++; @@ -1314,6 +1427,7 @@ static int isHRuler(const char *data,int size) static QCString extractTitleId(QCString &title, int level) { + TRACE(title.data()); //static QRegExp r1("^[a-z_A-Z][a-z_A-Z0-9\\-]*:"); static QRegExp r2("\\{#[a-z_A-Z][a-z_A-Z0-9\\-]*\\}"); int l=0; @@ -1341,6 +1455,7 @@ static QCString extractTitleId(QCString &title, int level) int Markdown::isAtxHeader(const char *data,int size, QCString &header,QCString &id,bool allowAdjustLevel) { + TRACE(data); int i = 0, end; int level = 0, blanks=0; @@ -1399,6 +1514,7 @@ int Markdown::isAtxHeader(const char *data,int size, static int isEmptyLine(const char *data,int size) { + TRACE(data); int i=0; while (i<size) { @@ -1419,6 +1535,7 @@ static int isEmptyLine(const char *data,int size) // such as -, -#, *, +, 1., and <li> static int computeIndentExcludingListMarkers(const char *data,int size) { + TRACE(data); int i=0; int indent=0; bool isDigit=FALSE; @@ -1487,6 +1604,7 @@ static int computeIndentExcludingListMarkers(const char *data,int size) static bool isFencedCodeBlock(const char *data,int size,int refIndent, QCString &lang,int &start,int &end,int &offset) { + TRACE(data); // rules: at least 3 ~~~, end of the block same amount of ~~~'s, otherwise // return FALSE int i=0; @@ -1528,6 +1646,7 @@ static bool isFencedCodeBlock(const char *data,int size,int refIndent, static bool isCodeBlock(const char *data,int offset,int size,int &indent) { + TRACE(data); //printf("<isCodeBlock(offset=%d,size=%d,indent=%d)\n",offset,size,indent); // determine the indent of this line int i=0; @@ -1604,6 +1723,7 @@ static bool isCodeBlock(const char *data,int offset,int size,int &indent) */ int findTableColumns(const char *data,int size,int &start,int &end,int &columns) { + TRACE(data); int i=0,n=0; int eol; // find start character of the table line @@ -1612,8 +1732,10 @@ int findTableColumns(const char *data,int size,int &start,int &end,int &columns) start = i; // find end character of the table line + //while (i<size && data[i]!='\n') i++; + //eol=i+1; int j = 0; - while (i<size && !(j = isNewline(data + i))) i++; + while (i<size && (j = isNewline(data + i))==0) i++; eol=i+j; i--; @@ -1645,6 +1767,7 @@ int findTableColumns(const char *data,int size,int &start,int &end,int &columns) /** Returns TRUE iff data points to the start of a table block */ static bool isTableBlock(const char *data,int size) { + TRACE(data); int cc0,start,end; // the first line should have at least two columns separated by '|' @@ -1683,6 +1806,7 @@ static bool isTableBlock(const char *data,int size) int Markdown::writeTableBlock(const char *data,int size) { + TRACE(data); int i=0,j,k; int columns,start,end,cc; @@ -1857,7 +1981,7 @@ int Markdown::writeTableBlock(const char *data,int size) } // need at least one space on either side of the cell text in // order for doxygen to do other formatting - m_out.addStr("> " + cellText + " </" + cellTag + ">"); + m_out.addStr("> " + cellText + "\\ilinebr </" + cellTag + ">"); } cellTag = "td"; cellClass = "class=\"markdownTableBody"; @@ -1871,6 +1995,7 @@ int Markdown::writeTableBlock(const char *data,int size) static int hasLineBreak(const char *data,int size) { + TRACE(data); int i=0; int j=0; // search for end of line and also check if it is not a completely blank @@ -1887,6 +2012,7 @@ static int hasLineBreak(const char *data,int size) void Markdown::writeOneLineHeaderOrRuler(const char *data,int size) { + TRACE(data); int level; QCString header; QCString id; @@ -1939,6 +2065,7 @@ void Markdown::writeOneLineHeaderOrRuler(const char *data,int size) int Markdown::writeBlockQuote(const char *data,int size) { + TRACE(data); int l; int i=0; int curLevel=0; @@ -1995,6 +2122,7 @@ int Markdown::writeBlockQuote(const char *data,int size) int Markdown::writeCodeBlock(const char *data,int size,int refIndent) { + TRACE(data); int i=0,end; //printf("writeCodeBlock: data={%s}\n",QCString(data).left(size).data()); m_out.addStr("@verbatim\n"); @@ -2047,12 +2175,13 @@ int Markdown::writeCodeBlock(const char *data,int size,int refIndent) void Markdown::findEndOfLine(const char *data,int size, int &pi,int&i,int &end) { + TRACE(data); // find end of the line int nb=0; end=i+1; //while (end<=size && data[end-1]!='\n') - int j = 0; - while (end<=size && !(j = isNewline(data+end-1))) + int j=0; + while (end<=size && (j=isNewline(data+end-1))==0) { // while looking for the end of the line we might encounter a block // that needs to be passed unprocessed. @@ -2113,13 +2242,14 @@ void Markdown::findEndOfLine(const char *data,int size, end++; } } - if (j) end += j-1; + if (j>0) end+=j-1; //printf("findEndOfLine pi=%d i=%d end=%d {%s}\n",pi,i,end,QCString(data+i).left(end-i).data()); } void Markdown::writeFencedCodeBlock(const char *data,const char *lng, int blockStart,int blockEnd) { + TRACE(data); QCString lang = lng; if (!lang.isEmpty() && lang.at(0)=='.') lang=lang.mid(1); m_out.addStr("@code"); @@ -2134,6 +2264,7 @@ void Markdown::writeFencedCodeBlock(const char *data,const char *lng, QCString Markdown::processQuotations(const QCString &s,int refIndent) { + TRACE(s.data()); m_out.clear(); const char *data = s.data(); int size = s.length(); @@ -2192,6 +2323,7 @@ QCString Markdown::processQuotations(const QCString &s,int refIndent) QCString Markdown::processBlocks(const QCString &s,int indent) { + TRACE(s.data()); m_out.clear(); const char *data = s.data(); int size = s.length(); @@ -2333,6 +2465,7 @@ QCString Markdown::processBlocks(const QCString &s,int indent) /** returns TRUE if input string docs starts with \@page or \@mainpage command */ static bool isExplicitPage(const QCString &docs) { + TRACE(docs.data()); int i=0; const char *data = docs.data(); if (data) @@ -2355,6 +2488,7 @@ static bool isExplicitPage(const QCString &docs) QCString Markdown::extractPageTitle(QCString &docs,QCString &id) { + TRACE(docs.data()); int ln=0; // first first non-empty line QCString title; @@ -2402,6 +2536,7 @@ QCString Markdown::extractPageTitle(QCString &docs,QCString &id) QCString Markdown::detab(const QCString &s,int &refIndent) { + TRACE(s.data()); int tabSize = Config_getInt(TAB_SIZE); int size = s.length(); m_out.clear(); @@ -2517,6 +2652,7 @@ QCString Markdown::process(const QCString &input) QCString markdownFileNameToId(const QCString &fileName) { + TRACE(fileName.data()); QCString baseFn = stripFromPath(QFileInfo(fileName).absFilePath().utf8()); int i = baseFn.findRev('.'); if (i!=-1) baseFn = baseFn.left(i); -- cgit v0.12 From 6491b1b25148a87f46422889cf2db1387faa71c8 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch <doxygen@gmail.com> Date: Mon, 27 Jul 2020 14:56:40 +0200 Subject: Forgot to add space after internal \ilinebr command --- src/commentscan.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/commentscan.l b/src/commentscan.l index da8e577..4de7562 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -2540,7 +2540,7 @@ static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringLi static bool handleLineBr(yyscan_t yyscanner,const QCString &, const QCStringList &) { - addOutput(yyscanner,"\\ilinebr"); + addOutput(yyscanner,"\\ilinebr "); return FALSE; } -- cgit v0.12 From 10c1495dc8984ec3b800c290f1c7448e75478da1 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch <doxygen@gmail.com> Date: Tue, 28 Jul 2020 09:27:45 +0200 Subject: Better handling of \\ilinebr - Routines to strip leading and trailing whitespace now also take \\ilinebr into account - Added a number of cases in doctokenizer.l where \\ilinebr wasn't handled yet. --- src/commentscan.l | 18 +++++++++++++++++- src/doctokenizer.l | 30 ++++++++++++++++++++++++++---- src/util.cpp | 15 +++++++++------ 3 files changed, 52 insertions(+), 11 deletions(-) diff --git a/src/commentscan.l b/src/commentscan.l index 4de7562..3d0ca69 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -2972,7 +2972,23 @@ 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--; + while (i>=0) + { + c = s.at(i); + if (c==' ' || c=='\t' || c=='\r') // normal whitespace + { + i--; + } + else if (c=='r' && i>=7 && qstrncmp("\\ilinebr",s.data()+i-7,8)==0) // special line break marker + { + i-=8; + } + else // non-whitespace + { + break; + } + } + //printf("stripTrailingWhitespace(%s) i=%d len=%d\n",s.data(),i,len); if (i!=(int)len-1) { s.resize(i+2); // string up to and including char at pos i and \0 terminator diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 6ea39d9..51d234b 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -954,6 +954,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(*yytext); return 0; } +<St_Title>"\\ilinebr" { + return 0; + } <St_TitleN>"&"{ID}";" { /* symbol */ g_token->name = yytext; return TK_SYMBOL; @@ -990,6 +993,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(*yytext); return 0; } +<St_TitleN>"\\ilinebr" { + return 0; + } <St_TitleQ>"&"{ID}";" { /* symbol */ g_token->name = yytext; return TK_SYMBOL; @@ -1017,6 +1023,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(*yytext); return 0; } +<St_TitleQ>"\\ilinebr" { + return 0; + } <St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* { // title attribute g_token->name = yytext; g_token->name = g_token->name.left(g_token->name.find('=')).stripWhiteSpace(); @@ -1035,6 +1044,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(*yytext); return 0; } +<St_TitleV,St_TitleA>"\\ilinebr" { + return 0; + } <St_Anchor>{LABELID}{WS}? { // anchor g_token->name = QCString(yytext).stripWhiteSpace(); @@ -1064,6 +1076,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(*yytext); return 0; } +<St_Cite>"\\ilinebr" { + return 0; + } <St_Cite>. { // any other character unput(*yytext); return 0; @@ -1091,6 +1106,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(*yytext); return 0; } +<St_Ref>"\\ilinebr" { + return 0; + } <St_Ref>. { // any other character unput(*yytext); return 0; @@ -1150,7 +1168,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->chars=yytext; return TK_WHITESPACE; } -<St_Ref2>"\""|\n { /* " or \n => end of title */ +<St_Ref2>"\""|\n|"\\ilinebr" { /* " or \n => end of title */ return 0; } <St_XRefItem>{LABELID} { @@ -1246,7 +1264,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} /* State for skipping title (all chars until the end of the line) */ <St_SkipTitle>. -<St_SkipTitle>\n { return 0; } +<St_SkipTitle>(\n|"\\ilinebr") { return 0; } /* State for the pass used to find the anchors and sections */ @@ -1352,9 +1370,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} } <St_SecSkip>[^a-z_A-Z0-9\-\\\@]+ <St_SecSkip>. -<St_SecSkip>\n +<St_SecSkip>(\n|"\\ilinebr") <St_Sections>. -<St_Sections>\n +<St_Sections>(\n|"\\ilinebr") <St_SecLabel1>{LABELID} { g_secLabel = yytext; processSection(); @@ -1370,6 +1388,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} <St_SecTitle>[^\n]*\n { g_secTitle = yytext; g_secTitle = g_secTitle.stripWhiteSpace(); + if (g_secTitle.right(8)=="\\ilinebr") + { + g_secTitle.left(g_secTitle.length()-8); + } processSection(); BEGIN(St_Sections); } diff --git a/src/util.cpp b/src/util.cpp index 8b3f618..13ae200 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -6612,10 +6612,11 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine) // search for leading empty lines int i=0,li=-1,l=s.length(); char c; - while ((c=*p++)) + while ((c=*p)) { - if (c==' ' || c=='\t' || c=='\r') i++; - else if (c=='\n') i++,li=i,docLine++; + if (c==' ' || c=='\t' || c=='\r') i++,p++; + else if (c=='\\' && qstrncmp(p,"\\ilinebr",8)==0) i+=8,li=i,docLine++,p+=8; + else if (c=='\n') i++,li=i,docLine++,p++; else break; } @@ -6624,9 +6625,10 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine) p=s.data()+b; while (b>=0) { - c=*p; p--; - if (c==' ' || c=='\t' || c=='\r') b--; - else if (c=='\n') bi=b,b--; + c=*p; + if (c==' ' || c=='\t' || c=='\r') b--,p--; + else if (c=='r' && b>=7 && qstrncmp(p-7,"\\ilinebr",8)==0) bi=b-7,b-=8,p-=8; + else if (c=='\n') bi=b,b--,p--; else break; } @@ -6637,6 +6639,7 @@ QCString stripLeadingAndTrailingEmptyLines(const QCString &s,int &docLine) if (bi==-1) bi=l; if (li==-1) li=0; if (bi<=li) return 0; // only empty lines + //printf("docLine='%s' len=%d li=%d bi=%d\n",s.data(),s.length(),li,bi); return s.mid(li,bi-li); } -- cgit v0.12 From 4fbe0ad60921724faf6ba635df13983b3496f3e9 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch <doxygen@gmail.com> Date: Tue, 28 Jul 2020 09:51:41 +0200 Subject: More improvement regarding \\ilinebr handling - White space around \\ilinebr is not preserved in commentscan - Cases where \n was unput in doctokenizer are now handled in the same way for \\ilinebr --- src/commentscan.l | 14 +++++--------- src/doctokenizer.l | 6 ++++++ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/commentscan.l b/src/commentscan.l index 3d0ca69..763a2dd 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -163,7 +163,6 @@ struct DocCmdMap static const std::map< std::string, DocCmdMap > docCmdMap = { // command name handler function command spacing - { "ilinebr", { &handleLineBr, CommandSpacing::Inline }}, { "addindex", { &handleAddIndex, CommandSpacing::Invisible }}, { "addtogroup", { &handleAddToGroup, CommandSpacing::Invisible }}, { "anchor", { &handleAnchor, CommandSpacing::Invisible }}, @@ -646,6 +645,9 @@ RCSTAG "$"{ID}":"[^\n$]+"$" ); yyextra->inInternalDocs = FALSE; } +<Comment>{B}*"\\ilinebr"{B}* { // preserve spacing around \\ilinebr + addOutput(yyscanner,yytext); + } <Comment>{B}*{CMD}[a-z_A-Z]+"{"[a-zA-Z_,:0-9\. ]*"}"{B}* | <Comment>{B}*{CMD}[a-z_A-Z]+{B}* { // potentially interesting command // the {B}* in the front was added for bug620924 @@ -663,8 +665,8 @@ RCSTAG "$"{ID}":"[^\n$]+"$" else // options present { cmdName = fullMatch.left(idx).stripWhiteSpace().data()+1; // to remove {CMD} - QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace(); - optList = QCStringList::split(',',optStr); + QCString optStr = fullMatch.mid(idx+1,idxEnd-idx-1).stripWhiteSpace(); + optList = QCStringList::split(',',optStr); } auto it = docCmdMap.find(cmdName.data()); if (it!=docCmdMap.end()) // special action is required @@ -2538,12 +2540,6 @@ static bool handleInternal(yyscan_t yyscanner,const QCString &, const QCStringLi return FALSE; } -static bool handleLineBr(yyscan_t yyscanner,const QCString &, const QCStringList &) -{ - addOutput(yyscanner,"\\ilinebr "); - return FALSE; -} - static bool handleStatic(yyscan_t yyscanner,const QCString &, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 51d234b..0b14613 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -955,6 +955,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_Title>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } <St_TitleN>"&"{ID}";" { /* symbol */ @@ -994,6 +995,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_TitleN>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } <St_TitleQ>"&"{ID}";" { /* symbol */ @@ -1024,6 +1026,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_TitleQ>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } <St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* { // title attribute @@ -1045,6 +1048,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_TitleV,St_TitleA>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } @@ -1077,6 +1081,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_Cite>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } <St_Cite>. { // any other character @@ -1107,6 +1112,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return 0; } <St_Ref>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } <St_Ref>. { // any other character -- cgit v0.12 From 2340c1e7230b2d83ec34cb6a6a21c47b180d8a51 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch <doxygen@gmail.com> Date: Tue, 28 Jul 2020 10:21:01 +0200 Subject: More \ilinebr related cleanup and combined some rules --- src/commentscan.l | 1 - src/doctokenizer.l | 48 +++++++++++++++++++----------------------------- 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/src/commentscan.l b/src/commentscan.l index 763a2dd..5c49323 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -119,7 +119,6 @@ static bool handleHideReferencedByRelation(yyscan_t yyscanner,const QCString &, 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 &); diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 0b14613..b1ccd23 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -810,9 +810,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->name = g_token->name.mid(i+1,g_token->name.length()-i-2); BEGIN(St_Code); } +<St_CodeOpt>"\\ilinebr" | <St_CodeOpt>\n | <St_CodeOpt>. { - unput(*yytext); + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); BEGIN(St_Code); } <St_Code>{WS}*{CMD}"endcode" { @@ -834,6 +835,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(*yytext); BEGIN(St_HtmlOnly); } +<St_HtmlOnlyOption>"\\ilinebr" { + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); + BEGIN(St_HtmlOnly); + } <St_HtmlOnly>{CMD}"endhtmlonly" { return RetVal_OK; } @@ -925,10 +930,15 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->sectionId = QCString(yytext).stripWhiteSpace(); return RetVal_OK; } +<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}*/"\\linebr" { // case 5: plain file name specified without title or attributes + g_token->sectionId = QCString(yytext).stripWhiteSpace(); + return RetVal_OK; + } +<St_PlantUMLOpt>"\\ilinebr" | <St_PlantUMLOpt>"\n" | <St_PlantUMLOpt>. { g_token->sectionId = ""; - unput(*yytext); + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return RetVal_OK; } <St_PlantUML>{CMD}"enduml" { @@ -990,11 +1000,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->chars=yytext; return TK_WHITESPACE; } -<St_TitleN>\n { /* new line => end of title */ - unput(*yytext); - return 0; - } -<St_TitleN>"\\ilinebr" { +<St_TitleN>(\n|"\\ilinebr") { /* new line => end of title */ for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } @@ -1021,11 +1027,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} BEGIN(St_TitleA); return 0; } -<St_TitleQ>\n { /* new line => end of title */ - unput(*yytext); - return 0; - } -<St_TitleQ>"\\ilinebr" { +<St_TitleQ>(\n|"\\ilinebr") { /* new line => end of title */ for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } @@ -1043,11 +1045,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(*yytext); return 0; } -<St_TitleV,St_TitleA>\n { - unput(*yytext); - return 0; - } -<St_TitleV,St_TitleA>"\\ilinebr" { +<St_TitleV,St_TitleA>(\n|"\\ilinebr") { for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; } @@ -1076,14 +1074,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} unput(' '); return 0; } -<St_Cite>\n { // new line - unput(*yytext); - return 0; - } -<St_Cite>"\\ilinebr" { +<St_Cite>(\n|"\\ilinebr") { // new line for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; - } + } <St_Cite>. { // any other character unput(*yytext); return 0; @@ -1107,14 +1101,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} <St_Ref>{WS}+"\""{WS}* { // white space following by quoted string BEGIN(St_Ref2); } -<St_Ref>\n { // new line - unput(*yytext); - return 0; - } -<St_Ref>"\\ilinebr" { +<St_Ref>(\n|"\\ilinebr") { // new line for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); return 0; - } + } <St_Ref>. { // any other character unput(*yytext); return 0; -- cgit v0.12 From bf12c99e3a370921e03c946d213129633eaeec27 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch <doxygen@gmail.com> Date: Tue, 28 Jul 2020 10:28:23 +0200 Subject: Fixed typo --- src/doctokenizer.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doctokenizer.l b/src/doctokenizer.l index b1ccd23..0b7e36d 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -930,7 +930,7 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->sectionId = QCString(yytext).stripWhiteSpace(); return RetVal_OK; } -<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}*/"\\linebr" { // case 5: plain file name specified without title or attributes +<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}*/"\\ilinebr" { // case 5: plain file name specified without title or attributes g_token->sectionId = QCString(yytext).stripWhiteSpace(); return RetVal_OK; } -- cgit v0.12 From b3fca8f555183bb8a6863558d912e06f9dd2c929 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch <doxygen@gmail.com> Date: Tue, 28 Jul 2020 10:39:27 +0200 Subject: More minor tweaks --- src/fortranscanner.l | 4 +--- src/pyscanner.l | 4 +--- src/scanner.l | 4 +--- src/vhdljjparser.cpp | 8 ++++---- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/fortranscanner.l b/src/fortranscanner.l index 81dcb16..cf48a3e 100644 --- a/src/fortranscanner.l +++ b/src/fortranscanner.l @@ -2518,9 +2518,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief int position=0; bool needsEntry = FALSE; Markdown markdown(yyextra->fileName,lineNr); - int startNewlines = 0; - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,startNewlines) : doc; - lineNr += startNewlines; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,lineNr) : doc; while (yyextra->commentScanner.parseCommentBlock( yyextra->thisParser, yyextra->docBlockInBody ? yyextra->subrCurrent.back().get() : yyextra->current.get(), diff --git a/src/pyscanner.l b/src/pyscanner.l index 6a80e34..822ea77 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -1631,9 +1631,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief bool needsEntry; int lineNr = brief ? yyextra->current->briefLine : yyextra->current->docLine; Markdown markdown(yyextra->yyFileName,lineNr); - int startNewlines = 0; - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,startNewlines) : doc; - lineNr += startNewlines; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,lineNr) : doc; while (yyextra->commentScanner.parseCommentBlock( yyextra->thisParser, (yyextra->docBlockInBody && yyextra->previous) ? yyextra->previous.get() : yyextra->current.get(), diff --git a/src/scanner.l b/src/scanner.l index c1d2ab6..e63b8a0 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -7020,9 +7020,7 @@ static void handleCommentBlock(yyscan_t yyscanner,const QCString &doc,bool brief bool needsEntry=FALSE; Markdown markdown(yyextra->yyFileName,lineNr); QCString strippedDoc = stripIndentation(doc); - int startNewlines = 0; - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,startNewlines) : strippedDoc; - lineNr += startNewlines; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(strippedDoc,lineNr) : strippedDoc; while (yyextra->commentScanner.parseCommentBlock( yyextra->thisParser, yyextra->docBlockInBody && yyextra->previous ? yyextra->previous.get() : yyextra->current.get(), diff --git a/src/vhdljjparser.cpp b/src/vhdljjparser.cpp index 50790e8..7c83d52 100644 --- a/src/vhdljjparser.cpp +++ b/src/vhdljjparser.cpp @@ -397,18 +397,18 @@ void VHDLOutlineParser::handleCommentBlock(const char *doc1, bool brief) s->current->docLine = p->yyLineNr; } - + Markdown markdown(p->yyFileName,p->iDocLine); - int startNewlines = 0; - QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,startNewlines) : doc; + int lineNr = p->iDocLine; + QCString processedDoc = Config_getBool(MARKDOWN_SUPPORT) ? markdown.process(doc,lineNr) : doc; while (p->commentScanner.parseCommentBlock( p->thisParser, s->current.get(), processedDoc, // text p->yyFileName, // file - p->iDocLine, // line of block start + lineNr, // line of block start brief, 0, FALSE, -- cgit v0.12 From 4c9baef41c6a8519ad0067d0707c82ff4db09fec Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch <doxygen@gmail.com> Date: Wed, 29 Jul 2020 16:01:00 +0200 Subject: More fixes regarding \ilinebr handling --- src/doctokenizer.l | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 0b7e36d..c0c6789 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -1008,6 +1008,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->name = yytext; return TK_SYMBOL; } +<St_TitleQ>(\n|"\\ilinebr") { /* new line => end of title */ + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); + return 0; + } <St_TitleQ>{SPCMD1} | <St_TitleQ>{SPCMD2} { /* special command */ g_token->name = yytext+1; @@ -1027,10 +1031,6 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} BEGIN(St_TitleA); return 0; } -<St_TitleQ>(\n|"\\ilinebr") { /* new line => end of title */ - for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); - return 0; - } <St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* { // title attribute g_token->name = yytext; g_token->name = g_token->name.left(g_token->name.find('=')).stripWhiteSpace(); @@ -1148,6 +1148,9 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->name = yytext; return TK_SYMBOL; } +<St_Ref2>"\""|\n|"\\ilinebr" { /* " or \n => end of title */ + return 0; + } <St_Ref2>{SPCMD1} | <St_Ref2>{SPCMD2} { /* special command */ g_token->name = yytext+1; @@ -1164,9 +1167,6 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->chars=yytext; return TK_WHITESPACE; } -<St_Ref2>"\""|\n|"\\ilinebr" { /* " or \n => end of title */ - return 0; - } <St_XRefItem>{LABELID} { g_token->name=yytext; } -- cgit v0.12 From 517ec716de0f3a08fcd3bed2626b776a36c663f5 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch <doxygen@gmail.com> Date: Wed, 29 Jul 2020 16:02:34 +0200 Subject: And one more fix for \ilinebr handling --- src/doctokenizer.l | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doctokenizer.l b/src/doctokenizer.l index c0c6789..f232c3a 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -974,6 +974,10 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} } <St_TitleN>{HTMLTAG} { } +<St_TitleN>(\n|"\\ilinebr") { /* new line => end of title */ + for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); + return 0; + } <St_TitleN>{SPCMD1} | <St_TitleN>{SPCMD2} { /* special command */ g_token->name = yytext+1; @@ -1000,10 +1004,6 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->chars=yytext; return TK_WHITESPACE; } -<St_TitleN>(\n|"\\ilinebr") { /* new line => end of title */ - for (int i=yyleng-1;i>=0;i--) unput(yytext[i]); - return 0; - } <St_TitleQ>"&"{ID}";" { /* symbol */ g_token->name = yytext; return TK_SYMBOL; -- cgit v0.12 From 30cfbe69de24e6d1d6b718971168be1ac246e3e2 Mon Sep 17 00:00:00 2001 From: Deniz Bahadir <Bagira80@users.noreply.github.com> Date: Wed, 29 Jul 2020 16:06:02 +0200 Subject: Fix compiling with clang parser support and with Clang compiler, too (#7922) * Fix compiling with clang parser support and with Clang compiler, too When compiling the code with the Clang compiler a new CMake option `use_libc++` is available which is enabled by default. It determines if the Clang compiler should use libc++ as its C++ standard library or uses the systems default (e.g. libstdc++ on Linux). Disabling that option might help when compiling with Clang and the option `use_libclang` is enabled but the associated library was not built with libc++ as its C++ standard library. Additionally, the doxygen executable that is created when CMake option `static_libclang` is enabled, no longer crashes. * Removing obsolete (and wrong) forcing of -std=c++11 for GCC The entire Doxygen project already requires the compiler to run in C++14 mode. That setting is applied globally in the top-most `CMakeLists.txt` file. Therefore, forcing GCC to run in C++11 mode in `src/CMakeLists.txt` is wrong and obsolete. --- CMakeLists.txt | 3 +++ src/CMakeLists.txt | 18 ++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e76a745..35e6a0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,9 @@ option(build_search "Build external search tools (doxysearch and doxyindexer) option(build_doc "Build user manual (HTML and PDF)" OFF) option(build_doc_chm "Build user manual (CHM)" OFF) option(use_sqlite3 "Add support for sqlite3 output [experimental]." OFF) +if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + option(use_libc++ "Use libc++ as C++ standard library." ON) +endif() option(use_libclang "Add support for libclang parsing." OFF) option(static_libclang "Link to a statically compiled version of LLVM/libclang." OFF) option(win_static "Link with /MT in stead of /MD on windows" OFF) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5ba80b7..8b11a2d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -322,25 +322,23 @@ if (use_libclang) cmake_minimum_required(VERSION 3.1) target_compile_features(doxymain PRIVATE cxx_alignof) target_compile_features(doxygen PRIVATE cxx_alignof) - target_compile_options(doxymain PRIVATE -stdlib=libc++) - target_compile_options(doxygen PRIVATE -stdlib=libc++) - elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - target_compile_options(doxymain PRIVATE -std=c++11) - target_compile_options(doxygen PRIVATE -std=c++11) + if (use_libc++) + target_compile_options(doxymain PRIVATE -stdlib=libc++) + target_compile_options(doxygen PRIVATE -stdlib=libc++) + endif() endif() include_directories(${LLVM_INCLUDE_DIRS}) add_definitions(${LLVM_DEFINITIONS}) if (static_libclang) - llvm_map_components_to_libnames(llvm_libs support core option) - set(CLANG_LIBS libclang clangTooling ${llvm_libs}) + set(CLANG_LIBS libclang clangTooling) else() # dynamically linked version of clang - llvm_map_components_to_libnames(llvm_libs support) - set(CLANG_LIBS libclang clang-cpp ${llvm_libs}) + llvm_config(doxymain USE_SHARED support) + set(CLANG_LIBS libclang clang-cpp) endif() target_compile_definitions(doxygen PRIVATE ${LLVM_DEFINITIONS}) endif() -target_link_libraries(doxygen +target_link_libraries(doxygen PRIVATE doxymain doxycfg qtools -- cgit v0.12 From 89f9d113d0d788552a32b699a89f273f6ce58c0f Mon Sep 17 00:00:00 2001 From: albert-github <albert.tests@gmail.com> Date: Wed, 29 Jul 2020 18:00:57 +0200 Subject: crossref citations are shown unconditionally The crossref items in a bib file are unconditionally added to the list of used citations although the the citation to which the crossref belongs to is not used. This has been fixed. The problem was seen in the CGAL output. Note: a crossref in LaTeX is a bit different from the normal understanding of cross-reference, from https://tex.stackexchange.com/questions/401138/what-is-the-bibtex-crossref-field-used-for: "crossref can be used if you have multiple entries referring to the same proceeding, book or similar." --- src/cite.cpp | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/src/cite.cpp b/src/cite.cpp index 78df0c3..d02cb75 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -139,6 +139,7 @@ void CitationManager::generatePage() input.at(fi.size())='\0'; int pos=0; int s; + QCString label1; while ((s=input.find('\n',pos))!=-1) { QCString line = input.mid((uint)pos,(uint)(s-pos)); @@ -152,12 +153,48 @@ void CitationManager::generatePage() if (j!=-1 && k!=-1) { QCString label = line.mid((uint)(j+1),(uint)(k-j-1)); - if (p->entries.find(label.data())==p->entries.end()) // not found yet + // check if the reference with the cross reference is used + // insert cross refererence when cross reference has not yet been added. + if ((p->entries.find(label1.data())!=p->entries.end()) && + (p->entries.find(label.data())==p->entries.end())) // not found yet { insert(label); } } } + else if (line.stripWhiteSpace().startsWith("@")) + { + // assumption entry like: "@book { name," or "@book { name" (spaces optional) + int j=line.find("{",0); + // when no {, go hunting for it + while (j==-1 && (s=input.find('\n',pos))!=-1) + { + line = input.mid((uint)pos,(uint)(s-pos)); + j=line.find("{",0); + pos=s+1; + } + // search for the name + label1 = ""; + while (label1.isEmpty()) + { + int k=line.find(",",j); + if (k != -1) + { + label1 = line.mid((uint)(j+1),(uint)(k-j-1)); + } + else + { + label1 = line.mid((uint)(j+1)); + } + label1 = label1.stripWhiteSpace(); + j = -1; + if (label1.isEmpty() && (s=input.find('\n',pos))!=-1) + { + line = input.mid((uint)pos,(uint)(s-pos)); + pos=s+1; + } + } + } } } } -- cgit v0.12 From 52a520090ee1354526a073753244bf8210d6194b Mon Sep 17 00:00:00 2001 From: Glenn Kasten <gkasten@google.com> Date: Wed, 29 Jul 2020 10:14:08 -0700 Subject: Prefer more inclusive language MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Doxygen is used for some Android API documentation, hence: Update language to comply with Android’s inclusive language guidance. See https://source.android.com/setup/contribute/respectful-code for reference --- src/config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.xml b/src/config.xml index f7d9a9e..bc5f696 100644 --- a/src/config.xml +++ b/src/config.xml @@ -2156,7 +2156,7 @@ The \c DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. <![CDATA[ The \c GENERATE_CHI flag controls if a separate `.chi` index file is generated (\c YES) or that - it should be included in the master `.chm` file (\c NO). + it should be included in the main `.chm` file (\c NO). -- cgit v0.12 From d2b3bc01f81e842ecc5baaf74e4402bc24e841e5 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Wed, 29 Jul 2020 22:13:58 +0200 Subject: Renamed stripSpaces to stripIndentation and make it work directly on the string passed. --- src/pyscanner.l | 55 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/src/pyscanner.l b/src/pyscanner.l index 7e06b77..773391b 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -141,7 +141,7 @@ 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 QCString stripSpace(const char * doc,const int ind); +static void stripIndentation(QCString &doc,const int indentationLevel); static yy_size_t yyread(yyscan_t yyscanner,char *buf,yy_size_t max_size); @@ -1253,7 +1253,7 @@ STARTDOCSYMS "##" QCString actualDoc=yyextra->docBlock; if (!yyextra->docBlockSpecial) // legacy unformatted docstring { - actualDoc = stripSpace(actualDoc,yyextra->commentIndent); + stripIndentation(actualDoc,yyextra->commentIndent); actualDoc.prepend("\\verbatim\n"); actualDoc.append("\\endverbatim "); } @@ -1265,7 +1265,7 @@ STARTDOCSYMS "##" QCString actualDoc=yyextra->docBlock; if (!yyextra->docBlockSpecial) // legacy unformatted docstring { - actualDoc = stripSpace(actualDoc,yyextra->commentIndent); + stripIndentation(actualDoc,yyextra->commentIndent); actualDoc.prepend("\\verbatim\n"); actualDoc.append("\\endverbatim "); } @@ -1522,52 +1522,55 @@ static inline int computeIndent(const char *s) return col; } -static QCString stripSpace(const char *doc,const int ind) +// strip up to \a indentationLevel spaces from each line in \a doc (excluding the first line) +static void stripIndentation(QCString &doc,const int indentationLevel) { - static GrowBuf growBuf; - growBuf.clear(); - if (ind <= 0) return doc; - signed char c; - const signed char *p=(const signed char*)doc; - bool startLine = false; + if (indentationLevel <= 0) return; // nothing to strip + + // by stripping content the string will only become shorter so we write the results + // back into the input string and then resize it at the end. + char c; + const char *src = doc.data(); + char *dst = doc.rawData(); + bool insideIndent = false; // skip the initial line from stripping int cnt = 0; - while ((c=*p++)!=0) + while ((c=*src++)!=0) { + // invariant: dst<=src switch(c) { case '\n': - growBuf.addChar(c); - startLine = true; - cnt = ind; + *dst++ = c; + insideIndent = true; + cnt = indentationLevel; break; case ' ': - if (startLine) + if (insideIndent) { - if (cnt) + if (cnt>0) // count down the spacing until the end of the indent { cnt--; } - else + else // reached the end of the indent, start of the part of the line to keep { - startLine = false; - growBuf.addChar(c); + insideIndent = false; + *dst++ = c; } } - else + else // part after indent, copy to the output { - growBuf.addChar(c); + *dst++ = c; } break; default: - startLine = false; - growBuf.addChar(c); + insideIndent = false; + *dst++ = c; break; } } - - growBuf.addChar(0); - return growBuf.get(); + doc.resize(dst-doc.data()+1); } + static QCString findPackageScopeFromPath(yyscan_t yyscanner,const QCString &path) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; -- cgit v0.12 From 4ae47ae6f238d465eefa1b5a85c0cf3f7857bc57 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Thu, 30 Jul 2020 11:36:55 +0200 Subject: Added configuration options to better control the sqlite3 output. Still requires cmake -Duse_sqlite=YES to compile in support (and libsqlite3) New configuration options available: - GENERATE_SQLITE3 enable/disable SQLITE3 output - SQLITE3_OUTPUT configure directory where output is written to (default: sqlite3) - SQLITE3_RECREATE_DB controls if existing database file is overwritten (default: YES) --- src/config.xml | 17 ++++++++++++----- src/configgen.py | 5 +++++ src/doxygen.cpp | 20 ++++++++++++-------- src/sqlite3gen.cpp | 20 ++++++++++++++------ 4 files changed, 43 insertions(+), 19 deletions(-) diff --git a/src/config.xml b/src/config.xml index bc5f696..81610c0 100644 --- a/src/config.xml +++ b/src/config.xml @@ -3034,9 +3034,8 @@ front of it. -
      [Solutions]
      \bibxhtmlname{Algorithmic Solutions}. ``` instead of (from another entry): ```
      [Merigot et~al., 2011]
      \bibxhtmlname{Quentin Merigot}, \bibxhtmlname{Maks ``` Note the `\n` after the `) { next loop; } $nentry++; - ($bcite, $blabel) = m+
      \[([^\]]*)\]
      +; + ($bcite, $blabel) = m+
      \[([^\]]*)\]
      +; $blabel = "$nentry"; $bibcite{$bcite} = $blabel; } @@ -222,7 +222,7 @@ while () { } s/\%\n//g; s/(\.(<\/cite>|<\/a>|\')+)\./$1/g; - s:(
      \[)[^\]]*(\]
      ):$1$nentry$2:; + s:(
      \[)[^\]]*(\]
      ):$1$nentry$2:; while (m/(\\(cite(label)?)(\001\d+)\{([^\001]+)\4\})/) { $old = $1; $cmd = $2; -- cgit v0.12 From 44c1f04b2bc28fbeb14b6d4e17fda0cd029b6890 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 31 Jul 2020 12:49:36 +0200 Subject: Debug facility for the \cite command When issuing doxygen with `-d cite` the temporary (copied) files / directory are not removed, i.e.: - bib*.aux - bib*.bbl - bib*.blg - bib2xhtml.pl - citelist.doc - doxygen.bst - bibTmpDir (directory) --- src/cite.cpp | 11 +++++------ src/debug.cpp | 3 ++- src/debug.h | 3 ++- templates/html/bib2xhtml.pl | 7 ++++++- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/cite.cpp b/src/cite.cpp index 78df0c3..07a6dbf 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -22,6 +22,7 @@ #include "portable.h" #include "resourcemgr.h" #include "util.h" +#include "debug.h" #include #include @@ -30,10 +31,6 @@ #include #include -// Remove the temporary files -#define RM_TMP_FILES (true) -//#define RM_TMP_FILES (false) - const char *bibTmpFile = "bibTmpFile_"; const char *bibTmpDir = "bibTmpDir/"; @@ -115,6 +112,8 @@ void CitationManager::generatePage() // do not generate an empty citations page if (isEmpty()) return; // nothing to cite + bool citeDebug = Debug::isFlagSet(Debug::Cite); + // 0. add cross references from the bib files to the cite dictionary QFile f; const StringVector &citeDataList = Config_getList(CITE_BIB_FILES); @@ -233,7 +232,7 @@ void CitationManager::generatePage() int exitCode; Portable::sysTimerStop(); if ((exitCode=Portable::system("perl","\""+bib2xhtmlFile+"\" "+bibOutputFiles+" \""+ - citeListFile+"\"")) != 0) + citeListFile+"\"" + (citeDebug ? " -d" : ""))) != 0) { err("Problems running bibtex. Verify that the command 'perl --version' works from the command line. Exit code: %d\n", exitCode); @@ -327,7 +326,7 @@ void CitationManager::generatePage() } // 9. Remove temporary files - if (RM_TMP_FILES) + if (!citeDebug) { thisDir.remove(citeListFile); thisDir.remove(doxygenBstFile); diff --git a/src/debug.cpp b/src/debug.cpp index 6815b3b..f56ef3a 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -42,7 +42,8 @@ static std::map< std::string, Debug::DebugMask > s_labels = { "filteroutput", Debug::FilterOutput }, { "lex", Debug::Lex }, { "plantuml", Debug::Plantuml }, - { "fortranfixed2free", Debug::FortranFixed2Free } + { "fortranfixed2free", Debug::FortranFixed2Free }, + { "cite", Debug::Cite } }; //------------------------------------------------------------------------ diff --git a/src/debug.h b/src/debug.h index edc95e2..e71595f 100644 --- a/src/debug.h +++ b/src/debug.h @@ -36,7 +36,8 @@ class Debug FilterOutput = 0x00001000, Lex = 0x00002000, Plantuml = 0x00004000, - FortranFixed2Free = 0x00008000 + FortranFixed2Free = 0x00008000, + Cite = 0x00010000 }; static void print(DebugMask mask,int prio,const char *fmt,...); diff --git a/templates/html/bib2xhtml.pl b/templates/html/bib2xhtml.pl index da6dc62..2b462d3 100755 --- a/templates/html/bib2xhtml.pl +++ b/templates/html/bib2xhtml.pl @@ -118,11 +118,14 @@ sub html_ent { s/\\lfloor\b/⌊/g; s/\\rfloor\b/⌋/g; } +$bdebug = 0; foreach (@ARGV) { if (/\.bib$/) { $bibfile = $_; $bibfile =~ s/\.bib$//; push(@bibfiles,$bibfile); + } elsif ("$_" eq "-d") { + $bdebug = 1; } else { $htmlfile = $_; } @@ -315,5 +318,7 @@ close (OHTMLFILE); close(HTMLFILE); chmod($mode, "$htmlfile$$"); rename("$htmlfile$$", $htmlfile); -unlink(@tmpfiles); +if ($bdebug == 0) { + unlink(@tmpfiles); +} exit(0); -- cgit v0.12 From 0a09ab02f8ddbb4e3837b8b2611a2cf110b7e6f6 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Fri, 31 Jul 2020 13:15:34 +0200 Subject: issue #7881: More flexible and correct detection of direction of an argument (another fix) --- qtools/qcstring.cpp | 5 ++++- src/util.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/qtools/qcstring.cpp b/qtools/qcstring.cpp index 8169979..da7a46f 100644 --- a/qtools/qcstring.cpp +++ b/qtools/qcstring.cpp @@ -616,7 +616,10 @@ QCString substitute(const QCString &s,const QCString &src,const QCString &dst) if (dst) memcpy(r,dst,dstLen); r+=dstLen; } - qstrcpy(r,p); + if (r) + { + qstrcpy(r,p); + } //printf("substitute(%s,%s,%s)->%s\n",s,src,dst,result.data()); return result; } diff --git a/src/util.cpp b/src/util.cpp index 13b3ca5..aa1acb4 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -8139,7 +8139,7 @@ QCString extractDirection(QCString &docs) { QRegExp re("\\[[ inout,]+\\]"); // [...] int l=0; - if (re.match(docs,0,&l)==0) + if (re.match(docs,0,&l)==0 && l>2) { // make dir the part inside [...] without separators QCString dir=substitute(substitute(docs.mid(1,l-2)," ",""),",",""); -- cgit v0.12 From e9853388b4c682ecf0e19d1222d75ad452039340 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 31 Jul 2020 14:40:07 +0200 Subject: crossref citations are shown unconditionally unfortunately some more regressions... --- src/cite.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/cite.cpp b/src/cite.cpp index 271e262..f9af2b4 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -175,28 +175,31 @@ void CitationManager::generatePage() } // search for the name citeName = ""; - if (j != -1) // to prevent something like "@manual ," and no { found + if (s != -1 && j!= -1) // to prevent something like "@manual ," and no { found { + int k=line.find(",",j); + j++; while (s != -1 && citeName.isEmpty()) { - int k=line.find(",",j); if (k != -1) { - citeName = line.mid((uint)(j+1),(uint)(k-j-1)); + citeName = line.mid((uint)(j),(uint)(k-j)); } else { - citeName = line.mid((uint)(j+1)); + citeName = line.mid((uint)(j)); } citeName = citeName.stripWhiteSpace(); - j = -1; + j = 0; if (citeName.isEmpty() && (s=input.find('\n',pos))!=-1) { line = input.mid((uint)pos,(uint)(s-pos)); pos=s+1; + k=line.find(","); } } } + //printf("citeName = #%s#\n",citeName.data()); } } } -- cgit v0.12 From e0d293b8990381729593e123c351f905450686d3 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 31 Jul 2020 15:26:29 +0200 Subject: Misleading warning about missing argument When having a `@struct` command without argument one gets the misleading warning: ``` warning: missing argument after \class. ``` instead of: ``` warning: missing argument after '\struct'. ``` This happens with a number of commands, for these commands the `currentCmd` has been introduced. (Found in cmake through Fossies). --- src/commentscan.l | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/src/commentscan.l b/src/commentscan.l index 5c49323..a1dd0e1 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -354,6 +354,7 @@ struct commentscanYY_state { OutlineParserInterface *langParser = 0; // the language parser that is calling us QCString inputString; // input string + QCString currentCmd; // the command used int inputPosition = 0; // read pointer QCString fileName; // file name that is read from int lineNr = 0; // line number in the input @@ -1035,7 +1036,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" {DOCNL} { warn(yyextra->fileName,yyextra->lineNr, "missing argument after " - "\\%s.",YY_START==ClassDocArg1?"class":"category" + "'\\%s'.",yyextra->currentCmd.data() ); //addOutput(yyscanner,'\n'); //if (*yytext=='\n') yyextra->lineNr++; @@ -1289,7 +1290,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } {DOCNL} { // missing argument warn(yyextra->fileName,yyextra->lineNr, - "Missing argument of \\relates or \\memberof command" + "Missing argument of '\\%s' command",yyextra->currentCmd.data() ); unput('\n'); //if (*yytext=='\n') yyextra->lineNr++; @@ -1808,7 +1809,7 @@ RCSTAG "$"{ID}":"[^\n$]+"$" } {DOCNL} { // missing argument warn(yyextra->fileName,yyextra->lineNr, - "\\extends or \\implements command has no argument" + "'\\%s' command has no argument",yyextra->currentCmd.data() ); //if (*yytext=='\n') yyextra->lineNr++; //addOutput(yyscanner,'\n'); @@ -1970,10 +1971,11 @@ static bool handlePackage(yyscan_t yyscanner,const QCString &, const QCStringLis return stop; } -static bool handleClass(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleClass(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::CLASSDOC_SEC); + yyextra->currentCmd = cmd; BEGIN( ClassDocArg1 ); return stop; } @@ -1985,50 +1987,56 @@ static bool handleHeaderFile(yyscan_t yyscanner,const QCString &, const QCString return FALSE; } -static bool handleProtocol(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleProtocol(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { // Obj-C protocol struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::PROTOCOLDOC_SEC); + yyextra->currentCmd = cmd; BEGIN( ClassDocArg1 ); return stop; } -static bool handleCategory(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleCategory(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { // Obj-C category struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::CATEGORYDOC_SEC); + yyextra->currentCmd = cmd; BEGIN( CategoryDocArg1 ); return stop; } -static bool handleUnion(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleUnion(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::UNIONDOC_SEC); + yyextra->currentCmd = cmd; BEGIN( ClassDocArg1 ); return stop; } -static bool handleStruct(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleStruct(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::STRUCTDOC_SEC); + yyextra->currentCmd = cmd; BEGIN( ClassDocArg1 ); return stop; } -static bool handleInterface(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleInterface(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::INTERFACEDOC_SEC); + yyextra->currentCmd = cmd; BEGIN( ClassDocArg1 ); return stop; } -static bool handleIdlException(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleIdlException(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; bool stop=makeStructuralIndicator(yyscanner,Entry::EXCEPTIONDOC_SEC); + yyextra->currentCmd = cmd; BEGIN( ClassDocArg1 ); return stop; } @@ -2228,7 +2236,7 @@ static bool handleEndParBlock(yyscan_t yyscanner,const QCString &, const QCStrin return FALSE; } -static bool handleRelated(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleRelated(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (!yyextra->current->relates.isEmpty()) @@ -2241,7 +2249,7 @@ static bool handleRelated(yyscan_t yyscanner,const QCString &, const QCStringLis return FALSE; } -static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (!yyextra->current->relates.isEmpty()) @@ -2250,11 +2258,12 @@ static bool handleRelatedAlso(yyscan_t yyscanner,const QCString &, const QCStrin "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition"); } yyextra->current->relatesType = Duplicate; + yyextra->currentCmd = cmd; BEGIN(RelatesParam1); return FALSE; } -static bool handleMemberOf(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleMemberOf(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; if (!yyextra->current->relates.isEmpty()) @@ -2263,6 +2272,7 @@ static bool handleMemberOf(yyscan_t yyscanner,const QCString &, const QCStringLi "found multiple \\relates, \\relatesalso or \\memberof commands in a comment block, using last definition"); } yyextra->current->relatesType = MemberOf; + yyextra->currentCmd = cmd; BEGIN(RelatesParam1); return FALSE; } @@ -2663,9 +2673,10 @@ static bool handleInherit(yyscan_t yyscanner,const QCString &, const QCStringLis return FALSE; } -static bool handleExtends(yyscan_t yyscanner,const QCString &, const QCStringList &) +static bool handleExtends(yyscan_t yyscanner,const QCString &cmd, const QCStringList &) { struct yyguts_t *yyg = (struct yyguts_t*)yyscanner; + yyextra->currentCmd = cmd; BEGIN(ExtendsParam); return FALSE; } -- cgit v0.12 From b38738a4efd5d87c5344b066b92fda182bdb66b3 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Fri, 31 Jul 2020 15:53:36 +0200 Subject: Minors tweaks to the regular expressions --- templates/html/bib2xhtml.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/html/bib2xhtml.pl b/templates/html/bib2xhtml.pl index 8d2b9b2..ca40b5f 100755 --- a/templates/html/bib2xhtml.pl +++ b/templates/html/bib2xhtml.pl @@ -198,7 +198,7 @@ while () { next loop; } $nentry++; - ($bcite, $blabel) = m+
      \[([^\]]*)\]
      +; + ($bcite, $blabel) = m:
      \[([^\]]*)\]
      :; $blabel = "$nentry"; $bibcite{$bcite} = $blabel; } @@ -222,7 +222,7 @@ while () { } s/\%\n//g; s/(\.(<\/cite>|<\/a>|\')+)\./$1/g; - s:(
      \[)[^\]]*(\]
      ):$1$nentry$2:; + s:(
      \[)[^\]]*(\]
      ):$1$nentry$2:; while (m/(\\(cite(label)?)(\001\d+)\{([^\001]+)\4\})/) { $old = $1; $cmd = $2; -- cgit v0.12 From f8c1c09b5f25489223530bb73b9d7b173562b3ff Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Fri, 31 Jul 2020 20:23:27 +0200 Subject: Moved citation cross reference searching to a separate function --- src/cite.cpp | 200 ++++++++++++++++++++++++++++++++++------------------------- src/cite.h | 5 +- 2 files changed, 119 insertions(+), 86 deletions(-) diff --git a/src/cite.cpp b/src/cite.cpp index f9af2b4..044651b 100644 --- a/src/cite.cpp +++ b/src/cite.cpp @@ -108,107 +108,139 @@ const char *CitationManager::anchorPrefix() const return "CITEREF_"; } -void CitationManager::generatePage() +void CitationManager::insertCrossReferencesForBibFile(const QCString &bibFile) { - //printf("** CitationManager::generatePage() count=%d\n",m_ordering.count()); + // sanity checks + if (bibFile.isEmpty()) + { + return; + } + QFileInfo fi(bibFile); + if (!fi.exists()) + { + err("bib file %s not found!\n",bibFile.data()); + return; + } + QFile f(bibFile); + if (!f.open(IO_ReadOnly)) + { + err("could not open file %s for reading\n",bibFile.data()); + return; + } - // do not generate an empty citations page - if (isEmpty()) return; // nothing to cite + // convert file to string + QCString doc; + QCString input(fi.size()+1); + f.readBlock(input.rawData(),fi.size()); + f.close(); + input.at(fi.size())='\0'; - // 0. add cross references from the bib files to the cite dictionary - QFile f; - const StringVector &citeDataList = Config_getList(CITE_BIB_FILES); - for (const auto &bibdata : citeDataList) + int pos=0; + int s; + + // helper lambda function to get the next line of input and update pos accordingly + auto get_next_line = [&input,&pos,&s]() { - QCString bibFile = bibdata.c_str(); - if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib"; - QFileInfo fi(bibFile); - if (fi.exists()) + uint prevPos = (uint)pos; + pos=s+1; + return input.mid(prevPos,(uint)(s-prevPos)); + }; + + // helper lambda function to return if the end of the input has reached + auto end_of_input = [&s]() + { + return s==-1; + }; + + // helper lambda function to proceed to the next line in the input, and update s + // to point to the start of the line. Return true as long as there is a new line. + auto has_next_line = [&input,&pos,&s]() + { + s=input.find('\n',pos); + return s!=-1; + }; + + // search for citation cross references + QCString citeName; + while (has_next_line()) + { + QCString line = get_next_line(); + + int i; + if (line.stripWhiteSpace().startsWith("@")) { - if (!bibFile.isEmpty()) + // assumption entry like: "@book { name," or "@book { name" (spaces optional) + int j = line.find('{'); + // when no {, go hunting for it + while (j==-1 && has_next_line()) { - f.setName(bibFile); - if (!f.open(IO_ReadOnly)) - { - err("could not open file %s for reading\n",bibFile.data()); - } - QCString doc; - QCString input(fi.size()+1); - f.readBlock(input.rawData(),fi.size()); - f.close(); - input.at(fi.size())='\0'; - int pos=0; - int s; - QCString citeName; - while ((s=input.find('\n',pos))!=-1) + line = get_next_line(); + j = line.find('{'); + } + // search for the name + citeName = ""; + if (!end_of_input() && j!=-1) // to prevent something like "@manual ," and no { found + { + int k = line.find(',',j); + j++; + // found a line "@....{.....,...." or "@.....{....." + // ^=j ^=k ^=j k=-1 + while (!end_of_input() && citeName.isEmpty()) { - QCString line = input.mid((uint)pos,(uint)(s-pos)); - pos=s+1; - - int i; - if ((i = line.find("crossref")) != -1) /* assumption cross reference is on one line and the only item */ + if (k!=-1) + { + citeName = line.mid((uint)(j),(uint)(k-j)); + } + else { - int j=line.find("{",i); - int k=line.find("}",i); - if (j!=-1 && k!=-1) - { - QCString crossrefName = line.mid((uint)(j+1),(uint)(k-j-1)); - // check if the reference with the cross reference is used - // insert cross refererence when cross reference has not yet been added. - if ((p->entries.find(citeName.data())!=p->entries.end()) && - (p->entries.find(crossrefName.data())==p->entries.end())) // not found yet - { - insert(crossrefName); - } - } + citeName = line.mid((uint)(j)); } - else if (line.stripWhiteSpace().startsWith("@")) + citeName = citeName.stripWhiteSpace(); + j = 0; + if (citeName.isEmpty() && has_next_line()) { - // assumption entry like: "@book { name," or "@book { name" (spaces optional) - int j=line.find("{"); - // when no {, go hunting for it - while (j==-1 && (s=input.find('\n',pos))!=-1) - { - line = input.mid((uint)pos,(uint)(s-pos)); - j=line.find("{"); - pos=s+1; - } - // search for the name - citeName = ""; - if (s != -1 && j!= -1) // to prevent something like "@manual ," and no { found - { - int k=line.find(",",j); - j++; - while (s != -1 && citeName.isEmpty()) - { - if (k != -1) - { - citeName = line.mid((uint)(j),(uint)(k-j)); - } - else - { - citeName = line.mid((uint)(j)); - } - citeName = citeName.stripWhiteSpace(); - j = 0; - if (citeName.isEmpty() && (s=input.find('\n',pos))!=-1) - { - line = input.mid((uint)pos,(uint)(s-pos)); - pos=s+1; - k=line.find(","); - } - } - } - //printf("citeName = #%s#\n",citeName.data()); + line = get_next_line(); + k = line.find(','); } } } + //printf("citeName = #%s#\n",citeName.data()); } - else if (!fi.exists()) + else if ((i=line.find("crossref"))!=-1 && !citeName.isEmpty()) /* assumption cross reference is on one line and the only item */ { - err("bib file %s not found!\n",bibFile.data()); + int j = line.find('{',i); + int k = line.find('}',i); + if (j>i && k>j) + { + QCString crossrefName = line.mid((uint)(j+1),(uint)(k-j-1)); + // check if the reference with the cross reference is used + // insert cross refererence when cross reference has not yet been added. + if ((p->entries.find(citeName.data())!=p->entries.end()) && + (p->entries.find(crossrefName.data())==p->entries.end())) // not found yet + { + insert(crossrefName); + } + } } } +} + +void CitationManager::generatePage() +{ + //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; + const StringVector &citeDataList = Config_getList(CITE_BIB_FILES); + for (const auto &bibdata : citeDataList) + { + QCString bibFile = bibdata.c_str(); + if (!bibFile.isEmpty() && bibFile.right(4)!=".bib") bibFile+=".bib"; + insertCrossReferencesForBibFile(bibFile); + } // 1. generate file with markers and citations to OUTPUT_DIRECTORY QCString outputDir = Config_getString(OUTPUT_DIRECTORY); diff --git a/src/cite.h b/src/cite.h index 4666d5a..9fea954 100644 --- a/src/cite.h +++ b/src/cite.h @@ -4,8 +4,8 @@ * Based on a patch by David Munger * * 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 + * 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. * @@ -70,6 +70,7 @@ class CitationManager private: /** Create the database, with an expected maximum of \a size entries */ CitationManager(); + void insertCrossReferencesForBibFile(const QCString &bibFile); struct Private; std::unique_ptr p; }; -- cgit v0.12