Doxygen
Loading...
Searching...
No Matches
DocParser Class Reference

#include <src/docparser_p.h>

Inheritance diagram for DocParser:
Collaboration diagram for DocParser:

Public Member Functions

void pushContext ()
void popContext ()
void handleImg (DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
Token internalValidatingParseDoc (DocNodeVariant *parent, DocNodeList &children, const QCString &doc)
QCString processCopyDoc (const char *data, size_t &len)
QCString findAndCopyImage (const QCString &fileName, DocImage::Type type, bool doWarn=true)
void checkArgumentName ()
void checkRetvalName ()
void checkUnOrMultipleDocumentedParams ()
bool findDocsForMemberOrCompound (const QCString &commandName, QCString *pDoc, QCString *pBrief, const Definition **pDef)
bool defaultHandleToken (DocNodeVariant *parent, Token tok, DocNodeList &children, bool handleWord=TRUE)
void errorHandleDefaultToken (DocNodeVariant *parent, Token tok, DocNodeList &children, const QCString &txt)
void defaultHandleTitleAndSize (const CommandType cmd, DocNodeVariant *parent, DocNodeList &children, QCString &width, QCString &height)
Token handleStyleArgument (DocNodeVariant *parent, DocNodeList &children, const QCString &cmdName)
void handleStyleEnter (DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName, const HtmlAttribList *attribs)
void handleStyleLeave (DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName)
void handlePendingStyleCommands (DocNodeVariant *parent, DocNodeList &children)
void handleInitialStyleCommands (DocNodeVariant *parent, DocNodeList &children)
Token handleAHref (DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
void handleUnclosedStyleCommands ()
void handleLinkedWord (DocNodeVariant *parent, DocNodeList &children, bool ignoreAutoLinkFlag=FALSE)
void handleParameterType (DocNodeVariant *parent, DocNodeList &children, const QCString &paramTypes)
void handleInternalRef (DocNodeVariant *parent, DocNodeList &children)
void handleAnchor (DocNodeVariant *parent, DocNodeList &children)
void handlePrefix (DocNodeVariant *parent, DocNodeList &children)
void handleImage (DocNodeVariant *parent, DocNodeList &children)
void handleIFile (char cmdChar, const QCString &cmdName)
void handleILine (char cmdChar, const QCString &cmdName)
void readTextFileByName (const QCString &file, QCString &text)

Public Attributes

std::stack< DocParserContextcontextStack
DocParserContext context
DocTokenizer tokenizer

Detailed Description

Definition at line 99 of file docparser_p.h.

Member Function Documentation

◆ checkArgumentName()

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 210 of file docparser.cpp.

211{
212 if (!(Config_getBool(WARN_IF_DOC_ERROR) || Config_getBool(WARN_IF_INCOMPLETE_DOC))) return;
213 if (context.memberDef==nullptr) return; // not a member
214 std::string name = context.token->name.str();
215 const ArgumentList &al=context.memberDef->isDocsForDefinition() ?
216 context.memberDef->argumentList() :
217 context.memberDef->declArgumentList();
218 SrcLangExt lang = context.memberDef->getLanguage();
219 //printf("isDocsForDefinition()=%d\n",context.memberDef->isDocsForDefinition());
220 if (al.empty()) return; // no argument list
221
222 static const reg::Ex re(R"(\$?\w+\.*)");
223 reg::Iterator it(name,re);
224 reg::Iterator end;
225 for (; it!=end ; ++it)
226 {
227 const auto &match = *it;
228 QCString aName=match.str();
229 if (lang==SrcLangExt::Fortran) aName=aName.lower();
230 //printf("aName='%s'\n",qPrint(aName));
231 bool found=FALSE;
232 for (const Argument &a : al)
233 {
234 QCString argName = context.memberDef->isDefine() ? a.type : a.name;
235 if (lang==SrcLangExt::Fortran) argName=argName.lower();
236 argName=argName.stripWhiteSpace();
237 //printf("argName='%s' aName=%s\n",qPrint(argName),qPrint(aName));
238 if (argName.endsWith("...")) argName=argName.left(argName.length()-3);
239 if (aName==argName)
240 {
241 context.paramsFound.insert(aName.str());
242 found=TRUE;
243 break;
244 }
245 }
246 if (!found)
247 {
248 //printf("member type=%d\n",context.memberDef->memberType());
249 QCString scope=context.memberDef->getScopeString();
250 if (!scope.isEmpty()) scope+="::"; else scope="";
251 QCString inheritedFrom = "";
252 QCString docFile = context.memberDef->docFile();
253 int docLine = context.memberDef->docLine();
254 const MemberDef *inheritedMd = context.memberDef->inheritsDocsFrom();
255 if (inheritedMd) // documentation was inherited
256 {
257 inheritedFrom.sprintf(" inherited from member %s at line "
258 "%d in file %s",qPrint(inheritedMd->name()),
259 inheritedMd->docLine(),qPrint(inheritedMd->docFile()));
260 docFile = context.memberDef->getDefFileName();
261 docLine = context.memberDef->getDefLine();
262 }
263 QCString alStr = argListToString(al);
264 warn_doc_error(docFile,docLine,
265 "argument '{}' of command @param "
266 "is not found in the argument list of {}{}{}{}",
267 aName, scope, context.memberDef->name(),
268 alStr, inheritedFrom);
269 }
270 }
271}
bool empty() const
Definition arguments.h:99
virtual QCString docFile() const =0
virtual int docLine() const =0
virtual const QCString & name() const =0
DocParserContext context
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:166
QCString lower() const
Definition qcstring.h:249
bool endsWith(const char *s) const
Definition qcstring.h:524
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:163
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:260
const std::string & str() const
Definition qcstring.h:552
QCString & sprintf(const char *format,...)
Definition qcstring.cpp:29
QCString left(size_t len) const
Definition qcstring.h:229
#define Config_getBool(name)
Definition config.h:33
DirIterator end(const DirIterator &) noexcept
Definition dir.cpp:175
#define warn_doc_error(file, line, fmt,...)
Definition message.h:112
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
Definition regex.cpp:855
const char * qPrint(const char *s)
Definition qcstring.h:687
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
SrcLangExt
Definition types.h:207
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
Definition util.cpp:1231

References argListToString(), Config_getBool, context, Definition::docFile(), Definition::docLine(), ArgumentList::empty(), end(), QCString::endsWith(), FALSE, 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().

◆ checkRetvalName()

void DocParser::checkRetvalName ( )

Collects the return values found with @retval command in a global list g_parserContext.retvalsFound.

Definition at line 275 of file docparser.cpp.

276{
277 QCString name = context.token->name;
278 if (!Config_getBool(WARN_IF_DOC_ERROR)) return;
279 if (context.memberDef==nullptr || name.isEmpty()) return; // not a member or no valid name
280 if (context.retvalsFound.count(name.str())==1) // only report the first double entry
281 {
282 warn_doc_error(context.memberDef->getDefFileName(),
283 context.memberDef->getDefLine(),
284 "return value '{}' of {} has multiple documentation sections",
285 name, context.memberDef->qualifiedName());
286 }
287 context.retvalsFound.insert(name.str());
288}

References Config_getBool, context, QCString::isEmpty(), QCString::str(), and warn_doc_error.

Referenced by DocParamList::parse(), and DocParamList::parseXml().

◆ checkUnOrMultipleDocumentedParams()

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 296 of file docparser.cpp.

297{
298 if (context.memberDef && context.hasParamCommand)
299 {
300 const ArgumentList &al=context.memberDef->isDocsForDefinition() ?
301 context.memberDef->argumentList() :
302 context.memberDef->declArgumentList();
303 SrcLangExt lang = context.memberDef->getLanguage();
304 if (!al.empty())
305 {
306 ArgumentList undocParams;
307 for (const Argument &a: al)
308 {
309 QCString argName = context.memberDef->isDefine() ? a.type : a.name;
310 if (lang==SrcLangExt::Fortran) argName = argName.lower();
311 argName=argName.stripWhiteSpace();
312 QCString aName = argName;
313 if (argName.endsWith("...")) argName=argName.left(argName.length()-3);
314 if (lang==SrcLangExt::Python && (argName=="self" || argName=="cls"))
315 {
316 // allow undocumented self / cls parameter for Python
317 }
318 else if (lang==SrcLangExt::Cpp && (a.type=="this" || a.type.startsWith("this ")))
319 {
320 // allow undocumented this (for C++23 deducing this), see issue #11123
321 }
322 else if (!argName.isEmpty())
323 {
324 size_t count = context.paramsFound.count(argName.str());
325 if (count==0 && a.docs.isEmpty())
326 {
327 undocParams.push_back(a);
328 }
329 else if (count>1 && Config_getBool(WARN_IF_DOC_ERROR))
330 {
331 warn_doc_error(context.memberDef->docFile(),
332 context.memberDef->docLine(),
333 "argument {} from the argument list of {} has multiple @param documentation sections",
334 aName, context.memberDef->qualifiedName());
335 }
336 }
337 }
338 if (!undocParams.empty() && Config_getBool(WARN_IF_INCOMPLETE_DOC))
339 {
340 bool first=TRUE;
341 QCString errMsg = "The following parameter";
342 if (undocParams.size()>1) errMsg+="s";
343 errMsg+=QCString(" of ")+
344 context.memberDef->qualifiedName() +
345 argListToString(al) +
346 (undocParams.size()>1 ? " are" : " is") + " not documented:\n";
347 for (const Argument &a : undocParams)
348 {
349 QCString argName = context.memberDef->isDefine() ? a.type : a.name;
350 if (lang==SrcLangExt::Fortran) argName = argName.lower();
351 argName=argName.stripWhiteSpace();
352 if (!first) errMsg+="\n";
353 first=FALSE;
354 errMsg+=" parameter '"+argName+"'";
355 }
356 warn_incomplete_doc(context.memberDef->docFile(), context.memberDef->docLine(), "{}", errMsg);
357 }
358 }
359 else
360 {
361 if (context.paramsFound.empty() && Config_getBool(WARN_IF_DOC_ERROR))
362 {
363 warn_doc_error(context.memberDef->docFile(),
364 context.memberDef->docLine(),
365 "{} has @param documentation sections but no arguments",
366 context.memberDef->qualifiedName());
367 }
368 }
369 }
370}
size_t size() const
Definition arguments.h:100
void push_back(const Argument &a)
Definition arguments.h:102
#define warn_incomplete_doc(file, line, fmt,...)
Definition message.h:107

References argListToString(), Config_getBool, context, ArgumentList::empty(), QCString::endsWith(), FALSE, QCString::isEmpty(), QCString::left(), QCString::length(), QCString::lower(), ArgumentList::push_back(), ArgumentList::size(), QCString::str(), QCString::stripWhiteSpace(), TRUE, warn_doc_error, and warn_incomplete_doc.

Referenced by validatingParseDoc().

◆ defaultHandleTitleAndSize()

void DocParser::defaultHandleTitleAndSize ( const CommandType cmd,
DocNodeVariant * parent,
DocNodeList & children,
QCString & width,
QCString & height )

Definition at line 1024 of file docparser.cpp.

1025{
1026 AUTO_TRACE();
1027 auto ns = AutoNodeStack(this,parent);
1028
1029 // parse title
1030 tokenizer.setStateTitle();
1031 Token tok = tokenizer.lex();
1032 while (!tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1033 {
1034 if (tok.is(TokenRetval::TK_WORD) && (context.token->name=="width=" || context.token->name=="height="))
1035 {
1036 // special case: no title, but we do have a size indicator
1037 break;
1038 }
1039 else if (tok.is(TokenRetval::TK_HTMLTAG))
1040 {
1041 tokenizer.unputString(context.token->text);
1042 break;
1043 }
1044 if (!defaultHandleToken(parent,tok,children))
1045 {
1046 errorHandleDefaultToken(parent,tok,children,Mappers::cmdMapper->find(cmd));
1047 }
1048 tok = tokenizer.lex();
1049 }
1050 // parse size attributes
1051 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1052 {
1053 tok=tokenizer.lex();
1054 }
1055 while (tok.is_any_of(TokenRetval::TK_WHITESPACE,TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG)) // there are values following the title
1056 {
1057 if (tok.is(TokenRetval::TK_WORD))
1058 {
1059 if (context.token->name=="width=" || context.token->name=="height=")
1060 {
1061 tokenizer.setStateTitleAttrValue();
1062 context.token->name = context.token->name.left(context.token->name.length()-1);
1063 }
1064
1065 if (context.token->name=="width")
1066 {
1067 width = context.token->chars;
1068 }
1069 else if (context.token->name=="height")
1070 {
1071 height = context.token->chars;
1072 }
1073 else // other text after the title -> treat as normal text
1074 {
1075 tokenizer.unputString(context.token->name);
1076 //warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unknown option '{}' after \\{} command, expected 'width' or 'height'",
1077 // context.token->name, Mappers::cmdMapper->find(cmd));
1078 break;
1079 }
1080 }
1081
1082 tok=tokenizer.lex();
1083 // if we found something we did not expect, push it back to the stream
1084 // so it can still be processed
1085 if (tok.is_any_of(TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS))
1086 {
1087 tokenizer.unputString(context.token->name);
1088 tokenizer.unputString(tok.is(TokenRetval::TK_COMMAND_AT) ? "@" : "\\");
1089 break;
1090 }
1091 else if (tok.is(TokenRetval::TK_SYMBOL))
1092 {
1093 tokenizer.unputString(context.token->name);
1094 break;
1095 }
1096 else if (tok.is(TokenRetval::TK_HTMLTAG))
1097 {
1098 tokenizer.unputString(context.token->text);
1099 break;
1100 }
1101 }
1102 tokenizer.setStatePara();
1103
1105 AUTO_TRACE_EXIT("width={} height={}",width,height);
1106}
bool defaultHandleToken(DocNodeVariant *parent, Token tok, DocNodeList &children, bool handleWord=TRUE)
DocTokenizer tokenizer
void handlePendingStyleCommands(DocNodeVariant *parent, DocNodeList &children)
void errorHandleDefaultToken(DocNodeVariant *parent, Token tok, DocNodeList &children, const QCString &txt)
bool is(TokenRetval rv) const
bool is_any_of(ARGS... args) const
#define AUTO_TRACE(...)
Definition docnode.cpp:47
#define AUTO_TRACE_EXIT(...)
Definition docnode.cpp:49
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
Definition docnode.h:1328
const Mapper< CommandType > * cmdMapper

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().

◆ defaultHandleToken()

bool DocParser::defaultHandleToken ( DocNodeVariant * parent,
Token tok,
DocNodeList & children,
bool handleWord = TRUE )

Definition at line 1262 of file docparser.cpp.

1263{
1264 AUTO_TRACE("token={} handleWord={}",tok.to_string(),handleWord);
1265 if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
1266 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
1267 )
1268 {
1269 }
1270reparsetoken:
1271 QCString tokenName = context.token->name;
1272 AUTO_TRACE_ADD("tokenName={}",tokenName);
1273 switch (tok.value())
1274 {
1275 case TokenRetval::TK_COMMAND_AT:
1276 // fall through
1277 case TokenRetval::TK_COMMAND_BS:
1278 switch (Mappers::cmdMapper->map(tokenName))
1279 {
1281 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_BSlash);
1282 break;
1284 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_At);
1285 break;
1287 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Less);
1288 break;
1290 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Greater);
1291 break;
1293 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Amp);
1294 break;
1296 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Dollar);
1297 break;
1299 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Hash);
1300 break;
1302 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_DoubleColon);
1303 break;
1305 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Percent);
1306 break;
1308 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1309 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1310 break;
1312 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1313 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1314 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1315 break;
1317 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Quot);
1318 break;
1320 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Dot);
1321 break;
1323 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Exclam);
1324 break;
1326 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Quest);
1327 break;
1329 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Plus);
1330 break;
1332 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1333 break;
1335 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Equal);
1336 break;
1338 {
1339 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Italic,tokenName,TRUE);
1340 tok=handleStyleArgument(parent,children,tokenName);
1341 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Italic,tokenName,FALSE);
1342 if (!tok.is(TokenRetval::TK_WORD)) children.append<DocWhiteSpace>(this,parent," ");
1343 if (tok.is(TokenRetval::TK_NEWPARA)) goto handlepara;
1344 else if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1345 {
1346 AUTO_TRACE_ADD("CommandType::CMD_EMPHASIS: reparsing");
1347 goto reparsetoken;
1348 }
1349 }
1350 break;
1352 {
1353 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Bold,tokenName,TRUE);
1354 tok=handleStyleArgument(parent,children,tokenName);
1355 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Bold,tokenName,FALSE);
1356 if (!tok.is(TokenRetval::TK_WORD)) children.append<DocWhiteSpace>(this,parent," ");
1357 if (tok.is(TokenRetval::TK_NEWPARA)) goto handlepara;
1358 else if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1359 {
1360 AUTO_TRACE_ADD("CommandType::CMD_BOLD: reparsing");
1361 goto reparsetoken;
1362 }
1363 }
1364 break;
1366 {
1367 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Code,tokenName,TRUE);
1368 tok=handleStyleArgument(parent,children,tokenName);
1369 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Code,tokenName,FALSE);
1370 if (!tok.is(TokenRetval::TK_WORD)) children.append<DocWhiteSpace>(this,parent," ");
1371 if (tok.is(TokenRetval::TK_NEWPARA)) goto handlepara;
1372 else if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1373 {
1374 AUTO_TRACE_ADD("CommandType::CMD_CODE: reparsing");
1375 goto reparsetoken;
1376 }
1377 }
1378 break;
1380 {
1381 tokenizer.setStateHtmlOnly();
1382 tok = tokenizer.lex();
1383 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::HtmlOnly,context.isExample,context.exampleName,context.token->name=="block");
1384 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1385 {
1386 warn_doc_error(context.fileName,tokenizer.getLineNr(),"htmlonly section ended without end marker");
1387 }
1388 tokenizer.setStatePara();
1389 }
1390 break;
1392 {
1393 tokenizer.setStateManOnly();
1394 tok = tokenizer.lex();
1395 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::ManOnly,context.isExample,context.exampleName);
1396 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1397 {
1398 warn_doc_error(context.fileName,tokenizer.getLineNr(),"manonly section ended without end marker");
1399 }
1400 tokenizer.setStatePara();
1401 }
1402 break;
1404 {
1405 tokenizer.setStateRtfOnly();
1406 tok = tokenizer.lex();
1407 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::RtfOnly,context.isExample,context.exampleName);
1408 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1409 {
1410 warn_doc_error(context.fileName,tokenizer.getLineNr(),"rtfonly section ended without end marker");
1411 }
1412 tokenizer.setStatePara();
1413 }
1414 break;
1416 {
1417 tokenizer.setStateLatexOnly();
1418 tok = tokenizer.lex();
1419 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::LatexOnly,context.isExample,context.exampleName);
1420 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1421 {
1422 warn_doc_error(context.fileName,tokenizer.getLineNr(),"latexonly section ended without end marker");
1423 }
1424 tokenizer.setStatePara();
1425 }
1426 break;
1428 {
1429 tokenizer.setStateXmlOnly();
1430 tok = tokenizer.lex();
1431 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::XmlOnly,context.isExample,context.exampleName);
1432 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1433 {
1434 warn_doc_error(context.fileName,tokenizer.getLineNr(),"xmlonly section ended without end marker");
1435 }
1436 tokenizer.setStatePara();
1437 }
1438 break;
1440 {
1441 tokenizer.setStateDbOnly();
1442 tok = tokenizer.lex();
1443 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::DocbookOnly,context.isExample,context.exampleName);
1444 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1445 {
1446 warn_doc_error(context.fileName,tokenizer.getLineNr(),"docbookonly section ended without end marker");
1447 }
1448 tokenizer.setStatePara();
1449 }
1450 break;
1452 {
1453 children.append<DocFormula>(this,parent,context.token->id);
1454 }
1455 break;
1458 {
1459 handleAnchor(parent,children);
1460 }
1461 break;
1463 {
1464 handlePrefix(parent,children);
1465 }
1466 break;
1468 {
1469 handleInternalRef(parent,children);
1470 tokenizer.setStatePara();
1471 }
1472 break;
1474 {
1475 tokenizer.setStateSetScope();
1476 (void)tokenizer.lex();
1477 context.context = context.token->name;
1478 //printf("Found scope='%s'\n",qPrint(context.context));
1479 tokenizer.setStatePara();
1480 }
1481 break;
1483 handleImage(parent,children);
1484 break;
1486 handleILine(tok.command_to_char(),tokenName);
1487 break;
1489 handleIFile(tok.command_to_char(),tokenName);
1490 break;
1491 default:
1492 return FALSE;
1493 }
1494 break;
1495 case TokenRetval::TK_HTMLTAG:
1496 {
1497 auto handleEnterLeaveStyle = [this,&parent,&children,&tokenName](DocStyleChange::Style style) {
1498 if (!context.token->endTag)
1499 {
1500 handleStyleEnter(parent,children,style,tokenName,&context.token->attribs);
1501 }
1502 else
1503 {
1504 handleStyleLeave(parent,children,style,tokenName);
1505 }
1506 };
1507 switch (Mappers::htmlTagMapper->map(tokenName))
1508 {
1510 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <div> tag in heading");
1511 break;
1513 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <pre> tag in heading");
1514 break;
1516 handleEnterLeaveStyle(DocStyleChange::Span);
1517 break;
1519 handleEnterLeaveStyle(DocStyleChange::Bold);
1520 break;
1522 handleEnterLeaveStyle(DocStyleChange::S);
1523 break;
1525 handleEnterLeaveStyle(DocStyleChange::Strike);
1526 break;
1528 handleEnterLeaveStyle(DocStyleChange::Del);
1529 break;
1531 handleEnterLeaveStyle(DocStyleChange::Underline);
1532 break;
1534 handleEnterLeaveStyle(DocStyleChange::Ins);
1535 break;
1537 case HtmlTagType::XML_C:
1538 handleEnterLeaveStyle(DocStyleChange::Code);
1539 break;
1541 handleEnterLeaveStyle(DocStyleChange::Kbd);
1542 break;
1544 handleEnterLeaveStyle(DocStyleChange::Typewriter);
1545 break;
1547 handleEnterLeaveStyle(DocStyleChange::Italic);
1548 break;
1550 handleEnterLeaveStyle(DocStyleChange::Subscript);
1551 break;
1553 handleEnterLeaveStyle(DocStyleChange::Superscript);
1554 break;
1556 handleEnterLeaveStyle(DocStyleChange::Center);
1557 break;
1559 handleEnterLeaveStyle(DocStyleChange::Small);
1560 break;
1562 handleEnterLeaveStyle(DocStyleChange::Cite);
1563 break;
1565 if (!context.token->endTag)
1566 {
1567 handleImg(parent,children,context.token->attribs);
1568 }
1569 break;
1570 default:
1571 return FALSE;
1572 break;
1573 }
1574 }
1575 break;
1576 case TokenRetval::TK_SYMBOL:
1577 {
1580 {
1581 children.append<DocSymbol>(this,parent,s);
1582 }
1583 else
1584 {
1585 return FALSE;
1586 }
1587 }
1588 break;
1589 case TokenRetval::TK_WHITESPACE:
1590 case TokenRetval::TK_NEWPARA:
1591handlepara:
1592 if (insidePRE(parent) || !children.empty())
1593 {
1594 children.append<DocWhiteSpace>(this,parent,context.token->chars);
1595 }
1596 break;
1597 case TokenRetval::TK_LNKWORD:
1598 if (handleWord)
1599 {
1600 handleLinkedWord(parent,children);
1601 }
1602 else
1603 return FALSE;
1604 break;
1605 case TokenRetval::TK_WORD:
1606 if (handleWord)
1607 {
1608 children.append<DocWord>(this,parent,context.token->name);
1609 }
1610 else
1611 return FALSE;
1612 break;
1613 case TokenRetval::TK_URL:
1614 if (context.insideHtmlLink)
1615 {
1616 children.append<DocWord>(this,parent,context.token->name);
1617 }
1618 else
1619 {
1620 children.append<DocURL>(this,parent,context.token->name,context.token->isEMailAddr);
1621 }
1622 break;
1623 default:
1624 return FALSE;
1625 }
1626 return TRUE;
1627}
void handleLinkedWord(DocNodeVariant *parent, DocNodeList &children, bool ignoreAutoLinkFlag=FALSE)
void handleInternalRef(DocNodeVariant *parent, DocNodeList &children)
void handleStyleLeave(DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName)
void handleImage(DocNodeVariant *parent, DocNodeList &children)
void handleStyleEnter(DocNodeVariant *parent, DocNodeList &children, DocStyleChange::Style s, const QCString &tagName, const HtmlAttribList *attribs)
void handlePrefix(DocNodeVariant *parent, DocNodeList &children)
Token handleStyleArgument(DocNodeVariant *parent, DocNodeList &children, const QCString &cmdName)
void handleIFile(char cmdChar, const QCString &cmdName)
void handleILine(char cmdChar, const QCString &cmdName)
void handleAnchor(DocNodeVariant *parent, DocNodeList &children)
void handleImg(DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
static HtmlEntityMapper::SymType decodeSymbol(const QCString &symName)
Definition docnode.cpp:153
TOKEN_SPECIFICATIONS RETVAL_SPECIFICATIONS const char * to_string() const
TokenRetval value() const
char command_to_char() const
@ CMD_INTERNALREF
Definition cmdmapper.h:65
#define AUTO_TRACE_ADD(...)
Definition docnode.cpp:48
bool insidePRE(const DocNodeVariant *n)
const Mapper< HtmlTagType > * htmlTagMapper
void append(Args &&... args)
Append a new DocNodeVariant to the list by constructing it with type T and parameters Args.
Definition docnode.h:1397

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, Token::command_to_char(), context, DocSymbol::decodeSymbol(), DocStyleChange::Del, DocVerbatim::DocbookOnly, GrowVector< T >::empty(), FALSE, handleAnchor(), handleIFile(), handleILine(), 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_SPAN, HTML_STRIKE, HTML_SUB, HTML_SUP, HTML_TT, 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::Span, 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::Typewriter, DocStyleChange::Underline, Token::value(), warn_doc_error, XML_C, and DocVerbatim::XmlOnly.

Referenced by defaultHandleTitleAndSize(), handleStyleArgument(), and DocPara::injectToken().

◆ errorHandleDefaultToken()

void DocParser::errorHandleDefaultToken ( DocNodeVariant * parent,
Token tok,
DocNodeList & children,
const QCString & txt )

Definition at line 538 of file docparser.cpp.

540{
541 switch (tok.value())
542 {
543 case TokenRetval::TK_COMMAND_AT:
544 // fall through
545 case TokenRetval::TK_COMMAND_BS:
546 {
547 char cs[2] = { tok.command_to_char(), 0 };
548 children.append<DocWord>(this,parent,cs + context.token->name);
549 warn_doc_error(context.fileName,tokenizer.getLineNr(),"Illegal command '{:c}{}' found as part of a {}",
550 tok.command_to_char(),context.token->name,txt);
551 }
552 break;
553 case TokenRetval::TK_SYMBOL:
554 warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unsupported symbol '{}' found as part of a {}",
555 qPrint(context.token->name), qPrint(txt));
556 break;
557 case TokenRetval::TK_HTMLTAG:
558 warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unsupported HTML tag <{}{}> found as part of a {}",
559 context.token->endTag ? "/" : "",context.token->name, txt);
560 break;
561 default:
562 children.append<DocWord>(this,parent,context.token->name);
563 warn_doc_error(context.fileName,tokenizer.getLineNr(),"Unexpected token {} found as part of a {}",
564 tok.to_string(), txt);
565 break;
566 }
567}

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().

◆ findAndCopyImage()

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 96 of file docparser.cpp.

97{
98 QCString result;
99 bool ambig = false;
100 FileDef *fd = findFileDef(Doxygen::imageNameLinkedMap,fileName,ambig);
101 //printf("Search for %s\n",fileName);
102 if (fd)
103 {
104 if (ambig & doWarn)
105 {
106 warn_doc_error(context.fileName,tokenizer.getLineNr(),
107 "image file name '{}' is ambiguous.\n"
108 "Possible candidates:\n{}", fileName,showFileDefMatches(Doxygen::imageNameLinkedMap,fileName));
109 }
110
111 QCString inputFile = fd->absFilePath();
112 FileInfo infi(inputFile.str());
113 if (infi.exists())
114 {
115 result = fileName;
116 int i = result.findRev('/');
117 if (i!=-1 || (i=result.findRev('\\'))!=-1)
118 {
119 result = result.right(static_cast<int>(result.length())-i-1);
120 }
121 //printf("fileName=%s result=%s\n",fileName,qPrint(result));
122 QCString outputDir;
123 switch(type)
124 {
125 case DocImage::Html:
126 if (!Config_getBool(GENERATE_HTML)) return result;
127 outputDir = Config_getString(HTML_OUTPUT);
128 break;
129 case DocImage::Latex:
130 if (!Config_getBool(GENERATE_LATEX)) return result;
131 outputDir = Config_getString(LATEX_OUTPUT);
132 break;
134 if (!Config_getBool(GENERATE_DOCBOOK)) return result;
135 outputDir = Config_getString(DOCBOOK_OUTPUT);
136 break;
137 case DocImage::Rtf:
138 if (!Config_getBool(GENERATE_RTF)) return result;
139 outputDir = Config_getString(RTF_OUTPUT);
140 break;
141 case DocImage::Xml:
142 if (!Config_getBool(GENERATE_XML)) return result;
143 outputDir = Config_getString(XML_OUTPUT);
144 break;
145 }
146 QCString outputFile = outputDir+"/"+result;
147 FileInfo outfi(outputFile.str());
148 if (outfi.isSymLink())
149 {
150 Dir().remove(outputFile.str());
151 warn_doc_error(context.fileName,tokenizer.getLineNr(),
152 "destination of image {} is a symlink, replacing with image",
153 outputFile);
154 }
155 if (outputFile!=inputFile) // prevent copying to ourself
156 {
157 if (copyFile(inputFile,outputFile) && type==DocImage::Html)
158 {
160 }
161 }
162 }
163 else
164 {
165 warn_doc_error(context.fileName,tokenizer.getLineNr(),
166 "could not open image {}",fileName);
167 }
168
169 if (type==DocImage::Latex && Config_getBool(USE_PDFLATEX) &&
170 fd->name().endsWith(".eps")
171 )
172 { // we have an .eps image in pdflatex mode => convert it to a pdf.
173 QCString outputDir = Config_getString(LATEX_OUTPUT);
174 QCString baseName = fd->name().left(fd->name().length()-4);
175 QCString epstopdfArgs(4096, QCString::ExplicitSize);
176 epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"",
177 qPrint(outputDir), qPrint(baseName),
178 qPrint(outputDir), qPrint(baseName));
179 if (Portable::system("epstopdf",epstopdfArgs)!=0)
180 {
181 err("Problems running epstopdf. Check your TeX installation!\n");
182 }
183 else
184 {
185 Dir().remove(outputDir.str()+"/"+baseName.str()+".eps");
186 }
187 return baseName;
188 }
189 }
190 else
191 {
192 result=fileName;
193 if (!result.startsWith("http:") && !result.startsWith("https:") && doWarn)
194 {
195 warn_doc_error(context.fileName,tokenizer.getLineNr(),
196 "image file {} is not found in IMAGE_PATH: "
197 "assuming external image.",fileName
198 );
199 }
200 }
201 return result;
202}
@ DocBook
Definition docnode.h:644
static FileNameLinkedMap * imageNameLinkedMap
Definition doxygen.h:105
static IndexList * indexList
Definition doxygen.h:133
virtual QCString absFilePath() const =0
void addImageFile(const QCString &name)
Definition indexlist.h:123
QCString right(size_t len) const
Definition qcstring.h:234
@ ExplicitSize
Definition qcstring.h:146
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:96
#define Config_getString(name)
Definition config.h:32
#define err(fmt,...)
Definition message.h:127
int system(const QCString &command, const QCString &args, bool commandHasConsole=true)
Definition portable.cpp:106
QCString showFileDefMatches(const FileNameLinkedMap *fnMap, const QCString &n)
Definition util.cpp:2999
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
Definition util.cpp:5857
FileDef * findFileDef(const FileNameLinkedMap *fnMap, const QCString &n, bool &ambig)
Definition util.cpp:2871

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().

◆ findDocsForMemberOrCompound()

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.

Return values
TRUEif name was found.
FALSEif name was not found.

Definition at line 385 of file docparser.cpp.

389{
390 AUTO_TRACE("commandName={}",commandName);
391 *pDoc="";
392 *pBrief="";
393 *pDef=nullptr;
394 QCString cmdArg=commandName;
395 if (cmdArg.isEmpty())
396 {
397 AUTO_TRACE_EXIT("empty");
398 return false;
399 }
400
401 const FileDef *fd=nullptr;
402 const GroupDef *gd=nullptr;
403 const PageDef *pd=nullptr;
404 gd = Doxygen::groupLinkedMap->find(cmdArg);
405 if (gd) // group
406 {
407 *pDoc=gd->documentation();
408 *pBrief=gd->briefDescription();
409 *pDef=gd;
410 AUTO_TRACE_EXIT("group");
411 return true;
412 }
413 pd = Doxygen::pageLinkedMap->find(cmdArg);
414 if (pd) // page
415 {
416 *pDoc=pd->documentation();
417 *pBrief=pd->briefDescription();
418 *pDef=pd;
419 AUTO_TRACE_EXIT("page");
420 return true;
421 }
422 bool ambig = false;
423 fd = findFileDef(Doxygen::inputNameLinkedMap,cmdArg,ambig);
424 if (fd && !ambig) // file
425 {
426 *pDoc=fd->documentation();
427 *pBrief=fd->briefDescription();
428 *pDef=fd;
429 AUTO_TRACE_EXIT("file");
430 return true;
431 }
432
433 // for symbols we need to normalize the separator, so A#B, or A\B, or A.B becomes A::B
434 cmdArg = substitute(cmdArg,"#","::");
435 cmdArg = substitute(cmdArg,"\\","::");
436 bool extractAnonNs = Config_getBool(EXTRACT_ANON_NSPACES);
437 if (extractAnonNs &&
438 cmdArg.startsWith("anonymous_namespace{")
439 )
440 {
441 size_t rightBracePos = cmdArg.find("}", static_cast<int>(qstrlen("anonymous_namespace{")));
442 QCString leftPart = cmdArg.left(rightBracePos + 1);
443 QCString rightPart = cmdArg.right(cmdArg.size() - rightBracePos - 1);
444 rightPart = substitute(rightPart, ".", "::");
445 cmdArg = leftPart + rightPart;
446 }
447 else
448 {
449 cmdArg = substitute(cmdArg,".","::");
450 }
451
452 int l=static_cast<int>(cmdArg.length());
453
454 int funcStart=cmdArg.find('(');
455 if (funcStart==-1)
456 {
457 funcStart=l;
458 }
459 else
460 {
461 // Check for the case of operator() and the like.
462 // beware of scenarios like operator()((foo)bar)
463 int secondParen = cmdArg.find('(', funcStart+1);
464 int leftParen = cmdArg.find(')', funcStart+1);
465 if (leftParen!=-1 && secondParen!=-1)
466 {
467 if (leftParen<secondParen)
468 {
469 funcStart=secondParen;
470 }
471 }
472 }
473
474 QCString name=removeRedundantWhiteSpace(cmdArg.left(funcStart));
475 QCString args=cmdArg.right(l-funcStart);
476 // try if the link is to a member
477 GetDefInput input(
478 context.context.find('.')==-1 ? context.context : QCString(), // find('.') is a hack to detect files
479 name,
480 args);
481 input.checkCV=true;
482 GetDefResult result = getDefs(input);
483 //printf("found=%d context=%s name=%s\n",result.found,qPrint(context.context),qPrint(name));
484 if (result.found && result.md)
485 {
486 *pDoc=result.md->documentation();
487 *pBrief=result.md->briefDescription();
488 *pDef=result.md;
489 AUTO_TRACE_EXIT("member");
490 return true;
491 }
492
493 int scopeOffset=static_cast<int>(context.context.length());
494 do // for each scope
495 {
496 QCString fullName=cmdArg;
497 if (scopeOffset>0)
498 {
499 fullName.prepend(context.context.left(scopeOffset)+"::");
500 }
501 //printf("Trying fullName='%s'\n",qPrint(fullName));
502
503 // try class, namespace, group, page, file reference
504 const ClassDef *cd = Doxygen::classLinkedMap->find(fullName);
505 if (cd) // class
506 {
507 *pDoc=cd->documentation();
508 *pBrief=cd->briefDescription();
509 *pDef=cd;
510 AUTO_TRACE_EXIT("class");
511 return true;
512 }
513 const NamespaceDef *nd = Doxygen::namespaceLinkedMap->find(fullName);
514 if (nd) // namespace
515 {
516 *pDoc=nd->documentation();
517 *pBrief=nd->briefDescription();
518 *pDef=nd;
519 AUTO_TRACE_EXIT("namespace");
520 return true;
521 }
522 if (scopeOffset==0)
523 {
524 scopeOffset=-1;
525 }
526 else
527 {
528 scopeOffset = context.context.findRev("::",scopeOffset-1);
529 if (scopeOffset==-1) scopeOffset=0;
530 }
531 } while (scopeOffset>=0);
532
533 AUTO_TRACE_EXIT("not found");
534 return FALSE;
535}
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual QCString documentation() const =0
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:114
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:104
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:95
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:99
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:113
const T * find(const std::string &key) const
Definition linkedmap.h:47
int find(char c, int index=0, bool cs=TRUE) const
Definition qcstring.cpp:43
QCString & prepend(const char *s)
Definition qcstring.h:422
bool startsWith(const char *s) const
Definition qcstring.h:507
size_t size() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:169
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition qcstring.cpp:571
uint32_t qstrlen(const char *str)
Returns the length of string str, or 0 if a null pointer is passed.
Definition qcstring.h:58
const MemberDef * md
Definition util.h:124
bool found
Definition util.h:123
QCString removeRedundantWhiteSpace(const QCString &s)
Definition util.cpp:568
GetDefResult getDefs(const GetDefInput &input)
Definition util.cpp:2275

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().

◆ handleAHref()

Token DocParser::handleAHref ( DocNodeVariant * parent,
DocNodeList & children,
const HtmlAttribList & tagHtmlAttribs )

Definition at line 715 of file docparser.cpp.

717{
718 AUTO_TRACE();
719 size_t index=0;
720 Token retval = Token::make_RetVal_OK();
721 for (const auto &opt : tagHtmlAttribs)
722 {
723 if (opt.name=="name" || opt.name=="id") // <a name=label> or <a id=label> tag
724 {
725 if (!opt.value.isEmpty())
726 {
727 children.append<DocAnchor>(this,parent,opt.value,TRUE);
728 break; // stop looking for other tag attribs
729 }
730 else
731 {
732 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <a> tag with name option but without value!");
733 }
734 }
735 else if (opt.name=="href") // <a href=url>..</a> tag
736 {
737 // copy attributes
738 HtmlAttribList attrList = tagHtmlAttribs;
739 // and remove the href attribute
740 attrList.erase(attrList.begin()+index);
741 QCString relPath;
742 if (opt.value.at(0) != '#') relPath = context.relPath;
743 children.append<DocHRef>(this, parent, attrList,
744 opt.value, relPath,
745 convertNameToFile(context.fileName, FALSE, TRUE));
746 context.insideHtmlLink=TRUE;
747 retval = children.get_last<DocHRef>()->parse();
748 context.insideHtmlLink=FALSE;
749 tokenizer.setStatePara();
750 break;
751 }
752 else // unsupported option for tag a
753 {
754 }
755 ++index;
756 }
757 return retval;
758}
bool parse(const QCString &fileName, bool update=FALSE, CompareMode compareMode=CompareMode::Full)
T * get_last()
Returns a pointer to the last element in the list if that element exists and holds a T,...
Definition docnode.h:1408
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3485

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().

◆ handleAnchor()

void DocParser::handleAnchor ( DocNodeVariant * parent,
DocNodeList & children )

Definition at line 960 of file docparser.cpp.

961{
962 AUTO_TRACE();
963 Token tok=tokenizer.lex();
964 if (!tok.is(TokenRetval::TK_WHITESPACE))
965 {
966 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\{} command",
967 context.token->name);
968 return;
969 }
970 tokenizer.setStateAnchor();
971 tok=tokenizer.lex();
972 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
973 {
974 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
975 "argument of command {}",context.token->name);
976 return;
977 }
978 else if (!tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
979 {
980 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token {} as the argument of {}",
981 tok.to_string(),context.token->name);
982 return;
983 }
984 tokenizer.setStatePara();
985 children.append<DocAnchor>(this,parent,context.token->name,FALSE);
986}

References DocNodeList::append(), AUTO_TRACE, context, FALSE, Token::is(), Token::is_any_of(), parent(), Token::to_string(), tokenizer, and warn_doc_error.

Referenced by defaultHandleToken(), and DocPara::handleCommand().

◆ handleIFile()

void DocParser::handleIFile ( char cmdChar,
const QCString & cmdName )

Definition at line 1214 of file docparser.cpp.

1215{
1216 AUTO_TRACE();
1217 Token tok=tokenizer.lex();
1218 if (!tok.is(TokenRetval::TK_WHITESPACE))
1219 {
1220 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after '{:c}{}' command",
1221 cmdChar,cmdName);
1222 return;
1223 }
1224 tokenizer.setStateFile();
1225 tok=tokenizer.lex();
1226 tokenizer.setStatePara();
1227 if (!tok.is(TokenRetval::TK_WORD))
1228 {
1229 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token {} as the argument of '{:c}{}'",
1230 tok.to_string(),cmdChar,cmdName);
1231 return;
1232 }
1233 context.fileName = context.token->name;
1234 tokenizer.setStatePara();
1235}

References AUTO_TRACE, context, Token::is(), Token::to_string(), tokenizer, and warn_doc_error.

Referenced by defaultHandleToken(), and DocPara::handleCommand().

◆ handleILine()

void DocParser::handleILine ( char cmdChar,
const QCString & cmdName )

Definition at line 1237 of file docparser.cpp.

1238{
1239 AUTO_TRACE();
1240 tokenizer.setStateILine();
1241 Token tok = tokenizer.lex();
1242 if (!tok.is(TokenRetval::TK_WORD))
1243 {
1244 warn_doc_error(context.fileName,tokenizer.getLineNr(),"invalid argument for command '{:c}{}'",
1245 cmdChar,cmdName);
1246 return;
1247 }
1248 tokenizer.setStatePara();
1249}

References AUTO_TRACE, context, Token::is(), tokenizer, and warn_doc_error.

Referenced by defaultHandleToken(), and DocPara::handleCommand().

◆ handleImage()

void DocParser::handleImage ( DocNodeVariant * parent,
DocNodeList & children )

Definition at line 1108 of file docparser.cpp.

1109{
1110 AUTO_TRACE();
1111 bool inlineImage = false;
1112 QCString anchorStr;
1113
1114 Token tok=tokenizer.lex();
1115 if (!tok.is(TokenRetval::TK_WHITESPACE))
1116 {
1117 if (tok.is(TokenRetval::TK_WORD))
1118 {
1119 if (context.token->name == "{")
1120 {
1121 tokenizer.setStateOptions();
1122 tokenizer.lex();
1123 tokenizer.setStatePara();
1124 StringVector optList=split(context.token->name.str(),",");
1125 for (const auto &opt : optList)
1126 {
1127 if (opt.empty()) continue;
1128 QCString locOpt(opt);
1129 QCString locOptLow;
1130 locOpt = locOpt.stripWhiteSpace();
1131 locOptLow = locOpt.lower();
1132 if (locOptLow == "inline")
1133 {
1134 inlineImage = true;
1135 }
1136 else if (locOptLow.startsWith("anchor:"))
1137 {
1138 if (!anchorStr.isEmpty())
1139 {
1140 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1141 "multiple use of option 'anchor' for 'image' command, ignoring: '{}'",
1142 locOpt.mid(7));
1143 }
1144 else
1145 {
1146 anchorStr = locOpt.mid(7);
1147 }
1148 }
1149 else
1150 {
1151 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1152 "unknown option '{}' for 'image' command specified",
1153 locOpt);
1154 }
1155 }
1156 tok=tokenizer.lex();
1157 if (!tok.is(TokenRetval::TK_WHITESPACE))
1158 {
1159 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\image command");
1160 return;
1161 }
1162 }
1163 }
1164 else
1165 {
1166 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\image command");
1167 return;
1168 }
1169 }
1170 tok=tokenizer.lex();
1171 if (!tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
1172 {
1173 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token {} as the argument of \\image",
1174 tok.to_string());
1175 return;
1176 }
1177 tok=tokenizer.lex();
1178 if (!tok.is(TokenRetval::TK_WHITESPACE))
1179 {
1180 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\image command");
1181 return;
1182 }
1184 QCString imgType = context.token->name.lower();
1185 if (imgType=="html") t=DocImage::Html;
1186 else if (imgType=="latex") t=DocImage::Latex;
1187 else if (imgType=="docbook") t=DocImage::DocBook;
1188 else if (imgType=="rtf") t=DocImage::Rtf;
1189 else if (imgType=="xml") t=DocImage::Xml;
1190 else
1191 {
1192 warn_doc_error(context.fileName,tokenizer.getLineNr(),"output format `{}` specified as the first argument of "
1193 "\\image command is not valid", imgType);
1194 return;
1195 }
1196 tokenizer.setStateFile();
1197 tok=tokenizer.lex();
1198 tokenizer.setStatePara();
1199 if (!tok.is(TokenRetval::TK_WORD))
1200 {
1201 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token {} as the argument of \\image", tok.to_string());
1202 return;
1203 }
1204 if (!anchorStr.isEmpty())
1205 {
1206 children.append<DocAnchor>(this,parent,anchorStr,true);
1207 }
1208 HtmlAttribList attrList;
1209 children.append<DocImage>(this,parent,attrList,
1210 findAndCopyImage(context.token->name,t),t,"",inlineImage);
1211 children.get_last<DocImage>()->parse();
1212}
QCString findAndCopyImage(const QCString &fileName, DocImage::Type type, bool doWarn=true)
Definition docparser.cpp:96
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:241
std::vector< std::string > StringVector
Definition containers.h:33
StringVector split(const std::string &s, const std::string &delimiter)
split input string s by string delimiter delimiter.
Definition util.cpp:6618

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(), DocImage::Rtf, split(), QCString::startsWith(), QCString::stripWhiteSpace(), Token::to_string(), tokenizer, warn_doc_error, and DocImage::Xml.

Referenced by defaultHandleToken(), and DocPara::handleCommand().

◆ handleImg()

void DocParser::handleImg ( DocNodeVariant * parent,
DocNodeList & children,
const HtmlAttribList & tagHtmlAttribs )

Definition at line 1631 of file docparser.cpp.

1632{
1633 AUTO_TRACE();
1634 bool found=FALSE;
1635 size_t index=0;
1636 for (const auto &opt : tagHtmlAttribs)
1637 {
1638 AUTO_TRACE_ADD("option name={} value='{}'",opt.name,opt.value);
1639 if (opt.name=="src" && !opt.value.isEmpty())
1640 {
1641 // copy attributes
1642 HtmlAttribList attrList = tagHtmlAttribs;
1643 // and remove the src attribute
1644 attrList.erase(attrList.begin()+index);
1646 children.append<DocImage>(
1647 this,parent,attrList,
1648 findAndCopyImage(opt.value,t,false),
1649 t,opt.value);
1650 found = TRUE;
1651 }
1652 ++index;
1653 }
1654 if (!found)
1655 {
1656 warn_doc_error(context.fileName,tokenizer.getLineNr(),"IMG tag does not have a SRC attribute!");
1657 }
1658}

References DocNodeList::append(), AUTO_TRACE, AUTO_TRACE_ADD, context, FALSE, findAndCopyImage(), DocImage::Html, parent(), tokenizer, TRUE, and warn_doc_error.

Referenced by defaultHandleToken(), and DocPara::handleHtmlStartTag().

◆ handleInitialStyleCommands()

void DocParser::handleInitialStyleCommands ( DocNodeVariant * parent,
DocNodeList & children )

Definition at line 704 of file docparser.cpp.

705{
706 AUTO_TRACE();
707 while (!context.initialStyleStack.empty())
708 {
709 const DocStyleChange &sc = std::get<DocStyleChange>(*context.initialStyleStack.top());
710 handleStyleEnter(parent,children,sc.style(),sc.tagName(),&sc.attribs());
711 context.initialStyleStack.pop();
712 }
713}
const HtmlAttribList & attribs() const
Definition docnode.h:311
QCString tagName() const
Definition docnode.h:312
Style style() const
Definition docnode.h:307

References DocStyleChange::attribs(), AUTO_TRACE, context, handleStyleEnter(), parent(), DocStyleChange::style(), and DocStyleChange::tagName().

Referenced by DocPara::parse().

◆ handleInternalRef()

void DocParser::handleInternalRef ( DocNodeVariant * parent,
DocNodeList & children )

Definition at line 938 of file docparser.cpp.

939{
940 Token tok=tokenizer.lex();
941 QCString tokenName = context.token->name;
942 AUTO_TRACE("name={}",tokenName);
943 if (!tok.is(TokenRetval::TK_WHITESPACE))
944 {
945 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\{} command", tokenName);
946 return;
947 }
948 tokenizer.setStateInternalRef();
949 tok=tokenizer.lex(); // get the reference id
950 if (!tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD))
951 {
952 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token {} as the argument of {}",
953 tok.to_string(),tokenName);
954 return;
955 }
956 children.append<DocInternalRef>(this,parent,context.token->name);
957 children.get_last<DocInternalRef>()->parse();
958}

References DocNodeList::append(), AUTO_TRACE, context, DocNodeList::get_last(), Token::is(), Token::is_any_of(), parent(), Token::to_string(), tokenizer, and warn_doc_error.

Referenced by defaultHandleToken(), and DocPara::handleCommand().

◆ handleLinkedWord()

void DocParser::handleLinkedWord ( DocNodeVariant * parent,
DocNodeList & children,
bool ignoreAutoLinkFlag = FALSE )

Definition at line 784 of file docparser.cpp.

785{
786 // helper to check if word w starts with any of the words in AUTOLINK_IGNORE_WORDS
787 auto ignoreWord = [](const QCString &w) -> bool {
788 const auto &list = Config_getList(AUTOLINK_IGNORE_WORDS);
789 return std::find_if(list.begin(), list.end(),
790 [&w](const auto &ignore) { return w.startsWith(ignore); }
791 )!=list.end();
792 };
793 QCString name = linkToText(context.lang,context.token->name,TRUE);
794 AUTO_TRACE("word={}",name);
795 if ((!context.autolinkSupport && !ignoreAutoLinkFlag) || ignoreWord(context.token->name)) // no autolinking -> add as normal word
796 {
797 children.append<DocWord>(this,parent,name);
798 return;
799 }
800
801 // ------- try to turn the word 'name' into a link
802
803 const Definition *compound=nullptr;
804 const MemberDef *member=nullptr;
805 size_t len = context.token->name.length();
806 ClassDef *cd=nullptr;
807 bool ambig = false;
808 FileDef *fd = findFileDef(Doxygen::inputNameLinkedMap,context.fileName,ambig);
809 auto lang = context.lang;
810 bool inSeeBlock = context.inSeeBlock || context.inCodeStyle;
811 //printf("handleLinkedWord(%s) context.context=%s\n",qPrint(context.token->name),qPrint(context.context));
812 if (!context.insideHtmlLink &&
813 (resolveRef(context.context,context.token->name,inSeeBlock,&compound,&member,lang,TRUE,fd,TRUE)
814 || (!context.context.isEmpty() && // also try with global scope
815 resolveRef(QCString(),context.token->name,inSeeBlock,&compound,&member,lang,FALSE,nullptr,TRUE))
816 )
817 )
818 {
819 //printf("ADD %s = %p (linkable?=%d)\n",qPrint(context.token->name),(void*)member,member ? member->isLinkable() : FALSE);
820 if (member && member->isLinkable()) // member link
821 {
822 AUTO_TRACE_ADD("resolved reference as member link");
823 if (member->isObjCMethod())
824 {
825 bool localLink = context.memberDef ? member->getClassDef()==context.memberDef->getClassDef() : FALSE;
826 name = member->objCMethodName(localLink,inSeeBlock);
827 }
828 children.append<DocLinkedWord>(
829 this,parent,name,
830 member->getReference(),
831 member->getOutputFileBase(),
832 member->anchor(),
833 member->briefDescriptionAsTooltip());
834 }
835 else if (compound->isLinkable()) // compound link
836 {
837 AUTO_TRACE_ADD("resolved reference as compound link");
838 QCString anchor = compound->anchor();
839 if (compound->definitionType()==Definition::TypeFile)
840 {
841 name=context.token->name;
842 }
843 else if (compound->definitionType()==Definition::TypeGroup)
844 {
845 name=toGroupDef(compound)->groupTitle();
846 }
847 children.append<DocLinkedWord>(
848 this,parent,name,
849 compound->getReference(),
850 compound->getOutputFileBase(),
851 anchor,
852 compound->briefDescriptionAsTooltip());
853 }
854 else if (compound->definitionType()==Definition::TypeFile &&
855 (toFileDef(compound))->generateSourceFile()
856 ) // undocumented file that has source code we can link to
857 {
858 AUTO_TRACE_ADD("resolved reference as source link");
859 children.append<DocLinkedWord>(
860 this,parent,context.token->name,
861 compound->getReference(),
862 compound->getSourceFileBase(),
863 "",
864 compound->briefDescriptionAsTooltip());
865 }
866 else // not linkable
867 {
868 AUTO_TRACE_ADD("resolved reference as unlinkable compound={} (linkable={}) member={} (linkable={})",
869 compound ? compound->name() : "<none>", compound ? (int)compound->isLinkable() : -1,
870 member ? member->name() : "<none>", member ? (int)member->isLinkable() : -1);
871 children.append<DocWord>(this,parent,name);
872 }
873 }
874 else if (!context.insideHtmlLink && len>1 && context.token->name.at(len-1)==':')
875 {
876 // special case, where matching Foo: fails to be an Obj-C reference,
877 // but Foo itself might be linkable.
878 context.token->name=context.token->name.left(len-1);
879 handleLinkedWord(parent,children,ignoreAutoLinkFlag);
880 children.append<DocWord>(this,parent,":");
881 }
882 else if (!context.insideHtmlLink && (cd=getClass(context.token->name+"-p")))
883 {
884 // special case 2, where the token name is not a class, but could
885 // be a Obj-C protocol
886 children.append<DocLinkedWord>(
887 this,parent,name,
888 cd->getReference(),
889 cd->getOutputFileBase(),
890 cd->anchor(),
892 }
893 else if (const RequirementIntf *req = RequirementManager::instance().find(name); req!=nullptr) // link to requirement
894 {
895 children.append<DocLinkedWord>(
896 this,parent,name,
897 QCString(), // link to local requirements overview also for external references
898 req->getOutputFileBase(),
899 req->id(),
900 req->title()
901 );
902 }
903 else // normal non-linkable word
904 {
905 AUTO_TRACE_ADD("non-linkable");
906 if (context.token->name.startsWith("#"))
907 {
908 warn_doc_error(context.fileName,tokenizer.getLineNr(),"explicit link request to '{}' could not be resolved",name);
909 }
910 children.append<DocWord>(this,parent,context.token->name);
911 }
912}
virtual bool isLinkable() const =0
virtual DefType definitionType() const =0
virtual QCString anchor() const =0
virtual QCString briefDescriptionAsTooltip() const =0
virtual QCString getReference() const =0
virtual QCString getSourceFileBase() const =0
virtual QCString getOutputFileBase() const =0
virtual QCString groupTitle() const =0
virtual bool isObjCMethod() const =0
virtual const ClassDef * getClassDef() const =0
virtual QCString objCMethodName(bool localLink, bool showStatic) const =0
static RequirementManager & instance()
ClassDef * getClass(const QCString &n)
#define Config_getList(name)
Definition config.h:38
FileDef * toFileDef(Definition *d)
Definition filedef.cpp:1967
GroupDef * toGroupDef(Definition *d)
QCString linkToText(SrcLangExt lang, const QCString &link, bool isFileName)
Definition util.cpp:2675
bool resolveRef(const QCString &scName, const QCString &name, bool inSeeBlock, const Definition **resContext, const MemberDef **resMember, SrcLangExt lang, bool lookForSpecialization, const FileDef *currentFile, bool checkScope)
Definition util.cpp:2419

References Definition::anchor(), DocNodeList::append(), AUTO_TRACE, AUTO_TRACE_ADD, Definition::briefDescriptionAsTooltip(), Config_getList, context, Definition::definitionType(), FALSE, findFileDef(), getClass(), MemberDef::getClassDef(), Definition::getOutputFileBase(), Definition::getReference(), Definition::getSourceFileBase(), GroupDef::groupTitle(), handleLinkedWord(), Doxygen::inputNameLinkedMap, RequirementManager::instance(), Definition::isLinkable(), MemberDef::isObjCMethod(), linkToText(), Definition::name(), MemberDef::objCMethodName(), parent(), 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().

◆ handleParameterType()

void DocParser::handleParameterType ( DocNodeVariant * parent,
DocNodeList & children,
const QCString & paramTypes )

Definition at line 914 of file docparser.cpp.

915{
916 QCString name = context.token->name; // save token name
917 AUTO_TRACE("name={}",name);
918 QCString name1;
919 int p=0, i=0, ii=0;
920 while ((i=paramTypes.find('|',p))!=-1)
921 {
922 name1 = paramTypes.mid(p,i-p);
923 ii=name1.find('[');
924 context.token->name=ii!=-1 ? name1.mid(0,ii) : name1; // take part without []
925 handleLinkedWord(parent,children);
926 if (ii!=-1) children.append<DocWord>(this,parent,name1.mid(ii)); // add [] part
927 p=i+1;
928 children.append<DocSeparator>(this,parent,"|");
929 }
930 name1 = paramTypes.mid(p);
931 ii=name1.find('[');
932 context.token->name=ii!=-1 ? name1.mid(0,ii) : name1;
933 handleLinkedWord(parent,children);
934 if (ii!=-1) children.append<DocWord>(this,parent,name1.mid(ii));
935 context.token->name = name; // restore original token name
936}

References DocNodeList::append(), AUTO_TRACE, context, QCString::find(), handleLinkedWord(), QCString::mid(), and parent().

Referenced by DocParamList::parse().

◆ handlePendingStyleCommands()

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 687 of file docparser.cpp.

688{
689 AUTO_TRACE();
690 if (!context.styleStack.empty())
691 {
692 const DocStyleChange *sc = &std::get<DocStyleChange>(*context.styleStack.top());
693 while (sc && sc->position()>=context.nodeStack.size())
694 { // there are unclosed style modifiers in the paragraph
695 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),
696 sc->style(),sc->tagName(),FALSE);
697 context.initialStyleStack.push(context.styleStack.top());
698 context.styleStack.pop();
699 sc = !context.styleStack.empty() ? &std::get<DocStyleChange>(*context.styleStack.top()) : nullptr;
700 }
701 }
702}
size_t position() const
Definition docnode.h:310

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().

◆ handlePrefix()

void DocParser::handlePrefix ( DocNodeVariant * parent,
DocNodeList & children )

Definition at line 988 of file docparser.cpp.

989{
990 AUTO_TRACE();
991 Token tok=tokenizer.lex();
992 if (!tok.is(TokenRetval::TK_WHITESPACE))
993 {
994 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\{} command", context.token->name);
995 return;
996 }
997 tokenizer.setStatePrefix();
998 tok=tokenizer.lex();
999 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1000 {
1001 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected end of comment block while parsing the "
1002 "argument of command {}",context.token->name);
1003 return;
1004 }
1005 else if (!tok.is(TokenRetval::TK_WORD))
1006 {
1007 warn_doc_error(context.fileName,tokenizer.getLineNr(),"unexpected token {} as the argument of {}",
1008 tok.to_string(),context.token->name);
1009 return;
1010 }
1011 context.prefix = context.token->name;
1012 tokenizer.setStatePara();
1013}

References AUTO_TRACE, context, Token::is(), Token::is_any_of(), parent(), Token::to_string(), tokenizer, and warn_doc_error.

Referenced by defaultHandleToken(), and DocPara::handleCommand().

◆ handleStyleArgument()

Token DocParser::handleStyleArgument ( DocNodeVariant * parent,
DocNodeList & children,
const QCString & cmdName )

Definition at line 571 of file docparser.cpp.

572{
573 AUTO_TRACE("cmdName={}",cmdName);
574 QCString saveCmdName = cmdName;
575 Token tok=tokenizer.lex();
576 if (!tok.is(TokenRetval::TK_WHITESPACE))
577 {
578 warn_doc_error(context.fileName,tokenizer.getLineNr(),"expected whitespace after \\{} command",
579 saveCmdName);
580 return tok;
581 }
582 tok = tokenizer.lex();
583 while (!tok.is_any_of(TokenRetval::TK_NONE, TokenRetval::TK_EOF, TokenRetval::TK_WHITESPACE,
584 TokenRetval::TK_NEWPARA, TokenRetval::TK_LISTITEM, TokenRetval::TK_ENDLIST)
585 )
586 {
587 static const reg::Ex specialChar(R"([.,|()\‍[\‍]:;?])");
588 if (tok.is(TokenRetval::TK_WORD) && context.token->name.length()==1 &&
589 reg::match(context.token->name.str(),specialChar))
590 {
591 // special character that ends the markup command
592 return tok;
593 }
594 if (!defaultHandleToken(parent,tok,children))
595 {
596 switch (tok.value())
597 {
598 case TokenRetval::TK_HTMLTAG:
599 if (insideLI(parent) && Mappers::htmlTagMapper->map(context.token->name)!=HtmlTagType::UNKNOWN && context.token->endTag)
600 {
601 // ignore </li> as the end of a style command
602 }
603 else
604 {
605 AUTO_TRACE_EXIT("end tok={}",tok.to_string());
606 return tok;
607 }
608 break;
609 default:
610 errorHandleDefaultToken(parent,tok,children,"\\" + saveCmdName + " command");
611 break;
612 }
613 break;
614 }
615 tok = tokenizer.lex();
616 }
617 AUTO_TRACE_EXIT("end tok={}",tok.to_string());
618 return (tok.is_any_of(TokenRetval::TK_NEWPARA,TokenRetval::TK_LISTITEM,TokenRetval::TK_ENDLIST)) ? tok : Token::make_RetVal_OK();
619}
bool insideLI(const DocNodeVariant *n)

References AUTO_TRACE, AUTO_TRACE_EXIT, context, defaultHandleToken(), errorHandleDefaultToken(), Mappers::htmlTagMapper, insideLI(), Token::is(), Token::is_any_of(), reg::match(), parent(), Token::to_string(), tokenizer, UNKNOWN, Token::value(), and warn_doc_error.

Referenced by defaultHandleToken(), and DocPara::handleCommand().

◆ handleStyleEnter()

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 624 of file docparser.cpp.

626{
627 AUTO_TRACE("tagName={}",tagName);
628 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),s,tagName,TRUE,
629 context.fileName,tokenizer.getLineNr(),attribs);
630 context.styleStack.push(&children.back());
632}
T & back()
access the last element
Definition growvector.h:135

References DocNodeList::append(), AUTO_TRACE, GrowVector< T >::back(), context, parent(), tokenizer, TRUE, and DocStyleChange::Typewriter.

Referenced by defaultHandleToken(), DocPara::handleHtmlStartTag(), and handleInitialStyleCommands().

◆ handleStyleLeave()

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 637 of file docparser.cpp.

639{
640 AUTO_TRACE("tagName={}",tagName);
641 QCString tagNameLower = QCString(tagName).lower();
642
643 auto topStyleChange = [](const DocStyleChangeStack &stack) -> const DocStyleChange &
644 {
645 return std::get<DocStyleChange>(*stack.top());
646 };
647
648 if (context.styleStack.empty() || // no style change
649 topStyleChange(context.styleStack).style()!=s || // wrong style change
650 topStyleChange(context.styleStack).tagName()!=tagNameLower || // wrong style change
651 topStyleChange(context.styleStack).position()!=context.nodeStack.size() // wrong position
652 )
653 {
654 if (context.styleStack.empty())
655 {
656 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </{0}> tag without matching <{0}>",tagName);
657 }
658 else if (topStyleChange(context.styleStack).tagName()!=tagNameLower ||
659 topStyleChange(context.styleStack).style()!=s)
660 {
661 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </{}> tag while expecting </{}>",
662 tagName,topStyleChange(context.styleStack).tagName());
663 }
664 else
665 {
666 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found </{}> at different nesting level ({}) than expected ({})",
667 tagName,context.nodeStack.size(),topStyleChange(context.styleStack).position());
668 }
669 }
670 else // end the section
671 {
672 children.append<DocStyleChange>(
673 this,parent,context.nodeStack.size(),s,
674 topStyleChange(context.styleStack).tagName(),FALSE);
675 context.styleStack.pop();
676 }
678 {
679 context.inCodeStyle = false;
680 }
681}
IterableStack< const DocNodeVariant * > DocStyleChangeStack
Definition docparser_p.h:55

References DocNodeList::append(), AUTO_TRACE, context, FALSE, QCString::lower(), parent(), tokenizer, DocStyleChange::Typewriter, and warn_doc_error.

Referenced by defaultHandleToken(), DocPara::handleHtmlEndTag(), and DocPara::handleHtmlStartTag().

◆ handleUnclosedStyleCommands()

void DocParser::handleUnclosedStyleCommands ( )

Definition at line 760 of file docparser.cpp.

761{
762 AUTO_TRACE();
763 if (!context.initialStyleStack.empty())
764 {
765 QCString tagName = std::get<DocStyleChange>(*context.initialStyleStack.top()).tagName();
766 QCString fileName = std::get<DocStyleChange>(*context.initialStyleStack.top()).fileName();
767 int lineNr = std::get<DocStyleChange>(*context.initialStyleStack.top()).lineNr();
768 context.initialStyleStack.pop();
770 if (lineNr != -1)
771 {
772 warn_doc_error(context.fileName,tokenizer.getLineNr(),
773 "end of comment block while expecting "
774 "command </{}> (Probable start '{}' at line {})",tagName, fileName, lineNr);
775 }
776 else
777 {
778 warn_doc_error(context.fileName,tokenizer.getLineNr(),
779 "end of comment block while expecting command </{}>",tagName);
780 }
781 }
782}
void handleUnclosedStyleCommands()

References AUTO_TRACE, context, handleUnclosedStyleCommands(), tokenizer, and warn_doc_error.

Referenced by handleUnclosedStyleCommands(), DocRoot::parse(), and DocText::parse().

◆ internalValidatingParseDoc()

Token DocParser::internalValidatingParseDoc ( DocNodeVariant * parent,
DocNodeList & children,
const QCString & doc )

Definition at line 1662 of file docparser.cpp.

1664{
1665 AUTO_TRACE();
1666 Token retval = Token::make_RetVal_OK();
1667
1668 if (doc.isEmpty()) return retval;
1669
1670 tokenizer.init(doc.data(),context.fileName,context.markdownSupport,context.insideHtmlLink);
1671
1672 // first parse any number of paragraphs
1673 bool isFirst=TRUE;
1674 DocPara *lastPar=!children.empty() ? std::get_if<DocPara>(&children.back()): nullptr;
1675 if (lastPar)
1676 { // last child item was a paragraph
1677 isFirst=FALSE;
1678 }
1679 do
1680 {
1681 children.append<DocPara>(this,parent);
1682 DocPara *par = children.get_last<DocPara>();
1683 if (isFirst) { par->markFirst(); isFirst=FALSE; }
1684 retval=par->parse();
1685 if (!par->isEmpty())
1686 {
1687 if (lastPar) lastPar->markLast(FALSE);
1688 lastPar=par;
1689 }
1690 else
1691 {
1692 children.pop_back();
1693 }
1694 } while (retval.is(TokenRetval::TK_NEWPARA));
1695 if (lastPar) lastPar->markLast();
1696
1697 AUTO_TRACE_EXIT("isFirst={} isLast={}",lastPar?lastPar->isFirst():-1,lastPar?lastPar->isLast():-1);
1698 return retval;
1699}
bool isLast() const
Definition docnode.h:1088
void markLast(bool v=TRUE)
Definition docnode.h:1086
bool isFirst() const
Definition docnode.h:1087
void pop_back()
removes the last element
Definition growvector.h:115
bool empty() const
checks whether the container is empty
Definition growvector.h:140
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:172

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().

◆ popContext()

void DocParser::popContext ( )

Definition at line 75 of file docparser.cpp.

76{
77 auto &ctx = contextStack.top();
78 context = ctx;
79 tokenizer.setFileName(ctx.fileName);
80 tokenizer.setLineNr(ctx.lineNo);
81 contextStack.pop();
82 tokenizer.popContext();
83 context.token = tokenizer.token();
84
85 //QCString indent;
86 //indent.fill(' ',contextStack.size()*2+2);
87 //printf("%sdocParserPopContext() count=%zu\n",qPrint(indent),context.nodeStack.size());
88}
std::stack< DocParserContext > contextStack

References context, contextStack, and tokenizer.

Referenced by DocPara::handleInheritDoc(), DocRef::parse(), DocXRefItem::parse(), DocTitle::parseFromString(), and DocSimpleSect::parseRcs().

◆ processCopyDoc()

QCString DocParser::processCopyDoc ( const char * data,
size_t & len )

Definition at line 1857 of file docparser.cpp.

1858{
1859 AUTO_TRACE("data={} len={}",Trace::trunc(data),len);
1860 QCString result;
1861 result.reserve(len+32);
1862 size_t i=0;
1863 int lineNr = tokenizer.getLineNr();
1864 while (i<len)
1865 {
1866 char c = data[i];
1867 if (c=='@' || c=='\\') // look for a command
1868 {
1869 bool isBrief=TRUE;
1870 size_t j=isCopyBriefOrDetailsCmd(data,i,len,isBrief);
1871 if (j>0)
1872 {
1873 // skip whitespace
1874 while (j<len && (data[j]==' ' || data[j]=='\t')) j++;
1875 // extract the argument
1876 QCString id = extractCopyDocId(data,j,len);
1877 const Definition *def = nullptr;
1878 QCString doc,brief;
1879 //printf("resolving docs='%s'\n",qPrint(id));
1880 bool found = findDocsForMemberOrCompound(id,&doc,&brief,&def);
1881 if (found && def->isReference())
1882 {
1883 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1884 "@copy{} or @copydoc target '{}' found but is from a tag file, skipped",
1885 isBrief?"brief":"details", id);
1886 }
1887 else if (found)
1888 {
1889 //printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,qPrint(brief),qPrint(doc),isBrief);
1890 auto it = std::find(context.copyStack.begin(),context.copyStack.end(),def);
1891 if (it==context.copyStack.end()) // definition not parsed earlier
1892 {
1893 QCString orgFileName = context.fileName;
1894 context.copyStack.push_back(def);
1895 auto addDocs = [&](const QCString &file_,int line_,const QCString &doc_)
1896 {
1897 result+=" \\ifile \""+file_+"\" ";
1898 result+="\\iline "+QCString().setNum(line_)+" \\ilinebr ";
1899 size_t len_ = doc_.length();
1900 result+=processCopyDoc(doc_.data(),len_);
1901 };
1902 if (isBrief)
1903 {
1904 addDocs(def->briefFile(),def->briefLine(),brief);
1905 }
1906 else
1907 {
1908 addDocs(def->docFile(),def->docLine(),doc);
1910 {
1911 const MemberDef *md = toMemberDef(def);
1912 const ArgumentList &docArgList = md->templateMaster() ?
1913 md->templateMaster()->argumentList() :
1914 md->argumentList();
1915 result+=inlineArgListToDoc(docArgList);
1916 }
1917 }
1918 context.copyStack.pop_back();
1919 result+=" \\ilinebr \\ifile \""+context.fileName+"\" ";
1920 result+="\\iline "+QCString().setNum(lineNr)+" ";
1921 }
1922 else
1923 {
1924 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1925 "Found recursive @copy{} or @copydoc relation for argument '{}'.",
1926 isBrief?"brief":"details",id);
1927 }
1928 }
1929 else
1930 {
1931 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1932 "@copy{} or @copydoc target '{}' not found", isBrief?"brief":"details",id);
1933 }
1934 // skip over command
1935 i=j;
1936 }
1937 else
1938 {
1939 QCString endMarker;
1940 size_t k = isVerbatimSection(data,i,len,endMarker);
1941 if (k>0)
1942 {
1943 size_t orgPos = i;
1944 i=skipToEndMarker(data,k,len,endMarker);
1945 result+=QCString(data+orgPos,i-orgPos);
1946 // TODO: adjust lineNr
1947 }
1948 else
1949 {
1950 result+=c;
1951 i++;
1952 }
1953 }
1954 }
1955 else // not a command, just copy
1956 {
1957 result+=c;
1958 i++;
1959 lineNr += (c=='\n') ? 1 : 0;
1960 }
1961 }
1962 len = result.length();
1963 AUTO_TRACE_EXIT("result={}",Trace::trunc(result));
1964 return result;
1965}
virtual int briefLine() const =0
virtual QCString briefFile() const =0
virtual bool isReference() const =0
QCString processCopyDoc(const char *data, size_t &len)
bool findDocsForMemberOrCompound(const QCString &commandName, QCString *pDoc, QCString *pBrief, const Definition **pDef)
virtual const ArgumentList & argumentList() const =0
virtual const MemberDef * templateMaster() const =0
QCString & setNum(short n)
Definition qcstring.h:459
void reserve(size_t size)
Reserve space for size bytes without changing the string contents.
Definition qcstring.h:185
static QCString extractCopyDocId(const char *data, size_t &j, size_t len)
static size_t skipToEndMarker(const char *data, size_t i, size_t len, const QCString &endMarker)
static size_t isVerbatimSection(const char *data, size_t i, size_t len, QCString &endMarker)
static size_t isCopyBriefOrDetailsCmd(const char *data, size_t i, size_t len, bool &brief)
MemberDef * toMemberDef(Definition *d)
QCString trunc(const QCString &s, size_t numChars=15)
Definition trace.h:56
QCString inlineArgListToDoc(const ArgumentList &al)
Definition util.cpp:1186

References MemberDef::argumentList(), AUTO_TRACE, AUTO_TRACE_EXIT, Definition::briefFile(), Definition::briefLine(), context, Definition::definitionType(), Definition::docFile(), Definition::docLine(), extractCopyDocId(), findDocsForMemberOrCompound(), inlineArgListToDoc(), isCopyBriefOrDetailsCmd(), Definition::isReference(), isVerbatimSection(), QCString::length(), processCopyDoc(), QCString::reserve(), QCString::setNum(), skipToEndMarker(), MemberDef::templateMaster(), tokenizer, toMemberDef(), TRUE, Trace::trunc(), Definition::TypeMember, and warn_doc_error.

Referenced by processCopyDoc(), and validatingParseDoc().

◆ pushContext()

void DocParser::pushContext ( )

Definition at line 60 of file docparser.cpp.

61{
62 //QCString indent;
63 //indent.fill(' ',contextStack.size()*2+2);
64 //printf("%sdocParserPushContext() count=%zu\n",qPrint(indent),context.nodeStack.size());
65
66 tokenizer.pushContext();
67 contextStack.emplace();
68 auto &ctx = contextStack.top();
69 ctx = context;
70 ctx.fileName = tokenizer.getFileName();
71 ctx.lineNo = tokenizer.getLineNr();
72 context.token = tokenizer.token();
73}

References context, contextStack, and tokenizer.

Referenced by DocPara::handleInheritDoc(), DocRef::parse(), DocXRefItem::parse(), DocTitle::parseFromString(), and DocSimpleSect::parseRcs().

◆ readTextFileByName()

void DocParser::readTextFileByName ( const QCString & file,
QCString & text )

Definition at line 1703 of file docparser.cpp.

1704{
1705 AUTO_TRACE("file={} text={}",file,text);
1706 bool ambig = false;
1707 QCString filePath = findFilePath(file,ambig);
1708 if (!filePath.isEmpty())
1709 {
1710 text = fileToString(filePath,Config_getBool(FILTER_SOURCE_FILES));
1711 if (ambig)
1712 {
1713 warn_doc_error(context.fileName,tokenizer.getLineNr(),"included file name '{}' is ambiguous"
1714 "Possible candidates:\n{}",file, showFileDefMatches(Doxygen::exampleNameLinkedMap,file));
1715 }
1716 }
1717 else
1718 {
1719 warn_doc_error(context.fileName,tokenizer.getLineNr(),"included file '{}' is not found. "
1720 "Check your EXAMPLE_PATH",file);
1721 }
1722}
static FileNameLinkedMap * exampleNameLinkedMap
Definition doxygen.h:102
QCString findFilePath(const QCString &file, bool &ambig)
Definition util.cpp:2956
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
Definition util.cpp:1471

References AUTO_TRACE, Config_getBool, context, Doxygen::exampleNameLinkedMap, fileToString(), findFilePath(), QCString::isEmpty(), showFileDefMatches(), tokenizer, and warn_doc_error.

Referenced by DocInclude::parse().

Member Data Documentation

◆ context

DocParserContext DocParser::context

Definition at line 144 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(), handleIFile(), handleILine(), 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(), skipSpacesForTable(), validatingParseDoc(), validatingParseText(), and validatingParseTitle().

◆ contextStack

std::stack< DocParserContext > DocParser::contextStack

Definition at line 143 of file docparser_p.h.

Referenced by popContext(), and pushContext().

◆ tokenizer

DocTokenizer DocParser::tokenizer

Definition at line 145 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(), handleIFile(), 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(), skipSpacesForTable(), validatingParseDoc(), validatingParseText(), and validatingParseTitle().


The documentation for this class was generated from the following files: