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 readTextFileByName (const QCString &file, QCString &text)
 

Public Attributes

std::stack< DocParserContextcontextStack
 
DocParserContext context
 
DocTokenizer tokenizer
 

Detailed Description

Definition at line 97 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 209 of file docparser.cpp.

210{
211 if (!(Config_getBool(WARN_IF_DOC_ERROR) || Config_getBool(WARN_IF_INCOMPLETE_DOC))) return;
212 if (context.memberDef==nullptr) return; // not a member
213 std::string name = context.token->name.str();
214 const ArgumentList &al=context.memberDef->isDocsForDefinition() ?
215 context.memberDef->argumentList() :
216 context.memberDef->declArgumentList();
217 SrcLangExt lang = context.memberDef->getLanguage();
218 //printf("isDocsForDefinition()=%d\n",context.memberDef->isDocsForDefinition());
219 if (al.empty()) return; // no argument list
220
221 static const reg::Ex re(R"(\$?\w+\.*)");
222 reg::Iterator it(name,re);
223 reg::Iterator end;
224 for (; it!=end ; ++it)
225 {
226 const auto &match = *it;
227 QCString aName=match.str();
228 if (lang==SrcLangExt::Fortran) aName=aName.lower();
229 //printf("aName='%s'\n",qPrint(aName));
230 bool found=FALSE;
231 for (const Argument &a : al)
232 {
233 QCString argName = context.memberDef->isDefine() ? a.type : a.name;
234 if (lang==SrcLangExt::Fortran) argName=argName.lower();
235 argName=argName.stripWhiteSpace();
236 //printf("argName='%s' aName=%s\n",qPrint(argName),qPrint(aName));
237 if (argName.endsWith("...")) argName=argName.left(argName.length()-3);
238 if (aName==argName)
239 {
240 context.paramsFound.insert(aName.str());
241 found=TRUE;
242 break;
243 }
244 }
245 if (!found)
246 {
247 //printf("member type=%d\n",context.memberDef->memberType());
248 QCString scope=context.memberDef->getScopeString();
249 if (!scope.isEmpty()) scope+="::"; else scope="";
250 QCString inheritedFrom = "";
251 QCString docFile = context.memberDef->docFile();
252 int docLine = context.memberDef->docLine();
253 const MemberDef *inheritedMd = context.memberDef->inheritsDocsFrom();
254 if (inheritedMd) // documentation was inherited
255 {
256 inheritedFrom.sprintf(" inherited from member %s at line "
257 "%d in file %s",qPrint(inheritedMd->name()),
258 inheritedMd->docLine(),qPrint(inheritedMd->docFile()));
259 docFile = context.memberDef->getDefFileName();
260 docLine = context.memberDef->getDefLine();
261 }
262 QCString alStr = argListToString(al);
263 warn_doc_error(docFile,docLine,
264 "argument '%s' of command @param "
265 "is not found in the argument list of %s%s%s%s",
266 qPrint(aName), qPrint(scope), qPrint(context.memberDef->name()),
267 qPrint(alStr), qPrint(inheritedFrom));
268 }
269 }
270}
bool empty() const
Definition arguments.h:92
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:153
QCString lower() const
Definition qcstring.h:234
bool endsWith(const char *s) const
Definition qcstring.h:509
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:245
const std::string & str() const
Definition qcstring.h:537
QCString & sprintf(const char *format,...)
Definition qcstring.cpp:29
QCString left(size_t len) const
Definition qcstring.h:214
#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:74
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:759
const char * qPrint(const char *s)
Definition qcstring.h:672
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
SrcLangExt
Language as given by extension.
Definition types.h:42
@ Fortran
Definition types.h:53
bool found
Definition util.cpp:984
QCString argListToString(const ArgumentList &al, bool useCanonicalType, bool showDefVals)
Definition util.cpp:1174

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

◆ checkRetvalName()

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.

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

References Config_getBool, context, QCString::isEmpty(), qPrint(), 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 297 of file docparser.cpp.

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

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

◆ defaultHandleTitleAndSize()

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

Definition at line 1021 of file docparser.cpp.

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

1226{
1227 AUTO_TRACE("token={} handleWord={}",tok.to_string(),handleWord);
1228 if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_LNKWORD,TokenRetval::TK_SYMBOL,TokenRetval::TK_URL,
1229 TokenRetval::TK_COMMAND_AT,TokenRetval::TK_COMMAND_BS,TokenRetval::TK_HTMLTAG)
1230 )
1231 {
1232 }
1233reparsetoken:
1234 QCString tokenName = context.token->name;
1235 AUTO_TRACE_ADD("tokenName={}",tokenName);
1236 switch (tok.value())
1237 {
1238 case TokenRetval::TK_COMMAND_AT:
1239 // fall through
1240 case TokenRetval::TK_COMMAND_BS:
1241 switch (Mappers::cmdMapper->map(tokenName))
1242 {
1244 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_BSlash);
1245 break;
1247 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_At);
1248 break;
1250 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Less);
1251 break;
1253 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Greater);
1254 break;
1256 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Amp);
1257 break;
1259 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Dollar);
1260 break;
1262 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Hash);
1263 break;
1265 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_DoubleColon);
1266 break;
1268 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Percent);
1269 break;
1271 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1272 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1273 break;
1275 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1276 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1277 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1278 break;
1280 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Quot);
1281 break;
1283 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Dot);
1284 break;
1286 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Exclam);
1287 break;
1289 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Quest);
1290 break;
1292 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Plus);
1293 break;
1295 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Minus);
1296 break;
1298 children.append<DocSymbol>(this,parent,HtmlEntityMapper::Sym_Equal);
1299 break;
1301 {
1302 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Italic,tokenName,TRUE);
1303 tok=handleStyleArgument(parent,children,tokenName);
1304 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Italic,tokenName,FALSE);
1305 if (!tok.is(TokenRetval::TK_WORD)) children.append<DocWhiteSpace>(this,parent," ");
1306 if (tok.is(TokenRetval::TK_NEWPARA)) goto handlepara;
1307 else if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1308 {
1309 AUTO_TRACE_ADD("CommandType::CMD_EMPHASIS: reparsing");
1310 goto reparsetoken;
1311 }
1312 }
1313 break;
1315 {
1316 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Bold,tokenName,TRUE);
1317 tok=handleStyleArgument(parent,children,tokenName);
1318 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Bold,tokenName,FALSE);
1319 if (!tok.is(TokenRetval::TK_WORD)) children.append<DocWhiteSpace>(this,parent," ");
1320 if (tok.is(TokenRetval::TK_NEWPARA)) goto handlepara;
1321 else if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1322 {
1323 AUTO_TRACE_ADD("CommandType::CMD_BOLD: reparsing");
1324 goto reparsetoken;
1325 }
1326 }
1327 break;
1329 {
1330 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Code,tokenName,TRUE);
1331 tok=handleStyleArgument(parent,children,tokenName);
1332 children.append<DocStyleChange>(this,parent,context.nodeStack.size(),DocStyleChange::Code,tokenName,FALSE);
1333 if (!tok.is(TokenRetval::TK_WORD)) children.append<DocWhiteSpace>(this,parent," ");
1334 if (tok.is(TokenRetval::TK_NEWPARA)) goto handlepara;
1335 else if (tok.is_any_of(TokenRetval::TK_WORD,TokenRetval::TK_HTMLTAG))
1336 {
1337 AUTO_TRACE_ADD("CommandType::CMD_CODE: reparsing");
1338 goto reparsetoken;
1339 }
1340 }
1341 break;
1343 {
1344 tokenizer.setStateHtmlOnly();
1345 tok = tokenizer.lex();
1346 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::HtmlOnly,context.isExample,context.exampleName,context.token->name=="block");
1347 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1348 {
1349 warn_doc_error(context.fileName,tokenizer.getLineNr(),"htmlonly section ended without end marker");
1350 }
1351 tokenizer.setStatePara();
1352 }
1353 break;
1355 {
1356 tokenizer.setStateManOnly();
1357 tok = tokenizer.lex();
1358 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::ManOnly,context.isExample,context.exampleName);
1359 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1360 {
1361 warn_doc_error(context.fileName,tokenizer.getLineNr(),"manonly section ended without end marker");
1362 }
1363 tokenizer.setStatePara();
1364 }
1365 break;
1367 {
1368 tokenizer.setStateRtfOnly();
1369 tok = tokenizer.lex();
1370 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::RtfOnly,context.isExample,context.exampleName);
1371 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1372 {
1373 warn_doc_error(context.fileName,tokenizer.getLineNr(),"rtfonly section ended without end marker");
1374 }
1375 tokenizer.setStatePara();
1376 }
1377 break;
1379 {
1380 tokenizer.setStateLatexOnly();
1381 tok = tokenizer.lex();
1382 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::LatexOnly,context.isExample,context.exampleName);
1383 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1384 {
1385 warn_doc_error(context.fileName,tokenizer.getLineNr(),"latexonly section ended without end marker");
1386 }
1387 tokenizer.setStatePara();
1388 }
1389 break;
1391 {
1392 tokenizer.setStateXmlOnly();
1393 tok = tokenizer.lex();
1394 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::XmlOnly,context.isExample,context.exampleName);
1395 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1396 {
1397 warn_doc_error(context.fileName,tokenizer.getLineNr(),"xmlonly section ended without end marker");
1398 }
1399 tokenizer.setStatePara();
1400 }
1401 break;
1403 {
1404 tokenizer.setStateDbOnly();
1405 tok = tokenizer.lex();
1406 children.append<DocVerbatim>(this,parent,context.context,context.token->verb,DocVerbatim::DocbookOnly,context.isExample,context.exampleName);
1407 if (tok.is_any_of(TokenRetval::TK_NONE,TokenRetval::TK_EOF))
1408 {
1409 warn_doc_error(context.fileName,tokenizer.getLineNr(),"docbookonly section ended without end marker");
1410 }
1411 tokenizer.setStatePara();
1412 }
1413 break;
1415 {
1416 children.append<DocFormula>(this,parent,context.token->id);
1417 }
1418 break;
1421 {
1422 handleAnchor(parent,children);
1423 }
1424 break;
1426 {
1427 handlePrefix(parent,children);
1428 }
1429 break;
1431 {
1432 handleInternalRef(parent,children);
1433 tokenizer.setStatePara();
1434 }
1435 break;
1437 {
1438 tokenizer.setStateSetScope();
1439 (void)tokenizer.lex();
1440 context.context = context.token->name;
1441 //printf("Found scope='%s'\n",qPrint(context.context));
1442 tokenizer.setStatePara();
1443 }
1444 break;
1446 handleImage(parent,children);
1447 break;
1449 tokenizer.pushState();
1450 tokenizer.setStateILine();
1451 (void)tokenizer.lex();
1452 tokenizer.popState();
1453 break;
1455 tokenizer.pushState();
1456 tokenizer.setStateIFile();
1457 (void)tokenizer.lex();
1458 tokenizer.popState();
1459 break;
1460 default:
1461 return FALSE;
1462 }
1463 break;
1464 case TokenRetval::TK_HTMLTAG:
1465 {
1466 switch (Mappers::htmlTagMapper->map(tokenName))
1467 {
1469 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <div> tag in heading");
1470 break;
1472 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <pre> tag in heading");
1473 break;
1475 if (!context.token->endTag)
1476 {
1477 handleStyleEnter(parent,children,DocStyleChange::Bold,tokenName,&context.token->attribs);
1478 }
1479 else
1480 {
1481 handleStyleLeave(parent,children,DocStyleChange::Bold,tokenName);
1482 }
1483 break;
1485 if (!context.token->endTag)
1486 {
1487 handleStyleEnter(parent,children,DocStyleChange::S,tokenName,&context.token->attribs);
1488 }
1489 else
1490 {
1491 handleStyleLeave(parent,children,DocStyleChange::S,tokenName);
1492 }
1493 break;
1495 if (!context.token->endTag)
1496 {
1497 handleStyleEnter(parent,children,DocStyleChange::Strike,tokenName,&context.token->attribs);
1498 }
1499 else
1500 {
1502 }
1503 break;
1505 if (!context.token->endTag)
1506 {
1507 handleStyleEnter(parent,children,DocStyleChange::Del,tokenName,&context.token->attribs);
1508 }
1509 else
1510 {
1511 handleStyleLeave(parent,children,DocStyleChange::Del,tokenName);
1512 }
1513 break;
1515 if (!context.token->endTag)
1516 {
1517 handleStyleEnter(parent,children,DocStyleChange::Underline,tokenName,&context.token->attribs);
1518 }
1519 else
1520 {
1522 }
1523 break;
1525 if (!context.token->endTag)
1526 {
1527 handleStyleEnter(parent,children,DocStyleChange::Ins,tokenName,&context.token->attribs);
1528 }
1529 else
1530 {
1531 handleStyleLeave(parent,children,DocStyleChange::Ins,tokenName);
1532 }
1533 break;
1535 case HtmlTagType::XML_C:
1536 if (!context.token->endTag)
1537 {
1538 handleStyleEnter(parent,children,DocStyleChange::Code,tokenName,&context.token->attribs);
1539 }
1540 else
1541 {
1542 handleStyleLeave(parent,children,DocStyleChange::Code,tokenName);
1543 }
1544 break;
1546 if (!context.token->endTag)
1547 {
1548 handleStyleEnter(parent,children,DocStyleChange::Kbd,tokenName,&context.token->attribs);
1549 }
1550 else
1551 {
1552 handleStyleLeave(parent,children,DocStyleChange::Kbd,tokenName);
1553 }
1554 break;
1556 if (!context.token->endTag)
1557 {
1558 handleStyleEnter(parent,children,DocStyleChange::Italic,tokenName,&context.token->attribs);
1559 }
1560 else
1561 {
1563 }
1564 break;
1566 if (!context.token->endTag)
1567 {
1568 handleStyleEnter(parent,children,DocStyleChange::Subscript,tokenName,&context.token->attribs);
1569 }
1570 else
1571 {
1573 }
1574 break;
1576 if (!context.token->endTag)
1577 {
1578 handleStyleEnter(parent,children,DocStyleChange::Superscript,tokenName,&context.token->attribs);
1579 }
1580 else
1581 {
1583 }
1584 break;
1586 if (!context.token->endTag)
1587 {
1588 handleStyleEnter(parent,children,DocStyleChange::Center,tokenName,&context.token->attribs);
1589 }
1590 else
1591 {
1593 }
1594 break;
1596 if (!context.token->endTag)
1597 {
1598 handleStyleEnter(parent,children,DocStyleChange::Small,tokenName,&context.token->attribs);
1599 }
1600 else
1601 {
1602 handleStyleLeave(parent,children,DocStyleChange::Small,tokenName);
1603 }
1604 break;
1606 if (!context.token->endTag)
1607 {
1608 handleStyleEnter(parent,children,DocStyleChange::Cite,tokenName,&context.token->attribs);
1609 }
1610 else
1611 {
1612 handleStyleLeave(parent,children,DocStyleChange::Cite,tokenName);
1613 }
1614 break;
1616 if (!context.token->endTag)
1617 handleImg(parent,children,context.token->attribs);
1618 break;
1619 default:
1620 return FALSE;
1621 break;
1622 }
1623 }
1624 break;
1625 case TokenRetval::TK_SYMBOL:
1626 {
1629 {
1630 children.append<DocSymbol>(this,parent,s);
1631 }
1632 else
1633 {
1634 return FALSE;
1635 }
1636 }
1637 break;
1638 case TokenRetval::TK_WHITESPACE:
1639 case TokenRetval::TK_NEWPARA:
1640handlepara:
1641 if (insidePRE(parent) || !children.empty())
1642 {
1643 children.append<DocWhiteSpace>(this,parent,context.token->chars);
1644 }
1645 break;
1646 case TokenRetval::TK_LNKWORD:
1647 if (handleWord)
1648 {
1649 handleLinkedWord(parent,children);
1650 }
1651 else
1652 return FALSE;
1653 break;
1654 case TokenRetval::TK_WORD:
1655 if (handleWord)
1656 {
1657 children.append<DocWord>(this,parent,context.token->name);
1658 }
1659 else
1660 return FALSE;
1661 break;
1662 case TokenRetval::TK_URL:
1663 if (context.insideHtmlLink)
1664 {
1665 children.append<DocWord>(this,parent,context.token->name);
1666 }
1667 else
1668 {
1669 children.append<DocURL>(this,parent,context.token->name,context.token->isEMailAddr);
1670 }
1671 break;
1672 default:
1673 return FALSE;
1674 }
1675 return TRUE;
1676}
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 handleAnchor(DocNodeVariant *parent, DocNodeList &children)
void handleImg(DocNodeVariant *parent, DocNodeList &children, const HtmlAttribList &tagHtmlAttribs)
static HtmlEntityMapper::SymType decodeSymbol(const QCString &symName)
Definition docnode.cpp:152
bool empty() const
checks whether the container is empty
Definition growvector.h:140
TOKEN_SPECIFICATIONS RETVAL_SPECIFICATIONS const char * to_string() const
TokenRetval value() const
@ CMD_INTERNALREF
Definition cmdmapper.h:65
#define AUTO_TRACE_ADD(...)
Definition docnode.cpp:47
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:1393

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

◆ errorHandleDefaultToken()

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

Definition at line 546 of file docparser.cpp.

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

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

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

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

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

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

722{
723 AUTO_TRACE();
724 size_t index=0;
725 Token retval = Token::make_RetVal_OK();
726 for (const auto &opt : tagHtmlAttribs)
727 {
728 if (opt.name=="name" || opt.name=="id") // <a name=label> or <a id=label> tag
729 {
730 if (!opt.value.isEmpty())
731 {
732 children.append<DocAnchor>(this,parent,opt.value,TRUE);
733 break; // stop looking for other tag attribs
734 }
735 else
736 {
737 warn_doc_error(context.fileName,tokenizer.getLineNr(),"found <a> tag with name option but without value!");
738 }
739 }
740 else if (opt.name=="href") // <a href=url>..</a> tag
741 {
742 // copy attributes
743 HtmlAttribList attrList = tagHtmlAttribs;
744 // and remove the href attribute
745 attrList.erase(attrList.begin()+index);
746 QCString relPath;
747 if (opt.value.at(0) != '#') relPath = context.relPath;
748 children.append<DocHRef>(this, parent, attrList,
749 opt.value, relPath,
750 convertNameToFile(context.fileName, FALSE, TRUE));
751 context.insideHtmlLink=TRUE;
752 retval = children.get_last<DocHRef>()->parse();
753 context.insideHtmlLink=FALSE;
754 tokenizer.setStatePara();
755 break;
756 }
757 else // unsupported option for tag a
758 {
759 }
760 ++index;
761 }
762 return retval;
763}
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:1404
QCString convertNameToFile(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3858

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

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

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

◆ handleImage()

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

Definition at line 1105 of file docparser.cpp.

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

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

◆ handleImg()

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

Definition at line 1680 of file docparser.cpp.

1681{
1682 AUTO_TRACE();
1683 bool found=FALSE;
1684 size_t index=0;
1685 for (const auto &opt : tagHtmlAttribs)
1686 {
1687 AUTO_TRACE_ADD("option name={} value='{}'",opt.name,opt.value);
1688 if (opt.name=="src" && !opt.value.isEmpty())
1689 {
1690 // copy attributes
1691 HtmlAttribList attrList = tagHtmlAttribs;
1692 // and remove the src attribute
1693 attrList.erase(attrList.begin()+index);
1695 children.append<DocImage>(
1696 this,parent,attrList,
1697 findAndCopyImage(opt.value,t,false),
1698 t,opt.value);
1699 found = TRUE;
1700 }
1701 ++index;
1702 }
1703 if (!found)
1704 {
1705 warn_doc_error(context.fileName,tokenizer.getLineNr(),"IMG tag does not have a SRC attribute!");
1706 }
1707}

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

◆ handleInitialStyleCommands()

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

Definition at line 709 of file docparser.cpp.

710{
711 AUTO_TRACE();
712 while (!context.initialStyleStack.empty())
713 {
714 const DocStyleChange &sc = std::get<DocStyleChange>(*context.initialStyleStack.top());
715 handleStyleEnter(parent,children,sc.style(),sc.tagName(),&sc.attribs());
716 context.initialStyleStack.pop();
717 }
718}
const HtmlAttribList & attribs() const
Definition docnode.h:306
QCString tagName() const
Definition docnode.h:307
Style style() const
Definition docnode.h:302

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

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

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

◆ handleLinkedWord()

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

Definition at line 790 of file docparser.cpp.

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

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

◆ handleParameterType()

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

Definition at line 909 of file docparser.cpp.

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

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

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

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

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

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

◆ handleStyleArgument()

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

Definition at line 579 of file docparser.cpp.

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

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

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

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

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

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

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

◆ handleUnclosedStyleCommands()

void DocParser::handleUnclosedStyleCommands ( )

Definition at line 765 of file docparser.cpp.

766{
767 AUTO_TRACE();
768 if (!context.initialStyleStack.empty())
769 {
770 QCString tagName = std::get<DocStyleChange>(*context.initialStyleStack.top()).tagName();
771 QCString fileName = std::get<DocStyleChange>(*context.initialStyleStack.top()).fileName();
772 int lineNr = std::get<DocStyleChange>(*context.initialStyleStack.top()).lineNr();
773 context.initialStyleStack.pop();
775 if (lineNr != -1)
776 {
777 warn_doc_error(context.fileName,tokenizer.getLineNr(),
778 "end of comment block while expecting "
779 "command </%s> (Probable start '%s' at line %d)",qPrint(tagName), qPrint(fileName), lineNr);
780 }
781 else
782 {
783 warn_doc_error(context.fileName,tokenizer.getLineNr(),
784 "end of comment block while expecting "
785 "command </%s>",qPrint(tagName));
786 }
787 }
788}
void handleUnclosedStyleCommands()

References AUTO_TRACE, context, handleUnclosedStyleCommands(), qPrint(), 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 1711 of file docparser.cpp.

1713{
1714 AUTO_TRACE();
1715 Token retval = Token::make_RetVal_OK();
1716
1717 if (doc.isEmpty()) return retval;
1718
1719 tokenizer.init(doc.data(),context.fileName,context.markdownSupport,context.insideHtmlLink);
1720
1721 // first parse any number of paragraphs
1722 bool isFirst=TRUE;
1723 DocPara *lastPar=!children.empty() ? std::get_if<DocPara>(&children.back()): nullptr;
1724 if (lastPar)
1725 { // last child item was a paragraph
1726 isFirst=FALSE;
1727 }
1728 do
1729 {
1730 children.append<DocPara>(this,parent);
1731 DocPara *par = children.get_last<DocPara>();
1732 if (isFirst) { par->markFirst(); isFirst=FALSE; }
1733 retval=par->parse();
1734 if (!par->isEmpty())
1735 {
1736 if (lastPar) lastPar->markLast(FALSE);
1737 lastPar=par;
1738 }
1739 else
1740 {
1741 children.pop_back();
1742 }
1743 } while (retval.is(TokenRetval::TK_NEWPARA));
1744 if (lastPar) lastPar->markLast();
1745
1746 AUTO_TRACE_EXIT("isFirst={} isLast={}",lastPar?lastPar->isFirst():-1,lastPar?lastPar->isLast():-1);
1747 return retval;
1748}
bool isLast() const
Definition docnode.h:1082
void markLast(bool v=TRUE)
Definition docnode.h:1080
bool isFirst() const
Definition docnode.h:1081
void pop_back()
removes the last element
Definition growvector.h:115
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:159

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

74{
75 auto &ctx = contextStack.top();
76 context = ctx;
77 tokenizer.setLineNr(ctx.lineNo);
78 contextStack.pop();
79 tokenizer.popContext();
80 context.token = tokenizer.token();
81
82 //QCString indent;
83 //indent.fill(' ',contextStack.size()*2+2);
84 //printf("%sdocParserPopContext() count=%zu\n",qPrint(indent),context.nodeStack.size());
85}
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 1908 of file docparser.cpp.

1909{
1910 AUTO_TRACE("data={} len={}",Trace::trunc(data),len);
1911 GrowBuf buf;
1912 size_t i=0;
1913 int lineNr = tokenizer.getLineNr();
1914 while (i<len)
1915 {
1916 char c = data[i];
1917 if (c=='@' || c=='\\') // look for a command
1918 {
1919 bool isBrief=TRUE;
1920 size_t j=isCopyBriefOrDetailsCmd(data,i,len,isBrief);
1921 if (j>0)
1922 {
1923 // skip whitespace
1924 while (j<len && (data[j]==' ' || data[j]=='\t')) j++;
1925 // extract the argument
1926 QCString id = extractCopyDocId(data,j,len);
1927 const Definition *def = nullptr;
1928 QCString doc,brief;
1929 //printf("resolving docs='%s'\n",qPrint(id));
1930 bool found = findDocsForMemberOrCompound(id,&doc,&brief,&def);
1931 if (found && def->isReference())
1932 {
1933 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1934 "@copy%s or @copydoc target '%s' found but is from a tag file, skipped", isBrief?"brief":"details",
1935 qPrint(id));
1936 }
1937 else if (found)
1938 {
1939 //printf("found it def=%p brief='%s' doc='%s' isBrief=%d\n",def,qPrint(brief),qPrint(doc),isBrief);
1940 auto it = std::find(context.copyStack.begin(),context.copyStack.end(),def);
1941 if (it==context.copyStack.end()) // definition not parsed earlier
1942 {
1943 QCString orgFileName = context.fileName;
1944 context.copyStack.push_back(def);
1945 auto addDocs = [&](const QCString &file_,int line_,const QCString &doc_)
1946 {
1947 buf.addStr(" \\ifile \""+file_+"\" ");
1948 buf.addStr("\\iline "+QCString().setNum(line_)+" \\ilinebr ");
1949 size_t len_ = doc_.length();
1950 buf.addStr(processCopyDoc(doc_.data(),len_));
1951 };
1952 if (isBrief)
1953 {
1954 addDocs(def->briefFile(),def->briefLine(),brief);
1955 }
1956 else
1957 {
1958 addDocs(def->docFile(),def->docLine(),doc);
1960 {
1961 const MemberDef *md = toMemberDef(def);
1962 const ArgumentList &docArgList = md->templateMaster() ?
1963 md->templateMaster()->argumentList() :
1964 md->argumentList();
1965 buf.addStr(inlineArgListToDoc(docArgList));
1966 }
1967 }
1968 context.copyStack.pop_back();
1969 buf.addStr(" \\ilinebr \\ifile \""+context.fileName+"\" ");
1970 buf.addStr("\\iline "+QCString().setNum(lineNr)+" ");
1971 }
1972 else
1973 {
1974 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1975 "Found recursive @copy%s or @copydoc relation for argument '%s'.",
1976 isBrief?"brief":"details",qPrint(id));
1977 }
1978 }
1979 else
1980 {
1981 warn_doc_error(context.fileName,tokenizer.getLineNr(),
1982 "@copy%s or @copydoc target '%s' not found", isBrief?"brief":"details",
1983 qPrint(id));
1984 }
1985 // skip over command
1986 i=j;
1987 }
1988 else
1989 {
1990 QCString endMarker;
1991 size_t k = isVerbatimSection(data,i,len,endMarker);
1992 if (k>0)
1993 {
1994 size_t orgPos = i;
1995 i=skipToEndMarker(data,k,len,endMarker);
1996 buf.addStr(data+orgPos,i-orgPos);
1997 // TODO: adjust lineNr
1998 }
1999 else
2000 {
2001 buf.addChar(c);
2002 i++;
2003 }
2004 }
2005 }
2006 else // not a command, just copy
2007 {
2008 buf.addChar(c);
2009 i++;
2010 lineNr += (c=='\n') ? 1 : 0;
2011 }
2012 }
2013 len = buf.getPos();
2014 buf.addChar(0);
2015 AUTO_TRACE_EXIT("result={}",Trace::trunc(buf.get()));
2016 return buf.get();
2017}
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)
size_t getPos() const
Definition growbuf.h:116
void addChar(char c)
Definition growbuf.h:69
void addStr(const QCString &s)
Definition growbuf.h:72
char * get()
Definition growbuf.h:114
virtual const ArgumentList & argumentList() const =0
virtual const MemberDef * templateMaster() const =0
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:1156

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

◆ pushContext()

void DocParser::pushContext ( )

Definition at line 59 of file docparser.cpp.

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

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

1753{
1754 AUTO_TRACE("file={} text={}",file,text);
1755 bool ambig = false;
1756 QCString filePath = findFilePath(file,ambig);
1757 if (!filePath.isEmpty())
1758 {
1759 text = fileToString(filePath,Config_getBool(FILTER_SOURCE_FILES));
1760 if (ambig)
1761 {
1762 warn_doc_error(context.fileName,tokenizer.getLineNr(),"included file name '%s' is ambiguous"
1763 "Possible candidates:\n%s",qPrint(file),
1765 );
1766 }
1767 }
1768 else
1769 {
1770 warn_doc_error(context.fileName,tokenizer.getLineNr(),"included file '%s' is not found. "
1771 "Check your EXAMPLE_PATH",qPrint(file));
1772 }
1773}
static FileNameLinkedMap * exampleNameLinkedMap
Definition doxygen.h:103
QCString findFilePath(const QCString &file, bool &ambig)
Definition util.cpp:3345
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
Definition util.cpp:1414

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

Referenced by DocInclude::parse().

Member Data Documentation

◆ context

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

◆ contextStack

std::stack< DocParserContext > DocParser::contextStack

Definition at line 139 of file docparser_p.h.

Referenced by popContext(), and pushContext().

◆ tokenizer

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


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