Doxygen
|
#include <src/docparser_p.h>
Public Attributes | |
std::stack< DocParserContext > | contextStack |
DocParserContext | context |
DocTokenizer | tokenizer |
Definition at line 97 of file docparser_p.h.
void DocParser::checkArgumentName | ( | ) |
Collects the parameters found with @param command in a list context.paramsFound. If the parameter is not an actual parameter of the current member context.memberDef, then a warning is raised (unless warnings are disabled altogether).
Definition at line 209 of file docparser.cpp.
References argListToString(), Config_getBool, context, Definition::docFile(), Definition::docLine(), ArgumentList::empty(), end(), QCString::endsWith(), FALSE, Fortran, found, QCString::isEmpty(), QCString::left(), QCString::length(), QCString::lower(), Definition::name(), qPrint(), QCString::sprintf(), QCString::str(), QCString::stripWhiteSpace(), TRUE, and warn_doc_error.
Referenced by DocParamList::parse(), and DocParamList::parseXml().
void DocParser::checkRetvalName | ( | ) |
Collects the return values found with @retval command in a global list g_parserContext.retvalsFound.
Definition at line 274 of file docparser.cpp.
References Config_getBool, context, QCString::isEmpty(), qPrint(), QCString::str(), and warn_doc_error.
Referenced by DocParamList::parse(), and DocParamList::parseXml().
void DocParser::checkUnOrMultipleDocumentedParams | ( | ) |
Checks if the parameters that have been specified using @param are indeed all parameters and that a parameter does not have multiple @param blocks. Must be called after checkArgumentName() has been called for each argument.
Definition at line 297 of file docparser.cpp.
References argListToString(), Config_getBool, context, Cpp, ArgumentList::empty(), QCString::endsWith(), FALSE, Fortran, QCString::isEmpty(), QCString::left(), QCString::length(), QCString::lower(), ArgumentList::push_back(), Python, qPrint(), ArgumentList::size(), QCString::str(), QCString::stripWhiteSpace(), substitute(), TRUE, warn_doc_error, and warn_incomplete_doc.
Referenced by validatingParseDoc().
void DocParser::defaultHandleTitleAndSize | ( | const CommandType | cmd, |
DocNodeVariant * | parent, | ||
DocNodeList & | children, | ||
QCString & | width, | ||
QCString & | height ) |
Definition at line 1021 of file docparser.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Mappers::cmdMapper, context, defaultHandleToken(), errorHandleDefaultToken(), handlePendingStyleCommands(), Token::is(), Token::is_any_of(), parent(), and tokenizer.
Referenced by DocPara::handleCommand(), DocDiaFile::parse(), DocDotFile::parse(), DocImage::parse(), DocMscFile::parse(), and DocPlantUmlFile::parse().
bool DocParser::defaultHandleToken | ( | DocNodeVariant * | parent, |
Token | tok, | ||
DocNodeList & | children, | ||
bool | handleWord = TRUE ) |
Definition at line 1225 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, AUTO_TRACE_ADD, DocStyleChange::Bold, DocStyleChange::Center, DocStyleChange::Cite, CMD_AMP, CMD_ANCHOR, CMD_AT, CMD_BOLD, CMD_BSLASH, CMD_CODE, CMD_DBONLY, CMD_DCOLON, CMD_DOLLAR, CMD_EMPHASIS, CMD_EQUAL, CMD_EXCLAMATION, CMD_FORMULA, CMD_GREATER, CMD_HASH, CMD_HTMLONLY, CMD_IANCHOR, CMD_IFILE, CMD_ILINE, CMD_IMAGE, CMD_INTERNALREF, CMD_IPREFIX, CMD_LATEXONLY, CMD_LESS, CMD_MANONLY, CMD_MDASH, CMD_MINUS, CMD_NDASH, CMD_PERCENT, CMD_PLUS, CMD_PUNT, CMD_QUESTION, CMD_QUOTE, CMD_RTFONLY, CMD_SETSCOPE, CMD_XMLONLY, Mappers::cmdMapper, DocStyleChange::Code, context, DocSymbol::decodeSymbol(), DocStyleChange::Del, DocVerbatim::DocbookOnly, GrowVector< T >::empty(), FALSE, handleAnchor(), handleImage(), handleImg(), handleInternalRef(), handleLinkedWord(), handlePrefix(), handleStyleArgument(), handleStyleEnter(), handleStyleLeave(), HTML_BOLD, HTML_CENTER, HTML_CITE, HTML_CODE, HTML_DEL, HTML_DIV, HTML_EMPHASIS, HTML_IMG, HTML_INS, HTML_KBD, HTML_PRE, HTML_S, HTML_SMALL, HTML_STRIKE, HTML_SUB, HTML_SUP, HTML_UNDERLINE, DocVerbatim::HtmlOnly, Mappers::htmlTagMapper, DocStyleChange::Ins, insidePRE(), Token::is(), Token::is_any_of(), DocStyleChange::Italic, DocStyleChange::Kbd, DocVerbatim::LatexOnly, DocVerbatim::ManOnly, parent(), DocVerbatim::RtfOnly, DocStyleChange::S, DocStyleChange::Small, DocStyleChange::Strike, DocStyleChange::Subscript, DocStyleChange::Superscript, HtmlEntityMapper::Sym_Amp, HtmlEntityMapper::Sym_At, HtmlEntityMapper::Sym_BSlash, HtmlEntityMapper::Sym_Dollar, HtmlEntityMapper::Sym_Dot, HtmlEntityMapper::Sym_DoubleColon, HtmlEntityMapper::Sym_Equal, HtmlEntityMapper::Sym_Exclam, HtmlEntityMapper::Sym_Greater, HtmlEntityMapper::Sym_Hash, HtmlEntityMapper::Sym_Less, HtmlEntityMapper::Sym_Minus, HtmlEntityMapper::Sym_Percent, HtmlEntityMapper::Sym_Plus, HtmlEntityMapper::Sym_Quest, HtmlEntityMapper::Sym_Quot, HtmlEntityMapper::Sym_Unknown, Token::to_string(), tokenizer, TRUE, DocStyleChange::Underline, Token::value(), warn_doc_error, XML_C, and DocVerbatim::XmlOnly.
Referenced by defaultHandleTitleAndSize(), handleStyleArgument(), and DocPara::injectToken().
void DocParser::errorHandleDefaultToken | ( | DocNodeVariant * | parent, |
Token | tok, | ||
DocNodeList & | children, | ||
const QCString & | txt ) |
Definition at line 546 of file docparser.cpp.
References DocNodeList::append(), Token::command_to_char(), context, parent(), qPrint(), Token::to_string(), tokenizer, Token::value(), and warn_doc_error.
Referenced by defaultHandleTitleAndSize(), handleStyleArgument(), DocHRef::parse(), DocHtmlCaption::parse(), DocHtmlHeader::parse(), DocHtmlSummary::parse(), DocInternalRef::parse(), DocRef::parse(), DocSecRefItem::parse(), DocTitle::parse(), and DocVhdlFlow::parse().
QCString DocParser::findAndCopyImage | ( | const QCString & | fileName, |
DocImage::Type | type, | ||
bool | doWarn = true ) |
search for an image in the imageNameDict and if found copies the image to the output directory (which depends on the type parameter).
Definition at line 93 of file docparser.cpp.
References FileDef::absFilePath(), Config_getBool, Config_getString, context, copyFile(), DocImage::DocBook, QCString::endsWith(), err, FileInfo::exists(), QCString::ExplicitSize, findFileDef(), QCString::findRev(), DocImage::Html, Doxygen::imageNameLinkedMap, Doxygen::indexList, FileInfo::isSymLink(), DocImage::Latex, QCString::left(), QCString::length(), Definition::name(), qPrint(), Dir::remove(), QCString::right(), DocImage::Rtf, showFileDefMatches(), QCString::sprintf(), QCString::startsWith(), QCString::str(), Portable::system(), tokenizer, warn_doc_error, and DocImage::Xml.
Referenced by handleImage(), and handleImg().
bool DocParser::findDocsForMemberOrCompound | ( | const QCString & | commandName, |
QCString * | pDoc, | ||
QCString * | pBrief, | ||
const Definition ** | pDef ) |
Looks for a documentation block with name commandName in the current context (g_parserContext.context). The resulting documentation string is put in pDoc, the definition in which the documentation was found is put in pDef.
TRUE | if name was found. |
FALSE | if name was not found. |
Definition at line 393 of file docparser.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, Definition::briefDescription(), GetDefInput::checkCV, Doxygen::classLinkedMap, Config_getBool, context, Definition::documentation(), FALSE, QCString::find(), findFileDef(), GetDefResult::found, getDefs(), Doxygen::groupLinkedMap, Doxygen::inputNameLinkedMap, QCString::isEmpty(), QCString::left(), QCString::length(), GetDefResult::md, Doxygen::namespaceLinkedMap, Doxygen::pageLinkedMap, QCString::prepend(), qstrlen(), removeRedundantWhiteSpace(), QCString::right(), QCString::size(), QCString::startsWith(), and substitute().
Referenced by processCopyDoc().
Token DocParser::handleAHref | ( | DocNodeVariant * | parent, |
DocNodeList & | children, | ||
const HtmlAttribList & | tagHtmlAttribs ) |
Definition at line 720 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, context, convertNameToFile(), FALSE, DocNodeList::get_last(), parent(), tokenizer, TRUE, and warn_doc_error.
Referenced by DocPara::handleHtmlStartTag(), DocHtmlDescTitle::parse(), and DocHtmlHeader::parse().
void DocParser::handleAnchor | ( | DocNodeVariant * | parent, |
DocNodeList & | children ) |
Definition at line 956 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, context, FALSE, Token::is(), Token::is_any_of(), parent(), qPrint(), Token::to_string(), tokenizer, and warn_doc_error.
Referenced by defaultHandleToken(), and DocPara::handleCommand().
void DocParser::handleImage | ( | DocNodeVariant * | parent, |
DocNodeList & | children ) |
Definition at line 1105 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, context, DocImage::DocBook, findAndCopyImage(), DocNodeList::get_last(), DocImage::Html, Token::is(), Token::is_any_of(), QCString::isEmpty(), DocImage::Latex, QCString::lower(), QCString::mid(), parent(), qPrint(), DocImage::Rtf, split(), QCString::startsWith(), QCString::stripWhiteSpace(), Token::to_string(), tokenizer, warn_doc_error, and DocImage::Xml.
Referenced by defaultHandleToken(), and DocPara::handleCommand().
void DocParser::handleImg | ( | DocNodeVariant * | parent, |
DocNodeList & | children, | ||
const HtmlAttribList & | tagHtmlAttribs ) |
Definition at line 1680 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, AUTO_TRACE_ADD, context, FALSE, findAndCopyImage(), found, DocImage::Html, parent(), tokenizer, TRUE, and warn_doc_error.
Referenced by defaultHandleToken(), and DocPara::handleHtmlStartTag().
void DocParser::handleInitialStyleCommands | ( | DocNodeVariant * | parent, |
DocNodeList & | children ) |
Definition at line 709 of file docparser.cpp.
References DocStyleChange::attribs(), AUTO_TRACE, context, handleStyleEnter(), parent(), DocStyleChange::style(), and DocStyleChange::tagName().
Referenced by DocPara::parse().
void DocParser::handleInternalRef | ( | DocNodeVariant * | parent, |
DocNodeList & | children ) |
Definition at line 933 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, context, DocNodeList::get_last(), Token::is(), Token::is_any_of(), parent(), qPrint(), Token::to_string(), tokenizer, and warn_doc_error.
Referenced by defaultHandleToken(), and DocPara::handleCommand().
void DocParser::handleLinkedWord | ( | DocNodeVariant * | parent, |
DocNodeList & | children, | ||
bool | ignoreAutoLinkFlag = FALSE ) |
Definition at line 790 of file docparser.cpp.
References Definition::anchor(), DocNodeList::append(), AUTO_TRACE, AUTO_TRACE_ADD, Definition::briefDescriptionAsTooltip(), Config_getBool, Config_getList, context, Definition::definitionType(), FALSE, findFileDef(), getClass(), MemberDef::getClassDef(), Definition::getOutputFileBase(), Definition::getReference(), Definition::getSourceFileBase(), GroupDef::groupTitle(), handleLinkedWord(), Doxygen::inputNameLinkedMap, Definition::isLinkable(), MemberDef::isObjCMethod(), linkToText(), Definition::name(), MemberDef::objCMethodName(), parent(), qPrint(), resolveRef(), toFileDef(), toGroupDef(), tokenizer, TRUE, Definition::TypeFile, Definition::TypeGroup, and warn_doc_error.
Referenced by defaultHandleToken(), DocPara::handleHtmlStartTag(), handleLinkedWord(), handleParameterType(), DocPara::parse(), DocParamList::parse(), and DocParamList::parseXml().
void DocParser::handleParameterType | ( | DocNodeVariant * | parent, |
DocNodeList & | children, | ||
const QCString & | paramTypes ) |
Definition at line 909 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, context, QCString::find(), handleLinkedWord(), QCString::mid(), and parent().
Referenced by DocParamList::parse().
void DocParser::handlePendingStyleCommands | ( | DocNodeVariant * | parent, |
DocNodeList & | children ) |
Called at the end of a paragraph to close all open style changes (e.g. a without a ). The closed styles are pushed onto a stack and entered again at the start of a new paragraph.
Definition at line 692 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, context, FALSE, parent(), DocStyleChange::position(), DocStyleChange::style(), and DocStyleChange::tagName().
Referenced by defaultHandleTitleAndSize(), DocHRef::parse(), DocHtmlCaption::parse(), DocHtmlDescTitle::parse(), DocHtmlHeader::parse(), DocInternalRef::parse(), DocLink::parse(), DocPara::parse(), DocRef::parse(), DocSecRefItem::parse(), DocTitle::parse(), and DocVhdlFlow::parse().
void DocParser::handlePrefix | ( | DocNodeVariant * | parent, |
DocNodeList & | children ) |
Definition at line 984 of file docparser.cpp.
References AUTO_TRACE, context, Token::is(), Token::is_any_of(), parent(), qPrint(), Token::to_string(), tokenizer, and warn_doc_error.
Referenced by defaultHandleToken(), and DocPara::handleCommand().
Token DocParser::handleStyleArgument | ( | DocNodeVariant * | parent, |
DocNodeList & | children, | ||
const QCString & | cmdName ) |
Definition at line 579 of file docparser.cpp.
References AUTO_TRACE, AUTO_TRACE_EXIT, context, defaultHandleToken(), errorHandleDefaultToken(), Mappers::htmlTagMapper, insideLI(), Token::is(), Token::is_any_of(), reg::match(), parent(), qPrint(), Token::to_string(), tokenizer, UNKNOWN, Token::value(), and warn_doc_error.
Referenced by defaultHandleToken(), and DocPara::handleCommand().
void DocParser::handleStyleEnter | ( | DocNodeVariant * | parent, |
DocNodeList & | children, | ||
DocStyleChange::Style | s, | ||
const QCString & | tagName, | ||
const HtmlAttribList * | attribs ) |
Called when a style change starts. For instance a <b> command is encountered.
Definition at line 629 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, GrowVector< T >::back(), context, parent(), tokenizer, and TRUE.
Referenced by defaultHandleToken(), DocPara::handleHtmlStartTag(), and handleInitialStyleCommands().
void DocParser::handleStyleLeave | ( | DocNodeVariant * | parent, |
DocNodeList & | children, | ||
DocStyleChange::Style | s, | ||
const QCString & | tagName ) |
Called when a style change ends. For instance a </b> command is encountered.
Definition at line 641 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, context, FALSE, QCString::lower(), parent(), qPrint(), tokenizer, and warn_doc_error.
Referenced by defaultHandleToken(), DocPara::handleHtmlEndTag(), and DocPara::handleHtmlStartTag().
void DocParser::handleUnclosedStyleCommands | ( | ) |
Definition at line 765 of file docparser.cpp.
References AUTO_TRACE, context, handleUnclosedStyleCommands(), qPrint(), tokenizer, and warn_doc_error.
Referenced by handleUnclosedStyleCommands(), DocRoot::parse(), and DocText::parse().
Token DocParser::internalValidatingParseDoc | ( | DocNodeVariant * | parent, |
DocNodeList & | children, | ||
const QCString & | doc ) |
Definition at line 1711 of file docparser.cpp.
References DocNodeList::append(), AUTO_TRACE, AUTO_TRACE_EXIT, GrowVector< T >::back(), context, QCString::data(), GrowVector< T >::empty(), FALSE, DocNodeList::get_last(), Token::is(), QCString::isEmpty(), DocPara::isFirst(), DocPara::isLast(), DocPara::markLast(), parent(), GrowVector< T >::pop_back(), tokenizer, and TRUE.
Referenced by DocPara::handleInheritDoc(), DocRef::parse(), DocXRefItem::parse(), DocTitle::parseFromString(), and DocSimpleSect::parseRcs().
void DocParser::popContext | ( | ) |
Definition at line 73 of file docparser.cpp.
References context, contextStack, and tokenizer.
Referenced by DocPara::handleInheritDoc(), DocRef::parse(), DocXRefItem::parse(), DocTitle::parseFromString(), and DocSimpleSect::parseRcs().
QCString DocParser::processCopyDoc | ( | const char * | data, |
size_t & | len ) |
Definition at line 1908 of file docparser.cpp.
References GrowBuf::addChar(), GrowBuf::addStr(), MemberDef::argumentList(), AUTO_TRACE, AUTO_TRACE_EXIT, Definition::briefFile(), Definition::briefLine(), context, Definition::definitionType(), Definition::docFile(), Definition::docLine(), extractCopyDocId(), findDocsForMemberOrCompound(), found, GrowBuf::get(), GrowBuf::getPos(), inlineArgListToDoc(), isCopyBriefOrDetailsCmd(), Definition::isReference(), isVerbatimSection(), processCopyDoc(), qPrint(), skipToEndMarker(), MemberDef::templateMaster(), tokenizer, toMemberDef(), TRUE, Trace::trunc(), Definition::TypeMember, and warn_doc_error.
Referenced by processCopyDoc(), and validatingParseDoc().
void DocParser::pushContext | ( | ) |
Definition at line 59 of file docparser.cpp.
References context, contextStack, and tokenizer.
Referenced by DocPara::handleInheritDoc(), DocRef::parse(), DocXRefItem::parse(), DocTitle::parseFromString(), and DocSimpleSect::parseRcs().
Definition at line 1752 of file docparser.cpp.
References AUTO_TRACE, Config_getBool, context, Doxygen::exampleNameLinkedMap, fileToString(), findFilePath(), QCString::isEmpty(), qPrint(), showFileDefMatches(), tokenizer, and warn_doc_error.
Referenced by DocInclude::parse().
DocParserContext DocParser::context |
Definition at line 140 of file docparser_p.h.
Referenced by DocSimpleSect::appendLinkWord(), checkArgumentName(), checkIfHtmlEndTagEndsAutoList(), checkRetvalName(), checkUnOrMultipleDocumentedParams(), createRef(), defaultHandleTitleAndSize(), defaultHandleToken(), errorHandleDefaultToken(), findAndCopyImage(), findDocsForMemberOrCompound(), handleAHref(), handleAnchor(), DocPara::handleCite(), DocPara::handleCommand(), DocPara::handleDoxyConfig(), DocPara::handleEmoji(), DocPara::handleFile(), DocPara::handleHtmlStartTag(), DocPara::handleIFile(), handleImage(), handleImg(), DocPara::handleInclude(), DocPara::handleIncludeOperator(), DocPara::handleInheritDoc(), handleInitialStyleCommands(), handleInternalRef(), DocPara::handleLink(), handleLinkedWord(), handleParameterType(), handlePendingStyleCommands(), handlePrefix(), DocPara::handleRef(), DocPara::handleSection(), DocPara::handleShowDate(), DocPara::handleStartCode(), handleStyleArgument(), handleStyleEnter(), handleStyleLeave(), handleUnclosedStyleCommands(), DocPara::handleXRefItem(), DocPara::injectToken(), internalValidatingParseDoc(), DocAutoList::parse(), DocHRef::parse(), DocHtmlDescData::parse(), DocHtmlDescList::parse(), DocHtmlDescTitle::parse(), DocHtmlHeader::parse(), DocHtmlList::parse(), DocHtmlRow::parse(), DocHtmlTable::parse(), DocInclude::parse(), DocIncOperator::parse(), DocIndexEntry::parse(), DocInternal::parse(), DocLink::parse(), DocPara::parse(), DocParamList::parse(), DocRef::parse(), DocRoot::parse(), DocSecRefList::parse(), DocSection::parse(), DocText::parse(), DocTitle::parseFromString(), DocSimpleSect::parseRcs(), DocHtmlList::parseXml(), DocHtmlRow::parseXml(), DocHtmlTable::parseXml(), DocParamList::parseXml(), popContext(), processCopyDoc(), pushContext(), readTextFileByName(), validatingParseDoc(), and validatingParseText().
std::stack< DocParserContext > DocParser::contextStack |
Definition at line 139 of file docparser_p.h.
Referenced by popContext(), and pushContext().
DocTokenizer DocParser::tokenizer |
Definition at line 141 of file docparser_p.h.
Referenced by checkIfHtmlEndTagEndsAutoList(), createRef(), defaultHandleTitleAndSize(), defaultHandleToken(), docFindSections(), errorHandleDefaultToken(), findAndCopyImage(), handleAHref(), handleAnchor(), DocPara::handleCite(), DocPara::handleCommand(), DocPara::handleDoxyConfig(), DocPara::handleEmoji(), DocPara::handleFile(), DocPara::handleHtmlEndTag(), DocPara::handleHtmlStartTag(), DocPara::handleIFile(), DocPara::handleILine(), handleImage(), handleImg(), DocPara::handleInclude(), DocPara::handleIncludeOperator(), handleInternalRef(), DocPara::handleLink(), handleLinkedWord(), handlePrefix(), DocPara::handleRef(), DocPara::handleSection(), DocPara::handleShowDate(), DocPara::handleStartCode(), handleStyleArgument(), handleStyleEnter(), handleStyleLeave(), handleUnclosedStyleCommands(), DocPara::handleXRefItem(), internalValidatingParseDoc(), DocAutoList::parse(), DocHRef::parse(), DocHtmlCaption::parse(), DocHtmlDescList::parse(), DocHtmlDescTitle::parse(), DocHtmlHeader::parse(), DocHtmlList::parse(), DocHtmlRow::parse(), DocHtmlSummary::parse(), DocHtmlTable::parse(), DocIndexEntry::parse(), DocInternalRef::parse(), DocLink::parse(), DocPara::parse(), DocParamList::parse(), DocRef::parse(), DocRoot::parse(), DocSecRefItem::parse(), DocSecRefList::parse(), DocText::parse(), DocTitle::parse(), DocVhdlFlow::parse(), DocTitle::parseFromString(), DocHtmlList::parseXml(), DocHtmlRow::parseXml(), DocHtmlTable::parseXml(), popContext(), processCopyDoc(), pushContext(), readTextFileByName(), validatingParseDoc(), and validatingParseText().